context-vault 2.8.15 → 2.8.17
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/app-dist/apple-touch-icon.png +0 -0
- package/app-dist/assets/index-CGFd_zQ8.js +371 -0
- package/app-dist/assets/index-b-qgfkBK.css +1 -0
- package/app-dist/favicon-16x16.png +0 -0
- package/app-dist/favicon-32x32.png +0 -0
- package/app-dist/favicon.ico +0 -0
- package/app-dist/index.html +18 -0
- package/bin/cli.js +42 -2
- package/node_modules/@context-vault/core/package.json +1 -1
- package/node_modules/@context-vault/core/src/index/embed.js +2 -2
- package/node_modules/@context-vault/core/src/index/index.js +16 -13
- package/node_modules/@context-vault/core/src/server/helpers.js +1 -1
- package/node_modules/@context-vault/core/src/server/tools/get-context.js +4 -1
- package/package.json +3 -2
- package/scripts/prepack.js +17 -1
- package/src/local-server.js +296 -0
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
var uN=Object.defineProperty;var fv=e=>{throw TypeError(e)};var dN=(e,n,s)=>n in e?uN(e,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[n]=s;var wf=(e,n,s)=>dN(e,typeof n!="symbol"?n+"":n,s),bf=(e,n,s)=>n.has(e)||fv("Cannot "+s);var O=(e,n,s)=>(bf(e,n,"read from private field"),s?s.call(e):n.get(e)),Ie=(e,n,s)=>n.has(e)?fv("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,s),ve=(e,n,s,o)=>(bf(e,n,"write to private field"),o?o.call(e,s):n.set(e,s),s),qe=(e,n,s)=>(bf(e,n,"access private method"),s);var _c=(e,n,s,o)=>({set _(l){ve(e,n,l,s)},get _(){return O(e,n,o)}});function fN(e,n){for(var s=0;s<n.length;s++){const o=n[s];if(typeof o!="string"&&!Array.isArray(o)){for(const l in o)if(l!=="default"&&!(l in e)){const c=Object.getOwnPropertyDescriptor(o,l);c&&Object.defineProperty(e,l,c.get?c:{enumerable:!0,get:()=>o[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))o(l);new MutationObserver(l=>{for(const c of l)if(c.type==="childList")for(const d of c.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&o(d)}).observe(document,{childList:!0,subtree:!0});function s(l){const c={};return l.integrity&&(c.integrity=l.integrity),l.referrerPolicy&&(c.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?c.credentials="include":l.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function o(l){if(l.ep)return;l.ep=!0;const c=s(l);fetch(l.href,c)}})();function gx(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Sf={exports:{}},Yi={},Nf={exports:{}},Xe={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its 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 mv;function mN(){if(mv)return Xe;mv=1;var e=Symbol.for("react.element"),n=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),d=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),g=Symbol.iterator;function w(D){return D===null||typeof D!="object"?null:(D=g&&D[g]||D["@@iterator"],typeof D=="function"?D:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,S={};function C(D,M,Y){this.props=D,this.context=M,this.refs=S,this.updater=Y||b}C.prototype.isReactComponent={},C.prototype.setState=function(D,M){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,M,"setState")},C.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function k(){}k.prototype=C.prototype;function P(D,M,Y){this.props=D,this.context=M,this.refs=S,this.updater=Y||b}var E=P.prototype=new k;E.constructor=P,N(E,C.prototype),E.isPureReactComponent=!0;var R=Array.isArray,L=Object.prototype.hasOwnProperty,B={current:null},T={key:!0,ref:!0,__self:!0,__source:!0};function I(D,M,Y){var te,ee={},oe=null,X=null;if(M!=null)for(te in M.ref!==void 0&&(X=M.ref),M.key!==void 0&&(oe=""+M.key),M)L.call(M,te)&&!T.hasOwnProperty(te)&&(ee[te]=M[te]);var he=arguments.length-2;if(he===1)ee.children=Y;else if(1<he){for(var ye=Array(he),Ae=0;Ae<he;Ae++)ye[Ae]=arguments[Ae+2];ee.children=ye}if(D&&D.defaultProps)for(te in he=D.defaultProps,he)ee[te]===void 0&&(ee[te]=he[te]);return{$$typeof:e,type:D,key:oe,ref:X,props:ee,_owner:B.current}}function W(D,M){return{$$typeof:e,type:D.type,key:M,ref:D.ref,props:D.props,_owner:D._owner}}function J(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function Z(D){var M={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(Y){return M[Y]})}var q=/\/+/g;function pe(D,M){return typeof D=="object"&&D!==null&&D.key!=null?Z(""+D.key):M.toString(36)}function ue(D,M,Y,te,ee){var oe=typeof D;(oe==="undefined"||oe==="boolean")&&(D=null);var X=!1;if(D===null)X=!0;else switch(oe){case"string":case"number":X=!0;break;case"object":switch(D.$$typeof){case e:case n:X=!0}}if(X)return X=D,ee=ee(X),D=te===""?"."+pe(X,0):te,R(ee)?(Y="",D!=null&&(Y=D.replace(q,"$&/")+"/"),ue(ee,M,Y,"",function(Ae){return Ae})):ee!=null&&(J(ee)&&(ee=W(ee,Y+(!ee.key||X&&X.key===ee.key?"":(""+ee.key).replace(q,"$&/")+"/")+D)),M.push(ee)),1;if(X=0,te=te===""?".":te+":",R(D))for(var he=0;he<D.length;he++){oe=D[he];var ye=te+pe(oe,he);X+=ue(oe,M,Y,ye,ee)}else if(ye=w(D),typeof ye=="function")for(D=ye.call(D),he=0;!(oe=D.next()).done;)oe=oe.value,ye=te+pe(oe,he++),X+=ue(oe,M,Y,ye,ee);else if(oe==="object")throw M=String(D),Error("Objects are not valid as a React child (found: "+(M==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":M)+"). If you meant to render a collection of children, use an array instead.");return X}function ge(D,M,Y){if(D==null)return D;var te=[],ee=0;return ue(D,te,"","",function(oe){return M.call(Y,oe,ee++)}),te}function G(D){if(D._status===-1){var M=D._result;M=M(),M.then(function(Y){(D._status===0||D._status===-1)&&(D._status=1,D._result=Y)},function(Y){(D._status===0||D._status===-1)&&(D._status=2,D._result=Y)}),D._status===-1&&(D._status=0,D._result=M)}if(D._status===1)return D._result.default;throw D._result}var ie={current:null},F={transition:null},se={ReactCurrentDispatcher:ie,ReactCurrentBatchConfig:F,ReactCurrentOwner:B};function ne(){throw Error("act(...) is not supported in production builds of React.")}return Xe.Children={map:ge,forEach:function(D,M,Y){ge(D,function(){M.apply(this,arguments)},Y)},count:function(D){var M=0;return ge(D,function(){M++}),M},toArray:function(D){return ge(D,function(M){return M})||[]},only:function(D){if(!J(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},Xe.Component=C,Xe.Fragment=s,Xe.Profiler=l,Xe.PureComponent=P,Xe.StrictMode=o,Xe.Suspense=m,Xe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=se,Xe.act=ne,Xe.cloneElement=function(D,M,Y){if(D==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+D+".");var te=N({},D.props),ee=D.key,oe=D.ref,X=D._owner;if(M!=null){if(M.ref!==void 0&&(oe=M.ref,X=B.current),M.key!==void 0&&(ee=""+M.key),D.type&&D.type.defaultProps)var he=D.type.defaultProps;for(ye in M)L.call(M,ye)&&!T.hasOwnProperty(ye)&&(te[ye]=M[ye]===void 0&&he!==void 0?he[ye]:M[ye])}var ye=arguments.length-2;if(ye===1)te.children=Y;else if(1<ye){he=Array(ye);for(var Ae=0;Ae<ye;Ae++)he[Ae]=arguments[Ae+2];te.children=he}return{$$typeof:e,type:D.type,key:ee,ref:oe,props:te,_owner:X}},Xe.createContext=function(D){return D={$$typeof:d,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},D.Provider={$$typeof:c,_context:D},D.Consumer=D},Xe.createElement=I,Xe.createFactory=function(D){var M=I.bind(null,D);return M.type=D,M},Xe.createRef=function(){return{current:null}},Xe.forwardRef=function(D){return{$$typeof:f,render:D}},Xe.isValidElement=J,Xe.lazy=function(D){return{$$typeof:x,_payload:{_status:-1,_result:D},_init:G}},Xe.memo=function(D,M){return{$$typeof:p,type:D,compare:M===void 0?null:M}},Xe.startTransition=function(D){var M=F.transition;F.transition={};try{D()}finally{F.transition=M}},Xe.unstable_act=ne,Xe.useCallback=function(D,M){return ie.current.useCallback(D,M)},Xe.useContext=function(D){return ie.current.useContext(D)},Xe.useDebugValue=function(){},Xe.useDeferredValue=function(D){return ie.current.useDeferredValue(D)},Xe.useEffect=function(D,M){return ie.current.useEffect(D,M)},Xe.useId=function(){return ie.current.useId()},Xe.useImperativeHandle=function(D,M,Y){return ie.current.useImperativeHandle(D,M,Y)},Xe.useInsertionEffect=function(D,M){return ie.current.useInsertionEffect(D,M)},Xe.useLayoutEffect=function(D,M){return ie.current.useLayoutEffect(D,M)},Xe.useMemo=function(D,M){return ie.current.useMemo(D,M)},Xe.useReducer=function(D,M,Y){return ie.current.useReducer(D,M,Y)},Xe.useRef=function(D){return ie.current.useRef(D)},Xe.useState=function(D){return ie.current.useState(D)},Xe.useSyncExternalStore=function(D,M,Y){return ie.current.useSyncExternalStore(D,M,Y)},Xe.useTransition=function(){return ie.current.useTransition()},Xe.version="18.3.1",Xe}var hv;function Lm(){return hv||(hv=1,Nf.exports=mN()),Nf.exports}/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its 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 pv;function hN(){if(pv)return Yi;pv=1;var e=Lm(),n=Symbol.for("react.element"),s=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,l=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function d(f,m,p){var x,g={},w=null,b=null;p!==void 0&&(w=""+p),m.key!==void 0&&(w=""+m.key),m.ref!==void 0&&(b=m.ref);for(x in m)o.call(m,x)&&!c.hasOwnProperty(x)&&(g[x]=m[x]);if(f&&f.defaultProps)for(x in m=f.defaultProps,m)g[x]===void 0&&(g[x]=m[x]);return{$$typeof:n,type:f,key:w,ref:b,props:g,_owner:l.current}}return Yi.Fragment=s,Yi.jsx=d,Yi.jsxs=d,Yi}var gv;function pN(){return gv||(gv=1,Sf.exports=hN()),Sf.exports}var i=pN(),Ac={},jf={exports:{}},Rn={},Cf={exports:{}},Ef={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its 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 vv;function gN(){return vv||(vv=1,(function(e){function n(F,se){var ne=F.length;F.push(se);e:for(;0<ne;){var D=ne-1>>>1,M=F[D];if(0<l(M,se))F[D]=se,F[ne]=M,ne=D;else break e}}function s(F){return F.length===0?null:F[0]}function o(F){if(F.length===0)return null;var se=F[0],ne=F.pop();if(ne!==se){F[0]=ne;e:for(var D=0,M=F.length,Y=M>>>1;D<Y;){var te=2*(D+1)-1,ee=F[te],oe=te+1,X=F[oe];if(0>l(ee,ne))oe<M&&0>l(X,ee)?(F[D]=X,F[oe]=ne,D=oe):(F[D]=ee,F[te]=ne,D=te);else if(oe<M&&0>l(X,ne))F[D]=X,F[oe]=ne,D=oe;else break e}}return se}function l(F,se){var ne=F.sortIndex-se.sortIndex;return ne!==0?ne:F.id-se.id}if(typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var d=Date,f=d.now();e.unstable_now=function(){return d.now()-f}}var m=[],p=[],x=1,g=null,w=3,b=!1,N=!1,S=!1,C=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E(F){for(var se=s(p);se!==null;){if(se.callback===null)o(p);else if(se.startTime<=F)o(p),se.sortIndex=se.expirationTime,n(m,se);else break;se=s(p)}}function R(F){if(S=!1,E(F),!N)if(s(m)!==null)N=!0,G(L);else{var se=s(p);se!==null&&ie(R,se.startTime-F)}}function L(F,se){N=!1,S&&(S=!1,k(I),I=-1),b=!0;var ne=w;try{for(E(se),g=s(m);g!==null&&(!(g.expirationTime>se)||F&&!Z());){var D=g.callback;if(typeof D=="function"){g.callback=null,w=g.priorityLevel;var M=D(g.expirationTime<=se);se=e.unstable_now(),typeof M=="function"?g.callback=M:g===s(m)&&o(m),E(se)}else o(m);g=s(m)}if(g!==null)var Y=!0;else{var te=s(p);te!==null&&ie(R,te.startTime-se),Y=!1}return Y}finally{g=null,w=ne,b=!1}}var B=!1,T=null,I=-1,W=5,J=-1;function Z(){return!(e.unstable_now()-J<W)}function q(){if(T!==null){var F=e.unstable_now();J=F;var se=!0;try{se=T(!0,F)}finally{se?pe():(B=!1,T=null)}}else B=!1}var pe;if(typeof P=="function")pe=function(){P(q)};else if(typeof MessageChannel<"u"){var ue=new MessageChannel,ge=ue.port2;ue.port1.onmessage=q,pe=function(){ge.postMessage(null)}}else pe=function(){C(q,0)};function G(F){T=F,B||(B=!0,pe())}function ie(F,se){I=C(function(){F(e.unstable_now())},se)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(F){F.callback=null},e.unstable_continueExecution=function(){N||b||(N=!0,G(L))},e.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):W=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return w},e.unstable_getFirstCallbackNode=function(){return s(m)},e.unstable_next=function(F){switch(w){case 1:case 2:case 3:var se=3;break;default:se=w}var ne=w;w=se;try{return F()}finally{w=ne}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(F,se){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var ne=w;w=F;try{return se()}finally{w=ne}},e.unstable_scheduleCallback=function(F,se,ne){var D=e.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?D+ne:D):ne=D,F){case 1:var M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}return M=ne+M,F={id:x++,callback:se,priorityLevel:F,startTime:ne,expirationTime:M,sortIndex:-1},ne>D?(F.sortIndex=ne,n(p,F),s(m)===null&&F===s(p)&&(S?(k(I),I=-1):S=!0,ie(R,ne-D))):(F.sortIndex=M,n(m,F),N||b||(N=!0,G(L))),F},e.unstable_shouldYield=Z,e.unstable_wrapCallback=function(F){var se=w;return function(){var ne=w;w=se;try{return F.apply(this,arguments)}finally{w=ne}}}})(Ef)),Ef}var yv;function vN(){return yv||(yv=1,Cf.exports=gN()),Cf.exports}/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var xv;function yN(){if(xv)return Rn;xv=1;var e=Lm(),n=vN();function s(t){for(var r="https://reactjs.org/docs/error-decoder.html?invariant="+t,a=1;a<arguments.length;a++)r+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+t+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=new Set,l={};function c(t,r){d(t,r),d(t+"Capture",r)}function d(t,r){for(l[t]=r,t=0;t<r.length;t++)o.add(r[t])}var f=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),m=Object.prototype.hasOwnProperty,p=/^[: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]*$/,x={},g={};function w(t){return m.call(g,t)?!0:m.call(x,t)?!1:p.test(t)?g[t]=!0:(x[t]=!0,!1)}function b(t,r,a,u){if(a!==null&&a.type===0)return!1;switch(typeof r){case"function":case"symbol":return!0;case"boolean":return u?!1:a!==null?!a.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function N(t,r,a,u){if(r===null||typeof r>"u"||b(t,r,a,u))return!0;if(u)return!1;if(a!==null)switch(a.type){case 3:return!r;case 4:return r===!1;case 5:return isNaN(r);case 6:return isNaN(r)||1>r}return!1}function S(t,r,a,u,h,y,j){this.acceptsBooleans=r===2||r===3||r===4,this.attributeName=u,this.attributeNamespace=h,this.mustUseProperty=a,this.propertyName=t,this.type=r,this.sanitizeURL=y,this.removeEmptyString=j}var C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){C[t]=new S(t,0,!1,t,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var r=t[0];C[r]=new S(r,1,!1,t[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(t){C[t]=new S(t,2,!1,t.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){C[t]=new S(t,2,!1,t,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){C[t]=new S(t,3,!1,t.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(t){C[t]=new S(t,3,!0,t,null,!1,!1)}),["capture","download"].forEach(function(t){C[t]=new S(t,4,!1,t,null,!1,!1)}),["cols","rows","size","span"].forEach(function(t){C[t]=new S(t,6,!1,t,null,!1,!1)}),["rowSpan","start"].forEach(function(t){C[t]=new S(t,5,!1,t.toLowerCase(),null,!1,!1)});var k=/[\-:]([a-z])/g;function P(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var r=t.replace(k,P);C[r]=new S(r,1,!1,t,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var r=t.replace(k,P);C[r]=new S(r,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(t){var r=t.replace(k,P);C[r]=new S(r,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(t){C[t]=new S(t,1,!1,t.toLowerCase(),null,!1,!1)}),C.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(t){C[t]=new S(t,1,!1,t.toLowerCase(),null,!0,!0)});function E(t,r,a,u){var h=C.hasOwnProperty(r)?C[r]:null;(h!==null?h.type!==0:u||!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(N(r,a,h,u)&&(a=null),u||h===null?w(r)&&(a===null?t.removeAttribute(r):t.setAttribute(r,""+a)):h.mustUseProperty?t[h.propertyName]=a===null?h.type===3?!1:"":a:(r=h.attributeName,u=h.attributeNamespace,a===null?t.removeAttribute(r):(h=h.type,a=h===3||h===4&&a===!0?"":""+a,u?t.setAttributeNS(u,r,a):t.setAttribute(r,a))))}var R=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,L=Symbol.for("react.element"),B=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),W=Symbol.for("react.profiler"),J=Symbol.for("react.provider"),Z=Symbol.for("react.context"),q=Symbol.for("react.forward_ref"),pe=Symbol.for("react.suspense"),ue=Symbol.for("react.suspense_list"),ge=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),ie=Symbol.for("react.offscreen"),F=Symbol.iterator;function se(t){return t===null||typeof t!="object"?null:(t=F&&t[F]||t["@@iterator"],typeof t=="function"?t:null)}var ne=Object.assign,D;function M(t){if(D===void 0)try{throw Error()}catch(a){var r=a.stack.trim().match(/\n( *(at )?)/);D=r&&r[1]||""}return`
|
|
34
|
+
`+D+t}var Y=!1;function te(t,r){if(!t||Y)return"";Y=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(r)if(r=function(){throw Error()},Object.defineProperty(r.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(r,[])}catch(Q){var u=Q}Reflect.construct(t,[],r)}else{try{r.call()}catch(Q){u=Q}t.call(r.prototype)}else{try{throw Error()}catch(Q){u=Q}t()}}catch(Q){if(Q&&u&&typeof Q.stack=="string"){for(var h=Q.stack.split(`
|
|
35
|
+
`),y=u.stack.split(`
|
|
36
|
+
`),j=h.length-1,_=y.length-1;1<=j&&0<=_&&h[j]!==y[_];)_--;for(;1<=j&&0<=_;j--,_--)if(h[j]!==y[_]){if(j!==1||_!==1)do if(j--,_--,0>_||h[j]!==y[_]){var z=`
|
|
37
|
+
`+h[j].replace(" at new "," at ");return t.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",t.displayName)),z}while(1<=j&&0<=_);break}}}finally{Y=!1,Error.prepareStackTrace=a}return(t=t?t.displayName||t.name:"")?M(t):""}function ee(t){switch(t.tag){case 5:return M(t.type);case 16:return M("Lazy");case 13:return M("Suspense");case 19:return M("SuspenseList");case 0:case 2:case 15:return t=te(t.type,!1),t;case 11:return t=te(t.type.render,!1),t;case 1:return t=te(t.type,!0),t;default:return""}}function oe(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case T:return"Fragment";case B:return"Portal";case W:return"Profiler";case I:return"StrictMode";case pe:return"Suspense";case ue:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case Z:return(t.displayName||"Context")+".Consumer";case J:return(t._context.displayName||"Context")+".Provider";case q:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case ge:return r=t.displayName||null,r!==null?r:oe(t.type)||"Memo";case G:r=t._payload,t=t._init;try{return oe(t(r))}catch{}}return null}function X(t){var r=t.type;switch(t.tag){case 24:return"Cache";case 9:return(r.displayName||"Context")+".Consumer";case 10:return(r._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=r.render,t=t.displayName||t.name||"",r.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return r;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return oe(r);case 8:return r===I?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r}return null}function he(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function ye(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function Ae(t){var r=ye(t)?"checked":"value",a=Object.getOwnPropertyDescriptor(t.constructor.prototype,r),u=""+t[r];if(!t.hasOwnProperty(r)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var h=a.get,y=a.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return h.call(this)},set:function(j){u=""+j,y.call(this,j)}}),Object.defineProperty(t,r,{enumerable:a.enumerable}),{getValue:function(){return u},setValue:function(j){u=""+j},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function Ke(t){t._valueTracker||(t._valueTracker=Ae(t))}function Me(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var a=r.getValue(),u="";return t&&(u=ye(t)?t.checked?"true":"false":t.value),t=u,t!==a?(r.setValue(t),!0):!1}function ft(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function _t(t,r){var a=r.checked;return ne({},r,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??t._wrapperState.initialChecked})}function Vn(t,r){var a=r.defaultValue==null?"":r.defaultValue,u=r.checked!=null?r.checked:r.defaultChecked;a=he(r.value!=null?r.value:a),t._wrapperState={initialChecked:u,initialValue:a,controlled:r.type==="checkbox"||r.type==="radio"?r.checked!=null:r.value!=null}}function $t(t,r){r=r.checked,r!=null&&E(t,"checked",r,!1)}function Zt(t,r){$t(t,r);var a=he(r.value),u=r.type;if(a!=null)u==="number"?(a===0&&t.value===""||t.value!=a)&&(t.value=""+a):t.value!==""+a&&(t.value=""+a);else if(u==="submit"||u==="reset"){t.removeAttribute("value");return}r.hasOwnProperty("value")?At(t,r.type,a):r.hasOwnProperty("defaultValue")&&At(t,r.type,he(r.defaultValue)),r.checked==null&&r.defaultChecked!=null&&(t.defaultChecked=!!r.defaultChecked)}function Gr(t,r,a){if(r.hasOwnProperty("value")||r.hasOwnProperty("defaultValue")){var u=r.type;if(!(u!=="submit"&&u!=="reset"||r.value!==void 0&&r.value!==null))return;r=""+t._wrapperState.initialValue,a||r===t.value||(t.value=r),t.defaultValue=r}a=t.name,a!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,a!==""&&(t.name=a)}function At(t,r,a){(r!=="number"||ft(t.ownerDocument)!==t)&&(a==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+a&&(t.defaultValue=""+a))}var Xr=Array.isArray;function Nr(t,r,a,u){if(t=t.options,r){r={};for(var h=0;h<a.length;h++)r["$"+a[h]]=!0;for(a=0;a<t.length;a++)h=r.hasOwnProperty("$"+t[a].value),t[a].selected!==h&&(t[a].selected=h),h&&u&&(t[a].defaultSelected=!0)}else{for(a=""+he(a),r=null,h=0;h<t.length;h++){if(t[h].value===a){t[h].selected=!0,u&&(t[h].defaultSelected=!0);return}r!==null||t[h].disabled||(r=t[h])}r!==null&&(r.selected=!0)}}function Ut(t,r){if(r.dangerouslySetInnerHTML!=null)throw Error(s(91));return ne({},r,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function cr(t,r){var a=r.value;if(a==null){if(a=r.children,r=r.defaultValue,a!=null){if(r!=null)throw Error(s(92));if(Xr(a)){if(1<a.length)throw Error(s(93));a=a[0]}r=a}r==null&&(r=""),a=r}t._wrapperState={initialValue:he(a)}}function Wn(t,r){var a=he(r.value),u=he(r.defaultValue);a!=null&&(a=""+a,a!==t.value&&(t.value=a),r.defaultValue==null&&t.defaultValue!==a&&(t.defaultValue=a)),u!=null&&(t.defaultValue=""+u)}function jr(t){var r=t.textContent;r===t._wrapperState.initialValue&&r!==""&&r!==null&&(t.value=r)}function Cr(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Jr(t,r){return t==null||t==="http://www.w3.org/1999/xhtml"?Cr(r):t==="http://www.w3.org/2000/svg"&&r==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var en,on=(function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(r,a,u,h){MSApp.execUnsafeLocalFunction(function(){return t(r,a,u,h)})}:t})(function(t,r){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=r;else{for(en=en||document.createElement("div"),en.innerHTML="<svg>"+r.valueOf().toString()+"</svg>",r=en.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;r.firstChild;)t.appendChild(r.firstChild)}});function hn(t,r){if(r){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=r;return}}t.textContent=r}var Er={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Kn=["Webkit","ms","Moz","O"];Object.keys(Er).forEach(function(t){Kn.forEach(function(r){r=r+t.charAt(0).toUpperCase()+t.substring(1),Er[r]=Er[t]})});function ua(t,r,a){return r==null||typeof r=="boolean"||r===""?"":a||typeof r!="number"||r===0||Er.hasOwnProperty(t)&&Er[t]?(""+r).trim():r+"px"}function bn(t,r){t=t.style;for(var a in r)if(r.hasOwnProperty(a)){var u=a.indexOf("--")===0,h=ua(a,r[a],u);a==="float"&&(a="cssFloat"),u?t.setProperty(a,h):t[a]=h}}var wo=ne({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Zr(t,r){if(r){if(wo[t]&&(r.children!=null||r.dangerouslySetInnerHTML!=null))throw Error(s(137,t));if(r.dangerouslySetInnerHTML!=null){if(r.children!=null)throw Error(s(60));if(typeof r.dangerouslySetInnerHTML!="object"||!("__html"in r.dangerouslySetInnerHTML))throw Error(s(61))}if(r.style!=null&&typeof r.style!="object")throw Error(s(62))}}function ks(t,r){if(t.indexOf("-")===-1)return typeof r.is=="string";switch(t){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 es=null;function pn(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var kr=null,ur=null,Mn=null;function bo(t){if(t=Ii(t)){if(typeof kr!="function")throw Error(s(280));var r=t.stateNode;r&&(r=Kl(r),kr(t.stateNode,t.type,r))}}function Be(t){ur?Mn?Mn.push(t):Mn=[t]:ur=t}function bt(){if(ur){var t=ur,r=Mn;if(Mn=ur=null,bo(t),r)for(t=0;t<r.length;t++)bo(r[t])}}function kt(t,r){return t(r)}function Mt(){}var In=!1;function St(t,r,a){if(In)return t(r,a);In=!0;try{return kt(t,r,a)}finally{In=!1,(ur!==null||Mn!==null)&&(Mt(),bt())}}function Lt(t,r){var a=t.stateNode;if(a===null)return null;var u=Kl(a);if(u===null)return null;a=u[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(t=t.type,u=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!u;break e;default:t=!1}if(t)return null;if(a&&typeof a!="function")throw Error(s(231,r,typeof a));return a}var Rr=!1;if(f)try{var A={};Object.defineProperty(A,"passive",{get:function(){Rr=!0}}),window.addEventListener("test",A,A),window.removeEventListener("test",A,A)}catch{Rr=!1}function $(t,r,a,u,h,y,j,_,z){var Q=Array.prototype.slice.call(arguments,3);try{r.apply(a,Q)}catch(le){this.onError(le)}}var K=!1,re=null,fe=!1,Pe=null,De={onError:function(t){K=!0,re=t}};function we(t,r,a,u,h,y,j,_,z){K=!1,re=null,$.apply(De,arguments)}function Se(t,r,a,u,h,y,j,_,z){if(we.apply(this,arguments),K){if(K){var Q=re;K=!1,re=null}else throw Error(s(198));fe||(fe=!0,Pe=Q)}}function ke(t){var r=t,a=t;if(t.alternate)for(;r.return;)r=r.return;else{t=r;do r=t,(r.flags&4098)!==0&&(a=r.return),t=r.return;while(t)}return r.tag===3?a:null}function He(t){if(t.tag===13){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function _e(t){if(ke(t)!==t)throw Error(s(188))}function Ve(t){var r=t.alternate;if(!r){if(r=ke(t),r===null)throw Error(s(188));return r!==t?null:t}for(var a=t,u=r;;){var h=a.return;if(h===null)break;var y=h.alternate;if(y===null){if(u=h.return,u!==null){a=u;continue}break}if(h.child===y.child){for(y=h.child;y;){if(y===a)return _e(h),t;if(y===u)return _e(h),r;y=y.sibling}throw Error(s(188))}if(a.return!==u.return)a=h,u=y;else{for(var j=!1,_=h.child;_;){if(_===a){j=!0,a=h,u=y;break}if(_===u){j=!0,u=h,a=y;break}_=_.sibling}if(!j){for(_=y.child;_;){if(_===a){j=!0,a=y,u=h;break}if(_===u){j=!0,u=y,a=h;break}_=_.sibling}if(!j)throw Error(s(189))}}if(a.alternate!==u)throw Error(s(190))}if(a.tag!==3)throw Error(s(188));return a.stateNode.current===a?t:r}function Je(t){return t=Ve(t),t!==null?zt(t):null}function zt(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var r=zt(t);if(r!==null)return r;t=t.sibling}return null}var It=n.unstable_scheduleCallback,Qt=n.unstable_cancelCallback,st=n.unstable_shouldYield,Sn=n.unstable_requestPaint,at=n.unstable_now,So=n.unstable_getCurrentPriorityLevel,Qn=n.unstable_ImmediatePriority,Dn=n.unstable_UserBlockingPriority,Rs=n.unstable_NormalPriority,No=n.unstable_LowPriority,Pr=n.unstable_IdlePriority,ts=null,gn=null;function Ze(t){if(gn&&typeof gn.onCommitFiberRoot=="function")try{gn.onCommitFiberRoot(ts,t,void 0,(t.current.flags&128)===128)}catch{}}var ut=Math.clz32?Math.clz32:yt,Ps=Math.log,ns=Math.LN2;function yt(t){return t>>>=0,t===0?32:31-(Ps(t)/ns|0)|0}var rs=64,jo=4194304;function Co(t){switch(t&-t){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:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Tl(t,r){var a=t.pendingLanes;if(a===0)return 0;var u=0,h=t.suspendedLanes,y=t.pingedLanes,j=a&268435455;if(j!==0){var _=j&~h;_!==0?u=Co(_):(y&=j,y!==0&&(u=Co(y)))}else j=a&~h,j!==0?u=Co(j):y!==0&&(u=Co(y));if(u===0)return 0;if(r!==0&&r!==u&&(r&h)===0&&(h=u&-u,y=r&-r,h>=y||h===16&&(y&4194240)!==0))return r;if((u&4)!==0&&(u|=a&16),r=t.entangledLanes,r!==0)for(t=t.entanglements,r&=u;0<r;)a=31-ut(r),h=1<<a,u|=t[a],r&=~h;return u}function P1(t,r){switch(t){case 1:case 2:case 4:return r+250;case 8:case 16:case 32:case 64: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 r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function T1(t,r){for(var a=t.suspendedLanes,u=t.pingedLanes,h=t.expirationTimes,y=t.pendingLanes;0<y;){var j=31-ut(y),_=1<<j,z=h[j];z===-1?((_&a)===0||(_&u)!==0)&&(h[j]=P1(_,r)):z<=r&&(t.expiredLanes|=_),y&=~_}}function $u(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function Hh(){var t=rs;return rs<<=1,(rs&4194240)===0&&(rs=64),t}function Uu(t){for(var r=[],a=0;31>a;a++)r.push(t);return r}function vi(t,r,a){t.pendingLanes|=r,r!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,r=31-ut(r),t[r]=a}function _1(t,r){var a=t.pendingLanes&~r;t.pendingLanes=r,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=r,t.mutableReadLanes&=r,t.entangledLanes&=r,r=t.entanglements;var u=t.eventTimes;for(t=t.expirationTimes;0<a;){var h=31-ut(a),y=1<<h;r[h]=0,u[h]=-1,t[h]=-1,a&=~y}}function Bu(t,r){var a=t.entangledLanes|=r;for(t=t.entanglements;a;){var u=31-ut(a),h=1<<u;h&r|t[u]&r&&(t[u]|=r),a&=~h}}var it=0;function Vh(t){return t&=-t,1<t?4<t?(t&268435455)!==0?16:536870912:4:1}var Wh,Hu,Kh,Qh,qh,Vu=!1,_l=[],Ts=null,_s=null,As=null,yi=new Map,xi=new Map,Ms=[],A1="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 submit".split(" ");function Yh(t,r){switch(t){case"focusin":case"focusout":Ts=null;break;case"dragenter":case"dragleave":_s=null;break;case"mouseover":case"mouseout":As=null;break;case"pointerover":case"pointerout":yi.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":xi.delete(r.pointerId)}}function wi(t,r,a,u,h,y){return t===null||t.nativeEvent!==y?(t={blockedOn:r,domEventName:a,eventSystemFlags:u,nativeEvent:y,targetContainers:[h]},r!==null&&(r=Ii(r),r!==null&&Hu(r)),t):(t.eventSystemFlags|=u,r=t.targetContainers,h!==null&&r.indexOf(h)===-1&&r.push(h),t)}function M1(t,r,a,u,h){switch(r){case"focusin":return Ts=wi(Ts,t,r,a,u,h),!0;case"dragenter":return _s=wi(_s,t,r,a,u,h),!0;case"mouseover":return As=wi(As,t,r,a,u,h),!0;case"pointerover":var y=h.pointerId;return yi.set(y,wi(yi.get(y)||null,t,r,a,u,h)),!0;case"gotpointercapture":return y=h.pointerId,xi.set(y,wi(xi.get(y)||null,t,r,a,u,h)),!0}return!1}function Gh(t){var r=Eo(t.target);if(r!==null){var a=ke(r);if(a!==null){if(r=a.tag,r===13){if(r=He(a),r!==null){t.blockedOn=r,qh(t.priority,function(){Kh(a)});return}}else if(r===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Al(t){if(t.blockedOn!==null)return!1;for(var r=t.targetContainers;0<r.length;){var a=Ku(t.domEventName,t.eventSystemFlags,r[0],t.nativeEvent);if(a===null){a=t.nativeEvent;var u=new a.constructor(a.type,a);es=u,a.target.dispatchEvent(u),es=null}else return r=Ii(a),r!==null&&Hu(r),t.blockedOn=a,!1;r.shift()}return!0}function Xh(t,r,a){Al(t)&&a.delete(r)}function I1(){Vu=!1,Ts!==null&&Al(Ts)&&(Ts=null),_s!==null&&Al(_s)&&(_s=null),As!==null&&Al(As)&&(As=null),yi.forEach(Xh),xi.forEach(Xh)}function bi(t,r){t.blockedOn===r&&(t.blockedOn=null,Vu||(Vu=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,I1)))}function Si(t){function r(h){return bi(h,t)}if(0<_l.length){bi(_l[0],t);for(var a=1;a<_l.length;a++){var u=_l[a];u.blockedOn===t&&(u.blockedOn=null)}}for(Ts!==null&&bi(Ts,t),_s!==null&&bi(_s,t),As!==null&&bi(As,t),yi.forEach(r),xi.forEach(r),a=0;a<Ms.length;a++)u=Ms[a],u.blockedOn===t&&(u.blockedOn=null);for(;0<Ms.length&&(a=Ms[0],a.blockedOn===null);)Gh(a),a.blockedOn===null&&Ms.shift()}var da=R.ReactCurrentBatchConfig,Ml=!0;function D1(t,r,a,u){var h=it,y=da.transition;da.transition=null;try{it=1,Wu(t,r,a,u)}finally{it=h,da.transition=y}}function O1(t,r,a,u){var h=it,y=da.transition;da.transition=null;try{it=4,Wu(t,r,a,u)}finally{it=h,da.transition=y}}function Wu(t,r,a,u){if(Ml){var h=Ku(t,r,a,u);if(h===null)cd(t,r,u,Il,a),Yh(t,u);else if(M1(h,t,r,a,u))u.stopPropagation();else if(Yh(t,u),r&4&&-1<A1.indexOf(t)){for(;h!==null;){var y=Ii(h);if(y!==null&&Wh(y),y=Ku(t,r,a,u),y===null&&cd(t,r,u,Il,a),y===h)break;h=y}h!==null&&u.stopPropagation()}else cd(t,r,u,null,a)}}var Il=null;function Ku(t,r,a,u){if(Il=null,t=pn(u),t=Eo(t),t!==null)if(r=ke(t),r===null)t=null;else if(a=r.tag,a===13){if(t=He(r),t!==null)return t;t=null}else if(a===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;t=null}else r!==t&&(t=null);return Il=t,null}function Jh(t){switch(t){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(So()){case Qn:return 1;case Dn:return 4;case Rs:case No:return 16;case Pr:return 536870912;default:return 16}default:return 16}}var Is=null,Qu=null,Dl=null;function Zh(){if(Dl)return Dl;var t,r=Qu,a=r.length,u,h="value"in Is?Is.value:Is.textContent,y=h.length;for(t=0;t<a&&r[t]===h[t];t++);var j=a-t;for(u=1;u<=j&&r[a-u]===h[y-u];u++);return Dl=h.slice(t,1<u?1-u:void 0)}function Ol(t){var r=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&r===13&&(t=13)):t=r,t===10&&(t=13),32<=t||t===13?t:0}function Ll(){return!0}function ep(){return!1}function On(t){function r(a,u,h,y,j){this._reactName=a,this._targetInst=h,this.type=u,this.nativeEvent=y,this.target=j,this.currentTarget=null;for(var _ in t)t.hasOwnProperty(_)&&(a=t[_],this[_]=a?a(y):y[_]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?Ll:ep,this.isPropagationStopped=ep,this}return ne(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Ll)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Ll)},persist:function(){},isPersistent:Ll}),r}var fa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qu=On(fa),Ni=ne({},fa,{view:0,detail:0}),L1=On(Ni),Yu,Gu,ji,zl=ne({},Ni,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ju,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==ji&&(ji&&t.type==="mousemove"?(Yu=t.screenX-ji.screenX,Gu=t.screenY-ji.screenY):Gu=Yu=0,ji=t),Yu)},movementY:function(t){return"movementY"in t?t.movementY:Gu}}),tp=On(zl),z1=ne({},zl,{dataTransfer:0}),F1=On(z1),$1=ne({},Ni,{relatedTarget:0}),Xu=On($1),U1=ne({},fa,{animationName:0,elapsedTime:0,pseudoElement:0}),B1=On(U1),H1=ne({},fa,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),V1=On(H1),W1=ne({},fa,{data:0}),np=On(W1),K1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Q1={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"},q1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Y1(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=q1[t])?!!r[t]:!1}function Ju(){return Y1}var G1=ne({},Ni,{key:function(t){if(t.key){var r=K1[t.key]||t.key;if(r!=="Unidentified")return r}return t.type==="keypress"?(t=Ol(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Q1[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ju,charCode:function(t){return t.type==="keypress"?Ol(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Ol(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),X1=On(G1),J1=ne({},zl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),rp=On(J1),Z1=ne({},Ni,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ju}),eS=On(Z1),tS=ne({},fa,{propertyName:0,elapsedTime:0,pseudoElement:0}),nS=On(tS),rS=ne({},zl,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),sS=On(rS),oS=[9,13,27,32],Zu=f&&"CompositionEvent"in window,Ci=null;f&&"documentMode"in document&&(Ci=document.documentMode);var aS=f&&"TextEvent"in window&&!Ci,sp=f&&(!Zu||Ci&&8<Ci&&11>=Ci),op=" ",ap=!1;function ip(t,r){switch(t){case"keyup":return oS.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lp(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ma=!1;function iS(t,r){switch(t){case"compositionend":return lp(r);case"keypress":return r.which!==32?null:(ap=!0,op);case"textInput":return t=r.data,t===op&&ap?null:t;default:return null}}function lS(t,r){if(ma)return t==="compositionend"||!Zu&&ip(t,r)?(t=Zh(),Dl=Qu=Is=null,ma=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return sp&&r.locale!=="ko"?null:r.data;default:return null}}var cS={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 cp(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!cS[t.type]:r==="textarea"}function up(t,r,a,u){Be(u),r=Hl(r,"onChange"),0<r.length&&(a=new qu("onChange","change",null,a,u),t.push({event:a,listeners:r}))}var Ei=null,ki=null;function uS(t){Rp(t,0)}function Fl(t){var r=ya(t);if(Me(r))return t}function dS(t,r){if(t==="change")return r}var dp=!1;if(f){var ed;if(f){var td="oninput"in document;if(!td){var fp=document.createElement("div");fp.setAttribute("oninput","return;"),td=typeof fp.oninput=="function"}ed=td}else ed=!1;dp=ed&&(!document.documentMode||9<document.documentMode)}function mp(){Ei&&(Ei.detachEvent("onpropertychange",hp),ki=Ei=null)}function hp(t){if(t.propertyName==="value"&&Fl(ki)){var r=[];up(r,ki,t,pn(t)),St(uS,r)}}function fS(t,r,a){t==="focusin"?(mp(),Ei=r,ki=a,Ei.attachEvent("onpropertychange",hp)):t==="focusout"&&mp()}function mS(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Fl(ki)}function hS(t,r){if(t==="click")return Fl(r)}function pS(t,r){if(t==="input"||t==="change")return Fl(r)}function gS(t,r){return t===r&&(t!==0||1/t===1/r)||t!==t&&r!==r}var dr=typeof Object.is=="function"?Object.is:gS;function Ri(t,r){if(dr(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;var a=Object.keys(t),u=Object.keys(r);if(a.length!==u.length)return!1;for(u=0;u<a.length;u++){var h=a[u];if(!m.call(r,h)||!dr(t[h],r[h]))return!1}return!0}function pp(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function gp(t,r){var a=pp(t);t=0;for(var u;a;){if(a.nodeType===3){if(u=t+a.textContent.length,t<=r&&u>=r)return{node:a,offset:r-t};t=u}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=pp(a)}}function vp(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?vp(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function yp(){for(var t=window,r=ft();r instanceof t.HTMLIFrameElement;){try{var a=typeof r.contentWindow.location.href=="string"}catch{a=!1}if(a)t=r.contentWindow;else break;r=ft(t.document)}return r}function nd(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}function vS(t){var r=yp(),a=t.focusedElem,u=t.selectionRange;if(r!==a&&a&&a.ownerDocument&&vp(a.ownerDocument.documentElement,a)){if(u!==null&&nd(a)){if(r=u.start,t=u.end,t===void 0&&(t=r),"selectionStart"in a)a.selectionStart=r,a.selectionEnd=Math.min(t,a.value.length);else if(t=(r=a.ownerDocument||document)&&r.defaultView||window,t.getSelection){t=t.getSelection();var h=a.textContent.length,y=Math.min(u.start,h);u=u.end===void 0?y:Math.min(u.end,h),!t.extend&&y>u&&(h=u,u=y,y=h),h=gp(a,y);var j=gp(a,u);h&&j&&(t.rangeCount!==1||t.anchorNode!==h.node||t.anchorOffset!==h.offset||t.focusNode!==j.node||t.focusOffset!==j.offset)&&(r=r.createRange(),r.setStart(h.node,h.offset),t.removeAllRanges(),y>u?(t.addRange(r),t.extend(j.node,j.offset)):(r.setEnd(j.node,j.offset),t.addRange(r)))}}for(r=[],t=a;t=t.parentNode;)t.nodeType===1&&r.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a<r.length;a++)t=r[a],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var yS=f&&"documentMode"in document&&11>=document.documentMode,ha=null,rd=null,Pi=null,sd=!1;function xp(t,r,a){var u=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;sd||ha==null||ha!==ft(u)||(u=ha,"selectionStart"in u&&nd(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Pi&&Ri(Pi,u)||(Pi=u,u=Hl(rd,"onSelect"),0<u.length&&(r=new qu("onSelect","select",null,r,a),t.push({event:r,listeners:u}),r.target=ha)))}function $l(t,r){var a={};return a[t.toLowerCase()]=r.toLowerCase(),a["Webkit"+t]="webkit"+r,a["Moz"+t]="moz"+r,a}var pa={animationend:$l("Animation","AnimationEnd"),animationiteration:$l("Animation","AnimationIteration"),animationstart:$l("Animation","AnimationStart"),transitionend:$l("Transition","TransitionEnd")},od={},wp={};f&&(wp=document.createElement("div").style,"AnimationEvent"in window||(delete pa.animationend.animation,delete pa.animationiteration.animation,delete pa.animationstart.animation),"TransitionEvent"in window||delete pa.transitionend.transition);function Ul(t){if(od[t])return od[t];if(!pa[t])return t;var r=pa[t],a;for(a in r)if(r.hasOwnProperty(a)&&a in wp)return od[t]=r[a];return t}var bp=Ul("animationend"),Sp=Ul("animationiteration"),Np=Ul("animationstart"),jp=Ul("transitionend"),Cp=new Map,Ep="abort auxClick 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(" ");function Ds(t,r){Cp.set(t,r),c(r,[t])}for(var ad=0;ad<Ep.length;ad++){var id=Ep[ad],xS=id.toLowerCase(),wS=id[0].toUpperCase()+id.slice(1);Ds(xS,"on"+wS)}Ds(bp,"onAnimationEnd"),Ds(Sp,"onAnimationIteration"),Ds(Np,"onAnimationStart"),Ds("dblclick","onDoubleClick"),Ds("focusin","onFocus"),Ds("focusout","onBlur"),Ds(jp,"onTransitionEnd"),d("onMouseEnter",["mouseout","mouseover"]),d("onMouseLeave",["mouseout","mouseover"]),d("onPointerEnter",["pointerout","pointerover"]),d("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ti="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(" "),bS=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ti));function kp(t,r,a){var u=t.type||"unknown-event";t.currentTarget=a,Se(u,r,void 0,t),t.currentTarget=null}function Rp(t,r){r=(r&4)!==0;for(var a=0;a<t.length;a++){var u=t[a],h=u.event;u=u.listeners;e:{var y=void 0;if(r)for(var j=u.length-1;0<=j;j--){var _=u[j],z=_.instance,Q=_.currentTarget;if(_=_.listener,z!==y&&h.isPropagationStopped())break e;kp(h,_,Q),y=z}else for(j=0;j<u.length;j++){if(_=u[j],z=_.instance,Q=_.currentTarget,_=_.listener,z!==y&&h.isPropagationStopped())break e;kp(h,_,Q),y=z}}}if(fe)throw t=Pe,fe=!1,Pe=null,t}function pt(t,r){var a=r[pd];a===void 0&&(a=r[pd]=new Set);var u=t+"__bubble";a.has(u)||(Pp(r,t,2,!1),a.add(u))}function ld(t,r,a){var u=0;r&&(u|=4),Pp(a,t,u,r)}var Bl="_reactListening"+Math.random().toString(36).slice(2);function _i(t){if(!t[Bl]){t[Bl]=!0,o.forEach(function(a){a!=="selectionchange"&&(bS.has(a)||ld(a,!1,t),ld(a,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[Bl]||(r[Bl]=!0,ld("selectionchange",!1,r))}}function Pp(t,r,a,u){switch(Jh(r)){case 1:var h=D1;break;case 4:h=O1;break;default:h=Wu}a=h.bind(null,r,a,t),h=void 0,!Rr||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(h=!0),u?h!==void 0?t.addEventListener(r,a,{capture:!0,passive:h}):t.addEventListener(r,a,!0):h!==void 0?t.addEventListener(r,a,{passive:h}):t.addEventListener(r,a,!1)}function cd(t,r,a,u,h){var y=u;if((r&1)===0&&(r&2)===0&&u!==null)e:for(;;){if(u===null)return;var j=u.tag;if(j===3||j===4){var _=u.stateNode.containerInfo;if(_===h||_.nodeType===8&&_.parentNode===h)break;if(j===4)for(j=u.return;j!==null;){var z=j.tag;if((z===3||z===4)&&(z=j.stateNode.containerInfo,z===h||z.nodeType===8&&z.parentNode===h))return;j=j.return}for(;_!==null;){if(j=Eo(_),j===null)return;if(z=j.tag,z===5||z===6){u=y=j;continue e}_=_.parentNode}}u=u.return}St(function(){var Q=y,le=pn(a),ce=[];e:{var ae=Cp.get(t);if(ae!==void 0){var xe=qu,Ne=t;switch(t){case"keypress":if(Ol(a)===0)break e;case"keydown":case"keyup":xe=X1;break;case"focusin":Ne="focus",xe=Xu;break;case"focusout":Ne="blur",xe=Xu;break;case"beforeblur":case"afterblur":xe=Xu;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":xe=tp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":xe=F1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":xe=eS;break;case bp:case Sp:case Np:xe=B1;break;case jp:xe=nS;break;case"scroll":xe=L1;break;case"wheel":xe=sS;break;case"copy":case"cut":case"paste":xe=V1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":xe=rp}var Re=(r&4)!==0,Dt=!Re&&t==="scroll",H=Re?ae!==null?ae+"Capture":null:ae;Re=[];for(var U=Q,V;U!==null;){V=U;var de=V.stateNode;if(V.tag===5&&de!==null&&(V=de,H!==null&&(de=Lt(U,H),de!=null&&Re.push(Ai(U,de,V)))),Dt)break;U=U.return}0<Re.length&&(ae=new xe(ae,Ne,null,a,le),ce.push({event:ae,listeners:Re}))}}if((r&7)===0){e:{if(ae=t==="mouseover"||t==="pointerover",xe=t==="mouseout"||t==="pointerout",ae&&a!==es&&(Ne=a.relatedTarget||a.fromElement)&&(Eo(Ne)||Ne[ss]))break e;if((xe||ae)&&(ae=le.window===le?le:(ae=le.ownerDocument)?ae.defaultView||ae.parentWindow:window,xe?(Ne=a.relatedTarget||a.toElement,xe=Q,Ne=Ne?Eo(Ne):null,Ne!==null&&(Dt=ke(Ne),Ne!==Dt||Ne.tag!==5&&Ne.tag!==6)&&(Ne=null)):(xe=null,Ne=Q),xe!==Ne)){if(Re=tp,de="onMouseLeave",H="onMouseEnter",U="mouse",(t==="pointerout"||t==="pointerover")&&(Re=rp,de="onPointerLeave",H="onPointerEnter",U="pointer"),Dt=xe==null?ae:ya(xe),V=Ne==null?ae:ya(Ne),ae=new Re(de,U+"leave",xe,a,le),ae.target=Dt,ae.relatedTarget=V,de=null,Eo(le)===Q&&(Re=new Re(H,U+"enter",Ne,a,le),Re.target=V,Re.relatedTarget=Dt,de=Re),Dt=de,xe&&Ne)t:{for(Re=xe,H=Ne,U=0,V=Re;V;V=ga(V))U++;for(V=0,de=H;de;de=ga(de))V++;for(;0<U-V;)Re=ga(Re),U--;for(;0<V-U;)H=ga(H),V--;for(;U--;){if(Re===H||H!==null&&Re===H.alternate)break t;Re=ga(Re),H=ga(H)}Re=null}else Re=null;xe!==null&&Tp(ce,ae,xe,Re,!1),Ne!==null&&Dt!==null&&Tp(ce,Dt,Ne,Re,!0)}}e:{if(ae=Q?ya(Q):window,xe=ae.nodeName&&ae.nodeName.toLowerCase(),xe==="select"||xe==="input"&&ae.type==="file")var Te=dS;else if(cp(ae))if(dp)Te=pS;else{Te=mS;var Oe=fS}else(xe=ae.nodeName)&&xe.toLowerCase()==="input"&&(ae.type==="checkbox"||ae.type==="radio")&&(Te=hS);if(Te&&(Te=Te(t,Q))){up(ce,Te,a,le);break e}Oe&&Oe(t,ae,Q),t==="focusout"&&(Oe=ae._wrapperState)&&Oe.controlled&&ae.type==="number"&&At(ae,"number",ae.value)}switch(Oe=Q?ya(Q):window,t){case"focusin":(cp(Oe)||Oe.contentEditable==="true")&&(ha=Oe,rd=Q,Pi=null);break;case"focusout":Pi=rd=ha=null;break;case"mousedown":sd=!0;break;case"contextmenu":case"mouseup":case"dragend":sd=!1,xp(ce,a,le);break;case"selectionchange":if(yS)break;case"keydown":case"keyup":xp(ce,a,le)}var Le;if(Zu)e:{switch(t){case"compositionstart":var Ue="onCompositionStart";break e;case"compositionend":Ue="onCompositionEnd";break e;case"compositionupdate":Ue="onCompositionUpdate";break e}Ue=void 0}else ma?ip(t,a)&&(Ue="onCompositionEnd"):t==="keydown"&&a.keyCode===229&&(Ue="onCompositionStart");Ue&&(sp&&a.locale!=="ko"&&(ma||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&ma&&(Le=Zh()):(Is=le,Qu="value"in Is?Is.value:Is.textContent,ma=!0)),Oe=Hl(Q,Ue),0<Oe.length&&(Ue=new np(Ue,t,null,a,le),ce.push({event:Ue,listeners:Oe}),Le?Ue.data=Le:(Le=lp(a),Le!==null&&(Ue.data=Le)))),(Le=aS?iS(t,a):lS(t,a))&&(Q=Hl(Q,"onBeforeInput"),0<Q.length&&(le=new np("onBeforeInput","beforeinput",null,a,le),ce.push({event:le,listeners:Q}),le.data=Le))}Rp(ce,r)})}function Ai(t,r,a){return{instance:t,listener:r,currentTarget:a}}function Hl(t,r){for(var a=r+"Capture",u=[];t!==null;){var h=t,y=h.stateNode;h.tag===5&&y!==null&&(h=y,y=Lt(t,a),y!=null&&u.unshift(Ai(t,y,h)),y=Lt(t,r),y!=null&&u.push(Ai(t,y,h))),t=t.return}return u}function ga(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function Tp(t,r,a,u,h){for(var y=r._reactName,j=[];a!==null&&a!==u;){var _=a,z=_.alternate,Q=_.stateNode;if(z!==null&&z===u)break;_.tag===5&&Q!==null&&(_=Q,h?(z=Lt(a,y),z!=null&&j.unshift(Ai(a,z,_))):h||(z=Lt(a,y),z!=null&&j.push(Ai(a,z,_)))),a=a.return}j.length!==0&&t.push({event:r,listeners:j})}var SS=/\r\n?/g,NS=/\u0000|\uFFFD/g;function _p(t){return(typeof t=="string"?t:""+t).replace(SS,`
|
|
38
|
+
`).replace(NS,"")}function Vl(t,r,a){if(r=_p(r),_p(t)!==r&&a)throw Error(s(425))}function Wl(){}var ud=null,dd=null;function fd(t,r){return t==="textarea"||t==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var md=typeof setTimeout=="function"?setTimeout:void 0,jS=typeof clearTimeout=="function"?clearTimeout:void 0,Ap=typeof Promise=="function"?Promise:void 0,CS=typeof queueMicrotask=="function"?queueMicrotask:typeof Ap<"u"?function(t){return Ap.resolve(null).then(t).catch(ES)}:md;function ES(t){setTimeout(function(){throw t})}function hd(t,r){var a=r,u=0;do{var h=a.nextSibling;if(t.removeChild(a),h&&h.nodeType===8)if(a=h.data,a==="/$"){if(u===0){t.removeChild(h),Si(r);return}u--}else a!=="$"&&a!=="$?"&&a!=="$!"||u++;a=h}while(a);Si(r)}function Os(t){for(;t!=null;t=t.nextSibling){var r=t.nodeType;if(r===1||r===3)break;if(r===8){if(r=t.data,r==="$"||r==="$!"||r==="$?")break;if(r==="/$")return null}}return t}function Mp(t){t=t.previousSibling;for(var r=0;t;){if(t.nodeType===8){var a=t.data;if(a==="$"||a==="$!"||a==="$?"){if(r===0)return t;r--}else a==="/$"&&r++}t=t.previousSibling}return null}var va=Math.random().toString(36).slice(2),Tr="__reactFiber$"+va,Mi="__reactProps$"+va,ss="__reactContainer$"+va,pd="__reactEvents$"+va,kS="__reactListeners$"+va,RS="__reactHandles$"+va;function Eo(t){var r=t[Tr];if(r)return r;for(var a=t.parentNode;a;){if(r=a[ss]||a[Tr]){if(a=r.alternate,r.child!==null||a!==null&&a.child!==null)for(t=Mp(t);t!==null;){if(a=t[Tr])return a;t=Mp(t)}return r}t=a,a=t.parentNode}return null}function Ii(t){return t=t[Tr]||t[ss],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function ya(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(s(33))}function Kl(t){return t[Mi]||null}var gd=[],xa=-1;function Ls(t){return{current:t}}function gt(t){0>xa||(t.current=gd[xa],gd[xa]=null,xa--)}function mt(t,r){xa++,gd[xa]=t.current,t.current=r}var zs={},an=Ls(zs),Nn=Ls(!1),ko=zs;function wa(t,r){var a=t.type.contextTypes;if(!a)return zs;var u=t.stateNode;if(u&&u.__reactInternalMemoizedUnmaskedChildContext===r)return u.__reactInternalMemoizedMaskedChildContext;var h={},y;for(y in a)h[y]=r[y];return u&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=r,t.__reactInternalMemoizedMaskedChildContext=h),h}function jn(t){return t=t.childContextTypes,t!=null}function Ql(){gt(Nn),gt(an)}function Ip(t,r,a){if(an.current!==zs)throw Error(s(168));mt(an,r),mt(Nn,a)}function Dp(t,r,a){var u=t.stateNode;if(r=r.childContextTypes,typeof u.getChildContext!="function")return a;u=u.getChildContext();for(var h in u)if(!(h in r))throw Error(s(108,X(t)||"Unknown",h));return ne({},a,u)}function ql(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||zs,ko=an.current,mt(an,t),mt(Nn,Nn.current),!0}function Op(t,r,a){var u=t.stateNode;if(!u)throw Error(s(169));a?(t=Dp(t,r,ko),u.__reactInternalMemoizedMergedChildContext=t,gt(Nn),gt(an),mt(an,t)):gt(Nn),mt(Nn,a)}var os=null,Yl=!1,vd=!1;function Lp(t){os===null?os=[t]:os.push(t)}function PS(t){Yl=!0,Lp(t)}function Fs(){if(!vd&&os!==null){vd=!0;var t=0,r=it;try{var a=os;for(it=1;t<a.length;t++){var u=a[t];do u=u(!0);while(u!==null)}os=null,Yl=!1}catch(h){throw os!==null&&(os=os.slice(t+1)),It(Qn,Fs),h}finally{it=r,vd=!1}}return null}var ba=[],Sa=0,Gl=null,Xl=0,qn=[],Yn=0,Ro=null,as=1,is="";function Po(t,r){ba[Sa++]=Xl,ba[Sa++]=Gl,Gl=t,Xl=r}function zp(t,r,a){qn[Yn++]=as,qn[Yn++]=is,qn[Yn++]=Ro,Ro=t;var u=as;t=is;var h=32-ut(u)-1;u&=~(1<<h),a+=1;var y=32-ut(r)+h;if(30<y){var j=h-h%5;y=(u&(1<<j)-1).toString(32),u>>=j,h-=j,as=1<<32-ut(r)+h|a<<h|u,is=y+t}else as=1<<y|a<<h|u,is=t}function yd(t){t.return!==null&&(Po(t,1),zp(t,1,0))}function xd(t){for(;t===Gl;)Gl=ba[--Sa],ba[Sa]=null,Xl=ba[--Sa],ba[Sa]=null;for(;t===Ro;)Ro=qn[--Yn],qn[Yn]=null,is=qn[--Yn],qn[Yn]=null,as=qn[--Yn],qn[Yn]=null}var Ln=null,zn=null,xt=!1,fr=null;function Fp(t,r){var a=Zn(5,null,null,0);a.elementType="DELETED",a.stateNode=r,a.return=t,r=t.deletions,r===null?(t.deletions=[a],t.flags|=16):r.push(a)}function $p(t,r){switch(t.tag){case 5:var a=t.type;return r=r.nodeType!==1||a.toLowerCase()!==r.nodeName.toLowerCase()?null:r,r!==null?(t.stateNode=r,Ln=t,zn=Os(r.firstChild),!0):!1;case 6:return r=t.pendingProps===""||r.nodeType!==3?null:r,r!==null?(t.stateNode=r,Ln=t,zn=null,!0):!1;case 13:return r=r.nodeType!==8?null:r,r!==null?(a=Ro!==null?{id:as,overflow:is}:null,t.memoizedState={dehydrated:r,treeContext:a,retryLane:1073741824},a=Zn(18,null,null,0),a.stateNode=r,a.return=t,t.child=a,Ln=t,zn=null,!0):!1;default:return!1}}function wd(t){return(t.mode&1)!==0&&(t.flags&128)===0}function bd(t){if(xt){var r=zn;if(r){var a=r;if(!$p(t,r)){if(wd(t))throw Error(s(418));r=Os(a.nextSibling);var u=Ln;r&&$p(t,r)?Fp(u,a):(t.flags=t.flags&-4097|2,xt=!1,Ln=t)}}else{if(wd(t))throw Error(s(418));t.flags=t.flags&-4097|2,xt=!1,Ln=t}}}function Up(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Ln=t}function Jl(t){if(t!==Ln)return!1;if(!xt)return Up(t),xt=!0,!1;var r;if((r=t.tag!==3)&&!(r=t.tag!==5)&&(r=t.type,r=r!=="head"&&r!=="body"&&!fd(t.type,t.memoizedProps)),r&&(r=zn)){if(wd(t))throw Bp(),Error(s(418));for(;r;)Fp(t,r),r=Os(r.nextSibling)}if(Up(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(s(317));e:{for(t=t.nextSibling,r=0;t;){if(t.nodeType===8){var a=t.data;if(a==="/$"){if(r===0){zn=Os(t.nextSibling);break e}r--}else a!=="$"&&a!=="$!"&&a!=="$?"||r++}t=t.nextSibling}zn=null}}else zn=Ln?Os(t.stateNode.nextSibling):null;return!0}function Bp(){for(var t=zn;t;)t=Os(t.nextSibling)}function Na(){zn=Ln=null,xt=!1}function Sd(t){fr===null?fr=[t]:fr.push(t)}var TS=R.ReactCurrentBatchConfig;function Di(t,r,a){if(t=a.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(a._owner){if(a=a._owner,a){if(a.tag!==1)throw Error(s(309));var u=a.stateNode}if(!u)throw Error(s(147,t));var h=u,y=""+t;return r!==null&&r.ref!==null&&typeof r.ref=="function"&&r.ref._stringRef===y?r.ref:(r=function(j){var _=h.refs;j===null?delete _[y]:_[y]=j},r._stringRef=y,r)}if(typeof t!="string")throw Error(s(284));if(!a._owner)throw Error(s(290,t))}return t}function Zl(t,r){throw t=Object.prototype.toString.call(r),Error(s(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t))}function Hp(t){var r=t._init;return r(t._payload)}function Vp(t){function r(H,U){if(t){var V=H.deletions;V===null?(H.deletions=[U],H.flags|=16):V.push(U)}}function a(H,U){if(!t)return null;for(;U!==null;)r(H,U),U=U.sibling;return null}function u(H,U){for(H=new Map;U!==null;)U.key!==null?H.set(U.key,U):H.set(U.index,U),U=U.sibling;return H}function h(H,U){return H=Qs(H,U),H.index=0,H.sibling=null,H}function y(H,U,V){return H.index=V,t?(V=H.alternate,V!==null?(V=V.index,V<U?(H.flags|=2,U):V):(H.flags|=2,U)):(H.flags|=1048576,U)}function j(H){return t&&H.alternate===null&&(H.flags|=2),H}function _(H,U,V,de){return U===null||U.tag!==6?(U=hf(V,H.mode,de),U.return=H,U):(U=h(U,V),U.return=H,U)}function z(H,U,V,de){var Te=V.type;return Te===T?le(H,U,V.props.children,de,V.key):U!==null&&(U.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===G&&Hp(Te)===U.type)?(de=h(U,V.props),de.ref=Di(H,U,V),de.return=H,de):(de=Nc(V.type,V.key,V.props,null,H.mode,de),de.ref=Di(H,U,V),de.return=H,de)}function Q(H,U,V,de){return U===null||U.tag!==4||U.stateNode.containerInfo!==V.containerInfo||U.stateNode.implementation!==V.implementation?(U=pf(V,H.mode,de),U.return=H,U):(U=h(U,V.children||[]),U.return=H,U)}function le(H,U,V,de,Te){return U===null||U.tag!==7?(U=Lo(V,H.mode,de,Te),U.return=H,U):(U=h(U,V),U.return=H,U)}function ce(H,U,V){if(typeof U=="string"&&U!==""||typeof U=="number")return U=hf(""+U,H.mode,V),U.return=H,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case L:return V=Nc(U.type,U.key,U.props,null,H.mode,V),V.ref=Di(H,null,U),V.return=H,V;case B:return U=pf(U,H.mode,V),U.return=H,U;case G:var de=U._init;return ce(H,de(U._payload),V)}if(Xr(U)||se(U))return U=Lo(U,H.mode,V,null),U.return=H,U;Zl(H,U)}return null}function ae(H,U,V,de){var Te=U!==null?U.key:null;if(typeof V=="string"&&V!==""||typeof V=="number")return Te!==null?null:_(H,U,""+V,de);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case L:return V.key===Te?z(H,U,V,de):null;case B:return V.key===Te?Q(H,U,V,de):null;case G:return Te=V._init,ae(H,U,Te(V._payload),de)}if(Xr(V)||se(V))return Te!==null?null:le(H,U,V,de,null);Zl(H,V)}return null}function xe(H,U,V,de,Te){if(typeof de=="string"&&de!==""||typeof de=="number")return H=H.get(V)||null,_(U,H,""+de,Te);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case L:return H=H.get(de.key===null?V:de.key)||null,z(U,H,de,Te);case B:return H=H.get(de.key===null?V:de.key)||null,Q(U,H,de,Te);case G:var Oe=de._init;return xe(H,U,V,Oe(de._payload),Te)}if(Xr(de)||se(de))return H=H.get(V)||null,le(U,H,de,Te,null);Zl(U,de)}return null}function Ne(H,U,V,de){for(var Te=null,Oe=null,Le=U,Ue=U=0,Gt=null;Le!==null&&Ue<V.length;Ue++){Le.index>Ue?(Gt=Le,Le=null):Gt=Le.sibling;var nt=ae(H,Le,V[Ue],de);if(nt===null){Le===null&&(Le=Gt);break}t&&Le&&nt.alternate===null&&r(H,Le),U=y(nt,U,Ue),Oe===null?Te=nt:Oe.sibling=nt,Oe=nt,Le=Gt}if(Ue===V.length)return a(H,Le),xt&&Po(H,Ue),Te;if(Le===null){for(;Ue<V.length;Ue++)Le=ce(H,V[Ue],de),Le!==null&&(U=y(Le,U,Ue),Oe===null?Te=Le:Oe.sibling=Le,Oe=Le);return xt&&Po(H,Ue),Te}for(Le=u(H,Le);Ue<V.length;Ue++)Gt=xe(Le,H,Ue,V[Ue],de),Gt!==null&&(t&&Gt.alternate!==null&&Le.delete(Gt.key===null?Ue:Gt.key),U=y(Gt,U,Ue),Oe===null?Te=Gt:Oe.sibling=Gt,Oe=Gt);return t&&Le.forEach(function(qs){return r(H,qs)}),xt&&Po(H,Ue),Te}function Re(H,U,V,de){var Te=se(V);if(typeof Te!="function")throw Error(s(150));if(V=Te.call(V),V==null)throw Error(s(151));for(var Oe=Te=null,Le=U,Ue=U=0,Gt=null,nt=V.next();Le!==null&&!nt.done;Ue++,nt=V.next()){Le.index>Ue?(Gt=Le,Le=null):Gt=Le.sibling;var qs=ae(H,Le,nt.value,de);if(qs===null){Le===null&&(Le=Gt);break}t&&Le&&qs.alternate===null&&r(H,Le),U=y(qs,U,Ue),Oe===null?Te=qs:Oe.sibling=qs,Oe=qs,Le=Gt}if(nt.done)return a(H,Le),xt&&Po(H,Ue),Te;if(Le===null){for(;!nt.done;Ue++,nt=V.next())nt=ce(H,nt.value,de),nt!==null&&(U=y(nt,U,Ue),Oe===null?Te=nt:Oe.sibling=nt,Oe=nt);return xt&&Po(H,Ue),Te}for(Le=u(H,Le);!nt.done;Ue++,nt=V.next())nt=xe(Le,H,Ue,nt.value,de),nt!==null&&(t&&nt.alternate!==null&&Le.delete(nt.key===null?Ue:nt.key),U=y(nt,U,Ue),Oe===null?Te=nt:Oe.sibling=nt,Oe=nt);return t&&Le.forEach(function(cN){return r(H,cN)}),xt&&Po(H,Ue),Te}function Dt(H,U,V,de){if(typeof V=="object"&&V!==null&&V.type===T&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case L:e:{for(var Te=V.key,Oe=U;Oe!==null;){if(Oe.key===Te){if(Te=V.type,Te===T){if(Oe.tag===7){a(H,Oe.sibling),U=h(Oe,V.props.children),U.return=H,H=U;break e}}else if(Oe.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===G&&Hp(Te)===Oe.type){a(H,Oe.sibling),U=h(Oe,V.props),U.ref=Di(H,Oe,V),U.return=H,H=U;break e}a(H,Oe);break}else r(H,Oe);Oe=Oe.sibling}V.type===T?(U=Lo(V.props.children,H.mode,de,V.key),U.return=H,H=U):(de=Nc(V.type,V.key,V.props,null,H.mode,de),de.ref=Di(H,U,V),de.return=H,H=de)}return j(H);case B:e:{for(Oe=V.key;U!==null;){if(U.key===Oe)if(U.tag===4&&U.stateNode.containerInfo===V.containerInfo&&U.stateNode.implementation===V.implementation){a(H,U.sibling),U=h(U,V.children||[]),U.return=H,H=U;break e}else{a(H,U);break}else r(H,U);U=U.sibling}U=pf(V,H.mode,de),U.return=H,H=U}return j(H);case G:return Oe=V._init,Dt(H,U,Oe(V._payload),de)}if(Xr(V))return Ne(H,U,V,de);if(se(V))return Re(H,U,V,de);Zl(H,V)}return typeof V=="string"&&V!==""||typeof V=="number"?(V=""+V,U!==null&&U.tag===6?(a(H,U.sibling),U=h(U,V),U.return=H,H=U):(a(H,U),U=hf(V,H.mode,de),U.return=H,H=U),j(H)):a(H,U)}return Dt}var ja=Vp(!0),Wp=Vp(!1),ec=Ls(null),tc=null,Ca=null,Nd=null;function jd(){Nd=Ca=tc=null}function Cd(t){var r=ec.current;gt(ec),t._currentValue=r}function Ed(t,r,a){for(;t!==null;){var u=t.alternate;if((t.childLanes&r)!==r?(t.childLanes|=r,u!==null&&(u.childLanes|=r)):u!==null&&(u.childLanes&r)!==r&&(u.childLanes|=r),t===a)break;t=t.return}}function Ea(t,r){tc=t,Nd=Ca=null,t=t.dependencies,t!==null&&t.firstContext!==null&&((t.lanes&r)!==0&&(Cn=!0),t.firstContext=null)}function Gn(t){var r=t._currentValue;if(Nd!==t)if(t={context:t,memoizedValue:r,next:null},Ca===null){if(tc===null)throw Error(s(308));Ca=t,tc.dependencies={lanes:0,firstContext:t}}else Ca=Ca.next=t;return r}var To=null;function kd(t){To===null?To=[t]:To.push(t)}function Kp(t,r,a,u){var h=r.interleaved;return h===null?(a.next=a,kd(r)):(a.next=h.next,h.next=a),r.interleaved=a,ls(t,u)}function ls(t,r){t.lanes|=r;var a=t.alternate;for(a!==null&&(a.lanes|=r),a=t,t=t.return;t!==null;)t.childLanes|=r,a=t.alternate,a!==null&&(a.childLanes|=r),a=t,t=t.return;return a.tag===3?a.stateNode:null}var $s=!1;function Rd(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Qp(t,r){t=t.updateQueue,r.updateQueue===t&&(r.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function cs(t,r){return{eventTime:t,lane:r,tag:0,payload:null,callback:null,next:null}}function Us(t,r,a){var u=t.updateQueue;if(u===null)return null;if(u=u.shared,(tt&2)!==0){var h=u.pending;return h===null?r.next=r:(r.next=h.next,h.next=r),u.pending=r,ls(t,a)}return h=u.interleaved,h===null?(r.next=r,kd(u)):(r.next=h.next,h.next=r),u.interleaved=r,ls(t,a)}function nc(t,r,a){if(r=r.updateQueue,r!==null&&(r=r.shared,(a&4194240)!==0)){var u=r.lanes;u&=t.pendingLanes,a|=u,r.lanes=a,Bu(t,a)}}function qp(t,r){var a=t.updateQueue,u=t.alternate;if(u!==null&&(u=u.updateQueue,a===u)){var h=null,y=null;if(a=a.firstBaseUpdate,a!==null){do{var j={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};y===null?h=y=j:y=y.next=j,a=a.next}while(a!==null);y===null?h=y=r:y=y.next=r}else h=y=r;a={baseState:u.baseState,firstBaseUpdate:h,lastBaseUpdate:y,shared:u.shared,effects:u.effects},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=r:t.next=r,a.lastBaseUpdate=r}function rc(t,r,a,u){var h=t.updateQueue;$s=!1;var y=h.firstBaseUpdate,j=h.lastBaseUpdate,_=h.shared.pending;if(_!==null){h.shared.pending=null;var z=_,Q=z.next;z.next=null,j===null?y=Q:j.next=Q,j=z;var le=t.alternate;le!==null&&(le=le.updateQueue,_=le.lastBaseUpdate,_!==j&&(_===null?le.firstBaseUpdate=Q:_.next=Q,le.lastBaseUpdate=z))}if(y!==null){var ce=h.baseState;j=0,le=Q=z=null,_=y;do{var ae=_.lane,xe=_.eventTime;if((u&ae)===ae){le!==null&&(le=le.next={eventTime:xe,lane:0,tag:_.tag,payload:_.payload,callback:_.callback,next:null});e:{var Ne=t,Re=_;switch(ae=r,xe=a,Re.tag){case 1:if(Ne=Re.payload,typeof Ne=="function"){ce=Ne.call(xe,ce,ae);break e}ce=Ne;break e;case 3:Ne.flags=Ne.flags&-65537|128;case 0:if(Ne=Re.payload,ae=typeof Ne=="function"?Ne.call(xe,ce,ae):Ne,ae==null)break e;ce=ne({},ce,ae);break e;case 2:$s=!0}}_.callback!==null&&_.lane!==0&&(t.flags|=64,ae=h.effects,ae===null?h.effects=[_]:ae.push(_))}else xe={eventTime:xe,lane:ae,tag:_.tag,payload:_.payload,callback:_.callback,next:null},le===null?(Q=le=xe,z=ce):le=le.next=xe,j|=ae;if(_=_.next,_===null){if(_=h.shared.pending,_===null)break;ae=_,_=ae.next,ae.next=null,h.lastBaseUpdate=ae,h.shared.pending=null}}while(!0);if(le===null&&(z=ce),h.baseState=z,h.firstBaseUpdate=Q,h.lastBaseUpdate=le,r=h.shared.interleaved,r!==null){h=r;do j|=h.lane,h=h.next;while(h!==r)}else y===null&&(h.shared.lanes=0);Mo|=j,t.lanes=j,t.memoizedState=ce}}function Yp(t,r,a){if(t=r.effects,r.effects=null,t!==null)for(r=0;r<t.length;r++){var u=t[r],h=u.callback;if(h!==null){if(u.callback=null,u=a,typeof h!="function")throw Error(s(191,h));h.call(u)}}}var Oi={},_r=Ls(Oi),Li=Ls(Oi),zi=Ls(Oi);function _o(t){if(t===Oi)throw Error(s(174));return t}function Pd(t,r){switch(mt(zi,r),mt(Li,t),mt(_r,Oi),t=r.nodeType,t){case 9:case 11:r=(r=r.documentElement)?r.namespaceURI:Jr(null,"");break;default:t=t===8?r.parentNode:r,r=t.namespaceURI||null,t=t.tagName,r=Jr(r,t)}gt(_r),mt(_r,r)}function ka(){gt(_r),gt(Li),gt(zi)}function Gp(t){_o(zi.current);var r=_o(_r.current),a=Jr(r,t.type);r!==a&&(mt(Li,t),mt(_r,a))}function Td(t){Li.current===t&&(gt(_r),gt(Li))}var Nt=Ls(0);function sc(t){for(var r=t;r!==null;){if(r.tag===13){var a=r.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var _d=[];function Ad(){for(var t=0;t<_d.length;t++)_d[t]._workInProgressVersionPrimary=null;_d.length=0}var oc=R.ReactCurrentDispatcher,Md=R.ReactCurrentBatchConfig,Ao=0,jt=null,Bt=null,qt=null,ac=!1,Fi=!1,$i=0,_S=0;function ln(){throw Error(s(321))}function Id(t,r){if(r===null)return!1;for(var a=0;a<r.length&&a<t.length;a++)if(!dr(t[a],r[a]))return!1;return!0}function Dd(t,r,a,u,h,y){if(Ao=y,jt=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,oc.current=t===null||t.memoizedState===null?DS:OS,t=a(u,h),Fi){y=0;do{if(Fi=!1,$i=0,25<=y)throw Error(s(301));y+=1,qt=Bt=null,r.updateQueue=null,oc.current=LS,t=a(u,h)}while(Fi)}if(oc.current=cc,r=Bt!==null&&Bt.next!==null,Ao=0,qt=Bt=jt=null,ac=!1,r)throw Error(s(300));return t}function Od(){var t=$i!==0;return $i=0,t}function Ar(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qt===null?jt.memoizedState=qt=t:qt=qt.next=t,qt}function Xn(){if(Bt===null){var t=jt.alternate;t=t!==null?t.memoizedState:null}else t=Bt.next;var r=qt===null?jt.memoizedState:qt.next;if(r!==null)qt=r,Bt=t;else{if(t===null)throw Error(s(310));Bt=t,t={memoizedState:Bt.memoizedState,baseState:Bt.baseState,baseQueue:Bt.baseQueue,queue:Bt.queue,next:null},qt===null?jt.memoizedState=qt=t:qt=qt.next=t}return qt}function Ui(t,r){return typeof r=="function"?r(t):r}function Ld(t){var r=Xn(),a=r.queue;if(a===null)throw Error(s(311));a.lastRenderedReducer=t;var u=Bt,h=u.baseQueue,y=a.pending;if(y!==null){if(h!==null){var j=h.next;h.next=y.next,y.next=j}u.baseQueue=h=y,a.pending=null}if(h!==null){y=h.next,u=u.baseState;var _=j=null,z=null,Q=y;do{var le=Q.lane;if((Ao&le)===le)z!==null&&(z=z.next={lane:0,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),u=Q.hasEagerState?Q.eagerState:t(u,Q.action);else{var ce={lane:le,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null};z===null?(_=z=ce,j=u):z=z.next=ce,jt.lanes|=le,Mo|=le}Q=Q.next}while(Q!==null&&Q!==y);z===null?j=u:z.next=_,dr(u,r.memoizedState)||(Cn=!0),r.memoizedState=u,r.baseState=j,r.baseQueue=z,a.lastRenderedState=u}if(t=a.interleaved,t!==null){h=t;do y=h.lane,jt.lanes|=y,Mo|=y,h=h.next;while(h!==t)}else h===null&&(a.lanes=0);return[r.memoizedState,a.dispatch]}function zd(t){var r=Xn(),a=r.queue;if(a===null)throw Error(s(311));a.lastRenderedReducer=t;var u=a.dispatch,h=a.pending,y=r.memoizedState;if(h!==null){a.pending=null;var j=h=h.next;do y=t(y,j.action),j=j.next;while(j!==h);dr(y,r.memoizedState)||(Cn=!0),r.memoizedState=y,r.baseQueue===null&&(r.baseState=y),a.lastRenderedState=y}return[y,u]}function Xp(){}function Jp(t,r){var a=jt,u=Xn(),h=r(),y=!dr(u.memoizedState,h);if(y&&(u.memoizedState=h,Cn=!0),u=u.queue,Fd(tg.bind(null,a,u,t),[t]),u.getSnapshot!==r||y||qt!==null&&qt.memoizedState.tag&1){if(a.flags|=2048,Bi(9,eg.bind(null,a,u,h,r),void 0,null),Yt===null)throw Error(s(349));(Ao&30)!==0||Zp(a,r,h)}return h}function Zp(t,r,a){t.flags|=16384,t={getSnapshot:r,value:a},r=jt.updateQueue,r===null?(r={lastEffect:null,stores:null},jt.updateQueue=r,r.stores=[t]):(a=r.stores,a===null?r.stores=[t]:a.push(t))}function eg(t,r,a,u){r.value=a,r.getSnapshot=u,ng(r)&&rg(t)}function tg(t,r,a){return a(function(){ng(r)&&rg(t)})}function ng(t){var r=t.getSnapshot;t=t.value;try{var a=r();return!dr(t,a)}catch{return!0}}function rg(t){var r=ls(t,1);r!==null&&gr(r,t,1,-1)}function sg(t){var r=Ar();return typeof t=="function"&&(t=t()),r.memoizedState=r.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ui,lastRenderedState:t},r.queue=t,t=t.dispatch=IS.bind(null,jt,t),[r.memoizedState,t]}function Bi(t,r,a,u){return t={tag:t,create:r,destroy:a,deps:u,next:null},r=jt.updateQueue,r===null?(r={lastEffect:null,stores:null},jt.updateQueue=r,r.lastEffect=t.next=t):(a=r.lastEffect,a===null?r.lastEffect=t.next=t:(u=a.next,a.next=t,t.next=u,r.lastEffect=t)),t}function og(){return Xn().memoizedState}function ic(t,r,a,u){var h=Ar();jt.flags|=t,h.memoizedState=Bi(1|r,a,void 0,u===void 0?null:u)}function lc(t,r,a,u){var h=Xn();u=u===void 0?null:u;var y=void 0;if(Bt!==null){var j=Bt.memoizedState;if(y=j.destroy,u!==null&&Id(u,j.deps)){h.memoizedState=Bi(r,a,y,u);return}}jt.flags|=t,h.memoizedState=Bi(1|r,a,y,u)}function ag(t,r){return ic(8390656,8,t,r)}function Fd(t,r){return lc(2048,8,t,r)}function ig(t,r){return lc(4,2,t,r)}function lg(t,r){return lc(4,4,t,r)}function cg(t,r){if(typeof r=="function")return t=t(),r(t),function(){r(null)};if(r!=null)return t=t(),r.current=t,function(){r.current=null}}function ug(t,r,a){return a=a!=null?a.concat([t]):null,lc(4,4,cg.bind(null,r,t),a)}function $d(){}function dg(t,r){var a=Xn();r=r===void 0?null:r;var u=a.memoizedState;return u!==null&&r!==null&&Id(r,u[1])?u[0]:(a.memoizedState=[t,r],t)}function fg(t,r){var a=Xn();r=r===void 0?null:r;var u=a.memoizedState;return u!==null&&r!==null&&Id(r,u[1])?u[0]:(t=t(),a.memoizedState=[t,r],t)}function mg(t,r,a){return(Ao&21)===0?(t.baseState&&(t.baseState=!1,Cn=!0),t.memoizedState=a):(dr(a,r)||(a=Hh(),jt.lanes|=a,Mo|=a,t.baseState=!0),r)}function AS(t,r){var a=it;it=a!==0&&4>a?a:4,t(!0);var u=Md.transition;Md.transition={};try{t(!1),r()}finally{it=a,Md.transition=u}}function hg(){return Xn().memoizedState}function MS(t,r,a){var u=Ws(t);if(a={lane:u,action:a,hasEagerState:!1,eagerState:null,next:null},pg(t))gg(r,a);else if(a=Kp(t,r,a,u),a!==null){var h=yn();gr(a,t,u,h),vg(a,r,u)}}function IS(t,r,a){var u=Ws(t),h={lane:u,action:a,hasEagerState:!1,eagerState:null,next:null};if(pg(t))gg(r,h);else{var y=t.alternate;if(t.lanes===0&&(y===null||y.lanes===0)&&(y=r.lastRenderedReducer,y!==null))try{var j=r.lastRenderedState,_=y(j,a);if(h.hasEagerState=!0,h.eagerState=_,dr(_,j)){var z=r.interleaved;z===null?(h.next=h,kd(r)):(h.next=z.next,z.next=h),r.interleaved=h;return}}catch{}finally{}a=Kp(t,r,h,u),a!==null&&(h=yn(),gr(a,t,u,h),vg(a,r,u))}}function pg(t){var r=t.alternate;return t===jt||r!==null&&r===jt}function gg(t,r){Fi=ac=!0;var a=t.pending;a===null?r.next=r:(r.next=a.next,a.next=r),t.pending=r}function vg(t,r,a){if((a&4194240)!==0){var u=r.lanes;u&=t.pendingLanes,a|=u,r.lanes=a,Bu(t,a)}}var cc={readContext:Gn,useCallback:ln,useContext:ln,useEffect:ln,useImperativeHandle:ln,useInsertionEffect:ln,useLayoutEffect:ln,useMemo:ln,useReducer:ln,useRef:ln,useState:ln,useDebugValue:ln,useDeferredValue:ln,useTransition:ln,useMutableSource:ln,useSyncExternalStore:ln,useId:ln,unstable_isNewReconciler:!1},DS={readContext:Gn,useCallback:function(t,r){return Ar().memoizedState=[t,r===void 0?null:r],t},useContext:Gn,useEffect:ag,useImperativeHandle:function(t,r,a){return a=a!=null?a.concat([t]):null,ic(4194308,4,cg.bind(null,r,t),a)},useLayoutEffect:function(t,r){return ic(4194308,4,t,r)},useInsertionEffect:function(t,r){return ic(4,2,t,r)},useMemo:function(t,r){var a=Ar();return r=r===void 0?null:r,t=t(),a.memoizedState=[t,r],t},useReducer:function(t,r,a){var u=Ar();return r=a!==void 0?a(r):r,u.memoizedState=u.baseState=r,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:r},u.queue=t,t=t.dispatch=MS.bind(null,jt,t),[u.memoizedState,t]},useRef:function(t){var r=Ar();return t={current:t},r.memoizedState=t},useState:sg,useDebugValue:$d,useDeferredValue:function(t){return Ar().memoizedState=t},useTransition:function(){var t=sg(!1),r=t[0];return t=AS.bind(null,t[1]),Ar().memoizedState=t,[r,t]},useMutableSource:function(){},useSyncExternalStore:function(t,r,a){var u=jt,h=Ar();if(xt){if(a===void 0)throw Error(s(407));a=a()}else{if(a=r(),Yt===null)throw Error(s(349));(Ao&30)!==0||Zp(u,r,a)}h.memoizedState=a;var y={value:a,getSnapshot:r};return h.queue=y,ag(tg.bind(null,u,y,t),[t]),u.flags|=2048,Bi(9,eg.bind(null,u,y,a,r),void 0,null),a},useId:function(){var t=Ar(),r=Yt.identifierPrefix;if(xt){var a=is,u=as;a=(u&~(1<<32-ut(u)-1)).toString(32)+a,r=":"+r+"R"+a,a=$i++,0<a&&(r+="H"+a.toString(32)),r+=":"}else a=_S++,r=":"+r+"r"+a.toString(32)+":";return t.memoizedState=r},unstable_isNewReconciler:!1},OS={readContext:Gn,useCallback:dg,useContext:Gn,useEffect:Fd,useImperativeHandle:ug,useInsertionEffect:ig,useLayoutEffect:lg,useMemo:fg,useReducer:Ld,useRef:og,useState:function(){return Ld(Ui)},useDebugValue:$d,useDeferredValue:function(t){var r=Xn();return mg(r,Bt.memoizedState,t)},useTransition:function(){var t=Ld(Ui)[0],r=Xn().memoizedState;return[t,r]},useMutableSource:Xp,useSyncExternalStore:Jp,useId:hg,unstable_isNewReconciler:!1},LS={readContext:Gn,useCallback:dg,useContext:Gn,useEffect:Fd,useImperativeHandle:ug,useInsertionEffect:ig,useLayoutEffect:lg,useMemo:fg,useReducer:zd,useRef:og,useState:function(){return zd(Ui)},useDebugValue:$d,useDeferredValue:function(t){var r=Xn();return Bt===null?r.memoizedState=t:mg(r,Bt.memoizedState,t)},useTransition:function(){var t=zd(Ui)[0],r=Xn().memoizedState;return[t,r]},useMutableSource:Xp,useSyncExternalStore:Jp,useId:hg,unstable_isNewReconciler:!1};function mr(t,r){if(t&&t.defaultProps){r=ne({},r),t=t.defaultProps;for(var a in t)r[a]===void 0&&(r[a]=t[a]);return r}return r}function Ud(t,r,a,u){r=t.memoizedState,a=a(u,r),a=a==null?r:ne({},r,a),t.memoizedState=a,t.lanes===0&&(t.updateQueue.baseState=a)}var uc={isMounted:function(t){return(t=t._reactInternals)?ke(t)===t:!1},enqueueSetState:function(t,r,a){t=t._reactInternals;var u=yn(),h=Ws(t),y=cs(u,h);y.payload=r,a!=null&&(y.callback=a),r=Us(t,y,h),r!==null&&(gr(r,t,h,u),nc(r,t,h))},enqueueReplaceState:function(t,r,a){t=t._reactInternals;var u=yn(),h=Ws(t),y=cs(u,h);y.tag=1,y.payload=r,a!=null&&(y.callback=a),r=Us(t,y,h),r!==null&&(gr(r,t,h,u),nc(r,t,h))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var a=yn(),u=Ws(t),h=cs(a,u);h.tag=2,r!=null&&(h.callback=r),r=Us(t,h,u),r!==null&&(gr(r,t,u,a),nc(r,t,u))}};function yg(t,r,a,u,h,y,j){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(u,y,j):r.prototype&&r.prototype.isPureReactComponent?!Ri(a,u)||!Ri(h,y):!0}function xg(t,r,a){var u=!1,h=zs,y=r.contextType;return typeof y=="object"&&y!==null?y=Gn(y):(h=jn(r)?ko:an.current,u=r.contextTypes,y=(u=u!=null)?wa(t,h):zs),r=new r(a,y),t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=uc,t.stateNode=r,r._reactInternals=t,u&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=h,t.__reactInternalMemoizedMaskedChildContext=y),r}function wg(t,r,a,u){t=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(a,u),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(a,u),r.state!==t&&uc.enqueueReplaceState(r,r.state,null)}function Bd(t,r,a,u){var h=t.stateNode;h.props=a,h.state=t.memoizedState,h.refs={},Rd(t);var y=r.contextType;typeof y=="object"&&y!==null?h.context=Gn(y):(y=jn(r)?ko:an.current,h.context=wa(t,y)),h.state=t.memoizedState,y=r.getDerivedStateFromProps,typeof y=="function"&&(Ud(t,r,y,a),h.state=t.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(r=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),r!==h.state&&uc.enqueueReplaceState(h,h.state,null),rc(t,a,h,u),h.state=t.memoizedState),typeof h.componentDidMount=="function"&&(t.flags|=4194308)}function Ra(t,r){try{var a="",u=r;do a+=ee(u),u=u.return;while(u);var h=a}catch(y){h=`
|
|
39
|
+
Error generating stack: `+y.message+`
|
|
40
|
+
`+y.stack}return{value:t,source:r,stack:h,digest:null}}function Hd(t,r,a){return{value:t,source:null,stack:a??null,digest:r??null}}function Vd(t,r){try{console.error(r.value)}catch(a){setTimeout(function(){throw a})}}var zS=typeof WeakMap=="function"?WeakMap:Map;function bg(t,r,a){a=cs(-1,a),a.tag=3,a.payload={element:null};var u=r.value;return a.callback=function(){vc||(vc=!0,of=u),Vd(t,r)},a}function Sg(t,r,a){a=cs(-1,a),a.tag=3;var u=t.type.getDerivedStateFromError;if(typeof u=="function"){var h=r.value;a.payload=function(){return u(h)},a.callback=function(){Vd(t,r)}}var y=t.stateNode;return y!==null&&typeof y.componentDidCatch=="function"&&(a.callback=function(){Vd(t,r),typeof u!="function"&&(Hs===null?Hs=new Set([this]):Hs.add(this));var j=r.stack;this.componentDidCatch(r.value,{componentStack:j!==null?j:""})}),a}function Ng(t,r,a){var u=t.pingCache;if(u===null){u=t.pingCache=new zS;var h=new Set;u.set(r,h)}else h=u.get(r),h===void 0&&(h=new Set,u.set(r,h));h.has(a)||(h.add(a),t=JS.bind(null,t,r,a),r.then(t,t))}function jg(t){do{var r;if((r=t.tag===13)&&(r=t.memoizedState,r=r!==null?r.dehydrated!==null:!0),r)return t;t=t.return}while(t!==null);return null}function Cg(t,r,a,u,h){return(t.mode&1)===0?(t===r?t.flags|=65536:(t.flags|=128,a.flags|=131072,a.flags&=-52805,a.tag===1&&(a.alternate===null?a.tag=17:(r=cs(-1,1),r.tag=2,Us(a,r,1))),a.lanes|=1),t):(t.flags|=65536,t.lanes=h,t)}var FS=R.ReactCurrentOwner,Cn=!1;function vn(t,r,a,u){r.child=t===null?Wp(r,null,a,u):ja(r,t.child,a,u)}function Eg(t,r,a,u,h){a=a.render;var y=r.ref;return Ea(r,h),u=Dd(t,r,a,u,y,h),a=Od(),t!==null&&!Cn?(r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~h,us(t,r,h)):(xt&&a&&yd(r),r.flags|=1,vn(t,r,u,h),r.child)}function kg(t,r,a,u,h){if(t===null){var y=a.type;return typeof y=="function"&&!mf(y)&&y.defaultProps===void 0&&a.compare===null&&a.defaultProps===void 0?(r.tag=15,r.type=y,Rg(t,r,y,u,h)):(t=Nc(a.type,null,u,r,r.mode,h),t.ref=r.ref,t.return=r,r.child=t)}if(y=t.child,(t.lanes&h)===0){var j=y.memoizedProps;if(a=a.compare,a=a!==null?a:Ri,a(j,u)&&t.ref===r.ref)return us(t,r,h)}return r.flags|=1,t=Qs(y,u),t.ref=r.ref,t.return=r,r.child=t}function Rg(t,r,a,u,h){if(t!==null){var y=t.memoizedProps;if(Ri(y,u)&&t.ref===r.ref)if(Cn=!1,r.pendingProps=u=y,(t.lanes&h)!==0)(t.flags&131072)!==0&&(Cn=!0);else return r.lanes=t.lanes,us(t,r,h)}return Wd(t,r,a,u,h)}function Pg(t,r,a){var u=r.pendingProps,h=u.children,y=t!==null?t.memoizedState:null;if(u.mode==="hidden")if((r.mode&1)===0)r.memoizedState={baseLanes:0,cachePool:null,transitions:null},mt(Ta,Fn),Fn|=a;else{if((a&1073741824)===0)return t=y!==null?y.baseLanes|a:a,r.lanes=r.childLanes=1073741824,r.memoizedState={baseLanes:t,cachePool:null,transitions:null},r.updateQueue=null,mt(Ta,Fn),Fn|=t,null;r.memoizedState={baseLanes:0,cachePool:null,transitions:null},u=y!==null?y.baseLanes:a,mt(Ta,Fn),Fn|=u}else y!==null?(u=y.baseLanes|a,r.memoizedState=null):u=a,mt(Ta,Fn),Fn|=u;return vn(t,r,h,a),r.child}function Tg(t,r){var a=r.ref;(t===null&&a!==null||t!==null&&t.ref!==a)&&(r.flags|=512,r.flags|=2097152)}function Wd(t,r,a,u,h){var y=jn(a)?ko:an.current;return y=wa(r,y),Ea(r,h),a=Dd(t,r,a,u,y,h),u=Od(),t!==null&&!Cn?(r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~h,us(t,r,h)):(xt&&u&&yd(r),r.flags|=1,vn(t,r,a,h),r.child)}function _g(t,r,a,u,h){if(jn(a)){var y=!0;ql(r)}else y=!1;if(Ea(r,h),r.stateNode===null)fc(t,r),xg(r,a,u),Bd(r,a,u,h),u=!0;else if(t===null){var j=r.stateNode,_=r.memoizedProps;j.props=_;var z=j.context,Q=a.contextType;typeof Q=="object"&&Q!==null?Q=Gn(Q):(Q=jn(a)?ko:an.current,Q=wa(r,Q));var le=a.getDerivedStateFromProps,ce=typeof le=="function"||typeof j.getSnapshotBeforeUpdate=="function";ce||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(_!==u||z!==Q)&&wg(r,j,u,Q),$s=!1;var ae=r.memoizedState;j.state=ae,rc(r,u,j,h),z=r.memoizedState,_!==u||ae!==z||Nn.current||$s?(typeof le=="function"&&(Ud(r,a,le,u),z=r.memoizedState),(_=$s||yg(r,a,_,u,ae,z,Q))?(ce||typeof j.UNSAFE_componentWillMount!="function"&&typeof j.componentWillMount!="function"||(typeof j.componentWillMount=="function"&&j.componentWillMount(),typeof j.UNSAFE_componentWillMount=="function"&&j.UNSAFE_componentWillMount()),typeof j.componentDidMount=="function"&&(r.flags|=4194308)):(typeof j.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=u,r.memoizedState=z),j.props=u,j.state=z,j.context=Q,u=_):(typeof j.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{j=r.stateNode,Qp(t,r),_=r.memoizedProps,Q=r.type===r.elementType?_:mr(r.type,_),j.props=Q,ce=r.pendingProps,ae=j.context,z=a.contextType,typeof z=="object"&&z!==null?z=Gn(z):(z=jn(a)?ko:an.current,z=wa(r,z));var xe=a.getDerivedStateFromProps;(le=typeof xe=="function"||typeof j.getSnapshotBeforeUpdate=="function")||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(_!==ce||ae!==z)&&wg(r,j,u,z),$s=!1,ae=r.memoizedState,j.state=ae,rc(r,u,j,h);var Ne=r.memoizedState;_!==ce||ae!==Ne||Nn.current||$s?(typeof xe=="function"&&(Ud(r,a,xe,u),Ne=r.memoizedState),(Q=$s||yg(r,a,Q,u,ae,Ne,z)||!1)?(le||typeof j.UNSAFE_componentWillUpdate!="function"&&typeof j.componentWillUpdate!="function"||(typeof j.componentWillUpdate=="function"&&j.componentWillUpdate(u,Ne,z),typeof j.UNSAFE_componentWillUpdate=="function"&&j.UNSAFE_componentWillUpdate(u,Ne,z)),typeof j.componentDidUpdate=="function"&&(r.flags|=4),typeof j.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof j.componentDidUpdate!="function"||_===t.memoizedProps&&ae===t.memoizedState||(r.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||_===t.memoizedProps&&ae===t.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=Ne),j.props=u,j.state=Ne,j.context=z,u=Q):(typeof j.componentDidUpdate!="function"||_===t.memoizedProps&&ae===t.memoizedState||(r.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||_===t.memoizedProps&&ae===t.memoizedState||(r.flags|=1024),u=!1)}return Kd(t,r,a,u,y,h)}function Kd(t,r,a,u,h,y){Tg(t,r);var j=(r.flags&128)!==0;if(!u&&!j)return h&&Op(r,a,!1),us(t,r,y);u=r.stateNode,FS.current=r;var _=j&&typeof a.getDerivedStateFromError!="function"?null:u.render();return r.flags|=1,t!==null&&j?(r.child=ja(r,t.child,null,y),r.child=ja(r,null,_,y)):vn(t,r,_,y),r.memoizedState=u.state,h&&Op(r,a,!0),r.child}function Ag(t){var r=t.stateNode;r.pendingContext?Ip(t,r.pendingContext,r.pendingContext!==r.context):r.context&&Ip(t,r.context,!1),Pd(t,r.containerInfo)}function Mg(t,r,a,u,h){return Na(),Sd(h),r.flags|=256,vn(t,r,a,u),r.child}var Qd={dehydrated:null,treeContext:null,retryLane:0};function qd(t){return{baseLanes:t,cachePool:null,transitions:null}}function Ig(t,r,a){var u=r.pendingProps,h=Nt.current,y=!1,j=(r.flags&128)!==0,_;if((_=j)||(_=t!==null&&t.memoizedState===null?!1:(h&2)!==0),_?(y=!0,r.flags&=-129):(t===null||t.memoizedState!==null)&&(h|=1),mt(Nt,h&1),t===null)return bd(r),t=r.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?((r.mode&1)===0?r.lanes=1:t.data==="$!"?r.lanes=8:r.lanes=1073741824,null):(j=u.children,t=u.fallback,y?(u=r.mode,y=r.child,j={mode:"hidden",children:j},(u&1)===0&&y!==null?(y.childLanes=0,y.pendingProps=j):y=jc(j,u,0,null),t=Lo(t,u,a,null),y.return=r,t.return=r,y.sibling=t,r.child=y,r.child.memoizedState=qd(a),r.memoizedState=Qd,t):Yd(r,j));if(h=t.memoizedState,h!==null&&(_=h.dehydrated,_!==null))return $S(t,r,j,u,_,h,a);if(y){y=u.fallback,j=r.mode,h=t.child,_=h.sibling;var z={mode:"hidden",children:u.children};return(j&1)===0&&r.child!==h?(u=r.child,u.childLanes=0,u.pendingProps=z,r.deletions=null):(u=Qs(h,z),u.subtreeFlags=h.subtreeFlags&14680064),_!==null?y=Qs(_,y):(y=Lo(y,j,a,null),y.flags|=2),y.return=r,u.return=r,u.sibling=y,r.child=u,u=y,y=r.child,j=t.child.memoizedState,j=j===null?qd(a):{baseLanes:j.baseLanes|a,cachePool:null,transitions:j.transitions},y.memoizedState=j,y.childLanes=t.childLanes&~a,r.memoizedState=Qd,u}return y=t.child,t=y.sibling,u=Qs(y,{mode:"visible",children:u.children}),(r.mode&1)===0&&(u.lanes=a),u.return=r,u.sibling=null,t!==null&&(a=r.deletions,a===null?(r.deletions=[t],r.flags|=16):a.push(t)),r.child=u,r.memoizedState=null,u}function Yd(t,r){return r=jc({mode:"visible",children:r},t.mode,0,null),r.return=t,t.child=r}function dc(t,r,a,u){return u!==null&&Sd(u),ja(r,t.child,null,a),t=Yd(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function $S(t,r,a,u,h,y,j){if(a)return r.flags&256?(r.flags&=-257,u=Hd(Error(s(422))),dc(t,r,j,u)):r.memoizedState!==null?(r.child=t.child,r.flags|=128,null):(y=u.fallback,h=r.mode,u=jc({mode:"visible",children:u.children},h,0,null),y=Lo(y,h,j,null),y.flags|=2,u.return=r,y.return=r,u.sibling=y,r.child=u,(r.mode&1)!==0&&ja(r,t.child,null,j),r.child.memoizedState=qd(j),r.memoizedState=Qd,y);if((r.mode&1)===0)return dc(t,r,j,null);if(h.data==="$!"){if(u=h.nextSibling&&h.nextSibling.dataset,u)var _=u.dgst;return u=_,y=Error(s(419)),u=Hd(y,u,void 0),dc(t,r,j,u)}if(_=(j&t.childLanes)!==0,Cn||_){if(u=Yt,u!==null){switch(j&-j){case 4:h=2;break;case 16:h=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:h=32;break;case 536870912:h=268435456;break;default:h=0}h=(h&(u.suspendedLanes|j))!==0?0:h,h!==0&&h!==y.retryLane&&(y.retryLane=h,ls(t,h),gr(u,t,h,-1))}return ff(),u=Hd(Error(s(421))),dc(t,r,j,u)}return h.data==="$?"?(r.flags|=128,r.child=t.child,r=ZS.bind(null,t),h._reactRetry=r,null):(t=y.treeContext,zn=Os(h.nextSibling),Ln=r,xt=!0,fr=null,t!==null&&(qn[Yn++]=as,qn[Yn++]=is,qn[Yn++]=Ro,as=t.id,is=t.overflow,Ro=r),r=Yd(r,u.children),r.flags|=4096,r)}function Dg(t,r,a){t.lanes|=r;var u=t.alternate;u!==null&&(u.lanes|=r),Ed(t.return,r,a)}function Gd(t,r,a,u,h){var y=t.memoizedState;y===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:u,tail:a,tailMode:h}:(y.isBackwards=r,y.rendering=null,y.renderingStartTime=0,y.last=u,y.tail=a,y.tailMode=h)}function Og(t,r,a){var u=r.pendingProps,h=u.revealOrder,y=u.tail;if(vn(t,r,u.children,a),u=Nt.current,(u&2)!==0)u=u&1|2,r.flags|=128;else{if(t!==null&&(t.flags&128)!==0)e:for(t=r.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Dg(t,a,r);else if(t.tag===19)Dg(t,a,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break e;for(;t.sibling===null;){if(t.return===null||t.return===r)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}u&=1}if(mt(Nt,u),(r.mode&1)===0)r.memoizedState=null;else switch(h){case"forwards":for(a=r.child,h=null;a!==null;)t=a.alternate,t!==null&&sc(t)===null&&(h=a),a=a.sibling;a=h,a===null?(h=r.child,r.child=null):(h=a.sibling,a.sibling=null),Gd(r,!1,h,a,y);break;case"backwards":for(a=null,h=r.child,r.child=null;h!==null;){if(t=h.alternate,t!==null&&sc(t)===null){r.child=h;break}t=h.sibling,h.sibling=a,a=h,h=t}Gd(r,!0,a,null,y);break;case"together":Gd(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function fc(t,r){(r.mode&1)===0&&t!==null&&(t.alternate=null,r.alternate=null,r.flags|=2)}function us(t,r,a){if(t!==null&&(r.dependencies=t.dependencies),Mo|=r.lanes,(a&r.childLanes)===0)return null;if(t!==null&&r.child!==t.child)throw Error(s(153));if(r.child!==null){for(t=r.child,a=Qs(t,t.pendingProps),r.child=a,a.return=r;t.sibling!==null;)t=t.sibling,a=a.sibling=Qs(t,t.pendingProps),a.return=r;a.sibling=null}return r.child}function US(t,r,a){switch(r.tag){case 3:Ag(r),Na();break;case 5:Gp(r);break;case 1:jn(r.type)&&ql(r);break;case 4:Pd(r,r.stateNode.containerInfo);break;case 10:var u=r.type._context,h=r.memoizedProps.value;mt(ec,u._currentValue),u._currentValue=h;break;case 13:if(u=r.memoizedState,u!==null)return u.dehydrated!==null?(mt(Nt,Nt.current&1),r.flags|=128,null):(a&r.child.childLanes)!==0?Ig(t,r,a):(mt(Nt,Nt.current&1),t=us(t,r,a),t!==null?t.sibling:null);mt(Nt,Nt.current&1);break;case 19:if(u=(a&r.childLanes)!==0,(t.flags&128)!==0){if(u)return Og(t,r,a);r.flags|=128}if(h=r.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),mt(Nt,Nt.current),u)break;return null;case 22:case 23:return r.lanes=0,Pg(t,r,a)}return us(t,r,a)}var Lg,Xd,zg,Fg;Lg=function(t,r){for(var a=r.child;a!==null;){if(a.tag===5||a.tag===6)t.appendChild(a.stateNode);else if(a.tag!==4&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return;a=a.return}a.sibling.return=a.return,a=a.sibling}},Xd=function(){},zg=function(t,r,a,u){var h=t.memoizedProps;if(h!==u){t=r.stateNode,_o(_r.current);var y=null;switch(a){case"input":h=_t(t,h),u=_t(t,u),y=[];break;case"select":h=ne({},h,{value:void 0}),u=ne({},u,{value:void 0}),y=[];break;case"textarea":h=Ut(t,h),u=Ut(t,u),y=[];break;default:typeof h.onClick!="function"&&typeof u.onClick=="function"&&(t.onclick=Wl)}Zr(a,u);var j;a=null;for(Q in h)if(!u.hasOwnProperty(Q)&&h.hasOwnProperty(Q)&&h[Q]!=null)if(Q==="style"){var _=h[Q];for(j in _)_.hasOwnProperty(j)&&(a||(a={}),a[j]="")}else Q!=="dangerouslySetInnerHTML"&&Q!=="children"&&Q!=="suppressContentEditableWarning"&&Q!=="suppressHydrationWarning"&&Q!=="autoFocus"&&(l.hasOwnProperty(Q)?y||(y=[]):(y=y||[]).push(Q,null));for(Q in u){var z=u[Q];if(_=h!=null?h[Q]:void 0,u.hasOwnProperty(Q)&&z!==_&&(z!=null||_!=null))if(Q==="style")if(_){for(j in _)!_.hasOwnProperty(j)||z&&z.hasOwnProperty(j)||(a||(a={}),a[j]="");for(j in z)z.hasOwnProperty(j)&&_[j]!==z[j]&&(a||(a={}),a[j]=z[j])}else a||(y||(y=[]),y.push(Q,a)),a=z;else Q==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,_=_?_.__html:void 0,z!=null&&_!==z&&(y=y||[]).push(Q,z)):Q==="children"?typeof z!="string"&&typeof z!="number"||(y=y||[]).push(Q,""+z):Q!=="suppressContentEditableWarning"&&Q!=="suppressHydrationWarning"&&(l.hasOwnProperty(Q)?(z!=null&&Q==="onScroll"&&pt("scroll",t),y||_===z||(y=[])):(y=y||[]).push(Q,z))}a&&(y=y||[]).push("style",a);var Q=y;(r.updateQueue=Q)&&(r.flags|=4)}},Fg=function(t,r,a,u){a!==u&&(r.flags|=4)};function Hi(t,r){if(!xt)switch(t.tailMode){case"hidden":r=t.tail;for(var a=null;r!==null;)r.alternate!==null&&(a=r),r=r.sibling;a===null?t.tail=null:a.sibling=null;break;case"collapsed":a=t.tail;for(var u=null;a!==null;)a.alternate!==null&&(u=a),a=a.sibling;u===null?r||t.tail===null?t.tail=null:t.tail.sibling=null:u.sibling=null}}function cn(t){var r=t.alternate!==null&&t.alternate.child===t.child,a=0,u=0;if(r)for(var h=t.child;h!==null;)a|=h.lanes|h.childLanes,u|=h.subtreeFlags&14680064,u|=h.flags&14680064,h.return=t,h=h.sibling;else for(h=t.child;h!==null;)a|=h.lanes|h.childLanes,u|=h.subtreeFlags,u|=h.flags,h.return=t,h=h.sibling;return t.subtreeFlags|=u,t.childLanes=a,r}function BS(t,r,a){var u=r.pendingProps;switch(xd(r),r.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return cn(r),null;case 1:return jn(r.type)&&Ql(),cn(r),null;case 3:return u=r.stateNode,ka(),gt(Nn),gt(an),Ad(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(t===null||t.child===null)&&(Jl(r)?r.flags|=4:t===null||t.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,fr!==null&&(cf(fr),fr=null))),Xd(t,r),cn(r),null;case 5:Td(r);var h=_o(zi.current);if(a=r.type,t!==null&&r.stateNode!=null)zg(t,r,a,u,h),t.ref!==r.ref&&(r.flags|=512,r.flags|=2097152);else{if(!u){if(r.stateNode===null)throw Error(s(166));return cn(r),null}if(t=_o(_r.current),Jl(r)){u=r.stateNode,a=r.type;var y=r.memoizedProps;switch(u[Tr]=r,u[Mi]=y,t=(r.mode&1)!==0,a){case"dialog":pt("cancel",u),pt("close",u);break;case"iframe":case"object":case"embed":pt("load",u);break;case"video":case"audio":for(h=0;h<Ti.length;h++)pt(Ti[h],u);break;case"source":pt("error",u);break;case"img":case"image":case"link":pt("error",u),pt("load",u);break;case"details":pt("toggle",u);break;case"input":Vn(u,y),pt("invalid",u);break;case"select":u._wrapperState={wasMultiple:!!y.multiple},pt("invalid",u);break;case"textarea":cr(u,y),pt("invalid",u)}Zr(a,y),h=null;for(var j in y)if(y.hasOwnProperty(j)){var _=y[j];j==="children"?typeof _=="string"?u.textContent!==_&&(y.suppressHydrationWarning!==!0&&Vl(u.textContent,_,t),h=["children",_]):typeof _=="number"&&u.textContent!==""+_&&(y.suppressHydrationWarning!==!0&&Vl(u.textContent,_,t),h=["children",""+_]):l.hasOwnProperty(j)&&_!=null&&j==="onScroll"&&pt("scroll",u)}switch(a){case"input":Ke(u),Gr(u,y,!0);break;case"textarea":Ke(u),jr(u);break;case"select":case"option":break;default:typeof y.onClick=="function"&&(u.onclick=Wl)}u=h,r.updateQueue=u,u!==null&&(r.flags|=4)}else{j=h.nodeType===9?h:h.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=Cr(a)),t==="http://www.w3.org/1999/xhtml"?a==="script"?(t=j.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof u.is=="string"?t=j.createElement(a,{is:u.is}):(t=j.createElement(a),a==="select"&&(j=t,u.multiple?j.multiple=!0:u.size&&(j.size=u.size))):t=j.createElementNS(t,a),t[Tr]=r,t[Mi]=u,Lg(t,r,!1,!1),r.stateNode=t;e:{switch(j=ks(a,u),a){case"dialog":pt("cancel",t),pt("close",t),h=u;break;case"iframe":case"object":case"embed":pt("load",t),h=u;break;case"video":case"audio":for(h=0;h<Ti.length;h++)pt(Ti[h],t);h=u;break;case"source":pt("error",t),h=u;break;case"img":case"image":case"link":pt("error",t),pt("load",t),h=u;break;case"details":pt("toggle",t),h=u;break;case"input":Vn(t,u),h=_t(t,u),pt("invalid",t);break;case"option":h=u;break;case"select":t._wrapperState={wasMultiple:!!u.multiple},h=ne({},u,{value:void 0}),pt("invalid",t);break;case"textarea":cr(t,u),h=Ut(t,u),pt("invalid",t);break;default:h=u}Zr(a,h),_=h;for(y in _)if(_.hasOwnProperty(y)){var z=_[y];y==="style"?bn(t,z):y==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,z!=null&&on(t,z)):y==="children"?typeof z=="string"?(a!=="textarea"||z!=="")&&hn(t,z):typeof z=="number"&&hn(t,""+z):y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&y!=="autoFocus"&&(l.hasOwnProperty(y)?z!=null&&y==="onScroll"&&pt("scroll",t):z!=null&&E(t,y,z,j))}switch(a){case"input":Ke(t),Gr(t,u,!1);break;case"textarea":Ke(t),jr(t);break;case"option":u.value!=null&&t.setAttribute("value",""+he(u.value));break;case"select":t.multiple=!!u.multiple,y=u.value,y!=null?Nr(t,!!u.multiple,y,!1):u.defaultValue!=null&&Nr(t,!!u.multiple,u.defaultValue,!0);break;default:typeof h.onClick=="function"&&(t.onclick=Wl)}switch(a){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}}u&&(r.flags|=4)}r.ref!==null&&(r.flags|=512,r.flags|=2097152)}return cn(r),null;case 6:if(t&&r.stateNode!=null)Fg(t,r,t.memoizedProps,u);else{if(typeof u!="string"&&r.stateNode===null)throw Error(s(166));if(a=_o(zi.current),_o(_r.current),Jl(r)){if(u=r.stateNode,a=r.memoizedProps,u[Tr]=r,(y=u.nodeValue!==a)&&(t=Ln,t!==null))switch(t.tag){case 3:Vl(u.nodeValue,a,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&Vl(u.nodeValue,a,(t.mode&1)!==0)}y&&(r.flags|=4)}else u=(a.nodeType===9?a:a.ownerDocument).createTextNode(u),u[Tr]=r,r.stateNode=u}return cn(r),null;case 13:if(gt(Nt),u=r.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(xt&&zn!==null&&(r.mode&1)!==0&&(r.flags&128)===0)Bp(),Na(),r.flags|=98560,y=!1;else if(y=Jl(r),u!==null&&u.dehydrated!==null){if(t===null){if(!y)throw Error(s(318));if(y=r.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(s(317));y[Tr]=r}else Na(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;cn(r),y=!1}else fr!==null&&(cf(fr),fr=null),y=!0;if(!y)return r.flags&65536?r:null}return(r.flags&128)!==0?(r.lanes=a,r):(u=u!==null,u!==(t!==null&&t.memoizedState!==null)&&u&&(r.child.flags|=8192,(r.mode&1)!==0&&(t===null||(Nt.current&1)!==0?Ht===0&&(Ht=3):ff())),r.updateQueue!==null&&(r.flags|=4),cn(r),null);case 4:return ka(),Xd(t,r),t===null&&_i(r.stateNode.containerInfo),cn(r),null;case 10:return Cd(r.type._context),cn(r),null;case 17:return jn(r.type)&&Ql(),cn(r),null;case 19:if(gt(Nt),y=r.memoizedState,y===null)return cn(r),null;if(u=(r.flags&128)!==0,j=y.rendering,j===null)if(u)Hi(y,!1);else{if(Ht!==0||t!==null&&(t.flags&128)!==0)for(t=r.child;t!==null;){if(j=sc(t),j!==null){for(r.flags|=128,Hi(y,!1),u=j.updateQueue,u!==null&&(r.updateQueue=u,r.flags|=4),r.subtreeFlags=0,u=a,a=r.child;a!==null;)y=a,t=u,y.flags&=14680066,j=y.alternate,j===null?(y.childLanes=0,y.lanes=t,y.child=null,y.subtreeFlags=0,y.memoizedProps=null,y.memoizedState=null,y.updateQueue=null,y.dependencies=null,y.stateNode=null):(y.childLanes=j.childLanes,y.lanes=j.lanes,y.child=j.child,y.subtreeFlags=0,y.deletions=null,y.memoizedProps=j.memoizedProps,y.memoizedState=j.memoizedState,y.updateQueue=j.updateQueue,y.type=j.type,t=j.dependencies,y.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),a=a.sibling;return mt(Nt,Nt.current&1|2),r.child}t=t.sibling}y.tail!==null&&at()>_a&&(r.flags|=128,u=!0,Hi(y,!1),r.lanes=4194304)}else{if(!u)if(t=sc(j),t!==null){if(r.flags|=128,u=!0,a=t.updateQueue,a!==null&&(r.updateQueue=a,r.flags|=4),Hi(y,!0),y.tail===null&&y.tailMode==="hidden"&&!j.alternate&&!xt)return cn(r),null}else 2*at()-y.renderingStartTime>_a&&a!==1073741824&&(r.flags|=128,u=!0,Hi(y,!1),r.lanes=4194304);y.isBackwards?(j.sibling=r.child,r.child=j):(a=y.last,a!==null?a.sibling=j:r.child=j,y.last=j)}return y.tail!==null?(r=y.tail,y.rendering=r,y.tail=r.sibling,y.renderingStartTime=at(),r.sibling=null,a=Nt.current,mt(Nt,u?a&1|2:a&1),r):(cn(r),null);case 22:case 23:return df(),u=r.memoizedState!==null,t!==null&&t.memoizedState!==null!==u&&(r.flags|=8192),u&&(r.mode&1)!==0?(Fn&1073741824)!==0&&(cn(r),r.subtreeFlags&6&&(r.flags|=8192)):cn(r),null;case 24:return null;case 25:return null}throw Error(s(156,r.tag))}function HS(t,r){switch(xd(r),r.tag){case 1:return jn(r.type)&&Ql(),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return ka(),gt(Nn),gt(an),Ad(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 5:return Td(r),null;case 13:if(gt(Nt),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(s(340));Na()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return gt(Nt),null;case 4:return ka(),null;case 10:return Cd(r.type._context),null;case 22:case 23:return df(),null;case 24:return null;default:return null}}var mc=!1,un=!1,VS=typeof WeakSet=="function"?WeakSet:Set,be=null;function Pa(t,r){var a=t.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(u){Rt(t,r,u)}else a.current=null}function Jd(t,r,a){try{a()}catch(u){Rt(t,r,u)}}var $g=!1;function WS(t,r){if(ud=Ml,t=yp(),nd(t)){if("selectionStart"in t)var a={start:t.selectionStart,end:t.selectionEnd};else e:{a=(a=t.ownerDocument)&&a.defaultView||window;var u=a.getSelection&&a.getSelection();if(u&&u.rangeCount!==0){a=u.anchorNode;var h=u.anchorOffset,y=u.focusNode;u=u.focusOffset;try{a.nodeType,y.nodeType}catch{a=null;break e}var j=0,_=-1,z=-1,Q=0,le=0,ce=t,ae=null;t:for(;;){for(var xe;ce!==a||h!==0&&ce.nodeType!==3||(_=j+h),ce!==y||u!==0&&ce.nodeType!==3||(z=j+u),ce.nodeType===3&&(j+=ce.nodeValue.length),(xe=ce.firstChild)!==null;)ae=ce,ce=xe;for(;;){if(ce===t)break t;if(ae===a&&++Q===h&&(_=j),ae===y&&++le===u&&(z=j),(xe=ce.nextSibling)!==null)break;ce=ae,ae=ce.parentNode}ce=xe}a=_===-1||z===-1?null:{start:_,end:z}}else a=null}a=a||{start:0,end:0}}else a=null;for(dd={focusedElem:t,selectionRange:a},Ml=!1,be=r;be!==null;)if(r=be,t=r.child,(r.subtreeFlags&1028)!==0&&t!==null)t.return=r,be=t;else for(;be!==null;){r=be;try{var Ne=r.alternate;if((r.flags&1024)!==0)switch(r.tag){case 0:case 11:case 15:break;case 1:if(Ne!==null){var Re=Ne.memoizedProps,Dt=Ne.memoizedState,H=r.stateNode,U=H.getSnapshotBeforeUpdate(r.elementType===r.type?Re:mr(r.type,Re),Dt);H.__reactInternalSnapshotBeforeUpdate=U}break;case 3:var V=r.stateNode.containerInfo;V.nodeType===1?V.textContent="":V.nodeType===9&&V.documentElement&&V.removeChild(V.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(de){Rt(r,r.return,de)}if(t=r.sibling,t!==null){t.return=r.return,be=t;break}be=r.return}return Ne=$g,$g=!1,Ne}function Vi(t,r,a){var u=r.updateQueue;if(u=u!==null?u.lastEffect:null,u!==null){var h=u=u.next;do{if((h.tag&t)===t){var y=h.destroy;h.destroy=void 0,y!==void 0&&Jd(r,a,y)}h=h.next}while(h!==u)}}function hc(t,r){if(r=r.updateQueue,r=r!==null?r.lastEffect:null,r!==null){var a=r=r.next;do{if((a.tag&t)===t){var u=a.create;a.destroy=u()}a=a.next}while(a!==r)}}function Zd(t){var r=t.ref;if(r!==null){var a=t.stateNode;switch(t.tag){case 5:t=a;break;default:t=a}typeof r=="function"?r(t):r.current=t}}function Ug(t){var r=t.alternate;r!==null&&(t.alternate=null,Ug(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&(delete r[Tr],delete r[Mi],delete r[pd],delete r[kS],delete r[RS])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function Bg(t){return t.tag===5||t.tag===3||t.tag===4}function Hg(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Bg(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function ef(t,r,a){var u=t.tag;if(u===5||u===6)t=t.stateNode,r?a.nodeType===8?a.parentNode.insertBefore(t,r):a.insertBefore(t,r):(a.nodeType===8?(r=a.parentNode,r.insertBefore(t,a)):(r=a,r.appendChild(t)),a=a._reactRootContainer,a!=null||r.onclick!==null||(r.onclick=Wl));else if(u!==4&&(t=t.child,t!==null))for(ef(t,r,a),t=t.sibling;t!==null;)ef(t,r,a),t=t.sibling}function tf(t,r,a){var u=t.tag;if(u===5||u===6)t=t.stateNode,r?a.insertBefore(t,r):a.appendChild(t);else if(u!==4&&(t=t.child,t!==null))for(tf(t,r,a),t=t.sibling;t!==null;)tf(t,r,a),t=t.sibling}var tn=null,hr=!1;function Bs(t,r,a){for(a=a.child;a!==null;)Vg(t,r,a),a=a.sibling}function Vg(t,r,a){if(gn&&typeof gn.onCommitFiberUnmount=="function")try{gn.onCommitFiberUnmount(ts,a)}catch{}switch(a.tag){case 5:un||Pa(a,r);case 6:var u=tn,h=hr;tn=null,Bs(t,r,a),tn=u,hr=h,tn!==null&&(hr?(t=tn,a=a.stateNode,t.nodeType===8?t.parentNode.removeChild(a):t.removeChild(a)):tn.removeChild(a.stateNode));break;case 18:tn!==null&&(hr?(t=tn,a=a.stateNode,t.nodeType===8?hd(t.parentNode,a):t.nodeType===1&&hd(t,a),Si(t)):hd(tn,a.stateNode));break;case 4:u=tn,h=hr,tn=a.stateNode.containerInfo,hr=!0,Bs(t,r,a),tn=u,hr=h;break;case 0:case 11:case 14:case 15:if(!un&&(u=a.updateQueue,u!==null&&(u=u.lastEffect,u!==null))){h=u=u.next;do{var y=h,j=y.destroy;y=y.tag,j!==void 0&&((y&2)!==0||(y&4)!==0)&&Jd(a,r,j),h=h.next}while(h!==u)}Bs(t,r,a);break;case 1:if(!un&&(Pa(a,r),u=a.stateNode,typeof u.componentWillUnmount=="function"))try{u.props=a.memoizedProps,u.state=a.memoizedState,u.componentWillUnmount()}catch(_){Rt(a,r,_)}Bs(t,r,a);break;case 21:Bs(t,r,a);break;case 22:a.mode&1?(un=(u=un)||a.memoizedState!==null,Bs(t,r,a),un=u):Bs(t,r,a);break;default:Bs(t,r,a)}}function Wg(t){var r=t.updateQueue;if(r!==null){t.updateQueue=null;var a=t.stateNode;a===null&&(a=t.stateNode=new VS),r.forEach(function(u){var h=eN.bind(null,t,u);a.has(u)||(a.add(u),u.then(h,h))})}}function pr(t,r){var a=r.deletions;if(a!==null)for(var u=0;u<a.length;u++){var h=a[u];try{var y=t,j=r,_=j;e:for(;_!==null;){switch(_.tag){case 5:tn=_.stateNode,hr=!1;break e;case 3:tn=_.stateNode.containerInfo,hr=!0;break e;case 4:tn=_.stateNode.containerInfo,hr=!0;break e}_=_.return}if(tn===null)throw Error(s(160));Vg(y,j,h),tn=null,hr=!1;var z=h.alternate;z!==null&&(z.return=null),h.return=null}catch(Q){Rt(h,r,Q)}}if(r.subtreeFlags&12854)for(r=r.child;r!==null;)Kg(r,t),r=r.sibling}function Kg(t,r){var a=t.alternate,u=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(pr(r,t),Mr(t),u&4){try{Vi(3,t,t.return),hc(3,t)}catch(Re){Rt(t,t.return,Re)}try{Vi(5,t,t.return)}catch(Re){Rt(t,t.return,Re)}}break;case 1:pr(r,t),Mr(t),u&512&&a!==null&&Pa(a,a.return);break;case 5:if(pr(r,t),Mr(t),u&512&&a!==null&&Pa(a,a.return),t.flags&32){var h=t.stateNode;try{hn(h,"")}catch(Re){Rt(t,t.return,Re)}}if(u&4&&(h=t.stateNode,h!=null)){var y=t.memoizedProps,j=a!==null?a.memoizedProps:y,_=t.type,z=t.updateQueue;if(t.updateQueue=null,z!==null)try{_==="input"&&y.type==="radio"&&y.name!=null&&$t(h,y),ks(_,j);var Q=ks(_,y);for(j=0;j<z.length;j+=2){var le=z[j],ce=z[j+1];le==="style"?bn(h,ce):le==="dangerouslySetInnerHTML"?on(h,ce):le==="children"?hn(h,ce):E(h,le,ce,Q)}switch(_){case"input":Zt(h,y);break;case"textarea":Wn(h,y);break;case"select":var ae=h._wrapperState.wasMultiple;h._wrapperState.wasMultiple=!!y.multiple;var xe=y.value;xe!=null?Nr(h,!!y.multiple,xe,!1):ae!==!!y.multiple&&(y.defaultValue!=null?Nr(h,!!y.multiple,y.defaultValue,!0):Nr(h,!!y.multiple,y.multiple?[]:"",!1))}h[Mi]=y}catch(Re){Rt(t,t.return,Re)}}break;case 6:if(pr(r,t),Mr(t),u&4){if(t.stateNode===null)throw Error(s(162));h=t.stateNode,y=t.memoizedProps;try{h.nodeValue=y}catch(Re){Rt(t,t.return,Re)}}break;case 3:if(pr(r,t),Mr(t),u&4&&a!==null&&a.memoizedState.isDehydrated)try{Si(r.containerInfo)}catch(Re){Rt(t,t.return,Re)}break;case 4:pr(r,t),Mr(t);break;case 13:pr(r,t),Mr(t),h=t.child,h.flags&8192&&(y=h.memoizedState!==null,h.stateNode.isHidden=y,!y||h.alternate!==null&&h.alternate.memoizedState!==null||(sf=at())),u&4&&Wg(t);break;case 22:if(le=a!==null&&a.memoizedState!==null,t.mode&1?(un=(Q=un)||le,pr(r,t),un=Q):pr(r,t),Mr(t),u&8192){if(Q=t.memoizedState!==null,(t.stateNode.isHidden=Q)&&!le&&(t.mode&1)!==0)for(be=t,le=t.child;le!==null;){for(ce=be=le;be!==null;){switch(ae=be,xe=ae.child,ae.tag){case 0:case 11:case 14:case 15:Vi(4,ae,ae.return);break;case 1:Pa(ae,ae.return);var Ne=ae.stateNode;if(typeof Ne.componentWillUnmount=="function"){u=ae,a=ae.return;try{r=u,Ne.props=r.memoizedProps,Ne.state=r.memoizedState,Ne.componentWillUnmount()}catch(Re){Rt(u,a,Re)}}break;case 5:Pa(ae,ae.return);break;case 22:if(ae.memoizedState!==null){Yg(ce);continue}}xe!==null?(xe.return=ae,be=xe):Yg(ce)}le=le.sibling}e:for(le=null,ce=t;;){if(ce.tag===5){if(le===null){le=ce;try{h=ce.stateNode,Q?(y=h.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none"):(_=ce.stateNode,z=ce.memoizedProps.style,j=z!=null&&z.hasOwnProperty("display")?z.display:null,_.style.display=ua("display",j))}catch(Re){Rt(t,t.return,Re)}}}else if(ce.tag===6){if(le===null)try{ce.stateNode.nodeValue=Q?"":ce.memoizedProps}catch(Re){Rt(t,t.return,Re)}}else if((ce.tag!==22&&ce.tag!==23||ce.memoizedState===null||ce===t)&&ce.child!==null){ce.child.return=ce,ce=ce.child;continue}if(ce===t)break e;for(;ce.sibling===null;){if(ce.return===null||ce.return===t)break e;le===ce&&(le=null),ce=ce.return}le===ce&&(le=null),ce.sibling.return=ce.return,ce=ce.sibling}}break;case 19:pr(r,t),Mr(t),u&4&&Wg(t);break;case 21:break;default:pr(r,t),Mr(t)}}function Mr(t){var r=t.flags;if(r&2){try{e:{for(var a=t.return;a!==null;){if(Bg(a)){var u=a;break e}a=a.return}throw Error(s(160))}switch(u.tag){case 5:var h=u.stateNode;u.flags&32&&(hn(h,""),u.flags&=-33);var y=Hg(t);tf(t,y,h);break;case 3:case 4:var j=u.stateNode.containerInfo,_=Hg(t);ef(t,_,j);break;default:throw Error(s(161))}}catch(z){Rt(t,t.return,z)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function KS(t,r,a){be=t,Qg(t)}function Qg(t,r,a){for(var u=(t.mode&1)!==0;be!==null;){var h=be,y=h.child;if(h.tag===22&&u){var j=h.memoizedState!==null||mc;if(!j){var _=h.alternate,z=_!==null&&_.memoizedState!==null||un;_=mc;var Q=un;if(mc=j,(un=z)&&!Q)for(be=h;be!==null;)j=be,z=j.child,j.tag===22&&j.memoizedState!==null?Gg(h):z!==null?(z.return=j,be=z):Gg(h);for(;y!==null;)be=y,Qg(y),y=y.sibling;be=h,mc=_,un=Q}qg(t)}else(h.subtreeFlags&8772)!==0&&y!==null?(y.return=h,be=y):qg(t)}}function qg(t){for(;be!==null;){var r=be;if((r.flags&8772)!==0){var a=r.alternate;try{if((r.flags&8772)!==0)switch(r.tag){case 0:case 11:case 15:un||hc(5,r);break;case 1:var u=r.stateNode;if(r.flags&4&&!un)if(a===null)u.componentDidMount();else{var h=r.elementType===r.type?a.memoizedProps:mr(r.type,a.memoizedProps);u.componentDidUpdate(h,a.memoizedState,u.__reactInternalSnapshotBeforeUpdate)}var y=r.updateQueue;y!==null&&Yp(r,y,u);break;case 3:var j=r.updateQueue;if(j!==null){if(a=null,r.child!==null)switch(r.child.tag){case 5:a=r.child.stateNode;break;case 1:a=r.child.stateNode}Yp(r,j,a)}break;case 5:var _=r.stateNode;if(a===null&&r.flags&4){a=_;var z=r.memoizedProps;switch(r.type){case"button":case"input":case"select":case"textarea":z.autoFocus&&a.focus();break;case"img":z.src&&(a.src=z.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(r.memoizedState===null){var Q=r.alternate;if(Q!==null){var le=Q.memoizedState;if(le!==null){var ce=le.dehydrated;ce!==null&&Si(ce)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(s(163))}un||r.flags&512&&Zd(r)}catch(ae){Rt(r,r.return,ae)}}if(r===t){be=null;break}if(a=r.sibling,a!==null){a.return=r.return,be=a;break}be=r.return}}function Yg(t){for(;be!==null;){var r=be;if(r===t){be=null;break}var a=r.sibling;if(a!==null){a.return=r.return,be=a;break}be=r.return}}function Gg(t){for(;be!==null;){var r=be;try{switch(r.tag){case 0:case 11:case 15:var a=r.return;try{hc(4,r)}catch(z){Rt(r,a,z)}break;case 1:var u=r.stateNode;if(typeof u.componentDidMount=="function"){var h=r.return;try{u.componentDidMount()}catch(z){Rt(r,h,z)}}var y=r.return;try{Zd(r)}catch(z){Rt(r,y,z)}break;case 5:var j=r.return;try{Zd(r)}catch(z){Rt(r,j,z)}}}catch(z){Rt(r,r.return,z)}if(r===t){be=null;break}var _=r.sibling;if(_!==null){_.return=r.return,be=_;break}be=r.return}}var QS=Math.ceil,pc=R.ReactCurrentDispatcher,nf=R.ReactCurrentOwner,Jn=R.ReactCurrentBatchConfig,tt=0,Yt=null,Ft=null,nn=0,Fn=0,Ta=Ls(0),Ht=0,Wi=null,Mo=0,gc=0,rf=0,Ki=null,En=null,sf=0,_a=1/0,ds=null,vc=!1,of=null,Hs=null,yc=!1,Vs=null,xc=0,Qi=0,af=null,wc=-1,bc=0;function yn(){return(tt&6)!==0?at():wc!==-1?wc:wc=at()}function Ws(t){return(t.mode&1)===0?1:(tt&2)!==0&&nn!==0?nn&-nn:TS.transition!==null?(bc===0&&(bc=Hh()),bc):(t=it,t!==0||(t=window.event,t=t===void 0?16:Jh(t.type)),t)}function gr(t,r,a,u){if(50<Qi)throw Qi=0,af=null,Error(s(185));vi(t,a,u),((tt&2)===0||t!==Yt)&&(t===Yt&&((tt&2)===0&&(gc|=a),Ht===4&&Ks(t,nn)),kn(t,u),a===1&&tt===0&&(r.mode&1)===0&&(_a=at()+500,Yl&&Fs()))}function kn(t,r){var a=t.callbackNode;T1(t,r);var u=Tl(t,t===Yt?nn:0);if(u===0)a!==null&&Qt(a),t.callbackNode=null,t.callbackPriority=0;else if(r=u&-u,t.callbackPriority!==r){if(a!=null&&Qt(a),r===1)t.tag===0?PS(Jg.bind(null,t)):Lp(Jg.bind(null,t)),CS(function(){(tt&6)===0&&Fs()}),a=null;else{switch(Vh(u)){case 1:a=Qn;break;case 4:a=Dn;break;case 16:a=Rs;break;case 536870912:a=Pr;break;default:a=Rs}a=av(a,Xg.bind(null,t))}t.callbackPriority=r,t.callbackNode=a}}function Xg(t,r){if(wc=-1,bc=0,(tt&6)!==0)throw Error(s(327));var a=t.callbackNode;if(Aa()&&t.callbackNode!==a)return null;var u=Tl(t,t===Yt?nn:0);if(u===0)return null;if((u&30)!==0||(u&t.expiredLanes)!==0||r)r=Sc(t,u);else{r=u;var h=tt;tt|=2;var y=ev();(Yt!==t||nn!==r)&&(ds=null,_a=at()+500,Do(t,r));do try{GS();break}catch(_){Zg(t,_)}while(!0);jd(),pc.current=y,tt=h,Ft!==null?r=0:(Yt=null,nn=0,r=Ht)}if(r!==0){if(r===2&&(h=$u(t),h!==0&&(u=h,r=lf(t,h))),r===1)throw a=Wi,Do(t,0),Ks(t,u),kn(t,at()),a;if(r===6)Ks(t,u);else{if(h=t.current.alternate,(u&30)===0&&!qS(h)&&(r=Sc(t,u),r===2&&(y=$u(t),y!==0&&(u=y,r=lf(t,y))),r===1))throw a=Wi,Do(t,0),Ks(t,u),kn(t,at()),a;switch(t.finishedWork=h,t.finishedLanes=u,r){case 0:case 1:throw Error(s(345));case 2:Oo(t,En,ds);break;case 3:if(Ks(t,u),(u&130023424)===u&&(r=sf+500-at(),10<r)){if(Tl(t,0)!==0)break;if(h=t.suspendedLanes,(h&u)!==u){yn(),t.pingedLanes|=t.suspendedLanes&h;break}t.timeoutHandle=md(Oo.bind(null,t,En,ds),r);break}Oo(t,En,ds);break;case 4:if(Ks(t,u),(u&4194240)===u)break;for(r=t.eventTimes,h=-1;0<u;){var j=31-ut(u);y=1<<j,j=r[j],j>h&&(h=j),u&=~y}if(u=h,u=at()-u,u=(120>u?120:480>u?480:1080>u?1080:1920>u?1920:3e3>u?3e3:4320>u?4320:1960*QS(u/1960))-u,10<u){t.timeoutHandle=md(Oo.bind(null,t,En,ds),u);break}Oo(t,En,ds);break;case 5:Oo(t,En,ds);break;default:throw Error(s(329))}}}return kn(t,at()),t.callbackNode===a?Xg.bind(null,t):null}function lf(t,r){var a=Ki;return t.current.memoizedState.isDehydrated&&(Do(t,r).flags|=256),t=Sc(t,r),t!==2&&(r=En,En=a,r!==null&&cf(r)),t}function cf(t){En===null?En=t:En.push.apply(En,t)}function qS(t){for(var r=t;;){if(r.flags&16384){var a=r.updateQueue;if(a!==null&&(a=a.stores,a!==null))for(var u=0;u<a.length;u++){var h=a[u],y=h.getSnapshot;h=h.value;try{if(!dr(y(),h))return!1}catch{return!1}}}if(a=r.child,r.subtreeFlags&16384&&a!==null)a.return=r,r=a;else{if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Ks(t,r){for(r&=~rf,r&=~gc,t.suspendedLanes|=r,t.pingedLanes&=~r,t=t.expirationTimes;0<r;){var a=31-ut(r),u=1<<a;t[a]=-1,r&=~u}}function Jg(t){if((tt&6)!==0)throw Error(s(327));Aa();var r=Tl(t,0);if((r&1)===0)return kn(t,at()),null;var a=Sc(t,r);if(t.tag!==0&&a===2){var u=$u(t);u!==0&&(r=u,a=lf(t,u))}if(a===1)throw a=Wi,Do(t,0),Ks(t,r),kn(t,at()),a;if(a===6)throw Error(s(345));return t.finishedWork=t.current.alternate,t.finishedLanes=r,Oo(t,En,ds),kn(t,at()),null}function uf(t,r){var a=tt;tt|=1;try{return t(r)}finally{tt=a,tt===0&&(_a=at()+500,Yl&&Fs())}}function Io(t){Vs!==null&&Vs.tag===0&&(tt&6)===0&&Aa();var r=tt;tt|=1;var a=Jn.transition,u=it;try{if(Jn.transition=null,it=1,t)return t()}finally{it=u,Jn.transition=a,tt=r,(tt&6)===0&&Fs()}}function df(){Fn=Ta.current,gt(Ta)}function Do(t,r){t.finishedWork=null,t.finishedLanes=0;var a=t.timeoutHandle;if(a!==-1&&(t.timeoutHandle=-1,jS(a)),Ft!==null)for(a=Ft.return;a!==null;){var u=a;switch(xd(u),u.tag){case 1:u=u.type.childContextTypes,u!=null&&Ql();break;case 3:ka(),gt(Nn),gt(an),Ad();break;case 5:Td(u);break;case 4:ka();break;case 13:gt(Nt);break;case 19:gt(Nt);break;case 10:Cd(u.type._context);break;case 22:case 23:df()}a=a.return}if(Yt=t,Ft=t=Qs(t.current,null),nn=Fn=r,Ht=0,Wi=null,rf=gc=Mo=0,En=Ki=null,To!==null){for(r=0;r<To.length;r++)if(a=To[r],u=a.interleaved,u!==null){a.interleaved=null;var h=u.next,y=a.pending;if(y!==null){var j=y.next;y.next=h,u.next=j}a.pending=u}To=null}return t}function Zg(t,r){do{var a=Ft;try{if(jd(),oc.current=cc,ac){for(var u=jt.memoizedState;u!==null;){var h=u.queue;h!==null&&(h.pending=null),u=u.next}ac=!1}if(Ao=0,qt=Bt=jt=null,Fi=!1,$i=0,nf.current=null,a===null||a.return===null){Ht=1,Wi=r,Ft=null;break}e:{var y=t,j=a.return,_=a,z=r;if(r=nn,_.flags|=32768,z!==null&&typeof z=="object"&&typeof z.then=="function"){var Q=z,le=_,ce=le.tag;if((le.mode&1)===0&&(ce===0||ce===11||ce===15)){var ae=le.alternate;ae?(le.updateQueue=ae.updateQueue,le.memoizedState=ae.memoizedState,le.lanes=ae.lanes):(le.updateQueue=null,le.memoizedState=null)}var xe=jg(j);if(xe!==null){xe.flags&=-257,Cg(xe,j,_,y,r),xe.mode&1&&Ng(y,Q,r),r=xe,z=Q;var Ne=r.updateQueue;if(Ne===null){var Re=new Set;Re.add(z),r.updateQueue=Re}else Ne.add(z);break e}else{if((r&1)===0){Ng(y,Q,r),ff();break e}z=Error(s(426))}}else if(xt&&_.mode&1){var Dt=jg(j);if(Dt!==null){(Dt.flags&65536)===0&&(Dt.flags|=256),Cg(Dt,j,_,y,r),Sd(Ra(z,_));break e}}y=z=Ra(z,_),Ht!==4&&(Ht=2),Ki===null?Ki=[y]:Ki.push(y),y=j;do{switch(y.tag){case 3:y.flags|=65536,r&=-r,y.lanes|=r;var H=bg(y,z,r);qp(y,H);break e;case 1:_=z;var U=y.type,V=y.stateNode;if((y.flags&128)===0&&(typeof U.getDerivedStateFromError=="function"||V!==null&&typeof V.componentDidCatch=="function"&&(Hs===null||!Hs.has(V)))){y.flags|=65536,r&=-r,y.lanes|=r;var de=Sg(y,_,r);qp(y,de);break e}}y=y.return}while(y!==null)}nv(a)}catch(Te){r=Te,Ft===a&&a!==null&&(Ft=a=a.return);continue}break}while(!0)}function ev(){var t=pc.current;return pc.current=cc,t===null?cc:t}function ff(){(Ht===0||Ht===3||Ht===2)&&(Ht=4),Yt===null||(Mo&268435455)===0&&(gc&268435455)===0||Ks(Yt,nn)}function Sc(t,r){var a=tt;tt|=2;var u=ev();(Yt!==t||nn!==r)&&(ds=null,Do(t,r));do try{YS();break}catch(h){Zg(t,h)}while(!0);if(jd(),tt=a,pc.current=u,Ft!==null)throw Error(s(261));return Yt=null,nn=0,Ht}function YS(){for(;Ft!==null;)tv(Ft)}function GS(){for(;Ft!==null&&!st();)tv(Ft)}function tv(t){var r=ov(t.alternate,t,Fn);t.memoizedProps=t.pendingProps,r===null?nv(t):Ft=r,nf.current=null}function nv(t){var r=t;do{var a=r.alternate;if(t=r.return,(r.flags&32768)===0){if(a=BS(a,r,Fn),a!==null){Ft=a;return}}else{if(a=HS(a,r),a!==null){a.flags&=32767,Ft=a;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Ht=6,Ft=null;return}}if(r=r.sibling,r!==null){Ft=r;return}Ft=r=t}while(r!==null);Ht===0&&(Ht=5)}function Oo(t,r,a){var u=it,h=Jn.transition;try{Jn.transition=null,it=1,XS(t,r,a,u)}finally{Jn.transition=h,it=u}return null}function XS(t,r,a,u){do Aa();while(Vs!==null);if((tt&6)!==0)throw Error(s(327));a=t.finishedWork;var h=t.finishedLanes;if(a===null)return null;if(t.finishedWork=null,t.finishedLanes=0,a===t.current)throw Error(s(177));t.callbackNode=null,t.callbackPriority=0;var y=a.lanes|a.childLanes;if(_1(t,y),t===Yt&&(Ft=Yt=null,nn=0),(a.subtreeFlags&2064)===0&&(a.flags&2064)===0||yc||(yc=!0,av(Rs,function(){return Aa(),null})),y=(a.flags&15990)!==0,(a.subtreeFlags&15990)!==0||y){y=Jn.transition,Jn.transition=null;var j=it;it=1;var _=tt;tt|=4,nf.current=null,WS(t,a),Kg(a,t),vS(dd),Ml=!!ud,dd=ud=null,t.current=a,KS(a),Sn(),tt=_,it=j,Jn.transition=y}else t.current=a;if(yc&&(yc=!1,Vs=t,xc=h),y=t.pendingLanes,y===0&&(Hs=null),Ze(a.stateNode),kn(t,at()),r!==null)for(u=t.onRecoverableError,a=0;a<r.length;a++)h=r[a],u(h.value,{componentStack:h.stack,digest:h.digest});if(vc)throw vc=!1,t=of,of=null,t;return(xc&1)!==0&&t.tag!==0&&Aa(),y=t.pendingLanes,(y&1)!==0?t===af?Qi++:(Qi=0,af=t):Qi=0,Fs(),null}function Aa(){if(Vs!==null){var t=Vh(xc),r=Jn.transition,a=it;try{if(Jn.transition=null,it=16>t?16:t,Vs===null)var u=!1;else{if(t=Vs,Vs=null,xc=0,(tt&6)!==0)throw Error(s(331));var h=tt;for(tt|=4,be=t.current;be!==null;){var y=be,j=y.child;if((be.flags&16)!==0){var _=y.deletions;if(_!==null){for(var z=0;z<_.length;z++){var Q=_[z];for(be=Q;be!==null;){var le=be;switch(le.tag){case 0:case 11:case 15:Vi(8,le,y)}var ce=le.child;if(ce!==null)ce.return=le,be=ce;else for(;be!==null;){le=be;var ae=le.sibling,xe=le.return;if(Ug(le),le===Q){be=null;break}if(ae!==null){ae.return=xe,be=ae;break}be=xe}}}var Ne=y.alternate;if(Ne!==null){var Re=Ne.child;if(Re!==null){Ne.child=null;do{var Dt=Re.sibling;Re.sibling=null,Re=Dt}while(Re!==null)}}be=y}}if((y.subtreeFlags&2064)!==0&&j!==null)j.return=y,be=j;else e:for(;be!==null;){if(y=be,(y.flags&2048)!==0)switch(y.tag){case 0:case 11:case 15:Vi(9,y,y.return)}var H=y.sibling;if(H!==null){H.return=y.return,be=H;break e}be=y.return}}var U=t.current;for(be=U;be!==null;){j=be;var V=j.child;if((j.subtreeFlags&2064)!==0&&V!==null)V.return=j,be=V;else e:for(j=U;be!==null;){if(_=be,(_.flags&2048)!==0)try{switch(_.tag){case 0:case 11:case 15:hc(9,_)}}catch(Te){Rt(_,_.return,Te)}if(_===j){be=null;break e}var de=_.sibling;if(de!==null){de.return=_.return,be=de;break e}be=_.return}}if(tt=h,Fs(),gn&&typeof gn.onPostCommitFiberRoot=="function")try{gn.onPostCommitFiberRoot(ts,t)}catch{}u=!0}return u}finally{it=a,Jn.transition=r}}return!1}function rv(t,r,a){r=Ra(a,r),r=bg(t,r,1),t=Us(t,r,1),r=yn(),t!==null&&(vi(t,1,r),kn(t,r))}function Rt(t,r,a){if(t.tag===3)rv(t,t,a);else for(;r!==null;){if(r.tag===3){rv(r,t,a);break}else if(r.tag===1){var u=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Hs===null||!Hs.has(u))){t=Ra(a,t),t=Sg(r,t,1),r=Us(r,t,1),t=yn(),r!==null&&(vi(r,1,t),kn(r,t));break}}r=r.return}}function JS(t,r,a){var u=t.pingCache;u!==null&&u.delete(r),r=yn(),t.pingedLanes|=t.suspendedLanes&a,Yt===t&&(nn&a)===a&&(Ht===4||Ht===3&&(nn&130023424)===nn&&500>at()-sf?Do(t,0):rf|=a),kn(t,r)}function sv(t,r){r===0&&((t.mode&1)===0?r=1:(r=jo,jo<<=1,(jo&130023424)===0&&(jo=4194304)));var a=yn();t=ls(t,r),t!==null&&(vi(t,r,a),kn(t,a))}function ZS(t){var r=t.memoizedState,a=0;r!==null&&(a=r.retryLane),sv(t,a)}function eN(t,r){var a=0;switch(t.tag){case 13:var u=t.stateNode,h=t.memoizedState;h!==null&&(a=h.retryLane);break;case 19:u=t.stateNode;break;default:throw Error(s(314))}u!==null&&u.delete(r),sv(t,a)}var ov;ov=function(t,r,a){if(t!==null)if(t.memoizedProps!==r.pendingProps||Nn.current)Cn=!0;else{if((t.lanes&a)===0&&(r.flags&128)===0)return Cn=!1,US(t,r,a);Cn=(t.flags&131072)!==0}else Cn=!1,xt&&(r.flags&1048576)!==0&&zp(r,Xl,r.index);switch(r.lanes=0,r.tag){case 2:var u=r.type;fc(t,r),t=r.pendingProps;var h=wa(r,an.current);Ea(r,a),h=Dd(null,r,u,t,h,a);var y=Od();return r.flags|=1,typeof h=="object"&&h!==null&&typeof h.render=="function"&&h.$$typeof===void 0?(r.tag=1,r.memoizedState=null,r.updateQueue=null,jn(u)?(y=!0,ql(r)):y=!1,r.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,Rd(r),h.updater=uc,r.stateNode=h,h._reactInternals=r,Bd(r,u,t,a),r=Kd(null,r,u,!0,y,a)):(r.tag=0,xt&&y&&yd(r),vn(null,r,h,a),r=r.child),r;case 16:u=r.elementType;e:{switch(fc(t,r),t=r.pendingProps,h=u._init,u=h(u._payload),r.type=u,h=r.tag=nN(u),t=mr(u,t),h){case 0:r=Wd(null,r,u,t,a);break e;case 1:r=_g(null,r,u,t,a);break e;case 11:r=Eg(null,r,u,t,a);break e;case 14:r=kg(null,r,u,mr(u.type,t),a);break e}throw Error(s(306,u,""))}return r;case 0:return u=r.type,h=r.pendingProps,h=r.elementType===u?h:mr(u,h),Wd(t,r,u,h,a);case 1:return u=r.type,h=r.pendingProps,h=r.elementType===u?h:mr(u,h),_g(t,r,u,h,a);case 3:e:{if(Ag(r),t===null)throw Error(s(387));u=r.pendingProps,y=r.memoizedState,h=y.element,Qp(t,r),rc(r,u,null,a);var j=r.memoizedState;if(u=j.element,y.isDehydrated)if(y={element:u,isDehydrated:!1,cache:j.cache,pendingSuspenseBoundaries:j.pendingSuspenseBoundaries,transitions:j.transitions},r.updateQueue.baseState=y,r.memoizedState=y,r.flags&256){h=Ra(Error(s(423)),r),r=Mg(t,r,u,a,h);break e}else if(u!==h){h=Ra(Error(s(424)),r),r=Mg(t,r,u,a,h);break e}else for(zn=Os(r.stateNode.containerInfo.firstChild),Ln=r,xt=!0,fr=null,a=Wp(r,null,u,a),r.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Na(),u===h){r=us(t,r,a);break e}vn(t,r,u,a)}r=r.child}return r;case 5:return Gp(r),t===null&&bd(r),u=r.type,h=r.pendingProps,y=t!==null?t.memoizedProps:null,j=h.children,fd(u,h)?j=null:y!==null&&fd(u,y)&&(r.flags|=32),Tg(t,r),vn(t,r,j,a),r.child;case 6:return t===null&&bd(r),null;case 13:return Ig(t,r,a);case 4:return Pd(r,r.stateNode.containerInfo),u=r.pendingProps,t===null?r.child=ja(r,null,u,a):vn(t,r,u,a),r.child;case 11:return u=r.type,h=r.pendingProps,h=r.elementType===u?h:mr(u,h),Eg(t,r,u,h,a);case 7:return vn(t,r,r.pendingProps,a),r.child;case 8:return vn(t,r,r.pendingProps.children,a),r.child;case 12:return vn(t,r,r.pendingProps.children,a),r.child;case 10:e:{if(u=r.type._context,h=r.pendingProps,y=r.memoizedProps,j=h.value,mt(ec,u._currentValue),u._currentValue=j,y!==null)if(dr(y.value,j)){if(y.children===h.children&&!Nn.current){r=us(t,r,a);break e}}else for(y=r.child,y!==null&&(y.return=r);y!==null;){var _=y.dependencies;if(_!==null){j=y.child;for(var z=_.firstContext;z!==null;){if(z.context===u){if(y.tag===1){z=cs(-1,a&-a),z.tag=2;var Q=y.updateQueue;if(Q!==null){Q=Q.shared;var le=Q.pending;le===null?z.next=z:(z.next=le.next,le.next=z),Q.pending=z}}y.lanes|=a,z=y.alternate,z!==null&&(z.lanes|=a),Ed(y.return,a,r),_.lanes|=a;break}z=z.next}}else if(y.tag===10)j=y.type===r.type?null:y.child;else if(y.tag===18){if(j=y.return,j===null)throw Error(s(341));j.lanes|=a,_=j.alternate,_!==null&&(_.lanes|=a),Ed(j,a,r),j=y.sibling}else j=y.child;if(j!==null)j.return=y;else for(j=y;j!==null;){if(j===r){j=null;break}if(y=j.sibling,y!==null){y.return=j.return,j=y;break}j=j.return}y=j}vn(t,r,h.children,a),r=r.child}return r;case 9:return h=r.type,u=r.pendingProps.children,Ea(r,a),h=Gn(h),u=u(h),r.flags|=1,vn(t,r,u,a),r.child;case 14:return u=r.type,h=mr(u,r.pendingProps),h=mr(u.type,h),kg(t,r,u,h,a);case 15:return Rg(t,r,r.type,r.pendingProps,a);case 17:return u=r.type,h=r.pendingProps,h=r.elementType===u?h:mr(u,h),fc(t,r),r.tag=1,jn(u)?(t=!0,ql(r)):t=!1,Ea(r,a),xg(r,u,h),Bd(r,u,h,a),Kd(null,r,u,!0,t,a);case 19:return Og(t,r,a);case 22:return Pg(t,r,a)}throw Error(s(156,r.tag))};function av(t,r){return It(t,r)}function tN(t,r,a,u){this.tag=t,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Zn(t,r,a,u){return new tN(t,r,a,u)}function mf(t){return t=t.prototype,!(!t||!t.isReactComponent)}function nN(t){if(typeof t=="function")return mf(t)?1:0;if(t!=null){if(t=t.$$typeof,t===q)return 11;if(t===ge)return 14}return 2}function Qs(t,r){var a=t.alternate;return a===null?(a=Zn(t.tag,r,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a.alternate=t,t.alternate=a):(a.pendingProps=r,a.type=t.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=t.flags&14680064,a.childLanes=t.childLanes,a.lanes=t.lanes,a.child=t.child,a.memoizedProps=t.memoizedProps,a.memoizedState=t.memoizedState,a.updateQueue=t.updateQueue,r=t.dependencies,a.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a}function Nc(t,r,a,u,h,y){var j=2;if(u=t,typeof t=="function")mf(t)&&(j=1);else if(typeof t=="string")j=5;else e:switch(t){case T:return Lo(a.children,h,y,r);case I:j=8,h|=8;break;case W:return t=Zn(12,a,r,h|2),t.elementType=W,t.lanes=y,t;case pe:return t=Zn(13,a,r,h),t.elementType=pe,t.lanes=y,t;case ue:return t=Zn(19,a,r,h),t.elementType=ue,t.lanes=y,t;case ie:return jc(a,h,y,r);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case J:j=10;break e;case Z:j=9;break e;case q:j=11;break e;case ge:j=14;break e;case G:j=16,u=null;break e}throw Error(s(130,t==null?t:typeof t,""))}return r=Zn(j,a,r,h),r.elementType=t,r.type=u,r.lanes=y,r}function Lo(t,r,a,u){return t=Zn(7,t,u,r),t.lanes=a,t}function jc(t,r,a,u){return t=Zn(22,t,u,r),t.elementType=ie,t.lanes=a,t.stateNode={isHidden:!1},t}function hf(t,r,a){return t=Zn(6,t,null,r),t.lanes=a,t}function pf(t,r,a){return r=Zn(4,t.children!==null?t.children:[],t.key,r),r.lanes=a,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}function rN(t,r,a,u,h){this.tag=r,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Uu(0),this.expirationTimes=Uu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Uu(0),this.identifierPrefix=u,this.onRecoverableError=h,this.mutableSourceEagerHydrationData=null}function gf(t,r,a,u,h,y,j,_,z){return t=new rN(t,r,a,_,z),r===1?(r=1,y===!0&&(r|=8)):r=0,y=Zn(3,null,null,r),t.current=y,y.stateNode=t,y.memoizedState={element:u,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},Rd(y),t}function sN(t,r,a){var u=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:B,key:u==null?null:""+u,children:t,containerInfo:r,implementation:a}}function iv(t){if(!t)return zs;t=t._reactInternals;e:{if(ke(t)!==t||t.tag!==1)throw Error(s(170));var r=t;do{switch(r.tag){case 3:r=r.stateNode.context;break e;case 1:if(jn(r.type)){r=r.stateNode.__reactInternalMemoizedMergedChildContext;break e}}r=r.return}while(r!==null);throw Error(s(171))}if(t.tag===1){var a=t.type;if(jn(a))return Dp(t,a,r)}return r}function lv(t,r,a,u,h,y,j,_,z){return t=gf(a,u,!0,t,h,y,j,_,z),t.context=iv(null),a=t.current,u=yn(),h=Ws(a),y=cs(u,h),y.callback=r??null,Us(a,y,h),t.current.lanes=h,vi(t,h,u),kn(t,u),t}function Cc(t,r,a,u){var h=r.current,y=yn(),j=Ws(h);return a=iv(a),r.context===null?r.context=a:r.pendingContext=a,r=cs(y,j),r.payload={element:t},u=u===void 0?null:u,u!==null&&(r.callback=u),t=Us(h,r,j),t!==null&&(gr(t,h,j,y),nc(t,h,j)),j}function Ec(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function cv(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<r?a:r}}function vf(t,r){cv(t,r),(t=t.alternate)&&cv(t,r)}function oN(){return null}var uv=typeof reportError=="function"?reportError:function(t){console.error(t)};function yf(t){this._internalRoot=t}kc.prototype.render=yf.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(s(409));Cc(t,r,null,null)},kc.prototype.unmount=yf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;Io(function(){Cc(null,t,null,null)}),r[ss]=null}};function kc(t){this._internalRoot=t}kc.prototype.unstable_scheduleHydration=function(t){if(t){var r=Qh();t={blockedOn:null,target:t,priority:r};for(var a=0;a<Ms.length&&r!==0&&r<Ms[a].priority;a++);Ms.splice(a,0,t),a===0&&Gh(t)}};function xf(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Rc(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function dv(){}function aN(t,r,a,u,h){if(h){if(typeof u=="function"){var y=u;u=function(){var Q=Ec(j);y.call(Q)}}var j=lv(r,u,t,0,null,!1,!1,"",dv);return t._reactRootContainer=j,t[ss]=j.current,_i(t.nodeType===8?t.parentNode:t),Io(),j}for(;h=t.lastChild;)t.removeChild(h);if(typeof u=="function"){var _=u;u=function(){var Q=Ec(z);_.call(Q)}}var z=gf(t,0,!1,null,null,!1,!1,"",dv);return t._reactRootContainer=z,t[ss]=z.current,_i(t.nodeType===8?t.parentNode:t),Io(function(){Cc(r,z,a,u)}),z}function Pc(t,r,a,u,h){var y=a._reactRootContainer;if(y){var j=y;if(typeof h=="function"){var _=h;h=function(){var z=Ec(j);_.call(z)}}Cc(r,j,t,h)}else j=aN(a,r,t,h,u);return Ec(j)}Wh=function(t){switch(t.tag){case 3:var r=t.stateNode;if(r.current.memoizedState.isDehydrated){var a=Co(r.pendingLanes);a!==0&&(Bu(r,a|1),kn(r,at()),(tt&6)===0&&(_a=at()+500,Fs()))}break;case 13:Io(function(){var u=ls(t,1);if(u!==null){var h=yn();gr(u,t,1,h)}}),vf(t,1)}},Hu=function(t){if(t.tag===13){var r=ls(t,134217728);if(r!==null){var a=yn();gr(r,t,134217728,a)}vf(t,134217728)}},Kh=function(t){if(t.tag===13){var r=Ws(t),a=ls(t,r);if(a!==null){var u=yn();gr(a,t,r,u)}vf(t,r)}},Qh=function(){return it},qh=function(t,r){var a=it;try{return it=t,r()}finally{it=a}},kr=function(t,r,a){switch(r){case"input":if(Zt(t,a),r=a.name,a.type==="radio"&&r!=null){for(a=t;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll("input[name="+JSON.stringify(""+r)+'][type="radio"]'),r=0;r<a.length;r++){var u=a[r];if(u!==t&&u.form===t.form){var h=Kl(u);if(!h)throw Error(s(90));Me(u),Zt(u,h)}}}break;case"textarea":Wn(t,a);break;case"select":r=a.value,r!=null&&Nr(t,!!a.multiple,r,!1)}},kt=uf,Mt=Io;var iN={usingClientEntryPoint:!1,Events:[Ii,ya,Kl,Be,bt,uf]},qi={findFiberByHostInstance:Eo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},lN={bundleType:qi.bundleType,version:qi.version,rendererPackageName:qi.rendererPackageName,rendererConfig:qi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:R.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=Je(t),t===null?null:t.stateNode},findFiberByHostInstance:qi.findFiberByHostInstance||oN,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Tc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Tc.isDisabled&&Tc.supportsFiber)try{ts=Tc.inject(lN),gn=Tc}catch{}}return Rn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=iN,Rn.createPortal=function(t,r){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!xf(r))throw Error(s(200));return sN(t,r,null,a)},Rn.createRoot=function(t,r){if(!xf(t))throw Error(s(299));var a=!1,u="",h=uv;return r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(u=r.identifierPrefix),r.onRecoverableError!==void 0&&(h=r.onRecoverableError)),r=gf(t,1,!1,null,null,a,!1,u,h),t[ss]=r.current,_i(t.nodeType===8?t.parentNode:t),new yf(r)},Rn.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var r=t._reactInternals;if(r===void 0)throw typeof t.render=="function"?Error(s(188)):(t=Object.keys(t).join(","),Error(s(268,t)));return t=Je(r),t=t===null?null:t.stateNode,t},Rn.flushSync=function(t){return Io(t)},Rn.hydrate=function(t,r,a){if(!Rc(r))throw Error(s(200));return Pc(null,t,r,!0,a)},Rn.hydrateRoot=function(t,r,a){if(!xf(t))throw Error(s(405));var u=a!=null&&a.hydratedSources||null,h=!1,y="",j=uv;if(a!=null&&(a.unstable_strictMode===!0&&(h=!0),a.identifierPrefix!==void 0&&(y=a.identifierPrefix),a.onRecoverableError!==void 0&&(j=a.onRecoverableError)),r=lv(r,null,t,1,a??null,h,!1,y,j),t[ss]=r.current,_i(t),u)for(t=0;t<u.length;t++)a=u[t],h=a._getVersion,h=h(a._source),r.mutableSourceEagerHydrationData==null?r.mutableSourceEagerHydrationData=[a,h]:r.mutableSourceEagerHydrationData.push(a,h);return new kc(r)},Rn.render=function(t,r,a){if(!Rc(r))throw Error(s(200));return Pc(null,t,r,!1,a)},Rn.unmountComponentAtNode=function(t){if(!Rc(t))throw Error(s(40));return t._reactRootContainer?(Io(function(){Pc(null,null,t,!1,function(){t._reactRootContainer=null,t[ss]=null})}),!0):!1},Rn.unstable_batchedUpdates=uf,Rn.unstable_renderSubtreeIntoContainer=function(t,r,a,u){if(!Rc(a))throw Error(s(200));if(t==null||t._reactInternals===void 0)throw Error(s(38));return Pc(t,r,a,!1,u)},Rn.version="18.3.1-next-f1338f8080-20240426",Rn}var wv;function vx(){if(wv)return jf.exports;wv=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),jf.exports=yN(),jf.exports}var bv;function xN(){if(bv)return Ac;bv=1;var e=vx();return Ac.createRoot=e.createRoot,Ac.hydrateRoot=e.hydrateRoot,Ac}var wN=xN(),v=Lm();const me=gx(v),yx=fN({__proto__:null,default:me},[v]);/**
|
|
41
|
+
* react-router v7.13.0
|
|
42
|
+
*
|
|
43
|
+
* Copyright (c) Remix Software Inc.
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the MIT license found in the
|
|
46
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
47
|
+
*
|
|
48
|
+
* @license MIT
|
|
49
|
+
*/var xx=e=>{throw TypeError(e)},bN=(e,n,s)=>n.has(e)||xx("Cannot "+s),kf=(e,n,s)=>(bN(e,n,"read from private field"),s?s.call(e):n.get(e)),SN=(e,n,s)=>n.has(e)?xx("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,s),Sv="popstate";function NN(e={}){function n(o,l){let{pathname:c,search:d,hash:f}=o.location;return cl("",{pathname:c,search:d,hash:f},l.state&&l.state.usr||null,l.state&&l.state.key||"default")}function s(o,l){return typeof l=="string"?l:Br(l)}return CN(n,s,null,e)}function Ge(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function Tt(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function jN(){return Math.random().toString(36).substring(2,10)}function Nv(e,n){return{usr:e.state,key:e.key,idx:n}}function cl(e,n,s=null,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof n=="string"?vo(n):n,state:s,key:n&&n.key||o||jN()}}function Br({pathname:e="/",search:n="",hash:s=""}){return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),s&&s!=="#"&&(e+=s.charAt(0)==="#"?s:"#"+s),e}function vo(e){let n={};if(e){let s=e.indexOf("#");s>=0&&(n.hash=e.substring(s),e=e.substring(0,s));let o=e.indexOf("?");o>=0&&(n.search=e.substring(o),e=e.substring(0,o)),e&&(n.pathname=e)}return n}function CN(e,n,s,o={}){let{window:l=document.defaultView,v5Compat:c=!1}=o,d=l.history,f="POP",m=null,p=x();p==null&&(p=0,d.replaceState({...d.state,idx:p},""));function x(){return(d.state||{idx:null}).idx}function g(){f="POP";let C=x(),k=C==null?null:C-p;p=C,m&&m({action:f,location:S.location,delta:k})}function w(C,k){f="PUSH";let P=cl(S.location,C,k);p=x()+1;let E=Nv(P,p),R=S.createHref(P);try{d.pushState(E,"",R)}catch(L){if(L instanceof DOMException&&L.name==="DataCloneError")throw L;l.location.assign(R)}c&&m&&m({action:f,location:S.location,delta:1})}function b(C,k){f="REPLACE";let P=cl(S.location,C,k);p=x();let E=Nv(P,p),R=S.createHref(P);d.replaceState(E,"",R),c&&m&&m({action:f,location:S.location,delta:0})}function N(C){return wx(C)}let S={get action(){return f},get location(){return e(l,d)},listen(C){if(m)throw new Error("A history only accepts one active listener");return l.addEventListener(Sv,g),m=C,()=>{l.removeEventListener(Sv,g),m=null}},createHref(C){return n(l,C)},createURL:N,encodeLocation(C){let k=N(C);return{pathname:k.pathname,search:k.search,hash:k.hash}},push:w,replace:b,go(C){return d.go(C)}};return S}function wx(e,n=!1){let s="http://localhost";typeof window<"u"&&(s=window.location.origin!=="null"?window.location.origin:window.location.href),Ge(s,"No window.location.(origin|href) available to create URL");let o=typeof e=="string"?e:Br(e);return o=o.replace(/ $/,"%20"),!n&&o.startsWith("//")&&(o=s+o),new URL(o,s)}var sl,jv=class{constructor(e){if(SN(this,sl,new Map),e)for(let[n,s]of e)this.set(n,s)}get(e){if(kf(this,sl).has(e))return kf(this,sl).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,n){kf(this,sl).set(e,n)}};sl=new WeakMap;var EN=new Set(["lazy","caseSensitive","path","id","index","children"]);function kN(e){return EN.has(e)}var RN=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function PN(e){return RN.has(e)}function TN(e){return e.index===!0}function ul(e,n,s=[],o={},l=!1){return e.map((c,d)=>{let f=[...s,String(d)],m=typeof c.id=="string"?c.id:f.join("-");if(Ge(c.index!==!0||!c.children,"Cannot specify children on an index route"),Ge(l||!o[m],`Found a route id collision on id "${m}". Route id's must be globally unique within Data Router usages`),TN(c)){let p={...c,id:m};return o[m]=Cv(p,n(p)),p}else{let p={...c,id:m,children:void 0};return o[m]=Cv(p,n(p)),c.children&&(p.children=ul(c.children,n,f,o,l)),p}})}function Cv(e,n){return Object.assign(e,{...n,...typeof n.lazy=="object"&&n.lazy!=null?{lazy:{...e.lazy,...n.lazy}}:{}})}function Js(e,n,s="/"){return ol(e,n,s,!1)}function ol(e,n,s,o){let l=typeof n=="string"?vo(n):n,c=rr(l.pathname||"/",s);if(c==null)return null;let d=bx(e);AN(d);let f=null;for(let m=0;f==null&&m<d.length;++m){let p=HN(c);f=UN(d[m],p,o)}return f}function _N(e,n){let{route:s,pathname:o,params:l}=e;return{id:s.id,pathname:o,params:l,data:n[s.id],loaderData:n[s.id],handle:s.handle}}function bx(e,n=[],s=[],o="",l=!1){let c=(d,f,m=l,p)=>{let x={relativePath:p===void 0?d.path||"":p,caseSensitive:d.caseSensitive===!0,childrenIndex:f,route:d};if(x.relativePath.startsWith("/")){if(!x.relativePath.startsWith(o)&&m)return;Ge(x.relativePath.startsWith(o),`Absolute route path "${x.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),x.relativePath=x.relativePath.slice(o.length)}let g=$r([o,x.relativePath]),w=s.concat(x);d.children&&d.children.length>0&&(Ge(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),bx(d.children,n,w,g,m)),!(d.path==null&&!d.index)&&n.push({path:g,score:FN(g,d.index),routesMeta:w})};return e.forEach((d,f)=>{var m;if(d.path===""||!((m=d.path)!=null&&m.includes("?")))c(d,f);else for(let p of Sx(d.path))c(d,f,!0,p)}),n}function Sx(e){let n=e.split("/");if(n.length===0)return[];let[s,...o]=n,l=s.endsWith("?"),c=s.replace(/\?$/,"");if(o.length===0)return l?[c,""]:[c];let d=Sx(o.join("/")),f=[];return f.push(...d.map(m=>m===""?c:[c,m].join("/"))),l&&f.push(...d),f.map(m=>e.startsWith("/")&&m===""?"/":m)}function AN(e){e.sort((n,s)=>n.score!==s.score?s.score-n.score:$N(n.routesMeta.map(o=>o.childrenIndex),s.routesMeta.map(o=>o.childrenIndex)))}var MN=/^:[\w-]+$/,IN=3,DN=2,ON=1,LN=10,zN=-2,Ev=e=>e==="*";function FN(e,n){let s=e.split("/"),o=s.length;return s.some(Ev)&&(o+=zN),n&&(o+=DN),s.filter(l=>!Ev(l)).reduce((l,c)=>l+(MN.test(c)?IN:c===""?ON:LN),o)}function $N(e,n){return e.length===n.length&&e.slice(0,-1).every((o,l)=>o===n[l])?e[e.length-1]-n[n.length-1]:0}function UN(e,n,s=!1){let{routesMeta:o}=e,l={},c="/",d=[];for(let f=0;f<o.length;++f){let m=o[f],p=f===o.length-1,x=c==="/"?n:n.slice(c.length)||"/",g=eu({path:m.relativePath,caseSensitive:m.caseSensitive,end:p},x),w=m.route;if(!g&&p&&s&&!o[o.length-1].route.index&&(g=eu({path:m.relativePath,caseSensitive:m.caseSensitive,end:!1},x)),!g)return null;Object.assign(l,g.params),d.push({params:l,pathname:$r([c,g.pathname]),pathnameBase:KN($r([c,g.pathnameBase])),route:w}),g.pathnameBase!=="/"&&(c=$r([c,g.pathnameBase]))}return d}function eu(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[s,o]=BN(e.path,e.caseSensitive,e.end),l=n.match(s);if(!l)return null;let c=l[0],d=c.replace(/(.)\/+$/,"$1"),f=l.slice(1);return{params:o.reduce((p,{paramName:x,isOptional:g},w)=>{if(x==="*"){let N=f[w]||"";d=c.slice(0,c.length-N.length).replace(/(.)\/+$/,"$1")}const b=f[w];return g&&!b?p[x]=void 0:p[x]=(b||"").replace(/%2F/g,"/"),p},{}),pathname:c,pathnameBase:d,pattern:e}}function BN(e,n=!1,s=!0){Tt(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let o=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,f,m)=>(o.push({paramName:f,isOptional:m!=null}),m?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(o.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,n?void 0:"i"),o]}function HN(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return Tt(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${n}).`),e}}function rr(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let s=n.endsWith("/")?n.length-1:n.length,o=e.charAt(s);return o&&o!=="/"?null:e.slice(s)||"/"}function VN({basename:e,pathname:n}){return n==="/"?e:$r([e,n])}var Nx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,zm=e=>Nx.test(e);function WN(e,n="/"){let{pathname:s,search:o="",hash:l=""}=typeof e=="string"?vo(e):e,c;return s?(s=s.replace(/\/\/+/g,"/"),s.startsWith("/")?c=kv(s.substring(1),"/"):c=kv(s,n)):c=n,{pathname:c,search:QN(o),hash:qN(l)}}function kv(e,n){let s=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?s.length>1&&s.pop():l!=="."&&s.push(l)}),s.length>1?s.join("/"):"/"}function Rf(e,n,s,o){return`Cannot include a '${e}' character in a manually specified \`to.${n}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${s}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function jx(e){return e.filter((n,s)=>s===0||n.route.path&&n.route.path.length>0)}function hu(e){let n=jx(e);return n.map((s,o)=>o===n.length-1?s.pathname:s.pathnameBase)}function pu(e,n,s,o=!1){let l;typeof e=="string"?l=vo(e):(l={...e},Ge(!l.pathname||!l.pathname.includes("?"),Rf("?","pathname","search",l)),Ge(!l.pathname||!l.pathname.includes("#"),Rf("#","pathname","hash",l)),Ge(!l.search||!l.search.includes("#"),Rf("#","search","hash",l)));let c=e===""||l.pathname==="",d=c?"/":l.pathname,f;if(d==null)f=s;else{let g=n.length-1;if(!o&&d.startsWith("..")){let w=d.split("/");for(;w[0]==="..";)w.shift(),g-=1;l.pathname=w.join("/")}f=g>=0?n[g]:"/"}let m=WN(l,f),p=d&&d!=="/"&&d.endsWith("/"),x=(c||d===".")&&s.endsWith("/");return!m.pathname.endsWith("/")&&(p||x)&&(m.pathname+="/"),m}var $r=e=>e.join("/").replace(/\/\/+/g,"/"),KN=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),QN=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,qN=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,wl=class{constructor(e,n,s,o=!1){this.status=e,this.statusText=n||"",this.internal=o,s instanceof Error?(this.data=s.toString(),this.error=s):this.data=s}};function si(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function bl(e){return e.map(n=>n.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Cx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ex(e,n){let s=e;if(typeof s!="string"||!Nx.test(s))return{absoluteURL:void 0,isExternal:!1,to:s};let o=s,l=!1;if(Cx)try{let c=new URL(window.location.href),d=s.startsWith("//")?new URL(c.protocol+s):new URL(s),f=rr(d.pathname,n);d.origin===c.origin&&f!=null?s=f+d.search+d.hash:l=!0}catch{Tt(!1,`<Link to="${s}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:l,to:s}}var co=Symbol("Uninstrumented");function YN(e,n){let s={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(l=>l({id:n.id,index:n.index,path:n.path,instrument(c){let d=Object.keys(s);for(let f of d)c[f]&&s[f].push(c[f])}}));let o={};if(typeof n.lazy=="function"&&s.lazy.length>0){let l=$a(s.lazy,n.lazy,()=>{});l&&(o.lazy=l)}if(typeof n.lazy=="object"){let l=n.lazy;["middleware","loader","action"].forEach(c=>{let d=l[c],f=s[`lazy.${c}`];if(typeof d=="function"&&f.length>0){let m=$a(f,d,()=>{});m&&(o.lazy=Object.assign(o.lazy||{},{[c]:m}))}})}return["loader","action"].forEach(l=>{let c=n[l];if(typeof c=="function"&&s[l].length>0){let d=c[co]??c,f=$a(s[l],d,(...m)=>Rv(m[0]));f&&(l==="loader"&&d.hydrate===!0&&(f.hydrate=!0),f[co]=d,o[l]=f)}}),n.middleware&&n.middleware.length>0&&s.middleware.length>0&&(o.middleware=n.middleware.map(l=>{let c=l[co]??l,d=$a(s.middleware,c,(...f)=>Rv(f[0]));return d?(d[co]=c,d):l})),o}function GN(e,n){let s={navigate:[],fetch:[]};if(n.forEach(o=>o({instrument(l){let c=Object.keys(l);for(let d of c)l[d]&&s[d].push(l[d])}})),s.navigate.length>0){let o=e.navigate[co]??e.navigate,l=$a(s.navigate,o,(...c)=>{let[d,f]=c;return{to:typeof d=="number"||typeof d=="string"?d:d?Br(d):".",...Pv(e,f??{})}});l&&(l[co]=o,e.navigate=l)}if(s.fetch.length>0){let o=e.fetch[co]??e.fetch,l=$a(s.fetch,o,(...c)=>{let[d,,f,m]=c;return{href:f??".",fetcherKey:d,...Pv(e,m??{})}});l&&(l[co]=o,e.fetch=l)}return e}function $a(e,n,s){return e.length===0?null:async(...o)=>{let l=await kx(e,s(...o),()=>n(...o),e.length-1);if(l.type==="error")throw l.value;return l.value}}async function kx(e,n,s,o){let l=e[o],c;if(l){let d,f=async()=>(d?console.error("You cannot call instrumented handlers more than once"):d=kx(e,n,s,o-1),c=await d,Ge(c,"Expected a result"),c.type==="error"&&c.value instanceof Error?{status:"error",error:c.value}:{status:"success",error:void 0});try{await l(f,n)}catch(m){console.error("An instrumentation function threw an error:",m)}d||await f(),await d}else try{c={type:"success",value:await s()}}catch(d){c={type:"error",value:d}}return c||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function Rv(e){let{request:n,context:s,params:o,unstable_pattern:l}=e;return{request:XN(n),params:{...o},unstable_pattern:l,context:JN(s)}}function Pv(e,n){return{currentUrl:Br(e.state.location),..."formMethod"in n?{formMethod:n.formMethod}:{},..."formEncType"in n?{formEncType:n.formEncType}:{},..."formData"in n?{formData:n.formData}:{},..."body"in n?{body:n.body}:{}}}function XN(e){return{method:e.method,url:e.url,headers:{get:(...n)=>e.headers.get(...n)}}}function JN(e){if(ej(e)){let n={...e};return Object.freeze(n),n}else return{get:n=>e.get(n)}}var ZN=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function ej(e){if(e===null||typeof e!="object")return!1;const n=Object.getPrototypeOf(e);return n===Object.prototype||n===null||Object.getOwnPropertyNames(n).sort().join("\0")===ZN}var Rx=["POST","PUT","PATCH","DELETE"],tj=new Set(Rx),nj=["GET",...Rx],rj=new Set(nj),Px=new Set([301,302,303,307,308]),sj=new Set([307,308]),Pf={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},oj={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Gi={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},aj=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Tx="remix-router-transitions",_x=Symbol("ResetLoaderData");function ij(e){const n=e.window?e.window:typeof window<"u"?window:void 0,s=typeof n<"u"&&typeof n.document<"u"&&typeof n.document.createElement<"u";Ge(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let o=e.hydrationRouteProperties||[],l=e.mapRouteProperties||aj,c=l;if(e.unstable_instrumentations){let A=e.unstable_instrumentations;c=$=>({...l($),...YN(A.map(K=>K.route).filter(Boolean),$)})}let d={},f=ul(e.routes,c,void 0,d),m,p=e.basename||"/";p.startsWith("/")||(p=`/${p}`);let x=e.dataStrategy||fj,g={...e.future},w=null,b=new Set,N=null,S=null,C=null,k=e.hydrationData!=null,P=Js(f,e.history.location,p),E=!1,R=null,L;if(P==null&&!e.patchRoutesOnNavigation){let A=tr(404,{pathname:e.history.location.pathname}),{matches:$,route:K}=Mc(f);L=!0,P=$,R={[K.id]:A}}else if(P&&!e.hydrationData&&Mt(P,f,e.history.location.pathname).active&&(P=null),P)if(P.some(A=>A.route.lazy))L=!1;else if(!P.some(A=>Fm(A.route)))L=!0;else{let A=e.hydrationData?e.hydrationData.loaderData:null,$=e.hydrationData?e.hydrationData.errors:null;if($){let K=P.findIndex(re=>$[re.route.id]!==void 0);L=P.slice(0,K+1).every(re=>!Jf(re.route,A,$))}else L=P.every(K=>!Jf(K.route,A,$))}else{L=!1,P=[];let A=Mt(null,f,e.history.location.pathname);A.active&&A.matches&&(E=!0,P=A.matches)}let B,T={historyAction:e.history.action,location:e.history.location,matches:P,initialized:L,navigation:Pf,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||R,fetchers:new Map,blockers:new Map},I="POP",W=null,J=!1,Z,q=!1,pe=new Map,ue=null,ge=!1,G=!1,ie=new Set,F=new Map,se=0,ne=-1,D=new Map,M=new Set,Y=new Map,te=new Map,ee=new Set,oe=new Map,X,he=null;function ye(){if(w=e.history.listen(({action:A,location:$,delta:K})=>{if(X){X(),X=void 0;return}Tt(oe.size===0||K!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let re=ur({currentLocation:T.location,nextLocation:$,historyAction:A});if(re&&K!=null){let fe=new Promise(Pe=>{X=Pe});e.history.go(K*-1),kr(re,{state:"blocked",location:$,proceed(){kr(re,{state:"proceeding",proceed:void 0,reset:void 0,location:$}),fe.then(()=>e.history.go(K))},reset(){let Pe=new Map(T.blockers);Pe.set(re,Gi),Me({blockers:Pe})}}),W==null||W.resolve(),W=null;return}return $t(A,$)}),s){Tj(n,pe);let A=()=>_j(n,pe);n.addEventListener("pagehide",A),ue=()=>n.removeEventListener("pagehide",A)}return T.initialized||$t("POP",T.location,{initialHydration:!0}),B}function Ae(){w&&w(),ue&&ue(),b.clear(),Z&&Z.abort(),T.fetchers.forEach((A,$)=>Kn($)),T.blockers.forEach((A,$)=>pn($))}function Ke(A){return b.add(A),()=>b.delete(A)}function Me(A,$={}){A.matches&&(A.matches=A.matches.map(fe=>{let Pe=d[fe.route.id],De=fe.route;return De.element!==Pe.element||De.errorElement!==Pe.errorElement||De.hydrateFallbackElement!==Pe.hydrateFallbackElement?{...fe,route:Pe}:fe})),T={...T,...A};let K=[],re=[];T.fetchers.forEach((fe,Pe)=>{fe.state==="idle"&&(ee.has(Pe)?K.push(Pe):re.push(Pe))}),ee.forEach(fe=>{!T.fetchers.has(fe)&&!F.has(fe)&&K.push(fe)}),[...b].forEach(fe=>fe(T,{deletedFetchers:K,newErrors:A.errors??null,viewTransitionOpts:$.viewTransitionOpts,flushSync:$.flushSync===!0})),K.forEach(fe=>Kn(fe)),re.forEach(fe=>T.fetchers.delete(fe))}function ft(A,$,{flushSync:K}={}){var He,_e;let re=T.actionData!=null&&T.navigation.formMethod!=null&&fn(T.navigation.formMethod)&&T.navigation.state==="loading"&&((He=A.state)==null?void 0:He._isRedirect)!==!0,fe;$.actionData?Object.keys($.actionData).length>0?fe=$.actionData:fe=null:re?fe=T.actionData:fe=null;let Pe=$.loaderData?Fv(T.loaderData,$.loaderData,$.matches||[],$.errors):T.loaderData,De=T.blockers;De.size>0&&(De=new Map(De),De.forEach((Ve,Je)=>De.set(Je,Gi)));let we=ge?!1:kt(A,$.matches||T.matches),Se=J===!0||T.navigation.formMethod!=null&&fn(T.navigation.formMethod)&&((_e=A.state)==null?void 0:_e._isRedirect)!==!0;m&&(f=m,m=void 0),ge||I==="POP"||(I==="PUSH"?e.history.push(A,A.state):I==="REPLACE"&&e.history.replace(A,A.state));let ke;if(I==="POP"){let Ve=pe.get(T.location.pathname);Ve&&Ve.has(A.pathname)?ke={currentLocation:T.location,nextLocation:A}:pe.has(A.pathname)&&(ke={currentLocation:A,nextLocation:T.location})}else if(q){let Ve=pe.get(T.location.pathname);Ve?Ve.add(A.pathname):(Ve=new Set([A.pathname]),pe.set(T.location.pathname,Ve)),ke={currentLocation:T.location,nextLocation:A}}Me({...$,actionData:fe,loaderData:Pe,historyAction:I,location:A,initialized:!0,navigation:Pf,revalidation:"idle",restoreScrollPosition:we,preventScrollReset:Se,blockers:De},{viewTransitionOpts:ke,flushSync:K===!0}),I="POP",J=!1,q=!1,ge=!1,G=!1,W==null||W.resolve(),W=null,he==null||he.resolve(),he=null}async function _t(A,$){if(W==null||W.resolve(),W=null,typeof A=="number"){W||(W=Hv());let Je=W.promise;return e.history.go(A),Je}let K=Xf(T.location,T.matches,p,A,$==null?void 0:$.fromRouteId,$==null?void 0:$.relative),{path:re,submission:fe,error:Pe}=Tv(!1,K,$),De=T.location,we=cl(T.location,re,$&&$.state);we={...we,...e.history.encodeLocation(we)};let Se=$&&$.replace!=null?$.replace:void 0,ke="PUSH";Se===!0?ke="REPLACE":Se===!1||fe!=null&&fn(fe.formMethod)&&fe.formAction===T.location.pathname+T.location.search&&(ke="REPLACE");let He=$&&"preventScrollReset"in $?$.preventScrollReset===!0:void 0,_e=($&&$.flushSync)===!0,Ve=ur({currentLocation:De,nextLocation:we,historyAction:ke});if(Ve){kr(Ve,{state:"blocked",location:we,proceed(){kr(Ve,{state:"proceeding",proceed:void 0,reset:void 0,location:we}),_t(A,$)},reset(){let Je=new Map(T.blockers);Je.set(Ve,Gi),Me({blockers:Je})}});return}await $t(ke,we,{submission:fe,pendingError:Pe,preventScrollReset:He,replace:$&&$.replace,enableViewTransition:$&&$.viewTransition,flushSync:_e,callSiteDefaultShouldRevalidate:$&&$.unstable_defaultShouldRevalidate})}function Vn(){he||(he=Hv()),Jr(),Me({revalidation:"loading"});let A=he.promise;return T.navigation.state==="submitting"?A:T.navigation.state==="idle"?($t(T.historyAction,T.location,{startUninterruptedRevalidation:!0}),A):($t(I||T.historyAction,T.navigation.location,{overrideNavigation:T.navigation,enableViewTransition:q===!0}),A)}async function $t(A,$,K){Z&&Z.abort(),Z=null,I=A,ge=(K&&K.startUninterruptedRevalidation)===!0,bt(T.location,T.matches),J=(K&&K.preventScrollReset)===!0,q=(K&&K.enableViewTransition)===!0;let re=m||f,fe=K&&K.overrideNavigation,Pe=K!=null&&K.initialHydration&&T.matches&&T.matches.length>0&&!E?T.matches:Js(re,$,p),De=(K&&K.flushSync)===!0;if(Pe&&T.initialized&&!G&&wj(T.location,$)&&!(K&&K.submission&&fn(K.submission.formMethod))){ft($,{matches:Pe},{flushSync:De});return}let we=Mt(Pe,re,$.pathname);if(we.active&&we.matches&&(Pe=we.matches),!Pe){let{error:It,notFoundMatches:Qt,route:st}=Mn($.pathname);ft($,{matches:Qt,loaderData:{},errors:{[st.id]:It}},{flushSync:De});return}Z=new AbortController;let Se=La(e.history,$,Z.signal,K&&K.submission),ke=e.getContext?await e.getContext():new jv,He;if(K&&K.pendingError)He=[Zs(Pe).route.id,{type:"error",error:K.pendingError}];else if(K&&K.submission&&fn(K.submission.formMethod)){let It=await Zt(Se,$,K.submission,Pe,ke,we.active,K&&K.initialHydration===!0,{replace:K.replace,flushSync:De});if(It.shortCircuited)return;if(It.pendingActionResult){let[Qt,st]=It.pendingActionResult;if($n(st)&&si(st.error)&&st.error.status===404){Z=null,ft($,{matches:It.matches,loaderData:{},errors:{[Qt]:st.error}});return}}Pe=It.matches||Pe,He=It.pendingActionResult,fe=Tf($,K.submission),De=!1,we.active=!1,Se=La(e.history,Se.url,Se.signal)}let{shortCircuited:_e,matches:Ve,loaderData:Je,errors:zt}=await Gr(Se,$,Pe,ke,we.active,fe,K&&K.submission,K&&K.fetcherSubmission,K&&K.replace,K&&K.initialHydration===!0,De,He,K&&K.callSiteDefaultShouldRevalidate);_e||(Z=null,ft($,{matches:Ve||Pe,...$v(He),loaderData:Je,errors:zt}))}async function Zt(A,$,K,re,fe,Pe,De,we={}){Jr();let Se=Rj($,K);if(Me({navigation:Se},{flushSync:we.flushSync===!0}),Pe){let _e=await In(re,$.pathname,A.signal);if(_e.type==="aborted")return{shortCircuited:!0};if(_e.type==="error"){if(_e.partialMatches.length===0){let{matches:Je,route:zt}=Mc(f);return{matches:Je,pendingActionResult:[zt.id,{type:"error",error:_e.error}]}}let Ve=Zs(_e.partialMatches).route.id;return{matches:_e.partialMatches,pendingActionResult:[Ve,{type:"error",error:_e.error}]}}else if(_e.matches)re=_e.matches;else{let{notFoundMatches:Ve,error:Je,route:zt}=Mn($.pathname);return{matches:Ve,pendingActionResult:[zt.id,{type:"error",error:Je}]}}}let ke,He=Qc(re,$);if(!He.route.action&&!He.route.lazy)ke={type:"error",error:tr(405,{method:A.method,pathname:$.pathname,routeId:He.route.id})};else{let _e=Ba(c,d,A,re,He,De?[]:o,fe),Ve=await jr(A,_e,fe,null);if(ke=Ve[He.route.id],!ke){for(let Je of re)if(Ve[Je.route.id]){ke=Ve[Je.route.id];break}}if(A.signal.aborted)return{shortCircuited:!0}}if(Fo(ke)){let _e;return we&&we.replace!=null?_e=we.replace:_e=Ov(ke.response.headers.get("Location"),new URL(A.url),p,e.history)===T.location.pathname+T.location.search,await Wn(A,ke,!0,{submission:K,replace:_e}),{shortCircuited:!0}}if($n(ke)){let _e=Zs(re,He.route.id);return(we&&we.replace)!==!0&&(I="PUSH"),{matches:re,pendingActionResult:[_e.route.id,ke,He.route.id]}}return{matches:re,pendingActionResult:[He.route.id,ke]}}async function Gr(A,$,K,re,fe,Pe,De,we,Se,ke,He,_e,Ve){let Je=Pe||Tf($,De),zt=De||we||Bv(Je),It=!ge&&!ke;if(fe){if(It){let ut=At(_e);Me({navigation:Je,...ut!==void 0?{actionData:ut}:{}},{flushSync:He})}let Ze=await In(K,$.pathname,A.signal);if(Ze.type==="aborted")return{shortCircuited:!0};if(Ze.type==="error"){if(Ze.partialMatches.length===0){let{matches:Ps,route:ns}=Mc(f);return{matches:Ps,loaderData:{},errors:{[ns.id]:Ze.error}}}let ut=Zs(Ze.partialMatches).route.id;return{matches:Ze.partialMatches,loaderData:{},errors:{[ut]:Ze.error}}}else if(Ze.matches)K=Ze.matches;else{let{error:ut,notFoundMatches:Ps,route:ns}=Mn($.pathname);return{matches:Ps,loaderData:{},errors:{[ns.id]:ut}}}}let Qt=m||f,{dsMatches:st,revalidatingFetchers:Sn}=_v(A,re,c,d,e.history,T,K,zt,$,ke?[]:o,ke===!0,G,ie,ee,Y,M,Qt,p,e.patchRoutesOnNavigation!=null,_e,Ve);if(ne=++se,!e.dataStrategy&&!st.some(Ze=>Ze.shouldLoad)&&!st.some(Ze=>Ze.route.middleware&&Ze.route.middleware.length>0)&&Sn.length===0){let Ze=Zr();return ft($,{matches:K,loaderData:{},errors:_e&&$n(_e[1])?{[_e[0]]:_e[1].error}:null,...$v(_e),...Ze?{fetchers:new Map(T.fetchers)}:{}},{flushSync:He}),{shortCircuited:!0}}if(It){let Ze={};if(!fe){Ze.navigation=Je;let ut=At(_e);ut!==void 0&&(Ze.actionData=ut)}Sn.length>0&&(Ze.fetchers=Xr(Sn)),Me(Ze,{flushSync:He})}Sn.forEach(Ze=>{bn(Ze.key),Ze.controller&&F.set(Ze.key,Ze.controller)});let at=()=>Sn.forEach(Ze=>bn(Ze.key));Z&&Z.signal.addEventListener("abort",at);let{loaderResults:So,fetcherResults:Qn}=await Cr(st,Sn,A,re);if(A.signal.aborted)return{shortCircuited:!0};Z&&Z.signal.removeEventListener("abort",at),Sn.forEach(Ze=>F.delete(Ze.key));let Dn=Ic(So);if(Dn)return await Wn(A,Dn.result,!0,{replace:Se}),{shortCircuited:!0};if(Dn=Ic(Qn),Dn)return M.add(Dn.key),await Wn(A,Dn.result,!0,{replace:Se}),{shortCircuited:!0};let{loaderData:Rs,errors:No}=zv(T,K,So,_e,Sn,Qn);ke&&T.errors&&(No={...T.errors,...No});let Pr=Zr(),ts=ks(ne),gn=Pr||ts||Sn.length>0;return{matches:K,loaderData:Rs,errors:No,...gn?{fetchers:new Map(T.fetchers)}:{}}}function At(A){if(A&&!$n(A[1]))return{[A[0]]:A[1].data};if(T.actionData)return Object.keys(T.actionData).length===0?null:T.actionData}function Xr(A){return A.forEach($=>{let K=T.fetchers.get($.key),re=Xi(void 0,K?K.data:void 0);T.fetchers.set($.key,re)}),new Map(T.fetchers)}async function Nr(A,$,K,re){bn(A);let fe=(re&&re.flushSync)===!0,Pe=m||f,De=Xf(T.location,T.matches,p,K,$,re==null?void 0:re.relative),we=Js(Pe,De,p),Se=Mt(we,Pe,De);if(Se.active&&Se.matches&&(we=Se.matches),!we){on(A,$,tr(404,{pathname:De}),{flushSync:fe});return}let{path:ke,submission:He,error:_e}=Tv(!0,De,re);if(_e){on(A,$,_e,{flushSync:fe});return}let Ve=e.getContext?await e.getContext():new jv,Je=(re&&re.preventScrollReset)===!0;if(He&&fn(He.formMethod)){await Ut(A,$,ke,we,Ve,Se.active,fe,Je,He,re&&re.unstable_defaultShouldRevalidate);return}Y.set(A,{routeId:$,path:ke}),await cr(A,$,ke,we,Ve,Se.active,fe,Je,He)}async function Ut(A,$,K,re,fe,Pe,De,we,Se,ke){Jr(),Y.delete(A);let He=T.fetchers.get(A);en(A,Pj(Se,He),{flushSync:De});let _e=new AbortController,Ve=La(e.history,K,_e.signal,Se);if(Pe){let yt=await In(re,new URL(Ve.url).pathname,Ve.signal,A);if(yt.type==="aborted")return;if(yt.type==="error"){on(A,$,yt.error,{flushSync:De});return}else if(yt.matches)re=yt.matches;else{on(A,$,tr(404,{pathname:K}),{flushSync:De});return}}let Je=Qc(re,K);if(!Je.route.action&&!Je.route.lazy){let yt=tr(405,{method:Se.formMethod,pathname:K,routeId:$});on(A,$,yt,{flushSync:De});return}F.set(A,_e);let zt=se,It=Ba(c,d,Ve,re,Je,o,fe),Qt=await jr(Ve,It,fe,A),st=Qt[Je.route.id];if(!st){for(let yt of It)if(Qt[yt.route.id]){st=Qt[yt.route.id];break}}if(Ve.signal.aborted){F.get(A)===_e&&F.delete(A);return}if(ee.has(A)){if(Fo(st)||$n(st)){en(A,ms(void 0));return}}else{if(Fo(st))if(F.delete(A),ne>zt){en(A,ms(void 0));return}else return M.add(A),en(A,Xi(Se)),Wn(Ve,st,!1,{fetcherSubmission:Se,preventScrollReset:we});if($n(st)){on(A,$,st.error);return}}let Sn=T.navigation.location||T.location,at=La(e.history,Sn,_e.signal),So=m||f,Qn=T.navigation.state!=="idle"?Js(So,T.navigation.location,p):T.matches;Ge(Qn,"Didn't find any matches after fetcher action");let Dn=++se;D.set(A,Dn);let Rs=Xi(Se,st.data);T.fetchers.set(A,Rs);let{dsMatches:No,revalidatingFetchers:Pr}=_v(at,fe,c,d,e.history,T,Qn,Se,Sn,o,!1,G,ie,ee,Y,M,So,p,e.patchRoutesOnNavigation!=null,[Je.route.id,st],ke);Pr.filter(yt=>yt.key!==A).forEach(yt=>{let rs=yt.key,jo=T.fetchers.get(rs),Co=Xi(void 0,jo?jo.data:void 0);T.fetchers.set(rs,Co),bn(rs),yt.controller&&F.set(rs,yt.controller)}),Me({fetchers:new Map(T.fetchers)});let ts=()=>Pr.forEach(yt=>bn(yt.key));_e.signal.addEventListener("abort",ts);let{loaderResults:gn,fetcherResults:Ze}=await Cr(No,Pr,at,fe);if(_e.signal.aborted)return;if(_e.signal.removeEventListener("abort",ts),D.delete(A),F.delete(A),Pr.forEach(yt=>F.delete(yt.key)),T.fetchers.has(A)){let yt=ms(st.data);T.fetchers.set(A,yt)}let ut=Ic(gn);if(ut)return Wn(at,ut.result,!1,{preventScrollReset:we});if(ut=Ic(Ze),ut)return M.add(ut.key),Wn(at,ut.result,!1,{preventScrollReset:we});let{loaderData:Ps,errors:ns}=zv(T,Qn,gn,void 0,Pr,Ze);ks(Dn),T.navigation.state==="loading"&&Dn>ne?(Ge(I,"Expected pending action"),Z&&Z.abort(),ft(T.navigation.location,{matches:Qn,loaderData:Ps,errors:ns,fetchers:new Map(T.fetchers)})):(Me({errors:ns,loaderData:Fv(T.loaderData,Ps,Qn,ns),fetchers:new Map(T.fetchers)}),G=!1)}async function cr(A,$,K,re,fe,Pe,De,we,Se){let ke=T.fetchers.get(A);en(A,Xi(Se,ke?ke.data:void 0),{flushSync:De});let He=new AbortController,_e=La(e.history,K,He.signal);if(Pe){let st=await In(re,new URL(_e.url).pathname,_e.signal,A);if(st.type==="aborted")return;if(st.type==="error"){on(A,$,st.error,{flushSync:De});return}else if(st.matches)re=st.matches;else{on(A,$,tr(404,{pathname:K}),{flushSync:De});return}}let Ve=Qc(re,K);F.set(A,He);let Je=se,zt=Ba(c,d,_e,re,Ve,o,fe),Qt=(await jr(_e,zt,fe,A))[Ve.route.id];if(F.get(A)===He&&F.delete(A),!_e.signal.aborted){if(ee.has(A)){en(A,ms(void 0));return}if(Fo(Qt))if(ne>Je){en(A,ms(void 0));return}else{M.add(A),await Wn(_e,Qt,!1,{preventScrollReset:we});return}if($n(Qt)){on(A,$,Qt.error);return}en(A,ms(Qt.data))}}async function Wn(A,$,K,{submission:re,fetcherSubmission:fe,preventScrollReset:Pe,replace:De}={}){K||(W==null||W.resolve(),W=null),$.response.headers.has("X-Remix-Revalidate")&&(G=!0);let we=$.response.headers.get("Location");Ge(we,"Expected a Location header on the redirect Response"),we=Ov(we,new URL(A.url),p,e.history);let Se=cl(T.location,we,{_isRedirect:!0});if(s){let zt=!1;if($.response.headers.has("X-Remix-Reload-Document"))zt=!0;else if(zm(we)){const It=wx(we,!0);zt=It.origin!==n.location.origin||rr(It.pathname,p)==null}if(zt){De?n.location.replace(we):n.location.assign(we);return}}Z=null;let ke=De===!0||$.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:He,formAction:_e,formEncType:Ve}=T.navigation;!re&&!fe&&He&&_e&&Ve&&(re=Bv(T.navigation));let Je=re||fe;if(sj.has($.response.status)&&Je&&fn(Je.formMethod))await $t(ke,Se,{submission:{...Je,formAction:we},preventScrollReset:Pe||J,enableViewTransition:K?q:void 0});else{let zt=Tf(Se,re);await $t(ke,Se,{overrideNavigation:zt,fetcherSubmission:fe,preventScrollReset:Pe||J,enableViewTransition:K?q:void 0})}}async function jr(A,$,K,re){var De;let fe,Pe={};try{fe=await hj(x,A,$,re,K,!1)}catch(we){return $.filter(Se=>Se.shouldLoad).forEach(Se=>{Pe[Se.route.id]={type:"error",error:we}}),Pe}if(A.signal.aborted)return Pe;if(!fn(A.method))for(let we of $){if(((De=fe[we.route.id])==null?void 0:De.type)==="error")break;!fe.hasOwnProperty(we.route.id)&&!T.loaderData.hasOwnProperty(we.route.id)&&(!T.errors||!T.errors.hasOwnProperty(we.route.id))&&we.shouldCallHandler()&&(fe[we.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${we.route.id}`)})}for(let[we,Se]of Object.entries(fe))if(jj(Se)){let ke=Se.result;Pe[we]={type:"redirect",response:yj(ke,A,we,$,p)}}else Pe[we]=await vj(Se);return Pe}async function Cr(A,$,K,re){let fe=jr(K,A,re,null),Pe=Promise.all($.map(async Se=>{if(Se.matches&&Se.match&&Se.request&&Se.controller){let He=(await jr(Se.request,Se.matches,re,Se.key))[Se.match.route.id];return{[Se.key]:He}}else return Promise.resolve({[Se.key]:{type:"error",error:tr(404,{pathname:Se.path})}})})),De=await fe,we=(await Pe).reduce((Se,ke)=>Object.assign(Se,ke),{});return{loaderResults:De,fetcherResults:we}}function Jr(){G=!0,Y.forEach((A,$)=>{F.has($)&&ie.add($),bn($)})}function en(A,$,K={}){T.fetchers.set(A,$),Me({fetchers:new Map(T.fetchers)},{flushSync:(K&&K.flushSync)===!0})}function on(A,$,K,re={}){let fe=Zs(T.matches,$);Kn(A),Me({errors:{[fe.route.id]:K},fetchers:new Map(T.fetchers)},{flushSync:(re&&re.flushSync)===!0})}function hn(A){return te.set(A,(te.get(A)||0)+1),ee.has(A)&&ee.delete(A),T.fetchers.get(A)||oj}function Er(A,$){bn(A,$==null?void 0:$.reason),en(A,ms(null))}function Kn(A){let $=T.fetchers.get(A);F.has(A)&&!($&&$.state==="loading"&&D.has(A))&&bn(A),Y.delete(A),D.delete(A),M.delete(A),ee.delete(A),ie.delete(A),T.fetchers.delete(A)}function ua(A){let $=(te.get(A)||0)-1;$<=0?(te.delete(A),ee.add(A)):te.set(A,$),Me({fetchers:new Map(T.fetchers)})}function bn(A,$){let K=F.get(A);K&&(K.abort($),F.delete(A))}function wo(A){for(let $ of A){let K=hn($),re=ms(K.data);T.fetchers.set($,re)}}function Zr(){let A=[],$=!1;for(let K of M){let re=T.fetchers.get(K);Ge(re,`Expected fetcher: ${K}`),re.state==="loading"&&(M.delete(K),A.push(K),$=!0)}return wo(A),$}function ks(A){let $=[];for(let[K,re]of D)if(re<A){let fe=T.fetchers.get(K);Ge(fe,`Expected fetcher: ${K}`),fe.state==="loading"&&(bn(K),D.delete(K),$.push(K))}return wo($),$.length>0}function es(A,$){let K=T.blockers.get(A)||Gi;return oe.get(A)!==$&&oe.set(A,$),K}function pn(A){T.blockers.delete(A),oe.delete(A)}function kr(A,$){let K=T.blockers.get(A)||Gi;Ge(K.state==="unblocked"&&$.state==="blocked"||K.state==="blocked"&&$.state==="blocked"||K.state==="blocked"&&$.state==="proceeding"||K.state==="blocked"&&$.state==="unblocked"||K.state==="proceeding"&&$.state==="unblocked",`Invalid blocker state transition: ${K.state} -> ${$.state}`);let re=new Map(T.blockers);re.set(A,$),Me({blockers:re})}function ur({currentLocation:A,nextLocation:$,historyAction:K}){if(oe.size===0)return;oe.size>1&&Tt(!1,"A router only supports one blocker at a time");let re=Array.from(oe.entries()),[fe,Pe]=re[re.length-1],De=T.blockers.get(fe);if(!(De&&De.state==="proceeding")&&Pe({currentLocation:A,nextLocation:$,historyAction:K}))return fe}function Mn(A){let $=tr(404,{pathname:A}),K=m||f,{matches:re,route:fe}=Mc(K);return{notFoundMatches:re,route:fe,error:$}}function bo(A,$,K){if(N=A,C=$,S=K||null,!k&&T.navigation===Pf){k=!0;let re=kt(T.location,T.matches);re!=null&&Me({restoreScrollPosition:re})}return()=>{N=null,C=null,S=null}}function Be(A,$){return S&&S(A,$.map(re=>_N(re,T.loaderData)))||A.key}function bt(A,$){if(N&&C){let K=Be(A,$);N[K]=C()}}function kt(A,$){if(N){let K=Be(A,$),re=N[K];if(typeof re=="number")return re}return null}function Mt(A,$,K){if(e.patchRoutesOnNavigation)if(A){if(Object.keys(A[0].params).length>0)return{active:!0,matches:ol($,K,p,!0)}}else return{active:!0,matches:ol($,K,p,!0)||[]};return{active:!1,matches:null}}async function In(A,$,K,re){if(!e.patchRoutesOnNavigation)return{type:"success",matches:A};let fe=A;for(;;){let Pe=m==null,De=m||f,we=d;try{await e.patchRoutesOnNavigation({signal:K,path:$,matches:fe,fetcherKey:re,patch:(He,_e)=>{K.aborted||Av(He,_e,De,we,c,!1)}})}catch(He){return{type:"error",error:He,partialMatches:fe}}finally{Pe&&!K.aborted&&(f=[...f])}if(K.aborted)return{type:"aborted"};let Se=Js(De,$,p),ke=null;if(Se){if(Object.keys(Se[0].params).length===0)return{type:"success",matches:Se};if(ke=ol(De,$,p,!0),!(ke&&fe.length<ke.length&&St(fe,ke.slice(0,fe.length))))return{type:"success",matches:Se}}if(ke||(ke=ol(De,$,p,!0)),!ke||St(fe,ke))return{type:"success",matches:null};fe=ke}}function St(A,$){return A.length===$.length&&A.every((K,re)=>K.route.id===$[re].route.id)}function Lt(A){d={},m=ul(A,c,void 0,d)}function Rr(A,$,K=!1){let re=m==null;Av(A,$,m||f,d,c,K),re&&(f=[...f],Me({}))}return B={get basename(){return p},get future(){return g},get state(){return T},get routes(){return f},get window(){return n},initialize:ye,subscribe:Ke,enableScrollRestoration:bo,navigate:_t,fetch:Nr,revalidate:Vn,createHref:A=>e.history.createHref(A),encodeLocation:A=>e.history.encodeLocation(A),getFetcher:hn,resetFetcher:Er,deleteFetcher:ua,dispose:Ae,getBlocker:es,deleteBlocker:pn,patchRoutes:Rr,_internalFetchControllers:F,_internalSetRoutes:Lt,_internalSetStateDoNotUseOrYouWillBreakYourApp(A){Me(A)}},e.unstable_instrumentations&&(B=GN(B,e.unstable_instrumentations.map(A=>A.router).filter(Boolean))),B}function lj(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Xf(e,n,s,o,l,c){let d,f;if(l){d=[];for(let p of n)if(d.push(p),p.route.id===l){f=p;break}}else d=n,f=n[n.length-1];let m=pu(o||".",hu(d),rr(e.pathname,s)||e.pathname,c==="path");if(o==null&&(m.search=e.search,m.hash=e.hash),(o==null||o===""||o===".")&&f){let p=Um(m.search);if(f.route.index&&!p)m.search=m.search?m.search.replace(/^\?/,"?index&"):"?index";else if(!f.route.index&&p){let x=new URLSearchParams(m.search),g=x.getAll("index");x.delete("index"),g.filter(b=>b).forEach(b=>x.append("index",b));let w=x.toString();m.search=w?`?${w}`:""}}return s!=="/"&&(m.pathname=VN({basename:s,pathname:m.pathname})),Br(m)}function Tv(e,n,s){if(!s||!lj(s))return{path:n};if(s.formMethod&&!kj(s.formMethod))return{path:n,error:tr(405,{method:s.formMethod})};let o=()=>({path:n,error:tr(400,{type:"invalid-body"})}),c=(s.formMethod||"get").toUpperCase(),d=Lx(n);if(s.body!==void 0){if(s.formEncType==="text/plain"){if(!fn(c))return o();let g=typeof s.body=="string"?s.body:s.body instanceof FormData||s.body instanceof URLSearchParams?Array.from(s.body.entries()).reduce((w,[b,N])=>`${w}${b}=${N}
|
|
50
|
+
`,""):String(s.body);return{path:n,submission:{formMethod:c,formAction:d,formEncType:s.formEncType,formData:void 0,json:void 0,text:g}}}else if(s.formEncType==="application/json"){if(!fn(c))return o();try{let g=typeof s.body=="string"?JSON.parse(s.body):s.body;return{path:n,submission:{formMethod:c,formAction:d,formEncType:s.formEncType,formData:void 0,json:g,text:void 0}}}catch{return o()}}}Ge(typeof FormData=="function","FormData is not available in this environment");let f,m;if(s.formData)f=em(s.formData),m=s.formData;else if(s.body instanceof FormData)f=em(s.body),m=s.body;else if(s.body instanceof URLSearchParams)f=s.body,m=Lv(f);else if(s.body==null)f=new URLSearchParams,m=new FormData;else try{f=new URLSearchParams(s.body),m=Lv(f)}catch{return o()}let p={formMethod:c,formAction:d,formEncType:s&&s.formEncType||"application/x-www-form-urlencoded",formData:m,json:void 0,text:void 0};if(fn(p.formMethod))return{path:n,submission:p};let x=vo(n);return e&&x.search&&Um(x.search)&&f.append("index",""),x.search=`?${f}`,{path:Br(x),submission:p}}function _v(e,n,s,o,l,c,d,f,m,p,x,g,w,b,N,S,C,k,P,E,R){var ge;let L=E?$n(E[1])?E[1].error:E[1].data:void 0,B=l.createURL(c.location),T=l.createURL(m),I;if(x&&c.errors){let G=Object.keys(c.errors)[0];I=d.findIndex(ie=>ie.route.id===G)}else if(E&&$n(E[1])){let G=E[0];I=d.findIndex(ie=>ie.route.id===G)-1}let W=E?E[1].statusCode:void 0,J=W&&W>=400,Z={currentUrl:B,currentParams:((ge=c.matches[0])==null?void 0:ge.params)||{},nextUrl:T,nextParams:d[0].params,...f,actionResult:L,actionStatus:W},q=bl(d),pe=d.map((G,ie)=>{let{route:F}=G,se=null;if(I!=null&&ie>I?se=!1:F.lazy?se=!0:Fm(F)?x?se=Jf(F,c.loaderData,c.errors):cj(c.loaderData,c.matches[ie],G)&&(se=!0):se=!1,se!==null)return Zf(s,o,e,q,G,p,n,se);let ne=!1;typeof R=="boolean"?ne=R:J?ne=!1:(g||B.pathname+B.search===T.pathname+T.search||B.search!==T.search||uj(c.matches[ie],G))&&(ne=!0);let D={...Z,defaultShouldRevalidate:ne},M=ll(G,D);return Zf(s,o,e,q,G,p,n,M,D,R)}),ue=[];return N.forEach((G,ie)=>{if(x||!d.some(ee=>ee.route.id===G.routeId)||b.has(ie))return;let F=c.fetchers.get(ie),se=F&&F.state!=="idle"&&F.data===void 0,ne=Js(C,G.path,k);if(!ne){if(P&&se)return;ue.push({key:ie,routeId:G.routeId,path:G.path,matches:null,match:null,request:null,controller:null});return}if(S.has(ie))return;let D=Qc(ne,G.path),M=new AbortController,Y=La(l,G.path,M.signal),te=null;if(w.has(ie))w.delete(ie),te=Ba(s,o,Y,ne,D,p,n);else if(se)g&&(te=Ba(s,o,Y,ne,D,p,n));else{let ee;typeof R=="boolean"?ee=R:J?ee=!1:ee=g;let oe={...Z,defaultShouldRevalidate:ee};ll(D,oe)&&(te=Ba(s,o,Y,ne,D,p,n,oe))}te&&ue.push({key:ie,routeId:G.routeId,path:G.path,matches:te,match:D,request:Y,controller:M})}),{dsMatches:pe,revalidatingFetchers:ue}}function Fm(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Jf(e,n,s){if(e.lazy)return!0;if(!Fm(e))return!1;let o=n!=null&&e.id in n,l=s!=null&&s[e.id]!==void 0;return!o&&l?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!o&&!l}function cj(e,n,s){let o=!n||s.route.id!==n.route.id,l=!e.hasOwnProperty(s.route.id);return o||l}function uj(e,n){let s=e.route.path;return e.pathname!==n.pathname||s!=null&&s.endsWith("*")&&e.params["*"]!==n.params["*"]}function ll(e,n){if(e.route.shouldRevalidate){let s=e.route.shouldRevalidate(n);if(typeof s=="boolean")return s}return n.defaultShouldRevalidate}function Av(e,n,s,o,l,c){let d;if(e){let p=o[e];Ge(p,`No route found to patch children into: routeId = ${e}`),p.children||(p.children=[]),d=p.children}else d=s;let f=[],m=[];if(n.forEach(p=>{let x=d.find(g=>Ax(p,g));x?m.push({existingRoute:x,newRoute:p}):f.push(p)}),f.length>0){let p=ul(f,l,[e||"_","patch",String((d==null?void 0:d.length)||"0")],o);d.push(...p)}if(c&&m.length>0)for(let p=0;p<m.length;p++){let{existingRoute:x,newRoute:g}=m[p],w=x,[b]=ul([g],l,[],{},!0);Object.assign(w,{element:b.element?b.element:w.element,errorElement:b.errorElement?b.errorElement:w.errorElement,hydrateFallbackElement:b.hydrateFallbackElement?b.hydrateFallbackElement:w.hydrateFallbackElement})}}function Ax(e,n){return"id"in e&&"id"in n&&e.id===n.id?!0:e.index===n.index&&e.path===n.path&&e.caseSensitive===n.caseSensitive?(!e.children||e.children.length===0)&&(!n.children||n.children.length===0)?!0:e.children.every((s,o)=>{var l;return(l=n.children)==null?void 0:l.some(c=>Ax(s,c))}):!1}var Mv=new WeakMap,Mx=({key:e,route:n,manifest:s,mapRouteProperties:o})=>{let l=s[n.id];if(Ge(l,"No route found in manifest"),!l.lazy||typeof l.lazy!="object")return;let c=l.lazy[e];if(!c)return;let d=Mv.get(l);d||(d={},Mv.set(l,d));let f=d[e];if(f)return f;let m=(async()=>{let p=kN(e),g=l[e]!==void 0&&e!=="hasErrorBoundary";if(p)Tt(!p,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),d[e]=Promise.resolve();else if(g)Tt(!1,`Route "${l.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let w=await c();w!=null&&(Object.assign(l,{[e]:w}),Object.assign(l,o(l)))}typeof l.lazy=="object"&&(l.lazy[e]=void 0,Object.values(l.lazy).every(w=>w===void 0)&&(l.lazy=void 0))})();return d[e]=m,m},Iv=new WeakMap;function dj(e,n,s,o,l){let c=s[e.id];if(Ge(c,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let x=Iv.get(c);if(x)return{lazyRoutePromise:x,lazyHandlerPromise:x};let g=(async()=>{Ge(typeof e.lazy=="function","No lazy route function found");let w=await e.lazy(),b={};for(let N in w){let S=w[N];if(S===void 0)continue;let C=PN(N),P=c[N]!==void 0&&N!=="hasErrorBoundary";C?Tt(!C,"Route property "+N+" is not a supported property to be returned from a lazy route function. This property will be ignored."):P?Tt(!P,`Route "${c.id}" has a static property "${N}" defined but its lazy function is also returning a value for this property. The lazy route property "${N}" will be ignored.`):b[N]=S}Object.assign(c,b),Object.assign(c,{...o(c),lazy:void 0})})();return Iv.set(c,g),g.catch(()=>{}),{lazyRoutePromise:g,lazyHandlerPromise:g}}let d=Object.keys(e.lazy),f=[],m;for(let x of d){if(l&&l.includes(x))continue;let g=Mx({key:x,route:e,manifest:s,mapRouteProperties:o});g&&(f.push(g),x===n&&(m=g))}let p=f.length>0?Promise.all(f).then(()=>{}):void 0;return p==null||p.catch(()=>{}),m==null||m.catch(()=>{}),{lazyRoutePromise:p,lazyHandlerPromise:m}}async function Dv(e){let n=e.matches.filter(l=>l.shouldLoad),s={};return(await Promise.all(n.map(l=>l.resolve()))).forEach((l,c)=>{s[n[c].route.id]=l}),s}async function fj(e){return e.matches.some(n=>n.route.middleware)?Ix(e,()=>Dv(e)):Dv(e)}function Ix(e,n){return mj(e,n,o=>{if(Ej(o))throw o;return o},Sj,s);function s(o,l,c){if(c)return Promise.resolve(Object.assign(c.value,{[l]:{type:"error",result:o}}));{let{matches:d}=e,f=Math.min(Math.max(d.findIndex(p=>p.route.id===l),0),Math.max(d.findIndex(p=>p.shouldCallHandler()),0)),m=Zs(d,d[f].route.id).route.id;return Promise.resolve({[m]:{type:"error",result:o}})}}}async function mj(e,n,s,o,l){let{matches:c,request:d,params:f,context:m,unstable_pattern:p}=e,x=c.flatMap(w=>w.route.middleware?w.route.middleware.map(b=>[w.route.id,b]):[]);return await Dx({request:d,params:f,context:m,unstable_pattern:p},x,n,s,o,l)}async function Dx(e,n,s,o,l,c,d=0){let{request:f}=e;if(f.signal.aborted)throw f.signal.reason??new Error(`Request aborted: ${f.method} ${f.url}`);let m=n[d];if(!m)return await s();let[p,x]=m,g,w=async()=>{if(g)throw new Error("You may only call `next()` once per middleware");try{return g={value:await Dx(e,n,s,o,l,c,d+1)},g.value}catch(b){return g={value:await c(b,p,g)},g.value}};try{let b=await x(e,w),N=b!=null?o(b):void 0;return l(N)?N:g?N??g.value:(g={value:await w()},g.value)}catch(b){return await c(b,p,g)}}function Ox(e,n,s,o,l){let c=Mx({key:"middleware",route:o.route,manifest:n,mapRouteProperties:e}),d=dj(o.route,fn(s.method)?"action":"loader",n,e,l);return{middleware:c,route:d.lazyRoutePromise,handler:d.lazyHandlerPromise}}function Zf(e,n,s,o,l,c,d,f,m=null,p){let x=!1,g=Ox(e,n,s,l,c);return{...l,_lazyPromises:g,shouldLoad:f,shouldRevalidateArgs:m,shouldCallHandler(w){return x=!0,m?typeof p=="boolean"?ll(l,{...m,defaultShouldRevalidate:p}):typeof w=="boolean"?ll(l,{...m,defaultShouldRevalidate:w}):ll(l,m):f},resolve(w){let{lazy:b,loader:N,middleware:S}=l.route,C=x||f||w&&!fn(s.method)&&(b||N),k=S&&S.length>0&&!N&&!b;return C&&(fn(s.method)||!k)?pj({request:s,unstable_pattern:o,match:l,lazyHandlerPromise:g==null?void 0:g.handler,lazyRoutePromise:g==null?void 0:g.route,handlerOverride:w,scopedContext:d}):Promise.resolve({type:"data",result:void 0})}}}function Ba(e,n,s,o,l,c,d,f=null){return o.map(m=>m.route.id!==l.route.id?{...m,shouldLoad:!1,shouldRevalidateArgs:f,shouldCallHandler:()=>!1,_lazyPromises:Ox(e,n,s,m,c),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Zf(e,n,s,bl(o),m,c,d,!0,f))}async function hj(e,n,s,o,l,c){s.some(p=>{var x;return(x=p._lazyPromises)==null?void 0:x.middleware})&&await Promise.all(s.map(p=>{var x;return(x=p._lazyPromises)==null?void 0:x.middleware}));let d={request:n,unstable_pattern:bl(s),params:s[0].params,context:l,matches:s},m=await e({...d,fetcherKey:o,runClientMiddleware:p=>{let x=d;return Ix(x,()=>p({...x,fetcherKey:o,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(s.flatMap(p=>{var x,g;return[(x=p._lazyPromises)==null?void 0:x.handler,(g=p._lazyPromises)==null?void 0:g.route]}))}catch{}return m}async function pj({request:e,unstable_pattern:n,match:s,lazyHandlerPromise:o,lazyRoutePromise:l,handlerOverride:c,scopedContext:d}){let f,m,p=fn(e.method),x=p?"action":"loader",g=w=>{let b,N=new Promise((k,P)=>b=P);m=()=>b(),e.signal.addEventListener("abort",m);let S=k=>typeof w!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${x}" [routeId: ${s.route.id}]`)):w({request:e,unstable_pattern:n,params:s.params,context:d},...k!==void 0?[k]:[]),C=(async()=>{try{return{type:"data",result:await(c?c(P=>S(P)):S())}}catch(k){return{type:"error",result:k}}})();return Promise.race([C,N])};try{let w=p?s.route.action:s.route.loader;if(o||l)if(w){let b,[N]=await Promise.all([g(w).catch(S=>{b=S}),o,l]);if(b!==void 0)throw b;f=N}else{await o;let b=p?s.route.action:s.route.loader;if(b)[f]=await Promise.all([g(b),l]);else if(x==="action"){let N=new URL(e.url),S=N.pathname+N.search;throw tr(405,{method:e.method,pathname:S,routeId:s.route.id})}else return{type:"data",result:void 0}}else if(w)f=await g(w);else{let b=new URL(e.url),N=b.pathname+b.search;throw tr(404,{pathname:N})}}catch(w){return{type:"error",result:w}}finally{m&&e.signal.removeEventListener("abort",m)}return f}async function gj(e){let n=e.headers.get("Content-Type");return n&&/\bapplication\/json\b/.test(n)?e.body==null?null:e.json():e.text()}async function vj(e){var o,l,c,d,f;let{result:n,type:s}=e;if($m(n)){let m;try{m=await gj(n)}catch(p){return{type:"error",error:p}}return s==="error"?{type:"error",error:new wl(n.status,n.statusText,m),statusCode:n.status,headers:n.headers}:{type:"data",data:m,statusCode:n.status,headers:n.headers}}return s==="error"?Uv(n)?n.data instanceof Error?{type:"error",error:n.data,statusCode:(o=n.init)==null?void 0:o.status,headers:(l=n.init)!=null&&l.headers?new Headers(n.init.headers):void 0}:{type:"error",error:bj(n),statusCode:si(n)?n.status:void 0,headers:(c=n.init)!=null&&c.headers?new Headers(n.init.headers):void 0}:{type:"error",error:n,statusCode:si(n)?n.status:void 0}:Uv(n)?{type:"data",data:n.data,statusCode:(d=n.init)==null?void 0:d.status,headers:(f=n.init)!=null&&f.headers?new Headers(n.init.headers):void 0}:{type:"data",data:n}}function yj(e,n,s,o,l){let c=e.headers.get("Location");if(Ge(c,"Redirects returned/thrown from loaders/actions must have a Location header"),!zm(c)){let d=o.slice(0,o.findIndex(f=>f.route.id===s)+1);c=Xf(new URL(n.url),d,l,c),e.headers.set("Location",c)}return e}function Ov(e,n,s,o){let l=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(zm(e)){let c=e,d=c.startsWith("//")?new URL(n.protocol+c):new URL(c);if(l.includes(d.protocol))throw new Error("Invalid redirect location");let f=rr(d.pathname,s)!=null;if(d.origin===n.origin&&f)return d.pathname+d.search+d.hash}try{let c=o.createURL(e);if(l.includes(c.protocol))throw new Error("Invalid redirect location")}catch{}return e}function La(e,n,s,o){let l=e.createURL(Lx(n)).toString(),c={signal:s};if(o&&fn(o.formMethod)){let{formMethod:d,formEncType:f}=o;c.method=d.toUpperCase(),f==="application/json"?(c.headers=new Headers({"Content-Type":f}),c.body=JSON.stringify(o.json)):f==="text/plain"?c.body=o.text:f==="application/x-www-form-urlencoded"&&o.formData?c.body=em(o.formData):c.body=o.formData}return new Request(l,c)}function em(e){let n=new URLSearchParams;for(let[s,o]of e.entries())n.append(s,typeof o=="string"?o:o.name);return n}function Lv(e){let n=new FormData;for(let[s,o]of e.entries())n.append(s,o);return n}function xj(e,n,s,o=!1,l=!1){let c={},d=null,f,m=!1,p={},x=s&&$n(s[1])?s[1].error:void 0;return e.forEach(g=>{if(!(g.route.id in n))return;let w=g.route.id,b=n[w];if(Ge(!Fo(b),"Cannot handle redirect results in processLoaderData"),$n(b)){let N=b.error;if(x!==void 0&&(N=x,x=void 0),d=d||{},l)d[w]=N;else{let S=Zs(e,w);d[S.route.id]==null&&(d[S.route.id]=N)}o||(c[w]=_x),m||(m=!0,f=si(b.error)?b.error.status:500),b.headers&&(p[w]=b.headers)}else c[w]=b.data,b.statusCode&&b.statusCode!==200&&!m&&(f=b.statusCode),b.headers&&(p[w]=b.headers)}),x!==void 0&&s&&(d={[s[0]]:x},s[2]&&(c[s[2]]=void 0)),{loaderData:c,errors:d,statusCode:f||200,loaderHeaders:p}}function zv(e,n,s,o,l,c){let{loaderData:d,errors:f}=xj(n,s,o);return l.filter(m=>!m.matches||m.matches.some(p=>p.shouldLoad)).forEach(m=>{let{key:p,match:x,controller:g}=m;if(g&&g.signal.aborted)return;let w=c[p];if(Ge(w,"Did not find corresponding fetcher result"),$n(w)){let b=Zs(e.matches,x==null?void 0:x.route.id);f&&f[b.route.id]||(f={...f,[b.route.id]:w.error}),e.fetchers.delete(p)}else if(Fo(w))Ge(!1,"Unhandled fetcher revalidation redirect");else{let b=ms(w.data);e.fetchers.set(p,b)}}),{loaderData:d,errors:f}}function Fv(e,n,s,o){let l=Object.entries(n).filter(([,c])=>c!==_x).reduce((c,[d,f])=>(c[d]=f,c),{});for(let c of s){let d=c.route.id;if(!n.hasOwnProperty(d)&&e.hasOwnProperty(d)&&c.route.loader&&(l[d]=e[d]),o&&o.hasOwnProperty(d))break}return l}function $v(e){return e?$n(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Zs(e,n){return(n?e.slice(0,e.findIndex(o=>o.route.id===n)+1):[...e]).reverse().find(o=>o.route.hasErrorBoundary===!0)||e[0]}function Mc(e){let n=e.length===1?e[0]:e.find(s=>s.index||!s.path||s.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:n}],route:n}}function tr(e,{pathname:n,routeId:s,method:o,type:l,message:c}={}){let d="Unknown Server Error",f="Unknown @remix-run/router error";return e===400?(d="Bad Request",o&&n&&s?f=`You made a ${o} request to "${n}" but did not provide a \`loader\` for route "${s}", so there is no way to handle the request.`:l==="invalid-body"&&(f="Unable to encode submission body")):e===403?(d="Forbidden",f=`Route "${s}" does not match URL "${n}"`):e===404?(d="Not Found",f=`No route matches URL "${n}"`):e===405&&(d="Method Not Allowed",o&&n&&s?f=`You made a ${o.toUpperCase()} request to "${n}" but did not provide an \`action\` for route "${s}", so there is no way to handle the request.`:o&&(f=`Invalid request method "${o.toUpperCase()}"`)),new wl(e||500,d,new Error(f),!0)}function Ic(e){let n=Object.entries(e);for(let s=n.length-1;s>=0;s--){let[o,l]=n[s];if(Fo(l))return{key:o,result:l}}}function Lx(e){let n=typeof e=="string"?vo(e):e;return Br({...n,hash:""})}function wj(e,n){return e.pathname!==n.pathname||e.search!==n.search?!1:e.hash===""?n.hash!=="":e.hash===n.hash?!0:n.hash!==""}function bj(e){var n,s;return new wl(((n=e.init)==null?void 0:n.status)??500,((s=e.init)==null?void 0:s.statusText)??"Internal Server Error",e.data)}function Sj(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([n,s])=>typeof n=="string"&&Nj(s))}function Nj(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function jj(e){return $m(e.result)&&Px.has(e.result.status)}function $n(e){return e.type==="error"}function Fo(e){return(e&&e.type)==="redirect"}function Uv(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function $m(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Cj(e){return Px.has(e)}function Ej(e){return $m(e)&&Cj(e.status)&&e.headers.has("Location")}function kj(e){return rj.has(e.toUpperCase())}function fn(e){return tj.has(e.toUpperCase())}function Um(e){return new URLSearchParams(e).getAll("index").some(n=>n==="")}function Qc(e,n){let s=typeof n=="string"?vo(n).search:n.search;if(e[e.length-1].route.index&&Um(s||""))return e[e.length-1];let o=jx(e);return o[o.length-1]}function Bv(e){let{formMethod:n,formAction:s,formEncType:o,text:l,formData:c,json:d}=e;if(!(!n||!s||!o)){if(l!=null)return{formMethod:n,formAction:s,formEncType:o,formData:void 0,json:void 0,text:l};if(c!=null)return{formMethod:n,formAction:s,formEncType:o,formData:c,json:void 0,text:void 0};if(d!==void 0)return{formMethod:n,formAction:s,formEncType:o,formData:void 0,json:d,text:void 0}}}function Tf(e,n){return n?{state:"loading",location:e,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Rj(e,n){return{state:"submitting",location:e,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}}function Xi(e,n){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:n}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:n}}function Pj(e,n){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:n?n.data:void 0}}function ms(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Tj(e,n){try{let s=e.sessionStorage.getItem(Tx);if(s){let o=JSON.parse(s);for(let[l,c]of Object.entries(o||{}))c&&Array.isArray(c)&&n.set(l,new Set(c||[]))}}catch{}}function _j(e,n){if(n.size>0){let s={};for(let[o,l]of n)s[o]=[...l];try{e.sessionStorage.setItem(Tx,JSON.stringify(s))}catch(o){Tt(!1,`Failed to save applied view transitions in sessionStorage (${o}).`)}}}function Hv(){let e,n,s=new Promise((o,l)=>{e=async c=>{o(c);try{await s}catch{}},n=async c=>{l(c);try{await s}catch{}}});return{promise:s,resolve:e,reject:n}}var ia=v.createContext(null);ia.displayName="DataRouter";var Sl=v.createContext(null);Sl.displayName="DataRouterState";var zx=v.createContext(!1);function Aj(){return v.useContext(zx)}var Bm=v.createContext({isTransitioning:!1});Bm.displayName="ViewTransition";var Fx=v.createContext(new Map);Fx.displayName="Fetchers";var Mj=v.createContext(null);Mj.displayName="Await";var Hn=v.createContext(null);Hn.displayName="Navigation";var gu=v.createContext(null);gu.displayName="Location";var sr=v.createContext({outlet:null,matches:[],isDataRoute:!1});sr.displayName="Route";var Hm=v.createContext(null);Hm.displayName="RouteError";var $x="REACT_ROUTER_ERROR",Ij="REDIRECT",Dj="ROUTE_ERROR_RESPONSE";function Oj(e){if(e.startsWith(`${$x}:${Ij}:{`))try{let n=JSON.parse(e.slice(28));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.location=="string"&&typeof n.reloadDocument=="boolean"&&typeof n.replace=="boolean")return n}catch{}}function Lj(e){if(e.startsWith(`${$x}:${Dj}:{`))try{let n=JSON.parse(e.slice(40));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string")return new wl(n.status,n.statusText,n.data)}catch{}}function zj(e,{relative:n}={}){Ge(ci(),"useHref() may be used only in the context of a <Router> component.");let{basename:s,navigator:o}=v.useContext(Hn),{hash:l,pathname:c,search:d}=Nl(e,{relative:n}),f=c;return s!=="/"&&(f=c==="/"?s:$r([s,c])),o.createHref({pathname:f,search:d,hash:l})}function ci(){return v.useContext(gu)!=null}function Wr(){return Ge(ci(),"useLocation() may be used only in the context of a <Router> component."),v.useContext(gu).location}var Ux="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Bx(e){v.useContext(Hn).static||v.useLayoutEffect(e)}function or(){let{isDataRoute:e}=v.useContext(sr);return e?Zj():Fj()}function Fj(){Ge(ci(),"useNavigate() may be used only in the context of a <Router> component.");let e=v.useContext(ia),{basename:n,navigator:s}=v.useContext(Hn),{matches:o}=v.useContext(sr),{pathname:l}=Wr(),c=JSON.stringify(hu(o)),d=v.useRef(!1);return Bx(()=>{d.current=!0}),v.useCallback((m,p={})=>{if(Tt(d.current,Ux),!d.current)return;if(typeof m=="number"){s.go(m);return}let x=pu(m,JSON.parse(c),l,p.relative==="path");e==null&&n!=="/"&&(x.pathname=x.pathname==="/"?n:$r([n,x.pathname])),(p.replace?s.replace:s.push)(x,p.state,p)},[n,s,c,l,e])}var $j=v.createContext(null);function Uj(e){let n=v.useContext(sr).outlet;return v.useMemo(()=>n&&v.createElement($j.Provider,{value:e},n),[n,e])}function Bj(){let{matches:e}=v.useContext(sr),n=e[e.length-1];return n?n.params:{}}function Nl(e,{relative:n}={}){let{matches:s}=v.useContext(sr),{pathname:o}=Wr(),l=JSON.stringify(hu(s));return v.useMemo(()=>pu(e,JSON.parse(l),o,n==="path"),[e,l,o,n])}function Hj(e,n,s,o,l){Ge(ci(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:c}=v.useContext(Hn),{matches:d}=v.useContext(sr),f=d[d.length-1],m=f?f.params:{},p=f?f.pathname:"/",x=f?f.pathnameBase:"/",g=f&&f.route;{let P=g&&g.path||"";Wx(p,!g||P.endsWith("*")||P.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${P}">) 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.
|
|
51
|
+
|
|
52
|
+
Please change the parent <Route path="${P}"> to <Route path="${P==="/"?"*":`${P}/*`}">.`)}let w=Wr(),b;b=w;let N=b.pathname||"/",S=N;if(x!=="/"){let P=x.replace(/^\//,"").split("/");S="/"+N.replace(/^\//,"").split("/").slice(P.length).join("/")}let C=Js(e,{pathname:S});return Tt(g||C!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),Tt(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.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.`),qj(C&&C.map(P=>Object.assign({},P,{params:Object.assign({},m,P.params),pathname:$r([x,c.encodeLocation?c.encodeLocation(P.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:P.pathname]),pathnameBase:P.pathnameBase==="/"?x:$r([x,c.encodeLocation?c.encodeLocation(P.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:P.pathnameBase])})),d,s,o,l)}function Vj(){let e=Vx(),n=si(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),s=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:o},c={padding:"2px 4px",backgroundColor:o},d=null;return console.error("Error handled by React Router default ErrorBoundary:",e),d=v.createElement(v.Fragment,null,v.createElement("p",null,"💿 Hey developer 👋"),v.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",v.createElement("code",{style:c},"ErrorBoundary")," or"," ",v.createElement("code",{style:c},"errorElement")," prop on your route.")),v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},n),s?v.createElement("pre",{style:l},s):null,d)}var Wj=v.createElement(Vj,null),Hx=class extends v.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){this.props.onError?this.props.onError(e,n):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const s=Lj(e.digest);s&&(e=s)}let n=e!==void 0?v.createElement(sr.Provider,{value:this.props.routeContext},v.createElement(Hm.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?v.createElement(Kj,{error:e},n):n}};Hx.contextType=zx;var _f=new WeakMap;function Kj({children:e,error:n}){let{basename:s}=v.useContext(Hn);if(typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){let o=Oj(n.digest);if(o){let l=_f.get(n);if(l)throw l;let c=Ex(o.location,s);if(Cx&&!_f.get(n))if(c.isExternal||o.reloadDocument)window.location.href=c.absoluteURL||c.to;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(c.to,{replace:o.replace}));throw _f.set(n,d),d}return v.createElement("meta",{httpEquiv:"refresh",content:`0;url=${c.absoluteURL||c.to}`})}}return e}function Qj({routeContext:e,match:n,children:s}){let o=v.useContext(ia);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(sr.Provider,{value:e},s)}function qj(e,n=[],s=null,o=null,l=null){if(e==null){if(!s)return null;if(s.errors)e=s.matches;else if(n.length===0&&!s.initialized&&s.matches.length>0)e=s.matches;else return null}let c=e,d=s==null?void 0:s.errors;if(d!=null){let x=c.findIndex(g=>g.route.id&&(d==null?void 0:d[g.route.id])!==void 0);Ge(x>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),c=c.slice(0,Math.min(c.length,x+1))}let f=!1,m=-1;if(s)for(let x=0;x<c.length;x++){let g=c[x];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(m=x),g.route.id){let{loaderData:w,errors:b}=s,N=g.route.loader&&!w.hasOwnProperty(g.route.id)&&(!b||b[g.route.id]===void 0);if(g.route.lazy||N){f=!0,m>=0?c=c.slice(0,m+1):c=[c[0]];break}}}let p=s&&o?(x,g)=>{var w,b;o(x,{location:s.location,params:((b=(w=s.matches)==null?void 0:w[0])==null?void 0:b.params)??{},unstable_pattern:bl(s.matches),errorInfo:g})}:void 0;return c.reduceRight((x,g,w)=>{let b,N=!1,S=null,C=null;s&&(b=d&&g.route.id?d[g.route.id]:void 0,S=g.route.errorElement||Wj,f&&(m<0&&w===0?(Wx("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),N=!0,C=null):m===w&&(N=!0,C=g.route.hydrateFallbackElement||null)));let k=n.concat(c.slice(0,w+1)),P=()=>{let E;return b?E=S:N?E=C:g.route.Component?E=v.createElement(g.route.Component,null):g.route.element?E=g.route.element:E=x,v.createElement(Qj,{match:g,routeContext:{outlet:x,matches:k,isDataRoute:s!=null},children:E})};return s&&(g.route.ErrorBoundary||g.route.errorElement||w===0)?v.createElement(Hx,{location:s.location,revalidation:s.revalidation,component:S,error:b,children:P(),routeContext:{outlet:null,matches:k,isDataRoute:!0},onError:p}):P()},null)}function Vm(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Yj(e){let n=v.useContext(ia);return Ge(n,Vm(e)),n}function Gj(e){let n=v.useContext(Sl);return Ge(n,Vm(e)),n}function Xj(e){let n=v.useContext(sr);return Ge(n,Vm(e)),n}function Wm(e){let n=Xj(e),s=n.matches[n.matches.length-1];return Ge(s.route.id,`${e} can only be used on routes that contain a unique "id"`),s.route.id}function Jj(){return Wm("useRouteId")}function Vx(){var o;let e=v.useContext(Hm),n=Gj("useRouteError"),s=Wm("useRouteError");return e!==void 0?e:(o=n.errors)==null?void 0:o[s]}function Zj(){let{router:e}=Yj("useNavigate"),n=Wm("useNavigate"),s=v.useRef(!1);return Bx(()=>{s.current=!0}),v.useCallback(async(l,c={})=>{Tt(s.current,Ux),s.current&&(typeof l=="number"?await e.navigate(l):await e.navigate(l,{fromRouteId:n,...c}))},[e,n])}var Vv={};function Wx(e,n,s){!n&&!Vv[e]&&(Vv[e]=!0,Tt(!1,s))}var Wv={};function Kv(e,n){!e&&!Wv[n]&&(Wv[n]=!0,console.warn(n))}var eC="useOptimistic",Qv=yx[eC],tC=()=>{};function nC(e){return Qv?Qv(e):[e,tC]}function rC(e){let n={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&Tt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(n,{element:v.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&Tt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(n,{hydrateFallbackElement:v.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&Tt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(n,{errorElement:v.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),n}var sC=["HydrateFallback","hydrateFallbackElement"],oC=class{constructor(){this.status="pending",this.promise=new Promise((e,n)=>{this.resolve=s=>{this.status==="pending"&&(this.status="resolved",e(s))},this.reject=s=>{this.status==="pending"&&(this.status="rejected",n(s))}})}};function aC({router:e,flushSync:n,onError:s,unstable_useTransitions:o}){o=Aj()||o;let[c,d]=v.useState(e.state),[f,m]=nC(c),[p,x]=v.useState(),[g,w]=v.useState({isTransitioning:!1}),[b,N]=v.useState(),[S,C]=v.useState(),[k,P]=v.useState(),E=v.useRef(new Map),R=v.useCallback((I,{deletedFetchers:W,newErrors:J,flushSync:Z,viewTransitionOpts:q})=>{J&&s&&Object.values(J).forEach(ue=>{var ge;return s(ue,{location:I.location,params:((ge=I.matches[0])==null?void 0:ge.params)??{},unstable_pattern:bl(I.matches)})}),I.fetchers.forEach((ue,ge)=>{ue.data!==void 0&&E.current.set(ge,ue.data)}),W.forEach(ue=>E.current.delete(ue)),Kv(Z===!1||n!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let pe=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(Kv(q==null||pe,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!q||!pe){n&&Z?n(()=>d(I)):o===!1?d(I):v.startTransition(()=>{o===!0&&m(ue=>qv(ue,I)),d(I)});return}if(n&&Z){n(()=>{S&&(b==null||b.resolve(),S.skipTransition()),w({isTransitioning:!0,flushSync:!0,currentLocation:q.currentLocation,nextLocation:q.nextLocation})});let ue=e.window.document.startViewTransition(()=>{n(()=>d(I))});ue.finished.finally(()=>{n(()=>{N(void 0),C(void 0),x(void 0),w({isTransitioning:!1})})}),n(()=>C(ue));return}S?(b==null||b.resolve(),S.skipTransition(),P({state:I,currentLocation:q.currentLocation,nextLocation:q.nextLocation})):(x(I),w({isTransitioning:!0,flushSync:!1,currentLocation:q.currentLocation,nextLocation:q.nextLocation}))},[e.window,n,S,b,o,m,s]);v.useLayoutEffect(()=>e.subscribe(R),[e,R]),v.useEffect(()=>{g.isTransitioning&&!g.flushSync&&N(new oC)},[g]),v.useEffect(()=>{if(b&&p&&e.window){let I=p,W=b.promise,J=e.window.document.startViewTransition(async()=>{o===!1?d(I):v.startTransition(()=>{o===!0&&m(Z=>qv(Z,I)),d(I)}),await W});J.finished.finally(()=>{N(void 0),C(void 0),x(void 0),w({isTransitioning:!1})}),C(J)}},[p,b,e.window,o,m]),v.useEffect(()=>{b&&p&&f.location.key===p.location.key&&b.resolve()},[b,S,f.location,p]),v.useEffect(()=>{!g.isTransitioning&&k&&(x(k.state),w({isTransitioning:!0,flushSync:!1,currentLocation:k.currentLocation,nextLocation:k.nextLocation}),P(void 0))},[g.isTransitioning,k]);let L=v.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:I=>e.navigate(I),push:(I,W,J)=>e.navigate(I,{state:W,preventScrollReset:J==null?void 0:J.preventScrollReset}),replace:(I,W,J)=>e.navigate(I,{replace:!0,state:W,preventScrollReset:J==null?void 0:J.preventScrollReset})}),[e]),B=e.basename||"/",T=v.useMemo(()=>({router:e,navigator:L,static:!1,basename:B,onError:s}),[e,L,B,s]);return v.createElement(v.Fragment,null,v.createElement(ia.Provider,{value:T},v.createElement(Sl.Provider,{value:f},v.createElement(Fx.Provider,{value:E.current},v.createElement(Bm.Provider,{value:g},v.createElement(uC,{basename:B,location:f.location,navigationType:f.historyAction,navigator:L,unstable_useTransitions:o},v.createElement(iC,{routes:e.routes,future:e.future,state:f,onError:s})))))),null)}function qv(e,n){return{...e,navigation:n.navigation.state!=="idle"?n.navigation:e.navigation,revalidation:n.revalidation!=="idle"?n.revalidation:e.revalidation,actionData:n.navigation.state!=="submitting"?n.actionData:e.actionData,fetchers:n.fetchers}}var iC=v.memo(lC);function lC({routes:e,future:n,state:s,onError:o}){return Hj(e,void 0,s,o,n)}function Kx({to:e,replace:n,state:s,relative:o}){Ge(ci(),"<Navigate> may be used only in the context of a <Router> component.");let{static:l}=v.useContext(Hn);Tt(!l,"<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:c}=v.useContext(sr),{pathname:d}=Wr(),f=or(),m=pu(e,hu(c),d,o==="path"),p=JSON.stringify(m);return v.useEffect(()=>{f(JSON.parse(p),{replace:n,state:s,relative:o})},[f,p,o,n,s]),null}function cC(e){return Uj(e.context)}function uC({basename:e="/",children:n=null,location:s,navigationType:o="POP",navigator:l,static:c=!1,unstable_useTransitions:d}){Ge(!ci(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),m=v.useMemo(()=>({basename:f,navigator:l,static:c,unstable_useTransitions:d,future:{}}),[f,l,c,d]);typeof s=="string"&&(s=vo(s));let{pathname:p="/",search:x="",hash:g="",state:w=null,key:b="default"}=s,N=v.useMemo(()=>{let S=rr(p,f);return S==null?null:{location:{pathname:S,search:x,hash:g,state:w,key:b},navigationType:o}},[f,p,x,g,w,b,o]);return Tt(N!=null,`<Router basename="${f}"> is not able to match the URL "${p}${x}${g}" because it does not start with the basename, so the <Router> won't render anything.`),N==null?null:v.createElement(Hn.Provider,{value:m},v.createElement(gu.Provider,{children:n,value:N}))}var qc="get",Yc="application/x-www-form-urlencoded";function vu(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function dC(e){return vu(e)&&e.tagName.toLowerCase()==="button"}function fC(e){return vu(e)&&e.tagName.toLowerCase()==="form"}function mC(e){return vu(e)&&e.tagName.toLowerCase()==="input"}function hC(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function pC(e,n){return e.button===0&&(!n||n==="_self")&&!hC(e)}function tm(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((n,s)=>{let o=e[s];return n.concat(Array.isArray(o)?o.map(l=>[s,l]):[[s,o]])},[]))}function gC(e,n){let s=tm(e);return n&&n.forEach((o,l)=>{s.has(l)||n.getAll(l).forEach(c=>{s.append(l,c)})}),s}var Dc=null;function vC(){if(Dc===null)try{new FormData(document.createElement("form"),0),Dc=!1}catch{Dc=!0}return Dc}var yC=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Af(e){return e!=null&&!yC.has(e)?(Tt(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Yc}"`),null):e}function xC(e,n){let s,o,l,c,d;if(fC(e)){let f=e.getAttribute("action");o=f?rr(f,n):null,s=e.getAttribute("method")||qc,l=Af(e.getAttribute("enctype"))||Yc,c=new FormData(e)}else if(dC(e)||mC(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let m=e.getAttribute("formaction")||f.getAttribute("action");if(o=m?rr(m,n):null,s=e.getAttribute("formmethod")||f.getAttribute("method")||qc,l=Af(e.getAttribute("formenctype"))||Af(f.getAttribute("enctype"))||Yc,c=new FormData(f,e),!vC()){let{name:p,type:x,value:g}=e;if(x==="image"){let w=p?`${p}.`:"";c.append(`${w}x`,"0"),c.append(`${w}y`,"0")}else p&&c.append(p,g)}}else{if(vu(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');s=qc,o=null,l=Yc,d=e}return c&&l==="text/plain"&&(d=c,c=void 0),{action:o,method:s.toLowerCase(),encType:l,formData:c,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Km(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function wC(e,n,s,o){let l=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return s?l.pathname.endsWith("/")?l.pathname=`${l.pathname}_.${o}`:l.pathname=`${l.pathname}.${o}`:l.pathname==="/"?l.pathname=`_root.${o}`:n&&rr(l.pathname,n)==="/"?l.pathname=`${n.replace(/\/$/,"")}/_root.${o}`:l.pathname=`${l.pathname.replace(/\/$/,"")}.${o}`,l}async function bC(e,n){if(e.id in n)return n[e.id];try{let s=await import(e.module);return n[e.id]=s,s}catch(s){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(s),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function SC(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function NC(e,n,s){let o=await Promise.all(e.map(async l=>{let c=n.routes[l.route.id];if(c){let d=await bC(c,s);return d.links?d.links():[]}return[]}));return kC(o.flat(1).filter(SC).filter(l=>l.rel==="stylesheet"||l.rel==="preload").map(l=>l.rel==="stylesheet"?{...l,rel:"prefetch",as:"style"}:{...l,rel:"prefetch"}))}function Yv(e,n,s,o,l,c){let d=(m,p)=>s[p]?m.route.id!==s[p].route.id:!0,f=(m,p)=>{var x;return s[p].pathname!==m.pathname||((x=s[p].route.path)==null?void 0:x.endsWith("*"))&&s[p].params["*"]!==m.params["*"]};return c==="assets"?n.filter((m,p)=>d(m,p)||f(m,p)):c==="data"?n.filter((m,p)=>{var g;let x=o.routes[m.route.id];if(!x||!x.hasLoader)return!1;if(d(m,p)||f(m,p))return!0;if(m.route.shouldRevalidate){let w=m.route.shouldRevalidate({currentUrl:new URL(l.pathname+l.search+l.hash,window.origin),currentParams:((g=s[0])==null?void 0:g.params)||{},nextUrl:new URL(e,window.origin),nextParams:m.params,defaultShouldRevalidate:!0});if(typeof w=="boolean")return w}return!0}):[]}function jC(e,n,{includeHydrateFallback:s}={}){return CC(e.map(o=>{let l=n.routes[o.route.id];if(!l)return[];let c=[l.module];return l.clientActionModule&&(c=c.concat(l.clientActionModule)),l.clientLoaderModule&&(c=c.concat(l.clientLoaderModule)),s&&l.hydrateFallbackModule&&(c=c.concat(l.hydrateFallbackModule)),l.imports&&(c=c.concat(l.imports)),c}).flat(1))}function CC(e){return[...new Set(e)]}function EC(e){let n={},s=Object.keys(e).sort();for(let o of s)n[o]=e[o];return n}function kC(e,n){let s=new Set;return new Set(n),e.reduce((o,l)=>{let c=JSON.stringify(EC(l));return s.has(c)||(s.add(c),o.push({key:c,link:l})),o},[])}function Qx(){let e=v.useContext(ia);return Km(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function RC(){let e=v.useContext(Sl);return Km(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Qm=v.createContext(void 0);Qm.displayName="FrameworkContext";function qx(){let e=v.useContext(Qm);return Km(e,"You must render this element inside a <HydratedRouter> element"),e}function PC(e,n){let s=v.useContext(Qm),[o,l]=v.useState(!1),[c,d]=v.useState(!1),{onFocus:f,onBlur:m,onMouseEnter:p,onMouseLeave:x,onTouchStart:g}=n,w=v.useRef(null);v.useEffect(()=>{if(e==="render"&&d(!0),e==="viewport"){let S=k=>{k.forEach(P=>{d(P.isIntersecting)})},C=new IntersectionObserver(S,{threshold:.5});return w.current&&C.observe(w.current),()=>{C.disconnect()}}},[e]),v.useEffect(()=>{if(o){let S=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(S)}}},[o]);let b=()=>{l(!0)},N=()=>{l(!1),d(!1)};return s?e!=="intent"?[c,w,{}]:[c,w,{onFocus:Ji(f,b),onBlur:Ji(m,N),onMouseEnter:Ji(p,b),onMouseLeave:Ji(x,N),onTouchStart:Ji(g,b)}]:[!1,w,{}]}function Ji(e,n){return s=>{e&&e(s),s.defaultPrevented||n(s)}}function TC({page:e,...n}){let{router:s}=Qx(),o=v.useMemo(()=>Js(s.routes,e,s.basename),[s.routes,e,s.basename]);return o?v.createElement(AC,{page:e,matches:o,...n}):null}function _C(e){let{manifest:n,routeModules:s}=qx(),[o,l]=v.useState([]);return v.useEffect(()=>{let c=!1;return NC(e,n,s).then(d=>{c||l(d)}),()=>{c=!0}},[e,n,s]),o}function AC({page:e,matches:n,...s}){let o=Wr(),{future:l,manifest:c,routeModules:d}=qx(),{basename:f}=Qx(),{loaderData:m,matches:p}=RC(),x=v.useMemo(()=>Yv(e,n,p,c,o,"data"),[e,n,p,c,o]),g=v.useMemo(()=>Yv(e,n,p,c,o,"assets"),[e,n,p,c,o]),w=v.useMemo(()=>{if(e===o.pathname+o.search+o.hash)return[];let S=new Set,C=!1;if(n.forEach(P=>{var R;let E=c.routes[P.route.id];!E||!E.hasLoader||(!x.some(L=>L.route.id===P.route.id)&&P.route.id in m&&((R=d[P.route.id])!=null&&R.shouldRevalidate)||E.hasClientLoader?C=!0:S.add(P.route.id))}),S.size===0)return[];let k=wC(e,f,l.unstable_trailingSlashAwareDataRequests,"data");return C&&S.size>0&&k.searchParams.set("_routes",n.filter(P=>S.has(P.route.id)).map(P=>P.route.id).join(",")),[k.pathname+k.search]},[f,l.unstable_trailingSlashAwareDataRequests,m,o,c,x,n,e,d]),b=v.useMemo(()=>jC(g,c),[g,c]),N=_C(g);return v.createElement(v.Fragment,null,w.map(S=>v.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...s})),b.map(S=>v.createElement("link",{key:S,rel:"modulepreload",href:S,...s})),N.map(({key:S,link:C})=>v.createElement("link",{key:S,nonce:s.nonce,...C,crossOrigin:C.crossOrigin??s.crossOrigin})))}function MC(...e){return n=>{e.forEach(s=>{typeof s=="function"?s(n):s!=null&&(s.current=n)})}}var IC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{IC&&(window.__reactRouterVersion="7.13.0")}catch{}function DC(e,n){return ij({basename:n==null?void 0:n.basename,getContext:n==null?void 0:n.getContext,future:n==null?void 0:n.future,history:NN({window:n==null?void 0:n.window}),hydrationData:OC(),routes:e,mapRouteProperties:rC,hydrationRouteProperties:sC,dataStrategy:n==null?void 0:n.dataStrategy,patchRoutesOnNavigation:n==null?void 0:n.patchRoutesOnNavigation,window:n==null?void 0:n.window,unstable_instrumentations:n==null?void 0:n.unstable_instrumentations}).initialize()}function OC(){let e=window==null?void 0:window.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:LC(e.errors)}),e}function LC(e){if(!e)return null;let n=Object.entries(e),s={};for(let[o,l]of n)if(l&&l.__type==="RouteErrorResponse")s[o]=new wl(l.status,l.statusText,l.data,l.internal===!0);else if(l&&l.__type==="Error"){if(l.__subType){let c=window[l.__subType];if(typeof c=="function")try{let d=new c(l.message);d.stack="",s[o]=d}catch{}}if(s[o]==null){let c=new Error(l.message);c.stack="",s[o]=c}}else s[o]=l;return s}var Yx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ot=v.forwardRef(function({onClick:n,discover:s="render",prefetch:o="none",relative:l,reloadDocument:c,replace:d,state:f,target:m,to:p,preventScrollReset:x,viewTransition:g,unstable_defaultShouldRevalidate:w,...b},N){let{basename:S,unstable_useTransitions:C}=v.useContext(Hn),k=typeof p=="string"&&Yx.test(p),P=Ex(p,S);p=P.to;let E=zj(p,{relative:l}),[R,L,B]=PC(o,b),T=UC(p,{replace:d,state:f,target:m,preventScrollReset:x,relative:l,viewTransition:g,unstable_defaultShouldRevalidate:w,unstable_useTransitions:C});function I(J){n&&n(J),J.defaultPrevented||T(J)}let W=v.createElement("a",{...b,...B,href:P.absoluteURL||E,onClick:P.isExternal||c?n:I,ref:MC(N,L),target:m,"data-discover":!k&&s==="render"?"true":void 0});return R&&!k?v.createElement(v.Fragment,null,W,v.createElement(TC,{page:E})):W});Ot.displayName="Link";var zC=v.forwardRef(function({"aria-current":n="page",caseSensitive:s=!1,className:o="",end:l=!1,style:c,to:d,viewTransition:f,children:m,...p},x){let g=Nl(d,{relative:p.relative}),w=Wr(),b=v.useContext(Sl),{navigator:N,basename:S}=v.useContext(Hn),C=b!=null&&KC(g)&&f===!0,k=N.encodeLocation?N.encodeLocation(g).pathname:g.pathname,P=w.pathname,E=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;s||(P=P.toLowerCase(),E=E?E.toLowerCase():null,k=k.toLowerCase()),E&&S&&(E=rr(E,S)||E);const R=k!=="/"&&k.endsWith("/")?k.length-1:k.length;let L=P===k||!l&&P.startsWith(k)&&P.charAt(R)==="/",B=E!=null&&(E===k||!l&&E.startsWith(k)&&E.charAt(k.length)==="/"),T={isActive:L,isPending:B,isTransitioning:C},I=L?n:void 0,W;typeof o=="function"?W=o(T):W=[o,L?"active":null,B?"pending":null,C?"transitioning":null].filter(Boolean).join(" ");let J=typeof c=="function"?c(T):c;return v.createElement(Ot,{...p,"aria-current":I,className:W,ref:x,style:J,to:d,viewTransition:f},typeof m=="function"?m(T):m)});zC.displayName="NavLink";var FC=v.forwardRef(({discover:e="render",fetcherKey:n,navigate:s,reloadDocument:o,replace:l,state:c,method:d=qc,action:f,onSubmit:m,relative:p,preventScrollReset:x,viewTransition:g,unstable_defaultShouldRevalidate:w,...b},N)=>{let{unstable_useTransitions:S}=v.useContext(Hn),C=VC(),k=WC(f,{relative:p}),P=d.toLowerCase()==="get"?"get":"post",E=typeof f=="string"&&Yx.test(f),R=L=>{if(m&&m(L),L.defaultPrevented)return;L.preventDefault();let B=L.nativeEvent.submitter,T=(B==null?void 0:B.getAttribute("formmethod"))||d,I=()=>C(B||L.currentTarget,{fetcherKey:n,method:T,navigate:s,replace:l,state:c,relative:p,preventScrollReset:x,viewTransition:g,unstable_defaultShouldRevalidate:w});S&&s!==!1?v.startTransition(()=>I()):I()};return v.createElement("form",{ref:N,method:P,action:k,onSubmit:o?m:R,...b,"data-discover":!E&&e==="render"?"true":void 0})});FC.displayName="Form";function $C(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Gx(e){let n=v.useContext(ia);return Ge(n,$C(e)),n}function UC(e,{target:n,replace:s,state:o,preventScrollReset:l,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:f,unstable_useTransitions:m}={}){let p=or(),x=Wr(),g=Nl(e,{relative:c});return v.useCallback(w=>{if(pC(w,n)){w.preventDefault();let b=s!==void 0?s:Br(x)===Br(g),N=()=>p(e,{replace:b,state:o,preventScrollReset:l,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:f});m?v.startTransition(()=>N()):N()}},[x,p,g,s,o,n,e,l,c,d,f,m])}function qm(e){Tt(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 n=v.useRef(tm(e)),s=v.useRef(!1),o=Wr(),l=v.useMemo(()=>gC(o.search,s.current?null:n.current),[o.search]),c=or(),d=v.useCallback((f,m)=>{const p=tm(typeof f=="function"?f(new URLSearchParams(l)):f);s.current=!0,c("?"+p,m)},[c,l]);return[l,d]}var BC=0,HC=()=>`__${String(++BC)}__`;function VC(){let{router:e}=Gx("useSubmit"),{basename:n}=v.useContext(Hn),s=Jj(),o=e.fetch,l=e.navigate;return v.useCallback(async(c,d={})=>{let{action:f,method:m,encType:p,formData:x,body:g}=xC(c,n);if(d.navigate===!1){let w=d.fetcherKey||HC();await o(w,s,d.action||f,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:x,body:g,formMethod:d.method||m,formEncType:d.encType||p,flushSync:d.flushSync})}else await l(d.action||f,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:x,body:g,formMethod:d.method||m,formEncType:d.encType||p,replace:d.replace,state:d.state,fromRouteId:s,flushSync:d.flushSync,viewTransition:d.viewTransition})},[o,l,n,s])}function WC(e,{relative:n}={}){let{basename:s}=v.useContext(Hn),o=v.useContext(sr);Ge(o,"useFormAction must be used inside a RouteContext");let[l]=o.matches.slice(-1),c={...Nl(e||".",{relative:n})},d=Wr();if(e==null){c.search=d.search;let f=new URLSearchParams(c.search),m=f.getAll("index");if(m.some(x=>x==="")){f.delete("index"),m.filter(g=>g).forEach(g=>f.append("index",g));let x=f.toString();c.search=x?`?${x}`:""}}return(!e||e===".")&&l.route.index&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),s!=="/"&&(c.pathname=c.pathname==="/"?s:$r([s,c.pathname])),Br(c)}function KC(e,{relative:n}={}){let s=v.useContext(Bm);Ge(s!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=Gx("useViewTransitionState"),l=Nl(e,{relative:n});if(!s.isTransitioning)return!1;let c=rr(s.currentLocation.pathname,o)||s.currentLocation.pathname,d=rr(s.nextLocation.pathname,o)||s.nextLocation.pathname;return eu(l.pathname,d)!=null||eu(l.pathname,c)!=null}var QC=(e,n,s,o,l,c,d,f)=>{let m=document.documentElement,p=["light","dark"];function x(b){(Array.isArray(e)?e:[e]).forEach(N=>{let S=N==="class",C=S&&c?l.map(k=>c[k]||k):l;S?(m.classList.remove(...C),m.classList.add(c&&c[b]?c[b]:b)):m.setAttribute(N,b)}),g(b)}function g(b){f&&p.includes(b)&&(m.style.colorScheme=b)}function w(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(o)x(o);else try{let b=localStorage.getItem(n)||s,N=d&&b==="system"?w():b;x(N)}catch{}},Gv=["light","dark"],Xx="(prefers-color-scheme: dark)",qC=typeof window>"u",Ym=v.createContext(void 0),YC={setTheme:e=>{},themes:[]},Gm=()=>{var e;return(e=v.useContext(Ym))!=null?e:YC},GC=e=>v.useContext(Ym)?v.createElement(v.Fragment,null,e.children):v.createElement(JC,{...e}),XC=["light","dark"],JC=({forcedTheme:e,disableTransitionOnChange:n=!1,enableSystem:s=!0,enableColorScheme:o=!0,storageKey:l="theme",themes:c=XC,defaultTheme:d=s?"system":"light",attribute:f="data-theme",value:m,children:p,nonce:x,scriptProps:g})=>{let[w,b]=v.useState(()=>eE(l,d)),[N,S]=v.useState(()=>w==="system"?Mf():w),C=m?Object.values(m):c,k=v.useCallback(L=>{let B=L;if(!B)return;L==="system"&&s&&(B=Mf());let T=m?m[B]:B,I=n?tE(x):null,W=document.documentElement,J=Z=>{Z==="class"?(W.classList.remove(...C),T&&W.classList.add(T)):Z.startsWith("data-")&&(T?W.setAttribute(Z,T):W.removeAttribute(Z))};if(Array.isArray(f)?f.forEach(J):J(f),o){let Z=Gv.includes(d)?d:null,q=Gv.includes(B)?B:Z;W.style.colorScheme=q}I==null||I()},[x]),P=v.useCallback(L=>{let B=typeof L=="function"?L(w):L;b(B);try{localStorage.setItem(l,B)}catch{}},[w]),E=v.useCallback(L=>{let B=Mf(L);S(B),w==="system"&&s&&!e&&k("system")},[w,e]);v.useEffect(()=>{let L=window.matchMedia(Xx);return L.addListener(E),E(L),()=>L.removeListener(E)},[E]),v.useEffect(()=>{let L=B=>{B.key===l&&(B.newValue?b(B.newValue):P(d))};return window.addEventListener("storage",L),()=>window.removeEventListener("storage",L)},[P]),v.useEffect(()=>{k(e??w)},[e,w]);let R=v.useMemo(()=>({theme:w,setTheme:P,forcedTheme:e,resolvedTheme:w==="system"?N:w,themes:s?[...c,"system"]:c,systemTheme:s?N:void 0}),[w,P,e,N,s,c]);return v.createElement(Ym.Provider,{value:R},v.createElement(ZC,{forcedTheme:e,storageKey:l,attribute:f,enableSystem:s,enableColorScheme:o,defaultTheme:d,value:m,themes:c,nonce:x,scriptProps:g}),p)},ZC=v.memo(({forcedTheme:e,storageKey:n,attribute:s,enableSystem:o,enableColorScheme:l,defaultTheme:c,value:d,themes:f,nonce:m,scriptProps:p})=>{let x=JSON.stringify([s,n,c,e,f,d,o,l]).slice(1,-1);return v.createElement("script",{...p,suppressHydrationWarning:!0,nonce:typeof window>"u"?m:"",dangerouslySetInnerHTML:{__html:`(${QC.toString()})(${x})`}})}),eE=(e,n)=>{if(qC)return;let s;try{s=localStorage.getItem(e)||void 0}catch{}return s||n},tE=e=>{let n=document.createElement("style");return e&&n.setAttribute("nonce",e),n.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(n),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(n)},1)}},Mf=e=>(e||(e=window.matchMedia(Xx)),e.matches?"dark":"light"),ui=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},nE={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)},eo,Om,ox,rE=(ox=class{constructor(){Ie(this,eo,nE);Ie(this,Om,!1)}setTimeoutProvider(e){ve(this,eo,e)}setTimeout(e,n){return O(this,eo).setTimeout(e,n)}clearTimeout(e){O(this,eo).clearTimeout(e)}setInterval(e,n){return O(this,eo).setInterval(e,n)}clearInterval(e){O(this,eo).clearInterval(e)}},eo=new WeakMap,Om=new WeakMap,ox),$o=new rE;function sE(e){setTimeout(e,0)}var Go=typeof window>"u"||"Deno"in globalThis;function wn(){}function oE(e,n){return typeof e=="function"?e(n):e}function nm(e){return typeof e=="number"&&e>=0&&e!==1/0}function Jx(e,n){return Math.max(e+(n||0)-Date.now(),0)}function uo(e,n){return typeof e=="function"?e(n):e}function nr(e,n){return typeof e=="function"?e(n):e}function Xv(e,n){const{type:s="all",exact:o,fetchStatus:l,predicate:c,queryKey:d,stale:f}=e;if(d){if(o){if(n.queryHash!==Xm(d,n.options))return!1}else if(!dl(n.queryKey,d))return!1}if(s!=="all"){const m=n.isActive();if(s==="active"&&!m||s==="inactive"&&m)return!1}return!(typeof f=="boolean"&&n.isStale()!==f||l&&l!==n.state.fetchStatus||c&&!c(n))}function Jv(e,n){const{exact:s,status:o,predicate:l,mutationKey:c}=e;if(c){if(!n.options.mutationKey)return!1;if(s){if(Xo(n.options.mutationKey)!==Xo(c))return!1}else if(!dl(n.options.mutationKey,c))return!1}return!(o&&n.state.status!==o||l&&!l(n))}function Xm(e,n){return((n==null?void 0:n.queryKeyHashFn)||Xo)(e)}function Xo(e){return JSON.stringify(e,(n,s)=>rm(s)?Object.keys(s).sort().reduce((o,l)=>(o[l]=s[l],o),{}):s)}function dl(e,n){return e===n?!0:typeof e!=typeof n?!1:e&&n&&typeof e=="object"&&typeof n=="object"?Object.keys(n).every(s=>dl(e[s],n[s])):!1}var aE=Object.prototype.hasOwnProperty;function Zx(e,n,s=0){if(e===n)return e;if(s>500)return n;const o=Zv(e)&&Zv(n);if(!o&&!(rm(e)&&rm(n)))return n;const c=(o?e:Object.keys(e)).length,d=o?n:Object.keys(n),f=d.length,m=o?new Array(f):{};let p=0;for(let x=0;x<f;x++){const g=o?x:d[x],w=e[g],b=n[g];if(w===b){m[g]=w,(o?x<c:aE.call(e,g))&&p++;continue}if(w===null||b===null||typeof w!="object"||typeof b!="object"){m[g]=b;continue}const N=Zx(w,b,s+1);m[g]=N,N===w&&p++}return c===f&&p===c?e:m}function tu(e,n){if(!n||Object.keys(e).length!==Object.keys(n).length)return!1;for(const s in e)if(e[s]!==n[s])return!1;return!0}function Zv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function rm(e){if(!ey(e))return!1;const n=e.constructor;if(n===void 0)return!0;const s=n.prototype;return!(!ey(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function ey(e){return Object.prototype.toString.call(e)==="[object Object]"}function iE(e){return new Promise(n=>{$o.setTimeout(n,e)})}function sm(e,n,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,n):s.structuralSharing!==!1?Zx(e,n):n}function lE(e,n,s=0){const o=[...e,n];return s&&o.length>s?o.slice(1):o}function cE(e,n,s=0){const o=[n,...e];return s&&o.length>s?o.slice(0,-1):o}var Jm=Symbol();function e0(e,n){return!e.queryFn&&(n!=null&&n.initialPromise)?()=>n.initialPromise:!e.queryFn||e.queryFn===Jm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Zm(e,n){return typeof e=="function"?e(...n):!!e}function uE(e,n,s){let o=!1,l;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(l??(l=n()),o||(o=!0,l.aborted?s():l.addEventListener("abort",s,{once:!0})),l)}),e}var Uo,to,Ka,ax,dE=(ax=class extends ui{constructor(){super();Ie(this,Uo);Ie(this,to);Ie(this,Ka);ve(this,Ka,n=>{if(!Go&&window.addEventListener){const s=()=>n();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){O(this,to)||this.setEventListener(O(this,Ka))}onUnsubscribe(){var n;this.hasListeners()||((n=O(this,to))==null||n.call(this),ve(this,to,void 0))}setEventListener(n){var s;ve(this,Ka,n),(s=O(this,to))==null||s.call(this),ve(this,to,n(o=>{typeof o=="boolean"?this.setFocused(o):this.onFocus()}))}setFocused(n){O(this,Uo)!==n&&(ve(this,Uo,n),this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(s=>{s(n)})}isFocused(){var n;return typeof O(this,Uo)=="boolean"?O(this,Uo):((n=globalThis.document)==null?void 0:n.visibilityState)!=="hidden"}},Uo=new WeakMap,to=new WeakMap,Ka=new WeakMap,ax),eh=new dE;function om(){let e,n;const s=new Promise((l,c)=>{e=l,n=c});s.status="pending",s.catch(()=>{});function o(l){Object.assign(s,l),delete s.resolve,delete s.reject}return s.resolve=l=>{o({status:"fulfilled",value:l}),e(l)},s.reject=l=>{o({status:"rejected",reason:l}),n(l)},s}var fE=sE;function mE(){let e=[],n=0,s=f=>{f()},o=f=>{f()},l=fE;const c=f=>{n?e.push(f):l(()=>{s(f)})},d=()=>{const f=e;e=[],f.length&&l(()=>{o(()=>{f.forEach(m=>{s(m)})})})};return{batch:f=>{let m;n++;try{m=f()}finally{n--,n||d()}return m},batchCalls:f=>(...m)=>{c(()=>{f(...m)})},schedule:c,setNotifyFunction:f=>{s=f},setBatchNotifyFunction:f=>{o=f},setScheduler:f=>{l=f}}}var Wt=mE(),Qa,no,qa,ix,hE=(ix=class extends ui{constructor(){super();Ie(this,Qa,!0);Ie(this,no);Ie(this,qa);ve(this,qa,n=>{if(!Go&&window.addEventListener){const s=()=>n(!0),o=()=>n(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",o,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",o)}}})}onSubscribe(){O(this,no)||this.setEventListener(O(this,qa))}onUnsubscribe(){var n;this.hasListeners()||((n=O(this,no))==null||n.call(this),ve(this,no,void 0))}setEventListener(n){var s;ve(this,qa,n),(s=O(this,no))==null||s.call(this),ve(this,no,n(this.setOnline.bind(this)))}setOnline(n){O(this,Qa)!==n&&(ve(this,Qa,n),this.listeners.forEach(o=>{o(n)}))}isOnline(){return O(this,Qa)}},Qa=new WeakMap,no=new WeakMap,qa=new WeakMap,ix),nu=new hE;function pE(e){return Math.min(1e3*2**e,3e4)}function t0(e){return(e??"online")==="online"?nu.isOnline():!0}var am=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function n0(e){let n=!1,s=0,o;const l=om(),c=()=>l.status!=="pending",d=S=>{var C;if(!c()){const k=new am(S);w(k),(C=e.onCancel)==null||C.call(e,k)}},f=()=>{n=!0},m=()=>{n=!1},p=()=>eh.isFocused()&&(e.networkMode==="always"||nu.isOnline())&&e.canRun(),x=()=>t0(e.networkMode)&&e.canRun(),g=S=>{c()||(o==null||o(),l.resolve(S))},w=S=>{c()||(o==null||o(),l.reject(S))},b=()=>new Promise(S=>{var C;o=k=>{(c()||p())&&S(k)},(C=e.onPause)==null||C.call(e)}).then(()=>{var S;o=void 0,c()||(S=e.onContinue)==null||S.call(e)}),N=()=>{if(c())return;let S;const C=s===0?e.initialPromise:void 0;try{S=C??e.fn()}catch(k){S=Promise.reject(k)}Promise.resolve(S).then(g).catch(k=>{var B;if(c())return;const P=e.retry??(Go?0:3),E=e.retryDelay??pE,R=typeof E=="function"?E(s,k):E,L=P===!0||typeof P=="number"&&s<P||typeof P=="function"&&P(s,k);if(n||!L){w(k);return}s++,(B=e.onFail)==null||B.call(e,s,k),iE(R).then(()=>p()?void 0:b()).then(()=>{n?w(k):N()})})};return{promise:l,status:()=>l.status,cancel:d,continue:()=>(o==null||o(),l),cancelRetry:f,continueRetry:m,canStart:x,start:()=>(x()?N():b().then(N),l)}}var Bo,lx,r0=(lx=class{constructor(){Ie(this,Bo)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),nm(this.gcTime)&&ve(this,Bo,$o.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Go?1/0:300*1e3))}clearGcTimeout(){O(this,Bo)&&($o.clearTimeout(O(this,Bo)),ve(this,Bo,void 0))}},Bo=new WeakMap,lx),Ho,Ya,er,Vo,Xt,pl,Wo,yr,hs,cx,gE=(cx=class extends r0{constructor(n){super();Ie(this,yr);Ie(this,Ho);Ie(this,Ya);Ie(this,er);Ie(this,Vo);Ie(this,Xt);Ie(this,pl);Ie(this,Wo);ve(this,Wo,!1),ve(this,pl,n.defaultOptions),this.setOptions(n.options),this.observers=[],ve(this,Vo,n.client),ve(this,er,O(this,Vo).getQueryCache()),this.queryKey=n.queryKey,this.queryHash=n.queryHash,ve(this,Ho,ny(this.options)),this.state=n.state??O(this,Ho),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var n;return(n=O(this,Xt))==null?void 0:n.promise}setOptions(n){if(this.options={...O(this,pl),...n},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=ny(this.options);s.data!==void 0&&(this.setState(ty(s.data,s.dataUpdatedAt)),ve(this,Ho,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&O(this,er).remove(this)}setData(n,s){const o=sm(this.state.data,n,this.options);return qe(this,yr,hs).call(this,{data:o,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),o}setState(n,s){qe(this,yr,hs).call(this,{type:"setState",state:n,setStateOptions:s})}cancel(n){var o,l;const s=(o=O(this,Xt))==null?void 0:o.promise;return(l=O(this,Xt))==null||l.cancel(n),s?s.then(wn).catch(wn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(O(this,Ho))}isActive(){return this.observers.some(n=>nr(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Jm||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>uo(n.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(n=>n.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(n=0){return this.state.data===void 0?!0:n==="static"?!1:this.state.isInvalidated?!0:!Jx(this.state.dataUpdatedAt,n)}onFocus(){var s;const n=this.observers.find(o=>o.shouldFetchOnWindowFocus());n==null||n.refetch({cancelRefetch:!1}),(s=O(this,Xt))==null||s.continue()}onOnline(){var s;const n=this.observers.find(o=>o.shouldFetchOnReconnect());n==null||n.refetch({cancelRefetch:!1}),(s=O(this,Xt))==null||s.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),O(this,er).notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){this.observers.includes(n)&&(this.observers=this.observers.filter(s=>s!==n),this.observers.length||(O(this,Xt)&&(O(this,Wo)?O(this,Xt).cancel({revert:!0}):O(this,Xt).cancelRetry()),this.scheduleGc()),O(this,er).notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||qe(this,yr,hs).call(this,{type:"invalidate"})}async fetch(n,s){var m,p,x,g,w,b,N,S,C,k,P,E;if(this.state.fetchStatus!=="idle"&&((m=O(this,Xt))==null?void 0:m.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(O(this,Xt))return O(this,Xt).continueRetry(),O(this,Xt).promise}if(n&&this.setOptions(n),!this.options.queryFn){const R=this.observers.find(L=>L.options.queryFn);R&&this.setOptions(R.options)}const o=new AbortController,l=R=>{Object.defineProperty(R,"signal",{enumerable:!0,get:()=>(ve(this,Wo,!0),o.signal)})},c=()=>{const R=e0(this.options,s),B=(()=>{const T={client:O(this,Vo),queryKey:this.queryKey,meta:this.meta};return l(T),T})();return ve(this,Wo,!1),this.options.persister?this.options.persister(R,B,this):R(B)},f=(()=>{const R={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:O(this,Vo),state:this.state,fetchFn:c};return l(R),R})();(p=this.options.behavior)==null||p.onFetch(f,this),ve(this,Ya,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((x=f.fetchOptions)==null?void 0:x.meta))&&qe(this,yr,hs).call(this,{type:"fetch",meta:(g=f.fetchOptions)==null?void 0:g.meta}),ve(this,Xt,n0({initialPromise:s==null?void 0:s.initialPromise,fn:f.fetchFn,onCancel:R=>{R instanceof am&&R.revert&&this.setState({...O(this,Ya),fetchStatus:"idle"}),o.abort()},onFail:(R,L)=>{qe(this,yr,hs).call(this,{type:"failed",failureCount:R,error:L})},onPause:()=>{qe(this,yr,hs).call(this,{type:"pause"})},onContinue:()=>{qe(this,yr,hs).call(this,{type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:()=>!0}));try{const R=await O(this,Xt).start();if(R===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(R),(b=(w=O(this,er).config).onSuccess)==null||b.call(w,R,this),(S=(N=O(this,er).config).onSettled)==null||S.call(N,R,this.state.error,this),R}catch(R){if(R instanceof am){if(R.silent)return O(this,Xt).promise;if(R.revert){if(this.state.data===void 0)throw R;return this.state.data}}throw qe(this,yr,hs).call(this,{type:"error",error:R}),(k=(C=O(this,er).config).onError)==null||k.call(C,R,this),(E=(P=O(this,er).config).onSettled)==null||E.call(P,this.state.data,R,this),R}finally{this.scheduleGc()}}},Ho=new WeakMap,Ya=new WeakMap,er=new WeakMap,Vo=new WeakMap,Xt=new WeakMap,pl=new WeakMap,Wo=new WeakMap,yr=new WeakSet,hs=function(n){const s=o=>{switch(n.type){case"failed":return{...o,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...o,fetchStatus:"paused"};case"continue":return{...o,fetchStatus:"fetching"};case"fetch":return{...o,...s0(o.data,this.options),fetchMeta:n.meta??null};case"success":const l={...o,...ty(n.data,n.dataUpdatedAt),dataUpdateCount:o.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ve(this,Ya,n.manual?l:void 0),l;case"error":const c=n.error;return{...o,error:c,errorUpdateCount:o.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:o.fetchFailureCount+1,fetchFailureReason:c,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...o,isInvalidated:!0};case"setState":return{...o,...n.state}}};this.state=s(this.state),Wt.batch(()=>{this.observers.forEach(o=>{o.onQueryUpdate()}),O(this,er).notify({query:this,type:"updated",action:n})})},cx);function s0(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:t0(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function ty(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ny(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,s=n!==void 0,o=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:s?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var Pn,et,gl,xn,Ko,Ga,ps,ro,vl,Xa,Ja,Qo,qo,so,Za,ot,al,im,lm,cm,um,dm,fm,mm,o0,ux,vE=(ux=class extends ui{constructor(n,s){super();Ie(this,ot);Ie(this,Pn);Ie(this,et);Ie(this,gl);Ie(this,xn);Ie(this,Ko);Ie(this,Ga);Ie(this,ps);Ie(this,ro);Ie(this,vl);Ie(this,Xa);Ie(this,Ja);Ie(this,Qo);Ie(this,qo);Ie(this,so);Ie(this,Za,new Set);this.options=s,ve(this,Pn,n),ve(this,ro,null),ve(this,ps,om()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(O(this,et).addObserver(this),ry(O(this,et),this.options)?qe(this,ot,al).call(this):this.updateResult(),qe(this,ot,um).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return hm(O(this,et),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return hm(O(this,et),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,qe(this,ot,dm).call(this),qe(this,ot,fm).call(this),O(this,et).removeObserver(this)}setOptions(n){const s=this.options,o=O(this,et);if(this.options=O(this,Pn).defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof nr(this.options.enabled,O(this,et))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");qe(this,ot,mm).call(this),O(this,et).setOptions(this.options),s._defaulted&&!tu(this.options,s)&&O(this,Pn).getQueryCache().notify({type:"observerOptionsUpdated",query:O(this,et),observer:this});const l=this.hasListeners();l&&sy(O(this,et),o,this.options,s)&&qe(this,ot,al).call(this),this.updateResult(),l&&(O(this,et)!==o||nr(this.options.enabled,O(this,et))!==nr(s.enabled,O(this,et))||uo(this.options.staleTime,O(this,et))!==uo(s.staleTime,O(this,et)))&&qe(this,ot,im).call(this);const c=qe(this,ot,lm).call(this);l&&(O(this,et)!==o||nr(this.options.enabled,O(this,et))!==nr(s.enabled,O(this,et))||c!==O(this,so))&&qe(this,ot,cm).call(this,c)}getOptimisticResult(n){const s=O(this,Pn).getQueryCache().build(O(this,Pn),n),o=this.createResult(s,n);return xE(this,o)&&(ve(this,xn,o),ve(this,Ga,this.options),ve(this,Ko,O(this,et).state)),o}getCurrentResult(){return O(this,xn)}trackResult(n,s){return new Proxy(n,{get:(o,l)=>(this.trackProp(l),s==null||s(l),l==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&O(this,ps).status==="pending"&&O(this,ps).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(o,l))})}trackProp(n){O(this,Za).add(n)}getCurrentQuery(){return O(this,et)}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const s=O(this,Pn).defaultQueryOptions(n),o=O(this,Pn).getQueryCache().build(O(this,Pn),s);return o.fetch().then(()=>this.createResult(o,s))}fetch(n){return qe(this,ot,al).call(this,{...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),O(this,xn)))}createResult(n,s){var W;const o=O(this,et),l=this.options,c=O(this,xn),d=O(this,Ko),f=O(this,Ga),p=n!==o?n.state:O(this,gl),{state:x}=n;let g={...x},w=!1,b;if(s._optimisticResults){const J=this.hasListeners(),Z=!J&&ry(n,s),q=J&&sy(n,o,s,l);(Z||q)&&(g={...g,...s0(x.data,n.options)}),s._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:N,errorUpdatedAt:S,status:C}=g;b=g.data;let k=!1;if(s.placeholderData!==void 0&&b===void 0&&C==="pending"){let J;c!=null&&c.isPlaceholderData&&s.placeholderData===(f==null?void 0:f.placeholderData)?(J=c.data,k=!0):J=typeof s.placeholderData=="function"?s.placeholderData((W=O(this,Ja))==null?void 0:W.state.data,O(this,Ja)):s.placeholderData,J!==void 0&&(C="success",b=sm(c==null?void 0:c.data,J,s),w=!0)}if(s.select&&b!==void 0&&!k)if(c&&b===(d==null?void 0:d.data)&&s.select===O(this,vl))b=O(this,Xa);else try{ve(this,vl,s.select),b=s.select(b),b=sm(c==null?void 0:c.data,b,s),ve(this,Xa,b),ve(this,ro,null)}catch(J){ve(this,ro,J)}O(this,ro)&&(N=O(this,ro),b=O(this,Xa),S=Date.now(),C="error");const P=g.fetchStatus==="fetching",E=C==="pending",R=C==="error",L=E&&P,B=b!==void 0,I={status:C,fetchStatus:g.fetchStatus,isPending:E,isSuccess:C==="success",isError:R,isInitialLoading:L,isLoading:L,data:b,dataUpdatedAt:g.dataUpdatedAt,error:N,errorUpdatedAt:S,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>p.dataUpdateCount||g.errorUpdateCount>p.errorUpdateCount,isFetching:P,isRefetching:P&&!E,isLoadingError:R&&!B,isPaused:g.fetchStatus==="paused",isPlaceholderData:w,isRefetchError:R&&B,isStale:th(n,s),refetch:this.refetch,promise:O(this,ps),isEnabled:nr(s.enabled,n)!==!1};if(this.options.experimental_prefetchInRender){const J=I.data!==void 0,Z=I.status==="error"&&!J,q=ge=>{Z?ge.reject(I.error):J&&ge.resolve(I.data)},pe=()=>{const ge=ve(this,ps,I.promise=om());q(ge)},ue=O(this,ps);switch(ue.status){case"pending":n.queryHash===o.queryHash&&q(ue);break;case"fulfilled":(Z||I.data!==ue.value)&&pe();break;case"rejected":(!Z||I.error!==ue.reason)&&pe();break}}return I}updateResult(){const n=O(this,xn),s=this.createResult(O(this,et),this.options);if(ve(this,Ko,O(this,et).state),ve(this,Ga,this.options),O(this,Ko).data!==void 0&&ve(this,Ja,O(this,et)),tu(s,n))return;ve(this,xn,s);const o=()=>{if(!n)return!0;const{notifyOnChangeProps:l}=this.options,c=typeof l=="function"?l():l;if(c==="all"||!c&&!O(this,Za).size)return!0;const d=new Set(c??O(this,Za));return this.options.throwOnError&&d.add("error"),Object.keys(O(this,xn)).some(f=>{const m=f;return O(this,xn)[m]!==n[m]&&d.has(m)})};qe(this,ot,o0).call(this,{listeners:o()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&qe(this,ot,um).call(this)}},Pn=new WeakMap,et=new WeakMap,gl=new WeakMap,xn=new WeakMap,Ko=new WeakMap,Ga=new WeakMap,ps=new WeakMap,ro=new WeakMap,vl=new WeakMap,Xa=new WeakMap,Ja=new WeakMap,Qo=new WeakMap,qo=new WeakMap,so=new WeakMap,Za=new WeakMap,ot=new WeakSet,al=function(n){qe(this,ot,mm).call(this);let s=O(this,et).fetch(this.options,n);return n!=null&&n.throwOnError||(s=s.catch(wn)),s},im=function(){qe(this,ot,dm).call(this);const n=uo(this.options.staleTime,O(this,et));if(Go||O(this,xn).isStale||!nm(n))return;const o=Jx(O(this,xn).dataUpdatedAt,n)+1;ve(this,Qo,$o.setTimeout(()=>{O(this,xn).isStale||this.updateResult()},o))},lm=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(O(this,et)):this.options.refetchInterval)??!1},cm=function(n){qe(this,ot,fm).call(this),ve(this,so,n),!(Go||nr(this.options.enabled,O(this,et))===!1||!nm(O(this,so))||O(this,so)===0)&&ve(this,qo,$o.setInterval(()=>{(this.options.refetchIntervalInBackground||eh.isFocused())&&qe(this,ot,al).call(this)},O(this,so)))},um=function(){qe(this,ot,im).call(this),qe(this,ot,cm).call(this,qe(this,ot,lm).call(this))},dm=function(){O(this,Qo)&&($o.clearTimeout(O(this,Qo)),ve(this,Qo,void 0))},fm=function(){O(this,qo)&&($o.clearInterval(O(this,qo)),ve(this,qo,void 0))},mm=function(){const n=O(this,Pn).getQueryCache().build(O(this,Pn),this.options);if(n===O(this,et))return;const s=O(this,et);ve(this,et,n),ve(this,gl,n.state),this.hasListeners()&&(s==null||s.removeObserver(this),n.addObserver(this))},o0=function(n){Wt.batch(()=>{n.listeners&&this.listeners.forEach(s=>{s(O(this,xn))}),O(this,Pn).getQueryCache().notify({query:O(this,et),type:"observerResultsUpdated"})})},ux);function yE(e,n){return nr(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&n.retryOnMount===!1)}function ry(e,n){return yE(e,n)||e.state.data!==void 0&&hm(e,n,n.refetchOnMount)}function hm(e,n,s){if(nr(n.enabled,e)!==!1&&uo(n.staleTime,e)!=="static"){const o=typeof s=="function"?s(e):s;return o==="always"||o!==!1&&th(e,n)}return!1}function sy(e,n,s,o){return(e!==n||nr(o.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&th(e,s)}function th(e,n){return nr(n.enabled,e)!==!1&&e.isStaleByTime(uo(n.staleTime,e))}function xE(e,n){return!tu(e.getCurrentResult(),n)}function oy(e){return{onFetch:(n,s)=>{var x,g,w,b,N;const o=n.options,l=(w=(g=(x=n.fetchOptions)==null?void 0:x.meta)==null?void 0:g.fetchMore)==null?void 0:w.direction,c=((b=n.state.data)==null?void 0:b.pages)||[],d=((N=n.state.data)==null?void 0:N.pageParams)||[];let f={pages:[],pageParams:[]},m=0;const p=async()=>{let S=!1;const C=E=>{uE(E,()=>n.signal,()=>S=!0)},k=e0(n.options,n.fetchOptions),P=async(E,R,L)=>{if(S)return Promise.reject();if(R==null&&E.pages.length)return Promise.resolve(E);const T=(()=>{const Z={client:n.client,queryKey:n.queryKey,pageParam:R,direction:L?"backward":"forward",meta:n.options.meta};return C(Z),Z})(),I=await k(T),{maxPages:W}=n.options,J=L?cE:lE;return{pages:J(E.pages,I,W),pageParams:J(E.pageParams,R,W)}};if(l&&c.length){const E=l==="backward",R=E?wE:ay,L={pages:c,pageParams:d},B=R(o,L);f=await P(L,B,E)}else{const E=e??c.length;do{const R=m===0?d[0]??o.initialPageParam:ay(o,f);if(m>0&&R==null)break;f=await P(f,R),m++}while(m<E)}return f};n.options.persister?n.fetchFn=()=>{var S,C;return(C=(S=n.options).persister)==null?void 0:C.call(S,p,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},s)}:n.fetchFn=p}}}function ay(e,{pages:n,pageParams:s}){const o=n.length-1;return n.length>0?e.getNextPageParam(n[o],n,s[o],s):void 0}function wE(e,{pages:n,pageParams:s}){var o;return n.length>0?(o=e.getPreviousPageParam)==null?void 0:o.call(e,n[0],n,s[0],s):void 0}var yl,Dr,dn,Yo,Or,Gs,dx,bE=(dx=class extends r0{constructor(n){super();Ie(this,Or);Ie(this,yl);Ie(this,Dr);Ie(this,dn);Ie(this,Yo);ve(this,yl,n.client),this.mutationId=n.mutationId,ve(this,dn,n.mutationCache),ve(this,Dr,[]),this.state=n.state||a0(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){O(this,Dr).includes(n)||(O(this,Dr).push(n),this.clearGcTimeout(),O(this,dn).notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){ve(this,Dr,O(this,Dr).filter(s=>s!==n)),this.scheduleGc(),O(this,dn).notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){O(this,Dr).length||(this.state.status==="pending"?this.scheduleGc():O(this,dn).remove(this))}continue(){var n;return((n=O(this,Yo))==null?void 0:n.continue())??this.execute(this.state.variables)}async execute(n){var d,f,m,p,x,g,w,b,N,S,C,k,P,E,R,L,B,T;const s=()=>{qe(this,Or,Gs).call(this,{type:"continue"})},o={client:O(this,yl),meta:this.options.meta,mutationKey:this.options.mutationKey};ve(this,Yo,n0({fn:()=>this.options.mutationFn?this.options.mutationFn(n,o):Promise.reject(new Error("No mutationFn found")),onFail:(I,W)=>{qe(this,Or,Gs).call(this,{type:"failed",failureCount:I,error:W})},onPause:()=>{qe(this,Or,Gs).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>O(this,dn).canRun(this)}));const l=this.state.status==="pending",c=!O(this,Yo).canStart();try{if(l)s();else{qe(this,Or,Gs).call(this,{type:"pending",variables:n,isPaused:c}),O(this,dn).config.onMutate&&await O(this,dn).config.onMutate(n,this,o);const W=await((f=(d=this.options).onMutate)==null?void 0:f.call(d,n,o));W!==this.state.context&&qe(this,Or,Gs).call(this,{type:"pending",context:W,variables:n,isPaused:c})}const I=await O(this,Yo).start();return await((p=(m=O(this,dn).config).onSuccess)==null?void 0:p.call(m,I,n,this.state.context,this,o)),await((g=(x=this.options).onSuccess)==null?void 0:g.call(x,I,n,this.state.context,o)),await((b=(w=O(this,dn).config).onSettled)==null?void 0:b.call(w,I,null,this.state.variables,this.state.context,this,o)),await((S=(N=this.options).onSettled)==null?void 0:S.call(N,I,null,n,this.state.context,o)),qe(this,Or,Gs).call(this,{type:"success",data:I}),I}catch(I){try{await((k=(C=O(this,dn).config).onError)==null?void 0:k.call(C,I,n,this.state.context,this,o))}catch(W){Promise.reject(W)}try{await((E=(P=this.options).onError)==null?void 0:E.call(P,I,n,this.state.context,o))}catch(W){Promise.reject(W)}try{await((L=(R=O(this,dn).config).onSettled)==null?void 0:L.call(R,void 0,I,this.state.variables,this.state.context,this,o))}catch(W){Promise.reject(W)}try{await((T=(B=this.options).onSettled)==null?void 0:T.call(B,void 0,I,n,this.state.context,o))}catch(W){Promise.reject(W)}throw qe(this,Or,Gs).call(this,{type:"error",error:I}),I}finally{O(this,dn).runNext(this)}}},yl=new WeakMap,Dr=new WeakMap,dn=new WeakMap,Yo=new WeakMap,Or=new WeakSet,Gs=function(n){const s=o=>{switch(n.type){case"failed":return{...o,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...o,isPaused:!0};case"continue":return{...o,isPaused:!1};case"pending":return{...o,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...o,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...o,data:void 0,error:n.error,failureCount:o.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=s(this.state),Wt.batch(()=>{O(this,Dr).forEach(o=>{o.onMutationUpdate(n)}),O(this,dn).notify({mutation:this,type:"updated",action:n})})},dx);function a0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var gs,xr,xl,fx,SE=(fx=class extends ui{constructor(n={}){super();Ie(this,gs);Ie(this,xr);Ie(this,xl);this.config=n,ve(this,gs,new Set),ve(this,xr,new Map),ve(this,xl,0)}build(n,s,o){const l=new bE({client:n,mutationCache:this,mutationId:++_c(this,xl)._,options:n.defaultMutationOptions(s),state:o});return this.add(l),l}add(n){O(this,gs).add(n);const s=Oc(n);if(typeof s=="string"){const o=O(this,xr).get(s);o?o.push(n):O(this,xr).set(s,[n])}this.notify({type:"added",mutation:n})}remove(n){if(O(this,gs).delete(n)){const s=Oc(n);if(typeof s=="string"){const o=O(this,xr).get(s);if(o)if(o.length>1){const l=o.indexOf(n);l!==-1&&o.splice(l,1)}else o[0]===n&&O(this,xr).delete(s)}}this.notify({type:"removed",mutation:n})}canRun(n){const s=Oc(n);if(typeof s=="string"){const o=O(this,xr).get(s),l=o==null?void 0:o.find(c=>c.state.status==="pending");return!l||l===n}else return!0}runNext(n){var o;const s=Oc(n);if(typeof s=="string"){const l=(o=O(this,xr).get(s))==null?void 0:o.find(c=>c!==n&&c.state.isPaused);return(l==null?void 0:l.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Wt.batch(()=>{O(this,gs).forEach(n=>{this.notify({type:"removed",mutation:n})}),O(this,gs).clear(),O(this,xr).clear()})}getAll(){return Array.from(O(this,gs))}find(n){const s={exact:!0,...n};return this.getAll().find(o=>Jv(s,o))}findAll(n={}){return this.getAll().filter(s=>Jv(n,s))}notify(n){Wt.batch(()=>{this.listeners.forEach(s=>{s(n)})})}resumePausedMutations(){const n=this.getAll().filter(s=>s.state.isPaused);return Wt.batch(()=>Promise.all(n.map(s=>s.continue().catch(wn))))}},gs=new WeakMap,xr=new WeakMap,xl=new WeakMap,fx);function Oc(e){var n;return(n=e.options.scope)==null?void 0:n.id}var vs,oo,Tn,ys,xs,Gc,pm,mx,NE=(mx=class extends ui{constructor(s,o){super();Ie(this,xs);Ie(this,vs);Ie(this,oo);Ie(this,Tn);Ie(this,ys);ve(this,vs,s),this.setOptions(o),this.bindMethods(),qe(this,xs,Gc).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(s){var l;const o=this.options;this.options=O(this,vs).defaultMutationOptions(s),tu(this.options,o)||O(this,vs).getMutationCache().notify({type:"observerOptionsUpdated",mutation:O(this,Tn),observer:this}),o!=null&&o.mutationKey&&this.options.mutationKey&&Xo(o.mutationKey)!==Xo(this.options.mutationKey)?this.reset():((l=O(this,Tn))==null?void 0:l.state.status)==="pending"&&O(this,Tn).setOptions(this.options)}onUnsubscribe(){var s;this.hasListeners()||(s=O(this,Tn))==null||s.removeObserver(this)}onMutationUpdate(s){qe(this,xs,Gc).call(this),qe(this,xs,pm).call(this,s)}getCurrentResult(){return O(this,oo)}reset(){var s;(s=O(this,Tn))==null||s.removeObserver(this),ve(this,Tn,void 0),qe(this,xs,Gc).call(this),qe(this,xs,pm).call(this)}mutate(s,o){var l;return ve(this,ys,o),(l=O(this,Tn))==null||l.removeObserver(this),ve(this,Tn,O(this,vs).getMutationCache().build(O(this,vs),this.options)),O(this,Tn).addObserver(this),O(this,Tn).execute(s)}},vs=new WeakMap,oo=new WeakMap,Tn=new WeakMap,ys=new WeakMap,xs=new WeakSet,Gc=function(){var o;const s=((o=O(this,Tn))==null?void 0:o.state)??a0();ve(this,oo,{...s,isPending:s.status==="pending",isSuccess:s.status==="success",isError:s.status==="error",isIdle:s.status==="idle",mutate:this.mutate,reset:this.reset})},pm=function(s){Wt.batch(()=>{var o,l,c,d,f,m,p,x;if(O(this,ys)&&this.hasListeners()){const g=O(this,oo).variables,w=O(this,oo).context,b={client:O(this,vs),meta:this.options.meta,mutationKey:this.options.mutationKey};if((s==null?void 0:s.type)==="success"){try{(l=(o=O(this,ys)).onSuccess)==null||l.call(o,s.data,g,w,b)}catch(N){Promise.reject(N)}try{(d=(c=O(this,ys)).onSettled)==null||d.call(c,s.data,null,g,w,b)}catch(N){Promise.reject(N)}}else if((s==null?void 0:s.type)==="error"){try{(m=(f=O(this,ys)).onError)==null||m.call(f,s.error,g,w,b)}catch(N){Promise.reject(N)}try{(x=(p=O(this,ys)).onSettled)==null||x.call(p,void 0,s.error,g,w,b)}catch(N){Promise.reject(N)}}}this.listeners.forEach(g=>{g(O(this,oo))})})},mx),Lr,hx,jE=(hx=class extends ui{constructor(n={}){super();Ie(this,Lr);this.config=n,ve(this,Lr,new Map)}build(n,s,o){const l=s.queryKey,c=s.queryHash??Xm(l,s);let d=this.get(c);return d||(d=new gE({client:n,queryKey:l,queryHash:c,options:n.defaultQueryOptions(s),state:o,defaultOptions:n.getQueryDefaults(l)}),this.add(d)),d}add(n){O(this,Lr).has(n.queryHash)||(O(this,Lr).set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const s=O(this,Lr).get(n.queryHash);s&&(n.destroy(),s===n&&O(this,Lr).delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){Wt.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return O(this,Lr).get(n)}getAll(){return[...O(this,Lr).values()]}find(n){const s={exact:!0,...n};return this.getAll().find(o=>Xv(s,o))}findAll(n={}){const s=this.getAll();return Object.keys(n).length>0?s.filter(o=>Xv(n,o)):s}notify(n){Wt.batch(()=>{this.listeners.forEach(s=>{s(n)})})}onFocus(){Wt.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){Wt.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},Lr=new WeakMap,hx),Pt,ao,io,ei,ti,lo,ni,ri,px,CE=(px=class{constructor(e={}){Ie(this,Pt);Ie(this,ao);Ie(this,io);Ie(this,ei);Ie(this,ti);Ie(this,lo);Ie(this,ni);Ie(this,ri);ve(this,Pt,e.queryCache||new jE),ve(this,ao,e.mutationCache||new SE),ve(this,io,e.defaultOptions||{}),ve(this,ei,new Map),ve(this,ti,new Map),ve(this,lo,0)}mount(){_c(this,lo)._++,O(this,lo)===1&&(ve(this,ni,eh.subscribe(async e=>{e&&(await this.resumePausedMutations(),O(this,Pt).onFocus())})),ve(this,ri,nu.subscribe(async e=>{e&&(await this.resumePausedMutations(),O(this,Pt).onOnline())})))}unmount(){var e,n;_c(this,lo)._--,O(this,lo)===0&&((e=O(this,ni))==null||e.call(this),ve(this,ni,void 0),(n=O(this,ri))==null||n.call(this),ve(this,ri,void 0))}isFetching(e){return O(this,Pt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return O(this,ao).findAll({...e,status:"pending"}).length}getQueryData(e){var s;const n=this.defaultQueryOptions({queryKey:e});return(s=O(this,Pt).get(n.queryHash))==null?void 0:s.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),s=O(this,Pt).build(this,n),o=s.state.data;return o===void 0?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(uo(n.staleTime,s))&&this.prefetchQuery(n),Promise.resolve(o))}getQueriesData(e){return O(this,Pt).findAll(e).map(({queryKey:n,state:s})=>{const o=s.data;return[n,o]})}setQueryData(e,n,s){const o=this.defaultQueryOptions({queryKey:e}),l=O(this,Pt).get(o.queryHash),c=l==null?void 0:l.state.data,d=oE(n,c);if(d!==void 0)return O(this,Pt).build(this,o).setData(d,{...s,manual:!0})}setQueriesData(e,n,s){return Wt.batch(()=>O(this,Pt).findAll(e).map(({queryKey:o})=>[o,this.setQueryData(o,n,s)]))}getQueryState(e){var s;const n=this.defaultQueryOptions({queryKey:e});return(s=O(this,Pt).get(n.queryHash))==null?void 0:s.state}removeQueries(e){const n=O(this,Pt);Wt.batch(()=>{n.findAll(e).forEach(s=>{n.remove(s)})})}resetQueries(e,n){const s=O(this,Pt);return Wt.batch(()=>(s.findAll(e).forEach(o=>{o.reset()}),this.refetchQueries({type:"active",...e},n)))}cancelQueries(e,n={}){const s={revert:!0,...n},o=Wt.batch(()=>O(this,Pt).findAll(e).map(l=>l.cancel(s)));return Promise.all(o).then(wn).catch(wn)}invalidateQueries(e,n={}){return Wt.batch(()=>(O(this,Pt).findAll(e).forEach(s=>{s.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},n)))}refetchQueries(e,n={}){const s={...n,cancelRefetch:n.cancelRefetch??!0},o=Wt.batch(()=>O(this,Pt).findAll(e).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let c=l.fetch(void 0,s);return s.throwOnError||(c=c.catch(wn)),l.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(o).then(wn)}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const s=O(this,Pt).build(this,n);return s.isStaleByTime(uo(n.staleTime,s))?s.fetch(n):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(wn).catch(wn)}fetchInfiniteQuery(e){return e.behavior=oy(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(wn).catch(wn)}ensureInfiniteQueryData(e){return e.behavior=oy(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return nu.isOnline()?O(this,ao).resumePausedMutations():Promise.resolve()}getQueryCache(){return O(this,Pt)}getMutationCache(){return O(this,ao)}getDefaultOptions(){return O(this,io)}setDefaultOptions(e){ve(this,io,e)}setQueryDefaults(e,n){O(this,ei).set(Xo(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...O(this,ei).values()],s={};return n.forEach(o=>{dl(e,o.queryKey)&&Object.assign(s,o.defaultOptions)}),s}setMutationDefaults(e,n){O(this,ti).set(Xo(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...O(this,ti).values()],s={};return n.forEach(o=>{dl(e,o.mutationKey)&&Object.assign(s,o.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;const n={...O(this,io).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=Xm(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===Jm&&(n.enabled=!1),n}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...O(this,io).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){O(this,Pt).clear(),O(this,ao).clear()}},Pt=new WeakMap,ao=new WeakMap,io=new WeakMap,ei=new WeakMap,ti=new WeakMap,lo=new WeakMap,ni=new WeakMap,ri=new WeakMap,px),i0=v.createContext(void 0),ar=e=>{const n=v.useContext(i0);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},EE=({client:e,children:n})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),i.jsx(i0.Provider,{value:e,children:n})),l0=v.createContext(!1),kE=()=>v.useContext(l0);l0.Provider;function RE(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var PE=v.createContext(RE()),TE=()=>v.useContext(PE),_E=(e,n,s)=>{const o=s!=null&&s.state.error&&typeof e.throwOnError=="function"?Zm(e.throwOnError,[s.state.error,s]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||o)&&(n.isReset()||(e.retryOnMount=!1))},AE=e=>{v.useEffect(()=>{e.clearReset()},[e])},ME=({result:e,errorResetBoundary:n,throwOnError:s,query:o,suspense:l})=>e.isError&&!n.isReset()&&!e.isFetching&&o&&(l&&e.data===void 0||Zm(s,[e.error,o])),IE=e=>{if(e.suspense){const s=l=>l==="static"?l:Math.max(l??1e3,1e3),o=e.staleTime;e.staleTime=typeof o=="function"?(...l)=>s(o(...l)):s(o),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},DE=(e,n)=>e.isLoading&&e.isFetching&&!n,OE=(e,n)=>(e==null?void 0:e.suspense)&&n.isPending,iy=(e,n,s)=>n.fetchOptimistic(e).catch(()=>{s.clearReset()});function LE(e,n,s){var w,b,N,S;const o=kE(),l=TE(),c=ar(),d=c.defaultQueryOptions(e);(b=(w=c.getDefaultOptions().queries)==null?void 0:w._experimental_beforeQuery)==null||b.call(w,d);const f=c.getQueryCache().get(d.queryHash);d._optimisticResults=o?"isRestoring":"optimistic",IE(d),_E(d,l,f),AE(l);const m=!c.getQueryCache().get(d.queryHash),[p]=v.useState(()=>new n(c,d)),x=p.getOptimisticResult(d),g=!o&&e.subscribed!==!1;if(v.useSyncExternalStore(v.useCallback(C=>{const k=g?p.subscribe(Wt.batchCalls(C)):wn;return p.updateResult(),k},[p,g]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),v.useEffect(()=>{p.setOptions(d)},[d,p]),OE(d,x))throw iy(d,p,l);if(ME({result:x,errorResetBoundary:l,throwOnError:d.throwOnError,query:f,suspense:d.suspense}))throw x.error;if((S=(N=c.getDefaultOptions().queries)==null?void 0:N._experimental_afterQuery)==null||S.call(N,d,x),d.experimental_prefetchInRender&&!Go&&DE(x,o)){const C=m?iy(d,p,l):f==null?void 0:f.promise;C==null||C.catch(wn).finally(()=>{p.updateResult()})}return d.notifyOnChangeProps?x:p.trackResult(x)}function Ns(e,n){return LE(e,vE)}function ir(e,n){const s=ar(),[o]=v.useState(()=>new NE(s,e));v.useEffect(()=>{o.setOptions(e)},[o,e]);const l=v.useSyncExternalStore(v.useCallback(d=>o.subscribe(Wt.batchCalls(d)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),c=v.useCallback((d,f)=>{o.mutate(d,f).catch(wn)},[o]);if(l.error&&Zm(o.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:c,mutateAsync:l.mutate}}var jl=vx();const c0=gx(jl);function zE(e){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",n.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}const FE=e=>{switch(e){case"success":return BE;case"info":return VE;case"warning":return HE;case"error":return WE;default:return null}},$E=Array(12).fill(0),UE=({visible:e,className:n})=>me.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":e},me.createElement("div",{className:"sonner-spinner"},$E.map((s,o)=>me.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${o}`})))),BE=me.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},me.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"})),HE=me.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},me.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"})),VE=me.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},me.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"})),WE=me.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},me.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"})),KE=me.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"},me.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),me.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),QE=()=>{const[e,n]=me.useState(document.hidden);return me.useEffect(()=>{const s=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",s),()=>window.removeEventListener("visibilitychange",s)},[]),e};let gm=1;class qE{constructor(){this.subscribe=n=>(this.subscribers.push(n),()=>{const s=this.subscribers.indexOf(n);this.subscribers.splice(s,1)}),this.publish=n=>{this.subscribers.forEach(s=>s(n))},this.addToast=n=>{this.publish(n),this.toasts=[...this.toasts,n]},this.create=n=>{var s;const{message:o,...l}=n,c=typeof(n==null?void 0:n.id)=="number"||((s=n.id)==null?void 0:s.length)>0?n.id:gm++,d=this.toasts.find(m=>m.id===c),f=n.dismissible===void 0?!0:n.dismissible;return this.dismissedToasts.has(c)&&this.dismissedToasts.delete(c),d?this.toasts=this.toasts.map(m=>m.id===c?(this.publish({...m,...n,id:c,title:o}),{...m,...n,id:c,dismissible:f,title:o}):m):this.addToast({title:o,...l,dismissible:f,id:c}),c},this.dismiss=n=>(n?(this.dismissedToasts.add(n),requestAnimationFrame(()=>this.subscribers.forEach(s=>s({id:n,dismiss:!0})))):this.toasts.forEach(s=>{this.subscribers.forEach(o=>o({id:s.id,dismiss:!0}))}),n),this.message=(n,s)=>this.create({...s,message:n}),this.error=(n,s)=>this.create({...s,message:n,type:"error"}),this.success=(n,s)=>this.create({...s,type:"success",message:n}),this.info=(n,s)=>this.create({...s,type:"info",message:n}),this.warning=(n,s)=>this.create({...s,type:"warning",message:n}),this.loading=(n,s)=>this.create({...s,type:"loading",message:n}),this.promise=(n,s)=>{if(!s)return;let o;s.loading!==void 0&&(o=this.create({...s,promise:n,type:"loading",message:s.loading,description:typeof s.description!="function"?s.description:void 0}));const l=Promise.resolve(n instanceof Function?n():n);let c=o!==void 0,d;const f=l.then(async p=>{if(d=["resolve",p],me.isValidElement(p))c=!1,this.create({id:o,type:"default",message:p});else if(GE(p)&&!p.ok){c=!1;const g=typeof s.error=="function"?await s.error(`HTTP error! status: ${p.status}`):s.error,w=typeof s.description=="function"?await s.description(`HTTP error! status: ${p.status}`):s.description,N=typeof g=="object"&&!me.isValidElement(g)?g:{message:g};this.create({id:o,type:"error",description:w,...N})}else if(p instanceof Error){c=!1;const g=typeof s.error=="function"?await s.error(p):s.error,w=typeof s.description=="function"?await s.description(p):s.description,N=typeof g=="object"&&!me.isValidElement(g)?g:{message:g};this.create({id:o,type:"error",description:w,...N})}else if(s.success!==void 0){c=!1;const g=typeof s.success=="function"?await s.success(p):s.success,w=typeof s.description=="function"?await s.description(p):s.description,N=typeof g=="object"&&!me.isValidElement(g)?g:{message:g};this.create({id:o,type:"success",description:w,...N})}}).catch(async p=>{if(d=["reject",p],s.error!==void 0){c=!1;const x=typeof s.error=="function"?await s.error(p):s.error,g=typeof s.description=="function"?await s.description(p):s.description,b=typeof x=="object"&&!me.isValidElement(x)?x:{message:x};this.create({id:o,type:"error",description:g,...b})}}).finally(()=>{c&&(this.dismiss(o),o=void 0),s.finally==null||s.finally.call(s)}),m=()=>new Promise((p,x)=>f.then(()=>d[0]==="reject"?x(d[1]):p(d[1])).catch(x));return typeof o!="string"&&typeof o!="number"?{unwrap:m}:Object.assign(o,{unwrap:m})},this.custom=(n,s)=>{const o=(s==null?void 0:s.id)||gm++;return this.create({jsx:n(o),id:o,...s}),o},this.getActiveToasts=()=>this.toasts.filter(n=>!this.dismissedToasts.has(n.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const _n=new qE,YE=(e,n)=>{const s=(n==null?void 0:n.id)||gm++;return _n.addToast({title:e,...n,id:s}),s},GE=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",XE=YE,JE=()=>_n.toasts,ZE=()=>_n.getActiveToasts(),$e=Object.assign(XE,{success:_n.success,info:_n.info,warning:_n.warning,error:_n.error,custom:_n.custom,message:_n.message,promise:_n.promise,dismiss:_n.dismiss,loading:_n.loading},{getHistory:JE,getToasts:ZE});zE("[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}[data-sonner-toaster][data-lifted=true]{transform:translateY(-8px)}@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 Lc(e){return e.label!==void 0}const ek=3,tk="24px",nk="16px",ly=4e3,rk=356,sk=14,ok=45,ak=200;function Ir(...e){return e.filter(Boolean).join(" ")}function ik(e){const[n,s]=e.split("-"),o=[];return n&&o.push(n),s&&o.push(s),o}const lk=e=>{var n,s,o,l,c,d,f,m,p;const{invert:x,toast:g,unstyled:w,interacting:b,setHeights:N,visibleToasts:S,heights:C,index:k,toasts:P,expanded:E,removeToast:R,defaultRichColors:L,closeButton:B,style:T,cancelButtonStyle:I,actionButtonStyle:W,className:J="",descriptionClassName:Z="",duration:q,position:pe,gap:ue,expandByDefault:ge,classNames:G,icons:ie,closeButtonAriaLabel:F="Close toast"}=e,[se,ne]=me.useState(null),[D,M]=me.useState(null),[Y,te]=me.useState(!1),[ee,oe]=me.useState(!1),[X,he]=me.useState(!1),[ye,Ae]=me.useState(!1),[Ke,Me]=me.useState(!1),[ft,_t]=me.useState(0),[Vn,$t]=me.useState(0),Zt=me.useRef(g.duration||q||ly),Gr=me.useRef(null),At=me.useRef(null),Xr=k===0,Nr=k+1<=S,Ut=g.type,cr=g.dismissible!==!1,Wn=g.className||"",jr=g.descriptionClassName||"",Cr=me.useMemo(()=>C.findIndex(Be=>Be.toastId===g.id)||0,[C,g.id]),Jr=me.useMemo(()=>{var Be;return(Be=g.closeButton)!=null?Be:B},[g.closeButton,B]),en=me.useMemo(()=>g.duration||q||ly,[g.duration,q]),on=me.useRef(0),hn=me.useRef(0),Er=me.useRef(0),Kn=me.useRef(null),[ua,bn]=pe.split("-"),wo=me.useMemo(()=>C.reduce((Be,bt,kt)=>kt>=Cr?Be:Be+bt.height,0),[C,Cr]),Zr=QE(),ks=g.invert||x,es=Ut==="loading";hn.current=me.useMemo(()=>Cr*ue+wo,[Cr,wo]),me.useEffect(()=>{Zt.current=en},[en]),me.useEffect(()=>{te(!0)},[]),me.useEffect(()=>{const Be=At.current;if(Be){const bt=Be.getBoundingClientRect().height;return $t(bt),N(kt=>[{toastId:g.id,height:bt,position:g.position},...kt]),()=>N(kt=>kt.filter(Mt=>Mt.toastId!==g.id))}},[N,g.id]),me.useLayoutEffect(()=>{if(!Y)return;const Be=At.current,bt=Be.style.height;Be.style.height="auto";const kt=Be.getBoundingClientRect().height;Be.style.height=bt,$t(kt),N(Mt=>Mt.find(St=>St.toastId===g.id)?Mt.map(St=>St.toastId===g.id?{...St,height:kt}:St):[{toastId:g.id,height:kt,position:g.position},...Mt])},[Y,g.title,g.description,N,g.id]);const pn=me.useCallback(()=>{oe(!0),_t(hn.current),N(Be=>Be.filter(bt=>bt.toastId!==g.id)),setTimeout(()=>{R(g)},ak)},[g,R,N,hn]);me.useEffect(()=>{if(g.promise&&Ut==="loading"||g.duration===1/0||g.type==="loading")return;let Be;return E||b||Zr?(()=>{if(Er.current<on.current){const Mt=new Date().getTime()-on.current;Zt.current=Zt.current-Mt}Er.current=new Date().getTime()})():(()=>{Zt.current!==1/0&&(on.current=new Date().getTime(),Be=setTimeout(()=>{g.onAutoClose==null||g.onAutoClose.call(g,g),pn()},Zt.current))})(),()=>clearTimeout(Be)},[E,b,g,Ut,Zr,pn]),me.useEffect(()=>{g.delete&&pn()},[pn,g.delete]);function kr(){var Be;if(ie!=null&&ie.loading){var bt;return me.createElement("div",{className:Ir(G==null?void 0:G.loader,g==null||(bt=g.classNames)==null?void 0:bt.loader,"sonner-loader"),"data-visible":Ut==="loading"},ie.loading)}return me.createElement(UE,{className:Ir(G==null?void 0:G.loader,g==null||(Be=g.classNames)==null?void 0:Be.loader),visible:Ut==="loading"})}const ur=g.icon||(ie==null?void 0:ie[Ut])||FE(Ut);var Mn,bo;return me.createElement("li",{tabIndex:0,ref:At,className:Ir(J,Wn,G==null?void 0:G.toast,g==null||(n=g.classNames)==null?void 0:n.toast,G==null?void 0:G.default,G==null?void 0:G[Ut],g==null||(s=g.classNames)==null?void 0:s[Ut]),"data-sonner-toast":"","data-rich-colors":(Mn=g.richColors)!=null?Mn:L,"data-styled":!(g.jsx||g.unstyled||w),"data-mounted":Y,"data-promise":!!g.promise,"data-swiped":Ke,"data-removed":ee,"data-visible":Nr,"data-y-position":ua,"data-x-position":bn,"data-index":k,"data-front":Xr,"data-swiping":X,"data-dismissible":cr,"data-type":Ut,"data-invert":ks,"data-swipe-out":ye,"data-swipe-direction":D,"data-expanded":!!(E||ge&&Y),style:{"--index":k,"--toasts-before":k,"--z-index":P.length-k,"--offset":`${ee?ft:hn.current}px`,"--initial-height":ge?"auto":`${Vn}px`,...T,...g.style},onDragEnd:()=>{he(!1),ne(null),Kn.current=null},onPointerDown:Be=>{es||!cr||(Gr.current=new Date,_t(hn.current),Be.target.setPointerCapture(Be.pointerId),Be.target.tagName!=="BUTTON"&&(he(!0),Kn.current={x:Be.clientX,y:Be.clientY}))},onPointerUp:()=>{var Be,bt,kt;if(ye||!cr)return;Kn.current=null;const Mt=Number(((Be=At.current)==null?void 0:Be.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),In=Number(((bt=At.current)==null?void 0:bt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),St=new Date().getTime()-((kt=Gr.current)==null?void 0:kt.getTime()),Lt=se==="x"?Mt:In,Rr=Math.abs(Lt)/St;if(Math.abs(Lt)>=ok||Rr>.11){_t(hn.current),g.onDismiss==null||g.onDismiss.call(g,g),M(se==="x"?Mt>0?"right":"left":In>0?"down":"up"),pn(),Ae(!0);return}else{var A,$;(A=At.current)==null||A.style.setProperty("--swipe-amount-x","0px"),($=At.current)==null||$.style.setProperty("--swipe-amount-y","0px")}Me(!1),he(!1),ne(null)},onPointerMove:Be=>{var bt,kt,Mt;if(!Kn.current||!cr||((bt=window.getSelection())==null?void 0:bt.toString().length)>0)return;const St=Be.clientY-Kn.current.y,Lt=Be.clientX-Kn.current.x;var Rr;const A=(Rr=e.swipeDirections)!=null?Rr:ik(pe);!se&&(Math.abs(Lt)>1||Math.abs(St)>1)&&ne(Math.abs(Lt)>Math.abs(St)?"x":"y");let $={x:0,y:0};const K=re=>1/(1.5+Math.abs(re)/20);if(se==="y"){if(A.includes("top")||A.includes("bottom"))if(A.includes("top")&&St<0||A.includes("bottom")&&St>0)$.y=St;else{const re=St*K(St);$.y=Math.abs(re)<Math.abs(St)?re:St}}else if(se==="x"&&(A.includes("left")||A.includes("right")))if(A.includes("left")&&Lt<0||A.includes("right")&&Lt>0)$.x=Lt;else{const re=Lt*K(Lt);$.x=Math.abs(re)<Math.abs(Lt)?re:Lt}(Math.abs($.x)>0||Math.abs($.y)>0)&&Me(!0),(kt=At.current)==null||kt.style.setProperty("--swipe-amount-x",`${$.x}px`),(Mt=At.current)==null||Mt.style.setProperty("--swipe-amount-y",`${$.y}px`)}},Jr&&!g.jsx&&Ut!=="loading"?me.createElement("button",{"aria-label":F,"data-disabled":es,"data-close-button":!0,onClick:es||!cr?()=>{}:()=>{pn(),g.onDismiss==null||g.onDismiss.call(g,g)},className:Ir(G==null?void 0:G.closeButton,g==null||(o=g.classNames)==null?void 0:o.closeButton)},(bo=ie==null?void 0:ie.close)!=null?bo:KE):null,(Ut||g.icon||g.promise)&&g.icon!==null&&((ie==null?void 0:ie[Ut])!==null||g.icon)?me.createElement("div",{"data-icon":"",className:Ir(G==null?void 0:G.icon,g==null||(l=g.classNames)==null?void 0:l.icon)},g.promise||g.type==="loading"&&!g.icon?g.icon||kr():null,g.type!=="loading"?ur:null):null,me.createElement("div",{"data-content":"",className:Ir(G==null?void 0:G.content,g==null||(c=g.classNames)==null?void 0:c.content)},me.createElement("div",{"data-title":"",className:Ir(G==null?void 0:G.title,g==null||(d=g.classNames)==null?void 0:d.title)},g.jsx?g.jsx:typeof g.title=="function"?g.title():g.title),g.description?me.createElement("div",{"data-description":"",className:Ir(Z,jr,G==null?void 0:G.description,g==null||(f=g.classNames)==null?void 0:f.description)},typeof g.description=="function"?g.description():g.description):null),me.isValidElement(g.cancel)?g.cancel:g.cancel&&Lc(g.cancel)?me.createElement("button",{"data-button":!0,"data-cancel":!0,style:g.cancelButtonStyle||I,onClick:Be=>{Lc(g.cancel)&&cr&&(g.cancel.onClick==null||g.cancel.onClick.call(g.cancel,Be),pn())},className:Ir(G==null?void 0:G.cancelButton,g==null||(m=g.classNames)==null?void 0:m.cancelButton)},g.cancel.label):null,me.isValidElement(g.action)?g.action:g.action&&Lc(g.action)?me.createElement("button",{"data-button":!0,"data-action":!0,style:g.actionButtonStyle||W,onClick:Be=>{Lc(g.action)&&(g.action.onClick==null||g.action.onClick.call(g.action,Be),!Be.defaultPrevented&&pn())},className:Ir(G==null?void 0:G.actionButton,g==null||(p=g.classNames)==null?void 0:p.actionButton)},g.action.label):null)};function cy(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function ck(e,n){const s={};return[e,n].forEach((o,l)=>{const c=l===1,d=c?"--mobile-offset":"--offset",f=c?nk:tk;function m(p){["top","right","bottom","left"].forEach(x=>{s[`${d}-${x}`]=typeof p=="number"?`${p}px`:p})}typeof o=="number"||typeof o=="string"?m(o):typeof o=="object"?["top","right","bottom","left"].forEach(p=>{o[p]===void 0?s[`${d}-${p}`]=f:s[`${d}-${p}`]=typeof o[p]=="number"?`${o[p]}px`:o[p]}):m(f)}),s}const uk=me.forwardRef(function(n,s){const{invert:o,position:l="bottom-right",hotkey:c=["altKey","KeyT"],expand:d,closeButton:f,className:m,offset:p,mobileOffset:x,theme:g="light",richColors:w,duration:b,style:N,visibleToasts:S=ek,toastOptions:C,dir:k=cy(),gap:P=sk,icons:E,containerAriaLabel:R="Notifications"}=n,[L,B]=me.useState([]),T=me.useMemo(()=>Array.from(new Set([l].concat(L.filter(D=>D.position).map(D=>D.position)))),[L,l]),[I,W]=me.useState([]),[J,Z]=me.useState(!1),[q,pe]=me.useState(!1),[ue,ge]=me.useState(g!=="system"?g:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),G=me.useRef(null),ie=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),F=me.useRef(null),se=me.useRef(!1),ne=me.useCallback(D=>{B(M=>{var Y;return(Y=M.find(te=>te.id===D.id))!=null&&Y.delete||_n.dismiss(D.id),M.filter(({id:te})=>te!==D.id)})},[]);return me.useEffect(()=>_n.subscribe(D=>{if(D.dismiss){requestAnimationFrame(()=>{B(M=>M.map(Y=>Y.id===D.id?{...Y,delete:!0}:Y))});return}setTimeout(()=>{c0.flushSync(()=>{B(M=>{const Y=M.findIndex(te=>te.id===D.id);return Y!==-1?[...M.slice(0,Y),{...M[Y],...D},...M.slice(Y+1)]:[D,...M]})})})}),[L]),me.useEffect(()=>{if(g!=="system"){ge(g);return}if(g==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ge("dark"):ge("light")),typeof window>"u")return;const D=window.matchMedia("(prefers-color-scheme: dark)");try{D.addEventListener("change",({matches:M})=>{ge(M?"dark":"light")})}catch{D.addListener(({matches:Y})=>{try{ge(Y?"dark":"light")}catch(te){console.error(te)}})}},[g]),me.useEffect(()=>{L.length<=1&&Z(!1)},[L]),me.useEffect(()=>{const D=M=>{var Y;if(c.every(oe=>M[oe]||M.code===oe)){var ee;Z(!0),(ee=G.current)==null||ee.focus()}M.code==="Escape"&&(document.activeElement===G.current||(Y=G.current)!=null&&Y.contains(document.activeElement))&&Z(!1)};return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[c]),me.useEffect(()=>{if(G.current)return()=>{F.current&&(F.current.focus({preventScroll:!0}),F.current=null,se.current=!1)}},[G.current]),me.createElement("section",{ref:s,"aria-label":`${R} ${ie}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},T.map((D,M)=>{var Y;const[te,ee]=D.split("-");return L.length?me.createElement("ol",{key:D,dir:k==="auto"?cy():k,tabIndex:-1,ref:G,className:m,"data-sonner-toaster":!0,"data-sonner-theme":ue,"data-y-position":te,"data-lifted":J&&L.length>1&&!d,"data-x-position":ee,style:{"--front-toast-height":`${((Y=I[0])==null?void 0:Y.height)||0}px`,"--width":`${rk}px`,"--gap":`${P}px`,...N,...ck(p,x)},onBlur:oe=>{se.current&&!oe.currentTarget.contains(oe.relatedTarget)&&(se.current=!1,F.current&&(F.current.focus({preventScroll:!0}),F.current=null))},onFocus:oe=>{oe.target instanceof HTMLElement&&oe.target.dataset.dismissible==="false"||se.current||(se.current=!0,F.current=oe.relatedTarget)},onMouseEnter:()=>Z(!0),onMouseMove:()=>Z(!0),onMouseLeave:()=>{q||Z(!1)},onDragEnd:()=>Z(!1),onPointerDown:oe=>{oe.target instanceof HTMLElement&&oe.target.dataset.dismissible==="false"||pe(!0)},onPointerUp:()=>pe(!1)},L.filter(oe=>!oe.position&&M===0||oe.position===D).map((oe,X)=>{var he,ye;return me.createElement(lk,{key:oe.id,icons:E,index:X,toast:oe,defaultRichColors:w,duration:(he=C==null?void 0:C.duration)!=null?he:b,className:C==null?void 0:C.className,descriptionClassName:C==null?void 0:C.descriptionClassName,invert:o,visibleToasts:S,closeButton:(ye=C==null?void 0:C.closeButton)!=null?ye:f,interacting:q,position:D,style:C==null?void 0:C.style,unstyled:C==null?void 0:C.unstyled,classNames:C==null?void 0:C.classNames,cancelButtonStyle:C==null?void 0:C.cancelButtonStyle,actionButtonStyle:C==null?void 0:C.actionButtonStyle,closeButtonAriaLabel:C==null?void 0:C.closeButtonAriaLabel,removeToast:ne,toasts:L.filter(Ae=>Ae.position==oe.position),heights:I.filter(Ae=>Ae.position==oe.position),setHeights:W,expandByDefault:d,gap:P,expanded:J,swipeDirections:n.swipeDirections})})):null}))}),dk=({...e})=>{const{theme:n="system"}=Gm();return i.jsx(uk,{theme:n,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...e})},u0=v.createContext(null);function js(){const e=v.useContext(u0);if(!e)throw new Error("useAuth must be used within AuthProvider");return e}const nh="context-vault-auth";function ru(){return localStorage.getItem(nh)}function uy(e){localStorage.setItem(nh,e)}function vm(){localStorage.removeItem(nh)}const fk="/api";try{localStorage.removeItem("cv_local_port_persist"),sessionStorage.removeItem("cv_local_port")}catch{}function mk(){try{return localStorage.getItem("cv_encryption_secret")}catch{return null}}function d0(e){localStorage.setItem("cv_encryption_secret",e)}function hk(){localStorage.removeItem("cv_encryption_secret")}class di extends Error{constructor(s,o,l){super(o);wf(this,"status");wf(this,"code");this.name="ApiError",this.status=s,this.code=l}}async function zc(e,n={}){const s=ru(),o={...n.headers||{}};n.body&&(o["Content-Type"]="application/json"),s&&(o.Authorization=`Bearer ${s}`);const l=mk();l&&(o["X-Vault-Secret"]=l);const c=await fetch(`${fk}${e}`,{...n,headers:o});if(!c.ok){let d=c.statusText,f;try{const m=await c.json();m.error&&(d=m.error),m.code&&(f=m.code)}catch{}throw c.status===401&&s&&ru()===s&&vm(),new di(c.status,d,f)}if(c.status!==204)return c.json()}const vt={get(e){return zc(e)},post(e,n){return zc(e,{method:"POST",body:n!==void 0?JSON.stringify(n):void 0})},put(e,n){return zc(e,{method:"PUT",body:n!==void 0?JSON.stringify(n):void 0})},del(e){return zc(e,{method:"DELETE"})}};function pk(e){return{id:e.id,name:e.name,role:e.role,tier:e.tier,createdAt:new Date(e.createdAt)}}function gk(e){return{userId:e.userId,email:e.email,name:e.name,role:e.role,joinedAt:new Date(e.joinedAt)}}function vk(e){return{id:e.id,email:e.email,status:e.status,expiresAt:new Date(e.expiresAt),createdAt:new Date(e.createdAt)}}function f0(e){return{id:e.id,category:e.category,kind:e.kind,title:e.title||"",body:e.body||"",tags:e.tags||[],source:e.source||void 0,created:new Date(e.created_at),updated:new Date(e.created_at),metadata:e.meta&&Object.keys(e.meta).length>0?e.meta:void 0}}function m0(e){return{...f0(e),score:e.score}}function yk(e){return{id:e.id,name:e.name,prefix:e.key_prefix,createdAt:new Date(e.created_at),lastUsedAt:e.last_used?new Date(e.last_used):void 0,expiresAt:e.expires_at?new Date(e.expires_at):void 0}}function xk(e,n){const s=o=>o==="unlimited"?1/0:o;return{entries:{used:e.usage.entriesUsed,limit:s(e.limits.maxEntries)},storage:{usedMb:e.usage.storageMb,limitMb:e.limits.storageMb},requestsToday:{used:e.usage.requestsToday,limit:s(e.limits.requestsPerDay)},apiKeys:{active:n,limit:1/0}}}function dy(e){return{id:e.userId,email:e.email,name:e.name||void 0,tier:e.tier,createdAt:new Date(e.createdAt)}}function wk({children:e}){const n=ar(),[s,o]=v.useState(ru),[l,c]=v.useState(null),[d,f]=v.useState(!0);v.useEffect(()=>{const w=ru();if(!w){f(!1);return}vt.get("/me").then(b=>{c(dy(b)),o(w)}).catch(b=>{!(b instanceof di)||b.status}).finally(()=>f(!1))},[]);const m=v.useCallback(async w=>{uy(w),o(w);try{const b=await vt.get("/me");c(dy(b))}catch(b){throw vm(),o(null),c(null),b}},[]),p=v.useCallback(async(w,b)=>{const N=await vt.post("/register",{email:w,name:b});return uy(N.apiKey.key),o(N.apiKey.key),N.encryptionSecret&&d0(N.encryptionSecret),c({id:N.userId,email:N.email,tier:N.tier,name:b||void 0,createdAt:new Date}),{apiKey:N.apiKey.key}},[]),x=v.useCallback(()=>{vm(),hk(),n.clear(),o(null),c(null)},[n]),g=v.useMemo(()=>({user:l,token:s,isAuthenticated:!!s&&!!l,isLoading:d,loginWithApiKey:m,register:p,logout:x}),[l,s,d,m,p,x]);return i.jsx(u0.Provider,{value:g,children:e})}/**
|
|
53
|
+
* @license lucide-react v0.487.0 - ISC
|
|
54
|
+
*
|
|
55
|
+
* This source code is licensed under the ISC license.
|
|
56
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
57
|
+
*/const bk=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Sk=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,s,o)=>o?o.toUpperCase():s.toLowerCase()),fy=e=>{const n=Sk(e);return n.charAt(0).toUpperCase()+n.slice(1)},h0=(...e)=>e.filter((n,s,o)=>!!n&&n.trim()!==""&&o.indexOf(n)===s).join(" ").trim();/**
|
|
58
|
+
* @license lucide-react v0.487.0 - ISC
|
|
59
|
+
*
|
|
60
|
+
* This source code is licensed under the ISC license.
|
|
61
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
62
|
+
*/var Nk={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"};/**
|
|
63
|
+
* @license lucide-react v0.487.0 - ISC
|
|
64
|
+
*
|
|
65
|
+
* This source code is licensed under the ISC license.
|
|
66
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
67
|
+
*/const jk=v.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:s=2,absoluteStrokeWidth:o,className:l="",children:c,iconNode:d,...f},m)=>v.createElement("svg",{ref:m,...Nk,width:n,height:n,stroke:e,strokeWidth:o?Number(s)*24/Number(n):s,className:h0("lucide",l),...f},[...d.map(([p,x])=>v.createElement(p,x)),...Array.isArray(c)?c:[c]]));/**
|
|
68
|
+
* @license lucide-react v0.487.0 - ISC
|
|
69
|
+
*
|
|
70
|
+
* This source code is licensed under the ISC license.
|
|
71
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
+
*/const Qe=(e,n)=>{const s=v.forwardRef(({className:o,...l},c)=>v.createElement(jk,{ref:c,iconNode:n,className:h0(`lucide-${bk(fy(e))}`,`lucide-${e}`,o),...l}));return s.displayName=fy(e),s};/**
|
|
73
|
+
* @license lucide-react v0.487.0 - ISC
|
|
74
|
+
*
|
|
75
|
+
* This source code is licensed under the ISC license.
|
|
76
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
77
|
+
*/const Ck=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],p0=Qe("arrow-left",Ck);/**
|
|
78
|
+
* @license lucide-react v0.487.0 - ISC
|
|
79
|
+
*
|
|
80
|
+
* This source code is licensed under the ISC license.
|
|
81
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
82
|
+
*/const Ek=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],fl=Qe("calendar",Ek);/**
|
|
83
|
+
* @license lucide-react v0.487.0 - ISC
|
|
84
|
+
*
|
|
85
|
+
* This source code is licensed under the ISC license.
|
|
86
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
87
|
+
*/const kk=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Hr=Qe("check",kk);/**
|
|
88
|
+
* @license lucide-react v0.487.0 - ISC
|
|
89
|
+
*
|
|
90
|
+
* This source code is licensed under the ISC license.
|
|
91
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
+
*/const Rk=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],oi=Qe("chevron-down",Rk);/**
|
|
93
|
+
* @license lucide-react v0.487.0 - ISC
|
|
94
|
+
*
|
|
95
|
+
* This source code is licensed under the ISC license.
|
|
96
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
+
*/const Pk=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],rh=Qe("chevron-left",Pk);/**
|
|
98
|
+
* @license lucide-react v0.487.0 - ISC
|
|
99
|
+
*
|
|
100
|
+
* This source code is licensed under the ISC license.
|
|
101
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
102
|
+
*/const Tk=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],sh=Qe("chevron-right",Tk);/**
|
|
103
|
+
* @license lucide-react v0.487.0 - ISC
|
|
104
|
+
*
|
|
105
|
+
* This source code is licensed under the ISC license.
|
|
106
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
+
*/const _k=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],oh=Qe("chevron-up",_k);/**
|
|
108
|
+
* @license lucide-react v0.487.0 - ISC
|
|
109
|
+
*
|
|
110
|
+
* This source code is licensed under the ISC license.
|
|
111
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
+
*/const Ak=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Mk=Qe("circle-check-big",Ak);/**
|
|
113
|
+
* @license lucide-react v0.487.0 - ISC
|
|
114
|
+
*
|
|
115
|
+
* This source code is licensed under the ISC license.
|
|
116
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
117
|
+
*/const Ik=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],my=Qe("circle-check",Ik);/**
|
|
118
|
+
* @license lucide-react v0.487.0 - ISC
|
|
119
|
+
*
|
|
120
|
+
* This source code is licensed under the ISC license.
|
|
121
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
122
|
+
*/const Dk=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Ok=Qe("circle-x",Dk);/**
|
|
123
|
+
* @license lucide-react v0.487.0 - ISC
|
|
124
|
+
*
|
|
125
|
+
* This source code is licensed under the ISC license.
|
|
126
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
127
|
+
*/const Lk=[["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"}]],ws=Qe("copy",Lk);/**
|
|
128
|
+
* @license lucide-react v0.487.0 - ISC
|
|
129
|
+
*
|
|
130
|
+
* This source code is licensed under the ISC license.
|
|
131
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
132
|
+
*/const zk=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],g0=Qe("credit-card",zk);/**
|
|
133
|
+
* @license lucide-react v0.487.0 - ISC
|
|
134
|
+
*
|
|
135
|
+
* This source code is licensed under the ISC license.
|
|
136
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
137
|
+
*/const Fk=[["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"}]],v0=Qe("database",Fk);/**
|
|
138
|
+
* @license lucide-react v0.487.0 - ISC
|
|
139
|
+
*
|
|
140
|
+
* This source code is licensed under the ISC license.
|
|
141
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
142
|
+
*/const $k=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],hy=Qe("download",$k);/**
|
|
143
|
+
* @license lucide-react v0.487.0 - ISC
|
|
144
|
+
*
|
|
145
|
+
* This source code is licensed under the ISC license.
|
|
146
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
147
|
+
*/const Uk=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],ah=Qe("external-link",Uk);/**
|
|
148
|
+
* @license lucide-react v0.487.0 - ISC
|
|
149
|
+
*
|
|
150
|
+
* This source code is licensed under the ISC license.
|
|
151
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
152
|
+
*/const Bk=[["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}]],Hk=Qe("file-question",Bk);/**
|
|
153
|
+
* @license lucide-react v0.487.0 - ISC
|
|
154
|
+
*
|
|
155
|
+
* This source code is licensed under the ISC license.
|
|
156
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
157
|
+
*/const Vk=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],fo=Qe("file-text",Vk);/**
|
|
158
|
+
* @license lucide-react v0.487.0 - ISC
|
|
159
|
+
*
|
|
160
|
+
* This source code is licensed under the ISC license.
|
|
161
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
162
|
+
*/const Wk=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],Kk=Qe("folder-open",Wk);/**
|
|
163
|
+
* @license lucide-react v0.487.0 - ISC
|
|
164
|
+
*
|
|
165
|
+
* This source code is licensed under the ISC license.
|
|
166
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
167
|
+
*/const Qk=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],ih=Qe("funnel",Qk);/**
|
|
168
|
+
* @license lucide-react v0.487.0 - ISC
|
|
169
|
+
*
|
|
170
|
+
* This source code is licensed under the ISC license.
|
|
171
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
172
|
+
*/const qk=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],y0=Qe("hard-drive",qk);/**
|
|
173
|
+
* @license lucide-react v0.487.0 - ISC
|
|
174
|
+
*
|
|
175
|
+
* This source code is licensed under the ISC license.
|
|
176
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
177
|
+
*/const Yk=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],Gk=Qe("hash",Yk);/**
|
|
178
|
+
* @license lucide-react v0.487.0 - ISC
|
|
179
|
+
*
|
|
180
|
+
* This source code is licensed under the ISC license.
|
|
181
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
182
|
+
*/const Xk=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]],x0=Qe("house",Xk);/**
|
|
183
|
+
* @license lucide-react v0.487.0 - ISC
|
|
184
|
+
*
|
|
185
|
+
* This source code is licensed under the ISC license.
|
|
186
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
187
|
+
*/const Jk=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],Cl=Qe("key",Jk);/**
|
|
188
|
+
* @license lucide-react v0.487.0 - ISC
|
|
189
|
+
*
|
|
190
|
+
* This source code is licensed under the ISC license.
|
|
191
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
192
|
+
*/const Zk=[["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"}]],w0=Qe("link-2",Zk);/**
|
|
193
|
+
* @license lucide-react v0.487.0 - ISC
|
|
194
|
+
*
|
|
195
|
+
* This source code is licensed under the ISC license.
|
|
196
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
197
|
+
*/const e2=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Kt=Qe("loader-circle",e2);/**
|
|
198
|
+
* @license lucide-react v0.487.0 - ISC
|
|
199
|
+
*
|
|
200
|
+
* This source code is licensed under the ISC license.
|
|
201
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
202
|
+
*/const t2=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],n2=Qe("log-out",t2);/**
|
|
203
|
+
* @license lucide-react v0.487.0 - ISC
|
|
204
|
+
*
|
|
205
|
+
* This source code is licensed under the ISC license.
|
|
206
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
207
|
+
*/const r2=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],s2=Qe("moon",r2);/**
|
|
208
|
+
* @license lucide-react v0.487.0 - ISC
|
|
209
|
+
*
|
|
210
|
+
* This source code is licensed under the ISC license.
|
|
211
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
212
|
+
*/const o2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],la=Qe("plus",o2);/**
|
|
213
|
+
* @license lucide-react v0.487.0 - ISC
|
|
214
|
+
*
|
|
215
|
+
* This source code is licensed under the ISC license.
|
|
216
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
217
|
+
*/const a2=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Kr=Qe("search",a2);/**
|
|
218
|
+
* @license lucide-react v0.487.0 - ISC
|
|
219
|
+
*
|
|
220
|
+
* This source code is licensed under the ISC license.
|
|
221
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
222
|
+
*/const i2=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],l2=Qe("square-pen",i2);/**
|
|
223
|
+
* @license lucide-react v0.487.0 - ISC
|
|
224
|
+
*
|
|
225
|
+
* This source code is licensed under the ISC license.
|
|
226
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
227
|
+
*/const c2=[["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"}]],u2=Qe("sun",c2);/**
|
|
228
|
+
* @license lucide-react v0.487.0 - ISC
|
|
229
|
+
*
|
|
230
|
+
* This source code is licensed under the ISC license.
|
|
231
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
232
|
+
*/const d2=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],py=Qe("tag",d2);/**
|
|
233
|
+
* @license lucide-react v0.487.0 - ISC
|
|
234
|
+
*
|
|
235
|
+
* This source code is licensed under the ISC license.
|
|
236
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
237
|
+
*/const f2=[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]],m2=Qe("terminal",f2);/**
|
|
238
|
+
* @license lucide-react v0.487.0 - ISC
|
|
239
|
+
*
|
|
240
|
+
* This source code is licensed under the ISC license.
|
|
241
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
242
|
+
*/const h2=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],yu=Qe("trash-2",h2);/**
|
|
243
|
+
* @license lucide-react v0.487.0 - ISC
|
|
244
|
+
*
|
|
245
|
+
* This source code is licensed under the ISC license.
|
|
246
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
247
|
+
*/const p2=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],g2=Qe("triangle-alert",p2);/**
|
|
248
|
+
* @license lucide-react v0.487.0 - ISC
|
|
249
|
+
*
|
|
250
|
+
* This source code is licensed under the ISC license.
|
|
251
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
252
|
+
*/const v2=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]],ml=Qe("upload",v2);/**
|
|
253
|
+
* @license lucide-react v0.487.0 - ISC
|
|
254
|
+
*
|
|
255
|
+
* This source code is licensed under the ISC license.
|
|
256
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
257
|
+
*/const y2=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],x2=Qe("user-plus",y2);/**
|
|
258
|
+
* @license lucide-react v0.487.0 - ISC
|
|
259
|
+
*
|
|
260
|
+
* This source code is licensed under the ISC license.
|
|
261
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
262
|
+
*/const w2=[["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"}]],lh=Qe("user",w2);/**
|
|
263
|
+
* @license lucide-react v0.487.0 - ISC
|
|
264
|
+
*
|
|
265
|
+
* This source code is licensed under the ISC license.
|
|
266
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
267
|
+
*/const b2=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]],El=Qe("users",b2);/**
|
|
268
|
+
* @license lucide-react v0.487.0 - ISC
|
|
269
|
+
*
|
|
270
|
+
* This source code is licensed under the ISC license.
|
|
271
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
272
|
+
*/const S2=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],xu=Qe("x",S2);/**
|
|
273
|
+
* @license lucide-react v0.487.0 - ISC
|
|
274
|
+
*
|
|
275
|
+
* This source code is licensed under the ISC license.
|
|
276
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
277
|
+
*/const N2=[["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"}]],gy=Qe("zap",N2);function vy(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function Jo(...e){return n=>{let s=!1;const o=e.map(l=>{const c=vy(l,n);return!s&&typeof c=="function"&&(s=!0),c});if(s)return()=>{for(let l=0;l<o.length;l++){const c=o[l];typeof c=="function"?c():vy(e[l],null)}}}}function rt(...e){return v.useCallback(Jo(...e),e)}var mo=v.forwardRef((e,n)=>{const{children:s,...o}=e,l=v.Children.toArray(s),c=l.find(j2);if(c){const d=c.props.children,f=l.map(m=>m===c?v.Children.count(d)>1?v.Children.only(null):v.isValidElement(d)?d.props.children:null:m);return i.jsx(ym,{...o,ref:n,children:v.isValidElement(d)?v.cloneElement(d,void 0,f):null})}return i.jsx(ym,{...o,ref:n,children:s})});mo.displayName="Slot";var ym=v.forwardRef((e,n)=>{const{children:s,...o}=e;if(v.isValidElement(s)){const l=E2(s),c=C2(o,s.props);return s.type!==v.Fragment&&(c.ref=n?Jo(n,l):l),v.cloneElement(s,c)}return v.Children.count(s)>1?v.Children.only(null):null});ym.displayName="SlotClone";var b0=({children:e})=>i.jsx(i.Fragment,{children:e});function j2(e){return v.isValidElement(e)&&e.type===b0}function C2(e,n){const s={...n};for(const o in n){const l=e[o],c=n[o];/^on[A-Z]/.test(o)?l&&c?s[o]=(...f)=>{c(...f),l(...f)}:l&&(s[o]=l):o==="style"?s[o]={...l,...c}:o==="className"&&(s[o]=[l,c].filter(Boolean).join(" "))}return{...e,...s}}function E2(e){var o,l;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,s=n&&"isReactWarning"in n&&n.isReactWarning;return s?e.ref:(n=(l=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:l.get,s=n&&"isReactWarning"in n&&n.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}function S0(e){var n,s,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(n=0;n<l;n++)e[n]&&(s=S0(e[n]))&&(o&&(o+=" "),o+=s)}else for(s in e)e[s]&&(o&&(o+=" "),o+=s);return o}function N0(){for(var e,n,s=0,o="",l=arguments.length;s<l;s++)(e=arguments[s])&&(n=S0(e))&&(o&&(o+=" "),o+=n);return o}const yy=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,xy=N0,j0=(e,n)=>s=>{var o;if((n==null?void 0:n.variants)==null)return xy(e,s==null?void 0:s.class,s==null?void 0:s.className);const{variants:l,defaultVariants:c}=n,d=Object.keys(l).map(p=>{const x=s==null?void 0:s[p],g=c==null?void 0:c[p];if(x===null)return null;const w=yy(x)||yy(g);return l[p][w]}),f=s&&Object.entries(s).reduce((p,x)=>{let[g,w]=x;return w===void 0||(p[g]=w),p},{}),m=n==null||(o=n.compoundVariants)===null||o===void 0?void 0:o.reduce((p,x)=>{let{class:g,className:w,...b}=x;return Object.entries(b).every(N=>{let[S,C]=N;return Array.isArray(C)?C.includes({...c,...f}[S]):{...c,...f}[S]===C})?[...p,g,w]:p},[]);return xy(e,d,m,s==null?void 0:s.class,s==null?void 0:s.className)},ch="-",k2=e=>{const n=P2(e),{conflictingClassGroups:s,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:d=>{const f=d.split(ch);return f[0]===""&&f.length!==1&&f.shift(),C0(f,n)||R2(d)},getConflictingClassGroupIds:(d,f)=>{const m=s[d]||[];return f&&o[d]?[...m,...o[d]]:m}}},C0=(e,n)=>{var d;if(e.length===0)return n.classGroupId;const s=e[0],o=n.nextPart.get(s),l=o?C0(e.slice(1),o):void 0;if(l)return l;if(n.validators.length===0)return;const c=e.join(ch);return(d=n.validators.find(({validator:f})=>f(c)))==null?void 0:d.classGroupId},wy=/^\[(.+)\]$/,R2=e=>{if(wy.test(e)){const n=wy.exec(e)[1],s=n==null?void 0:n.substring(0,n.indexOf(":"));if(s)return"arbitrary.."+s}},P2=e=>{const{theme:n,classGroups:s}=e,o={nextPart:new Map,validators:[]};for(const l in s)xm(s[l],o,l,n);return o},xm=(e,n,s,o)=>{e.forEach(l=>{if(typeof l=="string"){const c=l===""?n:by(n,l);c.classGroupId=s;return}if(typeof l=="function"){if(T2(l)){xm(l(o),n,s,o);return}n.validators.push({validator:l,classGroupId:s});return}Object.entries(l).forEach(([c,d])=>{xm(d,by(n,c),s,o)})})},by=(e,n)=>{let s=e;return n.split(ch).forEach(o=>{s.nextPart.has(o)||s.nextPart.set(o,{nextPart:new Map,validators:[]}),s=s.nextPart.get(o)}),s},T2=e=>e.isThemeGetter,_2=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,s=new Map,o=new Map;const l=(c,d)=>{s.set(c,d),n++,n>e&&(n=0,o=s,s=new Map)};return{get(c){let d=s.get(c);if(d!==void 0)return d;if((d=o.get(c))!==void 0)return l(c,d),d},set(c,d){s.has(c)?s.set(c,d):l(c,d)}}},wm="!",bm=":",A2=bm.length,M2=e=>{const{prefix:n,experimentalParseClassName:s}=e;let o=l=>{const c=[];let d=0,f=0,m=0,p;for(let N=0;N<l.length;N++){let S=l[N];if(d===0&&f===0){if(S===bm){c.push(l.slice(m,N)),m=N+A2;continue}if(S==="/"){p=N;continue}}S==="["?d++:S==="]"?d--:S==="("?f++:S===")"&&f--}const x=c.length===0?l:l.substring(m),g=I2(x),w=g!==x,b=p&&p>m?p-m:void 0;return{modifiers:c,hasImportantModifier:w,baseClassName:g,maybePostfixModifierPosition:b}};if(n){const l=n+bm,c=o;o=d=>d.startsWith(l)?c(d.substring(l.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:d,maybePostfixModifierPosition:void 0}}if(s){const l=o;o=c=>s({className:c,parseClassName:l})}return o},I2=e=>e.endsWith(wm)?e.substring(0,e.length-1):e.startsWith(wm)?e.substring(1):e,D2=e=>{const n=Object.fromEntries(e.orderSensitiveModifiers.map(o=>[o,!0]));return o=>{if(o.length<=1)return o;const l=[];let c=[];return o.forEach(d=>{d[0]==="["||n[d]?(l.push(...c.sort(),d),c=[]):c.push(d)}),l.push(...c.sort()),l}},O2=e=>({cache:_2(e.cacheSize),parseClassName:M2(e),sortModifiers:D2(e),...k2(e)}),L2=/\s+/,z2=(e,n)=>{const{parseClassName:s,getClassGroupId:o,getConflictingClassGroupIds:l,sortModifiers:c}=n,d=[],f=e.trim().split(L2);let m="";for(let p=f.length-1;p>=0;p-=1){const x=f[p],{isExternal:g,modifiers:w,hasImportantModifier:b,baseClassName:N,maybePostfixModifierPosition:S}=s(x);if(g){m=x+(m.length>0?" "+m:m);continue}let C=!!S,k=o(C?N.substring(0,S):N);if(!k){if(!C){m=x+(m.length>0?" "+m:m);continue}if(k=o(N),!k){m=x+(m.length>0?" "+m:m);continue}C=!1}const P=c(w).join(":"),E=b?P+wm:P,R=E+k;if(d.includes(R))continue;d.push(R);const L=l(k,C);for(let B=0;B<L.length;++B){const T=L[B];d.push(E+T)}m=x+(m.length>0?" "+m:m)}return m};function F2(){let e=0,n,s,o="";for(;e<arguments.length;)(n=arguments[e++])&&(s=E0(n))&&(o&&(o+=" "),o+=s);return o}const E0=e=>{if(typeof e=="string")return e;let n,s="";for(let o=0;o<e.length;o++)e[o]&&(n=E0(e[o]))&&(s&&(s+=" "),s+=n);return s};function $2(e,...n){let s,o,l,c=d;function d(m){const p=n.reduce((x,g)=>g(x),e());return s=O2(p),o=s.cache.get,l=s.cache.set,c=f,f(m)}function f(m){const p=o(m);if(p)return p;const x=z2(m,s);return l(m,x),x}return function(){return c(F2.apply(null,arguments))}}const Vt=e=>{const n=s=>s[e]||[];return n.isThemeGetter=!0,n},k0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,R0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,U2=/^\d+\/\d+$/,B2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,H2=/\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$/,V2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,W2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,K2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ma=e=>U2.test(e),Ye=e=>!!e&&!Number.isNaN(Number(e)),Ys=e=>!!e&&Number.isInteger(Number(e)),If=e=>e.endsWith("%")&&Ye(e.slice(0,-1)),fs=e=>B2.test(e),Q2=()=>!0,q2=e=>H2.test(e)&&!V2.test(e),P0=()=>!1,Y2=e=>W2.test(e),G2=e=>K2.test(e),X2=e=>!je(e)&&!Ce(e),J2=e=>fi(e,A0,P0),je=e=>k0.test(e),zo=e=>fi(e,M0,q2),Df=e=>fi(e,rR,Ye),Sy=e=>fi(e,T0,P0),Z2=e=>fi(e,_0,G2),Fc=e=>fi(e,I0,Y2),Ce=e=>R0.test(e),Zi=e=>mi(e,M0),eR=e=>mi(e,sR),Ny=e=>mi(e,T0),tR=e=>mi(e,A0),nR=e=>mi(e,_0),$c=e=>mi(e,I0,!0),fi=(e,n,s)=>{const o=k0.exec(e);return o?o[1]?n(o[1]):s(o[2]):!1},mi=(e,n,s=!1)=>{const o=R0.exec(e);return o?o[1]?n(o[1]):s:!1},T0=e=>e==="position"||e==="percentage",_0=e=>e==="image"||e==="url",A0=e=>e==="length"||e==="size"||e==="bg-size",M0=e=>e==="length",rR=e=>e==="number",sR=e=>e==="family-name",I0=e=>e==="shadow",oR=()=>{const e=Vt("color"),n=Vt("font"),s=Vt("text"),o=Vt("font-weight"),l=Vt("tracking"),c=Vt("leading"),d=Vt("breakpoint"),f=Vt("container"),m=Vt("spacing"),p=Vt("radius"),x=Vt("shadow"),g=Vt("inset-shadow"),w=Vt("text-shadow"),b=Vt("drop-shadow"),N=Vt("blur"),S=Vt("perspective"),C=Vt("aspect"),k=Vt("ease"),P=Vt("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],L=()=>[...R(),Ce,je],B=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],I=()=>[Ce,je,m],W=()=>[Ma,"full","auto",...I()],J=()=>[Ys,"none","subgrid",Ce,je],Z=()=>["auto",{span:["full",Ys,Ce,je]},Ys,Ce,je],q=()=>[Ys,"auto",Ce,je],pe=()=>["auto","min","max","fr",Ce,je],ue=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ge=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...I()],ie=()=>[Ma,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],F=()=>[e,Ce,je],se=()=>[...R(),Ny,Sy,{position:[Ce,je]}],ne=()=>["no-repeat",{repeat:["","x","y","space","round"]}],D=()=>["auto","cover","contain",tR,J2,{size:[Ce,je]}],M=()=>[If,Zi,zo],Y=()=>["","none","full",p,Ce,je],te=()=>["",Ye,Zi,zo],ee=()=>["solid","dashed","dotted","double"],oe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>[Ye,If,Ny,Sy],he=()=>["","none",N,Ce,je],ye=()=>["none",Ye,Ce,je],Ae=()=>["none",Ye,Ce,je],Ke=()=>[Ye,Ce,je],Me=()=>[Ma,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[fs],breakpoint:[fs],color:[Q2],container:[fs],"drop-shadow":[fs],ease:["in","out","in-out"],font:[X2],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[fs],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[fs],shadow:[fs],spacing:["px",Ye],text:[fs],"text-shadow":[fs],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ma,je,Ce,C]}],container:["container"],columns:[{columns:[Ye,je,Ce,f]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"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:L()}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:W()}],"inset-x":[{"inset-x":W()}],"inset-y":[{"inset-y":W()}],start:[{start:W()}],end:[{end:W()}],top:[{top:W()}],right:[{right:W()}],bottom:[{bottom:W()}],left:[{left:W()}],visibility:["visible","invisible","collapse"],z:[{z:[Ys,"auto",Ce,je]}],basis:[{basis:[Ma,"full","auto",f,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ye,Ma,"auto","initial","none",je]}],grow:[{grow:["",Ye,Ce,je]}],shrink:[{shrink:["",Ye,Ce,je]}],order:[{order:[Ys,"first","last","none",Ce,je]}],"grid-cols":[{"grid-cols":J()}],"col-start-end":[{col:Z()}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":J()}],"row-start-end":[{row:Z()}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":pe()}],"auto-rows":[{"auto-rows":pe()}],gap:[{gap:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[...ue(),"normal"]}],"justify-items":[{"justify-items":[...ge(),"normal"]}],"justify-self":[{"justify-self":["auto",...ge()]}],"align-content":[{content:["normal",...ue()]}],"align-items":[{items:[...ge(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ge(),{baseline:["","last"]}]}],"place-content":[{"place-content":ue()}],"place-items":[{"place-items":[...ge(),"baseline"]}],"place-self":[{"place-self":["auto",...ge()]}],p:[{p:I()}],px:[{px:I()}],py:[{py:I()}],ps:[{ps:I()}],pe:[{pe:I()}],pt:[{pt:I()}],pr:[{pr:I()}],pb:[{pb:I()}],pl:[{pl:I()}],m:[{m:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:ie()}],w:[{w:[f,"screen",...ie()]}],"min-w":[{"min-w":[f,"screen","none",...ie()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[d]},...ie()]}],h:[{h:["screen",...ie()]}],"min-h":[{"min-h":["screen","none",...ie()]}],"max-h":[{"max-h":["screen",...ie()]}],"font-size":[{text:["base",s,Zi,zo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,Ce,Df]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",If,je]}],"font-family":[{font:[eR,je,n]}],"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:[l,Ce,je]}],"line-clamp":[{"line-clamp":[Ye,"none",Ce,Df]}],leading:[{leading:[c,...I()]}],"list-image":[{"list-image":["none",Ce,je]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ce,je]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ye,"from-font","auto",Ce,zo]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[Ye,"auto",Ce,je]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ce,je]}],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,je]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:se()}],"bg-repeat":[{bg:ne()}],"bg-size":[{bg:D()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ys,Ce,je],radial:["",Ce,je],conic:[Ys,Ce,je]},nR,Z2]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:M()}],"gradient-via-pos":[{via:M()}],"gradient-to-pos":[{to:M()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"border-w":[{border:te()}],"border-w-x":[{"border-x":te()}],"border-w-y":[{"border-y":te()}],"border-w-s":[{"border-s":te()}],"border-w-e":[{"border-e":te()}],"border-w-t":[{"border-t":te()}],"border-w-r":[{"border-r":te()}],"border-w-b":[{"border-b":te()}],"border-w-l":[{"border-l":te()}],"divide-x":[{"divide-x":te()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":te()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ye,Ce,je]}],"outline-w":[{outline:["",Ye,Zi,zo]}],"outline-color":[{outline:F()}],shadow:[{shadow:["","none",x,$c,Fc]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":["none",g,$c,Fc]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:te()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[Ye,zo]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":te()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":["none",w,$c,Fc]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[Ye,Ce,je]}],"mix-blend":[{"mix-blend":[...oe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":oe()}],"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":[Ye]}],"mask-image-linear-from-pos":[{"mask-linear-from":X()}],"mask-image-linear-to-pos":[{"mask-linear-to":X()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":X()}],"mask-image-t-to-pos":[{"mask-t-to":X()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":X()}],"mask-image-r-to-pos":[{"mask-r-to":X()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":X()}],"mask-image-b-to-pos":[{"mask-b-to":X()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":X()}],"mask-image-l-to-pos":[{"mask-l-to":X()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":X()}],"mask-image-x-to-pos":[{"mask-x-to":X()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":X()}],"mask-image-y-to-pos":[{"mask-y-to":X()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[Ce,je]}],"mask-image-radial-from-pos":[{"mask-radial-from":X()}],"mask-image-radial-to-pos":[{"mask-radial-to":X()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"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":R()}],"mask-image-conic-pos":[{"mask-conic":[Ye]}],"mask-image-conic-from-pos":[{"mask-conic-from":X()}],"mask-image-conic-to-pos":[{"mask-conic-to":X()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:se()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:D()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ce,je]}],filter:[{filter:["","none",Ce,je]}],blur:[{blur:he()}],brightness:[{brightness:[Ye,Ce,je]}],contrast:[{contrast:[Ye,Ce,je]}],"drop-shadow":[{"drop-shadow":["","none",b,$c,Fc]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:["",Ye,Ce,je]}],"hue-rotate":[{"hue-rotate":[Ye,Ce,je]}],invert:[{invert:["",Ye,Ce,je]}],saturate:[{saturate:[Ye,Ce,je]}],sepia:[{sepia:["",Ye,Ce,je]}],"backdrop-filter":[{"backdrop-filter":["","none",Ce,je]}],"backdrop-blur":[{"backdrop-blur":he()}],"backdrop-brightness":[{"backdrop-brightness":[Ye,Ce,je]}],"backdrop-contrast":[{"backdrop-contrast":[Ye,Ce,je]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ye,Ce,je]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ye,Ce,je]}],"backdrop-invert":[{"backdrop-invert":["",Ye,Ce,je]}],"backdrop-opacity":[{"backdrop-opacity":[Ye,Ce,je]}],"backdrop-saturate":[{"backdrop-saturate":[Ye,Ce,je]}],"backdrop-sepia":[{"backdrop-sepia":["",Ye,Ce,je]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":I()}],"border-spacing-x":[{"border-spacing-x":I()}],"border-spacing-y":[{"border-spacing-y":I()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ce,je]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ye,"initial",Ce,je]}],ease:[{ease:["linear","initial",k,Ce,je]}],delay:[{delay:[Ye,Ce,je]}],animate:[{animate:["none",P,Ce,je]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,Ce,je]}],"perspective-origin":[{"perspective-origin":L()}],rotate:[{rotate:ye()}],"rotate-x":[{"rotate-x":ye()}],"rotate-y":[{"rotate-y":ye()}],"rotate-z":[{"rotate-z":ye()}],scale:[{scale:Ae()}],"scale-x":[{"scale-x":Ae()}],"scale-y":[{"scale-y":Ae()}],"scale-z":[{"scale-z":Ae()}],"scale-3d":["scale-3d"],skew:[{skew:Ke()}],"skew-x":[{"skew-x":Ke()}],"skew-y":[{"skew-y":Ke()}],transform:[{transform:[Ce,je,"","none","gpu","cpu"]}],"transform-origin":[{origin:L()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Me()}],"translate-x":[{"translate-x":Me()}],"translate-y":[{"translate-y":Me()}],"translate-z":[{"translate-z":Me()}],"translate-none":["translate-none"],accent:[{accent:F()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:F()}],"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,je]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"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,je]}],fill:[{fill:["none",...F()]}],"stroke-w":[{stroke:[Ye,Zi,zo,Df]}],stroke:[{stroke:["none",...F()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-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-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-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-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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},aR=$2(oR);function ze(...e){return aR(N0(e))}const uh=j0("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 text-foreground 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",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 rounded-md"}},defaultVariants:{variant:"default",size:"default"}});function Ee({className:e,variant:n,size:s,asChild:o=!1,...l}){const c=o?mo:"button";return i.jsx(c,{"data-slot":"button",className:ze(uh({variant:n,size:s,className:e})),...l})}function iR(e,n){const s=v.createContext(n),o=c=>{const{children:d,...f}=c,m=v.useMemo(()=>f,Object.values(f));return i.jsx(s.Provider,{value:m,children:d})};o.displayName=e+"Provider";function l(c){const d=v.useContext(s);if(d)return d;if(n!==void 0)return n;throw new Error(`\`${c}\` must be used within \`${e}\``)}return[o,l]}function Qr(e,n=[]){let s=[];function o(c,d){const f=v.createContext(d),m=s.length;s=[...s,d];const p=g=>{var k;const{scope:w,children:b,...N}=g,S=((k=w==null?void 0:w[e])==null?void 0:k[m])||f,C=v.useMemo(()=>N,Object.values(N));return i.jsx(S.Provider,{value:C,children:b})};p.displayName=c+"Provider";function x(g,w){var S;const b=((S=w==null?void 0:w[e])==null?void 0:S[m])||f,N=v.useContext(b);if(N)return N;if(d!==void 0)return d;throw new Error(`\`${g}\` must be used within \`${c}\``)}return[p,x]}const l=()=>{const c=s.map(d=>v.createContext(d));return function(f){const m=(f==null?void 0:f[e])||c;return v.useMemo(()=>({[`__scope${e}`]:{...f,[e]:m}}),[f,m])}};return l.scopeName=e,[o,lR(l,...n)]}function lR(...e){const n=e[0];if(e.length===1)return n;const s=()=>{const o=e.map(l=>({useScope:l(),scopeName:l.scopeName}));return function(c){const d=o.reduce((f,{useScope:m,scopeName:p})=>{const g=m(c)[`__scope${p}`];return{...f,...g}},{});return v.useMemo(()=>({[`__scope${n.scopeName}`]:d}),[d])}};return s.scopeName=n.scopeName,s}var cR=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Fe=cR.reduce((e,n)=>{const s=v.forwardRef((o,l)=>{const{asChild:c,...d}=o,f=c?mo:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(f,{...d,ref:l})});return s.displayName=`Primitive.${n}`,{...e,[n]:s}},{});function uR(e,n){e&&jl.flushSync(()=>e.dispatchEvent(n))}var dh="Progress",fh=100,[dR]=Qr(dh),[fR,mR]=dR(dh),D0=v.forwardRef((e,n)=>{const{__scopeProgress:s,value:o=null,max:l,getValueLabel:c=hR,...d}=e;(l||l===0)&&!jy(l)&&console.error(pR(`${l}`,"Progress"));const f=jy(l)?l:fh;o!==null&&!Cy(o,f)&&console.error(gR(`${o}`,"Progress"));const m=Cy(o,f)?o:null,p=su(m)?c(m,f):void 0;return i.jsx(fR,{scope:s,value:m,max:f,children:i.jsx(Fe.div,{"aria-valuemax":f,"aria-valuemin":0,"aria-valuenow":su(m)?m:void 0,"aria-valuetext":p,role:"progressbar","data-state":z0(m,f),"data-value":m??void 0,"data-max":f,...d,ref:n})})});D0.displayName=dh;var O0="ProgressIndicator",L0=v.forwardRef((e,n)=>{const{__scopeProgress:s,...o}=e,l=mR(O0,s);return i.jsx(Fe.div,{"data-state":z0(l.value,l.max),"data-value":l.value??void 0,"data-max":l.max,...o,ref:n})});L0.displayName=O0;function hR(e,n){return`${Math.round(e/n*100)}%`}function z0(e,n){return e==null?"indeterminate":e===n?"complete":"loading"}function su(e){return typeof e=="number"}function jy(e){return su(e)&&!isNaN(e)&&e>0}function Cy(e,n){return su(e)&&!isNaN(e)&&e<=n&&e>=0}function pR(e,n){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${n}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${fh}\`.`}function gR(e,n){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${n}\`. The \`value\` prop must be:
|
|
278
|
+
- a positive number
|
|
279
|
+
- less than the value passed to \`max\` (or ${fh} if no \`max\` prop is set)
|
|
280
|
+
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
281
|
+
|
|
282
|
+
Defaulting to \`null\`.`}var vR=D0,yR=L0;function F0({className:e,value:n,...s}){return i.jsx(vR,{"data-slot":"progress",className:ze("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",e),...s,children:i.jsx(yR,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:`translateX(-${100-(n||0)}%)`}})})}function Ua({used:e,limit:n,label:s,unit:o,className:l,formatValue:c}){const d=n>0?e/n*100:0,f=d>=80,m=d>=100,p=c??(x=>String(x));return i.jsxs("div",{className:ze("space-y-1.5",l),children:[s&&i.jsxs("div",{className:"flex items-center justify-between text-xs",children:[i.jsx("span",{className:"text-muted-foreground",children:s}),i.jsxs("span",{className:ze("font-mono",m&&"text-red-500",f&&!m&&"text-amber-500"),children:[p(e),o?` ${o}`:""," / ",p(n),o?` ${o}`:""]})]}),i.jsx(F0,{value:Math.min(d,100),className:ze("h-1.5",m&&"[&>div]:bg-red-500",f&&!m&&"[&>div]:bg-amber-500")})]})}const xR=j0("inline-flex items-center justify-center rounded-md border 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:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent 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:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function ht({className:e,variant:n,asChild:s=!1,...o}){const l=s?mo:"span";return i.jsx(l,{"data-slot":"badge",className:ze(xR({variant:n}),e),...o})}const wR={free:{label:"Free",variant:"secondary"},pro:{label:"Pro",variant:"default"},team:{label:"Team",variant:"default"}};function $0({tier:e}){const n=wR[e];return i.jsx(ht,{variant:n.variant,children:n.label})}function wu({category:e,kind:n,offset:s=0,limit:o=20}={}){return Ns({queryKey:["entries",{category:e,kind:n,offset:s,limit:o}],queryFn:async()=>{const l=new URLSearchParams;e&&l.set("category",e),n&&n!=="all"&&l.set("kind",n),l.set("offset",String(s)),l.set("limit",String(o));const c=await vt.get(`/vault/entries?${l}`);return{entries:c.entries.map(f0),total:c.total}}})}function bR(){const e=ar();return ir({mutationFn:n=>vt.post("/vault/entries",n),onSuccess:()=>{e.invalidateQueries({queryKey:["entries"]}),e.invalidateQueries({queryKey:["usage"]})}})}function SR(){const e=ar();return ir({mutationFn:n=>vt.del(`/vault/entries/${n}`),onSuccess:()=>{e.invalidateQueries({queryKey:["entries"]}),e.invalidateQueries({queryKey:["usage"]})}})}function NR(){return ir({mutationFn:async e=>{const n={query:e.query,limit:e.limit||20};e.category&&e.category!=="all"&&(n.category=e.category);const s=await vt.post("/vault/search",n);return{results:s.results.map(m0),count:s.count,query:s.query}}})}function mh(){return Ns({queryKey:["apiKeys"],queryFn:async()=>(await vt.get("/keys")).keys.map(yk)})}function jR(){const e=ar();return ir({mutationFn:({name:n,expires_at:s})=>vt.post("/keys",{name:n,expires_at:s}),onSuccess:()=>{e.invalidateQueries({queryKey:["apiKeys"]})}})}function CR(){const e=ar();return ir({mutationFn:n=>vt.del(`/keys/${n}`),onSuccess:()=>{e.invalidateQueries({queryKey:["apiKeys"]})}})}function hh(){const e=mh();return Ns({queryKey:["usage"],queryFn:async()=>{var o;const n=await vt.get("/billing/usage"),s=((o=e.data)==null?void 0:o.length)??0;return xk(n,s)}})}function ER(){return Ns({queryKey:["rawUsage"],queryFn:()=>vt.get("/billing/usage")})}function kR(){return ir({mutationFn:e=>vt.post("/billing/checkout",e)})}function RR(){return ir({mutationFn:()=>vt.del("/account")})}function PR(){const e=ar();return ir({mutationFn:n=>vt.post("/vault/import",n),onSuccess:()=>{e.invalidateQueries({queryKey:["entries"]}),e.invalidateQueries({queryKey:["usage"]})}})}function TR(){return Ns({queryKey:["export"],queryFn:()=>vt.get("/vault/export"),enabled:!1})}function _R(e={}){return Ns({queryKey:["vaultStatus"],queryFn:()=>vt.get("/vault/status"),...e})}function AR(){return Ns({queryKey:["teams"],queryFn:async()=>(await vt.get("/teams")).teams.map(pk)})}function MR(e){return Ns({queryKey:["team",e],queryFn:async()=>{const n=await vt.get(`/teams/${e}`);return{id:n.id,name:n.name,tier:n.tier,role:n.role,createdAt:new Date(n.createdAt),members:n.members.map(gk),invites:n.invites.map(vk)}},enabled:!!e})}function IR(e){return Ns({queryKey:["teamUsage",e],queryFn:()=>vt.get(`/teams/${e}/usage`),enabled:!!e})}function DR(){const e=ar();return ir({mutationFn:n=>vt.post("/teams",{name:n}),onSuccess:()=>{e.invalidateQueries({queryKey:["teams"]})}})}function OR(){const e=ar();return ir({mutationFn:({teamId:n,email:s})=>vt.post(`/teams/${n}/invite`,{email:s}),onSuccess:(n,s)=>{e.invalidateQueries({queryKey:["team",s.teamId]})}})}function LR(){const e=ar();return ir({mutationFn:({teamId:n,token:s})=>vt.post(`/teams/${n}/join`,{token:s}),onSuccess:()=>{e.invalidateQueries({queryKey:["teams"]})}})}function zR(){const e=ar();return ir({mutationFn:({teamId:n,userId:s})=>vt.del(`/teams/${n}/members/${s}`),onSuccess:(n,s)=>{e.invalidateQueries({queryKey:["team",s.teamId]}),e.invalidateQueries({queryKey:["teamUsage",s.teamId]})}})}var Ey=1,FR=.9,$R=.8,UR=.17,Of=.1,Lf=.999,BR=.9999,HR=.99,VR=/[\\\/_+.#"@\[\(\{&]/,WR=/[\\\/_+.#"@\[\(\{&]/g,KR=/[\s-]/,U0=/[\s-]/g;function Sm(e,n,s,o,l,c,d){if(c===n.length)return l===e.length?Ey:HR;var f=`${l},${c}`;if(d[f]!==void 0)return d[f];for(var m=o.charAt(c),p=s.indexOf(m,l),x=0,g,w,b,N;p>=0;)g=Sm(e,n,s,o,p+1,c+1,d),g>x&&(p===l?g*=Ey:VR.test(e.charAt(p-1))?(g*=$R,b=e.slice(l,p-1).match(WR),b&&l>0&&(g*=Math.pow(Lf,b.length))):KR.test(e.charAt(p-1))?(g*=FR,N=e.slice(l,p-1).match(U0),N&&l>0&&(g*=Math.pow(Lf,N.length))):(g*=UR,l>0&&(g*=Math.pow(Lf,p-l))),e.charAt(p)!==n.charAt(c)&&(g*=BR)),(g<Of&&s.charAt(p-1)===o.charAt(c+1)||o.charAt(c+1)===o.charAt(c)&&s.charAt(p-1)!==o.charAt(c))&&(w=Sm(e,n,s,o,p+1,c+2,d),w*Of>g&&(g=w*Of)),g>x&&(x=g),p=s.indexOf(m,p+1);return d[f]=x,x}function ky(e){return e.toLowerCase().replace(U0," ")}function QR(e,n,s){return e=s&&s.length>0?`${e+" "+s.join(" ")}`:e,Sm(e,n,ky(e),ky(n),0,0,{})}function We(e,n,{checkForDefaultPrevented:s=!0}={}){return function(l){if(e==null||e(l),s===!1||!l.defaultPrevented)return n==null?void 0:n(l)}}var mn=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},qR=yx.useId||(()=>{}),YR=0;function An(e){const[n,s]=v.useState(qR());return mn(()=>{s(o=>o??String(YR++))},[e]),e||(n?`radix-${n}`:"")}function rn(e){const n=v.useRef(e);return v.useEffect(()=>{n.current=e}),v.useMemo(()=>(...s)=>{var o;return(o=n.current)==null?void 0:o.call(n,...s)},[])}function ai({prop:e,defaultProp:n,onChange:s=()=>{}}){const[o,l]=GR({defaultProp:n,onChange:s}),c=e!==void 0,d=c?e:o,f=rn(s),m=v.useCallback(p=>{if(c){const g=typeof p=="function"?p(e):p;g!==e&&f(g)}else l(p)},[c,e,l,f]);return[d,m]}function GR({defaultProp:e,onChange:n}){const s=v.useState(e),[o]=s,l=v.useRef(o),c=rn(n);return v.useEffect(()=>{l.current!==o&&(c(o),l.current=o)},[o,l,c]),s}function XR(e,n=globalThis==null?void 0:globalThis.document){const s=rn(e);v.useEffect(()=>{const o=l=>{l.key==="Escape"&&s(l)};return n.addEventListener("keydown",o,{capture:!0}),()=>n.removeEventListener("keydown",o,{capture:!0})},[s,n])}var JR="DismissableLayer",Nm="dismissableLayer.update",ZR="dismissableLayer.pointerDownOutside",eP="dismissableLayer.focusOutside",Ry,B0=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ph=v.forwardRef((e,n)=>{const{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:d,onDismiss:f,...m}=e,p=v.useContext(B0),[x,g]=v.useState(null),w=(x==null?void 0:x.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,b]=v.useState({}),N=rt(n,T=>g(T)),S=Array.from(p.layers),[C]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),k=S.indexOf(C),P=x?S.indexOf(x):-1,E=p.layersWithOutsidePointerEventsDisabled.size>0,R=P>=k,L=rP(T=>{const I=T.target,W=[...p.branches].some(J=>J.contains(I));!R||W||(l==null||l(T),d==null||d(T),T.defaultPrevented||f==null||f())},w),B=sP(T=>{const I=T.target;[...p.branches].some(J=>J.contains(I))||(c==null||c(T),d==null||d(T),T.defaultPrevented||f==null||f())},w);return XR(T=>{P===p.layers.size-1&&(o==null||o(T),!T.defaultPrevented&&f&&(T.preventDefault(),f()))},w),v.useEffect(()=>{if(x)return s&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(Ry=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(x)),p.layers.add(x),Py(),()=>{s&&p.layersWithOutsidePointerEventsDisabled.size===1&&(w.body.style.pointerEvents=Ry)}},[x,w,s,p]),v.useEffect(()=>()=>{x&&(p.layers.delete(x),p.layersWithOutsidePointerEventsDisabled.delete(x),Py())},[x,p]),v.useEffect(()=>{const T=()=>b({});return document.addEventListener(Nm,T),()=>document.removeEventListener(Nm,T)},[]),i.jsx(Fe.div,{...m,ref:N,style:{pointerEvents:E?R?"auto":"none":void 0,...e.style},onFocusCapture:We(e.onFocusCapture,B.onFocusCapture),onBlurCapture:We(e.onBlurCapture,B.onBlurCapture),onPointerDownCapture:We(e.onPointerDownCapture,L.onPointerDownCapture)})});ph.displayName=JR;var tP="DismissableLayerBranch",nP=v.forwardRef((e,n)=>{const s=v.useContext(B0),o=v.useRef(null),l=rt(n,o);return v.useEffect(()=>{const c=o.current;if(c)return s.branches.add(c),()=>{s.branches.delete(c)}},[s.branches]),i.jsx(Fe.div,{...e,ref:l})});nP.displayName=tP;function rP(e,n=globalThis==null?void 0:globalThis.document){const s=rn(e),o=v.useRef(!1),l=v.useRef(()=>{});return v.useEffect(()=>{const c=f=>{if(f.target&&!o.current){let m=function(){H0(ZR,s,p,{discrete:!0})};const p={originalEvent:f};f.pointerType==="touch"?(n.removeEventListener("click",l.current),l.current=m,n.addEventListener("click",l.current,{once:!0})):m()}else n.removeEventListener("click",l.current);o.current=!1},d=window.setTimeout(()=>{n.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(d),n.removeEventListener("pointerdown",c),n.removeEventListener("click",l.current)}},[n,s]),{onPointerDownCapture:()=>o.current=!0}}function sP(e,n=globalThis==null?void 0:globalThis.document){const s=rn(e),o=v.useRef(!1);return v.useEffect(()=>{const l=c=>{c.target&&!o.current&&H0(eP,s,{originalEvent:c},{discrete:!1})};return n.addEventListener("focusin",l),()=>n.removeEventListener("focusin",l)},[n,s]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Py(){const e=new CustomEvent(Nm);document.dispatchEvent(e)}function H0(e,n,s,{discrete:o}){const l=s.originalEvent.target,c=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:s});n&&l.addEventListener(e,n,{once:!0}),o?uR(l,c):l.dispatchEvent(c)}var zf="focusScope.autoFocusOnMount",Ff="focusScope.autoFocusOnUnmount",Ty={bubbles:!1,cancelable:!0},oP="FocusScope",gh=v.forwardRef((e,n)=>{const{loop:s=!1,trapped:o=!1,onMountAutoFocus:l,onUnmountAutoFocus:c,...d}=e,[f,m]=v.useState(null),p=rn(l),x=rn(c),g=v.useRef(null),w=rt(n,S=>m(S)),b=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(o){let S=function(E){if(b.paused||!f)return;const R=E.target;f.contains(R)?g.current=R:Xs(g.current,{select:!0})},C=function(E){if(b.paused||!f)return;const R=E.relatedTarget;R!==null&&(f.contains(R)||Xs(g.current,{select:!0}))},k=function(E){if(document.activeElement===document.body)for(const L of E)L.removedNodes.length>0&&Xs(f)};document.addEventListener("focusin",S),document.addEventListener("focusout",C);const P=new MutationObserver(k);return f&&P.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",C),P.disconnect()}}},[o,f,b.paused]),v.useEffect(()=>{if(f){Ay.add(b);const S=document.activeElement;if(!f.contains(S)){const k=new CustomEvent(zf,Ty);f.addEventListener(zf,p),f.dispatchEvent(k),k.defaultPrevented||(aP(dP(V0(f)),{select:!0}),document.activeElement===S&&Xs(f))}return()=>{f.removeEventListener(zf,p),setTimeout(()=>{const k=new CustomEvent(Ff,Ty);f.addEventListener(Ff,x),f.dispatchEvent(k),k.defaultPrevented||Xs(S??document.body,{select:!0}),f.removeEventListener(Ff,x),Ay.remove(b)},0)}}},[f,p,x,b]);const N=v.useCallback(S=>{if(!s&&!o||b.paused)return;const C=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,k=document.activeElement;if(C&&k){const P=S.currentTarget,[E,R]=iP(P);E&&R?!S.shiftKey&&k===R?(S.preventDefault(),s&&Xs(E,{select:!0})):S.shiftKey&&k===E&&(S.preventDefault(),s&&Xs(R,{select:!0})):k===P&&S.preventDefault()}},[s,o,b.paused]);return i.jsx(Fe.div,{tabIndex:-1,...d,ref:w,onKeyDown:N})});gh.displayName=oP;function aP(e,{select:n=!1}={}){const s=document.activeElement;for(const o of e)if(Xs(o,{select:n}),document.activeElement!==s)return}function iP(e){const n=V0(e),s=_y(n,e),o=_y(n.reverse(),e);return[s,o]}function V0(e){const n=[],s=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const l=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||l?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)n.push(s.currentNode);return n}function _y(e,n){for(const s of e)if(!lP(s,{upTo:n}))return s}function lP(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function cP(e){return e instanceof HTMLInputElement&&"select"in e}function Xs(e,{select:n=!1}={}){if(e&&e.focus){const s=document.activeElement;e.focus({preventScroll:!0}),e!==s&&cP(e)&&n&&e.select()}}var Ay=uP();function uP(){let e=[];return{add(n){const s=e[0];n!==s&&(s==null||s.pause()),e=My(e,n),e.unshift(n)},remove(n){var s;e=My(e,n),(s=e[0])==null||s.resume()}}}function My(e,n){const s=[...e],o=s.indexOf(n);return o!==-1&&s.splice(o,1),s}function dP(e){return e.filter(n=>n.tagName!=="A")}var fP="Portal",vh=v.forwardRef((e,n)=>{var f;const{container:s,...o}=e,[l,c]=v.useState(!1);mn(()=>c(!0),[]);const d=s||l&&((f=globalThis==null?void 0:globalThis.document)==null?void 0:f.body);return d?c0.createPortal(i.jsx(Fe.div,{...o,ref:n}),d):null});vh.displayName=fP;function mP(e,n){return v.useReducer((s,o)=>n[s][o]??s,e)}var Cs=e=>{const{present:n,children:s}=e,o=hP(n),l=typeof s=="function"?s({present:o.isPresent}):v.Children.only(s),c=rt(o.ref,pP(l));return typeof s=="function"||o.isPresent?v.cloneElement(l,{ref:c}):null};Cs.displayName="Presence";function hP(e){const[n,s]=v.useState(),o=v.useRef({}),l=v.useRef(e),c=v.useRef("none"),d=e?"mounted":"unmounted",[f,m]=mP(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const p=Uc(o.current);c.current=f==="mounted"?p:"none"},[f]),mn(()=>{const p=o.current,x=l.current;if(x!==e){const w=c.current,b=Uc(p);e?m("MOUNT"):b==="none"||(p==null?void 0:p.display)==="none"?m("UNMOUNT"):m(x&&w!==b?"ANIMATION_OUT":"UNMOUNT"),l.current=e}},[e,m]),mn(()=>{if(n){let p;const x=n.ownerDocument.defaultView??window,g=b=>{const S=Uc(o.current).includes(b.animationName);if(b.target===n&&S&&(m("ANIMATION_END"),!l.current)){const C=n.style.animationFillMode;n.style.animationFillMode="forwards",p=x.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=C)})}},w=b=>{b.target===n&&(c.current=Uc(o.current))};return n.addEventListener("animationstart",w),n.addEventListener("animationcancel",g),n.addEventListener("animationend",g),()=>{x.clearTimeout(p),n.removeEventListener("animationstart",w),n.removeEventListener("animationcancel",g),n.removeEventListener("animationend",g)}}else m("ANIMATION_END")},[n,m]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:v.useCallback(p=>{p&&(o.current=getComputedStyle(p)),s(p)},[])}}function Uc(e){return(e==null?void 0:e.animationName)||"none"}function pP(e){var o,l;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,s=n&&"isReactWarning"in n&&n.isReactWarning;return s?e.ref:(n=(l=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:l.get,s=n&&"isReactWarning"in n&&n.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}var $f=0;function W0(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Iy()),document.body.insertAdjacentElement("beforeend",e[1]??Iy()),$f++,()=>{$f===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),$f--}},[])}function Iy(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var zr=function(){return zr=Object.assign||function(n){for(var s,o=1,l=arguments.length;o<l;o++){s=arguments[o];for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(n[c]=s[c])}return n},zr.apply(this,arguments)};function K0(e,n){var s={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(s[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,o=Object.getOwnPropertySymbols(e);l<o.length;l++)n.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(e,o[l])&&(s[o[l]]=e[o[l]]);return s}function gP(e,n,s){if(s||arguments.length===2)for(var o=0,l=n.length,c;o<l;o++)(c||!(o in n))&&(c||(c=Array.prototype.slice.call(n,0,o)),c[o]=n[o]);return e.concat(c||Array.prototype.slice.call(n))}var Xc="right-scroll-bar-position",Jc="width-before-scroll-bar",vP="with-scroll-bars-hidden",yP="--removed-body-scroll-bar-size";function Uf(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function xP(e,n){var s=v.useState(function(){return{value:e,callback:n,facade:{get current(){return s.value},set current(o){var l=s.value;l!==o&&(s.value=o,s.callback(o,l))}}}})[0];return s.callback=n,s.facade}var wP=typeof window<"u"?v.useLayoutEffect:v.useEffect,Dy=new WeakMap;function bP(e,n){var s=xP(null,function(o){return e.forEach(function(l){return Uf(l,o)})});return wP(function(){var o=Dy.get(s);if(o){var l=new Set(o),c=new Set(e),d=s.current;l.forEach(function(f){c.has(f)||Uf(f,null)}),c.forEach(function(f){l.has(f)||Uf(f,d)})}Dy.set(s,e)},[e]),s}function SP(e){return e}function NP(e,n){n===void 0&&(n=SP);var s=[],o=!1,l={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return s.length?s[s.length-1]:e},useMedium:function(c){var d=n(c,o);return s.push(d),function(){s=s.filter(function(f){return f!==d})}},assignSyncMedium:function(c){for(o=!0;s.length;){var d=s;s=[],d.forEach(c)}s={push:function(f){return c(f)},filter:function(){return s}}},assignMedium:function(c){o=!0;var d=[];if(s.length){var f=s;s=[],f.forEach(c),d=s}var m=function(){var x=d;d=[],x.forEach(c)},p=function(){return Promise.resolve().then(m)};p(),s={push:function(x){d.push(x),p()},filter:function(x){return d=d.filter(x),s}}}};return l}function jP(e){e===void 0&&(e={});var n=NP(null);return n.options=zr({async:!0,ssr:!1},e),n}var Q0=function(e){var n=e.sideCar,s=K0(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=n.read();if(!o)throw new Error("Sidecar medium not found");return v.createElement(o,zr({},s))};Q0.isSideCarExport=!0;function CP(e,n){return e.useMedium(n),Q0}var q0=jP(),Bf=function(){},bu=v.forwardRef(function(e,n){var s=v.useRef(null),o=v.useState({onScrollCapture:Bf,onWheelCapture:Bf,onTouchMoveCapture:Bf}),l=o[0],c=o[1],d=e.forwardProps,f=e.children,m=e.className,p=e.removeScrollBar,x=e.enabled,g=e.shards,w=e.sideCar,b=e.noRelative,N=e.noIsolation,S=e.inert,C=e.allowPinchZoom,k=e.as,P=k===void 0?"div":k,E=e.gapMode,R=K0(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),L=w,B=bP([s,n]),T=zr(zr({},R),l);return v.createElement(v.Fragment,null,x&&v.createElement(L,{sideCar:q0,removeScrollBar:p,shards:g,noRelative:b,noIsolation:N,inert:S,setCallbacks:c,allowPinchZoom:!!C,lockRef:s,gapMode:E}),d?v.cloneElement(v.Children.only(f),zr(zr({},T),{ref:B})):v.createElement(P,zr({},T,{className:m,ref:B}),f))});bu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};bu.classNames={fullWidth:Jc,zeroRight:Xc};var EP=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function kP(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=EP();return n&&e.setAttribute("nonce",n),e}function RP(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function PP(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var TP=function(){var e=0,n=null;return{add:function(s){e==0&&(n=kP())&&(RP(n,s),PP(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},_P=function(){var e=TP();return function(n,s){v.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&s])}},Y0=function(){var e=_P(),n=function(s){var o=s.styles,l=s.dynamic;return e(o,l),null};return n},AP={left:0,top:0,right:0,gap:0},Hf=function(e){return parseInt(e||"",10)||0},MP=function(e){var n=window.getComputedStyle(document.body),s=n[e==="padding"?"paddingLeft":"marginLeft"],o=n[e==="padding"?"paddingTop":"marginTop"],l=n[e==="padding"?"paddingRight":"marginRight"];return[Hf(s),Hf(o),Hf(l)]},IP=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return AP;var n=MP(e),s=document.documentElement.clientWidth,o=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,o-s+n[2]-n[0])}},DP=Y0(),Ha="data-scroll-locked",OP=function(e,n,s,o){var l=e.left,c=e.top,d=e.right,f=e.gap;return s===void 0&&(s="margin"),`
|
|
283
|
+
.`.concat(vP,` {
|
|
284
|
+
overflow: hidden `).concat(o,`;
|
|
285
|
+
padding-right: `).concat(f,"px ").concat(o,`;
|
|
286
|
+
}
|
|
287
|
+
body[`).concat(Ha,`] {
|
|
288
|
+
overflow: hidden `).concat(o,`;
|
|
289
|
+
overscroll-behavior: contain;
|
|
290
|
+
`).concat([n&&"position: relative ".concat(o,";"),s==="margin"&&`
|
|
291
|
+
padding-left: `.concat(l,`px;
|
|
292
|
+
padding-top: `).concat(c,`px;
|
|
293
|
+
padding-right: `).concat(d,`px;
|
|
294
|
+
margin-left:0;
|
|
295
|
+
margin-top:0;
|
|
296
|
+
margin-right: `).concat(f,"px ").concat(o,`;
|
|
297
|
+
`),s==="padding"&&"padding-right: ".concat(f,"px ").concat(o,";")].filter(Boolean).join(""),`
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.`).concat(Xc,` {
|
|
301
|
+
right: `).concat(f,"px ").concat(o,`;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.`).concat(Jc,` {
|
|
305
|
+
margin-right: `).concat(f,"px ").concat(o,`;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.`).concat(Xc," .").concat(Xc,` {
|
|
309
|
+
right: 0 `).concat(o,`;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.`).concat(Jc," .").concat(Jc,` {
|
|
313
|
+
margin-right: 0 `).concat(o,`;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
body[`).concat(Ha,`] {
|
|
317
|
+
`).concat(yP,": ").concat(f,`px;
|
|
318
|
+
}
|
|
319
|
+
`)},Oy=function(){var e=parseInt(document.body.getAttribute(Ha)||"0",10);return isFinite(e)?e:0},LP=function(){v.useEffect(function(){return document.body.setAttribute(Ha,(Oy()+1).toString()),function(){var e=Oy()-1;e<=0?document.body.removeAttribute(Ha):document.body.setAttribute(Ha,e.toString())}},[])},zP=function(e){var n=e.noRelative,s=e.noImportant,o=e.gapMode,l=o===void 0?"margin":o;LP();var c=v.useMemo(function(){return IP(l)},[l]);return v.createElement(DP,{styles:OP(c,!n,l,s?"":"!important")})},jm=!1;if(typeof window<"u")try{var Bc=Object.defineProperty({},"passive",{get:function(){return jm=!0,!0}});window.addEventListener("test",Bc,Bc),window.removeEventListener("test",Bc,Bc)}catch{jm=!1}var Ia=jm?{passive:!1}:!1,FP=function(e){return e.tagName==="TEXTAREA"},G0=function(e,n){if(!(e instanceof Element))return!1;var s=window.getComputedStyle(e);return s[n]!=="hidden"&&!(s.overflowY===s.overflowX&&!FP(e)&&s[n]==="visible")},$P=function(e){return G0(e,"overflowY")},UP=function(e){return G0(e,"overflowX")},Ly=function(e,n){var s=n.ownerDocument,o=n;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var l=X0(e,o);if(l){var c=J0(e,o),d=c[1],f=c[2];if(d>f)return!0}o=o.parentNode}while(o&&o!==s.body);return!1},BP=function(e){var n=e.scrollTop,s=e.scrollHeight,o=e.clientHeight;return[n,s,o]},HP=function(e){var n=e.scrollLeft,s=e.scrollWidth,o=e.clientWidth;return[n,s,o]},X0=function(e,n){return e==="v"?$P(n):UP(n)},J0=function(e,n){return e==="v"?BP(n):HP(n)},VP=function(e,n){return e==="h"&&n==="rtl"?-1:1},WP=function(e,n,s,o,l){var c=VP(e,window.getComputedStyle(n).direction),d=c*o,f=s.target,m=n.contains(f),p=!1,x=d>0,g=0,w=0;do{if(!f)break;var b=J0(e,f),N=b[0],S=b[1],C=b[2],k=S-C-c*N;(N||k)&&X0(e,f)&&(g+=k,w+=N);var P=f.parentNode;f=P&&P.nodeType===Node.DOCUMENT_FRAGMENT_NODE?P.host:P}while(!m&&f!==document.body||m&&(n.contains(f)||n===f));return(x&&Math.abs(g)<1||!x&&Math.abs(w)<1)&&(p=!0),p},Hc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},zy=function(e){return[e.deltaX,e.deltaY]},Fy=function(e){return e&&"current"in e?e.current:e},KP=function(e,n){return e[0]===n[0]&&e[1]===n[1]},QP=function(e){return`
|
|
320
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
321
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
322
|
+
`)},qP=0,Da=[];function YP(e){var n=v.useRef([]),s=v.useRef([0,0]),o=v.useRef(),l=v.useState(qP++)[0],c=v.useState(Y0)[0],d=v.useRef(e);v.useEffect(function(){d.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(l));var S=gP([e.lockRef.current],(e.shards||[]).map(Fy),!0).filter(Boolean);return S.forEach(function(C){return C.classList.add("allow-interactivity-".concat(l))}),function(){document.body.classList.remove("block-interactivity-".concat(l)),S.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(l))})}}},[e.inert,e.lockRef.current,e.shards]);var f=v.useCallback(function(S,C){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!d.current.allowPinchZoom;var k=Hc(S),P=s.current,E="deltaX"in S?S.deltaX:P[0]-k[0],R="deltaY"in S?S.deltaY:P[1]-k[1],L,B=S.target,T=Math.abs(E)>Math.abs(R)?"h":"v";if("touches"in S&&T==="h"&&B.type==="range")return!1;var I=window.getSelection(),W=I&&I.anchorNode,J=W?W===B||W.contains(B):!1;if(J)return!1;var Z=Ly(T,B);if(!Z)return!0;if(Z?L=T:(L=T==="v"?"h":"v",Z=Ly(T,B)),!Z)return!1;if(!o.current&&"changedTouches"in S&&(E||R)&&(o.current=L),!L)return!0;var q=o.current||L;return WP(q,C,S,q==="h"?E:R)},[]),m=v.useCallback(function(S){var C=S;if(!(!Da.length||Da[Da.length-1]!==c)){var k="deltaY"in C?zy(C):Hc(C),P=n.current.filter(function(L){return L.name===C.type&&(L.target===C.target||C.target===L.shadowParent)&&KP(L.delta,k)})[0];if(P&&P.should){C.cancelable&&C.preventDefault();return}if(!P){var E=(d.current.shards||[]).map(Fy).filter(Boolean).filter(function(L){return L.contains(C.target)}),R=E.length>0?f(C,E[0]):!d.current.noIsolation;R&&C.cancelable&&C.preventDefault()}}},[]),p=v.useCallback(function(S,C,k,P){var E={name:S,delta:C,target:k,should:P,shadowParent:GP(k)};n.current.push(E),setTimeout(function(){n.current=n.current.filter(function(R){return R!==E})},1)},[]),x=v.useCallback(function(S){s.current=Hc(S),o.current=void 0},[]),g=v.useCallback(function(S){p(S.type,zy(S),S.target,f(S,e.lockRef.current))},[]),w=v.useCallback(function(S){p(S.type,Hc(S),S.target,f(S,e.lockRef.current))},[]);v.useEffect(function(){return Da.push(c),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:w}),document.addEventListener("wheel",m,Ia),document.addEventListener("touchmove",m,Ia),document.addEventListener("touchstart",x,Ia),function(){Da=Da.filter(function(S){return S!==c}),document.removeEventListener("wheel",m,Ia),document.removeEventListener("touchmove",m,Ia),document.removeEventListener("touchstart",x,Ia)}},[]);var b=e.removeScrollBar,N=e.inert;return v.createElement(v.Fragment,null,N?v.createElement(c,{styles:QP(l)}):null,b?v.createElement(zP,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function GP(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const XP=CP(q0,YP);var yh=v.forwardRef(function(e,n){return v.createElement(bu,zr({},e,{ref:n,sideCar:XP}))});yh.classNames=bu.classNames;var JP=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},Oa=new WeakMap,Vc=new WeakMap,Wc={},Vf=0,Z0=function(e){return e&&(e.host||Z0(e.parentNode))},ZP=function(e,n){return n.map(function(s){if(e.contains(s))return s;var o=Z0(s);return o&&e.contains(o)?o:(console.error("aria-hidden",s,"in not contained inside",e,". Doing nothing"),null)}).filter(function(s){return!!s})},eT=function(e,n,s,o){var l=ZP(n,Array.isArray(e)?e:[e]);Wc[s]||(Wc[s]=new WeakMap);var c=Wc[s],d=[],f=new Set,m=new Set(l),p=function(g){!g||f.has(g)||(f.add(g),p(g.parentNode))};l.forEach(p);var x=function(g){!g||m.has(g)||Array.prototype.forEach.call(g.children,function(w){if(f.has(w))x(w);else try{var b=w.getAttribute(o),N=b!==null&&b!=="false",S=(Oa.get(w)||0)+1,C=(c.get(w)||0)+1;Oa.set(w,S),c.set(w,C),d.push(w),S===1&&N&&Vc.set(w,!0),C===1&&w.setAttribute(s,"true"),N||w.setAttribute(o,"true")}catch(k){console.error("aria-hidden: cannot operate on ",w,k)}})};return x(n),f.clear(),Vf++,function(){d.forEach(function(g){var w=Oa.get(g)-1,b=c.get(g)-1;Oa.set(g,w),c.set(g,b),w||(Vc.has(g)||g.removeAttribute(o),Vc.delete(g)),b||g.removeAttribute(s)}),Vf--,Vf||(Oa=new WeakMap,Oa=new WeakMap,Vc=new WeakMap,Wc={})}},ew=function(e,n,s){s===void 0&&(s="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),l=JP(e);return l?(o.push.apply(o,Array.from(l.querySelectorAll("[aria-live], script"))),eT(o,l,s,"aria-hidden")):function(){return null}},xh="Dialog",[tw,nw]=Qr(xh),[tT,Sr]=tw(xh),rw=e=>{const{__scopeDialog:n,children:s,open:o,defaultOpen:l,onOpenChange:c,modal:d=!0}=e,f=v.useRef(null),m=v.useRef(null),[p=!1,x]=ai({prop:o,defaultProp:l,onChange:c});return i.jsx(tT,{scope:n,triggerRef:f,contentRef:m,contentId:An(),titleId:An(),descriptionId:An(),open:p,onOpenChange:x,onOpenToggle:v.useCallback(()=>x(g=>!g),[x]),modal:d,children:s})};rw.displayName=xh;var sw="DialogTrigger",ow=v.forwardRef((e,n)=>{const{__scopeDialog:s,...o}=e,l=Sr(sw,s),c=rt(n,l.triggerRef);return i.jsx(Fe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":l.open,"aria-controls":l.contentId,"data-state":Sh(l.open),...o,ref:c,onClick:We(e.onClick,l.onOpenToggle)})});ow.displayName=sw;var wh="DialogPortal",[nT,aw]=tw(wh,{forceMount:void 0}),iw=e=>{const{__scopeDialog:n,forceMount:s,children:o,container:l}=e,c=Sr(wh,n);return i.jsx(nT,{scope:n,forceMount:s,children:v.Children.map(o,d=>i.jsx(Cs,{present:s||c.open,children:i.jsx(vh,{asChild:!0,container:l,children:d})}))})};iw.displayName=wh;var ou="DialogOverlay",lw=v.forwardRef((e,n)=>{const s=aw(ou,e.__scopeDialog),{forceMount:o=s.forceMount,...l}=e,c=Sr(ou,e.__scopeDialog);return c.modal?i.jsx(Cs,{present:o||c.open,children:i.jsx(rT,{...l,ref:n})}):null});lw.displayName=ou;var rT=v.forwardRef((e,n)=>{const{__scopeDialog:s,...o}=e,l=Sr(ou,s);return i.jsx(yh,{as:mo,allowPinchZoom:!0,shards:[l.contentRef],children:i.jsx(Fe.div,{"data-state":Sh(l.open),...o,ref:n,style:{pointerEvents:"auto",...o.style}})})}),Zo="DialogContent",cw=v.forwardRef((e,n)=>{const s=aw(Zo,e.__scopeDialog),{forceMount:o=s.forceMount,...l}=e,c=Sr(Zo,e.__scopeDialog);return i.jsx(Cs,{present:o||c.open,children:c.modal?i.jsx(sT,{...l,ref:n}):i.jsx(oT,{...l,ref:n})})});cw.displayName=Zo;var sT=v.forwardRef((e,n)=>{const s=Sr(Zo,e.__scopeDialog),o=v.useRef(null),l=rt(n,s.contentRef,o);return v.useEffect(()=>{const c=o.current;if(c)return ew(c)},[]),i.jsx(uw,{...e,ref:l,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:We(e.onCloseAutoFocus,c=>{var d;c.preventDefault(),(d=s.triggerRef.current)==null||d.focus()}),onPointerDownOutside:We(e.onPointerDownOutside,c=>{const d=c.detail.originalEvent,f=d.button===0&&d.ctrlKey===!0;(d.button===2||f)&&c.preventDefault()}),onFocusOutside:We(e.onFocusOutside,c=>c.preventDefault())})}),oT=v.forwardRef((e,n)=>{const s=Sr(Zo,e.__scopeDialog),o=v.useRef(!1),l=v.useRef(!1);return i.jsx(uw,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{var d,f;(d=e.onCloseAutoFocus)==null||d.call(e,c),c.defaultPrevented||(o.current||(f=s.triggerRef.current)==null||f.focus(),c.preventDefault()),o.current=!1,l.current=!1},onInteractOutside:c=>{var m,p;(m=e.onInteractOutside)==null||m.call(e,c),c.defaultPrevented||(o.current=!0,c.detail.originalEvent.type==="pointerdown"&&(l.current=!0));const d=c.target;((p=s.triggerRef.current)==null?void 0:p.contains(d))&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&l.current&&c.preventDefault()}})}),uw=v.forwardRef((e,n)=>{const{__scopeDialog:s,trapFocus:o,onOpenAutoFocus:l,onCloseAutoFocus:c,...d}=e,f=Sr(Zo,s),m=v.useRef(null),p=rt(n,m);return W0(),i.jsxs(i.Fragment,{children:[i.jsx(gh,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:l,onUnmountAutoFocus:c,children:i.jsx(ph,{role:"dialog",id:f.contentId,"aria-describedby":f.descriptionId,"aria-labelledby":f.titleId,"data-state":Sh(f.open),...d,ref:p,onDismiss:()=>f.onOpenChange(!1)})}),i.jsxs(i.Fragment,{children:[i.jsx(iT,{titleId:f.titleId}),i.jsx(cT,{contentRef:m,descriptionId:f.descriptionId})]})]})}),bh="DialogTitle",dw=v.forwardRef((e,n)=>{const{__scopeDialog:s,...o}=e,l=Sr(bh,s);return i.jsx(Fe.h2,{id:l.titleId,...o,ref:n})});dw.displayName=bh;var fw="DialogDescription",mw=v.forwardRef((e,n)=>{const{__scopeDialog:s,...o}=e,l=Sr(fw,s);return i.jsx(Fe.p,{id:l.descriptionId,...o,ref:n})});mw.displayName=fw;var hw="DialogClose",pw=v.forwardRef((e,n)=>{const{__scopeDialog:s,...o}=e,l=Sr(hw,s);return i.jsx(Fe.button,{type:"button",...o,ref:n,onClick:We(e.onClick,()=>l.onOpenChange(!1))})});pw.displayName=hw;function Sh(e){return e?"open":"closed"}var gw="DialogTitleWarning",[aT,vw]=iR(gw,{contentName:Zo,titleName:bh,docsSlug:"dialog"}),iT=({titleId:e})=>{const n=vw(gw),s=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.
|
|
323
|
+
|
|
324
|
+
If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
325
|
+
|
|
326
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(s))},[s,e]),null},lT="DialogDescriptionWarning",cT=({contentRef:e,descriptionId:n})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${vw(lT).contentName}}.`;return v.useEffect(()=>{var c;const l=(c=e.current)==null?void 0:c.getAttribute("aria-describedby");n&&l&&(document.getElementById(n)||console.warn(o))},[o,e,n]),null},Su=rw,uT=ow,Nu=iw,ju=lw,Cu=cw,Nh=dw,yw=mw,Eu=pw,el='[cmdk-group=""]',Wf='[cmdk-group-items=""]',dT='[cmdk-group-heading=""]',xw='[cmdk-item=""]',$y=`${xw}:not([aria-disabled="true"])`,Cm="cmdk-item-select",za="data-value",fT=(e,n,s)=>QR(e,n,s),ww=v.createContext(void 0),kl=()=>v.useContext(ww),bw=v.createContext(void 0),jh=()=>v.useContext(bw),Sw=v.createContext(void 0),Nw=v.forwardRef((e,n)=>{let s=Fa(()=>{var M,Y;return{search:"",value:(Y=(M=e.value)!=null?M:e.defaultValue)!=null?Y:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),o=Fa(()=>new Set),l=Fa(()=>new Map),c=Fa(()=>new Map),d=Fa(()=>new Set),f=jw(e),{label:m,children:p,value:x,onValueChange:g,filter:w,shouldFilter:b,loop:N,disablePointerSelection:S=!1,vimBindings:C=!0,...k}=e,P=An(),E=An(),R=An(),L=v.useRef(null),B=NT();ea(()=>{if(x!==void 0){let M=x.trim();s.current.value=M,T.emit()}},[x]),ea(()=>{B(6,pe)},[]);let T=v.useMemo(()=>({subscribe:M=>(d.current.add(M),()=>d.current.delete(M)),snapshot:()=>s.current,setState:(M,Y,te)=>{var ee,oe,X,he;if(!Object.is(s.current[M],Y)){if(s.current[M]=Y,M==="search")q(),J(),B(1,Z);else if(M==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ye=document.getElementById(R);ye?ye.focus():(ee=document.getElementById(P))==null||ee.focus()}if(B(7,()=>{var ye;s.current.selectedItemId=(ye=ue())==null?void 0:ye.id,T.emit()}),te||B(5,pe),((oe=f.current)==null?void 0:oe.value)!==void 0){let ye=Y??"";(he=(X=f.current).onValueChange)==null||he.call(X,ye);return}}T.emit()}},emit:()=>{d.current.forEach(M=>M())}}),[]),I=v.useMemo(()=>({value:(M,Y,te)=>{var ee;Y!==((ee=c.current.get(M))==null?void 0:ee.value)&&(c.current.set(M,{value:Y,keywords:te}),s.current.filtered.items.set(M,W(Y,te)),B(2,()=>{J(),T.emit()}))},item:(M,Y)=>(o.current.add(M),Y&&(l.current.has(Y)?l.current.get(Y).add(M):l.current.set(Y,new Set([M]))),B(3,()=>{q(),J(),s.current.value||Z(),T.emit()}),()=>{c.current.delete(M),o.current.delete(M),s.current.filtered.items.delete(M);let te=ue();B(4,()=>{q(),(te==null?void 0:te.getAttribute("id"))===M&&Z(),T.emit()})}),group:M=>(l.current.has(M)||l.current.set(M,new Set),()=>{c.current.delete(M),l.current.delete(M)}),filter:()=>f.current.shouldFilter,label:m||e["aria-label"],getDisablePointerSelection:()=>f.current.disablePointerSelection,listId:P,inputId:R,labelId:E,listInnerRef:L}),[]);function W(M,Y){var te,ee;let oe=(ee=(te=f.current)==null?void 0:te.filter)!=null?ee:fT;return M?oe(M,s.current.search,Y):0}function J(){if(!s.current.search||f.current.shouldFilter===!1)return;let M=s.current.filtered.items,Y=[];s.current.filtered.groups.forEach(ee=>{let oe=l.current.get(ee),X=0;oe.forEach(he=>{let ye=M.get(he);X=Math.max(ye,X)}),Y.push([ee,X])});let te=L.current;ge().sort((ee,oe)=>{var X,he;let ye=ee.getAttribute("id"),Ae=oe.getAttribute("id");return((X=M.get(Ae))!=null?X:0)-((he=M.get(ye))!=null?he:0)}).forEach(ee=>{let oe=ee.closest(Wf);oe?oe.appendChild(ee.parentElement===oe?ee:ee.closest(`${Wf} > *`)):te.appendChild(ee.parentElement===te?ee:ee.closest(`${Wf} > *`))}),Y.sort((ee,oe)=>oe[1]-ee[1]).forEach(ee=>{var oe;let X=(oe=L.current)==null?void 0:oe.querySelector(`${el}[${za}="${encodeURIComponent(ee[0])}"]`);X==null||X.parentElement.appendChild(X)})}function Z(){let M=ge().find(te=>te.getAttribute("aria-disabled")!=="true"),Y=M==null?void 0:M.getAttribute(za);T.setState("value",Y||void 0)}function q(){var M,Y,te,ee;if(!s.current.search||f.current.shouldFilter===!1){s.current.filtered.count=o.current.size;return}s.current.filtered.groups=new Set;let oe=0;for(let X of o.current){let he=(Y=(M=c.current.get(X))==null?void 0:M.value)!=null?Y:"",ye=(ee=(te=c.current.get(X))==null?void 0:te.keywords)!=null?ee:[],Ae=W(he,ye);s.current.filtered.items.set(X,Ae),Ae>0&&oe++}for(let[X,he]of l.current)for(let ye of he)if(s.current.filtered.items.get(ye)>0){s.current.filtered.groups.add(X);break}s.current.filtered.count=oe}function pe(){var M,Y,te;let ee=ue();ee&&(((M=ee.parentElement)==null?void 0:M.firstChild)===ee&&((te=(Y=ee.closest(el))==null?void 0:Y.querySelector(dT))==null||te.scrollIntoView({block:"nearest"})),ee.scrollIntoView({block:"nearest"}))}function ue(){var M;return(M=L.current)==null?void 0:M.querySelector(`${xw}[aria-selected="true"]`)}function ge(){var M;return Array.from(((M=L.current)==null?void 0:M.querySelectorAll($y))||[])}function G(M){let Y=ge()[M];Y&&T.setState("value",Y.getAttribute(za))}function ie(M){var Y;let te=ue(),ee=ge(),oe=ee.findIndex(he=>he===te),X=ee[oe+M];(Y=f.current)!=null&&Y.loop&&(X=oe+M<0?ee[ee.length-1]:oe+M===ee.length?ee[0]:ee[oe+M]),X&&T.setState("value",X.getAttribute(za))}function F(M){let Y=ue(),te=Y==null?void 0:Y.closest(el),ee;for(;te&&!ee;)te=M>0?bT(te,el):ST(te,el),ee=te==null?void 0:te.querySelector($y);ee?T.setState("value",ee.getAttribute(za)):ie(M)}let se=()=>G(ge().length-1),ne=M=>{M.preventDefault(),M.metaKey?se():M.altKey?F(1):ie(1)},D=M=>{M.preventDefault(),M.metaKey?G(0):M.altKey?F(-1):ie(-1)};return v.createElement(Fe.div,{ref:n,tabIndex:-1,...k,"cmdk-root":"",onKeyDown:M=>{var Y;(Y=k.onKeyDown)==null||Y.call(k,M);let te=M.nativeEvent.isComposing||M.keyCode===229;if(!(M.defaultPrevented||te))switch(M.key){case"n":case"j":{C&&M.ctrlKey&&ne(M);break}case"ArrowDown":{ne(M);break}case"p":case"k":{C&&M.ctrlKey&&D(M);break}case"ArrowUp":{D(M);break}case"Home":{M.preventDefault(),G(0);break}case"End":{M.preventDefault(),se();break}case"Enter":{M.preventDefault();let ee=ue();if(ee){let oe=new Event(Cm);ee.dispatchEvent(oe)}}}}},v.createElement("label",{"cmdk-label":"",htmlFor:I.inputId,id:I.labelId,style:CT},m),ku(e,M=>v.createElement(bw.Provider,{value:T},v.createElement(ww.Provider,{value:I},M))))}),mT=v.forwardRef((e,n)=>{var s,o;let l=An(),c=v.useRef(null),d=v.useContext(Sw),f=kl(),m=jw(e),p=(o=(s=m.current)==null?void 0:s.forceMount)!=null?o:d==null?void 0:d.forceMount;ea(()=>{if(!p)return f.item(l,d==null?void 0:d.id)},[p]);let x=Cw(l,c,[e.value,e.children,c],e.keywords),g=jh(),w=ho(B=>B.value&&B.value===x.current),b=ho(B=>p||f.filter()===!1?!0:B.search?B.filtered.items.get(l)>0:!0);v.useEffect(()=>{let B=c.current;if(!(!B||e.disabled))return B.addEventListener(Cm,N),()=>B.removeEventListener(Cm,N)},[b,e.onSelect,e.disabled]);function N(){var B,T;S(),(T=(B=m.current).onSelect)==null||T.call(B,x.current)}function S(){g.setState("value",x.current,!0)}if(!b)return null;let{disabled:C,value:k,onSelect:P,forceMount:E,keywords:R,...L}=e;return v.createElement(Fe.div,{ref:Jo(c,n),...L,id:l,"cmdk-item":"",role:"option","aria-disabled":!!C,"aria-selected":!!w,"data-disabled":!!C,"data-selected":!!w,onPointerMove:C||f.getDisablePointerSelection()?void 0:S,onClick:C?void 0:N},e.children)}),hT=v.forwardRef((e,n)=>{let{heading:s,children:o,forceMount:l,...c}=e,d=An(),f=v.useRef(null),m=v.useRef(null),p=An(),x=kl(),g=ho(b=>l||x.filter()===!1?!0:b.search?b.filtered.groups.has(d):!0);ea(()=>x.group(d),[]),Cw(d,f,[e.value,e.heading,m]);let w=v.useMemo(()=>({id:d,forceMount:l}),[l]);return v.createElement(Fe.div,{ref:Jo(f,n),...c,"cmdk-group":"",role:"presentation",hidden:g?void 0:!0},s&&v.createElement("div",{ref:m,"cmdk-group-heading":"","aria-hidden":!0,id:p},s),ku(e,b=>v.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":s?p:void 0},v.createElement(Sw.Provider,{value:w},b))))}),pT=v.forwardRef((e,n)=>{let{alwaysRender:s,...o}=e,l=v.useRef(null),c=ho(d=>!d.search);return!s&&!c?null:v.createElement(Fe.div,{ref:Jo(l,n),...o,"cmdk-separator":"",role:"separator"})}),gT=v.forwardRef((e,n)=>{let{onValueChange:s,...o}=e,l=e.value!=null,c=jh(),d=ho(p=>p.search),f=ho(p=>p.selectedItemId),m=kl();return v.useEffect(()=>{e.value!=null&&c.setState("search",e.value)},[e.value]),v.createElement(Fe.input,{ref:n,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":m.listId,"aria-labelledby":m.labelId,"aria-activedescendant":f,id:m.inputId,type:"text",value:l?e.value:d,onChange:p=>{l||c.setState("search",p.target.value),s==null||s(p.target.value)}})}),vT=v.forwardRef((e,n)=>{let{children:s,label:o="Suggestions",...l}=e,c=v.useRef(null),d=v.useRef(null),f=ho(p=>p.selectedItemId),m=kl();return v.useEffect(()=>{if(d.current&&c.current){let p=d.current,x=c.current,g,w=new ResizeObserver(()=>{g=requestAnimationFrame(()=>{let b=p.offsetHeight;x.style.setProperty("--cmdk-list-height",b.toFixed(1)+"px")})});return w.observe(p),()=>{cancelAnimationFrame(g),w.unobserve(p)}}},[]),v.createElement(Fe.div,{ref:Jo(c,n),...l,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":f,"aria-label":o,id:m.listId},ku(e,p=>v.createElement("div",{ref:Jo(d,m.listInnerRef),"cmdk-list-sizer":""},p)))}),yT=v.forwardRef((e,n)=>{let{open:s,onOpenChange:o,overlayClassName:l,contentClassName:c,container:d,...f}=e;return v.createElement(Su,{open:s,onOpenChange:o},v.createElement(Nu,{container:d},v.createElement(ju,{"cmdk-overlay":"",className:l}),v.createElement(Cu,{"aria-label":e.label,"cmdk-dialog":"",className:c},v.createElement(Nw,{ref:n,...f}))))}),xT=v.forwardRef((e,n)=>ho(s=>s.filtered.count===0)?v.createElement(Fe.div,{ref:n,...e,"cmdk-empty":"",role:"presentation"}):null),wT=v.forwardRef((e,n)=>{let{progress:s,children:o,label:l="Loading...",...c}=e;return v.createElement(Fe.div,{ref:n,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":s,"aria-valuemin":0,"aria-valuemax":100,"aria-label":l},ku(e,d=>v.createElement("div",{"aria-hidden":!0},d)))}),ca=Object.assign(Nw,{List:vT,Item:mT,Input:gT,Group:hT,Separator:pT,Dialog:yT,Empty:xT,Loading:wT});function bT(e,n){let s=e.nextElementSibling;for(;s;){if(s.matches(n))return s;s=s.nextElementSibling}}function ST(e,n){let s=e.previousElementSibling;for(;s;){if(s.matches(n))return s;s=s.previousElementSibling}}function jw(e){let n=v.useRef(e);return ea(()=>{n.current=e}),n}var ea=typeof window>"u"?v.useEffect:v.useLayoutEffect;function Fa(e){let n=v.useRef();return n.current===void 0&&(n.current=e()),n}function ho(e){let n=jh(),s=()=>e(n.snapshot());return v.useSyncExternalStore(n.subscribe,s,s)}function Cw(e,n,s,o=[]){let l=v.useRef(),c=kl();return ea(()=>{var d;let f=(()=>{var p;for(let x of s){if(typeof x=="string")return x.trim();if(typeof x=="object"&&"current"in x)return x.current?(p=x.current.textContent)==null?void 0:p.trim():l.current}})(),m=o.map(p=>p.trim());c.value(e,f,m),(d=n.current)==null||d.setAttribute(za,f),l.current=f}),l}var NT=()=>{let[e,n]=v.useState(),s=Fa(()=>new Map);return ea(()=>{s.current.forEach(o=>o()),s.current=new Map},[e]),(o,l)=>{s.current.set(o,l),n({})}};function jT(e){let n=e.type;return typeof n=="function"?n(e.props):"render"in n?n.render(e.props):e}function ku({asChild:e,children:n},s){return e&&v.isValidElement(n)?v.cloneElement(jT(n),{ref:n.ref},s(n.props.children)):s(n)}var CT={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Ew({...e}){return i.jsx(Su,{"data-slot":"dialog",...e})}function ET({...e}){return i.jsx(Nu,{"data-slot":"dialog-portal",...e})}function kT({className:e,...n}){return i.jsx(ju,{"data-slot":"dialog-overlay",className:ze("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...n})}function kw({className:e,children:n,...s}){return i.jsxs(ET,{"data-slot":"dialog-portal",children:[i.jsx(kT,{}),i.jsxs(Cu,{"data-slot":"dialog-content",className:ze("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...s,children:[n,i.jsxs(Eu,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[i.jsx(xu,{}),i.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Rw({className:e,...n}){return i.jsx("div",{"data-slot":"dialog-header",className:ze("flex flex-col gap-2 text-center sm:text-left",e),...n})}function Pw({className:e,...n}){return i.jsx(Nh,{"data-slot":"dialog-title",className:ze("text-lg leading-none font-semibold",e),...n})}function RT({className:e,...n}){return i.jsx(yw,{"data-slot":"dialog-description",className:ze("text-muted-foreground text-sm",e),...n})}function PT({className:e,...n}){return i.jsx(ca,{"data-slot":"command",className:ze("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...n})}function TT({title:e="Command Palette",description:n="Search for a command to run...",children:s,...o}){return i.jsxs(Ew,{...o,children:[i.jsxs(Rw,{className:"sr-only",children:[i.jsx(Pw,{children:e}),i.jsx(RT,{children:n})]}),i.jsx(kw,{className:"overflow-hidden p-0",children:i.jsx(PT,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:s})})]})}function _T({className:e,...n}){return i.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[i.jsx(Kr,{className:"size-4 shrink-0 opacity-50"}),i.jsx(ca.Input,{"data-slot":"command-input",className:ze("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...n})]})}function AT({className:e,...n}){return i.jsx(ca.List,{"data-slot":"command-list",className:ze("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...n})}function MT({...e}){return i.jsx(ca.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function Uy({className:e,...n}){return i.jsx(ca.Group,{"data-slot":"command-group",className:ze("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...n})}function IT({className:e,...n}){return i.jsx(ca.Separator,{"data-slot":"command-separator",className:ze("bg-border -mx-1 h-px",e),...n})}function Kf({className:e,...n}){return i.jsx(ca.Item,{"data-slot":"command-item",className:ze("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n})}const DT=[{label:"Dashboard",path:"/",icon:x0},{label:"Search",path:"/search",icon:Kr},{label:"Knowledge",path:"/vault/knowledge",icon:fo},{label:"Entities",path:"/vault/entities",icon:El},{label:"Events",path:"/vault/events",icon:fl},{label:"API Keys",path:"/settings/api-keys",icon:Cl},{label:"Billing",path:"/settings/billing",icon:g0},{label:"Data",path:"/settings/data",icon:v0},{label:"Account",path:"/settings/account",icon:lh}];function OT(){const[e,n]=v.useState(!1),[s,o]=v.useState(""),[l,c]=v.useState([]),[d,f]=v.useState(!1),m=or(),p=v.useRef();v.useEffect(()=>{const w=b=>{b.key==="k"&&(b.metaKey||b.ctrlKey)&&(b.preventDefault(),n(N=>!N))};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[]),v.useEffect(()=>{if(p.current&&clearTimeout(p.current),!s.trim()||s.trim().length<2){c([]),f(!1);return}return f(!0),p.current=setTimeout(async()=>{try{const w=await vt.post("/vault/search",{query:s.trim(),limit:5});c(w.results.map(m0))}catch{c([])}finally{f(!1)}},300),()=>{p.current&&clearTimeout(p.current)}},[s]);const x=v.useCallback(w=>{n(!1),o(""),m(w)},[m]),g=v.useCallback(()=>{n(!1),m(`/search?q=${encodeURIComponent(s)}`),o("")},[m,s]);return i.jsxs(TT,{open:e,onOpenChange:n,children:[i.jsx(_T,{placeholder:"Search vault or navigate...",value:s,onValueChange:o}),i.jsxs(AT,{children:[i.jsx(MT,{children:d?i.jsxs("div",{className:"flex items-center justify-center gap-2 py-2",children:[i.jsx(Kt,{className:"size-4 animate-spin"}),i.jsx("span",{children:"Searching..."})]}):"No results found."}),l.length>0&&i.jsxs(Uy,{heading:"Results",children:[l.map(w=>i.jsxs(Kf,{onSelect:()=>{const b=w.category==="knowledge"?"/vault/knowledge":w.category==="entity"?"/vault/entities":"/vault/events";x(b)},children:[i.jsx(fo,{className:"size-4 mr-2 shrink-0"}),i.jsx("span",{className:"flex-1 truncate",children:w.title}),i.jsx(ht,{variant:"secondary",className:"text-[10px] ml-2 shrink-0",children:w.kind})]},w.id)),s.trim()&&i.jsxs(Kf,{onSelect:g,children:[i.jsx(Kr,{className:"size-4 mr-2 shrink-0"}),i.jsxs("span",{className:"text-muted-foreground",children:['View all results for "',s,'"']})]})]}),l.length>0&&i.jsx(IT,{}),i.jsx(Uy,{heading:"Navigate",children:DT.map(w=>{const b=w.icon;return i.jsxs(Kf,{onSelect:()=>x(w.path),children:[i.jsx(b,{className:"size-4 mr-2 shrink-0"}),w.label]},w.path)})})]})]})}function LT({connectionState:e,connectionBadgeClass:n}){return i.jsxs("span",{className:`inline-flex items-center rounded-md border px-2 py-0.5 text-[11px] font-medium ${n}`,children:["Hosted • ",e]})}const Tw=[{path:"/",label:"Dashboard",icon:x0},{path:"/search",label:"Search",icon:Kr},{path:"/import",label:"Import",icon:ml}],_w=[{path:"/vault/knowledge",label:"Knowledge",icon:fo},{path:"/vault/entities",label:"Entities",icon:El},{path:"/vault/events",label:"Events",icon:fl}],Aw=[{path:"/settings/api-keys",label:"API Keys",icon:Cl},{path:"/settings/billing",label:"Billing",icon:g0},{path:"/settings/data",label:"Data",icon:v0},{path:"/settings/account",label:"Account",icon:lh}];function zT(e){if(e==="/team/new")return"Create Team";if(e.startsWith("/team/invite"))return"Team Invite";if(e.startsWith("/team/"))return"Team";if(e==="/import")return"Import";const s=[...Tw,..._w,...Aw].find(o=>o.path==="/"?e==="/":e.startsWith(o.path));return(s==null?void 0:s.label)||"Context Vault"}function FT(){var L,B,T;const e=Wr(),n=or(),{theme:s,setTheme:o}=Gm(),{user:l,isAuthenticated:c,isLoading:d,logout:f}=js(),{data:m,isLoading:p}=hh(),x=_R({enabled:c,refetchInterval:15e3}),{data:g}=AR(),[w,b]=v.useState(!1),N=v.useRef(null);if(v.useEffect(()=>{const I=W=>{N.current&&!N.current.contains(W.target)&&b(!1)};return document.addEventListener("mousedown",I),()=>document.removeEventListener("mousedown",I)},[]),d)return i.jsx("div",{className:"flex h-screen items-center justify-center bg-background",children:i.jsx(Kt,{className:"size-8 animate-spin text-muted-foreground"})});if(!c)return i.jsx(Kx,{to:"/login",replace:!0});const S=I=>I==="/"?e.pathname==="/":e.pathname.startsWith(I),C=()=>{f(),n("/login")},k=l!=null&&l.name?l.name.split(" ").map(I=>I[0]).join("").slice(0,2).toUpperCase():((B=(L=l==null?void 0:l.email)==null?void 0:L[0])==null?void 0:B.toUpperCase())||"?",P=x.isError?"Disconnected":((T=x.data)==null?void 0:T.health)==="degraded"?"Degraded":"Connected",E=P==="Connected"?"border-emerald-500/40 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300":P==="Degraded"?"border-amber-500/40 bg-amber-500/10 text-amber-700 dark:text-amber-300":"border-border bg-muted text-muted-foreground",R=I=>!isFinite(I);return i.jsxs("div",{className:"flex h-screen bg-background",children:[i.jsxs("aside",{className:"w-60 border-r border-border bg-card flex flex-col",children:[i.jsx("div",{className:"px-4 h-14 flex items-center border-b border-border",children:i.jsx(Ot,{to:"/",className:"text-base font-semibold tracking-tight",children:"Context Vault"})}),i.jsxs("nav",{className:"flex-1 p-3 space-y-4 overflow-y-auto",children:[i.jsx(Qf,{label:"Main",items:Tw,isActive:S}),i.jsx(Qf,{label:"Vault",items:_w,isActive:S}),i.jsxs("div",{className:"space-y-0.5",children:[i.jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Teams"}),g==null?void 0:g.map(I=>i.jsx(Ot,{to:`/team/${I.id}`,children:i.jsxs(Ee,{variant:S(`/team/${I.id}`)?"secondary":"ghost",className:"w-full justify-start text-sm",size:"sm",children:[i.jsx(El,{className:"size-4 mr-2"}),I.name]})},I.id)),i.jsx(Ot,{to:"/team/new",children:i.jsxs(Ee,{variant:S("/team/new")?"secondary":"ghost",className:"w-full justify-start text-sm text-muted-foreground",size:"sm",children:[i.jsx(la,{className:"size-4 mr-2"}),"New Team"]})})]}),i.jsx(Qf,{label:"Settings",items:Aw,isActive:S})]}),i.jsx("div",{className:"px-3 pb-1",children:i.jsxs("a",{href:"https://chromewebstore.google.com/detail/context-vault",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 px-2 py-1.5 rounded-md text-xs text-muted-foreground hover:text-foreground hover:bg-accent transition-colors",children:[i.jsx(ah,{className:"size-3.5"}),"Browser Extension"]})}),i.jsx("div",{className:"p-4 border-t border-border space-y-2",children:p?i.jsxs("div",{className:"space-y-2",children:[i.jsx("div",{className:"h-3 bg-muted rounded animate-pulse"}),i.jsx("div",{className:"h-1.5 bg-muted rounded animate-pulse"}),i.jsxs("div",{className:"flex items-center justify-between mt-1",children:[i.jsx("div",{className:"h-5 w-12 bg-muted rounded animate-pulse"}),i.jsx("div",{className:"h-6 w-16 bg-muted rounded animate-pulse"})]})]}):m?i.jsxs(i.Fragment,{children:[R(m.entries.limit)?i.jsxs("div",{className:"text-xs text-muted-foreground",children:[m.entries.used," entries"]}):i.jsx(Ua,{used:m.entries.used,limit:m.entries.limit,label:`${m.entries.used} / ${m.entries.limit} entries`}),i.jsxs("div",{className:"flex items-center justify-between mt-1",children:[(l==null?void 0:l.tier)&&i.jsx($0,{tier:l.tier}),i.jsx(Ot,{to:"/settings/billing",children:i.jsx(Ee,{variant:"ghost",size:"sm",className:"text-xs h-6 px-2",children:"Upgrade"})})]})]}):null})]}),i.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[i.jsxs("header",{className:"h-14 border-b border-border bg-card px-6 flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("h2",{className:"text-sm font-medium",children:zT(e.pathname)}),i.jsx(LT,{connectionState:P,connectionBadgeClass:E})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Ot,{to:"/search",children:i.jsxs("button",{type:"button",className:"flex items-center gap-2 px-3 py-1.5 rounded-md border border-border text-xs text-muted-foreground hover:text-foreground hover:bg-accent transition-colors",children:[i.jsx(Kr,{className:"size-3"}),"Search...",i.jsxs("kbd",{className:"ml-2 px-1.5 py-0.5 bg-muted rounded text-[10px] font-mono",children:["⌘","K"]})]})}),i.jsx(Ee,{variant:"ghost",size:"icon",className:"size-8",onClick:()=>o(s==="dark"?"light":"dark"),children:s==="dark"?i.jsx(u2,{className:"size-4"}):i.jsx(s2,{className:"size-4"})}),i.jsxs("div",{className:"relative",ref:N,children:[i.jsxs("button",{type:"button",onClick:()=>b(!w),className:"flex items-center gap-1.5 px-2 py-1 rounded-md hover:bg-accent transition-colors",children:[i.jsx("div",{className:"size-7 rounded-full bg-primary text-primary-foreground flex items-center justify-center text-xs font-medium",children:k}),i.jsx(oi,{className:"size-3 text-muted-foreground"})]}),w&&i.jsxs("div",{className:"absolute right-0 top-full mt-1 w-48 rounded-lg border border-border bg-card shadow-lg py-1 z-50",children:[i.jsxs("div",{className:"px-3 py-2 border-b border-border",children:[i.jsx("p",{className:"text-sm font-medium truncate",children:(l==null?void 0:l.name)||(l==null?void 0:l.email)}),i.jsx("p",{className:"text-xs text-muted-foreground truncate",children:l==null?void 0:l.email})]}),i.jsxs(Ot,{to:"/settings/account",className:"flex items-center gap-2 px-3 py-2 text-sm hover:bg-accent transition-colors",onClick:()=>b(!1),children:[i.jsx(lh,{className:"size-3.5"}),"Account"]}),i.jsxs(Ot,{to:"/settings/api-keys",className:"flex items-center gap-2 px-3 py-2 text-sm hover:bg-accent transition-colors",onClick:()=>b(!1),children:[i.jsx(Cl,{className:"size-3.5"}),"API Keys"]}),i.jsxs("button",{type:"button",onClick:C,className:"w-full flex items-center gap-2 px-3 py-2 text-sm hover:bg-accent transition-colors text-left",children:[i.jsx(n2,{className:"size-3.5"}),"Sign out"]})]})]})]})]}),i.jsx("main",{className:"flex-1 overflow-auto",children:i.jsx(cC,{})})]}),i.jsx(OT,{})]})}function Qf({label:e,items:n,isActive:s}){return i.jsxs("div",{className:"space-y-0.5",children:[i.jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:e}),n.map(o=>{const l=o.icon;return i.jsx(Ot,{to:o.path,children:i.jsxs(Ee,{variant:s(o.path)?"secondary":"ghost",className:"w-full justify-start text-sm",size:"sm",children:[i.jsx(l,{className:"size-4 mr-2"}),o.label]})},o.path)})]})}function lt({className:e,...n}){return i.jsx("div",{"data-slot":"card",className:ze("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border",e),...n})}function wt({className:e,...n}){return i.jsx("div",{"data-slot":"card-header",className:ze("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 pt-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...n})}function Et({className:e,...n}){return i.jsx("h4",{"data-slot":"card-title",className:ze("leading-none",e),...n})}function ct({className:e,...n}){return i.jsx("div",{"data-slot":"card-content",className:ze("px-6 [&:last-child]:pb-6",e),...n})}const Ch="context-vault-onboarding-dismissed",Mw="context-vault-extension-installed";function $T({entriesUsed:e,hasMcpActivity:n}){return[{id:"connect-tools",label:"Connect AI tools",completed:n,description:"Run one command to configure Claude Code, Cursor, and other tools",action:"copy-connect-command",actionLabel:"Copy command"},{id:"first-entry",label:"Save your first entry",completed:e>0,action:"/vault/knowledge",actionLabel:"Add entry"},{id:"install-extension",label:"Install Chrome extension",completed:WT(),description:"Search your vault from ChatGPT, Claude, and Gemini",action:"chrome-web-store-link",actionLabel:"Install"}]}function UT(){return localStorage.getItem(Ch)==="true"}function BT(){localStorage.setItem(Ch,"true")}function HT(){localStorage.removeItem(Ch)}function VT(){localStorage.setItem(Mw,"true")}function WT(){return localStorage.getItem(Mw)==="true"}function Iw(e){const s=new Date().getTime()-e.getTime(),o=Math.floor(s/6e4),l=Math.floor(s/36e5),c=Math.floor(s/864e5);return o<60?`${o}m ago`:l<24?`${l}h ago`:`${c}d ago`}function KT(e,n=2){return Number.isFinite(e)?new Intl.NumberFormat("en-US",{minimumFractionDigits:0,maximumFractionDigits:n}).format(e):String(e)}function au(e){return KT(e,2)}const QT={"connect-tools":w0,"first-entry":la,"install-extension":ah},qT=`{
|
|
327
|
+
"mcpServers": {
|
|
328
|
+
"context-vault": {
|
|
329
|
+
"command": "npx",
|
|
330
|
+
"args": ["-y", "context-vault", "mcp"],
|
|
331
|
+
"env": {
|
|
332
|
+
"CV_API_KEY": "YOUR_API_KEY"
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}`;function YT(){const{user:e}=js(),n=or(),{data:s,isLoading:o}=wu({limit:10}),{data:l,isLoading:c}=hh(),{data:d}=mh(),f=(l==null?void 0:l.entries.used)??0,m=(d??[]).some(q=>!!q.lastUsedAt),p=$T({entriesUsed:f,hasMcpActivity:m}),[x,g]=v.useState(()=>!UT()),[w,b]=v.useState(!1),[,N]=v.useState(!1),[S,C]=v.useState(!1),k=p.every(q=>q.completed),P=p.filter(q=>q.completed).length,E=p.length,R=()=>{BT(),g(!1)},L="npx context-vault connect --key YOUR_API_KEY",B=async()=>{await navigator.clipboard.writeText(L),b(!0),$e.success("Connect command copied"),setTimeout(()=>b(!1),2e3)},T=q=>{var pe;q.action==="copy-connect-command"?B():q.action==="chrome-web-store-link"?window.open("https://chromewebstore.google.com/detail/context-vault","_blank"):(pe=q.action)!=null&&pe.startsWith("/")&&n(q.action)},I=()=>{VT(),N(!0)},W=q=>!Number.isFinite(q),J=l?[{label:"Entries",icon:fo,used:l.entries.used,limit:l.entries.limit,display:`${l.entries.used}`,sub:W(l.entries.limit)?null:`of ${l.entries.limit}`},{label:"Storage",icon:y0,used:l.storage.usedMb,limit:l.storage.limitMb,display:`${au(l.storage.usedMb)} MB`,sub:W(l.storage.limitMb)?null:`of ${au(l.storage.limitMb)} MB`},{label:"Requests Today",icon:gy,used:l.requestsToday.used,limit:l.requestsToday.limit,display:`${l.requestsToday.used}`,sub:W(l.requestsToday.limit)?null:`of ${l.requestsToday.limit}`},{label:"API Keys",icon:Cl,used:(d==null?void 0:d.length)??0,limit:1/0,display:`${(d==null?void 0:d.length)??0} active`,sub:null}]:[],Z=(s==null?void 0:s.entries)??[];return i.jsxs("div",{className:"p-6 space-y-6 max-w-5xl mx-auto",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl font-semibold mb-1",children:"Dashboard"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:k?"Welcome back. Here's your vault at a glance.":"Get started by completing the steps below."})]}),x&&!k&&i.jsxs(lt,{children:[i.jsx(wt,{className:"pb-3",children:i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx(Et,{className:"text-base",children:"Getting Started"}),i.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[P," of ",E," steps complete"]})]}),i.jsx(Ee,{variant:"ghost",size:"icon",className:"size-7",onClick:R,children:i.jsx(xu,{className:"size-3.5"})})]})}),i.jsx(ct,{children:i.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:p.map(q=>{const pe=QT[q.id]||fo;return i.jsxs("div",{className:`relative rounded-lg border p-4 space-y-3 transition-colors ${q.completed?"border-primary/20 bg-primary/5":"border-border hover:border-primary/30"}`,children:[i.jsx("div",{className:"flex items-center justify-between",children:i.jsx("div",{className:`rounded-full p-2 ${q.completed?"bg-primary/10 text-primary":"bg-muted text-muted-foreground"}`,children:q.completed?i.jsx(my,{className:"size-4"}):i.jsx(pe,{className:"size-4"})})}),i.jsxs("div",{children:[i.jsx("p",{className:`text-sm font-medium ${q.completed?"text-muted-foreground line-through":""}`,children:q.label}),q.description&&i.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:q.description})]}),!q.completed&&q.action&&i.jsxs(Ee,{variant:"secondary",size:"sm",className:"w-full gap-1.5 text-xs",onClick:()=>T(q),children:[q.action==="copy-connect-command"&&(w?i.jsx(Hr,{className:"size-3"}):i.jsx(ws,{className:"size-3"})),q.actionLabel||"Go"]}),!q.completed&&q.id==="install-extension"&&i.jsx(Ee,{variant:"ghost",size:"sm",className:"w-full text-xs text-muted-foreground",onClick:I,children:"Mark as installed"}),!q.completed&&q.id==="connect-tools"&&i.jsx("pre",{className:"bg-muted p-2 rounded text-[10px] font-mono overflow-x-auto",children:L})]},q.id)})})})]}),i.jsx(lt,{children:i.jsx(ct,{className:"pt-4",children:m&&!S?i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(my,{className:"size-4 text-green-500"}),i.jsx("span",{className:"text-sm font-medium text-green-600 dark:text-green-400",children:"AI tools connected"})]}),i.jsxs(Ee,{variant:"ghost",size:"sm",className:"text-xs gap-1",onClick:()=>C(!0),children:["View setup guide",i.jsx(oi,{className:"size-3"})]})]}):i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(gy,{className:"size-4 text-primary"}),i.jsx("h3",{className:"text-sm font-semibold",children:"Connect AI Tools"})]}),m&&i.jsxs(Ee,{variant:"ghost",size:"sm",className:"text-xs gap-1",onClick:()=>C(!1),children:["Collapse",i.jsx(oh,{className:"size-3"})]})]}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx("span",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-muted text-muted-foreground text-xs flex items-center justify-center font-medium mt-0.5",children:"1"}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx("p",{className:"text-sm",children:"Get your API key"}),i.jsx(Ee,{variant:"outline",size:"sm",asChild:!0,className:"text-xs h-7",children:i.jsxs(Ot,{to:"/settings/api-keys",children:["Open API Keys",i.jsx(ah,{className:"size-3 ml-1.5"})]})})]})]}),i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx("span",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-muted text-muted-foreground text-xs flex items-center justify-center font-medium mt-0.5",children:"2"}),i.jsxs("div",{className:"space-y-1.5 flex-1 min-w-0",children:[i.jsx("p",{className:"text-sm",children:"Run this command in your terminal:"}),i.jsxs("div",{className:"flex items-center gap-2 bg-muted rounded-md px-3 py-2",children:[i.jsx("code",{className:"text-xs font-mono flex-1 truncate",children:L}),i.jsx("button",{onClick:B,className:"flex-shrink-0 text-muted-foreground hover:text-foreground transition-colors","aria-label":"Copy command",children:w?i.jsx(Hr,{className:"size-3.5"}):i.jsx(ws,{className:"size-3.5"})})]})]})]}),i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx("span",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-muted text-muted-foreground text-xs flex items-center justify-center font-medium mt-0.5",children:"3"}),i.jsx("div",{className:"flex-1 min-w-0",children:i.jsxs("details",{className:"group",children:[i.jsxs("summary",{className:"text-sm cursor-pointer list-none flex items-center gap-1.5 text-muted-foreground hover:text-foreground transition-colors",children:[i.jsx(oi,{className:"size-3.5 transition-transform group-open:rotate-180"}),"Or configure manually (JSON)"]}),i.jsx("pre",{className:"mt-2 bg-muted p-3 rounded-md text-[11px] font-mono overflow-x-auto",children:qT})]})})]})]}),i.jsxs("p",{className:"text-xs text-muted-foreground",children:["Works with: ",i.jsx("span",{className:"text-foreground",children:"Claude Code"})," ","· ",i.jsx("span",{className:"text-foreground",children:"Cursor"})," ·"," ",i.jsx("span",{className:"text-foreground",children:"Windsurf"})," ·"," ",i.jsx("span",{className:"text-foreground",children:"Zed"})]})]})})}),!x&&!k&&i.jsx("div",{className:"text-center",children:i.jsx("button",{className:"text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:()=>{HT(),g(!0)},children:"Show getting started guide"})}),c?i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[1,2,3,4].map(q=>i.jsxs(lt,{children:[i.jsx(wt,{className:"pb-2",children:i.jsx("div",{className:"h-4 w-16 bg-muted rounded animate-pulse"})}),i.jsxs(ct,{className:"space-y-2",children:[i.jsx("div",{className:"h-8 w-20 bg-muted rounded animate-pulse"}),i.jsx("div",{className:"h-1.5 bg-muted rounded animate-pulse"})]})]},q))}):i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:J.map(q=>{const pe=q.icon,ue=W(q.limit),ge=!ue&&q.limit>0?q.used/q.limit*100:0,G=!ue&&ge>=80,ie=!ue&&ge>=100;return i.jsxs(lt,{children:[i.jsx(wt,{className:"pb-2",children:i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx(Et,{className:"text-xs font-medium text-muted-foreground",children:q.label}),i.jsx(pe,{className:"size-4 text-muted-foreground"})]})}),i.jsxs(ct,{className:"space-y-2",children:[i.jsxs("div",{className:"flex items-baseline gap-1.5",children:[i.jsx("span",{className:`text-2xl font-semibold ${ie?"text-red-500":G?"text-amber-500":""}`,children:q.display}),q.sub&&i.jsx("span",{className:"text-xs text-muted-foreground",children:q.sub})]}),!ue&&i.jsx(Ua,{used:q.used,limit:q.limit}),ie&&i.jsx(Ot,{to:"/settings/billing",className:"text-xs text-red-500 hover:underline",children:"Upgrade to increase limit"})]})]},q.label)})}),i.jsxs(lt,{children:[i.jsx(wt,{className:"pb-3",children:i.jsx(Et,{className:"text-base",children:"Recent Activity"})}),i.jsx(ct,{children:o?i.jsx("div",{className:"space-y-3 py-2",children:[1,2,3].map(q=>i.jsxs("div",{className:"flex items-center justify-between py-2",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"h-4 w-48 bg-muted rounded animate-pulse"}),i.jsx("div",{className:"h-4 w-16 bg-muted rounded animate-pulse"})]}),i.jsx("div",{className:"h-4 w-12 bg-muted rounded animate-pulse"})]},q))}):Z.length===0?i.jsx("p",{className:"text-sm text-muted-foreground text-center py-6",children:"No entries yet. Save your first entry to see activity here."}):i.jsx("div",{className:"space-y-2",children:Z.slice().sort((q,pe)=>pe.created.getTime()-q.created.getTime()).slice(0,10).map(q=>i.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border last:border-0",children:[i.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[i.jsx("span",{className:"text-sm font-medium truncate",children:q.title}),i.jsx(ht,{variant:q.category==="knowledge"?"default":q.category==="entity"?"outline":"secondary",className:"text-[10px] shrink-0",children:q.category}),i.jsx(ht,{variant:"secondary",className:"text-[10px] shrink-0",children:q.kind})]}),i.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap ml-4",children:Iw(q.created)})]},q.id))})})]}),i.jsxs("div",{className:"flex flex-wrap gap-3",children:[i.jsx(Ee,{variant:"outline",asChild:!0,children:i.jsxs(Ot,{to:"/search",children:[i.jsx(Kr,{className:"size-4 mr-1.5"}),"Search vault"]})}),i.jsx(Ee,{variant:"outline",asChild:!0,children:i.jsxs(Ot,{to:"/vault/knowledge",children:[i.jsx(la,{className:"size-4 mr-1.5"}),"New Entry"]})}),i.jsx(Ee,{variant:"outline",asChild:!0,children:i.jsxs(Ot,{to:"/settings/data",children:[i.jsx(ml,{className:"size-4 mr-1.5"}),"Import data"]})})]})]})}function sn({className:e,type:n,...s}){return i.jsx("input",{type:n,"data-slot":"input",className:ze("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base bg-input-background 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:cursor-not-allowed disabled:opacity-50 md:text-sm","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",e),...s})}function Jt({className:e,...n}){return i.jsx("div",{"data-slot":"skeleton",className:ze("bg-accent animate-pulse rounded-md",e),...n})}function GT({...e}){return i.jsx(Su,{"data-slot":"sheet",...e})}function XT({...e}){return i.jsx(Nu,{"data-slot":"sheet-portal",...e})}function JT({className:e,...n}){return i.jsx(ju,{"data-slot":"sheet-overlay",className:ze("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...n})}function ZT({className:e,children:n,side:s="right",...o}){return i.jsxs(XT,{children:[i.jsx(JT,{}),i.jsxs(Cu,{"data-slot":"sheet-content",className:ze("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",s==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",s==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",s==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",s==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...o,children:[n,i.jsxs(Eu,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[i.jsx(xu,{className:"size-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function e_({className:e,...n}){return i.jsx("div",{"data-slot":"sheet-header",className:ze("flex flex-col gap-1.5 p-4",e),...n})}function t_({className:e,...n}){return i.jsx(Nh,{"data-slot":"sheet-title",className:ze("text-foreground font-semibold",e),...n})}function Dw(e){const n=e+"CollectionProvider",[s,o]=Qr(n),[l,c]=s(n,{collectionRef:{current:null},itemMap:new Map}),d=b=>{const{scope:N,children:S}=b,C=me.useRef(null),k=me.useRef(new Map).current;return i.jsx(l,{scope:N,itemMap:k,collectionRef:C,children:S})};d.displayName=n;const f=e+"CollectionSlot",m=me.forwardRef((b,N)=>{const{scope:S,children:C}=b,k=c(f,S),P=rt(N,k.collectionRef);return i.jsx(mo,{ref:P,children:C})});m.displayName=f;const p=e+"CollectionItemSlot",x="data-radix-collection-item",g=me.forwardRef((b,N)=>{const{scope:S,children:C,...k}=b,P=me.useRef(null),E=rt(N,P),R=c(p,S);return me.useEffect(()=>(R.itemMap.set(P,{ref:P,...k}),()=>void R.itemMap.delete(P))),i.jsx(mo,{[x]:"",ref:E,children:C})});g.displayName=p;function w(b){const N=c(e+"CollectionConsumer",b);return me.useCallback(()=>{const C=N.collectionRef.current;if(!C)return[];const k=Array.from(C.querySelectorAll(`[${x}]`));return Array.from(N.itemMap.values()).sort((R,L)=>k.indexOf(R.ref.current)-k.indexOf(L.ref.current))},[N.collectionRef,N.itemMap])}return[{Provider:d,Slot:m,ItemSlot:g},w,o]}var n_=v.createContext(void 0);function Ru(e){const n=v.useContext(n_);return e||n||"ltr"}var qf="rovingFocusGroup.onEntryFocus",r_={bubbles:!1,cancelable:!0},Pu="RovingFocusGroup",[Em,Ow,s_]=Dw(Pu),[o_,Lw]=Qr(Pu,[s_]),[a_,i_]=o_(Pu),zw=v.forwardRef((e,n)=>i.jsx(Em.Provider,{scope:e.__scopeRovingFocusGroup,children:i.jsx(Em.Slot,{scope:e.__scopeRovingFocusGroup,children:i.jsx(l_,{...e,ref:n})})}));zw.displayName=Pu;var l_=v.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:s,orientation:o,loop:l=!1,dir:c,currentTabStopId:d,defaultCurrentTabStopId:f,onCurrentTabStopIdChange:m,onEntryFocus:p,preventScrollOnEntryFocus:x=!1,...g}=e,w=v.useRef(null),b=rt(n,w),N=Ru(c),[S=null,C]=ai({prop:d,defaultProp:f,onChange:m}),[k,P]=v.useState(!1),E=rn(p),R=Ow(s),L=v.useRef(!1),[B,T]=v.useState(0);return v.useEffect(()=>{const I=w.current;if(I)return I.addEventListener(qf,E),()=>I.removeEventListener(qf,E)},[E]),i.jsx(a_,{scope:s,orientation:o,dir:N,loop:l,currentTabStopId:S,onItemFocus:v.useCallback(I=>C(I),[C]),onItemShiftTab:v.useCallback(()=>P(!0),[]),onFocusableItemAdd:v.useCallback(()=>T(I=>I+1),[]),onFocusableItemRemove:v.useCallback(()=>T(I=>I-1),[]),children:i.jsx(Fe.div,{tabIndex:k||B===0?-1:0,"data-orientation":o,...g,ref:b,style:{outline:"none",...e.style},onMouseDown:We(e.onMouseDown,()=>{L.current=!0}),onFocus:We(e.onFocus,I=>{const W=!L.current;if(I.target===I.currentTarget&&W&&!k){const J=new CustomEvent(qf,r_);if(I.currentTarget.dispatchEvent(J),!J.defaultPrevented){const Z=R().filter(G=>G.focusable),q=Z.find(G=>G.active),pe=Z.find(G=>G.id===S),ge=[q,pe,...Z].filter(Boolean).map(G=>G.ref.current);Uw(ge,x)}}L.current=!1}),onBlur:We(e.onBlur,()=>P(!1))})})}),Fw="RovingFocusGroupItem",$w=v.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:s,focusable:o=!0,active:l=!1,tabStopId:c,...d}=e,f=An(),m=c||f,p=i_(Fw,s),x=p.currentTabStopId===m,g=Ow(s),{onFocusableItemAdd:w,onFocusableItemRemove:b}=p;return v.useEffect(()=>{if(o)return w(),()=>b()},[o,w,b]),i.jsx(Em.ItemSlot,{scope:s,id:m,focusable:o,active:l,children:i.jsx(Fe.span,{tabIndex:x?0:-1,"data-orientation":p.orientation,...d,ref:n,onMouseDown:We(e.onMouseDown,N=>{o?p.onItemFocus(m):N.preventDefault()}),onFocus:We(e.onFocus,()=>p.onItemFocus(m)),onKeyDown:We(e.onKeyDown,N=>{if(N.key==="Tab"&&N.shiftKey){p.onItemShiftTab();return}if(N.target!==N.currentTarget)return;const S=d_(N,p.orientation,p.dir);if(S!==void 0){if(N.metaKey||N.ctrlKey||N.altKey||N.shiftKey)return;N.preventDefault();let k=g().filter(P=>P.focusable).map(P=>P.ref.current);if(S==="last")k.reverse();else if(S==="prev"||S==="next"){S==="prev"&&k.reverse();const P=k.indexOf(N.currentTarget);k=p.loop?f_(k,P+1):k.slice(P+1)}setTimeout(()=>Uw(k))}})})})});$w.displayName=Fw;var c_={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function u_(e,n){return n!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function d_(e,n,s){const o=u_(e.key,s);if(!(n==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(n==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return c_[o]}function Uw(e,n=!1){const s=document.activeElement;for(const o of e)if(o===s||(o.focus({preventScroll:n}),document.activeElement!==s))return}function f_(e,n){return e.map((s,o)=>e[(n+o)%e.length])}var m_=zw,h_=$w,Eh="Tabs",[p_]=Qr(Eh,[Lw]),Bw=Lw(),[g_,kh]=p_(Eh),Hw=v.forwardRef((e,n)=>{const{__scopeTabs:s,value:o,onValueChange:l,defaultValue:c,orientation:d="horizontal",dir:f,activationMode:m="automatic",...p}=e,x=Ru(f),[g,w]=ai({prop:o,onChange:l,defaultProp:c});return i.jsx(g_,{scope:s,baseId:An(),value:g,onValueChange:w,orientation:d,dir:x,activationMode:m,children:i.jsx(Fe.div,{dir:x,"data-orientation":d,...p,ref:n})})});Hw.displayName=Eh;var Vw="TabsList",Ww=v.forwardRef((e,n)=>{const{__scopeTabs:s,loop:o=!0,...l}=e,c=kh(Vw,s),d=Bw(s);return i.jsx(m_,{asChild:!0,...d,orientation:c.orientation,dir:c.dir,loop:o,children:i.jsx(Fe.div,{role:"tablist","aria-orientation":c.orientation,...l,ref:n})})});Ww.displayName=Vw;var Kw="TabsTrigger",Qw=v.forwardRef((e,n)=>{const{__scopeTabs:s,value:o,disabled:l=!1,...c}=e,d=kh(Kw,s),f=Bw(s),m=Gw(d.baseId,o),p=Xw(d.baseId,o),x=o===d.value;return i.jsx(h_,{asChild:!0,...f,focusable:!l,active:x,children:i.jsx(Fe.button,{type:"button",role:"tab","aria-selected":x,"aria-controls":p,"data-state":x?"active":"inactive","data-disabled":l?"":void 0,disabled:l,id:m,...c,ref:n,onMouseDown:We(e.onMouseDown,g=>{!l&&g.button===0&&g.ctrlKey===!1?d.onValueChange(o):g.preventDefault()}),onKeyDown:We(e.onKeyDown,g=>{[" ","Enter"].includes(g.key)&&d.onValueChange(o)}),onFocus:We(e.onFocus,()=>{const g=d.activationMode!=="manual";!x&&!l&&g&&d.onValueChange(o)})})})});Qw.displayName=Kw;var qw="TabsContent",Yw=v.forwardRef((e,n)=>{const{__scopeTabs:s,value:o,forceMount:l,children:c,...d}=e,f=kh(qw,s),m=Gw(f.baseId,o),p=Xw(f.baseId,o),x=o===f.value,g=v.useRef(x);return v.useEffect(()=>{const w=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(w)},[]),i.jsx(Cs,{present:l||x,children:({present:w})=>i.jsx(Fe.div,{"data-state":x?"active":"inactive","data-orientation":f.orientation,role:"tabpanel","aria-labelledby":m,hidden:!w,id:p,tabIndex:0,...d,ref:n,style:{...e.style,animationDuration:g.current?"0s":void 0},children:w&&c})})});Yw.displayName=qw;function Gw(e,n){return`${e}-trigger-${n}`}function Xw(e,n){return`${e}-content-${n}`}var v_=Hw,y_=Ww,x_=Qw,w_=Yw;function b_({className:e,...n}){return i.jsx(v_,{"data-slot":"tabs",className:ze("flex flex-col gap-2",e),...n})}function S_({className:e,...n}){return i.jsx(y_,{"data-slot":"tabs-list",className:ze("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-xl p-[3px] flex",e),...n})}function By({className:e,...n}){return i.jsx(x_,{"data-slot":"tabs-trigger",className:ze("data-[state=active]:bg-card dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-xl border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n})}function Hy({className:e,...n}){return i.jsx(w_,{"data-slot":"tabs-content",className:ze("flex-1 outline-none",e),...n})}var N_="Separator",Vy="horizontal",j_=["horizontal","vertical"],Jw=v.forwardRef((e,n)=>{const{decorative:s,orientation:o=Vy,...l}=e,c=C_(o)?o:Vy,f=s?{role:"none"}:{"aria-orientation":c==="vertical"?c:void 0,role:"separator"};return i.jsx(Fe.div,{"data-orientation":c,...f,...l,ref:n})});Jw.displayName=N_;function C_(e){return j_.includes(e)}var E_=Jw;function k_({className:e,orientation:n="horizontal",decorative:s=!0,...o}){return i.jsx(E_,{"data-slot":"separator-root",decorative:s,orientation:n,className:ze("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...o})}function km(e,[n,s]){return Math.min(s,Math.max(n,e))}function R_(e,n){return v.useReducer((s,o)=>n[s][o]??s,e)}var Rh="ScrollArea",[Zw]=Qr(Rh),[P_,lr]=Zw(Rh),eb=v.forwardRef((e,n)=>{const{__scopeScrollArea:s,type:o="hover",dir:l,scrollHideDelay:c=600,...d}=e,[f,m]=v.useState(null),[p,x]=v.useState(null),[g,w]=v.useState(null),[b,N]=v.useState(null),[S,C]=v.useState(null),[k,P]=v.useState(0),[E,R]=v.useState(0),[L,B]=v.useState(!1),[T,I]=v.useState(!1),W=rt(n,Z=>m(Z)),J=Ru(l);return i.jsx(P_,{scope:s,type:o,dir:J,scrollHideDelay:c,scrollArea:f,viewport:p,onViewportChange:x,content:g,onContentChange:w,scrollbarX:b,onScrollbarXChange:N,scrollbarXEnabled:L,onScrollbarXEnabledChange:B,scrollbarY:S,onScrollbarYChange:C,scrollbarYEnabled:T,onScrollbarYEnabledChange:I,onCornerWidthChange:P,onCornerHeightChange:R,children:i.jsx(Fe.div,{dir:J,...d,ref:W,style:{position:"relative","--radix-scroll-area-corner-width":k+"px","--radix-scroll-area-corner-height":E+"px",...e.style}})})});eb.displayName=Rh;var tb="ScrollAreaViewport",nb=v.forwardRef((e,n)=>{const{__scopeScrollArea:s,children:o,nonce:l,...c}=e,d=lr(tb,s),f=v.useRef(null),m=rt(n,f,d.onViewportChange);return i.jsxs(i.Fragment,{children:[i.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:l}),i.jsx(Fe.div,{"data-radix-scroll-area-viewport":"",...c,ref:m,style:{overflowX:d.scrollbarXEnabled?"scroll":"hidden",overflowY:d.scrollbarYEnabled?"scroll":"hidden",...e.style},children:i.jsx("div",{ref:d.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})});nb.displayName=tb;var qr="ScrollAreaScrollbar",rb=v.forwardRef((e,n)=>{const{forceMount:s,...o}=e,l=lr(qr,e.__scopeScrollArea),{onScrollbarXEnabledChange:c,onScrollbarYEnabledChange:d}=l,f=e.orientation==="horizontal";return v.useEffect(()=>(f?c(!0):d(!0),()=>{f?c(!1):d(!1)}),[f,c,d]),l.type==="hover"?i.jsx(T_,{...o,ref:n,forceMount:s}):l.type==="scroll"?i.jsx(__,{...o,ref:n,forceMount:s}):l.type==="auto"?i.jsx(sb,{...o,ref:n,forceMount:s}):l.type==="always"?i.jsx(Ph,{...o,ref:n}):null});rb.displayName=qr;var T_=v.forwardRef((e,n)=>{const{forceMount:s,...o}=e,l=lr(qr,e.__scopeScrollArea),[c,d]=v.useState(!1);return v.useEffect(()=>{const f=l.scrollArea;let m=0;if(f){const p=()=>{window.clearTimeout(m),d(!0)},x=()=>{m=window.setTimeout(()=>d(!1),l.scrollHideDelay)};return f.addEventListener("pointerenter",p),f.addEventListener("pointerleave",x),()=>{window.clearTimeout(m),f.removeEventListener("pointerenter",p),f.removeEventListener("pointerleave",x)}}},[l.scrollArea,l.scrollHideDelay]),i.jsx(Cs,{present:s||c,children:i.jsx(sb,{"data-state":c?"visible":"hidden",...o,ref:n})})}),__=v.forwardRef((e,n)=>{const{forceMount:s,...o}=e,l=lr(qr,e.__scopeScrollArea),c=e.orientation==="horizontal",d=_u(()=>m("SCROLL_END"),100),[f,m]=R_("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return v.useEffect(()=>{if(f==="idle"){const p=window.setTimeout(()=>m("HIDE"),l.scrollHideDelay);return()=>window.clearTimeout(p)}},[f,l.scrollHideDelay,m]),v.useEffect(()=>{const p=l.viewport,x=c?"scrollLeft":"scrollTop";if(p){let g=p[x];const w=()=>{const b=p[x];g!==b&&(m("SCROLL"),d()),g=b};return p.addEventListener("scroll",w),()=>p.removeEventListener("scroll",w)}},[l.viewport,c,m,d]),i.jsx(Cs,{present:s||f!=="hidden",children:i.jsx(Ph,{"data-state":f==="hidden"?"hidden":"visible",...o,ref:n,onPointerEnter:We(e.onPointerEnter,()=>m("POINTER_ENTER")),onPointerLeave:We(e.onPointerLeave,()=>m("POINTER_LEAVE"))})})}),sb=v.forwardRef((e,n)=>{const s=lr(qr,e.__scopeScrollArea),{forceMount:o,...l}=e,[c,d]=v.useState(!1),f=e.orientation==="horizontal",m=_u(()=>{if(s.viewport){const p=s.viewport.offsetWidth<s.viewport.scrollWidth,x=s.viewport.offsetHeight<s.viewport.scrollHeight;d(f?p:x)}},10);return ii(s.viewport,m),ii(s.content,m),i.jsx(Cs,{present:o||c,children:i.jsx(Ph,{"data-state":c?"visible":"hidden",...l,ref:n})})}),Ph=v.forwardRef((e,n)=>{const{orientation:s="vertical",...o}=e,l=lr(qr,e.__scopeScrollArea),c=v.useRef(null),d=v.useRef(0),[f,m]=v.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),p=cb(f.viewport,f.content),x={...o,sizes:f,onSizesChange:m,hasThumb:p>0&&p<1,onThumbChange:w=>c.current=w,onThumbPointerUp:()=>d.current=0,onThumbPointerDown:w=>d.current=w};function g(w,b){return L_(w,d.current,f,b)}return s==="horizontal"?i.jsx(A_,{...x,ref:n,onThumbPositionChange:()=>{if(l.viewport&&c.current){const w=l.viewport.scrollLeft,b=Wy(w,f,l.dir);c.current.style.transform=`translate3d(${b}px, 0, 0)`}},onWheelScroll:w=>{l.viewport&&(l.viewport.scrollLeft=w)},onDragScroll:w=>{l.viewport&&(l.viewport.scrollLeft=g(w,l.dir))}}):s==="vertical"?i.jsx(M_,{...x,ref:n,onThumbPositionChange:()=>{if(l.viewport&&c.current){const w=l.viewport.scrollTop,b=Wy(w,f);c.current.style.transform=`translate3d(0, ${b}px, 0)`}},onWheelScroll:w=>{l.viewport&&(l.viewport.scrollTop=w)},onDragScroll:w=>{l.viewport&&(l.viewport.scrollTop=g(w))}}):null}),A_=v.forwardRef((e,n)=>{const{sizes:s,onSizesChange:o,...l}=e,c=lr(qr,e.__scopeScrollArea),[d,f]=v.useState(),m=v.useRef(null),p=rt(n,m,c.onScrollbarXChange);return v.useEffect(()=>{m.current&&f(getComputedStyle(m.current))},[m]),i.jsx(ab,{"data-orientation":"horizontal",...l,ref:p,sizes:s,style:{bottom:0,left:c.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:c.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Tu(s)+"px",...e.style},onThumbPointerDown:x=>e.onThumbPointerDown(x.x),onDragScroll:x=>e.onDragScroll(x.x),onWheelScroll:(x,g)=>{if(c.viewport){const w=c.viewport.scrollLeft+x.deltaX;e.onWheelScroll(w),db(w,g)&&x.preventDefault()}},onResize:()=>{m.current&&c.viewport&&d&&o({content:c.viewport.scrollWidth,viewport:c.viewport.offsetWidth,scrollbar:{size:m.current.clientWidth,paddingStart:lu(d.paddingLeft),paddingEnd:lu(d.paddingRight)}})}})}),M_=v.forwardRef((e,n)=>{const{sizes:s,onSizesChange:o,...l}=e,c=lr(qr,e.__scopeScrollArea),[d,f]=v.useState(),m=v.useRef(null),p=rt(n,m,c.onScrollbarYChange);return v.useEffect(()=>{m.current&&f(getComputedStyle(m.current))},[m]),i.jsx(ab,{"data-orientation":"vertical",...l,ref:p,sizes:s,style:{top:0,right:c.dir==="ltr"?0:void 0,left:c.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Tu(s)+"px",...e.style},onThumbPointerDown:x=>e.onThumbPointerDown(x.y),onDragScroll:x=>e.onDragScroll(x.y),onWheelScroll:(x,g)=>{if(c.viewport){const w=c.viewport.scrollTop+x.deltaY;e.onWheelScroll(w),db(w,g)&&x.preventDefault()}},onResize:()=>{m.current&&c.viewport&&d&&o({content:c.viewport.scrollHeight,viewport:c.viewport.offsetHeight,scrollbar:{size:m.current.clientHeight,paddingStart:lu(d.paddingTop),paddingEnd:lu(d.paddingBottom)}})}})}),[I_,ob]=Zw(qr),ab=v.forwardRef((e,n)=>{const{__scopeScrollArea:s,sizes:o,hasThumb:l,onThumbChange:c,onThumbPointerUp:d,onThumbPointerDown:f,onThumbPositionChange:m,onDragScroll:p,onWheelScroll:x,onResize:g,...w}=e,b=lr(qr,s),[N,S]=v.useState(null),C=rt(n,W=>S(W)),k=v.useRef(null),P=v.useRef(""),E=b.viewport,R=o.content-o.viewport,L=rn(x),B=rn(m),T=_u(g,10);function I(W){if(k.current){const J=W.clientX-k.current.left,Z=W.clientY-k.current.top;p({x:J,y:Z})}}return v.useEffect(()=>{const W=J=>{const Z=J.target;(N==null?void 0:N.contains(Z))&&L(J,R)};return document.addEventListener("wheel",W,{passive:!1}),()=>document.removeEventListener("wheel",W,{passive:!1})},[E,N,R,L]),v.useEffect(B,[o,B]),ii(N,T),ii(b.content,T),i.jsx(I_,{scope:s,scrollbar:N,hasThumb:l,onThumbChange:rn(c),onThumbPointerUp:rn(d),onThumbPositionChange:B,onThumbPointerDown:rn(f),children:i.jsx(Fe.div,{...w,ref:C,style:{position:"absolute",...w.style},onPointerDown:We(e.onPointerDown,W=>{W.button===0&&(W.target.setPointerCapture(W.pointerId),k.current=N.getBoundingClientRect(),P.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",b.viewport&&(b.viewport.style.scrollBehavior="auto"),I(W))}),onPointerMove:We(e.onPointerMove,I),onPointerUp:We(e.onPointerUp,W=>{const J=W.target;J.hasPointerCapture(W.pointerId)&&J.releasePointerCapture(W.pointerId),document.body.style.webkitUserSelect=P.current,b.viewport&&(b.viewport.style.scrollBehavior=""),k.current=null})})})}),iu="ScrollAreaThumb",ib=v.forwardRef((e,n)=>{const{forceMount:s,...o}=e,l=ob(iu,e.__scopeScrollArea);return i.jsx(Cs,{present:s||l.hasThumb,children:i.jsx(D_,{ref:n,...o})})}),D_=v.forwardRef((e,n)=>{const{__scopeScrollArea:s,style:o,...l}=e,c=lr(iu,s),d=ob(iu,s),{onThumbPositionChange:f}=d,m=rt(n,g=>d.onThumbChange(g)),p=v.useRef(void 0),x=_u(()=>{p.current&&(p.current(),p.current=void 0)},100);return v.useEffect(()=>{const g=c.viewport;if(g){const w=()=>{if(x(),!p.current){const b=z_(g,f);p.current=b,f()}};return f(),g.addEventListener("scroll",w),()=>g.removeEventListener("scroll",w)}},[c.viewport,x,f]),i.jsx(Fe.div,{"data-state":d.hasThumb?"visible":"hidden",...l,ref:m,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:We(e.onPointerDownCapture,g=>{const b=g.target.getBoundingClientRect(),N=g.clientX-b.left,S=g.clientY-b.top;d.onThumbPointerDown({x:N,y:S})}),onPointerUp:We(e.onPointerUp,d.onThumbPointerUp)})});ib.displayName=iu;var Th="ScrollAreaCorner",lb=v.forwardRef((e,n)=>{const s=lr(Th,e.__scopeScrollArea),o=!!(s.scrollbarX&&s.scrollbarY);return s.type!=="scroll"&&o?i.jsx(O_,{...e,ref:n}):null});lb.displayName=Th;var O_=v.forwardRef((e,n)=>{const{__scopeScrollArea:s,...o}=e,l=lr(Th,s),[c,d]=v.useState(0),[f,m]=v.useState(0),p=!!(c&&f);return ii(l.scrollbarX,()=>{var g;const x=((g=l.scrollbarX)==null?void 0:g.offsetHeight)||0;l.onCornerHeightChange(x),m(x)}),ii(l.scrollbarY,()=>{var g;const x=((g=l.scrollbarY)==null?void 0:g.offsetWidth)||0;l.onCornerWidthChange(x),d(x)}),p?i.jsx(Fe.div,{...o,ref:n,style:{width:c,height:f,position:"absolute",right:l.dir==="ltr"?0:void 0,left:l.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function lu(e){return e?parseInt(e,10):0}function cb(e,n){const s=e/n;return isNaN(s)?0:s}function Tu(e){const n=cb(e.viewport,e.content),s=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=(e.scrollbar.size-s)*n;return Math.max(o,18)}function L_(e,n,s,o="ltr"){const l=Tu(s),c=l/2,d=n||c,f=l-d,m=s.scrollbar.paddingStart+d,p=s.scrollbar.size-s.scrollbar.paddingEnd-f,x=s.content-s.viewport,g=o==="ltr"?[0,x]:[x*-1,0];return ub([m,p],g)(e)}function Wy(e,n,s="ltr"){const o=Tu(n),l=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,c=n.scrollbar.size-l,d=n.content-n.viewport,f=c-o,m=s==="ltr"?[0,d]:[d*-1,0],p=km(e,m);return ub([0,d],[0,f])(p)}function ub(e,n){return s=>{if(e[0]===e[1]||n[0]===n[1])return n[0];const o=(n[1]-n[0])/(e[1]-e[0]);return n[0]+o*(s-e[0])}}function db(e,n){return e>0&&e<n}var z_=(e,n=()=>{})=>{let s={left:e.scrollLeft,top:e.scrollTop},o=0;return(function l(){const c={left:e.scrollLeft,top:e.scrollTop},d=s.left!==c.left,f=s.top!==c.top;(d||f)&&n(),s=c,o=window.requestAnimationFrame(l)})(),()=>window.cancelAnimationFrame(o)};function _u(e,n){const s=rn(e),o=v.useRef(0);return v.useEffect(()=>()=>window.clearTimeout(o.current),[]),v.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(s,n)},[s,n])}function ii(e,n){const s=rn(n);mn(()=>{let o=0;if(e){const l=new ResizeObserver(()=>{cancelAnimationFrame(o),o=window.requestAnimationFrame(s)});return l.observe(e),()=>{window.cancelAnimationFrame(o),l.unobserve(e)}}},[e,s])}var F_=eb,$_=nb,U_=lb;function Ky({className:e,children:n,...s}){return i.jsxs(F_,{"data-slot":"scroll-area",className:ze("relative",e),...s,children:[i.jsx($_,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:n}),i.jsx(B_,{}),i.jsx(U_,{})]})}function B_({className:e,orientation:n="vertical",...s}){return i.jsx(rb,{"data-slot":"scroll-area-scrollbar",orientation:n,className:ze("flex touch-none p-px transition-colors select-none",n==="vertical"&&"h-full w-2.5 border-l border-l-transparent",n==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...s,children:i.jsx(ib,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}var fb="AlertDialog",[H_]=Qr(fb,[nw]),Es=nw(),mb=e=>{const{__scopeAlertDialog:n,...s}=e,o=Es(n);return i.jsx(Su,{...o,...s,modal:!0})};mb.displayName=fb;var V_="AlertDialogTrigger",W_=v.forwardRef((e,n)=>{const{__scopeAlertDialog:s,...o}=e,l=Es(s);return i.jsx(uT,{...l,...o,ref:n})});W_.displayName=V_;var K_="AlertDialogPortal",hb=e=>{const{__scopeAlertDialog:n,...s}=e,o=Es(n);return i.jsx(Nu,{...o,...s})};hb.displayName=K_;var Q_="AlertDialogOverlay",pb=v.forwardRef((e,n)=>{const{__scopeAlertDialog:s,...o}=e,l=Es(s);return i.jsx(ju,{...l,...o,ref:n})});pb.displayName=Q_;var Va="AlertDialogContent",[q_,Y_]=H_(Va),gb=v.forwardRef((e,n)=>{const{__scopeAlertDialog:s,children:o,...l}=e,c=Es(s),d=v.useRef(null),f=rt(n,d),m=v.useRef(null);return i.jsx(aT,{contentName:Va,titleName:vb,docsSlug:"alert-dialog",children:i.jsx(q_,{scope:s,cancelRef:m,children:i.jsxs(Cu,{role:"alertdialog",...c,...l,ref:f,onOpenAutoFocus:We(l.onOpenAutoFocus,p=>{var x;p.preventDefault(),(x=m.current)==null||x.focus({preventScroll:!0})}),onPointerDownOutside:p=>p.preventDefault(),onInteractOutside:p=>p.preventDefault(),children:[i.jsx(b0,{children:o}),i.jsx(X_,{contentRef:d})]})})})});gb.displayName=Va;var vb="AlertDialogTitle",yb=v.forwardRef((e,n)=>{const{__scopeAlertDialog:s,...o}=e,l=Es(s);return i.jsx(Nh,{...l,...o,ref:n})});yb.displayName=vb;var xb="AlertDialogDescription",wb=v.forwardRef((e,n)=>{const{__scopeAlertDialog:s,...o}=e,l=Es(s);return i.jsx(yw,{...l,...o,ref:n})});wb.displayName=xb;var G_="AlertDialogAction",bb=v.forwardRef((e,n)=>{const{__scopeAlertDialog:s,...o}=e,l=Es(s);return i.jsx(Eu,{...l,...o,ref:n})});bb.displayName=G_;var Sb="AlertDialogCancel",Nb=v.forwardRef((e,n)=>{const{__scopeAlertDialog:s,...o}=e,{cancelRef:l}=Y_(Sb,s),c=Es(s),d=rt(n,l);return i.jsx(Eu,{...c,...o,ref:d})});Nb.displayName=Sb;var X_=({contentRef:e})=>{const n=`\`${Va}\` requires a description for the component to be accessible for screen reader users.
|
|
337
|
+
|
|
338
|
+
You can add a description to the \`${Va}\` by passing a \`${xb}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
339
|
+
|
|
340
|
+
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Va}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
341
|
+
|
|
342
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return v.useEffect(()=>{var o;document.getElementById((o=e.current)==null?void 0:o.getAttribute("aria-describedby"))||console.warn(n)},[n,e]),null},J_=mb,Z_=hb,eA=pb,tA=gb,nA=bb,rA=Nb,sA=yb,oA=wb;function aA({...e}){return i.jsx(J_,{"data-slot":"alert-dialog",...e})}function iA({...e}){return i.jsx(Z_,{"data-slot":"alert-dialog-portal",...e})}function lA({className:e,...n}){return i.jsx(eA,{"data-slot":"alert-dialog-overlay",className:ze("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...n})}function cA({className:e,...n}){return i.jsxs(iA,{children:[i.jsx(lA,{}),i.jsx(tA,{"data-slot":"alert-dialog-content",className:ze("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...n})]})}function uA({className:e,...n}){return i.jsx("div",{"data-slot":"alert-dialog-header",className:ze("flex flex-col gap-2 text-center sm:text-left",e),...n})}function dA({className:e,...n}){return i.jsx("div",{"data-slot":"alert-dialog-footer",className:ze("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...n})}function fA({className:e,...n}){return i.jsx(sA,{"data-slot":"alert-dialog-title",className:ze("text-lg font-semibold",e),...n})}function mA({className:e,...n}){return i.jsx(oA,{"data-slot":"alert-dialog-description",className:ze("text-muted-foreground text-sm",e),...n})}function hA({className:e,...n}){return i.jsx(nA,{className:ze(uh(),e),...n})}function pA({className:e,...n}){return i.jsx(rA,{className:ze(uh({variant:"outline"}),e),...n})}var gA="Label",jb=v.forwardRef((e,n)=>i.jsx(Fe.label,{...e,ref:n,onMouseDown:s=>{var l;s.target.closest("button, input, select, textarea")||((l=e.onMouseDown)==null||l.call(e,s),!s.defaultPrevented&&s.detail>1&&s.preventDefault())}}));jb.displayName=gA;var vA=jb;function dt({className:e,...n}){return i.jsx(vA,{"data-slot":"label",className:ze("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...n})}function Au({entry:e,open:n,onOpenChange:s}){var b,N,S;const[o,l]=v.useState(!1),[c,d]=v.useState(""),f=SR();if(!e)return null;const m=e.category==="knowledge"||e.category==="entity",p=((N=(b=e.source)==null?void 0:b.split("/").pop())==null?void 0:N.replace(".md",""))||e.id.slice(0,8),x=()=>{navigator.clipboard.writeText(JSON.stringify(e,null,2)),$e.success("JSON copied to clipboard")},g=()=>{if(m&&c!==p){$e.error(`Type "${p}" to confirm deletion`);return}f.mutate(e.id,{onSuccess:()=>{$e.success("Entry deleted"),l(!1),d(""),s(!1)},onError:C=>{C instanceof di?$e.error("Failed to delete entry",{description:C.message}):$e.error("Failed to delete entry")}})},w=((S=e.source)==null?void 0:S.split("/"))||[];return i.jsxs(i.Fragment,{children:[i.jsx(GT,{open:n,onOpenChange:s,children:i.jsxs(ZT,{className:"sm:max-w-2xl p-0 gap-0",children:[i.jsx(e_,{children:i.jsxs("div",{className:"space-y-3",children:[i.jsx("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:w.map((C,k)=>i.jsxs("div",{className:"flex items-center gap-1.5",children:[i.jsx("span",{className:k===w.length-1?"text-foreground font-medium":"",children:C}),k<w.length-1&&i.jsx("span",{children:"/"})]},`${k}-${C}`))}),i.jsx(t_,{className:"text-xl",children:e.title}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs(Ee,{variant:"outline",size:"sm",children:[i.jsx(l2,{className:"size-4 mr-2"}),"Edit"]}),i.jsxs(Ee,{variant:"outline",size:"sm",onClick:()=>l(!0),children:[i.jsx(yu,{className:"size-4 mr-2"}),"Delete"]}),i.jsxs(Ee,{variant:"outline",size:"sm",onClick:x,children:[i.jsx(ws,{className:"size-4 mr-2"}),"Copy JSON"]})]})]})}),i.jsx(k_,{}),i.jsx("div",{className:"px-4 pb-4",children:i.jsxs(b_,{defaultValue:"content",className:"h-[calc(100vh-13rem)]",children:[i.jsxs(S_,{className:"grid w-full grid-cols-2 mt-4",children:[i.jsx(By,{value:"content",children:"Content"}),i.jsx(By,{value:"metadata",children:"Metadata"})]}),i.jsx(Hy,{value:"content",className:"h-full",children:i.jsx(Ky,{className:"h-full pr-2",children:i.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none pr-2",children:i.jsx("pre",{className:"whitespace-pre-wrap font-['Inter'] text-sm bg-transparent border-none p-0 m-0",children:e.body})})})}),i.jsx(Hy,{value:"metadata",className:"h-full",children:i.jsx(Ky,{className:"h-full pr-2",children:i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 pr-2",children:[i.jsxs("div",{className:"space-y-1.5 rounded-md border border-border/60 p-3 sm:col-span-2",children:[i.jsxs(dt,{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[i.jsx(Gk,{className:"size-3"}),"ID"]}),i.jsx("code",{className:"block bg-muted rounded px-2.5 py-2 text-xs font-mono break-all",children:e.id})]}),i.jsxs("div",{className:"space-y-1.5 rounded-md border border-border/60 p-3",children:[i.jsxs(dt,{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[i.jsx(fo,{className:"size-3"}),"Category"]}),i.jsx("div",{children:i.jsx(ht,{variant:"outline",children:e.category})})]}),i.jsxs("div",{className:"space-y-1.5 rounded-md border border-border/60 p-3",children:[i.jsxs(dt,{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[i.jsx(py,{className:"size-3"}),"Kind"]}),i.jsx("div",{children:i.jsx(ht,{variant:e.category==="knowledge"?"default":e.category==="entity"?"outline":"secondary",children:e.kind})})]}),i.jsxs("div",{className:"space-y-1.5 rounded-md border border-border/60 p-3",children:[i.jsxs(dt,{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[i.jsx(fl,{className:"size-3"}),"Created"]}),i.jsx("div",{className:"text-sm",children:e.created.toLocaleString()})]}),i.jsxs("div",{className:"space-y-1.5 rounded-md border border-border/60 p-3",children:[i.jsxs(dt,{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[i.jsx(fl,{className:"size-3"}),"Updated"]}),i.jsx("div",{className:"text-sm",children:e.updated.toLocaleString()})]}),i.jsxs("div",{className:"space-y-1.5 rounded-md border border-border/60 p-3 sm:col-span-2",children:[i.jsxs(dt,{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[i.jsx(py,{className:"size-3"}),"Tags"]}),i.jsx("div",{className:"flex flex-wrap gap-1",children:e.tags.length>0?e.tags.map(C=>i.jsx(ht,{variant:"outline",className:"text-xs",children:C},C)):i.jsx("span",{className:"text-xs text-muted-foreground",children:"No tags"})})]}),e.source&&i.jsxs("div",{className:"space-y-1.5 rounded-md border border-border/60 p-3 sm:col-span-2",children:[i.jsxs(dt,{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[i.jsx(w0,{className:"size-3"}),"Source"]}),i.jsx("code",{className:"block bg-muted rounded px-2.5 py-2 text-xs font-mono break-all",children:e.source})]}),e.metadata&&Object.keys(e.metadata).length>0&&i.jsxs("div",{className:"space-y-1.5 rounded-md border border-border/60 p-3 sm:col-span-2",children:[i.jsx(dt,{className:"text-xs text-muted-foreground",children:"Metadata"}),i.jsx("pre",{className:"bg-muted rounded px-2.5 py-2 text-xs font-mono overflow-x-auto",children:JSON.stringify(e.metadata,null,2)})]})]})})})]})})]})}),i.jsx(aA,{open:o,onOpenChange:l,children:i.jsxs(cA,{children:[i.jsxs(uA,{children:[i.jsx(fA,{children:"Delete Entry?"}),i.jsx(mA,{children:m?i.jsxs("div",{className:"space-y-3",children:[i.jsxs("p",{children:["This ",e.category," entry is permanent. Type"," ",i.jsx("code",{className:"px-1.5 py-0.5 bg-muted rounded text-xs font-mono",children:p})," ","to confirm deletion."]}),i.jsx(sn,{value:c,onChange:C=>d(C.target.value),placeholder:p,className:"font-mono"})]}):i.jsx("p",{children:"This event entry will be permanently deleted. This action cannot be undone."})})]}),i.jsxs(dA,{children:[i.jsx(pA,{onClick:()=>d(""),children:"Cancel"}),i.jsxs(hA,{onClick:g,disabled:f.isPending,children:[f.isPending&&i.jsx(Kt,{className:"size-4 mr-2 animate-spin"}),"Delete"]})]})]})})]})}function Cb({className:e,...n}){return i.jsx("textarea",{"data-slot":"textarea",className:ze("resize-none border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-input-background px-3 py-2 text-base transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...n})}const yA=["top","right","bottom","left"],po=Math.min,Un=Math.max,cu=Math.round,Kc=Math.floor,Ur=e=>({x:e,y:e}),xA={left:"right",right:"left",bottom:"top",top:"bottom"},wA={start:"end",end:"start"};function Rm(e,n,s){return Un(e,po(n,s))}function bs(e,n){return typeof e=="function"?e(n):e}function Ss(e){return e.split("-")[0]}function hi(e){return e.split("-")[1]}function _h(e){return e==="x"?"y":"x"}function Ah(e){return e==="y"?"height":"width"}const bA=new Set(["top","bottom"]);function Fr(e){return bA.has(Ss(e))?"y":"x"}function Mh(e){return _h(Fr(e))}function SA(e,n,s){s===void 0&&(s=!1);const o=hi(e),l=Mh(e),c=Ah(l);let d=l==="x"?o===(s?"end":"start")?"right":"left":o==="start"?"bottom":"top";return n.reference[c]>n.floating[c]&&(d=uu(d)),[d,uu(d)]}function NA(e){const n=uu(e);return[Pm(e),n,Pm(n)]}function Pm(e){return e.replace(/start|end/g,n=>wA[n])}const Qy=["left","right"],qy=["right","left"],jA=["top","bottom"],CA=["bottom","top"];function EA(e,n,s){switch(e){case"top":case"bottom":return s?n?qy:Qy:n?Qy:qy;case"left":case"right":return n?jA:CA;default:return[]}}function kA(e,n,s,o){const l=hi(e);let c=EA(Ss(e),s==="start",o);return l&&(c=c.map(d=>d+"-"+l),n&&(c=c.concat(c.map(Pm)))),c}function uu(e){return e.replace(/left|right|bottom|top/g,n=>xA[n])}function RA(e){return{top:0,right:0,bottom:0,left:0,...e}}function Eb(e){return typeof e!="number"?RA(e):{top:e,right:e,bottom:e,left:e}}function du(e){const{x:n,y:s,width:o,height:l}=e;return{width:o,height:l,top:s,left:n,right:n+o,bottom:s+l,x:n,y:s}}function Yy(e,n,s){let{reference:o,floating:l}=e;const c=Fr(n),d=Mh(n),f=Ah(d),m=Ss(n),p=c==="y",x=o.x+o.width/2-l.width/2,g=o.y+o.height/2-l.height/2,w=o[f]/2-l[f]/2;let b;switch(m){case"top":b={x,y:o.y-l.height};break;case"bottom":b={x,y:o.y+o.height};break;case"right":b={x:o.x+o.width,y:g};break;case"left":b={x:o.x-l.width,y:g};break;default:b={x:o.x,y:o.y}}switch(hi(n)){case"start":b[d]-=w*(s&&p?-1:1);break;case"end":b[d]+=w*(s&&p?-1:1);break}return b}async function PA(e,n){var s;n===void 0&&(n={});const{x:o,y:l,platform:c,rects:d,elements:f,strategy:m}=e,{boundary:p="clippingAncestors",rootBoundary:x="viewport",elementContext:g="floating",altBoundary:w=!1,padding:b=0}=bs(n,e),N=Eb(b),C=f[w?g==="floating"?"reference":"floating":g],k=du(await c.getClippingRect({element:(s=await(c.isElement==null?void 0:c.isElement(C)))==null||s?C:C.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(f.floating)),boundary:p,rootBoundary:x,strategy:m})),P=g==="floating"?{x:o,y:l,width:d.floating.width,height:d.floating.height}:d.reference,E=await(c.getOffsetParent==null?void 0:c.getOffsetParent(f.floating)),R=await(c.isElement==null?void 0:c.isElement(E))?await(c.getScale==null?void 0:c.getScale(E))||{x:1,y:1}:{x:1,y:1},L=du(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:P,offsetParent:E,strategy:m}):P);return{top:(k.top-L.top+N.top)/R.y,bottom:(L.bottom-k.bottom+N.bottom)/R.y,left:(k.left-L.left+N.left)/R.x,right:(L.right-k.right+N.right)/R.x}}const TA=async(e,n,s)=>{const{placement:o="bottom",strategy:l="absolute",middleware:c=[],platform:d}=s,f=c.filter(Boolean),m=await(d.isRTL==null?void 0:d.isRTL(n));let p=await d.getElementRects({reference:e,floating:n,strategy:l}),{x,y:g}=Yy(p,o,m),w=o,b={},N=0;for(let C=0;C<f.length;C++){var S;const{name:k,fn:P}=f[C],{x:E,y:R,data:L,reset:B}=await P({x,y:g,initialPlacement:o,placement:w,strategy:l,middlewareData:b,rects:p,platform:{...d,detectOverflow:(S=d.detectOverflow)!=null?S:PA},elements:{reference:e,floating:n}});x=E??x,g=R??g,b={...b,[k]:{...b[k],...L}},B&&N<=50&&(N++,typeof B=="object"&&(B.placement&&(w=B.placement),B.rects&&(p=B.rects===!0?await d.getElementRects({reference:e,floating:n,strategy:l}):B.rects),{x,y:g}=Yy(p,w,m)),C=-1)}return{x,y:g,placement:w,strategy:l,middlewareData:b}},_A=e=>({name:"arrow",options:e,async fn(n){const{x:s,y:o,placement:l,rects:c,platform:d,elements:f,middlewareData:m}=n,{element:p,padding:x=0}=bs(e,n)||{};if(p==null)return{};const g=Eb(x),w={x:s,y:o},b=Mh(l),N=Ah(b),S=await d.getDimensions(p),C=b==="y",k=C?"top":"left",P=C?"bottom":"right",E=C?"clientHeight":"clientWidth",R=c.reference[N]+c.reference[b]-w[b]-c.floating[N],L=w[b]-c.reference[b],B=await(d.getOffsetParent==null?void 0:d.getOffsetParent(p));let T=B?B[E]:0;(!T||!await(d.isElement==null?void 0:d.isElement(B)))&&(T=f.floating[E]||c.floating[N]);const I=R/2-L/2,W=T/2-S[N]/2-1,J=po(g[k],W),Z=po(g[P],W),q=J,pe=T-S[N]-Z,ue=T/2-S[N]/2+I,ge=Rm(q,ue,pe),G=!m.arrow&&hi(l)!=null&&ue!==ge&&c.reference[N]/2-(ue<q?J:Z)-S[N]/2<0,ie=G?ue<q?ue-q:ue-pe:0;return{[b]:w[b]+ie,data:{[b]:ge,centerOffset:ue-ge-ie,...G&&{alignmentOffset:ie}},reset:G}}}),AA=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var s,o;const{placement:l,middlewareData:c,rects:d,initialPlacement:f,platform:m,elements:p}=n,{mainAxis:x=!0,crossAxis:g=!0,fallbackPlacements:w,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:N="none",flipAlignment:S=!0,...C}=bs(e,n);if((s=c.arrow)!=null&&s.alignmentOffset)return{};const k=Ss(l),P=Fr(f),E=Ss(f)===f,R=await(m.isRTL==null?void 0:m.isRTL(p.floating)),L=w||(E||!S?[uu(f)]:NA(f)),B=N!=="none";!w&&B&&L.push(...kA(f,S,N,R));const T=[f,...L],I=await m.detectOverflow(n,C),W=[];let J=((o=c.flip)==null?void 0:o.overflows)||[];if(x&&W.push(I[k]),g){const ue=SA(l,d,R);W.push(I[ue[0]],I[ue[1]])}if(J=[...J,{placement:l,overflows:W}],!W.every(ue=>ue<=0)){var Z,q;const ue=(((Z=c.flip)==null?void 0:Z.index)||0)+1,ge=T[ue];if(ge&&(!(g==="alignment"?P!==Fr(ge):!1)||J.every(F=>Fr(F.placement)===P?F.overflows[0]>0:!0)))return{data:{index:ue,overflows:J},reset:{placement:ge}};let G=(q=J.filter(ie=>ie.overflows[0]<=0).sort((ie,F)=>ie.overflows[1]-F.overflows[1])[0])==null?void 0:q.placement;if(!G)switch(b){case"bestFit":{var pe;const ie=(pe=J.filter(F=>{if(B){const se=Fr(F.placement);return se===P||se==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(se=>se>0).reduce((se,ne)=>se+ne,0)]).sort((F,se)=>F[1]-se[1])[0])==null?void 0:pe[0];ie&&(G=ie);break}case"initialPlacement":G=f;break}if(l!==G)return{reset:{placement:G}}}return{}}}};function Gy(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function Xy(e){return yA.some(n=>e[n]>=0)}const MA=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:s,platform:o}=n,{strategy:l="referenceHidden",...c}=bs(e,n);switch(l){case"referenceHidden":{const d=await o.detectOverflow(n,{...c,elementContext:"reference"}),f=Gy(d,s.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:Xy(f)}}}case"escaped":{const d=await o.detectOverflow(n,{...c,altBoundary:!0}),f=Gy(d,s.floating);return{data:{escapedOffsets:f,escaped:Xy(f)}}}default:return{}}}}},kb=new Set(["left","top"]);async function IA(e,n){const{placement:s,platform:o,elements:l}=e,c=await(o.isRTL==null?void 0:o.isRTL(l.floating)),d=Ss(s),f=hi(s),m=Fr(s)==="y",p=kb.has(d)?-1:1,x=c&&m?-1:1,g=bs(n,e);let{mainAxis:w,crossAxis:b,alignmentAxis:N}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return f&&typeof N=="number"&&(b=f==="end"?N*-1:N),m?{x:b*x,y:w*p}:{x:w*p,y:b*x}}const DA=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var s,o;const{x:l,y:c,placement:d,middlewareData:f}=n,m=await IA(n,e);return d===((s=f.offset)==null?void 0:s.placement)&&(o=f.arrow)!=null&&o.alignmentOffset?{}:{x:l+m.x,y:c+m.y,data:{...m,placement:d}}}}},OA=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:s,y:o,placement:l,platform:c}=n,{mainAxis:d=!0,crossAxis:f=!1,limiter:m={fn:k=>{let{x:P,y:E}=k;return{x:P,y:E}}},...p}=bs(e,n),x={x:s,y:o},g=await c.detectOverflow(n,p),w=Fr(Ss(l)),b=_h(w);let N=x[b],S=x[w];if(d){const k=b==="y"?"top":"left",P=b==="y"?"bottom":"right",E=N+g[k],R=N-g[P];N=Rm(E,N,R)}if(f){const k=w==="y"?"top":"left",P=w==="y"?"bottom":"right",E=S+g[k],R=S-g[P];S=Rm(E,S,R)}const C=m.fn({...n,[b]:N,[w]:S});return{...C,data:{x:C.x-s,y:C.y-o,enabled:{[b]:d,[w]:f}}}}}},LA=function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:s,y:o,placement:l,rects:c,middlewareData:d}=n,{offset:f=0,mainAxis:m=!0,crossAxis:p=!0}=bs(e,n),x={x:s,y:o},g=Fr(l),w=_h(g);let b=x[w],N=x[g];const S=bs(f,n),C=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(m){const E=w==="y"?"height":"width",R=c.reference[w]-c.floating[E]+C.mainAxis,L=c.reference[w]+c.reference[E]-C.mainAxis;b<R?b=R:b>L&&(b=L)}if(p){var k,P;const E=w==="y"?"width":"height",R=kb.has(Ss(l)),L=c.reference[g]-c.floating[E]+(R&&((k=d.offset)==null?void 0:k[g])||0)+(R?0:C.crossAxis),B=c.reference[g]+c.reference[E]+(R?0:((P=d.offset)==null?void 0:P[g])||0)-(R?C.crossAxis:0);N<L?N=L:N>B&&(N=B)}return{[w]:b,[g]:N}}}},zA=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){var s,o;const{placement:l,rects:c,platform:d,elements:f}=n,{apply:m=()=>{},...p}=bs(e,n),x=await d.detectOverflow(n,p),g=Ss(l),w=hi(l),b=Fr(l)==="y",{width:N,height:S}=c.floating;let C,k;g==="top"||g==="bottom"?(C=g,k=w===(await(d.isRTL==null?void 0:d.isRTL(f.floating))?"start":"end")?"left":"right"):(k=g,C=w==="end"?"top":"bottom");const P=S-x.top-x.bottom,E=N-x.left-x.right,R=po(S-x[C],P),L=po(N-x[k],E),B=!n.middlewareData.shift;let T=R,I=L;if((s=n.middlewareData.shift)!=null&&s.enabled.x&&(I=E),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(T=P),B&&!w){const J=Un(x.left,0),Z=Un(x.right,0),q=Un(x.top,0),pe=Un(x.bottom,0);b?I=N-2*(J!==0||Z!==0?J+Z:Un(x.left,x.right)):T=S-2*(q!==0||pe!==0?q+pe:Un(x.top,x.bottom))}await m({...n,availableWidth:I,availableHeight:T});const W=await d.getDimensions(f.floating);return N!==W.width||S!==W.height?{reset:{rects:!0}}:{}}}};function Mu(){return typeof window<"u"}function pi(e){return Rb(e)?(e.nodeName||"").toLowerCase():"#document"}function Bn(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function Yr(e){var n;return(n=(Rb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function Rb(e){return Mu()?e instanceof Node||e instanceof Bn(e).Node:!1}function wr(e){return Mu()?e instanceof Element||e instanceof Bn(e).Element:!1}function Vr(e){return Mu()?e instanceof HTMLElement||e instanceof Bn(e).HTMLElement:!1}function Jy(e){return!Mu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Bn(e).ShadowRoot}const FA=new Set(["inline","contents"]);function Rl(e){const{overflow:n,overflowX:s,overflowY:o,display:l}=br(e);return/auto|scroll|overlay|hidden|clip/.test(n+o+s)&&!FA.has(l)}const $A=new Set(["table","td","th"]);function UA(e){return $A.has(pi(e))}const BA=[":popover-open",":modal"];function Iu(e){return BA.some(n=>{try{return e.matches(n)}catch{return!1}})}const HA=["transform","translate","scale","rotate","perspective"],VA=["transform","translate","scale","rotate","perspective","filter"],WA=["paint","layout","strict","content"];function Ih(e){const n=Dh(),s=wr(e)?br(e):e;return HA.some(o=>s[o]?s[o]!=="none":!1)||(s.containerType?s.containerType!=="normal":!1)||!n&&(s.backdropFilter?s.backdropFilter!=="none":!1)||!n&&(s.filter?s.filter!=="none":!1)||VA.some(o=>(s.willChange||"").includes(o))||WA.some(o=>(s.contain||"").includes(o))}function KA(e){let n=go(e);for(;Vr(n)&&!li(n);){if(Ih(n))return n;if(Iu(n))return null;n=go(n)}return null}function Dh(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const QA=new Set(["html","body","#document"]);function li(e){return QA.has(pi(e))}function br(e){return Bn(e).getComputedStyle(e)}function Du(e){return wr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function go(e){if(pi(e)==="html")return e;const n=e.assignedSlot||e.parentNode||Jy(e)&&e.host||Yr(e);return Jy(n)?n.host:n}function Pb(e){const n=go(e);return li(n)?e.ownerDocument?e.ownerDocument.body:e.body:Vr(n)&&Rl(n)?n:Pb(n)}function hl(e,n,s){var o;n===void 0&&(n=[]),s===void 0&&(s=!0);const l=Pb(e),c=l===((o=e.ownerDocument)==null?void 0:o.body),d=Bn(l);if(c){const f=Tm(d);return n.concat(d,d.visualViewport||[],Rl(l)?l:[],f&&s?hl(f):[])}return n.concat(l,hl(l,[],s))}function Tm(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Tb(e){const n=br(e);let s=parseFloat(n.width)||0,o=parseFloat(n.height)||0;const l=Vr(e),c=l?e.offsetWidth:s,d=l?e.offsetHeight:o,f=cu(s)!==c||cu(o)!==d;return f&&(s=c,o=d),{width:s,height:o,$:f}}function Oh(e){return wr(e)?e:e.contextElement}function Wa(e){const n=Oh(e);if(!Vr(n))return Ur(1);const s=n.getBoundingClientRect(),{width:o,height:l,$:c}=Tb(n);let d=(c?cu(s.width):s.width)/o,f=(c?cu(s.height):s.height)/l;return(!d||!Number.isFinite(d))&&(d=1),(!f||!Number.isFinite(f))&&(f=1),{x:d,y:f}}const qA=Ur(0);function _b(e){const n=Bn(e);return!Dh()||!n.visualViewport?qA:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function YA(e,n,s){return n===void 0&&(n=!1),!s||n&&s!==Bn(e)?!1:n}function ta(e,n,s,o){n===void 0&&(n=!1),s===void 0&&(s=!1);const l=e.getBoundingClientRect(),c=Oh(e);let d=Ur(1);n&&(o?wr(o)&&(d=Wa(o)):d=Wa(e));const f=YA(c,s,o)?_b(c):Ur(0);let m=(l.left+f.x)/d.x,p=(l.top+f.y)/d.y,x=l.width/d.x,g=l.height/d.y;if(c){const w=Bn(c),b=o&&wr(o)?Bn(o):o;let N=w,S=Tm(N);for(;S&&o&&b!==N;){const C=Wa(S),k=S.getBoundingClientRect(),P=br(S),E=k.left+(S.clientLeft+parseFloat(P.paddingLeft))*C.x,R=k.top+(S.clientTop+parseFloat(P.paddingTop))*C.y;m*=C.x,p*=C.y,x*=C.x,g*=C.y,m+=E,p+=R,N=Bn(S),S=Tm(N)}}return du({width:x,height:g,x:m,y:p})}function Ou(e,n){const s=Du(e).scrollLeft;return n?n.left+s:ta(Yr(e)).left+s}function Ab(e,n){const s=e.getBoundingClientRect(),o=s.left+n.scrollLeft-Ou(e,s),l=s.top+n.scrollTop;return{x:o,y:l}}function GA(e){let{elements:n,rect:s,offsetParent:o,strategy:l}=e;const c=l==="fixed",d=Yr(o),f=n?Iu(n.floating):!1;if(o===d||f&&c)return s;let m={scrollLeft:0,scrollTop:0},p=Ur(1);const x=Ur(0),g=Vr(o);if((g||!g&&!c)&&((pi(o)!=="body"||Rl(d))&&(m=Du(o)),Vr(o))){const b=ta(o);p=Wa(o),x.x=b.x+o.clientLeft,x.y=b.y+o.clientTop}const w=d&&!g&&!c?Ab(d,m):Ur(0);return{width:s.width*p.x,height:s.height*p.y,x:s.x*p.x-m.scrollLeft*p.x+x.x+w.x,y:s.y*p.y-m.scrollTop*p.y+x.y+w.y}}function XA(e){return Array.from(e.getClientRects())}function JA(e){const n=Yr(e),s=Du(e),o=e.ownerDocument.body,l=Un(n.scrollWidth,n.clientWidth,o.scrollWidth,o.clientWidth),c=Un(n.scrollHeight,n.clientHeight,o.scrollHeight,o.clientHeight);let d=-s.scrollLeft+Ou(e);const f=-s.scrollTop;return br(o).direction==="rtl"&&(d+=Un(n.clientWidth,o.clientWidth)-l),{width:l,height:c,x:d,y:f}}const Zy=25;function ZA(e,n){const s=Bn(e),o=Yr(e),l=s.visualViewport;let c=o.clientWidth,d=o.clientHeight,f=0,m=0;if(l){c=l.width,d=l.height;const x=Dh();(!x||x&&n==="fixed")&&(f=l.offsetLeft,m=l.offsetTop)}const p=Ou(o);if(p<=0){const x=o.ownerDocument,g=x.body,w=getComputedStyle(g),b=x.compatMode==="CSS1Compat"&&parseFloat(w.marginLeft)+parseFloat(w.marginRight)||0,N=Math.abs(o.clientWidth-g.clientWidth-b);N<=Zy&&(c-=N)}else p<=Zy&&(c+=p);return{width:c,height:d,x:f,y:m}}const eM=new Set(["absolute","fixed"]);function tM(e,n){const s=ta(e,!0,n==="fixed"),o=s.top+e.clientTop,l=s.left+e.clientLeft,c=Vr(e)?Wa(e):Ur(1),d=e.clientWidth*c.x,f=e.clientHeight*c.y,m=l*c.x,p=o*c.y;return{width:d,height:f,x:m,y:p}}function ex(e,n,s){let o;if(n==="viewport")o=ZA(e,s);else if(n==="document")o=JA(Yr(e));else if(wr(n))o=tM(n,s);else{const l=_b(e);o={x:n.x-l.x,y:n.y-l.y,width:n.width,height:n.height}}return du(o)}function Mb(e,n){const s=go(e);return s===n||!wr(s)||li(s)?!1:br(s).position==="fixed"||Mb(s,n)}function nM(e,n){const s=n.get(e);if(s)return s;let o=hl(e,[],!1).filter(f=>wr(f)&&pi(f)!=="body"),l=null;const c=br(e).position==="fixed";let d=c?go(e):e;for(;wr(d)&&!li(d);){const f=br(d),m=Ih(d);!m&&f.position==="fixed"&&(l=null),(c?!m&&!l:!m&&f.position==="static"&&!!l&&eM.has(l.position)||Rl(d)&&!m&&Mb(e,d))?o=o.filter(x=>x!==d):l=f,d=go(d)}return n.set(e,o),o}function rM(e){let{element:n,boundary:s,rootBoundary:o,strategy:l}=e;const d=[...s==="clippingAncestors"?Iu(n)?[]:nM(n,this._c):[].concat(s),o],f=d[0],m=d.reduce((p,x)=>{const g=ex(n,x,l);return p.top=Un(g.top,p.top),p.right=po(g.right,p.right),p.bottom=po(g.bottom,p.bottom),p.left=Un(g.left,p.left),p},ex(n,f,l));return{width:m.right-m.left,height:m.bottom-m.top,x:m.left,y:m.top}}function sM(e){const{width:n,height:s}=Tb(e);return{width:n,height:s}}function oM(e,n,s){const o=Vr(n),l=Yr(n),c=s==="fixed",d=ta(e,!0,c,n);let f={scrollLeft:0,scrollTop:0};const m=Ur(0);function p(){m.x=Ou(l)}if(o||!o&&!c)if((pi(n)!=="body"||Rl(l))&&(f=Du(n)),o){const b=ta(n,!0,c,n);m.x=b.x+n.clientLeft,m.y=b.y+n.clientTop}else l&&p();c&&!o&&l&&p();const x=l&&!o&&!c?Ab(l,f):Ur(0),g=d.left+f.scrollLeft-m.x-x.x,w=d.top+f.scrollTop-m.y-x.y;return{x:g,y:w,width:d.width,height:d.height}}function Yf(e){return br(e).position==="static"}function tx(e,n){if(!Vr(e)||br(e).position==="fixed")return null;if(n)return n(e);let s=e.offsetParent;return Yr(e)===s&&(s=s.ownerDocument.body),s}function Ib(e,n){const s=Bn(e);if(Iu(e))return s;if(!Vr(e)){let l=go(e);for(;l&&!li(l);){if(wr(l)&&!Yf(l))return l;l=go(l)}return s}let o=tx(e,n);for(;o&&UA(o)&&Yf(o);)o=tx(o,n);return o&&li(o)&&Yf(o)&&!Ih(o)?s:o||KA(e)||s}const aM=async function(e){const n=this.getOffsetParent||Ib,s=this.getDimensions,o=await s(e.floating);return{reference:oM(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function iM(e){return br(e).direction==="rtl"}const lM={convertOffsetParentRelativeRectToViewportRelativeRect:GA,getDocumentElement:Yr,getClippingRect:rM,getOffsetParent:Ib,getElementRects:aM,getClientRects:XA,getDimensions:sM,getScale:Wa,isElement:wr,isRTL:iM};function Db(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function cM(e,n){let s=null,o;const l=Yr(e);function c(){var f;clearTimeout(o),(f=s)==null||f.disconnect(),s=null}function d(f,m){f===void 0&&(f=!1),m===void 0&&(m=1),c();const p=e.getBoundingClientRect(),{left:x,top:g,width:w,height:b}=p;if(f||n(),!w||!b)return;const N=Kc(g),S=Kc(l.clientWidth-(x+w)),C=Kc(l.clientHeight-(g+b)),k=Kc(x),E={rootMargin:-N+"px "+-S+"px "+-C+"px "+-k+"px",threshold:Un(0,po(1,m))||1};let R=!0;function L(B){const T=B[0].intersectionRatio;if(T!==m){if(!R)return d();T?d(!1,T):o=setTimeout(()=>{d(!1,1e-7)},1e3)}T===1&&!Db(p,e.getBoundingClientRect())&&d(),R=!1}try{s=new IntersectionObserver(L,{...E,root:l.ownerDocument})}catch{s=new IntersectionObserver(L,E)}s.observe(e)}return d(!0),c}function uM(e,n,s,o){o===void 0&&(o={});const{ancestorScroll:l=!0,ancestorResize:c=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:m=!1}=o,p=Oh(e),x=l||c?[...p?hl(p):[],...hl(n)]:[];x.forEach(k=>{l&&k.addEventListener("scroll",s,{passive:!0}),c&&k.addEventListener("resize",s)});const g=p&&f?cM(p,s):null;let w=-1,b=null;d&&(b=new ResizeObserver(k=>{let[P]=k;P&&P.target===p&&b&&(b.unobserve(n),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var E;(E=b)==null||E.observe(n)})),s()}),p&&!m&&b.observe(p),b.observe(n));let N,S=m?ta(e):null;m&&C();function C(){const k=ta(e);S&&!Db(S,k)&&s(),S=k,N=requestAnimationFrame(C)}return s(),()=>{var k;x.forEach(P=>{l&&P.removeEventListener("scroll",s),c&&P.removeEventListener("resize",s)}),g==null||g(),(k=b)==null||k.disconnect(),b=null,m&&cancelAnimationFrame(N)}}const dM=DA,fM=OA,mM=AA,hM=zA,pM=MA,nx=_A,gM=LA,vM=(e,n,s)=>{const o=new Map,l={platform:lM,...s},c={...l.platform,_c:o};return TA(e,n,{...l,platform:c})};var yM=typeof document<"u",xM=function(){},Zc=yM?v.useLayoutEffect:xM;function fu(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let s,o,l;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(s=e.length,s!==n.length)return!1;for(o=s;o--!==0;)if(!fu(e[o],n[o]))return!1;return!0}if(l=Object.keys(e),s=l.length,s!==Object.keys(n).length)return!1;for(o=s;o--!==0;)if(!{}.hasOwnProperty.call(n,l[o]))return!1;for(o=s;o--!==0;){const c=l[o];if(!(c==="_owner"&&e.$$typeof)&&!fu(e[c],n[c]))return!1}return!0}return e!==e&&n!==n}function Ob(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function rx(e,n){const s=Ob(e);return Math.round(n*s)/s}function Gf(e){const n=v.useRef(e);return Zc(()=>{n.current=e}),n}function wM(e){e===void 0&&(e={});const{placement:n="bottom",strategy:s="absolute",middleware:o=[],platform:l,elements:{reference:c,floating:d}={},transform:f=!0,whileElementsMounted:m,open:p}=e,[x,g]=v.useState({x:0,y:0,strategy:s,placement:n,middlewareData:{},isPositioned:!1}),[w,b]=v.useState(o);fu(w,o)||b(o);const[N,S]=v.useState(null),[C,k]=v.useState(null),P=v.useCallback(F=>{F!==B.current&&(B.current=F,S(F))},[]),E=v.useCallback(F=>{F!==T.current&&(T.current=F,k(F))},[]),R=c||N,L=d||C,B=v.useRef(null),T=v.useRef(null),I=v.useRef(x),W=m!=null,J=Gf(m),Z=Gf(l),q=Gf(p),pe=v.useCallback(()=>{if(!B.current||!T.current)return;const F={placement:n,strategy:s,middleware:w};Z.current&&(F.platform=Z.current),vM(B.current,T.current,F).then(se=>{const ne={...se,isPositioned:q.current!==!1};ue.current&&!fu(I.current,ne)&&(I.current=ne,jl.flushSync(()=>{g(ne)}))})},[w,n,s,Z,q]);Zc(()=>{p===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,g(F=>({...F,isPositioned:!1})))},[p]);const ue=v.useRef(!1);Zc(()=>(ue.current=!0,()=>{ue.current=!1}),[]),Zc(()=>{if(R&&(B.current=R),L&&(T.current=L),R&&L){if(J.current)return J.current(R,L,pe);pe()}},[R,L,pe,J,W]);const ge=v.useMemo(()=>({reference:B,floating:T,setReference:P,setFloating:E}),[P,E]),G=v.useMemo(()=>({reference:R,floating:L}),[R,L]),ie=v.useMemo(()=>{const F={position:s,left:0,top:0};if(!G.floating)return F;const se=rx(G.floating,x.x),ne=rx(G.floating,x.y);return f?{...F,transform:"translate("+se+"px, "+ne+"px)",...Ob(G.floating)>=1.5&&{willChange:"transform"}}:{position:s,left:se,top:ne}},[s,f,G.floating,x.x,x.y]);return v.useMemo(()=>({...x,update:pe,refs:ge,elements:G,floatingStyles:ie}),[x,pe,ge,G,ie])}const bM=e=>{function n(s){return{}.hasOwnProperty.call(s,"current")}return{name:"arrow",options:e,fn(s){const{element:o,padding:l}=typeof e=="function"?e(s):e;return o&&n(o)?o.current!=null?nx({element:o.current,padding:l}).fn(s):{}:o?nx({element:o,padding:l}).fn(s):{}}}},SM=(e,n)=>({...dM(e),options:[e,n]}),NM=(e,n)=>({...fM(e),options:[e,n]}),jM=(e,n)=>({...gM(e),options:[e,n]}),CM=(e,n)=>({...mM(e),options:[e,n]}),EM=(e,n)=>({...hM(e),options:[e,n]}),kM=(e,n)=>({...pM(e),options:[e,n]}),RM=(e,n)=>({...bM(e),options:[e,n]});var PM="Arrow",Lb=v.forwardRef((e,n)=>{const{children:s,width:o=10,height:l=5,...c}=e;return i.jsx(Fe.svg,{...c,ref:n,width:o,height:l,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?s:i.jsx("polygon",{points:"0,0 30,0 15,10"})})});Lb.displayName=PM;var TM=Lb;function zb(e){const[n,s]=v.useState(void 0);return mn(()=>{if(e){s({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(l=>{if(!Array.isArray(l)||!l.length)return;const c=l[0];let d,f;if("borderBoxSize"in c){const m=c.borderBoxSize,p=Array.isArray(m)?m[0]:m;d=p.inlineSize,f=p.blockSize}else d=e.offsetWidth,f=e.offsetHeight;s({width:d,height:f})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else s(void 0)},[e]),n}var Lh="Popper",[Fb,$b]=Qr(Lh),[_M,Ub]=Fb(Lh),Bb=e=>{const{__scopePopper:n,children:s}=e,[o,l]=v.useState(null);return i.jsx(_M,{scope:n,anchor:o,onAnchorChange:l,children:s})};Bb.displayName=Lh;var Hb="PopperAnchor",Vb=v.forwardRef((e,n)=>{const{__scopePopper:s,virtualRef:o,...l}=e,c=Ub(Hb,s),d=v.useRef(null),f=rt(n,d);return v.useEffect(()=>{c.onAnchorChange((o==null?void 0:o.current)||d.current)}),o?null:i.jsx(Fe.div,{...l,ref:f})});Vb.displayName=Hb;var zh="PopperContent",[AM,MM]=Fb(zh),Wb=v.forwardRef((e,n)=>{var X,he,ye,Ae,Ke,Me;const{__scopePopper:s,side:o="bottom",sideOffset:l=0,align:c="center",alignOffset:d=0,arrowPadding:f=0,avoidCollisions:m=!0,collisionBoundary:p=[],collisionPadding:x=0,sticky:g="partial",hideWhenDetached:w=!1,updatePositionStrategy:b="optimized",onPlaced:N,...S}=e,C=Ub(zh,s),[k,P]=v.useState(null),E=rt(n,ft=>P(ft)),[R,L]=v.useState(null),B=zb(R),T=(B==null?void 0:B.width)??0,I=(B==null?void 0:B.height)??0,W=o+(c!=="center"?"-"+c:""),J=typeof x=="number"?x:{top:0,right:0,bottom:0,left:0,...x},Z=Array.isArray(p)?p:[p],q=Z.length>0,pe={padding:J,boundary:Z.filter(DM),altBoundary:q},{refs:ue,floatingStyles:ge,placement:G,isPositioned:ie,middlewareData:F}=wM({strategy:"fixed",placement:W,whileElementsMounted:(...ft)=>uM(...ft,{animationFrame:b==="always"}),elements:{reference:C.anchor},middleware:[SM({mainAxis:l+I,alignmentAxis:d}),m&&NM({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?jM():void 0,...pe}),m&&CM({...pe}),EM({...pe,apply:({elements:ft,rects:_t,availableWidth:Vn,availableHeight:$t})=>{const{width:Zt,height:Gr}=_t.reference,At=ft.floating.style;At.setProperty("--radix-popper-available-width",`${Vn}px`),At.setProperty("--radix-popper-available-height",`${$t}px`),At.setProperty("--radix-popper-anchor-width",`${Zt}px`),At.setProperty("--radix-popper-anchor-height",`${Gr}px`)}}),R&&RM({element:R,padding:f}),OM({arrowWidth:T,arrowHeight:I}),w&&kM({strategy:"referenceHidden",...pe})]}),[se,ne]=qb(G),D=rn(N);mn(()=>{ie&&(D==null||D())},[ie,D]);const M=(X=F.arrow)==null?void 0:X.x,Y=(he=F.arrow)==null?void 0:he.y,te=((ye=F.arrow)==null?void 0:ye.centerOffset)!==0,[ee,oe]=v.useState();return mn(()=>{k&&oe(window.getComputedStyle(k).zIndex)},[k]),i.jsx("div",{ref:ue.setFloating,"data-radix-popper-content-wrapper":"",style:{...ge,transform:ie?ge.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ee,"--radix-popper-transform-origin":[(Ae=F.transformOrigin)==null?void 0:Ae.x,(Ke=F.transformOrigin)==null?void 0:Ke.y].join(" "),...((Me=F.hide)==null?void 0:Me.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:i.jsx(AM,{scope:s,placedSide:se,onArrowChange:L,arrowX:M,arrowY:Y,shouldHideArrow:te,children:i.jsx(Fe.div,{"data-side":se,"data-align":ne,...S,ref:E,style:{...S.style,animation:ie?void 0:"none"}})})})});Wb.displayName=zh;var Kb="PopperArrow",IM={top:"bottom",right:"left",bottom:"top",left:"right"},Qb=v.forwardRef(function(n,s){const{__scopePopper:o,...l}=n,c=MM(Kb,o),d=IM[c.placedSide];return i.jsx("span",{ref:c.onArrowChange,style:{position:"absolute",left:c.arrowX,top:c.arrowY,[d]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[c.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[c.placedSide],visibility:c.shouldHideArrow?"hidden":void 0},children:i.jsx(TM,{...l,ref:s,style:{...l.style,display:"block"}})})});Qb.displayName=Kb;function DM(e){return e!==null}var OM=e=>({name:"transformOrigin",options:e,fn(n){var C,k,P;const{placement:s,rects:o,middlewareData:l}=n,d=((C=l.arrow)==null?void 0:C.centerOffset)!==0,f=d?0:e.arrowWidth,m=d?0:e.arrowHeight,[p,x]=qb(s),g={start:"0%",center:"50%",end:"100%"}[x],w=(((k=l.arrow)==null?void 0:k.x)??0)+f/2,b=(((P=l.arrow)==null?void 0:P.y)??0)+m/2;let N="",S="";return p==="bottom"?(N=d?g:`${w}px`,S=`${-m}px`):p==="top"?(N=d?g:`${w}px`,S=`${o.floating.height+m}px`):p==="right"?(N=`${-m}px`,S=d?g:`${b}px`):p==="left"&&(N=`${o.floating.width+m}px`,S=d?g:`${b}px`),{data:{x:N,y:S}}}});function qb(e){const[n,s="center"]=e.split("-");return[n,s]}var LM=Bb,zM=Vb,FM=Wb,$M=Qb;function Yb(e){const n=v.useRef({value:e,previous:e});return v.useMemo(()=>(n.current.value!==e&&(n.current.previous=n.current.value,n.current.value=e),n.current.previous),[e])}var UM="VisuallyHidden",Gb=v.forwardRef((e,n)=>i.jsx(Fe.span,{...e,ref:n,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Gb.displayName=UM;var BM=[" ","Enter","ArrowUp","ArrowDown"],HM=[" ","Enter"],Pl="Select",[Lu,zu,VM]=Dw(Pl),[gi]=Qr(Pl,[VM,$b]),Fu=$b(),[WM,yo]=gi(Pl),[KM,QM]=gi(Pl),Xb=e=>{const{__scopeSelect:n,children:s,open:o,defaultOpen:l,onOpenChange:c,value:d,defaultValue:f,onValueChange:m,dir:p,name:x,autoComplete:g,disabled:w,required:b,form:N}=e,S=Fu(n),[C,k]=v.useState(null),[P,E]=v.useState(null),[R,L]=v.useState(!1),B=Ru(p),[T=!1,I]=ai({prop:o,defaultProp:l,onChange:c}),[W,J]=ai({prop:d,defaultProp:f,onChange:m}),Z=v.useRef(null),q=C?N||!!C.closest("form"):!0,[pe,ue]=v.useState(new Set),ge=Array.from(pe).map(G=>G.props.value).join(";");return i.jsx(LM,{...S,children:i.jsxs(WM,{required:b,scope:n,trigger:C,onTriggerChange:k,valueNode:P,onValueNodeChange:E,valueNodeHasChildren:R,onValueNodeHasChildrenChange:L,contentId:An(),value:W,onValueChange:J,open:T,onOpenChange:I,dir:B,triggerPointerDownPosRef:Z,disabled:w,children:[i.jsx(Lu.Provider,{scope:n,children:i.jsx(KM,{scope:e.__scopeSelect,onNativeOptionAdd:v.useCallback(G=>{ue(ie=>new Set(ie).add(G))},[]),onNativeOptionRemove:v.useCallback(G=>{ue(ie=>{const F=new Set(ie);return F.delete(G),F})},[]),children:s})}),q?i.jsxs(w1,{"aria-hidden":!0,required:b,tabIndex:-1,name:x,autoComplete:g,value:W,onChange:G=>J(G.target.value),disabled:w,form:N,children:[W===void 0?i.jsx("option",{value:""}):null,Array.from(pe)]},ge):null]})})};Xb.displayName=Pl;var Jb="SelectTrigger",Zb=v.forwardRef((e,n)=>{const{__scopeSelect:s,disabled:o=!1,...l}=e,c=Fu(s),d=yo(Jb,s),f=d.disabled||o,m=rt(n,d.onTriggerChange),p=zu(s),x=v.useRef("touch"),[g,w,b]=b1(S=>{const C=p().filter(E=>!E.disabled),k=C.find(E=>E.value===d.value),P=S1(C,S,k);P!==void 0&&d.onValueChange(P.value)}),N=S=>{f||(d.onOpenChange(!0),b()),S&&(d.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return i.jsx(zM,{asChild:!0,...c,children:i.jsx(Fe.button,{type:"button",role:"combobox","aria-controls":d.contentId,"aria-expanded":d.open,"aria-required":d.required,"aria-autocomplete":"none",dir:d.dir,"data-state":d.open?"open":"closed",disabled:f,"data-disabled":f?"":void 0,"data-placeholder":x1(d.value)?"":void 0,...l,ref:m,onClick:We(l.onClick,S=>{S.currentTarget.focus(),x.current!=="mouse"&&N(S)}),onPointerDown:We(l.onPointerDown,S=>{x.current=S.pointerType;const C=S.target;C.hasPointerCapture(S.pointerId)&&C.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(N(S),S.preventDefault())}),onKeyDown:We(l.onKeyDown,S=>{const C=g.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&w(S.key),!(C&&S.key===" ")&&BM.includes(S.key)&&(N(),S.preventDefault())})})})});Zb.displayName=Jb;var e1="SelectValue",t1=v.forwardRef((e,n)=>{const{__scopeSelect:s,className:o,style:l,children:c,placeholder:d="",...f}=e,m=yo(e1,s),{onValueNodeHasChildrenChange:p}=m,x=c!==void 0,g=rt(n,m.onValueNodeChange);return mn(()=>{p(x)},[p,x]),i.jsx(Fe.span,{...f,ref:g,style:{pointerEvents:"none"},children:x1(m.value)?i.jsx(i.Fragment,{children:d}):c})});t1.displayName=e1;var qM="SelectIcon",n1=v.forwardRef((e,n)=>{const{__scopeSelect:s,children:o,...l}=e;return i.jsx(Fe.span,{"aria-hidden":!0,...l,ref:n,children:o||"▼"})});n1.displayName=qM;var YM="SelectPortal",r1=e=>i.jsx(vh,{asChild:!0,...e});r1.displayName=YM;var na="SelectContent",s1=v.forwardRef((e,n)=>{const s=yo(na,e.__scopeSelect),[o,l]=v.useState();if(mn(()=>{l(new DocumentFragment)},[]),!s.open){const c=o;return c?jl.createPortal(i.jsx(o1,{scope:e.__scopeSelect,children:i.jsx(Lu.Slot,{scope:e.__scopeSelect,children:i.jsx("div",{children:e.children})})}),c):null}return i.jsx(a1,{...e,ref:n})});s1.displayName=na;var vr=10,[o1,xo]=gi(na),GM="SelectContentImpl",a1=v.forwardRef((e,n)=>{const{__scopeSelect:s,position:o="item-aligned",onCloseAutoFocus:l,onEscapeKeyDown:c,onPointerDownOutside:d,side:f,sideOffset:m,align:p,alignOffset:x,arrowPadding:g,collisionBoundary:w,collisionPadding:b,sticky:N,hideWhenDetached:S,avoidCollisions:C,...k}=e,P=yo(na,s),[E,R]=v.useState(null),[L,B]=v.useState(null),T=rt(n,X=>R(X)),[I,W]=v.useState(null),[J,Z]=v.useState(null),q=zu(s),[pe,ue]=v.useState(!1),ge=v.useRef(!1);v.useEffect(()=>{if(E)return ew(E)},[E]),W0();const G=v.useCallback(X=>{const[he,...ye]=q().map(Me=>Me.ref.current),[Ae]=ye.slice(-1),Ke=document.activeElement;for(const Me of X)if(Me===Ke||(Me==null||Me.scrollIntoView({block:"nearest"}),Me===he&&L&&(L.scrollTop=0),Me===Ae&&L&&(L.scrollTop=L.scrollHeight),Me==null||Me.focus(),document.activeElement!==Ke))return},[q,L]),ie=v.useCallback(()=>G([I,E]),[G,I,E]);v.useEffect(()=>{pe&&ie()},[pe,ie]);const{onOpenChange:F,triggerPointerDownPosRef:se}=P;v.useEffect(()=>{if(E){let X={x:0,y:0};const he=Ae=>{var Ke,Me;X={x:Math.abs(Math.round(Ae.pageX)-(((Ke=se.current)==null?void 0:Ke.x)??0)),y:Math.abs(Math.round(Ae.pageY)-(((Me=se.current)==null?void 0:Me.y)??0))}},ye=Ae=>{X.x<=10&&X.y<=10?Ae.preventDefault():E.contains(Ae.target)||F(!1),document.removeEventListener("pointermove",he),se.current=null};return se.current!==null&&(document.addEventListener("pointermove",he),document.addEventListener("pointerup",ye,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",he),document.removeEventListener("pointerup",ye,{capture:!0})}}},[E,F,se]),v.useEffect(()=>{const X=()=>F(!1);return window.addEventListener("blur",X),window.addEventListener("resize",X),()=>{window.removeEventListener("blur",X),window.removeEventListener("resize",X)}},[F]);const[ne,D]=b1(X=>{const he=q().filter(Ke=>!Ke.disabled),ye=he.find(Ke=>Ke.ref.current===document.activeElement),Ae=S1(he,X,ye);Ae&&setTimeout(()=>Ae.ref.current.focus())}),M=v.useCallback((X,he,ye)=>{const Ae=!ge.current&&!ye;(P.value!==void 0&&P.value===he||Ae)&&(W(X),Ae&&(ge.current=!0))},[P.value]),Y=v.useCallback(()=>E==null?void 0:E.focus(),[E]),te=v.useCallback((X,he,ye)=>{const Ae=!ge.current&&!ye;(P.value!==void 0&&P.value===he||Ae)&&Z(X)},[P.value]),ee=o==="popper"?_m:i1,oe=ee===_m?{side:f,sideOffset:m,align:p,alignOffset:x,arrowPadding:g,collisionBoundary:w,collisionPadding:b,sticky:N,hideWhenDetached:S,avoidCollisions:C}:{};return i.jsx(o1,{scope:s,content:E,viewport:L,onViewportChange:B,itemRefCallback:M,selectedItem:I,onItemLeave:Y,itemTextRefCallback:te,focusSelectedItem:ie,selectedItemText:J,position:o,isPositioned:pe,searchRef:ne,children:i.jsx(yh,{as:mo,allowPinchZoom:!0,children:i.jsx(gh,{asChild:!0,trapped:P.open,onMountAutoFocus:X=>{X.preventDefault()},onUnmountAutoFocus:We(l,X=>{var he;(he=P.trigger)==null||he.focus({preventScroll:!0}),X.preventDefault()}),children:i.jsx(ph,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:X=>X.preventDefault(),onDismiss:()=>P.onOpenChange(!1),children:i.jsx(ee,{role:"listbox",id:P.contentId,"data-state":P.open?"open":"closed",dir:P.dir,onContextMenu:X=>X.preventDefault(),...k,...oe,onPlaced:()=>ue(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...k.style},onKeyDown:We(k.onKeyDown,X=>{const he=X.ctrlKey||X.altKey||X.metaKey;if(X.key==="Tab"&&X.preventDefault(),!he&&X.key.length===1&&D(X.key),["ArrowUp","ArrowDown","Home","End"].includes(X.key)){let Ae=q().filter(Ke=>!Ke.disabled).map(Ke=>Ke.ref.current);if(["ArrowUp","End"].includes(X.key)&&(Ae=Ae.slice().reverse()),["ArrowUp","ArrowDown"].includes(X.key)){const Ke=X.target,Me=Ae.indexOf(Ke);Ae=Ae.slice(Me+1)}setTimeout(()=>G(Ae)),X.preventDefault()}})})})})})})});a1.displayName=GM;var XM="SelectItemAlignedPosition",i1=v.forwardRef((e,n)=>{const{__scopeSelect:s,onPlaced:o,...l}=e,c=yo(na,s),d=xo(na,s),[f,m]=v.useState(null),[p,x]=v.useState(null),g=rt(n,T=>x(T)),w=zu(s),b=v.useRef(!1),N=v.useRef(!0),{viewport:S,selectedItem:C,selectedItemText:k,focusSelectedItem:P}=d,E=v.useCallback(()=>{if(c.trigger&&c.valueNode&&f&&p&&S&&C&&k){const T=c.trigger.getBoundingClientRect(),I=p.getBoundingClientRect(),W=c.valueNode.getBoundingClientRect(),J=k.getBoundingClientRect();if(c.dir!=="rtl"){const Ke=J.left-I.left,Me=W.left-Ke,ft=T.left-Me,_t=T.width+ft,Vn=Math.max(_t,I.width),$t=window.innerWidth-vr,Zt=km(Me,[vr,Math.max(vr,$t-Vn)]);f.style.minWidth=_t+"px",f.style.left=Zt+"px"}else{const Ke=I.right-J.right,Me=window.innerWidth-W.right-Ke,ft=window.innerWidth-T.right-Me,_t=T.width+ft,Vn=Math.max(_t,I.width),$t=window.innerWidth-vr,Zt=km(Me,[vr,Math.max(vr,$t-Vn)]);f.style.minWidth=_t+"px",f.style.right=Zt+"px"}const Z=w(),q=window.innerHeight-vr*2,pe=S.scrollHeight,ue=window.getComputedStyle(p),ge=parseInt(ue.borderTopWidth,10),G=parseInt(ue.paddingTop,10),ie=parseInt(ue.borderBottomWidth,10),F=parseInt(ue.paddingBottom,10),se=ge+G+pe+F+ie,ne=Math.min(C.offsetHeight*5,se),D=window.getComputedStyle(S),M=parseInt(D.paddingTop,10),Y=parseInt(D.paddingBottom,10),te=T.top+T.height/2-vr,ee=q-te,oe=C.offsetHeight/2,X=C.offsetTop+oe,he=ge+G+X,ye=se-he;if(he<=te){const Ke=Z.length>0&&C===Z[Z.length-1].ref.current;f.style.bottom="0px";const Me=p.clientHeight-S.offsetTop-S.offsetHeight,ft=Math.max(ee,oe+(Ke?Y:0)+Me+ie),_t=he+ft;f.style.height=_t+"px"}else{const Ke=Z.length>0&&C===Z[0].ref.current;f.style.top="0px";const ft=Math.max(te,ge+S.offsetTop+(Ke?M:0)+oe)+ye;f.style.height=ft+"px",S.scrollTop=he-te+S.offsetTop}f.style.margin=`${vr}px 0`,f.style.minHeight=ne+"px",f.style.maxHeight=q+"px",o==null||o(),requestAnimationFrame(()=>b.current=!0)}},[w,c.trigger,c.valueNode,f,p,S,C,k,c.dir,o]);mn(()=>E(),[E]);const[R,L]=v.useState();mn(()=>{p&&L(window.getComputedStyle(p).zIndex)},[p]);const B=v.useCallback(T=>{T&&N.current===!0&&(E(),P==null||P(),N.current=!1)},[E,P]);return i.jsx(ZM,{scope:s,contentWrapper:f,shouldExpandOnScrollRef:b,onScrollButtonChange:B,children:i.jsx("div",{ref:m,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:i.jsx(Fe.div,{...l,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...l.style}})})})});i1.displayName=XM;var JM="SelectPopperPosition",_m=v.forwardRef((e,n)=>{const{__scopeSelect:s,align:o="start",collisionPadding:l=vr,...c}=e,d=Fu(s);return i.jsx(FM,{...d,...c,ref:n,align:o,collisionPadding:l,style:{boxSizing:"border-box",...c.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});_m.displayName=JM;var[ZM,Fh]=gi(na,{}),Am="SelectViewport",l1=v.forwardRef((e,n)=>{const{__scopeSelect:s,nonce:o,...l}=e,c=xo(Am,s),d=Fh(Am,s),f=rt(n,c.onViewportChange),m=v.useRef(0);return i.jsxs(i.Fragment,{children:[i.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),i.jsx(Lu.Slot,{scope:s,children:i.jsx(Fe.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:f,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:We(l.onScroll,p=>{const x=p.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:w}=d;if(w!=null&&w.current&&g){const b=Math.abs(m.current-x.scrollTop);if(b>0){const N=window.innerHeight-vr*2,S=parseFloat(g.style.minHeight),C=parseFloat(g.style.height),k=Math.max(S,C);if(k<N){const P=k+b,E=Math.min(N,P),R=P-E;g.style.height=E+"px",g.style.bottom==="0px"&&(x.scrollTop=R>0?R:0,g.style.justifyContent="flex-end")}}}m.current=x.scrollTop})})})]})});l1.displayName=Am;var c1="SelectGroup",[eI,tI]=gi(c1),nI=v.forwardRef((e,n)=>{const{__scopeSelect:s,...o}=e,l=An();return i.jsx(eI,{scope:s,id:l,children:i.jsx(Fe.div,{role:"group","aria-labelledby":l,...o,ref:n})})});nI.displayName=c1;var u1="SelectLabel",rI=v.forwardRef((e,n)=>{const{__scopeSelect:s,...o}=e,l=tI(u1,s);return i.jsx(Fe.div,{id:l.id,...o,ref:n})});rI.displayName=u1;var mu="SelectItem",[sI,d1]=gi(mu),f1=v.forwardRef((e,n)=>{const{__scopeSelect:s,value:o,disabled:l=!1,textValue:c,...d}=e,f=yo(mu,s),m=xo(mu,s),p=f.value===o,[x,g]=v.useState(c??""),[w,b]=v.useState(!1),N=rt(n,P=>{var E;return(E=m.itemRefCallback)==null?void 0:E.call(m,P,o,l)}),S=An(),C=v.useRef("touch"),k=()=>{l||(f.onValueChange(o),f.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return i.jsx(sI,{scope:s,value:o,disabled:l,textId:S,isSelected:p,onItemTextChange:v.useCallback(P=>{g(E=>E||((P==null?void 0:P.textContent)??"").trim())},[]),children:i.jsx(Lu.ItemSlot,{scope:s,value:o,disabled:l,textValue:x,children:i.jsx(Fe.div,{role:"option","aria-labelledby":S,"data-highlighted":w?"":void 0,"aria-selected":p&&w,"data-state":p?"checked":"unchecked","aria-disabled":l||void 0,"data-disabled":l?"":void 0,tabIndex:l?void 0:-1,...d,ref:N,onFocus:We(d.onFocus,()=>b(!0)),onBlur:We(d.onBlur,()=>b(!1)),onClick:We(d.onClick,()=>{C.current!=="mouse"&&k()}),onPointerUp:We(d.onPointerUp,()=>{C.current==="mouse"&&k()}),onPointerDown:We(d.onPointerDown,P=>{C.current=P.pointerType}),onPointerMove:We(d.onPointerMove,P=>{var E;C.current=P.pointerType,l?(E=m.onItemLeave)==null||E.call(m):C.current==="mouse"&&P.currentTarget.focus({preventScroll:!0})}),onPointerLeave:We(d.onPointerLeave,P=>{var E;P.currentTarget===document.activeElement&&((E=m.onItemLeave)==null||E.call(m))}),onKeyDown:We(d.onKeyDown,P=>{var R;((R=m.searchRef)==null?void 0:R.current)!==""&&P.key===" "||(HM.includes(P.key)&&k(),P.key===" "&&P.preventDefault())})})})})});f1.displayName=mu;var il="SelectItemText",m1=v.forwardRef((e,n)=>{const{__scopeSelect:s,className:o,style:l,...c}=e,d=yo(il,s),f=xo(il,s),m=d1(il,s),p=QM(il,s),[x,g]=v.useState(null),w=rt(n,k=>g(k),m.onItemTextChange,k=>{var P;return(P=f.itemTextRefCallback)==null?void 0:P.call(f,k,m.value,m.disabled)}),b=x==null?void 0:x.textContent,N=v.useMemo(()=>i.jsx("option",{value:m.value,disabled:m.disabled,children:b},m.value),[m.disabled,m.value,b]),{onNativeOptionAdd:S,onNativeOptionRemove:C}=p;return mn(()=>(S(N),()=>C(N)),[S,C,N]),i.jsxs(i.Fragment,{children:[i.jsx(Fe.span,{id:m.textId,...c,ref:w}),m.isSelected&&d.valueNode&&!d.valueNodeHasChildren?jl.createPortal(c.children,d.valueNode):null]})});m1.displayName=il;var h1="SelectItemIndicator",p1=v.forwardRef((e,n)=>{const{__scopeSelect:s,...o}=e;return d1(h1,s).isSelected?i.jsx(Fe.span,{"aria-hidden":!0,...o,ref:n}):null});p1.displayName=h1;var Mm="SelectScrollUpButton",g1=v.forwardRef((e,n)=>{const s=xo(Mm,e.__scopeSelect),o=Fh(Mm,e.__scopeSelect),[l,c]=v.useState(!1),d=rt(n,o.onScrollButtonChange);return mn(()=>{if(s.viewport&&s.isPositioned){let f=function(){const p=m.scrollTop>0;c(p)};const m=s.viewport;return f(),m.addEventListener("scroll",f),()=>m.removeEventListener("scroll",f)}},[s.viewport,s.isPositioned]),l?i.jsx(y1,{...e,ref:d,onAutoScroll:()=>{const{viewport:f,selectedItem:m}=s;f&&m&&(f.scrollTop=f.scrollTop-m.offsetHeight)}}):null});g1.displayName=Mm;var Im="SelectScrollDownButton",v1=v.forwardRef((e,n)=>{const s=xo(Im,e.__scopeSelect),o=Fh(Im,e.__scopeSelect),[l,c]=v.useState(!1),d=rt(n,o.onScrollButtonChange);return mn(()=>{if(s.viewport&&s.isPositioned){let f=function(){const p=m.scrollHeight-m.clientHeight,x=Math.ceil(m.scrollTop)<p;c(x)};const m=s.viewport;return f(),m.addEventListener("scroll",f),()=>m.removeEventListener("scroll",f)}},[s.viewport,s.isPositioned]),l?i.jsx(y1,{...e,ref:d,onAutoScroll:()=>{const{viewport:f,selectedItem:m}=s;f&&m&&(f.scrollTop=f.scrollTop+m.offsetHeight)}}):null});v1.displayName=Im;var y1=v.forwardRef((e,n)=>{const{__scopeSelect:s,onAutoScroll:o,...l}=e,c=xo("SelectScrollButton",s),d=v.useRef(null),f=zu(s),m=v.useCallback(()=>{d.current!==null&&(window.clearInterval(d.current),d.current=null)},[]);return v.useEffect(()=>()=>m(),[m]),mn(()=>{var x;const p=f().find(g=>g.ref.current===document.activeElement);(x=p==null?void 0:p.ref.current)==null||x.scrollIntoView({block:"nearest"})},[f]),i.jsx(Fe.div,{"aria-hidden":!0,...l,ref:n,style:{flexShrink:0,...l.style},onPointerDown:We(l.onPointerDown,()=>{d.current===null&&(d.current=window.setInterval(o,50))}),onPointerMove:We(l.onPointerMove,()=>{var p;(p=c.onItemLeave)==null||p.call(c),d.current===null&&(d.current=window.setInterval(o,50))}),onPointerLeave:We(l.onPointerLeave,()=>{m()})})}),oI="SelectSeparator",aI=v.forwardRef((e,n)=>{const{__scopeSelect:s,...o}=e;return i.jsx(Fe.div,{"aria-hidden":!0,...o,ref:n})});aI.displayName=oI;var Dm="SelectArrow",iI=v.forwardRef((e,n)=>{const{__scopeSelect:s,...o}=e,l=Fu(s),c=yo(Dm,s),d=xo(Dm,s);return c.open&&d.position==="popper"?i.jsx($M,{...l,...o,ref:n}):null});iI.displayName=Dm;function x1(e){return e===""||e===void 0}var w1=v.forwardRef((e,n)=>{const{value:s,...o}=e,l=v.useRef(null),c=rt(n,l),d=Yb(s);return v.useEffect(()=>{const f=l.current,m=window.HTMLSelectElement.prototype,x=Object.getOwnPropertyDescriptor(m,"value").set;if(d!==s&&x){const g=new Event("change",{bubbles:!0});x.call(f,s),f.dispatchEvent(g)}},[d,s]),i.jsx(Gb,{asChild:!0,children:i.jsx("select",{...o,ref:c,defaultValue:s})})});w1.displayName="BubbleSelect";function b1(e){const n=rn(e),s=v.useRef(""),o=v.useRef(0),l=v.useCallback(d=>{const f=s.current+d;n(f),(function m(p){s.current=p,window.clearTimeout(o.current),p!==""&&(o.current=window.setTimeout(()=>m(""),1e3))})(f)},[n]),c=v.useCallback(()=>{s.current="",window.clearTimeout(o.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(o.current),[]),[s,l,c]}function S1(e,n,s){const l=n.length>1&&Array.from(n).every(p=>p===n[0])?n[0]:n,c=s?e.indexOf(s):-1;let d=lI(e,Math.max(c,0));l.length===1&&(d=d.filter(p=>p!==s));const m=d.find(p=>p.textValue.toLowerCase().startsWith(l.toLowerCase()));return m!==s?m:void 0}function lI(e,n){return e.map((s,o)=>e[(n+o)%e.length])}var cI=Xb,uI=Zb,dI=t1,fI=n1,mI=r1,hI=s1,pI=l1,gI=f1,vI=m1,yI=p1,xI=g1,wI=v1;function ra({...e}){return i.jsx(cI,{"data-slot":"select",...e})}function sa({...e}){return i.jsx(dI,{"data-slot":"select-value",...e})}function oa({className:e,size:n="default",children:s,...o}){return i.jsxs(uI,{"data-slot":"select-trigger","data-size":n,className:ze("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-full items-center justify-between gap-2 rounded-md border bg-input-background px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o,children:[s,i.jsx(fI,{asChild:!0,children:i.jsx(oi,{className:"size-4 opacity-50"})})]})}function aa({className:e,children:n,position:s="popper",...o}){return i.jsx(mI,{children:i.jsxs(hI,{"data-slot":"select-content",className:ze("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",s==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:s,...o,children:[i.jsx(bI,{}),i.jsx(pI,{className:ze("p-1",s==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:n}),i.jsx(SI,{})]})})}function Ct({className:e,children:n,...s}){return i.jsxs(gI,{"data-slot":"select-item",className:ze("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...s,children:[i.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:i.jsx(yI,{children:i.jsx(Hr,{className:"size-4"})})}),i.jsx(vI,{children:n})]})}function bI({className:e,...n}){return i.jsx(xI,{"data-slot":"select-scroll-up-button",className:ze("flex cursor-default items-center justify-center py-1",e),...n,children:i.jsx(oh,{className:"size-4"})})}function SI({className:e,...n}){return i.jsx(wI,{"data-slot":"select-scroll-down-button",className:ze("flex cursor-default items-center justify-center py-1",e),...n,children:i.jsx(oi,{className:"size-4"})})}function $h({open:e,onOpenChange:n,category:s}){const[o,l]=v.useState(s||"knowledge"),[c,d]=v.useState(""),[f,m]=v.useState(""),[p,x]=v.useState(""),[g,w]=v.useState([]),[b,N]=v.useState(""),S=bR(),C={knowledge:["insight","decision","pattern"],entity:["project","contact","tool"],event:["session","log"]},k=()=>{b.trim()&&!g.includes(b.trim())&&(w([...g,b.trim()]),N(""))},P=R=>{w(g.filter(L=>L!==R))},E=()=>{if(!c||!f||!p){$e.error("Please fill in all required fields");return}S.mutate({kind:c,title:f,body:p,tags:g.length>0?g:void 0},{onSuccess:()=>{$e.success("Entry created"),d(""),m(""),x(""),w([]),N(""),n(!1)},onError:R=>{R instanceof di?R.status===403?$e.error("Entry limit reached",{description:"Upgrade your plan to add more entries."}):R.status===400?$e.error("Validation error",{description:R.message}):$e.error("Failed to create entry",{description:R.message}):$e.error("Failed to create entry")}})};return i.jsx(Ew,{open:e,onOpenChange:n,children:i.jsxs(kw,{className:"sm:max-w-2xl max-h-[90vh] overflow-y-auto",children:[i.jsx(Rw,{children:i.jsx(Pw,{children:"New Entry"})}),i.jsxs("div",{className:"space-y-4 py-4",children:[i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(dt,{children:"Category *"}),i.jsxs(ra,{value:o,onValueChange:R=>l(R),children:[i.jsx(oa,{children:i.jsx(sa,{})}),i.jsxs(aa,{children:[i.jsx(Ct,{value:"knowledge",children:"Knowledge"}),i.jsx(Ct,{value:"entity",children:"Entity"}),i.jsx(Ct,{value:"event",children:"Event"})]})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(dt,{children:"Kind *"}),i.jsxs(ra,{value:c,onValueChange:d,children:[i.jsx(oa,{children:i.jsx(sa,{placeholder:"Select kind"})}),i.jsx(aa,{children:C[o].map(R=>i.jsx(Ct,{value:R,children:R},R))})]})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(dt,{children:"Title *"}),i.jsx(sn,{value:f,onChange:R=>m(R.target.value),placeholder:"Enter entry title..."})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(dt,{children:"Body *"}),i.jsx(Cb,{value:p,onChange:R=>x(R.target.value),placeholder:`# Entry Title
|
|
343
|
+
|
|
344
|
+
Your content in Markdown...`,className:"min-h-[200px] font-mono text-sm"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(dt,{children:"Tags"}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx(sn,{value:b,onChange:R=>N(R.target.value),onKeyDown:R=>R.key==="Enter"&&(R.preventDefault(),k()),placeholder:"Add tag..."}),i.jsx(Ee,{type:"button",onClick:k,variant:"outline",children:"Add"})]}),g.length>0&&i.jsx("div",{className:"flex flex-wrap gap-1 mt-2",children:g.map(R=>i.jsxs(ht,{variant:"outline",className:"gap-1",children:[R,i.jsx("button",{onClick:()=>P(R),className:"ml-1 hover:text-destructive",children:i.jsx(xu,{className:"size-3"})})]},R))})]})]}),i.jsxs("div",{className:"flex justify-end gap-2",children:[i.jsx(Ee,{variant:"outline",onClick:()=>n(!1),children:"Cancel"}),i.jsxs(Ee,{onClick:E,disabled:S.isPending,children:[S.isPending&&i.jsx(Kt,{className:"size-4 mr-2 animate-spin"}),"Save Entry"]})]})]})})}function Uh({icon:e,title:n,description:s,actions:o}){return i.jsxs("div",{className:"flex flex-col items-center justify-center py-16 px-4 text-center",children:[i.jsx("div",{className:"rounded-full bg-muted p-4 mb-4",children:i.jsx(e,{className:"size-8 text-muted-foreground"})}),i.jsx("h3",{className:"text-lg font-semibold mb-1",children:n}),i.jsx("p",{className:"text-sm text-muted-foreground max-w-md mb-6",children:s}),o&&o.length>0&&i.jsx("div",{className:"flex gap-2",children:o.map(l=>i.jsx(Ee,{variant:"outline",size:"sm",onClick:l.onClick,children:l.label},l.label))})]})}const tl=10;function NI(){const[e,n]=v.useState(null),[s,o]=v.useState(""),[l,c]=v.useState("all"),[d,f]=v.useState(!1),[m,p]=v.useState(0),{data:x,isLoading:g,isError:w}=wu({category:"knowledge",kind:l==="all"?void 0:l,offset:m*tl,limit:tl}),b=(x==null?void 0:x.entries)??[],N=(x==null?void 0:x.total)??0,S=Math.ceil(N/tl),C=s?b.filter(E=>E.title.toLowerCase().includes(s.toLowerCase())||E.body.toLowerCase().includes(s.toLowerCase())):b,k=E=>{o(E)},P=E=>{c(E),p(0)};return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"border-b border-border bg-card px-6 py-4",children:[i.jsxs("div",{className:"flex items-center justify-between mb-4",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-xl font-semibold",children:"Knowledge"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"Insights, Decisions, and Patterns"})]}),i.jsxs(Ee,{onClick:()=>f(!0),children:[i.jsx(la,{className:"size-4 mr-2"}),"New Entry"]})]}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsxs("div",{className:"relative flex-1 max-w-md",children:[i.jsx(Kr,{className:"absolute left-3 top-1/2 -translate-y-1/2 size-4 text-muted-foreground"}),i.jsx(sn,{placeholder:"Search knowledge...",value:s,onChange:E=>k(E.target.value),className:"pl-9"})]}),i.jsxs(ra,{value:l,onValueChange:P,children:[i.jsxs(oa,{className:"w-40",children:[i.jsx(ih,{className:"size-4 mr-2"}),i.jsx(sa,{})]}),i.jsxs(aa,{children:[i.jsx(Ct,{value:"all",children:"All Kinds"}),i.jsx(Ct,{value:"insight",children:"Insight"}),i.jsx(Ct,{value:"decision",children:"Decision"}),i.jsx(Ct,{value:"pattern",children:"Pattern"}),i.jsx(Ct,{value:"reference",children:"Reference"})]})]})]})]}),i.jsx("div",{className:"flex-1 overflow-auto",children:g?i.jsx("div",{className:"p-6 space-y-2",children:Array.from({length:5}).map((E,R)=>i.jsxs("div",{className:"flex items-center gap-4 px-4 py-3",children:[i.jsx(Jt,{className:"h-4 w-24"}),i.jsx(Jt,{className:"h-4 w-48"}),i.jsx(Jt,{className:"h-5 w-16"}),i.jsx(Jt,{className:"h-5 w-32"}),i.jsx(Jt,{className:"h-4 w-16 ml-auto"})]},R))}):w?i.jsxs("div",{className:"py-12 text-center text-muted-foreground",children:[i.jsx("p",{className:"text-sm",children:"Failed to load entries"}),i.jsx("p",{className:"text-xs mt-1",children:"Check your connection and try again"})]}):N===0&&!s&&l==="all"?i.jsx(Uh,{icon:fo,title:"No knowledge entries yet",description:"Knowledge entries capture insights, decisions, and patterns. Save your first entry via Claude Code or import existing data.",actions:[{label:"Create entry",onClick:()=>f(!0)}]}):i.jsxs("div",{className:"p-6",children:[i.jsxs("div",{className:"border border-border rounded-lg overflow-hidden bg-card",children:[i.jsxs("table",{className:"w-full",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-border bg-muted/50",children:[i.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground",children:"ID"}),i.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground",children:"Title"}),i.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground",children:"Kind"}),i.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground",children:"Tags"}),i.jsx("th",{className:"text-right px-4 py-3 text-xs font-medium text-muted-foreground",children:"Updated"})]})}),i.jsx("tbody",{children:C.map(E=>i.jsxs("tr",{className:"border-b border-border last:border-0 hover:bg-muted/30 cursor-pointer transition-colors",onClick:()=>n(E),children:[i.jsx("td",{className:"px-4 py-3",children:i.jsxs("code",{className:"text-xs font-mono text-muted-foreground",children:[E.id.slice(0,12),"..."]})}),i.jsx("td",{className:"px-4 py-3",children:i.jsx("span",{className:"text-sm font-medium",children:E.title})}),i.jsx("td",{className:"px-4 py-3",children:i.jsx(ht,{variant:"default",className:"text-xs",children:E.kind})}),i.jsx("td",{className:"px-4 py-3",children:i.jsxs("div",{className:"flex gap-1 flex-wrap",children:[E.tags.slice(0,3).map(R=>i.jsx(ht,{variant:"outline",className:"text-xs",children:R},R)),E.tags.length>3&&i.jsxs(ht,{variant:"outline",className:"text-xs",children:["+",E.tags.length-3]})]})}),i.jsx("td",{className:"px-4 py-3 text-right",children:i.jsx("span",{className:"text-xs text-muted-foreground",children:Iw(E.updated)})})]},E.id))})]}),C.length===0&&i.jsxs("div",{className:"py-12 text-center text-muted-foreground",children:[i.jsx("p",{className:"text-sm",children:"No entries match your search"}),i.jsx("p",{className:"text-xs mt-1",children:"Try adjusting your search or filters"})]})]}),S>1&&i.jsxs("div",{className:"flex items-center justify-between mt-4",children:[i.jsxs("p",{className:"text-xs text-muted-foreground",children:["Showing ",m*tl+1,"–",Math.min((m+1)*tl,N)," of ",N]}),i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx(Ee,{variant:"outline",size:"icon",className:"size-8",disabled:m===0,onClick:()=>p(E=>E-1),children:i.jsx(rh,{className:"size-4"})}),i.jsxs("span",{className:"text-xs text-muted-foreground px-2",children:[m+1," / ",S]}),i.jsx(Ee,{variant:"outline",size:"icon",className:"size-8",disabled:m>=S-1,onClick:()=>p(E=>E+1),children:i.jsx(sh,{className:"size-4"})})]})]})]})})]}),i.jsx(Au,{entry:e,open:e!==null,onOpenChange:E=>!E&&n(null)}),i.jsx($h,{open:d,onOpenChange:f,category:"knowledge"})]})}const nl=10;function jI(){const[e,n]=v.useState(null),[s,o]=v.useState(""),[l,c]=v.useState("all"),[d,f]=v.useState(!1),[m,p]=v.useState(0),{data:x,isLoading:g,isError:w}=wu({category:"entity",kind:l==="all"?void 0:l,offset:m*nl,limit:nl}),b=(x==null?void 0:x.entries)??[],N=(x==null?void 0:x.total)??0,S=Math.ceil(N/nl),C=s?b.filter(E=>E.title.toLowerCase().includes(s.toLowerCase())||E.body.toLowerCase().includes(s.toLowerCase())):b,k=E=>{o(E)},P=E=>{c(E),p(0)};return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"border-b border-border bg-card px-6 py-4",children:[i.jsxs("div",{className:"flex items-center justify-between mb-4",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-xl font-semibold",children:"Entities"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"Projects, Contacts, and Tools"})]}),i.jsxs(Ee,{onClick:()=>f(!0),children:[i.jsx(la,{className:"size-4 mr-2"}),"New Entry"]})]}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsxs("div",{className:"relative flex-1 max-w-md",children:[i.jsx(Kr,{className:"absolute left-3 top-1/2 -translate-y-1/2 size-4 text-muted-foreground"}),i.jsx(sn,{placeholder:"Search entities...",value:s,onChange:E=>k(E.target.value),className:"pl-9"})]}),i.jsxs(ra,{value:l,onValueChange:P,children:[i.jsxs(oa,{className:"w-40",children:[i.jsx(ih,{className:"size-4 mr-2"}),i.jsx(sa,{})]}),i.jsxs(aa,{children:[i.jsx(Ct,{value:"all",children:"All Kinds"}),i.jsx(Ct,{value:"project",children:"Project"}),i.jsx(Ct,{value:"contact",children:"Contact"}),i.jsx(Ct,{value:"tool",children:"Tool"})]})]})]})]}),i.jsx("div",{className:"flex-1 overflow-auto",children:g?i.jsx("div",{className:"p-6 space-y-2",children:Array.from({length:5}).map((E,R)=>i.jsxs("div",{className:"flex items-center gap-4 px-4 py-3",children:[i.jsx(Jt,{className:"h-4 w-24"}),i.jsx(Jt,{className:"h-4 w-48"}),i.jsx(Jt,{className:"h-5 w-16"}),i.jsx(Jt,{className:"h-5 w-32"}),i.jsx(Jt,{className:"h-4 w-16 ml-auto"})]},R))}):w?i.jsxs("div",{className:"py-12 text-center text-muted-foreground",children:[i.jsx("p",{className:"text-sm",children:"Failed to load entries"}),i.jsx("p",{className:"text-xs mt-1",children:"Check your connection and try again"})]}):N===0&&!s&&l==="all"?i.jsx(Uh,{icon:El,title:"No entity entries yet",description:"Entity entries track projects, contacts, and tools. They help your AI agent understand who and what is involved in your work.",actions:[{label:"Create entry",onClick:()=>f(!0)}]}):i.jsxs("div",{className:"p-6",children:[i.jsxs("div",{className:"border border-border rounded-lg overflow-hidden bg-card",children:[i.jsxs("table",{className:"w-full",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-border bg-muted/50",children:[i.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground",children:"ID"}),i.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground",children:"Title"}),i.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground",children:"Kind"}),i.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground",children:"Tags"}),i.jsx("th",{className:"text-right px-4 py-3 text-xs font-medium text-muted-foreground",children:"Updated"})]})}),i.jsx("tbody",{children:C.map(E=>i.jsxs("tr",{className:"border-b border-border last:border-0 hover:bg-muted/30 cursor-pointer transition-colors",onClick:()=>n(E),children:[i.jsx("td",{className:"px-4 py-3",children:i.jsxs("code",{className:"text-xs font-mono text-muted-foreground",children:[E.id.slice(0,12),"..."]})}),i.jsx("td",{className:"px-4 py-3",children:i.jsx("span",{className:"text-sm font-medium",children:E.title})}),i.jsx("td",{className:"px-4 py-3",children:i.jsx(ht,{variant:"outline",className:"text-xs",children:E.kind})}),i.jsx("td",{className:"px-4 py-3",children:i.jsxs("div",{className:"flex gap-1 flex-wrap",children:[E.tags.slice(0,3).map(R=>i.jsx(ht,{variant:"outline",className:"text-xs",children:R},R)),E.tags.length>3&&i.jsxs(ht,{variant:"outline",className:"text-xs",children:["+",E.tags.length-3]})]})}),i.jsx("td",{className:"px-4 py-3 text-right",children:i.jsx("span",{className:"text-xs text-muted-foreground",children:CI(E.updated)})})]},E.id))})]}),C.length===0&&i.jsxs("div",{className:"py-12 text-center text-muted-foreground",children:[i.jsx("p",{className:"text-sm",children:"No entries match your search"}),i.jsx("p",{className:"text-xs mt-1",children:"Try adjusting your search or filters"})]})]}),S>1&&i.jsxs("div",{className:"flex items-center justify-between mt-4",children:[i.jsxs("p",{className:"text-xs text-muted-foreground",children:["Showing ",m*nl+1,"–",Math.min((m+1)*nl,N)," of ",N]}),i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx(Ee,{variant:"outline",size:"icon",className:"size-8",disabled:m===0,onClick:()=>p(E=>E-1),children:i.jsx(rh,{className:"size-4"})}),i.jsxs("span",{className:"text-xs text-muted-foreground px-2",children:[m+1," / ",S]}),i.jsx(Ee,{variant:"outline",size:"icon",className:"size-8",disabled:m>=S-1,onClick:()=>p(E=>E+1),children:i.jsx(sh,{className:"size-4"})})]})]})]})})]}),i.jsx(Au,{entry:e,open:e!==null,onOpenChange:E=>!E&&n(null)}),i.jsx($h,{open:d,onOpenChange:f,category:"entity"})]})}function CI(e){const s=new Date().getTime()-e.getTime(),o=Math.floor(s/6e4),l=Math.floor(s/36e5),c=Math.floor(s/864e5);return o<60?`${o}m ago`:l<24?`${l}h ago`:`${c}d ago`}const rl=10;function EI(){const[e,n]=v.useState(null),[s,o]=v.useState(""),[l,c]=v.useState("all"),[d,f]=v.useState(!1),[m,p]=v.useState(0),{data:x,isLoading:g,isError:w}=wu({category:"event",kind:l==="all"?void 0:l,offset:m*rl,limit:rl}),b=(x==null?void 0:x.entries)??[],N=(x==null?void 0:x.total)??0,S=Math.ceil(N/rl),C=s?b.filter(E=>E.title.toLowerCase().includes(s.toLowerCase())||E.body.toLowerCase().includes(s.toLowerCase())):b,k=E=>{o(E)},P=E=>{c(E),p(0)};return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"border-b border-border bg-card px-6 py-4",children:[i.jsxs("div",{className:"flex items-center justify-between mb-4",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-xl font-semibold",children:"Events"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"Sessions and Logs"})]}),i.jsxs(Ee,{onClick:()=>f(!0),children:[i.jsx(la,{className:"size-4 mr-2"}),"New Entry"]})]}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsxs("div",{className:"relative flex-1 max-w-md",children:[i.jsx(Kr,{className:"absolute left-3 top-1/2 -translate-y-1/2 size-4 text-muted-foreground"}),i.jsx(sn,{placeholder:"Search events...",value:s,onChange:E=>k(E.target.value),className:"pl-9"})]}),i.jsxs(ra,{value:l,onValueChange:P,children:[i.jsxs(oa,{className:"w-40",children:[i.jsx(ih,{className:"size-4 mr-2"}),i.jsx(sa,{})]}),i.jsxs(aa,{children:[i.jsx(Ct,{value:"all",children:"All Kinds"}),i.jsx(Ct,{value:"session",children:"Session"}),i.jsx(Ct,{value:"log",children:"Log"})]})]})]})]}),i.jsx("div",{className:"flex-1 overflow-auto",children:g?i.jsx("div",{className:"p-6 space-y-2",children:Array.from({length:5}).map((E,R)=>i.jsxs("div",{className:"flex items-center gap-4 px-4 py-3",children:[i.jsx(Jt,{className:"h-4 w-24"}),i.jsx(Jt,{className:"h-4 w-48"}),i.jsx(Jt,{className:"h-5 w-16"}),i.jsx(Jt,{className:"h-5 w-32"}),i.jsx(Jt,{className:"h-4 w-16 ml-auto"})]},R))}):w?i.jsxs("div",{className:"py-12 text-center text-muted-foreground",children:[i.jsx("p",{className:"text-sm",children:"Failed to load entries"}),i.jsx("p",{className:"text-xs mt-1",children:"Check your connection and try again"})]}):N===0&&!s&&l==="all"?i.jsx(Uh,{icon:fl,title:"No event entries yet",description:"Event entries capture sessions, meetings, and system logs. They provide a timeline of what happened and when.",actions:[{label:"Create entry",onClick:()=>f(!0)}]}):i.jsxs("div",{className:"p-6",children:[i.jsxs("div",{className:"border border-border rounded-lg overflow-hidden bg-card",children:[i.jsxs("table",{className:"w-full",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-border bg-muted/50",children:[i.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground",children:"ID"}),i.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground",children:"Title"}),i.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground",children:"Kind"}),i.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground",children:"Tags"}),i.jsx("th",{className:"text-right px-4 py-3 text-xs font-medium text-muted-foreground",children:"Created"})]})}),i.jsx("tbody",{children:C.map(E=>i.jsxs("tr",{className:"border-b border-border last:border-0 hover:bg-muted/30 cursor-pointer transition-colors",onClick:()=>n(E),children:[i.jsx("td",{className:"px-4 py-3",children:i.jsxs("code",{className:"text-xs font-mono text-muted-foreground",children:[E.id.slice(0,12),"..."]})}),i.jsx("td",{className:"px-4 py-3",children:i.jsx("span",{className:"text-sm font-medium",children:E.title})}),i.jsx("td",{className:"px-4 py-3",children:i.jsx(ht,{variant:"secondary",className:"text-xs",children:E.kind})}),i.jsx("td",{className:"px-4 py-3",children:i.jsxs("div",{className:"flex gap-1 flex-wrap",children:[E.tags.slice(0,3).map(R=>i.jsx(ht,{variant:"outline",className:"text-xs",children:R},R)),E.tags.length>3&&i.jsxs(ht,{variant:"outline",className:"text-xs",children:["+",E.tags.length-3]})]})}),i.jsx("td",{className:"px-4 py-3 text-right",children:i.jsx("span",{className:"text-xs text-muted-foreground",children:kI(E.created)})})]},E.id))})]}),C.length===0&&i.jsxs("div",{className:"py-12 text-center text-muted-foreground",children:[i.jsx("p",{className:"text-sm",children:"No entries match your search"}),i.jsx("p",{className:"text-xs mt-1",children:"Try adjusting your search or filters"})]})]}),S>1&&i.jsxs("div",{className:"flex items-center justify-between mt-4",children:[i.jsxs("p",{className:"text-xs text-muted-foreground",children:["Showing ",m*rl+1,"–",Math.min((m+1)*rl,N)," of ",N]}),i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx(Ee,{variant:"outline",size:"icon",className:"size-8",disabled:m===0,onClick:()=>p(E=>E-1),children:i.jsx(rh,{className:"size-4"})}),i.jsxs("span",{className:"text-xs text-muted-foreground px-2",children:[m+1," / ",S]}),i.jsx(Ee,{variant:"outline",size:"icon",className:"size-8",disabled:m>=S-1,onClick:()=>p(E=>E+1),children:i.jsx(sh,{className:"size-4"})})]})]})]})})]}),i.jsx(Au,{entry:e,open:e!==null,onOpenChange:E=>!E&&n(null)}),i.jsx($h,{open:d,onOpenChange:f,category:"event"})]})}function kI(e){const s=new Date().getTime()-e.getTime(),o=Math.floor(s/6e4),l=Math.floor(s/36e5),c=Math.floor(s/864e5);return o<60?`${o}m ago`:l<24?`${l}h ago`:`${c}d ago`}var Bh="Switch",[RI]=Qr(Bh),[PI,TI]=RI(Bh),N1=v.forwardRef((e,n)=>{const{__scopeSwitch:s,name:o,checked:l,defaultChecked:c,required:d,disabled:f,value:m="on",onCheckedChange:p,form:x,...g}=e,[w,b]=v.useState(null),N=rt(n,E=>b(E)),S=v.useRef(!1),C=w?x||!!w.closest("form"):!0,[k=!1,P]=ai({prop:l,defaultProp:c,onChange:p});return i.jsxs(PI,{scope:s,checked:k,disabled:f,children:[i.jsx(Fe.button,{type:"button",role:"switch","aria-checked":k,"aria-required":d,"data-state":E1(k),"data-disabled":f?"":void 0,disabled:f,value:m,...g,ref:N,onClick:We(e.onClick,E=>{P(R=>!R),C&&(S.current=E.isPropagationStopped(),S.current||E.stopPropagation())})}),C&&i.jsx(_I,{control:w,bubbles:!S.current,name:o,value:m,checked:k,required:d,disabled:f,form:x,style:{transform:"translateX(-100%)"}})]})});N1.displayName=Bh;var j1="SwitchThumb",C1=v.forwardRef((e,n)=>{const{__scopeSwitch:s,...o}=e,l=TI(j1,s);return i.jsx(Fe.span,{"data-state":E1(l.checked),"data-disabled":l.disabled?"":void 0,...o,ref:n})});C1.displayName=j1;var _I=e=>{const{control:n,checked:s,bubbles:o=!0,...l}=e,c=v.useRef(null),d=Yb(s),f=zb(n);return v.useEffect(()=>{const m=c.current,p=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(p,"checked").set;if(d!==s&&g){const w=new Event("click",{bubbles:o});g.call(m,s),m.dispatchEvent(w)}},[d,s,o]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:s,...l,tabIndex:-1,ref:c,style:{...e.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function E1(e){return e?"checked":"unchecked"}var AI=N1,MI=C1;function k1({className:e,...n}){return i.jsx(AI,{"data-slot":"switch",className:ze("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-switch-background focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...n,children:i.jsx(MI,{"data-slot":"switch-thumb",className:ze("bg-card dark:data-[state=unchecked]:bg-card-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}const II=["error handling patterns","project status","recent decisions","database architecture","team contacts"];function DI(){var P;const[e,n]=v.useState(""),[s,o]=v.useState(!1),[l,c]=v.useState(!1),[d,f]=v.useState("all"),[m,p]=v.useState(!0),[x,g]=v.useState(10),[w,b]=v.useState(null),N=NR(),S=E=>{const R=(E||e).trim();R&&(o(!0),E&&n(E),N.mutate({query:R,category:d!=="all"?d:void 0,limit:x}))},C=((P=N.data)==null?void 0:P.results)??[],k=E=>b(E);return i.jsxs("div",{className:"p-6 max-w-4xl mx-auto space-y-6",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl font-bold",children:"Search"}),i.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Search across your entire vault using semantic or hybrid matching."})]}),i.jsxs("div",{className:"space-y-3",children:[i.jsxs("div",{className:"flex gap-2",children:[i.jsxs("div",{className:"relative flex-1",children:[i.jsx(Kr,{className:"absolute left-3 top-1/2 -translate-y-1/2 size-4 text-muted-foreground"}),i.jsx(sn,{placeholder:"Search your vault...",value:e,onChange:E=>n(E.target.value),onKeyDown:E=>E.key==="Enter"&&S(),className:"pl-9"})]}),i.jsxs(ra,{value:d,onValueChange:f,children:[i.jsx(oa,{className:"w-36",children:i.jsx(sa,{})}),i.jsxs(aa,{children:[i.jsx(Ct,{value:"all",children:"All categories"}),i.jsx(Ct,{value:"knowledge",children:"Knowledge"}),i.jsx(Ct,{value:"entity",children:"Entities"}),i.jsx(Ct,{value:"event",children:"Events"})]})]}),i.jsx(Ee,{onClick:()=>S(),disabled:!e.trim()||N.isPending,children:"Search"})]}),i.jsxs("button",{type:"button",onClick:()=>c(!l),className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:["Advanced",l?i.jsx(oh,{className:"size-3"}):i.jsx(oi,{className:"size-3"})]}),l&&i.jsxs("div",{className:"flex items-center gap-6 p-3 rounded-lg border border-border bg-card",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(dt,{htmlFor:"hybrid",className:"text-xs",children:"Hybrid mode"}),i.jsx(k1,{id:"hybrid",checked:m,onCheckedChange:p})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(dt,{htmlFor:"limit",className:"text-xs",children:"Results"}),i.jsxs(ra,{value:String(x),onValueChange:E=>g(Number(E)),children:[i.jsx(oa,{className:"w-20 h-8 text-xs",children:i.jsx(sa,{})}),i.jsxs(aa,{children:[i.jsx(Ct,{value:"5",children:"5"}),i.jsx(Ct,{value:"10",children:"10"}),i.jsx(Ct,{value:"20",children:"20"})]})]})]})]})]}),N.isPending&&i.jsx("div",{className:"space-y-3",children:[1,2,3].map(E=>i.jsx(lt,{children:i.jsxs(ct,{className:"p-4 space-y-2",children:[i.jsx(Jt,{className:"h-5 w-2/3"}),i.jsx(Jt,{className:"h-4 w-full"}),i.jsx(Jt,{className:"h-4 w-1/2"})]})},E))}),!N.isPending&&s&&C.length===0&&i.jsxs("div",{className:"text-center py-12",children:[i.jsxs("p",{className:"text-muted-foreground",children:['No results found for "',e,'"']}),i.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Try a different query or broaden your search"})]}),!N.isPending&&C.length>0&&i.jsxs("div",{className:"space-y-3",children:[i.jsxs("p",{className:"text-xs text-muted-foreground",children:[C.length," results"]}),C.map(E=>i.jsx(lt,{className:"hover:bg-accent/50 transition-colors cursor-pointer",role:"button",tabIndex:0,onClick:()=>k(E),onKeyDown:R=>{(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),k(E))},"aria-label":`Open ${E.title}`,children:i.jsx(ct,{className:"p-4",children:i.jsxs("div",{className:"flex items-start justify-between gap-4",children:[i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[i.jsx("h3",{className:"font-medium text-sm truncate",children:E.title}),i.jsx(ht,{variant:"outline",className:"text-xs shrink-0",children:E.kind})]}),i.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:E.body.replace(/[#*`]/g,"").slice(0,200)}),i.jsx("div",{className:"flex items-center gap-2 mt-2",children:E.tags.slice(0,3).map(R=>i.jsx(ht,{variant:"secondary",className:"text-[10px]",children:R},R))})]}),i.jsx("div",{className:"text-right shrink-0",children:i.jsxs("span",{className:"text-xs font-mono text-muted-foreground",children:[(E.score*100).toFixed(1),"%"]})})]})})},E.id))]}),!s&&i.jsxs("div",{className:"text-center py-12 space-y-4",children:[i.jsx("p",{className:"text-muted-foreground text-sm",children:"Try searching for something"}),i.jsx("div",{className:"flex flex-wrap justify-center gap-2",children:II.map(E=>i.jsx("button",{type:"button",onClick:()=>S(E),className:"px-3 py-1.5 rounded-full border border-border text-xs text-muted-foreground hover:text-foreground hover:bg-accent transition-colors",children:E},E))})]}),i.jsx(Au,{entry:w,open:w!==null,onOpenChange:E=>!E&&b(null)})]})}const OI="/api";function LI(){const{loginWithApiKey:e}=js(),n=or(),[s]=qm(),[o,l]=v.useState(""),[c,d]=v.useState(!1),[f,m]=v.useState(!1);v.useEffect(()=>{const g=s.get("error");g&&(g==="oauth_denied"?$e.error("Sign-in was cancelled"):g==="oauth_failed"?$e.error("Google sign-in failed. Please try again."):g==="oauth_invalid_state"?$e.error("Sign-in session expired. Please try again."):g==="registration_failed"&&$e.error("Account creation failed. Please try again."),n("/login",{replace:!0}))},[s,n]);const p=()=>{m(!0);const g=encodeURIComponent(window.location.origin);window.location.href=`${OI}/auth/google?origin=${g}`},x=async g=>{if(g.preventDefault(),!(!o.trim()||c)){d(!0);try{await e(o.trim()),$e.success("Authenticated successfully"),n("/")}catch(w){w instanceof di?w.status===401?$e.error("Invalid API key"):$e.error(w.message):$e.error("Failed to authenticate")}finally{d(!1)}}};return i.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background p-4",children:i.jsxs("div",{className:"w-full max-w-sm space-y-6",children:[i.jsxs("div",{className:"text-center space-y-2",children:[i.jsx("h1",{className:"text-2xl font-bold",children:"Context Vault"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"Sign in to your account"})]}),i.jsx(lt,{children:i.jsxs(ct,{className:"pt-6 space-y-4",children:[i.jsx(Ee,{variant:"default",className:"w-full gap-2",onClick:p,disabled:f,children:f?i.jsx(Kt,{className:"size-4 animate-spin"}):i.jsxs(i.Fragment,{children:[i.jsxs("svg",{className:"size-4",viewBox:"0 0 24 24",children:[i.jsx("path",{fill:"currentColor",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z"}),i.jsx("path",{fill:"currentColor",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),i.jsx("path",{fill:"currentColor",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),i.jsx("path",{fill:"currentColor",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]}),"Sign in with Google"]})}),i.jsxs("div",{className:"relative",children:[i.jsx("div",{className:"absolute inset-0 flex items-center",children:i.jsx("span",{className:"w-full border-t"})}),i.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:i.jsx("span",{className:"bg-card px-2 text-muted-foreground",children:"Or use API key"})})]}),i.jsxs("form",{onSubmit:x,className:"space-y-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(dt,{htmlFor:"apiKey",children:"API Key"}),i.jsxs("div",{className:"relative",children:[i.jsx(Cl,{className:"absolute left-3 top-1/2 -translate-y-1/2 size-4 text-muted-foreground"}),i.jsx(sn,{id:"apiKey",type:"password",placeholder:"cv_...",value:o,onChange:g=>l(g.target.value),className:"pl-9",disabled:c})]})]}),i.jsx(Ee,{type:"submit",variant:"secondary",className:"w-full",disabled:c,children:c?i.jsxs(i.Fragment,{children:[i.jsx(Kt,{className:"size-4 mr-2 animate-spin"}),"Signing in..."]}):"Sign in with API key"})]})]})}),i.jsxs("p",{className:"text-center text-sm text-muted-foreground",children:["Don't have an account?"," ",i.jsx(Ot,{to:"/register",className:"text-foreground hover:underline font-medium",children:"Register"})]})]})})}const zI="/api";function FI(){const{register:e}=js(),n=or(),[s,o]=v.useState(""),[l,c]=v.useState(""),[d,f]=v.useState(null),[m,p]=v.useState(!1),[x,g]=v.useState(!1),[w,b]=v.useState(!1),[N,S]=v.useState(!1),[C,k]=v.useState(!1),P=()=>{S(!0);const T=encodeURIComponent(window.location.origin);window.location.href=`${zI}/auth/google?origin=${T}`},E=async T=>{if(T.preventDefault(),!(!s.trim()||w)){b(!0);try{const I=await e(s.trim(),l.trim()||void 0);f(I.apiKey),$e.success("Account created!")}catch(I){I instanceof di?I.status===409?$e.error("An account with this email already exists"):I.status===429?$e.error("Too many requests. Please try again later."):$e.error(I.message):$e.error("Failed to create account")}finally{b(!1)}}},R=async()=>{d&&(await navigator.clipboard.writeText(d),p(!0),$e.success("API key copied"),setTimeout(()=>p(!1),2e3))},L=d?`npx context-vault connect --key ${d}`:"",B=async()=>{await navigator.clipboard.writeText(L),g(!0),$e.success("Command copied"),setTimeout(()=>g(!1),2e3)};return d?i.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background p-4",children:i.jsxs("div",{className:"w-full max-w-md space-y-6",children:[i.jsxs("div",{className:"text-center space-y-2",children:[i.jsx("h1",{className:"text-2xl font-bold",children:"Welcome to Context Vault"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"Your account is ready"})]}),i.jsxs(lt,{children:[i.jsx(wt,{className:"pb-3",children:i.jsxs(Et,{className:"text-lg flex items-center gap-2",children:[i.jsx(m2,{className:"size-5"}),"Connect your AI tools"]})}),i.jsxs(ct,{className:"space-y-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx("p",{className:"text-sm text-muted-foreground",children:"Run this command to auto-configure all your AI tools:"}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("code",{className:"flex-1 bg-muted px-3 py-2 rounded text-xs font-mono break-all",children:L}),i.jsx(Ee,{variant:"outline",size:"icon",onClick:B,children:x?i.jsx(Hr,{className:"size-4"}):i.jsx(ws,{className:"size-4"})})]})]}),i.jsxs("div",{className:"relative",children:[i.jsx("div",{className:"absolute inset-0 flex items-center",children:i.jsx("span",{className:"w-full border-t"})}),i.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:i.jsx("span",{className:"bg-card px-2 text-muted-foreground",children:"Or manual config"})})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("p",{className:"text-sm font-medium",children:"Your API Key"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"Save this key — it won't be shown again."}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("code",{className:"flex-1 bg-muted px-3 py-2 rounded text-sm font-mono break-all",children:d}),i.jsx(Ee,{variant:"outline",size:"icon",onClick:R,children:m?i.jsx(Hr,{className:"size-4"}):i.jsx(ws,{className:"size-4"})})]})]}),i.jsxs("details",{className:"text-sm",children:[i.jsx("summary",{className:"text-xs text-muted-foreground cursor-pointer hover:underline",children:"Show JSON config"}),i.jsx("pre",{className:"bg-muted p-3 rounded text-xs font-mono overflow-x-auto mt-2",children:`{
|
|
345
|
+
"mcpServers": {
|
|
346
|
+
"context-vault": {
|
|
347
|
+
"url": "https://api.context-vault.com/mcp",
|
|
348
|
+
"headers": {
|
|
349
|
+
"Authorization": "Bearer ${d}"
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
}`})]}),i.jsx(Ee,{className:"w-full",onClick:()=>n("/"),children:"Continue to Dashboard"})]})]})]})}):i.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background p-4",children:i.jsxs("div",{className:"w-full max-w-sm space-y-6",children:[i.jsxs("div",{className:"text-center space-y-2",children:[i.jsx("h1",{className:"text-2xl font-bold",children:"Context Vault"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"Create your account"})]}),i.jsxs(lt,{children:[i.jsx(wt,{className:"pb-4",children:i.jsx(Et,{className:"text-lg",children:"Get started"})}),i.jsxs(ct,{className:"space-y-4",children:[i.jsx(Ee,{variant:"default",className:"w-full gap-2",onClick:P,disabled:N,children:N?i.jsx(Kt,{className:"size-4 animate-spin"}):i.jsxs(i.Fragment,{children:[i.jsxs("svg",{className:"size-4",viewBox:"0 0 24 24",children:[i.jsx("path",{fill:"currentColor",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z"}),i.jsx("path",{fill:"currentColor",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),i.jsx("path",{fill:"currentColor",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),i.jsx("path",{fill:"currentColor",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]}),"Sign up with Google"]})}),C?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"relative",children:[i.jsx("div",{className:"absolute inset-0 flex items-center",children:i.jsx("span",{className:"w-full border-t"})}),i.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:i.jsx("span",{className:"bg-card px-2 text-muted-foreground",children:"Or email"})})]}),i.jsxs("form",{onSubmit:E,className:"space-y-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(dt,{htmlFor:"email",children:"Email"}),i.jsx(sn,{id:"email",type:"email",placeholder:"you@example.com",value:s,onChange:T=>o(T.target.value),required:!0,disabled:w})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(dt,{htmlFor:"name",children:"Name (optional)"}),i.jsx(sn,{id:"name",type:"text",placeholder:"Alex Chen",value:l,onChange:T=>c(T.target.value),disabled:w})]}),i.jsx(Ee,{type:"submit",variant:"secondary",className:"w-full",disabled:w,children:w?i.jsxs(i.Fragment,{children:[i.jsx(Kt,{className:"size-4 mr-2 animate-spin"}),"Creating account..."]}):"Create account"})]})]}):i.jsx("button",{type:"button",className:"w-full text-xs text-muted-foreground hover:underline",onClick:()=>k(!0),children:"Or register with email"})]})]}),i.jsxs("p",{className:"text-center text-sm text-muted-foreground",children:["Already have an account?"," ",i.jsx(Ot,{to:"/login",className:"text-foreground hover:underline font-medium",children:"Sign in"})]})]})})}function $I(){const{loginWithApiKey:e}=js(),n=or(),[s,o]=v.useState(null),l=v.useRef(window.location.hash);return v.useEffect(()=>{const c=new URLSearchParams(l.current.slice(1)),d=c.get("token"),f=c.get("encryption_secret");if(!d){o("No authentication token received");const p=setTimeout(()=>n("/login"),3e3);return()=>clearTimeout(p)}window.history.replaceState(null,"",window.location.pathname),f&&d0(f);let m=!1;return e(d).then(()=>{m||n("/")}).catch(()=>{m||(o("Authentication failed"),setTimeout(()=>n("/login"),3e3))}),()=>{m=!0}},[e,n]),i.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background p-4",children:i.jsx("div",{className:"text-center space-y-4",children:s?i.jsxs(i.Fragment,{children:[i.jsx("p",{className:"text-sm text-destructive",children:s}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"Redirecting to login..."})]}):i.jsxs(i.Fragment,{children:[i.jsx(Kt,{className:"size-8 animate-spin mx-auto text-muted-foreground"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"Signing you in..."})]})})})}function R1(){return i.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background p-4",children:i.jsxs("div",{className:"text-center space-y-6 max-w-md",children:[i.jsx("div",{className:"flex justify-center",children:i.jsx("div",{className:"size-16 rounded-2xl bg-muted flex items-center justify-center",children:i.jsx(Hk,{className:"size-8 text-muted-foreground"})})}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("h1",{className:"text-4xl font-bold tracking-tight",children:"404"}),i.jsx("p",{className:"text-muted-foreground",children:"This page doesn't exist. It may have been moved or the URL might be incorrect."})]}),i.jsx(Ot,{to:"/",children:i.jsxs(Ee,{variant:"default",className:"gap-2",children:[i.jsx(p0,{className:"size-4"}),"Back to dashboard"]})})]})})}function UI(){const e=Vx();return si(e)&&e.status===404?i.jsx(R1,{}):i.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background p-4",children:i.jsxs("div",{className:"text-center space-y-6 max-w-md",children:[i.jsx("div",{className:"flex justify-center",children:i.jsx("div",{className:"size-16 rounded-2xl bg-destructive/10 flex items-center justify-center",children:i.jsx("span",{className:"text-2xl font-bold text-destructive",children:"!"})})}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Something went wrong"}),i.jsx("p",{className:"text-muted-foreground",children:"An unexpected error occurred. Try refreshing the page."})]}),i.jsxs("div",{className:"flex justify-center gap-3",children:[i.jsx(Ee,{variant:"outline",onClick:()=>window.location.reload(),children:"Refresh page"}),i.jsx(Ot,{to:"/",children:i.jsxs(Ee,{variant:"default",className:"gap-2",children:[i.jsx(p0,{className:"size-4"}),"Back to dashboard"]})})]})]})})}const BI=10080*60*1e3;function HI(){const{data:e,isLoading:n}=mh(),s=jR(),o=CR(),[l,c]=v.useState(""),[d,f]=v.useState(""),[m,p]=v.useState(!1),[x,g]=v.useState(null),[w,b]=v.useState(null),N=()=>{l.trim()&&s.mutate({name:l.trim(),expires_at:d||void 0},{onSuccess:R=>{b(R.key),c(""),f(""),p(!1),$e.success(`API key "${l.trim()}" created`)},onError:()=>{$e.error("Failed to create API key")}})},S=R=>{o.mutate(R,{onSuccess:()=>{$e.success("API key deleted")},onError:()=>{$e.error("Failed to delete API key")}})},C=async(R,L)=>{await navigator.clipboard.writeText(R),g(L),$e.success(`${L} copied`),setTimeout(()=>g(null),2e3)},k=()=>C(JSON.stringify({mcpServers:{"context-vault":{url:"https://api.context-vault.com/mcp",headers:{Authorization:"Bearer YOUR_API_KEY"}}}},null,2),"Config"),P=new Date;P.setDate(P.getDate()+1);const E=P.toISOString().split("T")[0];return i.jsxs("div",{className:"p-6 max-w-3xl mx-auto space-y-6",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl font-bold",children:"API Keys"}),i.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Manage your API keys for connecting Context Vault to Claude Code and other tools."})]}),w&&i.jsx(lt,{className:"border-green-500/50 bg-green-50 dark:bg-green-950/20",children:i.jsxs(ct,{className:"pt-4 space-y-2",children:[i.jsx("p",{className:"text-sm font-medium text-green-700 dark:text-green-400",children:"Your new API key (copy it now — it won't be shown again):"}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("code",{className:"flex-1 bg-white dark:bg-black/20 px-3 py-2 rounded text-xs font-mono border border-green-300 dark:border-green-700 break-all",children:w}),i.jsx(Ee,{variant:"outline",size:"icon",className:"size-8 shrink-0",onClick:()=>C(w,"API key"),children:x==="API key"?i.jsx(Hr,{className:"size-3"}):i.jsx(ws,{className:"size-3"})})]}),i.jsx(Ee,{size:"sm",variant:"ghost",className:"text-xs",onClick:()=>b(null),children:"I've saved it"})]})}),i.jsxs(lt,{children:[i.jsxs(wt,{className:"flex flex-row items-center justify-between pb-3",children:[i.jsx(Et,{className:"text-base",children:"Your Keys"}),i.jsxs(Ee,{size:"sm",className:"gap-1.5",onClick:()=>p(!0),children:[i.jsx(la,{className:"size-3.5"}),"Create New Key"]})]}),i.jsxs(ct,{children:[m&&i.jsxs("div",{className:"flex flex-col gap-3 mb-4 pb-4 border-b border-border",children:[i.jsxs("div",{className:"flex items-end gap-2",children:[i.jsxs("div",{className:"flex-1 space-y-1.5",children:[i.jsx(dt,{htmlFor:"keyName",className:"text-xs",children:"Key name"}),i.jsx(sn,{id:"keyName",placeholder:"e.g. Development, Production",value:l,onChange:R=>c(R.target.value),onKeyDown:R=>R.key==="Enter"&&N(),disabled:s.isPending})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(dt,{htmlFor:"keyExpiry",className:"text-xs",children:"Expires (optional)"}),i.jsx(sn,{id:"keyExpiry",type:"date",min:E,value:d,onChange:R=>f(R.target.value),disabled:s.isPending,className:"w-40"})]})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx(Ee,{size:"sm",onClick:N,disabled:s.isPending,children:s.isPending?i.jsx(Kt,{className:"size-3.5 animate-spin"}):"Create"}),i.jsx(Ee,{size:"sm",variant:"ghost",onClick:()=>{p(!1),f("")},children:"Cancel"})]})]}),n?i.jsx("div",{className:"space-y-2",children:[1,2].map(R=>i.jsx("div",{className:"h-12 rounded-lg bg-muted animate-pulse"},R))}):!e||e.length===0?i.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:"No API keys yet. Create one to get started."}):i.jsx("div",{className:"space-y-2",children:e.map(R=>{const L=Date.now(),B=R.expiresAt&&R.expiresAt>new Date&&R.expiresAt.getTime()-L<BI;return i.jsxs("div",{className:"flex items-center justify-between py-2 px-3 rounded-lg border border-border",children:[i.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium",children:R.name}),i.jsxs("p",{className:"text-xs text-muted-foreground font-mono",children:[R.prefix,"..."]})]}),i.jsx(ht,{variant:"secondary",className:"text-[10px]",children:R.createdAt.toLocaleDateString()}),i.jsx(ht,{variant:"outline",className:"text-[10px]",children:R.lastUsedAt?`Used ${R.lastUsedAt.toLocaleDateString()}`:"Never used"}),R.expiresAt&&i.jsxs(ht,{variant:B?"destructive":"outline",className:"text-[10px] gap-1",children:[B&&i.jsx(g2,{className:"size-2.5"}),"Expires ",R.expiresAt.toLocaleDateString()]})]}),i.jsx(Ee,{variant:"ghost",size:"icon",className:"size-8 text-muted-foreground hover:text-destructive",onClick:()=>S(R.id),disabled:o.isPending,children:o.isPending?i.jsx(Kt,{className:"size-3.5 animate-spin"}):i.jsx(yu,{className:"size-3.5"})})]},R.id)})})]})]}),i.jsxs(lt,{children:[i.jsx(wt,{className:"pb-3",children:i.jsx(Et,{className:"text-base",children:"Setup Guide"})}),i.jsxs(ct,{className:"space-y-3",children:[i.jsx("p",{className:"text-sm text-muted-foreground",children:"Add this configuration to your Claude Code MCP settings to connect:"}),i.jsxs("div",{className:"relative",children:[i.jsx("pre",{className:"bg-muted p-4 rounded-lg text-xs font-mono overflow-x-auto",children:`{
|
|
354
|
+
"mcpServers": {
|
|
355
|
+
"context-vault": {
|
|
356
|
+
"url": "https://api.context-vault.com/mcp",
|
|
357
|
+
"headers": {
|
|
358
|
+
"Authorization": "Bearer YOUR_API_KEY"
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
}`}),i.jsxs(Ee,{variant:"outline",size:"sm",className:"absolute top-2 right-2 gap-1.5 text-xs",onClick:k,children:[x==="Config"?i.jsx(Hr,{className:"size-3"}):i.jsx(ws,{className:"size-3"}),"Copy"]})]})]})]})]})}const VI=[{tier:"free",price:"$0",features:["500 entries","10 MB storage","200 requests/day","1 API key","Community support"]},{tier:"pro",price:"$9",period:"/mo",features:["Unlimited entries","1 GB storage","Unlimited requests","Unlimited API keys","Export/Import","Priority support"]},{tier:"team",price:"$29",period:"/mo",features:["Unlimited entries","10 GB storage","Unlimited requests","Unlimited API keys","Team sharing","SSO","Dedicated support"]}];function WI(){const{user:e}=js(),{data:n,isLoading:s}=hh(),o=kR(),[l,c]=qm();v.useEffect(()=>{l.get("upgraded")==="true"&&($e.success("Welcome to your new plan!"),c({},{replace:!0}))},[l,c]);const d=m=>{if(m==="team"){$e.info("Contact us at team@context-vault.com for Team plans");return}o.mutate({successUrl:`${window.location.origin}/settings/billing?upgraded=true`,cancelUrl:window.location.href},{onSuccess:p=>{window.location.href=p.url},onError:()=>{$e.error("Failed to start checkout")}})},f=(e==null?void 0:e.tier)??"free";return i.jsxs("div",{className:"p-6 max-w-3xl mx-auto space-y-6",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl font-bold",children:"Billing"}),i.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Manage your plan and view usage."})]}),i.jsxs(lt,{children:[i.jsx(wt,{className:"pb-3",children:i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx(Et,{className:"text-base",children:"Current Plan"}),i.jsx($0,{tier:f})]})}),i.jsx(ct,{className:"space-y-4",children:s?i.jsx("div",{className:"space-y-4",children:[1,2,3,4].map(m=>i.jsxs("div",{className:"space-y-1.5",children:[i.jsx("div",{className:"h-3 w-32 bg-muted animate-pulse rounded"}),i.jsx("div",{className:"h-1.5 bg-muted animate-pulse rounded"})]},m))}):n?i.jsxs(i.Fragment,{children:[i.jsx(Ua,{used:n.entries.used,limit:n.entries.limit,label:"Entries"}),i.jsx(Ua,{used:n.storage.usedMb,limit:n.storage.limitMb,label:"Storage",unit:"MB",formatValue:au}),n.requestsToday.limit===1/0?i.jsx("div",{className:"space-y-1.5",children:i.jsxs("div",{className:"flex items-center justify-between text-xs",children:[i.jsx("span",{className:"text-muted-foreground",children:"Requests today"}),i.jsxs("span",{className:"font-mono",children:[n.requestsToday.used," (unlimited)"]})]})}):i.jsx(Ua,{used:n.requestsToday.used,limit:n.requestsToday.limit,label:"Requests today"}),n.apiKeys.limit===1/0?i.jsx("div",{className:"space-y-1.5",children:i.jsxs("div",{className:"flex items-center justify-between text-xs",children:[i.jsx("span",{className:"text-muted-foreground",children:"API keys"}),i.jsxs("span",{className:"font-mono",children:[n.apiKeys.active," (unlimited)"]})]})}):i.jsx(Ua,{used:n.apiKeys.active,limit:n.apiKeys.limit,label:"API keys"})]}):null})]}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:VI.map(m=>{const p=m.tier===f;return i.jsxs(lt,{className:p?"border-primary":"",children:[i.jsxs(wt,{className:"pb-3",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx(Et,{className:"text-base capitalize",children:m.tier}),p&&i.jsx(ht,{variant:"outline",className:"text-[10px]",children:"Current"})]}),i.jsxs("div",{className:"mt-2",children:[i.jsx("span",{className:"text-2xl font-bold",children:m.price}),m.period&&i.jsx("span",{className:"text-sm text-muted-foreground",children:m.period})]})]}),i.jsxs(ct,{children:[i.jsx("ul",{className:"space-y-2 mb-4",children:m.features.map(x=>i.jsxs("li",{className:"flex items-center gap-2 text-sm",children:[i.jsx(Hr,{className:"size-3.5 text-primary shrink-0"}),x]},x))}),!p&&i.jsxs(Ee,{className:"w-full",variant:m.tier==="pro"?"default":"outline",disabled:o.isPending,onClick:()=>d(m.tier),children:[o.isPending?i.jsx(Kt,{className:"size-3.5 animate-spin mr-1.5"}):null,m.tier==="pro"?"Upgrade to Pro":"Contact Sales"]})]})]},m.tier)})})]})}function KI(){const{logout:e}=js(),n=or(),{data:s}=ER(),{refetch:o}=TR(),l=RR(),[c,d]=v.useState(!1),[f,m]=v.useState(""),p=async()=>{d(!0);try{const g=await o();if(g.data){const w=new Blob([JSON.stringify(g.data.entries,null,2)],{type:"application/json"}),b=URL.createObjectURL(w),N=document.createElement("a");N.href=b,N.download=`context-vault-export-${new Date().toISOString().slice(0,10)}.json`,document.body.appendChild(N),N.click(),document.body.removeChild(N),URL.revokeObjectURL(b),$e.success("Export downloaded")}}catch{$e.error("Failed to export vault data")}finally{d(!1)}},x=()=>{l.mutate(void 0,{onSuccess:()=>{e(),n("/login")},onError:()=>{$e.error("Failed to delete account")}})};return i.jsxs("div",{className:"p-6 max-w-3xl mx-auto space-y-6",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl font-bold",children:"Data"}),i.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Import, export, and manage your vault data."})]}),i.jsxs(lt,{children:[i.jsx(wt,{className:"pb-3",children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(ml,{className:"size-4"}),i.jsx(Et,{className:"text-base",children:"Import"})]})}),i.jsxs(ct,{children:[i.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"Import entries from your local markdown vault or a JSON export."}),i.jsx(Ot,{to:"/import",children:i.jsxs(Ee,{size:"sm",variant:"outline",children:[i.jsx(ml,{className:"size-3.5 mr-1.5"}),"Go to Import"]})})]})]}),i.jsxs(lt,{children:[i.jsx(wt,{className:"pb-3",children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(hy,{className:"size-4"}),i.jsx(Et,{className:"text-base",children:"Export"})]})}),i.jsx(ct,{children:i.jsxs(Ee,{size:"sm",variant:"outline",onClick:p,disabled:c,children:[c?i.jsx(Kt,{className:"size-3.5 animate-spin mr-1.5"}):i.jsx(hy,{className:"size-3.5 mr-1.5"}),"Download vault data"]})})]}),i.jsxs(lt,{className:"border-destructive/30",children:[i.jsx(wt,{className:"pb-3",children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(yu,{className:"size-4 text-destructive"}),i.jsx(Et,{className:"text-base text-destructive",children:"Danger Zone"})]})}),i.jsxs(ct,{className:"space-y-3",children:[i.jsx("p",{className:"text-sm text-muted-foreground",children:"Permanently delete your account and all vault data. This action cannot be undone."}),i.jsxs("div",{className:"space-y-2",children:[i.jsxs(dt,{htmlFor:"deleteConfirm",className:"text-xs",children:["Type"," ",i.jsx("span",{className:"font-mono font-bold",children:"delete my account"})," to confirm"]}),i.jsx(sn,{id:"deleteConfirm",value:f,onChange:g=>m(g.target.value),placeholder:"delete my account",className:"max-w-xs"})]}),i.jsx(Ee,{variant:"destructive",size:"sm",disabled:f!=="delete my account"||l.isPending,onClick:x,children:l.isPending?i.jsxs(i.Fragment,{children:[i.jsx(Kt,{className:"size-3.5 animate-spin mr-1.5"}),"Deleting..."]}):"Delete Account"})]})]})]})}function QI(e){const n=e.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?([\s\S]*)$/);if(!n)return{meta:{},body:e.trim()};const s=n[1],o=n[2].trim(),l={},c=s.replace(/^(\w[\w-]*):\s*\n((?:[ \t]+-[^\n]*\n?)+)/gm,(d,f,m)=>(l[f]=m.match(/^[ \t]+-\s*(.+)$/gm).map(p=>p.replace(/^[ \t]+-\s*/,"").trim()),""));for(const d of c.split(`
|
|
363
|
+
`)){const f=d.match(/^(\w[\w-]*):\s*(.*)/);if(!f)continue;const[,m,p]=f;m in l||(p.startsWith("[")?l[m]=p.slice(1,-1).split(",").map(x=>x.trim().replace(/^["']|["']$/g,"")).filter(Boolean):l[m]=p.replace(/^["']|["']$/g,"").trim())}return{meta:l,body:o}}function qI(e){const n=e.split("/");return n.length>=2?n[n.length-2].replace(/s$/,""):"insight"}const YI=new Set(["id","kind","title","tags","source","created","identity_key","expires_at"]);function GI(e){const n={};for(const[s,o]of Object.entries(e))YI.has(s)||(n[s]=o);return Object.keys(n).length?n:void 0}function XI(){const e=PR(),[n,s]=v.useState(""),[o,l]=v.useState(!1),[c,d]=v.useState(0),[f,m]=v.useState(0),[p,x]=v.useState(0),[g,w]=v.useState([]),[b,N]=v.useState(null),S=v.useRef(null),C=v.useRef(null),k=async R=>{const L=Array.from(R.target.files??[]).filter(I=>I.name.endsWith(".md"));if(!L.length)return;l(!0),d(0),m(L.length),x(0),N(null),w([]);let B=0;const T=[];for(let I=0;I<L.length;I++){const W=L[I];try{const J=await W.text(),{meta:Z,body:q}=QI(J),pe=Z.kind||qI(W.webkitRelativePath),ue=Z.title||void 0;await e.mutateAsync({id:Z.id,kind:pe,title:ue||null,body:q,tags:Z.tags||[],source:Z.source||"import",identity_key:Z.identity_key||null,expires_at:Z.expires_at||null,created_at:Z.created||null,meta:GI(Z)}),B++}catch(J){T.push({title:W.name,error:J instanceof Error?J.message:"Unknown error"})}x(I+1),d((I+1)/L.length*100)}l(!1),N({succeeded:B,total:L.length}),w(T),R.target.value=""},P=async()=>{if(!n.trim())return;let R;try{if(R=JSON.parse(n),!Array.isArray(R)){$e.error("Expected a JSON array of entries");return}}catch{$e.error("Invalid JSON");return}l(!0),d(0),m(R.length),x(0),N(null),w([]);let L=0;const B=[];for(let T=0;T<R.length;T++){try{await e.mutateAsync(R[T]),L++}catch(I){B.push({title:R[T].title||`Entry ${T+1}`,error:I instanceof Error?I.message:"Unknown error"})}x(T+1),d((T+1)/R.length*100)}l(!1),s(""),N({succeeded:L,total:R.length}),w(B)},E=R=>{var T;const L=(T=R.target.files)==null?void 0:T[0];if(!L)return;const B=new FileReader;B.onload=I=>{var W;s((W=I.target)==null?void 0:W.result)},B.readAsText(L)};return i.jsxs("div",{className:"p-6 max-w-3xl mx-auto space-y-6",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl font-bold",children:"Import"}),i.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Import entries from your local vault or a JSON export."})]}),i.jsxs(lt,{children:[i.jsx(wt,{className:"pb-3",children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(ml,{className:"size-4"}),i.jsx(Et,{className:"text-base",children:"Import"})]})}),i.jsxs(ct,{className:"space-y-3",children:[i.jsxs("div",{className:"rounded-lg border-2 border-dashed border-muted-foreground/25 p-6 text-center space-y-2",children:[i.jsx(Kk,{className:"size-8 mx-auto text-muted-foreground/50"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"Select your local vault folder"}),i.jsx("p",{className:"text-xs text-muted-foreground/70",children:"All .md files will be imported"}),i.jsx(Ee,{size:"sm",variant:"outline",onClick:()=>{var R;return(R=C.current)==null?void 0:R.click()},disabled:o,children:"Select folder"}),i.jsx("input",{type:"file",ref:C,webkitdirectory:"",multiple:!0,className:"hidden",onChange:k})]}),o&&i.jsxs("div",{className:"space-y-1",children:[i.jsxs("p",{className:"text-xs text-muted-foreground",children:[p," / ",f]}),i.jsx(F0,{value:c,className:"h-1.5"})]}),b&&i.jsxs("div",{className:"space-y-2 text-sm",children:[i.jsxs("p",{className:"text-muted-foreground",children:["Imported"," ",i.jsx("span",{className:"font-medium text-foreground",children:b.succeeded})," ","of ",b.total," entries."]}),g.length>0&&i.jsxs("div",{className:"rounded-md border border-destructive/30 bg-destructive/5 p-3 space-y-1 max-h-48 overflow-y-auto",children:[i.jsxs("p",{className:"text-xs font-medium text-destructive mb-1.5",children:[g.length," failed:"]}),g.map((R,L)=>i.jsxs("div",{className:"text-xs",children:[i.jsx("span",{className:"font-medium",children:R.title}),i.jsxs("span",{className:"text-muted-foreground",children:[" ","— ",R.error]})]},L))]}),i.jsx(Ee,{size:"sm",variant:"ghost",onClick:()=>N(null),className:"h-7 text-xs",children:"Dismiss"})]}),i.jsxs("details",{className:"text-xs",children:[i.jsx("summary",{className:"cursor-pointer text-muted-foreground hover:text-foreground transition-colors",children:"Import from JSON instead"}),i.jsxs("div",{className:"mt-3 space-y-2",children:[i.jsx(Cb,{id:"jsonInput",placeholder:`[
|
|
364
|
+
{
|
|
365
|
+
"category": "knowledge",
|
|
366
|
+
"kind": "insight",
|
|
367
|
+
"title": "...",
|
|
368
|
+
"body": "...",
|
|
369
|
+
"tags": ["tag1"]
|
|
370
|
+
}
|
|
371
|
+
]`,value:n,onChange:R=>s(R.target.value),className:"min-h-[160px] font-mono text-xs"}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx(Ee,{size:"sm",onClick:P,disabled:o||!n.trim(),children:o?i.jsxs(i.Fragment,{children:[i.jsx(Kt,{className:"size-3.5 animate-spin mr-1.5"}),p,"/",f]}):"Import JSON"}),i.jsx("input",{type:"file",ref:S,accept:".json",className:"hidden",onChange:E}),i.jsx(Ee,{size:"sm",variant:"outline",onClick:()=>{var R;return(R=S.current)==null?void 0:R.click()},disabled:o,children:"Upload file"})]})]})]})]})]})]})}function JI(){const{theme:e,setTheme:n}=Gm(),{user:s}=js(),[o,l]=v.useState(!1),c=async()=>{s&&(await navigator.clipboard.writeText(s.id),l(!0),$e.success("User ID copied"),setTimeout(()=>l(!1),2e3))};return s?i.jsxs("div",{className:"p-6 max-w-3xl mx-auto space-y-6",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl font-bold",children:"Account"}),i.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Your profile and preferences."})]}),i.jsxs(lt,{children:[i.jsx(wt,{className:"pb-3",children:i.jsx(Et,{className:"text-base",children:"Profile"})}),i.jsxs(ct,{className:"space-y-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(dt,{className:"text-xs",children:"Email"}),i.jsx(sn,{value:s.email,readOnly:!0,className:"bg-muted"})]}),s.name&&i.jsxs("div",{className:"space-y-2",children:[i.jsx(dt,{className:"text-xs",children:"Name"}),i.jsx(sn,{value:s.name,readOnly:!0,className:"bg-muted"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(dt,{className:"text-xs",children:"User ID"}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("code",{className:"flex-1 bg-muted px-3 py-2 rounded text-xs font-mono",children:s.id}),i.jsx(Ee,{variant:"outline",size:"icon",className:"size-8",onClick:c,children:o?i.jsx(Hr,{className:"size-3"}):i.jsx(ws,{className:"size-3"})})]}),i.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Share this with support if you need help."})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(dt,{className:"text-xs",children:"Member since"}),i.jsx("p",{className:"text-sm",children:s.createdAt.toLocaleDateString()})]})]})]}),i.jsxs(lt,{children:[i.jsx(wt,{className:"pb-3",children:i.jsx(Et,{className:"text-base",children:"Preferences"})}),i.jsx(ct,{className:"space-y-4",children:i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx(dt,{className:"text-sm",children:"Dark mode"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"Toggle between light and dark theme"})]}),i.jsx(k1,{checked:e==="dark",onCheckedChange:d=>n(d?"dark":"light")})]})})]})]}):null}function ZI(){return i.jsx(Kx,{to:"/settings/data",replace:!0})}function eD(){const e=or(),n=DR(),[s,o]=v.useState(""),l=c=>{c.preventDefault(),s.trim()&&n.mutate(s.trim(),{onSuccess:d=>{$e.success(`Team "${d.name}" created`),e(`/team/${d.id}`)},onError:()=>{$e.error("Failed to create team")}})};return i.jsxs("div",{className:"p-6 max-w-lg mx-auto",children:[i.jsx("h1",{className:"text-2xl font-semibold mb-6",children:"Create Team"}),i.jsxs(lt,{children:[i.jsx(wt,{children:i.jsx(Et,{className:"text-base",children:"New Team"})}),i.jsx(ct,{children:i.jsxs("form",{onSubmit:l,className:"space-y-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(dt,{htmlFor:"name",children:"Team Name"}),i.jsx(sn,{id:"name",placeholder:"e.g. Engineering, Product, Research",value:s,onChange:c=>o(c.target.value),maxLength:100,autoFocus:!0}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"You'll be the team owner and can invite members after creation."})]}),i.jsx(Ee,{type:"submit",disabled:!s.trim()||n.isPending,className:"w-full",children:n.isPending?i.jsxs(i.Fragment,{children:[i.jsx(Kt,{className:"size-4 mr-2 animate-spin"}),"Creating..."]}):"Create Team"})]})})]})]})}const sx=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function tD(){const{id:e}=Bj(),{user:n}=js(),{data:s,isLoading:o}=MR(e||null),{data:l}=IR(e||null),c=OR(),d=zR(),[f,m]=v.useState(""),[p,x]=v.useState(!1),[g,w]=v.useState(null),b=(s==null?void 0:s.role)==="owner"||(s==null?void 0:s.role)==="admin",N=k=>{k.preventDefault(),!(!e||!f.trim()||!sx.test(f))&&c.mutate({teamId:e,email:f.trim()},{onSuccess:P=>{$e.success(`Invite sent to ${P.email}`),w(P.token),m("")},onError:P=>{$e.error(P.message||"Failed to send invite")}})},S=(k,P)=>{e&&confirm(`Remove ${P} from the team?`)&&d.mutate({teamId:e,userId:k},{onSuccess:()=>$e.success(`${P} removed from team`),onError:E=>$e.error(E.message||"Failed to remove member")})},C=async k=>{const P=`${window.location.origin}/team/invite/${k}?team=${e}`;await navigator.clipboard.writeText(P),w(k),$e.success("Invite link copied"),setTimeout(()=>w(null),2e3)};return o?i.jsx("div",{className:"flex items-center justify-center p-12",children:i.jsx(Kt,{className:"size-6 animate-spin text-muted-foreground"})}):s?i.jsxs("div",{className:"p-6 space-y-6 max-w-4xl mx-auto",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl font-semibold",children:s.name}),i.jsxs("p",{className:"text-sm text-muted-foreground",children:["Your role:"," ",i.jsx(ht,{variant:"outline",className:"ml-1",children:s.role})]})]}),b&&i.jsxs(Ee,{variant:"outline",size:"sm",onClick:()=>x(!p),children:[i.jsx(x2,{className:"size-4 mr-1.5"}),"Invite"]})]}),p&&b&&i.jsxs(lt,{children:[i.jsx(wt,{className:"pb-3",children:i.jsx(Et,{className:"text-base",children:"Invite Member"})}),i.jsxs(ct,{children:[i.jsxs("form",{onSubmit:N,className:"flex items-end gap-3",children:[i.jsxs("div",{className:"flex-1 space-y-2",children:[i.jsx(dt,{htmlFor:"invite-email",children:"Email"}),i.jsx(sn,{id:"invite-email",type:"email",placeholder:"colleague@company.com",value:f,onChange:k=>m(k.target.value),autoFocus:!0})]}),i.jsx(Ee,{type:"submit",disabled:!f.trim()||!sx.test(f)||c.isPending,children:c.isPending?i.jsx(Kt,{className:"size-4 animate-spin"}):"Send Invite"})]}),g&&i.jsxs("div",{className:"mt-3 p-3 bg-muted rounded-md",children:[i.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Share this invite link with the user:"}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs("code",{className:"text-xs flex-1 truncate",children:[window.location.origin,"/team/invite/",g,"?team=",e]}),i.jsx(Ee,{variant:"ghost",size:"icon",className:"size-7 shrink-0",onClick:()=>C(g),children:g?i.jsx(Hr,{className:"size-3"}):i.jsx(ws,{className:"size-3"})})]})]})]})]}),l&&i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[i.jsxs(lt,{children:[i.jsx(wt,{className:"pb-2",children:i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx(Et,{className:"text-xs font-medium text-muted-foreground",children:"Members"}),i.jsx(El,{className:"size-4 text-muted-foreground"})]})}),i.jsx(ct,{children:i.jsx("span",{className:"text-2xl font-semibold",children:l.members})})]}),i.jsxs(lt,{children:[i.jsx(wt,{className:"pb-2",children:i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx(Et,{className:"text-xs font-medium text-muted-foreground",children:"Entries"}),i.jsx(fo,{className:"size-4 text-muted-foreground"})]})}),i.jsx(ct,{children:i.jsx("span",{className:"text-2xl font-semibold",children:l.usage.entries})})]}),i.jsxs(lt,{children:[i.jsx(wt,{className:"pb-2",children:i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx(Et,{className:"text-xs font-medium text-muted-foreground",children:"Storage"}),i.jsx(y0,{className:"size-4 text-muted-foreground"})]})}),i.jsx(ct,{children:i.jsxs("span",{className:"text-2xl font-semibold",children:[au(l.usage.storageMb)," MB"]})})]})]}),i.jsxs(lt,{children:[i.jsx(wt,{className:"pb-3",children:i.jsxs(Et,{className:"text-base",children:["Members (",s.members.length,")"]})}),i.jsx(ct,{children:i.jsx("div",{className:"space-y-2",children:s.members.map(k=>i.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border last:border-0",children:[i.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[i.jsx("div",{className:"size-8 rounded-full bg-primary/10 text-primary flex items-center justify-center text-xs font-medium shrink-0",children:(k.name||k.email)[0].toUpperCase()}),i.jsxs("div",{className:"min-w-0",children:[i.jsxs("p",{className:"text-sm font-medium truncate",children:[k.name||k.email,k.userId===(n==null?void 0:n.id)&&i.jsx("span",{className:"text-xs text-muted-foreground ml-1",children:"(you)"})]}),i.jsx("p",{className:"text-xs text-muted-foreground truncate",children:k.email})]}),i.jsx(ht,{variant:"outline",className:"text-[10px] shrink-0",children:k.role})]}),b&&k.role!=="owner"&&k.userId!==(n==null?void 0:n.id)&&i.jsx(Ee,{variant:"ghost",size:"icon",className:"size-7 text-muted-foreground hover:text-destructive",onClick:()=>S(k.userId,k.email),disabled:d.isPending,children:i.jsx(yu,{className:"size-3.5"})})]},k.userId))})})]}),b&&s.invites.length>0&&i.jsxs(lt,{children:[i.jsx(wt,{className:"pb-3",children:i.jsx(Et,{className:"text-base",children:"Pending Invites"})}),i.jsx(ct,{children:i.jsx("div",{className:"space-y-2",children:s.invites.filter(k=>k.status==="pending").map(k=>i.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border last:border-0",children:[i.jsxs("div",{children:[i.jsx("p",{className:"text-sm",children:k.email}),i.jsxs("p",{className:"text-xs text-muted-foreground",children:["Expires"," ",new Date(k.expiresAt).toLocaleDateString()]})]}),i.jsx(ht,{variant:"secondary",className:"text-[10px]",children:k.status})]},k.id))})})]})]}):i.jsxs("div",{className:"p-6 text-center",children:[i.jsx("p",{className:"text-muted-foreground",children:"Team not found"}),i.jsx(Ot,{to:"/",className:"text-sm text-primary hover:underline mt-2 inline-block",children:"Back to Dashboard"})]})}function nD(){const[e]=qm(),n=or(),s=LR(),o=e.get("token")||"",l=e.get("team")||"",c=!o||!l,[d,f]=v.useState(c?"error":"idle"),[m,p]=v.useState(c?"Invalid invite link. Missing token or team ID.":""),x=()=>{!o||!l||(f("joining"),s.mutate({teamId:l,token:o},{onSuccess:g=>{f("success"),setTimeout(()=>n(`/team/${g.teamId}`),1500)},onError:g=>{f("error"),p(g.message||"Failed to join team")}}))};return i.jsx("div",{className:"p-6 max-w-md mx-auto mt-12",children:i.jsxs(lt,{children:[i.jsx(wt,{children:i.jsx(Et,{className:"text-base text-center",children:"Team Invite"})}),i.jsxs(ct,{className:"text-center space-y-4",children:[d==="idle"&&i.jsxs(i.Fragment,{children:[i.jsx("p",{className:"text-sm text-muted-foreground",children:"You've been invited to join a team. Click below to accept."}),i.jsx(Ee,{onClick:x,className:"w-full",children:"Accept Invite"})]}),d==="joining"&&i.jsxs("div",{className:"flex flex-col items-center gap-3 py-4",children:[i.jsx(Kt,{className:"size-8 animate-spin text-muted-foreground"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"Joining team..."})]}),d==="success"&&i.jsxs("div",{className:"flex flex-col items-center gap-3 py-4",children:[i.jsx(Mk,{className:"size-8 text-emerald-500"}),i.jsx("p",{className:"text-sm font-medium",children:"You've joined the team!"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"Redirecting to team dashboard..."})]}),d==="error"&&i.jsxs("div",{className:"flex flex-col items-center gap-3 py-4",children:[i.jsx(Ok,{className:"size-8 text-red-500"}),i.jsx("p",{className:"text-sm font-medium",children:"Could not join team"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:m}),i.jsx(Ee,{variant:"outline",onClick:()=>n("/"),className:"mt-2",children:"Go to Dashboard"})]})]})]})})}const rD=DC([{path:"/login",Component:LI},{path:"/register",Component:FI},{path:"/auth/callback",Component:$I},{path:"/",Component:FT,ErrorBoundary:UI,children:[{index:!0,Component:YT},{path:"search",Component:DI},{path:"import",Component:XI},{path:"vault/knowledge",Component:NI},{path:"vault/entities",Component:jI},{path:"vault/events",Component:EI},{path:"team/new",Component:eD},{path:"team/:id",Component:tD},{path:"team/invite",Component:nD},{path:"settings/api-keys",Component:HI},{path:"settings/billing",Component:WI},{path:"settings/data",Component:KI},{path:"settings/account",Component:JI},{path:"settings/sync",Component:ZI}]},{path:"*",Component:R1}]),sD=new CE;function oD(){return i.jsx(GC,{attribute:"class",defaultTheme:"light",enableSystem:!0,children:i.jsx(EE,{client:sD,children:i.jsxs(wk,{children:[i.jsx(aC,{router:rD}),i.jsx(dk,{})]})})})}wN.createRoot(document.getElementById("root")).render(i.jsx(oD,{}));
|