gencow 0.1.248 → 0.1.249
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/gencow.mjs +4 -15
- package/core/index.js +34 -15
- package/dashboard/assets/index-DvEb2ey9.css +1 -0
- package/dashboard/assets/index-PfrmDrvH.js +401 -0
- package/dashboard/index.html +2 -2
- package/lib/app-command.mjs +7 -138
- package/lib/app-delete-diagnostic.mjs +2 -34
- package/lib/app-diagnostics.mjs +0 -15
- package/lib/app-response-error.mjs +1 -149
- package/lib/backup-command.mjs +11 -0
- package/lib/cli-artifact-guard.mjs +0 -1
- package/lib/cli-command-runner.mjs +23 -0
- package/lib/cli-project-runtime.mjs +12 -3
- package/lib/codegen-command.mjs +25 -9
- package/lib/db-command.mjs +17 -15
- package/lib/deploy-auditor.mjs +12 -1
- package/lib/deploy-bundle-staging.mjs +1 -1
- package/lib/deploy-bundle-summary.mjs +47 -0
- package/lib/deploy-command.mjs +5 -28
- package/lib/deploy-correlation-diagnostic.mjs +2 -3
- package/lib/deploy-failure-diagnostic.mjs +215 -50
- package/lib/deploy-package-runtime.mjs +95 -96
- package/lib/deploy-receipt-store.mjs +25 -170
- package/lib/deploy-runtime-path-audit.mjs +81 -0
- package/lib/deploy-runtime.mjs +69 -10
- package/lib/deploy-static-fullstack-runtime.mjs +35 -95
- package/lib/deployment-admission-retry.mjs +4 -10
- package/lib/deployment-artifact-provenance.mjs +9 -4
- package/lib/deployment-operation-poll.mjs +43 -21
- package/lib/dev-cloud-migrations.mjs +0 -14
- package/lib/dev-local-command.mjs +8 -19
- package/lib/doctor-command.mjs +36 -27
- package/lib/env-command.mjs +5 -24
- package/lib/migration-diagnostic.mjs +4 -1
- package/lib/platform-client.mjs +121 -2
- package/lib/procedure-rpc-diagnostic.mjs +47 -0
- package/lib/project-migration-manifest.mjs +1 -0
- package/lib/release-client.mjs +18 -0
- package/lib/runtime-bom-diagnostic.mjs +155 -0
- package/lib/runtime-bom-resolve.mjs +275 -212
- package/lib/runtime-command.mjs +34 -32
- package/lib/static-deploy-command.mjs +29 -38
- package/lib/ts-codegen-import-extension.mjs +329 -0
- package/package.json +2 -2
- package/runtime/config.mjs +5 -2
- package/runtime/server.mjs +71924 -101483
- package/runtime/tooling.mjs +45 -19
- package/scripts/bundle-internal.mjs +2 -6
- package/scripts/bundle-server.mjs +3 -2
- package/dashboard/assets/index-C6ShUtAY.css +0 -1
- package/dashboard/assets/index-CNlUa_9S.js +0 -521
- package/lib/app-create-response.d.mts +0 -3
- package/lib/deploy-admission-response.mjs +0 -12
- package/lib/deploy-project-config.mjs +0 -35
- package/lib/deploy-release-receipt.mjs +0 -166
- package/lib/deploy-rollback.mjs +0 -99
- package/lib/init-command.d.mts +0 -30
- package/lib/platform-client.d.mts +0 -20
- package/lib/runtime-crash-parent-diagnostic.mjs +0 -12
- package/runtime/crash-parent-diagnostic.mjs +0 -208
- package/scripts/server-private-database-bundle.mjs +0 -34
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
function Sw(t,l){for(var r=0;r<l.length;r++){const i=l[r];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in t)){const u=Object.getOwnPropertyDescriptor(i,s);u&&Object.defineProperty(t,s,u.get?u:{enumerable:!0,get:()=>i[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const u of s)if(u.type==="childList")for(const f of u.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&i(f)}).observe(document,{childList:!0,subtree:!0});function r(s){const u={};return s.integrity&&(u.integrity=s.integrity),s.referrerPolicy&&(u.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?u.credentials="include":s.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(s){if(s.ep)return;s.ep=!0;const u=r(s);fetch(s.href,u)}})();function Vv(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ud={exports:{}},Di={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Ap;function Ew(){if(Ap)return Di;Ap=1;var t=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function r(i,s,u){var f=null;if(u!==void 0&&(f=""+u),s.key!==void 0&&(f=""+s.key),"key"in s){u={};for(var h in s)h!=="key"&&(u[h]=s[h])}else u=s;return s=u.ref,{$$typeof:t,type:i,key:f,ref:s!==void 0?s:null,props:u}}return Di.Fragment=l,Di.jsx=r,Di.jsxs=r,Di}var jp;function Cw(){return jp||(jp=1,ud.exports=Ew()),ud.exports}var m=Cw(),cd={exports:{}},Ne={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Tp;function Rw(){if(Tp)return Ne;Tp=1;var t=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),C=Symbol.iterator;function x(k){return k===null||typeof k!="object"?null:(k=C&&k[C]||k["@@iterator"],typeof k=="function"?k:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,R={};function _(k,P,$){this.props=k,this.context=P,this.refs=R,this.updater=$||S}_.prototype.isReactComponent={},_.prototype.setState=function(k,P){if(typeof k!="object"&&typeof k!="function"&&k!=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,k,P,"setState")},_.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function j(){}j.prototype=_.prototype;function A(k,P,$){this.props=k,this.context=P,this.refs=R,this.updater=$||S}var L=A.prototype=new j;L.constructor=A,E(L,_.prototype),L.isPureReactComponent=!0;var M=Array.isArray;function K(){}var X={H:null,A:null,T:null,S:null},U=Object.prototype.hasOwnProperty;function le(k,P,$){var W=$.ref;return{$$typeof:t,type:k,key:P,ref:W!==void 0?W:null,props:$}}function ye(k,P){return le(k.type,P,k.props)}function q(k){return typeof k=="object"&&k!==null&&k.$$typeof===t}function ee(k){var P={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function($){return P[$]})}var ie=/\/+/g;function oe(k,P){return typeof k=="object"&&k!==null&&k.key!=null?ee(""+k.key):P.toString(36)}function he(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(K,K):(k.status="pending",k.then(function(P){k.status==="pending"&&(k.status="fulfilled",k.value=P)},function(P){k.status==="pending"&&(k.status="rejected",k.reason=P)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function O(k,P,$,W,V){var Z=typeof k;(Z==="undefined"||Z==="boolean")&&(k=null);var se=!1;if(k===null)se=!0;else switch(Z){case"bigint":case"string":case"number":se=!0;break;case"object":switch(k.$$typeof){case t:case l:se=!0;break;case y:return se=k._init,O(se(k._payload),P,$,W,V)}}if(se)return V=V(k),se=W===""?"."+oe(k,0):W,M(V)?($="",se!=null&&($=se.replace(ie,"$&/")+"/"),O(V,P,$,"",function(pe){return pe})):V!=null&&(q(V)&&(V=ye(V,$+(V.key==null||k&&k.key===V.key?"":(""+V.key).replace(ie,"$&/")+"/")+se)),P.push(V)),1;se=0;var fe=W===""?".":W+":";if(M(k))for(var te=0;te<k.length;te++)W=k[te],Z=fe+oe(W,te),se+=O(W,P,$,Z,V);else if(te=x(k),typeof te=="function")for(k=te.call(k),te=0;!(W=k.next()).done;)W=W.value,Z=fe+oe(W,te++),se+=O(W,P,$,Z,V);else if(Z==="object"){if(typeof k.then=="function")return O(he(k),P,$,W,V);throw P=String(k),Error("Objects are not valid as a React child (found: "+(P==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":P)+"). If you meant to render a collection of children, use an array instead.")}return se}function G(k,P,$){if(k==null)return k;var W=[],V=0;return O(k,W,"","",function(Z){return P.call($,Z,V++)}),W}function ae(k){if(k._status===-1){var P=k._result;P=P(),P.then(function($){(k._status===0||k._status===-1)&&(k._status=1,k._result=$)},function($){(k._status===0||k._status===-1)&&(k._status=2,k._result=$)}),k._status===-1&&(k._status=0,k._result=P)}if(k._status===1)return k._result.default;throw k._result}var ve=typeof reportError=="function"?reportError:function(k){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var P=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof k=="object"&&k!==null&&typeof k.message=="string"?String(k.message):String(k),error:k});if(!window.dispatchEvent(P))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",k);return}console.error(k)},ne={map:G,forEach:function(k,P,$){G(k,function(){P.apply(this,arguments)},$)},count:function(k){var P=0;return G(k,function(){P++}),P},toArray:function(k){return G(k,function(P){return P})||[]},only:function(k){if(!q(k))throw Error("React.Children.only expected to receive a single React element child.");return k}};return Ne.Activity=v,Ne.Children=ne,Ne.Component=_,Ne.Fragment=r,Ne.Profiler=s,Ne.PureComponent=A,Ne.StrictMode=i,Ne.Suspense=g,Ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=X,Ne.__COMPILER_RUNTIME={__proto__:null,c:function(k){return X.H.useMemoCache(k)}},Ne.cache=function(k){return function(){return k.apply(null,arguments)}},Ne.cacheSignal=function(){return null},Ne.cloneElement=function(k,P,$){if(k==null)throw Error("The argument must be a React element, but you passed "+k+".");var W=E({},k.props),V=k.key;if(P!=null)for(Z in P.key!==void 0&&(V=""+P.key),P)!U.call(P,Z)||Z==="key"||Z==="__self"||Z==="__source"||Z==="ref"&&P.ref===void 0||(W[Z]=P[Z]);var Z=arguments.length-2;if(Z===1)W.children=$;else if(1<Z){for(var se=Array(Z),fe=0;fe<Z;fe++)se[fe]=arguments[fe+2];W.children=se}return le(k.type,V,W)},Ne.createContext=function(k){return k={$$typeof:f,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null},k.Provider=k,k.Consumer={$$typeof:u,_context:k},k},Ne.createElement=function(k,P,$){var W,V={},Z=null;if(P!=null)for(W in P.key!==void 0&&(Z=""+P.key),P)U.call(P,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(V[W]=P[W]);var se=arguments.length-2;if(se===1)V.children=$;else if(1<se){for(var fe=Array(se),te=0;te<se;te++)fe[te]=arguments[te+2];V.children=fe}if(k&&k.defaultProps)for(W in se=k.defaultProps,se)V[W]===void 0&&(V[W]=se[W]);return le(k,Z,V)},Ne.createRef=function(){return{current:null}},Ne.forwardRef=function(k){return{$$typeof:h,render:k}},Ne.isValidElement=q,Ne.lazy=function(k){return{$$typeof:y,_payload:{_status:-1,_result:k},_init:ae}},Ne.memo=function(k,P){return{$$typeof:p,type:k,compare:P===void 0?null:P}},Ne.startTransition=function(k){var P=X.T,$={};X.T=$;try{var W=k(),V=X.S;V!==null&&V($,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(K,ve)}catch(Z){ve(Z)}finally{P!==null&&$.types!==null&&(P.types=$.types),X.T=P}},Ne.unstable_useCacheRefresh=function(){return X.H.useCacheRefresh()},Ne.use=function(k){return X.H.use(k)},Ne.useActionState=function(k,P,$){return X.H.useActionState(k,P,$)},Ne.useCallback=function(k,P){return X.H.useCallback(k,P)},Ne.useContext=function(k){return X.H.useContext(k)},Ne.useDebugValue=function(){},Ne.useDeferredValue=function(k,P){return X.H.useDeferredValue(k,P)},Ne.useEffect=function(k,P){return X.H.useEffect(k,P)},Ne.useEffectEvent=function(k){return X.H.useEffectEvent(k)},Ne.useId=function(){return X.H.useId()},Ne.useImperativeHandle=function(k,P,$){return X.H.useImperativeHandle(k,P,$)},Ne.useInsertionEffect=function(k,P){return X.H.useInsertionEffect(k,P)},Ne.useLayoutEffect=function(k,P){return X.H.useLayoutEffect(k,P)},Ne.useMemo=function(k,P){return X.H.useMemo(k,P)},Ne.useOptimistic=function(k,P){return X.H.useOptimistic(k,P)},Ne.useReducer=function(k,P,$){return X.H.useReducer(k,P,$)},Ne.useRef=function(k){return X.H.useRef(k)},Ne.useState=function(k){return X.H.useState(k)},Ne.useSyncExternalStore=function(k,P,$){return X.H.useSyncExternalStore(k,P,$)},Ne.useTransition=function(){return X.H.useTransition()},Ne.version="19.2.3",Ne}var kp;function cf(){return kp||(kp=1,cd.exports=Rw()),cd.exports}var w=cf();const re=Vv(w),Yi=Sw({__proto__:null,default:re},[w]);function Iv(t){var l,r,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(l=0;l<s;l++)t[l]&&(r=Iv(t[l]))&&(i&&(i+=" "),i+=r)}else for(r in t)t[r]&&(i&&(i+=" "),i+=r);return i}function Fv(){for(var t,l,r=0,i="",s=arguments.length;r<s;r++)(t=arguments[r])&&(l=Iv(t))&&(i&&(i+=" "),i+=l);return i}const Dp=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Mp=Fv,qv=(t,l)=>r=>{var i;if((l==null?void 0:l.variants)==null)return Mp(t,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:u}=l,f=Object.keys(s).map(p=>{const y=r==null?void 0:r[p],v=u==null?void 0:u[p];if(y===null)return null;const C=Dp(y)||Dp(v);return s[p][C]}),h=r&&Object.entries(r).reduce((p,y)=>{let[v,C]=y;return C===void 0||(p[v]=C),p},{}),g=l==null||(i=l.compoundVariants)===null||i===void 0?void 0:i.reduce((p,y)=>{let{class:v,className:C,...x}=y;return Object.entries(x).every(S=>{let[E,R]=S;return Array.isArray(R)?R.includes({...u,...h}[E]):{...u,...h}[E]===R})?[...p,v,C]:p},[]);return Mp(t,f,g,r==null?void 0:r.class,r==null?void 0:r.className)};var dd={exports:{}},zt={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* react-dom.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var Op;function Nw(){if(Op)return zt;Op=1;var t=cf();function l(g){var p="https://react.dev/errors/"+g;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)p+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+g+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var i={d:{f:r,r:function(){throw Error(l(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},s=Symbol.for("react.portal");function u(g,p,y){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:v==null?null:""+v,children:g,containerInfo:p,implementation:y}}var f=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(g,p){if(g==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return zt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,zt.createPortal=function(g,p){var y=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(g,p,null,y)},zt.flushSync=function(g){var p=f.T,y=i.p;try{if(f.T=null,i.p=2,g)return g()}finally{f.T=p,i.p=y,i.d.f()}},zt.preconnect=function(g,p){typeof g=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,i.d.C(g,p))},zt.prefetchDNS=function(g){typeof g=="string"&&i.d.D(g)},zt.preinit=function(g,p){if(typeof g=="string"&&p&&typeof p.as=="string"){var y=p.as,v=h(y,p.crossOrigin),C=typeof p.integrity=="string"?p.integrity:void 0,x=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;y==="style"?i.d.S(g,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:v,integrity:C,fetchPriority:x}):y==="script"&&i.d.X(g,{crossOrigin:v,integrity:C,fetchPriority:x,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},zt.preinitModule=function(g,p){if(typeof g=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var y=h(p.as,p.crossOrigin);i.d.M(g,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&i.d.M(g)},zt.preload=function(g,p){if(typeof g=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var y=p.as,v=h(y,p.crossOrigin);i.d.L(g,y,{crossOrigin:v,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})}},zt.preloadModule=function(g,p){if(typeof g=="string")if(p){var y=h(p.as,p.crossOrigin);i.d.m(g,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else i.d.m(g)},zt.requestFormReset=function(g){i.d.r(g)},zt.unstable_batchedUpdates=function(g,p){return g(p)},zt.useFormState=function(g,p,y){return f.H.useFormState(g,p,y)},zt.useFormStatus=function(){return f.H.useHostTransitionStatus()},zt.version="19.2.3",zt}var zp;function $v(){if(zp)return dd.exports;zp=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(l){console.error(l)}}return t(),dd.exports=Nw(),dd.exports}var df=$v();const _w=Vv(df);function Lp(t,l){if(typeof t=="function")return t(l);t!=null&&(t.current=l)}function Aw(...t){return l=>{let r=!1;const i=t.map(s=>{const u=Lp(s,l);return!r&&typeof u=="function"&&(r=!0),u});if(r)return()=>{for(let s=0;s<i.length;s++){const u=i[s];typeof u=="function"?u():Lp(t[s],null)}}}}function Lr(...t){return w.useCallback(Aw(...t),t)}function ff(t){const l=w.forwardRef((r,i)=>{let{children:s,...u}=r,f=null,h=!1;const g=[];Up(s)&&typeof ds=="function"&&(s=ds(s._payload)),w.Children.forEach(s,C=>{var x;if(Mw(C)){h=!0;const S=C;let E="child"in S.props?S.props.child:S.props.children;Up(E)&&typeof ds=="function"&&(E=ds(E._payload)),f=Tw(S,E),g.push((x=f==null?void 0:f.props)==null?void 0:x.children)}else g.push(C)}),f?f=w.cloneElement(f,void 0,g):!h&&w.Children.count(s)===1&&w.isValidElement(s)&&(f=s);const p=f?Dw(f):void 0,y=Lr(i,p);if(!f){if(s||s===0)throw new Error(h?Uw(t):Lw(t));return s}const v=kw(u,f.props??{});return f.type!==w.Fragment&&(v.ref=i?y:p),w.cloneElement(f,v)});return l.displayName=`${t}.Slot`,l}var Gv=ff("Slot"),jw=Symbol.for("radix.slottable"),Tw=(t,l)=>{if("child"in t.props){const r=t.props.child;return w.isValidElement(r)?w.cloneElement(r,void 0,t.props.children(r.props.children)):null}return w.isValidElement(l)?l:null};function kw(t,l){const r={...l};for(const i in l){const s=t[i],u=l[i];/^on[A-Z]/.test(i)?s&&u?r[i]=(...h)=>{const g=u(...h);return s(...h),g}:s&&(r[i]=s):i==="style"?r[i]={...s,...u}:i==="className"&&(r[i]=[s,u].filter(Boolean).join(" "))}return{...t,...r}}function Dw(t){var i,s;let l=(i=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:i.get,r=l&&"isReactWarning"in l&&l.isReactWarning;return r?t.ref:(l=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,r=l&&"isReactWarning"in l&&l.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}function Mw(t){return w.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===jw}var Ow=Symbol.for("react.lazy");function Up(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===Ow&&"_payload"in t&&zw(t._payload)}function zw(t){return typeof t=="object"&&t!==null&&"then"in t}var Lw=t=>`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,Uw=t=>`${t} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,ds=Yi[" use ".trim().toString()],Bw=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ul=Bw.reduce((t,l)=>{const r=ff(`Primitive.${l}`),i=w.forwardRef((s,u)=>{const{asChild:f,...h}=s,g=f?r:l;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(g,{...h,ref:u})});return i.displayName=`Primitive.${l}`,{...t,[l]:i}},{});function Hw(t,l){t&&df.flushSync(()=>t.dispatchEvent(l))}function Vw(t,l=[]){let r=[];function i(u,f){const h=w.createContext(f);h.displayName=u+"Context";const g=r.length;r=[...r,f];const p=v=>{var _;const{scope:C,children:x,...S}=v,E=((_=C==null?void 0:C[t])==null?void 0:_[g])||h,R=w.useMemo(()=>S,Object.values(S));return m.jsx(E.Provider,{value:R,children:x})};p.displayName=u+"Provider";function y(v,C,x={}){var _;const{optional:S=!1}=x,E=((_=C==null?void 0:C[t])==null?void 0:_[g])||h,R=w.useContext(E);if(R)return R;if(f!==void 0)return f;if(!S)throw new Error(`\`${v}\` must be used within \`${u}\``)}return[p,y]}const s=()=>{const u=r.map(f=>w.createContext(f));return function(h){const g=(h==null?void 0:h[t])||u;return w.useMemo(()=>({[`__scope${t}`]:{...h,[t]:g}}),[h,g])}};return s.scopeName=t,[i,Iw(s,...l)]}function Iw(...t){const l=t[0];if(t.length===1)return l;const r=()=>{const i=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(u){const f=i.reduce((h,{useScope:g,scopeName:p})=>{const v=g(u)[`__scope${p}`];return{...h,...v}},{});return w.useMemo(()=>({[`__scope${l.scopeName}`]:f}),[f])}};return r.scopeName=l.scopeName,r}var Fw=Object.defineProperty,Ur=(t,l)=>Fw(t,"name",{value:l,configurable:!0}),Pv=!!(typeof window<"u"&&window.document&&window.document.createElement);function _a(t,l,{checkForDefaultPrevented:r=!0}={}){return Ur(function(s){if(t==null||t(s),r===!1||!s||!s.defaultPrevented)return l==null?void 0:l(s)},"handleEvent")}Ur(_a,"composeEventHandlers");function qw(t){var l;if(!Pv)throw new Error("Cannot access window outside of the DOM");return((l=t==null?void 0:t.ownerDocument)==null?void 0:l.defaultView)??window}Ur(qw,"getOwnerWindow");function Ud(t){if(!Pv)throw new Error("Cannot access document outside of the DOM");return(t==null?void 0:t.ownerDocument)??document}Ur(Ud,"getOwnerDocument");function Yv(t,l=!1){const{activeElement:r}=Ud(t);if(!(r!=null&&r.nodeName))return null;if(Xv(r)&&r.contentDocument)return Yv(r.contentDocument.body,l);if(l){const i=r.getAttribute("aria-activedescendant");if(i){const s=Ud(r).getElementById(i);if(s)return s}}return r}Ur(Yv,"getActiveElement");function Xv(t){return t.tagName==="IFRAME"}Ur(Xv,"isFrame");var Ol=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},Bp=Yi[" useEffectEvent ".trim().toString()],Hp=Yi[" useInsertionEffect ".trim().toString()];function $w(t){if(typeof Bp=="function")return Bp(t);const l=w.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof Hp=="function"?Hp(()=>{l.current=t}):Ol(()=>{l.current=t}),w.useMemo(()=>((...r)=>{var i;return(i=l.current)==null?void 0:i.call(l,...r)}),[])}var Gw=Object.defineProperty,Xi=(t,l)=>Gw(t,"name",{value:l,configurable:!0}),Pw=Yi[" useInsertionEffect ".trim().toString()]||Ol;function Kv({prop:t,defaultProp:l,onChange:r=Xi(()=>{},"onChange"),caller:i}){const[s,u,f]=Qv({defaultProp:l,onChange:r}),h=t!==void 0,g=h?t:s,p=w.useCallback(y=>{var v;if(h){const C=Zv(y)?y(t):y;C!==t&&((v=f.current)==null||v.call(f,C))}else u(y)},[h,t,u,f]);return[g,p]}Xi(Kv,"useControllableState");function Qv({defaultProp:t,onChange:l}){const[r,i]=w.useState(t),s=w.useRef(r),u=w.useRef(l);return Pw(()=>{u.current=l},[l]),w.useEffect(()=>{var f;s.current!==r&&((f=u.current)==null||f.call(u,r),s.current=r)},[r,s]),[r,i,u]}Xi(Qv,"useUncontrolledState");function Zv(t){return typeof t=="function"}Xi(Zv,"isFunction");var Vp=Symbol("RADIX:SYNC_STATE");function Yw(t,l,r,i){const{prop:s,defaultProp:u,onChange:f,caller:h}=l,g=s!==void 0,p=$w(f),y=[{...r,state:u}];i&&y.push(i);const[v,C]=w.useReducer((R,_)=>{if(_.type===Vp)return{...R,state:_.state};const j=t(R,_);return g&&!Object.is(j.state,R.state)&&p(j.state),j},...y),x=v.state,S=w.useRef(x);w.useEffect(()=>{S.current!==x&&(S.current=x,g||p(x))},[x,S,g]);const E=w.useMemo(()=>s!==void 0?{...v,state:s}:v,[v,s]);return w.useEffect(()=>{g&&!Object.is(s,v.state)&&C({type:Vp,state:s})},[s,v.state,g]),[E,C]}Xi(Yw,"useControllableStateReducer");var Xw=Object.defineProperty,Aa=(t,l)=>Xw(t,"name",{value:l,configurable:!0});function Jv(t,l){return w.useReducer((r,i)=>l[r][i]??r,t)}Aa(Jv,"useStateMachine");var mf=Aa(t=>{const{present:l,children:r}=t,i=Wv(l),s=typeof r=="function"?r({present:i.isPresent}):w.Children.only(r),u=ey(i.ref,ty(s));return typeof r=="function"||i.isPresent?w.cloneElement(s,{ref:u}):null},"Presence");function Wv(t){const[l,r]=w.useState(),i=w.useRef(null),s=w.useRef(t),u=w.useRef("none"),f=w.useRef(void 0),h=t?"mounted":"unmounted",[g,p]=Jv(h,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{g==="mounted"?(u.current=f.current??Dr(i.current),f.current=void 0):u.current="none"},[g]),Ol(()=>{const y=i.current,v=s.current;if(v!==t){const x=u.current,S=Dr(y);t?(f.current=S,p("MOUNT")):S==="none"||(y==null?void 0:y.display)==="none"?p("UNMOUNT"):p(v&&x!==S?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,p]),Ol(()=>{if(l){let y;const v=l.ownerDocument.defaultView??window,C=Aa(S=>{const R=Dr(i.current).includes(CSS.escape(S.animationName));if(S.target===l&&R&&(p("ANIMATION_END"),!s.current)){const _=l.style.animationFillMode;l.style.animationFillMode="forwards",y=v.setTimeout(()=>{l.style.animationFillMode==="forwards"&&(l.style.animationFillMode=_)})}},"handleAnimationEnd"),x=Aa(S=>{S.target===l&&(u.current=Dr(i.current))},"handleAnimationStart");return l.addEventListener("animationstart",x),l.addEventListener("animationcancel",C),l.addEventListener("animationend",C),()=>{v.clearTimeout(y),l.removeEventListener("animationstart",x),l.removeEventListener("animationcancel",C),l.removeEventListener("animationend",C)}}else p("ANIMATION_END")},[l,p]),{isPresent:["mounted","unmountSuspended"].includes(g),ref:w.useCallback(y=>{if(y){const v=getComputedStyle(y);i.current=v,f.current=Dr(v)}else i.current=null;r(y)},[])}}Aa(Wv,"usePresence");function Bd(t,l){if(typeof t=="function")return t(l);t!=null&&(t.current=l)}Aa(Bd,"setRef");function ey(...t){const l=w.useRef(t);return l.current=t,w.useCallback(r=>{const i=l.current;let s=!1;const u=i.map(f=>{const h=Bd(f,r);return!s&&typeof h=="function"&&(s=!0),h});if(s)return()=>{for(let f=0;f<u.length;f++){const h=u[f];typeof h=="function"?h():Bd(i[f],null)}}},[])}Aa(ey,"useStableComposedRefs");function Dr(t){return(t==null?void 0:t.animationName)||"none"}Aa(Dr,"getAnimationName");function ty(t){var i,s;let l=(i=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:i.get,r=l&&"isReactWarning"in l&&l.isReactWarning;return r?t.ref:(l=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,r=l&&"isReactWarning"in l&&l.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}Aa(ty,"getElementRef");var Kw=Yi[" useId ".trim().toString()]||(()=>{}),Qw=0;function fd(t){const[l,r]=w.useState(Kw());return Ol(()=>{r(i=>i??String(Qw++))},[t]),t||(l?`radix-${l}`:"")}function Fi(t){const l=w.useRef(t);return w.useEffect(()=>{l.current=t}),w.useMemo(()=>((...r)=>{var i;return(i=l.current)==null?void 0:i.call(l,...r)}),[])}var Zw=Object.defineProperty,Rt=(t,l)=>Zw(t,"name",{value:l,configurable:!0}),Hd="dismissableLayer.update",Jw="dismissableLayer.pointerDownOutside",Ww="dismissableLayer.focusOutside",Ip,ny=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),e1=w.forwardRef(Rt(function(l,r){const{disableOutsidePointerEvents:i=!1,deferPointerDownOutside:s=!1,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:g,onDismiss:p,...y}=l,v=w.useContext(ny),[C,x]=w.useState(null),S=(C==null?void 0:C.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,E]=w.useState({}),R=Lr(r,x),_=Array.from(v.layers),[j]=[...v.layersWithOutsidePointerEventsDisabled].slice(-1),A=j?_.indexOf(j):-1,L=C?_.indexOf(C):-1,M=v.layersWithOutsidePointerEventsDisabled.size>0,K=L>=A,X=w.useRef(!1),U=ly(ee=>{f==null||f(ee),g==null||g(ee),ee.defaultPrevented||p==null||p()},{ownerDocument:S,deferPointerDownOutside:s,isDeferredPointerDownOutsideRef:X,dismissableSurfaces:v.dismissableSurfaces,shouldHandlePointerDownOutside:w.useCallback(ee=>{if(!(ee instanceof Node))return!1;const ie=[...v.branches].some(oe=>oe.contains(ee));return K&&!ie},[v.branches,K])}),le=ry(ee=>{if(s&&X.current)return;const ie=ee.target;[...v.branches].some(he=>he.contains(ie))||(h==null||h(ee),g==null||g(ee),ee.defaultPrevented||p==null||p())},S),ye=C?L===_.length-1:!1,q=Fi(ee=>{ee.key==="Escape"&&(u==null||u(ee),!ee.defaultPrevented&&p&&(ee.preventDefault(),p()))});return w.useEffect(()=>{if(ye)return S.addEventListener("keydown",q,{capture:!0}),()=>S.removeEventListener("keydown",q,{capture:!0})},[S,ye,q]),w.useEffect(()=>{if(C)return i&&(v.layersWithOutsidePointerEventsDisabled.size===0&&(Ip=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),v.layersWithOutsidePointerEventsDisabled.add(C)),v.layers.add(C),Vd(),()=>{i&&(v.layersWithOutsidePointerEventsDisabled.delete(C),v.layersWithOutsidePointerEventsDisabled.size===0&&(S.body.style.pointerEvents=Ip))}},[C,S,i,v]),w.useEffect(()=>()=>{C&&(v.layers.delete(C),v.layersWithOutsidePointerEventsDisabled.delete(C),Vd())},[C,v]),w.useEffect(()=>{const ee=Rt(()=>E({}),"handleUpdate");return document.addEventListener(Hd,ee),()=>document.removeEventListener(Hd,ee)},[]),m.jsx(Ul.div,{...y,ref:R,style:{pointerEvents:M?K?"auto":"none":void 0,...l.style},onFocusCapture:_a(l.onFocusCapture,le.onFocusCapture),onBlurCapture:_a(l.onBlurCapture,le.onBlurCapture),onPointerDownCapture:_a(l.onPointerDownCapture,U.onPointerDownCapture)})},"DismissableLayer"));function ay(){const t=w.useContext(ny),[l,r]=w.useState(null);return w.useEffect(()=>{if(l)return t.dismissableSurfaces.add(l),()=>{t.dismissableSurfaces.delete(l)}},[l,t.dismissableSurfaces]),r}Rt(ay,"useDismissableLayerSurface");var t1=Rt(()=>!0,"IS_TRUE");function ly(t,l){const{ownerDocument:r=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:i=!1,isDeferredPointerDownOutsideRef:s,dismissableSurfaces:u,shouldHandlePointerDownOutside:f=t1}=l,h=Fi(t),g=w.useRef(!1),p=w.useRef(!1),y=w.useRef(new Map),v=w.useRef(()=>{});return w.useEffect(()=>{function C(){p.current=!1,s.current=!1,y.current.clear()}Rt(C,"resetOutsideInteraction");function x(){return Array.from(y.current.values()).some(Boolean)}Rt(x,"isOutsideInteractionIntercepted");function S(A){if(!p.current)return;const L=A.target;L instanceof Node&&[...u].some(K=>K.contains(L))||y.current.set(A.type,!0),A.type==="click"&&window.setTimeout(()=>{p.current&&v.current()},0)}Rt(S,"handleInteractionCapture");function E(A){p.current&&y.current.set(A.type,!1)}Rt(E,"handleInteractionBubble");const R=Rt(A=>{if(A.target&&!g.current){let L=function(){r.removeEventListener("click",v.current);const K=x();C(),K||hf(Jw,h,M,{discrete:!0})};if(Rt(L,"handleAndDispatchPointerDownOutsideEvent"),!f(A.target)){r.removeEventListener("click",v.current),C(),g.current=!1;return}const M={originalEvent:A};p.current=!0,s.current=i&&A.button===0,y.current.clear(),!i||A.button!==0?L():(r.removeEventListener("click",v.current),v.current=L,r.addEventListener("click",v.current,{once:!0}))}else r.removeEventListener("click",v.current),C();g.current=!1},"handlePointerDown"),_=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const A of _)r.addEventListener(A,S,!0),r.addEventListener(A,E);const j=window.setTimeout(()=>{r.addEventListener("pointerdown",R)},0);return()=>{window.clearTimeout(j),r.removeEventListener("pointerdown",R),r.removeEventListener("click",v.current);for(const A of _)r.removeEventListener(A,S,!0),r.removeEventListener(A,E)}},[r,h,i,s,u,f]),{onPointerDownCapture:Rt(()=>g.current=!0,"onPointerDownCapture")}}Rt(ly,"usePointerDownOutside");function ry(t,l=globalThis==null?void 0:globalThis.document){const r=Fi(t),i=w.useRef(!1);return w.useEffect(()=>{const s=Rt(u=>{u.target&&!i.current&&hf(Ww,r,{originalEvent:u},{discrete:!1})},"handleFocus");return l.addEventListener("focusin",s),()=>l.removeEventListener("focusin",s)},[l,r]),{onFocusCapture:Rt(()=>i.current=!0,"onFocusCapture"),onBlurCapture:Rt(()=>i.current=!1,"onBlurCapture")}}Rt(ry,"useFocusOutside");function Vd(){const t=new CustomEvent(Hd);document.dispatchEvent(t)}Rt(Vd,"dispatchUpdate");function hf(t,l,r,{discrete:i}){const s=r.originalEvent.target,u=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});l&&s.addEventListener(t,l,{once:!0}),i?Hw(s,u):s.dispatchEvent(u)}Rt(hf,"handleAndDispatchCustomEvent");var n1=Object.defineProperty,$t=(t,l)=>n1(t,"name",{value:l,configurable:!0}),md="focusScope.autoFocusOnMount",hd="focusScope.autoFocusOnUnmount",Fp={bubbles:!1,cancelable:!0},a1=w.forwardRef($t(function(l,r){const{loop:i=!1,trapped:s=!1,onMountAutoFocus:u,onUnmountAutoFocus:f,...h}=l,[g,p]=w.useState(null),y=Fi(u),v=Fi(f),C=w.useRef(null),x=Lr(r,p),S=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(s){let R=function(L){if(S.paused||!g)return;const M=L.target;g.contains(M)?C.current=M:Ra(C.current,{select:!0})},_=function(L){if(S.paused||!g)return;const M=L.relatedTarget;M!==null&&(g.contains(M)||Ra(C.current,{select:!0}))},j=function(L){if(document.activeElement===document.body)for(const K of L)K.removedNodes.length>0&&Ra(g)};$t(R,"handleFocusIn"),$t(_,"handleFocusOut"),$t(j,"handleMutations"),document.addEventListener("focusin",R),document.addEventListener("focusout",_);const A=new MutationObserver(j);return g&&A.observe(g,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",R),document.removeEventListener("focusout",_),A.disconnect()}}},[s,g,S.paused]),w.useEffect(()=>{if(g){qp.add(S);const R=document.activeElement;if(!g.contains(R)){const j=new CustomEvent(md,Fp);g.addEventListener(md,y),g.dispatchEvent(j),j.defaultPrevented||(iy(dy(gf(g)),{select:!0}),document.activeElement===R&&Ra(g))}return()=>{g.removeEventListener(md,y),setTimeout(()=>{const j=new CustomEvent(hd,Fp);g.addEventListener(hd,v),g.dispatchEvent(j),j.defaultPrevented||Ra(R??document.body,{select:!0}),g.removeEventListener(hd,v),qp.remove(S)},0)}}},[g,y,v,S]);const E=w.useCallback(R=>{if(!i&&!s||S.paused)return;const _=R.key==="Tab"&&!R.altKey&&!R.ctrlKey&&!R.metaKey,j=document.activeElement;if(_&&j){const A=R.currentTarget,[L,M]=oy(A);L&&M?!R.shiftKey&&j===M?(R.preventDefault(),i&&Ra(L,{select:!0})):R.shiftKey&&j===L&&(R.preventDefault(),i&&Ra(M,{select:!0})):j===A&&R.preventDefault()}},[i,s,S.paused]);return m.jsx(Ul.div,{tabIndex:-1,...h,ref:x,onKeyDown:E})},"FocusScope"));function iy(t,{select:l=!1}={}){const r=document.activeElement;for(const i of t)if(Ra(i,{select:l}),document.activeElement!==r)return}$t(iy,"focusFirst");function oy(t){const l=gf(t),r=Id(l,t),i=Id(l.reverse(),t);return[r,i]}$t(oy,"getTabbableEdges");function gf(t){const l=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:$t(i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;r.nextNode();)l.push(r.currentNode);return l}$t(gf,"getTabbableCandidates");function Id(t,l){const r=typeof l.checkVisibility=="function"&&l.checkVisibility({checkVisibilityCSS:!0});for(const i of t)if(!(r?!i.checkVisibility({checkVisibilityCSS:!0}):sy(i,{upTo:l})))return i}$t(Id,"findVisible");function sy(t,{upTo:l}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(l!==void 0&&t===l)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}$t(sy,"isHidden");function uy(t){return t instanceof HTMLInputElement&&"select"in t}$t(uy,"isSelectableInput");function Ra(t,{select:l=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&uy(t)&&l&&t.select()}}$t(Ra,"focus");var qp=cy();function cy(){let t=[];return{add(l){const r=t[0];l!==r&&(r==null||r.pause()),t=Fd(t,l),t.unshift(l)},remove(l){var r;t=Fd(t,l),(r=t[0])==null||r.resume()}}}$t(cy,"createFocusScopesStack");function Fd(t,l){const r=[...t],i=r.indexOf(l);return i!==-1&&r.splice(i,1),r}$t(Fd,"arrayRemove");function dy(t){return t.filter(l=>l.tagName!=="A")}$t(dy,"removeLinks");var l1=Object.defineProperty,r1=(t,l)=>l1(t,"name",{value:l,configurable:!0}),i1=w.forwardRef(r1(function(l,r){var g;const{container:i,...s}=l,[u,f]=w.useState(!1);Ol(()=>f(!0),[]);const h=i||u&&((g=globalThis==null?void 0:globalThis.document)==null?void 0:g.body);return h?df.createPortal(m.jsx(Ul.div,{...s,ref:r}),h):null},"Portal")),fs=0,Kn=null;function o1(){w.useEffect(()=>{Kn||(Kn={start:$p(),end:$p()});const{start:t,end:l}=Kn;return document.body.firstElementChild!==t&&document.body.insertAdjacentElement("afterbegin",t),document.body.lastElementChild!==l&&document.body.insertAdjacentElement("beforeend",l),fs++,()=>{fs===1&&(Kn==null||Kn.start.remove(),Kn==null||Kn.end.remove(),Kn=null),fs=Math.max(0,fs-1)}},[])}function $p(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var Wn=function(){return Wn=Object.assign||function(l){for(var r,i=1,s=arguments.length;i<s;i++){r=arguments[i];for(var u in r)Object.prototype.hasOwnProperty.call(r,u)&&(l[u]=r[u])}return l},Wn.apply(this,arguments)};function fy(t,l){var r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&l.indexOf(i)<0&&(r[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(t);s<i.length;s++)l.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(r[i[s]]=t[i[s]]);return r}function s1(t,l,r){if(r||arguments.length===2)for(var i=0,s=l.length,u;i<s;i++)(u||!(i in l))&&(u||(u=Array.prototype.slice.call(l,0,i)),u[i]=l[i]);return t.concat(u||Array.prototype.slice.call(l))}var Cs="right-scroll-bar-position",Rs="width-before-scroll-bar",u1="with-scroll-bars-hidden",c1="--removed-body-scroll-bar-size";function gd(t,l){return typeof t=="function"?t(l):t&&(t.current=l),t}function d1(t,l){var r=w.useState(function(){return{value:t,callback:l,facade:{get current(){return r.value},set current(i){var s=r.value;s!==i&&(r.value=i,r.callback(i,s))}}}})[0];return r.callback=l,r.facade}var f1=typeof window<"u"?w.useLayoutEffect:w.useEffect,Gp=new WeakMap;function m1(t,l){var r=d1(null,function(i){return t.forEach(function(s){return gd(s,i)})});return f1(function(){var i=Gp.get(r);if(i){var s=new Set(i),u=new Set(t),f=r.current;s.forEach(function(h){u.has(h)||gd(h,null)}),u.forEach(function(h){s.has(h)||gd(h,f)})}Gp.set(r,t)},[t]),r}function h1(t){return t}function g1(t,l){l===void 0&&(l=h1);var r=[],i=!1,s={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:t},useMedium:function(u){var f=l(u,i);return r.push(f),function(){r=r.filter(function(h){return h!==f})}},assignSyncMedium:function(u){for(i=!0;r.length;){var f=r;r=[],f.forEach(u)}r={push:function(h){return u(h)},filter:function(){return r}}},assignMedium:function(u){i=!0;var f=[];if(r.length){var h=r;r=[],h.forEach(u),f=r}var g=function(){var y=f;f=[],y.forEach(u)},p=function(){return Promise.resolve().then(g)};p(),r={push:function(y){f.push(y),p()},filter:function(y){return f=f.filter(y),r}}}};return s}function p1(t){t===void 0&&(t={});var l=g1(null);return l.options=Wn({async:!0,ssr:!1},t),l}var my=function(t){var l=t.sideCar,r=fy(t,["sideCar"]);if(!l)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=l.read();if(!i)throw new Error("Sidecar medium not found");return w.createElement(i,Wn({},r))};my.isSideCarExport=!0;function v1(t,l){return t.useMedium(l),my}var hy=p1(),pd=function(){},Fs=w.forwardRef(function(t,l){var r=w.useRef(null),i=w.useState({onScrollCapture:pd,onWheelCapture:pd,onTouchMoveCapture:pd}),s=i[0],u=i[1],f=t.forwardProps,h=t.children,g=t.className,p=t.removeScrollBar,y=t.enabled,v=t.shards,C=t.sideCar,x=t.noRelative,S=t.noIsolation,E=t.inert,R=t.allowPinchZoom,_=t.as,j=_===void 0?"div":_,A=t.gapMode,L=fy(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),M=C,K=m1([r,l]),X=Wn(Wn({},L),s);return w.createElement(w.Fragment,null,y&&w.createElement(M,{sideCar:hy,removeScrollBar:p,shards:v,noRelative:x,noIsolation:S,inert:E,setCallbacks:u,allowPinchZoom:!!R,lockRef:r,gapMode:A}),f?w.cloneElement(w.Children.only(h),Wn(Wn({},X),{ref:K})):w.createElement(j,Wn({},X,{className:g,ref:K}),h))});Fs.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Fs.classNames={fullWidth:Rs,zeroRight:Cs};var y1=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function b1(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var l=y1();return l&&t.setAttribute("nonce",l),t}function x1(t,l){t.styleSheet?t.styleSheet.cssText=l:t.appendChild(document.createTextNode(l))}function w1(t){var l=document.head||document.getElementsByTagName("head")[0];l.appendChild(t)}var S1=function(){var t=0,l=null;return{add:function(r){t==0&&(l=b1())&&(x1(l,r),w1(l)),t++},remove:function(){t--,!t&&l&&(l.parentNode&&l.parentNode.removeChild(l),l=null)}}},E1=function(){var t=S1();return function(l,r){w.useEffect(function(){return t.add(l),function(){t.remove()}},[l&&r])}},gy=function(){var t=E1(),l=function(r){var i=r.styles,s=r.dynamic;return t(i,s),null};return l},C1={left:0,top:0,right:0,gap:0},vd=function(t){return parseInt(t||"",10)||0},R1=function(t){var l=window.getComputedStyle(document.body),r=l[t==="padding"?"paddingLeft":"marginLeft"],i=l[t==="padding"?"paddingTop":"marginTop"],s=l[t==="padding"?"paddingRight":"marginRight"];return[vd(r),vd(i),vd(s)]},N1=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return C1;var l=R1(t),r=document.documentElement.clientWidth,i=window.innerWidth;return{left:l[0],top:l[1],right:l[2],gap:Math.max(0,i-r+l[2]-l[0])}},_1=gy(),zr="data-scroll-locked",A1=function(t,l,r,i){var s=t.left,u=t.top,f=t.right,h=t.gap;return r===void 0&&(r="margin"),`
|
|
26
|
+
.`.concat(u1,` {
|
|
27
|
+
overflow: hidden `).concat(i,`;
|
|
28
|
+
padding-right: `).concat(h,"px ").concat(i,`;
|
|
29
|
+
}
|
|
30
|
+
body[`).concat(zr,`] {
|
|
31
|
+
overflow: hidden `).concat(i,`;
|
|
32
|
+
overscroll-behavior: contain;
|
|
33
|
+
`).concat([l&&"position: relative ".concat(i,";"),r==="margin"&&`
|
|
34
|
+
padding-left: `.concat(s,`px;
|
|
35
|
+
padding-top: `).concat(u,`px;
|
|
36
|
+
padding-right: `).concat(f,`px;
|
|
37
|
+
margin-left:0;
|
|
38
|
+
margin-top:0;
|
|
39
|
+
margin-right: `).concat(h,"px ").concat(i,`;
|
|
40
|
+
`),r==="padding"&&"padding-right: ".concat(h,"px ").concat(i,";")].filter(Boolean).join(""),`
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.`).concat(Cs,` {
|
|
44
|
+
right: `).concat(h,"px ").concat(i,`;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.`).concat(Rs,` {
|
|
48
|
+
margin-right: `).concat(h,"px ").concat(i,`;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.`).concat(Cs," .").concat(Cs,` {
|
|
52
|
+
right: 0 `).concat(i,`;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.`).concat(Rs," .").concat(Rs,` {
|
|
56
|
+
margin-right: 0 `).concat(i,`;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
body[`).concat(zr,`] {
|
|
60
|
+
`).concat(c1,": ").concat(h,`px;
|
|
61
|
+
}
|
|
62
|
+
`)},Pp=function(){var t=parseInt(document.body.getAttribute(zr)||"0",10);return isFinite(t)?t:0},j1=function(){w.useEffect(function(){return document.body.setAttribute(zr,(Pp()+1).toString()),function(){var t=Pp()-1;t<=0?document.body.removeAttribute(zr):document.body.setAttribute(zr,t.toString())}},[])},T1=function(t){var l=t.noRelative,r=t.noImportant,i=t.gapMode,s=i===void 0?"margin":i;j1();var u=w.useMemo(function(){return N1(s)},[s]);return w.createElement(_1,{styles:A1(u,!l,s,r?"":"!important")})},qd=!1;if(typeof window<"u")try{var ms=Object.defineProperty({},"passive",{get:function(){return qd=!0,!0}});window.addEventListener("test",ms,ms),window.removeEventListener("test",ms,ms)}catch{qd=!1}var Ar=qd?{passive:!1}:!1,k1=function(t){return t.tagName==="TEXTAREA"},py=function(t,l){if(!(t instanceof Element))return!1;var r=window.getComputedStyle(t);return r[l]!=="hidden"&&!(r.overflowY===r.overflowX&&!k1(t)&&r[l]==="visible")},D1=function(t){return py(t,"overflowY")},M1=function(t){return py(t,"overflowX")},Yp=function(t,l){var r=l.ownerDocument,i=l;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var s=vy(t,i);if(s){var u=yy(t,i),f=u[1],h=u[2];if(f>h)return!0}i=i.parentNode}while(i&&i!==r.body);return!1},O1=function(t){var l=t.scrollTop,r=t.scrollHeight,i=t.clientHeight;return[l,r,i]},z1=function(t){var l=t.scrollLeft,r=t.scrollWidth,i=t.clientWidth;return[l,r,i]},vy=function(t,l){return t==="v"?D1(l):M1(l)},yy=function(t,l){return t==="v"?O1(l):z1(l)},L1=function(t,l){return t==="h"&&l==="rtl"?-1:1},U1=function(t,l,r,i,s){var u=L1(t,window.getComputedStyle(l).direction),f=u*i,h=r.target,g=l.contains(h),p=!1,y=f>0,v=0,C=0;do{if(!h)break;var x=yy(t,h),S=x[0],E=x[1],R=x[2],_=E-R-u*S;(S||_)&&vy(t,h)&&(v+=_,C+=S);var j=h.parentNode;h=j&&j.nodeType===Node.DOCUMENT_FRAGMENT_NODE?j.host:j}while(!g&&h!==document.body||g&&(l.contains(h)||l===h));return(y&&Math.abs(v)<1||!y&&Math.abs(C)<1)&&(p=!0),p},hs=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Xp=function(t){return[t.deltaX,t.deltaY]},Kp=function(t){return t&&"current"in t?t.current:t},B1=function(t,l){return t[0]===l[0]&&t[1]===l[1]},H1=function(t){return`
|
|
63
|
+
.block-interactivity-`.concat(t,` {pointer-events: none;}
|
|
64
|
+
.allow-interactivity-`).concat(t,` {pointer-events: all;}
|
|
65
|
+
`)},V1=0,jr=[];function I1(t){var l=w.useRef([]),r=w.useRef([0,0]),i=w.useRef(),s=w.useState(V1++)[0],u=w.useState(gy)[0],f=w.useRef(t);w.useEffect(function(){f.current=t},[t]),w.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var E=s1([t.lockRef.current],(t.shards||[]).map(Kp),!0).filter(Boolean);return E.forEach(function(R){return R.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),E.forEach(function(R){return R.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var h=w.useCallback(function(E,R){if("touches"in E&&E.touches.length===2||E.type==="wheel"&&E.ctrlKey)return!f.current.allowPinchZoom;var _=hs(E),j=r.current,A="deltaX"in E?E.deltaX:j[0]-_[0],L="deltaY"in E?E.deltaY:j[1]-_[1],M,K=E.target,X=Math.abs(A)>Math.abs(L)?"h":"v";if("touches"in E&&X==="h"&&K.type==="range")return!1;var U=window.getSelection(),le=U&&U.anchorNode,ye=le?le===K||le.contains(K):!1;if(ye)return!1;var q=Yp(X,K);if(!q)return!0;if(q?M=X:(M=X==="v"?"h":"v",q=Yp(X,K)),!q)return!1;if(!i.current&&"changedTouches"in E&&(A||L)&&(i.current=M),!M)return!0;var ee=i.current||M;return U1(ee,R,E,ee==="h"?A:L)},[]),g=w.useCallback(function(E){var R=E;if(!(!jr.length||jr[jr.length-1]!==u)){var _="deltaY"in R?Xp(R):hs(R),j=l.current.filter(function(M){return M.name===R.type&&(M.target===R.target||R.target===M.shadowParent)&&B1(M.delta,_)})[0];if(j&&j.should){R.cancelable&&R.preventDefault();return}if(!j){var A=(f.current.shards||[]).map(Kp).filter(Boolean).filter(function(M){return M.contains(R.target)}),L=A.length>0?h(R,A[0]):!f.current.noIsolation;L&&R.cancelable&&R.preventDefault()}}},[]),p=w.useCallback(function(E,R,_,j){var A={name:E,delta:R,target:_,should:j,shadowParent:F1(_)};l.current.push(A),setTimeout(function(){l.current=l.current.filter(function(L){return L!==A})},1)},[]),y=w.useCallback(function(E){r.current=hs(E),i.current=void 0},[]),v=w.useCallback(function(E){p(E.type,Xp(E),E.target,h(E,t.lockRef.current))},[]),C=w.useCallback(function(E){p(E.type,hs(E),E.target,h(E,t.lockRef.current))},[]);w.useEffect(function(){return jr.push(u),t.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:C}),document.addEventListener("wheel",g,Ar),document.addEventListener("touchmove",g,Ar),document.addEventListener("touchstart",y,Ar),function(){jr=jr.filter(function(E){return E!==u}),document.removeEventListener("wheel",g,Ar),document.removeEventListener("touchmove",g,Ar),document.removeEventListener("touchstart",y,Ar)}},[]);var x=t.removeScrollBar,S=t.inert;return w.createElement(w.Fragment,null,S?w.createElement(u,{styles:H1(s)}):null,x?w.createElement(T1,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function F1(t){for(var l=null;t!==null;)t instanceof ShadowRoot&&(l=t.host,t=t.host),t=t.parentNode;return l}const q1=v1(hy,I1);var by=w.forwardRef(function(t,l){return w.createElement(Fs,Wn({},t,{ref:l,sideCar:q1}))});by.classNames=Fs.classNames;var $1=function(t){if(typeof document>"u")return null;var l=Array.isArray(t)?t[0]:t;return l.ownerDocument.body},Tr=new WeakMap,gs=new WeakMap,ps={},yd=0,xy=function(t){return t&&(t.host||xy(t.parentNode))},G1=function(t,l){return l.map(function(r){if(t.contains(r))return r;var i=xy(r);return i&&t.contains(i)?i:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},P1=function(t,l,r,i){var s=G1(l,Array.isArray(t)?t:[t]);ps[r]||(ps[r]=new WeakMap);var u=ps[r],f=[],h=new Set,g=new Set(s),p=function(v){!v||h.has(v)||(h.add(v),p(v.parentNode))};s.forEach(p);var y=function(v){!v||g.has(v)||Array.prototype.forEach.call(v.children,function(C){if(h.has(C))y(C);else try{var x=C.getAttribute(i),S=x!==null&&x!=="false",E=(Tr.get(C)||0)+1,R=(u.get(C)||0)+1;Tr.set(C,E),u.set(C,R),f.push(C),E===1&&S&&gs.set(C,!0),R===1&&C.setAttribute(r,"true"),S||C.setAttribute(i,"true")}catch(_){console.error("aria-hidden: cannot operate on ",C,_)}})};return y(l),h.clear(),yd++,function(){f.forEach(function(v){var C=Tr.get(v)-1,x=u.get(v)-1;Tr.set(v,C),u.set(v,x),C||(gs.has(v)||v.removeAttribute(i),gs.delete(v)),x||v.removeAttribute(r)}),yd--,yd||(Tr=new WeakMap,Tr=new WeakMap,gs=new WeakMap,ps={})}},Y1=function(t,l,r){r===void 0&&(r="data-aria-hidden");var i=Array.from(Array.isArray(t)?t:[t]),s=$1(t);return s?(i.push.apply(i,Array.from(s.querySelectorAll("[aria-live], script"))),P1(i,s,r,"aria-hidden")):function(){return null}},X1=Object.defineProperty,Nn=(t,l)=>X1(t,"name",{value:l,configurable:!0}),pf="Dialog",[wy]=Vw(pf),[K1,ea]=wy(pf),Q1=Nn(t=>{const{__scopeDialog:l,children:r,open:i,defaultOpen:s,onOpenChange:u,modal:f=!0}=t,h=w.useRef(null),g=w.useRef(null),[p,y]=Kv({prop:i,defaultProp:s??!1,onChange:u,caller:pf}),[v,C]=w.useState(0),[x,S]=w.useState(0);return m.jsx(K1,{scope:l,triggerRef:h,contentRef:g,contentId:fd(),titleId:fd(),descriptionId:fd(),titlePresent:v>0,descriptionPresent:x>0,setTitleCount:C,setDescriptionCount:S,open:p,onOpenChange:y,onOpenToggle:w.useCallback(()=>y(E=>!E),[y]),modal:f,children:r})},"Dialog"),Z1="DialogTrigger",J1=w.forwardRef(Nn(function(l,r){const{__scopeDialog:i,...s}=l,u=ea(Z1,i),f=Lr(r,u.triggerRef);return m.jsx(Ul.button,{type:"button","aria-haspopup":"dialog","aria-expanded":u.open,"aria-controls":u.open?u.contentId:void 0,"data-state":qs(u.open),...s,ref:f,onClick:_a(l.onClick,u.onOpenToggle)})},"DialogTrigger")),Sy="DialogPortal",[W1,Ey]=wy(Sy,{forceMount:void 0}),eS=Nn(t=>{const{__scopeDialog:l,forceMount:r,children:i,container:s}=t,u=ea(Sy,l);return m.jsx(W1,{scope:l,forceMount:r,children:w.Children.map(i,f=>m.jsx(mf,{present:r||u.open,children:m.jsx(i1,{asChild:!0,container:s,children:f})}))})},"DialogPortal"),$d="DialogOverlay",tS=w.forwardRef(Nn(function(l,r){const i=Ey($d,l.__scopeDialog),{forceMount:s=i.forceMount,...u}=l,f=ea($d,l.__scopeDialog);return f.modal?m.jsx(mf,{present:s||f.open,children:m.jsx(aS,{...u,ref:r})}):null},"DialogOverlay")),nS=ff("DialogOverlay.RemoveScroll"),aS=w.forwardRef(Nn(function(l,r){const{__scopeDialog:i,...s}=l,u=ea($d,i),f=ay(),h=Lr(r,f);return m.jsx(by,{as:nS,allowPinchZoom:!0,shards:[u.contentRef],children:m.jsx(Ul.div,{"data-state":qs(u.open),...s,ref:h,style:{pointerEvents:"auto",...s.style}})})},"DialogOverlayImpl")),qi="DialogContent",lS=w.forwardRef(Nn(function(l,r){const i=Ey(qi,l.__scopeDialog),{forceMount:s=i.forceMount,...u}=l,f=ea(qi,l.__scopeDialog);return m.jsx(mf,{present:s||f.open,children:f.modal?m.jsx(rS,{...u,ref:r}):m.jsx(iS,{...u,ref:r})})},"DialogContent")),rS=w.forwardRef(Nn(function(l,r){const i=ea(qi,l.__scopeDialog),s=w.useRef(null),u=Lr(r,i.contentRef,s);return w.useEffect(()=>{const f=s.current;if(f)return Y1(f)},[]),m.jsx(Cy,{...l,ref:u,trapFocus:i.open,disableOutsidePointerEvents:i.open,onCloseAutoFocus:_a(l.onCloseAutoFocus,f=>{var h;f.preventDefault(),(h=i.triggerRef.current)==null||h.focus()}),onPointerDownOutside:_a(l.onPointerDownOutside,f=>{const h=f.detail.originalEvent,g=h.button===0&&h.ctrlKey===!0;(h.button===2||g)&&f.preventDefault()}),onFocusOutside:_a(l.onFocusOutside,f=>f.preventDefault())})},"DialogContentModal")),iS=w.forwardRef(Nn(function(l,r){const i=ea(qi,l.__scopeDialog),s=w.useRef(!1),u=w.useRef(!1);return m.jsx(Cy,{...l,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:f=>{var h,g;(h=l.onCloseAutoFocus)==null||h.call(l,f),f.defaultPrevented||(s.current||(g=i.triggerRef.current)==null||g.focus(),f.preventDefault()),s.current=!1,u.current=!1},onInteractOutside:f=>{var p,y;(p=l.onInteractOutside)==null||p.call(l,f),f.defaultPrevented||(s.current=!0,f.detail.originalEvent.type==="pointerdown"&&(u.current=!0));const h=f.target;((y=i.triggerRef.current)==null?void 0:y.contains(h))&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&u.current&&f.preventDefault()}})},"DialogContentNonModal")),Cy=w.forwardRef(Nn(function(l,r){const{__scopeDialog:i,trapFocus:s,onOpenAutoFocus:u,onCloseAutoFocus:f,...h}=l,g=ea(qi,i);return o1(),m.jsx(m.Fragment,{children:m.jsx(a1,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:u,onUnmountAutoFocus:f,children:m.jsx(e1,{role:"dialog",id:g.contentId,"aria-describedby":g.descriptionPresent?g.descriptionId:void 0,"aria-labelledby":g.titlePresent?g.titleId:void 0,"data-state":qs(g.open),...h,ref:r,deferPointerDownOutside:!0,onDismiss:()=>g.onOpenChange(!1)})})})},"DialogContentImpl")),oS="DialogTitle",sS=w.forwardRef(Nn(function(l,r){const{__scopeDialog:i,...s}=l,u=ea(oS,i),{setTitleCount:f}=u;return Ol(()=>(f(h=>h+1),()=>f(h=>h-1)),[f]),m.jsx(Ul.h2,{id:u.titleId,...s,ref:r})},"DialogTitle")),uS="DialogClose",cS=w.forwardRef(Nn(function(l,r){const{__scopeDialog:i,...s}=l,u=ea(uS,i);return m.jsx(Ul.button,{type:"button",...s,ref:r,onClick:_a(l.onClick,()=>u.onOpenChange(!1))})},"DialogClose"));function qs(t){return t?"open":"closed"}Nn(qs,"getState");const dS=(t,l)=>{const r=new Array(t.length+l.length);for(let i=0;i<t.length;i++)r[i]=t[i];for(let i=0;i<l.length;i++)r[t.length+i]=l[i];return r},fS=(t,l)=>({classGroupId:t,validator:l}),Ry=(t=new Map,l=null,r)=>({nextPart:t,validators:l,classGroupId:r}),ks="-",Qp=[],mS="arbitrary..",hS=t=>{const l=pS(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=t;return{getClassGroupId:f=>{if(f.startsWith("[")&&f.endsWith("]"))return gS(f);const h=f.split(ks),g=h[0]===""&&h.length>1?1:0;return Ny(h,g,l)},getConflictingClassGroupIds:(f,h)=>{if(h){const g=i[f],p=r[f];return g?p?dS(p,g):g:p||Qp}return r[f]||Qp}}},Ny=(t,l,r)=>{if(t.length-l===0)return r.classGroupId;const s=t[l],u=r.nextPart.get(s);if(u){const p=Ny(t,l+1,u);if(p)return p}const f=r.validators;if(f===null)return;const h=l===0?t.join(ks):t.slice(l).join(ks),g=f.length;for(let p=0;p<g;p++){const y=f[p];if(y.validator(h))return y.classGroupId}},gS=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const l=t.slice(1,-1),r=l.indexOf(":"),i=l.slice(0,r);return i?mS+i:void 0})(),pS=t=>{const{theme:l,classGroups:r}=t;return vS(r,l)},vS=(t,l)=>{const r=Ry();for(const i in t){const s=t[i];vf(s,r,i,l)}return r},vf=(t,l,r,i)=>{const s=t.length;for(let u=0;u<s;u++){const f=t[u];yS(f,l,r,i)}},yS=(t,l,r,i)=>{if(typeof t=="string"){bS(t,l,r);return}if(typeof t=="function"){xS(t,l,r,i);return}wS(t,l,r,i)},bS=(t,l,r)=>{const i=t===""?l:_y(l,t);i.classGroupId=r},xS=(t,l,r,i)=>{if(SS(t)){vf(t(i),l,r,i);return}l.validators===null&&(l.validators=[]),l.validators.push(fS(r,t))},wS=(t,l,r,i)=>{const s=Object.entries(t),u=s.length;for(let f=0;f<u;f++){const[h,g]=s[f];vf(g,_y(l,h),r,i)}},_y=(t,l)=>{let r=t;const i=l.split(ks),s=i.length;for(let u=0;u<s;u++){const f=i[u];let h=r.nextPart.get(f);h||(h=Ry(),r.nextPart.set(f,h)),r=h}return r},SS=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,ES=t=>{if(t<1)return{get:()=>{},set:()=>{}};let l=0,r=Object.create(null),i=Object.create(null);const s=(u,f)=>{r[u]=f,l++,l>t&&(l=0,i=r,r=Object.create(null))};return{get(u){let f=r[u];if(f!==void 0)return f;if((f=i[u])!==void 0)return s(u,f),f},set(u,f){u in r?r[u]=f:s(u,f)}}},Gd="!",Zp=":",CS=[],Jp=(t,l,r,i,s)=>({modifiers:t,hasImportantModifier:l,baseClassName:r,maybePostfixModifierPosition:i,isExternal:s}),RS=t=>{const{prefix:l,experimentalParseClassName:r}=t;let i=s=>{const u=[];let f=0,h=0,g=0,p;const y=s.length;for(let E=0;E<y;E++){const R=s[E];if(f===0&&h===0){if(R===Zp){u.push(s.slice(g,E)),g=E+1;continue}if(R==="/"){p=E;continue}}R==="["?f++:R==="]"?f--:R==="("?h++:R===")"&&h--}const v=u.length===0?s:s.slice(g);let C=v,x=!1;v.endsWith(Gd)?(C=v.slice(0,-1),x=!0):v.startsWith(Gd)&&(C=v.slice(1),x=!0);const S=p&&p>g?p-g:void 0;return Jp(u,x,C,S)};if(l){const s=l+Zp,u=i;i=f=>f.startsWith(s)?u(f.slice(s.length)):Jp(CS,!1,f,void 0,!0)}if(r){const s=i;i=u=>r({className:u,parseClassName:s})}return i},NS=t=>{const l=new Map;return t.orderSensitiveModifiers.forEach((r,i)=>{l.set(r,1e6+i)}),r=>{const i=[];let s=[];for(let u=0;u<r.length;u++){const f=r[u],h=f[0]==="[",g=l.has(f);h||g?(s.length>0&&(s.sort(),i.push(...s),s=[]),i.push(f)):s.push(f)}return s.length>0&&(s.sort(),i.push(...s)),i}},_S=t=>({cache:ES(t.cacheSize),parseClassName:RS(t),sortModifiers:NS(t),postfixLookupClassGroupIds:AS(t),...hS(t)}),AS=t=>{const l=Object.create(null),r=t.postfixLookupClassGroups;if(r)for(let i=0;i<r.length;i++)l[r[i]]=!0;return l},jS=/\s+/,TS=(t,l)=>{const{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:s,sortModifiers:u,postfixLookupClassGroupIds:f}=l,h=[],g=t.trim().split(jS);let p="";for(let y=g.length-1;y>=0;y-=1){const v=g[y],{isExternal:C,modifiers:x,hasImportantModifier:S,baseClassName:E,maybePostfixModifierPosition:R}=r(v);if(C){p=v+(p.length>0?" "+p:p);continue}let _=!!R,j;if(_){const X=E.substring(0,R);j=i(X);const U=j&&f[j]?i(E):void 0;U&&U!==j&&(j=U,_=!1)}else j=i(E);if(!j){if(!_){p=v+(p.length>0?" "+p:p);continue}if(j=i(E),!j){p=v+(p.length>0?" "+p:p);continue}_=!1}const A=x.length===0?"":x.length===1?x[0]:u(x).join(":"),L=S?A+Gd:A,M=L+j;if(h.indexOf(M)>-1)continue;h.push(M);const K=s(j,_);for(let X=0;X<K.length;++X){const U=K[X];h.push(L+U)}p=v+(p.length>0?" "+p:p)}return p},kS=(...t)=>{let l=0,r,i,s="";for(;l<t.length;)(r=t[l++])&&(i=Ay(r))&&(s&&(s+=" "),s+=i);return s},Ay=t=>{if(typeof t=="string")return t;let l,r="";for(let i=0;i<t.length;i++)t[i]&&(l=Ay(t[i]))&&(r&&(r+=" "),r+=l);return r},DS=(t,...l)=>{let r,i,s,u;const f=g=>{const p=l.reduce((y,v)=>v(y),t());return r=_S(p),i=r.cache.get,s=r.cache.set,u=h,h(g)},h=g=>{const p=i(g);if(p)return p;const y=TS(g,r);return s(g,y),y};return u=f,(...g)=>u(kS(...g))},MS=[],yt=t=>{const l=r=>r[t]||MS;return l.isThemeGetter=!0,l},jy=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ty=/^\((?:(\w[\w-]*):)?(.+)\)$/i,OS=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,zS=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,LS=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,US=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,BS=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,HS=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ll=t=>OS.test(t),Me=t=>!!t&&!Number.isNaN(Number(t)),Qn=t=>!!t&&Number.isInteger(Number(t)),bd=t=>t.endsWith("%")&&Me(t.slice(0,-1)),Ea=t=>zS.test(t),ky=()=>!0,VS=t=>LS.test(t)&&!US.test(t),yf=()=>!1,IS=t=>BS.test(t),FS=t=>HS.test(t),qS=t=>!ue(t)&&!ce(t),$S=t=>t.startsWith("@container")&&(t[10]==="/"&&t[11]!==void 0||t[11]==="s"&&t[16]!==void 0&&t.startsWith("-size/",10)||t[11]==="n"&&t[18]!==void 0&&t.startsWith("-normal/",10)),GS=t=>ul(t,Oy,yf),ue=t=>jy.test(t),kl=t=>ul(t,zy,VS),Wp=t=>ul(t,WS,Me),PS=t=>ul(t,Uy,ky),YS=t=>ul(t,Ly,yf),ev=t=>ul(t,Dy,yf),XS=t=>ul(t,My,FS),vs=t=>ul(t,By,IS),ce=t=>Ty.test(t),Mi=t=>Bl(t,zy),KS=t=>Bl(t,Ly),tv=t=>Bl(t,Dy),QS=t=>Bl(t,Oy),ZS=t=>Bl(t,My),ys=t=>Bl(t,By,!0),JS=t=>Bl(t,Uy,!0),ul=(t,l,r)=>{const i=jy.exec(t);return i?i[1]?l(i[1]):r(i[2]):!1},Bl=(t,l,r=!1)=>{const i=Ty.exec(t);return i?i[1]?l(i[1]):r:!1},Dy=t=>t==="position"||t==="percentage",My=t=>t==="image"||t==="url",Oy=t=>t==="length"||t==="size"||t==="bg-size",zy=t=>t==="length",WS=t=>t==="number",Ly=t=>t==="family-name",Uy=t=>t==="number"||t==="weight",By=t=>t==="shadow",e2=()=>{const t=yt("color"),l=yt("font"),r=yt("text"),i=yt("font-weight"),s=yt("tracking"),u=yt("leading"),f=yt("breakpoint"),h=yt("container"),g=yt("spacing"),p=yt("radius"),y=yt("shadow"),v=yt("inset-shadow"),C=yt("text-shadow"),x=yt("drop-shadow"),S=yt("blur"),E=yt("perspective"),R=yt("aspect"),_=yt("ease"),j=yt("animate"),A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],M=()=>[...L(),ce,ue],K=()=>["auto","hidden","clip","visible","scroll"],X=()=>["auto","contain","none"],U=()=>[ce,ue,g],le=()=>[ll,"full","auto",...U()],ye=()=>[Qn,"none","subgrid",ce,ue],q=()=>["auto",{span:["full",Qn,ce,ue]},Qn,ce,ue],ee=()=>[Qn,"auto",ce,ue],ie=()=>["auto","min","max","fr",ce,ue],oe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],he=()=>["start","end","center","stretch","center-safe","end-safe"],O=()=>["auto",...U()],G=()=>[ll,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...U()],ae=()=>[ll,"screen","full","dvw","lvw","svw","min","max","fit",...U()],ve=()=>[ll,"screen","full","lh","dvh","lvh","svh","min","max","fit",...U()],ne=()=>[t,ce,ue],k=()=>[...L(),tv,ev,{position:[ce,ue]}],P=()=>["no-repeat",{repeat:["","x","y","space","round"]}],$=()=>["auto","cover","contain",QS,GS,{size:[ce,ue]}],W=()=>[bd,Mi,kl],V=()=>["","none","full",p,ce,ue],Z=()=>["",Me,Mi,kl],se=()=>["solid","dashed","dotted","double"],fe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],te=()=>[Me,bd,tv,ev],pe=()=>["","none",S,ce,ue],$e=()=>["none",Me,ce,ue],Ge=()=>["none",Me,ce,ue],Fn=()=>[Me,ce,ue],gt=()=>[ll,"full",...U()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ea],breakpoint:[Ea],color:[ky],container:[Ea],"drop-shadow":[Ea],ease:["in","out","in-out"],font:[qS],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ea],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ea],shadow:[Ea],spacing:["px",Me],text:[Ea],"text-shadow":[Ea],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ll,ue,ce,R]}],container:["container"],"container-type":[{"@container":["","normal","size",ce,ue]}],"container-named":[$S],columns:[{columns:[Me,ue,ce,h]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:M()}],overflow:[{overflow:K()}],"overflow-x":[{"overflow-x":K()}],"overflow-y":[{"overflow-y":K()}],overscroll:[{overscroll:X()}],"overscroll-x":[{"overscroll-x":X()}],"overscroll-y":[{"overscroll-y":X()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:le()}],"inset-x":[{"inset-x":le()}],"inset-y":[{"inset-y":le()}],start:[{"inset-s":le(),start:le()}],end:[{"inset-e":le(),end:le()}],"inset-bs":[{"inset-bs":le()}],"inset-be":[{"inset-be":le()}],top:[{top:le()}],right:[{right:le()}],bottom:[{bottom:le()}],left:[{left:le()}],visibility:["visible","invisible","collapse"],z:[{z:[Qn,"auto",ce,ue]}],basis:[{basis:[ll,"full","auto",h,...U()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Me,ll,"auto","initial","none",ue]}],grow:[{grow:["",Me,ce,ue]}],shrink:[{shrink:["",Me,ce,ue]}],order:[{order:[Qn,"first","last","none",ce,ue]}],"grid-cols":[{"grid-cols":ye()}],"col-start-end":[{col:q()}],"col-start":[{"col-start":ee()}],"col-end":[{"col-end":ee()}],"grid-rows":[{"grid-rows":ye()}],"row-start-end":[{row:q()}],"row-start":[{"row-start":ee()}],"row-end":[{"row-end":ee()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ie()}],"auto-rows":[{"auto-rows":ie()}],gap:[{gap:U()}],"gap-x":[{"gap-x":U()}],"gap-y":[{"gap-y":U()}],"justify-content":[{justify:[...oe(),"normal"]}],"justify-items":[{"justify-items":[...he(),"normal"]}],"justify-self":[{"justify-self":["auto",...he()]}],"align-content":[{content:["normal",...oe()]}],"align-items":[{items:[...he(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...he(),{baseline:["","last"]}]}],"place-content":[{"place-content":oe()}],"place-items":[{"place-items":[...he(),"baseline"]}],"place-self":[{"place-self":["auto",...he()]}],p:[{p:U()}],px:[{px:U()}],py:[{py:U()}],ps:[{ps:U()}],pe:[{pe:U()}],pbs:[{pbs:U()}],pbe:[{pbe:U()}],pt:[{pt:U()}],pr:[{pr:U()}],pb:[{pb:U()}],pl:[{pl:U()}],m:[{m:O()}],mx:[{mx:O()}],my:[{my:O()}],ms:[{ms:O()}],me:[{me:O()}],mbs:[{mbs:O()}],mbe:[{mbe:O()}],mt:[{mt:O()}],mr:[{mr:O()}],mb:[{mb:O()}],ml:[{ml:O()}],"space-x":[{"space-x":U()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":U()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],"inline-size":[{inline:["auto",...ae()]}],"min-inline-size":[{"min-inline":["auto",...ae()]}],"max-inline-size":[{"max-inline":["none",...ae()]}],"block-size":[{block:["auto",...ve()]}],"min-block-size":[{"min-block":["auto",...ve()]}],"max-block-size":[{"max-block":["none",...ve()]}],w:[{w:[h,"screen",...G()]}],"min-w":[{"min-w":[h,"screen","none",...G()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[f]},...G()]}],h:[{h:["screen","lh",...G()]}],"min-h":[{"min-h":["screen","lh","none",...G()]}],"max-h":[{"max-h":["screen","lh",...G()]}],"font-size":[{text:["base",r,Mi,kl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,JS,PS]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",bd,ue]}],"font-family":[{font:[KS,YS,l]}],"font-features":[{"font-features":[ue]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,ce,ue]}],"line-clamp":[{"line-clamp":[Me,"none",ce,Wp]}],leading:[{leading:[u,...U()]}],"list-image":[{"list-image":["none",ce,ue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ce,ue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:ne()}],"text-color":[{text:ne()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:[Me,"from-font","auto",ce,kl]}],"text-decoration-color":[{decoration:ne()}],"underline-offset":[{"underline-offset":[Me,"auto",ce,ue]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:U()}],"tab-size":[{tab:[Qn,ce,ue]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ce,ue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ce,ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:k()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:$()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Qn,ce,ue],radial:["",ce,ue],conic:[Qn,ce,ue]},ZS,XS]}],"bg-color":[{bg:ne()}],"gradient-from-pos":[{from:W()}],"gradient-via-pos":[{via:W()}],"gradient-to-pos":[{to:W()}],"gradient-from":[{from:ne()}],"gradient-via":[{via:ne()}],"gradient-to":[{to:ne()}],rounded:[{rounded:V()}],"rounded-s":[{"rounded-s":V()}],"rounded-e":[{"rounded-e":V()}],"rounded-t":[{"rounded-t":V()}],"rounded-r":[{"rounded-r":V()}],"rounded-b":[{"rounded-b":V()}],"rounded-l":[{"rounded-l":V()}],"rounded-ss":[{"rounded-ss":V()}],"rounded-se":[{"rounded-se":V()}],"rounded-ee":[{"rounded-ee":V()}],"rounded-es":[{"rounded-es":V()}],"rounded-tl":[{"rounded-tl":V()}],"rounded-tr":[{"rounded-tr":V()}],"rounded-br":[{"rounded-br":V()}],"rounded-bl":[{"rounded-bl":V()}],"border-w":[{border:Z()}],"border-w-x":[{"border-x":Z()}],"border-w-y":[{"border-y":Z()}],"border-w-s":[{"border-s":Z()}],"border-w-e":[{"border-e":Z()}],"border-w-bs":[{"border-bs":Z()}],"border-w-be":[{"border-be":Z()}],"border-w-t":[{"border-t":Z()}],"border-w-r":[{"border-r":Z()}],"border-w-b":[{"border-b":Z()}],"border-w-l":[{"border-l":Z()}],"divide-x":[{"divide-x":Z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...se(),"hidden","none"]}],"divide-style":[{divide:[...se(),"hidden","none"]}],"border-color":[{border:ne()}],"border-color-x":[{"border-x":ne()}],"border-color-y":[{"border-y":ne()}],"border-color-s":[{"border-s":ne()}],"border-color-e":[{"border-e":ne()}],"border-color-bs":[{"border-bs":ne()}],"border-color-be":[{"border-be":ne()}],"border-color-t":[{"border-t":ne()}],"border-color-r":[{"border-r":ne()}],"border-color-b":[{"border-b":ne()}],"border-color-l":[{"border-l":ne()}],"divide-color":[{divide:ne()}],"outline-style":[{outline:[...se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Me,ce,ue]}],"outline-w":[{outline:["",Me,Mi,kl]}],"outline-color":[{outline:ne()}],shadow:[{shadow:["","none",y,ys,vs]}],"shadow-color":[{shadow:ne()}],"inset-shadow":[{"inset-shadow":["none",v,ys,vs]}],"inset-shadow-color":[{"inset-shadow":ne()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:ne()}],"ring-offset-w":[{"ring-offset":[Me,kl]}],"ring-offset-color":[{"ring-offset":ne()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":ne()}],"text-shadow":[{"text-shadow":["none",C,ys,vs]}],"text-shadow-color":[{"text-shadow":ne()}],opacity:[{opacity:[Me,ce,ue]}],"mix-blend":[{"mix-blend":[...fe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":fe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Me]}],"mask-image-linear-from-pos":[{"mask-linear-from":te()}],"mask-image-linear-to-pos":[{"mask-linear-to":te()}],"mask-image-linear-from-color":[{"mask-linear-from":ne()}],"mask-image-linear-to-color":[{"mask-linear-to":ne()}],"mask-image-t-from-pos":[{"mask-t-from":te()}],"mask-image-t-to-pos":[{"mask-t-to":te()}],"mask-image-t-from-color":[{"mask-t-from":ne()}],"mask-image-t-to-color":[{"mask-t-to":ne()}],"mask-image-r-from-pos":[{"mask-r-from":te()}],"mask-image-r-to-pos":[{"mask-r-to":te()}],"mask-image-r-from-color":[{"mask-r-from":ne()}],"mask-image-r-to-color":[{"mask-r-to":ne()}],"mask-image-b-from-pos":[{"mask-b-from":te()}],"mask-image-b-to-pos":[{"mask-b-to":te()}],"mask-image-b-from-color":[{"mask-b-from":ne()}],"mask-image-b-to-color":[{"mask-b-to":ne()}],"mask-image-l-from-pos":[{"mask-l-from":te()}],"mask-image-l-to-pos":[{"mask-l-to":te()}],"mask-image-l-from-color":[{"mask-l-from":ne()}],"mask-image-l-to-color":[{"mask-l-to":ne()}],"mask-image-x-from-pos":[{"mask-x-from":te()}],"mask-image-x-to-pos":[{"mask-x-to":te()}],"mask-image-x-from-color":[{"mask-x-from":ne()}],"mask-image-x-to-color":[{"mask-x-to":ne()}],"mask-image-y-from-pos":[{"mask-y-from":te()}],"mask-image-y-to-pos":[{"mask-y-to":te()}],"mask-image-y-from-color":[{"mask-y-from":ne()}],"mask-image-y-to-color":[{"mask-y-to":ne()}],"mask-image-radial":[{"mask-radial":[ce,ue]}],"mask-image-radial-from-pos":[{"mask-radial-from":te()}],"mask-image-radial-to-pos":[{"mask-radial-to":te()}],"mask-image-radial-from-color":[{"mask-radial-from":ne()}],"mask-image-radial-to-color":[{"mask-radial-to":ne()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":L()}],"mask-image-conic-pos":[{"mask-conic":[Me]}],"mask-image-conic-from-pos":[{"mask-conic-from":te()}],"mask-image-conic-to-pos":[{"mask-conic-to":te()}],"mask-image-conic-from-color":[{"mask-conic-from":ne()}],"mask-image-conic-to-color":[{"mask-conic-to":ne()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:k()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:$()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ce,ue]}],filter:[{filter:["","none",ce,ue]}],blur:[{blur:pe()}],brightness:[{brightness:[Me,ce,ue]}],contrast:[{contrast:[Me,ce,ue]}],"drop-shadow":[{"drop-shadow":["","none",x,ys,vs]}],"drop-shadow-color":[{"drop-shadow":ne()}],grayscale:[{grayscale:["",Me,ce,ue]}],"hue-rotate":[{"hue-rotate":[Me,ce,ue]}],invert:[{invert:["",Me,ce,ue]}],saturate:[{saturate:[Me,ce,ue]}],sepia:[{sepia:["",Me,ce,ue]}],"backdrop-filter":[{"backdrop-filter":["","none",ce,ue]}],"backdrop-blur":[{"backdrop-blur":pe()}],"backdrop-brightness":[{"backdrop-brightness":[Me,ce,ue]}],"backdrop-contrast":[{"backdrop-contrast":[Me,ce,ue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Me,ce,ue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Me,ce,ue]}],"backdrop-invert":[{"backdrop-invert":["",Me,ce,ue]}],"backdrop-opacity":[{"backdrop-opacity":[Me,ce,ue]}],"backdrop-saturate":[{"backdrop-saturate":[Me,ce,ue]}],"backdrop-sepia":[{"backdrop-sepia":["",Me,ce,ue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":U()}],"border-spacing-x":[{"border-spacing-x":U()}],"border-spacing-y":[{"border-spacing-y":U()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ce,ue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Me,"initial",ce,ue]}],ease:[{ease:["linear","initial",_,ce,ue]}],delay:[{delay:[Me,ce,ue]}],animate:[{animate:["none",j,ce,ue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,ce,ue]}],"perspective-origin":[{"perspective-origin":M()}],rotate:[{rotate:$e()}],"rotate-x":[{"rotate-x":$e()}],"rotate-y":[{"rotate-y":$e()}],"rotate-z":[{"rotate-z":$e()}],scale:[{scale:Ge()}],"scale-x":[{"scale-x":Ge()}],"scale-y":[{"scale-y":Ge()}],"scale-z":[{"scale-z":Ge()}],"scale-3d":["scale-3d"],skew:[{skew:Fn()}],"skew-x":[{"skew-x":Fn()}],"skew-y":[{"skew-y":Fn()}],transform:[{transform:[ce,ue,"","none","gpu","cpu"]}],"transform-origin":[{origin:M()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:gt()}],"translate-x":[{"translate-x":gt()}],"translate-y":[{"translate-y":gt()}],"translate-z":[{"translate-z":gt()}],"translate-none":["translate-none"],zoom:[{zoom:[Qn,ce,ue]}],accent:[{accent:ne()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:ne()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ce,ue]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":ne()}],"scrollbar-track-color":[{"scrollbar-track":ne()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mbs":[{"scroll-mbs":U()}],"scroll-mbe":[{"scroll-mbe":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pbs":[{"scroll-pbs":U()}],"scroll-pbe":[{"scroll-pbe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ce,ue]}],fill:[{fill:["none",...ne()]}],"stroke-w":[{stroke:[Me,Mi,kl,Wp]}],stroke:[{stroke:["none",...ne()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},t2=DS(e2);function _e(...t){return t2(Fv(t))}const n2=qv("inline-flex items-center justify-center rounded-full border border-transparent px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function Ze({className:t,variant:l="default",asChild:r=!1,...i}){const s=r?Gv:"span";return m.jsx(s,{"data-slot":"badge","data-variant":l,className:_e(n2({variant:l}),t),...i})}const a2=qv("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function we({className:t,variant:l="default",size:r="default",asChild:i=!1,...s}){const u=i?Gv:"button";return m.jsx(u,{"data-slot":"button","data-variant":l,"data-size":r,className:_e(a2({variant:l,size:r,className:t})),...s})}/**
|
|
66
|
+
* @license lucide-react v0.575.0 - ISC
|
|
67
|
+
*
|
|
68
|
+
* This source code is licensed under the ISC license.
|
|
69
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
+
*/const Hy=(...t)=>t.filter((l,r,i)=>!!l&&l.trim()!==""&&i.indexOf(l)===r).join(" ").trim();/**
|
|
71
|
+
* @license lucide-react v0.575.0 - ISC
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the ISC license.
|
|
74
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/const l2=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
76
|
+
* @license lucide-react v0.575.0 - ISC
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the ISC license.
|
|
79
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/const r2=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(l,r,i)=>i?i.toUpperCase():r.toLowerCase());/**
|
|
81
|
+
* @license lucide-react v0.575.0 - ISC
|
|
82
|
+
*
|
|
83
|
+
* This source code is licensed under the ISC license.
|
|
84
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
+
*/const nv=t=>{const l=r2(t);return l.charAt(0).toUpperCase()+l.slice(1)};/**
|
|
86
|
+
* @license lucide-react v0.575.0 - ISC
|
|
87
|
+
*
|
|
88
|
+
* This source code is licensed under the ISC license.
|
|
89
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
+
*/var i2={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
91
|
+
* @license lucide-react v0.575.0 - ISC
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the ISC license.
|
|
94
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
+
*/const o2=t=>{for(const l in t)if(l.startsWith("aria-")||l==="role"||l==="title")return!0;return!1};/**
|
|
96
|
+
* @license lucide-react v0.575.0 - ISC
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the ISC license.
|
|
99
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
+
*/const s2=w.forwardRef(({color:t="currentColor",size:l=24,strokeWidth:r=2,absoluteStrokeWidth:i,className:s="",children:u,iconNode:f,...h},g)=>w.createElement("svg",{ref:g,...i2,width:l,height:l,stroke:t,strokeWidth:i?Number(r)*24/Number(l):r,className:Hy("lucide",s),...!u&&!o2(h)&&{"aria-hidden":"true"},...h},[...f.map(([p,y])=>w.createElement(p,y)),...Array.isArray(u)?u:[u]]));/**
|
|
101
|
+
* @license lucide-react v0.575.0 - ISC
|
|
102
|
+
*
|
|
103
|
+
* This source code is licensed under the ISC license.
|
|
104
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
+
*/const Ce=(t,l)=>{const r=w.forwardRef(({className:i,...s},u)=>w.createElement(s2,{ref:u,iconNode:l,className:Hy(`lucide-${l2(nv(t))}`,`lucide-${t}`,i),...s}));return r.displayName=nv(t),r};/**
|
|
106
|
+
* @license lucide-react v0.575.0 - ISC
|
|
107
|
+
*
|
|
108
|
+
* This source code is licensed under the ISC license.
|
|
109
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
+
*/const u2=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Vy=Ce("arrow-down",u2);/**
|
|
111
|
+
* @license lucide-react v0.575.0 - ISC
|
|
112
|
+
*
|
|
113
|
+
* This source code is licensed under the ISC license.
|
|
114
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
+
*/const c2=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Ds=Ce("arrow-left",c2);/**
|
|
116
|
+
* @license lucide-react v0.575.0 - ISC
|
|
117
|
+
*
|
|
118
|
+
* This source code is licensed under the ISC license.
|
|
119
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
+
*/const d2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],bf=Ce("arrow-right",d2);/**
|
|
121
|
+
* @license lucide-react v0.575.0 - ISC
|
|
122
|
+
*
|
|
123
|
+
* This source code is licensed under the ISC license.
|
|
124
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
+
*/const f2=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],m2=Ce("arrow-up-down",f2);/**
|
|
126
|
+
* @license lucide-react v0.575.0 - ISC
|
|
127
|
+
*
|
|
128
|
+
* This source code is licensed under the ISC license.
|
|
129
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
+
*/const h2=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],g2=Ce("arrow-up",h2);/**
|
|
131
|
+
* @license lucide-react v0.575.0 - ISC
|
|
132
|
+
*
|
|
133
|
+
* This source code is licensed under the ISC license.
|
|
134
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
+
*/const p2=[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]],v2=Ce("calendar-clock",p2);/**
|
|
136
|
+
* @license lucide-react v0.575.0 - ISC
|
|
137
|
+
*
|
|
138
|
+
* This source code is licensed under the ISC license.
|
|
139
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
+
*/const y2=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],b2=Ce("chart-column",y2);/**
|
|
141
|
+
* @license lucide-react v0.575.0 - ISC
|
|
142
|
+
*
|
|
143
|
+
* This source code is licensed under the ISC license.
|
|
144
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
+
*/const x2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],w2=Ce("check",x2);/**
|
|
146
|
+
* @license lucide-react v0.575.0 - ISC
|
|
147
|
+
*
|
|
148
|
+
* This source code is licensed under the ISC license.
|
|
149
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
+
*/const S2=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],E2=Ce("chevron-down",S2);/**
|
|
151
|
+
* @license lucide-react v0.575.0 - ISC
|
|
152
|
+
*
|
|
153
|
+
* This source code is licensed under the ISC license.
|
|
154
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
+
*/const C2=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Iy=Ce("chevron-left",C2);/**
|
|
156
|
+
* @license lucide-react v0.575.0 - ISC
|
|
157
|
+
*
|
|
158
|
+
* This source code is licensed under the ISC license.
|
|
159
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
+
*/const R2=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],$i=Ce("chevron-right",R2);/**
|
|
161
|
+
* @license lucide-react v0.575.0 - ISC
|
|
162
|
+
*
|
|
163
|
+
* This source code is licensed under the ISC license.
|
|
164
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
+
*/const N2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],_2=Ce("circle-alert",N2);/**
|
|
166
|
+
* @license lucide-react v0.575.0 - ISC
|
|
167
|
+
*
|
|
168
|
+
* This source code is licensed under the ISC license.
|
|
169
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
+
*/const A2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],j2=Ce("circle-check",A2);/**
|
|
171
|
+
* @license lucide-react v0.575.0 - ISC
|
|
172
|
+
*
|
|
173
|
+
* This source code is licensed under the ISC license.
|
|
174
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
+
*/const T2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],Ms=Ce("clock",T2);/**
|
|
176
|
+
* @license lucide-react v0.575.0 - ISC
|
|
177
|
+
*
|
|
178
|
+
* This source code is licensed under the ISC license.
|
|
179
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
180
|
+
*/const k2=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],zl=Ce("code-xml",k2);/**
|
|
181
|
+
* @license lucide-react v0.575.0 - ISC
|
|
182
|
+
*
|
|
183
|
+
* This source code is licensed under the ISC license.
|
|
184
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
+
*/const D2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],M2=Ce("columns-3",D2);/**
|
|
186
|
+
* @license lucide-react v0.575.0 - ISC
|
|
187
|
+
*
|
|
188
|
+
* This source code is licensed under the ISC license.
|
|
189
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
+
*/const O2=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],z2=Ce("copy",O2);/**
|
|
191
|
+
* @license lucide-react v0.575.0 - ISC
|
|
192
|
+
*
|
|
193
|
+
* This source code is licensed under the ISC license.
|
|
194
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
+
*/const L2=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],Ml=Ce("database",L2);/**
|
|
196
|
+
* @license lucide-react v0.575.0 - ISC
|
|
197
|
+
*
|
|
198
|
+
* This source code is licensed under the ISC license.
|
|
199
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
+
*/const U2=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],B2=Ce("download",U2);/**
|
|
201
|
+
* @license lucide-react v0.575.0 - ISC
|
|
202
|
+
*
|
|
203
|
+
* This source code is licensed under the ISC license.
|
|
204
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
+
*/const H2=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],V2=Ce("earth",H2);/**
|
|
206
|
+
* @license lucide-react v0.575.0 - ISC
|
|
207
|
+
*
|
|
208
|
+
* This source code is licensed under the ISC license.
|
|
209
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
+
*/const I2=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],Fy=Ce("eye-off",I2);/**
|
|
211
|
+
* @license lucide-react v0.575.0 - ISC
|
|
212
|
+
*
|
|
213
|
+
* This source code is licensed under the ISC license.
|
|
214
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
+
*/const F2=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],qy=Ce("eye",F2);/**
|
|
216
|
+
* @license lucide-react v0.575.0 - ISC
|
|
217
|
+
*
|
|
218
|
+
* This source code is licensed under the ISC license.
|
|
219
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
220
|
+
*/const q2=[["path",{d:"M14.5 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v3.8",key:"1kchwa"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M11.7 14.2 7 17l-4.7-2.8",key:"1yk8tc"}],["path",{d:"M3 13.1a2 2 0 0 0-.999 1.76v3.24a2 2 0 0 0 .969 1.78L6 21.7a2 2 0 0 0 2.03.01L11 19.9a2 2 0 0 0 1-1.76V14.9a2 2 0 0 0-.97-1.78L8 11.3a2 2 0 0 0-2.03-.01z",key:"19flxy"}],["path",{d:"M7 17v5",key:"1yj1jh"}]],$y=Ce("file-box",q2);/**
|
|
221
|
+
* @license lucide-react v0.575.0 - ISC
|
|
222
|
+
*
|
|
223
|
+
* This source code is licensed under the ISC license.
|
|
224
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
225
|
+
*/const $2=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],G2=Ce("file",$2);/**
|
|
226
|
+
* @license lucide-react v0.575.0 - ISC
|
|
227
|
+
*
|
|
228
|
+
* This source code is licensed under the ISC license.
|
|
229
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
+
*/const P2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Gy=Ce("globe",P2);/**
|
|
231
|
+
* @license lucide-react v0.575.0 - ISC
|
|
232
|
+
*
|
|
233
|
+
* This source code is licensed under the ISC license.
|
|
234
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
235
|
+
*/const Y2=[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]],X2=Ce("languages",Y2);/**
|
|
236
|
+
* @license lucide-react v0.575.0 - ISC
|
|
237
|
+
*
|
|
238
|
+
* This source code is licensed under the ISC license.
|
|
239
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
240
|
+
*/const K2=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],Q2=Ce("layout-grid",K2);/**
|
|
241
|
+
* @license lucide-react v0.575.0 - ISC
|
|
242
|
+
*
|
|
243
|
+
* This source code is licensed under the ISC license.
|
|
244
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
245
|
+
*/const Z2=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],J2=Ce("link-2",Z2);/**
|
|
246
|
+
* @license lucide-react v0.575.0 - ISC
|
|
247
|
+
*
|
|
248
|
+
* This source code is licensed under the ISC license.
|
|
249
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
250
|
+
*/const W2=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],xf=Ce("loader-circle",W2);/**
|
|
251
|
+
* @license lucide-react v0.575.0 - ISC
|
|
252
|
+
*
|
|
253
|
+
* This source code is licensed under the ISC license.
|
|
254
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
255
|
+
*/const eE=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],tE=Ce("lock",eE);/**
|
|
256
|
+
* @license lucide-react v0.575.0 - ISC
|
|
257
|
+
*
|
|
258
|
+
* This source code is licensed under the ISC license.
|
|
259
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
260
|
+
*/const nE=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],aE=Ce("menu",nE);/**
|
|
261
|
+
* @license lucide-react v0.575.0 - ISC
|
|
262
|
+
*
|
|
263
|
+
* This source code is licensed under the ISC license.
|
|
264
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
265
|
+
*/const lE=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],rE=Ce("moon",lE);/**
|
|
266
|
+
* @license lucide-react v0.575.0 - ISC
|
|
267
|
+
*
|
|
268
|
+
* This source code is licensed under the ISC license.
|
|
269
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
270
|
+
*/const iE=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Py=Ce("play",iE);/**
|
|
271
|
+
* @license lucide-react v0.575.0 - ISC
|
|
272
|
+
*
|
|
273
|
+
* This source code is licensed under the ISC license.
|
|
274
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
275
|
+
*/const oE=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],ol=Ce("refresh-cw",oE);/**
|
|
276
|
+
* @license lucide-react v0.575.0 - ISC
|
|
277
|
+
*
|
|
278
|
+
* This source code is licensed under the ISC license.
|
|
279
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
280
|
+
*/const sE=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],uE=Ce("rotate-ccw",sE);/**
|
|
281
|
+
* @license lucide-react v0.575.0 - ISC
|
|
282
|
+
*
|
|
283
|
+
* This source code is licensed under the ISC license.
|
|
284
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
285
|
+
*/const cE=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],Yy=Ce("scroll-text",cE);/**
|
|
286
|
+
* @license lucide-react v0.575.0 - ISC
|
|
287
|
+
*
|
|
288
|
+
* This source code is licensed under the ISC license.
|
|
289
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
290
|
+
*/const dE=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],$s=Ce("search",dE);/**
|
|
291
|
+
* @license lucide-react v0.575.0 - ISC
|
|
292
|
+
*
|
|
293
|
+
* This source code is licensed under the ISC license.
|
|
294
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
295
|
+
*/const fE=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],mE=Ce("settings",fE);/**
|
|
296
|
+
* @license lucide-react v0.575.0 - ISC
|
|
297
|
+
*
|
|
298
|
+
* This source code is licensed under the ISC license.
|
|
299
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
300
|
+
*/const hE=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],av=Ce("shield",hE);/**
|
|
301
|
+
* @license lucide-react v0.575.0 - ISC
|
|
302
|
+
*
|
|
303
|
+
* This source code is licensed under the ISC license.
|
|
304
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
305
|
+
*/const gE=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],pE=Ce("sun",gE);/**
|
|
306
|
+
* @license lucide-react v0.575.0 - ISC
|
|
307
|
+
*
|
|
308
|
+
* This source code is licensed under the ISC license.
|
|
309
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
310
|
+
*/const vE=[["path",{d:"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18",key:"gugj83"}]],Xy=Ce("table-2",vE);/**
|
|
311
|
+
* @license lucide-react v0.575.0 - ISC
|
|
312
|
+
*
|
|
313
|
+
* This source code is licensed under the ISC license.
|
|
314
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
315
|
+
*/const yE=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],bE=Ce("timer",yE);/**
|
|
316
|
+
* @license lucide-react v0.575.0 - ISC
|
|
317
|
+
*
|
|
318
|
+
* This source code is licensed under the ISC license.
|
|
319
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
320
|
+
*/const xE=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Pd=Ce("trash-2",xE);/**
|
|
321
|
+
* @license lucide-react v0.575.0 - ISC
|
|
322
|
+
*
|
|
323
|
+
* This source code is licensed under the ISC license.
|
|
324
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
325
|
+
*/const wE=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],Ky=Ce("upload",wE);/**
|
|
326
|
+
* @license lucide-react v0.575.0 - ISC
|
|
327
|
+
*
|
|
328
|
+
* This source code is licensed under the ISC license.
|
|
329
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
330
|
+
*/const SE=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],EE=Ce("user",SE);/**
|
|
331
|
+
* @license lucide-react v0.575.0 - ISC
|
|
332
|
+
*
|
|
333
|
+
* This source code is licensed under the ISC license.
|
|
334
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
335
|
+
*/const CE=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],RE=Ce("users",CE);/**
|
|
336
|
+
* @license lucide-react v0.575.0 - ISC
|
|
337
|
+
*
|
|
338
|
+
* This source code is licensed under the ISC license.
|
|
339
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
340
|
+
*/const NE=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ki=Ce("x",NE);/**
|
|
341
|
+
* @license lucide-react v0.575.0 - ISC
|
|
342
|
+
*
|
|
343
|
+
* This source code is licensed under the ISC license.
|
|
344
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
345
|
+
*/const _E=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Gs=Ce("zap",_E);function AE({commands:t,labels:l,onNavigate:r}){const[i,s]=w.useState(!1),[u,f]=w.useState(""),[h,g]=w.useState(0),p=w.useRef(null);w.useEffect(()=>{function S(E){(E.metaKey||E.ctrlKey)&&E.key==="k"&&(E.preventDefault(),s(R=>!R)),E.key==="Escape"&&s(!1)}return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[]),w.useEffect(()=>{if(i){f(""),g(0);const S=setTimeout(()=>{var E;return(E=p.current)==null?void 0:E.focus()},50);return()=>clearTimeout(S)}},[i]);const y=w.useMemo(()=>{if(!u.trim())return t;const S=u.toLowerCase();return t.filter(E=>E.label.toLowerCase().includes(S)||E.id.toLowerCase().includes(S))},[t,u]);w.useEffect(()=>{g(0)},[y.length]);const v=w.useCallback(S=>{s(!1),S.href&&r(S.href)},[r]);function C(S){S.key==="ArrowDown"?(S.preventDefault(),g(E=>Math.min(E+1,y.length-1))):S.key==="ArrowUp"?(S.preventDefault(),g(E=>Math.max(E-1,0))):S.key==="Enter"&&y[h]&&(S.preventDefault(),v(y[h]))}if(!i)return null;const x=new Map;for(const S of y){const E=S.group,R=x.get(E)||[];R.push(S),x.set(E,R)}return m.jsxs("div",{className:"fixed inset-0 z-[100] flex items-start justify-center pt-[20vh]",onClick:()=>s(!1),children:[m.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm"}),m.jsxs("div",{className:"relative w-full max-w-lg rounded-xl border border-border bg-card shadow-2xl overflow-hidden",onClick:S=>S.stopPropagation(),children:[m.jsxs("div",{className:"flex items-center gap-2 border-b border-border px-4 py-3",children:[m.jsx($s,{className:"h-4 w-4 text-muted-foreground shrink-0"}),m.jsx("input",{ref:p,value:u,onChange:S=>f(S.target.value),onKeyDown:C,placeholder:l.placeholder,className:"flex-1 bg-transparent text-sm text-foreground placeholder:text-muted-foreground focus:outline-none",spellCheck:!1}),m.jsx("kbd",{className:"hidden sm:inline-flex items-center gap-0.5 rounded border border-border bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground",children:"ESC"})]}),m.jsxs("div",{className:"max-h-72 overflow-auto p-2",children:[y.length===0&&m.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:l.noResults}),Array.from(x.entries()).map(([S,E])=>m.jsxs("div",{children:[m.jsx("div",{className:"px-2 py-1.5 text-[10px] font-medium text-muted-foreground uppercase tracking-wider",children:S}),E.map(R=>{const _=y.indexOf(R),j=R.icon;return m.jsxs("button",{className:_e("flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors",_===h?"bg-primary/10 text-primary":"text-foreground hover:bg-accent"),onClick:()=>v(R),onMouseEnter:()=>g(_),children:[m.jsx(j,{className:"h-4 w-4 shrink-0"}),m.jsx("span",{children:R.label})]},R.id)})]},S))]}),m.jsxs("div",{className:"flex items-center justify-between border-t border-border px-4 py-2 text-[10px] text-muted-foreground",children:[m.jsxs("span",{children:["↑↓ ",l.navigate]}),m.jsxs("span",{children:["↵ ",l.select]}),m.jsxs("span",{children:["ESC ",l.close]})]})]})]})}function jE({diagnostic:t,labels:l}){const r=[[l.code,t.code],[l.stage,t.stage??t.capability],[l.stateImpact,t.stateImpact],[l.nextAction,t.nextAction],[l.retryable,t.retryable===void 0?void 0:t.retryable?l.retryYes:l.retryNo],[l.retryPrecondition,t.retryPrecondition],[l.command,t.command],[l.operation,t.operationId],[l.correlation,t.correlationId]];return m.jsxs("section",{role:"alert",className:"rounded-md border border-destructive/30 bg-destructive/5 p-4 text-sm",children:[m.jsx("h3",{className:"font-medium",children:l.title}),m.jsx("dl",{className:"mt-2 space-y-1",children:r.filter(([,i])=>i!==void 0).map(([i,s])=>m.jsxs("div",{children:[m.jsxs("dt",{className:"inline font-medium",children:[i,": "]}),m.jsx("dd",{className:"inline break-words",children:s})]},i))})]})}function TE({items:t,onNavigate:l,header:r,footer:i,className:s}){return m.jsxs("aside",{className:_e("flex flex-col bg-card",s),children:[r,m.jsx("nav",{className:"flex flex-1 flex-col gap-1 p-2",children:t.map(u=>{const f=u.icon;return m.jsxs("a",{href:u.href,"aria-current":u.active?"page":void 0,onClick:h=>{h.button!==0||h.ctrlKey||h.metaKey||h.shiftKey||h.altKey||(h.preventDefault(),l(u.navigationTarget??u.href))},className:_e("flex items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors",u.active?"bg-primary/10 text-primary font-medium":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[m.jsx(f,{className:"h-4 w-4"}),u.label]},u.id)})}),i]})}function zn({className:t}){return m.jsx("div",{className:_e("animate-pulse rounded-md bg-muted",t)})}function kE({cards:t=8}){return m.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4 p-4",children:Array.from({length:t}).map((l,r)=>m.jsxs("div",{className:"rounded-lg border border-border p-4 space-y-3",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(zn,{className:"h-4 w-4 rounded"}),m.jsx(zn,{className:"h-4 w-24"})]}),m.jsx(zn,{className:"h-3 w-full"}),m.jsx(zn,{className:"h-3 w-2/3"}),m.jsxs("div",{className:"flex gap-2 pt-2",children:[m.jsx(zn,{className:"h-5 w-14 rounded-full"}),m.jsx(zn,{className:"h-5 w-14 rounded-full"})]})]},r))})}function DE({rows:t=8,cols:l=5}){return m.jsxs("div",{className:"p-4 space-y-2",children:[m.jsx("div",{className:"flex gap-4 pb-2 border-b border-border",children:Array.from({length:l}).map((r,i)=>m.jsx(zn,{className:"h-4 flex-1"},i))}),Array.from({length:t}).map((r,i)=>m.jsx("div",{className:"flex gap-4 py-2",children:Array.from({length:l}).map((s,u)=>m.jsx(zn,{className:"h-4 flex-1"},u))},i))]})}function ME({cards:t=4}){return m.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4 p-4",children:Array.from({length:t}).map((l,r)=>m.jsxs("div",{className:"rounded-lg border border-border p-4 space-y-3",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(zn,{className:"h-4 w-4 rounded"}),m.jsx(zn,{className:"h-3 w-16"})]}),m.jsx(zn,{className:"h-8 w-20"})]},r))})}const Qy=w.createContext(void 0),lv="gencow-theme";function Zy(){return typeof window>"u"||window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function xd(t){return t==="system"?Zy():t}function wd(t){const l=document.documentElement;l.classList.remove("light","dark"),l.classList.add(t)}function OE({children:t,defaultTheme:l="dark"}){const[r,i]=w.useState(()=>typeof window>"u"?l:localStorage.getItem(lv)||l),[s,u]=w.useState(()=>xd(r)),f=w.useCallback(h=>{i(h),localStorage.setItem(lv,h);const g=xd(h);u(g),wd(g)},[]);return w.useEffect(()=>{const h=xd(r);if(u(h),wd(h),r==="system"){const g=window.matchMedia("(prefers-color-scheme: dark)"),p=()=>{const y=Zy();u(y),wd(y)};return g.addEventListener("change",p),()=>g.removeEventListener("change",p)}},[r]),m.jsx(Qy.Provider,{value:{theme:r,setTheme:f,resolvedTheme:s},children:t})}function Jy(){const t=w.useContext(Qy);if(!t)throw new Error("useTheme must be used within a ThemeProvider");return t}function zE(){const{theme:t,setTheme:l}=Jy();return m.jsx(we,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>l(t==="dark"?"light":"dark"),title:t==="dark"?"Switch to light mode":"Switch to dark mode",children:t==="dark"?m.jsx(pE,{className:"h-4 w-4"}):m.jsx(rE,{className:"h-4 w-4"})})}const Wy="en",e0="gencow.locale",LE="gencow_locale";function Ns(t){if(typeof t!="string")return null;const l=t.trim().toLowerCase();return l==="en"||l.startsWith("en-")?"en":l==="ko"||l.startsWith("ko-")?"ko":null}function UE(t){return Ns(t.queryLocale)??Ns(t.storedLocale)??Ns(t.navigatorLanguage)??Wy}function BE(t){try{return Ns(new URLSearchParams(t).get("lang"))}catch{return null}}function HE(t){return`${LE}=${t}; Path=/; SameSite=Lax; Max-Age=31536000`}const VE={en:"en-US",ko:"ko-KR"};function IE(t){return VE[t]}function t0(t,l,r){return new Intl.DateTimeFormat(IE(l),r).format(new Date(t))}function Ll(t,l,r){return t0(t,l,{dateStyle:"medium",timeStyle:"short",...r})}const rv={en:{"functions.totalCount":"{count} total","functions.staticOnlyBody":"This app only hosts static files. There is no server process, so no functions are registered.","functions.appNotRunningBody":"Functions are unavailable while the app backend is not running.","functions.emptyTitle":"No functions registered","functions.emptyBody":"Define queries and mutations in your {dir} directory to see them here.","functions.queries":"Queries","functions.mutations":"Mutations","functions.invalidJson":"Invalid JSON in arguments","functions.failed":"{name} failed: {message}","functions.completed":"{name} completed in {duration}ms","functions.invalidates":"Invalidates:","functions.argumentsJson":"Arguments (JSON)","functions.input":"Input","functions.inputSchema":"Input schema","functions.inputType":"Input type","functions.outputSchema":"Output schema","functions.outputType":"Output type","functions.sessionToken":"Bearer token","functions.showToken":"Show token","functions.hideToken":"Hide token","functions.clear":"Clear","functions.privateTokenRequired":"Private operations require a Bearer token.","functions.publicTokenHint":"Public operations can run without a Bearer token.","functions.runQuery":"Run Query","functions.runMutation":"Run Mutation","functions.success":"Success","functions.error":"Error","functions.name":"Name","functions.type":"Type"},ko:{"functions.totalCount":"총 {count}개","functions.staticOnlyBody":"이 앱은 정적 파일만 호스팅합니다. 서버 프로세스가 없으므로 함수가 등록되지 않습니다.","functions.appNotRunningBody":"앱 백엔드가 실행 중이 아니어서 함수를 불러올 수 없습니다.","functions.emptyTitle":"등록된 함수가 없습니다","functions.emptyBody":"{dir} 디렉터리에 query와 mutation을 정의하면 여기에 표시됩니다.","functions.queries":"쿼리","functions.mutations":"뮤테이션","functions.invalidJson":"arguments JSON이 잘못되었습니다","functions.failed":"{name} 실패: {message}","functions.completed":"{name} 완료: {duration}ms","functions.invalidates":"무효화 대상:","functions.argumentsJson":"인자 (JSON)","functions.input":"입력","functions.inputSchema":"입력 스키마","functions.inputType":"입력 타입","functions.outputSchema":"출력 스키마","functions.outputType":"출력 타입","functions.sessionToken":"Bearer 토큰","functions.showToken":"토큰 보기","functions.hideToken":"토큰 숨기기","functions.clear":"지우기","functions.privateTokenRequired":"비공개 작업에는 Bearer 토큰이 필요합니다.","functions.publicTokenHint":"공개 작업은 Bearer 토큰 없이 실행할 수 있습니다.","functions.runQuery":"쿼리 실행","functions.runMutation":"뮤테이션 실행","functions.success":"성공","functions.error":"오류","functions.name":"이름","functions.type":"유형"}},iv={en:{"files.filesCount":"{count} files","files.loadedCount":"{count} loaded","files.upload":"Upload","files.dropHere":"Drop files here","files.loadMore":"Load more","files.loadingMore":"Loading...","files.retryLoadMore":"Retry","files.uploadSuccess":"{count} file(s) uploaded successfully","files.uploadMixed":"{success} uploaded, {failed} failed","files.deleted":"File deleted","files.deleteFailed":"Failed to delete file","files.confirmDelete":"Click again to confirm","files.public":"Public","files.private":"Private","files.makePublic":"Make public","files.makePrivate":"Make private","files.copyPublicUrl":"Copy public URL","files.publicConfirm":"This file will be readable by anyone with the URL. Continue?","files.visibilityUpdated":"File visibility updated","files.visibilityUpdateFailed":"Failed to update file visibility","files.appNotRunningBody":"File storage is unavailable while the app backend is not running.","files.loadFailedTitle":"Could not load files","files.loadFailedBody":"The file catalog could not be loaded. Try again after checking the app logs.","files.invalidResponse":"The file API returned an unexpected response.","files.emptyTitle":"No files uploaded yet","files.emptyBody":"Drag and drop files here or click Upload","files.choose":"Choose Files","files.selectedCount":"{count} selected","files.searchPlaceholder":"Search name or storage ID","files.filterAllVisibility":"All visibility","files.filterAllTypes":"All types","files.filterAllUploaders":"All uploaders","files.typeImage":"Image","files.typeAudio":"Audio","files.typeVideo":"Video","files.typeDocument":"Document","files.typeArchive":"Archive","files.typeText":"Text","files.typeOther":"Other","files.columnPreview":"Preview","files.columnName":"Name","files.columnType":"Type","files.columnSize":"Size","files.columnVisibility":"Visibility","files.columnUploadedBy":"Uploaded by","files.columnCreated":"Created","files.columnActions":"Actions","files.selectPage":"Select current page","files.selectFile":"Select {name}","files.bulkMakePublic":"Make public","files.bulkMakePrivate":"Make private","files.bulkDelete":"Delete","files.filterMakePublic":"All filtered public","files.filterMakePrivate":"All filtered private","files.filterDelete":"Delete filtered","files.bulkPublicConfirm":"{count} selected file(s) will be readable by anyone with the URL. Continue?","files.bulkPrivateConfirm":"{count} selected file(s) will require read grants. Continue?","files.bulkDeleteConfirm":"{count} selected file(s) will be deleted permanently. Continue?","files.bulkComplete":"{changed} file(s) updated","files.bulkPartial":"{changed} changed, {failed} failed","files.bulkFailed":"Bulk action failed","files.bulkPreviewFailed":"Could not preview bulk action","files.pageNumber":"Page {page}","files.pageSizeLabel":"Page size","files.invalidRows":"{count} invalid catalog row(s) hidden. Refresh the catalog before changing files.","files.pageSize":"{count} / page","files.bulkPreviewTitle":"Bulk action preview","files.bulkPreviewLoading":"Preparing preview...","files.bulkPreviewCount":"Matched files","files.bulkPreviewBytes":"Total size","files.bulkPreviewVisibility":"Visibility breakdown","files.bulkPreviewTypes":"Type breakdown","files.bulkPreviewNoBreakdown":"No matching rows","files.bulkDeleteWarning":"Delete removes storage bytes and catalog rows. This cannot be undone.","files.bulkPublicWarning":"Public files become accessible without read grants.","files.bulkPrivateWarning":"Private files require read grants. Previously cached public responses may live until cache expiry."},ko:{"files.filesCount":"파일 {count}개","files.loadedCount":"{count}개 로드됨","files.upload":"업로드","files.dropHere":"파일을 여기에 놓으세요","files.loadMore":"더 불러오기","files.loadingMore":"불러오는 중...","files.retryLoadMore":"다시 시도","files.uploadSuccess":"파일 {count}개 업로드 완료","files.uploadMixed":"{success}개 업로드, {failed}개 실패","files.deleted":"파일이 삭제되었습니다","files.deleteFailed":"파일 삭제 실패","files.confirmDelete":"다시 클릭하면 삭제됩니다","files.public":"공개","files.private":"비공개","files.makePublic":"공개로 변경","files.makePrivate":"비공개로 변경","files.copyPublicUrl":"공개 URL 복사","files.publicConfirm":"이 파일은 URL을 아는 누구나 읽을 수 있게 됩니다. 계속할까요?","files.visibilityUpdated":"파일 공개 설정이 변경되었습니다","files.visibilityUpdateFailed":"파일 공개 설정 변경 실패","files.appNotRunningBody":"앱 백엔드가 실행 중이 아니어서 파일 스토리지를 사용할 수 없습니다.","files.loadFailedTitle":"파일을 불러올 수 없습니다","files.loadFailedBody":"파일 catalog를 불러오지 못했습니다. 앱 로그를 확인한 뒤 다시 시도하세요.","files.invalidResponse":"파일 API가 예상과 다른 응답을 반환했습니다.","files.emptyTitle":"아직 업로드된 파일이 없습니다","files.emptyBody":"파일을 끌어다 놓거나 업로드를 클릭하세요","files.choose":"파일 선택","files.selectedCount":"{count}개 선택됨","files.searchPlaceholder":"파일명 또는 storage ID 검색","files.filterAllVisibility":"전체 공개 상태","files.filterAllTypes":"전체 타입","files.filterAllUploaders":"전체 업로더","files.typeImage":"이미지","files.typeAudio":"오디오","files.typeVideo":"비디오","files.typeDocument":"문서","files.typeArchive":"압축","files.typeText":"텍스트","files.typeOther":"기타","files.columnPreview":"미리보기","files.columnName":"이름","files.columnType":"타입","files.columnSize":"크기","files.columnVisibility":"공개 상태","files.columnUploadedBy":"업로드 경로","files.columnCreated":"생성일","files.columnActions":"작업","files.selectPage":"현재 페이지 선택","files.selectFile":"{name} 선택","files.bulkMakePublic":"공개 전환","files.bulkMakePrivate":"비공개 전환","files.bulkDelete":"삭제","files.filterMakePublic":"필터 전체 공개","files.filterMakePrivate":"필터 전체 비공개","files.filterDelete":"필터 전체 삭제","files.bulkPublicConfirm":"선택한 파일 {count}개가 URL을 아는 누구나 읽을 수 있게 됩니다. 계속할까요?","files.bulkPrivateConfirm":"선택한 파일 {count}개는 read grant가 있어야 접근할 수 있습니다. 계속할까요?","files.bulkDeleteConfirm":"선택한 파일 {count}개가 영구 삭제됩니다. 계속할까요?","files.bulkComplete":"파일 {changed}개 처리 완료","files.bulkPartial":"{changed}개 처리, {failed}개 실패","files.bulkFailed":"일괄 작업 실패","files.bulkPreviewFailed":"일괄 작업 미리보기 실패","files.pageNumber":"{page}페이지","files.pageSizeLabel":"페이지 크기","files.invalidRows":"잘못된 catalog 행 {count}개가 숨겨졌습니다. 파일을 변경하기 전에 catalog를 새로고침하세요.","files.pageSize":"페이지당 {count}개","files.bulkPreviewTitle":"일괄 작업 미리보기","files.bulkPreviewLoading":"미리보기를 준비하는 중...","files.bulkPreviewCount":"대상 파일","files.bulkPreviewBytes":"총 크기","files.bulkPreviewVisibility":"공개 상태 구성","files.bulkPreviewTypes":"타입 구성","files.bulkPreviewNoBreakdown":"일치하는 row 없음","files.bulkDeleteWarning":"삭제하면 storage bytes와 catalog row가 제거되며 되돌릴 수 없습니다.","files.bulkPublicWarning":"공개 파일은 read grant 없이 접근할 수 있습니다.","files.bulkPrivateWarning":"비공개 파일은 read grant가 있어야 접근할 수 있습니다. 기존 public cache는 만료 전까지 남을 수 있습니다."}},ov={en:{"tenant.notFound":"Page not found","tenant.featureUnavailableBody":"This feature is unavailable for this runtime. Choose another supported view; enabling the backend feature is required before retrying.","common.refresh":"Refresh","functions.public":"public","functions.authRequired":"auth required","functions.cardView":"Card view","functions.tableView":"Table view","functions.fixInput":"Enter valid JSON before running the operation.","common.save":"Save","common.cancel":"Cancel","common.delete":"Delete","common.download":"Download","common.copy":"Copy","common.retry":"Retry","generic.name":"Name","generic.email":"Email","common.unknown":"Unknown","common.unnamed":"Unnamed","common.active":"Active","common.pending":"Pending","common.waiting":"Waiting","common.no":"No","common.deployed":"Deployed","common.previous":"Previous","common.next":"Next","common.reset":"Reset","common.confirm":"Confirm","app.common.staticHosting":"Static Hosting","app.common.appNotRunning":"App is not running","data.tablesCount":"{count} tables","data.columnsCount":"{count} columns","data.colsCount":"{count} cols","data.rowsCount":"{count} rows","data.noData":"No data","data.loadingTables":"Loading tables...","data.loadingRows":"Loading rows...","data.rowsUnavailable":"Rows are temporarily unavailable.","data.rowDeleted":"Row deleted","data.nullable":"nullable","data.staticOnlyBody":"This app only hosts static files. There is no server process, so the database is not used.","data.appNotRunningBody":"Database tables are unavailable while the app backend is not running.","data.backendWakingTitle":"Waiting for backend","data.backendWakingBody":"The app is waking up. Tables will refresh automatically when it is ready.","data.backendUnavailableTitle":"Backend unavailable","data.backendUnavailableBody":"The table list could not be loaded yet. Retry after the app finishes starting.","data.backendErrorTitle":"Could not load tables","data.backendErrorBody":"The table list failed to load. Check the app state, then try again.","data.rowsError":"Rows could not be loaded. Check the app state, then refresh.","data.rowsBlocked":"The app is not running. Restart or recover it, then refresh.","data.rowsWaitingForBackend":"Waiting for backend...","data.noTablesTitle":"No tables yet","data.noTablesBody":"Define a schema in your {file} file and run the server to create tables.","data.allTables":"All Tables","data.tableView":"Table view","data.filteredTables":"App tables","data.everyTable":"App + system tables","data.protectedReadOnly":"Auth and system tables are read-only in this view.","data.rangeOf":"{start}-{end} of {total}","data.pageOf":"Page {page} of {total}","data.nextPage":"Next page","data.previousPage":"Previous page","row.detail":"Row Detail","row.invalidJson":"Invalid JSON","row.create":"Create row","row.add":"Add row","row.created":"Row created","row.omit":"Use default","row.value":"Enter value","row.null":"NULL","row.required":"required","row.explicitInput":"Provide at least one explicit field value; this runtime cannot insert defaults alone.","row.requiredInput":"Enter a value for each required field without a default.","row.invalidNumber":"Enter a finite number before saving.","row.invalidDate":"Enter a valid date before saving.","row.invalidBoolean":"Enter true or false before saving.","row.updated":"Updated {field}","row.updateFailed":"Failed to update field","row.setToNull":"{field} set to null","row.setNullFailed":"Failed to set null","row.toggleFailed":"Failed to toggle","row.deleteFailed":"Failed to delete row","row.setNull":"Set null","row.setValue":"Set value","row.referencedBy":"Referenced by","row.confirmDelete":"Confirm Delete","row.deleteRow":"Delete Row","row.rowsCount":"{count} rows","row.readOnlyTable":"Read only","row.readOnlyTableBody":"Editing is disabled until non-id row actions are supported.",...rv.en,"logs.staticOnlyBody":"This app only hosts static files. There is no server process, so realtime logs are not generated.","logs.unavailable":"App is not running - logs are unavailable.","logs.live":"Live","logs.autoScroll":"Auto-scroll","logs.polling":"Polling","logs.system":"System","logs.verbose":"Verbose","logs.systemHidden":"System logs hidden","logs.systemShown":"Showing system logs","logs.verboseHidden":"Verbose logs hidden","logs.verboseShown":"Showing verbose logs","logs.empty.default":"No logs yet. Interact with the API to generate logs.","logs.empty.systemVerboseHidden":"No application logs yet. System and verbose logs are hidden.","logs.empty.systemHidden":"No application logs yet. System logs are hidden - click the System button to show them.","logs.empty.verboseHidden":"No logs yet. Verbose logs are hidden - click the Verbose button to show more detail.","logs.level.all":"All","logs.level.info":"Info","logs.level.warn":"Warn","logs.level.error":"Error",...iv.en,"auth.usersCount":"{count} users","auth.searchPlaceholder":"Search users...","auth.noName":"No name","auth.verified":"Verified","auth.yes":"Yes","auth.created":"Created","auth.noUsers":"No users","auth.noUsersFound":"No users found","auth.noUsersYet":"No users registered yet","auth.noUsersMatch":'No users match "{search}". Try a different search term.',"auth.signupHint":"Use POST /api/auth/signup to register users.","auth.appNotRunningBody":"Auth users are unavailable while the app backend is not running.","settings.envReadonly":"Read-only","app.env.title":"Environment Variables","app.env.name":"Name","app.env.value":"Value","settings.envReadonlyBody":"Edit environment variables in the {envFile} file, then restart the development server.","settings.noEnvVars":"No environment variables in .env file","server.title":"Server Status","server.status":"Status","server.uptime":"Uptime","server.memory":"Memory","server.heap":"Heap","server.runtime":"Runtime","server.framework":"Framework","server.database":"Database","server.extensions":"Extensions","server.noExtensions":"No extensions","status.crashed":"Crashed","status.stopped":"Stopped","status.idle":"Idle","status.failed":"Failed","status.error":"Error","status.running":"Running","scheduler.title":"Scheduler","scheduler.failedJobs":"Failed Scheduled Jobs","scheduler.noFailed":"No failed scheduled jobs","scheduler.failedAt":"Failed at {date}","dashboard.staleData":"Previously loaded data may be stale.","scheduler.infoUnavailable":"Scheduler information is unavailable while the app backend is not running.","scheduler.cronJobs":"Cron Jobs","scheduler.pendingJobs":"Pending Scheduled Jobs","scheduler.noCrons":"No cron jobs registered","scheduler.defineCrons":"Use defineApi({ crons }); legacy gencow/crons.ts is supported","scheduler.noPending":"No pending scheduled jobs","scheduler.scheduledFor":"Scheduled for {date}","scheduler.overdue":"overdue","scheduler.everyMinute":"Every minute","scheduler.everyMinutes":"Every {count} minutes","scheduler.everyHour":"Every hour","scheduler.everyHours":"Every {count} hours","scheduler.dailyMidnight":"Daily at midnight","scheduler.dailyAt":"Daily at {time}","scheduler.weekdaysAt":"Weekdays at {time}","scheduler.everyDayAt":"Every {day} at {time}","scheduler.monthlyFirst":"Monthly on the 1st at {time}","scheduler.day.sunday":"Sunday","scheduler.day.monday":"Monday","scheduler.day.tuesday":"Tuesday","scheduler.day.wednesday":"Wednesday","scheduler.day.thursday":"Thursday","scheduler.day.friday":"Friday","scheduler.day.saturday":"Saturday","time.justNow":"Just now","time.minutesAgo":"{count}m ago","time.hoursAgo":"{count}h ago","time.daysAgo":"{count}d ago"},ko:{"tenant.notFound":"페이지를 찾을 수 없습니다","tenant.featureUnavailableBody":"이 런타임에서 이 기능을 사용할 수 없습니다. 지원되는 다른 화면을 선택하세요. 다시 시도하려면 백엔드 기능을 활성화해야 합니다.","common.refresh":"새로고침","functions.public":"공개","functions.authRequired":"인증 필요","functions.cardView":"카드 보기","functions.tableView":"표 보기","functions.fixInput":"올바른 JSON을 입력한 후 실행하세요.","common.save":"저장","common.cancel":"취소","common.delete":"삭제","common.download":"다운로드","common.copy":"복사","common.retry":"다시 시도","generic.name":"이름","generic.email":"이메일","common.unknown":"알 수 없음","common.unnamed":"이름 없음","common.active":"활성","common.pending":"대기 중","common.waiting":"대기 중","common.no":"아니요","common.deployed":"배포됨","common.previous":"이전","common.next":"다음","common.reset":"초기화","common.confirm":"확인","app.common.staticHosting":"정적 호스팅","app.common.appNotRunning":"앱이 실행 중이 아닙니다","data.tablesCount":"테이블 {count}개","data.columnsCount":"컬럼 {count}개","data.colsCount":"컬럼 {count}개","data.rowsCount":"행 {count}개","data.noData":"데이터 없음","data.loadingTables":"테이블을 불러오는 중...","data.loadingRows":"행을 불러오는 중...","data.rowsUnavailable":"행을 일시적으로 불러올 수 없습니다.","data.rowDeleted":"행이 삭제되었습니다","data.nullable":"null 허용","data.staticOnlyBody":"이 앱은 정적 파일만 호스팅합니다. 서버 프로세스가 없으므로 데이터베이스가 사용되지 않습니다.","data.appNotRunningBody":"앱 백엔드가 실행 중이 아니어서 데이터베이스 테이블을 사용할 수 없습니다.","data.backendWakingTitle":"백엔드를 기다리는 중","data.backendWakingBody":"앱을 깨우는 중입니다. 준비되면 테이블이 자동으로 새로고침됩니다.","data.backendUnavailableTitle":"백엔드를 사용할 수 없습니다","data.backendUnavailableBody":"아직 테이블 목록을 불러오지 못했습니다. 앱 시작이 끝난 뒤 다시 시도하세요.","data.backendErrorTitle":"테이블을 불러오지 못했습니다","data.backendErrorBody":"테이블 목록 로드에 실패했습니다. 앱 상태를 확인한 뒤 다시 시도하세요.","data.rowsError":"행을 불러오지 못했습니다. 앱 상태를 확인한 뒤 새로고침하세요.","data.rowsBlocked":"앱이 실행 중이 아닙니다. 다시 시작하거나 복구한 뒤 새로고침하세요.","data.rowsWaitingForBackend":"백엔드를 기다리는 중...","data.noTablesTitle":"아직 테이블이 없습니다","data.noTablesBody":"{file} 파일에 스키마를 정의하고 서버를 실행하면 테이블이 생성됩니다.","data.allTables":"모든 테이블","data.tableView":"테이블 보기","data.filteredTables":"앱 테이블","data.everyTable":"앱 + 시스템 테이블","data.protectedReadOnly":"이 보기에서 인증 및 시스템 테이블은 읽기 전용입니다.","data.rangeOf":"{total}개 중 {start}-{end}","data.pageOf":"{total}페이지 중 {page}페이지","data.nextPage":"다음 페이지","data.previousPage":"이전 페이지","row.detail":"행 상세","row.invalidJson":"잘못된 JSON입니다","row.create":"행 생성","row.add":"행 추가","row.created":"행이 생성되었습니다","row.omit":"기본값 사용","row.value":"값 입력","row.null":"NULL","row.required":"필수","row.explicitInput":"하나 이상의 필드 값을 입력하세요. 이 런타임은 기본값만으로 행을 생성할 수 없습니다.","row.requiredInput":"기본값이 없는 필수 필드에 값을 입력하세요.","row.invalidNumber":"유한한 숫자를 입력한 후 저장하세요.","row.invalidDate":"올바른 날짜를 입력한 후 저장하세요.","row.invalidBoolean":"true 또는 false를 입력한 후 저장하세요.","row.updated":"{field} 업데이트 완료","row.updateFailed":"필드 업데이트 실패","row.setToNull":"{field}를 null로 설정했습니다","row.setNullFailed":"null 설정 실패","row.toggleFailed":"토글 실패","row.deleteFailed":"행 삭제 실패","row.setNull":"null 설정","row.setValue":"값 설정","row.referencedBy":"참조 중인 테이블","row.confirmDelete":"삭제 확인","row.deleteRow":"행 삭제","row.rowsCount":"행 {count}개","row.readOnlyTable":"읽기 전용","row.readOnlyTableBody":"id가 아닌 키의 행 작업을 지원할 때까지 편집과 삭제가 비활성화됩니다.",...rv.ko,"logs.staticOnlyBody":"이 앱은 정적 파일만 호스팅합니다. 서버 프로세스가 없으므로 실시간 로그가 생성되지 않습니다.","logs.unavailable":"앱이 실행 중이 아니어서 로그를 볼 수 없습니다.","logs.live":"실시간","logs.autoScroll":"자동 스크롤","logs.polling":"폴링","logs.system":"시스템","logs.verbose":"상세","logs.systemHidden":"시스템 로그 숨김","logs.systemShown":"시스템 로그 표시 중","logs.verboseHidden":"상세 로그 숨김","logs.verboseShown":"상세 로그 표시 중","logs.empty.default":"아직 로그가 없습니다. API를 호출하면 로그가 생성됩니다.","logs.empty.systemVerboseHidden":"아직 애플리케이션 로그가 없습니다. 시스템 및 상세 로그는 숨겨져 있습니다.","logs.empty.systemHidden":"아직 애플리케이션 로그가 없습니다. 시스템 버튼을 눌러 시스템 로그를 표시할 수 있습니다.","logs.empty.verboseHidden":"아직 로그가 없습니다. Verbose 버튼을 누르면 더 자세한 로그를 볼 수 있습니다.","logs.level.all":"전체","logs.level.info":"정보","logs.level.warn":"경고","logs.level.error":"오류",...iv.ko,"auth.usersCount":"사용자 {count}명","auth.searchPlaceholder":"사용자 검색...","auth.noName":"이름 없음","auth.verified":"인증됨","auth.yes":"예","auth.created":"생성일","auth.noUsers":"사용자 없음","auth.noUsersFound":"검색된 사용자가 없습니다","auth.noUsersYet":"아직 등록된 사용자가 없습니다","auth.noUsersMatch":'"{search}"와 일치하는 사용자가 없습니다. 다른 검색어를 입력하세요.',"auth.signupHint":"사용자를 등록하려면 POST /api/auth/signup을 사용하세요.","auth.appNotRunningBody":"앱 백엔드가 실행 중이 아니어서 인증 사용자를 불러올 수 없습니다.","settings.envReadonly":"읽기 전용","app.env.title":"환경변수","app.env.name":"이름","app.env.value":"값","settings.envReadonlyBody":"{envFile} 파일에서 환경변수를 편집한 후 개발 서버를 다시 시작하세요.","settings.noEnvVars":".env 파일에 환경변수가 없습니다","server.title":"서버 상태","server.status":"상태","server.uptime":"업타임","server.memory":"메모리","server.heap":"힙","server.runtime":"런타임","server.framework":"프레임워크","server.database":"데이터베이스","server.extensions":"확장","server.noExtensions":"확장이 없습니다","status.crashed":"크래시됨","status.stopped":"중지됨","status.idle":"유휴","status.failed":"실패","status.error":"오류","status.running":"실행 중","scheduler.title":"스케줄러","scheduler.failedJobs":"실패한 예약 작업","scheduler.noFailed":"실패한 예약 작업이 없습니다","scheduler.failedAt":"{date}에 실패","dashboard.staleData":"이전에 불러온 데이터가 오래되었을 수 있습니다.","scheduler.infoUnavailable":"앱 백엔드가 실행 중이 아니어서 스케줄러 정보를 사용할 수 없습니다.","scheduler.cronJobs":"Cron 작업","scheduler.pendingJobs":"대기 중인 예약 작업","scheduler.noCrons":"등록된 Cron 작업이 없습니다","scheduler.defineCrons":"defineApi({ crons })에 정의하세요. 기존 gencow/crons.ts도 지원됩니다","scheduler.noPending":"대기 중인 예약 작업이 없습니다","scheduler.scheduledFor":"{date}에 실행 예정","scheduler.overdue":"기한 지남","scheduler.everyMinute":"매분","scheduler.everyMinutes":"{count}분마다","scheduler.everyHour":"매시간","scheduler.everyHours":"{count}시간마다","scheduler.dailyMidnight":"매일 자정","scheduler.dailyAt":"매일 {time}","scheduler.weekdaysAt":"평일 {time}","scheduler.everyDayAt":"매주 {day} {time}","scheduler.monthlyFirst":"매월 1일 {time}","scheduler.day.sunday":"일요일","scheduler.day.monday":"월요일","scheduler.day.tuesday":"화요일","scheduler.day.wednesday":"수요일","scheduler.day.thursday":"목요일","scheduler.day.friday":"금요일","scheduler.day.saturday":"토요일","time.justNow":"방금 전","time.minutesAgo":"{count}분 전","time.hoursAgo":"{count}시간 전","time.daysAgo":"{count}일 전"}},FE={en:{"diagnostic.title":"Request failed","diagnostic.code":"Code","diagnostic.stage":"Stage","diagnostic.stateImpact":"State impact","diagnostic.nextAction":"Next action","diagnostic.retryPrecondition":"Before retrying","diagnostic.retryable":"Retryable","diagnostic.retryYes":"Yes","diagnostic.retryNo":"No","diagnostic.command":"Command","diagnostic.operation":"Operation","diagnostic.correlation":"Correlation","nav.darkMode":"Dark mode","nav.lightMode":"Light mode","nav.theme":"Theme","language.label":"Language","language.korean":"Korean","language.english":"English","common.or":"or","common.loading":"...","app.nav.dashboard":"Dashboard","app.nav.status":"Status","app.nav.data":"Data","app.nav.functions":"Functions","app.nav.logs":"Logs","app.nav.files":"File Storage","app.nav.jobs":"Jobs","app.nav.auth":"Auth","app.nav.settings":"Settings","app.nav.connected":"Connected","app.nav.search":"Search...","command.placeholder":"Type a command or search...","command.noResults":"No results found","command.navigate":"Navigate","command.select":"Select","command.close":"Close","command.group.navigation":"Navigation","command.goToData":"Go to Data","command.goToFunctions":"Go to Functions","command.goToLogs":"Go to Logs","command.goToFiles":"Go to File Storage","command.goToJobs":"Go to Jobs","command.goToAuth":"Go to Auth","command.goToStatus":"Go to Status","command.goToSettings":"Go to Settings",...ov.en},ko:{"diagnostic.title":"요청 실패","diagnostic.code":"코드","diagnostic.stage":"단계","diagnostic.stateImpact":"상태 영향","diagnostic.nextAction":"다음 행동","diagnostic.retryPrecondition":"재시도 조건","diagnostic.retryable":"재시도 가능","diagnostic.retryYes":"예","diagnostic.retryNo":"아니요","diagnostic.command":"명령","diagnostic.operation":"작업","diagnostic.correlation":"상관 ID","nav.darkMode":"다크 모드","nav.lightMode":"라이트 모드","nav.theme":"테마","language.label":"언어","language.korean":"한국어","language.english":"영어","common.or":"또는","common.loading":"...","app.nav.dashboard":"대시보드","app.nav.status":"상태","app.nav.data":"데이터","app.nav.functions":"함수","app.nav.logs":"로그","app.nav.files":"파일 스토리지","app.nav.jobs":"작업","app.nav.auth":"인증","app.nav.settings":"설정","app.nav.connected":"연결됨","app.nav.search":"검색...","command.placeholder":"명령어를 입력하거나 검색하세요...","command.noResults":"검색 결과가 없습니다","command.navigate":"이동","command.select":"선택","command.close":"닫기","command.group.navigation":"내비게이션","command.goToData":"데이터로 이동","command.goToFunctions":"함수로 이동","command.goToLogs":"로그로 이동","command.goToFiles":"파일 스토리지로 이동","command.goToJobs":"작업으로 이동","command.goToAuth":"인증으로 이동","command.goToStatus":"상태로 이동","command.goToSettings":"설정으로 이동",...ov.ko}};function qE(t,l){return{en:{...t.en,...(l==null?void 0:l.en)??{}},ko:{...t.ko,...(l==null?void 0:l.ko)??{}}}}function $E(t,l={}){return t.replace(/\{(\w+)\}/g,(r,i)=>String(l[i]??r))}const n0=w.createContext(null);function GE(){return typeof window>"u"?Wy:UE({queryLocale:BE(window.location.search),storedLocale:window.localStorage.getItem(e0),navigatorLanguage:window.navigator.language})}function PE({children:t,messages:l,defaultLocale:r}){const[i,s]=w.useState(()=>r??GE()),u=w.useMemo(()=>qE(FE,l),[l]);w.useEffect(()=>{typeof document>"u"||(document.documentElement.lang=i,document.documentElement.dir="ltr",document.cookie=HE(i))},[i]);const f=w.useCallback(p=>{s(p),typeof window<"u"&&window.localStorage.setItem(e0,p)},[]),h=w.useCallback((p,y)=>$E(u[i][p]??u.en[p]??p,y),[i,u]),g=w.useMemo(()=>({locale:i,setLocale:f,t:h}),[i,f,h]);return m.jsx(n0.Provider,{value:g,children:t})}function _n(){const t=w.useContext(n0);if(!t)throw new Error("useLocale must be used within LocaleProvider");return t}function Oe(){return _n().t}function wf({className:t=""}){const{locale:l,setLocale:r,t:i}=_n();return m.jsxs("div",{className:`inline-flex h-8 items-center gap-1 rounded-md border border-border bg-background px-1 text-xs ${t}`,"aria-label":i("language.label"),title:i("language.label"),children:[m.jsx(X2,{className:"h-3.5 w-3.5 text-muted-foreground","aria-hidden":"true"}),["ko","en"].map(s=>m.jsx("button",{type:"button",onClick:()=>r(s),"aria-pressed":l===s,"aria-label":i(s==="ko"?"language.korean":"language.english"),className:`h-6 rounded px-2 font-medium transition ${l===s?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"}`,children:s.toUpperCase()},s))]})}/**
|
|
346
|
+
* table-core
|
|
347
|
+
*
|
|
348
|
+
* Copyright (c) TanStack
|
|
349
|
+
*
|
|
350
|
+
* This source code is licensed under the MIT license found in the
|
|
351
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
352
|
+
*
|
|
353
|
+
* @license MIT
|
|
354
|
+
*/function rl(t,l){return typeof t=="function"?t(l):t}function fn(t,l){return r=>{l.setState(i=>({...i,[t]:rl(r,i[t])}))}}function Ps(t){return t instanceof Function}function YE(t){return Array.isArray(t)&&t.every(l=>typeof l=="number")}function XE(t,l){const r=[],i=s=>{s.forEach(u=>{r.push(u);const f=l(u);f!=null&&f.length&&i(f)})};return i(t),r}function Se(t,l,r){let i=[],s;return u=>{let f;r.key&&r.debug&&(f=Date.now());const h=t(u);if(!(h.length!==i.length||h.some((y,v)=>i[v]!==y)))return s;i=h;let p;if(r.key&&r.debug&&(p=Date.now()),s=l(...h),r==null||r.onChange==null||r.onChange(s),r.key&&r.debug&&r!=null&&r.debug()){const y=Math.round((Date.now()-f)*100)/100,v=Math.round((Date.now()-p)*100)/100,C=v/16,x=(S,E)=>{for(S=String(S);S.length<E;)S=" "+S;return S};console.info(`%c⏱ ${x(v,5)} /${x(y,5)} ms`,`
|
|
355
|
+
font-size: .6rem;
|
|
356
|
+
font-weight: bold;
|
|
357
|
+
color: hsl(${Math.max(0,Math.min(120-120*C,120))}deg 100% 31%);`,r==null?void 0:r.key)}return s}}function Ee(t,l,r,i){return{debug:()=>{var s;return(s=t==null?void 0:t.debugAll)!=null?s:t[l]},key:!1,onChange:i}}function KE(t,l,r,i){const s=()=>{var f;return(f=u.getValue())!=null?f:t.options.renderFallbackValue},u={id:`${l.id}_${r.id}`,row:l,column:r,getValue:()=>l.getValue(i),renderValue:s,getContext:Se(()=>[t,r,l,u],(f,h,g,p)=>({table:f,column:h,row:g,cell:p,getValue:p.getValue,renderValue:p.renderValue}),Ee(t.options,"debugCells"))};return t._features.forEach(f=>{f.createCell==null||f.createCell(u,r,l,t)},{}),u}function QE(t,l,r,i){var s,u;const h={...t._getDefaultColumnDef(),...l},g=h.accessorKey;let p=(s=(u=h.id)!=null?u:g?typeof String.prototype.replaceAll=="function"?g.replaceAll(".","_"):g.replace(/\./g,"_"):void 0)!=null?s:typeof h.header=="string"?h.header:void 0,y;if(h.accessorFn?y=h.accessorFn:g&&(g.includes(".")?y=C=>{let x=C;for(const E of g.split(".")){var S;x=(S=x)==null?void 0:S[E]}return x}:y=C=>C[h.accessorKey]),!p)throw new Error;let v={id:`${String(p)}`,accessorFn:y,parent:i,depth:r,columnDef:h,columns:[],getFlatColumns:Se(()=>[!0],()=>{var C;return[v,...(C=v.columns)==null?void 0:C.flatMap(x=>x.getFlatColumns())]},Ee(t.options,"debugColumns")),getLeafColumns:Se(()=>[t._getOrderColumnsFn()],C=>{var x;if((x=v.columns)!=null&&x.length){let S=v.columns.flatMap(E=>E.getLeafColumns());return C(S)}return[v]},Ee(t.options,"debugColumns"))};for(const C of t._features)C.createColumn==null||C.createColumn(v,t);return v}const Lt="debugHeaders";function sv(t,l,r){var i;let u={id:(i=r.id)!=null?i:l.id,column:l,index:r.index,isPlaceholder:!!r.isPlaceholder,placeholderId:r.placeholderId,depth:r.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const f=[],h=g=>{g.subHeaders&&g.subHeaders.length&&g.subHeaders.map(h),f.push(g)};return h(u),f},getContext:()=>({table:t,header:u,column:l})};return t._features.forEach(f=>{f.createHeader==null||f.createHeader(u,t)}),u}const ZE={createTable:t=>{t.getHeaderGroups=Se(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(l,r,i,s)=>{var u,f;const h=(u=i==null?void 0:i.map(v=>r.find(C=>C.id===v)).filter(Boolean))!=null?u:[],g=(f=s==null?void 0:s.map(v=>r.find(C=>C.id===v)).filter(Boolean))!=null?f:[],p=r.filter(v=>!(i!=null&&i.includes(v.id))&&!(s!=null&&s.includes(v.id)));return bs(l,[...h,...p,...g],t)},Ee(t.options,Lt)),t.getCenterHeaderGroups=Se(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(l,r,i,s)=>(r=r.filter(u=>!(i!=null&&i.includes(u.id))&&!(s!=null&&s.includes(u.id))),bs(l,r,t,"center")),Ee(t.options,Lt)),t.getLeftHeaderGroups=Se(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left],(l,r,i)=>{var s;const u=(s=i==null?void 0:i.map(f=>r.find(h=>h.id===f)).filter(Boolean))!=null?s:[];return bs(l,u,t,"left")},Ee(t.options,Lt)),t.getRightHeaderGroups=Se(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.right],(l,r,i)=>{var s;const u=(s=i==null?void 0:i.map(f=>r.find(h=>h.id===f)).filter(Boolean))!=null?s:[];return bs(l,u,t,"right")},Ee(t.options,Lt)),t.getFooterGroups=Se(()=>[t.getHeaderGroups()],l=>[...l].reverse(),Ee(t.options,Lt)),t.getLeftFooterGroups=Se(()=>[t.getLeftHeaderGroups()],l=>[...l].reverse(),Ee(t.options,Lt)),t.getCenterFooterGroups=Se(()=>[t.getCenterHeaderGroups()],l=>[...l].reverse(),Ee(t.options,Lt)),t.getRightFooterGroups=Se(()=>[t.getRightHeaderGroups()],l=>[...l].reverse(),Ee(t.options,Lt)),t.getFlatHeaders=Se(()=>[t.getHeaderGroups()],l=>l.map(r=>r.headers).flat(),Ee(t.options,Lt)),t.getLeftFlatHeaders=Se(()=>[t.getLeftHeaderGroups()],l=>l.map(r=>r.headers).flat(),Ee(t.options,Lt)),t.getCenterFlatHeaders=Se(()=>[t.getCenterHeaderGroups()],l=>l.map(r=>r.headers).flat(),Ee(t.options,Lt)),t.getRightFlatHeaders=Se(()=>[t.getRightHeaderGroups()],l=>l.map(r=>r.headers).flat(),Ee(t.options,Lt)),t.getCenterLeafHeaders=Se(()=>[t.getCenterFlatHeaders()],l=>l.filter(r=>{var i;return!((i=r.subHeaders)!=null&&i.length)}),Ee(t.options,Lt)),t.getLeftLeafHeaders=Se(()=>[t.getLeftFlatHeaders()],l=>l.filter(r=>{var i;return!((i=r.subHeaders)!=null&&i.length)}),Ee(t.options,Lt)),t.getRightLeafHeaders=Se(()=>[t.getRightFlatHeaders()],l=>l.filter(r=>{var i;return!((i=r.subHeaders)!=null&&i.length)}),Ee(t.options,Lt)),t.getLeafHeaders=Se(()=>[t.getLeftHeaderGroups(),t.getCenterHeaderGroups(),t.getRightHeaderGroups()],(l,r,i)=>{var s,u,f,h,g,p;return[...(s=(u=l[0])==null?void 0:u.headers)!=null?s:[],...(f=(h=r[0])==null?void 0:h.headers)!=null?f:[],...(g=(p=i[0])==null?void 0:p.headers)!=null?g:[]].map(y=>y.getLeafHeaders()).flat()},Ee(t.options,Lt))}};function bs(t,l,r,i){var s,u;let f=0;const h=function(C,x){x===void 0&&(x=1),f=Math.max(f,x),C.filter(S=>S.getIsVisible()).forEach(S=>{var E;(E=S.columns)!=null&&E.length&&h(S.columns,x+1)},0)};h(t);let g=[];const p=(C,x)=>{const S={depth:x,id:[i,`${x}`].filter(Boolean).join("_"),headers:[]},E=[];C.forEach(R=>{const _=[...E].reverse()[0],j=R.column.depth===S.depth;let A,L=!1;if(j&&R.column.parent?A=R.column.parent:(A=R.column,L=!0),_&&(_==null?void 0:_.column)===A)_.subHeaders.push(R);else{const M=sv(r,A,{id:[i,x,A.id,R==null?void 0:R.id].filter(Boolean).join("_"),isPlaceholder:L,placeholderId:L?`${E.filter(K=>K.column===A).length}`:void 0,depth:x,index:E.length});M.subHeaders.push(R),E.push(M)}S.headers.push(R),R.headerGroup=S}),g.push(S),x>0&&p(E,x-1)},y=l.map((C,x)=>sv(r,C,{depth:f,index:x}));p(y,f-1),g.reverse();const v=C=>C.filter(S=>S.column.getIsVisible()).map(S=>{let E=0,R=0,_=[0];S.subHeaders&&S.subHeaders.length?(_=[],v(S.subHeaders).forEach(A=>{let{colSpan:L,rowSpan:M}=A;E+=L,_.push(M)})):E=1;const j=Math.min(..._);return R=R+j,S.colSpan=E,S.rowSpan=R,{colSpan:E,rowSpan:R}});return v((s=(u=g[0])==null?void 0:u.headers)!=null?s:[]),g}const JE=(t,l,r,i,s,u,f)=>{let h={id:l,index:i,original:r,depth:s,parentId:f,_valuesCache:{},_uniqueValuesCache:{},getValue:g=>{if(h._valuesCache.hasOwnProperty(g))return h._valuesCache[g];const p=t.getColumn(g);if(p!=null&&p.accessorFn)return h._valuesCache[g]=p.accessorFn(h.original,i),h._valuesCache[g]},getUniqueValues:g=>{if(h._uniqueValuesCache.hasOwnProperty(g))return h._uniqueValuesCache[g];const p=t.getColumn(g);if(p!=null&&p.accessorFn)return p.columnDef.getUniqueValues?(h._uniqueValuesCache[g]=p.columnDef.getUniqueValues(h.original,i),h._uniqueValuesCache[g]):(h._uniqueValuesCache[g]=[h.getValue(g)],h._uniqueValuesCache[g])},renderValue:g=>{var p;return(p=h.getValue(g))!=null?p:t.options.renderFallbackValue},subRows:[],getLeafRows:()=>XE(h.subRows,g=>g.subRows),getParentRow:()=>h.parentId?t.getRow(h.parentId,!0):void 0,getParentRows:()=>{let g=[],p=h;for(;;){const y=p.getParentRow();if(!y)break;g.push(y),p=y}return g.reverse()},getAllCells:Se(()=>[t.getAllLeafColumns()],g=>g.map(p=>KE(t,h,p,p.id)),Ee(t.options,"debugRows")),_getAllCellsByColumnId:Se(()=>[h.getAllCells()],g=>g.reduce((p,y)=>(p[y.column.id]=y,p),{}),Ee(t.options,"debugRows"))};for(let g=0;g<t._features.length;g++){const p=t._features[g];p==null||p.createRow==null||p.createRow(h,t)}return h},WE={createColumn:(t,l)=>{t._getFacetedRowModel=l.options.getFacetedRowModel&&l.options.getFacetedRowModel(l,t.id),t.getFacetedRowModel=()=>t._getFacetedRowModel?t._getFacetedRowModel():l.getPreFilteredRowModel(),t._getFacetedUniqueValues=l.options.getFacetedUniqueValues&&l.options.getFacetedUniqueValues(l,t.id),t.getFacetedUniqueValues=()=>t._getFacetedUniqueValues?t._getFacetedUniqueValues():new Map,t._getFacetedMinMaxValues=l.options.getFacetedMinMaxValues&&l.options.getFacetedMinMaxValues(l,t.id),t.getFacetedMinMaxValues=()=>{if(t._getFacetedMinMaxValues)return t._getFacetedMinMaxValues()}}},a0=(t,l,r)=>{var i,s;const u=r==null||(i=r.toString())==null?void 0:i.toLowerCase();return!!(!((s=t.getValue(l))==null||(s=s.toString())==null||(s=s.toLowerCase())==null)&&s.includes(u))};a0.autoRemove=t=>Hn(t);const l0=(t,l,r)=>{var i;return!!(!((i=t.getValue(l))==null||(i=i.toString())==null)&&i.includes(r))};l0.autoRemove=t=>Hn(t);const r0=(t,l,r)=>{var i;return((i=t.getValue(l))==null||(i=i.toString())==null?void 0:i.toLowerCase())===(r==null?void 0:r.toLowerCase())};r0.autoRemove=t=>Hn(t);const i0=(t,l,r)=>{var i;return(i=t.getValue(l))==null?void 0:i.includes(r)};i0.autoRemove=t=>Hn(t);const o0=(t,l,r)=>!r.some(i=>{var s;return!((s=t.getValue(l))!=null&&s.includes(i))});o0.autoRemove=t=>Hn(t)||!(t!=null&&t.length);const s0=(t,l,r)=>r.some(i=>{var s;return(s=t.getValue(l))==null?void 0:s.includes(i)});s0.autoRemove=t=>Hn(t)||!(t!=null&&t.length);const u0=(t,l,r)=>t.getValue(l)===r;u0.autoRemove=t=>Hn(t);const c0=(t,l,r)=>t.getValue(l)==r;c0.autoRemove=t=>Hn(t);const Sf=(t,l,r)=>{let[i,s]=r;const u=t.getValue(l);return u>=i&&u<=s};Sf.resolveFilterValue=t=>{let[l,r]=t,i=typeof l!="number"?parseFloat(l):l,s=typeof r!="number"?parseFloat(r):r,u=l===null||Number.isNaN(i)?-1/0:i,f=r===null||Number.isNaN(s)?1/0:s;if(u>f){const h=u;u=f,f=h}return[u,f]};Sf.autoRemove=t=>Hn(t)||Hn(t[0])&&Hn(t[1]);const Na={includesString:a0,includesStringSensitive:l0,equalsString:r0,arrIncludes:i0,arrIncludesAll:o0,arrIncludesSome:s0,equals:u0,weakEquals:c0,inNumberRange:Sf};function Hn(t){return t==null||t===""}const eC={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:t=>({columnFilters:[],...t}),getDefaultOptions:t=>({onColumnFiltersChange:fn("columnFilters",t),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(t,l)=>{t.getAutoFilterFn=()=>{const r=l.getCoreRowModel().flatRows[0],i=r==null?void 0:r.getValue(t.id);return typeof i=="string"?Na.includesString:typeof i=="number"?Na.inNumberRange:typeof i=="boolean"||i!==null&&typeof i=="object"?Na.equals:Array.isArray(i)?Na.arrIncludes:Na.weakEquals},t.getFilterFn=()=>{var r,i;return Ps(t.columnDef.filterFn)?t.columnDef.filterFn:t.columnDef.filterFn==="auto"?t.getAutoFilterFn():(r=(i=l.options.filterFns)==null?void 0:i[t.columnDef.filterFn])!=null?r:Na[t.columnDef.filterFn]},t.getCanFilter=()=>{var r,i,s;return((r=t.columnDef.enableColumnFilter)!=null?r:!0)&&((i=l.options.enableColumnFilters)!=null?i:!0)&&((s=l.options.enableFilters)!=null?s:!0)&&!!t.accessorFn},t.getIsFiltered=()=>t.getFilterIndex()>-1,t.getFilterValue=()=>{var r;return(r=l.getState().columnFilters)==null||(r=r.find(i=>i.id===t.id))==null?void 0:r.value},t.getFilterIndex=()=>{var r,i;return(r=(i=l.getState().columnFilters)==null?void 0:i.findIndex(s=>s.id===t.id))!=null?r:-1},t.setFilterValue=r=>{l.setColumnFilters(i=>{const s=t.getFilterFn(),u=i==null?void 0:i.find(y=>y.id===t.id),f=rl(r,u?u.value:void 0);if(uv(s,f,t)){var h;return(h=i==null?void 0:i.filter(y=>y.id!==t.id))!=null?h:[]}const g={id:t.id,value:f};if(u){var p;return(p=i==null?void 0:i.map(y=>y.id===t.id?g:y))!=null?p:[]}return i!=null&&i.length?[...i,g]:[g]})}},createRow:(t,l)=>{t.columnFilters={},t.columnFiltersMeta={}},createTable:t=>{t.setColumnFilters=l=>{const r=t.getAllLeafColumns(),i=s=>{var u;return(u=rl(l,s))==null?void 0:u.filter(f=>{const h=r.find(g=>g.id===f.id);if(h){const g=h.getFilterFn();if(uv(g,f.value,h))return!1}return!0})};t.options.onColumnFiltersChange==null||t.options.onColumnFiltersChange(i)},t.resetColumnFilters=l=>{var r,i;t.setColumnFilters(l?[]:(r=(i=t.initialState)==null?void 0:i.columnFilters)!=null?r:[])},t.getPreFilteredRowModel=()=>t.getCoreRowModel(),t.getFilteredRowModel=()=>(!t._getFilteredRowModel&&t.options.getFilteredRowModel&&(t._getFilteredRowModel=t.options.getFilteredRowModel(t)),t.options.manualFiltering||!t._getFilteredRowModel?t.getPreFilteredRowModel():t._getFilteredRowModel())}};function uv(t,l,r){return(t&&t.autoRemove?t.autoRemove(l,r):!1)||typeof l>"u"||typeof l=="string"&&!l}const tC=(t,l,r)=>r.reduce((i,s)=>{const u=s.getValue(t);return i+(typeof u=="number"?u:0)},0),nC=(t,l,r)=>{let i;return r.forEach(s=>{const u=s.getValue(t);u!=null&&(i>u||i===void 0&&u>=u)&&(i=u)}),i},aC=(t,l,r)=>{let i;return r.forEach(s=>{const u=s.getValue(t);u!=null&&(i<u||i===void 0&&u>=u)&&(i=u)}),i},lC=(t,l,r)=>{let i,s;return r.forEach(u=>{const f=u.getValue(t);f!=null&&(i===void 0?f>=f&&(i=s=f):(i>f&&(i=f),s<f&&(s=f)))}),[i,s]},rC=(t,l)=>{let r=0,i=0;if(l.forEach(s=>{let u=s.getValue(t);u!=null&&(u=+u)>=u&&(++r,i+=u)}),r)return i/r},iC=(t,l)=>{if(!l.length)return;const r=l.map(u=>u.getValue(t));if(!YE(r))return;if(r.length===1)return r[0];const i=Math.floor(r.length/2),s=r.sort((u,f)=>u-f);return r.length%2!==0?s[i]:(s[i-1]+s[i])/2},oC=(t,l)=>Array.from(new Set(l.map(r=>r.getValue(t))).values()),sC=(t,l)=>new Set(l.map(r=>r.getValue(t))).size,uC=(t,l)=>l.length,Sd={sum:tC,min:nC,max:aC,extent:lC,mean:rC,median:iC,unique:oC,uniqueCount:sC,count:uC},cC={getDefaultColumnDef:()=>({aggregatedCell:t=>{var l,r;return(l=(r=t.getValue())==null||r.toString==null?void 0:r.toString())!=null?l:null},aggregationFn:"auto"}),getInitialState:t=>({grouping:[],...t}),getDefaultOptions:t=>({onGroupingChange:fn("grouping",t),groupedColumnMode:"reorder"}),createColumn:(t,l)=>{t.toggleGrouping=()=>{l.setGrouping(r=>r!=null&&r.includes(t.id)?r.filter(i=>i!==t.id):[...r??[],t.id])},t.getCanGroup=()=>{var r,i;return((r=t.columnDef.enableGrouping)!=null?r:!0)&&((i=l.options.enableGrouping)!=null?i:!0)&&(!!t.accessorFn||!!t.columnDef.getGroupingValue)},t.getIsGrouped=()=>{var r;return(r=l.getState().grouping)==null?void 0:r.includes(t.id)},t.getGroupedIndex=()=>{var r;return(r=l.getState().grouping)==null?void 0:r.indexOf(t.id)},t.getToggleGroupingHandler=()=>{const r=t.getCanGroup();return()=>{r&&t.toggleGrouping()}},t.getAutoAggregationFn=()=>{const r=l.getCoreRowModel().flatRows[0],i=r==null?void 0:r.getValue(t.id);if(typeof i=="number")return Sd.sum;if(Object.prototype.toString.call(i)==="[object Date]")return Sd.extent},t.getAggregationFn=()=>{var r,i;if(!t)throw new Error;return Ps(t.columnDef.aggregationFn)?t.columnDef.aggregationFn:t.columnDef.aggregationFn==="auto"?t.getAutoAggregationFn():(r=(i=l.options.aggregationFns)==null?void 0:i[t.columnDef.aggregationFn])!=null?r:Sd[t.columnDef.aggregationFn]}},createTable:t=>{t.setGrouping=l=>t.options.onGroupingChange==null?void 0:t.options.onGroupingChange(l),t.resetGrouping=l=>{var r,i;t.setGrouping(l?[]:(r=(i=t.initialState)==null?void 0:i.grouping)!=null?r:[])},t.getPreGroupedRowModel=()=>t.getFilteredRowModel(),t.getGroupedRowModel=()=>(!t._getGroupedRowModel&&t.options.getGroupedRowModel&&(t._getGroupedRowModel=t.options.getGroupedRowModel(t)),t.options.manualGrouping||!t._getGroupedRowModel?t.getPreGroupedRowModel():t._getGroupedRowModel())},createRow:(t,l)=>{t.getIsGrouped=()=>!!t.groupingColumnId,t.getGroupingValue=r=>{if(t._groupingValuesCache.hasOwnProperty(r))return t._groupingValuesCache[r];const i=l.getColumn(r);return i!=null&&i.columnDef.getGroupingValue?(t._groupingValuesCache[r]=i.columnDef.getGroupingValue(t.original),t._groupingValuesCache[r]):t.getValue(r)},t._groupingValuesCache={}},createCell:(t,l,r,i)=>{t.getIsGrouped=()=>l.getIsGrouped()&&l.id===r.groupingColumnId,t.getIsPlaceholder=()=>!t.getIsGrouped()&&l.getIsGrouped(),t.getIsAggregated=()=>{var s;return!t.getIsGrouped()&&!t.getIsPlaceholder()&&!!((s=r.subRows)!=null&&s.length)}}};function dC(t,l,r){if(!(l!=null&&l.length)||!r)return t;const i=t.filter(u=>!l.includes(u.id));return r==="remove"?i:[...l.map(u=>t.find(f=>f.id===u)).filter(Boolean),...i]}const fC={getInitialState:t=>({columnOrder:[],...t}),getDefaultOptions:t=>({onColumnOrderChange:fn("columnOrder",t)}),createColumn:(t,l)=>{t.getIndex=Se(r=>[Hi(l,r)],r=>r.findIndex(i=>i.id===t.id),Ee(l.options,"debugColumns")),t.getIsFirstColumn=r=>{var i;return((i=Hi(l,r)[0])==null?void 0:i.id)===t.id},t.getIsLastColumn=r=>{var i;const s=Hi(l,r);return((i=s[s.length-1])==null?void 0:i.id)===t.id}},createTable:t=>{t.setColumnOrder=l=>t.options.onColumnOrderChange==null?void 0:t.options.onColumnOrderChange(l),t.resetColumnOrder=l=>{var r;t.setColumnOrder(l?[]:(r=t.initialState.columnOrder)!=null?r:[])},t._getOrderColumnsFn=Se(()=>[t.getState().columnOrder,t.getState().grouping,t.options.groupedColumnMode],(l,r,i)=>s=>{let u=[];if(!(l!=null&&l.length))u=s;else{const f=[...l],h=[...s];for(;h.length&&f.length;){const g=f.shift(),p=h.findIndex(y=>y.id===g);p>-1&&u.push(h.splice(p,1)[0])}u=[...u,...h]}return dC(u,r,i)},Ee(t.options,"debugTable"))}},Ed=()=>({left:[],right:[]}),mC={getInitialState:t=>({columnPinning:Ed(),...t}),getDefaultOptions:t=>({onColumnPinningChange:fn("columnPinning",t)}),createColumn:(t,l)=>{t.pin=r=>{const i=t.getLeafColumns().map(s=>s.id).filter(Boolean);l.setColumnPinning(s=>{var u,f;if(r==="right"){var h,g;return{left:((h=s==null?void 0:s.left)!=null?h:[]).filter(v=>!(i!=null&&i.includes(v))),right:[...((g=s==null?void 0:s.right)!=null?g:[]).filter(v=>!(i!=null&&i.includes(v))),...i]}}if(r==="left"){var p,y;return{left:[...((p=s==null?void 0:s.left)!=null?p:[]).filter(v=>!(i!=null&&i.includes(v))),...i],right:((y=s==null?void 0:s.right)!=null?y:[]).filter(v=>!(i!=null&&i.includes(v)))}}return{left:((u=s==null?void 0:s.left)!=null?u:[]).filter(v=>!(i!=null&&i.includes(v))),right:((f=s==null?void 0:s.right)!=null?f:[]).filter(v=>!(i!=null&&i.includes(v)))}})},t.getCanPin=()=>t.getLeafColumns().some(i=>{var s,u,f;return((s=i.columnDef.enablePinning)!=null?s:!0)&&((u=(f=l.options.enableColumnPinning)!=null?f:l.options.enablePinning)!=null?u:!0)}),t.getIsPinned=()=>{const r=t.getLeafColumns().map(h=>h.id),{left:i,right:s}=l.getState().columnPinning,u=r.some(h=>i==null?void 0:i.includes(h)),f=r.some(h=>s==null?void 0:s.includes(h));return u?"left":f?"right":!1},t.getPinnedIndex=()=>{var r,i;const s=t.getIsPinned();return s?(r=(i=l.getState().columnPinning)==null||(i=i[s])==null?void 0:i.indexOf(t.id))!=null?r:-1:0}},createRow:(t,l)=>{t.getCenterVisibleCells=Se(()=>[t._getAllVisibleCells(),l.getState().columnPinning.left,l.getState().columnPinning.right],(r,i,s)=>{const u=[...i??[],...s??[]];return r.filter(f=>!u.includes(f.column.id))},Ee(l.options,"debugRows")),t.getLeftVisibleCells=Se(()=>[t._getAllVisibleCells(),l.getState().columnPinning.left],(r,i)=>(i??[]).map(u=>r.find(f=>f.column.id===u)).filter(Boolean).map(u=>({...u,position:"left"})),Ee(l.options,"debugRows")),t.getRightVisibleCells=Se(()=>[t._getAllVisibleCells(),l.getState().columnPinning.right],(r,i)=>(i??[]).map(u=>r.find(f=>f.column.id===u)).filter(Boolean).map(u=>({...u,position:"right"})),Ee(l.options,"debugRows"))},createTable:t=>{t.setColumnPinning=l=>t.options.onColumnPinningChange==null?void 0:t.options.onColumnPinningChange(l),t.resetColumnPinning=l=>{var r,i;return t.setColumnPinning(l?Ed():(r=(i=t.initialState)==null?void 0:i.columnPinning)!=null?r:Ed())},t.getIsSomeColumnsPinned=l=>{var r;const i=t.getState().columnPinning;if(!l){var s,u;return!!((s=i.left)!=null&&s.length||(u=i.right)!=null&&u.length)}return!!((r=i[l])!=null&&r.length)},t.getLeftLeafColumns=Se(()=>[t.getAllLeafColumns(),t.getState().columnPinning.left],(l,r)=>(r??[]).map(i=>l.find(s=>s.id===i)).filter(Boolean),Ee(t.options,"debugColumns")),t.getRightLeafColumns=Se(()=>[t.getAllLeafColumns(),t.getState().columnPinning.right],(l,r)=>(r??[]).map(i=>l.find(s=>s.id===i)).filter(Boolean),Ee(t.options,"debugColumns")),t.getCenterLeafColumns=Se(()=>[t.getAllLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(l,r,i)=>{const s=[...r??[],...i??[]];return l.filter(u=>!s.includes(u.id))},Ee(t.options,"debugColumns"))}};function hC(t){return t||(typeof document<"u"?document:null)}const xs={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Cd=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),gC={getDefaultColumnDef:()=>xs,getInitialState:t=>({columnSizing:{},columnSizingInfo:Cd(),...t}),getDefaultOptions:t=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:fn("columnSizing",t),onColumnSizingInfoChange:fn("columnSizingInfo",t)}),createColumn:(t,l)=>{t.getSize=()=>{var r,i,s;const u=l.getState().columnSizing[t.id];return Math.min(Math.max((r=t.columnDef.minSize)!=null?r:xs.minSize,(i=u??t.columnDef.size)!=null?i:xs.size),(s=t.columnDef.maxSize)!=null?s:xs.maxSize)},t.getStart=Se(r=>[r,Hi(l,r),l.getState().columnSizing],(r,i)=>i.slice(0,t.getIndex(r)).reduce((s,u)=>s+u.getSize(),0),Ee(l.options,"debugColumns")),t.getAfter=Se(r=>[r,Hi(l,r),l.getState().columnSizing],(r,i)=>i.slice(t.getIndex(r)+1).reduce((s,u)=>s+u.getSize(),0),Ee(l.options,"debugColumns")),t.resetSize=()=>{l.setColumnSizing(r=>{let{[t.id]:i,...s}=r;return s})},t.getCanResize=()=>{var r,i;return((r=t.columnDef.enableResizing)!=null?r:!0)&&((i=l.options.enableColumnResizing)!=null?i:!0)},t.getIsResizing=()=>l.getState().columnSizingInfo.isResizingColumn===t.id},createHeader:(t,l)=>{t.getSize=()=>{let r=0;const i=s=>{if(s.subHeaders.length)s.subHeaders.forEach(i);else{var u;r+=(u=s.column.getSize())!=null?u:0}};return i(t),r},t.getStart=()=>{if(t.index>0){const r=t.headerGroup.headers[t.index-1];return r.getStart()+r.getSize()}return 0},t.getResizeHandler=r=>{const i=l.getColumn(t.column.id),s=i==null?void 0:i.getCanResize();return u=>{if(!i||!s||(u.persist==null||u.persist(),Rd(u)&&u.touches&&u.touches.length>1))return;const f=t.getSize(),h=t?t.getLeafHeaders().map(_=>[_.column.id,_.column.getSize()]):[[i.id,i.getSize()]],g=Rd(u)?Math.round(u.touches[0].clientX):u.clientX,p={},y=(_,j)=>{typeof j=="number"&&(l.setColumnSizingInfo(A=>{var L,M;const K=l.options.columnResizeDirection==="rtl"?-1:1,X=(j-((L=A==null?void 0:A.startOffset)!=null?L:0))*K,U=Math.max(X/((M=A==null?void 0:A.startSize)!=null?M:0),-.999999);return A.columnSizingStart.forEach(le=>{let[ye,q]=le;p[ye]=Math.round(Math.max(q+q*U,0)*100)/100}),{...A,deltaOffset:X,deltaPercentage:U}}),(l.options.columnResizeMode==="onChange"||_==="end")&&l.setColumnSizing(A=>({...A,...p})))},v=_=>y("move",_),C=_=>{y("end",_),l.setColumnSizingInfo(j=>({...j,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},x=hC(r),S={moveHandler:_=>v(_.clientX),upHandler:_=>{x==null||x.removeEventListener("mousemove",S.moveHandler),x==null||x.removeEventListener("mouseup",S.upHandler),C(_.clientX)}},E={moveHandler:_=>(_.cancelable&&(_.preventDefault(),_.stopPropagation()),v(_.touches[0].clientX),!1),upHandler:_=>{var j;x==null||x.removeEventListener("touchmove",E.moveHandler),x==null||x.removeEventListener("touchend",E.upHandler),_.cancelable&&(_.preventDefault(),_.stopPropagation()),C((j=_.touches[0])==null?void 0:j.clientX)}},R=pC()?{passive:!1}:!1;Rd(u)?(x==null||x.addEventListener("touchmove",E.moveHandler,R),x==null||x.addEventListener("touchend",E.upHandler,R)):(x==null||x.addEventListener("mousemove",S.moveHandler,R),x==null||x.addEventListener("mouseup",S.upHandler,R)),l.setColumnSizingInfo(_=>({..._,startOffset:g,startSize:f,deltaOffset:0,deltaPercentage:0,columnSizingStart:h,isResizingColumn:i.id}))}}},createTable:t=>{t.setColumnSizing=l=>t.options.onColumnSizingChange==null?void 0:t.options.onColumnSizingChange(l),t.setColumnSizingInfo=l=>t.options.onColumnSizingInfoChange==null?void 0:t.options.onColumnSizingInfoChange(l),t.resetColumnSizing=l=>{var r;t.setColumnSizing(l?{}:(r=t.initialState.columnSizing)!=null?r:{})},t.resetHeaderSizeInfo=l=>{var r;t.setColumnSizingInfo(l?Cd():(r=t.initialState.columnSizingInfo)!=null?r:Cd())},t.getTotalSize=()=>{var l,r;return(l=(r=t.getHeaderGroups()[0])==null?void 0:r.headers.reduce((i,s)=>i+s.getSize(),0))!=null?l:0},t.getLeftTotalSize=()=>{var l,r;return(l=(r=t.getLeftHeaderGroups()[0])==null?void 0:r.headers.reduce((i,s)=>i+s.getSize(),0))!=null?l:0},t.getCenterTotalSize=()=>{var l,r;return(l=(r=t.getCenterHeaderGroups()[0])==null?void 0:r.headers.reduce((i,s)=>i+s.getSize(),0))!=null?l:0},t.getRightTotalSize=()=>{var l,r;return(l=(r=t.getRightHeaderGroups()[0])==null?void 0:r.headers.reduce((i,s)=>i+s.getSize(),0))!=null?l:0}}};let ws=null;function pC(){if(typeof ws=="boolean")return ws;let t=!1;try{const l={get passive(){return t=!0,!1}},r=()=>{};window.addEventListener("test",r,l),window.removeEventListener("test",r)}catch{t=!1}return ws=t,ws}function Rd(t){return t.type==="touchstart"}const vC={getInitialState:t=>({columnVisibility:{},...t}),getDefaultOptions:t=>({onColumnVisibilityChange:fn("columnVisibility",t)}),createColumn:(t,l)=>{t.toggleVisibility=r=>{t.getCanHide()&&l.setColumnVisibility(i=>({...i,[t.id]:r??!t.getIsVisible()}))},t.getIsVisible=()=>{var r,i;const s=t.columns;return(r=s.length?s.some(u=>u.getIsVisible()):(i=l.getState().columnVisibility)==null?void 0:i[t.id])!=null?r:!0},t.getCanHide=()=>{var r,i;return((r=t.columnDef.enableHiding)!=null?r:!0)&&((i=l.options.enableHiding)!=null?i:!0)},t.getToggleVisibilityHandler=()=>r=>{t.toggleVisibility==null||t.toggleVisibility(r.target.checked)}},createRow:(t,l)=>{t._getAllVisibleCells=Se(()=>[t.getAllCells(),l.getState().columnVisibility],r=>r.filter(i=>i.column.getIsVisible()),Ee(l.options,"debugRows")),t.getVisibleCells=Se(()=>[t.getLeftVisibleCells(),t.getCenterVisibleCells(),t.getRightVisibleCells()],(r,i,s)=>[...r,...i,...s],Ee(l.options,"debugRows"))},createTable:t=>{const l=(r,i)=>Se(()=>[i(),i().filter(s=>s.getIsVisible()).map(s=>s.id).join("_")],s=>s.filter(u=>u.getIsVisible==null?void 0:u.getIsVisible()),Ee(t.options,"debugColumns"));t.getVisibleFlatColumns=l("getVisibleFlatColumns",()=>t.getAllFlatColumns()),t.getVisibleLeafColumns=l("getVisibleLeafColumns",()=>t.getAllLeafColumns()),t.getLeftVisibleLeafColumns=l("getLeftVisibleLeafColumns",()=>t.getLeftLeafColumns()),t.getRightVisibleLeafColumns=l("getRightVisibleLeafColumns",()=>t.getRightLeafColumns()),t.getCenterVisibleLeafColumns=l("getCenterVisibleLeafColumns",()=>t.getCenterLeafColumns()),t.setColumnVisibility=r=>t.options.onColumnVisibilityChange==null?void 0:t.options.onColumnVisibilityChange(r),t.resetColumnVisibility=r=>{var i;t.setColumnVisibility(r?{}:(i=t.initialState.columnVisibility)!=null?i:{})},t.toggleAllColumnsVisible=r=>{var i;r=(i=r)!=null?i:!t.getIsAllColumnsVisible(),t.setColumnVisibility(t.getAllLeafColumns().reduce((s,u)=>({...s,[u.id]:r||!(u.getCanHide!=null&&u.getCanHide())}),{}))},t.getIsAllColumnsVisible=()=>!t.getAllLeafColumns().some(r=>!(r.getIsVisible!=null&&r.getIsVisible())),t.getIsSomeColumnsVisible=()=>t.getAllLeafColumns().some(r=>r.getIsVisible==null?void 0:r.getIsVisible()),t.getToggleAllColumnsVisibilityHandler=()=>r=>{var i;t.toggleAllColumnsVisible((i=r.target)==null?void 0:i.checked)}}};function Hi(t,l){return l?l==="center"?t.getCenterVisibleLeafColumns():l==="left"?t.getLeftVisibleLeafColumns():t.getRightVisibleLeafColumns():t.getVisibleLeafColumns()}const yC={createTable:t=>{t._getGlobalFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,"__global__"),t.getGlobalFacetedRowModel=()=>t.options.manualFiltering||!t._getGlobalFacetedRowModel?t.getPreFilteredRowModel():t._getGlobalFacetedRowModel(),t._getGlobalFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,"__global__"),t.getGlobalFacetedUniqueValues=()=>t._getGlobalFacetedUniqueValues?t._getGlobalFacetedUniqueValues():new Map,t._getGlobalFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,"__global__"),t.getGlobalFacetedMinMaxValues=()=>{if(t._getGlobalFacetedMinMaxValues)return t._getGlobalFacetedMinMaxValues()}}},bC={getInitialState:t=>({globalFilter:void 0,...t}),getDefaultOptions:t=>({onGlobalFilterChange:fn("globalFilter",t),globalFilterFn:"auto",getColumnCanGlobalFilter:l=>{var r;const i=(r=t.getCoreRowModel().flatRows[0])==null||(r=r._getAllCellsByColumnId()[l.id])==null?void 0:r.getValue();return typeof i=="string"||typeof i=="number"}}),createColumn:(t,l)=>{t.getCanGlobalFilter=()=>{var r,i,s,u;return((r=t.columnDef.enableGlobalFilter)!=null?r:!0)&&((i=l.options.enableGlobalFilter)!=null?i:!0)&&((s=l.options.enableFilters)!=null?s:!0)&&((u=l.options.getColumnCanGlobalFilter==null?void 0:l.options.getColumnCanGlobalFilter(t))!=null?u:!0)&&!!t.accessorFn}},createTable:t=>{t.getGlobalAutoFilterFn=()=>Na.includesString,t.getGlobalFilterFn=()=>{var l,r;const{globalFilterFn:i}=t.options;return Ps(i)?i:i==="auto"?t.getGlobalAutoFilterFn():(l=(r=t.options.filterFns)==null?void 0:r[i])!=null?l:Na[i]},t.setGlobalFilter=l=>{t.options.onGlobalFilterChange==null||t.options.onGlobalFilterChange(l)},t.resetGlobalFilter=l=>{t.setGlobalFilter(l?void 0:t.initialState.globalFilter)}}},xC={getInitialState:t=>({expanded:{},...t}),getDefaultOptions:t=>({onExpandedChange:fn("expanded",t),paginateExpandedRows:!0}),createTable:t=>{let l=!1,r=!1;t._autoResetExpanded=()=>{var i,s;if(!l){t._queue(()=>{l=!0});return}if((i=(s=t.options.autoResetAll)!=null?s:t.options.autoResetExpanded)!=null?i:!t.options.manualExpanding){if(r)return;r=!0,t._queue(()=>{t.resetExpanded(),r=!1})}},t.setExpanded=i=>t.options.onExpandedChange==null?void 0:t.options.onExpandedChange(i),t.toggleAllRowsExpanded=i=>{i??!t.getIsAllRowsExpanded()?t.setExpanded(!0):t.setExpanded({})},t.resetExpanded=i=>{var s,u;t.setExpanded(i?{}:(s=(u=t.initialState)==null?void 0:u.expanded)!=null?s:{})},t.getCanSomeRowsExpand=()=>t.getPrePaginationRowModel().flatRows.some(i=>i.getCanExpand()),t.getToggleAllRowsExpandedHandler=()=>i=>{i.persist==null||i.persist(),t.toggleAllRowsExpanded()},t.getIsSomeRowsExpanded=()=>{const i=t.getState().expanded;return i===!0||Object.values(i).some(Boolean)},t.getIsAllRowsExpanded=()=>{const i=t.getState().expanded;return typeof i=="boolean"?i===!0:!(!Object.keys(i).length||t.getRowModel().flatRows.some(s=>!s.getIsExpanded()))},t.getExpandedDepth=()=>{let i=0;return(t.getState().expanded===!0?Object.keys(t.getRowModel().rowsById):Object.keys(t.getState().expanded)).forEach(u=>{const f=u.split(".");i=Math.max(i,f.length)}),i},t.getPreExpandedRowModel=()=>t.getSortedRowModel(),t.getExpandedRowModel=()=>(!t._getExpandedRowModel&&t.options.getExpandedRowModel&&(t._getExpandedRowModel=t.options.getExpandedRowModel(t)),t.options.manualExpanding||!t._getExpandedRowModel?t.getPreExpandedRowModel():t._getExpandedRowModel())},createRow:(t,l)=>{t.toggleExpanded=r=>{l.setExpanded(i=>{var s;const u=i===!0?!0:!!(i!=null&&i[t.id]);let f={};if(i===!0?Object.keys(l.getRowModel().rowsById).forEach(h=>{f[h]=!0}):f=i,r=(s=r)!=null?s:!u,!u&&r)return{...f,[t.id]:!0};if(u&&!r){const{[t.id]:h,...g}=f;return g}return i})},t.getIsExpanded=()=>{var r;const i=l.getState().expanded;return!!((r=l.options.getIsRowExpanded==null?void 0:l.options.getIsRowExpanded(t))!=null?r:i===!0||i!=null&&i[t.id])},t.getCanExpand=()=>{var r,i,s;return(r=l.options.getRowCanExpand==null?void 0:l.options.getRowCanExpand(t))!=null?r:((i=l.options.enableExpanding)!=null?i:!0)&&!!((s=t.subRows)!=null&&s.length)},t.getIsAllParentsExpanded=()=>{let r=!0,i=t;for(;r&&i.parentId;)i=l.getRow(i.parentId,!0),r=i.getIsExpanded();return r},t.getToggleExpandedHandler=()=>{const r=t.getCanExpand();return()=>{r&&t.toggleExpanded()}}}},Yd=0,Xd=10,Nd=()=>({pageIndex:Yd,pageSize:Xd}),wC={getInitialState:t=>({...t,pagination:{...Nd(),...t==null?void 0:t.pagination}}),getDefaultOptions:t=>({onPaginationChange:fn("pagination",t)}),createTable:t=>{let l=!1,r=!1;t._autoResetPageIndex=()=>{var i,s;if(!l){t._queue(()=>{l=!0});return}if((i=(s=t.options.autoResetAll)!=null?s:t.options.autoResetPageIndex)!=null?i:!t.options.manualPagination){if(r)return;r=!0,t._queue(()=>{t.resetPageIndex(),r=!1})}},t.setPagination=i=>{const s=u=>rl(i,u);return t.options.onPaginationChange==null?void 0:t.options.onPaginationChange(s)},t.resetPagination=i=>{var s;t.setPagination(i?Nd():(s=t.initialState.pagination)!=null?s:Nd())},t.setPageIndex=i=>{t.setPagination(s=>{let u=rl(i,s.pageIndex);const f=typeof t.options.pageCount>"u"||t.options.pageCount===-1?Number.MAX_SAFE_INTEGER:t.options.pageCount-1;return u=Math.max(0,Math.min(u,f)),{...s,pageIndex:u}})},t.resetPageIndex=i=>{var s,u;t.setPageIndex(i?Yd:(s=(u=t.initialState)==null||(u=u.pagination)==null?void 0:u.pageIndex)!=null?s:Yd)},t.resetPageSize=i=>{var s,u;t.setPageSize(i?Xd:(s=(u=t.initialState)==null||(u=u.pagination)==null?void 0:u.pageSize)!=null?s:Xd)},t.setPageSize=i=>{t.setPagination(s=>{const u=Math.max(1,rl(i,s.pageSize)),f=s.pageSize*s.pageIndex,h=Math.floor(f/u);return{...s,pageIndex:h,pageSize:u}})},t.setPageCount=i=>t.setPagination(s=>{var u;let f=rl(i,(u=t.options.pageCount)!=null?u:-1);return typeof f=="number"&&(f=Math.max(-1,f)),{...s,pageCount:f}}),t.getPageOptions=Se(()=>[t.getPageCount()],i=>{let s=[];return i&&i>0&&(s=[...new Array(i)].fill(null).map((u,f)=>f)),s},Ee(t.options,"debugTable")),t.getCanPreviousPage=()=>t.getState().pagination.pageIndex>0,t.getCanNextPage=()=>{const{pageIndex:i}=t.getState().pagination,s=t.getPageCount();return s===-1?!0:s===0?!1:i<s-1},t.previousPage=()=>t.setPageIndex(i=>i-1),t.nextPage=()=>t.setPageIndex(i=>i+1),t.firstPage=()=>t.setPageIndex(0),t.lastPage=()=>t.setPageIndex(t.getPageCount()-1),t.getPrePaginationRowModel=()=>t.getExpandedRowModel(),t.getPaginationRowModel=()=>(!t._getPaginationRowModel&&t.options.getPaginationRowModel&&(t._getPaginationRowModel=t.options.getPaginationRowModel(t)),t.options.manualPagination||!t._getPaginationRowModel?t.getPrePaginationRowModel():t._getPaginationRowModel()),t.getPageCount=()=>{var i;return(i=t.options.pageCount)!=null?i:Math.ceil(t.getRowCount()/t.getState().pagination.pageSize)},t.getRowCount=()=>{var i;return(i=t.options.rowCount)!=null?i:t.getPrePaginationRowModel().rows.length}}},_d=()=>({top:[],bottom:[]}),SC={getInitialState:t=>({rowPinning:_d(),...t}),getDefaultOptions:t=>({onRowPinningChange:fn("rowPinning",t)}),createRow:(t,l)=>{t.pin=(r,i,s)=>{const u=i?t.getLeafRows().map(g=>{let{id:p}=g;return p}):[],f=s?t.getParentRows().map(g=>{let{id:p}=g;return p}):[],h=new Set([...f,t.id,...u]);l.setRowPinning(g=>{var p,y;if(r==="bottom"){var v,C;return{top:((v=g==null?void 0:g.top)!=null?v:[]).filter(E=>!(h!=null&&h.has(E))),bottom:[...((C=g==null?void 0:g.bottom)!=null?C:[]).filter(E=>!(h!=null&&h.has(E))),...Array.from(h)]}}if(r==="top"){var x,S;return{top:[...((x=g==null?void 0:g.top)!=null?x:[]).filter(E=>!(h!=null&&h.has(E))),...Array.from(h)],bottom:((S=g==null?void 0:g.bottom)!=null?S:[]).filter(E=>!(h!=null&&h.has(E)))}}return{top:((p=g==null?void 0:g.top)!=null?p:[]).filter(E=>!(h!=null&&h.has(E))),bottom:((y=g==null?void 0:g.bottom)!=null?y:[]).filter(E=>!(h!=null&&h.has(E)))}})},t.getCanPin=()=>{var r;const{enableRowPinning:i,enablePinning:s}=l.options;return typeof i=="function"?i(t):(r=i??s)!=null?r:!0},t.getIsPinned=()=>{const r=[t.id],{top:i,bottom:s}=l.getState().rowPinning,u=r.some(h=>i==null?void 0:i.includes(h)),f=r.some(h=>s==null?void 0:s.includes(h));return u?"top":f?"bottom":!1},t.getPinnedIndex=()=>{var r,i;const s=t.getIsPinned();if(!s)return-1;const u=(r=s==="top"?l.getTopRows():l.getBottomRows())==null?void 0:r.map(f=>{let{id:h}=f;return h});return(i=u==null?void 0:u.indexOf(t.id))!=null?i:-1}},createTable:t=>{t.setRowPinning=l=>t.options.onRowPinningChange==null?void 0:t.options.onRowPinningChange(l),t.resetRowPinning=l=>{var r,i;return t.setRowPinning(l?_d():(r=(i=t.initialState)==null?void 0:i.rowPinning)!=null?r:_d())},t.getIsSomeRowsPinned=l=>{var r;const i=t.getState().rowPinning;if(!l){var s,u;return!!((s=i.top)!=null&&s.length||(u=i.bottom)!=null&&u.length)}return!!((r=i[l])!=null&&r.length)},t._getPinnedRows=(l,r,i)=>{var s;return((s=t.options.keepPinnedRows)==null||s?(r??[]).map(f=>{const h=t.getRow(f,!0);return h.getIsAllParentsExpanded()?h:null}):(r??[]).map(f=>l.find(h=>h.id===f))).filter(Boolean).map(f=>({...f,position:i}))},t.getTopRows=Se(()=>[t.getRowModel().rows,t.getState().rowPinning.top],(l,r)=>t._getPinnedRows(l,r,"top"),Ee(t.options,"debugRows")),t.getBottomRows=Se(()=>[t.getRowModel().rows,t.getState().rowPinning.bottom],(l,r)=>t._getPinnedRows(l,r,"bottom"),Ee(t.options,"debugRows")),t.getCenterRows=Se(()=>[t.getRowModel().rows,t.getState().rowPinning.top,t.getState().rowPinning.bottom],(l,r,i)=>{const s=new Set([...r??[],...i??[]]);return l.filter(u=>!s.has(u.id))},Ee(t.options,"debugRows"))}},EC={getInitialState:t=>({rowSelection:{},...t}),getDefaultOptions:t=>({onRowSelectionChange:fn("rowSelection",t),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:t=>{t.setRowSelection=l=>t.options.onRowSelectionChange==null?void 0:t.options.onRowSelectionChange(l),t.resetRowSelection=l=>{var r;return t.setRowSelection(l?{}:(r=t.initialState.rowSelection)!=null?r:{})},t.toggleAllRowsSelected=l=>{t.setRowSelection(r=>{l=typeof l<"u"?l:!t.getIsAllRowsSelected();const i={...r},s=t.getPreGroupedRowModel().flatRows;return l?s.forEach(u=>{u.getCanSelect()&&(i[u.id]=!0)}):s.forEach(u=>{delete i[u.id]}),i})},t.toggleAllPageRowsSelected=l=>t.setRowSelection(r=>{const i=typeof l<"u"?l:!t.getIsAllPageRowsSelected(),s={...r};return t.getRowModel().rows.forEach(u=>{Kd(s,u.id,i,!0,t)}),s}),t.getPreSelectedRowModel=()=>t.getCoreRowModel(),t.getSelectedRowModel=Se(()=>[t.getState().rowSelection,t.getCoreRowModel()],(l,r)=>Object.keys(l).length?Ad(t,r):{rows:[],flatRows:[],rowsById:{}},Ee(t.options,"debugTable")),t.getFilteredSelectedRowModel=Se(()=>[t.getState().rowSelection,t.getFilteredRowModel()],(l,r)=>Object.keys(l).length?Ad(t,r):{rows:[],flatRows:[],rowsById:{}},Ee(t.options,"debugTable")),t.getGroupedSelectedRowModel=Se(()=>[t.getState().rowSelection,t.getSortedRowModel()],(l,r)=>Object.keys(l).length?Ad(t,r):{rows:[],flatRows:[],rowsById:{}},Ee(t.options,"debugTable")),t.getIsAllRowsSelected=()=>{const l=t.getFilteredRowModel().flatRows,{rowSelection:r}=t.getState();let i=!!(l.length&&Object.keys(r).length);return i&&l.some(s=>s.getCanSelect()&&!r[s.id])&&(i=!1),i},t.getIsAllPageRowsSelected=()=>{const l=t.getPaginationRowModel().flatRows.filter(s=>s.getCanSelect()),{rowSelection:r}=t.getState();let i=!!l.length;return i&&l.some(s=>!r[s.id])&&(i=!1),i},t.getIsSomeRowsSelected=()=>{var l;const r=Object.keys((l=t.getState().rowSelection)!=null?l:{}).length;return r>0&&r<t.getFilteredRowModel().flatRows.length},t.getIsSomePageRowsSelected=()=>{const l=t.getPaginationRowModel().flatRows;return t.getIsAllPageRowsSelected()?!1:l.filter(r=>r.getCanSelect()).some(r=>r.getIsSelected()||r.getIsSomeSelected())},t.getToggleAllRowsSelectedHandler=()=>l=>{t.toggleAllRowsSelected(l.target.checked)},t.getToggleAllPageRowsSelectedHandler=()=>l=>{t.toggleAllPageRowsSelected(l.target.checked)}},createRow:(t,l)=>{t.toggleSelected=(r,i)=>{const s=t.getIsSelected();l.setRowSelection(u=>{var f;if(r=typeof r<"u"?r:!s,t.getCanSelect()&&s===r)return u;const h={...u};return Kd(h,t.id,r,(f=i==null?void 0:i.selectChildren)!=null?f:!0,l),h})},t.getIsSelected=()=>{const{rowSelection:r}=l.getState();return Ef(t,r)},t.getIsSomeSelected=()=>{const{rowSelection:r}=l.getState();return Qd(t,r)==="some"},t.getIsAllSubRowsSelected=()=>{const{rowSelection:r}=l.getState();return Qd(t,r)==="all"},t.getCanSelect=()=>{var r;return typeof l.options.enableRowSelection=="function"?l.options.enableRowSelection(t):(r=l.options.enableRowSelection)!=null?r:!0},t.getCanSelectSubRows=()=>{var r;return typeof l.options.enableSubRowSelection=="function"?l.options.enableSubRowSelection(t):(r=l.options.enableSubRowSelection)!=null?r:!0},t.getCanMultiSelect=()=>{var r;return typeof l.options.enableMultiRowSelection=="function"?l.options.enableMultiRowSelection(t):(r=l.options.enableMultiRowSelection)!=null?r:!0},t.getToggleSelectedHandler=()=>{const r=t.getCanSelect();return i=>{var s;r&&t.toggleSelected((s=i.target)==null?void 0:s.checked)}}}},Kd=(t,l,r,i,s)=>{var u;const f=s.getRow(l,!0);r?(f.getCanMultiSelect()||Object.keys(t).forEach(h=>delete t[h]),f.getCanSelect()&&(t[l]=!0)):delete t[l],i&&(u=f.subRows)!=null&&u.length&&f.getCanSelectSubRows()&&f.subRows.forEach(h=>Kd(t,h.id,r,i,s))};function Ad(t,l){const r=t.getState().rowSelection,i=[],s={},u=function(f,h){return f.map(g=>{var p;const y=Ef(g,r);if(y&&(i.push(g),s[g.id]=g),(p=g.subRows)!=null&&p.length&&(g={...g,subRows:u(g.subRows)}),y)return g}).filter(Boolean)};return{rows:u(l.rows),flatRows:i,rowsById:s}}function Ef(t,l){var r;return(r=l[t.id])!=null?r:!1}function Qd(t,l,r){var i;if(!((i=t.subRows)!=null&&i.length))return!1;let s=!0,u=!1;return t.subRows.forEach(f=>{if(!(u&&!s)&&(f.getCanSelect()&&(Ef(f,l)?u=!0:s=!1),f.subRows&&f.subRows.length)){const h=Qd(f,l);h==="all"?u=!0:(h==="some"&&(u=!0),s=!1)}}),s?"all":u?"some":!1}const Zd=/([0-9]+)/gm,CC=(t,l,r)=>d0(sl(t.getValue(r)).toLowerCase(),sl(l.getValue(r)).toLowerCase()),RC=(t,l,r)=>d0(sl(t.getValue(r)),sl(l.getValue(r))),NC=(t,l,r)=>Cf(sl(t.getValue(r)).toLowerCase(),sl(l.getValue(r)).toLowerCase()),_C=(t,l,r)=>Cf(sl(t.getValue(r)),sl(l.getValue(r))),AC=(t,l,r)=>{const i=t.getValue(r),s=l.getValue(r);return i>s?1:i<s?-1:0},jC=(t,l,r)=>Cf(t.getValue(r),l.getValue(r));function Cf(t,l){return t===l?0:t>l?1:-1}function sl(t){return typeof t=="number"?isNaN(t)||t===1/0||t===-1/0?"":String(t):typeof t=="string"?t:""}function d0(t,l){const r=t.split(Zd).filter(Boolean),i=l.split(Zd).filter(Boolean);for(;r.length&&i.length;){const s=r.shift(),u=i.shift(),f=parseInt(s,10),h=parseInt(u,10),g=[f,h].sort();if(isNaN(g[0])){if(s>u)return 1;if(u>s)return-1;continue}if(isNaN(g[1]))return isNaN(f)?-1:1;if(f>h)return 1;if(h>f)return-1}return r.length-i.length}const Oi={alphanumeric:CC,alphanumericCaseSensitive:RC,text:NC,textCaseSensitive:_C,datetime:AC,basic:jC},TC={getInitialState:t=>({sorting:[],...t}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:t=>({onSortingChange:fn("sorting",t),isMultiSortEvent:l=>l.shiftKey}),createColumn:(t,l)=>{t.getAutoSortingFn=()=>{const r=l.getFilteredRowModel().flatRows.slice(10);let i=!1;for(const s of r){const u=s==null?void 0:s.getValue(t.id);if(Object.prototype.toString.call(u)==="[object Date]")return Oi.datetime;if(typeof u=="string"&&(i=!0,u.split(Zd).length>1))return Oi.alphanumeric}return i?Oi.text:Oi.basic},t.getAutoSortDir=()=>{const r=l.getFilteredRowModel().flatRows[0];return typeof(r==null?void 0:r.getValue(t.id))=="string"?"asc":"desc"},t.getSortingFn=()=>{var r,i;if(!t)throw new Error;return Ps(t.columnDef.sortingFn)?t.columnDef.sortingFn:t.columnDef.sortingFn==="auto"?t.getAutoSortingFn():(r=(i=l.options.sortingFns)==null?void 0:i[t.columnDef.sortingFn])!=null?r:Oi[t.columnDef.sortingFn]},t.toggleSorting=(r,i)=>{const s=t.getNextSortingOrder(),u=typeof r<"u"&&r!==null;l.setSorting(f=>{const h=f==null?void 0:f.find(x=>x.id===t.id),g=f==null?void 0:f.findIndex(x=>x.id===t.id);let p=[],y,v=u?r:s==="desc";if(f!=null&&f.length&&t.getCanMultiSort()&&i?h?y="toggle":y="add":f!=null&&f.length&&g!==f.length-1?y="replace":h?y="toggle":y="replace",y==="toggle"&&(u||s||(y="remove")),y==="add"){var C;p=[...f,{id:t.id,desc:v}],p.splice(0,p.length-((C=l.options.maxMultiSortColCount)!=null?C:Number.MAX_SAFE_INTEGER))}else y==="toggle"?p=f.map(x=>x.id===t.id?{...x,desc:v}:x):y==="remove"?p=f.filter(x=>x.id!==t.id):p=[{id:t.id,desc:v}];return p})},t.getFirstSortDir=()=>{var r,i;return((r=(i=t.columnDef.sortDescFirst)!=null?i:l.options.sortDescFirst)!=null?r:t.getAutoSortDir()==="desc")?"desc":"asc"},t.getNextSortingOrder=r=>{var i,s;const u=t.getFirstSortDir(),f=t.getIsSorted();return f?f!==u&&((i=l.options.enableSortingRemoval)==null||i)&&(!(r&&(s=l.options.enableMultiRemove)!=null)||s)?!1:f==="desc"?"asc":"desc":u},t.getCanSort=()=>{var r,i;return((r=t.columnDef.enableSorting)!=null?r:!0)&&((i=l.options.enableSorting)!=null?i:!0)&&!!t.accessorFn},t.getCanMultiSort=()=>{var r,i;return(r=(i=t.columnDef.enableMultiSort)!=null?i:l.options.enableMultiSort)!=null?r:!!t.accessorFn},t.getIsSorted=()=>{var r;const i=(r=l.getState().sorting)==null?void 0:r.find(s=>s.id===t.id);return i?i.desc?"desc":"asc":!1},t.getSortIndex=()=>{var r,i;return(r=(i=l.getState().sorting)==null?void 0:i.findIndex(s=>s.id===t.id))!=null?r:-1},t.clearSorting=()=>{l.setSorting(r=>r!=null&&r.length?r.filter(i=>i.id!==t.id):[])},t.getToggleSortingHandler=()=>{const r=t.getCanSort();return i=>{r&&(i.persist==null||i.persist(),t.toggleSorting==null||t.toggleSorting(void 0,t.getCanMultiSort()?l.options.isMultiSortEvent==null?void 0:l.options.isMultiSortEvent(i):!1))}}},createTable:t=>{t.setSorting=l=>t.options.onSortingChange==null?void 0:t.options.onSortingChange(l),t.resetSorting=l=>{var r,i;t.setSorting(l?[]:(r=(i=t.initialState)==null?void 0:i.sorting)!=null?r:[])},t.getPreSortedRowModel=()=>t.getGroupedRowModel(),t.getSortedRowModel=()=>(!t._getSortedRowModel&&t.options.getSortedRowModel&&(t._getSortedRowModel=t.options.getSortedRowModel(t)),t.options.manualSorting||!t._getSortedRowModel?t.getPreSortedRowModel():t._getSortedRowModel())}},kC=[ZE,vC,fC,mC,WE,eC,yC,bC,TC,cC,xC,wC,SC,EC,gC];function DC(t){var l,r;const i=[...kC,...(l=t._features)!=null?l:[]];let s={_features:i};const u=s._features.reduce((C,x)=>Object.assign(C,x.getDefaultOptions==null?void 0:x.getDefaultOptions(s)),{}),f=C=>s.options.mergeOptions?s.options.mergeOptions(u,C):{...u,...C};let g={...{},...(r=t.initialState)!=null?r:{}};s._features.forEach(C=>{var x;g=(x=C.getInitialState==null?void 0:C.getInitialState(g))!=null?x:g});const p=[];let y=!1;const v={_features:i,options:{...u,...t},initialState:g,_queue:C=>{p.push(C),y||(y=!0,Promise.resolve().then(()=>{for(;p.length;)p.shift()();y=!1}).catch(x=>setTimeout(()=>{throw x})))},reset:()=>{s.setState(s.initialState)},setOptions:C=>{const x=rl(C,s.options);s.options=f(x)},getState:()=>s.options.state,setState:C=>{s.options.onStateChange==null||s.options.onStateChange(C)},_getRowId:(C,x,S)=>{var E;return(E=s.options.getRowId==null?void 0:s.options.getRowId(C,x,S))!=null?E:`${S?[S.id,x].join("."):x}`},getCoreRowModel:()=>(s._getCoreRowModel||(s._getCoreRowModel=s.options.getCoreRowModel(s)),s._getCoreRowModel()),getRowModel:()=>s.getPaginationRowModel(),getRow:(C,x)=>{let S=(x?s.getPrePaginationRowModel():s.getRowModel()).rowsById[C];if(!S&&(S=s.getCoreRowModel().rowsById[C],!S))throw new Error;return S},_getDefaultColumnDef:Se(()=>[s.options.defaultColumn],C=>{var x;return C=(x=C)!=null?x:{},{header:S=>{const E=S.header.column.columnDef;return E.accessorKey?E.accessorKey:E.accessorFn?E.id:null},cell:S=>{var E,R;return(E=(R=S.renderValue())==null||R.toString==null?void 0:R.toString())!=null?E:null},...s._features.reduce((S,E)=>Object.assign(S,E.getDefaultColumnDef==null?void 0:E.getDefaultColumnDef()),{}),...C}},Ee(t,"debugColumns")),_getColumnDefs:()=>s.options.columns,getAllColumns:Se(()=>[s._getColumnDefs()],C=>{const x=function(S,E,R){return R===void 0&&(R=0),S.map(_=>{const j=QE(s,_,R,E),A=_;return j.columns=A.columns?x(A.columns,j,R+1):[],j})};return x(C)},Ee(t,"debugColumns")),getAllFlatColumns:Se(()=>[s.getAllColumns()],C=>C.flatMap(x=>x.getFlatColumns()),Ee(t,"debugColumns")),_getAllFlatColumnsById:Se(()=>[s.getAllFlatColumns()],C=>C.reduce((x,S)=>(x[S.id]=S,x),{}),Ee(t,"debugColumns")),getAllLeafColumns:Se(()=>[s.getAllColumns(),s._getOrderColumnsFn()],(C,x)=>{let S=C.flatMap(E=>E.getLeafColumns());return x(S)},Ee(t,"debugColumns")),getColumn:C=>s._getAllFlatColumnsById()[C]};Object.assign(s,v);for(let C=0;C<s._features.length;C++){const x=s._features[C];x==null||x.createTable==null||x.createTable(s)}return s}function MC(){return t=>Se(()=>[t.options.data],l=>{const r={rows:[],flatRows:[],rowsById:{}},i=function(s,u,f){u===void 0&&(u=0);const h=[];for(let p=0;p<s.length;p++){const y=JE(t,t._getRowId(s[p],p,f),s[p],p,u,void 0,f==null?void 0:f.id);if(r.flatRows.push(y),r.rowsById[y.id]=y,h.push(y),t.options.getSubRows){var g;y.originalSubRows=t.options.getSubRows(s[p],p),(g=y.originalSubRows)!=null&&g.length&&(y.subRows=i(y.originalSubRows,u+1,y))}}return h};return r.rows=i(l),r},Ee(t.options,"debugTable","getRowModel",()=>t._autoResetPageIndex()))}function OC(){return t=>Se(()=>[t.getState().sorting,t.getPreSortedRowModel()],(l,r)=>{if(!r.rows.length||!(l!=null&&l.length))return r;const i=t.getState().sorting,s=[],u=i.filter(g=>{var p;return(p=t.getColumn(g.id))==null?void 0:p.getCanSort()}),f={};u.forEach(g=>{const p=t.getColumn(g.id);p&&(f[g.id]={sortUndefined:p.columnDef.sortUndefined,invertSorting:p.columnDef.invertSorting,sortingFn:p.getSortingFn()})});const h=g=>{const p=g.map(y=>({...y}));return p.sort((y,v)=>{for(let x=0;x<u.length;x+=1){var C;const S=u[x],E=f[S.id],R=E.sortUndefined,_=(C=S==null?void 0:S.desc)!=null?C:!1;let j=0;if(R){const A=y.getValue(S.id),L=v.getValue(S.id),M=A===void 0,K=L===void 0;if(M||K){if(R==="first")return M?-1:1;if(R==="last")return M?1:-1;j=M&&K?0:M?R:-R}}if(j===0&&(j=E.sortingFn(y,v,S.id)),j!==0)return _&&(j*=-1),E.invertSorting&&(j*=-1),j}return y.index-v.index}),p.forEach(y=>{var v;s.push(y),(v=y.subRows)!=null&&v.length&&(y.subRows=h(y.subRows))}),p};return{rows:h(r.rows),flatRows:s,rowsById:r.rowsById}},Ee(t.options,"debugTable","getSortedRowModel",()=>t._autoResetPageIndex()))}/**
|
|
358
|
+
* react-table
|
|
359
|
+
*
|
|
360
|
+
* Copyright (c) TanStack
|
|
361
|
+
*
|
|
362
|
+
* This source code is licensed under the MIT license found in the
|
|
363
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
364
|
+
*
|
|
365
|
+
* @license MIT
|
|
366
|
+
*/function cv(t,l){return t?zC(t)?w.createElement(t,l):t:null}function zC(t){return LC(t)||typeof t=="function"||UC(t)}function LC(t){return typeof t=="function"&&(()=>{const l=Object.getPrototypeOf(t);return l.prototype&&l.prototype.isReactComponent})()}function UC(t){return typeof t=="object"&&typeof t.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(t.$$typeof.description)}function BC(t){const l={state:{},onStateChange:()=>{},renderFallbackValue:null,...t},[r]=w.useState(()=>({current:DC(l)})),[i,s]=w.useState(()=>r.current.initialState);return r.current.setOptions(u=>({...u,...t,state:{...i,...t.state},onStateChange:f=>{s(f),t.onStateChange==null||t.onStateChange(f)}})),r.current}function f0({className:t,...l}){return m.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:m.jsx("table",{"data-slot":"table",className:_e("w-full caption-bottom text-sm",t),...l})})}function m0({className:t,...l}){return m.jsx("thead",{"data-slot":"table-header",className:_e("[&_tr]:border-b",t),...l})}function h0({className:t,...l}){return m.jsx("tbody",{"data-slot":"table-body",className:_e("[&_tr:last-child]:border-0",t),...l})}function Vi({className:t,...l}){return m.jsx("tr",{"data-slot":"table-row",className:_e("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",t),...l})}function Jd({className:t,...l}){return m.jsx("th",{"data-slot":"table-head",className:_e("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),...l})}function On({className:t,...l}){return m.jsx("td",{"data-slot":"table-cell",className:_e("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),...l})}function g0({data:t,columns:l,loading:r=!1,emptyMessage:i,onRowClick:s,onCellClick:u,rowKeyField:f="id",className:h}){const g=Oe(),[p,y]=w.useState([]),[v]=w.useState("onChange"),C=w.useMemo(()=>l.map(E=>({accessorKey:E.accessorKey,header:({column:R})=>{const _=R.getIsSorted();return m.jsxs("button",{className:_e("flex items-center gap-1 text-xs font-semibold select-none",E.enableSorting!==!1&&"cursor-pointer hover:text-foreground"),onClick:()=>{E.enableSorting!==!1&&R.toggleSorting()},title:E.headerTooltip,children:[E.header,E.enableSorting!==!1&&(_==="asc"?m.jsx(g2,{className:"h-3 w-3"}):_==="desc"?m.jsx(Vy,{className:"h-3 w-3"}):m.jsx(m2,{className:"h-3 w-3 opacity-30"}))]})},cell:E.cell?E.cell:R=>{const _=R.getValue();return _==null?m.jsx("span",{className:"text-muted-foreground italic",children:"null"}):typeof _=="boolean"?m.jsx("span",{className:_?"text-green-500":"text-red-500",children:_?"true":"false"}):m.jsx("span",{className:"block truncate",children:String(_)})},size:E.minWidth||150,minSize:E.minWidth||80,maxSize:E.maxWidth||400,enableSorting:E.enableSorting!==!1,enableResizing:!0,meta:{cellClassName:E.cellClassName}})),[l]),x=BC({data:t,columns:C,state:{sorting:p},onSortingChange:y,getCoreRowModel:MC(),getSortedRowModel:OC(),columnResizeMode:v,enableColumnResizing:!0}),S=w.useCallback((E,R)=>{const _=l.find(j=>j.accessorKey===E);return _!=null&&_.cellClassName?typeof _.cellClassName=="function"?_.cellClassName(R):_.cellClassName:""},[l]);return m.jsxs("div",{className:_e("relative h-full overflow-auto",h),children:[r&&m.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-background/60",children:m.jsx(xf,{className:"h-5 w-5 animate-spin text-muted-foreground"})}),m.jsxs(f0,{className:"table-fixed",children:[m.jsx(m0,{className:"sticky top-0 z-[5] bg-muted/80 backdrop-blur-sm",children:x.getHeaderGroups().map(E=>m.jsx(Vi,{className:"border-b border-border hover:bg-transparent",children:E.headers.map(R=>m.jsxs(Jd,{className:"text-muted-foreground text-xs px-3 py-2.5 relative select-none",style:{width:R.getSize(),minWidth:R.column.columnDef.minSize,maxWidth:R.column.columnDef.maxSize},children:[R.isPlaceholder?null:cv(R.column.columnDef.header,R.getContext()),m.jsx("div",{onMouseDown:R.getResizeHandler(),onTouchStart:R.getResizeHandler(),className:_e("absolute right-0 top-0 h-full w-1 cursor-col-resize select-none touch-none","hover:bg-primary/40 active:bg-primary/60",R.column.getIsResizing()&&"bg-primary/60")})]},R.id))},E.id))}),m.jsx(h0,{children:x.getRowModel().rows.length===0&&!r?m.jsx(Vi,{children:m.jsx(On,{colSpan:C.length,className:"h-24 text-center text-muted-foreground",children:i??g("data.noData")})}):x.getRowModel().rows.map((E,R)=>m.jsx(Vi,{className:_e("border-b border-border transition-colors",R%2===1&&"bg-muted/30",s&&"cursor-pointer"),onClick:()=>s==null?void 0:s(E.original),children:E.getVisibleCells().map(_=>{const j=_.column.id,A=_.getValue(),L=S(j,A);return m.jsx(On,{className:_e("px-3 py-2.5 text-xs overflow-hidden text-ellipsis",L),style:{width:_.column.getSize(),minWidth:_.column.columnDef.minSize,maxWidth:_.column.columnDef.maxSize},onClick:M=>{u==null||u(E.original,j,M)},children:cv(_.column.columnDef.cell,_.getContext())},_.id)})},E.original[f]??R))})]})]})}function HC({users:t,loading:l,emptyMessage:r,onSelect:i}){const s=Oe(),{locale:u}=_n(),f=w.useMemo(()=>VC(s,u),[s,u]);return m.jsx(g0,{data:t,columns:f,loading:l,emptyMessage:r,onRowClick:i})}function VC(t,l){return[{accessorKey:"id",header:"ID",minWidth:120,maxWidth:180,cellClassName:"font-mono text-[11px] text-indigo-400",cell:r=>{const i=r.getValue();return i?i.length>12?i.slice(0,12)+"…":i:""}},{accessorKey:"name",header:t("generic.name"),minWidth:150,maxWidth:250,cellClassName:r=>r?"":"text-muted-foreground italic",cell:r=>r.getValue()||t("auth.noName")},{accessorKey:"email",header:t("generic.email"),minWidth:200,maxWidth:300},{accessorKey:"email_verified",header:t("auth.verified"),minWidth:100,maxWidth:120,cellClassName:r=>r?"text-green-500 font-medium":"text-muted-foreground",cell:r=>r.getValue()?`✓ ${t("auth.yes")}`:t("common.no")},{accessorKey:"created_at",header:t("auth.created"),minWidth:170,maxWidth:220,cell:r=>{const i=r.getValue();return i?Ll(i,l):""}}]}function IC({viewSelector:t,tables:l,tableLoading:r,staticOnly:i,isRuntimeWaking:s,tableUnavailable:u,tableError:f,showGridRuntimeBlocked:h,showTableCount:g,onRefresh:p,onSelectTable:y}){const v=Oe(),C=Object.keys(l);return m.jsxs("div",{className:"flex h-full flex-col",children:[m.jsxs("div",{className:t?"flex min-h-12 flex-wrap items-center justify-between gap-2 border-b border-border bg-background px-4 py-2":"flex items-center justify-between border-b border-border px-4 h-12 bg-background",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(Ml,{className:"h-4 w-4 text-muted-foreground"}),m.jsx("h2",{className:"font-semibold text-foreground",children:v("app.nav.data")}),m.jsx(Ze,{variant:"outline",className:"text-xs border-border text-muted-foreground",children:v("data.tablesCount",{count:g})})]}),m.jsxs("div",{className:"flex items-center gap-2",children:[t,m.jsx(we,{variant:"ghost",size:"sm",onClick:p,disabled:r,className:"text-muted-foreground hover:text-foreground",children:m.jsx(ol,{className:_e("h-3.5 w-3.5",r&&"animate-spin")})})]})]}),m.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:r?m.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center",children:[m.jsx(xf,{className:"h-8 w-8 animate-spin text-muted-foreground mb-4"}),m.jsx("h3",{className:"text-lg font-medium text-foreground mb-1",children:v("data.loadingTables")})]}):i?m.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center",children:[m.jsx(Gy,{className:"h-12 w-12 text-cyan-500/30 mb-4"}),m.jsx("h3",{className:"text-lg font-medium text-foreground mb-1",children:v("app.common.staticHosting")}),m.jsx("p",{className:"text-sm text-muted-foreground max-w-sm",children:v("data.staticOnlyBody")})]}):s||u||f?m.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center",children:[m.jsx(Ml,{className:"h-12 w-12 text-amber-500/30 mb-4"}),m.jsx("h3",{className:"text-lg font-medium text-foreground mb-1",children:v(s?"data.backendWakingTitle":f?"data.backendErrorTitle":"data.backendUnavailableTitle")}),m.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mb-4",children:v(s?"data.backendWakingBody":f?"data.backendErrorBody":"data.backendUnavailableBody")}),m.jsxs(we,{variant:"outline",size:"sm",onClick:p,disabled:r,children:[m.jsx(ol,{className:_e("h-3.5 w-3.5 mr-1.5",r&&"animate-spin")}),v("common.retry")]})]}):h?m.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center",children:[m.jsx(Ml,{className:"h-12 w-12 text-amber-500/30 mb-4"}),m.jsx("h3",{className:"text-lg font-medium text-foreground mb-1",children:v("app.common.appNotRunning")}),m.jsx("p",{className:"text-sm text-muted-foreground max-w-sm",children:v("data.appNotRunningBody")})]}):C.length===0?m.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center",children:[m.jsx(Ml,{className:"h-12 w-12 text-muted-foreground/30 mb-4"}),m.jsx("h3",{className:"text-lg font-medium text-foreground mb-1",children:v("data.noTablesTitle")}),m.jsx("p",{className:"text-sm text-muted-foreground max-w-sm",children:v("data.noTablesBody",{file:"gencow/schema.ts"})})]}):m.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-3",children:C.map(x=>{const S=(l[x]||[]).filter(R=>R.references).map(R=>R.references.table).filter((R,_,j)=>j.indexOf(R)===_),E=Object.entries(l).filter(([R,_])=>R!==x&&_.some(j=>{var A;return((A=j.references)==null?void 0:A.table)===x})).map(([R])=>R);return m.jsxs("button",{onClick:()=>y(x),className:_e("group relative flex flex-col items-start gap-2.5 rounded-lg border border-border p-4","bg-card hover:bg-accent/50 hover:border-primary/30","transition-all duration-150 text-left","focus:outline-none focus:ring-2 focus:ring-primary/50 focus:ring-offset-1 focus:ring-offset-background"),children:[m.jsxs("div",{className:"flex items-center gap-2.5 w-full",children:[m.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-primary/10 text-primary",children:m.jsx(Xy,{className:"h-4 w-4"})}),m.jsx("span",{className:"font-medium text-sm text-foreground truncate flex-1",children:x})]}),m.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[m.jsx(M2,{className:"h-3 w-3"}),v("data.columnsCount",{count:l[x].length})]}),(S.length>0||E.length>0)&&m.jsxs("div",{className:"flex flex-wrap gap-1 w-full",children:[S.map(R=>m.jsxs("span",{onClick:_=>{_.stopPropagation(),y(R)},className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium bg-violet-500/10 text-violet-400 hover:bg-violet-500/20 cursor-pointer transition-colors",children:[m.jsx(bf,{className:"h-2.5 w-2.5"}),R]},`out-${R}`)),E.map(R=>m.jsxs("span",{onClick:_=>{_.stopPropagation(),y(R)},className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium bg-emerald-500/10 text-emerald-400 hover:bg-emerald-500/20 cursor-pointer transition-colors",children:[m.jsx(Ds,{className:"h-2.5 w-2.5"}),R]},`in-${R}`))]})]},x)})})})]})}const FC=180,qC=384,dv=16,$C=36;function GC(t,l){const r=Number.isFinite(l)?Math.max(0,l):0,i=Math.max(0,r-t.bottom-dv),s=Math.max(0,t.top-dv),u=i<FC&&s>i?"top":"bottom";return{placement:u,maxHeight:Math.round(Math.min(qC,Math.max(u==="top"?s:i,1)))}}function PC(t,l,r,i){if(l<=0)return t;const s=r+i,u=t+l;return r<t?r:s>u?Math.max(0,s-l):t}function YC({selectedTable:t,tables:l,formatColumnCount:r,onSelectTable:i}){const s=w.useMemo(()=>Object.keys(l),[l]),u=Math.max(0,s.indexOf(t)),[f,h]=w.useState(!1),[g,p]=w.useState(u),[y,v]=w.useState({placement:"bottom",maxHeight:300}),C=w.useRef(null),x=w.useRef(null),S=w.useRef(null),E=w.useRef([]),R=w.useId(),_=w.useCallback(()=>{const q=x.current;!q||typeof window>"u"||v(GC(q.getBoundingClientRect(),window.innerHeight))},[]),j=w.useCallback(()=>{s.length!==0&&(p(u),_(),h(!0))},[u,s.length,_]),A=w.useCallback(()=>{h(!1)},[]),L=w.useCallback(q=>{var ee;i(q),h(!1),(ee=x.current)==null||ee.focus()},[i]);w.useEffect(()=>{if(!f)return;const q=ie=>{var oe;(oe=C.current)!=null&&oe.contains(ie.target)||h(!1)},ee=()=>_();return document.addEventListener("mousedown",q),window.addEventListener("resize",ee),()=>{document.removeEventListener("mousedown",q),window.removeEventListener("resize",ee)}},[f,_]),w.useEffect(()=>{if(!f)return;const q=S.current,ee=E.current[g];if(!q||!ee)return;const ie=PC(q.scrollTop,q.clientHeight,ee.offsetTop,ee.offsetHeight);ie!==q.scrollTop&&(q.scrollTop=ie)},[g,f]);const M=w.useCallback(q=>{p(Math.max(0,Math.min(s.length-1,q)))},[s.length]),K=w.useCallback(q=>{var ie;const ee=Math.max(1,Math.floor(y.maxHeight/$C)-1);if(!f){["ArrowDown","ArrowUp","Enter"," "].includes(q.key)&&(q.preventDefault(),j());return}if(q.key==="ArrowDown")q.preventDefault(),M(g+1);else if(q.key==="ArrowUp")q.preventDefault(),M(g-1);else if(q.key==="Home")q.preventDefault(),M(0);else if(q.key==="End")q.preventDefault(),M(s.length-1);else if(q.key==="PageDown")q.preventDefault(),M(g+ee);else if(q.key==="PageUp")q.preventDefault(),M(g-ee);else if(q.key==="Enter"||q.key===" "){q.preventDefault();const oe=s[g];oe&&L(oe)}else q.key==="Escape"&&(q.preventDefault(),A(),(ie=x.current)==null||ie.focus())},[g,A,y.maxHeight,M,f,j,L,s]),X={maxHeight:y.maxHeight,overscrollBehavior:"contain"},U={maxWidth:"min(60vw, 360px)"},le={left:0,maxWidth:"calc(100vw - 2rem)",minWidth:220,...y.placement==="top"?{bottom:"100%",marginBottom:4}:{marginTop:4,top:"100%"}},ye=f&&s[g]?`${R}-option-${g}`:void 0;return m.jsxs("div",{className:"relative flex h-8 items-center",ref:C,onKeyDown:K,children:[m.jsxs("button",{ref:x,type:"button","aria-haspopup":"listbox","aria-expanded":f,"aria-controls":f?R:void 0,"aria-activedescendant":ye,style:U,onClick:()=>{f?A():j()},className:_e("flex items-center gap-2 rounded-md px-2.5 py-1.5 text-sm font-semibold transition-colors","hover:bg-accent/50 text-foreground","focus:outline-none focus:ring-2 focus:ring-primary/50 focus:ring-offset-1 focus:ring-offset-background",f&&"bg-accent/50"),children:[m.jsx(Ml,{className:"h-3.5 w-3.5 shrink-0 text-primary"}),m.jsx("span",{className:"truncate",children:t}),m.jsx(E2,{className:_e("h-3.5 w-3.5 shrink-0 text-muted-foreground transition-transform",f&&"rotate-180")})]}),f&&m.jsx("div",{className:"absolute z-50 rounded-lg border border-border bg-popover shadow-lg",style:le,children:m.jsx("div",{id:R,ref:S,role:"listbox","aria-activedescendant":ye,tabIndex:-1,className:"overflow-y-auto p-1",style:X,children:s.map((q,ee)=>{var he;const ie=q===t,oe=ee===g;return m.jsxs("button",{id:`${R}-option-${ee}`,ref:O=>{E.current[ee]=O},type:"button",role:"option","aria-selected":ie,onMouseEnter:()=>p(ee),onClick:()=>L(q),className:_e("flex min-h-9 w-full items-center gap-2 rounded-md px-3 py-2 text-left text-sm transition-colors",ie?"bg-primary/10 font-medium text-primary":oe?"bg-accent/60 text-foreground":"text-foreground hover:bg-accent/50"),children:[m.jsx(Ml,{className:"h-3.5 w-3.5 shrink-0"}),m.jsx("span",{className:"min-w-0 flex-1 truncate",children:q}),m.jsx(Ze,{variant:"secondary",className:"ml-auto shrink-0 text-[10px]",children:r(((he=l[q])==null?void 0:he.length)||0)})]},q)})})})]})}function XC({open:t,loading:l,busy:r,disabled:i,destructive:s,warning:u,preview:f,error:h,onClose:g,onConfirm:p}){const y=Oe();if(!t)return null;const v=C=>m.jsx("div",{className:"flex flex-wrap gap-1.5",children:C.length?C.map(x=>m.jsxs("span",{className:"rounded border border-border px-2 py-1 text-xs",children:[x.label,": ",x.count]},x.label)):m.jsx("span",{children:y("files.bulkPreviewNoBreakdown")})});return m.jsx("div",{role:"dialog","aria-modal":"true","aria-label":y("files.bulkPreviewTitle"),className:"fixed inset-0 z-50 flex items-center justify-center bg-background/70 p-4 backdrop-blur-sm",children:m.jsxs("div",{className:"w-full max-w-lg rounded-md border border-border bg-background shadow-lg",children:[m.jsxs("div",{className:"flex items-center justify-between border-b border-border px-4 py-3",children:[m.jsx("h3",{className:"font-semibold",children:y("files.bulkPreviewTitle")}),m.jsx(we,{variant:"ghost",size:"icon",className:"h-7 w-7",disabled:r,"aria-label":y("common.close"),onClick:g,children:m.jsx(Ki,{className:"h-4 w-4"})})]}),m.jsxs("div",{className:"space-y-3 px-4 py-4 text-sm",children:[l&&m.jsx("p",{children:y("files.bulkPreviewLoading")}),h,f&&m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[m.jsxs("div",{className:"rounded border border-border p-2",children:[m.jsx("p",{children:y("files.bulkPreviewCount")}),m.jsx("p",{children:f.count})]}),m.jsxs("div",{className:"rounded border border-border p-2",children:[m.jsx("p",{children:y("files.bulkPreviewBytes")}),m.jsx("p",{children:f.totalBytesLabel})]})]}),m.jsxs("div",{className:"space-y-2 rounded border border-border p-3",children:[m.jsx("p",{children:y("files.bulkPreviewVisibility")}),v(f.visibility),m.jsx("p",{children:y("files.bulkPreviewTypes")}),v(f.types)]}),m.jsx("p",{className:"text-muted-foreground",children:u}),m.jsx("div",{className:"max-h-32 overflow-auto rounded border border-border",children:f.samples.map(C=>m.jsxs("div",{className:"flex justify-between gap-3 border-b border-border px-3 py-2",children:[m.jsx("span",{className:"truncate",children:C.name}),m.jsx("span",{className:"text-xs text-muted-foreground",children:C.sizeLabel})]},C.id))})]})]}),m.jsxs("div",{className:"flex justify-end gap-2 border-t border-border px-4 py-3",children:[m.jsx(we,{variant:"ghost",size:"sm",disabled:r,onClick:g,children:y("common.cancel")}),m.jsx(we,{variant:s?"destructive":"default",size:"sm",disabled:i||r||l,onClick:p,children:y("common.confirm")})]})]})})}function p0({className:t,type:l,...r}){return m.jsx("input",{type:l,"data-slot":"input",className:_e("border-border file:text-foreground placeholder:text-muted-foreground/50 selection:bg-primary selection:text-primary-foreground flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-sm shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:opacity-50","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",t),...r})}function KC({children:t,disabled:l,onFilesDropped:r}){const i=Oe(),[s,u]=w.useState(!1);return m.jsxs("div",{className:"relative flex h-full min-w-0 flex-col",onDragOver:f=>{f.preventDefault(),!l&&Array.from(f.dataTransfer.types).includes("Files")&&u(!0)},onDragLeave:f=>{f.currentTarget.contains(f.relatedTarget)||u(!1)},onDrop:f=>{f.preventDefault(),u(!1);const h=Array.from(f.dataTransfer.files);!l&&h.length&&r(h)},children:[t,s&&!l&&m.jsx("div",{className:"pointer-events-none absolute inset-0 z-50 flex items-center justify-center border-2 border-dashed border-primary bg-primary/10 backdrop-blur-sm",children:m.jsxs("div",{className:"text-center",children:[m.jsx(Ky,{className:"mx-auto mb-2 h-12 w-12 text-primary"}),m.jsx("p",{className:"text-lg font-medium text-primary",children:i("files.dropHere")})]})})]})}function QC({filters:t,countLabel:l,selectedCount:r,loading:i,busy:s,disabled:u,onFiltersChange:f,onFilesSelected:h,onRefresh:g,onSelectedAction:p,onFilteredAction:y}){const v=Oe(),C=w.useRef(null),x=(S,E)=>f({...t,[S]:E});return m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"flex min-h-12 flex-wrap items-center justify-between gap-2 border-b border-border bg-background px-4 py-2",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx($y,{className:"h-4 w-4"}),m.jsx("h2",{className:"font-semibold",children:v("app.nav.files")}),l&&m.jsx(Ze,{variant:"outline",children:l}),r>0&&m.jsx(Ze,{variant:"secondary",children:v("files.selectedCount",{count:r})})]}),m.jsxs("div",{className:"flex gap-2",children:[m.jsx("input",{ref:C,type:"file","aria-label":v("files.choose"),className:"hidden",multiple:!0,disabled:u||s,onChange:S=>{h(Array.from(S.target.files??[])),S.target.value=""}}),m.jsxs(we,{variant:"outline",size:"sm",disabled:u||s,onClick:()=>{var S;return(S=C.current)==null?void 0:S.click()},children:[m.jsx(Ky,{className:"h-3.5 w-3.5"}),v("files.upload")]}),m.jsx(we,{variant:"ghost",size:"sm",disabled:i||s,"aria-label":v("common.refresh"),onClick:g,children:m.jsx(ol,{className:"h-3.5 w-3.5"})})]})]}),m.jsxs("div",{className:"flex flex-wrap items-center gap-2 border-b border-border bg-muted/20 px-4 py-2",children:[m.jsxs("div",{className:"relative min-w-48 max-w-sm flex-1",children:[m.jsx($s,{className:"pointer-events-none absolute left-2.5 top-2.5 h-3.5 w-3.5 text-muted-foreground"}),m.jsx(p0,{className:"pl-8","aria-label":v("files.searchPlaceholder"),placeholder:v("files.searchPlaceholder"),value:t.q,onChange:S=>x("q",S.target.value)})]}),m.jsxs("select",{className:"h-9 rounded-md border border-border bg-background px-2 text-sm","aria-label":v("files.filterAllVisibility"),value:t.visibility,onChange:S=>x("visibility",S.target.value),children:[m.jsx("option",{value:"all",children:v("files.filterAllVisibility")}),m.jsx("option",{value:"private",children:v("files.private")}),m.jsx("option",{value:"public",children:v("files.public")})]}),m.jsxs("select",{className:"h-9 rounded-md border border-border bg-background px-2 text-sm","aria-label":v("files.filterAllTypes"),value:t.typeFamily,onChange:S=>x("typeFamily",S.target.value),children:[m.jsx("option",{value:"all",children:v("files.filterAllTypes")}),["image","audio","video","document","archive","text","other"].map(S=>m.jsx("option",{value:S,children:v("files.type"+S[0].toUpperCase()+S.slice(1))},S))]}),m.jsxs("select",{className:"h-9 rounded-md border border-border bg-background px-2 text-sm","aria-label":v("files.filterAllUploaders"),value:t.uploadedBy,onChange:S=>x("uploadedBy",S.target.value),children:[m.jsx("option",{value:"all",children:v("files.filterAllUploaders")}),["dashboard","cli","api"].map(S=>m.jsx("option",{value:S,children:S},S))]}),m.jsx(we,{variant:"ghost",size:"sm",onClick:()=>f({visibility:"all",typeFamily:"all",q:"",uploadedBy:"all"}),children:v("common.reset")})]}),m.jsxs("div",{className:"flex flex-wrap items-center gap-2 border-b border-border px-4 py-2",children:[["public","private","delete"].map(S=>m.jsx(we,{variant:"outline",size:"sm",disabled:u||s||r===0,onClick:()=>p(S),children:v(S==="delete"?"files.bulkDelete":S==="public"?"files.bulkMakePublic":"files.bulkMakePrivate")},S)),m.jsx("div",{className:"ml-auto flex flex-wrap gap-2",children:["public","private","delete"].map(S=>m.jsx(we,{variant:"ghost",size:"sm",disabled:u||s,onClick:()=>y(S),children:v(S==="delete"?"files.filterDelete":S==="public"?"files.filterMakePublic":"files.filterMakePrivate")},S))})]})]})}function ZC({page:t,pageSize:l,pageSizes:r,previousDisabled:i,nextDisabled:s,onPageSizeChange:u,onPrevious:f,onNext:h}){const g=Oe();return m.jsxs("div",{className:"flex min-h-12 flex-wrap items-center justify-between gap-3 border-t border-border px-4 py-2",children:[m.jsx("span",{className:"text-xs text-muted-foreground",children:g("files.pageNumber",{page:t})}),m.jsxs("div",{className:"flex gap-2",children:[m.jsx("select",{className:"h-8 rounded-md border border-border bg-background px-2 text-sm","aria-label":g("files.pageSizeLabel"),value:l,onChange:p=>u(Number(p.target.value)),children:r.map(p=>m.jsx("option",{value:p,children:g("files.pageSize",{count:p})},p))}),m.jsx(we,{variant:"outline",size:"sm",disabled:i,onClick:f,children:g("common.previous")}),m.jsx(we,{variant:"outline",size:"sm",disabled:s,onClick:h,children:g("common.next")})]})]})}function JC({url:t,name:l}){return m.jsx("div",{className:"flex h-9 w-9 items-center justify-center overflow-hidden rounded bg-muted",children:t?m.jsx("img",{src:t,alt:l,className:"h-full w-full object-cover",loading:"lazy",referrerPolicy:"no-referrer"}):m.jsx(G2,{className:"h-4 w-4 text-muted-foreground"})})}function WC({label:t,isPublic:l}){return m.jsx(Ze,{variant:l?"default":"outline",className:"text-[10px]",children:t})}function eR({files:t,selectedIds:l,allPageSelected:r,disabled:i,deleteConfirm:s,onSelect:u,onSelectPage:f,onCopyId:h,onCopyPublicUrl:g,onDownload:p,onDelete:y,onVisibilityChange:v}){const C=Oe();return m.jsxs(f0,{children:[m.jsx(m0,{children:m.jsxs(Vi,{children:[m.jsx(Jd,{className:"w-10",children:m.jsx("input",{"aria-label":C("files.selectPage"),type:"checkbox",checked:r,disabled:i,onChange:x=>f(x.target.checked)})}),["Preview","Name","Type","Size","Visibility","UploadedBy","Created","Actions"].map(x=>m.jsx(Jd,{children:C("files.column"+x)},x))]})}),m.jsx(h0,{children:t.map(x=>m.jsxs(Vi,{"data-state":l.has(x.id)?"selected":void 0,children:[m.jsx(On,{children:m.jsx("input",{"aria-label":C("files.selectFile",{name:x.name}),type:"checkbox",checked:l.has(x.id),disabled:i,onChange:S=>u(x.id,S.target.checked)})}),m.jsx(On,{children:m.jsx(JC,{url:x.previewUrl,name:x.name})}),m.jsxs(On,{className:"min-w-56",children:[m.jsx("p",{className:"font-medium",children:x.name}),m.jsx("button",{className:"font-mono text-xs text-muted-foreground","aria-label":C("common.copy"),onClick:()=>h(x.id),children:x.identityLabel})]}),m.jsxs(On,{children:[m.jsx(Ze,{variant:"outline",className:"text-[10px]",children:x.typeLabel}),m.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:x.type})]}),m.jsx(On,{children:x.sizeLabel}),m.jsx(On,{children:m.jsx(WC,{label:x.visibilityLabel,isPublic:x.visibilityPublic})}),m.jsx(On,{children:x.uploaderLabel}),m.jsx(On,{children:x.createdLabel}),m.jsx(On,{children:m.jsxs("div",{className:"flex justify-end gap-1",children:[m.jsx(we,{variant:"ghost",size:"icon",className:"h-7 w-7",disabled:i,"aria-label":x.visibilityActionLabel,title:x.visibilityActionLabel,onClick:()=>v(x.id),children:x.visibilityPublic?m.jsx(V2,{className:"h-3.5 w-3.5"}):m.jsx(tE,{className:"h-3.5 w-3.5"})}),x.copyPublicUrlLabel&&m.jsx(we,{variant:"ghost",size:"icon",className:"h-7 w-7","aria-label":x.copyPublicUrlLabel,title:x.copyPublicUrlLabel,onClick:()=>g(x.id),children:m.jsx(z2,{className:"h-3.5 w-3.5"})}),m.jsx(we,{variant:"ghost",size:"icon",className:"h-7 w-7","aria-label":C("common.download"),title:C("common.download"),onClick:()=>p(x.id),children:m.jsx(B2,{className:"h-3.5 w-3.5"})}),m.jsx(we,{variant:"ghost",size:"icon",className:_e("h-7 w-7",s===x.id&&"bg-red-500/10 text-red-400"),disabled:i,"aria-label":C(s===x.id?"files.confirmDelete":"common.delete"),title:C(s===x.id?"files.confirmDelete":"common.delete"),onClick:()=>y(x.id),children:s===x.id?m.jsx(Ki,{className:"h-3.5 w-3.5"}):m.jsx(Pd,{className:"h-3.5 w-3.5"})})]})})]},x.id))})]})}function tR({jsonDraft:t,jsonError:l,onJsonDraftChange:r}){const i=Oe();return m.jsxs("div",{className:"space-y-3",children:[m.jsx("div",{className:"text-xs font-medium text-muted-foreground",children:i("functions.input")}),m.jsxs("div",{children:[m.jsx("textarea",{"aria-label":i("functions.input"),className:_e("h-40 w-full resize-none rounded-md border bg-background px-3 py-2 font-mono text-sm text-foreground outline-none focus:ring-2 focus:ring-primary/50",l?"border-red-500/50":"border-border"),value:t,onChange:s=>r(s.currentTarget.value),placeholder:'{ "key": "value" }',spellCheck:!1}),l&&m.jsx("div",{className:"mt-1 text-xs text-red-400",children:l})]})]})}function v0({operation:t}){const l=Oe(),r=t.kind==="query"?"bg-blue-500/10 text-blue-400 border-blue-500/20":"bg-orange-500/10 text-orange-400 border-orange-500/20",i=t.transport==="procedure"?"bg-cyan-500/10 text-cyan-300 border-cyan-500/20":"bg-slate-500/10 text-slate-300 border-slate-500/20",s=t.visibility==="public"?"bg-emerald-500/10 text-emerald-300 border-emerald-500/20":"bg-amber-500/10 text-amber-300 border-amber-500/20";return m.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[m.jsx(Ze,{className:_e("text-[10px]",r),children:t.kind}),m.jsx(Ze,{className:_e("text-[10px]",i),children:t.transport}),m.jsx(Ze,{className:_e("text-[10px]",s),children:t.visibility==="public"?l("functions.public"):l("functions.authRequired")})]})}function fv({title:t,icon:l,items:r,selectedId:i,viewMode:s,onSelect:u,iconColor:f}){const h=Oe();return r.length===0?null:m.jsxs("div",{children:[m.jsxs("h3",{className:"mb-3 flex items-center gap-2 text-sm font-medium text-muted-foreground",children:[l,t,m.jsx(Ze,{variant:"outline",className:"text-[10px]",children:r.length})]}),s==="card"?m.jsx("div",{className:"space-y-1",children:r.map(g=>m.jsxs("div",{role:"button",tabIndex:0,"aria-label":g.key,onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),u(g))},className:_e("flex cursor-pointer items-center gap-2 rounded-md border border-border px-3 py-2 transition-colors hover:border-primary/50",i===g.id&&"border-primary bg-primary/5"),onClick:()=>u(g),children:[g.kind==="query"?m.jsx(zl,{className:_e("h-3.5 w-3.5 shrink-0",f)}):m.jsx(Gs,{className:_e("h-3.5 w-3.5 shrink-0",f)}),m.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-sm",children:g.key}),g.invalidates&&g.invalidates.length>0&&m.jsxs(m.Fragment,{children:[m.jsx(bf,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),g.invalidates.map(p=>m.jsx(Ze,{variant:"secondary",className:"hidden shrink-0 font-mono text-[10px] sm:inline-flex",children:p},p))]}),m.jsx($i,{className:"ml-auto h-3.5 w-3.5 shrink-0 text-muted-foreground"})]},g.id))}):m.jsx("div",{className:"overflow-x-auto rounded-md border border-border",children:m.jsxs("table",{className:"w-full table-fixed text-sm",children:[m.jsx("thead",{children:m.jsxs("tr",{className:"border-b border-border bg-muted/30",children:[m.jsx("th",{className:"w-[42%] px-3 py-2 text-left text-xs font-medium text-muted-foreground",children:h("functions.name")}),m.jsx("th",{className:"w-[36%] px-3 py-2 text-left text-xs font-medium text-muted-foreground",children:h("functions.type")}),m.jsx("th",{className:"w-[22%] px-3 py-2 text-left text-xs font-medium text-muted-foreground",children:h("functions.invalidates")})]})}),m.jsx("tbody",{children:r.map(g=>{var p;return m.jsxs("tr",{role:"button",tabIndex:0,"aria-label":g.key,onKeyDown:y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),u(g))},className:_e("cursor-pointer border-b border-border transition-colors hover:bg-accent/50",i===g.id&&"bg-primary/5"),onClick:()=>u(g),children:[m.jsx("td",{className:"truncate px-3 py-2 font-mono text-xs",children:g.key}),m.jsx("td",{className:"px-3 py-2",children:m.jsx(v0,{operation:g})}),m.jsx("td",{className:"px-3 py-2",children:m.jsx("div",{className:"flex flex-wrap gap-1",children:(p=g.invalidates)==null?void 0:p.map(y=>m.jsx(Ze,{variant:"secondary",className:"font-mono text-[10px]",children:y},y))})})]},g.id)})})]})})]})}function nR({operations:t,selectedId:l,viewMode:r,loading:i,emptyState:s,showCount:u=!0,onSelect:f,onViewModeChange:h}){const g=Oe(),p=t.filter(v=>v.kind==="query"),y=t.filter(v=>v.kind==="mutation");return m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"flex h-12 items-center justify-between border-b border-border bg-background px-4",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(zl,{className:"h-4 w-4 text-muted-foreground"}),m.jsx("h2",{className:"font-semibold text-foreground",children:g("app.nav.functions")}),u&&m.jsx(Ze,{variant:"outline",className:"border-border text-xs text-muted-foreground",children:g("functions.totalCount",{count:t.length})})]}),m.jsxs("div",{className:"flex items-center gap-1",children:[m.jsx(we,{variant:r==="card"?"default":"ghost",size:"sm",className:"h-7 w-7 p-0","aria-label":g("functions.cardView"),onClick:()=>h("card"),children:m.jsx(Q2,{className:"h-3.5 w-3.5"})}),m.jsx(we,{variant:r==="table"?"default":"ghost",size:"sm",className:"h-7 w-7 p-0","aria-label":g("functions.tableView"),onClick:()=>h("table"),children:m.jsx(Xy,{className:"h-3.5 w-3.5"})})]})]}),i?m.jsx(kE,{cards:6}):t.length===0?s??null:m.jsxs("div",{className:"flex-1 space-y-6 overflow-auto p-4",children:[m.jsx(fv,{title:g("functions.queries"),icon:m.jsx(zl,{className:"h-3.5 w-3.5 text-blue-400"}),items:p,selectedId:l,viewMode:r,onSelect:f,iconColor:"text-blue-500"}),m.jsx(fv,{title:g("functions.mutations"),icon:m.jsx(Gs,{className:"h-3.5 w-3.5 text-orange-400"}),items:y,selectedId:l,viewMode:r,onSelect:f,iconColor:"text-orange-500"})]})]})}function aR({result:t,outputType:l,hasOutputSchema:r}){const i=Oe();if(t.status==="idle"||t.status==="loading")return null;const s=t.status==="success",u=s?t.outputText:t.error;return m.jsxs("div",{className:"space-y-3",children:[m.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:[s?m.jsx(j2,{className:"h-3.5 w-3.5 text-green-500"}):m.jsx(_2,{className:"h-3.5 w-3.5 text-red-500"}),m.jsx("span",{className:s?"text-green-500":"text-red-500",children:i(s?"functions.success":"functions.error")}),t.httpStatus!==void 0&&m.jsxs("span",{className:"text-muted-foreground",children:["HTTP ",t.httpStatus]}),t.duration!==void 0&&m.jsxs("span",{className:"text-muted-foreground",children:[t.duration,"ms"]})]}),m.jsxs("div",{className:"rounded-md border border-border bg-muted/20 p-3",children:[m.jsx("div",{className:"mb-1 text-[11px] font-medium uppercase text-muted-foreground",children:i(r?"functions.outputSchema":"functions.outputType")}),m.jsx("div",{className:"font-mono text-xs text-foreground break-all",children:l})]}),m.jsx("pre",{className:_e("max-h-80 overflow-auto rounded-md border p-3 font-mono text-xs",s?"border-green-500/20 bg-green-500/5 text-green-300":"border-red-500/20 bg-red-500/5 text-red-300"),children:u})]})}function lR({title:t,rows:l}){return m.jsxs("div",{className:"rounded-lg border border-border bg-card p-5 space-y-4",children:[m.jsx("h3",{className:"text-sm font-medium text-foreground",children:t}),m.jsx("div",{className:"rounded-lg border border-border overflow-hidden",children:m.jsx("table",{className:"w-full text-sm",children:m.jsx("tbody",{className:"divide-y divide-border",children:l.map(r=>m.jsxs("tr",{children:[m.jsx("td",{className:"px-4 py-2.5 text-muted-foreground w-28 whitespace-nowrap bg-muted/30",children:r.label}),m.jsx("td",{className:"px-4 py-2.5 text-foreground",children:r.value})]},r.label))})})})]})}const rR={30:"#6B7280",31:"#EF4444",32:"#22C55E",33:"#EAB308",34:"#3B82F6",35:"#A855F7",36:"#06B6D4",37:"#E5E7EB",90:"#9CA3AF",91:"#FCA5A5",92:"#86EFAC",93:"#FDE047",94:"#93C5FD",95:"#D8B4FE",96:"#67E8F9",97:"#F9FAFB"};function iR(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function oR(t){return iR(t).replace(/\x1b\[([0-9;]*)m/g,(l,r)=>{if(!r||r==="0")return"</span>";const i=r.split(";");for(const s of i){const u=rR[s];if(u)return`<span style="color:${u}">`;if(s==="1")return'<span style="font-weight:bold">';if(s==="2")return'<span style="opacity:0.7">';if(s==="4")return'<span style="text-decoration:underline">'}return""})}const sR={info:"bg-blue-500/10 text-blue-400 border-blue-500/20",warn:"bg-yellow-500/10 text-yellow-400 border-yellow-500/20",error:"bg-red-500/10 text-red-400 border-red-500/20"};function uR({level:t,showVerbose:l,hideSystem:r,autoScroll:i,connected:s,transportStatus:u,loading:f,count:h,onLevelChange:g,onVerboseChange:p,onHideSystemChange:y,onAutoScrollChange:v,onRefresh:C}){const x=Oe();return m.jsxs("div",{className:"flex min-h-12 flex-wrap items-center justify-between gap-2 border-b border-border bg-background px-4 py-2",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(Yy,{className:"h-4 w-4 text-muted-foreground"}),m.jsx("h2",{className:"font-semibold",children:x("app.nav.logs")}),h!==void 0&&m.jsx(Ze,{variant:"outline",children:h}),u??m.jsxs("span",{className:"flex items-center gap-1 text-[10px] text-muted-foreground",children:[m.jsx("span",{className:_e("h-1.5 w-1.5 rounded-full",s?"bg-green-500":"bg-red-500")}),x(s?"logs.live":"logs.polling")]})]}),m.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[["all","info","warn","error"].map(S=>m.jsx(we,{variant:t===S?"default":"outline",size:"sm",className:"h-7 text-xs","aria-pressed":t===S,onClick:()=>g(S),children:x(`logs.level.${S}`)},S)),m.jsxs(we,{variant:r?"default":"outline",size:"sm",className:"h-7 gap-1 text-xs","aria-pressed":r,title:x(r?"logs.systemHidden":"logs.systemShown"),onClick:()=>y(!r),children:[r?m.jsx(Fy,{className:"h-3 w-3"}):m.jsx(qy,{className:"h-3 w-3"}),x("logs.system")]}),m.jsx(we,{variant:l?"default":"outline",size:"sm",className:"h-7 text-xs","aria-pressed":l,title:x(l?"logs.verboseShown":"logs.verboseHidden"),onClick:()=>p(!l),children:x("logs.verbose")}),m.jsx(we,{variant:i?"default":"outline",size:"sm",className:"h-7","aria-label":x("logs.autoScroll"),"aria-pressed":i,onClick:()=>v(!i),children:m.jsx(Vy,{className:"h-3 w-3"})}),m.jsx(we,{variant:"ghost",size:"sm",className:"h-7",disabled:f,"aria-label":x("common.refresh"),onClick:C,children:m.jsx(ol,{className:"h-3.5 w-3.5"})})]})]})}function cR({entries:t,autoScroll:l,emptyState:r,loadingState:i}){const s=w.useRef(null);return w.useEffect(()=>{l&&s.current&&(s.current.scrollTop=s.current.scrollHeight)},[t,l]),m.jsx("div",{ref:s,className:"flex-1 overflow-y-auto",children:m.jsxs("div",{className:"space-y-px p-2 font-mono text-xs",children:[t.map(u=>m.jsxs("div",{className:_e("flex items-start gap-2 rounded px-3 py-1.5 transition-colors hover:bg-accent/50",u.level==="error"&&"bg-red-500/5"),children:[m.jsx("span",{className:"shrink-0 whitespace-nowrap text-muted-foreground",children:u.timeLabel}),m.jsx(Ze,{variant:"outline",className:_e("shrink-0 px-1.5 py-0 text-[10px]",sR[u.level]),children:u.level}),u.source&&m.jsx(Ze,{variant:"secondary",className:"shrink-0 px-1.5 py-0 text-[10px]",children:u.source}),u.verbose&&m.jsx(Ze,{variant:"outline",className:"shrink-0 px-1.5 py-0 text-[10px]",children:"verbose"}),m.jsx("span",{className:"break-all",dangerouslySetInnerHTML:{__html:oR(u.message)}})]},u.id)),i,t.length===0&&r]})})}function dR({rows:t,labels:l}){return m.jsxs("section",{className:"rounded-lg border border-border bg-card p-5 space-y-4",children:[m.jsx("h3",{className:"text-sm font-medium",children:l.title}),m.jsx("p",{className:"text-xs text-muted-foreground",children:l.description}),t.length?m.jsxs("table",{className:"w-full text-sm",children:[m.jsx("thead",{children:m.jsxs("tr",{children:[m.jsx("th",{className:"text-left px-3 py-2",children:l.name}),m.jsx("th",{className:"text-left px-3 py-2",children:l.value})]})}),m.jsx("tbody",{children:t.map(r=>m.jsxs("tr",{className:"border-t border-border",children:[m.jsx("td",{className:"px-3 py-2 font-mono text-xs",children:r.name}),m.jsx("td",{className:"px-3 py-2 font-mono text-xs text-muted-foreground",children:r.maskedValue})]},r.name))})]}):m.jsx("p",{className:"text-xs text-muted-foreground",children:l.empty})]})}function fR({connectionLabel:t,searchLabel:l,onSearch:r,themeControl:i,localeControl:s}){return m.jsxs("div",{className:"border-t border-border p-3 space-y-2",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[m.jsx("div",{className:"h-2 w-2 rounded-full bg-green-500"}),t]}),i]}),s&&m.jsx("div",{className:"flex items-center justify-between",children:s}),m.jsxs("button",{onClick:r,className:"flex w-full items-center gap-2 rounded-md border border-border px-2.5 py-1.5 text-xs text-muted-foreground hover:bg-accent hover:text-foreground transition-colors",children:[m.jsx($s,{className:"h-3 w-3"}),m.jsx("span",{className:"flex-1 text-left",children:l}),m.jsx("kbd",{className:"rounded border border-border bg-muted px-1 text-[10px]",children:"⌘K"})]})]})}function y0({kind:t,value:l,onChange:r,onKeyDown:i,disabled:s=!1,ariaLabel:u,autoFocus:f=!0}){const h="w-full min-w-0 max-w-full box-border rounded-md border border-primary/50 bg-background px-3 py-2 text-xs text-foreground overflow-x-auto focus:outline-none focus:ring-1 focus:ring-primary/50";return t==="textarea"?m.jsx("textarea",{"aria-label":u,value:l,onChange:g=>r(g.currentTarget.value),onKeyDown:i,disabled:s,rows:6,autoFocus:f,className:_e(h,"font-mono resize-y")}):m.jsx("input",{"aria-label":u,type:t==="datetime"?"datetime-local":t,step:t==="datetime"?"1":void 0,value:l,onChange:g=>r(g.currentTarget.value),onKeyDown:i,disabled:s,autoFocus:f,className:h})}function mR({fields:t,labels:l,disabled:r,feedback:i,onValueChange:s,onModeChange:u,onSubmit:f,onCancel:h}){return m.jsxs("section",{className:"flex h-full min-w-0 flex-col bg-background","aria-label":l.title,children:[m.jsx("h3",{className:"border-b border-border px-4 py-3 text-sm font-semibold",children:l.title}),i,m.jsxs("form",{className:"flex min-h-0 flex-1 flex-col",onSubmit:g=>{g.preventDefault(),r||f()},children:[m.jsx("div",{className:"min-h-0 flex-1 space-y-4 overflow-y-auto p-4",children:t.map(g=>m.jsxs("div",{className:"min-w-0 space-y-2",children:[m.jsxs("div",{className:"flex items-center justify-between gap-2",children:[m.jsxs("span",{className:"truncate text-xs font-medium",children:[g.name,g.required?` (${l.required})`:""]}),m.jsxs("select",{"aria-label":`${g.name} mode`,value:g.mode,disabled:r,onChange:p=>{const y=p.currentTarget.value;(y==="omit"||y==="value"||y==="null")&&u(g.name,y)},className:"rounded border border-border bg-background p-1 text-xs",children:[m.jsx("option",{value:"omit",children:l.omit}),m.jsx("option",{value:"value",children:l.value}),g.nullable&&m.jsx("option",{value:"null",children:l.null})]})]}),g.mode==="value"&&m.jsx(y0,{ariaLabel:g.name,autoFocus:!1,kind:g.kind,value:g.value,disabled:r,onChange:p=>s(g.name,p)})]},g.name))}),m.jsxs("div",{className:"flex gap-2 border-t border-border p-4",children:[m.jsx(we,{type:"submit",disabled:r,children:l.create}),m.jsx(we,{type:"button",variant:"ghost",disabled:r,onClick:h,children:l.cancel})]})]})]})}function hR({rowId:t,onClose:l}){const r=Oe(),i=t===void 0?r("row.readOnlyTable"):String(t).length>16?`${String(t).slice(0,16)}…`:String(t);return m.jsxs("div",{className:"flex min-w-0 items-center justify-between gap-2 px-4 py-3 border-b border-border shrink-0",children:[m.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[m.jsx("h3",{className:"font-semibold text-foreground text-sm shrink-0",children:r("row.detail")}),m.jsx(Ze,{variant:"outline",className:"min-w-0 max-w-[180px] truncate text-[10px] font-mono border-border text-muted-foreground shrink",children:i})]}),m.jsx(we,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-foreground",onClick:l,children:m.jsx(Ki,{className:"h-4 w-4"})})]})}function gR({readOnly:t,readOnlyMessage:l,confirmDelete:r,busy:i=!1,onConfirmDelete:s,onCancelDelete:u,onRequestDelete:f}){const h=Oe();return m.jsx("div",{className:"min-w-0 p-4 border-t border-border",children:t?m.jsx("p",{className:"text-center text-xs text-muted-foreground",children:l??h("row.readOnlyTableBody")}):r?m.jsxs("div",{className:"flex w-full min-w-0 max-w-full flex-wrap items-center gap-2 overflow-hidden",children:[m.jsxs(we,{variant:"destructive",size:"sm",className:"min-w-0 max-w-full flex-1 basis-0 text-xs",disabled:i,onClick:s,children:[m.jsx(Pd,{className:"h-3 w-3 mr-1.5"}),h("row.confirmDelete")]}),m.jsxs(we,{variant:"ghost",size:"sm",className:"shrink-0 text-xs text-muted-foreground",disabled:i,onClick:u,children:[m.jsx(uE,{className:"h-3 w-3 mr-1"}),h("common.cancel")]})]}):m.jsxs(we,{variant:"ghost",size:"sm",className:"w-full text-xs text-destructive hover:text-destructive hover:bg-destructive/10",disabled:i,onClick:f,children:[m.jsx(Pd,{className:"h-3 w-3 mr-1.5"}),h("row.deleteRow")]})})}const mv=560,pR="row-detail-drawer-shell",vR="absolute top-0 right-0 h-full z-10 box-border min-w-0 w-full max-w-full overflow-x-hidden shadow-2xl animate-in slide-in-from-right duration-200",yR={width:`min(${mv}px, 100%)`,maxWidth:`min(${mv}px, 100%)`,minWidth:0,maxInlineSize:"100%",boxSizing:"border-box",overflowX:"hidden"};function Wd({children:t,className:l}){return m.jsx("div",{"data-testid":pR,className:_e(vR,l),style:yR,children:t})}function bR(t,l){const r=t.trim().split(/\s+/);if(r.length<5)return t;const[i,s,u,f,h]=r;if(i==="*"&&s==="*")return l("scheduler.everyMinute");if(s==="*"&&i.startsWith("*/"))return l("scheduler.everyMinutes",{count:i.slice(2)});if(i==="0"&&s==="*")return l("scheduler.everyHour");if(s.startsWith("*/"))return l("scheduler.everyHours",{count:s.slice(2)});if(i==="0"&&s==="0"&&u==="*"&&f==="*"&&h==="*")return l("scheduler.dailyMidnight");if(i==="0"&&u==="*"&&f==="*"&&h==="*")return l("scheduler.dailyAt",{time:`${s}:00`});if(i!=="*"&&s!=="*"&&u==="*"&&f==="*"&&h==="*")return l("scheduler.dailyAt",{time:`${s}:${i.padStart(2,"0")}`});if(h==="1-5"||h==="MON-FRI")return l("scheduler.weekdaysAt",{time:`${s}:${i.padStart(2,"0")}`});const p={0:l("scheduler.day.sunday"),1:l("scheduler.day.monday"),2:l("scheduler.day.tuesday"),3:l("scheduler.day.wednesday"),4:l("scheduler.day.thursday"),5:l("scheduler.day.friday"),6:l("scheduler.day.saturday"),7:l("scheduler.day.sunday"),SUN:l("scheduler.day.sunday"),MON:l("scheduler.day.monday"),TUE:l("scheduler.day.tuesday"),WED:l("scheduler.day.wednesday"),THU:l("scheduler.day.thursday"),FRI:l("scheduler.day.friday"),SAT:l("scheduler.day.saturday")}[h.toUpperCase()];return p&&u==="*"&&f==="*"?l("scheduler.everyDayAt",{day:p,time:`${s}:${i.padStart(2,"0")}`}):u==="1"&&f==="*"?l("scheduler.monthlyFirst",{time:`${s}:${i.padStart(2,"0")}`}):t}function xR({crons:t,pendingJobs:l,failedJobs:r}){const i=Oe();return m.jsxs("div",{className:"flex-1 overflow-auto p-4 space-y-6",children:[m.jsxs("div",{children:[m.jsxs("h3",{className:"text-sm font-medium text-muted-foreground mb-3 flex items-center gap-2",children:[m.jsx(bE,{className:"h-3.5 w-3.5"}),i("scheduler.cronJobs"),m.jsx(Ze,{variant:"outline",className:"text-[10px]",children:t.length})]}),m.jsxs("div",{className:"space-y-1",children:[t.map((s,u)=>m.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5 rounded-md border border-border hover:bg-accent/50 transition-colors",children:[m.jsx(Py,{className:"h-3.5 w-3.5 text-green-500 shrink-0"}),m.jsxs("div",{className:"flex-1 min-w-0",children:[m.jsx("p",{className:"text-sm font-mono font-medium truncate",children:s.name}),m.jsx("p",{className:"text-xs text-muted-foreground",children:bR(s.pattern,i)})]}),m.jsx(Ze,{variant:"secondary",className:"font-mono text-[10px] shrink-0",children:s.pattern})]},`${s.name}-${u}`)),t.length===0&&m.jsxs("div",{className:"text-center text-muted-foreground py-8",children:[m.jsx(v2,{className:"mx-auto h-10 w-10 mb-2 opacity-30"}),m.jsx("p",{className:"text-sm",children:i("scheduler.noCrons")}),m.jsx("p",{className:"text-xs mt-1",children:i("scheduler.defineCrons")})]})]})]}),m.jsxs("div",{children:[m.jsxs("h3",{className:"text-sm font-medium text-muted-foreground mb-3 flex items-center gap-2",children:[m.jsx(Ms,{className:"h-3.5 w-3.5"}),i("scheduler.pendingJobs"),m.jsx(Ze,{variant:"outline",className:"text-[10px]",children:l.length})]}),m.jsxs("div",{className:"space-y-1",children:[l.map(s=>m.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5 rounded-md border border-border hover:bg-accent/50 transition-colors",children:[m.jsx(Ms,{className:"h-3.5 w-3.5 text-yellow-500 animate-pulse shrink-0"}),m.jsxs("div",{className:"flex-1 min-w-0",children:[m.jsx("p",{className:"text-sm font-mono font-medium truncate",children:s.action}),m.jsx("p",{className:"text-xs text-muted-foreground",children:s.scheduledLabel})]}),m.jsx(Ze,{variant:"secondary",className:"text-[10px] shrink-0",children:s.remainingLabel})]},s.id)),l.length===0&&m.jsx("p",{className:"text-xs text-muted-foreground text-center py-4",children:i("scheduler.noPending")})]})]}),r!==void 0&&m.jsxs("section",{children:[m.jsxs("h3",{className:"mb-3 flex items-center gap-2 text-sm font-medium text-muted-foreground",children:[i("scheduler.failedJobs"),m.jsx(Ze,{variant:"outline",className:"text-[10px]",children:r.length})]}),m.jsx("div",{className:"space-y-1",children:r.map(s=>m.jsxs("div",{className:"rounded-md border border-border px-3 py-2.5",children:[m.jsx("p",{className:"truncate font-mono text-sm font-medium",children:s.action}),m.jsx("p",{className:"text-xs text-muted-foreground",children:s.failedLabel})]},s.id))}),r.length===0&&m.jsx("p",{className:"py-4 text-center text-xs text-muted-foreground",children:i("scheduler.noFailed")})]})]})}function Os(t){return t<1024?String(t)+" B":t<1024*1024?(t/1024).toFixed(1)+" KB":(t/1024/1024).toFixed(1)+" MB"}function wR(t,l){return t?b0(t,l).nextAction:l==="ko"?"쓰기 작업이 진행 중입니다. 작업 결과를 확인할 때까지 편집과 삭제가 차단됩니다.":"A write is pending. Editing and deletion remain blocked until its outcome is known."}function b0(t,l){return l!=="ko"||t.stage!=="tenant-mutation-guard"?t:t.code==="DASHBOARD_PERSISTENCE_UNAVAILABLE"?{...t,nextAction:"현재 탭의 브라우저 세션 저장소를 허용한 뒤 대시보드를 다시 열고, 해당 리소스를 확인한 후 직접 작업하세요.",retryPrecondition:"현재 탭의 세션 저장소를 복구한 뒤 대시보드를 다시 열고 해당 리소스를 확인하세요."}:["DASHBOARD_WRITE_UNCERTAIN","DASHBOARD_SCOPE_CHANGED","DASHBOARD_GUARD_INPUT_INVALID"].includes(t.code)?{...t,nextAction:"새로고침으로 해당 리소스의 현재 상태를 직접 확인한 후 작업하세요. 롤백이나 자동 재시도를 의미하지 않습니다.",retryPrecondition:"현재 앱과 실행 세대에서 해당 리소스의 상태를 직접 확인하세요."}:t}function st({error:t,stale:l=!1}){const r=Oe(),{locale:i}=_n();return t?m.jsxs(m.Fragment,{children:[l&&m.jsx("p",{className:"px-4 py-2 text-xs text-amber-600",children:r("dashboard.staleData")}),m.jsx(jE,{diagnostic:b0(t.diagnostic,i),labels:{title:r("diagnostic.title"),code:r("diagnostic.code"),stage:r("diagnostic.stage"),stateImpact:r("diagnostic.stateImpact"),nextAction:r("diagnostic.nextAction"),retryPrecondition:r("diagnostic.retryPrecondition"),retryable:r("diagnostic.retryable"),retryYes:r("diagnostic.retryYes"),retryNo:r("diagnostic.retryNo"),command:r("diagnostic.command"),operation:r("diagnostic.operation"),correlation:r("diagnostic.correlation")}})]}):null}function SR({status:t}){const l=Oe();return m.jsxs("div",{className:"p-6",children:[m.jsx(wf,{}),t.error?m.jsxs(m.Fragment,{children:[m.jsx(st,{error:t.error}),m.jsx("button",{type:"button",onClick:t.refresh,children:l("common.refresh")})]}):m.jsx("p",{children:l("common.loading")})]})}class Fe extends Error{constructor(l){super(l.code),this.diagnostic=l,this.name="TenantAdminError"}}function Un(t){return t instanceof Error&&t.name==="AbortError"}function Mr(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)?t:void 0}function cn(t){if(!(typeof t!="string"||!t.trim()||t.length>512)&&!/[\x00-\x1f]|Bearer\s|(?:password|secret|token|api[_-]?key)\s*[:=]|(?:SELECT|INSERT|UPDATE|DELETE)\s+.*\b(?:FROM|INTO|SET)\b|\/(?:home|Users|etc|var|tmp)\//i.test(t))return t}function ef(t){return typeof t=="string"&&/^[a-zA-Z0-9_.:-]{1,160}$/.test(t)?t:void 0}function ER(t,l){const r=cn(t.stateImpact),i=typeof t.stateChanged=="boolean"?t.stateChanged?"changed":"unchanged":void 0;if("dataImpact"in t){const s=t.dataImpact==="none"?"unchanged":t.dataImpact==="committed"?"changed":"unknown";return r!==void 0&&r!==s||i!==void 0&&i!==s?"unknown":s}return r??i??(l?"unknown":"unchanged")}function Or(t,l,r,i,s){const u=Mr(i),f=Mr(u==null?void 0:u.error)??Mr(u==null?void 0:u.diagnostic)??u,h={...u,...f,...Mr(f==null?void 0:f.details)},g=typeof(f==null?void 0:f.code)=="string"&&/^[A-Z][A-Z0-9_]{1,100}$/.test(f.code)?f.code:t,p=Mr(h==null?void 0:h.nextAction),y=cn(h.hint),v=typeof h.nextAction=="string"&&/^[A-Z][A-Z0-9_]+$/.test(h.nextAction)?h.nextAction:void 0;return{code:g,stage:cn(h==null?void 0:h.stage)??"tenant-admin",capability:cn(h==null?void 0:h.capability),httpStatus:r,stateImpact:ER(h,l),retryable:typeof(h==null?void 0:h.retryable)=="boolean"?h.retryable:!l&&!y&&![401,403,404,501].includes(r??0),retryPrecondition:cn(h==null?void 0:h.retryPrecondition),nextAction:(v?y:cn(h==null?void 0:h.nextAction))??cn(p==null?void 0:p.message)??y??(l?"Inspect the current state before retrying; the operation outcome is unknown.":r===401||r===403?"Check access to this app before trying again.":t==="DASHBOARD_CAPABILITY_UNAVAILABLE"?"This feature is unavailable for this runtime.":"Refresh this view after checking that the runtime is reachable."),nextActionKind:v,retryClass:cn(h.retryClass),userAction:cn(h.userAction),command:cn(h==null?void 0:h.command)??cn(p==null?void 0:p.command),operationId:ef((h==null?void 0:h.operationId)??(u==null?void 0:u.operationId)),correlationId:ef((h==null?void 0:h.correlationId)??(u==null?void 0:u.correlationId))??s}}function CR(t,l){const r=Mr(t);if(!r||r.code!==l.code||r.capability!==l.capability||r.stage!=="request"||r.servingStarted!=="unchanged"||typeof r.dataImpact!="string"||!["none","committed","unknown"].includes(r.dataImpact)||r.retryable!==!1||!cn(r.nextAction)||!cn(r.retryPrecondition)||!ef(r.correlationId))throw new Error("Invalid Runtime administration diagnosis");const i=Or(l.code,!0,void 0,r),s=r.dataImpact==="none"?"unchanged":r.dataImpact==="committed"?"changed":"unknown";if(i.stateImpact!==s||r.stateImpact!==void 0&&r.stateImpact!==s||r.stateChanged!==void 0&&(typeof r.stateChanged!="boolean"||(r.stateChanged?"changed":"unchanged")!==s))throw new Error("Conflicting Runtime administration impact");return i}function x0(t){const l=t.split(";",1)[0].trim().toLowerCase();return/^[a-z0-9!#$&^_.+-]+\/[a-z0-9!#$&^_.+-]+$/u.test(l)?l:"application/octet-stream"}function RR(t){return/^image\/(?:png|jpeg|gif|webp|avif)$/u.test(x0(t))}async function NR(t,l,r){var f,h;let i,s=!1;const u=()=>{i==null||i.cancel().catch(()=>{})};try{const g=x0(l.type);if(t.headers.get("content-type")!==g||t.headers.get("content-length")!==String(l.size)||t.headers.get("x-content-type-options")!=="nosniff"||!/^(?:inline|attachment);/u.test(t.headers.get("content-disposition")??""))throw new Error("Invalid scoped content headers");if(r!=null&&r.aborted)throw new DOMException("Cancelled","AbortError");i=(f=t.body)==null?void 0:f.getReader(),r==null||r.addEventListener("abort",u,{once:!0});const p=[];let y=0;if(i)for(;;){const x=await i.read();if(r!=null&&r.aborted)throw new DOMException("Cancelled","AbortError");if(x.done)break;if(!(x.value instanceof Uint8Array)||x.value.byteLength>l.size-y)throw new Error("Unbounded scoped content");const S=new Uint8Array(x.value.byteLength);S.set(x.value),y+=S.byteLength,p.push(S.buffer)}if(y!==l.size)throw new Error("Incomplete scoped content");const v=/^(?:image\/(?:png|jpeg|gif|webp|avif)|audio\/(?:mpeg|wav|ogg)|video\/(?:mp4|webm))$/u.test(g)?g:"application/octet-stream",C=new Blob(p,{type:v});return s=!0,C}finally{r==null||r.removeEventListener("abort",u),s||(i?await i.cancel().catch(()=>{}):await((h=t.body)==null?void 0:h.cancel().catch(()=>{}))),i==null||i.releaseLock()}}let _R=0;function w0(t){const l=t&&Object.freeze({appId:t.appId,generationId:t.generationId});if(l&&[l.appId,l.generationId].some(u=>!/^[A-Za-z0-9_-]{1,160}$/u.test(u)))throw new Error("Invalid local Runtime observation scope.");const r="";async function i(u,f={}){var E;const h=new URL(u,"http://tenant-admin.invalid");let g;try{g=decodeURIComponent(u.split("?")[0])}catch{throw new Error("Invalid tenant request path encoding.")}if(!u.startsWith("/_admin/")&&!u.startsWith("/api/")||g.includes("\\")||g.split("/").some(R=>R==="."||R==="..")||h.origin!=="http://tenant-admin.invalid"||!h.pathname.startsWith(`${r}/_admin/`)&&!h.pathname.startsWith(`${r}/api/`))throw new Error("Tenant requests require an app-relative admin or procedure path.");const{stateful:p,...y}=f,v=p??(f.method!==void 0&&!["GET","HEAD"].includes(f.method.toUpperCase()));let C;const x=new Headers(y.headers);let S;if(h.pathname.startsWith("/_admin/")){const R=x.get("x-correlation-id");S=R&&/^[A-Za-z0-9._-]{1,128}$/u.test(R)?R:`dashboard-${Date.now().toString(36)}-${(++_R).toString(36)}`,x.set("x-correlation-id",S)}l&&h.pathname.startsWith("/_admin/")&&h.pathname!=="/_admin/status"&&(x.set("x-gencow-local-app",l.appId),x.set("x-gencow-local-generation",l.generationId));try{C=await fetch(u,{...y,headers:x,credentials:"same-origin"})}catch(R){throw(E=f.signal)!=null&&E.aborted||Un(R)?R:new Fe(Or("DASHBOARD_NETWORK_ERROR",v,void 0,void 0,S))}return{response:C,mutation:v,correlation:S}}async function s(u,f,h,g){let p;try{p=await u.json()}catch(v){if(g!=null&&g.aborted||Un(v))throw v}if(g!=null&&g.aborted)throw new DOMException("Cancelled","AbortError");const y=u.status===404||u.status===501?"DASHBOARD_CAPABILITY_UNAVAILABLE":u.status===401||u.status===403?"DASHBOARD_ACCESS_DENIED":"DASHBOARD_HTTP_ERROR";throw new Fe(Or(y,f,u.status,p,h))}return{async fileContent(u,f,h){if(h!=null&&h.aborted)throw new DOMException("Cancelled","AbortError");if(!l||!/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iu.test(u)||!Number.isSafeInteger(f.size)||f.size<0||typeof f.type!="string"||!f.type||f.type.length>256||/[\x00-\x1f]/u.test(f.type))throw new Fe({code:l?"DASHBOARD_FILES_INPUT_INVALID":"DASHBOARD_FILES_SCOPE_UNAVAILABLE",stage:"files-read",capability:"storage",stateImpact:"unchanged",retryable:!1,retryPrecondition:"Use current Files metadata and the app's current discovered generation.",nextAction:"Refresh Files in the current app before previewing or downloading a current object. No file changed."});const{response:g,correlation:p}=await i("/_admin/files/"+u+"/content",{method:"GET",signal:h,redirect:"error"});if(!g.ok)return s(g,!1,p,h);try{return await NR(g,f,h)}catch(y){throw h!=null&&h.aborted||Un(y)?y:new Fe({...Or("DASHBOARD_INVALID_RESPONSE",!1,g.status,void 0,p),stage:"files-read",capability:"storage",retryable:!1,retryPrecondition:"Inspect the current object metadata and selected storage readiness first.",nextAction:"Refresh Files and inspect the intended object before previewing or downloading it. No file changed."})}},async request(u,f,h={}){var C;const{response:g,mutation:p,correlation:y}=await i(u,h);if(!g.ok)return s(g,p,y,h.signal??void 0);let v;try{v=await g.json()}catch(x){throw(C=h.signal)!=null&&C.aborted||Un(x)?x:new Fe(Or("DASHBOARD_INVALID_RESPONSE",p,g.status,void 0,y))}try{return f(v,g.status)}catch{throw new Fe(Or("DASHBOARD_INVALID_RESPONSE",p,g.status,void 0,y))}}}}function AR(t){for(const l of["generated","hasDefault"])if(t[l]!==void 0&&typeof t[l]!="boolean")throw Error("Invalid generation metadata");return{...typeof t.generated=="boolean"?{generated:t.generated}:{},...typeof t.hasDefault=="boolean"?{hasDefault:t.hasDefault}:{}}}function zs(t){return"generated"in t&&t.generated===!0}function hv(t){return!zs(t)&&!t.nullable&&t.default===null&&!("hasDefault"in t&&t.hasDefault===!0)}function Ae(t){if(t===null||typeof t!="object"||Array.isArray(t))throw new Error("Expected an object");return t}function De(t){if(typeof t!="string")throw new Error("Expected text");return t}function dn(t){if(typeof t!="number"||!Number.isFinite(t)||t<0)throw new Error("Expected a nonnegative number");return t}function Cn(t){if(!Array.isArray(t))throw new Error("Expected a list");return t}const gv=["data","functions","files","auth","scheduler","logs","settings","realtime"];function pv(t){const l=De(t);if(!/^[A-Za-z0-9_-]{1,160}$/u.test(l))throw Error("Invalid Runtime observation identity");return l}function jR(t){if(t.runtime!=="standalone"&&t.generationId===void 0&&t.transports===void 0)return;if(t.runtime!=="standalone"||t.ok!==!0)throw Error("Invalid Runtime profile");const l=Ae(t.capabilities);if(gv.some(i=>typeof l[i]!="boolean")||l.realtime!==!1||Object.values(l).some(i=>typeof i!="boolean"))throw Error("Incomplete Runtime capabilities");const r=Ae(Ae(t.operations).auth);if(["inspect","updateProfile","deleteUser"].some(i=>typeof r[i]!="boolean")||r.inspect!==l.auth||r.inspect===!1&&(r.updateProfile===!0||r.deleteUser===!0))throw Error("Invalid Auth operation availability");if(Ae(t.transports).logs!=="poll")throw Error("Invalid Runtime Logs transport");return{profile:"local-runtime",appId:pv(t.appId),generationId:pv(t.generationId),capabilities:Object.fromEntries(gv.map(i=>[i,l[i]])),operations:{auth:{inspect:r.inspect,updateProfile:r.updateProfile,deleteUser:r.deleteUser}},transports:{logs:"poll"}}}function TR(t){const l=Ae(t),r=Ae(l.memory),i=Ae(l.platform),s=l.capabilities===void 0?void 0:Ae(l.capabilities);if(s&&Object.values(s).some(f=>typeof f!="boolean"))throw new Error("Invalid capabilities");const u=jR(l);return{uptime:dn(l.uptime),memory:{rss:dn(r.rss),heapUsed:dn(r.heapUsed)},platform:{runtime:De(i.runtime),dbVersion:De(i.dbVersion),framework:typeof i.framework=="string"?i.framework:void 0,orm:typeof i.orm=="string"?i.orm:void 0,extensions:i.extensions===void 0?[]:Cn(i.extensions).map(f=>{const h=Ae(f);return{name:De(h.name),version:De(h.version)}})},capabilities:s,...u}}function kR(t){const l=Ae(t);return Object.fromEntries(Object.entries(l).map(([r,i])=>[r,Cn(i).map(s=>{const u=Ae(s);if(typeof u.nullable!="boolean")throw new Error("Invalid nullable column");if(u.default!==null&&typeof u.default!="string")throw new Error("Invalid column default");for(const h of["readOnly"])if(u[h]!==void 0&&typeof u[h]!="boolean")throw new Error("Invalid table visibility metadata");const f=u.references===void 0?void 0:Ae(u.references);return{...AR(u),...typeof u.readOnly=="boolean"?{readOnly:u.readOnly}:{},column:De(u.column),type:De(u.type),nullable:u.nullable,default:u.default,primaryKey:typeof u.primaryKey=="boolean"?u.primaryKey:void 0,references:f?{table:De(f.table),column:De(f.column)}:void 0}})]))}function S0(t){const l=Ae(t);return{data:Cn(l.data).map(Ae),total:dn(l.total),limit:dn(l.limit),offset:dn(l.offset)}}function E0(t){const l=Ae(t);if(!(typeof l.id=="string"&&l.id.length>0)&&!(typeof l.id=="number"&&Number.isFinite(l.id)))throw new Error("Missing written row identity");return l}function DR(t){if(Ae(t).success!==!0)throw new Error("Missing delete acknowledgement");return{success:!0}}function Ta({requestKey:t,load:l,enabled:r=!0,refreshInterval:i}){const[s,u]=w.useState({requestKey:t,readRevision:0,loading:r}),[f,h]=w.useState(0),g=w.useRef(t),p=w.useRef(l),y=w.useRef(0);g.current=t,p.current=l;const v=w.useCallback(()=>{const x=++y.current;return h(x),Object.freeze({requestKey:g.current,readRevision:x})},[]);w.useEffect(()=>{if(!r)return;let x=!0,S=0,E;const R=async()=>{if(!x||g.current!==t||E)return;const j=++S,A=new AbortController;E=A,u(L=>({requestKey:t,readRevision:f,data:L.requestKey===t?L.data:void 0,loading:!0}));try{const L=await p.current(A.signal);x&&!A.signal.aborted&&j===S&&g.current===t&&u({requestKey:t,readRevision:f,data:L,loading:!1})}catch(L){if(!x||A.signal.aborted||j!==S||g.current!==t||Un(L))return;const M=L instanceof Fe?L:new Fe({code:"DASHBOARD_NETWORK_ERROR",stateImpact:"unchanged",retryable:!0,nextAction:"Refresh this view after checking that the runtime is reachable."});u(K=>({requestKey:t,readRevision:f,data:K.requestKey===t?K.data:void 0,loading:!1,error:M}))}finally{E===A&&(E=void 0)}};R();const _=i?setInterval(()=>{R()},i):void 0;return()=>{x=!1,S++,E==null||E.abort(),_!==void 0&&clearInterval(_)}},[t,r,f,i]);const C=s.requestKey===t&&r?s:{requestKey:t,readRevision:f,loading:r};return{...C,stale:!!(C.error&&C.data!==void 0),refresh:v}}const tf=/^[A-Za-z0-9_-]{1,160}$/u,MR=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\.[0-9a-f]{32}$/u,OR=["appId","generationId","operationId","state","surface","version"];let zR=0;function Ca(t,l,r){return new Fe({code:t,stage:"tenant-mutation-guard",capability:"dashboard",stateImpact:l,retryable:!1,operationId:r==null?void 0:r.operationId,correlationId:`local-guard-${Date.now().toString(36)}-${(++zR).toString(36)}`,retryPrecondition:t==="DASHBOARD_PERSISTENCE_UNAVAILABLE"?"Restore working same-tab session storage, then reopen and inspect the affected resource.":"Explicitly inspect the affected resource in the current app and generation.",nextAction:t==="DASHBOARD_PERSISTENCE_UNAVAILABLE"?"Allow same-tab browser session storage, reopen this dashboard and inspect the affected resource before a deliberate action.":"Inspect the affected resource with an explicit Refresh before a deliberate action; no rollback or automatic retry is implied."})}function LR(t,l){if(t.length>1024)throw Error("invalid record size");const r=JSON.parse(t);if(!r||typeof r!="object"||Array.isArray(r))throw Error("invalid record");const i=r;if(Object.keys(i).sort().join()!==OR.join()||i.version!==1||i.appId!==l||typeof i.generationId!="string"||!tf.test(i.generationId)||typeof i.operationId!="string"||!MR.test(i.operationId)||!["data","auth","files"].includes(String(i.surface))||!["pending","unknown"].includes(String(i.state)))throw Error("invalid record");return Object.freeze({...i,state:"unknown"})}async function vv(t,l,r,i){const s=await crypto.subtle.digest("SHA-256",new TextEncoder().encode(JSON.stringify([t,l,r,i])));return[...new Uint8Array(s)].map(u=>u.toString(16).padStart(2,"0")).join("").slice(0,32)}function UR(t,l,r){if(![t,l].every(x=>tf.test(x)))throw Error("Invalid Runtime scope");const i=`gencow.local.runtime.mutation.v1.${t}`;let s=l,u=0,f=Object.freeze({phase:"ready"});const h=new Set;function g(x){f=Object.freeze(x);for(const S of h)S()}function p(x,S="unknown"){const E=Ca("DASHBOARD_PERSISTENCE_UNAVAILABLE",S,x);return g({phase:"blocked",record:x,error:E}),E}function y(x){const S=r(),E=JSON.stringify(x);if(S.setItem(i,E),S.getItem(i)!==E)throw Error("persistence not retained")}try{const x=r().getItem(i);if(x!==null){const S=LR(x,t);f=Object.freeze({phase:"unknown",record:S,error:Ca("DASHBOARD_WRITE_UNCERTAIN","unknown",S)}),y(S)}}catch{p(f.record)}function v(x){var S;return f.phase==="pending"&&((S=f.record)==null?void 0:S.operationId)===x.operationId&&x.appId===t&&x.generationId===s&&x.generationId===f.record.generationId&&x.surface===f.record.surface}function C(x){try{const S=r();if(S.removeItem(i),S.getItem(i)!==null)throw Error("cleanup not retained");return u++,g({phase:"ready"}),!0}catch{const S=Object.freeze({...x,state:"unknown"});try{y(S)}catch{}return p(S),!1}}return Object.freeze({snapshot:()=>f,subscribe(x){return h.add(x),()=>{h.delete(x)}},enterGeneration(x){if(!tf.test(x))throw Error("Invalid Runtime generation");if(x===s||(s=x,u++,f.phase!=="pending"))return;if(!f.record){g({phase:"ready"});return}const S=Object.freeze({...f.record,state:"unknown"});try{y(S),g({phase:"unknown",record:S,error:Ca("DASHBOARD_WRITE_UNCERTAIN","unknown",S)})}catch{p(S)}},async begin(x,S,E){if(f.phase!=="ready")throw f.error??Ca("DASHBOARD_WRITE_UNCERTAIN","unknown",f.record);if(S!==s)throw Ca("DASHBOARD_SCOPE_CHANGED","unchanged");if(!E||E.length>512||!["data","auth","files"].includes(x))throw Ca("DASHBOARD_GUARD_INPUT_INVALID","unchanged");const R=++u;g({phase:"pending"});let _;try{const j=crypto.randomUUID(),A=await vv(t,x,j,E);if(R!==u||S!==s)throw Ca("DASHBOARD_SCOPE_CHANGED","unchanged");return _=Object.freeze({version:1,appId:t,generationId:s,operationId:`${j}.${A}`,surface:x,state:"pending"}),y(_),g({phase:"pending",record:_}),_}catch{throw R!==u?Ca("DASHBOARD_SCOPE_CHANGED","unchanged"):p(_,"unchanged")}},acknowledge(x){return v(x)&&C(x)},reject(x,S){if(!v(x))return!1;if((S==null?void 0:S.diagnostic.stateImpact)==="unchanged")return C(x);const E=Object.freeze({...x,state:"unknown"}),R=S?new Fe({...S.diagnostic,operationId:S.diagnostic.operationId??E.operationId}):Ca("DASHBOARD_WRITE_UNCERTAIN","unknown",E);try{y(E),g({phase:"unknown",record:E,error:R})}catch{p(E)}return!1},async inspect(x,S,E,R){const _=f.record,j=u;if(!_||f.phase==="pending"||_.state!=="unknown"||_.surface!==x||_.operationId!==R||E!==s)return!1;const[A,L]=R.split(".");let M;try{M=await vv(t,x,A,S)}catch{return!1}return M!==L||u!==j||s!==E||f.record!==_?!1:C(_)}})}const C0=w.createContext(null);function BR(t){const l=t.targetId??"local-runtime";return m.jsx(HR,{...t,identity:l},l)}function HR(t){var R,_,j;const{identity:l,children:r,appStatus:i="running",backendStatus:s,staticOnly:u,appName:f}=t,[h,g]=w.useState(0),p=w.useMemo(()=>w0(),[f]),y=w.useRef(t.discoveryProfile==="local-runtime"||typeof document<"u"&&((R=document.querySelector('meta[name="gencow-runtime-profile"]'))==null?void 0:R.getAttribute("content"))==="local-runtime"),v=i==="running"&&s!=="none"&&!u,C=w.useCallback(()=>(g(A=>A+1),()=>g(A=>Math.max(0,A-1))),[]),x=Ta({requestKey:`${l}:status`,enabled:(y.current||h>0)&&v,refreshInterval:5e3,load:A=>p.request("/_admin/status",L=>{const M=TR(L);if(y.current&&M.profile!=="local-runtime")throw Error("Runtime discovery cannot downgrade");return M.profile==="local-runtime"&&(y.current=!0),M},{signal:A})}),S=((_=x.data)==null?void 0:_.profile)==="local-runtime"?`${x.data.appId}:${x.data.generationId}`:l,E=((j=x.data)==null?void 0:j.profile)==="local-runtime"?x.data.appId:l;return m.jsx(VR,{...t,identity:S,status:x,retainStatus:C,waiting:y.current&&v&&!x.data,children:r},E)}function VR(t){var s,u;const{status:l}=t,r=((s=l.data)==null?void 0:s.profile)==="local-runtime"?l.data.appId:void 0,i=w.useMemo(()=>r?UR(r,l.data.generationId,()=>window.sessionStorage):void 0,[r]);return w.useEffect(()=>{var f;(f=l.data)!=null&&f.generationId&&(i==null||i.enterGeneration(l.data.generationId))},[i,(u=l.data)==null?void 0:u.generationId]),m.jsx(IR,{...t,mutationGuard:i},t.identity)}function IR({identity:t,children:l,appStatus:r="running",backendStatus:i,hasStatic:s,staticOnly:u,status:f,retainStatus:h,waiting:g,mutationGuard:p}){var A,L,M;const[y,v]=w.useState(0),[C,x]=w.useState("filtered"),S=w.useMemo(()=>{var K;return w0(((K=f.data)==null?void 0:K.profile)==="local-runtime"?{appId:f.data.appId,generationId:f.data.generationId}:void 0)},[t,(A=f.data)==null?void 0:A.profile,(L=f.data)==null?void 0:L.appId,(M=f.data)==null?void 0:M.generationId]),E=typeof window>"u"?"":window.location.origin,R=r==="running"&&i!=="none"&&!u,_=w.useCallback(K=>K==="status"?h():(v(X=>X+1),()=>v(X=>Math.max(0,X-1))),[h]),j=Ta({requestKey:`${t}:tables:${C}`,enabled:!g&&y>0&&R,load:K=>S.request(C==="all"?"/_admin/tables?view=all":"/_admin/tables",kR,{signal:K})});return m.jsx(C0.Provider,{value:{apiBase:E,targetId:t,client:S,appStatus:r,backendStatus:i,hasStatic:s,staticOnly:u,status:f,tables:j,tableView:C,setTableView:x,retainResource:_,mutationGuard:p},children:g?m.jsx(SR,{status:f}):l})}function Dt(){const t=w.useContext(C0);if(!t)throw new Error("Tenant administration requires an application-owned DashboardProvider");return t}function R0(t){const l=Dt();return w.useEffect(()=>l.retainResource(t),[t,l.retainResource]),l}function Ys(){return R0("status").status}function FR(){return R0("tables").tables}var jd={exports:{}},zi={},Td={exports:{}},kd={};/**
|
|
367
|
+
* @license React
|
|
368
|
+
* scheduler.production.js
|
|
369
|
+
*
|
|
370
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
371
|
+
*
|
|
372
|
+
* This source code is licensed under the MIT license found in the
|
|
373
|
+
* LICENSE file in the root directory of this source tree.
|
|
374
|
+
*/var yv;function qR(){return yv||(yv=1,(function(t){function l(O,G){var ae=O.length;O.push(G);e:for(;0<ae;){var ve=ae-1>>>1,ne=O[ve];if(0<s(ne,G))O[ve]=G,O[ae]=ne,ae=ve;else break e}}function r(O){return O.length===0?null:O[0]}function i(O){if(O.length===0)return null;var G=O[0],ae=O.pop();if(ae!==G){O[0]=ae;e:for(var ve=0,ne=O.length,k=ne>>>1;ve<k;){var P=2*(ve+1)-1,$=O[P],W=P+1,V=O[W];if(0>s($,ae))W<ne&&0>s(V,$)?(O[ve]=V,O[W]=ae,ve=W):(O[ve]=$,O[P]=ae,ve=P);else if(W<ne&&0>s(V,ae))O[ve]=V,O[W]=ae,ve=W;else break e}}return G}function s(O,G){var ae=O.sortIndex-G.sortIndex;return ae!==0?ae:O.id-G.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;t.unstable_now=function(){return u.now()}}else{var f=Date,h=f.now();t.unstable_now=function(){return f.now()-h}}var g=[],p=[],y=1,v=null,C=3,x=!1,S=!1,E=!1,R=!1,_=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function L(O){for(var G=r(p);G!==null;){if(G.callback===null)i(p);else if(G.startTime<=O)i(p),G.sortIndex=G.expirationTime,l(g,G);else break;G=r(p)}}function M(O){if(E=!1,L(O),!S)if(r(g)!==null)S=!0,K||(K=!0,ee());else{var G=r(p);G!==null&&he(M,G.startTime-O)}}var K=!1,X=-1,U=5,le=-1;function ye(){return R?!0:!(t.unstable_now()-le<U)}function q(){if(R=!1,K){var O=t.unstable_now();le=O;var G=!0;try{e:{S=!1,E&&(E=!1,j(X),X=-1),x=!0;var ae=C;try{t:{for(L(O),v=r(g);v!==null&&!(v.expirationTime>O&&ye());){var ve=v.callback;if(typeof ve=="function"){v.callback=null,C=v.priorityLevel;var ne=ve(v.expirationTime<=O);if(O=t.unstable_now(),typeof ne=="function"){v.callback=ne,L(O),G=!0;break t}v===r(g)&&i(g),L(O)}else i(g);v=r(g)}if(v!==null)G=!0;else{var k=r(p);k!==null&&he(M,k.startTime-O),G=!1}}break e}finally{v=null,C=ae,x=!1}G=void 0}}finally{G?ee():K=!1}}}var ee;if(typeof A=="function")ee=function(){A(q)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,oe=ie.port2;ie.port1.onmessage=q,ee=function(){oe.postMessage(null)}}else ee=function(){_(q,0)};function he(O,G){X=_(function(){O(t.unstable_now())},G)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(O){O.callback=null},t.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<O?Math.floor(1e3/O):5},t.unstable_getCurrentPriorityLevel=function(){return C},t.unstable_next=function(O){switch(C){case 1:case 2:case 3:var G=3;break;default:G=C}var ae=C;C=G;try{return O()}finally{C=ae}},t.unstable_requestPaint=function(){R=!0},t.unstable_runWithPriority=function(O,G){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var ae=C;C=O;try{return G()}finally{C=ae}},t.unstable_scheduleCallback=function(O,G,ae){var ve=t.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?ve+ae:ve):ae=ve,O){case 1:var ne=-1;break;case 2:ne=250;break;case 5:ne=1073741823;break;case 4:ne=1e4;break;default:ne=5e3}return ne=ae+ne,O={id:y++,callback:G,priorityLevel:O,startTime:ae,expirationTime:ne,sortIndex:-1},ae>ve?(O.sortIndex=ae,l(p,O),r(g)===null&&O===r(p)&&(E?(j(X),X=-1):E=!0,he(M,ae-ve))):(O.sortIndex=ne,l(g,O),S||x||(S=!0,K||(K=!0,ee()))),O},t.unstable_shouldYield=ye,t.unstable_wrapCallback=function(O){var G=C;return function(){var ae=C;C=G;try{return O.apply(this,arguments)}finally{C=ae}}}})(kd)),kd}var bv;function $R(){return bv||(bv=1,Td.exports=qR()),Td.exports}/**
|
|
375
|
+
* @license React
|
|
376
|
+
* react-dom-client.production.js
|
|
377
|
+
*
|
|
378
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
379
|
+
*
|
|
380
|
+
* This source code is licensed under the MIT license found in the
|
|
381
|
+
* LICENSE file in the root directory of this source tree.
|
|
382
|
+
*/var xv;function GR(){if(xv)return zi;xv=1;var t=$R(),l=cf(),r=$v();function i(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)n+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var n=e,a=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(a=n.return),e=n.return;while(e)}return n.tag===3?a:null}function f(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function h(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function g(e){if(u(e)!==e)throw Error(i(188))}function p(e){var n=e.alternate;if(!n){if(n=u(e),n===null)throw Error(i(188));return n!==e?null:e}for(var a=e,o=n;;){var c=a.return;if(c===null)break;var d=c.alternate;if(d===null){if(o=c.return,o!==null){a=o;continue}break}if(c.child===d.child){for(d=c.child;d;){if(d===a)return g(c),e;if(d===o)return g(c),n;d=d.sibling}throw Error(i(188))}if(a.return!==o.return)a=c,o=d;else{for(var b=!1,N=c.child;N;){if(N===a){b=!0,a=c,o=d;break}if(N===o){b=!0,o=c,a=d;break}N=N.sibling}if(!b){for(N=d.child;N;){if(N===a){b=!0,a=d,o=c;break}if(N===o){b=!0,o=d,a=c;break}N=N.sibling}if(!b)throw Error(i(189))}}if(a.alternate!==o)throw Error(i(190))}if(a.tag!==3)throw Error(i(188));return a.stateNode.current===a?e:n}function y(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=y(e),n!==null)return n;e=e.sibling}return null}var v=Object.assign,C=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),A=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),le=Symbol.for("react.activity"),ye=Symbol.for("react.memo_cache_sentinel"),q=Symbol.iterator;function ee(e){return e===null||typeof e!="object"?null:(e=q&&e[q]||e["@@iterator"],typeof e=="function"?e:null)}var ie=Symbol.for("react.client.reference");function oe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ie?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case _:return"Profiler";case R:return"StrictMode";case M:return"Suspense";case K:return"SuspenseList";case le:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case S:return"Portal";case A:return e.displayName||"Context";case j:return(e._context.displayName||"Context")+".Consumer";case L:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case X:return n=e.displayName||null,n!==null?n:oe(e.type)||"Memo";case U:n=e._payload,e=e._init;try{return oe(e(n))}catch{}}return null}var he=Array.isArray,O=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},ve=[],ne=-1;function k(e){return{current:e}}function P(e){0>ne||(e.current=ve[ne],ve[ne]=null,ne--)}function $(e,n){ne++,ve[ne]=e.current,e.current=n}var W=k(null),V=k(null),Z=k(null),se=k(null);function fe(e,n){switch($(Z,n),$(V,e),$(W,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?Zg(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=Zg(n),e=Jg(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}P(W),$(W,e)}function te(){P(W),P(V),P(Z)}function pe(e){e.memoizedState!==null&&$(se,e);var n=W.current,a=Jg(n,e.type);n!==a&&($(V,e),$(W,a))}function $e(e){V.current===e&&(P(W),P(V)),se.current===e&&(P(se),Ai._currentValue=ae)}var Ge,Fn;function gt(e){if(Ge===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);Ge=n&&n[1]||"",Fn=-1<a.stack.indexOf(`
|
|
383
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
384
|
+
`+Ge+e+Fn}var cl=!1;function ka(e,n){if(!e||cl)return"";cl=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(n){var J=function(){throw Error()};if(Object.defineProperty(J.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(J,[])}catch(F){var I=F}Reflect.construct(e,[],J)}else{try{J.call()}catch(F){I=F}e.call(J.prototype)}}else{try{throw Error()}catch(F){I=F}(J=e())&&typeof J.catch=="function"&&J.catch(function(){})}}catch(F){if(F&&I&&typeof F.stack=="string")return[F.stack,I.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=o.DetermineComponentFrameRoot(),b=d[0],N=d[1];if(b&&N){var T=b.split(`
|
|
385
|
+
`),H=N.split(`
|
|
386
|
+
`);for(c=o=0;o<T.length&&!T[o].includes("DetermineComponentFrameRoot");)o++;for(;c<H.length&&!H[c].includes("DetermineComponentFrameRoot");)c++;if(o===T.length||c===H.length)for(o=T.length-1,c=H.length-1;1<=o&&0<=c&&T[o]!==H[c];)c--;for(;1<=o&&0<=c;o--,c--)if(T[o]!==H[c]){if(o!==1||c!==1)do if(o--,c--,0>c||T[o]!==H[c]){var Y=`
|
|
387
|
+
`+T[o].replace(" at new "," at ");return e.displayName&&Y.includes("<anonymous>")&&(Y=Y.replace("<anonymous>",e.displayName)),Y}while(1<=o&&0<=c);break}}}finally{cl=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?gt(a):""}function ta(e,n){switch(e.tag){case 26:case 27:case 5:return gt(e.type);case 16:return gt("Lazy");case 13:return e.child!==n&&n!==null?gt("Suspense Fallback"):gt("Suspense");case 19:return gt("SuspenseList");case 0:case 15:return ka(e.type,!1);case 11:return ka(e.type.render,!1);case 1:return ka(e.type,!0);case 31:return gt("Activity");default:return""}}function dl(e){try{var n="",a=null;do n+=ta(e,a),a=e,e=e.return;while(e);return n}catch(o){return`
|
|
388
|
+
Error generating stack: `+o.message+`
|
|
389
|
+
`+o.stack}}var Bt=Object.prototype.hasOwnProperty,na=t.unstable_scheduleCallback,Da=t.unstable_cancelCallback,bt=t.unstable_shouldYield,jn=t.unstable_requestPaint,xt=t.unstable_now,Hl=t.unstable_getCurrentPriorityLevel,me=t.unstable_ImmediatePriority,Te=t.unstable_UserBlockingPriority,We=t.unstable_NormalPriority,Ht=t.unstable_LowPriority,Mt=t.unstable_IdlePriority,aa=t.log,Vt=t.unstable_setDisableYieldValue,la=null,pt=null;function Nt(e){if(typeof aa=="function"&&Vt(e),pt&&typeof pt.setStrictMode=="function")try{pt.setStrictMode(la,e)}catch{}}var wt=Math.clz32?Math.clz32:qn,Vl=Math.log,Fr=Math.LN2;function qn(e){return e>>>=0,e===0?32:31-(Vl(e)/Fr|0)|0}var Il=256,Fl=262144,fl=4194304;function $n(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Re(e,n,a){var o=e.pendingLanes;if(o===0)return 0;var c=0,d=e.suspendedLanes,b=e.pingedLanes;e=e.warmLanes;var N=o&134217727;return N!==0?(o=N&~d,o!==0?c=$n(o):(b&=N,b!==0?c=$n(b):a||(a=N&~e,a!==0&&(c=$n(a))))):(N=o&~d,N!==0?c=$n(N):b!==0?c=$n(b):a||(a=o&~e,a!==0&&(c=$n(a)))),c===0?0:n!==0&&n!==c&&(n&d)===0&&(d=c&-c,a=n&-n,d>=a||d===32&&(a&4194048)!==0)?n:c}function nt(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function St(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+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 n+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 Ot(){var e=fl;return fl<<=1,(fl&62914560)===0&&(fl=4194304),e}function Ma(e){for(var n=[],a=0;31>a;a++)n.push(e);return n}function rt(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Gt(e,n,a,o,c,d){var b=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 N=e.entanglements,T=e.expirationTimes,H=e.hiddenUpdates;for(a=b&~a;0<a;){var Y=31-wt(a),J=1<<Y;N[Y]=0,T[Y]=-1;var I=H[Y];if(I!==null)for(H[Y]=null,Y=0;Y<I.length;Y++){var F=I[Y];F!==null&&(F.lane&=-536870913)}a&=~J}o!==0&&ml(e,o,0),d!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=d&~(b&~n))}function ml(e,n,a){e.pendingLanes|=n,e.suspendedLanes&=~n;var o=31-wt(n);e.entangledLanes|=n,e.entanglements[o]=e.entanglements[o]|1073741824|a&261930}function Pt(e,n){var a=e.entangledLanes|=n;for(e=e.entanglements;a;){var o=31-wt(a),c=1<<o;c&n|e[o]&n&&(e[o]|=n),a&=~c}}function Yt(e,n){var a=n&-n;return a=(a&42)!==0?1:ql(a),(a&(e.suspendedLanes|n))!==0?0:a}function ql(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 Tn(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ws(){var e=G.p;return e!==0?e:(e=window.event,e===void 0?32:wp(e.type))}function Uf(e,n){var a=G.p;try{return G.p=e,n()}finally{G.p=a}}var Oa=Math.random().toString(36).slice(2),_t="__reactFiber$"+Oa,Xt="__reactProps$"+Oa,$l="__reactContainer$"+Oa,eu="__reactEvents$"+Oa,db="__reactListeners$"+Oa,fb="__reactHandles$"+Oa,Bf="__reactResources$"+Oa,qr="__reactMarker$"+Oa;function tu(e){delete e[_t],delete e[Xt],delete e[eu],delete e[db],delete e[fb]}function Gl(e){var n=e[_t];if(n)return n;for(var a=e.parentNode;a;){if(n=a[$l]||a[_t]){if(a=n.alternate,n.child!==null||a!==null&&a.child!==null)for(e=rp(e);e!==null;){if(a=e[_t])return a;e=rp(e)}return n}e=a,a=e.parentNode}return null}function Pl(e){if(e=e[_t]||e[$l]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function $r(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(i(33))}function Yl(e){var n=e[Bf];return n||(n=e[Bf]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Et(e){e[qr]=!0}var Hf=new Set,Vf={};function hl(e,n){Xl(e,n),Xl(e+"Capture",n)}function Xl(e,n){for(Vf[e]=n,e=0;e<n.length;e++)Hf.add(n[e])}var mb=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]*$"),If={},Ff={};function hb(e){return Bt.call(Ff,e)?!0:Bt.call(If,e)?!1:mb.test(e)?Ff[e]=!0:(If[e]=!0,!1)}function Ji(e,n,a){if(hb(n))if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var o=n.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+a)}}function Wi(e,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+a)}}function ra(e,n,a,o){if(o===null)e.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(n,a,""+o)}}function hn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function qf(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function gb(e,n,a){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var c=o.get,d=o.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return c.call(this)},set:function(b){a=""+b,d.call(this,b)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return a},setValue:function(b){a=""+b},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function nu(e){if(!e._valueTracker){var n=qf(e)?"checked":"value";e._valueTracker=gb(e,n,""+e[n])}}function $f(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var a=n.getValue(),o="";return e&&(o=qf(e)?e.checked?"true":"false":e.value),e=o,e!==a?(n.setValue(e),!0):!1}function eo(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 pb=/[\n"\\]/g;function gn(e){return e.replace(pb,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function au(e,n,a,o,c,d,b,N){e.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.type=b:e.removeAttribute("type"),n!=null?b==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+hn(n)):e.value!==""+hn(n)&&(e.value=""+hn(n)):b!=="submit"&&b!=="reset"||e.removeAttribute("value"),n!=null?lu(e,b,hn(n)):a!=null?lu(e,b,hn(a)):o!=null&&e.removeAttribute("value"),c==null&&d!=null&&(e.defaultChecked=!!d),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?e.name=""+hn(N):e.removeAttribute("name")}function Gf(e,n,a,o,c,d,b,N){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),n!=null||a!=null){if(!(d!=="submit"&&d!=="reset"||n!=null)){nu(e);return}a=a!=null?""+hn(a):"",n=n!=null?""+hn(n):a,N||n===e.value||(e.value=n),e.defaultValue=n}o=o??c,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=N?e.checked:!!o,e.defaultChecked=!!o,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(e.name=b),nu(e)}function lu(e,n,a){n==="number"&&eo(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Kl(e,n,a,o){if(e=e.options,n){n={};for(var c=0;c<a.length;c++)n["$"+a[c]]=!0;for(a=0;a<e.length;a++)c=n.hasOwnProperty("$"+e[a].value),e[a].selected!==c&&(e[a].selected=c),c&&o&&(e[a].defaultSelected=!0)}else{for(a=""+hn(a),n=null,c=0;c<e.length;c++){if(e[c].value===a){e[c].selected=!0,o&&(e[c].defaultSelected=!0);return}n!==null||e[c].disabled||(n=e[c])}n!==null&&(n.selected=!0)}}function Pf(e,n,a){if(n!=null&&(n=""+hn(n),n!==e.value&&(e.value=n),a==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=a!=null?""+hn(a):""}function Yf(e,n,a,o){if(n==null){if(o!=null){if(a!=null)throw Error(i(92));if(he(o)){if(1<o.length)throw Error(i(93));o=o[0]}a=o}a==null&&(a=""),n=a}a=hn(n),e.defaultValue=a,o=e.textContent,o===a&&o!==""&&o!==null&&(e.value=o),nu(e)}function Ql(e,n){if(n){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=n;return}}e.textContent=n}var vb=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 Xf(e,n,a){var o=n.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?o?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":o?e.setProperty(n,a):typeof a!="number"||a===0||vb.has(n)?n==="float"?e.cssFloat=a:e[n]=(""+a).trim():e[n]=a+"px"}function Kf(e,n,a){if(n!=null&&typeof n!="object")throw Error(i(62));if(e=e.style,a!=null){for(var o in a)!a.hasOwnProperty(o)||n!=null&&n.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var c in n)o=n[c],n.hasOwnProperty(c)&&a[c]!==o&&Xf(e,c,o)}else for(var d in n)n.hasOwnProperty(d)&&Xf(e,d,n[d])}function ru(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 yb=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"]]),bb=/^[\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 to(e){return bb.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ia(){}var iu=null;function ou(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Zl=null,Jl=null;function Qf(e){var n=Pl(e);if(n&&(e=n.stateNode)){var a=e[Xt]||null;e:switch(e=n.stateNode,n.type){case"input":if(au(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),n=a.name,a.type==="radio"&&n!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+gn(""+n)+'"][type="radio"]'),n=0;n<a.length;n++){var o=a[n];if(o!==e&&o.form===e.form){var c=o[Xt]||null;if(!c)throw Error(i(90));au(o,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(n=0;n<a.length;n++)o=a[n],o.form===e.form&&$f(o)}break e;case"textarea":Pf(e,a.value,a.defaultValue);break e;case"select":n=a.value,n!=null&&Kl(e,!!a.multiple,n,!1)}}}var su=!1;function Zf(e,n,a){if(su)return e(n,a);su=!0;try{var o=e(n);return o}finally{if(su=!1,(Zl!==null||Jl!==null)&&(qo(),Zl&&(n=Zl,e=Jl,Jl=Zl=null,Qf(n),e)))for(n=0;n<e.length;n++)Qf(e[n])}}function Gr(e,n){var a=e.stateNode;if(a===null)return null;var o=a[Xt]||null;if(o===null)return null;a=o[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(i(231,n,typeof a));return a}var oa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),uu=!1;if(oa)try{var Pr={};Object.defineProperty(Pr,"passive",{get:function(){uu=!0}}),window.addEventListener("test",Pr,Pr),window.removeEventListener("test",Pr,Pr)}catch{uu=!1}var za=null,cu=null,no=null;function Jf(){if(no)return no;var e,n=cu,a=n.length,o,c="value"in za?za.value:za.textContent,d=c.length;for(e=0;e<a&&n[e]===c[e];e++);var b=a-e;for(o=1;o<=b&&n[a-o]===c[d-o];o++);return no=c.slice(e,1<o?1-o:void 0)}function ao(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function lo(){return!0}function Wf(){return!1}function Kt(e){function n(a,o,c,d,b){this._reactName=a,this._targetInst=c,this.type=o,this.nativeEvent=d,this.target=b,this.currentTarget=null;for(var N in e)e.hasOwnProperty(N)&&(a=e[N],this[N]=a?a(d):d[N]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?lo:Wf,this.isPropagationStopped=Wf,this}return v(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=lo)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=lo)},persist:function(){},isPersistent:lo}),n}var gl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ro=Kt(gl),Yr=v({},gl,{view:0,detail:0}),xb=Kt(Yr),du,fu,Xr,io=v({},Yr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:hu,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!==Xr&&(Xr&&e.type==="mousemove"?(du=e.screenX-Xr.screenX,fu=e.screenY-Xr.screenY):fu=du=0,Xr=e),du)},movementY:function(e){return"movementY"in e?e.movementY:fu}}),em=Kt(io),wb=v({},io,{dataTransfer:0}),Sb=Kt(wb),Eb=v({},Yr,{relatedTarget:0}),mu=Kt(Eb),Cb=v({},gl,{animationName:0,elapsedTime:0,pseudoElement:0}),Rb=Kt(Cb),Nb=v({},gl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),_b=Kt(Nb),Ab=v({},gl,{data:0}),tm=Kt(Ab),jb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Tb={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"},kb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Db(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=kb[e])?!!n[e]:!1}function hu(){return Db}var Mb=v({},Yr,{key:function(e){if(e.key){var n=jb[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=ao(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Tb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:hu,charCode:function(e){return e.type==="keypress"?ao(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ao(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ob=Kt(Mb),zb=v({},io,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),nm=Kt(zb),Lb=v({},Yr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:hu}),Ub=Kt(Lb),Bb=v({},gl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Hb=Kt(Bb),Vb=v({},io,{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}),Ib=Kt(Vb),Fb=v({},gl,{newState:0,oldState:0}),qb=Kt(Fb),$b=[9,13,27,32],gu=oa&&"CompositionEvent"in window,Kr=null;oa&&"documentMode"in document&&(Kr=document.documentMode);var Gb=oa&&"TextEvent"in window&&!Kr,am=oa&&(!gu||Kr&&8<Kr&&11>=Kr),lm=" ",rm=!1;function im(e,n){switch(e){case"keyup":return $b.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function om(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Wl=!1;function Pb(e,n){switch(e){case"compositionend":return om(n);case"keypress":return n.which!==32?null:(rm=!0,lm);case"textInput":return e=n.data,e===lm&&rm?null:e;default:return null}}function Yb(e,n){if(Wl)return e==="compositionend"||!gu&&im(e,n)?(e=Jf(),no=cu=za=null,Wl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return am&&n.locale!=="ko"?null:n.data;default:return null}}var Xb={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 sm(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!Xb[e.type]:n==="textarea"}function um(e,n,a,o){Zl?Jl?Jl.push(o):Jl=[o]:Zl=o,n=Qo(n,"onChange"),0<n.length&&(a=new ro("onChange","change",null,a,o),e.push({event:a,listeners:n}))}var Qr=null,Zr=null;function Kb(e){Gg(e,0)}function oo(e){var n=$r(e);if($f(n))return e}function cm(e,n){if(e==="change")return n}var dm=!1;if(oa){var pu;if(oa){var vu="oninput"in document;if(!vu){var fm=document.createElement("div");fm.setAttribute("oninput","return;"),vu=typeof fm.oninput=="function"}pu=vu}else pu=!1;dm=pu&&(!document.documentMode||9<document.documentMode)}function mm(){Qr&&(Qr.detachEvent("onpropertychange",hm),Zr=Qr=null)}function hm(e){if(e.propertyName==="value"&&oo(Zr)){var n=[];um(n,Zr,e,ou(e)),Zf(Kb,n)}}function Qb(e,n,a){e==="focusin"?(mm(),Qr=n,Zr=a,Qr.attachEvent("onpropertychange",hm)):e==="focusout"&&mm()}function Zb(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return oo(Zr)}function Jb(e,n){if(e==="click")return oo(n)}function Wb(e,n){if(e==="input"||e==="change")return oo(n)}function ex(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var nn=typeof Object.is=="function"?Object.is:ex;function Jr(e,n){if(nn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var a=Object.keys(e),o=Object.keys(n);if(a.length!==o.length)return!1;for(o=0;o<a.length;o++){var c=a[o];if(!Bt.call(n,c)||!nn(e[c],n[c]))return!1}return!0}function gm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function pm(e,n){var a=gm(e);e=0;for(var o;a;){if(a.nodeType===3){if(o=e+a.textContent.length,e<=n&&o>=n)return{node:a,offset:n-e};e=o}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=gm(a)}}function vm(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?vm(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function ym(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=eo(e.document);n instanceof e.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)e=n.contentWindow;else break;n=eo(e.document)}return n}function yu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var tx=oa&&"documentMode"in document&&11>=document.documentMode,er=null,bu=null,Wr=null,xu=!1;function bm(e,n,a){var o=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;xu||er==null||er!==eo(o)||(o=er,"selectionStart"in o&&yu(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Wr&&Jr(Wr,o)||(Wr=o,o=Qo(bu,"onSelect"),0<o.length&&(n=new ro("onSelect","select",null,n,a),e.push({event:n,listeners:o}),n.target=er)))}function pl(e,n){var a={};return a[e.toLowerCase()]=n.toLowerCase(),a["Webkit"+e]="webkit"+n,a["Moz"+e]="moz"+n,a}var tr={animationend:pl("Animation","AnimationEnd"),animationiteration:pl("Animation","AnimationIteration"),animationstart:pl("Animation","AnimationStart"),transitionrun:pl("Transition","TransitionRun"),transitionstart:pl("Transition","TransitionStart"),transitioncancel:pl("Transition","TransitionCancel"),transitionend:pl("Transition","TransitionEnd")},wu={},xm={};oa&&(xm=document.createElement("div").style,"AnimationEvent"in window||(delete tr.animationend.animation,delete tr.animationiteration.animation,delete tr.animationstart.animation),"TransitionEvent"in window||delete tr.transitionend.transition);function vl(e){if(wu[e])return wu[e];if(!tr[e])return e;var n=tr[e],a;for(a in n)if(n.hasOwnProperty(a)&&a in xm)return wu[e]=n[a];return e}var wm=vl("animationend"),Sm=vl("animationiteration"),Em=vl("animationstart"),nx=vl("transitionrun"),ax=vl("transitionstart"),lx=vl("transitioncancel"),Cm=vl("transitionend"),Rm=new Map,Su="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(" ");Su.push("scrollEnd");function kn(e,n){Rm.set(e,n),hl(n,[e])}var so=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=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(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},pn=[],nr=0,Eu=0;function uo(){for(var e=nr,n=Eu=nr=0;n<e;){var a=pn[n];pn[n++]=null;var o=pn[n];pn[n++]=null;var c=pn[n];pn[n++]=null;var d=pn[n];if(pn[n++]=null,o!==null&&c!==null){var b=o.pending;b===null?c.next=c:(c.next=b.next,b.next=c),o.pending=c}d!==0&&Nm(a,c,d)}}function co(e,n,a,o){pn[nr++]=e,pn[nr++]=n,pn[nr++]=a,pn[nr++]=o,Eu|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function Cu(e,n,a,o){return co(e,n,a,o),fo(e)}function yl(e,n){return co(e,null,null,n),fo(e)}function Nm(e,n,a){e.lanes|=a;var o=e.alternate;o!==null&&(o.lanes|=a);for(var c=!1,d=e.return;d!==null;)d.childLanes|=a,o=d.alternate,o!==null&&(o.childLanes|=a),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(c=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,c&&n!==null&&(c=31-wt(a),e=d.hiddenUpdates,o=e[c],o===null?e[c]=[n]:o.push(n),n.lane=a|536870912),d):null}function fo(e){if(50<wi)throw wi=0,Mc=null,Error(i(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var ar={};function rx(e,n,a,o){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=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function an(e,n,a,o){return new rx(e,n,a,o)}function Ru(e){return e=e.prototype,!(!e||!e.isReactComponent)}function sa(e,n){var a=e.alternate;return a===null?(a=an(e.tag,n,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=n,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,n=e.dependencies,a.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function _m(e,n){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=n,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,n=a.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function mo(e,n,a,o,c,d){var b=0;if(o=e,typeof e=="function")Ru(e)&&(b=1);else if(typeof e=="string")b=cw(e,a,W.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case le:return e=an(31,a,n,c),e.elementType=le,e.lanes=d,e;case E:return bl(a.children,c,d,n);case R:b=8,c|=24;break;case _:return e=an(12,a,n,c|2),e.elementType=_,e.lanes=d,e;case M:return e=an(13,a,n,c),e.elementType=M,e.lanes=d,e;case K:return e=an(19,a,n,c),e.elementType=K,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case A:b=10;break e;case j:b=9;break e;case L:b=11;break e;case X:b=14;break e;case U:b=16,o=null;break e}b=29,a=Error(i(130,e===null?"null":typeof e,"")),o=null}return n=an(b,a,n,c),n.elementType=e,n.type=o,n.lanes=d,n}function bl(e,n,a,o){return e=an(7,e,o,n),e.lanes=a,e}function Nu(e,n,a){return e=an(6,e,null,n),e.lanes=a,e}function Am(e){var n=an(18,null,null,0);return n.stateNode=e,n}function _u(e,n,a){return n=an(4,e.children!==null?e.children:[],e.key,n),n.lanes=a,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var jm=new WeakMap;function vn(e,n){if(typeof e=="object"&&e!==null){var a=jm.get(e);return a!==void 0?a:(n={value:e,source:n,stack:dl(n)},jm.set(e,n),n)}return{value:e,source:n,stack:dl(n)}}var lr=[],rr=0,ho=null,ei=0,yn=[],bn=0,La=null,Gn=1,Pn="";function ua(e,n){lr[rr++]=ei,lr[rr++]=ho,ho=e,ei=n}function Tm(e,n,a){yn[bn++]=Gn,yn[bn++]=Pn,yn[bn++]=La,La=e;var o=Gn;e=Pn;var c=32-wt(o)-1;o&=~(1<<c),a+=1;var d=32-wt(n)+c;if(30<d){var b=c-c%5;d=(o&(1<<b)-1).toString(32),o>>=b,c-=b,Gn=1<<32-wt(n)+c|a<<c|o,Pn=d+e}else Gn=1<<d|a<<c|o,Pn=e}function Au(e){e.return!==null&&(ua(e,1),Tm(e,1,0))}function ju(e){for(;e===ho;)ho=lr[--rr],lr[rr]=null,ei=lr[--rr],lr[rr]=null;for(;e===La;)La=yn[--bn],yn[bn]=null,Pn=yn[--bn],yn[bn]=null,Gn=yn[--bn],yn[bn]=null}function km(e,n){yn[bn++]=Gn,yn[bn++]=Pn,yn[bn++]=La,Gn=n.id,Pn=n.overflow,La=e}var At=null,et=null,He=!1,Ua=null,xn=!1,Tu=Error(i(519));function Ba(e){var n=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ti(vn(n,e)),Tu}function Dm(e){var n=e.stateNode,a=e.type,o=e.memoizedProps;switch(n[_t]=e,n[Xt]=o,a){case"dialog":Le("cancel",n),Le("close",n);break;case"iframe":case"object":case"embed":Le("load",n);break;case"video":case"audio":for(a=0;a<Ei.length;a++)Le(Ei[a],n);break;case"source":Le("error",n);break;case"img":case"image":case"link":Le("error",n),Le("load",n);break;case"details":Le("toggle",n);break;case"input":Le("invalid",n),Gf(n,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":Le("invalid",n);break;case"textarea":Le("invalid",n),Yf(n,o.value,o.defaultValue,o.children)}a=o.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||n.textContent===""+a||o.suppressHydrationWarning===!0||Kg(n.textContent,a)?(o.popover!=null&&(Le("beforetoggle",n),Le("toggle",n)),o.onScroll!=null&&Le("scroll",n),o.onScrollEnd!=null&&Le("scrollend",n),o.onClick!=null&&(n.onclick=ia),n=!0):n=!1,n||Ba(e,!0)}function Mm(e){for(At=e.return;At;)switch(At.tag){case 5:case 31:case 13:xn=!1;return;case 27:case 3:xn=!0;return;default:At=At.return}}function ir(e){if(e!==At)return!1;if(!He)return Mm(e),He=!0,!1;var n=e.tag,a;if((a=n!==3&&n!==27)&&((a=n===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Xc(e.type,e.memoizedProps)),a=!a),a&&et&&Ba(e),Mm(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));et=lp(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));et=lp(e)}else n===27?(n=et,Ja(e.type)?(e=Wc,Wc=null,et=e):et=n):et=At?Sn(e.stateNode.nextSibling):null;return!0}function xl(){et=At=null,He=!1}function ku(){var e=Ua;return e!==null&&(Wt===null?Wt=e:Wt.push.apply(Wt,e),Ua=null),e}function ti(e){Ua===null?Ua=[e]:Ua.push(e)}var Du=k(null),wl=null,ca=null;function Ha(e,n,a){$(Du,n._currentValue),n._currentValue=a}function da(e){e._currentValue=Du.current,P(Du)}function Mu(e,n,a){for(;e!==null;){var o=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,o!==null&&(o.childLanes|=n)):o!==null&&(o.childLanes&n)!==n&&(o.childLanes|=n),e===a)break;e=e.return}}function Ou(e,n,a,o){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var d=c.dependencies;if(d!==null){var b=c.child;d=d.firstContext;e:for(;d!==null;){var N=d;d=c;for(var T=0;T<n.length;T++)if(N.context===n[T]){d.lanes|=a,N=d.alternate,N!==null&&(N.lanes|=a),Mu(d.return,a,e),o||(b=null);break e}d=N.next}}else if(c.tag===18){if(b=c.return,b===null)throw Error(i(341));b.lanes|=a,d=b.alternate,d!==null&&(d.lanes|=a),Mu(b,a,e),b=null}else b=c.child;if(b!==null)b.return=c;else for(b=c;b!==null;){if(b===e){b=null;break}if(c=b.sibling,c!==null){c.return=b.return,b=c;break}b=b.return}c=b}}function or(e,n,a,o){e=null;for(var c=n,d=!1;c!==null;){if(!d){if((c.flags&524288)!==0)d=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var b=c.alternate;if(b===null)throw Error(i(387));if(b=b.memoizedProps,b!==null){var N=c.type;nn(c.pendingProps.value,b.value)||(e!==null?e.push(N):e=[N])}}else if(c===se.current){if(b=c.alternate,b===null)throw Error(i(387));b.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Ai):e=[Ai])}c=c.return}e!==null&&Ou(n,e,a,o),n.flags|=262144}function go(e){for(e=e.firstContext;e!==null;){if(!nn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Sl(e){wl=e,ca=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function jt(e){return Om(wl,e)}function po(e,n){return wl===null&&Sl(e),Om(e,n)}function Om(e,n){var a=n._currentValue;if(n={context:n,memoizedValue:a,next:null},ca===null){if(e===null)throw Error(i(308));ca=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else ca=ca.next=n;return a}var ix=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(a,o){e.push(o)}};this.abort=function(){n.aborted=!0,e.forEach(function(a){return a()})}},ox=t.unstable_scheduleCallback,sx=t.unstable_NormalPriority,dt={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zu(){return{controller:new ix,data:new Map,refCount:0}}function ni(e){e.refCount--,e.refCount===0&&ox(sx,function(){e.controller.abort()})}var ai=null,Lu=0,sr=0,ur=null;function ux(e,n){if(ai===null){var a=ai=[];Lu=0,sr=Hc(),ur={status:"pending",value:void 0,then:function(o){a.push(o)}}}return Lu++,n.then(zm,zm),n}function zm(){if(--Lu===0&&ai!==null){ur!==null&&(ur.status="fulfilled");var e=ai;ai=null,sr=0,ur=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function cx(e,n){var a=[],o={status:"pending",value:null,reason:null,then:function(c){a.push(c)}};return e.then(function(){o.status="fulfilled",o.value=n;for(var c=0;c<a.length;c++)(0,a[c])(n)},function(c){for(o.status="rejected",o.reason=c,c=0;c<a.length;c++)(0,a[c])(void 0)}),o}var Lm=O.S;O.S=function(e,n){bg=xt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&ux(e,n),Lm!==null&&Lm(e,n)};var El=k(null);function Uu(){var e=El.current;return e!==null?e:Je.pooledCache}function vo(e,n){n===null?$(El,El.current):$(El,n.pool)}function Um(){var e=Uu();return e===null?null:{parent:dt._currentValue,pool:e}}var cr=Error(i(460)),Bu=Error(i(474)),yo=Error(i(542)),bo={then:function(){}};function Bm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Hm(e,n,a){switch(a=e[a],a===void 0?e.push(n):a!==n&&(n.then(ia,ia),n=a),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Im(e),e;default:if(typeof n.status=="string")n.then(ia,ia);else{if(e=Je,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=n,e.status="pending",e.then(function(o){if(n.status==="pending"){var c=n;c.status="fulfilled",c.value=o}},function(o){if(n.status==="pending"){var c=n;c.status="rejected",c.reason=o}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Im(e),e}throw Rl=n,cr}}function Cl(e){try{var n=e._init;return n(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Rl=a,cr):a}}var Rl=null;function Vm(){if(Rl===null)throw Error(i(459));var e=Rl;return Rl=null,e}function Im(e){if(e===cr||e===yo)throw Error(i(483))}var dr=null,li=0;function xo(e){var n=li;return li+=1,dr===null&&(dr=[]),Hm(dr,e,n)}function ri(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function wo(e,n){throw n.$$typeof===C?Error(i(525)):(e=Object.prototype.toString.call(n),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function Fm(e){function n(z,D){if(e){var B=z.deletions;B===null?(z.deletions=[D],z.flags|=16):B.push(D)}}function a(z,D){if(!e)return null;for(;D!==null;)n(z,D),D=D.sibling;return null}function o(z){for(var D=new Map;z!==null;)z.key!==null?D.set(z.key,z):D.set(z.index,z),z=z.sibling;return D}function c(z,D){return z=sa(z,D),z.index=0,z.sibling=null,z}function d(z,D,B){return z.index=B,e?(B=z.alternate,B!==null?(B=B.index,B<D?(z.flags|=67108866,D):B):(z.flags|=67108866,D)):(z.flags|=1048576,D)}function b(z){return e&&z.alternate===null&&(z.flags|=67108866),z}function N(z,D,B,Q){return D===null||D.tag!==6?(D=Nu(B,z.mode,Q),D.return=z,D):(D=c(D,B),D.return=z,D)}function T(z,D,B,Q){var be=B.type;return be===E?Y(z,D,B.props.children,Q,B.key):D!==null&&(D.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===U&&Cl(be)===D.type)?(D=c(D,B.props),ri(D,B),D.return=z,D):(D=mo(B.type,B.key,B.props,null,z.mode,Q),ri(D,B),D.return=z,D)}function H(z,D,B,Q){return D===null||D.tag!==4||D.stateNode.containerInfo!==B.containerInfo||D.stateNode.implementation!==B.implementation?(D=_u(B,z.mode,Q),D.return=z,D):(D=c(D,B.children||[]),D.return=z,D)}function Y(z,D,B,Q,be){return D===null||D.tag!==7?(D=bl(B,z.mode,Q,be),D.return=z,D):(D=c(D,B),D.return=z,D)}function J(z,D,B){if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return D=Nu(""+D,z.mode,B),D.return=z,D;if(typeof D=="object"&&D!==null){switch(D.$$typeof){case x:return B=mo(D.type,D.key,D.props,null,z.mode,B),ri(B,D),B.return=z,B;case S:return D=_u(D,z.mode,B),D.return=z,D;case U:return D=Cl(D),J(z,D,B)}if(he(D)||ee(D))return D=bl(D,z.mode,B,null),D.return=z,D;if(typeof D.then=="function")return J(z,xo(D),B);if(D.$$typeof===A)return J(z,po(z,D),B);wo(z,D)}return null}function I(z,D,B,Q){var be=D!==null?D.key:null;if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return be!==null?null:N(z,D,""+B,Q);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case x:return B.key===be?T(z,D,B,Q):null;case S:return B.key===be?H(z,D,B,Q):null;case U:return B=Cl(B),I(z,D,B,Q)}if(he(B)||ee(B))return be!==null?null:Y(z,D,B,Q,null);if(typeof B.then=="function")return I(z,D,xo(B),Q);if(B.$$typeof===A)return I(z,D,po(z,B),Q);wo(z,B)}return null}function F(z,D,B,Q,be){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return z=z.get(B)||null,N(D,z,""+Q,be);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case x:return z=z.get(Q.key===null?B:Q.key)||null,T(D,z,Q,be);case S:return z=z.get(Q.key===null?B:Q.key)||null,H(D,z,Q,be);case U:return Q=Cl(Q),F(z,D,B,Q,be)}if(he(Q)||ee(Q))return z=z.get(B)||null,Y(D,z,Q,be,null);if(typeof Q.then=="function")return F(z,D,B,xo(Q),be);if(Q.$$typeof===A)return F(z,D,B,po(D,Q),be);wo(D,Q)}return null}function de(z,D,B,Q){for(var be=null,Ve=null,ge=D,ke=D=0,Be=null;ge!==null&&ke<B.length;ke++){ge.index>ke?(Be=ge,ge=null):Be=ge.sibling;var Ie=I(z,ge,B[ke],Q);if(Ie===null){ge===null&&(ge=Be);break}e&&ge&&Ie.alternate===null&&n(z,ge),D=d(Ie,D,ke),Ve===null?be=Ie:Ve.sibling=Ie,Ve=Ie,ge=Be}if(ke===B.length)return a(z,ge),He&&ua(z,ke),be;if(ge===null){for(;ke<B.length;ke++)ge=J(z,B[ke],Q),ge!==null&&(D=d(ge,D,ke),Ve===null?be=ge:Ve.sibling=ge,Ve=ge);return He&&ua(z,ke),be}for(ge=o(ge);ke<B.length;ke++)Be=F(ge,z,ke,B[ke],Q),Be!==null&&(e&&Be.alternate!==null&&ge.delete(Be.key===null?ke:Be.key),D=d(Be,D,ke),Ve===null?be=Be:Ve.sibling=Be,Ve=Be);return e&&ge.forEach(function(al){return n(z,al)}),He&&ua(z,ke),be}function xe(z,D,B,Q){if(B==null)throw Error(i(151));for(var be=null,Ve=null,ge=D,ke=D=0,Be=null,Ie=B.next();ge!==null&&!Ie.done;ke++,Ie=B.next()){ge.index>ke?(Be=ge,ge=null):Be=ge.sibling;var al=I(z,ge,Ie.value,Q);if(al===null){ge===null&&(ge=Be);break}e&&ge&&al.alternate===null&&n(z,ge),D=d(al,D,ke),Ve===null?be=al:Ve.sibling=al,Ve=al,ge=Be}if(Ie.done)return a(z,ge),He&&ua(z,ke),be;if(ge===null){for(;!Ie.done;ke++,Ie=B.next())Ie=J(z,Ie.value,Q),Ie!==null&&(D=d(Ie,D,ke),Ve===null?be=Ie:Ve.sibling=Ie,Ve=Ie);return He&&ua(z,ke),be}for(ge=o(ge);!Ie.done;ke++,Ie=B.next())Ie=F(ge,z,ke,Ie.value,Q),Ie!==null&&(e&&Ie.alternate!==null&&ge.delete(Ie.key===null?ke:Ie.key),D=d(Ie,D,ke),Ve===null?be=Ie:Ve.sibling=Ie,Ve=Ie);return e&&ge.forEach(function(ww){return n(z,ww)}),He&&ua(z,ke),be}function Qe(z,D,B,Q){if(typeof B=="object"&&B!==null&&B.type===E&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case x:e:{for(var be=B.key;D!==null;){if(D.key===be){if(be=B.type,be===E){if(D.tag===7){a(z,D.sibling),Q=c(D,B.props.children),Q.return=z,z=Q;break e}}else if(D.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===U&&Cl(be)===D.type){a(z,D.sibling),Q=c(D,B.props),ri(Q,B),Q.return=z,z=Q;break e}a(z,D);break}else n(z,D);D=D.sibling}B.type===E?(Q=bl(B.props.children,z.mode,Q,B.key),Q.return=z,z=Q):(Q=mo(B.type,B.key,B.props,null,z.mode,Q),ri(Q,B),Q.return=z,z=Q)}return b(z);case S:e:{for(be=B.key;D!==null;){if(D.key===be)if(D.tag===4&&D.stateNode.containerInfo===B.containerInfo&&D.stateNode.implementation===B.implementation){a(z,D.sibling),Q=c(D,B.children||[]),Q.return=z,z=Q;break e}else{a(z,D);break}else n(z,D);D=D.sibling}Q=_u(B,z.mode,Q),Q.return=z,z=Q}return b(z);case U:return B=Cl(B),Qe(z,D,B,Q)}if(he(B))return de(z,D,B,Q);if(ee(B)){if(be=ee(B),typeof be!="function")throw Error(i(150));return B=be.call(B),xe(z,D,B,Q)}if(typeof B.then=="function")return Qe(z,D,xo(B),Q);if(B.$$typeof===A)return Qe(z,D,po(z,B),Q);wo(z,B)}return typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint"?(B=""+B,D!==null&&D.tag===6?(a(z,D.sibling),Q=c(D,B),Q.return=z,z=Q):(a(z,D),Q=Nu(B,z.mode,Q),Q.return=z,z=Q),b(z)):a(z,D)}return function(z,D,B,Q){try{li=0;var be=Qe(z,D,B,Q);return dr=null,be}catch(ge){if(ge===cr||ge===yo)throw ge;var Ve=an(29,ge,null,z.mode);return Ve.lanes=Q,Ve.return=z,Ve}finally{}}}var Nl=Fm(!0),qm=Fm(!1),Va=!1;function Hu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Vu(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ia(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Fa(e,n,a){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(qe&2)!==0){var c=o.pending;return c===null?n.next=n:(n.next=c.next,c.next=n),o.pending=n,n=fo(e),Nm(e,null,a),n}return co(e,o,n,a),fo(e)}function ii(e,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var o=n.lanes;o&=e.pendingLanes,a|=o,n.lanes=a,Pt(e,a)}}function Iu(e,n){var a=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,a===o)){var c=null,d=null;if(a=a.firstBaseUpdate,a!==null){do{var b={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};d===null?c=d=b:d=d.next=b,a=a.next}while(a!==null);d===null?c=d=n:d=d.next=n}else c=d=n;a={baseState:o.baseState,firstBaseUpdate:c,lastBaseUpdate:d,shared:o.shared,callbacks:o.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=n:e.next=n,a.lastBaseUpdate=n}var Fu=!1;function oi(){if(Fu){var e=ur;if(e!==null)throw e}}function si(e,n,a,o){Fu=!1;var c=e.updateQueue;Va=!1;var d=c.firstBaseUpdate,b=c.lastBaseUpdate,N=c.shared.pending;if(N!==null){c.shared.pending=null;var T=N,H=T.next;T.next=null,b===null?d=H:b.next=H,b=T;var Y=e.alternate;Y!==null&&(Y=Y.updateQueue,N=Y.lastBaseUpdate,N!==b&&(N===null?Y.firstBaseUpdate=H:N.next=H,Y.lastBaseUpdate=T))}if(d!==null){var J=c.baseState;b=0,Y=H=T=null,N=d;do{var I=N.lane&-536870913,F=I!==N.lane;if(F?(Ue&I)===I:(o&I)===I){I!==0&&I===sr&&(Fu=!0),Y!==null&&(Y=Y.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var de=e,xe=N;I=n;var Qe=a;switch(xe.tag){case 1:if(de=xe.payload,typeof de=="function"){J=de.call(Qe,J,I);break e}J=de;break e;case 3:de.flags=de.flags&-65537|128;case 0:if(de=xe.payload,I=typeof de=="function"?de.call(Qe,J,I):de,I==null)break e;J=v({},J,I);break e;case 2:Va=!0}}I=N.callback,I!==null&&(e.flags|=64,F&&(e.flags|=8192),F=c.callbacks,F===null?c.callbacks=[I]:F.push(I))}else F={lane:I,tag:N.tag,payload:N.payload,callback:N.callback,next:null},Y===null?(H=Y=F,T=J):Y=Y.next=F,b|=I;if(N=N.next,N===null){if(N=c.shared.pending,N===null)break;F=N,N=F.next,F.next=null,c.lastBaseUpdate=F,c.shared.pending=null}}while(!0);Y===null&&(T=J),c.baseState=T,c.firstBaseUpdate=H,c.lastBaseUpdate=Y,d===null&&(c.shared.lanes=0),Ya|=b,e.lanes=b,e.memoizedState=J}}function $m(e,n){if(typeof e!="function")throw Error(i(191,e));e.call(n)}function Gm(e,n){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)$m(a[e],n)}var fr=k(null),So=k(0);function Pm(e,n){e=xa,$(So,e),$(fr,n),xa=e|n.baseLanes}function qu(){$(So,xa),$(fr,fr.current)}function $u(){xa=So.current,P(fr),P(So)}var ln=k(null),wn=null;function qa(e){var n=e.alternate;$(ut,ut.current&1),$(ln,e),wn===null&&(n===null||fr.current!==null||n.memoizedState!==null)&&(wn=e)}function Gu(e){$(ut,ut.current),$(ln,e),wn===null&&(wn=e)}function Ym(e){e.tag===22?($(ut,ut.current),$(ln,e),wn===null&&(wn=e)):$a()}function $a(){$(ut,ut.current),$(ln,ln.current)}function rn(e){P(ln),wn===e&&(wn=null),P(ut)}var ut=k(0);function Eo(e){for(var n=e;n!==null;){if(n.tag===13){var a=n.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Zc(a)||Jc(a)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var fa=0,je=null,Xe=null,ft=null,Co=!1,mr=!1,_l=!1,Ro=0,ui=0,hr=null,dx=0;function it(){throw Error(i(321))}function Pu(e,n){if(n===null)return!1;for(var a=0;a<n.length&&a<e.length;a++)if(!nn(e[a],n[a]))return!1;return!0}function Yu(e,n,a,o,c,d){return fa=d,je=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,O.H=e===null||e.memoizedState===null?Th:sc,_l=!1,d=a(o,c),_l=!1,mr&&(d=Km(n,a,o,c)),Xm(e),d}function Xm(e){O.H=fi;var n=Xe!==null&&Xe.next!==null;if(fa=0,ft=Xe=je=null,Co=!1,ui=0,hr=null,n)throw Error(i(300));e===null||mt||(e=e.dependencies,e!==null&&go(e)&&(mt=!0))}function Km(e,n,a,o){je=e;var c=0;do{if(mr&&(hr=null),ui=0,mr=!1,25<=c)throw Error(i(301));if(c+=1,ft=Xe=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}O.H=kh,d=n(a,o)}while(mr);return d}function fx(){var e=O.H,n=e.useState()[0];return n=typeof n.then=="function"?ci(n):n,e=e.useState()[0],(Xe!==null?Xe.memoizedState:null)!==e&&(je.flags|=1024),n}function Xu(){var e=Ro!==0;return Ro=0,e}function Ku(e,n,a){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~a}function Qu(e){if(Co){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}Co=!1}fa=0,ft=Xe=je=null,mr=!1,ui=Ro=0,hr=null}function It(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ft===null?je.memoizedState=ft=e:ft=ft.next=e,ft}function ct(){if(Xe===null){var e=je.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var n=ft===null?je.memoizedState:ft.next;if(n!==null)ft=n,Xe=e;else{if(e===null)throw je.alternate===null?Error(i(467)):Error(i(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},ft===null?je.memoizedState=ft=e:ft=ft.next=e}return ft}function No(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ci(e){var n=ui;return ui+=1,hr===null&&(hr=[]),e=Hm(hr,e,n),n=je,(ft===null?n.memoizedState:ft.next)===null&&(n=n.alternate,O.H=n===null||n.memoizedState===null?Th:sc),e}function _o(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ci(e);if(e.$$typeof===A)return jt(e)}throw Error(i(438,String(e)))}function Zu(e){var n=null,a=je.updateQueue;if(a!==null&&(n=a.memoCache),n==null){var o=je.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(n={data:o.data.map(function(c){return c.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),a===null&&(a=No(),je.updateQueue=a),a.memoCache=n,a=n.data[n.index],a===void 0)for(a=n.data[n.index]=Array(e),o=0;o<e;o++)a[o]=ye;return n.index++,a}function ma(e,n){return typeof n=="function"?n(e):n}function Ao(e){var n=ct();return Ju(n,Xe,e)}function Ju(e,n,a){var o=e.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=a;var c=e.baseQueue,d=o.pending;if(d!==null){if(c!==null){var b=c.next;c.next=d.next,d.next=b}n.baseQueue=c=d,o.pending=null}if(d=e.baseState,c===null)e.memoizedState=d;else{n=c.next;var N=b=null,T=null,H=n,Y=!1;do{var J=H.lane&-536870913;if(J!==H.lane?(Ue&J)===J:(fa&J)===J){var I=H.revertLane;if(I===0)T!==null&&(T=T.next={lane:0,revertLane:0,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null}),J===sr&&(Y=!0);else if((fa&I)===I){H=H.next,I===sr&&(Y=!0);continue}else J={lane:0,revertLane:H.revertLane,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},T===null?(N=T=J,b=d):T=T.next=J,je.lanes|=I,Ya|=I;J=H.action,_l&&a(d,J),d=H.hasEagerState?H.eagerState:a(d,J)}else I={lane:J,revertLane:H.revertLane,gesture:H.gesture,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},T===null?(N=T=I,b=d):T=T.next=I,je.lanes|=J,Ya|=J;H=H.next}while(H!==null&&H!==n);if(T===null?b=d:T.next=N,!nn(d,e.memoizedState)&&(mt=!0,Y&&(a=ur,a!==null)))throw a;e.memoizedState=d,e.baseState=b,e.baseQueue=T,o.lastRenderedState=d}return c===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function Wu(e){var n=ct(),a=n.queue;if(a===null)throw Error(i(311));a.lastRenderedReducer=e;var o=a.dispatch,c=a.pending,d=n.memoizedState;if(c!==null){a.pending=null;var b=c=c.next;do d=e(d,b.action),b=b.next;while(b!==c);nn(d,n.memoizedState)||(mt=!0),n.memoizedState=d,n.baseQueue===null&&(n.baseState=d),a.lastRenderedState=d}return[d,o]}function Qm(e,n,a){var o=je,c=ct(),d=He;if(d){if(a===void 0)throw Error(i(407));a=a()}else a=n();var b=!nn((Xe||c).memoizedState,a);if(b&&(c.memoizedState=a,mt=!0),c=c.queue,nc(Wm.bind(null,o,c,e),[e]),c.getSnapshot!==n||b||ft!==null&&ft.memoizedState.tag&1){if(o.flags|=2048,gr(9,{destroy:void 0},Jm.bind(null,o,c,a,n),null),Je===null)throw Error(i(349));d||(fa&127)!==0||Zm(o,n,a)}return a}function Zm(e,n,a){e.flags|=16384,e={getSnapshot:n,value:a},n=je.updateQueue,n===null?(n=No(),je.updateQueue=n,n.stores=[e]):(a=n.stores,a===null?n.stores=[e]:a.push(e))}function Jm(e,n,a,o){n.value=a,n.getSnapshot=o,eh(n)&&th(e)}function Wm(e,n,a){return a(function(){eh(n)&&th(e)})}function eh(e){var n=e.getSnapshot;e=e.value;try{var a=n();return!nn(e,a)}catch{return!0}}function th(e){var n=yl(e,2);n!==null&&en(n,e,2)}function ec(e){var n=It();if(typeof e=="function"){var a=e;if(e=a(),_l){Nt(!0);try{a()}finally{Nt(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ma,lastRenderedState:e},n}function nh(e,n,a,o){return e.baseState=a,Ju(e,Xe,typeof o=="function"?o:ma)}function mx(e,n,a,o,c){if(ko(e))throw Error(i(485));if(e=n.action,e!==null){var d={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){d.listeners.push(b)}};O.T!==null?a(!0):d.isTransition=!1,o(d),a=n.pending,a===null?(d.next=n.pending=d,ah(n,d)):(d.next=a.next,n.pending=a.next=d)}}function ah(e,n){var a=n.action,o=n.payload,c=e.state;if(n.isTransition){var d=O.T,b={};O.T=b;try{var N=a(c,o),T=O.S;T!==null&&T(b,N),lh(e,n,N)}catch(H){tc(e,n,H)}finally{d!==null&&b.types!==null&&(d.types=b.types),O.T=d}}else try{d=a(c,o),lh(e,n,d)}catch(H){tc(e,n,H)}}function lh(e,n,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(o){rh(e,n,o)},function(o){return tc(e,n,o)}):rh(e,n,a)}function rh(e,n,a){n.status="fulfilled",n.value=a,ih(n),e.state=a,n=e.pending,n!==null&&(a=n.next,a===n?e.pending=null:(a=a.next,n.next=a,ah(e,a)))}function tc(e,n,a){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do n.status="rejected",n.reason=a,ih(n),n=n.next;while(n!==o)}e.action=null}function ih(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function oh(e,n){return n}function sh(e,n){if(He){var a=Je.formState;if(a!==null){e:{var o=je;if(He){if(et){t:{for(var c=et,d=xn;c.nodeType!==8;){if(!d){c=null;break t}if(c=Sn(c.nextSibling),c===null){c=null;break t}}d=c.data,c=d==="F!"||d==="F"?c:null}if(c){et=Sn(c.nextSibling),o=c.data==="F!";break e}}Ba(o)}o=!1}o&&(n=a[0])}}return a=It(),a.memoizedState=a.baseState=n,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:oh,lastRenderedState:n},a.queue=o,a=_h.bind(null,je,o),o.dispatch=a,o=ec(!1),d=oc.bind(null,je,!1,o.queue),o=It(),c={state:n,dispatch:null,action:e,pending:null},o.queue=c,a=mx.bind(null,je,c,d,a),c.dispatch=a,o.memoizedState=e,[n,a,!1]}function uh(e){var n=ct();return ch(n,Xe,e)}function ch(e,n,a){if(n=Ju(e,n,oh)[0],e=Ao(ma)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var o=ci(n)}catch(b){throw b===cr?yo:b}else o=n;n=ct();var c=n.queue,d=c.dispatch;return a!==n.memoizedState&&(je.flags|=2048,gr(9,{destroy:void 0},hx.bind(null,c,a),null)),[o,d,e]}function hx(e,n){e.action=n}function dh(e){var n=ct(),a=Xe;if(a!==null)return ch(n,a,e);ct(),n=n.memoizedState,a=ct();var o=a.queue.dispatch;return a.memoizedState=e,[n,o,!1]}function gr(e,n,a,o){return e={tag:e,create:a,deps:o,inst:n,next:null},n=je.updateQueue,n===null&&(n=No(),je.updateQueue=n),a=n.lastEffect,a===null?n.lastEffect=e.next=e:(o=a.next,a.next=e,e.next=o,n.lastEffect=e),e}function fh(){return ct().memoizedState}function jo(e,n,a,o){var c=It();je.flags|=e,c.memoizedState=gr(1|n,{destroy:void 0},a,o===void 0?null:o)}function To(e,n,a,o){var c=ct();o=o===void 0?null:o;var d=c.memoizedState.inst;Xe!==null&&o!==null&&Pu(o,Xe.memoizedState.deps)?c.memoizedState=gr(n,d,a,o):(je.flags|=e,c.memoizedState=gr(1|n,d,a,o))}function mh(e,n){jo(8390656,8,e,n)}function nc(e,n){To(2048,8,e,n)}function gx(e){je.flags|=4;var n=je.updateQueue;if(n===null)n=No(),je.updateQueue=n,n.events=[e];else{var a=n.events;a===null?n.events=[e]:a.push(e)}}function hh(e){var n=ct().memoizedState;return gx({ref:n,nextImpl:e}),function(){if((qe&2)!==0)throw Error(i(440));return n.impl.apply(void 0,arguments)}}function gh(e,n){return To(4,2,e,n)}function ph(e,n){return To(4,4,e,n)}function vh(e,n){if(typeof n=="function"){e=e();var a=n(e);return function(){typeof a=="function"?a():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function yh(e,n,a){a=a!=null?a.concat([e]):null,To(4,4,vh.bind(null,n,e),a)}function ac(){}function bh(e,n){var a=ct();n=n===void 0?null:n;var o=a.memoizedState;return n!==null&&Pu(n,o[1])?o[0]:(a.memoizedState=[e,n],e)}function xh(e,n){var a=ct();n=n===void 0?null:n;var o=a.memoizedState;if(n!==null&&Pu(n,o[1]))return o[0];if(o=e(),_l){Nt(!0);try{e()}finally{Nt(!1)}}return a.memoizedState=[o,n],o}function lc(e,n,a){return a===void 0||(fa&1073741824)!==0&&(Ue&261930)===0?e.memoizedState=n:(e.memoizedState=a,e=wg(),je.lanes|=e,Ya|=e,a)}function wh(e,n,a,o){return nn(a,n)?a:fr.current!==null?(e=lc(e,a,o),nn(e,n)||(mt=!0),e):(fa&42)===0||(fa&1073741824)!==0&&(Ue&261930)===0?(mt=!0,e.memoizedState=a):(e=wg(),je.lanes|=e,Ya|=e,n)}function Sh(e,n,a,o,c){var d=G.p;G.p=d!==0&&8>d?d:8;var b=O.T,N={};O.T=N,oc(e,!1,n,a);try{var T=c(),H=O.S;if(H!==null&&H(N,T),T!==null&&typeof T=="object"&&typeof T.then=="function"){var Y=cx(T,o);di(e,n,Y,un(e))}else di(e,n,o,un(e))}catch(J){di(e,n,{then:function(){},status:"rejected",reason:J},un())}finally{G.p=d,b!==null&&N.types!==null&&(b.types=N.types),O.T=b}}function px(){}function rc(e,n,a,o){if(e.tag!==5)throw Error(i(476));var c=Eh(e).queue;Sh(e,c,n,ae,a===null?px:function(){return Ch(e),a(o)})}function Eh(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ma,lastRenderedState:ae},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ma,lastRenderedState:a},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function Ch(e){var n=Eh(e);n.next===null&&(n=e.alternate.memoizedState),di(e,n.next.queue,{},un())}function ic(){return jt(Ai)}function Rh(){return ct().memoizedState}function Nh(){return ct().memoizedState}function vx(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var a=un();e=Ia(a);var o=Fa(n,e,a);o!==null&&(en(o,n,a),ii(o,n,a)),n={cache:zu()},e.payload=n;return}n=n.return}}function yx(e,n,a){var o=un();a={lane:o,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ko(e)?Ah(n,a):(a=Cu(e,n,a,o),a!==null&&(en(a,e,o),jh(a,n,o)))}function _h(e,n,a){var o=un();di(e,n,a,o)}function di(e,n,a,o){var c={lane:o,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(ko(e))Ah(n,c);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=n.lastRenderedReducer,d!==null))try{var b=n.lastRenderedState,N=d(b,a);if(c.hasEagerState=!0,c.eagerState=N,nn(N,b))return co(e,n,c,0),Je===null&&uo(),!1}catch{}finally{}if(a=Cu(e,n,c,o),a!==null)return en(a,e,o),jh(a,n,o),!0}return!1}function oc(e,n,a,o){if(o={lane:2,revertLane:Hc(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},ko(e)){if(n)throw Error(i(479))}else n=Cu(e,a,o,2),n!==null&&en(n,e,2)}function ko(e){var n=e.alternate;return e===je||n!==null&&n===je}function Ah(e,n){mr=Co=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function jh(e,n,a){if((a&4194048)!==0){var o=n.lanes;o&=e.pendingLanes,a|=o,n.lanes=a,Pt(e,a)}}var fi={readContext:jt,use:_o,useCallback:it,useContext:it,useEffect:it,useImperativeHandle:it,useLayoutEffect:it,useInsertionEffect:it,useMemo:it,useReducer:it,useRef:it,useState:it,useDebugValue:it,useDeferredValue:it,useTransition:it,useSyncExternalStore:it,useId:it,useHostTransitionStatus:it,useFormState:it,useActionState:it,useOptimistic:it,useMemoCache:it,useCacheRefresh:it};fi.useEffectEvent=it;var Th={readContext:jt,use:_o,useCallback:function(e,n){return It().memoizedState=[e,n===void 0?null:n],e},useContext:jt,useEffect:mh,useImperativeHandle:function(e,n,a){a=a!=null?a.concat([e]):null,jo(4194308,4,vh.bind(null,n,e),a)},useLayoutEffect:function(e,n){return jo(4194308,4,e,n)},useInsertionEffect:function(e,n){jo(4,2,e,n)},useMemo:function(e,n){var a=It();n=n===void 0?null:n;var o=e();if(_l){Nt(!0);try{e()}finally{Nt(!1)}}return a.memoizedState=[o,n],o},useReducer:function(e,n,a){var o=It();if(a!==void 0){var c=a(n);if(_l){Nt(!0);try{a(n)}finally{Nt(!1)}}}else c=n;return o.memoizedState=o.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},o.queue=e,e=e.dispatch=yx.bind(null,je,e),[o.memoizedState,e]},useRef:function(e){var n=It();return e={current:e},n.memoizedState=e},useState:function(e){e=ec(e);var n=e.queue,a=_h.bind(null,je,n);return n.dispatch=a,[e.memoizedState,a]},useDebugValue:ac,useDeferredValue:function(e,n){var a=It();return lc(a,e,n)},useTransition:function(){var e=ec(!1);return e=Sh.bind(null,je,e.queue,!0,!1),It().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,a){var o=je,c=It();if(He){if(a===void 0)throw Error(i(407));a=a()}else{if(a=n(),Je===null)throw Error(i(349));(Ue&127)!==0||Zm(o,n,a)}c.memoizedState=a;var d={value:a,getSnapshot:n};return c.queue=d,mh(Wm.bind(null,o,d,e),[e]),o.flags|=2048,gr(9,{destroy:void 0},Jm.bind(null,o,d,a,n),null),a},useId:function(){var e=It(),n=Je.identifierPrefix;if(He){var a=Pn,o=Gn;a=(o&~(1<<32-wt(o)-1)).toString(32)+a,n="_"+n+"R_"+a,a=Ro++,0<a&&(n+="H"+a.toString(32)),n+="_"}else a=dx++,n="_"+n+"r_"+a.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:ic,useFormState:sh,useActionState:sh,useOptimistic:function(e){var n=It();n.memoizedState=n.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=a,n=oc.bind(null,je,!0,a),a.dispatch=n,[e,n]},useMemoCache:Zu,useCacheRefresh:function(){return It().memoizedState=vx.bind(null,je)},useEffectEvent:function(e){var n=It(),a={impl:e};return n.memoizedState=a,function(){if((qe&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}},sc={readContext:jt,use:_o,useCallback:bh,useContext:jt,useEffect:nc,useImperativeHandle:yh,useInsertionEffect:gh,useLayoutEffect:ph,useMemo:xh,useReducer:Ao,useRef:fh,useState:function(){return Ao(ma)},useDebugValue:ac,useDeferredValue:function(e,n){var a=ct();return wh(a,Xe.memoizedState,e,n)},useTransition:function(){var e=Ao(ma)[0],n=ct().memoizedState;return[typeof e=="boolean"?e:ci(e),n]},useSyncExternalStore:Qm,useId:Rh,useHostTransitionStatus:ic,useFormState:uh,useActionState:uh,useOptimistic:function(e,n){var a=ct();return nh(a,Xe,e,n)},useMemoCache:Zu,useCacheRefresh:Nh};sc.useEffectEvent=hh;var kh={readContext:jt,use:_o,useCallback:bh,useContext:jt,useEffect:nc,useImperativeHandle:yh,useInsertionEffect:gh,useLayoutEffect:ph,useMemo:xh,useReducer:Wu,useRef:fh,useState:function(){return Wu(ma)},useDebugValue:ac,useDeferredValue:function(e,n){var a=ct();return Xe===null?lc(a,e,n):wh(a,Xe.memoizedState,e,n)},useTransition:function(){var e=Wu(ma)[0],n=ct().memoizedState;return[typeof e=="boolean"?e:ci(e),n]},useSyncExternalStore:Qm,useId:Rh,useHostTransitionStatus:ic,useFormState:dh,useActionState:dh,useOptimistic:function(e,n){var a=ct();return Xe!==null?nh(a,Xe,e,n):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Zu,useCacheRefresh:Nh};kh.useEffectEvent=hh;function uc(e,n,a,o){n=e.memoizedState,a=a(o,n),a=a==null?n:v({},n,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var cc={enqueueSetState:function(e,n,a){e=e._reactInternals;var o=un(),c=Ia(o);c.payload=n,a!=null&&(c.callback=a),n=Fa(e,c,o),n!==null&&(en(n,e,o),ii(n,e,o))},enqueueReplaceState:function(e,n,a){e=e._reactInternals;var o=un(),c=Ia(o);c.tag=1,c.payload=n,a!=null&&(c.callback=a),n=Fa(e,c,o),n!==null&&(en(n,e,o),ii(n,e,o))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var a=un(),o=Ia(a);o.tag=2,n!=null&&(o.callback=n),n=Fa(e,o,a),n!==null&&(en(n,e,a),ii(n,e,a))}};function Dh(e,n,a,o,c,d,b){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,d,b):n.prototype&&n.prototype.isPureReactComponent?!Jr(a,o)||!Jr(c,d):!0}function Mh(e,n,a,o){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(a,o),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(a,o),n.state!==e&&cc.enqueueReplaceState(n,n.state,null)}function Al(e,n){var a=n;if("ref"in n){a={};for(var o in n)o!=="ref"&&(a[o]=n[o])}if(e=e.defaultProps){a===n&&(a=v({},a));for(var c in e)a[c]===void 0&&(a[c]=e[c])}return a}function Oh(e){so(e)}function zh(e){console.error(e)}function Lh(e){so(e)}function Do(e,n){try{var a=e.onUncaughtError;a(n.value,{componentStack:n.stack})}catch(o){setTimeout(function(){throw o})}}function Uh(e,n,a){try{var o=e.onCaughtError;o(a.value,{componentStack:a.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function dc(e,n,a){return a=Ia(a),a.tag=3,a.payload={element:null},a.callback=function(){Do(e,n)},a}function Bh(e){return e=Ia(e),e.tag=3,e}function Hh(e,n,a,o){var c=a.type.getDerivedStateFromError;if(typeof c=="function"){var d=o.value;e.payload=function(){return c(d)},e.callback=function(){Uh(n,a,o)}}var b=a.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(e.callback=function(){Uh(n,a,o),typeof c!="function"&&(Xa===null?Xa=new Set([this]):Xa.add(this));var N=o.stack;this.componentDidCatch(o.value,{componentStack:N!==null?N:""})})}function bx(e,n,a,o,c){if(a.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(n=a.alternate,n!==null&&or(n,a,c,!0),a=ln.current,a!==null){switch(a.tag){case 31:case 13:return wn===null?$o():a.alternate===null&&ot===0&&(ot=3),a.flags&=-257,a.flags|=65536,a.lanes=c,o===bo?a.flags|=16384:(n=a.updateQueue,n===null?a.updateQueue=new Set([o]):n.add(o),Lc(e,o,c)),!1;case 22:return a.flags|=65536,o===bo?a.flags|=16384:(n=a.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([o])},a.updateQueue=n):(a=n.retryQueue,a===null?n.retryQueue=new Set([o]):a.add(o)),Lc(e,o,c)),!1}throw Error(i(435,a.tag))}return Lc(e,o,c),$o(),!1}if(He)return n=ln.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=c,o!==Tu&&(e=Error(i(422),{cause:o}),ti(vn(e,a)))):(o!==Tu&&(n=Error(i(423),{cause:o}),ti(vn(n,a))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,o=vn(o,a),c=dc(e.stateNode,o,c),Iu(e,c),ot!==4&&(ot=2)),!1;var d=Error(i(520),{cause:o});if(d=vn(d,a),xi===null?xi=[d]:xi.push(d),ot!==4&&(ot=2),n===null)return!0;o=vn(o,a),a=n;do{switch(a.tag){case 3:return a.flags|=65536,e=c&-c,a.lanes|=e,e=dc(a.stateNode,o,e),Iu(a,e),!1;case 1:if(n=a.type,d=a.stateNode,(a.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(Xa===null||!Xa.has(d))))return a.flags|=65536,c&=-c,a.lanes|=c,c=Bh(c),Hh(c,e,a,o),Iu(a,c),!1}a=a.return}while(a!==null);return!1}var fc=Error(i(461)),mt=!1;function Tt(e,n,a,o){n.child=e===null?qm(n,null,a,o):Nl(n,e.child,a,o)}function Vh(e,n,a,o,c){a=a.render;var d=n.ref;if("ref"in o){var b={};for(var N in o)N!=="ref"&&(b[N]=o[N])}else b=o;return Sl(n),o=Yu(e,n,a,b,d,c),N=Xu(),e!==null&&!mt?(Ku(e,n,c),ha(e,n,c)):(He&&N&&Au(n),n.flags|=1,Tt(e,n,o,c),n.child)}function Ih(e,n,a,o,c){if(e===null){var d=a.type;return typeof d=="function"&&!Ru(d)&&d.defaultProps===void 0&&a.compare===null?(n.tag=15,n.type=d,Fh(e,n,d,o,c)):(e=mo(a.type,null,o,n,n.mode,c),e.ref=n.ref,e.return=n,n.child=e)}if(d=e.child,!xc(e,c)){var b=d.memoizedProps;if(a=a.compare,a=a!==null?a:Jr,a(b,o)&&e.ref===n.ref)return ha(e,n,c)}return n.flags|=1,e=sa(d,o),e.ref=n.ref,e.return=n,n.child=e}function Fh(e,n,a,o,c){if(e!==null){var d=e.memoizedProps;if(Jr(d,o)&&e.ref===n.ref)if(mt=!1,n.pendingProps=o=d,xc(e,c))(e.flags&131072)!==0&&(mt=!0);else return n.lanes=e.lanes,ha(e,n,c)}return mc(e,n,a,o,c)}function qh(e,n,a,o){var c=o.children,d=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((n.flags&128)!==0){if(d=d!==null?d.baseLanes|a:a,e!==null){for(o=n.child=e.child,c=0;o!==null;)c=c|o.lanes|o.childLanes,o=o.sibling;o=c&~d}else o=0,n.child=null;return $h(e,n,d,a,o)}if((a&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&vo(n,d!==null?d.cachePool:null),d!==null?Pm(n,d):qu(),Ym(n);else return o=n.lanes=536870912,$h(e,n,d!==null?d.baseLanes|a:a,a,o)}else d!==null?(vo(n,d.cachePool),Pm(n,d),$a(),n.memoizedState=null):(e!==null&&vo(n,null),qu(),$a());return Tt(e,n,c,a),n.child}function mi(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function $h(e,n,a,o,c){var d=Uu();return d=d===null?null:{parent:dt._currentValue,pool:d},n.memoizedState={baseLanes:a,cachePool:d},e!==null&&vo(n,null),qu(),Ym(n),e!==null&&or(e,n,o,!0),n.childLanes=c,null}function Mo(e,n){return n=zo({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function Gh(e,n,a){return Nl(n,e.child,null,a),e=Mo(n,n.pendingProps),e.flags|=2,rn(n),n.memoizedState=null,e}function xx(e,n,a){var o=n.pendingProps,c=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(He){if(o.mode==="hidden")return e=Mo(n,o),n.lanes=536870912,mi(null,e);if(Gu(n),(e=et)?(e=ap(e,xn),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:La!==null?{id:Gn,overflow:Pn}:null,retryLane:536870912,hydrationErrors:null},a=Am(e),a.return=n,n.child=a,At=n,et=null)):e=null,e===null)throw Ba(n);return n.lanes=536870912,null}return Mo(n,o)}var d=e.memoizedState;if(d!==null){var b=d.dehydrated;if(Gu(n),c)if(n.flags&256)n.flags&=-257,n=Gh(e,n,a);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(i(558));else if(mt||or(e,n,a,!1),c=(a&e.childLanes)!==0,mt||c){if(o=Je,o!==null&&(b=Yt(o,a),b!==0&&b!==d.retryLane))throw d.retryLane=b,yl(e,b),en(o,e,b),fc;$o(),n=Gh(e,n,a)}else e=d.treeContext,et=Sn(b.nextSibling),At=n,He=!0,Ua=null,xn=!1,e!==null&&km(n,e),n=Mo(n,o),n.flags|=4096;return n}return e=sa(e.child,{mode:o.mode,children:o.children}),e.ref=n.ref,n.child=e,e.return=n,e}function Oo(e,n){var a=n.ref;if(a===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(i(284));(e===null||e.ref!==a)&&(n.flags|=4194816)}}function mc(e,n,a,o,c){return Sl(n),a=Yu(e,n,a,o,void 0,c),o=Xu(),e!==null&&!mt?(Ku(e,n,c),ha(e,n,c)):(He&&o&&Au(n),n.flags|=1,Tt(e,n,a,c),n.child)}function Ph(e,n,a,o,c,d){return Sl(n),n.updateQueue=null,a=Km(n,o,a,c),Xm(e),o=Xu(),e!==null&&!mt?(Ku(e,n,d),ha(e,n,d)):(He&&o&&Au(n),n.flags|=1,Tt(e,n,a,d),n.child)}function Yh(e,n,a,o,c){if(Sl(n),n.stateNode===null){var d=ar,b=a.contextType;typeof b=="object"&&b!==null&&(d=jt(b)),d=new a(o,d),n.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=cc,n.stateNode=d,d._reactInternals=n,d=n.stateNode,d.props=o,d.state=n.memoizedState,d.refs={},Hu(n),b=a.contextType,d.context=typeof b=="object"&&b!==null?jt(b):ar,d.state=n.memoizedState,b=a.getDerivedStateFromProps,typeof b=="function"&&(uc(n,a,b,o),d.state=n.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(b=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),b!==d.state&&cc.enqueueReplaceState(d,d.state,null),si(n,o,d,c),oi(),d.state=n.memoizedState),typeof d.componentDidMount=="function"&&(n.flags|=4194308),o=!0}else if(e===null){d=n.stateNode;var N=n.memoizedProps,T=Al(a,N);d.props=T;var H=d.context,Y=a.contextType;b=ar,typeof Y=="object"&&Y!==null&&(b=jt(Y));var J=a.getDerivedStateFromProps;Y=typeof J=="function"||typeof d.getSnapshotBeforeUpdate=="function",N=n.pendingProps!==N,Y||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(N||H!==b)&&Mh(n,d,o,b),Va=!1;var I=n.memoizedState;d.state=I,si(n,o,d,c),oi(),H=n.memoizedState,N||I!==H||Va?(typeof J=="function"&&(uc(n,a,J,o),H=n.memoizedState),(T=Va||Dh(n,a,T,o,I,H,b))?(Y||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(n.flags|=4194308)):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=o,n.memoizedState=H),d.props=o,d.state=H,d.context=b,o=T):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),o=!1)}else{d=n.stateNode,Vu(e,n),b=n.memoizedProps,Y=Al(a,b),d.props=Y,J=n.pendingProps,I=d.context,H=a.contextType,T=ar,typeof H=="object"&&H!==null&&(T=jt(H)),N=a.getDerivedStateFromProps,(H=typeof N=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(b!==J||I!==T)&&Mh(n,d,o,T),Va=!1,I=n.memoizedState,d.state=I,si(n,o,d,c),oi();var F=n.memoizedState;b!==J||I!==F||Va||e!==null&&e.dependencies!==null&&go(e.dependencies)?(typeof N=="function"&&(uc(n,a,N,o),F=n.memoizedState),(Y=Va||Dh(n,a,Y,o,I,F,T)||e!==null&&e.dependencies!==null&&go(e.dependencies))?(H||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(o,F,T),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(o,F,T)),typeof d.componentDidUpdate=="function"&&(n.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof d.componentDidUpdate!="function"||b===e.memoizedProps&&I===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&I===e.memoizedState||(n.flags|=1024),n.memoizedProps=o,n.memoizedState=F),d.props=o,d.state=F,d.context=T,o=Y):(typeof d.componentDidUpdate!="function"||b===e.memoizedProps&&I===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&I===e.memoizedState||(n.flags|=1024),o=!1)}return d=o,Oo(e,n),o=(n.flags&128)!==0,d||o?(d=n.stateNode,a=o&&typeof a.getDerivedStateFromError!="function"?null:d.render(),n.flags|=1,e!==null&&o?(n.child=Nl(n,e.child,null,c),n.child=Nl(n,null,a,c)):Tt(e,n,a,c),n.memoizedState=d.state,e=n.child):e=ha(e,n,c),e}function Xh(e,n,a,o){return xl(),n.flags|=256,Tt(e,n,a,o),n.child}var hc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gc(e){return{baseLanes:e,cachePool:Um()}}function pc(e,n,a){return e=e!==null?e.childLanes&~a:0,n&&(e|=sn),e}function Kh(e,n,a){var o=n.pendingProps,c=!1,d=(n.flags&128)!==0,b;if((b=d)||(b=e!==null&&e.memoizedState===null?!1:(ut.current&2)!==0),b&&(c=!0,n.flags&=-129),b=(n.flags&32)!==0,n.flags&=-33,e===null){if(He){if(c?qa(n):$a(),(e=et)?(e=ap(e,xn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:La!==null?{id:Gn,overflow:Pn}:null,retryLane:536870912,hydrationErrors:null},a=Am(e),a.return=n,n.child=a,At=n,et=null)):e=null,e===null)throw Ba(n);return Jc(e)?n.lanes=32:n.lanes=536870912,null}var N=o.children;return o=o.fallback,c?($a(),c=n.mode,N=zo({mode:"hidden",children:N},c),o=bl(o,c,a,null),N.return=n,o.return=n,N.sibling=o,n.child=N,o=n.child,o.memoizedState=gc(a),o.childLanes=pc(e,b,a),n.memoizedState=hc,mi(null,o)):(qa(n),vc(n,N))}var T=e.memoizedState;if(T!==null&&(N=T.dehydrated,N!==null)){if(d)n.flags&256?(qa(n),n.flags&=-257,n=yc(e,n,a)):n.memoizedState!==null?($a(),n.child=e.child,n.flags|=128,n=null):($a(),N=o.fallback,c=n.mode,o=zo({mode:"visible",children:o.children},c),N=bl(N,c,a,null),N.flags|=2,o.return=n,N.return=n,o.sibling=N,n.child=o,Nl(n,e.child,null,a),o=n.child,o.memoizedState=gc(a),o.childLanes=pc(e,b,a),n.memoizedState=hc,n=mi(null,o));else if(qa(n),Jc(N)){if(b=N.nextSibling&&N.nextSibling.dataset,b)var H=b.dgst;b=H,o=Error(i(419)),o.stack="",o.digest=b,ti({value:o,source:null,stack:null}),n=yc(e,n,a)}else if(mt||or(e,n,a,!1),b=(a&e.childLanes)!==0,mt||b){if(b=Je,b!==null&&(o=Yt(b,a),o!==0&&o!==T.retryLane))throw T.retryLane=o,yl(e,o),en(b,e,o),fc;Zc(N)||$o(),n=yc(e,n,a)}else Zc(N)?(n.flags|=192,n.child=e.child,n=null):(e=T.treeContext,et=Sn(N.nextSibling),At=n,He=!0,Ua=null,xn=!1,e!==null&&km(n,e),n=vc(n,o.children),n.flags|=4096);return n}return c?($a(),N=o.fallback,c=n.mode,T=e.child,H=T.sibling,o=sa(T,{mode:"hidden",children:o.children}),o.subtreeFlags=T.subtreeFlags&65011712,H!==null?N=sa(H,N):(N=bl(N,c,a,null),N.flags|=2),N.return=n,o.return=n,o.sibling=N,n.child=o,mi(null,o),o=n.child,N=e.child.memoizedState,N===null?N=gc(a):(c=N.cachePool,c!==null?(T=dt._currentValue,c=c.parent!==T?{parent:T,pool:T}:c):c=Um(),N={baseLanes:N.baseLanes|a,cachePool:c}),o.memoizedState=N,o.childLanes=pc(e,b,a),n.memoizedState=hc,mi(e.child,o)):(qa(n),a=e.child,e=a.sibling,a=sa(a,{mode:"visible",children:o.children}),a.return=n,a.sibling=null,e!==null&&(b=n.deletions,b===null?(n.deletions=[e],n.flags|=16):b.push(e)),n.child=a,n.memoizedState=null,a)}function vc(e,n){return n=zo({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function zo(e,n){return e=an(22,e,null,n),e.lanes=0,e}function yc(e,n,a){return Nl(n,e.child,null,a),e=vc(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Qh(e,n,a){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n),Mu(e.return,n,a)}function bc(e,n,a,o,c,d){var b=e.memoizedState;b===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:o,tail:a,tailMode:c,treeForkCount:d}:(b.isBackwards=n,b.rendering=null,b.renderingStartTime=0,b.last=o,b.tail=a,b.tailMode=c,b.treeForkCount=d)}function Zh(e,n,a){var o=n.pendingProps,c=o.revealOrder,d=o.tail;o=o.children;var b=ut.current,N=(b&2)!==0;if(N?(b=b&1|2,n.flags|=128):b&=1,$(ut,b),Tt(e,n,o,a),o=He?ei:0,!N&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Qh(e,a,n);else if(e.tag===19)Qh(e,a,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(c){case"forwards":for(a=n.child,c=null;a!==null;)e=a.alternate,e!==null&&Eo(e)===null&&(c=a),a=a.sibling;a=c,a===null?(c=n.child,n.child=null):(c=a.sibling,a.sibling=null),bc(n,!1,c,a,d,o);break;case"backwards":case"unstable_legacy-backwards":for(a=null,c=n.child,n.child=null;c!==null;){if(e=c.alternate,e!==null&&Eo(e)===null){n.child=c;break}e=c.sibling,c.sibling=a,a=c,c=e}bc(n,!0,a,null,d,o);break;case"together":bc(n,!1,null,null,void 0,o);break;default:n.memoizedState=null}return n.child}function ha(e,n,a){if(e!==null&&(n.dependencies=e.dependencies),Ya|=n.lanes,(a&n.childLanes)===0)if(e!==null){if(or(e,n,a,!1),(a&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(i(153));if(n.child!==null){for(e=n.child,a=sa(e,e.pendingProps),n.child=a,a.return=n;e.sibling!==null;)e=e.sibling,a=a.sibling=sa(e,e.pendingProps),a.return=n;a.sibling=null}return n.child}function xc(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&go(e)))}function wx(e,n,a){switch(n.tag){case 3:fe(n,n.stateNode.containerInfo),Ha(n,dt,e.memoizedState.cache),xl();break;case 27:case 5:pe(n);break;case 4:fe(n,n.stateNode.containerInfo);break;case 10:Ha(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Gu(n),null;break;case 13:var o=n.memoizedState;if(o!==null)return o.dehydrated!==null?(qa(n),n.flags|=128,null):(a&n.child.childLanes)!==0?Kh(e,n,a):(qa(n),e=ha(e,n,a),e!==null?e.sibling:null);qa(n);break;case 19:var c=(e.flags&128)!==0;if(o=(a&n.childLanes)!==0,o||(or(e,n,a,!1),o=(a&n.childLanes)!==0),c){if(o)return Zh(e,n,a);n.flags|=128}if(c=n.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),$(ut,ut.current),o)break;return null;case 22:return n.lanes=0,qh(e,n,a,n.pendingProps);case 24:Ha(n,dt,e.memoizedState.cache)}return ha(e,n,a)}function Jh(e,n,a){if(e!==null)if(e.memoizedProps!==n.pendingProps)mt=!0;else{if(!xc(e,a)&&(n.flags&128)===0)return mt=!1,wx(e,n,a);mt=(e.flags&131072)!==0}else mt=!1,He&&(n.flags&1048576)!==0&&Tm(n,ei,n.index);switch(n.lanes=0,n.tag){case 16:e:{var o=n.pendingProps;if(e=Cl(n.elementType),n.type=e,typeof e=="function")Ru(e)?(o=Al(e,o),n.tag=1,n=Yh(null,n,e,o,a)):(n.tag=0,n=mc(null,n,e,o,a));else{if(e!=null){var c=e.$$typeof;if(c===L){n.tag=11,n=Vh(null,n,e,o,a);break e}else if(c===X){n.tag=14,n=Ih(null,n,e,o,a);break e}}throw n=oe(e)||e,Error(i(306,n,""))}}return n;case 0:return mc(e,n,n.type,n.pendingProps,a);case 1:return o=n.type,c=Al(o,n.pendingProps),Yh(e,n,o,c,a);case 3:e:{if(fe(n,n.stateNode.containerInfo),e===null)throw Error(i(387));o=n.pendingProps;var d=n.memoizedState;c=d.element,Vu(e,n),si(n,o,null,a);var b=n.memoizedState;if(o=b.cache,Ha(n,dt,o),o!==d.cache&&Ou(n,[dt],a,!0),oi(),o=b.element,d.isDehydrated)if(d={element:o,isDehydrated:!1,cache:b.cache},n.updateQueue.baseState=d,n.memoizedState=d,n.flags&256){n=Xh(e,n,o,a);break e}else if(o!==c){c=vn(Error(i(424)),n),ti(c),n=Xh(e,n,o,a);break e}else{switch(e=n.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(et=Sn(e.firstChild),At=n,He=!0,Ua=null,xn=!0,a=qm(n,null,o,a),n.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(xl(),o===c){n=ha(e,n,a);break e}Tt(e,n,o,a)}n=n.child}return n;case 26:return Oo(e,n),e===null?(a=up(n.type,null,n.pendingProps,null))?n.memoizedState=a:He||(a=n.type,e=n.pendingProps,o=Zo(Z.current).createElement(a),o[_t]=n,o[Xt]=e,kt(o,a,e),Et(o),n.stateNode=o):n.memoizedState=up(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return pe(n),e===null&&He&&(o=n.stateNode=ip(n.type,n.pendingProps,Z.current),At=n,xn=!0,c=et,Ja(n.type)?(Wc=c,et=Sn(o.firstChild)):et=c),Tt(e,n,n.pendingProps.children,a),Oo(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&He&&((c=o=et)&&(o=Zx(o,n.type,n.pendingProps,xn),o!==null?(n.stateNode=o,At=n,et=Sn(o.firstChild),xn=!1,c=!0):c=!1),c||Ba(n)),pe(n),c=n.type,d=n.pendingProps,b=e!==null?e.memoizedProps:null,o=d.children,Xc(c,d)?o=null:b!==null&&Xc(c,b)&&(n.flags|=32),n.memoizedState!==null&&(c=Yu(e,n,fx,null,null,a),Ai._currentValue=c),Oo(e,n),Tt(e,n,o,a),n.child;case 6:return e===null&&He&&((e=a=et)&&(a=Jx(a,n.pendingProps,xn),a!==null?(n.stateNode=a,At=n,et=null,e=!0):e=!1),e||Ba(n)),null;case 13:return Kh(e,n,a);case 4:return fe(n,n.stateNode.containerInfo),o=n.pendingProps,e===null?n.child=Nl(n,null,o,a):Tt(e,n,o,a),n.child;case 11:return Vh(e,n,n.type,n.pendingProps,a);case 7:return Tt(e,n,n.pendingProps,a),n.child;case 8:return Tt(e,n,n.pendingProps.children,a),n.child;case 12:return Tt(e,n,n.pendingProps.children,a),n.child;case 10:return o=n.pendingProps,Ha(n,n.type,o.value),Tt(e,n,o.children,a),n.child;case 9:return c=n.type._context,o=n.pendingProps.children,Sl(n),c=jt(c),o=o(c),n.flags|=1,Tt(e,n,o,a),n.child;case 14:return Ih(e,n,n.type,n.pendingProps,a);case 15:return Fh(e,n,n.type,n.pendingProps,a);case 19:return Zh(e,n,a);case 31:return xx(e,n,a);case 22:return qh(e,n,a,n.pendingProps);case 24:return Sl(n),o=jt(dt),e===null?(c=Uu(),c===null&&(c=Je,d=zu(),c.pooledCache=d,d.refCount++,d!==null&&(c.pooledCacheLanes|=a),c=d),n.memoizedState={parent:o,cache:c},Hu(n),Ha(n,dt,c)):((e.lanes&a)!==0&&(Vu(e,n),si(n,null,null,a),oi()),c=e.memoizedState,d=n.memoizedState,c.parent!==o?(c={parent:o,cache:o},n.memoizedState=c,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=c),Ha(n,dt,o)):(o=d.cache,Ha(n,dt,o),o!==c.cache&&Ou(n,[dt],a,!0))),Tt(e,n,n.pendingProps.children,a),n.child;case 29:throw n.pendingProps}throw Error(i(156,n.tag))}function ga(e){e.flags|=4}function wc(e,n,a,o,c){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(Rg())e.flags|=8192;else throw Rl=bo,Bu}else e.flags&=-16777217}function Wh(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!hp(n))if(Rg())e.flags|=8192;else throw Rl=bo,Bu}function Lo(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?Ot():536870912,e.lanes|=n,br|=n)}function hi(e,n){if(!He)switch(e.tailMode){case"hidden":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function tt(e){var n=e.alternate!==null&&e.alternate.child===e.child,a=0,o=0;if(n)for(var c=e.child;c!==null;)a|=c.lanes|c.childLanes,o|=c.subtreeFlags&65011712,o|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)a|=c.lanes|c.childLanes,o|=c.subtreeFlags,o|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=o,e.childLanes=a,n}function Sx(e,n,a){var o=n.pendingProps;switch(ju(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return tt(n),null;case 1:return tt(n),null;case 3:return a=n.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),da(dt),te(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(ir(n)?ga(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,ku())),tt(n),null;case 26:var c=n.type,d=n.memoizedState;return e===null?(ga(n),d!==null?(tt(n),Wh(n,d)):(tt(n),wc(n,c,null,o,a))):d?d!==e.memoizedState?(ga(n),tt(n),Wh(n,d)):(tt(n),n.flags&=-16777217):(e=e.memoizedProps,e!==o&&ga(n),tt(n),wc(n,c,e,o,a)),null;case 27:if($e(n),a=Z.current,c=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&ga(n);else{if(!o){if(n.stateNode===null)throw Error(i(166));return tt(n),null}e=W.current,ir(n)?Dm(n):(e=ip(c,o,a),n.stateNode=e,ga(n))}return tt(n),null;case 5:if($e(n),c=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&ga(n);else{if(!o){if(n.stateNode===null)throw Error(i(166));return tt(n),null}if(d=W.current,ir(n))Dm(n);else{var b=Zo(Z.current);switch(d){case 1:d=b.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:d=b.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":d=b.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":d=b.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":d=b.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof o.is=="string"?b.createElement("select",{is:o.is}):b.createElement("select"),o.multiple?d.multiple=!0:o.size&&(d.size=o.size);break;default:d=typeof o.is=="string"?b.createElement(c,{is:o.is}):b.createElement(c)}}d[_t]=n,d[Xt]=o;e:for(b=n.child;b!==null;){if(b.tag===5||b.tag===6)d.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===n)break e;for(;b.sibling===null;){if(b.return===null||b.return===n)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}n.stateNode=d;e:switch(kt(d,c,o),c){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&ga(n)}}return tt(n),wc(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,a),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==o&&ga(n);else{if(typeof o!="string"&&n.stateNode===null)throw Error(i(166));if(e=Z.current,ir(n)){if(e=n.stateNode,a=n.memoizedProps,o=null,c=At,c!==null)switch(c.tag){case 27:case 5:o=c.memoizedProps}e[_t]=n,e=!!(e.nodeValue===a||o!==null&&o.suppressHydrationWarning===!0||Kg(e.nodeValue,a)),e||Ba(n,!0)}else e=Zo(e).createTextNode(o),e[_t]=n,n.stateNode=e}return tt(n),null;case 31:if(a=n.memoizedState,e===null||e.memoizedState!==null){if(o=ir(n),a!==null){if(e===null){if(!o)throw Error(i(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(557));e[_t]=n}else xl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;tt(n),e=!1}else a=ku(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return n.flags&256?(rn(n),n):(rn(n),null);if((n.flags&128)!==0)throw Error(i(558))}return tt(n),null;case 13:if(o=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=ir(n),o!==null&&o.dehydrated!==null){if(e===null){if(!c)throw Error(i(318));if(c=n.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(i(317));c[_t]=n}else xl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;tt(n),c=!1}else c=ku(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return n.flags&256?(rn(n),n):(rn(n),null)}return rn(n),(n.flags&128)!==0?(n.lanes=a,n):(a=o!==null,e=e!==null&&e.memoizedState!==null,a&&(o=n.child,c=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(c=o.alternate.memoizedState.cachePool.pool),d=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),d!==c&&(o.flags|=2048)),a!==e&&a&&(n.child.flags|=8192),Lo(n,n.updateQueue),tt(n),null);case 4:return te(),e===null&&qc(n.stateNode.containerInfo),tt(n),null;case 10:return da(n.type),tt(n),null;case 19:if(P(ut),o=n.memoizedState,o===null)return tt(n),null;if(c=(n.flags&128)!==0,d=o.rendering,d===null)if(c)hi(o,!1);else{if(ot!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(d=Eo(e),d!==null){for(n.flags|=128,hi(o,!1),e=d.updateQueue,n.updateQueue=e,Lo(n,e),n.subtreeFlags=0,e=a,a=n.child;a!==null;)_m(a,e),a=a.sibling;return $(ut,ut.current&1|2),He&&ua(n,o.treeForkCount),n.child}e=e.sibling}o.tail!==null&&xt()>Io&&(n.flags|=128,c=!0,hi(o,!1),n.lanes=4194304)}else{if(!c)if(e=Eo(d),e!==null){if(n.flags|=128,c=!0,e=e.updateQueue,n.updateQueue=e,Lo(n,e),hi(o,!0),o.tail===null&&o.tailMode==="hidden"&&!d.alternate&&!He)return tt(n),null}else 2*xt()-o.renderingStartTime>Io&&a!==536870912&&(n.flags|=128,c=!0,hi(o,!1),n.lanes=4194304);o.isBackwards?(d.sibling=n.child,n.child=d):(e=o.last,e!==null?e.sibling=d:n.child=d,o.last=d)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=xt(),e.sibling=null,a=ut.current,$(ut,c?a&1|2:a&1),He&&ua(n,o.treeForkCount),e):(tt(n),null);case 22:case 23:return rn(n),$u(),o=n.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(n.flags|=8192):o&&(n.flags|=8192),o?(a&536870912)!==0&&(n.flags&128)===0&&(tt(n),n.subtreeFlags&6&&(n.flags|=8192)):tt(n),a=n.updateQueue,a!==null&&Lo(n,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==a&&(n.flags|=2048),e!==null&&P(El),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),da(dt),tt(n),null;case 25:return null;case 30:return null}throw Error(i(156,n.tag))}function Ex(e,n){switch(ju(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return da(dt),te(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return $e(n),null;case 31:if(n.memoizedState!==null){if(rn(n),n.alternate===null)throw Error(i(340));xl()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(rn(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(i(340));xl()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return P(ut),null;case 4:return te(),null;case 10:return da(n.type),null;case 22:case 23:return rn(n),$u(),e!==null&&P(El),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return da(dt),null;case 25:return null;default:return null}}function eg(e,n){switch(ju(n),n.tag){case 3:da(dt),te();break;case 26:case 27:case 5:$e(n);break;case 4:te();break;case 31:n.memoizedState!==null&&rn(n);break;case 13:rn(n);break;case 19:P(ut);break;case 10:da(n.type);break;case 22:case 23:rn(n),$u(),e!==null&&P(El);break;case 24:da(dt)}}function gi(e,n){try{var a=n.updateQueue,o=a!==null?a.lastEffect:null;if(o!==null){var c=o.next;a=c;do{if((a.tag&e)===e){o=void 0;var d=a.create,b=a.inst;o=d(),b.destroy=o}a=a.next}while(a!==c)}}catch(N){Ye(n,n.return,N)}}function Ga(e,n,a){try{var o=n.updateQueue,c=o!==null?o.lastEffect:null;if(c!==null){var d=c.next;o=d;do{if((o.tag&e)===e){var b=o.inst,N=b.destroy;if(N!==void 0){b.destroy=void 0,c=n;var T=a,H=N;try{H()}catch(Y){Ye(c,T,Y)}}}o=o.next}while(o!==d)}}catch(Y){Ye(n,n.return,Y)}}function tg(e){var n=e.updateQueue;if(n!==null){var a=e.stateNode;try{Gm(n,a)}catch(o){Ye(e,e.return,o)}}}function ng(e,n,a){a.props=Al(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(o){Ye(e,n,o)}}function pi(e,n){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof a=="function"?e.refCleanup=a(o):a.current=o}}catch(c){Ye(e,n,c)}}function Yn(e,n){var a=e.ref,o=e.refCleanup;if(a!==null)if(typeof o=="function")try{o()}catch(c){Ye(e,n,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(c){Ye(e,n,c)}else a.current=null}function ag(e){var n=e.type,a=e.memoizedProps,o=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":a.autoFocus&&o.focus();break e;case"img":a.src?o.src=a.src:a.srcSet&&(o.srcset=a.srcSet)}}catch(c){Ye(e,e.return,c)}}function Sc(e,n,a){try{var o=e.stateNode;Gx(o,e.type,a,n),o[Xt]=n}catch(c){Ye(e,e.return,c)}}function lg(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ja(e.type)||e.tag===4}function Ec(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||lg(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&&Ja(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 Cc(e,n,a){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,n):(n=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,n.appendChild(e),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=ia));else if(o!==4&&(o===27&&Ja(e.type)&&(a=e.stateNode,n=null),e=e.child,e!==null))for(Cc(e,n,a),e=e.sibling;e!==null;)Cc(e,n,a),e=e.sibling}function Uo(e,n,a){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?a.insertBefore(e,n):a.appendChild(e);else if(o!==4&&(o===27&&Ja(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Uo(e,n,a),e=e.sibling;e!==null;)Uo(e,n,a),e=e.sibling}function rg(e){var n=e.stateNode,a=e.memoizedProps;try{for(var o=e.type,c=n.attributes;c.length;)n.removeAttributeNode(c[0]);kt(n,o,a),n[_t]=e,n[Xt]=a}catch(d){Ye(e,e.return,d)}}var pa=!1,ht=!1,Rc=!1,ig=typeof WeakSet=="function"?WeakSet:Set,Ct=null;function Cx(e,n){if(e=e.containerInfo,Pc=ls,e=ym(e),yu(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var o=a.getSelection&&a.getSelection();if(o&&o.rangeCount!==0){a=o.anchorNode;var c=o.anchorOffset,d=o.focusNode;o=o.focusOffset;try{a.nodeType,d.nodeType}catch{a=null;break e}var b=0,N=-1,T=-1,H=0,Y=0,J=e,I=null;t:for(;;){for(var F;J!==a||c!==0&&J.nodeType!==3||(N=b+c),J!==d||o!==0&&J.nodeType!==3||(T=b+o),J.nodeType===3&&(b+=J.nodeValue.length),(F=J.firstChild)!==null;)I=J,J=F;for(;;){if(J===e)break t;if(I===a&&++H===c&&(N=b),I===d&&++Y===o&&(T=b),(F=J.nextSibling)!==null)break;J=I,I=J.parentNode}J=F}a=N===-1||T===-1?null:{start:N,end:T}}else a=null}a=a||{start:0,end:0}}else a=null;for(Yc={focusedElem:e,selectionRange:a},ls=!1,Ct=n;Ct!==null;)if(n=Ct,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,Ct=e;else for(;Ct!==null;){switch(n=Ct,d=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)c=e[a],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,a=n,c=d.memoizedProps,d=d.memoizedState,o=a.stateNode;try{var de=Al(a.type,c);e=o.getSnapshotBeforeUpdate(de,d),o.__reactInternalSnapshotBeforeUpdate=e}catch(xe){Ye(a,a.return,xe)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,a=e.nodeType,a===9)Qc(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Qc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(i(163))}if(e=n.sibling,e!==null){e.return=n.return,Ct=e;break}Ct=n.return}}function og(e,n,a){var o=a.flags;switch(a.tag){case 0:case 11:case 15:ya(e,a),o&4&&gi(5,a);break;case 1:if(ya(e,a),o&4)if(e=a.stateNode,n===null)try{e.componentDidMount()}catch(b){Ye(a,a.return,b)}else{var c=Al(a.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(c,n,e.__reactInternalSnapshotBeforeUpdate)}catch(b){Ye(a,a.return,b)}}o&64&&tg(a),o&512&&pi(a,a.return);break;case 3:if(ya(e,a),o&64&&(e=a.updateQueue,e!==null)){if(n=null,a.child!==null)switch(a.child.tag){case 27:case 5:n=a.child.stateNode;break;case 1:n=a.child.stateNode}try{Gm(e,n)}catch(b){Ye(a,a.return,b)}}break;case 27:n===null&&o&4&&rg(a);case 26:case 5:ya(e,a),n===null&&o&4&&ag(a),o&512&&pi(a,a.return);break;case 12:ya(e,a);break;case 31:ya(e,a),o&4&&cg(e,a);break;case 13:ya(e,a),o&4&&dg(e,a),o&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Mx.bind(null,a),Wx(e,a))));break;case 22:if(o=a.memoizedState!==null||pa,!o){n=n!==null&&n.memoizedState!==null||ht,c=pa;var d=ht;pa=o,(ht=n)&&!d?ba(e,a,(a.subtreeFlags&8772)!==0):ya(e,a),pa=c,ht=d}break;case 30:break;default:ya(e,a)}}function sg(e){var n=e.alternate;n!==null&&(e.alternate=null,sg(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&tu(n)),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 at=null,Qt=!1;function va(e,n,a){for(a=a.child;a!==null;)ug(e,n,a),a=a.sibling}function ug(e,n,a){if(pt&&typeof pt.onCommitFiberUnmount=="function")try{pt.onCommitFiberUnmount(la,a)}catch{}switch(a.tag){case 26:ht||Yn(a,n),va(e,n,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:ht||Yn(a,n);var o=at,c=Qt;Ja(a.type)&&(at=a.stateNode,Qt=!1),va(e,n,a),Ri(a.stateNode),at=o,Qt=c;break;case 5:ht||Yn(a,n);case 6:if(o=at,c=Qt,at=null,va(e,n,a),at=o,Qt=c,at!==null)if(Qt)try{(at.nodeType===9?at.body:at.nodeName==="HTML"?at.ownerDocument.body:at).removeChild(a.stateNode)}catch(d){Ye(a,n,d)}else try{at.removeChild(a.stateNode)}catch(d){Ye(a,n,d)}break;case 18:at!==null&&(Qt?(e=at,tp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),_r(e)):tp(at,a.stateNode));break;case 4:o=at,c=Qt,at=a.stateNode.containerInfo,Qt=!0,va(e,n,a),at=o,Qt=c;break;case 0:case 11:case 14:case 15:Ga(2,a,n),ht||Ga(4,a,n),va(e,n,a);break;case 1:ht||(Yn(a,n),o=a.stateNode,typeof o.componentWillUnmount=="function"&&ng(a,n,o)),va(e,n,a);break;case 21:va(e,n,a);break;case 22:ht=(o=ht)||a.memoizedState!==null,va(e,n,a),ht=o;break;default:va(e,n,a)}}function cg(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{_r(e)}catch(a){Ye(n,n.return,a)}}}function dg(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{_r(e)}catch(a){Ye(n,n.return,a)}}function Rx(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new ig),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new ig),n;default:throw Error(i(435,e.tag))}}function Bo(e,n){var a=Rx(e);n.forEach(function(o){if(!a.has(o)){a.add(o);var c=Ox.bind(null,e,o);o.then(c,c)}})}function Zt(e,n){var a=n.deletions;if(a!==null)for(var o=0;o<a.length;o++){var c=a[o],d=e,b=n,N=b;e:for(;N!==null;){switch(N.tag){case 27:if(Ja(N.type)){at=N.stateNode,Qt=!1;break e}break;case 5:at=N.stateNode,Qt=!1;break e;case 3:case 4:at=N.stateNode.containerInfo,Qt=!0;break e}N=N.return}if(at===null)throw Error(i(160));ug(d,b,c),at=null,Qt=!1,d=c.alternate,d!==null&&(d.return=null),c.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)fg(n,e),n=n.sibling}var Dn=null;function fg(e,n){var a=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Zt(n,e),Jt(e),o&4&&(Ga(3,e,e.return),gi(3,e),Ga(5,e,e.return));break;case 1:Zt(n,e),Jt(e),o&512&&(ht||a===null||Yn(a,a.return)),o&64&&pa&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?o:a.concat(o))));break;case 26:var c=Dn;if(Zt(n,e),Jt(e),o&512&&(ht||a===null||Yn(a,a.return)),o&4){var d=a!==null?a.memoizedState:null;if(o=e.memoizedState,a===null)if(o===null)if(e.stateNode===null){e:{o=e.type,a=e.memoizedProps,c=c.ownerDocument||c;t:switch(o){case"title":d=c.getElementsByTagName("title")[0],(!d||d[qr]||d[_t]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=c.createElement(o),c.head.insertBefore(d,c.querySelector("head > title"))),kt(d,o,a),d[_t]=e,Et(d),o=d;break e;case"link":var b=fp("link","href",c).get(o+(a.href||""));if(b){for(var N=0;N<b.length;N++)if(d=b[N],d.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&d.getAttribute("rel")===(a.rel==null?null:a.rel)&&d.getAttribute("title")===(a.title==null?null:a.title)&&d.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){b.splice(N,1);break t}}d=c.createElement(o),kt(d,o,a),c.head.appendChild(d);break;case"meta":if(b=fp("meta","content",c).get(o+(a.content||""))){for(N=0;N<b.length;N++)if(d=b[N],d.getAttribute("content")===(a.content==null?null:""+a.content)&&d.getAttribute("name")===(a.name==null?null:a.name)&&d.getAttribute("property")===(a.property==null?null:a.property)&&d.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&d.getAttribute("charset")===(a.charSet==null?null:a.charSet)){b.splice(N,1);break t}}d=c.createElement(o),kt(d,o,a),c.head.appendChild(d);break;default:throw Error(i(468,o))}d[_t]=e,Et(d),o=d}e.stateNode=o}else mp(c,e.type,e.stateNode);else e.stateNode=dp(c,o,e.memoizedProps);else d!==o?(d===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):d.count--,o===null?mp(c,e.type,e.stateNode):dp(c,o,e.memoizedProps)):o===null&&e.stateNode!==null&&Sc(e,e.memoizedProps,a.memoizedProps)}break;case 27:Zt(n,e),Jt(e),o&512&&(ht||a===null||Yn(a,a.return)),a!==null&&o&4&&Sc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Zt(n,e),Jt(e),o&512&&(ht||a===null||Yn(a,a.return)),e.flags&32){c=e.stateNode;try{Ql(c,"")}catch(de){Ye(e,e.return,de)}}o&4&&e.stateNode!=null&&(c=e.memoizedProps,Sc(e,c,a!==null?a.memoizedProps:c)),o&1024&&(Rc=!0);break;case 6:if(Zt(n,e),Jt(e),o&4){if(e.stateNode===null)throw Error(i(162));o=e.memoizedProps,a=e.stateNode;try{a.nodeValue=o}catch(de){Ye(e,e.return,de)}}break;case 3:if(es=null,c=Dn,Dn=Jo(n.containerInfo),Zt(n,e),Dn=c,Jt(e),o&4&&a!==null&&a.memoizedState.isDehydrated)try{_r(n.containerInfo)}catch(de){Ye(e,e.return,de)}Rc&&(Rc=!1,mg(e));break;case 4:o=Dn,Dn=Jo(e.stateNode.containerInfo),Zt(n,e),Jt(e),Dn=o;break;case 12:Zt(n,e),Jt(e);break;case 31:Zt(n,e),Jt(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Bo(e,o)));break;case 13:Zt(n,e),Jt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Vo=xt()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Bo(e,o)));break;case 22:c=e.memoizedState!==null;var T=a!==null&&a.memoizedState!==null,H=pa,Y=ht;if(pa=H||c,ht=Y||T,Zt(n,e),ht=Y,pa=H,Jt(e),o&8192)e:for(n=e.stateNode,n._visibility=c?n._visibility&-2:n._visibility|1,c&&(a===null||T||pa||ht||jl(e)),a=null,n=e;;){if(n.tag===5||n.tag===26){if(a===null){T=a=n;try{if(d=T.stateNode,c)b=d.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{N=T.stateNode;var J=T.memoizedProps.style,I=J!=null&&J.hasOwnProperty("display")?J.display:null;N.style.display=I==null||typeof I=="boolean"?"":(""+I).trim()}}catch(de){Ye(T,T.return,de)}}}else if(n.tag===6){if(a===null){T=n;try{T.stateNode.nodeValue=c?"":T.memoizedProps}catch(de){Ye(T,T.return,de)}}}else if(n.tag===18){if(a===null){T=n;try{var F=T.stateNode;c?np(F,!0):np(T.stateNode,!1)}catch(de){Ye(T,T.return,de)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;a===n&&(a=null),n=n.return}a===n&&(a=null),n.sibling.return=n.return,n=n.sibling}o&4&&(o=e.updateQueue,o!==null&&(a=o.retryQueue,a!==null&&(o.retryQueue=null,Bo(e,a))));break;case 19:Zt(n,e),Jt(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Bo(e,o)));break;case 30:break;case 21:break;default:Zt(n,e),Jt(e)}}function Jt(e){var n=e.flags;if(n&2){try{for(var a,o=e.return;o!==null;){if(lg(o)){a=o;break}o=o.return}if(a==null)throw Error(i(160));switch(a.tag){case 27:var c=a.stateNode,d=Ec(e);Uo(e,d,c);break;case 5:var b=a.stateNode;a.flags&32&&(Ql(b,""),a.flags&=-33);var N=Ec(e);Uo(e,N,b);break;case 3:case 4:var T=a.stateNode.containerInfo,H=Ec(e);Cc(e,H,T);break;default:throw Error(i(161))}}catch(Y){Ye(e,e.return,Y)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function mg(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;mg(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function ya(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)og(e,n.alternate,n),n=n.sibling}function jl(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:Ga(4,n,n.return),jl(n);break;case 1:Yn(n,n.return);var a=n.stateNode;typeof a.componentWillUnmount=="function"&&ng(n,n.return,a),jl(n);break;case 27:Ri(n.stateNode);case 26:case 5:Yn(n,n.return),jl(n);break;case 22:n.memoizedState===null&&jl(n);break;case 30:jl(n);break;default:jl(n)}e=e.sibling}}function ba(e,n,a){for(a=a&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var o=n.alternate,c=e,d=n,b=d.flags;switch(d.tag){case 0:case 11:case 15:ba(c,d,a),gi(4,d);break;case 1:if(ba(c,d,a),o=d,c=o.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(H){Ye(o,o.return,H)}if(o=d,c=o.updateQueue,c!==null){var N=o.stateNode;try{var T=c.shared.hiddenCallbacks;if(T!==null)for(c.shared.hiddenCallbacks=null,c=0;c<T.length;c++)$m(T[c],N)}catch(H){Ye(o,o.return,H)}}a&&b&64&&tg(d),pi(d,d.return);break;case 27:rg(d);case 26:case 5:ba(c,d,a),a&&o===null&&b&4&&ag(d),pi(d,d.return);break;case 12:ba(c,d,a);break;case 31:ba(c,d,a),a&&b&4&&cg(c,d);break;case 13:ba(c,d,a),a&&b&4&&dg(c,d);break;case 22:d.memoizedState===null&&ba(c,d,a),pi(d,d.return);break;case 30:break;default:ba(c,d,a)}n=n.sibling}}function Nc(e,n){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&ni(a))}function _c(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&ni(e))}function Mn(e,n,a,o){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)hg(e,n,a,o),n=n.sibling}function hg(e,n,a,o){var c=n.flags;switch(n.tag){case 0:case 11:case 15:Mn(e,n,a,o),c&2048&&gi(9,n);break;case 1:Mn(e,n,a,o);break;case 3:Mn(e,n,a,o),c&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&ni(e)));break;case 12:if(c&2048){Mn(e,n,a,o),e=n.stateNode;try{var d=n.memoizedProps,b=d.id,N=d.onPostCommit;typeof N=="function"&&N(b,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(T){Ye(n,n.return,T)}}else Mn(e,n,a,o);break;case 31:Mn(e,n,a,o);break;case 13:Mn(e,n,a,o);break;case 23:break;case 22:d=n.stateNode,b=n.alternate,n.memoizedState!==null?d._visibility&2?Mn(e,n,a,o):vi(e,n):d._visibility&2?Mn(e,n,a,o):(d._visibility|=2,pr(e,n,a,o,(n.subtreeFlags&10256)!==0||!1)),c&2048&&Nc(b,n);break;case 24:Mn(e,n,a,o),c&2048&&_c(n.alternate,n);break;default:Mn(e,n,a,o)}}function pr(e,n,a,o,c){for(c=c&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var d=e,b=n,N=a,T=o,H=b.flags;switch(b.tag){case 0:case 11:case 15:pr(d,b,N,T,c),gi(8,b);break;case 23:break;case 22:var Y=b.stateNode;b.memoizedState!==null?Y._visibility&2?pr(d,b,N,T,c):vi(d,b):(Y._visibility|=2,pr(d,b,N,T,c)),c&&H&2048&&Nc(b.alternate,b);break;case 24:pr(d,b,N,T,c),c&&H&2048&&_c(b.alternate,b);break;default:pr(d,b,N,T,c)}n=n.sibling}}function vi(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var a=e,o=n,c=o.flags;switch(o.tag){case 22:vi(a,o),c&2048&&Nc(o.alternate,o);break;case 24:vi(a,o),c&2048&&_c(o.alternate,o);break;default:vi(a,o)}n=n.sibling}}var yi=8192;function vr(e,n,a){if(e.subtreeFlags&yi)for(e=e.child;e!==null;)gg(e,n,a),e=e.sibling}function gg(e,n,a){switch(e.tag){case 26:vr(e,n,a),e.flags&yi&&e.memoizedState!==null&&dw(a,Dn,e.memoizedState,e.memoizedProps);break;case 5:vr(e,n,a);break;case 3:case 4:var o=Dn;Dn=Jo(e.stateNode.containerInfo),vr(e,n,a),Dn=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=yi,yi=16777216,vr(e,n,a),yi=o):vr(e,n,a));break;default:vr(e,n,a)}}function pg(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function bi(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var o=n[a];Ct=o,yg(o,e)}pg(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)vg(e),e=e.sibling}function vg(e){switch(e.tag){case 0:case 11:case 15:bi(e),e.flags&2048&&Ga(9,e,e.return);break;case 3:bi(e);break;case 12:bi(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,Ho(e)):bi(e);break;default:bi(e)}}function Ho(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var o=n[a];Ct=o,yg(o,e)}pg(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:Ga(8,n,n.return),Ho(n);break;case 22:a=n.stateNode,a._visibility&2&&(a._visibility&=-3,Ho(n));break;default:Ho(n)}e=e.sibling}}function yg(e,n){for(;Ct!==null;){var a=Ct;switch(a.tag){case 0:case 11:case 15:Ga(8,a,n);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var o=a.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:ni(a.memoizedState.cache)}if(o=a.child,o!==null)o.return=a,Ct=o;else e:for(a=e;Ct!==null;){o=Ct;var c=o.sibling,d=o.return;if(sg(o),o===a){Ct=null;break e}if(c!==null){c.return=d,Ct=c;break e}Ct=d}}}var Nx={getCacheForType:function(e){var n=jt(dt),a=n.data.get(e);return a===void 0&&(a=e(),n.data.set(e,a)),a},cacheSignal:function(){return jt(dt).controller.signal}},_x=typeof WeakMap=="function"?WeakMap:Map,qe=0,Je=null,ze=null,Ue=0,Pe=0,on=null,Pa=!1,yr=!1,Ac=!1,xa=0,ot=0,Ya=0,Tl=0,jc=0,sn=0,br=0,xi=null,Wt=null,Tc=!1,Vo=0,bg=0,Io=1/0,Fo=null,Xa=null,vt=0,Ka=null,xr=null,wa=0,kc=0,Dc=null,xg=null,wi=0,Mc=null;function un(){return(qe&2)!==0&&Ue!==0?Ue&-Ue:O.T!==null?Hc():Ws()}function wg(){if(sn===0)if((Ue&536870912)===0||He){var e=Fl;Fl<<=1,(Fl&3932160)===0&&(Fl=262144),sn=e}else sn=536870912;return e=ln.current,e!==null&&(e.flags|=32),sn}function en(e,n,a){(e===Je&&(Pe===2||Pe===9)||e.cancelPendingCommit!==null)&&(wr(e,0),Qa(e,Ue,sn,!1)),rt(e,a),((qe&2)===0||e!==Je)&&(e===Je&&((qe&2)===0&&(Tl|=a),ot===4&&Qa(e,Ue,sn,!1)),Xn(e))}function Sg(e,n,a){if((qe&6)!==0)throw Error(i(327));var o=!a&&(n&127)===0&&(n&e.expiredLanes)===0||nt(e,n),c=o?Tx(e,n):zc(e,n,!0),d=o;do{if(c===0){yr&&!o&&Qa(e,n,0,!1);break}else{if(a=e.current.alternate,d&&!Ax(a)){c=zc(e,n,!1),d=!1;continue}if(c===2){if(d=n,e.errorRecoveryDisabledLanes&d)var b=0;else b=e.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){n=b;e:{var N=e;c=xi;var T=N.current.memoizedState.isDehydrated;if(T&&(wr(N,b).flags|=256),b=zc(N,b,!1),b!==2){if(Ac&&!T){N.errorRecoveryDisabledLanes|=d,Tl|=d,c=4;break e}d=Wt,Wt=c,d!==null&&(Wt===null?Wt=d:Wt.push.apply(Wt,d))}c=b}if(d=!1,c!==2)continue}}if(c===1){wr(e,0),Qa(e,n,0,!0);break}e:{switch(o=e,d=c,d){case 0:case 1:throw Error(i(345));case 4:if((n&4194048)!==n)break;case 6:Qa(o,n,sn,!Pa);break e;case 2:Wt=null;break;case 3:case 5:break;default:throw Error(i(329))}if((n&62914560)===n&&(c=Vo+300-xt(),10<c)){if(Qa(o,n,sn,!Pa),Re(o,0,!0)!==0)break e;wa=n,o.timeoutHandle=Wg(Eg.bind(null,o,a,Wt,Fo,Tc,n,sn,Tl,br,Pa,d,"Throttled",-0,0),c);break e}Eg(o,a,Wt,Fo,Tc,n,sn,Tl,br,Pa,d,null,-0,0)}}break}while(!0);Xn(e)}function Eg(e,n,a,o,c,d,b,N,T,H,Y,J,I,F){if(e.timeoutHandle=-1,J=n.subtreeFlags,J&8192||(J&16785408)===16785408){J={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ia},gg(n,d,J);var de=(d&62914560)===d?Vo-xt():(d&4194048)===d?bg-xt():0;if(de=fw(J,de),de!==null){wa=d,e.cancelPendingCommit=de(kg.bind(null,e,n,d,a,o,c,b,N,T,Y,J,null,I,F)),Qa(e,d,b,!H);return}}kg(e,n,d,a,o,c,b,N,T)}function Ax(e){for(var n=e;;){var a=n.tag;if((a===0||a===11||a===15)&&n.flags&16384&&(a=n.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var o=0;o<a.length;o++){var c=a[o],d=c.getSnapshot;c=c.value;try{if(!nn(d(),c))return!1}catch{return!1}}if(a=n.child,n.subtreeFlags&16384&&a!==null)a.return=n,n=a;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Qa(e,n,a,o){n&=~jc,n&=~Tl,e.suspendedLanes|=n,e.pingedLanes&=~n,o&&(e.warmLanes|=n),o=e.expirationTimes;for(var c=n;0<c;){var d=31-wt(c),b=1<<d;o[d]=-1,c&=~b}a!==0&&ml(e,a,n)}function qo(){return(qe&6)===0?(Si(0),!1):!0}function Oc(){if(ze!==null){if(Pe===0)var e=ze.return;else e=ze,ca=wl=null,Qu(e),dr=null,li=0,e=ze;for(;e!==null;)eg(e.alternate,e),e=e.return;ze=null}}function wr(e,n){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Xx(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),wa=0,Oc(),Je=e,ze=a=sa(e.current,null),Ue=n,Pe=0,on=null,Pa=!1,yr=nt(e,n),Ac=!1,br=sn=jc=Tl=Ya=ot=0,Wt=xi=null,Tc=!1,(n&8)!==0&&(n|=n&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=n;0<o;){var c=31-wt(o),d=1<<c;n|=e[c],o&=~d}return xa=n,uo(),a}function Cg(e,n){je=null,O.H=fi,n===cr||n===yo?(n=Vm(),Pe=3):n===Bu?(n=Vm(),Pe=4):Pe=n===fc?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,on=n,ze===null&&(ot=1,Do(e,vn(n,e.current)))}function Rg(){var e=ln.current;return e===null?!0:(Ue&4194048)===Ue?wn===null:(Ue&62914560)===Ue||(Ue&536870912)!==0?e===wn:!1}function Ng(){var e=O.H;return O.H=fi,e===null?fi:e}function _g(){var e=O.A;return O.A=Nx,e}function $o(){ot=4,Pa||(Ue&4194048)!==Ue&&ln.current!==null||(yr=!0),(Ya&134217727)===0&&(Tl&134217727)===0||Je===null||Qa(Je,Ue,sn,!1)}function zc(e,n,a){var o=qe;qe|=2;var c=Ng(),d=_g();(Je!==e||Ue!==n)&&(Fo=null,wr(e,n)),n=!1;var b=ot;e:do try{if(Pe!==0&&ze!==null){var N=ze,T=on;switch(Pe){case 8:Oc(),b=6;break e;case 3:case 2:case 9:case 6:ln.current===null&&(n=!0);var H=Pe;if(Pe=0,on=null,Sr(e,N,T,H),a&&yr){b=0;break e}break;default:H=Pe,Pe=0,on=null,Sr(e,N,T,H)}}jx(),b=ot;break}catch(Y){Cg(e,Y)}while(!0);return n&&e.shellSuspendCounter++,ca=wl=null,qe=o,O.H=c,O.A=d,ze===null&&(Je=null,Ue=0,uo()),b}function jx(){for(;ze!==null;)Ag(ze)}function Tx(e,n){var a=qe;qe|=2;var o=Ng(),c=_g();Je!==e||Ue!==n?(Fo=null,Io=xt()+500,wr(e,n)):yr=nt(e,n);e:do try{if(Pe!==0&&ze!==null){n=ze;var d=on;t:switch(Pe){case 1:Pe=0,on=null,Sr(e,n,d,1);break;case 2:case 9:if(Bm(d)){Pe=0,on=null,jg(n);break}n=function(){Pe!==2&&Pe!==9||Je!==e||(Pe=7),Xn(e)},d.then(n,n);break e;case 3:Pe=7;break e;case 4:Pe=5;break e;case 7:Bm(d)?(Pe=0,on=null,jg(n)):(Pe=0,on=null,Sr(e,n,d,7));break;case 5:var b=null;switch(ze.tag){case 26:b=ze.memoizedState;case 5:case 27:var N=ze;if(b?hp(b):N.stateNode.complete){Pe=0,on=null;var T=N.sibling;if(T!==null)ze=T;else{var H=N.return;H!==null?(ze=H,Go(H)):ze=null}break t}}Pe=0,on=null,Sr(e,n,d,5);break;case 6:Pe=0,on=null,Sr(e,n,d,6);break;case 8:Oc(),ot=6;break e;default:throw Error(i(462))}}kx();break}catch(Y){Cg(e,Y)}while(!0);return ca=wl=null,O.H=o,O.A=c,qe=a,ze!==null?0:(Je=null,Ue=0,uo(),ot)}function kx(){for(;ze!==null&&!bt();)Ag(ze)}function Ag(e){var n=Jh(e.alternate,e,xa);e.memoizedProps=e.pendingProps,n===null?Go(e):ze=n}function jg(e){var n=e,a=n.alternate;switch(n.tag){case 15:case 0:n=Ph(a,n,n.pendingProps,n.type,void 0,Ue);break;case 11:n=Ph(a,n,n.pendingProps,n.type.render,n.ref,Ue);break;case 5:Qu(n);default:eg(a,n),n=ze=_m(n,xa),n=Jh(a,n,xa)}e.memoizedProps=e.pendingProps,n===null?Go(e):ze=n}function Sr(e,n,a,o){ca=wl=null,Qu(n),dr=null,li=0;var c=n.return;try{if(bx(e,c,n,a,Ue)){ot=1,Do(e,vn(a,e.current)),ze=null;return}}catch(d){if(c!==null)throw ze=c,d;ot=1,Do(e,vn(a,e.current)),ze=null;return}n.flags&32768?(He||o===1?e=!0:yr||(Ue&536870912)!==0?e=!1:(Pa=e=!0,(o===2||o===9||o===3||o===6)&&(o=ln.current,o!==null&&o.tag===13&&(o.flags|=16384))),Tg(n,e)):Go(n)}function Go(e){var n=e;do{if((n.flags&32768)!==0){Tg(n,Pa);return}e=n.return;var a=Sx(n.alternate,n,xa);if(a!==null){ze=a;return}if(n=n.sibling,n!==null){ze=n;return}ze=n=e}while(n!==null);ot===0&&(ot=5)}function Tg(e,n){do{var a=Ex(e.alternate,e);if(a!==null){a.flags&=32767,ze=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!n&&(e=e.sibling,e!==null)){ze=e;return}ze=e=a}while(e!==null);ot=6,ze=null}function kg(e,n,a,o,c,d,b,N,T){e.cancelPendingCommit=null;do Po();while(vt!==0);if((qe&6)!==0)throw Error(i(327));if(n!==null){if(n===e.current)throw Error(i(177));if(d=n.lanes|n.childLanes,d|=Eu,Gt(e,a,d,b,N,T),e===Je&&(ze=Je=null,Ue=0),xr=n,Ka=e,wa=a,kc=d,Dc=c,xg=o,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,zx(We,function(){return Lg(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||o){o=O.T,O.T=null,c=G.p,G.p=2,b=qe,qe|=4;try{Cx(e,n,a)}finally{qe=b,G.p=c,O.T=o}}vt=1,Dg(),Mg(),Og()}}function Dg(){if(vt===1){vt=0;var e=Ka,n=xr,a=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||a){a=O.T,O.T=null;var o=G.p;G.p=2;var c=qe;qe|=4;try{fg(n,e);var d=Yc,b=ym(e.containerInfo),N=d.focusedElem,T=d.selectionRange;if(b!==N&&N&&N.ownerDocument&&vm(N.ownerDocument.documentElement,N)){if(T!==null&&yu(N)){var H=T.start,Y=T.end;if(Y===void 0&&(Y=H),"selectionStart"in N)N.selectionStart=H,N.selectionEnd=Math.min(Y,N.value.length);else{var J=N.ownerDocument||document,I=J&&J.defaultView||window;if(I.getSelection){var F=I.getSelection(),de=N.textContent.length,xe=Math.min(T.start,de),Qe=T.end===void 0?xe:Math.min(T.end,de);!F.extend&&xe>Qe&&(b=Qe,Qe=xe,xe=b);var z=pm(N,xe),D=pm(N,Qe);if(z&&D&&(F.rangeCount!==1||F.anchorNode!==z.node||F.anchorOffset!==z.offset||F.focusNode!==D.node||F.focusOffset!==D.offset)){var B=J.createRange();B.setStart(z.node,z.offset),F.removeAllRanges(),xe>Qe?(F.addRange(B),F.extend(D.node,D.offset)):(B.setEnd(D.node,D.offset),F.addRange(B))}}}}for(J=[],F=N;F=F.parentNode;)F.nodeType===1&&J.push({element:F,left:F.scrollLeft,top:F.scrollTop});for(typeof N.focus=="function"&&N.focus(),N=0;N<J.length;N++){var Q=J[N];Q.element.scrollLeft=Q.left,Q.element.scrollTop=Q.top}}ls=!!Pc,Yc=Pc=null}finally{qe=c,G.p=o,O.T=a}}e.current=n,vt=2}}function Mg(){if(vt===2){vt=0;var e=Ka,n=xr,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=O.T,O.T=null;var o=G.p;G.p=2;var c=qe;qe|=4;try{og(e,n.alternate,n)}finally{qe=c,G.p=o,O.T=a}}vt=3}}function Og(){if(vt===4||vt===3){vt=0,jn();var e=Ka,n=xr,a=wa,o=xg;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?vt=5:(vt=0,xr=Ka=null,zg(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Xa=null),Tn(a),n=n.stateNode,pt&&typeof pt.onCommitFiberRoot=="function")try{pt.onCommitFiberRoot(la,n,void 0,(n.current.flags&128)===128)}catch{}if(o!==null){n=O.T,c=G.p,G.p=2,O.T=null;try{for(var d=e.onRecoverableError,b=0;b<o.length;b++){var N=o[b];d(N.value,{componentStack:N.stack})}}finally{O.T=n,G.p=c}}(wa&3)!==0&&Po(),Xn(e),c=e.pendingLanes,(a&261930)!==0&&(c&42)!==0?e===Mc?wi++:(wi=0,Mc=e):wi=0,Si(0)}}function zg(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,ni(n)))}function Po(){return Dg(),Mg(),Og(),Lg()}function Lg(){if(vt!==5)return!1;var e=Ka,n=kc;kc=0;var a=Tn(wa),o=O.T,c=G.p;try{G.p=32>a?32:a,O.T=null,a=Dc,Dc=null;var d=Ka,b=wa;if(vt=0,xr=Ka=null,wa=0,(qe&6)!==0)throw Error(i(331));var N=qe;if(qe|=4,vg(d.current),hg(d,d.current,b,a),qe=N,Si(0,!1),pt&&typeof pt.onPostCommitFiberRoot=="function")try{pt.onPostCommitFiberRoot(la,d)}catch{}return!0}finally{G.p=c,O.T=o,zg(e,n)}}function Ug(e,n,a){n=vn(a,n),n=dc(e.stateNode,n,2),e=Fa(e,n,2),e!==null&&(rt(e,2),Xn(e))}function Ye(e,n,a){if(e.tag===3)Ug(e,e,a);else for(;n!==null;){if(n.tag===3){Ug(n,e,a);break}else if(n.tag===1){var o=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Xa===null||!Xa.has(o))){e=vn(a,e),a=Bh(2),o=Fa(n,a,2),o!==null&&(Hh(a,o,n,e),rt(o,2),Xn(o));break}}n=n.return}}function Lc(e,n,a){var o=e.pingCache;if(o===null){o=e.pingCache=new _x;var c=new Set;o.set(n,c)}else c=o.get(n),c===void 0&&(c=new Set,o.set(n,c));c.has(a)||(Ac=!0,c.add(a),e=Dx.bind(null,e,n,a),n.then(e,e))}function Dx(e,n,a){var o=e.pingCache;o!==null&&o.delete(n),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Je===e&&(Ue&a)===a&&(ot===4||ot===3&&(Ue&62914560)===Ue&&300>xt()-Vo?(qe&2)===0&&wr(e,0):jc|=a,br===Ue&&(br=0)),Xn(e)}function Bg(e,n){n===0&&(n=Ot()),e=yl(e,n),e!==null&&(rt(e,n),Xn(e))}function Mx(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),Bg(e,a)}function Ox(e,n){var a=0;switch(e.tag){case 31:case 13:var o=e.stateNode,c=e.memoizedState;c!==null&&(a=c.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(i(314))}o!==null&&o.delete(n),Bg(e,a)}function zx(e,n){return na(e,n)}var Yo=null,Er=null,Uc=!1,Xo=!1,Bc=!1,Za=0;function Xn(e){e!==Er&&e.next===null&&(Er===null?Yo=Er=e:Er=Er.next=e),Xo=!0,Uc||(Uc=!0,Ux())}function Si(e,n){if(!Bc&&Xo){Bc=!0;do for(var a=!1,o=Yo;o!==null;){if(e!==0){var c=o.pendingLanes;if(c===0)var d=0;else{var b=o.suspendedLanes,N=o.pingedLanes;d=(1<<31-wt(42|e)+1)-1,d&=c&~(b&~N),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(a=!0,Fg(o,d))}else d=Ue,d=Re(o,o===Je?d:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(d&3)===0||nt(o,d)||(a=!0,Fg(o,d));o=o.next}while(a);Bc=!1}}function Lx(){Hg()}function Hg(){Xo=Uc=!1;var e=0;Za!==0&&Yx()&&(e=Za);for(var n=xt(),a=null,o=Yo;o!==null;){var c=o.next,d=Vg(o,n);d===0?(o.next=null,a===null?Yo=c:a.next=c,c===null&&(Er=a)):(a=o,(e!==0||(d&3)!==0)&&(Xo=!0)),o=c}vt!==0&&vt!==5||Si(e),Za!==0&&(Za=0)}function Vg(e,n){for(var a=e.suspendedLanes,o=e.pingedLanes,c=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var b=31-wt(d),N=1<<b,T=c[b];T===-1?((N&a)===0||(N&o)!==0)&&(c[b]=St(N,n)):T<=n&&(e.expiredLanes|=N),d&=~N}if(n=Je,a=Ue,a=Re(e,e===n?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,a===0||e===n&&(Pe===2||Pe===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&Da(o),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||nt(e,a)){if(n=a&-a,n===e.callbackPriority)return n;switch(o!==null&&Da(o),Tn(a)){case 2:case 8:a=Te;break;case 32:a=We;break;case 268435456:a=Mt;break;default:a=We}return o=Ig.bind(null,e),a=na(a,o),e.callbackPriority=n,e.callbackNode=a,n}return o!==null&&o!==null&&Da(o),e.callbackPriority=2,e.callbackNode=null,2}function Ig(e,n){if(vt!==0&&vt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Po()&&e.callbackNode!==a)return null;var o=Ue;return o=Re(e,e===Je?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(Sg(e,o,n),Vg(e,xt()),e.callbackNode!=null&&e.callbackNode===a?Ig.bind(null,e):null)}function Fg(e,n){if(Po())return null;Sg(e,n,!0)}function Ux(){Kx(function(){(qe&6)!==0?na(me,Lx):Hg()})}function Hc(){if(Za===0){var e=sr;e===0&&(e=Il,Il<<=1,(Il&261888)===0&&(Il=256)),Za=e}return Za}function qg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:to(""+e)}function $g(e,n){var a=n.ownerDocument.createElement("input");return a.name=n.name,a.value=n.value,e.id&&a.setAttribute("form",e.id),n.parentNode.insertBefore(a,n),e=new FormData(e),a.parentNode.removeChild(a),e}function Bx(e,n,a,o,c){if(n==="submit"&&a&&a.stateNode===c){var d=qg((c[Xt]||null).action),b=o.submitter;b&&(n=(n=b[Xt]||null)?qg(n.formAction):b.getAttribute("formAction"),n!==null&&(d=n,b=null));var N=new ro("action","action",null,o,c);e.push({event:N,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Za!==0){var T=b?$g(c,b):new FormData(c);rc(a,{pending:!0,data:T,method:c.method,action:d},null,T)}}else typeof d=="function"&&(N.preventDefault(),T=b?$g(c,b):new FormData(c),rc(a,{pending:!0,data:T,method:c.method,action:d},d,T))},currentTarget:c}]})}}for(var Vc=0;Vc<Su.length;Vc++){var Ic=Su[Vc],Hx=Ic.toLowerCase(),Vx=Ic[0].toUpperCase()+Ic.slice(1);kn(Hx,"on"+Vx)}kn(wm,"onAnimationEnd"),kn(Sm,"onAnimationIteration"),kn(Em,"onAnimationStart"),kn("dblclick","onDoubleClick"),kn("focusin","onFocus"),kn("focusout","onBlur"),kn(nx,"onTransitionRun"),kn(ax,"onTransitionStart"),kn(lx,"onTransitionCancel"),kn(Cm,"onTransitionEnd"),Xl("onMouseEnter",["mouseout","mouseover"]),Xl("onMouseLeave",["mouseout","mouseover"]),Xl("onPointerEnter",["pointerout","pointerover"]),Xl("onPointerLeave",["pointerout","pointerover"]),hl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),hl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),hl("onBeforeInput",["compositionend","keypress","textInput","paste"]),hl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),hl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),hl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ei="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(" "),Ix=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ei));function Gg(e,n){n=(n&4)!==0;for(var a=0;a<e.length;a++){var o=e[a],c=o.event;o=o.listeners;e:{var d=void 0;if(n)for(var b=o.length-1;0<=b;b--){var N=o[b],T=N.instance,H=N.currentTarget;if(N=N.listener,T!==d&&c.isPropagationStopped())break e;d=N,c.currentTarget=H;try{d(c)}catch(Y){so(Y)}c.currentTarget=null,d=T}else for(b=0;b<o.length;b++){if(N=o[b],T=N.instance,H=N.currentTarget,N=N.listener,T!==d&&c.isPropagationStopped())break e;d=N,c.currentTarget=H;try{d(c)}catch(Y){so(Y)}c.currentTarget=null,d=T}}}}function Le(e,n){var a=n[eu];a===void 0&&(a=n[eu]=new Set);var o=e+"__bubble";a.has(o)||(Pg(n,e,2,!1),a.add(o))}function Fc(e,n,a){var o=0;n&&(o|=4),Pg(a,e,o,n)}var Ko="_reactListening"+Math.random().toString(36).slice(2);function qc(e){if(!e[Ko]){e[Ko]=!0,Hf.forEach(function(a){a!=="selectionchange"&&(Ix.has(a)||Fc(a,!1,e),Fc(a,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[Ko]||(n[Ko]=!0,Fc("selectionchange",!1,n))}}function Pg(e,n,a,o){switch(wp(n)){case 2:var c=gw;break;case 8:c=pw;break;default:c=ld}a=c.bind(null,n,a,e),c=void 0,!uu||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(c=!0),o?c!==void 0?e.addEventListener(n,a,{capture:!0,passive:c}):e.addEventListener(n,a,!0):c!==void 0?e.addEventListener(n,a,{passive:c}):e.addEventListener(n,a,!1)}function $c(e,n,a,o,c){var d=o;if((n&1)===0&&(n&2)===0&&o!==null)e:for(;;){if(o===null)return;var b=o.tag;if(b===3||b===4){var N=o.stateNode.containerInfo;if(N===c)break;if(b===4)for(b=o.return;b!==null;){var T=b.tag;if((T===3||T===4)&&b.stateNode.containerInfo===c)return;b=b.return}for(;N!==null;){if(b=Gl(N),b===null)return;if(T=b.tag,T===5||T===6||T===26||T===27){o=d=b;continue e}N=N.parentNode}}o=o.return}Zf(function(){var H=d,Y=ou(a),J=[];e:{var I=Rm.get(e);if(I!==void 0){var F=ro,de=e;switch(e){case"keypress":if(ao(a)===0)break e;case"keydown":case"keyup":F=Ob;break;case"focusin":de="focus",F=mu;break;case"focusout":de="blur",F=mu;break;case"beforeblur":case"afterblur":F=mu;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":F=em;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":F=Sb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":F=Ub;break;case wm:case Sm:case Em:F=Rb;break;case Cm:F=Hb;break;case"scroll":case"scrollend":F=xb;break;case"wheel":F=Ib;break;case"copy":case"cut":case"paste":F=_b;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":F=nm;break;case"toggle":case"beforetoggle":F=qb}var xe=(n&4)!==0,Qe=!xe&&(e==="scroll"||e==="scrollend"),z=xe?I!==null?I+"Capture":null:I;xe=[];for(var D=H,B;D!==null;){var Q=D;if(B=Q.stateNode,Q=Q.tag,Q!==5&&Q!==26&&Q!==27||B===null||z===null||(Q=Gr(D,z),Q!=null&&xe.push(Ci(D,Q,B))),Qe)break;D=D.return}0<xe.length&&(I=new F(I,de,null,a,Y),J.push({event:I,listeners:xe}))}}if((n&7)===0){e:{if(I=e==="mouseover"||e==="pointerover",F=e==="mouseout"||e==="pointerout",I&&a!==iu&&(de=a.relatedTarget||a.fromElement)&&(Gl(de)||de[$l]))break e;if((F||I)&&(I=Y.window===Y?Y:(I=Y.ownerDocument)?I.defaultView||I.parentWindow:window,F?(de=a.relatedTarget||a.toElement,F=H,de=de?Gl(de):null,de!==null&&(Qe=u(de),xe=de.tag,de!==Qe||xe!==5&&xe!==27&&xe!==6)&&(de=null)):(F=null,de=H),F!==de)){if(xe=em,Q="onMouseLeave",z="onMouseEnter",D="mouse",(e==="pointerout"||e==="pointerover")&&(xe=nm,Q="onPointerLeave",z="onPointerEnter",D="pointer"),Qe=F==null?I:$r(F),B=de==null?I:$r(de),I=new xe(Q,D+"leave",F,a,Y),I.target=Qe,I.relatedTarget=B,Q=null,Gl(Y)===H&&(xe=new xe(z,D+"enter",de,a,Y),xe.target=B,xe.relatedTarget=Qe,Q=xe),Qe=Q,F&&de)t:{for(xe=Fx,z=F,D=de,B=0,Q=z;Q;Q=xe(Q))B++;Q=0;for(var be=D;be;be=xe(be))Q++;for(;0<B-Q;)z=xe(z),B--;for(;0<Q-B;)D=xe(D),Q--;for(;B--;){if(z===D||D!==null&&z===D.alternate){xe=z;break t}z=xe(z),D=xe(D)}xe=null}else xe=null;F!==null&&Yg(J,I,F,xe,!1),de!==null&&Qe!==null&&Yg(J,Qe,de,xe,!0)}}e:{if(I=H?$r(H):window,F=I.nodeName&&I.nodeName.toLowerCase(),F==="select"||F==="input"&&I.type==="file")var Ve=cm;else if(sm(I))if(dm)Ve=Wb;else{Ve=Zb;var ge=Qb}else F=I.nodeName,!F||F.toLowerCase()!=="input"||I.type!=="checkbox"&&I.type!=="radio"?H&&ru(H.elementType)&&(Ve=cm):Ve=Jb;if(Ve&&(Ve=Ve(e,H))){um(J,Ve,a,Y);break e}ge&&ge(e,I,H),e==="focusout"&&H&&I.type==="number"&&H.memoizedProps.value!=null&&lu(I,"number",I.value)}switch(ge=H?$r(H):window,e){case"focusin":(sm(ge)||ge.contentEditable==="true")&&(er=ge,bu=H,Wr=null);break;case"focusout":Wr=bu=er=null;break;case"mousedown":xu=!0;break;case"contextmenu":case"mouseup":case"dragend":xu=!1,bm(J,a,Y);break;case"selectionchange":if(tx)break;case"keydown":case"keyup":bm(J,a,Y)}var ke;if(gu)e:{switch(e){case"compositionstart":var Be="onCompositionStart";break e;case"compositionend":Be="onCompositionEnd";break e;case"compositionupdate":Be="onCompositionUpdate";break e}Be=void 0}else Wl?im(e,a)&&(Be="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Be="onCompositionStart");Be&&(am&&a.locale!=="ko"&&(Wl||Be!=="onCompositionStart"?Be==="onCompositionEnd"&&Wl&&(ke=Jf()):(za=Y,cu="value"in za?za.value:za.textContent,Wl=!0)),ge=Qo(H,Be),0<ge.length&&(Be=new tm(Be,e,null,a,Y),J.push({event:Be,listeners:ge}),ke?Be.data=ke:(ke=om(a),ke!==null&&(Be.data=ke)))),(ke=Gb?Pb(e,a):Yb(e,a))&&(Be=Qo(H,"onBeforeInput"),0<Be.length&&(ge=new tm("onBeforeInput","beforeinput",null,a,Y),J.push({event:ge,listeners:Be}),ge.data=ke)),Bx(J,e,H,a,Y)}Gg(J,n)})}function Ci(e,n,a){return{instance:e,listener:n,currentTarget:a}}function Qo(e,n){for(var a=n+"Capture",o=[];e!==null;){var c=e,d=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||d===null||(c=Gr(e,a),c!=null&&o.unshift(Ci(e,c,d)),c=Gr(e,n),c!=null&&o.push(Ci(e,c,d))),e.tag===3)return o;e=e.return}return[]}function Fx(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Yg(e,n,a,o,c){for(var d=n._reactName,b=[];a!==null&&a!==o;){var N=a,T=N.alternate,H=N.stateNode;if(N=N.tag,T!==null&&T===o)break;N!==5&&N!==26&&N!==27||H===null||(T=H,c?(H=Gr(a,d),H!=null&&b.unshift(Ci(a,H,T))):c||(H=Gr(a,d),H!=null&&b.push(Ci(a,H,T)))),a=a.return}b.length!==0&&e.push({event:n,listeners:b})}var qx=/\r\n?/g,$x=/\u0000|\uFFFD/g;function Xg(e){return(typeof e=="string"?e:""+e).replace(qx,`
|
|
390
|
+
`).replace($x,"")}function Kg(e,n){return n=Xg(n),Xg(e)===n}function Ke(e,n,a,o,c,d){switch(a){case"children":typeof o=="string"?n==="body"||n==="textarea"&&o===""||Ql(e,o):(typeof o=="number"||typeof o=="bigint")&&n!=="body"&&Ql(e,""+o);break;case"className":Wi(e,"class",o);break;case"tabIndex":Wi(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":Wi(e,a,o);break;case"style":Kf(e,o,d);break;case"data":if(n!=="object"){Wi(e,"data",o);break}case"src":case"href":if(o===""&&(n!=="a"||a!=="href")){e.removeAttribute(a);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(a);break}o=to(""+o),e.setAttribute(a,o);break;case"action":case"formAction":if(typeof o=="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 d=="function"&&(a==="formAction"?(n!=="input"&&Ke(e,n,"name",c.name,c,null),Ke(e,n,"formEncType",c.formEncType,c,null),Ke(e,n,"formMethod",c.formMethod,c,null),Ke(e,n,"formTarget",c.formTarget,c,null)):(Ke(e,n,"encType",c.encType,c,null),Ke(e,n,"method",c.method,c,null),Ke(e,n,"target",c.target,c,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(a);break}o=to(""+o),e.setAttribute(a,o);break;case"onClick":o!=null&&(e.onclick=ia);break;case"onScroll":o!=null&&Le("scroll",e);break;case"onScrollEnd":o!=null&&Le("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(i(61));if(a=o.__html,a!=null){if(c.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}a=to(""+o),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":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(a,""+o):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":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":o===!0?e.setAttribute(a,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(a,o):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(a,o):e.removeAttribute(a);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(a):e.setAttribute(a,o);break;case"popover":Le("beforetoggle",e),Le("toggle",e),Ji(e,"popover",o);break;case"xlinkActuate":ra(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":ra(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":ra(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":ra(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":ra(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":ra(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":ra(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":ra(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":ra(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":Ji(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=yb.get(a)||a,Ji(e,a,o))}}function Gc(e,n,a,o,c,d){switch(a){case"style":Kf(e,o,d);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(i(61));if(a=o.__html,a!=null){if(c.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"children":typeof o=="string"?Ql(e,o):(typeof o=="number"||typeof o=="bigint")&&Ql(e,""+o);break;case"onScroll":o!=null&&Le("scroll",e);break;case"onScrollEnd":o!=null&&Le("scrollend",e);break;case"onClick":o!=null&&(e.onclick=ia);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Vf.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(c=a.endsWith("Capture"),n=a.slice(2,c?a.length-7:void 0),d=e[Xt]||null,d=d!=null?d[a]:null,typeof d=="function"&&e.removeEventListener(n,d,c),typeof o=="function")){typeof d!="function"&&d!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(n,o,c);break e}a in e?e[a]=o:o===!0?e.setAttribute(a,""):Ji(e,a,o)}}}function kt(e,n,a){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Le("error",e),Le("load",e);var o=!1,c=!1,d;for(d in a)if(a.hasOwnProperty(d)){var b=a[d];if(b!=null)switch(d){case"src":o=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,n));default:Ke(e,n,d,b,a,null)}}c&&Ke(e,n,"srcSet",a.srcSet,a,null),o&&Ke(e,n,"src",a.src,a,null);return;case"input":Le("invalid",e);var N=d=b=c=null,T=null,H=null;for(o in a)if(a.hasOwnProperty(o)){var Y=a[o];if(Y!=null)switch(o){case"name":c=Y;break;case"type":b=Y;break;case"checked":T=Y;break;case"defaultChecked":H=Y;break;case"value":d=Y;break;case"defaultValue":N=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(i(137,n));break;default:Ke(e,n,o,Y,a,null)}}Gf(e,d,N,T,H,b,c,!1);return;case"select":Le("invalid",e),o=b=d=null;for(c in a)if(a.hasOwnProperty(c)&&(N=a[c],N!=null))switch(c){case"value":d=N;break;case"defaultValue":b=N;break;case"multiple":o=N;default:Ke(e,n,c,N,a,null)}n=d,a=b,e.multiple=!!o,n!=null?Kl(e,!!o,n,!1):a!=null&&Kl(e,!!o,a,!0);return;case"textarea":Le("invalid",e),d=c=o=null;for(b in a)if(a.hasOwnProperty(b)&&(N=a[b],N!=null))switch(b){case"value":o=N;break;case"defaultValue":c=N;break;case"children":d=N;break;case"dangerouslySetInnerHTML":if(N!=null)throw Error(i(91));break;default:Ke(e,n,b,N,a,null)}Yf(e,o,c,d);return;case"option":for(T in a)if(a.hasOwnProperty(T)&&(o=a[T],o!=null))switch(T){case"selected":e.selected=o&&typeof o!="function"&&typeof o!="symbol";break;default:Ke(e,n,T,o,a,null)}return;case"dialog":Le("beforetoggle",e),Le("toggle",e),Le("cancel",e),Le("close",e);break;case"iframe":case"object":Le("load",e);break;case"video":case"audio":for(o=0;o<Ei.length;o++)Le(Ei[o],e);break;case"image":Le("error",e),Le("load",e);break;case"details":Le("toggle",e);break;case"embed":case"source":case"link":Le("error",e),Le("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(H in a)if(a.hasOwnProperty(H)&&(o=a[H],o!=null))switch(H){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,n));default:Ke(e,n,H,o,a,null)}return;default:if(ru(n)){for(Y in a)a.hasOwnProperty(Y)&&(o=a[Y],o!==void 0&&Gc(e,n,Y,o,a,void 0));return}}for(N in a)a.hasOwnProperty(N)&&(o=a[N],o!=null&&Ke(e,n,N,o,a,null))}function Gx(e,n,a,o){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,d=null,b=null,N=null,T=null,H=null,Y=null;for(F in a){var J=a[F];if(a.hasOwnProperty(F)&&J!=null)switch(F){case"checked":break;case"value":break;case"defaultValue":T=J;default:o.hasOwnProperty(F)||Ke(e,n,F,null,o,J)}}for(var I in o){var F=o[I];if(J=a[I],o.hasOwnProperty(I)&&(F!=null||J!=null))switch(I){case"type":d=F;break;case"name":c=F;break;case"checked":H=F;break;case"defaultChecked":Y=F;break;case"value":b=F;break;case"defaultValue":N=F;break;case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(i(137,n));break;default:F!==J&&Ke(e,n,I,F,o,J)}}au(e,b,N,T,H,Y,d,c);return;case"select":F=b=N=I=null;for(d in a)if(T=a[d],a.hasOwnProperty(d)&&T!=null)switch(d){case"value":break;case"multiple":F=T;default:o.hasOwnProperty(d)||Ke(e,n,d,null,o,T)}for(c in o)if(d=o[c],T=a[c],o.hasOwnProperty(c)&&(d!=null||T!=null))switch(c){case"value":I=d;break;case"defaultValue":N=d;break;case"multiple":b=d;default:d!==T&&Ke(e,n,c,d,o,T)}n=N,a=b,o=F,I!=null?Kl(e,!!a,I,!1):!!o!=!!a&&(n!=null?Kl(e,!!a,n,!0):Kl(e,!!a,a?[]:"",!1));return;case"textarea":F=I=null;for(N in a)if(c=a[N],a.hasOwnProperty(N)&&c!=null&&!o.hasOwnProperty(N))switch(N){case"value":break;case"children":break;default:Ke(e,n,N,null,o,c)}for(b in o)if(c=o[b],d=a[b],o.hasOwnProperty(b)&&(c!=null||d!=null))switch(b){case"value":I=c;break;case"defaultValue":F=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(i(91));break;default:c!==d&&Ke(e,n,b,c,o,d)}Pf(e,I,F);return;case"option":for(var de in a)if(I=a[de],a.hasOwnProperty(de)&&I!=null&&!o.hasOwnProperty(de))switch(de){case"selected":e.selected=!1;break;default:Ke(e,n,de,null,o,I)}for(T in o)if(I=o[T],F=a[T],o.hasOwnProperty(T)&&I!==F&&(I!=null||F!=null))switch(T){case"selected":e.selected=I&&typeof I!="function"&&typeof I!="symbol";break;default:Ke(e,n,T,I,o,F)}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 xe in a)I=a[xe],a.hasOwnProperty(xe)&&I!=null&&!o.hasOwnProperty(xe)&&Ke(e,n,xe,null,o,I);for(H in o)if(I=o[H],F=a[H],o.hasOwnProperty(H)&&I!==F&&(I!=null||F!=null))switch(H){case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(i(137,n));break;default:Ke(e,n,H,I,o,F)}return;default:if(ru(n)){for(var Qe in a)I=a[Qe],a.hasOwnProperty(Qe)&&I!==void 0&&!o.hasOwnProperty(Qe)&&Gc(e,n,Qe,void 0,o,I);for(Y in o)I=o[Y],F=a[Y],!o.hasOwnProperty(Y)||I===F||I===void 0&&F===void 0||Gc(e,n,Y,I,o,F);return}}for(var z in a)I=a[z],a.hasOwnProperty(z)&&I!=null&&!o.hasOwnProperty(z)&&Ke(e,n,z,null,o,I);for(J in o)I=o[J],F=a[J],!o.hasOwnProperty(J)||I===F||I==null&&F==null||Ke(e,n,J,I,o,F)}function Qg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Px(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,a=performance.getEntriesByType("resource"),o=0;o<a.length;o++){var c=a[o],d=c.transferSize,b=c.initiatorType,N=c.duration;if(d&&N&&Qg(b)){for(b=0,N=c.responseEnd,o+=1;o<a.length;o++){var T=a[o],H=T.startTime;if(H>N)break;var Y=T.transferSize,J=T.initiatorType;Y&&Qg(J)&&(T=T.responseEnd,b+=Y*(T<N?1:(N-H)/(T-H)))}if(--o,n+=8*(d+b)/(c.duration/1e3),e++,10<e)break}}if(0<e)return n/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Pc=null,Yc=null;function Zo(e){return e.nodeType===9?e:e.ownerDocument}function Zg(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 Jg(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function Xc(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Kc=null;function Yx(){var e=window.event;return e&&e.type==="popstate"?e===Kc?!1:(Kc=e,!0):(Kc=null,!1)}var Wg=typeof setTimeout=="function"?setTimeout:void 0,Xx=typeof clearTimeout=="function"?clearTimeout:void 0,ep=typeof Promise=="function"?Promise:void 0,Kx=typeof queueMicrotask=="function"?queueMicrotask:typeof ep<"u"?function(e){return ep.resolve(null).then(e).catch(Qx)}:Wg;function Qx(e){setTimeout(function(){throw e})}function Ja(e){return e==="head"}function tp(e,n){var a=n,o=0;do{var c=a.nextSibling;if(e.removeChild(a),c&&c.nodeType===8)if(a=c.data,a==="/$"||a==="/&"){if(o===0){e.removeChild(c),_r(n);return}o--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")o++;else if(a==="html")Ri(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Ri(a);for(var d=a.firstChild;d;){var b=d.nextSibling,N=d.nodeName;d[qr]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&d.rel.toLowerCase()==="stylesheet"||a.removeChild(d),d=b}}else a==="body"&&Ri(e.ownerDocument.body);a=c}while(a);_r(n)}function np(e,n){var a=e;e=0;do{var o=a.nextSibling;if(a.nodeType===1?n?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(n?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),o&&o.nodeType===8)if(a=o.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=o}while(a)}function Qc(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var a=n;switch(n=n.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Qc(a),tu(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Zx(e,n,a,o){for(;e.nodeType===1;){var c=a;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[qr])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==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(d=e.getAttribute("src"),(d!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var d=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=Sn(e.nextSibling),e===null)break}return null}function Jx(e,n,a){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Sn(e.nextSibling),e===null))return null;return e}function ap(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Sn(e.nextSibling),e===null))return null;return e}function Zc(e){return e.data==="$?"||e.data==="$~"}function Jc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Wx(e,n){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||a.readyState!=="loading")n();else{var o=function(){n(),a.removeEventListener("DOMContentLoaded",o)};a.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function Sn(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return e}var Wc=null;function lp(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(n===0)return Sn(e.nextSibling);n--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||n++}e=e.nextSibling}return null}function rp(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(n===0)return e;n--}else a!=="/$"&&a!=="/&"||n++}e=e.previousSibling}return null}function ip(e,n,a){switch(n=Zo(a),e){case"html":if(e=n.documentElement,!e)throw Error(i(452));return e;case"head":if(e=n.head,!e)throw Error(i(453));return e;case"body":if(e=n.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Ri(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);tu(e)}var En=new Map,op=new Set;function Jo(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Sa=G.d;G.d={f:ew,r:tw,D:nw,C:aw,L:lw,m:rw,X:ow,S:iw,M:sw};function ew(){var e=Sa.f(),n=qo();return e||n}function tw(e){var n=Pl(e);n!==null&&n.tag===5&&n.type==="form"?Ch(n):Sa.r(e)}var Cr=typeof document>"u"?null:document;function sp(e,n,a){var o=Cr;if(o&&typeof n=="string"&&n){var c=gn(n);c='link[rel="'+e+'"][href="'+c+'"]',typeof a=="string"&&(c+='[crossorigin="'+a+'"]'),op.has(c)||(op.add(c),e={rel:e,crossOrigin:a,href:n},o.querySelector(c)===null&&(n=o.createElement("link"),kt(n,"link",e),Et(n),o.head.appendChild(n)))}}function nw(e){Sa.D(e),sp("dns-prefetch",e,null)}function aw(e,n){Sa.C(e,n),sp("preconnect",e,n)}function lw(e,n,a){Sa.L(e,n,a);var o=Cr;if(o&&e&&n){var c='link[rel="preload"][as="'+gn(n)+'"]';n==="image"&&a&&a.imageSrcSet?(c+='[imagesrcset="'+gn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(c+='[imagesizes="'+gn(a.imageSizes)+'"]')):c+='[href="'+gn(e)+'"]';var d=c;switch(n){case"style":d=Rr(e);break;case"script":d=Nr(e)}En.has(d)||(e=v({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:e,as:n},a),En.set(d,e),o.querySelector(c)!==null||n==="style"&&o.querySelector(Ni(d))||n==="script"&&o.querySelector(_i(d))||(n=o.createElement("link"),kt(n,"link",e),Et(n),o.head.appendChild(n)))}}function rw(e,n){Sa.m(e,n);var a=Cr;if(a&&e){var o=n&&typeof n.as=="string"?n.as:"script",c='link[rel="modulepreload"][as="'+gn(o)+'"][href="'+gn(e)+'"]',d=c;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Nr(e)}if(!En.has(d)&&(e=v({rel:"modulepreload",href:e},n),En.set(d,e),a.querySelector(c)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(_i(d)))return}o=a.createElement("link"),kt(o,"link",e),Et(o),a.head.appendChild(o)}}}function iw(e,n,a){Sa.S(e,n,a);var o=Cr;if(o&&e){var c=Yl(o).hoistableStyles,d=Rr(e);n=n||"default";var b=c.get(d);if(!b){var N={loading:0,preload:null};if(b=o.querySelector(Ni(d)))N.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":n},a),(a=En.get(d))&&ed(e,a);var T=b=o.createElement("link");Et(T),kt(T,"link",e),T._p=new Promise(function(H,Y){T.onload=H,T.onerror=Y}),T.addEventListener("load",function(){N.loading|=1}),T.addEventListener("error",function(){N.loading|=2}),N.loading|=4,Wo(b,n,o)}b={type:"stylesheet",instance:b,count:1,state:N},c.set(d,b)}}}function ow(e,n){Sa.X(e,n);var a=Cr;if(a&&e){var o=Yl(a).hoistableScripts,c=Nr(e),d=o.get(c);d||(d=a.querySelector(_i(c)),d||(e=v({src:e,async:!0},n),(n=En.get(c))&&td(e,n),d=a.createElement("script"),Et(d),kt(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(c,d))}}function sw(e,n){Sa.M(e,n);var a=Cr;if(a&&e){var o=Yl(a).hoistableScripts,c=Nr(e),d=o.get(c);d||(d=a.querySelector(_i(c)),d||(e=v({src:e,async:!0,type:"module"},n),(n=En.get(c))&&td(e,n),d=a.createElement("script"),Et(d),kt(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(c,d))}}function up(e,n,a,o){var c=(c=Z.current)?Jo(c):null;if(!c)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(n=Rr(a.href),a=Yl(c).hoistableStyles,o=a.get(n),o||(o={type:"style",instance:null,count:0,state:null},a.set(n,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Rr(a.href);var d=Yl(c).hoistableStyles,b=d.get(e);if(b||(c=c.ownerDocument||c,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,b),(d=c.querySelector(Ni(e)))&&!d._p&&(b.instance=d,b.state.loading=5),En.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},En.set(e,a),d||uw(c,e,a,b.state))),n&&o===null)throw Error(i(528,""));return b}if(n&&o!==null)throw Error(i(529,""));return null;case"script":return n=a.async,a=a.src,typeof a=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=Nr(a),a=Yl(c).hoistableScripts,o=a.get(n),o||(o={type:"script",instance:null,count:0,state:null},a.set(n,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Rr(e){return'href="'+gn(e)+'"'}function Ni(e){return'link[rel="stylesheet"]['+e+"]"}function cp(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function uw(e,n,a,o){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?o.loading=1:(n=e.createElement("link"),o.preload=n,n.addEventListener("load",function(){return o.loading|=1}),n.addEventListener("error",function(){return o.loading|=2}),kt(n,"link",a),Et(n),e.head.appendChild(n))}function Nr(e){return'[src="'+gn(e)+'"]'}function _i(e){return"script[async]"+e}function dp(e,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var o=e.querySelector('style[data-href~="'+gn(a.href)+'"]');if(o)return n.instance=o,Et(o),o;var c=v({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),Et(o),kt(o,"style",c),Wo(o,a.precedence,e),n.instance=o;case"stylesheet":c=Rr(a.href);var d=e.querySelector(Ni(c));if(d)return n.state.loading|=4,n.instance=d,Et(d),d;o=cp(a),(c=En.get(c))&&ed(o,c),d=(e.ownerDocument||e).createElement("link"),Et(d);var b=d;return b._p=new Promise(function(N,T){b.onload=N,b.onerror=T}),kt(d,"link",o),n.state.loading|=4,Wo(d,a.precedence,e),n.instance=d;case"script":return d=Nr(a.src),(c=e.querySelector(_i(d)))?(n.instance=c,Et(c),c):(o=a,(c=En.get(d))&&(o=v({},a),td(o,c)),e=e.ownerDocument||e,c=e.createElement("script"),Et(c),kt(c,"link",o),e.head.appendChild(c),n.instance=c);case"void":return null;default:throw Error(i(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(o=n.instance,n.state.loading|=4,Wo(o,a.precedence,e));return n.instance}function Wo(e,n,a){for(var o=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=o.length?o[o.length-1]:null,d=c,b=0;b<o.length;b++){var N=o[b];if(N.dataset.precedence===n)d=N;else if(d!==c)break}d?d.parentNode.insertBefore(e,d.nextSibling):(n=a.nodeType===9?a.head:a,n.insertBefore(e,n.firstChild))}function ed(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function td(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var es=null;function fp(e,n,a){if(es===null){var o=new Map,c=es=new Map;c.set(a,o)}else c=es,o=c.get(a),o||(o=new Map,c.set(a,o));if(o.has(e))return o;for(o.set(e,null),a=a.getElementsByTagName(e),c=0;c<a.length;c++){var d=a[c];if(!(d[qr]||d[_t]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var b=d.getAttribute(n)||"";b=e+b;var N=o.get(b);N?N.push(d):o.set(b,[d])}}return o}function mp(e,n,a){e=e.ownerDocument||e,e.head.insertBefore(a,n==="title"?e.querySelector("head > title"):null)}function cw(e,n,a){if(a===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;switch(n.rel){case"stylesheet":return e=n.disabled,typeof n.precedence=="string"&&e==null;default:return!0}case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function hp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function dw(e,n,a,o){if(a.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var c=Rr(o.href),d=n.querySelector(Ni(c));if(d){n=d._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=ts.bind(e),n.then(e,e)),a.state.loading|=4,a.instance=d,Et(d);return}d=n.ownerDocument||n,o=cp(o),(c=En.get(c))&&ed(o,c),d=d.createElement("link"),Et(d);var b=d;b._p=new Promise(function(N,T){b.onload=N,b.onerror=T}),kt(d,"link",o),a.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=ts.bind(e),n.addEventListener("load",a),n.addEventListener("error",a))}}var nd=0;function fw(e,n){return e.stylesheets&&e.count===0&&as(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var o=setTimeout(function(){if(e.stylesheets&&as(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+n);0<e.imgBytes&&nd===0&&(nd=62500*Px());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&as(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>nd?50:800)+n);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(c)}}:null}function ts(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)as(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ns=null;function as(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ns=new Map,n.forEach(mw,e),ns=null,ts.call(e))}function mw(e,n){if(!(n.state.loading&4)){var a=ns.get(e);if(a)var o=a.get(null);else{a=new Map,ns.set(e,a);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<c.length;d++){var b=c[d];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(a.set(b.dataset.precedence,b),o=b)}o&&a.set(null,o)}c=n.instance,b=c.getAttribute("data-precedence"),d=a.get(b)||o,d===o&&a.set(null,c),a.set(b,c),this.count++,o=ts.bind(this),c.addEventListener("load",o),c.addEventListener("error",o),d?d.parentNode.insertBefore(c,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),n.state.loading|=4}}var Ai={$$typeof:A,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function hw(e,n,a,o,c,d,b,N,T){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=Ma(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ma(0),this.hiddenUpdates=Ma(null),this.identifierPrefix=o,this.onUncaughtError=c,this.onCaughtError=d,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=T,this.incompleteTransitions=new Map}function gp(e,n,a,o,c,d,b,N,T,H,Y,J){return e=new hw(e,n,a,b,T,H,Y,J,N),n=1,d===!0&&(n|=24),d=an(3,null,null,n),e.current=d,d.stateNode=e,n=zu(),n.refCount++,e.pooledCache=n,n.refCount++,d.memoizedState={element:o,isDehydrated:a,cache:n},Hu(d),e}function pp(e){return e?(e=ar,e):ar}function vp(e,n,a,o,c,d){c=pp(c),o.context===null?o.context=c:o.pendingContext=c,o=Ia(n),o.payload={element:a},d=d===void 0?null:d,d!==null&&(o.callback=d),a=Fa(e,o,n),a!==null&&(en(a,e,n),ii(a,e,n))}function yp(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<n?a:n}}function ad(e,n){yp(e,n),(e=e.alternate)&&yp(e,n)}function bp(e){if(e.tag===13||e.tag===31){var n=yl(e,67108864);n!==null&&en(n,e,67108864),ad(e,67108864)}}function xp(e){if(e.tag===13||e.tag===31){var n=un();n=ql(n);var a=yl(e,n);a!==null&&en(a,e,n),ad(e,n)}}var ls=!0;function gw(e,n,a,o){var c=O.T;O.T=null;var d=G.p;try{G.p=2,ld(e,n,a,o)}finally{G.p=d,O.T=c}}function pw(e,n,a,o){var c=O.T;O.T=null;var d=G.p;try{G.p=8,ld(e,n,a,o)}finally{G.p=d,O.T=c}}function ld(e,n,a,o){if(ls){var c=rd(o);if(c===null)$c(e,n,o,rs,a),Sp(e,o);else if(yw(c,e,n,a,o))o.stopPropagation();else if(Sp(e,o),n&4&&-1<vw.indexOf(e)){for(;c!==null;){var d=Pl(c);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var b=$n(d.pendingLanes);if(b!==0){var N=d;for(N.pendingLanes|=2,N.entangledLanes|=2;b;){var T=1<<31-wt(b);N.entanglements[1]|=T,b&=~T}Xn(d),(qe&6)===0&&(Io=xt()+500,Si(0))}}break;case 31:case 13:N=yl(d,2),N!==null&&en(N,d,2),qo(),ad(d,2)}if(d=rd(o),d===null&&$c(e,n,o,rs,a),d===c)break;c=d}c!==null&&o.stopPropagation()}else $c(e,n,o,null,a)}}function rd(e){return e=ou(e),id(e)}var rs=null;function id(e){if(rs=null,e=Gl(e),e!==null){var n=u(e);if(n===null)e=null;else{var a=n.tag;if(a===13){if(e=f(n),e!==null)return e;e=null}else if(a===31){if(e=h(n),e!==null)return e;e=null}else if(a===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return rs=e,null}function wp(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(Hl()){case me:return 2;case Te:return 8;case We:case Ht:return 32;case Mt:return 268435456;default:return 32}default:return 32}}var od=!1,Wa=null,el=null,tl=null,ji=new Map,Ti=new Map,nl=[],vw="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 Sp(e,n){switch(e){case"focusin":case"focusout":Wa=null;break;case"dragenter":case"dragleave":el=null;break;case"mouseover":case"mouseout":tl=null;break;case"pointerover":case"pointerout":ji.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ti.delete(n.pointerId)}}function ki(e,n,a,o,c,d){return e===null||e.nativeEvent!==d?(e={blockedOn:n,domEventName:a,eventSystemFlags:o,nativeEvent:d,targetContainers:[c]},n!==null&&(n=Pl(n),n!==null&&bp(n)),e):(e.eventSystemFlags|=o,n=e.targetContainers,c!==null&&n.indexOf(c)===-1&&n.push(c),e)}function yw(e,n,a,o,c){switch(n){case"focusin":return Wa=ki(Wa,e,n,a,o,c),!0;case"dragenter":return el=ki(el,e,n,a,o,c),!0;case"mouseover":return tl=ki(tl,e,n,a,o,c),!0;case"pointerover":var d=c.pointerId;return ji.set(d,ki(ji.get(d)||null,e,n,a,o,c)),!0;case"gotpointercapture":return d=c.pointerId,Ti.set(d,ki(Ti.get(d)||null,e,n,a,o,c)),!0}return!1}function Ep(e){var n=Gl(e.target);if(n!==null){var a=u(n);if(a!==null){if(n=a.tag,n===13){if(n=f(a),n!==null){e.blockedOn=n,Uf(e.priority,function(){xp(a)});return}}else if(n===31){if(n=h(a),n!==null){e.blockedOn=n,Uf(e.priority,function(){xp(a)});return}}else if(n===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function is(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var a=rd(e.nativeEvent);if(a===null){a=e.nativeEvent;var o=new a.constructor(a.type,a);iu=o,a.target.dispatchEvent(o),iu=null}else return n=Pl(a),n!==null&&bp(n),e.blockedOn=a,!1;n.shift()}return!0}function Cp(e,n,a){is(e)&&a.delete(n)}function bw(){od=!1,Wa!==null&&is(Wa)&&(Wa=null),el!==null&&is(el)&&(el=null),tl!==null&&is(tl)&&(tl=null),ji.forEach(Cp),Ti.forEach(Cp)}function os(e,n){e.blockedOn===n&&(e.blockedOn=null,od||(od=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,bw)))}var ss=null;function Rp(e){ss!==e&&(ss=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){ss===e&&(ss=null);for(var n=0;n<e.length;n+=3){var a=e[n],o=e[n+1],c=e[n+2];if(typeof o!="function"){if(id(o||a)===null)continue;break}var d=Pl(a);d!==null&&(e.splice(n,3),n-=3,rc(d,{pending:!0,data:c,method:a.method,action:o},o,c))}}))}function _r(e){function n(T){return os(T,e)}Wa!==null&&os(Wa,e),el!==null&&os(el,e),tl!==null&&os(tl,e),ji.forEach(n),Ti.forEach(n);for(var a=0;a<nl.length;a++){var o=nl[a];o.blockedOn===e&&(o.blockedOn=null)}for(;0<nl.length&&(a=nl[0],a.blockedOn===null);)Ep(a),a.blockedOn===null&&nl.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(o=0;o<a.length;o+=3){var c=a[o],d=a[o+1],b=c[Xt]||null;if(typeof d=="function")b||Rp(a);else if(b){var N=null;if(d&&d.hasAttribute("formAction")){if(c=d,b=d[Xt]||null)N=b.formAction;else if(id(c)!==null)continue}else N=b.action;typeof N=="function"?a[o+1]=N:(a.splice(o,3),o-=3),Rp(a)}}}function Np(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(b){return c=b})},focusReset:"manual",scroll:"manual"})}function n(){c!==null&&(c(),c=null),o||setTimeout(a,20)}function a(){if(!o&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(a,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),c!==null&&(c(),c=null)}}}function sd(e){this._internalRoot=e}us.prototype.render=sd.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(i(409));var a=n.current,o=un();vp(a,o,e,n,null,null)},us.prototype.unmount=sd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;vp(e.current,2,null,e,null,null),qo(),n[$l]=null}};function us(e){this._internalRoot=e}us.prototype.unstable_scheduleHydration=function(e){if(e){var n=Ws();e={blockedOn:null,target:e,priority:n};for(var a=0;a<nl.length&&n!==0&&n<nl[a].priority;a++);nl.splice(a,0,e),a===0&&Ep(e)}};var _p=l.version;if(_p!=="19.2.3")throw Error(i(527,_p,"19.2.3"));G.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=p(n),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var xw={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:O,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var cs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!cs.isDisabled&&cs.supportsFiber)try{la=cs.inject(xw),pt=cs}catch{}}return zi.createRoot=function(e,n){if(!s(e))throw Error(i(299));var a=!1,o="",c=Oh,d=zh,b=Lh;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(c=n.onUncaughtError),n.onCaughtError!==void 0&&(d=n.onCaughtError),n.onRecoverableError!==void 0&&(b=n.onRecoverableError)),n=gp(e,1,!1,null,null,a,o,null,c,d,b,Np),e[$l]=n.current,qc(e),new sd(n)},zi.hydrateRoot=function(e,n,a){if(!s(e))throw Error(i(299));var o=!1,c="",d=Oh,b=zh,N=Lh,T=null;return a!=null&&(a.unstable_strictMode===!0&&(o=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(d=a.onUncaughtError),a.onCaughtError!==void 0&&(b=a.onCaughtError),a.onRecoverableError!==void 0&&(N=a.onRecoverableError),a.formState!==void 0&&(T=a.formState)),n=gp(e,1,!0,n,a??null,o,c,T,d,b,N,Np),n.context=pp(null),a=n.current,o=un(),o=ql(o),c=Ia(o),c.callback=null,Fa(a,c,o),a=o,n.current.lanes=a,rt(n,a),Xn(n),e[$l]=n.current,qc(e),new us(n)},zi.version="19.2.3",zi}var wv;function PR(){if(wv)return jd.exports;wv=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(l){console.error(l)}}return t(),jd.exports=GR(),jd.exports}var YR=PR();/**
|
|
391
|
+
* react-router v7.18.1
|
|
392
|
+
*
|
|
393
|
+
* Copyright (c) Remix Software Inc.
|
|
394
|
+
*
|
|
395
|
+
* This source code is licensed under the MIT license found in the
|
|
396
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
397
|
+
*
|
|
398
|
+
* @license MIT
|
|
399
|
+
*/var Rf=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,N0=/^[\\/]{2}/;function XR(t,l){return l+t.replace(/\\/g,"/")}var Sv="popstate";function Ev(t){return typeof t=="object"&&t!=null&&"pathname"in t&&"search"in t&&"hash"in t&&"state"in t&&"key"in t}function KR(t={}){function l(i,s){var p;let u=(p=s.state)==null?void 0:p.masked,{pathname:f,search:h,hash:g}=u||i.location;return nf("",{pathname:f,search:h,hash:g},s.state&&s.state.usr||null,s.state&&s.state.key||"default",u?{pathname:i.location.pathname,search:i.location.search,hash:i.location.hash}:void 0)}function r(i,s){return typeof s=="string"?s:Gi(s)}return ZR(l,r,null,t)}function lt(t,l){if(t===!1||t===null||typeof t>"u")throw new Error(l)}function Rn(t,l){if(!t){typeof console<"u"&&console.warn(l);try{throw new Error(l)}catch{}}}function QR(){return Math.random().toString(36).substring(2,10)}function Cv(t,l){return{usr:t.state,key:t.key,idx:l,masked:t.mask?{pathname:t.pathname,search:t.search,hash:t.hash}:void 0}}function nf(t,l,r=null,i,s){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof l=="string"?Br(l):l,state:r,key:l&&l.key||i||QR(),mask:s}}function Gi({pathname:t="/",search:l="",hash:r=""}){return l&&l!=="?"&&(t+=l.charAt(0)==="?"?l:"?"+l),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Br(t){let l={};if(t){let r=t.indexOf("#");r>=0&&(l.hash=t.substring(r),t=t.substring(0,r));let i=t.indexOf("?");i>=0&&(l.search=t.substring(i),t=t.substring(0,i)),t&&(l.pathname=t)}return l}function ZR(t,l,r,i={}){let{window:s=document.defaultView,v5Compat:u=!1}=i,f=s.history,h="POP",g=null,p=y();p==null&&(p=0,f.replaceState({...f.state,idx:p},""));function y(){return(f.state||{idx:null}).idx}function v(){h="POP";let R=y(),_=R==null?null:R-p;p=R,g&&g({action:h,location:E.location,delta:_})}function C(R,_){h="PUSH";let j=Ev(R)?R:nf(E.location,R,_);p=y()+1;let A=Cv(j,p),L=E.createHref(j.mask||j);try{f.pushState(A,"",L)}catch(M){if(M instanceof DOMException&&M.name==="DataCloneError")throw M;s.location.assign(L)}u&&g&&g({action:h,location:E.location,delta:1})}function x(R,_){h="REPLACE";let j=Ev(R)?R:nf(E.location,R,_);p=y();let A=Cv(j,p),L=E.createHref(j.mask||j);f.replaceState(A,"",L),u&&g&&g({action:h,location:E.location,delta:0})}function S(R){return JR(s,R)}let E={get action(){return h},get location(){return t(s,f)},listen(R){if(g)throw new Error("A history only accepts one active listener");return s.addEventListener(Sv,v),g=R,()=>{s.removeEventListener(Sv,v),g=null}},createHref(R){return l(s,R)},createURL:S,encodeLocation(R){let _=S(R);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:C,replace:x,go(R){return f.go(R)}};return E}function JR(t,l,r=!1){let i="http://localhost";t&&(i=t.location.origin!=="null"?t.location.origin:t.location.href),lt(i,"No window.location.(origin|href) available to create URL");let s=typeof l=="string"?l:Gi(l);return s=s.replace(/ $/,"%20"),!r&&N0.test(s)&&(s=i+s),new URL(s,i)}function _0(t,l,r="/"){return WR(t,l,r,!1)}function WR(t,l,r,i,s){let u=typeof l=="string"?Br(l):l,f=ja(u.pathname||"/",r);if(f==null)return null;let h=eN(t),g=null,p=dN(f);for(let y=0;g==null&&y<h.length;++y)g=cN(h[y],p,i);return g}function eN(t){let l=A0(t);return tN(l),l}function A0(t,l=[],r=[],i="",s=!1){let u=(f,h,g=s,p)=>{let y={relativePath:p===void 0?f.path||"":p,caseSensitive:f.caseSensitive===!0,childrenIndex:h,route:f};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(i)&&g)return;lt(y.relativePath.startsWith(i),`Absolute route path "${y.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(i.length)}let v=Vn([i,y.relativePath]),C=r.concat(y);f.children&&f.children.length>0&&(lt(f.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),A0(f.children,l,C,v,g)),!(f.path==null&&!f.index)&&l.push({path:v,score:sN(v,f.index),routesMeta:C.map((x,S)=>{let[E,R]=k0(x.relativePath,x.caseSensitive,S===C.length-1);return{...x,matcher:E,compiledParams:R}})})};return t.forEach((f,h)=>{var g;if(f.path===""||!((g=f.path)!=null&&g.includes("?")))u(f,h);else for(let p of j0(f.path))u(f,h,!0,p)}),l}function j0(t){let l=t.split("/");if(l.length===0)return[];let[r,...i]=l,s=r.endsWith("?"),u=r.replace(/\?$/,"");if(i.length===0)return s?[u,""]:[u];let f=j0(i.join("/")),h=[];return h.push(...f.map(g=>g===""?u:[u,g].join("/"))),s&&h.push(...f),h.map(g=>t.startsWith("/")&&g===""?"/":g)}function tN(t){t.sort((l,r)=>l.score!==r.score?r.score-l.score:uN(l.routesMeta.map(i=>i.childrenIndex),r.routesMeta.map(i=>i.childrenIndex)))}var nN=/^:[\w-]+$/,aN=3,lN=2,rN=1,iN=10,oN=-2,Rv=t=>t==="*";function sN(t,l){let r=t.split("/"),i=r.length;return r.some(Rv)&&(i+=oN),l&&(i+=lN),r.filter(s=>!Rv(s)).reduce((s,u)=>s+(nN.test(u)?aN:u===""?rN:iN),i)}function uN(t,l){return t.length===l.length&&t.slice(0,-1).every((i,s)=>i===l[s])?t[t.length-1]-l[l.length-1]:0}function cN(t,l,r=!1){let{routesMeta:i}=t,s={},u="/",f=[];for(let h=0;h<i.length;++h){let g=i[h],p=h===i.length-1,y=u==="/"?l:l.slice(u.length)||"/",v={path:g.relativePath,caseSensitive:g.caseSensitive,end:p},C=g.matcher&&g.compiledParams?T0(v,y,g.matcher,g.compiledParams):Ls(v,y),x=g.route;if(!C&&p&&r&&!i[i.length-1].route.index&&(C=Ls({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},y)),!C)return null;Object.assign(s,C.params),f.push({params:s,pathname:Vn([u,C.pathname]),pathnameBase:hN(Vn([u,C.pathnameBase])),route:x}),C.pathnameBase!=="/"&&(u=Vn([u,C.pathnameBase]))}return f}function Ls(t,l){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,i]=k0(t.path,t.caseSensitive,t.end);return T0(t,l,r,i)}function T0(t,l,r,i){let s=l.match(r);if(!s)return null;let u=s[0],f=u.replace(/(.)\/+$/,"$1"),h=s.slice(1);return{params:i.reduce((p,{paramName:y,isOptional:v},C)=>{if(y==="*"){let S=h[C]||"";f=u.slice(0,u.length-S.length).replace(/(.)\/+$/,"$1")}const x=h[C];return v&&!x?p[y]=void 0:p[y]=(x||"").replace(/%2F/g,"/"),p},{}),pathname:u,pathnameBase:f,pattern:t}}function k0(t,l=!1,r=!0){Rn(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let i=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,h,g,p,y)=>{if(i.push({paramName:h,isOptional:g!=null}),g){let v=y.charAt(p+f.length);return v&&v!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(i.push({paramName:"*"}),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,l?void 0:"i"),i]}function dN(t){try{return t.split("/").map(l=>decodeURIComponent(l).replace(/\//g,"%2F")).join("/")}catch(l){return Rn(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${l}).`),t}}function ja(t,l){if(l==="/")return t;if(!t.toLowerCase().startsWith(l.toLowerCase()))return null;let r=l.endsWith("/")?l.length-1:l.length,i=t.charAt(r);return i&&i!=="/"?null:t.slice(r)||"/"}function fN(t,l="/"){let{pathname:r,search:i="",hash:s=""}=typeof t=="string"?Br(t):t,u;return r?(r=D0(r),r.startsWith("/")?u=Nv(r.substring(1),"/"):u=Nv(r,l)):u=l,{pathname:u,search:gN(i),hash:pN(s)}}function Nv(t,l){let r=Us(l).split("/");return t.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function Dd(t,l,r,i){return`Cannot include a '${t}' character in a manually specified \`to.${l}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function mN(t){return t.filter((l,r)=>r===0||l.route.path&&l.route.path.length>0)}function Nf(t){let l=mN(t);return l.map((r,i)=>i===l.length-1?r.pathname:r.pathnameBase)}function Xs(t,l,r,i=!1){let s;typeof t=="string"?s=Br(t):(s={...t},lt(!s.pathname||!s.pathname.includes("?"),Dd("?","pathname","search",s)),lt(!s.pathname||!s.pathname.includes("#"),Dd("#","pathname","hash",s)),lt(!s.search||!s.search.includes("#"),Dd("#","search","hash",s)));let u=t===""||s.pathname==="",f=u?"/":s.pathname,h;if(f==null)h=r;else{let v=l.length-1;if(!i&&f.startsWith("..")){let C=f.split("/");for(;C[0]==="..";)C.shift(),v-=1;s.pathname=C.join("/")}h=v>=0?l[v]:"/"}let g=fN(s,h),p=f&&f!=="/"&&f.endsWith("/"),y=(u||f===".")&&r.endsWith("/");return!g.pathname.endsWith("/")&&(p||y)&&(g.pathname+="/"),g}var D0=t=>t.replace(/[\\/]{2,}/g,"/"),Vn=t=>D0(t.join("/")),Us=t=>t.replace(/\/+$/,""),hN=t=>Us(t).replace(/^\/*/,"/"),gN=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,pN=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,vN=class{constructor(t,l,r,i=!1){this.status=t,this.statusText=l||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function yN(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function bN(t){let l=t.map(r=>r.route.path).filter(Boolean);return Vn(l)||"/"}var M0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function O0(t,l){let r=t;if(typeof r!="string"||!Rf.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let i=r,s=!1;if(M0)try{let u=new URL(window.location.href),f=N0.test(r)?new URL(XR(r,u.protocol)):new URL(r),h=ja(f.pathname,l);f.origin===u.origin&&h!=null?r=h+f.search+f.hash:s=!0}catch{Rn(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:s,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var z0=["POST","PUT","PATCH","DELETE"];new Set(z0);var xN=["GET",...z0];new Set(xN);var wN=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function SN(t){try{return wN.includes(new URL(t).protocol)}catch{return!1}}var Hr=w.createContext(null);Hr.displayName="DataRouter";var Ks=w.createContext(null);Ks.displayName="DataRouterState";var L0=w.createContext(!1);function EN(){return w.useContext(L0)}var U0=w.createContext({isTransitioning:!1});U0.displayName="ViewTransition";var CN=w.createContext(new Map);CN.displayName="Fetchers";var RN=w.createContext(null);RN.displayName="Await";var mn=w.createContext(null);mn.displayName="Navigation";var Qi=w.createContext(null);Qi.displayName="Location";var In=w.createContext({outlet:null,matches:[],isDataRoute:!1});In.displayName="Route";var _f=w.createContext(null);_f.displayName="RouteError";var B0="REACT_ROUTER_ERROR",NN="REDIRECT",_N="ROUTE_ERROR_RESPONSE";function AN(t){if(t.startsWith(`${B0}:${NN}:{`))try{let l=JSON.parse(t.slice(28));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.location=="string"&&typeof l.reloadDocument=="boolean"&&typeof l.replace=="boolean")return l}catch{}}function jN(t){if(t.startsWith(`${B0}:${_N}:{`))try{let l=JSON.parse(t.slice(40));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string")return new vN(l.status,l.statusText,l.data)}catch{}}function H0(t,{relative:l}={}){lt(Vr(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:i}=w.useContext(mn),{hash:s,pathname:u,search:f}=Zi(t,{relative:l}),h=u;return r!=="/"&&(h=u==="/"?r:Vn([r,u])),i.createHref({pathname:h,search:f,hash:s})}function Vr(){return w.useContext(Qi)!=null}function An(){return lt(Vr(),"useLocation() may be used only in the context of a <Router> component."),w.useContext(Qi).location}var V0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function I0(t){w.useContext(mn).static||w.useLayoutEffect(t)}function Ir(){let{isDataRoute:t}=w.useContext(In);return t?$N():TN()}function TN(){lt(Vr(),"useNavigate() may be used only in the context of a <Router> component.");let t=w.useContext(Hr),{basename:l,navigator:r}=w.useContext(mn),{matches:i}=w.useContext(In),{pathname:s}=An(),u=JSON.stringify(Nf(i)),f=w.useRef(!1);return I0(()=>{f.current=!0}),w.useCallback((g,p={})=>{if(Rn(f.current,V0),!f.current)return;if(typeof g=="number"){r.go(g);return}let y=Xs(g,JSON.parse(u),s,p.relative==="path");t==null&&l!=="/"&&(y.pathname=y.pathname==="/"?l:Vn([l,y.pathname])),(p.replace?r.replace:r.push)(y,p.state,p)},[l,r,u,s,t])}var kN=w.createContext(null);function DN(t){let l=w.useContext(In).outlet;return w.useMemo(()=>l&&w.createElement(kN.Provider,{value:t},l),[l,t])}function Zi(t,{relative:l}={}){let{matches:r}=w.useContext(In),{pathname:i}=An(),s=JSON.stringify(Nf(r));return w.useMemo(()=>Xs(t,JSON.parse(s),i,l==="path"),[t,s,i,l])}function MN(t,l){return F0(t,l)}function F0(t,l,r){var R;lt(Vr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=w.useContext(mn),{matches:s}=w.useContext(In),u=s[s.length-1],f=u?u.params:{},h=u?u.pathname:"/",g=u?u.pathnameBase:"/",p=u&&u.route;{let _=p&&p.path||"";$0(h,!p||_.endsWith("*")||_.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${_}">) 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.
|
|
400
|
+
|
|
401
|
+
Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}/*`}">.`)}let y=An(),v;if(l){let _=typeof l=="string"?Br(l):l;lt(g==="/"||((R=_.pathname)==null?void 0:R.startsWith(g)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${g}" but pathname "${_.pathname}" was given in the \`location\` prop.`),v=_}else v=y;let C=v.pathname||"/",x=C;if(g!=="/"){let _=g.replace(/^\//,"").split("/");x="/"+C.replace(/^\//,"").split("/").slice(_.length).join("/")}let S=r&&r.state.matches.length?r.state.matches.map(_=>Object.assign(_,{route:r.manifest[_.route.id]||_.route})):_0(t,{pathname:x});Rn(p||S!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),Rn(S==null||S[S.length-1].route.element!==void 0||S[S.length-1].route.Component!==void 0||S[S.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.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 E=BN(S&&S.map(_=>Object.assign({},_,{params:Object.assign({},f,_.params),pathname:Vn([g,i.encodeLocation?i.encodeLocation(_.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?g:Vn([g,i.encodeLocation?i.encodeLocation(_.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathnameBase])})),s,r);return l&&E?w.createElement(Qi.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...v},navigationType:"POP"}},E):E}function ON(){let t=qN(),l=yN(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,i="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:i},u={padding:"2px 4px",backgroundColor:i},f=null;return console.error("Error handled by React Router default ErrorBoundary:",t),f=w.createElement(w.Fragment,null,w.createElement("p",null,"💿 Hey developer 👋"),w.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",w.createElement("code",{style:u},"ErrorBoundary")," or"," ",w.createElement("code",{style:u},"errorElement")," prop on your route.")),w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},l),r?w.createElement("pre",{style:s},r):null,f)}var zN=w.createElement(ON,null),q0=class extends w.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,l){return l.location!==t.location||l.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:l.error,location:l.location,revalidation:t.revalidation||l.revalidation}}componentDidCatch(t,l){this.props.onError?this.props.onError(t,l):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const r=jN(t.digest);r&&(t=r)}let l=t!==void 0?w.createElement(In.Provider,{value:this.props.routeContext},w.createElement(_f.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?w.createElement(LN,{error:t},l):l}};q0.contextType=L0;var Md=new WeakMap;function LN({children:t,error:l}){let{basename:r}=w.useContext(mn);if(typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){let i=AN(l.digest);if(i){let s=Md.get(l);if(s)throw s;let u=O0(i.location,r),f=u.absoluteURL||u.to;if(SN(f))throw new Error("Invalid redirect location");if(M0&&!Md.get(l))if(u.isExternal||i.reloadDocument)window.location.href=f;else{const h=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(u.to,{replace:i.replace}));throw Md.set(l,h),h}return w.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f}`})}}return t}function UN({routeContext:t,match:l,children:r}){let i=w.useContext(Hr);return i&&i.static&&i.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=l.route.id),w.createElement(In.Provider,{value:t},r)}function BN(t,l=[],r){let i=r==null?void 0:r.state;if(t==null){if(!i)return null;if(i.errors)t=i.matches;else if(l.length===0&&!i.initialized&&i.matches.length>0)t=i.matches;else return null}let s=t,u=i==null?void 0:i.errors;if(u!=null){let y=s.findIndex(v=>v.route.id&&(u==null?void 0:u[v.route.id])!==void 0);lt(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),s=s.slice(0,Math.min(s.length,y+1))}let f=!1,h=-1;if(r&&i){f=i.renderFallback;for(let y=0;y<s.length;y++){let v=s[y];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(h=y),v.route.id){let{loaderData:C,errors:x}=i,S=v.route.loader&&!C.hasOwnProperty(v.route.id)&&(!x||x[v.route.id]===void 0);if(v.route.lazy||S){r.isStatic&&(f=!0),h>=0?s=s.slice(0,h+1):s=[s[0]];break}}}}let g=r==null?void 0:r.onError,p=i&&g?(y,v)=>{var C,x;g(y,{location:i.location,params:((x=(C=i.matches)==null?void 0:C[0])==null?void 0:x.params)??{},pattern:bN(i.matches),errorInfo:v})}:void 0;return s.reduceRight((y,v,C)=>{let x,S=!1,E=null,R=null;i&&(x=u&&v.route.id?u[v.route.id]:void 0,E=v.route.errorElement||zN,f&&(h<0&&C===0?($0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),S=!0,R=null):h===C&&(S=!0,R=v.route.hydrateFallbackElement||null)));let _=l.concat(s.slice(0,C+1)),j=()=>{let A;return x?A=E:S?A=R:v.route.Component?A=w.createElement(v.route.Component,null):v.route.element?A=v.route.element:A=y,w.createElement(UN,{match:v,routeContext:{outlet:y,matches:_,isDataRoute:i!=null},children:A})};return i&&(v.route.ErrorBoundary||v.route.errorElement||C===0)?w.createElement(q0,{location:i.location,revalidation:i.revalidation,component:E,error:x,children:j(),routeContext:{outlet:null,matches:_,isDataRoute:!0},onError:p}):j()},null)}function Af(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function HN(t){let l=w.useContext(Hr);return lt(l,Af(t)),l}function VN(t){let l=w.useContext(Ks);return lt(l,Af(t)),l}function IN(t){let l=w.useContext(In);return lt(l,Af(t)),l}function jf(t){let l=IN(t),r=l.matches[l.matches.length-1];return lt(r.route.id,`${t} can only be used on routes that contain a unique "id"`),r.route.id}function FN(){return jf("useRouteId")}function qN(){var i;let t=w.useContext(_f),l=VN("useRouteError"),r=jf("useRouteError");return t!==void 0?t:(i=l.errors)==null?void 0:i[r]}function $N(){let{router:t}=HN("useNavigate"),l=jf("useNavigate"),r=w.useRef(!1);return I0(()=>{r.current=!0}),w.useCallback(async(s,u={})=>{Rn(r.current,V0),r.current&&(typeof s=="number"?await t.navigate(s):await t.navigate(s,{fromRouteId:l,...u}))},[t,l])}var _v={};function $0(t,l,r){!l&&!_v[t]&&(_v[t]=!0,Rn(!1,r))}w.memo(GN);function GN({routes:t,manifest:l,future:r,state:i,isStatic:s,onError:u}){return F0(t,void 0,{manifest:l,state:i,isStatic:s,onError:u})}function _s({to:t,replace:l,state:r,relative:i}){lt(Vr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=w.useContext(mn);Rn(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:u}=w.useContext(In),{pathname:f}=An(),h=Ir(),g=Xs(t,Nf(u),f,i==="path"),p=JSON.stringify(g);return w.useEffect(()=>{h(JSON.parse(p),{replace:l,state:r,relative:i})},[h,p,i,l,r]),null}function PN(t){return DN(t.context)}function Ft(t){lt(!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 YN({basename:t="/",children:l=null,location:r,navigationType:i="POP",navigator:s,static:u=!1,useTransitions:f}){lt(!Vr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let h=t.replace(/^\/*/,"/"),g=w.useMemo(()=>({basename:h,navigator:s,static:u,useTransitions:f,future:{}}),[h,s,u,f]);typeof r=="string"&&(r=Br(r));let{pathname:p="/",search:y="",hash:v="",state:C=null,key:x="default",mask:S}=r,E=w.useMemo(()=>{let R=ja(p,h);return R==null?null:{location:{pathname:R,search:y,hash:v,state:C,key:x,mask:S},navigationType:i}},[h,p,y,v,C,x,i,S]);return Rn(E!=null,`<Router basename="${h}"> is not able to match the URL "${p}${y}${v}" because it does not start with the basename, so the <Router> won't render anything.`),E==null?null:w.createElement(mn.Provider,{value:g},w.createElement(Qi.Provider,{children:l,value:E}))}function XN({children:t,location:l}){return MN(af(t),l)}function af(t,l=[]){let r=[];return w.Children.forEach(t,(i,s)=>{if(!w.isValidElement(i))return;let u=[...l,s];if(i.type===w.Fragment){r.push.apply(r,af(i.props.children,u));return}lt(i.type===Ft,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),lt(!i.props.index||!i.props.children,"An index route cannot have child routes.");let f={id:i.props.id||u.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,middleware:i.props.middleware,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(f.children=af(i.props.children,u)),r.push(f)}),r}var As="get",js="application/x-www-form-urlencoded";function Qs(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function KN(t){return Qs(t)&&t.tagName.toLowerCase()==="button"}function QN(t){return Qs(t)&&t.tagName.toLowerCase()==="form"}function ZN(t){return Qs(t)&&t.tagName.toLowerCase()==="input"}function JN(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function WN(t,l){return t.button===0&&(!l||l==="_self")&&!JN(t)}function lf(t=""){return new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((l,r)=>{let i=t[r];return l.concat(Array.isArray(i)?i.map(s=>[r,s]):[[r,i]])},[]))}function e_(t,l){let r=lf(t);return l&&l.forEach((i,s)=>{r.has(s)||l.getAll(s).forEach(u=>{r.append(s,u)})}),r}var Ss=null;function t_(){if(Ss===null)try{new FormData(document.createElement("form"),0),Ss=!1}catch{Ss=!0}return Ss}var n_=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Od(t){return t!=null&&!n_.has(t)?(Rn(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${js}"`),null):t}function a_(t,l){let r,i,s,u,f;if(QN(t)){let h=t.getAttribute("action");i=h?ja(h,l):null,r=t.getAttribute("method")||As,s=Od(t.getAttribute("enctype"))||js,u=new FormData(t)}else if(KN(t)||ZN(t)&&(t.type==="submit"||t.type==="image")){let h=t.form;if(h==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=t.getAttribute("formaction")||h.getAttribute("action");if(i=g?ja(g,l):null,r=t.getAttribute("formmethod")||h.getAttribute("method")||As,s=Od(t.getAttribute("formenctype"))||Od(h.getAttribute("enctype"))||js,u=new FormData(h,t),!t_()){let{name:p,type:y,value:v}=t;if(y==="image"){let C=p?`${p}.`:"";u.append(`${C}x`,"0"),u.append(`${C}y`,"0")}else p&&u.append(p,v)}}else{if(Qs(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=As,i=null,s=js,f=t}return u&&s==="text/plain"&&(f=u,u=void 0),{action:i,method:r.toLowerCase(),encType:s,formData:u,body:f}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Tf(t,l){if(t===!1||t===null||typeof t>"u")throw new Error(l)}function G0(t,l,r,i){let s=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return r?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${i}`:s.pathname=`${s.pathname}.${i}`:s.pathname==="/"?s.pathname=`_root.${i}`:l&&ja(s.pathname,l)==="/"?s.pathname=`${Us(l)}/_root.${i}`:s.pathname=`${Us(s.pathname)}.${i}`,s}async function l_(t,l){if(t.id in l)return l[t.id];try{let r=await import(t.module);return l[t.id]=r,r}catch(r){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function r_(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function i_(t,l,r){let i=await Promise.all(t.map(async s=>{let u=l.routes[s.route.id];if(u){let f=await l_(u,r);return f.links?f.links():[]}return[]}));return c_(i.flat(1).filter(r_).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function Av(t,l,r,i,s,u){let f=(g,p)=>r[p]?g.route.id!==r[p].route.id:!0,h=(g,p)=>{var y;return r[p].pathname!==g.pathname||((y=r[p].route.path)==null?void 0:y.endsWith("*"))&&r[p].params["*"]!==g.params["*"]};return u==="assets"?l.filter((g,p)=>f(g,p)||h(g,p)):u==="data"?l.filter((g,p)=>{var v;let y=i.routes[g.route.id];if(!y||!y.hasLoader)return!1;if(f(g,p)||h(g,p))return!0;if(g.route.shouldRevalidate){let C=g.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((v=r[0])==null?void 0:v.params)||{},nextUrl:new URL(t,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof C=="boolean")return C}return!0}):[]}function o_(t,l,{includeHydrateFallback:r}={}){return s_(t.map(i=>{let s=l.routes[i.route.id];if(!s)return[];let u=[s.module];return s.clientActionModule&&(u=u.concat(s.clientActionModule)),s.clientLoaderModule&&(u=u.concat(s.clientLoaderModule)),r&&s.hydrateFallbackModule&&(u=u.concat(s.hydrateFallbackModule)),s.imports&&(u=u.concat(s.imports)),u}).flat(1))}function s_(t){return[...new Set(t)]}function u_(t){let l={},r=Object.keys(t).sort();for(let i of r)l[i]=t[i];return l}function c_(t,l){let r=new Set;return new Set(l),t.reduce((i,s)=>{let u=JSON.stringify(u_(s));return r.has(u)||(r.add(u),i.push({key:u,link:s})),i},[])}function kf(){let t=w.useContext(Hr);return Tf(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function d_(){let t=w.useContext(Ks);return Tf(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var Df=w.createContext(void 0);Df.displayName="FrameworkContext";function Zs(){let t=w.useContext(Df);return Tf(t,"You must render this element inside a <HydratedRouter> element"),t}function f_(t,l){let r=w.useContext(Df),[i,s]=w.useState(!1),[u,f]=w.useState(!1),{onFocus:h,onBlur:g,onMouseEnter:p,onMouseLeave:y,onTouchStart:v}=l,C=w.useRef(null);w.useEffect(()=>{if(t==="render"&&f(!0),t==="viewport"){let E=_=>{_.forEach(j=>{f(j.isIntersecting)})},R=new IntersectionObserver(E,{threshold:.5});return C.current&&R.observe(C.current),()=>{R.disconnect()}}},[t]),w.useEffect(()=>{if(i){let E=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(E)}}},[i]);let x=()=>{s(!0)},S=()=>{s(!1),f(!1)};return r?t!=="intent"?[u,C,{}]:[u,C,{onFocus:Li(h,x),onBlur:Li(g,S),onMouseEnter:Li(p,x),onMouseLeave:Li(y,S),onTouchStart:Li(v,x)}]:[!1,C,{}]}function Li(t,l){return r=>{t&&t(r),r.defaultPrevented||l(r)}}function m_({page:t,...l}){let r=EN(),{nonce:i}=Zs(),{router:s}=kf(),u=w.useMemo(()=>_0(s.routes,t,s.basename),[s.routes,t,s.basename]);return u?(l.nonce==null&&i&&(l={...l,nonce:i}),r?w.createElement(g_,{page:t,matches:u,...l}):w.createElement(p_,{page:t,matches:u,...l})):null}function h_(t){let{manifest:l,routeModules:r}=Zs(),[i,s]=w.useState([]);return w.useEffect(()=>{let u=!1;return i_(t,l,r).then(f=>{u||s(f)}),()=>{u=!0}},[t,l,r]),i}function g_({page:t,matches:l,...r}){let i=An(),{future:s}=Zs(),{basename:u}=kf(),f=w.useMemo(()=>{if(t===i.pathname+i.search+i.hash)return[];let h=G0(t,u,s.v8_trailingSlashAwareDataRequests,"rsc"),g=!1,p=[];for(let y of l)typeof y.route.shouldRevalidate=="function"?g=!0:p.push(y.route.id);return g&&p.length>0&&h.searchParams.set("_routes",p.join(",")),[h.pathname+h.search]},[u,s.v8_trailingSlashAwareDataRequests,t,i,l]);return w.createElement(w.Fragment,null,f.map(h=>w.createElement("link",{key:h,rel:"prefetch",as:"fetch",href:h,...r})))}function p_({page:t,matches:l,...r}){let i=An(),{future:s,manifest:u,routeModules:f}=Zs(),{basename:h}=kf(),{loaderData:g,matches:p}=d_(),y=w.useMemo(()=>Av(t,l,p,u,i,"data"),[t,l,p,u,i]),v=w.useMemo(()=>Av(t,l,p,u,i,"assets"),[t,l,p,u,i]),C=w.useMemo(()=>{if(t===i.pathname+i.search+i.hash)return[];let E=new Set,R=!1;if(l.forEach(j=>{var L;let A=u.routes[j.route.id];!A||!A.hasLoader||(!y.some(M=>M.route.id===j.route.id)&&j.route.id in g&&((L=f[j.route.id])!=null&&L.shouldRevalidate)||A.hasClientLoader?R=!0:E.add(j.route.id))}),E.size===0)return[];let _=G0(t,h,s.v8_trailingSlashAwareDataRequests,"data");return R&&E.size>0&&_.searchParams.set("_routes",l.filter(j=>E.has(j.route.id)).map(j=>j.route.id).join(",")),[_.pathname+_.search]},[h,s.v8_trailingSlashAwareDataRequests,g,i,u,y,l,t,f]),x=w.useMemo(()=>o_(v,u),[v,u]),S=h_(v);return w.createElement(w.Fragment,null,C.map(E=>w.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...r})),x.map(E=>w.createElement("link",{key:E,rel:"modulepreload",href:E,...r})),S.map(({key:E,link:R})=>w.createElement("link",{key:E,nonce:r.nonce,...R,crossOrigin:R.crossOrigin??r.crossOrigin})))}function v_(...t){return l=>{t.forEach(r=>{typeof r=="function"?r(l):r!=null&&(r.current=l)})}}var y_=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{y_&&(window.__reactRouterVersion="7.18.1")}catch{}function b_({basename:t,children:l,useTransitions:r,window:i}){let s=w.useRef();s.current==null&&(s.current=KR({window:i,v5Compat:!0}));let u=s.current,[f,h]=w.useState({action:u.action,location:u.location}),g=w.useCallback(p=>{r===!1?h(p):w.startTransition(()=>h(p))},[r]);return w.useLayoutEffect(()=>u.listen(g),[u,g]),w.createElement(YN,{basename:t,children:l,location:f.location,navigationType:f.action,navigator:u,useTransitions:r})}var P0=w.forwardRef(function({onClick:l,discover:r="render",prefetch:i="none",relative:s,reloadDocument:u,replace:f,mask:h,state:g,target:p,to:y,preventScrollReset:v,viewTransition:C,defaultShouldRevalidate:x,...S},E){let{basename:R,navigator:_,useTransitions:j}=w.useContext(mn),A=typeof y=="string"&&Rf.test(y),L=O0(y,R);y=L.to;let M=H0(y,{relative:s}),K=An(),X=null;if(h){let he=Xs(h,[],K.mask?K.mask.pathname:"/",!0);R!=="/"&&(he.pathname=he.pathname==="/"?R:Vn([R,he.pathname])),X=_.createHref(he)}let[U,le,ye]=f_(i,S),q=E_(y,{replace:f,mask:h,state:g,target:p,preventScrollReset:v,relative:s,viewTransition:C,defaultShouldRevalidate:x,useTransitions:j});function ee(he){l&&l(he),he.defaultPrevented||q(he)}let ie=!(L.isExternal||u),oe=w.createElement("a",{...S,...ye,href:(ie?X:void 0)||L.absoluteURL||M,onClick:ie?ee:l,ref:v_(E,le),target:p,"data-discover":!A&&r==="render"?"true":void 0});return U&&!A?w.createElement(w.Fragment,null,oe,w.createElement(m_,{page:M})):oe});P0.displayName="Link";var x_=w.forwardRef(function({"aria-current":l="page",caseSensitive:r=!1,className:i="",end:s=!1,style:u,to:f,viewTransition:h,children:g,...p},y){let v=Zi(f,{relative:p.relative}),C=An(),x=w.useContext(Ks),{navigator:S,basename:E}=w.useContext(mn),R=x!=null&&j_(v)&&h===!0,_=S.encodeLocation?S.encodeLocation(v).pathname:v.pathname,j=C.pathname,A=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;r||(j=j.toLowerCase(),A=A?A.toLowerCase():null,_=_.toLowerCase()),A&&E&&(A=ja(A,E)||A);const L=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let M=j===_||!s&&j.startsWith(_)&&j.charAt(L)==="/",K=A!=null&&(A===_||!s&&A.startsWith(_)&&A.charAt(_.length)==="/"),X={isActive:M,isPending:K,isTransitioning:R},U=M?l:void 0,le;typeof i=="function"?le=i(X):le=[i,M?"active":null,K?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let ye=typeof u=="function"?u(X):u;return w.createElement(P0,{...p,"aria-current":U,className:le,ref:y,style:ye,to:f,viewTransition:h},typeof g=="function"?g(X):g)});x_.displayName="NavLink";var w_=w.forwardRef(({discover:t="render",fetcherKey:l,navigate:r,reloadDocument:i,replace:s,state:u,method:f=As,action:h,onSubmit:g,relative:p,preventScrollReset:y,viewTransition:v,defaultShouldRevalidate:C,...x},S)=>{let{useTransitions:E}=w.useContext(mn),R=__(),_=A_(h,{relative:p}),j=f.toLowerCase()==="get"?"get":"post",A=typeof h=="string"&&Rf.test(h),L=M=>{if(g&&g(M),M.defaultPrevented)return;M.preventDefault();let K=M.nativeEvent.submitter,X=(K==null?void 0:K.getAttribute("formmethod"))||f,U=()=>R(K||M.currentTarget,{fetcherKey:l,method:X,navigate:r,replace:s,state:u,relative:p,preventScrollReset:y,viewTransition:v,defaultShouldRevalidate:C});E&&r!==!1?w.startTransition(()=>U()):U()};return w.createElement("form",{ref:S,method:j,action:_,onSubmit:i?g:L,...x,"data-discover":!A&&t==="render"?"true":void 0})});w_.displayName="Form";function S_(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Y0(t){let l=w.useContext(Hr);return lt(l,S_(t)),l}function E_(t,{target:l,replace:r,mask:i,state:s,preventScrollReset:u,relative:f,viewTransition:h,defaultShouldRevalidate:g,useTransitions:p}={}){let y=Ir(),v=An(),C=Zi(t,{relative:f});return w.useCallback(x=>{if(WN(x,l)){x.preventDefault();let S=r!==void 0?r:Gi(v)===Gi(C),E=()=>y(t,{replace:S,mask:i,state:s,preventScrollReset:u,relative:f,viewTransition:h,defaultShouldRevalidate:g});p?w.startTransition(()=>E()):E()}},[v,y,C,r,i,s,l,t,u,f,h,g,p])}function C_(t){Rn(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=w.useRef(lf(t)),r=w.useRef(!1),i=An(),s=w.useMemo(()=>e_(i.search,r.current?null:l.current),[i.search]),u=Ir(),f=w.useCallback((h,g)=>{const p=lf(typeof h=="function"?h(new URLSearchParams(s)):h);r.current=!0,u("?"+p,g)},[u,s]);return[s,f]}var R_=0,N_=()=>`__${String(++R_)}__`;function __(){let{router:t}=Y0("useSubmit"),{basename:l}=w.useContext(mn),r=FN(),i=t.fetch,s=t.navigate;return w.useCallback(async(u,f={})=>{let{action:h,method:g,encType:p,formData:y,body:v}=a_(u,l);if(f.navigate===!1){let C=f.fetcherKey||N_();await i(C,r,f.action||h,{defaultShouldRevalidate:f.defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:y,body:v,formMethod:f.method||g,formEncType:f.encType||p,flushSync:f.flushSync})}else await s(f.action||h,{defaultShouldRevalidate:f.defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:y,body:v,formMethod:f.method||g,formEncType:f.encType||p,replace:f.replace,state:f.state,fromRouteId:r,flushSync:f.flushSync,viewTransition:f.viewTransition})},[i,s,l,r])}function A_(t,{relative:l}={}){let{basename:r}=w.useContext(mn),i=w.useContext(In);lt(i,"useFormAction must be used inside a RouteContext");let[s]=i.matches.slice(-1),u={...Zi(t||".",{relative:l})},f=An();if(t==null){u.search=f.search;let h=new URLSearchParams(u.search),g=h.getAll("index");if(g.some(y=>y==="")){h.delete("index"),g.filter(v=>v).forEach(v=>h.append("index",v));let y=h.toString();u.search=y?`?${y}`:""}}return(!t||t===".")&&s.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(u.pathname=u.pathname==="/"?r:Vn([r,u.pathname])),Gi(u)}function j_(t,{relative:l}={}){let r=w.useContext(U0);lt(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=Y0("useViewTransitionState"),s=Zi(t,{relative:l});if(!r.isTransitioning)return!1;let u=ja(r.currentLocation.pathname,i)||r.currentLocation.pathname,f=ja(r.nextLocation.pathname,i)||r.nextLocation.pathname;return Ls(s.pathname,f)!=null||Ls(s.pathname,u)!=null}function Dl({capability:t,children:l}){var h,g;const r=Oe(),i=Dt(),s=Ys(),u=w.useRef(!1);return(s.data||s.error)&&(u.current=!0),i.appStatus==="running"&&i.backendStatus!=="none"&&!i.staticOnly&&!u.current&&!s.data&&!s.error?m.jsx("p",{className:"p-8",children:r("common.loading")}):((g=(h=s.data)==null?void 0:h.capabilities)==null?void 0:g[t])===!1?m.jsx("div",{className:"p-6",children:m.jsx(st,{error:new Fe({code:"DASHBOARD_CAPABILITY_UNAVAILABLE",capability:t,stage:"tenant-capability",stateImpact:"unchanged",retryable:!1,nextAction:r("tenant.featureUnavailableBody")})})}):m.jsxs(m.Fragment,{children:[s.error&&m.jsx(st,{error:s.error,stale:s.stale}),l]})}function T_(){const t=Oe();return m.jsx("div",{className:"p-6",children:m.jsx("h1",{className:"font-semibold",children:t("tenant.notFound")})})}const X0=[{path:"/status",key:"app.nav.status",command:"command.goToStatus",icon:b2},{path:"/data",key:"app.nav.data",command:"command.goToData",icon:Ml},{path:"/functions",key:"app.nav.functions",command:"command.goToFunctions",icon:zl},{path:"/logs",key:"app.nav.logs",command:"command.goToLogs",icon:Yy},{path:"/files",key:"app.nav.files",command:"command.goToFiles",icon:$y},{path:"/schedule",key:"scheduler.title",command:"scheduler.title",icon:Ms},{path:"/auth",key:"app.nav.auth",command:"command.goToAuth",icon:RE},{path:"/settings",key:"app.nav.settings",command:"command.goToSettings",icon:mE}];function jv({onNavigate:t}={}){const l=Oe(),r=Ys(),i=X0.filter(h=>{var g,p;return((p=(g=r.data)==null?void 0:g.capabilities)==null?void 0:p[h.path==="/schedule"?"scheduler":h.path.slice(1)])!==!1}),s=Ir(),{pathname:u}=An(),f=H0("/").replace(/\/$/,"");return m.jsx(TE,{className:"h-full w-60 shrink-0 border-r border-border",onNavigate:h=>{s(h),t==null||t()},items:i.map(h=>({id:h.path,href:`${f}${h.path}`,navigationTarget:h.path,label:l(h.key),icon:h.icon,active:u.startsWith(h.path)})),header:m.jsxs("div",{className:"flex items-center gap-2 border-b border-border px-4 h-12",children:[m.jsx(Gs,{className:"h-4 w-4 text-primary"}),m.jsxs("div",{children:[m.jsx("h1",{className:"text-sm font-bold",children:"Gencow"}),m.jsx("p",{className:"text-xs text-muted-foreground",children:l("app.nav.dashboard")})]})]}),footer:m.jsx(fR,{connectionLabel:l("app.nav.connected"),searchLabel:l("app.nav.search"),themeControl:m.jsx(zE,{}),localeControl:m.jsx(wf,{}),onSearch:()=>window.dispatchEvent(new KeyboardEvent("keydown",{key:"k",metaKey:!0}))})})}function k_(){const t=Oe(),l=Ys(),r=X0.filter(s=>{var u,f;return((f=(u=l.data)==null?void 0:u.capabilities)==null?void 0:f[s.path==="/schedule"?"scheduler":s.path.slice(1)])!==!1}),i=Ir();return m.jsx(AE,{onNavigate:i,commands:r.map(s=>({id:s.path,href:s.path,label:t(s.command),icon:s.icon,group:t("command.group.navigation")})),labels:{placeholder:t("command.placeholder"),noResults:t("command.noResults"),navigate:t("command.navigate"),select:t("command.select"),close:t("command.close")}})}function D_(){const[t,l]=w.useState(!1),r=Oe();return w.useEffect(()=>{const i=window.matchMedia("(min-width: 768px)"),s=u=>{((u==null?void 0:u.matches)??i.matches)&&l(!1)};return s(),i.addEventListener("change",s),()=>i.removeEventListener("change",s)},[]),m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"hidden h-full shrink-0 md:block",children:m.jsx(jv,{})}),m.jsxs("header",{className:"flex h-12 shrink-0 items-center justify-between gap-2 border-b border-border px-3 md:hidden",children:[m.jsxs(Q1,{open:t,onOpenChange:l,children:[m.jsx(J1,{asChild:!0,children:m.jsxs("button",{type:"button","aria-label":r("command.group.navigation"),className:"inline-flex h-9 items-center gap-2 rounded-md border border-border px-2 text-sm",children:[m.jsx(aE,{className:"h-4 w-4","aria-hidden":"true"}),m.jsx("span",{children:"Gencow"})]})}),m.jsxs(eS,{children:[m.jsx(tS,{className:"fixed inset-0 z-40 bg-black/50 md:hidden"}),m.jsxs(lS,{"aria-describedby":void 0,className:"fixed inset-y-0 left-0 z-50 h-dvh w-60 max-w-[calc(100vw-2rem)] overflow-y-auto bg-card shadow-xl md:hidden",children:[m.jsx(sS,{className:"sr-only",children:r("command.group.navigation")}),m.jsx(jv,{onNavigate:()=>l(!1)}),m.jsx(cS,{asChild:!0,children:m.jsx("button",{type:"button","aria-label":r("command.close"),className:"absolute right-2 top-2 flex h-8 w-8 items-center justify-center rounded-md hover:bg-accent",children:m.jsx(Ki,{className:"h-4 w-4","aria-hidden":"true"})})})]})]})]}),m.jsx(wf,{})]})]})}function M_(t){if(typeof document>"u")return;let l=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",l.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}const O_=t=>{switch(t){case"success":return U_;case"info":return H_;case"warning":return B_;case"error":return V_;default:return null}},z_=Array(12).fill(0),L_=({visible:t,className:l})=>re.createElement("div",{className:["sonner-loading-wrapper",l].filter(Boolean).join(" "),"data-visible":t},re.createElement("div",{className:"sonner-spinner"},z_.map((r,i)=>re.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),U_=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},re.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),B_=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},re.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),H_=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},re.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),V_=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},re.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),I_=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},re.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),re.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),F_=()=>{const[t,l]=re.useState(document.hidden);return re.useEffect(()=>{const r=()=>{l(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),t};let rf=1;class q_{constructor(){this.subscribe=l=>(this.subscribers.push(l),()=>{const r=this.subscribers.indexOf(l);this.subscribers.splice(r,1)}),this.publish=l=>{this.subscribers.forEach(r=>r(l))},this.addToast=l=>{this.publish(l),this.toasts=[...this.toasts,l]},this.create=l=>{var r;const{message:i,...s}=l,u=typeof(l==null?void 0:l.id)=="number"||((r=l.id)==null?void 0:r.length)>0?l.id:rf++,f=this.toasts.find(g=>g.id===u),h=l.dismissible===void 0?!0:l.dismissible;return this.dismissedToasts.has(u)&&this.dismissedToasts.delete(u),f?this.toasts=this.toasts.map(g=>g.id===u?(this.publish({...g,...l,id:u,title:i}),{...g,...l,id:u,dismissible:h,title:i}):g):this.addToast({title:i,...s,dismissible:h,id:u}),u},this.dismiss=l=>(l?(this.dismissedToasts.add(l),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:l,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(i=>i({id:r.id,dismiss:!0}))}),l),this.message=(l,r)=>this.create({...r,message:l}),this.error=(l,r)=>this.create({...r,message:l,type:"error"}),this.success=(l,r)=>this.create({...r,type:"success",message:l}),this.info=(l,r)=>this.create({...r,type:"info",message:l}),this.warning=(l,r)=>this.create({...r,type:"warning",message:l}),this.loading=(l,r)=>this.create({...r,type:"loading",message:l}),this.promise=(l,r)=>{if(!r)return;let i;r.loading!==void 0&&(i=this.create({...r,promise:l,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const s=Promise.resolve(l instanceof Function?l():l);let u=i!==void 0,f;const h=s.then(async p=>{if(f=["resolve",p],re.isValidElement(p))u=!1,this.create({id:i,type:"default",message:p});else if(G_(p)&&!p.ok){u=!1;const v=typeof r.error=="function"?await r.error(`HTTP error! status: ${p.status}`):r.error,C=typeof r.description=="function"?await r.description(`HTTP error! status: ${p.status}`):r.description,S=typeof v=="object"&&!re.isValidElement(v)?v:{message:v};this.create({id:i,type:"error",description:C,...S})}else if(p instanceof Error){u=!1;const v=typeof r.error=="function"?await r.error(p):r.error,C=typeof r.description=="function"?await r.description(p):r.description,S=typeof v=="object"&&!re.isValidElement(v)?v:{message:v};this.create({id:i,type:"error",description:C,...S})}else if(r.success!==void 0){u=!1;const v=typeof r.success=="function"?await r.success(p):r.success,C=typeof r.description=="function"?await r.description(p):r.description,S=typeof v=="object"&&!re.isValidElement(v)?v:{message:v};this.create({id:i,type:"success",description:C,...S})}}).catch(async p=>{if(f=["reject",p],r.error!==void 0){u=!1;const y=typeof r.error=="function"?await r.error(p):r.error,v=typeof r.description=="function"?await r.description(p):r.description,x=typeof y=="object"&&!re.isValidElement(y)?y:{message:y};this.create({id:i,type:"error",description:v,...x})}}).finally(()=>{u&&(this.dismiss(i),i=void 0),r.finally==null||r.finally.call(r)}),g=()=>new Promise((p,y)=>h.then(()=>f[0]==="reject"?y(f[1]):p(f[1])).catch(y));return typeof i!="string"&&typeof i!="number"?{unwrap:g}:Object.assign(i,{unwrap:g})},this.custom=(l,r)=>{const i=(r==null?void 0:r.id)||rf++;return this.create({jsx:l(i),id:i,...r}),i},this.getActiveToasts=()=>this.toasts.filter(l=>!this.dismissedToasts.has(l.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const tn=new q_,$_=(t,l)=>{const r=(l==null?void 0:l.id)||rf++;return tn.addToast({title:t,...l,id:r}),r},G_=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",P_=$_,Y_=()=>tn.toasts,X_=()=>tn.getActiveToasts(),Bn=Object.assign(P_,{success:tn.success,info:tn.info,warning:tn.warning,error:tn.error,custom:tn.custom,message:tn.message,promise:tn.promise,dismiss:tn.dismiss,loading:tn.loading},{getHistory:Y_,getToasts:X_});M_("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Es(t){return t.label!==void 0}const K_=3,Q_="24px",Z_="16px",Tv=4e3,J_=356,W_=14,eA=45,tA=200;function Zn(...t){return t.filter(Boolean).join(" ")}function nA(t){const[l,r]=t.split("-"),i=[];return l&&i.push(l),r&&i.push(r),i}const aA=t=>{var l,r,i,s,u,f,h,g,p;const{invert:y,toast:v,unstyled:C,interacting:x,setHeights:S,visibleToasts:E,heights:R,index:_,toasts:j,expanded:A,removeToast:L,defaultRichColors:M,closeButton:K,style:X,cancelButtonStyle:U,actionButtonStyle:le,className:ye="",descriptionClassName:q="",duration:ee,position:ie,gap:oe,expandByDefault:he,classNames:O,icons:G,closeButtonAriaLabel:ae="Close toast"}=t,[ve,ne]=re.useState(null),[k,P]=re.useState(null),[$,W]=re.useState(!1),[V,Z]=re.useState(!1),[se,fe]=re.useState(!1),[te,pe]=re.useState(!1),[$e,Ge]=re.useState(!1),[Fn,gt]=re.useState(0),[cl,ka]=re.useState(0),ta=re.useRef(v.duration||ee||Tv),dl=re.useRef(null),Bt=re.useRef(null),na=_===0,Da=_+1<=E,bt=v.type,jn=v.dismissible!==!1,xt=v.className||"",Hl=v.descriptionClassName||"",me=re.useMemo(()=>R.findIndex(Re=>Re.toastId===v.id)||0,[R,v.id]),Te=re.useMemo(()=>{var Re;return(Re=v.closeButton)!=null?Re:K},[v.closeButton,K]),We=re.useMemo(()=>v.duration||ee||Tv,[v.duration,ee]),Ht=re.useRef(0),Mt=re.useRef(0),aa=re.useRef(0),Vt=re.useRef(null),[la,pt]=ie.split("-"),Nt=re.useMemo(()=>R.reduce((Re,nt,St)=>St>=me?Re:Re+nt.height,0),[R,me]),wt=F_(),Vl=v.invert||y,Fr=bt==="loading";Mt.current=re.useMemo(()=>me*oe+Nt,[me,Nt]),re.useEffect(()=>{ta.current=We},[We]),re.useEffect(()=>{W(!0)},[]),re.useEffect(()=>{const Re=Bt.current;if(Re){const nt=Re.getBoundingClientRect().height;return ka(nt),S(St=>[{toastId:v.id,height:nt,position:v.position},...St]),()=>S(St=>St.filter(Ot=>Ot.toastId!==v.id))}},[S,v.id]),re.useLayoutEffect(()=>{if(!$)return;const Re=Bt.current,nt=Re.style.height;Re.style.height="auto";const St=Re.getBoundingClientRect().height;Re.style.height=nt,ka(St),S(Ot=>Ot.find(rt=>rt.toastId===v.id)?Ot.map(rt=>rt.toastId===v.id?{...rt,height:St}:rt):[{toastId:v.id,height:St,position:v.position},...Ot])},[$,v.title,v.description,S,v.id,v.jsx,v.action,v.cancel]);const qn=re.useCallback(()=>{Z(!0),gt(Mt.current),S(Re=>Re.filter(nt=>nt.toastId!==v.id)),setTimeout(()=>{L(v)},tA)},[v,L,S,Mt]);re.useEffect(()=>{if(v.promise&&bt==="loading"||v.duration===1/0||v.type==="loading")return;let Re;return A||x||wt?(()=>{if(aa.current<Ht.current){const Ot=new Date().getTime()-Ht.current;ta.current=ta.current-Ot}aa.current=new Date().getTime()})():(()=>{ta.current!==1/0&&(Ht.current=new Date().getTime(),Re=setTimeout(()=>{v.onAutoClose==null||v.onAutoClose.call(v,v),qn()},ta.current))})(),()=>clearTimeout(Re)},[A,x,v,bt,wt,qn]),re.useEffect(()=>{v.delete&&(qn(),v.onDismiss==null||v.onDismiss.call(v,v))},[qn,v.delete]);function Il(){var Re;if(G!=null&&G.loading){var nt;return re.createElement("div",{className:Zn(O==null?void 0:O.loader,v==null||(nt=v.classNames)==null?void 0:nt.loader,"sonner-loader"),"data-visible":bt==="loading"},G.loading)}return re.createElement(L_,{className:Zn(O==null?void 0:O.loader,v==null||(Re=v.classNames)==null?void 0:Re.loader),visible:bt==="loading"})}const Fl=v.icon||(G==null?void 0:G[bt])||O_(bt);var fl,$n;return re.createElement("li",{tabIndex:0,ref:Bt,className:Zn(ye,xt,O==null?void 0:O.toast,v==null||(l=v.classNames)==null?void 0:l.toast,O==null?void 0:O.default,O==null?void 0:O[bt],v==null||(r=v.classNames)==null?void 0:r[bt]),"data-sonner-toast":"","data-rich-colors":(fl=v.richColors)!=null?fl:M,"data-styled":!(v.jsx||v.unstyled||C),"data-mounted":$,"data-promise":!!v.promise,"data-swiped":$e,"data-removed":V,"data-visible":Da,"data-y-position":la,"data-x-position":pt,"data-index":_,"data-front":na,"data-swiping":se,"data-dismissible":jn,"data-type":bt,"data-invert":Vl,"data-swipe-out":te,"data-swipe-direction":k,"data-expanded":!!(A||he&&$),"data-testid":v.testId,style:{"--index":_,"--toasts-before":_,"--z-index":j.length-_,"--offset":`${V?Fn:Mt.current}px`,"--initial-height":he?"auto":`${cl}px`,...X,...v.style},onDragEnd:()=>{fe(!1),ne(null),Vt.current=null},onPointerDown:Re=>{Re.button!==2&&(Fr||!jn||(dl.current=new Date,gt(Mt.current),Re.target.setPointerCapture(Re.pointerId),Re.target.tagName!=="BUTTON"&&(fe(!0),Vt.current={x:Re.clientX,y:Re.clientY})))},onPointerUp:()=>{var Re,nt,St;if(te||!jn)return;Vt.current=null;const Ot=Number(((Re=Bt.current)==null?void 0:Re.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ma=Number(((nt=Bt.current)==null?void 0:nt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),rt=new Date().getTime()-((St=dl.current)==null?void 0:St.getTime()),Gt=ve==="x"?Ot:Ma,ml=Math.abs(Gt)/rt;if(Math.abs(Gt)>=eA||ml>.11){gt(Mt.current),v.onDismiss==null||v.onDismiss.call(v,v),P(ve==="x"?Ot>0?"right":"left":Ma>0?"down":"up"),qn(),pe(!0);return}else{var Pt,Yt;(Pt=Bt.current)==null||Pt.style.setProperty("--swipe-amount-x","0px"),(Yt=Bt.current)==null||Yt.style.setProperty("--swipe-amount-y","0px")}Ge(!1),fe(!1),ne(null)},onPointerMove:Re=>{var nt,St,Ot;if(!Vt.current||!jn||((nt=window.getSelection())==null?void 0:nt.toString().length)>0)return;const rt=Re.clientY-Vt.current.y,Gt=Re.clientX-Vt.current.x;var ml;const Pt=(ml=t.swipeDirections)!=null?ml:nA(ie);!ve&&(Math.abs(Gt)>1||Math.abs(rt)>1)&&ne(Math.abs(Gt)>Math.abs(rt)?"x":"y");let Yt={x:0,y:0};const ql=Tn=>1/(1.5+Math.abs(Tn)/20);if(ve==="y"){if(Pt.includes("top")||Pt.includes("bottom"))if(Pt.includes("top")&&rt<0||Pt.includes("bottom")&&rt>0)Yt.y=rt;else{const Tn=rt*ql(rt);Yt.y=Math.abs(Tn)<Math.abs(rt)?Tn:rt}}else if(ve==="x"&&(Pt.includes("left")||Pt.includes("right")))if(Pt.includes("left")&&Gt<0||Pt.includes("right")&&Gt>0)Yt.x=Gt;else{const Tn=Gt*ql(Gt);Yt.x=Math.abs(Tn)<Math.abs(Gt)?Tn:Gt}(Math.abs(Yt.x)>0||Math.abs(Yt.y)>0)&&Ge(!0),(St=Bt.current)==null||St.style.setProperty("--swipe-amount-x",`${Yt.x}px`),(Ot=Bt.current)==null||Ot.style.setProperty("--swipe-amount-y",`${Yt.y}px`)}},Te&&!v.jsx&&bt!=="loading"?re.createElement("button",{"aria-label":ae,"data-disabled":Fr,"data-close-button":!0,onClick:Fr||!jn?()=>{}:()=>{qn(),v.onDismiss==null||v.onDismiss.call(v,v)},className:Zn(O==null?void 0:O.closeButton,v==null||(i=v.classNames)==null?void 0:i.closeButton)},($n=G==null?void 0:G.close)!=null?$n:I_):null,(bt||v.icon||v.promise)&&v.icon!==null&&((G==null?void 0:G[bt])!==null||v.icon)?re.createElement("div",{"data-icon":"",className:Zn(O==null?void 0:O.icon,v==null||(s=v.classNames)==null?void 0:s.icon)},v.promise||v.type==="loading"&&!v.icon?v.icon||Il():null,v.type!=="loading"?Fl:null):null,re.createElement("div",{"data-content":"",className:Zn(O==null?void 0:O.content,v==null||(u=v.classNames)==null?void 0:u.content)},re.createElement("div",{"data-title":"",className:Zn(O==null?void 0:O.title,v==null||(f=v.classNames)==null?void 0:f.title)},v.jsx?v.jsx:typeof v.title=="function"?v.title():v.title),v.description?re.createElement("div",{"data-description":"",className:Zn(q,Hl,O==null?void 0:O.description,v==null||(h=v.classNames)==null?void 0:h.description)},typeof v.description=="function"?v.description():v.description):null),re.isValidElement(v.cancel)?v.cancel:v.cancel&&Es(v.cancel)?re.createElement("button",{"data-button":!0,"data-cancel":!0,style:v.cancelButtonStyle||U,onClick:Re=>{Es(v.cancel)&&jn&&(v.cancel.onClick==null||v.cancel.onClick.call(v.cancel,Re),qn())},className:Zn(O==null?void 0:O.cancelButton,v==null||(g=v.classNames)==null?void 0:g.cancelButton)},v.cancel.label):null,re.isValidElement(v.action)?v.action:v.action&&Es(v.action)?re.createElement("button",{"data-button":!0,"data-action":!0,style:v.actionButtonStyle||le,onClick:Re=>{Es(v.action)&&(v.action.onClick==null||v.action.onClick.call(v.action,Re),!Re.defaultPrevented&&qn())},className:Zn(O==null?void 0:O.actionButton,v==null||(p=v.classNames)==null?void 0:p.actionButton)},v.action.label):null)};function kv(){if(typeof window>"u"||typeof document>"u")return"ltr";const t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function lA(t,l){const r={};return[t,l].forEach((i,s)=>{const u=s===1,f=u?"--mobile-offset":"--offset",h=u?Z_:Q_;function g(p){["top","right","bottom","left"].forEach(y=>{r[`${f}-${y}`]=typeof p=="number"?`${p}px`:p})}typeof i=="number"||typeof i=="string"?g(i):typeof i=="object"?["top","right","bottom","left"].forEach(p=>{i[p]===void 0?r[`${f}-${p}`]=h:r[`${f}-${p}`]=typeof i[p]=="number"?`${i[p]}px`:i[p]}):g(h)}),r}const rA=re.forwardRef(function(l,r){const{id:i,invert:s,position:u="bottom-right",hotkey:f=["altKey","KeyT"],expand:h,closeButton:g,className:p,offset:y,mobileOffset:v,theme:C="light",richColors:x,duration:S,style:E,visibleToasts:R=K_,toastOptions:_,dir:j=kv(),gap:A=W_,icons:L,containerAriaLabel:M="Notifications"}=l,[K,X]=re.useState([]),U=re.useMemo(()=>i?K.filter($=>$.toasterId===i):K.filter($=>!$.toasterId),[K,i]),le=re.useMemo(()=>Array.from(new Set([u].concat(U.filter($=>$.position).map($=>$.position)))),[U,u]),[ye,q]=re.useState([]),[ee,ie]=re.useState(!1),[oe,he]=re.useState(!1),[O,G]=re.useState(C!=="system"?C:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),ae=re.useRef(null),ve=f.join("+").replace(/Key/g,"").replace(/Digit/g,""),ne=re.useRef(null),k=re.useRef(!1),P=re.useCallback($=>{X(W=>{var V;return(V=W.find(Z=>Z.id===$.id))!=null&&V.delete||tn.dismiss($.id),W.filter(({id:Z})=>Z!==$.id)})},[]);return re.useEffect(()=>tn.subscribe($=>{if($.dismiss){requestAnimationFrame(()=>{X(W=>W.map(V=>V.id===$.id?{...V,delete:!0}:V))});return}setTimeout(()=>{_w.flushSync(()=>{X(W=>{const V=W.findIndex(Z=>Z.id===$.id);return V!==-1?[...W.slice(0,V),{...W[V],...$},...W.slice(V+1)]:[$,...W]})})})}),[K]),re.useEffect(()=>{if(C!=="system"){G(C);return}if(C==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?G("dark"):G("light")),typeof window>"u")return;const $=window.matchMedia("(prefers-color-scheme: dark)");try{$.addEventListener("change",({matches:W})=>{G(W?"dark":"light")})}catch{$.addListener(({matches:V})=>{try{G(V?"dark":"light")}catch(Z){console.error(Z)}})}},[C]),re.useEffect(()=>{K.length<=1&&ie(!1)},[K]),re.useEffect(()=>{const $=W=>{var V;if(f.every(fe=>W[fe]||W.code===fe)){var se;ie(!0),(se=ae.current)==null||se.focus()}W.code==="Escape"&&(document.activeElement===ae.current||(V=ae.current)!=null&&V.contains(document.activeElement))&&ie(!1)};return document.addEventListener("keydown",$),()=>document.removeEventListener("keydown",$)},[f]),re.useEffect(()=>{if(ae.current)return()=>{ne.current&&(ne.current.focus({preventScroll:!0}),ne.current=null,k.current=!1)}},[ae.current]),re.createElement("section",{ref:r,"aria-label":`${M} ${ve}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},le.map(($,W)=>{var V;const[Z,se]=$.split("-");return U.length?re.createElement("ol",{key:$,dir:j==="auto"?kv():j,tabIndex:-1,ref:ae,className:p,"data-sonner-toaster":!0,"data-sonner-theme":O,"data-y-position":Z,"data-x-position":se,style:{"--front-toast-height":`${((V=ye[0])==null?void 0:V.height)||0}px`,"--width":`${J_}px`,"--gap":`${A}px`,...E,...lA(y,v)},onBlur:fe=>{k.current&&!fe.currentTarget.contains(fe.relatedTarget)&&(k.current=!1,ne.current&&(ne.current.focus({preventScroll:!0}),ne.current=null))},onFocus:fe=>{fe.target instanceof HTMLElement&&fe.target.dataset.dismissible==="false"||k.current||(k.current=!0,ne.current=fe.relatedTarget)},onMouseEnter:()=>ie(!0),onMouseMove:()=>ie(!0),onMouseLeave:()=>{oe||ie(!1)},onDragEnd:()=>ie(!1),onPointerDown:fe=>{fe.target instanceof HTMLElement&&fe.target.dataset.dismissible==="false"||he(!0)},onPointerUp:()=>he(!1)},U.filter(fe=>!fe.position&&W===0||fe.position===$).map((fe,te)=>{var pe,$e;return re.createElement(aA,{key:fe.id,icons:L,index:te,toast:fe,defaultRichColors:x,duration:(pe=_==null?void 0:_.duration)!=null?pe:S,className:_==null?void 0:_.className,descriptionClassName:_==null?void 0:_.descriptionClassName,invert:s,visibleToasts:R,closeButton:($e=_==null?void 0:_.closeButton)!=null?$e:g,interacting:oe,position:$,style:_==null?void 0:_.style,unstyled:_==null?void 0:_.unstyled,classNames:_==null?void 0:_.classNames,cancelButtonStyle:_==null?void 0:_.cancelButtonStyle,actionButtonStyle:_==null?void 0:_.actionButtonStyle,closeButtonAriaLabel:_==null?void 0:_.closeButtonAriaLabel,removeToast:P,toasts:U.filter(Ge=>Ge.position==fe.position),heights:ye.filter(Ge=>Ge.position==fe.position),setHeights:q,expandByDefault:h,gap:A,expanded:ee,swipeDirections:l.swipeDirections})})):null}))});function iA(){const{resolvedTheme:t}=Jy();return m.jsxs("div",{className:"flex h-dvh flex-col bg-background text-foreground md:flex-row",children:[m.jsx(D_,{}),m.jsx("main",{className:"min-h-0 min-w-0 flex-1 overflow-auto",children:m.jsx(PN,{})}),m.jsx(k_,{}),m.jsx(rA,{theme:t,position:"bottom-right",richColors:!0,closeButton:!0,style:{zIndex:50},toastOptions:{style:{background:"var(--card)",border:"1px solid var(--border)",color:"var(--foreground)",opacity:1}}})]})}function oA(t){if(!t||t==="unknown")return"Unknown";const l=t.match(/^(PostgreSQL|PGlite)\s*[\d.]+/i);return l?l[0]:t.split(" on ")[0]||t}const sA={vector:"bg-purple-500/15 text-purple-600",pg_search:"bg-blue-500/15 text-blue-600",pgmq:"bg-amber-500/15 text-amber-600",plpgsql:"bg-muted text-muted-foreground"};function K0({appStatus:t}={}){const l=Oe(),r=Ys(),i=r.data,s=Dt(),u=t||s.appStatus;if(!i)return m.jsx(st,{stale:r.stale,error:r.error});const f=i.memory,h=i.platform,g=Math.floor(i.uptime)||0,p=Math.floor(g/3600),y=Math.floor(g%3600/60),v=g%60,C=oA((h==null?void 0:h.dbVersion)||""),x=(h==null?void 0:h.extensions)||[],S=[{label:l("server.status"),value:u==="crashed"?m.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[m.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"}),m.jsx("span",{className:"text-red-500 font-medium",children:l("status.crashed")})]}):u==="error"?m.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[m.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"}),m.jsx("span",{className:"text-red-500 font-medium",children:l("status.error")})]}):u==="memory_exceeded"?m.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[m.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"}),m.jsx("span",{className:"text-red-500 font-medium",children:"Memory exceeded"})]}):u==="stopped"?m.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[m.jsx("span",{className:"h-2 w-2 rounded-full bg-muted-foreground"}),m.jsx("span",{className:"text-muted-foreground font-medium",children:l("status.stopped")})]}):u==="idle"?m.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[m.jsx("span",{className:"h-2 w-2 rounded-full bg-blue-400"}),m.jsx("span",{className:"text-blue-400 font-medium",children:l("status.idle")})]}):u==="failed"?m.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[m.jsx("span",{className:"h-2 w-2 rounded-full bg-orange-500"}),m.jsx("span",{className:"text-orange-500 font-medium",children:l("status.failed")})]}):m.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[m.jsx("span",{className:"h-2 w-2 rounded-full bg-green-500 animate-pulse"}),m.jsx("span",{className:"text-green-600 font-medium",children:l("status.running")})]})},{label:l("server.uptime"),value:m.jsxs("span",{className:"font-mono",children:[p,"h ",y,"m ",v,"s"]})},{label:l("server.memory"),value:m.jsxs("span",{children:[m.jsxs("span",{className:"font-mono",children:[Math.round(((f==null?void 0:f.rss)||0)/1024/1024)," MB"]}),m.jsxs("span",{className:"text-muted-foreground ml-2",children:["(",l("server.heap")," ",Math.round(((f==null?void 0:f.heapUsed)||0)/1024/1024)," MB)"]})]})},{label:l("server.runtime"),value:m.jsx(Ze,{variant:"secondary",children:h==null?void 0:h.runtime})},{label:l("server.framework"),value:m.jsxs("span",{children:[h==null?void 0:h.framework," + ",h==null?void 0:h.orm]})},{label:l("server.database"),value:m.jsx("span",{children:C})},{label:l("server.extensions"),value:x.length===0?m.jsx("span",{className:"text-muted-foreground",children:l("server.noExtensions")}):m.jsx("span",{className:"inline-flex flex-wrap gap-1",children:x.map(E=>m.jsxs(Ze,{variant:"secondary",className:sA[E.name]||"",children:[E.name," ",E.version]},E.name))})}];return m.jsxs(m.Fragment,{children:[m.jsx(st,{stale:r.stale,error:r.error}),m.jsx(lR,{title:l("server.title"),rows:S})]})}const uA=()=>()=>{},cA=()=>{};function Mf(t,l,r){var g;const{mutationGuard:i,status:s}=Dt(),u=(g=s.data)==null?void 0:g.generationId,f=w.useSyncExternalStore((i==null?void 0:i.subscribe)??uA,(i==null?void 0:i.snapshot)??cA),h=w.useRef(void 0);return w.useEffect(()=>{const p=h.current;if(p){if(p.requestKey!==r.requestKey||p.generationId!==u||p.resource!==l){h.current=void 0;return}r.readRevision<p.readRevision||r.loading||(h.current=void 0,!(r.readRevision!==p.readRevision||r.error||r.data===void 0)&&(i==null||i.inspect(t,l,p.generationId,p.operationId)))}},[i,u,t,l,r.requestKey,r.readRevision,r.loading,r.error,r.data]),{error:f==null?void 0:f.error,blocked:f!==void 0&&f.phase!=="ready",refresh(){var v;const p=r.refresh(),y=i==null?void 0:i.snapshot();return h.current=u&&((v=y==null?void 0:y.record)==null?void 0:v.state)==="unknown"&&y.phase!=="pending"?{...p,generationId:u,resource:l,operationId:y.record.operationId}:void 0,p}}}const dA=()=>()=>{},fA=()=>{};function Js(t){var x;const l=Dt(),r=t?l.mutationGuard:void 0,i=(x=l.status.data)==null?void 0:x.generationId,s=w.useSyncExternalStore((r==null?void 0:r.subscribe)??dA,(r==null?void 0:r.snapshot)??fA),[u,f]=w.useState(),[h,g]=w.useState(!1),p=w.useRef(!0),y=w.useRef(void 0),v=w.useRef(void 0);return w.useEffect(()=>(p.current=!0,()=>{var S;p.current=!1,(S=y.current)==null||S.abort(),v.current&&(r==null||r.reject(v.current))}),[r]),{run:w.useCallback(async(S,E)=>{if(y.current||r&&r.snapshot().phase!=="ready")return!1;const R=new AbortController;y.current=R,g(!0),f(void 0);let _;try{if(r&&t&&i&&(_=await r.begin(t.surface,i,t.resource),v.current=_,!p.current||R.signal.aborted))return r.reject(_,new Fe({code:"DASHBOARD_OPERATION_CANCELLED",stateImpact:"unchanged",retryable:!1,nextAction:"No request was sent; reopen the current resource before a deliberate action."})),!1;const j=await S(R.signal);return!p.current||R.signal.aborted?(_&&(r==null||r.reject(_)),!1):_&&!(r!=null&&r.acknowledge(_))?!1:(E==null||E(j),!0)}catch(j){const A=j instanceof Fe?j:new Fe({code:"DASHBOARD_NETWORK_ERROR",stage:"tenant-operation",stateImpact:"unknown",retryable:!1,nextAction:"Inspect the current state before retrying; the operation outcome is unknown."});return _&&(r==null||r.reject(_,R.signal.aborted?void 0:A)),p.current&&!R.signal.aborted&&!Un(j)&&f(A),!1}finally{y.current===R&&(y.current=void 0),v.current===_&&(v.current=void 0),p.current&&g(!1)}},[r,i,t==null?void 0:t.surface,t==null?void 0:t.resource]),error:(s==null?void 0:s.error)??u,busy:h||(s==null?void 0:s.phase)==="pending",blocked:s!==void 0&&s.phase!=="ready",clearError:()=>f(void 0)}}const Dv=new Set(["id","created_at","createdAt","updated_at","updatedAt"]);function Q0(t){const l=t.toLowerCase();return l.includes("timestamp")||l.includes("date")?"datetime":l.includes("json")?"textarea":l.includes("bool")?"boolean":["int","float","numeric","decimal","real","double"].some(r=>l.includes(r))?"number":l.includes("text")&&!l.includes("varchar")?"textarea":"text"}function mA(t){if(!t)return"";const l=new Date(t);return Number.isNaN(l.getTime())?"":new Date(l.getTime()-l.getTimezoneOffset()*6e4).toISOString().slice(0,19)}function hA(t){const l=t.toLowerCase();return["int","float","numeric"].some(r=>l.includes(r))?"text-blue-400 bg-blue-500/10":l.includes("bool")?"text-amber-400 bg-amber-500/10":l.includes("timestamp")||l.includes("date")?"text-green-400 bg-green-500/10":l.includes("json")?"text-purple-400 bg-purple-500/10":"text-zinc-400 bg-zinc-500/10"}function gA(t,l){return t?Object.entries(t).flatMap(([r,i])=>r===l?[]:i.filter(s=>{var u;return((u=s.references)==null?void 0:u.table)===l}).map(s=>({table:r,column:s.column}))):[]}function pA(t,l,r){return t==null?"null":typeof t=="boolean"?t?"true":"false":l.toLowerCase().includes("timestamp")||l.toLowerCase().includes("date")?r(t):typeof t=="object"?JSON.stringify(t,null,2):String(t)}function Jn(t){return new Fe({code:"DASHBOARD_INVALID_INPUT",stage:"row-input",stateImpact:"unchanged",retryable:!1,nextAction:t})}function Z0(t,l,r){const i=l.type.toLowerCase();if(t===""){if(!l.nullable)throw Jn(r("row.requiredInput"));return null}if(i.includes("timestamp")||i.includes("date")){const s=new Date(t);if(!Number.isFinite(s.getTime()))throw Jn(r("row.invalidDate"));return s.toISOString()}if(["int","float","numeric","real","double","decimal"].some(s=>i.includes(s))){const s=Number(t);if(!t.trim()||!Number.isFinite(s))throw Jn(r("row.invalidNumber"));return s}if(i.includes("bool")){if(t!=="true"&&t!=="false")throw Jn(r("row.invalidBoolean"));return t==="true"}if(i.includes("json")){let s;try{s=JSON.parse(t)}catch{throw Jn(r("row.invalidJson"))}if(s===null&&!l.nullable)throw Jn(r("row.requiredInput"));return s}return t}function Ui(t,l){const r=l.filter(s=>s.primaryKey).map(s=>s.column),i=r.length>0?r:l.some(s=>s.column==="id")?["id"]:[];return i.length===0?JSON.stringify(t):JSON.stringify(i.map(s=>[s,t[s]]))}function J0(t){const l=t.filter(r=>r.primaryKey);return t.some(r=>"readOnly"in r&&r.readOnly===!0)||!t.some(r=>r.column==="id")||l.length>1||l.length===1&&l[0].column!=="id"}function vA(t,l){return l&&Object.prototype.hasOwnProperty.call(t,l)?l:""}function yA({tableName:t,columns:l,onCreated:r,onCancel:i,disabled:s=!1}){const u=Oe(),{client:f,appStatus:h,backendStatus:g}=Dt(),p=Js({surface:"data",resource:t}),[y,v]=w.useState({}),C=s||p.blocked||J0(l)||h!=="running"||g==="none",x=l.filter(j=>!zs(j)),S=x.map(j=>{const A=Q0(j.type);return{name:j.column,nullable:j.nullable,required:hv(j),kind:A==="number"||A==="textarea"||A==="datetime"?A:"text",...y[j.column]??{mode:"omit",value:""}}}),E=(j,A)=>v(L=>{var M;return{...L,[j]:{value:((M=L[j])==null?void 0:M.value)??"",mode:A}}}),R=(j,A)=>v(L=>{var M;return{...L,[j]:{mode:((M=L[j])==null?void 0:M.mode)??"value",value:A}}}),_=async()=>{C||await p.run(async j=>{const A=x.flatMap(L=>{const M=y[L.column]??{mode:"omit",value:""};if(M.mode==="omit"){if(hv(L))throw Jn(u("row.requiredInput"));return[]}if(M.mode==="null"&&!L.nullable)throw Jn(u("row.requiredInput"));return[[L.column,M.mode==="null"?null:Z0(M.value,L,u)]]});if(A.length===0)throw Jn(u("row.explicitInput"));return f.request(`/_admin/data/${encodeURIComponent(t)}`,E0,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Object.fromEntries(A)),signal:j})},()=>{Bn.success(u("row.created")),r()})};return m.jsx(mR,{fields:S,disabled:C||p.busy,labels:{title:u("row.add"),create:u("row.create"),cancel:u("common.cancel"),omit:u("row.omit"),value:u("row.value"),null:u("row.null"),required:u("row.required")},feedback:m.jsx(st,{error:p.error}),onValueChange:R,onModeChange:E,onSubmit:_,onCancel:i})}function W0({row:t,columns:l,tableName:r,allTables:i,onClose:s,onDataChanged:u,onNavigateToTable:f,readOnly:h=!1,administration:g}){var W;const{locale:p}=_n(),y=Oe(),{client:v,targetId:C,appStatus:x,backendStatus:S,tableView:E}=Dt(),R=Js(g??{surface:"data",resource:r}),[_,j]=w.useState(null),[A,L]=w.useState(""),M=R.busy,[K,X]=w.useState(!1),U=typeof(t==null?void 0:t.id)=="string"&&t.id.length>0||typeof(t==null?void 0:t.id)=="number"&&Number.isFinite(t.id)?t.id:void 0,le=h||R.blocked||x!=="running"||S==="none",ye=le||(g==null?void 0:g.canDelete)===!1,q=le||(g==null?void 0:g.canUpdate)===!1,ee=V=>{const Z=g?g.normalizeUpdate(V):E0(V);if(String(Z.id)!==String(U))throw new Error("Mismatched updated row identity");return Z},ie=(g==null?void 0:g.path(U??""))??`/_admin/data/${encodeURIComponent(r)}/${encodeURIComponent(String(U))}`,oe=w.useMemo(()=>gA(i,r),[i,r]),he=Ta({requestKey:`${C}:references:${E}:${r}:${U}:${oe.map(V=>`${V.table}.${V.column}`).join(",")}`,enabled:oe.length>0&&U!==void 0&&x==="running"&&S!=="none",load:async V=>Object.fromEntries(await Promise.all(oe.map(async Z=>{const se=await v.request(`/_admin/data/${encodeURIComponent(Z.table)}?limit=0&offset=0${E==="all"?"&view=all":""}`,S0,{signal:V});return[`${Z.table}.${Z.column}`,se.total]})))}),O=he.data??{},G=(V,Z,se)=>{j(V),Z==null?se&&(se.toLowerCase().includes("timestamp")||se.toLowerCase().includes("date"))?L(new Date().toISOString()):L(""):L(typeof Z=="object"?JSON.stringify(Z,null,2):String(Z))},ae=w.useCallback(async(V,Z,se)=>{q||U===void 0||M||await R.run(async fe=>{const te=l.find($e=>$e.column===V);if(!te||zs(te)||Dv.has(V)||te.references)throw Jn(y("row.requiredInput"));const pe=Z0(Z,te,y);return v.request(ie,ee,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[V]:pe}),signal:fe})},()=>{Bn.success(y("row.updated",{field:V})),u(),j(null)})},[v,ie,q,U,M,R.run,u,y,l]),ve=w.useCallback(async V=>{q||U===void 0||M||await R.run(Z=>v.request(ie,ee,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[V]:null}),signal:Z}),()=>{Bn.success(y("row.setToNull",{field:V})),u(),j(null)})},[v,ie,q,U,M,R.run,u,y,l]),ne=()=>{j(null),L("")},k=w.useCallback(async(V,Z)=>{if(q||U===void 0||M)return;const se=!Z;await R.run(fe=>v.request(ie,ee,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[V]:se}),signal:fe}),()=>{Bn.success(`${V} = ${se}`),u()})},[v,ie,q,U,M,R.run,u]),P=w.useCallback(async()=>{ye||U===void 0||M||await R.run(V=>v.request(ie,Z=>g?g.normalizeDelete(Z,U):DR(Z),{method:"DELETE",signal:V}),()=>{Bn.success(y("data.rowDeleted")),u(),s()})},[v,ie,ye,U,M,R.run,u,s,y,g]),$=(V,Z,se)=>{V.key==="Enter"&&!V.shiftKey?(V.preventDefault(),ae(Z,A,se)):V.key==="Escape"&&ne()};return t?m.jsxs("div",{"data-testid":"row-detail-drawer",className:"h-full w-full min-w-0 max-w-full box-border flex flex-col overflow-x-hidden border-l border-border bg-background",children:[m.jsx(hR,{rowId:U,onClose:s}),m.jsx(st,{error:R.error??he.error}),m.jsx("div",{className:"flex-1 min-h-0 min-w-0 overflow-y-auto overflow-x-hidden",children:m.jsxs("div",{className:"min-w-0 p-4 space-y-4",children:[l.map(V=>{const Z=t[V.column],se=Q0(V.type),fe=q||U===void 0||zs(V)||Dv.has(V.column)||!!V.references,te=_===V.column&&!fe,pe=Z==null,$e=V.nullable&&!fe&&!pe;return m.jsxs("div",{"data-testid":`row-detail-field-${V.column}`,className:"w-full min-w-0 max-w-full space-y-1.5 overflow-hidden",children:[m.jsxs("div",{className:"flex w-full min-w-0 max-w-full flex-wrap items-center gap-2 overflow-hidden",children:[m.jsx("span",{className:"min-w-0 max-w-full truncate text-xs font-medium text-muted-foreground",children:V.column}),m.jsx("span",{className:`shrink-0 text-[10px] px-1.5 py-0.5 rounded font-mono ${hA(V.type)}`,children:V.type.split("(")[0]}),V.nullable&&m.jsx("span",{className:"text-[10px] text-muted-foreground/50",children:y("data.nullable")}),V.references&&m.jsxs("span",{className:"inline-flex min-w-0 max-w-full items-center gap-0.5 rounded bg-violet-500/10 px-1.5 py-0.5 text-[10px] font-medium text-violet-400",children:[m.jsx(bf,{className:"h-2.5 w-2.5 shrink-0"}),m.jsx("span",{className:"min-w-0 truncate",children:V.references.table})]})]}),te?m.jsxs("div",{className:"w-full min-w-0 max-w-full space-y-2 overflow-hidden",children:[m.jsx(y0,{kind:se==="datetime"||se==="textarea"||se==="number"?se:"text",value:se==="datetime"?mA(A):A,disabled:M,onChange:Ge=>L(Ge),onKeyDown:Ge=>$(Ge,V.column,V.type)}),m.jsxs("div",{className:"flex w-full min-w-0 max-w-full flex-wrap items-center gap-1.5 overflow-hidden",children:[m.jsxs(we,{variant:"default",size:"sm",className:"h-6 shrink-0 text-[11px] px-2",disabled:M,onClick:()=>ae(V.column,A,V.type),children:[m.jsx(w2,{className:"h-3 w-3 mr-1"}),y("common.save")]}),V.nullable&&m.jsx(we,{variant:"ghost",size:"sm",className:"h-6 shrink-0 text-[11px] px-2 text-amber-500 hover:text-amber-400 hover:bg-amber-500/10",disabled:M,onClick:()=>ve(V.column),children:y("row.setNull")}),m.jsx(we,{variant:"ghost",size:"sm",className:"h-6 shrink-0 text-[11px] px-2 text-muted-foreground",onClick:ne,children:y("common.cancel")})]})]}):se==="boolean"&&!fe?m.jsxs("div",{className:"flex w-full min-w-0 max-w-full flex-wrap items-center gap-2 overflow-hidden",children:[m.jsx("button",{onClick:()=>!pe&&k(V.column,Z),disabled:M||pe,className:_e("flex min-w-0 max-w-full flex-1 basis-0 items-center gap-2 rounded-md border border-border px-3 py-2 text-xs transition-colors text-left",pe?"bg-muted/30 cursor-default":"hover:bg-accent/50"),children:pe?m.jsx("span",{className:"text-muted-foreground italic",children:"null"}):m.jsxs(m.Fragment,{children:[m.jsx("div",{className:`w-8 h-4 rounded-full transition-colors relative ${Z?"bg-green-500":"bg-zinc-600"}`,children:m.jsx("div",{className:`absolute top-0.5 w-3 h-3 rounded-full bg-white transition-transform ${Z?"translate-x-4":"translate-x-0.5"}`})}),m.jsx("span",{className:Z?"text-green-400":"text-muted-foreground",children:Z?"true":"false"})]})}),V.nullable&&(pe?m.jsx(we,{variant:"ghost",size:"sm",className:"h-8 text-[10px] px-2 text-muted-foreground hover:text-foreground shrink-0",disabled:M,onClick:()=>k(V.column,!0),children:y("row.setValue")}):m.jsx(we,{variant:"ghost",size:"sm",className:"h-8 text-[10px] px-2 text-amber-500 hover:text-amber-400 hover:bg-amber-500/10 shrink-0",disabled:M,onClick:()=>ve(V.column),children:y("row.setNull")}))]}):V.references&&Z!==null&&Z!==void 0?m.jsxs("div",{onClick:()=>f==null?void 0:f(V.references.table,String(Z)),className:"flex w-full min-w-0 max-w-full box-border items-center gap-2 overflow-hidden rounded-md border border-violet-500/20 px-3 py-2 text-xs cursor-pointer hover:bg-violet-500/5 hover:border-violet-500/40 transition-colors group",children:[m.jsx(J2,{className:"h-3 w-3 text-violet-400 shrink-0"}),m.jsx("span",{className:"min-w-0 w-0 text-violet-400 truncate flex-1 basis-0 group-hover:underline",children:String(Z)}),m.jsx($i,{className:"h-3 w-3 shrink-0 text-violet-400/50 group-hover:text-violet-400 transition-colors"})]}):m.jsxs("div",{className:"flex w-full min-w-0 max-w-full flex-wrap items-center gap-1.5 overflow-hidden",children:[m.jsx("div",{"data-testid":`row-detail-value-${V.column}`,onClick:()=>!fe&&G(V.column,Z,V.type),className:_e("min-w-0 w-0 max-w-full box-border rounded-md border border-border px-3 py-2 text-xs overflow-hidden flex-1 basis-0",fe?"bg-muted/30 text-muted-foreground cursor-default":"hover:bg-accent/50 hover:border-primary/30 cursor-pointer transition-colors",pe?"text-muted-foreground italic":typeof Z=="object"?"font-mono text-foreground whitespace-pre-wrap break-all max-h-24 overflow-y-auto":"text-foreground truncate"),children:pA(Z,V.type,Ge=>Ll(Ge,p))}),$e&&m.jsx(we,{variant:"ghost",size:"sm",className:"h-8 text-[10px] px-2 text-amber-500 hover:text-amber-400 hover:bg-amber-500/10 shrink-0",disabled:M,onClick:()=>ve(V.column),children:y("row.setNull")})]})]},V.column)}),oe.length>0&&m.jsxs("div",{className:"w-full min-w-0 max-w-full overflow-hidden pt-3 mt-3 border-t border-border space-y-2",children:[m.jsxs("div",{className:"flex w-full min-w-0 max-w-full items-center gap-1.5 overflow-hidden text-xs font-medium text-muted-foreground",children:[m.jsx(Ds,{className:"h-3 w-3 shrink-0"}),y("row.referencedBy")]}),oe.map(V=>{const Z=`${V.table}.${V.column}`,se=O[Z];return m.jsxs("button",{onClick:()=>f==null?void 0:f(V.table),className:"flex w-full min-w-0 max-w-full box-border items-center gap-2 overflow-hidden rounded-md border border-emerald-500/20 px-3 py-2 text-xs hover:bg-emerald-500/5 hover:border-emerald-500/40 transition-colors group text-left",children:[m.jsx(Ds,{className:"h-3 w-3 text-emerald-400 shrink-0"}),m.jsxs("span",{className:"min-w-0 w-0 text-emerald-400 flex-1 basis-0 truncate group-hover:underline",children:[V.table,m.jsxs("span",{className:"text-emerald-400/50 ml-1",children:[".",V.column]})]}),se!==void 0&&m.jsx("span",{className:"text-[10px] text-muted-foreground bg-muted/50 rounded px-1.5 py-0.5 shrink-0",children:y("row.rowsCount",{count:se})}),m.jsx($i,{className:"h-3 w-3 text-emerald-400/50 group-hover:text-emerald-400 transition-colors shrink-0"})]},Z)})]})]})}),m.jsx(gR,{readOnly:ye||U===void 0,readOnlyMessage:(g==null?void 0:g.canDelete)===!1?g.deleteUnavailableMessage:R.blocked?wR((W=R.error)==null?void 0:W.diagnostic,p):void 0,busy:M,confirmDelete:K,onConfirmDelete:P,onCancelDelete:()=>X(!1),onRequestDelete:()=>X(!0)})]}):null}function bA({value:t,onChange:l}){const r=Oe();return m.jsxs("label",{className:"flex shrink-0 items-center gap-2 text-sm text-muted-foreground",children:[m.jsx("span",{children:r("data.tableView")}),m.jsxs("select",{value:t,onChange:i=>l(i.target.value==="all"?"all":"filtered"),className:"min-h-10 rounded-md border border-border bg-background px-2 text-sm text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[m.jsx("option",{value:"filtered",children:r("data.filteredTables")}),m.jsx("option",{value:"all",children:r("data.everyTable")})]})]})}function xA(t){return t.backendStatus!==void 0?t.backendStatus==="none"&&!!t.hasStatic:!!t.staticOnly}function Mv(t){return t instanceof Fe&&t.diagnostic.code==="DASHBOARD_CAPABILITY_UNAVAILABLE"?"unavailable":"error"}function eb(t){if(t.showRowRuntimeBlocked)return t.t("data.rowsBlocked");if(t.isRuntimeWaking)return t.t("data.rowsWaitingForBackend");if(t.rowsError)return t.t("data.rowsError");if(t.rowsUnavailable)return t.t("data.rowsUnavailable")}function wA(t){if(t.rowLoading)return t.t("data.loadingRows");const l=eb(t);return l||(t.totalRows===0?t.t("data.noData"):t.t("data.rangeOf",{start:t.page*t.limit+1,end:Math.min((t.page+1)*t.limit,t.totalRows),total:t.totalRows}))}function SA(){var bt,jn,xt,Hl;const{locale:t}=_n(),l=Oe(),r=FR(),[i,s]=w.useState(0),[u,f]=w.useState(null),[h,g]=w.useState(!1),p=50,y=Dt(),{appStatus:v,apiBase:C,targetId:x,client:S,tableView:E,setTableView:R}=y,_=r.data??{},j=me=>{R(me),s(0),f(null),g(!1)},A=m.jsx(bA,{value:E,onChange:j}),L=xA(y),M=v==="idle",K=!!v&&v!=="running"&&v!=="idle",X=!L&&!M&&!K,U=Ir(),[le]=C_(),ye=le.get("table"),q=vA(_,ye),ee=Ta({requestKey:`${x}:rows:${E}:${q}:${i}:${p}`,enabled:!!q&&X,load:me=>S.request(`/_admin/data/${encodeURIComponent(q)}?${new URLSearchParams({limit:String(p),offset:String(i*p),...E==="all"?{view:"all"}:{}})}`,S0,{signal:me})}),ie=Mf("data",q,ee),oe=((bt=ee.data)==null?void 0:bt.data)??[],he=((jn=ee.data)==null?void 0:jn.total)??0,O=X?r.loading?"loading":r.error?Mv(r.error):r.data?Object.keys(_).length?"success":"empty":"idle":"idle",G=!q||!X?"idle":ee.loading?"loading":ee.error?Mv(ee.error):he?"success":"empty",ae=X&&O==="success"?Object.keys(_).length:0,ve=X&&G==="success"&&he>0,ne=ee.refresh,k=r.refresh;w.useEffect(()=>{s(0),f(null),g(!1)},[q]),w.useEffect(()=>{if(r.data&&ye&&!q){const me=new URLSearchParams(le.toString());me.delete("table"),me.delete("fkHighlight"),U(me.size?`?${me}`:"?",{replace:!0})}},[r.data,ye,q,le,U]);const P=w.useCallback(me=>{const Te=new URLSearchParams(le.toString());Te.set("table",me),U(`?${Te}`,{replace:!0}),s(0)},[U,le]),$=w.useCallback(()=>{const me=new URLSearchParams(le.toString());me.delete("table"),me.delete("fkHighlight"),U(`?${me}`,{replace:!0}),f(null)},[U,le]);w.useEffect(()=>{var aa,Vt;if(!X||((Vt=(aa=y.status.data)==null?void 0:aa.capabilities)==null?void 0:Vt.realtime)===!1)return;const me=C.replace(/^http/,"ws")+"/ws";let Te,We,Ht=!0;function Mt(){Ht&&(Te=new WebSocket(me),Te.onmessage=la=>{if(Ht)try{const pt=JSON.parse(la.data);if(!pt||typeof pt!="object")return;const Nt=pt,wt=Nt.type==="invalidate"&&Array.isArray(Nt.queries)?Nt.queries:Nt.type==="query:updated"?[Nt.query]:[];q&&wt.some(Vl=>typeof Vl=="string"&&Vl.includes(q))&&ne()}catch{}},Te.onclose=()=>{Ht&&(We=setTimeout(Mt,3e3))})}return Mt(),()=>{Ht=!1,We&&clearTimeout(We),Te==null||Te.close()}},[C,X,q,ne,(Hl=(xt=y.status.data)==null?void 0:xt.capabilities)==null?void 0:Hl.realtime]);const W=q?_[q]||[]:[],V=J0(W),Z=ie.blocked||V||!X||!!(r.error||ee.error)||r.loading||ee.loading||!ee.data,se=O==="loading",fe=G==="loading",te=O==="unavailable",pe=O==="error",$e=G==="unavailable",Ge=G==="error",Fn=K&&!L,gt=!!q&&K&&!L,cl=eb({t:l,isRuntimeWaking:M,showRowRuntimeBlocked:gt,rowsUnavailable:$e,rowsError:Ge}),ka=wA({t:l,isRuntimeWaking:M,showRowRuntimeBlocked:gt,rowsUnavailable:$e,rowsError:Ge,rowLoading:fe,totalRows:he,page:i,limit:p}),ta=w.useMemo(()=>W.map(me=>({accessorKey:me.column,header:me.column,minWidth:me.type.includes("timestamp")?200:100,maxWidth:me.type.includes("text")?300:250,headerTooltip:me.references?`${me.column} (${me.type}) → ${me.references.table}.${me.references.column}`:`${me.column} (${me.type})${me.nullable?` | ${l("data.nullable")}`:""}`,cellClassName:Te=>me.column==="id"?"text-indigo-400 font-mono text-[11px]":me.references&&Te!==null&&Te!==void 0?"text-violet-400 cursor-pointer underline decoration-violet-400/30":Te==null?"text-muted-foreground italic":typeof Te=="boolean"?Te?"text-green-500":"text-red-500":"",cell:me.type.includes("timestamp")?Te=>{const We=Te.getValue();return We==null?m.jsx("span",{className:"text-muted-foreground italic",children:"null"}):m.jsx("span",{children:Ll(We,t)})}:void 0})),[W,t,l]),dl=w.useCallback(me=>{g(!1);const Te=Ui(me,W);f(We=>We&&Ui(We,W)===Te?null:me)},[W]),Bt=w.useCallback((me,Te,We)=>{const Ht=W.find(Mt=>Mt.column===Te);if(Ht!=null&&Ht.references&&me[Te]!==null&&me[Te]!==void 0){We.stopPropagation();const Mt=Ht.references.table,aa=String(me[Te]),Vt=new URLSearchParams(le.toString());Vt.set("table",Mt),Vt.set("fkHighlight",aa),U(`?${Vt.toString()}`,{replace:!1}),s(0)}},[W,U,le]),na=le.get("fkHighlight");w.useEffect(()=>{if(na&&oe.length>0){const me=oe.find(Te=>String(Te.id)===na);if(me){f(me);const Te=new URLSearchParams(le.toString());Te.delete("fkHighlight"),U(`?${Te.toString()}`,{replace:!0})}}},[na,oe]),w.useEffect(()=>{if(u&&oe.length>0){const me=Ui(u,W),Te=oe.find(We=>Ui(We,W)===me);f(Te||null)}},[oe]);const Da=Math.ceil(he/p);return q?m.jsxs("div",{className:"flex h-full flex-col",children:[m.jsxs("div",{className:"flex min-h-12 flex-wrap items-center justify-between gap-x-3 gap-y-2 border-b border-border bg-background px-4 py-2",children:[m.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-3",children:[m.jsxs(we,{variant:"ghost",size:"sm",onClick:$,className:"gap-1.5 text-muted-foreground hover:text-foreground",children:[m.jsx(Ds,{className:"h-3.5 w-3.5"}),l("data.allTables")]}),m.jsx("div",{className:"w-px h-5 bg-border"}),m.jsx(YC,{selectedTable:q,tables:_,formatColumnCount:me=>l("data.colsCount",{count:me}),onSelectTable:P}),ve&&m.jsx(Ze,{variant:"outline",className:"text-xs border-border text-muted-foreground",children:l("data.rowsCount",{count:he})})]}),m.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[A,m.jsx(we,{size:"sm",disabled:Z,onClick:()=>{f(null),g(!0)},children:l("row.add")}),m.jsx(we,{variant:"ghost",size:"sm",onClick:ie.refresh,"aria-label":l("common.refresh"),disabled:fe,className:"text-muted-foreground hover:text-foreground",children:m.jsx(ol,{className:_e("h-3.5 w-3.5",fe&&"animate-spin")})})]})]}),W.some(me=>"readOnly"in me&&me.readOnly===!0)&&m.jsx("p",{className:"border-b border-border px-4 py-2 text-sm text-muted-foreground",children:l("data.protectedReadOnly")}),m.jsx(st,{stale:r.stale||ee.stale,error:ie.error??r.error??ee.error}),m.jsxs("div",{className:"flex-1 min-h-0 relative overflow-hidden",children:[m.jsx(g0,{data:oe,columns:ta,loading:fe,emptyMessage:cl,onRowClick:dl,onCellClick:Bt}),h&&q&&m.jsx(Wd,{children:m.jsx(yA,{tableName:q,columns:W,disabled:Z,onCancel:()=>g(!1),onCreated:()=>{g(!1),ne()}},`${x}:${q}`)}),u&&m.jsx(Wd,{children:m.jsx(W0,{row:u,columns:W,tableName:q,allTables:_,onClose:()=>f(null),onDataChanged:ne,readOnly:Z,onNavigateToTable:(me,Te)=>{f(null);const We=new URLSearchParams(le.toString());We.set("table",me),Te&&We.set("fkHighlight",Te),U(`?${We.toString()}`,{replace:!1}),s(0)}},`${x}:${q}:${Ui(u,W)}`)})]}),m.jsxs("div",{className:"flex items-center justify-between border-t border-border px-4 py-2 bg-background",children:[m.jsx("span",{className:"text-xs text-muted-foreground",children:ka}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("span",{className:"text-xs text-muted-foreground",children:l("data.pageOf",{page:i+1,total:Math.max(Da,1)})}),m.jsxs("div",{className:"flex gap-1",children:[m.jsx(we,{variant:"outline",size:"icon",className:"h-7 w-7 border-border",disabled:i===0||fe||!X,onClick:()=>s(me=>me-1),children:m.jsx(Iy,{className:"h-3.5 w-3.5"})}),m.jsx(we,{variant:"outline",size:"icon",className:"h-7 w-7 border-border",disabled:i+1>=Da||fe||!X,onClick:()=>s(me=>me+1),children:m.jsx($i,{className:"h-3.5 w-3.5"})})]})]})]})]}):m.jsxs(m.Fragment,{children:[m.jsx(st,{stale:r.stale,error:r.error}),m.jsx(IC,{viewSelector:A,tables:_,tableLoading:se,staticOnly:L,isRuntimeWaking:M,tableUnavailable:te,tableError:pe,showGridRuntimeBlocked:Fn,showTableCount:ae,onRefresh:k,onSelectTable:P})]})}function EA(t){try{return{ok:!0,value:JSON.parse(t)}}catch{return{ok:!1,error:"Invalid JSON"}}}function Ii(t){if(t===void 0)return[];if(!Array.isArray(t)||t.some(l=>typeof l!="string"||!l.trim()))throw new Error("Invalid function names");return t}function CA(t){if(typeof t=="string"){if(!t.trim())throw new Error("Invalid mutation name");return{name:t,invalidates:[],transport:"legacy"}}if(!t||typeof t!="object")throw new Error("Invalid function mutation");const l=t;if(typeof l.name!="string"||!l.name.trim())throw new Error("Invalid function mutation");if(l.isPublic!==void 0&&typeof l.isPublic!="boolean")throw new Error("Invalid mutation permission");return{name:l.name,invalidates:Ii(l.invalidates),transport:"legacy",...l.isPublic===!0?{isPublic:!0}:{}}}function RA(t){const l=Ae(t);if(!Array.isArray(l.queries)||!Array.isArray(l.mutations))throw new Error("Invalid function inventory");const r=[...Ii(l.queries).map(u=>({key:u,transport:"legacy"})),...Ii(l.procedureQueries).map(u=>({key:u,transport:"procedure"}))],i=Array.isArray(l.mutations)?l.mutations.map(CA).filter(u=>u!==null):[],s=Ii(l.procedureMutations).map(u=>({name:u,invalidates:[],transport:"procedure"}));return{queries:r,mutations:[...i,...s]}}function NA(t){const l=Ae(t);if(typeof l.key!="string"||!l.key.trim())throw new Error("Invalid operation name");if(l.kind!=="query"&&l.kind!=="mutation")throw new Error("Unsupported operation kind");if(l.transport!=="legacy"&&l.transport!=="procedure")throw new Error("Unsupported operation transport");for(const r of["allowAnonymous","hasInputSchema","hasOutputSchema"])if(l[r]!==void 0&&typeof l[r]!="boolean")throw new Error("Invalid operation flag");for(const r of["argsType","outputType"])if(l[r]!==void 0&&typeof l[r]!="string")throw new Error("Invalid operation type");return{id:JSON.stringify([l.transport,l.kind,l.key]),visibility:l.allowAnonymous===!0?"public":"private",key:l.key,kind:l.kind,transport:l.transport,allowAnonymous:l.allowAnonymous===!0,invalidates:Ii(l.invalidates),argsType:typeof l.argsType=="string"?l.argsType:"Record<string, unknown>",outputType:typeof l.outputType=="string"?l.outputType:"unknown",hasInputSchema:l.hasInputSchema===!0,hasOutputSchema:l.hasOutputSchema===!0,...l.inputSchema!==void 0?{inputSchema:l.inputSchema}:{},...l.outputSchema!==void 0?{outputSchema:l.outputSchema}:{}}}function _A(t){const l=Ae(t);if(!Array.isArray(l.operations))throw new Error("Invalid operation descriptors");const r=l.operations.map(NA);if(new Set(r.map(i=>i.id)).size!==r.length)throw new Error("Duplicate operation identity");return r}function AA(t){const l=RA(t);return[...l.queries.map(r=>({id:JSON.stringify([r.transport,"query",r.key]),visibility:"private",key:r.key,kind:"query",transport:r.transport,allowAnonymous:!1,argsType:"Record<string, unknown>",outputType:"unknown",hasInputSchema:!1,hasOutputSchema:!1})),...l.mutations.map(r=>({id:JSON.stringify([r.transport,"mutation",r.name]),visibility:r.isPublic===!0?"public":"private",key:r.name,kind:"mutation",transport:r.transport,allowAnonymous:r.isPublic===!0,invalidates:r.invalidates,argsType:"Record<string, unknown>",outputType:"unknown",hasInputSchema:!1,hasOutputSchema:!1}))]}var jA=function(t,l,r,i){if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof l=="function"?t!==l||!i:!l.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?i:r==="a"?i.call(t):i?i.value:l.get(t)},of,tb;const Bs=16,Ov=2048,zv=64,sf="data",Ut={BIGINT:0,DATE:1,NAN:2,UNDEFINED:3,URL:4,REGEXP:5,SET:6,MAP:7};function Pi(t,l){return Object.prototype.hasOwnProperty.call(t,l)}function Of(t){return typeof t=="object"&&t!==null}function TA(t){return!Of(t)||!Pi(t,"json")?!1:Pi(t,"meta")?t.meta===void 0||Array.isArray(t.meta):!0}function kA(t){const l={};for(const[r,i]of t.entries()){if(!Pi(l,r)){l[r]=i;continue}const s=l[r];l[r]=Array.isArray(s)?[...s,i]:[s,i]}return l}class qt extends Error{constructor(l){super(l),this.status=400,this.code="RPC_DECODE_ERROR",this.name="ProcedureRpcDecodeError"}}class DA{serialize(l,r=[],i=[],s=[],u=[]){if(typeof FormData<"u"&&l instanceof FormData)return this.serialize(kA(l),r,i,s,u);if(l instanceof Blob)return s.push(r),u.push(l),[null,i,s,u];if(typeof l=="bigint")return i.push([Ut.BIGINT,...r]),[l.toString(),i,s,u];if(l instanceof Date)return i.push([Ut.DATE,...r]),[Number.isNaN(l.getTime())?null:l.toISOString(),i,s,u];if(Number.isNaN(l))return i.push([Ut.NAN,...r]),[null,i,s,u];if(l instanceof URL)return i.push([Ut.URL,...r]),[l.toString(),i,s,u];if(l instanceof RegExp)return i.push([Ut.REGEXP,...r]),[l.toString(),i,s,u];if(l instanceof Set){const f=this.serialize(Array.from(l),r,i,s,u);return i.push([Ut.SET,...r]),f}if(l instanceof Map){const f=this.serialize(Array.from(l.entries()),r,i,s,u);return i.push([Ut.MAP,...r]),f}if(Array.isArray(l))return[l.map((h,g)=>h===void 0?(i.push([Ut.UNDEFINED,...r,g]),null):this.serialize(h,[...r,g],i,s,u)[0]),i,s,u];if(Of(l)){const f={};for(const h in l)h==="toJSON"&&typeof l[h]=="function"||(f[h]=this.serialize(l[h],[...r,h],i,s,u)[0]);return[f,i,s,u]}return[l,i,s,u]}deserialize(l,r,i,s){if(r.length>Ov)throw new qt(`RPC payload meta exceeds maximum item count (${Ov}).`);const u={data:l};if(i&&s){if(i.length>Bs)throw new qt(`RPC payload exceeds maximum blob count (${Bs}).`);i.forEach((f,h)=>{let g=u,p="data";for(const y of f)if(g=g[p],p=y,!Pi(g,p))throw new qt(`Invalid RPC payload path during blob deserialization. Path segment: ${String(p)}`);g[p]=s(h)})}for(const f of r){if(f.length-1>zv)throw new qt(`RPC payload meta path exceeds maximum depth (${zv}).`);const h=f[0];let g=u,p="data";for(let y=1;y<f.length;y++)if(g=g[p],p=f[y],!Pi(g,p))throw new qt(`Invalid RPC payload path during deserialization. Path segment: ${String(p)}`);switch(h){case Ut.BIGINT:g[p]=BigInt(g[p]);break;case Ut.DATE:g[p]=new Date(g[p]??"Invalid Date");break;case Ut.NAN:g[p]=Number.NaN;break;case Ut.UNDEFINED:g[p]=void 0;break;case Ut.URL:g[p]=new URL(g[p]);break;case Ut.REGEXP:{const y=g[p];if(typeof y!="string")throw new qt("Invalid RPC payload for RegExp deserialization.");const v=y.match(/^\/(.*)\/([a-z]*)$/);if(!v)throw new qt("Invalid RPC payload for RegExp deserialization.");const[,C,x]=v;g[p]=new RegExp(C,x);break}case Ut.SET:g[p]=new Set(g[p]);break;case Ut.MAP:g[p]=new Map(g[p]);break}}return u.data}}class MA{constructor(l={}){of.add(this),this.serializer=new DA}decodeWirePayload(l){return l instanceof FormData?jA(this,of,"m",tb).call(this,l):TA(l)?this.serializer.deserialize(l.json,l.meta??[]):l}encodeWirePayload(l){const[r,i,s,u]=this.serializer.serialize(l);return{json:r,meta:i.length>0?i:void 0}}encodeProcedureCall(l){const[r,i,s,u]=this.serializer.serialize(l);if(u.length===0)return{json:r,meta:i.length>0?i:void 0};if(u.length>Bs)throw new qt(`RPC payload exceeds maximum blob count (${Bs}).`);const f=new FormData;return f.set(sf,JSON.stringify({json:r,meta:i.length>0?i:void 0,maps:s})),u.forEach((h,g)=>{f.set(String(g),h)}),f}decodeProcedureRpcBody(l){const r=this.decodeWirePayload(l);return Of(r)?{name:r.name,args:r.args}:{name:void 0,args:void 0}}decodeProcedureMultipart(l){return this.decodeProcedureRpcBody(l)}}of=new WeakSet,tb=function(l){const r=l.get(sf);if(r===null)throw l.has("_mutation")?new qt('Legacy multipart layout is not supported for procedure RPC. Use the "data" field envelope.'):new qt('Missing required multipart field "data".');if(typeof r!="string")throw new qt('Multipart field "data" must be a JSON string.');let i;try{i=JSON.parse(r)}catch{throw new qt('Invalid JSON in multipart field "data".')}const s=i.maps??[];if(!Array.isArray(s))throw new qt('Multipart field "data" must include a "maps" array.');const u=new Set([sf]);for(let f=0;f<s.length;f++)u.add(String(f));for(const f of l.keys())if(!u.has(f))throw new qt(`Unexpected multipart field "${f}".`);for(let f=0;f<s.length;f++){const h=l.get(String(f));if(h===null||!(h instanceof Blob))throw new qt(`Missing blob part "${f}".`)}return this.serializer.deserialize(i.json,i.meta??[],s,f=>l.get(String(f)))};const zd=new MA;function Ld(t,l){return new Fe({code:t,stage:"functions-input",stateImpact:"unchanged",retryable:!1,nextAction:l})}function OA(t){return JSON.stringify(t,(l,r)=>typeof r=="bigint"?String(r):r,2)??"undefined"}async function zA({operation:t,client:l,sessionToken:r,inputValue:i,signal:s,now:u=()=>performance.now()}){if(typeof t.key!="string"||!t.key.trim()||!["query","mutation"].includes(t.kind)||!["legacy","procedure"].includes(t.transport))throw Ld("DASHBOARD_CAPABILITY_UNAVAILABLE","Select a supported operation from a verified inventory.");const f=r==null?void 0:r.trim();if(t.allowAnonymous!==!0&&!f)throw Ld("DASHBOARD_AUTH_REQUIRED","Provide a current tenant app session token before running this operation.");const h=u();let g;const p=f?{Authorization:`Bearer ${f}`}:{};try{if(t.transport==="legacy")p["Content-Type"]="application/json",g=JSON.stringify({name:t.key,args:i});else{const y=t.kind==="query"?zd.encodeWirePayload({name:t.key,args:i}):zd.encodeProcedureCall({name:t.key,args:i});y instanceof FormData?g=y:(p["Content-Type"]="application/json",g=JSON.stringify(y))}}catch{throw Ld("DASHBOARD_INVALID_INPUT","Use input supported by this operation's procedure transport.")}return l.request(t.kind==="query"?"/api/query":"/api/mutation",(y,v)=>({status:"success",outputText:OA(t.transport==="procedure"?zd.decodeWirePayload(y):y),duration:Math.round(u()-h),httpStatus:v}),{method:"POST",stateful:t.kind==="mutation",headers:p,body:g,signal:s})}function LA({operation:t,jsonDraft:l,jsonError:r,sessionToken:i,showToken:s,result:u,onClose:f,onJsonDraftChange:h,onSessionTokenChange:g,onShowTokenChange:p,onExecute:y,disabled:v,feedback:C}){const x=Oe(),S=!t.allowAnonymous&&i.trim().length===0;return m.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[m.jsxs("div",{className:"flex h-12 items-center justify-between border-b border-border bg-background px-4",children:[m.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.kind==="query"?m.jsx(zl,{className:"h-4 w-4 shrink-0 text-blue-500"}):m.jsx(Gs,{className:"h-4 w-4 shrink-0 text-orange-500"}),m.jsx("span",{className:"truncate font-mono text-sm font-medium",children:t.key}),m.jsx(v0,{operation:t})]}),m.jsx(we,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:f,children:m.jsx(Ki,{className:"h-4 w-4"})})]}),C,m.jsxs("div",{className:"flex-1 space-y-5 overflow-auto p-4",children:[m.jsxs("section",{className:"space-y-3",children:[m.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[m.jsxs("div",{className:"rounded-md border border-border bg-muted/20 p-3",children:[m.jsx("div",{className:"mb-1 text-[11px] font-medium uppercase text-muted-foreground",children:t.hasInputSchema?x("functions.inputSchema"):x("functions.inputType")}),m.jsx("div",{className:"break-all font-mono text-xs text-foreground",children:t.argsType})]}),m.jsxs("div",{className:"rounded-md border border-border bg-muted/20 p-3",children:[m.jsx("div",{className:"mb-1 text-[11px] font-medium uppercase text-muted-foreground",children:t.hasOutputSchema?x("functions.outputSchema"):x("functions.outputType")}),m.jsx("div",{className:"break-all font-mono text-xs text-foreground",children:t.outputType})]})]}),t.kind==="mutation"&&t.invalidates&&t.invalidates.length>0&&m.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[m.jsx("span",{children:x("functions.invalidates")}),t.invalidates.map(E=>m.jsx(Ze,{variant:"secondary",className:"font-mono text-[10px]",children:E},E))]})]}),m.jsxs("section",{className:"space-y-2",children:[m.jsx("label",{className:"block text-xs font-medium text-muted-foreground",children:x("functions.sessionToken")}),m.jsxs("div",{className:"flex gap-2",children:[m.jsx(p0,{"aria-label":x("functions.sessionToken"),type:s?"text":"password",value:i,onChange:E=>g(E.currentTarget.value),autoComplete:"off",spellCheck:!1}),m.jsx(we,{type:"button",variant:"outline",size:"sm",className:"h-9 w-9 p-0",onClick:()=>p(!s),title:x(s?"functions.hideToken":"functions.showToken"),children:s?m.jsx(Fy,{className:"h-4 w-4"}):m.jsx(qy,{className:"h-4 w-4"})}),i.length>0&&m.jsx(we,{type:"button",variant:"ghost",size:"sm",onClick:()=>g(""),children:x("functions.clear")})]}),m.jsx("div",{className:_e("text-xs",S?"text-amber-300":"text-muted-foreground"),children:x(S?"functions.privateTokenRequired":"functions.publicTokenHint")})]}),m.jsx(tR,{jsonDraft:l,jsonError:r,onJsonDraftChange:h}),m.jsxs(we,{onClick:y,disabled:v||u.status==="loading"||S,className:"gap-2",children:[u.status==="loading"?m.jsx(xf,{className:"h-4 w-4 animate-spin"}):m.jsx(Py,{className:"h-4 w-4"}),t.kind==="query"?x("functions.runQuery"):x("functions.runMutation")]}),m.jsx(aR,{result:u,outputType:t.outputType,hasOutputSchema:t.hasOutputSchema})]})]})}function UA({operation:t,sessionToken:l,onSessionTokenChange:r,disabled:i,onClose:s}){const u=Oe(),{client:f}=Dt(),h=Js(),[g,p]=w.useState("{}"),[y,v]=w.useState(),[C,x]=w.useState(!1),[S,E]=w.useState({status:"idle"}),R=y??h.error,_=async()=>{if(i)return;const A=EA(g);if(!A.ok){v(new Fe({code:"DASHBOARD_INVALID_INPUT",stage:"functions-input",stateImpact:"unchanged",retryable:!1,nextAction:u("functions.fixInput")})),E({status:"error",error:u("functions.invalidJson")});return}v(void 0),await h.run(L=>zA({operation:t,client:f,sessionToken:l,inputValue:A.value,signal:L}),L=>{E(L),Bn.success(u("functions.completed",{name:t.key,duration:L.duration??0}))})},j=h.busy?{status:"loading"}:R?{status:"error",error:R.diagnostic.code,httpStatus:R.diagnostic.httpStatus}:S;return m.jsx(LA,{operation:t,jsonDraft:g,jsonError:y?u("functions.invalidJson"):void 0,sessionToken:l,showToken:C,result:j,disabled:i,feedback:m.jsx(st,{error:R}),onClose:s,onJsonDraftChange:A=>{p(A),v(void 0),h.clearError()},onSessionTokenChange:r,onShowTokenChange:x,onExecute:_})}function BA(){const t=Oe(),{client:l,targetId:r,appStatus:i,backendStatus:s,hasStatic:u,staticOnly:f}=Dt(),h=s!==void 0?s==="none"&&!!u:!!f,g=i!=="running"||s==="none"||h,[p,y]=w.useState(null),[v,C]=w.useState("card"),[x,S]=w.useState(""),E=Ta({requestKey:`${r}:functions`,enabled:!g,load:async A=>{try{return await l.request("/_admin/functions/details",_A,{signal:A})}catch(L){if(A.aborted||!(L instanceof Fe)||![404,501].includes(L.diagnostic.httpStatus??0))throw L;return l.request("/_admin/functions",AA,{signal:A})}}}),R=E.data??[],_=R.find(A=>A.id===p),j=g?m.jsxs("div",{className:"flex h-full flex-col items-center justify-center p-8 text-center",children:[h?m.jsx(Gy,{className:"mb-4 h-12 w-12 text-cyan-500/30"}):m.jsx(zl,{className:"mb-4 h-12 w-12 text-amber-500/30"}),m.jsx("h3",{className:"mb-1 text-lg font-medium",children:t(h?"app.common.staticHosting":"app.common.appNotRunning")}),m.jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:t(h?"functions.staticOnlyBody":"functions.appNotRunningBody")})]}):E.data&&!E.error?m.jsxs("div",{className:"flex h-full flex-col items-center justify-center p-8 text-center",children:[m.jsx(zl,{className:"mb-4 h-12 w-12 text-muted-foreground/30"}),m.jsx("h3",{className:"mb-1 text-lg font-medium",children:t("functions.emptyTitle")}),m.jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:t("functions.emptyBody",{dir:"gencow/"})})]}):null;return m.jsxs("div",{className:"flex h-full min-w-0 flex-col md:flex-row",children:[m.jsxs("div",{className:_?"flex min-w-0 shrink-0 flex-col border-r border-border md:w-[320px]":"flex w-full min-w-0 flex-col",children:[m.jsx(st,{error:E.error,stale:E.stale}),m.jsx(we,{variant:"ghost",size:"sm","aria-label":t("common.refresh"),disabled:g||E.loading,onClick:E.refresh,children:m.jsx(ol,{className:"h-3.5 w-3.5"})}),m.jsx(nR,{operations:R,selectedId:p,viewMode:v,loading:E.loading&&!E.data,showCount:!!E.data,emptyState:j,onSelect:A=>y(A.id),onViewModeChange:C})]}),_&&!g&&m.jsx(UA,{operation:_,sessionToken:x,onSessionTokenChange:S,disabled:!!E.error||E.loading,onClose:()=>y(null)},_.id)]})}function nb(t){if(!t||typeof t!="object"||Array.isArray(t))throw new Error("Invalid log entry");const l=t;if(!Number.isSafeInteger(l.id)||l.id<0||typeof l.timestamp!="string"||!Number.isFinite(Date.parse(l.timestamp))||typeof l.level!="string"||!["info","warn","error"].includes(l.level)||typeof l.message!="string"||l.source!==void 0&&typeof l.source!="string"||l.verbose!==void 0&&typeof l.verbose!="boolean")throw new Error("Invalid log entry");return{id:l.id,timestamp:l.timestamp,level:l.level,message:l.message,...l.source!==void 0?{source:l.source}:{},...l.verbose!==void 0?{verbose:l.verbose}:{}}}function ab(t){if(!Array.isArray(t))throw new Error("Invalid log history");return t.map(nb).reverse()}function HA(t){const l=JSON.parse(t);if(!l||typeof l!="object"||Array.isArray(l))throw new Error("Invalid log frame");const r=l;if(typeof r.type!="string")throw new Error("Invalid log frame");return r.type!=="log:entry"?null:nb(r.data??r)}function Ts(t,l){const r=new Map;for(const i of[...t,...l])r.set(JSON.stringify([i.timestamp,i.id]),i);return[...r.values()].sort((i,s)=>Date.parse(i.timestamp)-Date.parse(s.timestamp)||i.id-s.id).slice(-500)}const VA=["/_admin/status","/_admin/logs","/_admin/tables","/_admin/functions","/_admin/files","/_admin/scheduler","/_admin/env","GET /favicon.ico"];function IA(t){const l=t.replace(/\x1b\[[0-9;]*m/g,"");return VA.some(r=>l.includes(r))}function FA(t){if(!Array.isArray(t)||t.length>500)throw Error("Unbounded Runtime log history");const l=ab(t),r=new TextEncoder;if(l.some(i=>r.encode(i.message).byteLength>2048))throw Error("Unbounded Runtime log message");return l}function qA(){return new Fe({code:"DASHBOARD_NETWORK_ERROR",stage:"logs-poll",capability:"logs",stateImpact:"unchanged",retryable:!0,nextAction:"Refresh logs after checking that the Runtime is reachable."})}function $A({client:t,targetId:l,level:r,showVerbose:i,enabled:s}){const u=JSON.stringify([l,r,i]),f=w.useRef({targetId:l,terminal:!1,error:void 0});f.current.targetId!==l&&(f.current={targetId:l,terminal:!1,error:void 0});const h=w.useRef(u);h.current=u;const[g,p]=w.useState({key:u,loading:s,pollingState:"paused"}),y=w.useRef(g);y.current=g;const[v,C]=w.useState(0),x=w.useCallback(()=>{f.current.terminal=!1,f.current.error=void 0,C(E=>E+1)},[]);w.useEffect(()=>{if(!s)return;let E=!0;const R=f.current;let _=y.current.key===u?y.current.data:void 0,j,A;const L=()=>E&&h.current===u&&f.current===R,M=()=>document.visibilityState==="visible",K=ye=>{L()&&p(q=>({...q,key:u,...ye}))},X=()=>{A!==void 0&&clearInterval(A),A=void 0},U=async()=>{if(!L()||j||R.terminal||!M())return;const ye=new AbortController;j=ye,K({data:_,loading:!0,pollingState:"polling"});const q=new URLSearchParams({limit:"200",level:r});i&&q.set("verbose","1");try{const ee=await t.request("/_admin/logs?"+q.toString(),FA,{signal:ye.signal});if(!L()||ye.signal.aborted||!M())return;_=Ts(_??[],ee),K({data:_,loading:!1,error:void 0})}catch(ee){if(!L()||ye.signal.aborted||Un(ee))return;const ie=ee instanceof Fe?ee:qA();R.terminal=[401,403,404,501].includes(ie.diagnostic.httpStatus??0)||ie.diagnostic.code==="DASHBOARD_CAPABILITY_UNAVAILABLE",R.terminal&&(R.error=ie,X()),K({data:_,error:ie,loading:!1,pollingState:R.terminal?"stopped":"polling"})}finally{j===ye&&(j=void 0)}},le=()=>{if(L()){if(!M()||R.terminal){X(),j==null||j.abort(),j=void 0,K({loading:!1,pollingState:R.terminal?"stopped":"paused"});return}A===void 0&&(A=setInterval(()=>{U()},2e3)),K({pollingState:"polling"}),U()}};return K({data:_,loading:!1,error:R.error,pollingState:"paused"}),document.addEventListener("visibilitychange",le),le(),()=>{E=!1,j==null||j.abort(),X(),document.removeEventListener("visibilitychange",le)}},[u,t,l,r,i,s,v]);const S=g.key===u&&s?g:{key:u,loading:!1,pollingState:"paused"};return{...S,connected:!1,streamError:void 0,stale:!!(S.error&&S.data!==void 0),refresh:x}}function Bi(t){return new Fe({code:t,stage:"logs-stream",capability:"logs",stateImpact:"unchanged",retryable:!0,nextAction:"Refresh logs after checking that the runtime is reachable."})}function GA(t){const l=t.transport==="poll",r=$A({...t,enabled:l&&t.enabled}),i=PA({...t,enabled:!l&&t.enabled});return l?r:{...i,pollingState:void 0}}function PA({client:t,apiBase:l,targetId:r,level:i,showVerbose:s,enabled:u}){const f=JSON.stringify([r,i,s]),[h,g]=w.useState({key:f,loading:u,connected:!1}),[p,y]=w.useState(0),v=w.useRef(f);v.current=f;const C=w.useRef(h);C.current=h;const x=w.useCallback(()=>y(E=>E+1),[]);w.useEffect(()=>{if(!u)return;let E=!0,R=!1,_=!1,j=C.current.key===f?C.current.data:void 0,A=[],L,M,K;const X=()=>E&&v.current===f,U=oe=>{X()&&g(he=>({...he,key:f,...oe}))},le=()=>{M!==void 0&&(clearTimeout(M),M=void 0);const oe=L;L=void 0,_=!1,oe==null||oe.close(),U({connected:!1})},ye=()=>{!X()||R||M!==void 0||(M=setTimeout(()=>{M=void 0,q()},3e3))},q=()=>{if(!X()||R||L||M!==void 0)return;let oe;try{const O=new URL(l+"/ws",window.location.origin);O.protocol=O.protocol==="https:"?"wss:":"ws:",oe=new WebSocket(O.toString()),L=oe}catch{U({streamError:Bi("DASHBOARD_NETWORK_ERROR")}),ye();return}const he=()=>X()&&L===oe;oe.onopen=()=>{if(he())try{oe.send(JSON.stringify({type:"log:subscribe"})),_=!0,U({connected:!0})}catch{U({streamError:Bi("DASHBOARD_NETWORK_ERROR")}),oe.close()}},oe.onmessage=O=>{if(he())try{const G=HA(String(O.data));if(!G||i!=="all"&&G.level!==i||!s&&G.verbose)return;A=Ts(A,[G]),j!==void 0&&(j=Ts(j,[G]),U({data:j,streamError:void 0}))}catch{U({streamError:Bi("DASHBOARD_INVALID_RESPONSE")})}},oe.onclose=()=>{he()&&(L=void 0,_=!1,U({connected:!1}),ye())},oe.onerror=()=>{he()&&(U({streamError:Bi("DASHBOARD_NETWORK_ERROR")}),oe.close())}},ee=async()=>{if(!X()||K||R)return;const oe=new AbortController;K=oe,U({data:j,loading:!0});const he=new URLSearchParams({limit:"200",level:i});s&&he.set("verbose","1");try{const O=await t.request("/_admin/logs?"+he.toString(),ab,{signal:oe.signal});if(!X()||oe.signal.aborted)return;j=Ts(O,A),U({data:j,error:void 0,loading:!1}),q()}catch(O){if(!X()||oe.signal.aborted||Un(O))return;const G=O instanceof Fe?O:Bi("DASHBOARD_NETWORK_ERROR");R=[401,403,404,501].includes(G.diagnostic.httpStatus??0),le(),U({data:j,error:G,loading:!1})}finally{K===oe&&(K=void 0)}};U({data:j,loading:!0,connected:!1,error:void 0,streamError:void 0}),q(),ee();const ie=setInterval(()=>{_||ee()},5e3);return()=>{E=!1,K==null||K.abort(),clearInterval(ie),le()}},[f,t,l,i,s,u,p]);const S=h.key===f&&u?h:{key:f,loading:u,connected:!1};return{...S,stale:!!(S.error&&S.data!==void 0),refresh:x}}function YA(){const{locale:t}=_n();return m.jsx("p",{className:"px-4 py-2 text-xs text-muted-foreground",children:t==="ko"?"로컬 Runtime 운영 로그 (앱 표준 출력 또는 Cloud 로그 아님)":"Local Runtime operational logs (not application stdout or Cloud logs)"})}function XA({state:t}){const{locale:l}=_n(),r=l==="ko"?{polling:"2초마다 폴링",paused:"화면이 숨겨져 폴링 일시 중지",stopped:"폴링 중지; 새로고침 필요"}:{polling:"Polling every 2 seconds",paused:"Polling paused while hidden",stopped:"Polling stopped; refresh required"};return m.jsx("span",{className:"text-[10px] text-muted-foreground",role:"status",children:r[t]})}function KA(){var U,le,ye,q,ee;const t=Oe(),{locale:l}=_n(),r=Dt(),{client:i,apiBase:s,targetId:u,appStatus:f,backendStatus:h,hasStatic:g,staticOnly:p}=r,y=h!==void 0?h==="none"&&!!g:!!p,v=f!=="running"||h==="none"||y,[C,x]=w.useState("all"),[S,E]=w.useState(!1),[R,_]=w.useState(!0),[j,A]=w.useState(!0),L=((U=r.status.data)==null?void 0:U.profile)==="local-runtime",M=GA({client:i,apiBase:s,targetId:u,level:C,showVerbose:S,transport:L?(ye=(le=r.status.data)==null?void 0:le.transports)==null?void 0:ye.logs:void 0,enabled:!v&&((ee=(q=r.status.data)==null?void 0:q.capabilities)==null?void 0:ee.logs)!==!1}),K=(M.data??[]).filter(ie=>(C==="all"||ie.level===C)&&(S||!ie.verbose)&&(!R||!IA(ie.message))).map(ie=>({...ie,id:JSON.stringify([ie.timestamp,ie.id]),timeLabel:t0(ie.timestamp,l,{timeStyle:"medium"})}));if(y)return m.jsxs("div",{className:"p-8 text-center",children:[m.jsx("h3",{children:t("app.common.staticHosting")}),m.jsx("p",{children:t("logs.staticOnlyBody")})]});if(v)return m.jsx("div",{className:"p-8 text-center",children:t("logs.unavailable")});const X=R&&!S?"logs.empty.systemVerboseHidden":R?"logs.empty.systemHidden":S?"logs.empty.default":"logs.empty.verboseHidden";return m.jsxs("div",{className:"flex h-full min-w-0 flex-col",children:[m.jsx(uR,{level:C,showVerbose:S,hideSystem:R,autoScroll:j,connected:M.connected,transportStatus:L?m.jsx(XA,{state:M.pollingState??"paused"}):void 0,loading:M.loading,count:M.data!==void 0?K.length:void 0,onLevelChange:x,onVerboseChange:E,onHideSystemChange:_,onAutoScrollChange:A,onRefresh:M.refresh}),L&&m.jsx(YA,{}),m.jsx(st,{error:M.error,stale:M.stale}),m.jsx(st,{error:M.streamError}),m.jsx(cR,{entries:K,autoScroll:j,loadingState:M.loading&&M.data===void 0?m.jsx("p",{children:t("common.loading")}):null,emptyState:!M.loading&&!M.error&&!M.streamError&&M.data!==void 0?m.jsx("p",{className:"py-8 text-center text-muted-foreground",children:t(X)}):null})]})}const QA=20,lb=[20,50,100],rb=t=>typeof t=="string"&&/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t);function il(t){const l=dn(t);if(!Number.isSafeInteger(l))throw new Error("Invalid count");return l}function zf(t){if(!rb(t))throw new Error("Invalid storage identity");return t}function ib(t){return Object.fromEntries(["url","download_url"].filter(l=>t[l]!==void 0).map(l=>[l,De(t[l])]))}function ZA(t){const l=Ae(t),r=il(l.id);if(r<1)throw new Error("Invalid file identity");const i=De(l.name);if(!i.trim())throw new Error("Invalid filename");if(typeof l.size!="number"&&typeof l.size!="string")throw new Error("Invalid size");const s=String(l.size);if(!s.trim()||!Number.isFinite(Number(s))||Number(s)<0)throw new Error("Invalid size");const u=De(l.created_at);if(!Number.isFinite(Date.parse(u)))throw new Error("Invalid date");if(l.visibility!==void 0&&!["private","public"].includes(De(l.visibility)))throw new Error("Invalid visibility");return{id:r,storage_id:zf(l.storage_id),name:i,size:s,type:De(l.type),uploaded_by:l.uploaded_by==null?null:De(l.uploaded_by),created_at:u,...l.visibility!==void 0?{visibility:l.visibility}:{},...ib(l)}}function JA(t){const l=Array.isArray(t)?void 0:Ae(t),r=Array.isArray(t)?t:Cn(l==null?void 0:l.files),i=[];let s=0;const u=new Set;for(const h of r)try{const g=ZA(h);if(u.has(g.storage_id))throw new Error("Duplicate file");u.add(g.storage_id),i.push(g)}catch{s++}const f=(l==null?void 0:l.nextCursor)??null;if(f!==null&&(typeof f!="string"||!f.trim()))throw new Error("Invalid cursor");return{files:i,invalidCount:s,nextCursor:f,...(l==null?void 0:l.total)!==void 0?{total:il(l.total)}:{}}}function ob(t){const l=Ae(t),r=(i,s)=>Object.fromEntries(Object.entries(Ae(i)).map(([u,f])=>{if(!s.includes(u))throw new Error("Invalid file preview breakdown");return[u,il(f)]}));return{count:il(l.count),totalBytes:dn(l.totalBytes),visibility:r(l.visibility,["private","public"]),typeFamily:r(l.typeFamily,["image","audio","video","document","archive","text","other"]),samples:Cn(l.samples).map(i=>{const s=Ae(i);return{storageId:zf(s.storageId),name:De(s.name),type:De(s.type),size:dn(s.size)}})}}function WA(t){const l=Ae(t);if(typeof l.success!="boolean")throw new Error("Invalid bulk result");const r={success:l.success,matched:il(l.matched),changed:il(l.changed),skipped:il(l.skipped),failed:il(l.failed)};if(r.success!==(r.failed===0)||r.changed+r.failed>r.matched||r.changed+r.skipped+r.failed<r.matched)throw new Error("Invalid bulk result");return r}function ej(t,l){const r=Ae(t);if(r.success!==!0||r.deleted!==l)throw new Error("Invalid delete acknowledgment");return!0}function tj(t,l,r){const i=Ae(t);if(i.success!==!0||i.storageId!==l||i.visibility!==r)throw new Error("Invalid visibility acknowledgment");return{visibility:r,...ib(i)}}function nj(t){const l=Ae(t),r=zf(l.storageId);if(!["private","public"].includes(De(l.visibility)))throw new Error("Invalid upload visibility");return De(l.name),De(l.type),dn(l.size),{storageId:r}}function aj(t,l,r){const i=new URLSearchParams({limit:String(l),includeTotal:"1"});return r&&i.set("cursor",r),t.visibility!=="all"&&i.set("visibility",t.visibility),t.typeFamily!=="all"&&i.set("typeFamily",t.typeFamily),t.q.trim()&&i.set("q",t.q.trim()),t.uploadedBy!=="all"&&i.set("uploadedBy",t.uploadedBy),"/_admin/files?"+i.toString()}function sb(t){const l=(t||"application/octet-stream").trim().toLowerCase();return l.startsWith("image/")?"image":l.startsWith("audio/")?"audio":l.startsWith("video/")?"video":l.startsWith("text/")?"text":l==="application/pdf"||l==="application/json"||l.includes("officedocument")||l==="application/msword"||l==="application/vnd.ms-excel"||l==="application/vnd.ms-powerpoint"||l.includes("hwp")?"document":l==="application/zip"||l.includes("gzip")||l.includes("tar")||l.includes("rar")||l.includes("7z")?"archive":"other"}function Hs(t,l){if(/[\x00-\x1f\x7f]/.test(l)||l.includes("\\"))throw new Error("Invalid storage URL");const r=new URL(t),i=r.pathname.replace(/\/$/,"");if(r.protocol!=="http:"&&r.protocol!=="https:")throw new Error("Invalid storage base");const s=!/^https?:\/\//i.test(l);if(s){const f=decodeURIComponent(l.split("?")[0]);if(!f.startsWith("/api/storage/")||f.includes("\\")||/[\x00-\x1f]/.test(f)||f.split("/").some(h=>h==="."||h===".."))throw new Error("Invalid storage path")}const u=new URL(s?r.toString().replace(/\/$/,"")+l:l);if(!["http:","https:"].includes(u.protocol)||u.username||u.password)throw new Error("Invalid storage URL");if(u.origin===r.origin){const f=i+"/api/storage/";if(!u.pathname.startsWith(f)){if(!s&&u.pathname.startsWith("/api/storage/"))return Hs(t,u.pathname+u.search);throw new Error("Storage URL outside app scope")}}return u.toString()}function lj(t,l){const r=JA(t),i=[];let s=r.invalidCount;for(const u of r.files)try{const f="/api/storage/"+encodeURIComponent(u.storage_id),h=Hs(l,u.url??f),g=Hs(l,u.download_url??u.url??f);i.push({...u,url:h,download_url:g})}catch{s++}return{...r,files:i,invalidCount:s}}function rj(t,l,r){const i=sb(t.type),s=t.visibility==="public";return{id:t.storage_id,name:t.name,identityLabel:t.storage_id.slice(0,8)+"...",type:t.type,typeLabel:r("files.type"+i[0].toUpperCase()+i.slice(1)),sizeLabel:Os(Number(t.size)),createdLabel:Ll(t.created_at,l),uploaderLabel:t.uploaded_by??"dashboard",visibilityPublic:s,visibilityLabel:r(s?"files.public":"files.private"),visibilityActionLabel:r(s?"files.makePrivate":"files.makePublic"),...s?{copyPublicUrlLabel:r("files.copyPublicUrl")}:{},...t.type.startsWith("image/")?{previewUrl:t.url}:{}}}function ij(t,l){const r=i=>l("files.type"+i[0].toUpperCase()+i.slice(1));return{count:t.count,totalBytesLabel:Os(t.totalBytes),visibility:Object.entries(t.visibility).filter(([,i])=>i>0).map(([i,s])=>({label:l(i==="public"?"files.public":"files.private"),count:s})),types:Object.entries(t.typeFamily).filter(([,i])=>i>0).map(([i,s])=>({label:r(i),count:s})),samples:t.samples.map(i=>({id:i.storageId,name:i.name,sizeLabel:Os(i.size)}))}}const uf="runtime-local-files-v1";function Ln(t,l=Number.MAX_SAFE_INTEGER){const r=dn(t);if(!Number.isSafeInteger(r)||r>l)throw new Error("Invalid Runtime Files count");return r}function Vs(t,l){const r=De(t);if(!r.trim()||r.length>l||/[\x00-\x1f]/u.test(r))throw new Error("Invalid Runtime Files metadata");return r}function Lf(t){if(!rb(t))throw new Error("Invalid Runtime storage identity");return t}function Is(t,l,r,i){Lf(r);const s=new URL(t);if(!["http:","https:"].includes(s.protocol)||s.username||s.password||s.pathname!=="/"||s.search||s.hash)throw new Error("Invalid local Runtime Files origin");const u=i==="content"?"/_admin/files/"+r+"/content":"/api/storage/"+r;if(l!==u&&l!==s.origin+u)throw new Error("Invalid scoped Runtime Files URL");return s.origin+u}function ub(t,l){const r=Ae(t),i=Lf(r.storage_id);if(r.visibility!=="private"&&r.visibility!=="public")throw new Error("Invalid Runtime file visibility");let s;if(r.created_at!==void 0&&(s=De(r.created_at),!Number.isFinite(Date.parse(s))||new Date(s).toISOString()!==s))throw new Error("Invalid Runtime file creation time");const u=r.uploaded_by;if(u!==void 0&&u!=="dashboard"&&u!=="cli"&&u!=="api")throw new Error("Invalid Runtime file source");return{format:uf,storage_id:i,name:Vs(r.name,1024),type:Vs(r.type,256),size:Ln(r.size),visibility:r.visibility,...s!==void 0?{created_at:s}:{},...u!==void 0?{uploaded_by:u}:{},url:Is(l,r.url,i,r.visibility==="public"?"public":"content"),download_url:Is(l,r.download_url,i,"content")}}function oj(t,l){const r=Ae(t);if(r.format!==uf)throw new Error("Missing Runtime Files variant");const i=Cn(r.files);if(i.length>100)throw new Error("Unbounded Runtime Files page");const s=i.map(h=>ub(h,l));if(new Set(s.map(h=>h.storage_id)).size!==s.length)throw new Error("Duplicate Runtime file");const u=r.nextCursor;if(u!==null&&(typeof u!="string"||!u.trim()||u.length>32768||/[\x00-\x1f]/u.test(u)))throw new Error("Invalid Runtime Files cursor");const f=r.total===void 0?void 0:Ln(r.total);if(f!==void 0&&f<s.length)throw new Error("Conflicting Runtime Files total");return{format:uf,files:s,invalidCount:0,nextCursor:u,...f!==void 0?{total:f}:{}}}function sj(t,l,r){const i=Ae(t),s=ub({...i,storage_id:i.storageId},l),u=r.type||"application/octet-stream",f=s.type===u||u==="text/plain"&&s.type==="text/plain;charset=utf-8";if(s.name!==r.name||s.size!==r.size||!f||s.visibility!=="private"||s.uploaded_by!=="dashboard"||!s.created_at)throw new Error("Invalid Runtime upload acknowledgement");return{storageId:s.storage_id}}function uj(t,l,r,i){const s=Ae(t);if(s.success!==!0||s.storageId!==Lf(r)||s.visibility!==i)throw new Error("Invalid Runtime visibility acknowledgement");return{visibility:i,url:Is(l,s.url,r,i==="public"?"public":"content"),download_url:Is(l,s.download_url,r,"content")}}function cj(t){const l=ob(t);Ln(l.count,1e3),Ln(l.totalBytes);for(const r of[l.visibility,l.typeFamily])if(Object.values(r).map(s=>Ln(s,1e3)).reduce((s,u)=>s+u,0)!==l.count)throw new Error("Conflicting Runtime Files preview counts");if(l.samples.length>Math.min(10,l.count)||new Set(l.samples.map(r=>r.storageId)).size!==l.samples.length)throw new Error("Invalid Runtime Files preview samples");for(const r of l.samples)Vs(r.name,1024),Vs(r.type,256),Ln(r.size);if(l.samples.reduce((r,i)=>r+i.size,0)>l.totalBytes)throw new Error("Conflicting Runtime Files preview size");return l}function dj(t){const l=Ae(t);if(typeof l.success!="boolean")throw new Error("Invalid Runtime Files acknowledgement");const r={success:l.success,matched:Ln(l.matched,1e3),changed:Ln(l.changed,1e3),skipped:Ln(l.skipped,1e3),failed:Ln(l.failed,1)};if(r.changed+r.skipped+r.failed!==r.matched||r.success!==(r.failed===0))throw new Error("Conflicting Runtime Files result counts");if(r.success){if(l.diagnostic!==void 0||l.notAttempted!==void 0)throw new Error("Conflicting successful Runtime Files acknowledgement");return r}if(r.notAttempted=Ln(l.notAttempted,1e3),r.notAttempted>r.skipped||r.matched===0)throw new Error("Conflicting Runtime unattempted targets");if(r.diagnostic=CR(l.diagnostic,{code:"RUNTIME_LOCAL_FILES_BULK_PARTIAL",capability:"storage"}),r.changed>0&&r.diagnostic.stateImpact==="unchanged")throw new Error("Conflicting Runtime Files partial effects");return r}function fj(t,l,r,i){if(!("format"in t))return rj(t,l,r);const s=sb(t.type),u=t.visibility==="public",f=l==="ko"?"알 수 없음":"Unknown";return{id:t.storage_id,name:t.name,identityLabel:t.storage_id.slice(0,8)+"...",type:t.type,typeLabel:r("files.type"+s[0].toUpperCase()+s.slice(1)),sizeLabel:Os(t.size),createdLabel:t.created_at?Ll(t.created_at,l):f,uploaderLabel:t.uploaded_by??f,visibilityPublic:u,visibilityLabel:r(u?"files.public":"files.private"),visibilityActionLabel:r(u?"files.makePrivate":"files.makePublic"),...u?{copyPublicUrlLabel:r("files.copyPublicUrl")}:{},...i?{previewUrl:i}:{}}}function mj(t,l,r){if(!r)return t;const i={"files.publicConfirm":"This file will be readable through this local application's public link. No Internet hosting is provided. Continue?","files.bulkPublicConfirm":"{count} selected file(s) will be readable through local public links. No Internet hosting is provided. Continue?","files.bulkPrivateConfirm":"Public links for {count} selected file(s) will be denied. Private preview/download uses this authorized local dashboard. Continue?","files.bulkDeleteWarning":"Delete removes objects and their metadata from selected local storage. This cannot be undone.","files.bulkPublicWarning":"These local public links provide no Internet hosting. Anyone able to reach this local application may read public files.","files.bulkPrivateWarning":"Public links are denied for private objects. Preview/download uses the authorized local dashboard."},s={"files.publicConfirm":"이 파일을 로컬 앱의 공개 링크로 읽을 수 있게 합니다. 인터넷 호스팅은 제공되지 않습니다. 계속할까요?","files.bulkPublicConfirm":"선택한 파일 {count}개를 로컬 공개 링크로 읽을 수 있게 합니다. 인터넷 호스팅은 제공되지 않습니다. 계속할까요?","files.bulkPrivateConfirm":"선택한 파일 {count}개의 공개 링크를 차단합니다. 비공개 미리보기와 다운로드는 이 로컬 대시보드를 사용합니다. 계속할까요?","files.bulkDeleteWarning":"선택한 로컬 저장소의 객체와 메타데이터를 삭제합니다. 되돌릴 수 없습니다.","files.bulkPublicWarning":"로컬 공개 링크는 인터넷 호스팅을 제공하지 않습니다. 이 로컬 앱에 접근할 수 있는 사람은 공개 파일을 읽을 수 있습니다.","files.bulkPrivateWarning":"비공개 객체의 공개 링크는 차단됩니다. 미리보기와 다운로드는 권한이 확인된 로컬 대시보드를 사용합니다."};return(u,f)=>{const h=(l==="ko"?s:i)[u];return h===void 0?t(u,f):h.replace(/\{([^}]+)\}/gu,(g,p)=>String((f==null?void 0:f[p])??""))}}function Lv(t){return t instanceof Fe?t:new Fe({code:"DASHBOARD_FILES_CONTENT_UNAVAILABLE",stage:"files-read",capability:"storage",stateImpact:"unchanged",retryable:!1,retryPrecondition:"Inspect current Files metadata and browser Blob/download availability.",nextAction:"Refresh Files and inspect the current object before previewing or downloading. No file changed."})}function hj(t,l,r,i=!0){var v,C;const s=i?r.filter(x=>"format"in x):[],u=JSON.stringify([l,i,s.map(x=>[x.storage_id,x.size,x.type,x.download_url])]),f=w.useRef(void 0),h=w.useRef({key:u,client:t});h.current={key:u,client:t};const g=x=>x.alive&&f.current===x&&x.key===h.current.key&&x.client===h.current.client,[p,y]=w.useState({key:u,urls:{}});return w.useEffect(()=>{const x={key:u,client:t,alive:!0,preview:new AbortController,downloads:new Set,urls:new Set,timers:new Set};f.current=x,y({key:u,urls:{}});const S=s.filter(_=>RR(_.type));let E=0;const R=async()=>{for(;x.alive&&!x.preview.signal.aborted&&E<S.length;){const _=S[E++];try{const j=await t.fileContent(_.storage_id,_,x.preview.signal);if(!g(x)||x.preview.signal.aborted)return;const A=URL.createObjectURL(j);x.urls.add(A),y(L=>L.key===u?{...L,urls:{...L.urls,[_.storage_id]:A}}:L)}catch(j){if(!g(x)||x.preview.signal.aborted||Un(j))return;y(A=>A.key===u?{...A,error:Lv(j)}:A),x.preview.abort();return}}};return R(),R(),()=>{x.alive=!1,x.preview.abort();for(const _ of x.downloads)_.abort();for(const _ of x.timers)clearTimeout(_);for(const _ of x.urls)URL.revokeObjectURL(_);x.urls.clear(),f.current===x&&(f.current=void 0)}},[t,u]),{previews:p.key===u&&((v=f.current)==null?void 0:v.client)===t?p.urls:{},error:p.key===u&&((C=f.current)==null?void 0:C.client)===t?p.error:void 0,async download(x){const S=f.current;if(!S||!g(S)||S.downloads.size>0||!s.includes(x))return;const E=new AbortController;S.downloads.add(E);let R;try{const _=await t.fileContent(x.storage_id,x,E.signal);if(!g(S)||E.signal.aborted)return;R=URL.createObjectURL(_);const j=R;S.urls.add(R);const A=document.createElement("a");A.href=R,A.download=x.name,A.rel="noopener noreferrer",A.click();const L=setTimeout(()=>{S.timers.delete(L),S.urls.delete(j)&&URL.revokeObjectURL(j)},1e3);S.timers.add(L)}catch(_){if(R&&S.urls.delete(R)&&URL.revokeObjectURL(R),!g(S)||E.signal.aborted||Un(_))return;y(j=>j.key===u?{...j,error:Lv(_)}:j)}finally{S.downloads.delete(E)}}}}const kr={cursor:null,page:1,history:[]};function gj({client:t,apiBase:l,filters:r,pageSize:i,runtime:s=!1}){const u=JSON.stringify([l,s,r,i]),[f,h]=w.useState({queryKey:u,page:kr}),g=f.queryKey===u?f.page:kr;w.useEffect(()=>{h(A=>A.queryKey===u?A:{queryKey:u,page:kr})},[u]);const[p,y]=w.useState(0),v=w.useRef(0),C=JSON.stringify([u,g.cursor,p]),x=w.useRef(C);x.current=C;const[S,E]=w.useState({committed:kr,loading:!0,requestKey:C,queryKey:u,version:0});w.useEffect(()=>{let A=!0;const L=new AbortController;return E(M=>({...M.queryKey===u?M:{committed:kr,version:M.version},queryKey:u,loading:!0,requestKey:C,error:void 0})),t.request(aj(r,i,g.cursor),M=>s?oj(M,l):lj(M,l),{signal:L.signal}).then(M=>{A&&!L.signal.aborted&&x.current===C&&E(K=>({data:M,committed:g,loading:!1,requestKey:C,queryKey:u,version:K.version+1}))}).catch(M=>{if(!A||L.signal.aborted||x.current!==C||Un(M))return;const K=M instanceof Fe?M:new Fe({code:"DASHBOARD_NETWORK_ERROR",stage:"files-read",stateImpact:"unchanged",retryable:!0,nextAction:"Refresh files after checking that the runtime is reachable."});E(X=>({...X,loading:!1,error:K,requestKey:C}))}),()=>{A=!1,L.abort()}},[t,l,s,r,i,g,C,u]);const R=w.useCallback(()=>{const A=++v.current;return y(A),JSON.stringify([u,g.cursor,A])},[u,g.cursor]),_=w.useCallback(A=>{h({queryKey:u,page:A}),y(++v.current)},[u]),j=S.queryKey!==u?{queryKey:u,requestKey:C,loading:!0,committed:kr,version:S.version,data:void 0,error:void 0}:S.requestKey===C?S:{...S,loading:!0,error:void 0};return{...j,requestKey:C,stale:!!(j.error&&j.data),refresh:R,goToPage:_}}function pj({client:t,apiBase:l,ready:r,t:i,onChanged:s}){var x;const u=((x=Dt().status.data)==null?void 0:x.profile)==="local-runtime",f=Js({surface:"files",resource:"catalog"}),h=r&&!f.error&&!f.blocked,g=(S,E)=>h?f.run(S,E):Promise.resolve(!1);return{...f,allowed:h,remove:S=>g(E=>t.request("/_admin/files/"+encodeURIComponent(S.storage_id),R=>ej(R,S.storage_id),{method:"DELETE",signal:E}),()=>{Bn.success(i("files.deleted")),s()}),visibility:S=>{const E=S.visibility==="public"?"private":"public";return!h||E==="public"&&!window.confirm(i("files.publicConfirm"))?Promise.resolve(!1):g(R=>t.request("/_admin/files/"+encodeURIComponent(S.storage_id)+"/visibility",_=>{if(u)return uj(_,l,S.storage_id,E);const j=tj(_,S.storage_id,E);for(const A of["url","download_url"])A in j&&Hs(l,String(j[A]));return j},{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({visibility:E}),signal:R}),()=>{Bn.success(i("files.visibilityUpdated")),s()})},bulk:(S,E,R)=>g(async _=>{const j=await t.request("/_admin/files/bulk",A=>u?dj(A):WA(A),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({target:S,action:E,...R!==void 0?{expectedCount:R}:{}}),signal:_});if(!j.success)throw"diagnostic"in j&&j.diagnostic?new Fe(j.diagnostic):new Fe({code:"DASHBOARD_FILES_PARTIAL",stage:"files-bulk",stateImpact:"unknown",retryable:!1,nextAction:i("files.bulkPartial",{changed:j.changed,failed:j.failed})+". Inspect current files and access before retrying; some targets may have changed."});return j},_=>{Bn.success(i("files.bulkComplete",{changed:_.changed})),s()}),upload:S=>S.length===0?Promise.resolve(!1):g(async E=>{let R=0;for(const _ of S){if(E.aborted)throw new DOMException("Cancelled","AbortError");const j=new FormData;j.append("file",_);try{await t.request("/_admin/files/upload",A=>u?sj(A,l,_):nj(A),{method:"POST",body:j,signal:E}),R++}catch(A){throw E.aborted?A:A instanceof Fe?new Fe({...A.diagnostic,stateImpact:A.diagnostic.stateImpact==="unchanged"&&R>0?"changed":A.diagnostic.stateImpact,nextAction:String(R)+" upload(s) acknowledged; "+String(S.length-R-1)+" not attempted. "+A.diagnostic.nextAction}):A}}return R},E=>{Bn.success(i("files.uploadSuccess",{count:E})),s()})}}const vj={visibility:"all",typeFamily:"all",q:"",uploadedBy:"all"},Uv=t=>t==="delete"?{type:"delete"}:{type:"setVisibility",visibility:t};function yj(){const t=Dt(),l=Oe(),[r,i]=w.useState(vj),[s,u]=w.useState(QA);return t.appStatus!=="running"||t.backendStatus==="none"||!!t.staticOnly?m.jsxs("div",{className:"p-8 text-center",children:[m.jsx("h3",{children:l("app.common.appNotRunning")}),m.jsx("p",{children:l("files.appNotRunningBody")})]}):m.jsx(bj,{filters:r,pageSize:s,onFiltersChange:i,onPageSizeChange:h=>{lb.includes(h)&&u(h)}},t.targetId)}function bj({filters:t,pageSize:l,onFiltersChange:r,onPageSizeChange:i}){var W,V,Z,se,fe;const{client:s,apiBase:u,status:f}=Dt(),{locale:h}=_n(),g=((W=f.data)==null?void 0:W.profile)==="local-runtime",p=mj(Oe(),h,g),y=gj({client:s,apiBase:u,filters:t,pageSize:l,runtime:g}),v=Mf("files","catalog",{...y,readRevision:y.version,refresh:()=>({requestKey:y.refresh(),readRevision:y.version+1})}),C=w.useRef({key:y.queryKey});C.current.key!==y.queryKey&&(C.current={key:y.queryKey});const[x,S]=w.useState(new Set),[E,R]=w.useState(),[_,j]=w.useState(null),A=w.useRef(void 0),L=w.useRef(void 0),[M,K]=w.useState(null),X=w.useRef(0),U=(M==null?void 0:M.queryKey)===y.queryKey?M:null,le=Ta({requestKey:JSON.stringify(["files-preview",U]),enabled:!!U,load:te=>s.request("/_admin/files/bulk/preview",g?cj:ob,{method:"POST",stateful:!1,headers:{"Content-Type":"application/json"},body:JSON.stringify({target:{mode:"filter",filter:U==null?void 0:U.filter},action:U==null?void 0:U.action}),signal:te})}),ye=!!y.data&&!y.loading&&!y.error&&((V=y.data)==null?void 0:V.invalidCount)===0&&!le.loading,q=pj({client:s,apiBase:u,ready:ye,t:p,onChanged:()=>{K(null),y.refresh()}});w.useEffect(()=>{S(new Set),j(null),A.current&&clearTimeout(A.current)},[y.queryKey,y.version]),w.useEffect(()=>{K(null),L.current=void 0,R(void 0)},[y.queryKey]),w.useEffect(()=>{const te=L.current;if(te!==void 0){if(y.requestKey!==te){L.current=void 0;return}y.loading||(L.current=void 0,y.error||q.clearError())}},[y.requestKey,y.error,y.loading]);const ee=w.useRef(!0);w.useEffect(()=>(ee.current=!0,()=>{ee.current=!1,A.current&&clearTimeout(A.current)}),[]);const ie=((Z=y.data)==null?void 0:Z.files)??[],oe=hj(s,y.requestKey,ie,!y.loading&&!y.error),he=ie.map(te=>fj(te,h,p,oe.previews[te.storage_id])),O=te=>ie.find(pe=>pe.storage_id===te),G=!q.allowed||q.busy,ae=()=>{L.current=v.refresh().requestKey},ve=async te=>{if(G)return;const pe=O(te);if(pe){if(_!==te){j(te),A.current&&clearTimeout(A.current),A.current=setTimeout(()=>j(null),3e3);return}await q.remove(pe),ee.current&&j(null)}},ne=async te=>{const pe=C.current;try{await navigator.clipboard.writeText(te),ee.current&&C.current===pe&&(R(void 0),Bn.success(p("common.copy")))}catch{ee.current&&C.current===pe&&R(new Fe({code:"DASHBOARD_CLIPBOARD_UNAVAILABLE",stage:"files-copy",stateImpact:"unchanged",retryable:!1,nextAction:"Allow clipboard access in this browser or copy the file identifier manually."}))}},k=te=>{if(G)return;const pe=[...x].filter(Ge=>O(Ge));if(!pe.length)return;const $e=te==="delete"?"files.bulkDeleteConfirm":te==="public"?"files.bulkPublicConfirm":"files.bulkPrivateConfirm";window.confirm(p($e,{count:pe.length}))&&q.bulk({mode:"selected",storageIds:pe},Uv(te))},P=y.data?y.data.total===void 0?p("files.loadedCount",{count:ie.length}):p("files.filesCount",{count:y.data.total}):void 0,$=y.committed;return m.jsxs(KC,{disabled:G,onFilesDropped:te=>{G||q.upload(te)},children:[m.jsx(QC,{filters:t,countLabel:P,selectedCount:x.size,loading:y.loading,busy:q.busy,disabled:!q.allowed,onFiltersChange:r,onFilesSelected:te=>{te.length&&!G&&q.upload(te)},onRefresh:ae,onSelectedAction:k,onFilteredAction:te=>{G||K({action:Uv(te),filter:{...t},id:++X.current,queryKey:y.queryKey})}}),m.jsx(st,{error:y.error,stale:y.stale}),m.jsx(st,{error:q.error,stale:!!(q.error&&q.error.diagnostic.stateImpact!=="unchanged")}),m.jsx(st,{error:E}),m.jsx(st,{error:oe.error}),!!((se=y.data)!=null&&se.invalidCount)&&m.jsx("p",{role:"status",className:"p-4 text-sm text-amber-600",children:p("files.invalidRows",{count:y.data.invalidCount})}),m.jsxs("div",{className:"flex-1 overflow-auto",children:[ie.length>0&&m.jsx(eR,{files:he,selectedIds:x,allPageSelected:ie.every(te=>x.has(te.storage_id)),disabled:G,deleteConfirm:_,onSelect:(te,pe)=>{G||S($e=>{const Ge=new Set($e);return pe?Ge.add(te):Ge.delete(te),Ge})},onSelectPage:te=>{G||S(te?new Set(ie.map(pe=>pe.storage_id)):new Set)},onCopyId:te=>void ne(te),onCopyPublicUrl:te=>{const pe=O(te);(pe==null?void 0:pe.visibility)==="public"&&pe.url&&ne(pe.url)},onDownload:te=>{const pe=O(te);if(!(pe!=null&&pe.download_url))return;if("format"in pe){oe.download(pe);return}const $e=document.createElement("a");$e.href=pe.download_url,$e.download=pe.name,$e.rel="noopener noreferrer",$e.click()},onDelete:te=>void ve(te),onVisibilityChange:te=>{const pe=O(te);pe&&!G&&q.visibility(pe)}}),y.loading&&!y.data&&m.jsx("p",{className:"p-8",children:p("common.loading")}),!y.loading&&!y.error&&y.data&&y.data.invalidCount===0&&ie.length===0&&m.jsxs("div",{className:"p-12 text-center text-muted-foreground",children:[m.jsx("p",{children:p("files.emptyTitle")}),m.jsx("p",{className:"text-xs",children:p("files.emptyBody")})]})]}),m.jsx(ZC,{page:$.page,pageSize:l,pageSizes:lb,previousDisabled:!$.history.length||y.loading||q.busy,nextDisabled:!((fe=y.data)!=null&&fe.nextCursor)||y.loading||q.busy,onPageSizeChange:i,onPrevious:()=>{const te=[...$.history],pe=te.pop()??null;y.goToPage({cursor:pe,page:Math.max(1,$.page-1),history:te})},onNext:()=>{var te;(te=y.data)!=null&&te.nextCursor&&y.goToPage({cursor:y.data.nextCursor,page:$.page+1,history:[...$.history,$.cursor]})}}),m.jsx(XC,{open:!!U,loading:le.loading,busy:q.busy,disabled:G||!le.data||!!le.error||le.data.count===0,destructive:(U==null?void 0:U.action.type)==="delete",warning:p((U==null?void 0:U.action.type)==="delete"?"files.bulkDeleteWarning":(U==null?void 0:U.action.visibility)==="public"?"files.bulkPublicWarning":"files.bulkPrivateWarning"),preview:le.data?ij(le.data,p):void 0,error:m.jsx(st,{error:le.error}),onClose:()=>{q.busy||K(null)},onConfirm:()=>{!G&&U&&le.data&&!le.error&&!le.loading&&q.bulk({mode:"filter",filter:U.filter},U.action,le.data.count)}})]})}function Bv(t){const l=De(t);if(!Number.isFinite(new Date(l).getTime()))throw new Error("Invalid scheduled time");return l}function xj(t){const l=Ae(t);return{crons:Cn(l.crons).map(r=>{const i=Ae(r);return{name:De(i.name),pattern:De(i.pattern)}}),pendingJobs:Cn(l.pendingJobs).map(r=>{const i=Ae(r);return{id:De(i.id),action:De(i.action),scheduledAt:Bv(i.scheduledAt)}}),failedJobs:l.failedJobs===void 0?void 0:Cn(l.failedJobs).map(r=>{const i=Ae(r);return{id:De(i.id),action:De(i.action),failedAt:Bv(i.failedAt)}})}}function wj(){const t=Oe(),{locale:l}=_n(),{client:r,targetId:i,appStatus:s,backendStatus:u}=Dt(),f=s!=="running"||u==="none",h=Ta({requestKey:`${i}:scheduler`,enabled:!f,refreshInterval:5e3,load:p=>r.request("/_admin/scheduler",xj,{signal:p})}),g=w.useMemo(()=>{var p;if(h.data)return{crons:h.data.crons,pendingJobs:h.data.pendingJobs.map(y=>{const v=new Date(y.scheduledAt).getTime()-Date.now();return{id:y.id,action:y.action,scheduledLabel:t("scheduler.scheduledFor",{date:Ll(y.scheduledAt,l)}),remainingLabel:v<0?t("scheduler.overdue"):v<6e4?`${Math.round(v/1e3)}s`:v<36e5?`${Math.round(v/6e4)}m`:`${Math.round(v/36e5)}h`}}),failedJobs:(p=h.data.failedJobs)==null?void 0:p.map(y=>({id:y.id,action:y.action,failedLabel:t("scheduler.failedAt",{date:Ll(y.failedAt,l)})}))}},[h.data,l,t]);return m.jsxs("div",{className:"flex h-full flex-col",children:[m.jsxs("div",{className:"flex h-12 items-center justify-between border-b border-border bg-background px-4",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(Ms,{className:"h-4 w-4 text-muted-foreground"}),m.jsx("h2",{className:"font-semibold",children:t("scheduler.title")})]}),m.jsx(we,{variant:"ghost",size:"sm","aria-label":t("common.refresh"),disabled:f||h.loading,onClick:h.refresh,children:m.jsx(ol,{className:"h-3.5 w-3.5"})})]}),m.jsx(st,{error:h.error}),h.stale&&m.jsx("p",{className:"px-4 py-2 text-xs text-amber-600",children:t("dashboard.staleData")}),f?m.jsxs("div",{className:"p-8 text-center",children:[m.jsx("h3",{children:t("app.common.appNotRunning")}),m.jsx("p",{className:"text-sm text-muted-foreground",children:t("scheduler.infoUnavailable")})]}):g?m.jsx(xR,{...g}):h.loading?m.jsx(DE,{}):null]})}function Sj(){const{locale:t}=_n();return t==="ko"?{update:"선택한 Auth 제공자는 프로필 수정을 지원하지 않습니다.",delete:"선택한 Auth 제공자는 프로필 삭제를 지원하지 않습니다.",search:"이메일 검색..."}:{update:"Profile editing is unavailable for the selected Auth provider.",delete:"Profile deletion is unavailable for the selected Auth provider.",search:"Search email..."}}function cb(t){const l=Ae(t);if(typeof l.id!="string"||!l.id||l.id.length>256||typeof l.email!="string"||l.email.length>320||typeof l.emailVerified!="boolean"||l.name!==null&&(typeof l.name!="string"||l.name.length>512)||l.image!==null&&(typeof l.image!="string"||l.image.length>2048))throw Error("Invalid safe Auth profile");const r=De(l.createdAt),i=De(l.updatedAt);if(!Number.isFinite(Date.parse(r))||!Number.isFinite(Date.parse(i)))throw Error("Invalid Auth profile times");return{id:De(l.id),name:l.name,email:De(l.email),image:l.image,email_verified:l.emailVerified,created_at:r,updated_at:i}}function Ej(t){const l=Ae(t),r=Cn(l.data),i=dn(l.total);if(r.length>100||!Number.isSafeInteger(i)||i<0)throw Error("Invalid Auth profile page");return{users:r.map(cb),total:i}}function Cj(t,l){const r=Ae(t);if(r.success!==!0||r.id!==l)throw Error("Missing matching Auth deletion acknowledgement");return{success:!0}}const Hv=[{column:"id",type:"text",nullable:!1,default:null},{column:"name",type:"text",nullable:!0,default:null},{column:"email",type:"text",nullable:!1,default:null},{column:"email_verified",type:"boolean",nullable:!1,default:null},{column:"image",type:"text",nullable:!0,default:null},{column:"created_at",type:"timestamp",nullable:!1,default:null},{column:"updated_at",type:"timestamp",nullable:!1,default:null}];function Rj(){var q,ee,ie,oe,he,O,G;const t=Oe(),[l,r]=w.useState(0),[i,s]=w.useState(""),[u,f]=w.useState(""),[h,g]=w.useState(null),p=50,{appStatus:y,backendStatus:v,client:C,targetId:x,status:S}=Dt(),E=((q=S.data)==null?void 0:q.profile)==="local-runtime",R=(ie=(ee=S.data)==null?void 0:ee.operations)==null?void 0:ie.auth,_=Sj(),j=y!=="running"||v==="none",A=Ta({requestKey:`${x}:auth:${l}:${i}`,enabled:!j&&((he=(oe=S.data)==null?void 0:oe.capabilities)==null?void 0:he.auth)!==!1,load:ae=>C.request(`/_admin/auth/users?${new URLSearchParams({page:String(l),limit:String(p),...i?{search:i}:{}})}`,ve=>{if(E)return Ej(ve);const ne=Ae(ve);return{users:Cn(ne.data).map(P=>{const $=Ae(P);if($.emailVerified!==void 0&&typeof $.emailVerified!="boolean")throw new Error("Invalid verification flag");return{id:De($.id),email:De($.email),name:typeof $.name=="string"?$.name:null,image:typeof $.image=="string"?$.image:null,email_verified:$.emailVerified===!0,created_at:De($.createdAt),updated_at:typeof $.updatedAt=="string"?$.updatedAt:De($.createdAt)}}),total:dn(ne.total)}},{signal:ae})}),L=Mf("auth","users",A),M=((O=A.data)==null?void 0:O.users)??[],K=((G=A.data)==null?void 0:G.total)??0,X=A.loading,U=A.refresh;w.useEffect(()=>g(null),[l,i]),w.useEffect(()=>{const ae=setTimeout(()=>{s(u),r(0)},300);return()=>clearTimeout(ae)},[u]);const le=w.useCallback(ae=>{g(ve=>ve&&ve.id===ae.id?null:ae)},[]);w.useEffect(()=>{if(h&&A.data&&!X){const ae=M.find(ve=>ve.id===h.id);g(ae||null)}},[M]);const ye=Math.ceil(K/p);return m.jsxs("div",{className:"flex h-full flex-col",children:[m.jsxs("div",{className:"flex items-center justify-between border-b border-border px-4 h-12 bg-background",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(av,{className:"h-4 w-4 text-muted-foreground"}),m.jsx("h2",{className:"font-semibold text-foreground",children:t("app.nav.auth")}),m.jsx(Ze,{variant:"outline",className:"text-xs border-border text-muted-foreground",children:A.data&&t("auth.usersCount",{count:K})})]}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsxs("div",{className:"relative",children:[m.jsx($s,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),m.jsx("input",{type:"text",placeholder:E?_.search:t("auth.searchPlaceholder"),value:u,onChange:ae=>f(ae.target.value),className:"h-8 w-48 rounded-md border border-border bg-background pl-8 pr-3 text-xs text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-primary/50"})]}),m.jsx(we,{variant:"ghost",size:"sm",onClick:L.refresh,disabled:X||j,"aria-label":t("common.refresh"),className:"text-muted-foreground hover:text-foreground",children:m.jsx(ol,{className:"h-3.5 w-3.5"})})]})]}),m.jsx(st,{stale:A.stale,error:A.error}),m.jsx(st,{error:L.error}),E&&(R==null?void 0:R.updateProfile)===!1&&m.jsx("p",{className:"px-4 py-2 text-xs text-muted-foreground",children:_.update}),m.jsxs("div",{className:"flex-1 min-h-0 relative overflow-hidden",children:[j&&!X?m.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center",children:[m.jsx(av,{className:"h-12 w-12 text-amber-500/30 mb-4"}),m.jsx("h3",{className:"text-lg font-medium text-foreground mb-1",children:t("app.common.appNotRunning")}),m.jsx("p",{className:"text-sm text-muted-foreground max-w-sm",children:t("auth.appNotRunningBody")})]}):A.error&&!A.data?null:M.length===0&&!X&&!A.error?m.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center",children:[m.jsx(EE,{className:"h-12 w-12 text-muted-foreground/30 mb-4"}),m.jsx("h3",{className:"text-lg font-medium text-foreground mb-1",children:t(i?"auth.noUsersFound":"auth.noUsersYet")}),m.jsx("p",{className:"text-sm text-muted-foreground max-w-sm",children:i?t("auth.noUsersMatch",{search:i}):t("auth.signupHint")})]}):m.jsx(HC,{users:M,loading:X,emptyMessage:A.error?null:void 0,onSelect:le}),h&&m.jsx(Wd,{children:m.jsx(W0,{row:h,columns:E?Hv.map(ae=>ae.column==="name"?{...ae,nullable:!1}:ae):Hv,tableName:"user",administration:E?{surface:"auth",resource:"users",canUpdate:(R==null?void 0:R.updateProfile)===!0,canDelete:(R==null?void 0:R.deleteUser)===!0,deleteUnavailableMessage:_.delete,path:ae=>`/_admin/auth/users/${encodeURIComponent(String(ae))}`,normalizeUpdate:cb,normalizeDelete:Cj}:void 0,onClose:()=>g(null),readOnly:!!A.error||X||j,onDataChanged:U},String(h.id))})]}),m.jsxs("div",{className:"flex items-center justify-between border-t border-border px-4 py-2 bg-background",children:[m.jsx("span",{className:"text-xs text-muted-foreground",children:A.data?K===0?t("auth.noUsers"):t("data.rangeOf",{start:l*p+1,end:Math.min((l+1)*p,K),total:K}):""}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("span",{className:"text-xs text-muted-foreground",children:t("data.pageOf",{page:l+1,total:Math.max(ye,1)})}),m.jsxs("div",{className:"flex gap-1",children:[m.jsx(we,{variant:"outline",size:"icon",className:"h-7 w-7 border-border","aria-label":t("data.previousPage"),disabled:l===0||X||j||!!A.error,onClick:()=>r(ae=>ae-1),children:m.jsx(Iy,{className:"h-3.5 w-3.5"})}),m.jsx(we,{variant:"outline",size:"icon",className:"h-7 w-7 border-border","aria-label":t("data.nextPage"),disabled:l+1>=ye||X||j||!!A.error,onClick:()=>r(ae=>ae+1),children:m.jsx($i,{className:"h-3.5 w-3.5"})})]})]})]})]})}function Nj(t){return Cn(t).map(l=>{const r=Ae(l),i=De(r.source);if(!["env","db","both"].includes(i))throw new Error("Invalid environment source");return De(r.maskedValue),{name:De(r.name),source:i,maskedValue:"••••••••"}}).filter(l=>l.source!=="db")}function _j(){const t=Oe(),{client:l,targetId:r}=Dt(),i=Ta({requestKey:`${r}:environment`,load:s=>l.request("/_admin/settings/env-vars",Nj,{signal:s})});return m.jsxs("div",{className:"flex h-full flex-col",children:[m.jsx("header",{className:"h-12 border-b border-border px-4 flex items-center font-semibold",children:t("app.nav.settings")}),m.jsxs("div",{className:"overflow-auto p-6 space-y-6 max-w-4xl",children:[m.jsx(st,{stale:i.stale,error:i.error}),i.loading&&!i.data?m.jsx(ME,{cards:2}):i.data&&m.jsx(dR,{rows:i.data,labels:{title:t("app.env.title"),name:t("app.env.name"),value:t("app.env.value"),empty:t("settings.noEnvVars"),description:`${t("settings.envReadonly")} — ${t("settings.envReadonlyBody",{envFile:".env"})}`}}),m.jsx(K0,{})]})]})}function Aj(){return m.jsx(_s,{to:"/status",replace:!0})}function jj(){return m.jsx(XN,{children:m.jsxs(Ft,{element:m.jsx(iA,{}),children:[m.jsx(Ft,{index:!0,element:m.jsx(_s,{to:"/status",replace:!0})}),m.jsx(Ft,{path:"status",element:m.jsx("div",{className:"p-4",children:m.jsx(K0,{})})}),m.jsx(Ft,{path:"data",element:m.jsx(Dl,{capability:"data",children:m.jsx(SA,{})})}),m.jsx(Ft,{path:"functions",element:m.jsx(Dl,{capability:"functions",children:m.jsx(BA,{})})}),m.jsx(Ft,{path:"logs",element:m.jsx(Dl,{capability:"logs",children:m.jsx(KA,{})})}),m.jsx(Ft,{path:"files",element:m.jsx(Dl,{capability:"files",children:m.jsx(yj,{})})}),m.jsx(Ft,{path:"schedule",element:m.jsx(Dl,{capability:"scheduler",children:m.jsx(wj,{})})}),m.jsx(Ft,{path:"jobs",element:m.jsx(_s,{to:"/schedule",replace:!0})}),m.jsx(Ft,{path:"scheduler",element:m.jsx(_s,{to:"/schedule",replace:!0})}),m.jsx(Ft,{path:"*",element:m.jsx(T_,{})}),m.jsx(Ft,{path:"auth",element:m.jsx(Dl,{capability:"auth",children:m.jsx(Rj,{})})}),m.jsx(Ft,{path:"settings",element:m.jsx(Dl,{capability:"settings",children:m.jsx(_j,{})})}),m.jsx(Ft,{path:"usage",element:m.jsx(Aj,{})})]})})}YR.createRoot(document.getElementById("root")).render(m.jsx(w.StrictMode,{children:m.jsx(b_,{basename:"/_dashboard",children:m.jsx(PE,{children:m.jsx(OE,{defaultTheme:"dark",children:m.jsx(BR,{children:m.jsx(jj,{})})})})})}));
|