bertrand 0.20.0 → 0.20.1

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.
@@ -0,0 +1,684 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/css-DPfMkruS.js"])))=>i.map(i=>d[i]);
2
+ var a8=Object.defineProperty;var l8=Object.getPrototypeOf;var u8=Reflect.get;var m_=e=>{throw TypeError(e)};var c8=(e,t,n)=>t in e?a8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var te=(e,t,n)=>c8(e,typeof t!="symbol"?t+"":t,n),Sv=(e,t,n)=>t.has(e)||m_("Cannot "+n);var K=(e,t,n)=>(Sv(e,t,"read from private field"),n?n.call(e):t.get(e)),He=(e,t,n)=>t.has(e)?m_("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),$e=(e,t,n,r)=>(Sv(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),rt=(e,t,n)=>(Sv(e,t,"access private method"),n);var sm=(e,t,n,r)=>({set _(i){$e(e,t,i,n)},get _(){return K(e,t,r)}}),g_=(e,t,n)=>u8(l8(e),n,t);function f8(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function Jw(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Cv={exports:{}},ad={};/**
3
+ * @license React
4
+ * react-jsx-runtime.production.js
5
+ *
6
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */var y_;function d8(){if(y_)return ad;y_=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,o){var a=null;if(o!==void 0&&(a=""+o),i.key!==void 0&&(a=""+i.key),"key"in i){o={};for(var u in i)u!=="key"&&(o[u]=i[u])}else o=i;return i=o.ref,{$$typeof:e,type:r,key:a,ref:i!==void 0?i:null,props:o}}return ad.Fragment=t,ad.jsx=n,ad.jsxs=n,ad}var b_;function h8(){return b_||(b_=1,Cv.exports=d8()),Cv.exports}var E=h8(),Ev={exports:{}},nt={};/**
11
+ * @license React
12
+ * react.production.js
13
+ *
14
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
15
+ *
16
+ * This source code is licensed under the MIT license found in the
17
+ * LICENSE file in the root directory of this source tree.
18
+ */var v_;function p8(){if(v_)return nt;v_=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),a=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),g=Symbol.iterator;function y(Y){return Y===null||typeof Y!="object"?null:(Y=g&&Y[g]||Y["@@iterator"],typeof Y=="function"?Y:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,S={};function x(Y,J,H){this.props=Y,this.context=J,this.refs=S,this.updater=H||b}x.prototype.isReactComponent={},x.prototype.setState=function(Y,J){if(typeof Y!="object"&&typeof Y!="function"&&Y!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,Y,J,"setState")},x.prototype.forceUpdate=function(Y){this.updater.enqueueForceUpdate(this,Y,"forceUpdate")};function _(){}_.prototype=x.prototype;function R(Y,J,H){this.props=Y,this.context=J,this.refs=S,this.updater=H||b}var T=R.prototype=new _;T.constructor=R,v(T,x.prototype),T.isPureReactComponent=!0;var A=Array.isArray;function D(){}var O={H:null,A:null,T:null,S:null},$=Object.prototype.hasOwnProperty;function z(Y,J,H){var ie=H.ref;return{$$typeof:e,type:Y,key:J,ref:ie!==void 0?ie:null,props:H}}function j(Y,J){return z(Y.type,J,Y.props)}function I(Y){return typeof Y=="object"&&Y!==null&&Y.$$typeof===e}function M(Y){var J={"=":"=0",":":"=2"};return"$"+Y.replace(/[=:]/g,function(H){return J[H]})}var B=/\/+/g;function G(Y,J){return typeof Y=="object"&&Y!==null&&Y.key!=null?M(""+Y.key):J.toString(36)}function L(Y){switch(Y.status){case"fulfilled":return Y.value;case"rejected":throw Y.reason;default:switch(typeof Y.status=="string"?Y.then(D,D):(Y.status="pending",Y.then(function(J){Y.status==="pending"&&(Y.status="fulfilled",Y.value=J)},function(J){Y.status==="pending"&&(Y.status="rejected",Y.reason=J)})),Y.status){case"fulfilled":return Y.value;case"rejected":throw Y.reason}}throw Y}function F(Y,J,H,ie,re){var he=typeof Y;(he==="undefined"||he==="boolean")&&(Y=null);var ve=!1;if(Y===null)ve=!0;else switch(he){case"bigint":case"string":case"number":ve=!0;break;case"object":switch(Y.$$typeof){case e:case t:ve=!0;break;case h:return ve=Y._init,F(ve(Y._payload),J,H,ie,re)}}if(ve)return re=re(Y),ve=ie===""?"."+G(Y,0):ie,A(re)?(H="",ve!=null&&(H=ve.replace(B,"$&/")+"/"),F(re,J,H,"",function(Ie){return Ie})):re!=null&&(I(re)&&(re=j(re,H+(re.key==null||Y&&Y.key===re.key?"":(""+re.key).replace(B,"$&/")+"/")+ve)),J.push(re)),1;ve=0;var Re=ie===""?".":ie+":";if(A(Y))for(var ce=0;ce<Y.length;ce++)ie=Y[ce],he=Re+G(ie,ce),ve+=F(ie,J,H,he,re);else if(ce=y(Y),typeof ce=="function")for(Y=ce.call(Y),ce=0;!(ie=Y.next()).done;)ie=ie.value,he=Re+G(ie,ce++),ve+=F(ie,J,H,he,re);else if(he==="object"){if(typeof Y.then=="function")return F(L(Y),J,H,ie,re);throw J=String(Y),Error("Objects are not valid as a React child (found: "+(J==="[object Object]"?"object with keys {"+Object.keys(Y).join(", ")+"}":J)+"). If you meant to render a collection of children, use an array instead.")}return ve}function U(Y,J,H){if(Y==null)return Y;var ie=[],re=0;return F(Y,ie,"","",function(he){return J.call(H,he,re++)}),ie}function V(Y){if(Y._status===-1){var J=Y._result;J=J(),J.then(function(H){(Y._status===0||Y._status===-1)&&(Y._status=1,Y._result=H)},function(H){(Y._status===0||Y._status===-1)&&(Y._status=2,Y._result=H)}),Y._status===-1&&(Y._status=0,Y._result=J)}if(Y._status===1)return Y._result.default;throw Y._result}var W=typeof reportError=="function"?reportError:function(Y){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var J=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof Y=="object"&&Y!==null&&typeof Y.message=="string"?String(Y.message):String(Y),error:Y});if(!window.dispatchEvent(J))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",Y);return}console.error(Y)},N={map:U,forEach:function(Y,J,H){U(Y,function(){J.apply(this,arguments)},H)},count:function(Y){var J=0;return U(Y,function(){J++}),J},toArray:function(Y){return U(Y,function(J){return J})||[]},only:function(Y){if(!I(Y))throw Error("React.Children.only expected to receive a single React element child.");return Y}};return nt.Activity=p,nt.Children=N,nt.Component=x,nt.Fragment=n,nt.Profiler=i,nt.PureComponent=R,nt.StrictMode=r,nt.Suspense=c,nt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,nt.__COMPILER_RUNTIME={__proto__:null,c:function(Y){return O.H.useMemoCache(Y)}},nt.cache=function(Y){return function(){return Y.apply(null,arguments)}},nt.cacheSignal=function(){return null},nt.cloneElement=function(Y,J,H){if(Y==null)throw Error("The argument must be a React element, but you passed "+Y+".");var ie=v({},Y.props),re=Y.key;if(J!=null)for(he in J.key!==void 0&&(re=""+J.key),J)!$.call(J,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&J.ref===void 0||(ie[he]=J[he]);var he=arguments.length-2;if(he===1)ie.children=H;else if(1<he){for(var ve=Array(he),Re=0;Re<he;Re++)ve[Re]=arguments[Re+2];ie.children=ve}return z(Y.type,re,ie)},nt.createContext=function(Y){return Y={$$typeof:a,_currentValue:Y,_currentValue2:Y,_threadCount:0,Provider:null,Consumer:null},Y.Provider=Y,Y.Consumer={$$typeof:o,_context:Y},Y},nt.createElement=function(Y,J,H){var ie,re={},he=null;if(J!=null)for(ie in J.key!==void 0&&(he=""+J.key),J)$.call(J,ie)&&ie!=="key"&&ie!=="__self"&&ie!=="__source"&&(re[ie]=J[ie]);var ve=arguments.length-2;if(ve===1)re.children=H;else if(1<ve){for(var Re=Array(ve),ce=0;ce<ve;ce++)Re[ce]=arguments[ce+2];re.children=Re}if(Y&&Y.defaultProps)for(ie in ve=Y.defaultProps,ve)re[ie]===void 0&&(re[ie]=ve[ie]);return z(Y,he,re)},nt.createRef=function(){return{current:null}},nt.forwardRef=function(Y){return{$$typeof:u,render:Y}},nt.isValidElement=I,nt.lazy=function(Y){return{$$typeof:h,_payload:{_status:-1,_result:Y},_init:V}},nt.memo=function(Y,J){return{$$typeof:f,type:Y,compare:J===void 0?null:J}},nt.startTransition=function(Y){var J=O.T,H={};O.T=H;try{var ie=Y(),re=O.S;re!==null&&re(H,ie),typeof ie=="object"&&ie!==null&&typeof ie.then=="function"&&ie.then(D,W)}catch(he){W(he)}finally{J!==null&&H.types!==null&&(J.types=H.types),O.T=J}},nt.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()},nt.use=function(Y){return O.H.use(Y)},nt.useActionState=function(Y,J,H){return O.H.useActionState(Y,J,H)},nt.useCallback=function(Y,J){return O.H.useCallback(Y,J)},nt.useContext=function(Y){return O.H.useContext(Y)},nt.useDebugValue=function(){},nt.useDeferredValue=function(Y,J){return O.H.useDeferredValue(Y,J)},nt.useEffect=function(Y,J){return O.H.useEffect(Y,J)},nt.useEffectEvent=function(Y){return O.H.useEffectEvent(Y)},nt.useId=function(){return O.H.useId()},nt.useImperativeHandle=function(Y,J,H){return O.H.useImperativeHandle(Y,J,H)},nt.useInsertionEffect=function(Y,J){return O.H.useInsertionEffect(Y,J)},nt.useLayoutEffect=function(Y,J){return O.H.useLayoutEffect(Y,J)},nt.useMemo=function(Y,J){return O.H.useMemo(Y,J)},nt.useOptimistic=function(Y,J){return O.H.useOptimistic(Y,J)},nt.useReducer=function(Y,J,H){return O.H.useReducer(Y,J,H)},nt.useRef=function(Y){return O.H.useRef(Y)},nt.useState=function(Y){return O.H.useState(Y)},nt.useSyncExternalStore=function(Y,J,H){return O.H.useSyncExternalStore(Y,J,H)},nt.useTransition=function(){return O.H.useTransition()},nt.version="19.2.5",nt}var x_;function wh(){return x_||(x_=1,Ev.exports=p8()),Ev.exports}var C=wh();const va=Jw(C),os=f8({__proto__:null,default:va},[C]);var kv={exports:{}},ld={},Rv={exports:{}},_v={};/**
19
+ * @license React
20
+ * scheduler.production.js
21
+ *
22
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
23
+ *
24
+ * This source code is licensed under the MIT license found in the
25
+ * LICENSE file in the root directory of this source tree.
26
+ */var w_;function m8(){return w_||(w_=1,(function(e){function t(F,U){var V=F.length;F.push(U);e:for(;0<V;){var W=V-1>>>1,N=F[W];if(0<i(N,U))F[W]=U,F[V]=N,V=W;else break e}}function n(F){return F.length===0?null:F[0]}function r(F){if(F.length===0)return null;var U=F[0],V=F.pop();if(V!==U){F[0]=V;e:for(var W=0,N=F.length,Y=N>>>1;W<Y;){var J=2*(W+1)-1,H=F[J],ie=J+1,re=F[ie];if(0>i(H,V))ie<N&&0>i(re,H)?(F[W]=re,F[ie]=V,W=ie):(F[W]=H,F[J]=V,W=J);else if(ie<N&&0>i(re,V))F[W]=re,F[ie]=V,W=ie;else break e}}return U}function i(F,U){var V=F.sortIndex-U.sortIndex;return V!==0?V:F.id-U.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,u=a.now();e.unstable_now=function(){return a.now()-u}}var c=[],f=[],h=1,p=null,g=3,y=!1,b=!1,v=!1,S=!1,x=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function T(F){for(var U=n(f);U!==null;){if(U.callback===null)r(f);else if(U.startTime<=F)r(f),U.sortIndex=U.expirationTime,t(c,U);else break;U=n(f)}}function A(F){if(v=!1,T(F),!b)if(n(c)!==null)b=!0,D||(D=!0,M());else{var U=n(f);U!==null&&L(A,U.startTime-F)}}var D=!1,O=-1,$=5,z=-1;function j(){return S?!0:!(e.unstable_now()-z<$)}function I(){if(S=!1,D){var F=e.unstable_now();z=F;var U=!0;try{e:{b=!1,v&&(v=!1,_(O),O=-1),y=!0;var V=g;try{t:{for(T(F),p=n(c);p!==null&&!(p.expirationTime>F&&j());){var W=p.callback;if(typeof W=="function"){p.callback=null,g=p.priorityLevel;var N=W(p.expirationTime<=F);if(F=e.unstable_now(),typeof N=="function"){p.callback=N,T(F),U=!0;break t}p===n(c)&&r(c),T(F)}else r(c);p=n(c)}if(p!==null)U=!0;else{var Y=n(f);Y!==null&&L(A,Y.startTime-F),U=!1}}break e}finally{p=null,g=V,y=!1}U=void 0}}finally{U?M():D=!1}}}var M;if(typeof R=="function")M=function(){R(I)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,G=B.port2;B.port1.onmessage=I,M=function(){G.postMessage(null)}}else M=function(){x(I,0)};function L(F,U){O=x(function(){F(e.unstable_now())},U)}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_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"):$=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(F){switch(g){case 1:case 2:case 3:var U=3;break;default:U=g}var V=g;g=U;try{return F()}finally{g=V}},e.unstable_requestPaint=function(){S=!0},e.unstable_runWithPriority=function(F,U){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var V=g;g=F;try{return U()}finally{g=V}},e.unstable_scheduleCallback=function(F,U,V){var W=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?W+V:W):V=W,F){case 1:var N=-1;break;case 2:N=250;break;case 5:N=1073741823;break;case 4:N=1e4;break;default:N=5e3}return N=V+N,F={id:h++,callback:U,priorityLevel:F,startTime:V,expirationTime:N,sortIndex:-1},V>W?(F.sortIndex=V,t(f,F),n(c)===null&&F===n(f)&&(v?(_(O),O=-1):v=!0,L(A,V-W))):(F.sortIndex=N,t(c,F),b||y||(b=!0,D||(D=!0,M()))),F},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(F){var U=g;return function(){var V=g;g=U;try{return F.apply(this,arguments)}finally{g=V}}}})(_v)),_v}var S_;function g8(){return S_||(S_=1,Rv.exports=m8()),Rv.exports}var Tv={exports:{}},qn={};/**
27
+ * @license React
28
+ * react-dom.production.js
29
+ *
30
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
31
+ *
32
+ * This source code is licensed under the MIT license found in the
33
+ * LICENSE file in the root directory of this source tree.
34
+ */var C_;function y8(){if(C_)return qn;C_=1;var e=wh();function t(c){var f="https://react.dev/errors/"+c;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)f+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+c+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function o(c,f,h){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:p==null?null:""+p,children:c,containerInfo:f,implementation:h}}var a=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(c,f){if(c==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return qn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,qn.createPortal=function(c,f){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return o(c,f,null,h)},qn.flushSync=function(c){var f=a.T,h=r.p;try{if(a.T=null,r.p=2,c)return c()}finally{a.T=f,r.p=h,r.d.f()}},qn.preconnect=function(c,f){typeof c=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(c,f))},qn.prefetchDNS=function(c){typeof c=="string"&&r.d.D(c)},qn.preinit=function(c,f){if(typeof c=="string"&&f&&typeof f.as=="string"){var h=f.as,p=u(h,f.crossOrigin),g=typeof f.integrity=="string"?f.integrity:void 0,y=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;h==="style"?r.d.S(c,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:p,integrity:g,fetchPriority:y}):h==="script"&&r.d.X(c,{crossOrigin:p,integrity:g,fetchPriority:y,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},qn.preinitModule=function(c,f){if(typeof c=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var h=u(f.as,f.crossOrigin);r.d.M(c,{crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(c)},qn.preload=function(c,f){if(typeof c=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var h=f.as,p=u(h,f.crossOrigin);r.d.L(c,h,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},qn.preloadModule=function(c,f){if(typeof c=="string")if(f){var h=u(f.as,f.crossOrigin);r.d.m(c,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(c)},qn.requestFormReset=function(c){r.d.r(c)},qn.unstable_batchedUpdates=function(c,f){return c(f)},qn.useFormState=function(c,f,h){return a.H.useFormState(c,f,h)},qn.useFormStatus=function(){return a.H.useHostTransitionStatus()},qn.version="19.2.5",qn}var E_;function MO(){if(E_)return Tv.exports;E_=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(t){console.error(t)}}return e(),Tv.exports=y8(),Tv.exports}/**
35
+ * @license React
36
+ * react-dom-client.production.js
37
+ *
38
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
39
+ *
40
+ * This source code is licensed under the MIT license found in the
41
+ * LICENSE file in the root directory of this source tree.
42
+ */var k_;function b8(){if(k_)return ld;k_=1;var e=g8(),t=wh(),n=MO();function r(s){var l="https://react.dev/errors/"+s;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)l+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+s+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function o(s){var l=s,d=s;if(s.alternate)for(;l.return;)l=l.return;else{s=l;do l=s,(l.flags&4098)!==0&&(d=l.return),s=l.return;while(s)}return l.tag===3?d:null}function a(s){if(s.tag===13){var l=s.memoizedState;if(l===null&&(s=s.alternate,s!==null&&(l=s.memoizedState)),l!==null)return l.dehydrated}return null}function u(s){if(s.tag===31){var l=s.memoizedState;if(l===null&&(s=s.alternate,s!==null&&(l=s.memoizedState)),l!==null)return l.dehydrated}return null}function c(s){if(o(s)!==s)throw Error(r(188))}function f(s){var l=s.alternate;if(!l){if(l=o(s),l===null)throw Error(r(188));return l!==s?null:s}for(var d=s,m=l;;){var w=d.return;if(w===null)break;var k=w.alternate;if(k===null){if(m=w.return,m!==null){d=m;continue}break}if(w.child===k.child){for(k=w.child;k;){if(k===d)return c(w),s;if(k===m)return c(w),l;k=k.sibling}throw Error(r(188))}if(d.return!==m.return)d=w,m=k;else{for(var P=!1,q=w.child;q;){if(q===d){P=!0,d=w,m=k;break}if(q===m){P=!0,m=w,d=k;break}q=q.sibling}if(!P){for(q=k.child;q;){if(q===d){P=!0,d=k,m=w;break}if(q===m){P=!0,m=k,d=w;break}q=q.sibling}if(!P)throw Error(r(189))}}if(d.alternate!==m)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?s:l}function h(s){var l=s.tag;if(l===5||l===26||l===27||l===6)return s;for(s=s.child;s!==null;){if(l=h(s),l!==null)return l;s=s.sibling}return null}var p=Object.assign,g=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),R=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),j=Symbol.for("react.memo_cache_sentinel"),I=Symbol.iterator;function M(s){return s===null||typeof s!="object"?null:(s=I&&s[I]||s["@@iterator"],typeof s=="function"?s:null)}var B=Symbol.for("react.client.reference");function G(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===B?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case v:return"Fragment";case x:return"Profiler";case S:return"StrictMode";case A:return"Suspense";case D:return"SuspenseList";case z:return"Activity"}if(typeof s=="object")switch(s.$$typeof){case b:return"Portal";case R:return s.displayName||"Context";case _:return(s._context.displayName||"Context")+".Consumer";case T:var l=s.render;return s=s.displayName,s||(s=l.displayName||l.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case O:return l=s.displayName||null,l!==null?l:G(s.type)||"Memo";case $:l=s._payload,s=s._init;try{return G(s(l))}catch{}}return null}var L=Array.isArray,F=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V={pending:!1,data:null,method:null,action:null},W=[],N=-1;function Y(s){return{current:s}}function J(s){0>N||(s.current=W[N],W[N]=null,N--)}function H(s,l){N++,W[N]=s.current,s.current=l}var ie=Y(null),re=Y(null),he=Y(null),ve=Y(null);function Re(s,l){switch(H(he,l),H(re,s),H(ie,null),l.nodeType){case 9:case 11:s=(s=l.documentElement)&&(s=s.namespaceURI)?L2(s):0;break;default:if(s=l.tagName,l=l.namespaceURI)l=L2(l),s=F2(l,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}J(ie),H(ie,s)}function ce(){J(ie),J(re),J(he)}function Ie(s){s.memoizedState!==null&&H(ve,s);var l=ie.current,d=F2(l,s.type);l!==d&&(H(re,s),H(ie,d))}function Ve(s){re.current===s&&(J(ie),J(re)),ve.current===s&&(J(ve),rd._currentValue=V)}var X,Z;function ne(s){if(X===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);X=l&&l[1]||"",Z=-1<d.stack.indexOf(`
43
+ at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
44
+ `+X+s+Z}var xe=!1;function ge(s,l){if(!s||xe)return"";xe=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var m={DetermineComponentFrameRoot:function(){try{if(l){var Ee=function(){throw Error()};if(Object.defineProperty(Ee.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ee,[])}catch(ye){var pe=ye}Reflect.construct(s,[],Ee)}else{try{Ee.call()}catch(ye){pe=ye}s.call(Ee.prototype)}}else{try{throw Error()}catch(ye){pe=ye}(Ee=s())&&typeof Ee.catch=="function"&&Ee.catch(function(){})}}catch(ye){if(ye&&pe&&typeof ye.stack=="string")return[ye.stack,pe.stack]}return[null,null]}};m.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var w=Object.getOwnPropertyDescriptor(m.DetermineComponentFrameRoot,"name");w&&w.configurable&&Object.defineProperty(m.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var k=m.DetermineComponentFrameRoot(),P=k[0],q=k[1];if(P&&q){var Q=P.split(`
45
+ `),de=q.split(`
46
+ `);for(w=m=0;m<Q.length&&!Q[m].includes("DetermineComponentFrameRoot");)m++;for(;w<de.length&&!de[w].includes("DetermineComponentFrameRoot");)w++;if(m===Q.length||w===de.length)for(m=Q.length-1,w=de.length-1;1<=m&&0<=w&&Q[m]!==de[w];)w--;for(;1<=m&&0<=w;m--,w--)if(Q[m]!==de[w]){if(m!==1||w!==1)do if(m--,w--,0>w||Q[m]!==de[w]){var be=`
47
+ `+Q[m].replace(" at new "," at ");return s.displayName&&be.includes("<anonymous>")&&(be=be.replace("<anonymous>",s.displayName)),be}while(1<=m&&0<=w);break}}}finally{xe=!1,Error.prepareStackTrace=d}return(d=s?s.displayName||s.name:"")?ne(d):""}function Ce(s,l){switch(s.tag){case 26:case 27:case 5:return ne(s.type);case 16:return ne("Lazy");case 13:return s.child!==l&&l!==null?ne("Suspense Fallback"):ne("Suspense");case 19:return ne("SuspenseList");case 0:case 15:return ge(s.type,!1);case 11:return ge(s.type.render,!1);case 1:return ge(s.type,!0);case 31:return ne("Activity");default:return""}}function le(s){try{var l="",d=null;do l+=Ce(s,d),d=s,s=s.return;while(s);return l}catch(m){return`
48
+ Error generating stack: `+m.message+`
49
+ `+m.stack}}var oe=Object.prototype.hasOwnProperty,me=e.unstable_scheduleCallback,ae=e.unstable_cancelCallback,Oe=e.unstable_shouldYield,Te=e.unstable_requestPaint,_e=e.unstable_now,De=e.unstable_getCurrentPriorityLevel,ue=e.unstable_ImmediatePriority,Se=e.unstable_UserBlockingPriority,ke=e.unstable_NormalPriority,Pe=e.unstable_LowPriority,Le=e.unstable_IdlePriority,st=e.log,Bt=e.unstable_setDisableYieldValue,Ot=null,Me=null;function Qe(s){if(typeof st=="function"&&Bt(s),Me&&typeof Me.setStrictMode=="function")try{Me.setStrictMode(Ot,s)}catch{}}var Ne=Math.clz32?Math.clz32:ut,Tt=Math.log,dt=Math.LN2;function ut(s){return s>>>=0,s===0?32:31-(Tt(s)/dt|0)|0}var Rt=256,en=262144,Xt=4194304;function tn(s){var l=s&42;if(l!==0)return l;switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function yn(s,l,d){var m=s.pendingLanes;if(m===0)return 0;var w=0,k=s.suspendedLanes,P=s.pingedLanes;s=s.warmLanes;var q=m&134217727;return q!==0?(m=q&~k,m!==0?w=tn(m):(P&=q,P!==0?w=tn(P):d||(d=q&~s,d!==0&&(w=tn(d))))):(q=m&~k,q!==0?w=tn(q):P!==0?w=tn(P):d||(d=m&~s,d!==0&&(w=tn(d)))),w===0?0:l!==0&&l!==w&&(l&k)===0&&(k=w&-w,d=l&-l,k>=d||k===32&&(d&4194048)!==0)?l:w}function Zr(s,l){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&l)===0}function Pa(s,l){switch(s){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ei(){var s=Xt;return Xt<<=1,(Xt&62914560)===0&&(Xt=4194304),s}function Na(s){for(var l=[],d=0;31>d;d++)l.push(s);return l}function ki(s,l){s.pendingLanes|=l,l!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function iu(s,l,d,m,w,k){var P=s.pendingLanes;s.pendingLanes=d,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=d,s.entangledLanes&=d,s.errorRecoveryDisabledLanes&=d,s.shellSuspendCounter=0;var q=s.entanglements,Q=s.expirationTimes,de=s.hiddenUpdates;for(d=P&~d;0<d;){var be=31-Ne(d),Ee=1<<be;q[be]=0,Q[be]=-1;var pe=de[be];if(pe!==null)for(de[be]=null,be=0;be<pe.length;be++){var ye=pe[be];ye!==null&&(ye.lane&=-536870913)}d&=~Ee}m!==0&&ou(s,m,0),k!==0&&w===0&&s.tag!==0&&(s.suspendedLanes|=k&~(P&~l))}function ou(s,l,d){s.pendingLanes|=l,s.suspendedLanes&=~l;var m=31-Ne(l);s.entangledLanes|=l,s.entanglements[m]=s.entanglements[m]|1073741824|d&261930}function us(s,l){var d=s.entangledLanes|=l;for(s=s.entanglements;d;){var m=31-Ne(d),w=1<<m;w&l|s[m]&l&&(s[m]|=l),d&=~w}}function Ri(s,l){var d=l&-l;return d=(d&42)!==0?1:Ia(d),(d&(s.suspendedLanes|l))!==0?0:d}function Ia(s){switch(s){case 2:s=1;break;case 8:s=4;break;case 32:s=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:s=128;break;case 268435456:s=134217728;break;default:s=0}return s}function ja(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function Ui(){var s=U.p;return s!==0?s:(s=window.event,s===void 0?32:l_(s.type))}function La(s,l){var d=U.p;try{return U.p=s,l()}finally{U.p=d}}var Mr=Math.random().toString(36).slice(2),on="__reactFiber$"+Mr,In="__reactProps$"+Mr,fo="__reactContainer$"+Mr,su="__reactEvents$"+Mr,X6="__reactListeners$"+Mr,Q6="__reactHandles$"+Mr,kE="__reactResources$"+Mr,bf="__reactMarker$"+Mr;function pb(s){delete s[on],delete s[In],delete s[su],delete s[X6],delete s[Q6]}function au(s){var l=s[on];if(l)return l;for(var d=s.parentNode;d;){if(l=d[fo]||d[on]){if(d=l.alternate,l.child!==null||d!==null&&d.child!==null)for(s=V2(s);s!==null;){if(d=s[on])return d;s=V2(s)}return l}s=d,d=s.parentNode}return null}function lu(s){if(s=s[on]||s[fo]){var l=s.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return s}return null}function vf(s){var l=s.tag;if(l===5||l===26||l===27||l===6)return s.stateNode;throw Error(r(33))}function uu(s){var l=s[kE];return l||(l=s[kE]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function Dn(s){s[bf]=!0}var RE=new Set,_E={};function Fa(s,l){cu(s,l),cu(s+"Capture",l)}function cu(s,l){for(_E[s]=l,s=0;s<l.length;s++)RE.add(l[s])}var Z6=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),TE={},AE={};function J6(s){return oe.call(AE,s)?!0:oe.call(TE,s)?!1:Z6.test(s)?AE[s]=!0:(TE[s]=!0,!1)}function Wh(s,l,d){if(J6(l))if(d===null)s.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":s.removeAttribute(l);return;case"boolean":var m=l.toLowerCase().slice(0,5);if(m!=="data-"&&m!=="aria-"){s.removeAttribute(l);return}}s.setAttribute(l,""+d)}}function Kh(s,l,d){if(d===null)s.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(l);return}s.setAttribute(l,""+d)}}function ho(s,l,d,m){if(m===null)s.removeAttribute(d);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(d);return}s.setAttributeNS(l,d,""+m)}}function Jr(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function DE(s){var l=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function ez(s,l,d){var m=Object.getOwnPropertyDescriptor(s.constructor.prototype,l);if(!s.hasOwnProperty(l)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var w=m.get,k=m.set;return Object.defineProperty(s,l,{configurable:!0,get:function(){return w.call(this)},set:function(P){d=""+P,k.call(this,P)}}),Object.defineProperty(s,l,{enumerable:m.enumerable}),{getValue:function(){return d},setValue:function(P){d=""+P},stopTracking:function(){s._valueTracker=null,delete s[l]}}}}function mb(s){if(!s._valueTracker){var l=DE(s)?"checked":"value";s._valueTracker=ez(s,l,""+s[l])}}function ME(s){if(!s)return!1;var l=s._valueTracker;if(!l)return!0;var d=l.getValue(),m="";return s&&(m=DE(s)?s.checked?"true":"false":s.value),s=m,s!==d?(l.setValue(s),!0):!1}function Xh(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var tz=/[\n"\\]/g;function ei(s){return s.replace(tz,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function gb(s,l,d,m,w,k,P,q){s.name="",P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?s.type=P:s.removeAttribute("type"),l!=null?P==="number"?(l===0&&s.value===""||s.value!=l)&&(s.value=""+Jr(l)):s.value!==""+Jr(l)&&(s.value=""+Jr(l)):P!=="submit"&&P!=="reset"||s.removeAttribute("value"),l!=null?yb(s,P,Jr(l)):d!=null?yb(s,P,Jr(d)):m!=null&&s.removeAttribute("value"),w==null&&k!=null&&(s.defaultChecked=!!k),w!=null&&(s.checked=w&&typeof w!="function"&&typeof w!="symbol"),q!=null&&typeof q!="function"&&typeof q!="symbol"&&typeof q!="boolean"?s.name=""+Jr(q):s.removeAttribute("name")}function OE(s,l,d,m,w,k,P,q){if(k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(s.type=k),l!=null||d!=null){if(!(k!=="submit"&&k!=="reset"||l!=null)){mb(s);return}d=d!=null?""+Jr(d):"",l=l!=null?""+Jr(l):d,q||l===s.value||(s.value=l),s.defaultValue=l}m=m??w,m=typeof m!="function"&&typeof m!="symbol"&&!!m,s.checked=q?s.checked:!!m,s.defaultChecked=!!m,P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"&&(s.name=P),mb(s)}function yb(s,l,d){l==="number"&&Xh(s.ownerDocument)===s||s.defaultValue===""+d||(s.defaultValue=""+d)}function fu(s,l,d,m){if(s=s.options,l){l={};for(var w=0;w<d.length;w++)l["$"+d[w]]=!0;for(d=0;d<s.length;d++)w=l.hasOwnProperty("$"+s[d].value),s[d].selected!==w&&(s[d].selected=w),w&&m&&(s[d].defaultSelected=!0)}else{for(d=""+Jr(d),l=null,w=0;w<s.length;w++){if(s[w].value===d){s[w].selected=!0,m&&(s[w].defaultSelected=!0);return}l!==null||s[w].disabled||(l=s[w])}l!==null&&(l.selected=!0)}}function $E(s,l,d){if(l!=null&&(l=""+Jr(l),l!==s.value&&(s.value=l),d==null)){s.defaultValue!==l&&(s.defaultValue=l);return}s.defaultValue=d!=null?""+Jr(d):""}function PE(s,l,d,m){if(l==null){if(m!=null){if(d!=null)throw Error(r(92));if(L(m)){if(1<m.length)throw Error(r(93));m=m[0]}d=m}d==null&&(d=""),l=d}d=Jr(l),s.defaultValue=d,m=s.textContent,m===d&&m!==""&&m!==null&&(s.value=m),mb(s)}function du(s,l){if(l){var d=s.firstChild;if(d&&d===s.lastChild&&d.nodeType===3){d.nodeValue=l;return}}s.textContent=l}var nz=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function NE(s,l,d){var m=l.indexOf("--")===0;d==null||typeof d=="boolean"||d===""?m?s.setProperty(l,""):l==="float"?s.cssFloat="":s[l]="":m?s.setProperty(l,d):typeof d!="number"||d===0||nz.has(l)?l==="float"?s.cssFloat=d:s[l]=(""+d).trim():s[l]=d+"px"}function IE(s,l,d){if(l!=null&&typeof l!="object")throw Error(r(62));if(s=s.style,d!=null){for(var m in d)!d.hasOwnProperty(m)||l!=null&&l.hasOwnProperty(m)||(m.indexOf("--")===0?s.setProperty(m,""):m==="float"?s.cssFloat="":s[m]="");for(var w in l)m=l[w],l.hasOwnProperty(w)&&d[w]!==m&&NE(s,w,m)}else for(var k in l)l.hasOwnProperty(k)&&NE(s,k,l[k])}function bb(s){if(s.indexOf("-")===-1)return!1;switch(s){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 rz=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),iz=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Qh(s){return iz.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}function po(){}var vb=null;function xb(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var hu=null,pu=null;function jE(s){var l=lu(s);if(l&&(s=l.stateNode)){var d=s[In]||null;e:switch(s=l.stateNode,l.type){case"input":if(gb(s,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name),l=d.name,d.type==="radio"&&l!=null){for(d=s;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll('input[name="'+ei(""+l)+'"][type="radio"]'),l=0;l<d.length;l++){var m=d[l];if(m!==s&&m.form===s.form){var w=m[In]||null;if(!w)throw Error(r(90));gb(m,w.value,w.defaultValue,w.defaultValue,w.checked,w.defaultChecked,w.type,w.name)}}for(l=0;l<d.length;l++)m=d[l],m.form===s.form&&ME(m)}break e;case"textarea":$E(s,d.value,d.defaultValue);break e;case"select":l=d.value,l!=null&&fu(s,!!d.multiple,l,!1)}}}var wb=!1;function LE(s,l,d){if(wb)return s(l,d);wb=!0;try{var m=s(l);return m}finally{if(wb=!1,(hu!==null||pu!==null)&&(Lp(),hu&&(l=hu,s=pu,pu=hu=null,jE(l),s)))for(l=0;l<s.length;l++)jE(s[l])}}function xf(s,l){var d=s.stateNode;if(d===null)return null;var m=d[In]||null;if(m===null)return null;d=m[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(s=s.type,m=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!m;break e;default:s=!1}if(s)return null;if(d&&typeof d!="function")throw Error(r(231,l,typeof d));return d}var mo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Sb=!1;if(mo)try{var wf={};Object.defineProperty(wf,"passive",{get:function(){Sb=!0}}),window.addEventListener("test",wf,wf),window.removeEventListener("test",wf,wf)}catch{Sb=!1}var cs=null,Cb=null,Zh=null;function FE(){if(Zh)return Zh;var s,l=Cb,d=l.length,m,w="value"in cs?cs.value:cs.textContent,k=w.length;for(s=0;s<d&&l[s]===w[s];s++);var P=d-s;for(m=1;m<=P&&l[d-m]===w[k-m];m++);return Zh=w.slice(s,1<m?1-m:void 0)}function Jh(s){var l=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&l===13&&(s=13)):s=l,s===10&&(s=13),32<=s||s===13?s:0}function ep(){return!0}function zE(){return!1}function dr(s){function l(d,m,w,k,P){this._reactName=d,this._targetInst=w,this.type=m,this.nativeEvent=k,this.target=P,this.currentTarget=null;for(var q in s)s.hasOwnProperty(q)&&(d=s[q],this[q]=d?d(k):k[q]);return this.isDefaultPrevented=(k.defaultPrevented!=null?k.defaultPrevented:k.returnValue===!1)?ep:zE,this.isPropagationStopped=zE,this}return p(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=ep)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=ep)},persist:function(){},isPersistent:ep}),l}var za={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},tp=dr(za),Sf=p({},za,{view:0,detail:0}),oz=dr(Sf),Eb,kb,Cf,np=p({},Sf,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_b,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==Cf&&(Cf&&s.type==="mousemove"?(Eb=s.screenX-Cf.screenX,kb=s.screenY-Cf.screenY):kb=Eb=0,Cf=s),Eb)},movementY:function(s){return"movementY"in s?s.movementY:kb}}),BE=dr(np),sz=p({},np,{dataTransfer:0}),az=dr(sz),lz=p({},Sf,{relatedTarget:0}),Rb=dr(lz),uz=p({},za,{animationName:0,elapsedTime:0,pseudoElement:0}),cz=dr(uz),fz=p({},za,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),dz=dr(fz),hz=p({},za,{data:0}),UE=dr(hz),pz={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},mz={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"},gz={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function yz(s){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(s):(s=gz[s])?!!l[s]:!1}function _b(){return yz}var bz=p({},Sf,{key:function(s){if(s.key){var l=pz[s.key]||s.key;if(l!=="Unidentified")return l}return s.type==="keypress"?(s=Jh(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?mz[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_b,charCode:function(s){return s.type==="keypress"?Jh(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?Jh(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),vz=dr(bz),xz=p({},np,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),HE=dr(xz),wz=p({},Sf,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_b}),Sz=dr(wz),Cz=p({},za,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ez=dr(Cz),kz=p({},np,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),Rz=dr(kz),_z=p({},za,{newState:0,oldState:0}),Tz=dr(_z),Az=[9,13,27,32],Tb=mo&&"CompositionEvent"in window,Ef=null;mo&&"documentMode"in document&&(Ef=document.documentMode);var Dz=mo&&"TextEvent"in window&&!Ef,GE=mo&&(!Tb||Ef&&8<Ef&&11>=Ef),qE=" ",VE=!1;function YE(s,l){switch(s){case"keyup":return Az.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function WE(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var mu=!1;function Mz(s,l){switch(s){case"compositionend":return WE(l);case"keypress":return l.which!==32?null:(VE=!0,qE);case"textInput":return s=l.data,s===qE&&VE?null:s;default:return null}}function Oz(s,l){if(mu)return s==="compositionend"||!Tb&&YE(s,l)?(s=FE(),Zh=Cb=cs=null,mu=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return GE&&l.locale!=="ko"?null:l.data;default:return null}}var $z={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 KE(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l==="input"?!!$z[s.type]:l==="textarea"}function XE(s,l,d,m){hu?pu?pu.push(m):pu=[m]:hu=m,l=qp(l,"onChange"),0<l.length&&(d=new tp("onChange","change",null,d,m),s.push({event:d,listeners:l}))}var kf=null,Rf=null;function Pz(s){O2(s,0)}function rp(s){var l=vf(s);if(ME(l))return s}function QE(s,l){if(s==="change")return l}var ZE=!1;if(mo){var Ab;if(mo){var Db="oninput"in document;if(!Db){var JE=document.createElement("div");JE.setAttribute("oninput","return;"),Db=typeof JE.oninput=="function"}Ab=Db}else Ab=!1;ZE=Ab&&(!document.documentMode||9<document.documentMode)}function ek(){kf&&(kf.detachEvent("onpropertychange",tk),Rf=kf=null)}function tk(s){if(s.propertyName==="value"&&rp(Rf)){var l=[];XE(l,Rf,s,xb(s)),LE(Pz,l)}}function Nz(s,l,d){s==="focusin"?(ek(),kf=l,Rf=d,kf.attachEvent("onpropertychange",tk)):s==="focusout"&&ek()}function Iz(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return rp(Rf)}function jz(s,l){if(s==="click")return rp(l)}function Lz(s,l){if(s==="input"||s==="change")return rp(l)}function Fz(s,l){return s===l&&(s!==0||1/s===1/l)||s!==s&&l!==l}var Or=typeof Object.is=="function"?Object.is:Fz;function _f(s,l){if(Or(s,l))return!0;if(typeof s!="object"||s===null||typeof l!="object"||l===null)return!1;var d=Object.keys(s),m=Object.keys(l);if(d.length!==m.length)return!1;for(m=0;m<d.length;m++){var w=d[m];if(!oe.call(l,w)||!Or(s[w],l[w]))return!1}return!0}function nk(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function rk(s,l){var d=nk(s);s=0;for(var m;d;){if(d.nodeType===3){if(m=s+d.textContent.length,s<=l&&m>=l)return{node:d,offset:l-s};s=m}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=nk(d)}}function ik(s,l){return s&&l?s===l?!0:s&&s.nodeType===3?!1:l&&l.nodeType===3?ik(s,l.parentNode):"contains"in s?s.contains(l):s.compareDocumentPosition?!!(s.compareDocumentPosition(l)&16):!1:!1}function ok(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var l=Xh(s.document);l instanceof s.HTMLIFrameElement;){try{var d=typeof l.contentWindow.location.href=="string"}catch{d=!1}if(d)s=l.contentWindow;else break;l=Xh(s.document)}return l}function Mb(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l&&(l==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||l==="textarea"||s.contentEditable==="true")}var zz=mo&&"documentMode"in document&&11>=document.documentMode,gu=null,Ob=null,Tf=null,$b=!1;function sk(s,l,d){var m=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;$b||gu==null||gu!==Xh(m)||(m=gu,"selectionStart"in m&&Mb(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),Tf&&_f(Tf,m)||(Tf=m,m=qp(Ob,"onSelect"),0<m.length&&(l=new tp("onSelect","select",null,l,d),s.push({event:l,listeners:m}),l.target=gu)))}function Ba(s,l){var d={};return d[s.toLowerCase()]=l.toLowerCase(),d["Webkit"+s]="webkit"+l,d["Moz"+s]="moz"+l,d}var yu={animationend:Ba("Animation","AnimationEnd"),animationiteration:Ba("Animation","AnimationIteration"),animationstart:Ba("Animation","AnimationStart"),transitionrun:Ba("Transition","TransitionRun"),transitionstart:Ba("Transition","TransitionStart"),transitioncancel:Ba("Transition","TransitionCancel"),transitionend:Ba("Transition","TransitionEnd")},Pb={},ak={};mo&&(ak=document.createElement("div").style,"AnimationEvent"in window||(delete yu.animationend.animation,delete yu.animationiteration.animation,delete yu.animationstart.animation),"TransitionEvent"in window||delete yu.transitionend.transition);function Ua(s){if(Pb[s])return Pb[s];if(!yu[s])return s;var l=yu[s],d;for(d in l)if(l.hasOwnProperty(d)&&d in ak)return Pb[s]=l[d];return s}var lk=Ua("animationend"),uk=Ua("animationiteration"),ck=Ua("animationstart"),Bz=Ua("transitionrun"),Uz=Ua("transitionstart"),Hz=Ua("transitioncancel"),fk=Ua("transitionend"),dk=new Map,Nb="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Nb.push("scrollEnd");function _i(s,l){dk.set(s,l),Fa(l,[s])}var ip=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},ti=[],bu=0,Ib=0;function op(){for(var s=bu,l=Ib=bu=0;l<s;){var d=ti[l];ti[l++]=null;var m=ti[l];ti[l++]=null;var w=ti[l];ti[l++]=null;var k=ti[l];if(ti[l++]=null,m!==null&&w!==null){var P=m.pending;P===null?w.next=w:(w.next=P.next,P.next=w),m.pending=w}k!==0&&hk(d,w,k)}}function sp(s,l,d,m){ti[bu++]=s,ti[bu++]=l,ti[bu++]=d,ti[bu++]=m,Ib|=m,s.lanes|=m,s=s.alternate,s!==null&&(s.lanes|=m)}function jb(s,l,d,m){return sp(s,l,d,m),ap(s)}function Ha(s,l){return sp(s,null,null,l),ap(s)}function hk(s,l,d){s.lanes|=d;var m=s.alternate;m!==null&&(m.lanes|=d);for(var w=!1,k=s.return;k!==null;)k.childLanes|=d,m=k.alternate,m!==null&&(m.childLanes|=d),k.tag===22&&(s=k.stateNode,s===null||s._visibility&1||(w=!0)),s=k,k=k.return;return s.tag===3?(k=s.stateNode,w&&l!==null&&(w=31-Ne(d),s=k.hiddenUpdates,m=s[w],m===null?s[w]=[l]:m.push(l),l.lane=d|536870912),k):null}function ap(s){if(50<Xf)throw Xf=0,V0=null,Error(r(185));for(var l=s.return;l!==null;)s=l,l=s.return;return s.tag===3?s.stateNode:null}var vu={};function Gz(s,l,d,m){this.tag=s,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $r(s,l,d,m){return new Gz(s,l,d,m)}function Lb(s){return s=s.prototype,!(!s||!s.isReactComponent)}function go(s,l){var d=s.alternate;return d===null?(d=$r(s.tag,l,s.key,s.mode),d.elementType=s.elementType,d.type=s.type,d.stateNode=s.stateNode,d.alternate=s,s.alternate=d):(d.pendingProps=l,d.type=s.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=s.flags&65011712,d.childLanes=s.childLanes,d.lanes=s.lanes,d.child=s.child,d.memoizedProps=s.memoizedProps,d.memoizedState=s.memoizedState,d.updateQueue=s.updateQueue,l=s.dependencies,d.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},d.sibling=s.sibling,d.index=s.index,d.ref=s.ref,d.refCleanup=s.refCleanup,d}function pk(s,l){s.flags&=65011714;var d=s.alternate;return d===null?(s.childLanes=0,s.lanes=l,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=d.childLanes,s.lanes=d.lanes,s.child=d.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=d.memoizedProps,s.memoizedState=d.memoizedState,s.updateQueue=d.updateQueue,s.type=d.type,l=d.dependencies,s.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),s}function lp(s,l,d,m,w,k){var P=0;if(m=s,typeof s=="function")Lb(s)&&(P=1);else if(typeof s=="string")P=K5(s,d,ie.current)?26:s==="html"||s==="head"||s==="body"?27:5;else e:switch(s){case z:return s=$r(31,d,l,w),s.elementType=z,s.lanes=k,s;case v:return Ga(d.children,w,k,l);case S:P=8,w|=24;break;case x:return s=$r(12,d,l,w|2),s.elementType=x,s.lanes=k,s;case A:return s=$r(13,d,l,w),s.elementType=A,s.lanes=k,s;case D:return s=$r(19,d,l,w),s.elementType=D,s.lanes=k,s;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case R:P=10;break e;case _:P=9;break e;case T:P=11;break e;case O:P=14;break e;case $:P=16,m=null;break e}P=29,d=Error(r(130,s===null?"null":typeof s,"")),m=null}return l=$r(P,d,l,w),l.elementType=s,l.type=m,l.lanes=k,l}function Ga(s,l,d,m){return s=$r(7,s,m,l),s.lanes=d,s}function Fb(s,l,d){return s=$r(6,s,null,l),s.lanes=d,s}function mk(s){var l=$r(18,null,null,0);return l.stateNode=s,l}function zb(s,l,d){return l=$r(4,s.children!==null?s.children:[],s.key,l),l.lanes=d,l.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},l}var gk=new WeakMap;function ni(s,l){if(typeof s=="object"&&s!==null){var d=gk.get(s);return d!==void 0?d:(l={value:s,source:l,stack:le(l)},gk.set(s,l),l)}return{value:s,source:l,stack:le(l)}}var xu=[],wu=0,up=null,Af=0,ri=[],ii=0,fs=null,Hi=1,Gi="";function yo(s,l){xu[wu++]=Af,xu[wu++]=up,up=s,Af=l}function yk(s,l,d){ri[ii++]=Hi,ri[ii++]=Gi,ri[ii++]=fs,fs=s;var m=Hi;s=Gi;var w=32-Ne(m)-1;m&=~(1<<w),d+=1;var k=32-Ne(l)+w;if(30<k){var P=w-w%5;k=(m&(1<<P)-1).toString(32),m>>=P,w-=P,Hi=1<<32-Ne(l)+w|d<<w|m,Gi=k+s}else Hi=1<<k|d<<w|m,Gi=s}function Bb(s){s.return!==null&&(yo(s,1),yk(s,1,0))}function Ub(s){for(;s===up;)up=xu[--wu],xu[wu]=null,Af=xu[--wu],xu[wu]=null;for(;s===fs;)fs=ri[--ii],ri[ii]=null,Gi=ri[--ii],ri[ii]=null,Hi=ri[--ii],ri[ii]=null}function bk(s,l){ri[ii++]=Hi,ri[ii++]=Gi,ri[ii++]=fs,Hi=l.id,Gi=l.overflow,fs=s}var jn=null,Qt=null,Et=!1,ds=null,oi=!1,Hb=Error(r(519));function hs(s){var l=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Df(ni(l,s)),Hb}function vk(s){var l=s.stateNode,d=s.type,m=s.memoizedProps;switch(l[on]=s,l[In]=m,d){case"dialog":bt("cancel",l),bt("close",l);break;case"iframe":case"object":case"embed":bt("load",l);break;case"video":case"audio":for(d=0;d<Zf.length;d++)bt(Zf[d],l);break;case"source":bt("error",l);break;case"img":case"image":case"link":bt("error",l),bt("load",l);break;case"details":bt("toggle",l);break;case"input":bt("invalid",l),OE(l,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":bt("invalid",l);break;case"textarea":bt("invalid",l),PE(l,m.value,m.defaultValue,m.children)}d=m.children,typeof d!="string"&&typeof d!="number"&&typeof d!="bigint"||l.textContent===""+d||m.suppressHydrationWarning===!0||I2(l.textContent,d)?(m.popover!=null&&(bt("beforetoggle",l),bt("toggle",l)),m.onScroll!=null&&bt("scroll",l),m.onScrollEnd!=null&&bt("scrollend",l),m.onClick!=null&&(l.onclick=po),l=!0):l=!1,l||hs(s,!0)}function xk(s){for(jn=s.return;jn;)switch(jn.tag){case 5:case 31:case 13:oi=!1;return;case 27:case 3:oi=!0;return;default:jn=jn.return}}function Su(s){if(s!==jn)return!1;if(!Et)return xk(s),Et=!0,!1;var l=s.tag,d;if((d=l!==3&&l!==27)&&((d=l===5)&&(d=s.type,d=!(d!=="form"&&d!=="button")||av(s.type,s.memoizedProps)),d=!d),d&&Qt&&hs(s),xk(s),l===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));Qt=q2(s)}else if(l===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));Qt=q2(s)}else l===27?(l=Qt,_s(s.type)?(s=dv,dv=null,Qt=s):Qt=l):Qt=jn?ai(s.stateNode.nextSibling):null;return!0}function qa(){Qt=jn=null,Et=!1}function Gb(){var s=ds;return s!==null&&(gr===null?gr=s:gr.push.apply(gr,s),ds=null),s}function Df(s){ds===null?ds=[s]:ds.push(s)}var qb=Y(null),Va=null,bo=null;function ps(s,l,d){H(qb,l._currentValue),l._currentValue=d}function vo(s){s._currentValue=qb.current,J(qb)}function Vb(s,l,d){for(;s!==null;){var m=s.alternate;if((s.childLanes&l)!==l?(s.childLanes|=l,m!==null&&(m.childLanes|=l)):m!==null&&(m.childLanes&l)!==l&&(m.childLanes|=l),s===d)break;s=s.return}}function Yb(s,l,d,m){var w=s.child;for(w!==null&&(w.return=s);w!==null;){var k=w.dependencies;if(k!==null){var P=w.child;k=k.firstContext;e:for(;k!==null;){var q=k;k=w;for(var Q=0;Q<l.length;Q++)if(q.context===l[Q]){k.lanes|=d,q=k.alternate,q!==null&&(q.lanes|=d),Vb(k.return,d,s),m||(P=null);break e}k=q.next}}else if(w.tag===18){if(P=w.return,P===null)throw Error(r(341));P.lanes|=d,k=P.alternate,k!==null&&(k.lanes|=d),Vb(P,d,s),P=null}else P=w.child;if(P!==null)P.return=w;else for(P=w;P!==null;){if(P===s){P=null;break}if(w=P.sibling,w!==null){w.return=P.return,P=w;break}P=P.return}w=P}}function Cu(s,l,d,m){s=null;for(var w=l,k=!1;w!==null;){if(!k){if((w.flags&524288)!==0)k=!0;else if((w.flags&262144)!==0)break}if(w.tag===10){var P=w.alternate;if(P===null)throw Error(r(387));if(P=P.memoizedProps,P!==null){var q=w.type;Or(w.pendingProps.value,P.value)||(s!==null?s.push(q):s=[q])}}else if(w===ve.current){if(P=w.alternate,P===null)throw Error(r(387));P.memoizedState.memoizedState!==w.memoizedState.memoizedState&&(s!==null?s.push(rd):s=[rd])}w=w.return}s!==null&&Yb(l,s,d,m),l.flags|=262144}function cp(s){for(s=s.firstContext;s!==null;){if(!Or(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function Ya(s){Va=s,bo=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function Ln(s){return wk(Va,s)}function fp(s,l){return Va===null&&Ya(s),wk(s,l)}function wk(s,l){var d=l._currentValue;if(l={context:l,memoizedValue:d,next:null},bo===null){if(s===null)throw Error(r(308));bo=l,s.dependencies={lanes:0,firstContext:l},s.flags|=524288}else bo=bo.next=l;return d}var qz=typeof AbortController<"u"?AbortController:function(){var s=[],l=this.signal={aborted:!1,addEventListener:function(d,m){s.push(m)}};this.abort=function(){l.aborted=!0,s.forEach(function(d){return d()})}},Vz=e.unstable_scheduleCallback,Yz=e.unstable_NormalPriority,bn={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Wb(){return{controller:new qz,data:new Map,refCount:0}}function Mf(s){s.refCount--,s.refCount===0&&Vz(Yz,function(){s.controller.abort()})}var Of=null,Kb=0,Eu=0,ku=null;function Wz(s,l){if(Of===null){var d=Of=[];Kb=0,Eu=Z0(),ku={status:"pending",value:void 0,then:function(m){d.push(m)}}}return Kb++,l.then(Sk,Sk),l}function Sk(){if(--Kb===0&&Of!==null){ku!==null&&(ku.status="fulfilled");var s=Of;Of=null,Eu=0,ku=null;for(var l=0;l<s.length;l++)(0,s[l])()}}function Kz(s,l){var d=[],m={status:"pending",value:null,reason:null,then:function(w){d.push(w)}};return s.then(function(){m.status="fulfilled",m.value=l;for(var w=0;w<d.length;w++)(0,d[w])(l)},function(w){for(m.status="rejected",m.reason=w,w=0;w<d.length;w++)(0,d[w])(void 0)}),m}var Ck=F.S;F.S=function(s,l){s2=_e(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&Wz(s,l),Ck!==null&&Ck(s,l)};var Wa=Y(null);function Xb(){var s=Wa.current;return s!==null?s:Yt.pooledCache}function dp(s,l){l===null?H(Wa,Wa.current):H(Wa,l.pool)}function Ek(){var s=Xb();return s===null?null:{parent:bn._currentValue,pool:s}}var Ru=Error(r(460)),Qb=Error(r(474)),hp=Error(r(542)),pp={then:function(){}};function kk(s){return s=s.status,s==="fulfilled"||s==="rejected"}function Rk(s,l,d){switch(d=s[d],d===void 0?s.push(l):d!==l&&(l.then(po,po),l=d),l.status){case"fulfilled":return l.value;case"rejected":throw s=l.reason,Tk(s),s;default:if(typeof l.status=="string")l.then(po,po);else{if(s=Yt,s!==null&&100<s.shellSuspendCounter)throw Error(r(482));s=l,s.status="pending",s.then(function(m){if(l.status==="pending"){var w=l;w.status="fulfilled",w.value=m}},function(m){if(l.status==="pending"){var w=l;w.status="rejected",w.reason=m}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw s=l.reason,Tk(s),s}throw Xa=l,Ru}}function Ka(s){try{var l=s._init;return l(s._payload)}catch(d){throw d!==null&&typeof d=="object"&&typeof d.then=="function"?(Xa=d,Ru):d}}var Xa=null;function _k(){if(Xa===null)throw Error(r(459));var s=Xa;return Xa=null,s}function Tk(s){if(s===Ru||s===hp)throw Error(r(483))}var _u=null,$f=0;function mp(s){var l=$f;return $f+=1,_u===null&&(_u=[]),Rk(_u,s,l)}function Pf(s,l){l=l.props.ref,s.ref=l!==void 0?l:null}function gp(s,l){throw l.$$typeof===g?Error(r(525)):(s=Object.prototype.toString.call(l),Error(r(31,s==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":s)))}function Ak(s){function l(se,ee){if(s){var fe=se.deletions;fe===null?(se.deletions=[ee],se.flags|=16):fe.push(ee)}}function d(se,ee){if(!s)return null;for(;ee!==null;)l(se,ee),ee=ee.sibling;return null}function m(se){for(var ee=new Map;se!==null;)se.key!==null?ee.set(se.key,se):ee.set(se.index,se),se=se.sibling;return ee}function w(se,ee){return se=go(se,ee),se.index=0,se.sibling=null,se}function k(se,ee,fe){return se.index=fe,s?(fe=se.alternate,fe!==null?(fe=fe.index,fe<ee?(se.flags|=67108866,ee):fe):(se.flags|=67108866,ee)):(se.flags|=1048576,ee)}function P(se){return s&&se.alternate===null&&(se.flags|=67108866),se}function q(se,ee,fe,we){return ee===null||ee.tag!==6?(ee=Fb(fe,se.mode,we),ee.return=se,ee):(ee=w(ee,fe),ee.return=se,ee)}function Q(se,ee,fe,we){var Ze=fe.type;return Ze===v?be(se,ee,fe.props.children,we,fe.key):ee!==null&&(ee.elementType===Ze||typeof Ze=="object"&&Ze!==null&&Ze.$$typeof===$&&Ka(Ze)===ee.type)?(ee=w(ee,fe.props),Pf(ee,fe),ee.return=se,ee):(ee=lp(fe.type,fe.key,fe.props,null,se.mode,we),Pf(ee,fe),ee.return=se,ee)}function de(se,ee,fe,we){return ee===null||ee.tag!==4||ee.stateNode.containerInfo!==fe.containerInfo||ee.stateNode.implementation!==fe.implementation?(ee=zb(fe,se.mode,we),ee.return=se,ee):(ee=w(ee,fe.children||[]),ee.return=se,ee)}function be(se,ee,fe,we,Ze){return ee===null||ee.tag!==7?(ee=Ga(fe,se.mode,we,Ze),ee.return=se,ee):(ee=w(ee,fe),ee.return=se,ee)}function Ee(se,ee,fe){if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return ee=Fb(""+ee,se.mode,fe),ee.return=se,ee;if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case y:return fe=lp(ee.type,ee.key,ee.props,null,se.mode,fe),Pf(fe,ee),fe.return=se,fe;case b:return ee=zb(ee,se.mode,fe),ee.return=se,ee;case $:return ee=Ka(ee),Ee(se,ee,fe)}if(L(ee)||M(ee))return ee=Ga(ee,se.mode,fe,null),ee.return=se,ee;if(typeof ee.then=="function")return Ee(se,mp(ee),fe);if(ee.$$typeof===R)return Ee(se,fp(se,ee),fe);gp(se,ee)}return null}function pe(se,ee,fe,we){var Ze=ee!==null?ee.key:null;if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return Ze!==null?null:q(se,ee,""+fe,we);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case y:return fe.key===Ze?Q(se,ee,fe,we):null;case b:return fe.key===Ze?de(se,ee,fe,we):null;case $:return fe=Ka(fe),pe(se,ee,fe,we)}if(L(fe)||M(fe))return Ze!==null?null:be(se,ee,fe,we,null);if(typeof fe.then=="function")return pe(se,ee,mp(fe),we);if(fe.$$typeof===R)return pe(se,ee,fp(se,fe),we);gp(se,fe)}return null}function ye(se,ee,fe,we,Ze){if(typeof we=="string"&&we!==""||typeof we=="number"||typeof we=="bigint")return se=se.get(fe)||null,q(ee,se,""+we,Ze);if(typeof we=="object"&&we!==null){switch(we.$$typeof){case y:return se=se.get(we.key===null?fe:we.key)||null,Q(ee,se,we,Ze);case b:return se=se.get(we.key===null?fe:we.key)||null,de(ee,se,we,Ze);case $:return we=Ka(we),ye(se,ee,fe,we,Ze)}if(L(we)||M(we))return se=se.get(fe)||null,be(ee,se,we,Ze,null);if(typeof we.then=="function")return ye(se,ee,fe,mp(we),Ze);if(we.$$typeof===R)return ye(se,ee,fe,fp(ee,we),Ze);gp(ee,we)}return null}function Be(se,ee,fe,we){for(var Ze=null,At=null,qe=ee,at=ee=0,Ct=null;qe!==null&&at<fe.length;at++){qe.index>at?(Ct=qe,qe=null):Ct=qe.sibling;var Dt=pe(se,qe,fe[at],we);if(Dt===null){qe===null&&(qe=Ct);break}s&&qe&&Dt.alternate===null&&l(se,qe),ee=k(Dt,ee,at),At===null?Ze=Dt:At.sibling=Dt,At=Dt,qe=Ct}if(at===fe.length)return d(se,qe),Et&&yo(se,at),Ze;if(qe===null){for(;at<fe.length;at++)qe=Ee(se,fe[at],we),qe!==null&&(ee=k(qe,ee,at),At===null?Ze=qe:At.sibling=qe,At=qe);return Et&&yo(se,at),Ze}for(qe=m(qe);at<fe.length;at++)Ct=ye(qe,se,at,fe[at],we),Ct!==null&&(s&&Ct.alternate!==null&&qe.delete(Ct.key===null?at:Ct.key),ee=k(Ct,ee,at),At===null?Ze=Ct:At.sibling=Ct,At=Ct);return s&&qe.forEach(function(Os){return l(se,Os)}),Et&&yo(se,at),Ze}function et(se,ee,fe,we){if(fe==null)throw Error(r(151));for(var Ze=null,At=null,qe=ee,at=ee=0,Ct=null,Dt=fe.next();qe!==null&&!Dt.done;at++,Dt=fe.next()){qe.index>at?(Ct=qe,qe=null):Ct=qe.sibling;var Os=pe(se,qe,Dt.value,we);if(Os===null){qe===null&&(qe=Ct);break}s&&qe&&Os.alternate===null&&l(se,qe),ee=k(Os,ee,at),At===null?Ze=Os:At.sibling=Os,At=Os,qe=Ct}if(Dt.done)return d(se,qe),Et&&yo(se,at),Ze;if(qe===null){for(;!Dt.done;at++,Dt=fe.next())Dt=Ee(se,Dt.value,we),Dt!==null&&(ee=k(Dt,ee,at),At===null?Ze=Dt:At.sibling=Dt,At=Dt);return Et&&yo(se,at),Ze}for(qe=m(qe);!Dt.done;at++,Dt=fe.next())Dt=ye(qe,se,at,Dt.value,we),Dt!==null&&(s&&Dt.alternate!==null&&qe.delete(Dt.key===null?at:Dt.key),ee=k(Dt,ee,at),At===null?Ze=Dt:At.sibling=Dt,At=Dt);return s&&qe.forEach(function(s8){return l(se,s8)}),Et&&yo(se,at),Ze}function Gt(se,ee,fe,we){if(typeof fe=="object"&&fe!==null&&fe.type===v&&fe.key===null&&(fe=fe.props.children),typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case y:e:{for(var Ze=fe.key;ee!==null;){if(ee.key===Ze){if(Ze=fe.type,Ze===v){if(ee.tag===7){d(se,ee.sibling),we=w(ee,fe.props.children),we.return=se,se=we;break e}}else if(ee.elementType===Ze||typeof Ze=="object"&&Ze!==null&&Ze.$$typeof===$&&Ka(Ze)===ee.type){d(se,ee.sibling),we=w(ee,fe.props),Pf(we,fe),we.return=se,se=we;break e}d(se,ee);break}else l(se,ee);ee=ee.sibling}fe.type===v?(we=Ga(fe.props.children,se.mode,we,fe.key),we.return=se,se=we):(we=lp(fe.type,fe.key,fe.props,null,se.mode,we),Pf(we,fe),we.return=se,se=we)}return P(se);case b:e:{for(Ze=fe.key;ee!==null;){if(ee.key===Ze)if(ee.tag===4&&ee.stateNode.containerInfo===fe.containerInfo&&ee.stateNode.implementation===fe.implementation){d(se,ee.sibling),we=w(ee,fe.children||[]),we.return=se,se=we;break e}else{d(se,ee);break}else l(se,ee);ee=ee.sibling}we=zb(fe,se.mode,we),we.return=se,se=we}return P(se);case $:return fe=Ka(fe),Gt(se,ee,fe,we)}if(L(fe))return Be(se,ee,fe,we);if(M(fe)){if(Ze=M(fe),typeof Ze!="function")throw Error(r(150));return fe=Ze.call(fe),et(se,ee,fe,we)}if(typeof fe.then=="function")return Gt(se,ee,mp(fe),we);if(fe.$$typeof===R)return Gt(se,ee,fp(se,fe),we);gp(se,fe)}return typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint"?(fe=""+fe,ee!==null&&ee.tag===6?(d(se,ee.sibling),we=w(ee,fe),we.return=se,se=we):(d(se,ee),we=Fb(fe,se.mode,we),we.return=se,se=we),P(se)):d(se,ee)}return function(se,ee,fe,we){try{$f=0;var Ze=Gt(se,ee,fe,we);return _u=null,Ze}catch(qe){if(qe===Ru||qe===hp)throw qe;var At=$r(29,qe,null,se.mode);return At.lanes=we,At.return=se,At}finally{}}}var Qa=Ak(!0),Dk=Ak(!1),ms=!1;function Zb(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Jb(s,l){s=s.updateQueue,l.updateQueue===s&&(l.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function gs(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function ys(s,l,d){var m=s.updateQueue;if(m===null)return null;if(m=m.shared,($t&2)!==0){var w=m.pending;return w===null?l.next=l:(l.next=w.next,w.next=l),m.pending=l,l=ap(s),hk(s,null,d),l}return sp(s,m,l,d),ap(s)}function Nf(s,l,d){if(l=l.updateQueue,l!==null&&(l=l.shared,(d&4194048)!==0)){var m=l.lanes;m&=s.pendingLanes,d|=m,l.lanes=d,us(s,d)}}function e0(s,l){var d=s.updateQueue,m=s.alternate;if(m!==null&&(m=m.updateQueue,d===m)){var w=null,k=null;if(d=d.firstBaseUpdate,d!==null){do{var P={lane:d.lane,tag:d.tag,payload:d.payload,callback:null,next:null};k===null?w=k=P:k=k.next=P,d=d.next}while(d!==null);k===null?w=k=l:k=k.next=l}else w=k=l;d={baseState:m.baseState,firstBaseUpdate:w,lastBaseUpdate:k,shared:m.shared,callbacks:m.callbacks},s.updateQueue=d;return}s=d.lastBaseUpdate,s===null?d.firstBaseUpdate=l:s.next=l,d.lastBaseUpdate=l}var t0=!1;function If(){if(t0){var s=ku;if(s!==null)throw s}}function jf(s,l,d,m){t0=!1;var w=s.updateQueue;ms=!1;var k=w.firstBaseUpdate,P=w.lastBaseUpdate,q=w.shared.pending;if(q!==null){w.shared.pending=null;var Q=q,de=Q.next;Q.next=null,P===null?k=de:P.next=de,P=Q;var be=s.alternate;be!==null&&(be=be.updateQueue,q=be.lastBaseUpdate,q!==P&&(q===null?be.firstBaseUpdate=de:q.next=de,be.lastBaseUpdate=Q))}if(k!==null){var Ee=w.baseState;P=0,be=de=Q=null,q=k;do{var pe=q.lane&-536870913,ye=pe!==q.lane;if(ye?(St&pe)===pe:(m&pe)===pe){pe!==0&&pe===Eu&&(t0=!0),be!==null&&(be=be.next={lane:0,tag:q.tag,payload:q.payload,callback:null,next:null});e:{var Be=s,et=q;pe=l;var Gt=d;switch(et.tag){case 1:if(Be=et.payload,typeof Be=="function"){Ee=Be.call(Gt,Ee,pe);break e}Ee=Be;break e;case 3:Be.flags=Be.flags&-65537|128;case 0:if(Be=et.payload,pe=typeof Be=="function"?Be.call(Gt,Ee,pe):Be,pe==null)break e;Ee=p({},Ee,pe);break e;case 2:ms=!0}}pe=q.callback,pe!==null&&(s.flags|=64,ye&&(s.flags|=8192),ye=w.callbacks,ye===null?w.callbacks=[pe]:ye.push(pe))}else ye={lane:pe,tag:q.tag,payload:q.payload,callback:q.callback,next:null},be===null?(de=be=ye,Q=Ee):be=be.next=ye,P|=pe;if(q=q.next,q===null){if(q=w.shared.pending,q===null)break;ye=q,q=ye.next,ye.next=null,w.lastBaseUpdate=ye,w.shared.pending=null}}while(!0);be===null&&(Q=Ee),w.baseState=Q,w.firstBaseUpdate=de,w.lastBaseUpdate=be,k===null&&(w.shared.lanes=0),Ss|=P,s.lanes=P,s.memoizedState=Ee}}function Mk(s,l){if(typeof s!="function")throw Error(r(191,s));s.call(l)}function Ok(s,l){var d=s.callbacks;if(d!==null)for(s.callbacks=null,s=0;s<d.length;s++)Mk(d[s],l)}var Tu=Y(null),yp=Y(0);function $k(s,l){s=To,H(yp,s),H(Tu,l),To=s|l.baseLanes}function n0(){H(yp,To),H(Tu,Tu.current)}function r0(){To=yp.current,J(Tu),J(yp)}var Pr=Y(null),si=null;function bs(s){var l=s.alternate;H(dn,dn.current&1),H(Pr,s),si===null&&(l===null||Tu.current!==null||l.memoizedState!==null)&&(si=s)}function i0(s){H(dn,dn.current),H(Pr,s),si===null&&(si=s)}function Pk(s){s.tag===22?(H(dn,dn.current),H(Pr,s),si===null&&(si=s)):vs()}function vs(){H(dn,dn.current),H(Pr,Pr.current)}function Nr(s){J(Pr),si===s&&(si=null),J(dn)}var dn=Y(0);function bp(s){for(var l=s;l!==null;){if(l.tag===13){var d=l.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||cv(d)||fv(d)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var xo=0,ot=null,Ut=null,vn=null,vp=!1,Au=!1,Za=!1,xp=0,Lf=0,Du=null,Xz=0;function sn(){throw Error(r(321))}function o0(s,l){if(l===null)return!1;for(var d=0;d<l.length&&d<s.length;d++)if(!Or(s[d],l[d]))return!1;return!0}function s0(s,l,d,m,w,k){return xo=k,ot=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,F.H=s===null||s.memoizedState===null?yR:w0,Za=!1,k=d(m,w),Za=!1,Au&&(k=Ik(l,d,m,w)),Nk(s),k}function Nk(s){F.H=Bf;var l=Ut!==null&&Ut.next!==null;if(xo=0,vn=Ut=ot=null,vp=!1,Lf=0,Du=null,l)throw Error(r(300));s===null||xn||(s=s.dependencies,s!==null&&cp(s)&&(xn=!0))}function Ik(s,l,d,m){ot=s;var w=0;do{if(Au&&(Du=null),Lf=0,Au=!1,25<=w)throw Error(r(301));if(w+=1,vn=Ut=null,s.updateQueue!=null){var k=s.updateQueue;k.lastEffect=null,k.events=null,k.stores=null,k.memoCache!=null&&(k.memoCache.index=0)}F.H=bR,k=l(d,m)}while(Au);return k}function Qz(){var s=F.H,l=s.useState()[0];return l=typeof l.then=="function"?Ff(l):l,s=s.useState()[0],(Ut!==null?Ut.memoizedState:null)!==s&&(ot.flags|=1024),l}function a0(){var s=xp!==0;return xp=0,s}function l0(s,l,d){l.updateQueue=s.updateQueue,l.flags&=-2053,s.lanes&=~d}function u0(s){if(vp){for(s=s.memoizedState;s!==null;){var l=s.queue;l!==null&&(l.pending=null),s=s.next}vp=!1}xo=0,vn=Ut=ot=null,Au=!1,Lf=xp=0,Du=null}function tr(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return vn===null?ot.memoizedState=vn=s:vn=vn.next=s,vn}function hn(){if(Ut===null){var s=ot.alternate;s=s!==null?s.memoizedState:null}else s=Ut.next;var l=vn===null?ot.memoizedState:vn.next;if(l!==null)vn=l,Ut=s;else{if(s===null)throw ot.alternate===null?Error(r(467)):Error(r(310));Ut=s,s={memoizedState:Ut.memoizedState,baseState:Ut.baseState,baseQueue:Ut.baseQueue,queue:Ut.queue,next:null},vn===null?ot.memoizedState=vn=s:vn=vn.next=s}return vn}function wp(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ff(s){var l=Lf;return Lf+=1,Du===null&&(Du=[]),s=Rk(Du,s,l),l=ot,(vn===null?l.memoizedState:vn.next)===null&&(l=l.alternate,F.H=l===null||l.memoizedState===null?yR:w0),s}function Sp(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return Ff(s);if(s.$$typeof===R)return Ln(s)}throw Error(r(438,String(s)))}function c0(s){var l=null,d=ot.updateQueue;if(d!==null&&(l=d.memoCache),l==null){var m=ot.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(l={data:m.data.map(function(w){return w.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),d===null&&(d=wp(),ot.updateQueue=d),d.memoCache=l,d=l.data[l.index],d===void 0)for(d=l.data[l.index]=Array(s),m=0;m<s;m++)d[m]=j;return l.index++,d}function wo(s,l){return typeof l=="function"?l(s):l}function Cp(s){var l=hn();return f0(l,Ut,s)}function f0(s,l,d){var m=s.queue;if(m===null)throw Error(r(311));m.lastRenderedReducer=d;var w=s.baseQueue,k=m.pending;if(k!==null){if(w!==null){var P=w.next;w.next=k.next,k.next=P}l.baseQueue=w=k,m.pending=null}if(k=s.baseState,w===null)s.memoizedState=k;else{l=w.next;var q=P=null,Q=null,de=l,be=!1;do{var Ee=de.lane&-536870913;if(Ee!==de.lane?(St&Ee)===Ee:(xo&Ee)===Ee){var pe=de.revertLane;if(pe===0)Q!==null&&(Q=Q.next={lane:0,revertLane:0,gesture:null,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null}),Ee===Eu&&(be=!0);else if((xo&pe)===pe){de=de.next,pe===Eu&&(be=!0);continue}else Ee={lane:0,revertLane:de.revertLane,gesture:null,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null},Q===null?(q=Q=Ee,P=k):Q=Q.next=Ee,ot.lanes|=pe,Ss|=pe;Ee=de.action,Za&&d(k,Ee),k=de.hasEagerState?de.eagerState:d(k,Ee)}else pe={lane:Ee,revertLane:de.revertLane,gesture:de.gesture,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null},Q===null?(q=Q=pe,P=k):Q=Q.next=pe,ot.lanes|=Ee,Ss|=Ee;de=de.next}while(de!==null&&de!==l);if(Q===null?P=k:Q.next=q,!Or(k,s.memoizedState)&&(xn=!0,be&&(d=ku,d!==null)))throw d;s.memoizedState=k,s.baseState=P,s.baseQueue=Q,m.lastRenderedState=k}return w===null&&(m.lanes=0),[s.memoizedState,m.dispatch]}function d0(s){var l=hn(),d=l.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=s;var m=d.dispatch,w=d.pending,k=l.memoizedState;if(w!==null){d.pending=null;var P=w=w.next;do k=s(k,P.action),P=P.next;while(P!==w);Or(k,l.memoizedState)||(xn=!0),l.memoizedState=k,l.baseQueue===null&&(l.baseState=k),d.lastRenderedState=k}return[k,m]}function jk(s,l,d){var m=ot,w=hn(),k=Et;if(k){if(d===void 0)throw Error(r(407));d=d()}else d=l();var P=!Or((Ut||w).memoizedState,d);if(P&&(w.memoizedState=d,xn=!0),w=w.queue,m0(zk.bind(null,m,w,s),[s]),w.getSnapshot!==l||P||vn!==null&&vn.memoizedState.tag&1){if(m.flags|=2048,Mu(9,{destroy:void 0},Fk.bind(null,m,w,d,l),null),Yt===null)throw Error(r(349));k||(xo&127)!==0||Lk(m,l,d)}return d}function Lk(s,l,d){s.flags|=16384,s={getSnapshot:l,value:d},l=ot.updateQueue,l===null?(l=wp(),ot.updateQueue=l,l.stores=[s]):(d=l.stores,d===null?l.stores=[s]:d.push(s))}function Fk(s,l,d,m){l.value=d,l.getSnapshot=m,Bk(l)&&Uk(s)}function zk(s,l,d){return d(function(){Bk(l)&&Uk(s)})}function Bk(s){var l=s.getSnapshot;s=s.value;try{var d=l();return!Or(s,d)}catch{return!0}}function Uk(s){var l=Ha(s,2);l!==null&&yr(l,s,2)}function h0(s){var l=tr();if(typeof s=="function"){var d=s;if(s=d(),Za){Qe(!0);try{d()}finally{Qe(!1)}}}return l.memoizedState=l.baseState=s,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:wo,lastRenderedState:s},l}function Hk(s,l,d,m){return s.baseState=d,f0(s,Ut,typeof m=="function"?m:wo)}function Zz(s,l,d,m,w){if(Rp(s))throw Error(r(485));if(s=l.action,s!==null){var k={payload:w,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(P){k.listeners.push(P)}};F.T!==null?d(!0):k.isTransition=!1,m(k),d=l.pending,d===null?(k.next=l.pending=k,Gk(l,k)):(k.next=d.next,l.pending=d.next=k)}}function Gk(s,l){var d=l.action,m=l.payload,w=s.state;if(l.isTransition){var k=F.T,P={};F.T=P;try{var q=d(w,m),Q=F.S;Q!==null&&Q(P,q),qk(s,l,q)}catch(de){p0(s,l,de)}finally{k!==null&&P.types!==null&&(k.types=P.types),F.T=k}}else try{k=d(w,m),qk(s,l,k)}catch(de){p0(s,l,de)}}function qk(s,l,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(m){Vk(s,l,m)},function(m){return p0(s,l,m)}):Vk(s,l,d)}function Vk(s,l,d){l.status="fulfilled",l.value=d,Yk(l),s.state=d,l=s.pending,l!==null&&(d=l.next,d===l?s.pending=null:(d=d.next,l.next=d,Gk(s,d)))}function p0(s,l,d){var m=s.pending;if(s.pending=null,m!==null){m=m.next;do l.status="rejected",l.reason=d,Yk(l),l=l.next;while(l!==m)}s.action=null}function Yk(s){s=s.listeners;for(var l=0;l<s.length;l++)(0,s[l])()}function Wk(s,l){return l}function Kk(s,l){if(Et){var d=Yt.formState;if(d!==null){e:{var m=ot;if(Et){if(Qt){t:{for(var w=Qt,k=oi;w.nodeType!==8;){if(!k){w=null;break t}if(w=ai(w.nextSibling),w===null){w=null;break t}}k=w.data,w=k==="F!"||k==="F"?w:null}if(w){Qt=ai(w.nextSibling),m=w.data==="F!";break e}}hs(m)}m=!1}m&&(l=d[0])}}return d=tr(),d.memoizedState=d.baseState=l,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wk,lastRenderedState:l},d.queue=m,d=pR.bind(null,ot,m),m.dispatch=d,m=h0(!1),k=x0.bind(null,ot,!1,m.queue),m=tr(),w={state:l,dispatch:null,action:s,pending:null},m.queue=w,d=Zz.bind(null,ot,w,k,d),w.dispatch=d,m.memoizedState=s,[l,d,!1]}function Xk(s){var l=hn();return Qk(l,Ut,s)}function Qk(s,l,d){if(l=f0(s,l,Wk)[0],s=Cp(wo)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var m=Ff(l)}catch(P){throw P===Ru?hp:P}else m=l;l=hn();var w=l.queue,k=w.dispatch;return d!==l.memoizedState&&(ot.flags|=2048,Mu(9,{destroy:void 0},Jz.bind(null,w,d),null)),[m,k,s]}function Jz(s,l){s.action=l}function Zk(s){var l=hn(),d=Ut;if(d!==null)return Qk(l,d,s);hn(),l=l.memoizedState,d=hn();var m=d.queue.dispatch;return d.memoizedState=s,[l,m,!1]}function Mu(s,l,d,m){return s={tag:s,create:d,deps:m,inst:l,next:null},l=ot.updateQueue,l===null&&(l=wp(),ot.updateQueue=l),d=l.lastEffect,d===null?l.lastEffect=s.next=s:(m=d.next,d.next=s,s.next=m,l.lastEffect=s),s}function Jk(){return hn().memoizedState}function Ep(s,l,d,m){var w=tr();ot.flags|=s,w.memoizedState=Mu(1|l,{destroy:void 0},d,m===void 0?null:m)}function kp(s,l,d,m){var w=hn();m=m===void 0?null:m;var k=w.memoizedState.inst;Ut!==null&&m!==null&&o0(m,Ut.memoizedState.deps)?w.memoizedState=Mu(l,k,d,m):(ot.flags|=s,w.memoizedState=Mu(1|l,k,d,m))}function eR(s,l){Ep(8390656,8,s,l)}function m0(s,l){kp(2048,8,s,l)}function e5(s){ot.flags|=4;var l=ot.updateQueue;if(l===null)l=wp(),ot.updateQueue=l,l.events=[s];else{var d=l.events;d===null?l.events=[s]:d.push(s)}}function tR(s){var l=hn().memoizedState;return e5({ref:l,nextImpl:s}),function(){if(($t&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}function nR(s,l){return kp(4,2,s,l)}function rR(s,l){return kp(4,4,s,l)}function iR(s,l){if(typeof l=="function"){s=s();var d=l(s);return function(){typeof d=="function"?d():l(null)}}if(l!=null)return s=s(),l.current=s,function(){l.current=null}}function oR(s,l,d){d=d!=null?d.concat([s]):null,kp(4,4,iR.bind(null,l,s),d)}function g0(){}function sR(s,l){var d=hn();l=l===void 0?null:l;var m=d.memoizedState;return l!==null&&o0(l,m[1])?m[0]:(d.memoizedState=[s,l],s)}function aR(s,l){var d=hn();l=l===void 0?null:l;var m=d.memoizedState;if(l!==null&&o0(l,m[1]))return m[0];if(m=s(),Za){Qe(!0);try{s()}finally{Qe(!1)}}return d.memoizedState=[m,l],m}function y0(s,l,d){return d===void 0||(xo&1073741824)!==0&&(St&261930)===0?s.memoizedState=l:(s.memoizedState=d,s=l2(),ot.lanes|=s,Ss|=s,d)}function lR(s,l,d,m){return Or(d,l)?d:Tu.current!==null?(s=y0(s,d,m),Or(s,l)||(xn=!0),s):(xo&42)===0||(xo&1073741824)!==0&&(St&261930)===0?(xn=!0,s.memoizedState=d):(s=l2(),ot.lanes|=s,Ss|=s,l)}function uR(s,l,d,m,w){var k=U.p;U.p=k!==0&&8>k?k:8;var P=F.T,q={};F.T=q,x0(s,!1,l,d);try{var Q=w(),de=F.S;if(de!==null&&de(q,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var be=Kz(Q,m);zf(s,l,be,Lr(s))}else zf(s,l,m,Lr(s))}catch(Ee){zf(s,l,{then:function(){},status:"rejected",reason:Ee},Lr())}finally{U.p=k,P!==null&&q.types!==null&&(P.types=q.types),F.T=P}}function t5(){}function b0(s,l,d,m){if(s.tag!==5)throw Error(r(476));var w=cR(s).queue;uR(s,w,l,V,d===null?t5:function(){return fR(s),d(m)})}function cR(s){var l=s.memoizedState;if(l!==null)return l;l={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:wo,lastRenderedState:V},next:null};var d={};return l.next={memoizedState:d,baseState:d,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:wo,lastRenderedState:d},next:null},s.memoizedState=l,s=s.alternate,s!==null&&(s.memoizedState=l),l}function fR(s){var l=cR(s);l.next===null&&(l=s.alternate.memoizedState),zf(s,l.next.queue,{},Lr())}function v0(){return Ln(rd)}function dR(){return hn().memoizedState}function hR(){return hn().memoizedState}function n5(s){for(var l=s.return;l!==null;){switch(l.tag){case 24:case 3:var d=Lr();s=gs(d);var m=ys(l,s,d);m!==null&&(yr(m,l,d),Nf(m,l,d)),l={cache:Wb()},s.payload=l;return}l=l.return}}function r5(s,l,d){var m=Lr();d={lane:m,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},Rp(s)?mR(l,d):(d=jb(s,l,d,m),d!==null&&(yr(d,s,m),gR(d,l,m)))}function pR(s,l,d){var m=Lr();zf(s,l,d,m)}function zf(s,l,d,m){var w={lane:m,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null};if(Rp(s))mR(l,w);else{var k=s.alternate;if(s.lanes===0&&(k===null||k.lanes===0)&&(k=l.lastRenderedReducer,k!==null))try{var P=l.lastRenderedState,q=k(P,d);if(w.hasEagerState=!0,w.eagerState=q,Or(q,P))return sp(s,l,w,0),Yt===null&&op(),!1}catch{}finally{}if(d=jb(s,l,w,m),d!==null)return yr(d,s,m),gR(d,l,m),!0}return!1}function x0(s,l,d,m){if(m={lane:2,revertLane:Z0(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},Rp(s)){if(l)throw Error(r(479))}else l=jb(s,d,m,2),l!==null&&yr(l,s,2)}function Rp(s){var l=s.alternate;return s===ot||l!==null&&l===ot}function mR(s,l){Au=vp=!0;var d=s.pending;d===null?l.next=l:(l.next=d.next,d.next=l),s.pending=l}function gR(s,l,d){if((d&4194048)!==0){var m=l.lanes;m&=s.pendingLanes,d|=m,l.lanes=d,us(s,d)}}var Bf={readContext:Ln,use:Sp,useCallback:sn,useContext:sn,useEffect:sn,useImperativeHandle:sn,useLayoutEffect:sn,useInsertionEffect:sn,useMemo:sn,useReducer:sn,useRef:sn,useState:sn,useDebugValue:sn,useDeferredValue:sn,useTransition:sn,useSyncExternalStore:sn,useId:sn,useHostTransitionStatus:sn,useFormState:sn,useActionState:sn,useOptimistic:sn,useMemoCache:sn,useCacheRefresh:sn};Bf.useEffectEvent=sn;var yR={readContext:Ln,use:Sp,useCallback:function(s,l){return tr().memoizedState=[s,l===void 0?null:l],s},useContext:Ln,useEffect:eR,useImperativeHandle:function(s,l,d){d=d!=null?d.concat([s]):null,Ep(4194308,4,iR.bind(null,l,s),d)},useLayoutEffect:function(s,l){return Ep(4194308,4,s,l)},useInsertionEffect:function(s,l){Ep(4,2,s,l)},useMemo:function(s,l){var d=tr();l=l===void 0?null:l;var m=s();if(Za){Qe(!0);try{s()}finally{Qe(!1)}}return d.memoizedState=[m,l],m},useReducer:function(s,l,d){var m=tr();if(d!==void 0){var w=d(l);if(Za){Qe(!0);try{d(l)}finally{Qe(!1)}}}else w=l;return m.memoizedState=m.baseState=w,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:w},m.queue=s,s=s.dispatch=r5.bind(null,ot,s),[m.memoizedState,s]},useRef:function(s){var l=tr();return s={current:s},l.memoizedState=s},useState:function(s){s=h0(s);var l=s.queue,d=pR.bind(null,ot,l);return l.dispatch=d,[s.memoizedState,d]},useDebugValue:g0,useDeferredValue:function(s,l){var d=tr();return y0(d,s,l)},useTransition:function(){var s=h0(!1);return s=uR.bind(null,ot,s.queue,!0,!1),tr().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,l,d){var m=ot,w=tr();if(Et){if(d===void 0)throw Error(r(407));d=d()}else{if(d=l(),Yt===null)throw Error(r(349));(St&127)!==0||Lk(m,l,d)}w.memoizedState=d;var k={value:d,getSnapshot:l};return w.queue=k,eR(zk.bind(null,m,k,s),[s]),m.flags|=2048,Mu(9,{destroy:void 0},Fk.bind(null,m,k,d,l),null),d},useId:function(){var s=tr(),l=Yt.identifierPrefix;if(Et){var d=Gi,m=Hi;d=(m&~(1<<32-Ne(m)-1)).toString(32)+d,l="_"+l+"R_"+d,d=xp++,0<d&&(l+="H"+d.toString(32)),l+="_"}else d=Xz++,l="_"+l+"r_"+d.toString(32)+"_";return s.memoizedState=l},useHostTransitionStatus:v0,useFormState:Kk,useActionState:Kk,useOptimistic:function(s){var l=tr();l.memoizedState=l.baseState=s;var d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=d,l=x0.bind(null,ot,!0,d),d.dispatch=l,[s,l]},useMemoCache:c0,useCacheRefresh:function(){return tr().memoizedState=n5.bind(null,ot)},useEffectEvent:function(s){var l=tr(),d={impl:s};return l.memoizedState=d,function(){if(($t&2)!==0)throw Error(r(440));return d.impl.apply(void 0,arguments)}}},w0={readContext:Ln,use:Sp,useCallback:sR,useContext:Ln,useEffect:m0,useImperativeHandle:oR,useInsertionEffect:nR,useLayoutEffect:rR,useMemo:aR,useReducer:Cp,useRef:Jk,useState:function(){return Cp(wo)},useDebugValue:g0,useDeferredValue:function(s,l){var d=hn();return lR(d,Ut.memoizedState,s,l)},useTransition:function(){var s=Cp(wo)[0],l=hn().memoizedState;return[typeof s=="boolean"?s:Ff(s),l]},useSyncExternalStore:jk,useId:dR,useHostTransitionStatus:v0,useFormState:Xk,useActionState:Xk,useOptimistic:function(s,l){var d=hn();return Hk(d,Ut,s,l)},useMemoCache:c0,useCacheRefresh:hR};w0.useEffectEvent=tR;var bR={readContext:Ln,use:Sp,useCallback:sR,useContext:Ln,useEffect:m0,useImperativeHandle:oR,useInsertionEffect:nR,useLayoutEffect:rR,useMemo:aR,useReducer:d0,useRef:Jk,useState:function(){return d0(wo)},useDebugValue:g0,useDeferredValue:function(s,l){var d=hn();return Ut===null?y0(d,s,l):lR(d,Ut.memoizedState,s,l)},useTransition:function(){var s=d0(wo)[0],l=hn().memoizedState;return[typeof s=="boolean"?s:Ff(s),l]},useSyncExternalStore:jk,useId:dR,useHostTransitionStatus:v0,useFormState:Zk,useActionState:Zk,useOptimistic:function(s,l){var d=hn();return Ut!==null?Hk(d,Ut,s,l):(d.baseState=s,[s,d.queue.dispatch])},useMemoCache:c0,useCacheRefresh:hR};bR.useEffectEvent=tR;function S0(s,l,d,m){l=s.memoizedState,d=d(m,l),d=d==null?l:p({},l,d),s.memoizedState=d,s.lanes===0&&(s.updateQueue.baseState=d)}var C0={enqueueSetState:function(s,l,d){s=s._reactInternals;var m=Lr(),w=gs(m);w.payload=l,d!=null&&(w.callback=d),l=ys(s,w,m),l!==null&&(yr(l,s,m),Nf(l,s,m))},enqueueReplaceState:function(s,l,d){s=s._reactInternals;var m=Lr(),w=gs(m);w.tag=1,w.payload=l,d!=null&&(w.callback=d),l=ys(s,w,m),l!==null&&(yr(l,s,m),Nf(l,s,m))},enqueueForceUpdate:function(s,l){s=s._reactInternals;var d=Lr(),m=gs(d);m.tag=2,l!=null&&(m.callback=l),l=ys(s,m,d),l!==null&&(yr(l,s,d),Nf(l,s,d))}};function vR(s,l,d,m,w,k,P){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(m,k,P):l.prototype&&l.prototype.isPureReactComponent?!_f(d,m)||!_f(w,k):!0}function xR(s,l,d,m){s=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(d,m),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(d,m),l.state!==s&&C0.enqueueReplaceState(l,l.state,null)}function Ja(s,l){var d=l;if("ref"in l){d={};for(var m in l)m!=="ref"&&(d[m]=l[m])}if(s=s.defaultProps){d===l&&(d=p({},d));for(var w in s)d[w]===void 0&&(d[w]=s[w])}return d}function wR(s){ip(s)}function SR(s){console.error(s)}function CR(s){ip(s)}function _p(s,l){try{var d=s.onUncaughtError;d(l.value,{componentStack:l.stack})}catch(m){setTimeout(function(){throw m})}}function ER(s,l,d){try{var m=s.onCaughtError;m(d.value,{componentStack:d.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(w){setTimeout(function(){throw w})}}function E0(s,l,d){return d=gs(d),d.tag=3,d.payload={element:null},d.callback=function(){_p(s,l)},d}function kR(s){return s=gs(s),s.tag=3,s}function RR(s,l,d,m){var w=d.type.getDerivedStateFromError;if(typeof w=="function"){var k=m.value;s.payload=function(){return w(k)},s.callback=function(){ER(l,d,m)}}var P=d.stateNode;P!==null&&typeof P.componentDidCatch=="function"&&(s.callback=function(){ER(l,d,m),typeof w!="function"&&(Cs===null?Cs=new Set([this]):Cs.add(this));var q=m.stack;this.componentDidCatch(m.value,{componentStack:q!==null?q:""})})}function i5(s,l,d,m,w){if(d.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(l=d.alternate,l!==null&&Cu(l,d,w,!0),d=Pr.current,d!==null){switch(d.tag){case 31:case 13:return si===null?Fp():d.alternate===null&&an===0&&(an=3),d.flags&=-257,d.flags|=65536,d.lanes=w,m===pp?d.flags|=16384:(l=d.updateQueue,l===null?d.updateQueue=new Set([m]):l.add(m),K0(s,m,w)),!1;case 22:return d.flags|=65536,m===pp?d.flags|=16384:(l=d.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([m])},d.updateQueue=l):(d=l.retryQueue,d===null?l.retryQueue=new Set([m]):d.add(m)),K0(s,m,w)),!1}throw Error(r(435,d.tag))}return K0(s,m,w),Fp(),!1}if(Et)return l=Pr.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=w,m!==Hb&&(s=Error(r(422),{cause:m}),Df(ni(s,d)))):(m!==Hb&&(l=Error(r(423),{cause:m}),Df(ni(l,d))),s=s.current.alternate,s.flags|=65536,w&=-w,s.lanes|=w,m=ni(m,d),w=E0(s.stateNode,m,w),e0(s,w),an!==4&&(an=2)),!1;var k=Error(r(520),{cause:m});if(k=ni(k,d),Kf===null?Kf=[k]:Kf.push(k),an!==4&&(an=2),l===null)return!0;m=ni(m,d),d=l;do{switch(d.tag){case 3:return d.flags|=65536,s=w&-w,d.lanes|=s,s=E0(d.stateNode,m,s),e0(d,s),!1;case 1:if(l=d.type,k=d.stateNode,(d.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||k!==null&&typeof k.componentDidCatch=="function"&&(Cs===null||!Cs.has(k))))return d.flags|=65536,w&=-w,d.lanes|=w,w=kR(w),RR(w,s,d,m),e0(d,w),!1}d=d.return}while(d!==null);return!1}var k0=Error(r(461)),xn=!1;function Fn(s,l,d,m){l.child=s===null?Dk(l,null,d,m):Qa(l,s.child,d,m)}function _R(s,l,d,m,w){d=d.render;var k=l.ref;if("ref"in m){var P={};for(var q in m)q!=="ref"&&(P[q]=m[q])}else P=m;return Ya(l),m=s0(s,l,d,P,k,w),q=a0(),s!==null&&!xn?(l0(s,l,w),So(s,l,w)):(Et&&q&&Bb(l),l.flags|=1,Fn(s,l,m,w),l.child)}function TR(s,l,d,m,w){if(s===null){var k=d.type;return typeof k=="function"&&!Lb(k)&&k.defaultProps===void 0&&d.compare===null?(l.tag=15,l.type=k,AR(s,l,k,m,w)):(s=lp(d.type,null,m,l,l.mode,w),s.ref=l.ref,s.return=l,l.child=s)}if(k=s.child,!$0(s,w)){var P=k.memoizedProps;if(d=d.compare,d=d!==null?d:_f,d(P,m)&&s.ref===l.ref)return So(s,l,w)}return l.flags|=1,s=go(k,m),s.ref=l.ref,s.return=l,l.child=s}function AR(s,l,d,m,w){if(s!==null){var k=s.memoizedProps;if(_f(k,m)&&s.ref===l.ref)if(xn=!1,l.pendingProps=m=k,$0(s,w))(s.flags&131072)!==0&&(xn=!0);else return l.lanes=s.lanes,So(s,l,w)}return R0(s,l,d,m,w)}function DR(s,l,d,m){var w=m.children,k=s!==null?s.memoizedState:null;if(s===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.mode==="hidden"){if((l.flags&128)!==0){if(k=k!==null?k.baseLanes|d:d,s!==null){for(m=l.child=s.child,w=0;m!==null;)w=w|m.lanes|m.childLanes,m=m.sibling;m=w&~k}else m=0,l.child=null;return MR(s,l,k,d,m)}if((d&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},s!==null&&dp(l,k!==null?k.cachePool:null),k!==null?$k(l,k):n0(),Pk(l);else return m=l.lanes=536870912,MR(s,l,k!==null?k.baseLanes|d:d,d,m)}else k!==null?(dp(l,k.cachePool),$k(l,k),vs(),l.memoizedState=null):(s!==null&&dp(l,null),n0(),vs());return Fn(s,l,w,d),l.child}function Uf(s,l){return s!==null&&s.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function MR(s,l,d,m,w){var k=Xb();return k=k===null?null:{parent:bn._currentValue,pool:k},l.memoizedState={baseLanes:d,cachePool:k},s!==null&&dp(l,null),n0(),Pk(l),s!==null&&Cu(s,l,m,!0),l.childLanes=w,null}function Tp(s,l){return l=Dp({mode:l.mode,children:l.children},s.mode),l.ref=s.ref,s.child=l,l.return=s,l}function OR(s,l,d){return Qa(l,s.child,null,d),s=Tp(l,l.pendingProps),s.flags|=2,Nr(l),l.memoizedState=null,s}function o5(s,l,d){var m=l.pendingProps,w=(l.flags&128)!==0;if(l.flags&=-129,s===null){if(Et){if(m.mode==="hidden")return s=Tp(l,m),l.lanes=536870912,Uf(null,s);if(i0(l),(s=Qt)?(s=G2(s,oi),s=s!==null&&s.data==="&"?s:null,s!==null&&(l.memoizedState={dehydrated:s,treeContext:fs!==null?{id:Hi,overflow:Gi}:null,retryLane:536870912,hydrationErrors:null},d=mk(s),d.return=l,l.child=d,jn=l,Qt=null)):s=null,s===null)throw hs(l);return l.lanes=536870912,null}return Tp(l,m)}var k=s.memoizedState;if(k!==null){var P=k.dehydrated;if(i0(l),w)if(l.flags&256)l.flags&=-257,l=OR(s,l,d);else if(l.memoizedState!==null)l.child=s.child,l.flags|=128,l=null;else throw Error(r(558));else if(xn||Cu(s,l,d,!1),w=(d&s.childLanes)!==0,xn||w){if(m=Yt,m!==null&&(P=Ri(m,d),P!==0&&P!==k.retryLane))throw k.retryLane=P,Ha(s,P),yr(m,s,P),k0;Fp(),l=OR(s,l,d)}else s=k.treeContext,Qt=ai(P.nextSibling),jn=l,Et=!0,ds=null,oi=!1,s!==null&&bk(l,s),l=Tp(l,m),l.flags|=4096;return l}return s=go(s.child,{mode:m.mode,children:m.children}),s.ref=l.ref,l.child=s,s.return=l,s}function Ap(s,l){var d=l.ref;if(d===null)s!==null&&s.ref!==null&&(l.flags|=4194816);else{if(typeof d!="function"&&typeof d!="object")throw Error(r(284));(s===null||s.ref!==d)&&(l.flags|=4194816)}}function R0(s,l,d,m,w){return Ya(l),d=s0(s,l,d,m,void 0,w),m=a0(),s!==null&&!xn?(l0(s,l,w),So(s,l,w)):(Et&&m&&Bb(l),l.flags|=1,Fn(s,l,d,w),l.child)}function $R(s,l,d,m,w,k){return Ya(l),l.updateQueue=null,d=Ik(l,m,d,w),Nk(s),m=a0(),s!==null&&!xn?(l0(s,l,k),So(s,l,k)):(Et&&m&&Bb(l),l.flags|=1,Fn(s,l,d,k),l.child)}function PR(s,l,d,m,w){if(Ya(l),l.stateNode===null){var k=vu,P=d.contextType;typeof P=="object"&&P!==null&&(k=Ln(P)),k=new d(m,k),l.memoizedState=k.state!==null&&k.state!==void 0?k.state:null,k.updater=C0,l.stateNode=k,k._reactInternals=l,k=l.stateNode,k.props=m,k.state=l.memoizedState,k.refs={},Zb(l),P=d.contextType,k.context=typeof P=="object"&&P!==null?Ln(P):vu,k.state=l.memoizedState,P=d.getDerivedStateFromProps,typeof P=="function"&&(S0(l,d,P,m),k.state=l.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof k.getSnapshotBeforeUpdate=="function"||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(P=k.state,typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount(),P!==k.state&&C0.enqueueReplaceState(k,k.state,null),jf(l,m,k,w),If(),k.state=l.memoizedState),typeof k.componentDidMount=="function"&&(l.flags|=4194308),m=!0}else if(s===null){k=l.stateNode;var q=l.memoizedProps,Q=Ja(d,q);k.props=Q;var de=k.context,be=d.contextType;P=vu,typeof be=="object"&&be!==null&&(P=Ln(be));var Ee=d.getDerivedStateFromProps;be=typeof Ee=="function"||typeof k.getSnapshotBeforeUpdate=="function",q=l.pendingProps!==q,be||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(q||de!==P)&&xR(l,k,m,P),ms=!1;var pe=l.memoizedState;k.state=pe,jf(l,m,k,w),If(),de=l.memoizedState,q||pe!==de||ms?(typeof Ee=="function"&&(S0(l,d,Ee,m),de=l.memoizedState),(Q=ms||vR(l,d,Q,m,pe,de,P))?(be||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount()),typeof k.componentDidMount=="function"&&(l.flags|=4194308)):(typeof k.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=m,l.memoizedState=de),k.props=m,k.state=de,k.context=P,m=Q):(typeof k.componentDidMount=="function"&&(l.flags|=4194308),m=!1)}else{k=l.stateNode,Jb(s,l),P=l.memoizedProps,be=Ja(d,P),k.props=be,Ee=l.pendingProps,pe=k.context,de=d.contextType,Q=vu,typeof de=="object"&&de!==null&&(Q=Ln(de)),q=d.getDerivedStateFromProps,(de=typeof q=="function"||typeof k.getSnapshotBeforeUpdate=="function")||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(P!==Ee||pe!==Q)&&xR(l,k,m,Q),ms=!1,pe=l.memoizedState,k.state=pe,jf(l,m,k,w),If();var ye=l.memoizedState;P!==Ee||pe!==ye||ms||s!==null&&s.dependencies!==null&&cp(s.dependencies)?(typeof q=="function"&&(S0(l,d,q,m),ye=l.memoizedState),(be=ms||vR(l,d,be,m,pe,ye,Q)||s!==null&&s.dependencies!==null&&cp(s.dependencies))?(de||typeof k.UNSAFE_componentWillUpdate!="function"&&typeof k.componentWillUpdate!="function"||(typeof k.componentWillUpdate=="function"&&k.componentWillUpdate(m,ye,Q),typeof k.UNSAFE_componentWillUpdate=="function"&&k.UNSAFE_componentWillUpdate(m,ye,Q)),typeof k.componentDidUpdate=="function"&&(l.flags|=4),typeof k.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof k.componentDidUpdate!="function"||P===s.memoizedProps&&pe===s.memoizedState||(l.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||P===s.memoizedProps&&pe===s.memoizedState||(l.flags|=1024),l.memoizedProps=m,l.memoizedState=ye),k.props=m,k.state=ye,k.context=Q,m=be):(typeof k.componentDidUpdate!="function"||P===s.memoizedProps&&pe===s.memoizedState||(l.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||P===s.memoizedProps&&pe===s.memoizedState||(l.flags|=1024),m=!1)}return k=m,Ap(s,l),m=(l.flags&128)!==0,k||m?(k=l.stateNode,d=m&&typeof d.getDerivedStateFromError!="function"?null:k.render(),l.flags|=1,s!==null&&m?(l.child=Qa(l,s.child,null,w),l.child=Qa(l,null,d,w)):Fn(s,l,d,w),l.memoizedState=k.state,s=l.child):s=So(s,l,w),s}function NR(s,l,d,m){return qa(),l.flags|=256,Fn(s,l,d,m),l.child}var _0={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function T0(s){return{baseLanes:s,cachePool:Ek()}}function A0(s,l,d){return s=s!==null?s.childLanes&~d:0,l&&(s|=jr),s}function IR(s,l,d){var m=l.pendingProps,w=!1,k=(l.flags&128)!==0,P;if((P=k)||(P=s!==null&&s.memoizedState===null?!1:(dn.current&2)!==0),P&&(w=!0,l.flags&=-129),P=(l.flags&32)!==0,l.flags&=-33,s===null){if(Et){if(w?bs(l):vs(),(s=Qt)?(s=G2(s,oi),s=s!==null&&s.data!=="&"?s:null,s!==null&&(l.memoizedState={dehydrated:s,treeContext:fs!==null?{id:Hi,overflow:Gi}:null,retryLane:536870912,hydrationErrors:null},d=mk(s),d.return=l,l.child=d,jn=l,Qt=null)):s=null,s===null)throw hs(l);return fv(s)?l.lanes=32:l.lanes=536870912,null}var q=m.children;return m=m.fallback,w?(vs(),w=l.mode,q=Dp({mode:"hidden",children:q},w),m=Ga(m,w,d,null),q.return=l,m.return=l,q.sibling=m,l.child=q,m=l.child,m.memoizedState=T0(d),m.childLanes=A0(s,P,d),l.memoizedState=_0,Uf(null,m)):(bs(l),D0(l,q))}var Q=s.memoizedState;if(Q!==null&&(q=Q.dehydrated,q!==null)){if(k)l.flags&256?(bs(l),l.flags&=-257,l=M0(s,l,d)):l.memoizedState!==null?(vs(),l.child=s.child,l.flags|=128,l=null):(vs(),q=m.fallback,w=l.mode,m=Dp({mode:"visible",children:m.children},w),q=Ga(q,w,d,null),q.flags|=2,m.return=l,q.return=l,m.sibling=q,l.child=m,Qa(l,s.child,null,d),m=l.child,m.memoizedState=T0(d),m.childLanes=A0(s,P,d),l.memoizedState=_0,l=Uf(null,m));else if(bs(l),fv(q)){if(P=q.nextSibling&&q.nextSibling.dataset,P)var de=P.dgst;P=de,m=Error(r(419)),m.stack="",m.digest=P,Df({value:m,source:null,stack:null}),l=M0(s,l,d)}else if(xn||Cu(s,l,d,!1),P=(d&s.childLanes)!==0,xn||P){if(P=Yt,P!==null&&(m=Ri(P,d),m!==0&&m!==Q.retryLane))throw Q.retryLane=m,Ha(s,m),yr(P,s,m),k0;cv(q)||Fp(),l=M0(s,l,d)}else cv(q)?(l.flags|=192,l.child=s.child,l=null):(s=Q.treeContext,Qt=ai(q.nextSibling),jn=l,Et=!0,ds=null,oi=!1,s!==null&&bk(l,s),l=D0(l,m.children),l.flags|=4096);return l}return w?(vs(),q=m.fallback,w=l.mode,Q=s.child,de=Q.sibling,m=go(Q,{mode:"hidden",children:m.children}),m.subtreeFlags=Q.subtreeFlags&65011712,de!==null?q=go(de,q):(q=Ga(q,w,d,null),q.flags|=2),q.return=l,m.return=l,m.sibling=q,l.child=m,Uf(null,m),m=l.child,q=s.child.memoizedState,q===null?q=T0(d):(w=q.cachePool,w!==null?(Q=bn._currentValue,w=w.parent!==Q?{parent:Q,pool:Q}:w):w=Ek(),q={baseLanes:q.baseLanes|d,cachePool:w}),m.memoizedState=q,m.childLanes=A0(s,P,d),l.memoizedState=_0,Uf(s.child,m)):(bs(l),d=s.child,s=d.sibling,d=go(d,{mode:"visible",children:m.children}),d.return=l,d.sibling=null,s!==null&&(P=l.deletions,P===null?(l.deletions=[s],l.flags|=16):P.push(s)),l.child=d,l.memoizedState=null,d)}function D0(s,l){return l=Dp({mode:"visible",children:l},s.mode),l.return=s,s.child=l}function Dp(s,l){return s=$r(22,s,null,l),s.lanes=0,s}function M0(s,l,d){return Qa(l,s.child,null,d),s=D0(l,l.pendingProps.children),s.flags|=2,l.memoizedState=null,s}function jR(s,l,d){s.lanes|=l;var m=s.alternate;m!==null&&(m.lanes|=l),Vb(s.return,l,d)}function O0(s,l,d,m,w,k){var P=s.memoizedState;P===null?s.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:m,tail:d,tailMode:w,treeForkCount:k}:(P.isBackwards=l,P.rendering=null,P.renderingStartTime=0,P.last=m,P.tail=d,P.tailMode=w,P.treeForkCount=k)}function LR(s,l,d){var m=l.pendingProps,w=m.revealOrder,k=m.tail;m=m.children;var P=dn.current,q=(P&2)!==0;if(q?(P=P&1|2,l.flags|=128):P&=1,H(dn,P),Fn(s,l,m,d),m=Et?Af:0,!q&&s!==null&&(s.flags&128)!==0)e:for(s=l.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&jR(s,d,l);else if(s.tag===19)jR(s,d,l);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===l)break e;for(;s.sibling===null;){if(s.return===null||s.return===l)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}switch(w){case"forwards":for(d=l.child,w=null;d!==null;)s=d.alternate,s!==null&&bp(s)===null&&(w=d),d=d.sibling;d=w,d===null?(w=l.child,l.child=null):(w=d.sibling,d.sibling=null),O0(l,!1,w,d,k,m);break;case"backwards":case"unstable_legacy-backwards":for(d=null,w=l.child,l.child=null;w!==null;){if(s=w.alternate,s!==null&&bp(s)===null){l.child=w;break}s=w.sibling,w.sibling=d,d=w,w=s}O0(l,!0,d,null,k,m);break;case"together":O0(l,!1,null,null,void 0,m);break;default:l.memoizedState=null}return l.child}function So(s,l,d){if(s!==null&&(l.dependencies=s.dependencies),Ss|=l.lanes,(d&l.childLanes)===0)if(s!==null){if(Cu(s,l,d,!1),(d&l.childLanes)===0)return null}else return null;if(s!==null&&l.child!==s.child)throw Error(r(153));if(l.child!==null){for(s=l.child,d=go(s,s.pendingProps),l.child=d,d.return=l;s.sibling!==null;)s=s.sibling,d=d.sibling=go(s,s.pendingProps),d.return=l;d.sibling=null}return l.child}function $0(s,l){return(s.lanes&l)!==0?!0:(s=s.dependencies,!!(s!==null&&cp(s)))}function s5(s,l,d){switch(l.tag){case 3:Re(l,l.stateNode.containerInfo),ps(l,bn,s.memoizedState.cache),qa();break;case 27:case 5:Ie(l);break;case 4:Re(l,l.stateNode.containerInfo);break;case 10:ps(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,i0(l),null;break;case 13:var m=l.memoizedState;if(m!==null)return m.dehydrated!==null?(bs(l),l.flags|=128,null):(d&l.child.childLanes)!==0?IR(s,l,d):(bs(l),s=So(s,l,d),s!==null?s.sibling:null);bs(l);break;case 19:var w=(s.flags&128)!==0;if(m=(d&l.childLanes)!==0,m||(Cu(s,l,d,!1),m=(d&l.childLanes)!==0),w){if(m)return LR(s,l,d);l.flags|=128}if(w=l.memoizedState,w!==null&&(w.rendering=null,w.tail=null,w.lastEffect=null),H(dn,dn.current),m)break;return null;case 22:return l.lanes=0,DR(s,l,d,l.pendingProps);case 24:ps(l,bn,s.memoizedState.cache)}return So(s,l,d)}function FR(s,l,d){if(s!==null)if(s.memoizedProps!==l.pendingProps)xn=!0;else{if(!$0(s,d)&&(l.flags&128)===0)return xn=!1,s5(s,l,d);xn=(s.flags&131072)!==0}else xn=!1,Et&&(l.flags&1048576)!==0&&yk(l,Af,l.index);switch(l.lanes=0,l.tag){case 16:e:{var m=l.pendingProps;if(s=Ka(l.elementType),l.type=s,typeof s=="function")Lb(s)?(m=Ja(s,m),l.tag=1,l=PR(null,l,s,m,d)):(l.tag=0,l=R0(null,l,s,m,d));else{if(s!=null){var w=s.$$typeof;if(w===T){l.tag=11,l=_R(null,l,s,m,d);break e}else if(w===O){l.tag=14,l=TR(null,l,s,m,d);break e}}throw l=G(s)||s,Error(r(306,l,""))}}return l;case 0:return R0(s,l,l.type,l.pendingProps,d);case 1:return m=l.type,w=Ja(m,l.pendingProps),PR(s,l,m,w,d);case 3:e:{if(Re(l,l.stateNode.containerInfo),s===null)throw Error(r(387));m=l.pendingProps;var k=l.memoizedState;w=k.element,Jb(s,l),jf(l,m,null,d);var P=l.memoizedState;if(m=P.cache,ps(l,bn,m),m!==k.cache&&Yb(l,[bn],d,!0),If(),m=P.element,k.isDehydrated)if(k={element:m,isDehydrated:!1,cache:P.cache},l.updateQueue.baseState=k,l.memoizedState=k,l.flags&256){l=NR(s,l,m,d);break e}else if(m!==w){w=ni(Error(r(424)),l),Df(w),l=NR(s,l,m,d);break e}else{switch(s=l.stateNode.containerInfo,s.nodeType){case 9:s=s.body;break;default:s=s.nodeName==="HTML"?s.ownerDocument.body:s}for(Qt=ai(s.firstChild),jn=l,Et=!0,ds=null,oi=!0,d=Dk(l,null,m,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling}else{if(qa(),m===w){l=So(s,l,d);break e}Fn(s,l,m,d)}l=l.child}return l;case 26:return Ap(s,l),s===null?(d=X2(l.type,null,l.pendingProps,null))?l.memoizedState=d:Et||(d=l.type,s=l.pendingProps,m=Vp(he.current).createElement(d),m[on]=l,m[In]=s,zn(m,d,s),Dn(m),l.stateNode=m):l.memoizedState=X2(l.type,s.memoizedProps,l.pendingProps,s.memoizedState),null;case 27:return Ie(l),s===null&&Et&&(m=l.stateNode=Y2(l.type,l.pendingProps,he.current),jn=l,oi=!0,w=Qt,_s(l.type)?(dv=w,Qt=ai(m.firstChild)):Qt=w),Fn(s,l,l.pendingProps.children,d),Ap(s,l),s===null&&(l.flags|=4194304),l.child;case 5:return s===null&&Et&&((w=m=Qt)&&(m=I5(m,l.type,l.pendingProps,oi),m!==null?(l.stateNode=m,jn=l,Qt=ai(m.firstChild),oi=!1,w=!0):w=!1),w||hs(l)),Ie(l),w=l.type,k=l.pendingProps,P=s!==null?s.memoizedProps:null,m=k.children,av(w,k)?m=null:P!==null&&av(w,P)&&(l.flags|=32),l.memoizedState!==null&&(w=s0(s,l,Qz,null,null,d),rd._currentValue=w),Ap(s,l),Fn(s,l,m,d),l.child;case 6:return s===null&&Et&&((s=d=Qt)&&(d=j5(d,l.pendingProps,oi),d!==null?(l.stateNode=d,jn=l,Qt=null,s=!0):s=!1),s||hs(l)),null;case 13:return IR(s,l,d);case 4:return Re(l,l.stateNode.containerInfo),m=l.pendingProps,s===null?l.child=Qa(l,null,m,d):Fn(s,l,m,d),l.child;case 11:return _R(s,l,l.type,l.pendingProps,d);case 7:return Fn(s,l,l.pendingProps,d),l.child;case 8:return Fn(s,l,l.pendingProps.children,d),l.child;case 12:return Fn(s,l,l.pendingProps.children,d),l.child;case 10:return m=l.pendingProps,ps(l,l.type,m.value),Fn(s,l,m.children,d),l.child;case 9:return w=l.type._context,m=l.pendingProps.children,Ya(l),w=Ln(w),m=m(w),l.flags|=1,Fn(s,l,m,d),l.child;case 14:return TR(s,l,l.type,l.pendingProps,d);case 15:return AR(s,l,l.type,l.pendingProps,d);case 19:return LR(s,l,d);case 31:return o5(s,l,d);case 22:return DR(s,l,d,l.pendingProps);case 24:return Ya(l),m=Ln(bn),s===null?(w=Xb(),w===null&&(w=Yt,k=Wb(),w.pooledCache=k,k.refCount++,k!==null&&(w.pooledCacheLanes|=d),w=k),l.memoizedState={parent:m,cache:w},Zb(l),ps(l,bn,w)):((s.lanes&d)!==0&&(Jb(s,l),jf(l,null,null,d),If()),w=s.memoizedState,k=l.memoizedState,w.parent!==m?(w={parent:m,cache:m},l.memoizedState=w,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=w),ps(l,bn,m)):(m=k.cache,ps(l,bn,m),m!==w.cache&&Yb(l,[bn],d,!0))),Fn(s,l,l.pendingProps.children,d),l.child;case 29:throw l.pendingProps}throw Error(r(156,l.tag))}function Co(s){s.flags|=4}function P0(s,l,d,m,w){if((l=(s.mode&32)!==0)&&(l=!1),l){if(s.flags|=16777216,(w&335544128)===w)if(s.stateNode.complete)s.flags|=8192;else if(d2())s.flags|=8192;else throw Xa=pp,Qb}else s.flags&=-16777217}function zR(s,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!t_(l))if(d2())s.flags|=8192;else throw Xa=pp,Qb}function Mp(s,l){l!==null&&(s.flags|=4),s.flags&16384&&(l=s.tag!==22?Ei():536870912,s.lanes|=l,Nu|=l)}function Hf(s,l){if(!Et)switch(s.tailMode){case"hidden":l=s.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?s.tail=null:d.sibling=null;break;case"collapsed":d=s.tail;for(var m=null;d!==null;)d.alternate!==null&&(m=d),d=d.sibling;m===null?l||s.tail===null?s.tail=null:s.tail.sibling=null:m.sibling=null}}function Zt(s){var l=s.alternate!==null&&s.alternate.child===s.child,d=0,m=0;if(l)for(var w=s.child;w!==null;)d|=w.lanes|w.childLanes,m|=w.subtreeFlags&65011712,m|=w.flags&65011712,w.return=s,w=w.sibling;else for(w=s.child;w!==null;)d|=w.lanes|w.childLanes,m|=w.subtreeFlags,m|=w.flags,w.return=s,w=w.sibling;return s.subtreeFlags|=m,s.childLanes=d,l}function a5(s,l,d){var m=l.pendingProps;switch(Ub(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Zt(l),null;case 1:return Zt(l),null;case 3:return d=l.stateNode,m=null,s!==null&&(m=s.memoizedState.cache),l.memoizedState.cache!==m&&(l.flags|=2048),vo(bn),ce(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(s===null||s.child===null)&&(Su(l)?Co(l):s===null||s.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Gb())),Zt(l),null;case 26:var w=l.type,k=l.memoizedState;return s===null?(Co(l),k!==null?(Zt(l),zR(l,k)):(Zt(l),P0(l,w,null,m,d))):k?k!==s.memoizedState?(Co(l),Zt(l),zR(l,k)):(Zt(l),l.flags&=-16777217):(s=s.memoizedProps,s!==m&&Co(l),Zt(l),P0(l,w,s,m,d)),null;case 27:if(Ve(l),d=he.current,w=l.type,s!==null&&l.stateNode!=null)s.memoizedProps!==m&&Co(l);else{if(!m){if(l.stateNode===null)throw Error(r(166));return Zt(l),null}s=ie.current,Su(l)?vk(l):(s=Y2(w,m,d),l.stateNode=s,Co(l))}return Zt(l),null;case 5:if(Ve(l),w=l.type,s!==null&&l.stateNode!=null)s.memoizedProps!==m&&Co(l);else{if(!m){if(l.stateNode===null)throw Error(r(166));return Zt(l),null}if(k=ie.current,Su(l))vk(l);else{var P=Vp(he.current);switch(k){case 1:k=P.createElementNS("http://www.w3.org/2000/svg",w);break;case 2:k=P.createElementNS("http://www.w3.org/1998/Math/MathML",w);break;default:switch(w){case"svg":k=P.createElementNS("http://www.w3.org/2000/svg",w);break;case"math":k=P.createElementNS("http://www.w3.org/1998/Math/MathML",w);break;case"script":k=P.createElement("div"),k.innerHTML="<script><\/script>",k=k.removeChild(k.firstChild);break;case"select":k=typeof m.is=="string"?P.createElement("select",{is:m.is}):P.createElement("select"),m.multiple?k.multiple=!0:m.size&&(k.size=m.size);break;default:k=typeof m.is=="string"?P.createElement(w,{is:m.is}):P.createElement(w)}}k[on]=l,k[In]=m;e:for(P=l.child;P!==null;){if(P.tag===5||P.tag===6)k.appendChild(P.stateNode);else if(P.tag!==4&&P.tag!==27&&P.child!==null){P.child.return=P,P=P.child;continue}if(P===l)break e;for(;P.sibling===null;){if(P.return===null||P.return===l)break e;P=P.return}P.sibling.return=P.return,P=P.sibling}l.stateNode=k;e:switch(zn(k,w,m),w){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}m&&Co(l)}}return Zt(l),P0(l,l.type,s===null?null:s.memoizedProps,l.pendingProps,d),null;case 6:if(s&&l.stateNode!=null)s.memoizedProps!==m&&Co(l);else{if(typeof m!="string"&&l.stateNode===null)throw Error(r(166));if(s=he.current,Su(l)){if(s=l.stateNode,d=l.memoizedProps,m=null,w=jn,w!==null)switch(w.tag){case 27:case 5:m=w.memoizedProps}s[on]=l,s=!!(s.nodeValue===d||m!==null&&m.suppressHydrationWarning===!0||I2(s.nodeValue,d)),s||hs(l,!0)}else s=Vp(s).createTextNode(m),s[on]=l,l.stateNode=s}return Zt(l),null;case 31:if(d=l.memoizedState,s===null||s.memoizedState!==null){if(m=Su(l),d!==null){if(s===null){if(!m)throw Error(r(318));if(s=l.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(557));s[on]=l}else qa(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Zt(l),s=!1}else d=Gb(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=d),s=!0;if(!s)return l.flags&256?(Nr(l),l):(Nr(l),null);if((l.flags&128)!==0)throw Error(r(558))}return Zt(l),null;case 13:if(m=l.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(w=Su(l),m!==null&&m.dehydrated!==null){if(s===null){if(!w)throw Error(r(318));if(w=l.memoizedState,w=w!==null?w.dehydrated:null,!w)throw Error(r(317));w[on]=l}else qa(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Zt(l),w=!1}else w=Gb(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=w),w=!0;if(!w)return l.flags&256?(Nr(l),l):(Nr(l),null)}return Nr(l),(l.flags&128)!==0?(l.lanes=d,l):(d=m!==null,s=s!==null&&s.memoizedState!==null,d&&(m=l.child,w=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(w=m.alternate.memoizedState.cachePool.pool),k=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(k=m.memoizedState.cachePool.pool),k!==w&&(m.flags|=2048)),d!==s&&d&&(l.child.flags|=8192),Mp(l,l.updateQueue),Zt(l),null);case 4:return ce(),s===null&&nv(l.stateNode.containerInfo),Zt(l),null;case 10:return vo(l.type),Zt(l),null;case 19:if(J(dn),m=l.memoizedState,m===null)return Zt(l),null;if(w=(l.flags&128)!==0,k=m.rendering,k===null)if(w)Hf(m,!1);else{if(an!==0||s!==null&&(s.flags&128)!==0)for(s=l.child;s!==null;){if(k=bp(s),k!==null){for(l.flags|=128,Hf(m,!1),s=k.updateQueue,l.updateQueue=s,Mp(l,s),l.subtreeFlags=0,s=d,d=l.child;d!==null;)pk(d,s),d=d.sibling;return H(dn,dn.current&1|2),Et&&yo(l,m.treeForkCount),l.child}s=s.sibling}m.tail!==null&&_e()>Ip&&(l.flags|=128,w=!0,Hf(m,!1),l.lanes=4194304)}else{if(!w)if(s=bp(k),s!==null){if(l.flags|=128,w=!0,s=s.updateQueue,l.updateQueue=s,Mp(l,s),Hf(m,!0),m.tail===null&&m.tailMode==="hidden"&&!k.alternate&&!Et)return Zt(l),null}else 2*_e()-m.renderingStartTime>Ip&&d!==536870912&&(l.flags|=128,w=!0,Hf(m,!1),l.lanes=4194304);m.isBackwards?(k.sibling=l.child,l.child=k):(s=m.last,s!==null?s.sibling=k:l.child=k,m.last=k)}return m.tail!==null?(s=m.tail,m.rendering=s,m.tail=s.sibling,m.renderingStartTime=_e(),s.sibling=null,d=dn.current,H(dn,w?d&1|2:d&1),Et&&yo(l,m.treeForkCount),s):(Zt(l),null);case 22:case 23:return Nr(l),r0(),m=l.memoizedState!==null,s!==null?s.memoizedState!==null!==m&&(l.flags|=8192):m&&(l.flags|=8192),m?(d&536870912)!==0&&(l.flags&128)===0&&(Zt(l),l.subtreeFlags&6&&(l.flags|=8192)):Zt(l),d=l.updateQueue,d!==null&&Mp(l,d.retryQueue),d=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),m=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(m=l.memoizedState.cachePool.pool),m!==d&&(l.flags|=2048),s!==null&&J(Wa),null;case 24:return d=null,s!==null&&(d=s.memoizedState.cache),l.memoizedState.cache!==d&&(l.flags|=2048),vo(bn),Zt(l),null;case 25:return null;case 30:return null}throw Error(r(156,l.tag))}function l5(s,l){switch(Ub(l),l.tag){case 1:return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 3:return vo(bn),ce(),s=l.flags,(s&65536)!==0&&(s&128)===0?(l.flags=s&-65537|128,l):null;case 26:case 27:case 5:return Ve(l),null;case 31:if(l.memoizedState!==null){if(Nr(l),l.alternate===null)throw Error(r(340));qa()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 13:if(Nr(l),s=l.memoizedState,s!==null&&s.dehydrated!==null){if(l.alternate===null)throw Error(r(340));qa()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 19:return J(dn),null;case 4:return ce(),null;case 10:return vo(l.type),null;case 22:case 23:return Nr(l),r0(),s!==null&&J(Wa),s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 24:return vo(bn),null;case 25:return null;default:return null}}function BR(s,l){switch(Ub(l),l.tag){case 3:vo(bn),ce();break;case 26:case 27:case 5:Ve(l);break;case 4:ce();break;case 31:l.memoizedState!==null&&Nr(l);break;case 13:Nr(l);break;case 19:J(dn);break;case 10:vo(l.type);break;case 22:case 23:Nr(l),r0(),s!==null&&J(Wa);break;case 24:vo(bn)}}function Gf(s,l){try{var d=l.updateQueue,m=d!==null?d.lastEffect:null;if(m!==null){var w=m.next;d=w;do{if((d.tag&s)===s){m=void 0;var k=d.create,P=d.inst;m=k(),P.destroy=m}d=d.next}while(d!==w)}}catch(q){Ft(l,l.return,q)}}function xs(s,l,d){try{var m=l.updateQueue,w=m!==null?m.lastEffect:null;if(w!==null){var k=w.next;m=k;do{if((m.tag&s)===s){var P=m.inst,q=P.destroy;if(q!==void 0){P.destroy=void 0,w=l;var Q=d,de=q;try{de()}catch(be){Ft(w,Q,be)}}}m=m.next}while(m!==k)}}catch(be){Ft(l,l.return,be)}}function UR(s){var l=s.updateQueue;if(l!==null){var d=s.stateNode;try{Ok(l,d)}catch(m){Ft(s,s.return,m)}}}function HR(s,l,d){d.props=Ja(s.type,s.memoizedProps),d.state=s.memoizedState;try{d.componentWillUnmount()}catch(m){Ft(s,l,m)}}function qf(s,l){try{var d=s.ref;if(d!==null){switch(s.tag){case 26:case 27:case 5:var m=s.stateNode;break;case 30:m=s.stateNode;break;default:m=s.stateNode}typeof d=="function"?s.refCleanup=d(m):d.current=m}}catch(w){Ft(s,l,w)}}function qi(s,l){var d=s.ref,m=s.refCleanup;if(d!==null)if(typeof m=="function")try{m()}catch(w){Ft(s,l,w)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof d=="function")try{d(null)}catch(w){Ft(s,l,w)}else d.current=null}function GR(s){var l=s.type,d=s.memoizedProps,m=s.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":d.autoFocus&&m.focus();break e;case"img":d.src?m.src=d.src:d.srcSet&&(m.srcset=d.srcSet)}}catch(w){Ft(s,s.return,w)}}function N0(s,l,d){try{var m=s.stateNode;D5(m,s.type,d,l),m[In]=l}catch(w){Ft(s,s.return,w)}}function qR(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&_s(s.type)||s.tag===4}function I0(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||qR(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&_s(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function j0(s,l,d){var m=s.tag;if(m===5||m===6)s=s.stateNode,l?(d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d).insertBefore(s,l):(l=d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d,l.appendChild(s),d=d._reactRootContainer,d!=null||l.onclick!==null||(l.onclick=po));else if(m!==4&&(m===27&&_s(s.type)&&(d=s.stateNode,l=null),s=s.child,s!==null))for(j0(s,l,d),s=s.sibling;s!==null;)j0(s,l,d),s=s.sibling}function Op(s,l,d){var m=s.tag;if(m===5||m===6)s=s.stateNode,l?d.insertBefore(s,l):d.appendChild(s);else if(m!==4&&(m===27&&_s(s.type)&&(d=s.stateNode),s=s.child,s!==null))for(Op(s,l,d),s=s.sibling;s!==null;)Op(s,l,d),s=s.sibling}function VR(s){var l=s.stateNode,d=s.memoizedProps;try{for(var m=s.type,w=l.attributes;w.length;)l.removeAttributeNode(w[0]);zn(l,m,d),l[on]=s,l[In]=d}catch(k){Ft(s,s.return,k)}}var Eo=!1,wn=!1,L0=!1,YR=typeof WeakSet=="function"?WeakSet:Set,Mn=null;function u5(s,l){if(s=s.containerInfo,ov=Jp,s=ok(s),Mb(s)){if("selectionStart"in s)var d={start:s.selectionStart,end:s.selectionEnd};else e:{d=(d=s.ownerDocument)&&d.defaultView||window;var m=d.getSelection&&d.getSelection();if(m&&m.rangeCount!==0){d=m.anchorNode;var w=m.anchorOffset,k=m.focusNode;m=m.focusOffset;try{d.nodeType,k.nodeType}catch{d=null;break e}var P=0,q=-1,Q=-1,de=0,be=0,Ee=s,pe=null;t:for(;;){for(var ye;Ee!==d||w!==0&&Ee.nodeType!==3||(q=P+w),Ee!==k||m!==0&&Ee.nodeType!==3||(Q=P+m),Ee.nodeType===3&&(P+=Ee.nodeValue.length),(ye=Ee.firstChild)!==null;)pe=Ee,Ee=ye;for(;;){if(Ee===s)break t;if(pe===d&&++de===w&&(q=P),pe===k&&++be===m&&(Q=P),(ye=Ee.nextSibling)!==null)break;Ee=pe,pe=Ee.parentNode}Ee=ye}d=q===-1||Q===-1?null:{start:q,end:Q}}else d=null}d=d||{start:0,end:0}}else d=null;for(sv={focusedElem:s,selectionRange:d},Jp=!1,Mn=l;Mn!==null;)if(l=Mn,s=l.child,(l.subtreeFlags&1028)!==0&&s!==null)s.return=l,Mn=s;else for(;Mn!==null;){switch(l=Mn,k=l.alternate,s=l.flags,l.tag){case 0:if((s&4)!==0&&(s=l.updateQueue,s=s!==null?s.events:null,s!==null))for(d=0;d<s.length;d++)w=s[d],w.ref.impl=w.nextImpl;break;case 11:case 15:break;case 1:if((s&1024)!==0&&k!==null){s=void 0,d=l,w=k.memoizedProps,k=k.memoizedState,m=d.stateNode;try{var Be=Ja(d.type,w);s=m.getSnapshotBeforeUpdate(Be,k),m.__reactInternalSnapshotBeforeUpdate=s}catch(et){Ft(d,d.return,et)}}break;case 3:if((s&1024)!==0){if(s=l.stateNode.containerInfo,d=s.nodeType,d===9)uv(s);else if(d===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":uv(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((s&1024)!==0)throw Error(r(163))}if(s=l.sibling,s!==null){s.return=l.return,Mn=s;break}Mn=l.return}}function WR(s,l,d){var m=d.flags;switch(d.tag){case 0:case 11:case 15:Ro(s,d),m&4&&Gf(5,d);break;case 1:if(Ro(s,d),m&4)if(s=d.stateNode,l===null)try{s.componentDidMount()}catch(P){Ft(d,d.return,P)}else{var w=Ja(d.type,l.memoizedProps);l=l.memoizedState;try{s.componentDidUpdate(w,l,s.__reactInternalSnapshotBeforeUpdate)}catch(P){Ft(d,d.return,P)}}m&64&&UR(d),m&512&&qf(d,d.return);break;case 3:if(Ro(s,d),m&64&&(s=d.updateQueue,s!==null)){if(l=null,d.child!==null)switch(d.child.tag){case 27:case 5:l=d.child.stateNode;break;case 1:l=d.child.stateNode}try{Ok(s,l)}catch(P){Ft(d,d.return,P)}}break;case 27:l===null&&m&4&&VR(d);case 26:case 5:Ro(s,d),l===null&&m&4&&GR(d),m&512&&qf(d,d.return);break;case 12:Ro(s,d);break;case 31:Ro(s,d),m&4&&QR(s,d);break;case 13:Ro(s,d),m&4&&ZR(s,d),m&64&&(s=d.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(d=b5.bind(null,d),L5(s,d))));break;case 22:if(m=d.memoizedState!==null||Eo,!m){l=l!==null&&l.memoizedState!==null||wn,w=Eo;var k=wn;Eo=m,(wn=l)&&!k?_o(s,d,(d.subtreeFlags&8772)!==0):Ro(s,d),Eo=w,wn=k}break;case 30:break;default:Ro(s,d)}}function KR(s){var l=s.alternate;l!==null&&(s.alternate=null,KR(l)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(l=s.stateNode,l!==null&&pb(l)),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}var nn=null,hr=!1;function ko(s,l,d){for(d=d.child;d!==null;)XR(s,l,d),d=d.sibling}function XR(s,l,d){if(Me&&typeof Me.onCommitFiberUnmount=="function")try{Me.onCommitFiberUnmount(Ot,d)}catch{}switch(d.tag){case 26:wn||qi(d,l),ko(s,l,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:wn||qi(d,l);var m=nn,w=hr;_s(d.type)&&(nn=d.stateNode,hr=!1),ko(s,l,d),ed(d.stateNode),nn=m,hr=w;break;case 5:wn||qi(d,l);case 6:if(m=nn,w=hr,nn=null,ko(s,l,d),nn=m,hr=w,nn!==null)if(hr)try{(nn.nodeType===9?nn.body:nn.nodeName==="HTML"?nn.ownerDocument.body:nn).removeChild(d.stateNode)}catch(k){Ft(d,l,k)}else try{nn.removeChild(d.stateNode)}catch(k){Ft(d,l,k)}break;case 18:nn!==null&&(hr?(s=nn,U2(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,d.stateNode),Hu(s)):U2(nn,d.stateNode));break;case 4:m=nn,w=hr,nn=d.stateNode.containerInfo,hr=!0,ko(s,l,d),nn=m,hr=w;break;case 0:case 11:case 14:case 15:xs(2,d,l),wn||xs(4,d,l),ko(s,l,d);break;case 1:wn||(qi(d,l),m=d.stateNode,typeof m.componentWillUnmount=="function"&&HR(d,l,m)),ko(s,l,d);break;case 21:ko(s,l,d);break;case 22:wn=(m=wn)||d.memoizedState!==null,ko(s,l,d),wn=m;break;default:ko(s,l,d)}}function QR(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{Hu(s)}catch(d){Ft(l,l.return,d)}}}function ZR(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{Hu(s)}catch(d){Ft(l,l.return,d)}}function c5(s){switch(s.tag){case 31:case 13:case 19:var l=s.stateNode;return l===null&&(l=s.stateNode=new YR),l;case 22:return s=s.stateNode,l=s._retryCache,l===null&&(l=s._retryCache=new YR),l;default:throw Error(r(435,s.tag))}}function $p(s,l){var d=c5(s);l.forEach(function(m){if(!d.has(m)){d.add(m);var w=v5.bind(null,s,m);m.then(w,w)}})}function pr(s,l){var d=l.deletions;if(d!==null)for(var m=0;m<d.length;m++){var w=d[m],k=s,P=l,q=P;e:for(;q!==null;){switch(q.tag){case 27:if(_s(q.type)){nn=q.stateNode,hr=!1;break e}break;case 5:nn=q.stateNode,hr=!1;break e;case 3:case 4:nn=q.stateNode.containerInfo,hr=!0;break e}q=q.return}if(nn===null)throw Error(r(160));XR(k,P,w),nn=null,hr=!1,k=w.alternate,k!==null&&(k.return=null),w.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)JR(l,s),l=l.sibling}var Ti=null;function JR(s,l){var d=s.alternate,m=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:pr(l,s),mr(s),m&4&&(xs(3,s,s.return),Gf(3,s),xs(5,s,s.return));break;case 1:pr(l,s),mr(s),m&512&&(wn||d===null||qi(d,d.return)),m&64&&Eo&&(s=s.updateQueue,s!==null&&(m=s.callbacks,m!==null&&(d=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=d===null?m:d.concat(m))));break;case 26:var w=Ti;if(pr(l,s),mr(s),m&512&&(wn||d===null||qi(d,d.return)),m&4){var k=d!==null?d.memoizedState:null;if(m=s.memoizedState,d===null)if(m===null)if(s.stateNode===null){e:{m=s.type,d=s.memoizedProps,w=w.ownerDocument||w;t:switch(m){case"title":k=w.getElementsByTagName("title")[0],(!k||k[bf]||k[on]||k.namespaceURI==="http://www.w3.org/2000/svg"||k.hasAttribute("itemprop"))&&(k=w.createElement(m),w.head.insertBefore(k,w.querySelector("head > title"))),zn(k,m,d),k[on]=s,Dn(k),m=k;break e;case"link":var P=J2("link","href",w).get(m+(d.href||""));if(P){for(var q=0;q<P.length;q++)if(k=P[q],k.getAttribute("href")===(d.href==null||d.href===""?null:d.href)&&k.getAttribute("rel")===(d.rel==null?null:d.rel)&&k.getAttribute("title")===(d.title==null?null:d.title)&&k.getAttribute("crossorigin")===(d.crossOrigin==null?null:d.crossOrigin)){P.splice(q,1);break t}}k=w.createElement(m),zn(k,m,d),w.head.appendChild(k);break;case"meta":if(P=J2("meta","content",w).get(m+(d.content||""))){for(q=0;q<P.length;q++)if(k=P[q],k.getAttribute("content")===(d.content==null?null:""+d.content)&&k.getAttribute("name")===(d.name==null?null:d.name)&&k.getAttribute("property")===(d.property==null?null:d.property)&&k.getAttribute("http-equiv")===(d.httpEquiv==null?null:d.httpEquiv)&&k.getAttribute("charset")===(d.charSet==null?null:d.charSet)){P.splice(q,1);break t}}k=w.createElement(m),zn(k,m,d),w.head.appendChild(k);break;default:throw Error(r(468,m))}k[on]=s,Dn(k),m=k}s.stateNode=m}else e_(w,s.type,s.stateNode);else s.stateNode=Z2(w,m,s.memoizedProps);else k!==m?(k===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):k.count--,m===null?e_(w,s.type,s.stateNode):Z2(w,m,s.memoizedProps)):m===null&&s.stateNode!==null&&N0(s,s.memoizedProps,d.memoizedProps)}break;case 27:pr(l,s),mr(s),m&512&&(wn||d===null||qi(d,d.return)),d!==null&&m&4&&N0(s,s.memoizedProps,d.memoizedProps);break;case 5:if(pr(l,s),mr(s),m&512&&(wn||d===null||qi(d,d.return)),s.flags&32){w=s.stateNode;try{du(w,"")}catch(Be){Ft(s,s.return,Be)}}m&4&&s.stateNode!=null&&(w=s.memoizedProps,N0(s,w,d!==null?d.memoizedProps:w)),m&1024&&(L0=!0);break;case 6:if(pr(l,s),mr(s),m&4){if(s.stateNode===null)throw Error(r(162));m=s.memoizedProps,d=s.stateNode;try{d.nodeValue=m}catch(Be){Ft(s,s.return,Be)}}break;case 3:if(Kp=null,w=Ti,Ti=Yp(l.containerInfo),pr(l,s),Ti=w,mr(s),m&4&&d!==null&&d.memoizedState.isDehydrated)try{Hu(l.containerInfo)}catch(Be){Ft(s,s.return,Be)}L0&&(L0=!1,e2(s));break;case 4:m=Ti,Ti=Yp(s.stateNode.containerInfo),pr(l,s),mr(s),Ti=m;break;case 12:pr(l,s),mr(s);break;case 31:pr(l,s),mr(s),m&4&&(m=s.updateQueue,m!==null&&(s.updateQueue=null,$p(s,m)));break;case 13:pr(l,s),mr(s),s.child.flags&8192&&s.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(Np=_e()),m&4&&(m=s.updateQueue,m!==null&&(s.updateQueue=null,$p(s,m)));break;case 22:w=s.memoizedState!==null;var Q=d!==null&&d.memoizedState!==null,de=Eo,be=wn;if(Eo=de||w,wn=be||Q,pr(l,s),wn=be,Eo=de,mr(s),m&8192)e:for(l=s.stateNode,l._visibility=w?l._visibility&-2:l._visibility|1,w&&(d===null||Q||Eo||wn||el(s)),d=null,l=s;;){if(l.tag===5||l.tag===26){if(d===null){Q=d=l;try{if(k=Q.stateNode,w)P=k.style,typeof P.setProperty=="function"?P.setProperty("display","none","important"):P.display="none";else{q=Q.stateNode;var Ee=Q.memoizedProps.style,pe=Ee!=null&&Ee.hasOwnProperty("display")?Ee.display:null;q.style.display=pe==null||typeof pe=="boolean"?"":(""+pe).trim()}}catch(Be){Ft(Q,Q.return,Be)}}}else if(l.tag===6){if(d===null){Q=l;try{Q.stateNode.nodeValue=w?"":Q.memoizedProps}catch(Be){Ft(Q,Q.return,Be)}}}else if(l.tag===18){if(d===null){Q=l;try{var ye=Q.stateNode;w?H2(ye,!0):H2(Q.stateNode,!1)}catch(Be){Ft(Q,Q.return,Be)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===s)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break e;for(;l.sibling===null;){if(l.return===null||l.return===s)break e;d===l&&(d=null),l=l.return}d===l&&(d=null),l.sibling.return=l.return,l=l.sibling}m&4&&(m=s.updateQueue,m!==null&&(d=m.retryQueue,d!==null&&(m.retryQueue=null,$p(s,d))));break;case 19:pr(l,s),mr(s),m&4&&(m=s.updateQueue,m!==null&&(s.updateQueue=null,$p(s,m)));break;case 30:break;case 21:break;default:pr(l,s),mr(s)}}function mr(s){var l=s.flags;if(l&2){try{for(var d,m=s.return;m!==null;){if(qR(m)){d=m;break}m=m.return}if(d==null)throw Error(r(160));switch(d.tag){case 27:var w=d.stateNode,k=I0(s);Op(s,k,w);break;case 5:var P=d.stateNode;d.flags&32&&(du(P,""),d.flags&=-33);var q=I0(s);Op(s,q,P);break;case 3:case 4:var Q=d.stateNode.containerInfo,de=I0(s);j0(s,de,Q);break;default:throw Error(r(161))}}catch(be){Ft(s,s.return,be)}s.flags&=-3}l&4096&&(s.flags&=-4097)}function e2(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var l=s;e2(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),s=s.sibling}}function Ro(s,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)WR(s,l.alternate,l),l=l.sibling}function el(s){for(s=s.child;s!==null;){var l=s;switch(l.tag){case 0:case 11:case 14:case 15:xs(4,l,l.return),el(l);break;case 1:qi(l,l.return);var d=l.stateNode;typeof d.componentWillUnmount=="function"&&HR(l,l.return,d),el(l);break;case 27:ed(l.stateNode);case 26:case 5:qi(l,l.return),el(l);break;case 22:l.memoizedState===null&&el(l);break;case 30:el(l);break;default:el(l)}s=s.sibling}}function _o(s,l,d){for(d=d&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var m=l.alternate,w=s,k=l,P=k.flags;switch(k.tag){case 0:case 11:case 15:_o(w,k,d),Gf(4,k);break;case 1:if(_o(w,k,d),m=k,w=m.stateNode,typeof w.componentDidMount=="function")try{w.componentDidMount()}catch(de){Ft(m,m.return,de)}if(m=k,w=m.updateQueue,w!==null){var q=m.stateNode;try{var Q=w.shared.hiddenCallbacks;if(Q!==null)for(w.shared.hiddenCallbacks=null,w=0;w<Q.length;w++)Mk(Q[w],q)}catch(de){Ft(m,m.return,de)}}d&&P&64&&UR(k),qf(k,k.return);break;case 27:VR(k);case 26:case 5:_o(w,k,d),d&&m===null&&P&4&&GR(k),qf(k,k.return);break;case 12:_o(w,k,d);break;case 31:_o(w,k,d),d&&P&4&&QR(w,k);break;case 13:_o(w,k,d),d&&P&4&&ZR(w,k);break;case 22:k.memoizedState===null&&_o(w,k,d),qf(k,k.return);break;case 30:break;default:_o(w,k,d)}l=l.sibling}}function F0(s,l){var d=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),s=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(s=l.memoizedState.cachePool.pool),s!==d&&(s!=null&&s.refCount++,d!=null&&Mf(d))}function z0(s,l){s=null,l.alternate!==null&&(s=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==s&&(l.refCount++,s!=null&&Mf(s))}function Ai(s,l,d,m){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)t2(s,l,d,m),l=l.sibling}function t2(s,l,d,m){var w=l.flags;switch(l.tag){case 0:case 11:case 15:Ai(s,l,d,m),w&2048&&Gf(9,l);break;case 1:Ai(s,l,d,m);break;case 3:Ai(s,l,d,m),w&2048&&(s=null,l.alternate!==null&&(s=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==s&&(l.refCount++,s!=null&&Mf(s)));break;case 12:if(w&2048){Ai(s,l,d,m),s=l.stateNode;try{var k=l.memoizedProps,P=k.id,q=k.onPostCommit;typeof q=="function"&&q(P,l.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(Q){Ft(l,l.return,Q)}}else Ai(s,l,d,m);break;case 31:Ai(s,l,d,m);break;case 13:Ai(s,l,d,m);break;case 23:break;case 22:k=l.stateNode,P=l.alternate,l.memoizedState!==null?k._visibility&2?Ai(s,l,d,m):Vf(s,l):k._visibility&2?Ai(s,l,d,m):(k._visibility|=2,Ou(s,l,d,m,(l.subtreeFlags&10256)!==0||!1)),w&2048&&F0(P,l);break;case 24:Ai(s,l,d,m),w&2048&&z0(l.alternate,l);break;default:Ai(s,l,d,m)}}function Ou(s,l,d,m,w){for(w=w&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var k=s,P=l,q=d,Q=m,de=P.flags;switch(P.tag){case 0:case 11:case 15:Ou(k,P,q,Q,w),Gf(8,P);break;case 23:break;case 22:var be=P.stateNode;P.memoizedState!==null?be._visibility&2?Ou(k,P,q,Q,w):Vf(k,P):(be._visibility|=2,Ou(k,P,q,Q,w)),w&&de&2048&&F0(P.alternate,P);break;case 24:Ou(k,P,q,Q,w),w&&de&2048&&z0(P.alternate,P);break;default:Ou(k,P,q,Q,w)}l=l.sibling}}function Vf(s,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var d=s,m=l,w=m.flags;switch(m.tag){case 22:Vf(d,m),w&2048&&F0(m.alternate,m);break;case 24:Vf(d,m),w&2048&&z0(m.alternate,m);break;default:Vf(d,m)}l=l.sibling}}var Yf=8192;function $u(s,l,d){if(s.subtreeFlags&Yf)for(s=s.child;s!==null;)n2(s,l,d),s=s.sibling}function n2(s,l,d){switch(s.tag){case 26:$u(s,l,d),s.flags&Yf&&s.memoizedState!==null&&X5(d,Ti,s.memoizedState,s.memoizedProps);break;case 5:$u(s,l,d);break;case 3:case 4:var m=Ti;Ti=Yp(s.stateNode.containerInfo),$u(s,l,d),Ti=m;break;case 22:s.memoizedState===null&&(m=s.alternate,m!==null&&m.memoizedState!==null?(m=Yf,Yf=16777216,$u(s,l,d),Yf=m):$u(s,l,d));break;default:$u(s,l,d)}}function r2(s){var l=s.alternate;if(l!==null&&(s=l.child,s!==null)){l.child=null;do l=s.sibling,s.sibling=null,s=l;while(s!==null)}}function Wf(s){var l=s.deletions;if((s.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var m=l[d];Mn=m,o2(m,s)}r2(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)i2(s),s=s.sibling}function i2(s){switch(s.tag){case 0:case 11:case 15:Wf(s),s.flags&2048&&xs(9,s,s.return);break;case 3:Wf(s);break;case 12:Wf(s);break;case 22:var l=s.stateNode;s.memoizedState!==null&&l._visibility&2&&(s.return===null||s.return.tag!==13)?(l._visibility&=-3,Pp(s)):Wf(s);break;default:Wf(s)}}function Pp(s){var l=s.deletions;if((s.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var m=l[d];Mn=m,o2(m,s)}r2(s)}for(s=s.child;s!==null;){switch(l=s,l.tag){case 0:case 11:case 15:xs(8,l,l.return),Pp(l);break;case 22:d=l.stateNode,d._visibility&2&&(d._visibility&=-3,Pp(l));break;default:Pp(l)}s=s.sibling}}function o2(s,l){for(;Mn!==null;){var d=Mn;switch(d.tag){case 0:case 11:case 15:xs(8,d,l);break;case 23:case 22:if(d.memoizedState!==null&&d.memoizedState.cachePool!==null){var m=d.memoizedState.cachePool.pool;m!=null&&m.refCount++}break;case 24:Mf(d.memoizedState.cache)}if(m=d.child,m!==null)m.return=d,Mn=m;else e:for(d=s;Mn!==null;){m=Mn;var w=m.sibling,k=m.return;if(KR(m),m===d){Mn=null;break e}if(w!==null){w.return=k,Mn=w;break e}Mn=k}}}var f5={getCacheForType:function(s){var l=Ln(bn),d=l.data.get(s);return d===void 0&&(d=s(),l.data.set(s,d)),d},cacheSignal:function(){return Ln(bn).controller.signal}},d5=typeof WeakMap=="function"?WeakMap:Map,$t=0,Yt=null,yt=null,St=0,Lt=0,Ir=null,ws=!1,Pu=!1,B0=!1,To=0,an=0,Ss=0,tl=0,U0=0,jr=0,Nu=0,Kf=null,gr=null,H0=!1,Np=0,s2=0,Ip=1/0,jp=null,Cs=null,Cn=0,Es=null,Iu=null,Ao=0,G0=0,q0=null,a2=null,Xf=0,V0=null;function Lr(){return($t&2)!==0&&St!==0?St&-St:F.T!==null?Z0():Ui()}function l2(){if(jr===0)if((St&536870912)===0||Et){var s=en;en<<=1,(en&3932160)===0&&(en=262144),jr=s}else jr=536870912;return s=Pr.current,s!==null&&(s.flags|=32),jr}function yr(s,l,d){(s===Yt&&(Lt===2||Lt===9)||s.cancelPendingCommit!==null)&&(ju(s,0),ks(s,St,jr,!1)),ki(s,d),(($t&2)===0||s!==Yt)&&(s===Yt&&(($t&2)===0&&(tl|=d),an===4&&ks(s,St,jr,!1)),Vi(s))}function u2(s,l,d){if(($t&6)!==0)throw Error(r(327));var m=!d&&(l&127)===0&&(l&s.expiredLanes)===0||Zr(s,l),w=m?m5(s,l):W0(s,l,!0),k=m;do{if(w===0){Pu&&!m&&ks(s,l,0,!1);break}else{if(d=s.current.alternate,k&&!h5(d)){w=W0(s,l,!1),k=!1;continue}if(w===2){if(k=l,s.errorRecoveryDisabledLanes&k)var P=0;else P=s.pendingLanes&-536870913,P=P!==0?P:P&536870912?536870912:0;if(P!==0){l=P;e:{var q=s;w=Kf;var Q=q.current.memoizedState.isDehydrated;if(Q&&(ju(q,P).flags|=256),P=W0(q,P,!1),P!==2){if(B0&&!Q){q.errorRecoveryDisabledLanes|=k,tl|=k,w=4;break e}k=gr,gr=w,k!==null&&(gr===null?gr=k:gr.push.apply(gr,k))}w=P}if(k=!1,w!==2)continue}}if(w===1){ju(s,0),ks(s,l,0,!0);break}e:{switch(m=s,k=w,k){case 0:case 1:throw Error(r(345));case 4:if((l&4194048)!==l)break;case 6:ks(m,l,jr,!ws);break e;case 2:gr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((l&62914560)===l&&(w=Np+300-_e(),10<w)){if(ks(m,l,jr,!ws),yn(m,0,!0)!==0)break e;Ao=l,m.timeoutHandle=z2(c2.bind(null,m,d,gr,jp,H0,l,jr,tl,Nu,ws,k,"Throttled",-0,0),w);break e}c2(m,d,gr,jp,H0,l,jr,tl,Nu,ws,k,null,-0,0)}}break}while(!0);Vi(s)}function c2(s,l,d,m,w,k,P,q,Q,de,be,Ee,pe,ye){if(s.timeoutHandle=-1,Ee=l.subtreeFlags,Ee&8192||(Ee&16785408)===16785408){Ee={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:po},n2(l,k,Ee);var Be=(k&62914560)===k?Np-_e():(k&4194048)===k?s2-_e():0;if(Be=Q5(Ee,Be),Be!==null){Ao=k,s.cancelPendingCommit=Be(b2.bind(null,s,l,k,d,m,w,P,q,Q,be,Ee,null,pe,ye)),ks(s,k,P,!de);return}}b2(s,l,k,d,m,w,P,q,Q)}function h5(s){for(var l=s;;){var d=l.tag;if((d===0||d===11||d===15)&&l.flags&16384&&(d=l.updateQueue,d!==null&&(d=d.stores,d!==null)))for(var m=0;m<d.length;m++){var w=d[m],k=w.getSnapshot;w=w.value;try{if(!Or(k(),w))return!1}catch{return!1}}if(d=l.child,l.subtreeFlags&16384&&d!==null)d.return=l,l=d;else{if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function ks(s,l,d,m){l&=~U0,l&=~tl,s.suspendedLanes|=l,s.pingedLanes&=~l,m&&(s.warmLanes|=l),m=s.expirationTimes;for(var w=l;0<w;){var k=31-Ne(w),P=1<<k;m[k]=-1,w&=~P}d!==0&&ou(s,d,l)}function Lp(){return($t&6)===0?(Qf(0),!1):!0}function Y0(){if(yt!==null){if(Lt===0)var s=yt.return;else s=yt,bo=Va=null,u0(s),_u=null,$f=0,s=yt;for(;s!==null;)BR(s.alternate,s),s=s.return;yt=null}}function ju(s,l){var d=s.timeoutHandle;d!==-1&&(s.timeoutHandle=-1,$5(d)),d=s.cancelPendingCommit,d!==null&&(s.cancelPendingCommit=null,d()),Ao=0,Y0(),Yt=s,yt=d=go(s.current,null),St=l,Lt=0,Ir=null,ws=!1,Pu=Zr(s,l),B0=!1,Nu=jr=U0=tl=Ss=an=0,gr=Kf=null,H0=!1,(l&8)!==0&&(l|=l&32);var m=s.entangledLanes;if(m!==0)for(s=s.entanglements,m&=l;0<m;){var w=31-Ne(m),k=1<<w;l|=s[w],m&=~k}return To=l,op(),d}function f2(s,l){ot=null,F.H=Bf,l===Ru||l===hp?(l=_k(),Lt=3):l===Qb?(l=_k(),Lt=4):Lt=l===k0?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,Ir=l,yt===null&&(an=1,_p(s,ni(l,s.current)))}function d2(){var s=Pr.current;return s===null?!0:(St&4194048)===St?si===null:(St&62914560)===St||(St&536870912)!==0?s===si:!1}function h2(){var s=F.H;return F.H=Bf,s===null?Bf:s}function p2(){var s=F.A;return F.A=f5,s}function Fp(){an=4,ws||(St&4194048)!==St&&Pr.current!==null||(Pu=!0),(Ss&134217727)===0&&(tl&134217727)===0||Yt===null||ks(Yt,St,jr,!1)}function W0(s,l,d){var m=$t;$t|=2;var w=h2(),k=p2();(Yt!==s||St!==l)&&(jp=null,ju(s,l)),l=!1;var P=an;e:do try{if(Lt!==0&&yt!==null){var q=yt,Q=Ir;switch(Lt){case 8:Y0(),P=6;break e;case 3:case 2:case 9:case 6:Pr.current===null&&(l=!0);var de=Lt;if(Lt=0,Ir=null,Lu(s,q,Q,de),d&&Pu){P=0;break e}break;default:de=Lt,Lt=0,Ir=null,Lu(s,q,Q,de)}}p5(),P=an;break}catch(be){f2(s,be)}while(!0);return l&&s.shellSuspendCounter++,bo=Va=null,$t=m,F.H=w,F.A=k,yt===null&&(Yt=null,St=0,op()),P}function p5(){for(;yt!==null;)m2(yt)}function m5(s,l){var d=$t;$t|=2;var m=h2(),w=p2();Yt!==s||St!==l?(jp=null,Ip=_e()+500,ju(s,l)):Pu=Zr(s,l);e:do try{if(Lt!==0&&yt!==null){l=yt;var k=Ir;t:switch(Lt){case 1:Lt=0,Ir=null,Lu(s,l,k,1);break;case 2:case 9:if(kk(k)){Lt=0,Ir=null,g2(l);break}l=function(){Lt!==2&&Lt!==9||Yt!==s||(Lt=7),Vi(s)},k.then(l,l);break e;case 3:Lt=7;break e;case 4:Lt=5;break e;case 7:kk(k)?(Lt=0,Ir=null,g2(l)):(Lt=0,Ir=null,Lu(s,l,k,7));break;case 5:var P=null;switch(yt.tag){case 26:P=yt.memoizedState;case 5:case 27:var q=yt;if(P?t_(P):q.stateNode.complete){Lt=0,Ir=null;var Q=q.sibling;if(Q!==null)yt=Q;else{var de=q.return;de!==null?(yt=de,zp(de)):yt=null}break t}}Lt=0,Ir=null,Lu(s,l,k,5);break;case 6:Lt=0,Ir=null,Lu(s,l,k,6);break;case 8:Y0(),an=6;break e;default:throw Error(r(462))}}g5();break}catch(be){f2(s,be)}while(!0);return bo=Va=null,F.H=m,F.A=w,$t=d,yt!==null?0:(Yt=null,St=0,op(),an)}function g5(){for(;yt!==null&&!Oe();)m2(yt)}function m2(s){var l=FR(s.alternate,s,To);s.memoizedProps=s.pendingProps,l===null?zp(s):yt=l}function g2(s){var l=s,d=l.alternate;switch(l.tag){case 15:case 0:l=$R(d,l,l.pendingProps,l.type,void 0,St);break;case 11:l=$R(d,l,l.pendingProps,l.type.render,l.ref,St);break;case 5:u0(l);default:BR(d,l),l=yt=pk(l,To),l=FR(d,l,To)}s.memoizedProps=s.pendingProps,l===null?zp(s):yt=l}function Lu(s,l,d,m){bo=Va=null,u0(l),_u=null,$f=0;var w=l.return;try{if(i5(s,w,l,d,St)){an=1,_p(s,ni(d,s.current)),yt=null;return}}catch(k){if(w!==null)throw yt=w,k;an=1,_p(s,ni(d,s.current)),yt=null;return}l.flags&32768?(Et||m===1?s=!0:Pu||(St&536870912)!==0?s=!1:(ws=s=!0,(m===2||m===9||m===3||m===6)&&(m=Pr.current,m!==null&&m.tag===13&&(m.flags|=16384))),y2(l,s)):zp(l)}function zp(s){var l=s;do{if((l.flags&32768)!==0){y2(l,ws);return}s=l.return;var d=a5(l.alternate,l,To);if(d!==null){yt=d;return}if(l=l.sibling,l!==null){yt=l;return}yt=l=s}while(l!==null);an===0&&(an=5)}function y2(s,l){do{var d=l5(s.alternate,s);if(d!==null){d.flags&=32767,yt=d;return}if(d=s.return,d!==null&&(d.flags|=32768,d.subtreeFlags=0,d.deletions=null),!l&&(s=s.sibling,s!==null)){yt=s;return}yt=s=d}while(s!==null);an=6,yt=null}function b2(s,l,d,m,w,k,P,q,Q){s.cancelPendingCommit=null;do Bp();while(Cn!==0);if(($t&6)!==0)throw Error(r(327));if(l!==null){if(l===s.current)throw Error(r(177));if(k=l.lanes|l.childLanes,k|=Ib,iu(s,d,k,P,q,Q),s===Yt&&(yt=Yt=null,St=0),Iu=l,Es=s,Ao=d,G0=k,q0=w,a2=m,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,x5(ke,function(){return C2(),null})):(s.callbackNode=null,s.callbackPriority=0),m=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||m){m=F.T,F.T=null,w=U.p,U.p=2,P=$t,$t|=4;try{u5(s,l,d)}finally{$t=P,U.p=w,F.T=m}}Cn=1,v2(),x2(),w2()}}function v2(){if(Cn===1){Cn=0;var s=Es,l=Iu,d=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||d){d=F.T,F.T=null;var m=U.p;U.p=2;var w=$t;$t|=4;try{JR(l,s);var k=sv,P=ok(s.containerInfo),q=k.focusedElem,Q=k.selectionRange;if(P!==q&&q&&q.ownerDocument&&ik(q.ownerDocument.documentElement,q)){if(Q!==null&&Mb(q)){var de=Q.start,be=Q.end;if(be===void 0&&(be=de),"selectionStart"in q)q.selectionStart=de,q.selectionEnd=Math.min(be,q.value.length);else{var Ee=q.ownerDocument||document,pe=Ee&&Ee.defaultView||window;if(pe.getSelection){var ye=pe.getSelection(),Be=q.textContent.length,et=Math.min(Q.start,Be),Gt=Q.end===void 0?et:Math.min(Q.end,Be);!ye.extend&&et>Gt&&(P=Gt,Gt=et,et=P);var se=rk(q,et),ee=rk(q,Gt);if(se&&ee&&(ye.rangeCount!==1||ye.anchorNode!==se.node||ye.anchorOffset!==se.offset||ye.focusNode!==ee.node||ye.focusOffset!==ee.offset)){var fe=Ee.createRange();fe.setStart(se.node,se.offset),ye.removeAllRanges(),et>Gt?(ye.addRange(fe),ye.extend(ee.node,ee.offset)):(fe.setEnd(ee.node,ee.offset),ye.addRange(fe))}}}}for(Ee=[],ye=q;ye=ye.parentNode;)ye.nodeType===1&&Ee.push({element:ye,left:ye.scrollLeft,top:ye.scrollTop});for(typeof q.focus=="function"&&q.focus(),q=0;q<Ee.length;q++){var we=Ee[q];we.element.scrollLeft=we.left,we.element.scrollTop=we.top}}Jp=!!ov,sv=ov=null}finally{$t=w,U.p=m,F.T=d}}s.current=l,Cn=2}}function x2(){if(Cn===2){Cn=0;var s=Es,l=Iu,d=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||d){d=F.T,F.T=null;var m=U.p;U.p=2;var w=$t;$t|=4;try{WR(s,l.alternate,l)}finally{$t=w,U.p=m,F.T=d}}Cn=3}}function w2(){if(Cn===4||Cn===3){Cn=0,Te();var s=Es,l=Iu,d=Ao,m=a2;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?Cn=5:(Cn=0,Iu=Es=null,S2(s,s.pendingLanes));var w=s.pendingLanes;if(w===0&&(Cs=null),ja(d),l=l.stateNode,Me&&typeof Me.onCommitFiberRoot=="function")try{Me.onCommitFiberRoot(Ot,l,void 0,(l.current.flags&128)===128)}catch{}if(m!==null){l=F.T,w=U.p,U.p=2,F.T=null;try{for(var k=s.onRecoverableError,P=0;P<m.length;P++){var q=m[P];k(q.value,{componentStack:q.stack})}}finally{F.T=l,U.p=w}}(Ao&3)!==0&&Bp(),Vi(s),w=s.pendingLanes,(d&261930)!==0&&(w&42)!==0?s===V0?Xf++:(Xf=0,V0=s):Xf=0,Qf(0)}}function S2(s,l){(s.pooledCacheLanes&=l)===0&&(l=s.pooledCache,l!=null&&(s.pooledCache=null,Mf(l)))}function Bp(){return v2(),x2(),w2(),C2()}function C2(){if(Cn!==5)return!1;var s=Es,l=G0;G0=0;var d=ja(Ao),m=F.T,w=U.p;try{U.p=32>d?32:d,F.T=null,d=q0,q0=null;var k=Es,P=Ao;if(Cn=0,Iu=Es=null,Ao=0,($t&6)!==0)throw Error(r(331));var q=$t;if($t|=4,i2(k.current),t2(k,k.current,P,d),$t=q,Qf(0,!1),Me&&typeof Me.onPostCommitFiberRoot=="function")try{Me.onPostCommitFiberRoot(Ot,k)}catch{}return!0}finally{U.p=w,F.T=m,S2(s,l)}}function E2(s,l,d){l=ni(d,l),l=E0(s.stateNode,l,2),s=ys(s,l,2),s!==null&&(ki(s,2),Vi(s))}function Ft(s,l,d){if(s.tag===3)E2(s,s,d);else for(;l!==null;){if(l.tag===3){E2(l,s,d);break}else if(l.tag===1){var m=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(Cs===null||!Cs.has(m))){s=ni(d,s),d=kR(2),m=ys(l,d,2),m!==null&&(RR(d,m,l,s),ki(m,2),Vi(m));break}}l=l.return}}function K0(s,l,d){var m=s.pingCache;if(m===null){m=s.pingCache=new d5;var w=new Set;m.set(l,w)}else w=m.get(l),w===void 0&&(w=new Set,m.set(l,w));w.has(d)||(B0=!0,w.add(d),s=y5.bind(null,s,l,d),l.then(s,s))}function y5(s,l,d){var m=s.pingCache;m!==null&&m.delete(l),s.pingedLanes|=s.suspendedLanes&d,s.warmLanes&=~d,Yt===s&&(St&d)===d&&(an===4||an===3&&(St&62914560)===St&&300>_e()-Np?($t&2)===0&&ju(s,0):U0|=d,Nu===St&&(Nu=0)),Vi(s)}function k2(s,l){l===0&&(l=Ei()),s=Ha(s,l),s!==null&&(ki(s,l),Vi(s))}function b5(s){var l=s.memoizedState,d=0;l!==null&&(d=l.retryLane),k2(s,d)}function v5(s,l){var d=0;switch(s.tag){case 31:case 13:var m=s.stateNode,w=s.memoizedState;w!==null&&(d=w.retryLane);break;case 19:m=s.stateNode;break;case 22:m=s.stateNode._retryCache;break;default:throw Error(r(314))}m!==null&&m.delete(l),k2(s,d)}function x5(s,l){return me(s,l)}var Up=null,Fu=null,X0=!1,Hp=!1,Q0=!1,Rs=0;function Vi(s){s!==Fu&&s.next===null&&(Fu===null?Up=Fu=s:Fu=Fu.next=s),Hp=!0,X0||(X0=!0,S5())}function Qf(s,l){if(!Q0&&Hp){Q0=!0;do for(var d=!1,m=Up;m!==null;){if(s!==0){var w=m.pendingLanes;if(w===0)var k=0;else{var P=m.suspendedLanes,q=m.pingedLanes;k=(1<<31-Ne(42|s)+1)-1,k&=w&~(P&~q),k=k&201326741?k&201326741|1:k?k|2:0}k!==0&&(d=!0,A2(m,k))}else k=St,k=yn(m,m===Yt?k:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(k&3)===0||Zr(m,k)||(d=!0,A2(m,k));m=m.next}while(d);Q0=!1}}function w5(){R2()}function R2(){Hp=X0=!1;var s=0;Rs!==0&&O5()&&(s=Rs);for(var l=_e(),d=null,m=Up;m!==null;){var w=m.next,k=_2(m,l);k===0?(m.next=null,d===null?Up=w:d.next=w,w===null&&(Fu=d)):(d=m,(s!==0||(k&3)!==0)&&(Hp=!0)),m=w}Cn!==0&&Cn!==5||Qf(s),Rs!==0&&(Rs=0)}function _2(s,l){for(var d=s.suspendedLanes,m=s.pingedLanes,w=s.expirationTimes,k=s.pendingLanes&-62914561;0<k;){var P=31-Ne(k),q=1<<P,Q=w[P];Q===-1?((q&d)===0||(q&m)!==0)&&(w[P]=Pa(q,l)):Q<=l&&(s.expiredLanes|=q),k&=~q}if(l=Yt,d=St,d=yn(s,s===l?d:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),m=s.callbackNode,d===0||s===l&&(Lt===2||Lt===9)||s.cancelPendingCommit!==null)return m!==null&&m!==null&&ae(m),s.callbackNode=null,s.callbackPriority=0;if((d&3)===0||Zr(s,d)){if(l=d&-d,l===s.callbackPriority)return l;switch(m!==null&&ae(m),ja(d)){case 2:case 8:d=Se;break;case 32:d=ke;break;case 268435456:d=Le;break;default:d=ke}return m=T2.bind(null,s),d=me(d,m),s.callbackPriority=l,s.callbackNode=d,l}return m!==null&&m!==null&&ae(m),s.callbackPriority=2,s.callbackNode=null,2}function T2(s,l){if(Cn!==0&&Cn!==5)return s.callbackNode=null,s.callbackPriority=0,null;var d=s.callbackNode;if(Bp()&&s.callbackNode!==d)return null;var m=St;return m=yn(s,s===Yt?m:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),m===0?null:(u2(s,m,l),_2(s,_e()),s.callbackNode!=null&&s.callbackNode===d?T2.bind(null,s):null)}function A2(s,l){if(Bp())return null;u2(s,l,!0)}function S5(){P5(function(){($t&6)!==0?me(ue,w5):R2()})}function Z0(){if(Rs===0){var s=Eu;s===0&&(s=Rt,Rt<<=1,(Rt&261888)===0&&(Rt=256)),Rs=s}return Rs}function D2(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:Qh(""+s)}function M2(s,l){var d=l.ownerDocument.createElement("input");return d.name=l.name,d.value=l.value,s.id&&d.setAttribute("form",s.id),l.parentNode.insertBefore(d,l),s=new FormData(s),d.parentNode.removeChild(d),s}function C5(s,l,d,m,w){if(l==="submit"&&d&&d.stateNode===w){var k=D2((w[In]||null).action),P=m.submitter;P&&(l=(l=P[In]||null)?D2(l.formAction):P.getAttribute("formAction"),l!==null&&(k=l,P=null));var q=new tp("action","action",null,m,w);s.push({event:q,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(Rs!==0){var Q=P?M2(w,P):new FormData(w);b0(d,{pending:!0,data:Q,method:w.method,action:k},null,Q)}}else typeof k=="function"&&(q.preventDefault(),Q=P?M2(w,P):new FormData(w),b0(d,{pending:!0,data:Q,method:w.method,action:k},k,Q))},currentTarget:w}]})}}for(var J0=0;J0<Nb.length;J0++){var ev=Nb[J0],E5=ev.toLowerCase(),k5=ev[0].toUpperCase()+ev.slice(1);_i(E5,"on"+k5)}_i(lk,"onAnimationEnd"),_i(uk,"onAnimationIteration"),_i(ck,"onAnimationStart"),_i("dblclick","onDoubleClick"),_i("focusin","onFocus"),_i("focusout","onBlur"),_i(Bz,"onTransitionRun"),_i(Uz,"onTransitionStart"),_i(Hz,"onTransitionCancel"),_i(fk,"onTransitionEnd"),cu("onMouseEnter",["mouseout","mouseover"]),cu("onMouseLeave",["mouseout","mouseover"]),cu("onPointerEnter",["pointerout","pointerover"]),cu("onPointerLeave",["pointerout","pointerover"]),Fa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Fa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Fa("onBeforeInput",["compositionend","keypress","textInput","paste"]),Fa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Fa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Fa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Zf="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(" "),R5=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Zf));function O2(s,l){l=(l&4)!==0;for(var d=0;d<s.length;d++){var m=s[d],w=m.event;m=m.listeners;e:{var k=void 0;if(l)for(var P=m.length-1;0<=P;P--){var q=m[P],Q=q.instance,de=q.currentTarget;if(q=q.listener,Q!==k&&w.isPropagationStopped())break e;k=q,w.currentTarget=de;try{k(w)}catch(be){ip(be)}w.currentTarget=null,k=Q}else for(P=0;P<m.length;P++){if(q=m[P],Q=q.instance,de=q.currentTarget,q=q.listener,Q!==k&&w.isPropagationStopped())break e;k=q,w.currentTarget=de;try{k(w)}catch(be){ip(be)}w.currentTarget=null,k=Q}}}}function bt(s,l){var d=l[su];d===void 0&&(d=l[su]=new Set);var m=s+"__bubble";d.has(m)||($2(l,s,2,!1),d.add(m))}function tv(s,l,d){var m=0;l&&(m|=4),$2(d,s,m,l)}var Gp="_reactListening"+Math.random().toString(36).slice(2);function nv(s){if(!s[Gp]){s[Gp]=!0,RE.forEach(function(d){d!=="selectionchange"&&(R5.has(d)||tv(d,!1,s),tv(d,!0,s))});var l=s.nodeType===9?s:s.ownerDocument;l===null||l[Gp]||(l[Gp]=!0,tv("selectionchange",!1,l))}}function $2(s,l,d,m){switch(l_(l)){case 2:var w=e8;break;case 8:w=t8;break;default:w=yv}d=w.bind(null,l,d,s),w=void 0,!Sb||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(w=!0),m?w!==void 0?s.addEventListener(l,d,{capture:!0,passive:w}):s.addEventListener(l,d,!0):w!==void 0?s.addEventListener(l,d,{passive:w}):s.addEventListener(l,d,!1)}function rv(s,l,d,m,w){var k=m;if((l&1)===0&&(l&2)===0&&m!==null)e:for(;;){if(m===null)return;var P=m.tag;if(P===3||P===4){var q=m.stateNode.containerInfo;if(q===w)break;if(P===4)for(P=m.return;P!==null;){var Q=P.tag;if((Q===3||Q===4)&&P.stateNode.containerInfo===w)return;P=P.return}for(;q!==null;){if(P=au(q),P===null)return;if(Q=P.tag,Q===5||Q===6||Q===26||Q===27){m=k=P;continue e}q=q.parentNode}}m=m.return}LE(function(){var de=k,be=xb(d),Ee=[];e:{var pe=dk.get(s);if(pe!==void 0){var ye=tp,Be=s;switch(s){case"keypress":if(Jh(d)===0)break e;case"keydown":case"keyup":ye=vz;break;case"focusin":Be="focus",ye=Rb;break;case"focusout":Be="blur",ye=Rb;break;case"beforeblur":case"afterblur":ye=Rb;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ye=BE;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ye=az;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ye=Sz;break;case lk:case uk:case ck:ye=cz;break;case fk:ye=Ez;break;case"scroll":case"scrollend":ye=oz;break;case"wheel":ye=Rz;break;case"copy":case"cut":case"paste":ye=dz;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ye=HE;break;case"toggle":case"beforetoggle":ye=Tz}var et=(l&4)!==0,Gt=!et&&(s==="scroll"||s==="scrollend"),se=et?pe!==null?pe+"Capture":null:pe;et=[];for(var ee=de,fe;ee!==null;){var we=ee;if(fe=we.stateNode,we=we.tag,we!==5&&we!==26&&we!==27||fe===null||se===null||(we=xf(ee,se),we!=null&&et.push(Jf(ee,we,fe))),Gt)break;ee=ee.return}0<et.length&&(pe=new ye(pe,Be,null,d,be),Ee.push({event:pe,listeners:et}))}}if((l&7)===0){e:{if(pe=s==="mouseover"||s==="pointerover",ye=s==="mouseout"||s==="pointerout",pe&&d!==vb&&(Be=d.relatedTarget||d.fromElement)&&(au(Be)||Be[fo]))break e;if((ye||pe)&&(pe=be.window===be?be:(pe=be.ownerDocument)?pe.defaultView||pe.parentWindow:window,ye?(Be=d.relatedTarget||d.toElement,ye=de,Be=Be?au(Be):null,Be!==null&&(Gt=o(Be),et=Be.tag,Be!==Gt||et!==5&&et!==27&&et!==6)&&(Be=null)):(ye=null,Be=de),ye!==Be)){if(et=BE,we="onMouseLeave",se="onMouseEnter",ee="mouse",(s==="pointerout"||s==="pointerover")&&(et=HE,we="onPointerLeave",se="onPointerEnter",ee="pointer"),Gt=ye==null?pe:vf(ye),fe=Be==null?pe:vf(Be),pe=new et(we,ee+"leave",ye,d,be),pe.target=Gt,pe.relatedTarget=fe,we=null,au(be)===de&&(et=new et(se,ee+"enter",Be,d,be),et.target=fe,et.relatedTarget=Gt,we=et),Gt=we,ye&&Be)t:{for(et=_5,se=ye,ee=Be,fe=0,we=se;we;we=et(we))fe++;we=0;for(var Ze=ee;Ze;Ze=et(Ze))we++;for(;0<fe-we;)se=et(se),fe--;for(;0<we-fe;)ee=et(ee),we--;for(;fe--;){if(se===ee||ee!==null&&se===ee.alternate){et=se;break t}se=et(se),ee=et(ee)}et=null}else et=null;ye!==null&&P2(Ee,pe,ye,et,!1),Be!==null&&Gt!==null&&P2(Ee,Gt,Be,et,!0)}}e:{if(pe=de?vf(de):window,ye=pe.nodeName&&pe.nodeName.toLowerCase(),ye==="select"||ye==="input"&&pe.type==="file")var At=QE;else if(KE(pe))if(ZE)At=Lz;else{At=Iz;var qe=Nz}else ye=pe.nodeName,!ye||ye.toLowerCase()!=="input"||pe.type!=="checkbox"&&pe.type!=="radio"?de&&bb(de.elementType)&&(At=QE):At=jz;if(At&&(At=At(s,de))){XE(Ee,At,d,be);break e}qe&&qe(s,pe,de),s==="focusout"&&de&&pe.type==="number"&&de.memoizedProps.value!=null&&yb(pe,"number",pe.value)}switch(qe=de?vf(de):window,s){case"focusin":(KE(qe)||qe.contentEditable==="true")&&(gu=qe,Ob=de,Tf=null);break;case"focusout":Tf=Ob=gu=null;break;case"mousedown":$b=!0;break;case"contextmenu":case"mouseup":case"dragend":$b=!1,sk(Ee,d,be);break;case"selectionchange":if(zz)break;case"keydown":case"keyup":sk(Ee,d,be)}var at;if(Tb)e:{switch(s){case"compositionstart":var Ct="onCompositionStart";break e;case"compositionend":Ct="onCompositionEnd";break e;case"compositionupdate":Ct="onCompositionUpdate";break e}Ct=void 0}else mu?YE(s,d)&&(Ct="onCompositionEnd"):s==="keydown"&&d.keyCode===229&&(Ct="onCompositionStart");Ct&&(GE&&d.locale!=="ko"&&(mu||Ct!=="onCompositionStart"?Ct==="onCompositionEnd"&&mu&&(at=FE()):(cs=be,Cb="value"in cs?cs.value:cs.textContent,mu=!0)),qe=qp(de,Ct),0<qe.length&&(Ct=new UE(Ct,s,null,d,be),Ee.push({event:Ct,listeners:qe}),at?Ct.data=at:(at=WE(d),at!==null&&(Ct.data=at)))),(at=Dz?Mz(s,d):Oz(s,d))&&(Ct=qp(de,"onBeforeInput"),0<Ct.length&&(qe=new UE("onBeforeInput","beforeinput",null,d,be),Ee.push({event:qe,listeners:Ct}),qe.data=at)),C5(Ee,s,de,d,be)}O2(Ee,l)})}function Jf(s,l,d){return{instance:s,listener:l,currentTarget:d}}function qp(s,l){for(var d=l+"Capture",m=[];s!==null;){var w=s,k=w.stateNode;if(w=w.tag,w!==5&&w!==26&&w!==27||k===null||(w=xf(s,d),w!=null&&m.unshift(Jf(s,w,k)),w=xf(s,l),w!=null&&m.push(Jf(s,w,k))),s.tag===3)return m;s=s.return}return[]}function _5(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function P2(s,l,d,m,w){for(var k=l._reactName,P=[];d!==null&&d!==m;){var q=d,Q=q.alternate,de=q.stateNode;if(q=q.tag,Q!==null&&Q===m)break;q!==5&&q!==26&&q!==27||de===null||(Q=de,w?(de=xf(d,k),de!=null&&P.unshift(Jf(d,de,Q))):w||(de=xf(d,k),de!=null&&P.push(Jf(d,de,Q)))),d=d.return}P.length!==0&&s.push({event:l,listeners:P})}var T5=/\r\n?/g,A5=/\u0000|\uFFFD/g;function N2(s){return(typeof s=="string"?s:""+s).replace(T5,`
50
+ `).replace(A5,"")}function I2(s,l){return l=N2(l),N2(s)===l}function Ht(s,l,d,m,w,k){switch(d){case"children":typeof m=="string"?l==="body"||l==="textarea"&&m===""||du(s,m):(typeof m=="number"||typeof m=="bigint")&&l!=="body"&&du(s,""+m);break;case"className":Kh(s,"class",m);break;case"tabIndex":Kh(s,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":Kh(s,d,m);break;case"style":IE(s,m,k);break;case"data":if(l!=="object"){Kh(s,"data",m);break}case"src":case"href":if(m===""&&(l!=="a"||d!=="href")){s.removeAttribute(d);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){s.removeAttribute(d);break}m=Qh(""+m),s.setAttribute(d,m);break;case"action":case"formAction":if(typeof m=="function"){s.setAttribute(d,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof k=="function"&&(d==="formAction"?(l!=="input"&&Ht(s,l,"name",w.name,w,null),Ht(s,l,"formEncType",w.formEncType,w,null),Ht(s,l,"formMethod",w.formMethod,w,null),Ht(s,l,"formTarget",w.formTarget,w,null)):(Ht(s,l,"encType",w.encType,w,null),Ht(s,l,"method",w.method,w,null),Ht(s,l,"target",w.target,w,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){s.removeAttribute(d);break}m=Qh(""+m),s.setAttribute(d,m);break;case"onClick":m!=null&&(s.onclick=po);break;case"onScroll":m!=null&&bt("scroll",s);break;case"onScrollEnd":m!=null&&bt("scrollend",s);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(r(61));if(d=m.__html,d!=null){if(w.children!=null)throw Error(r(60));s.innerHTML=d}}break;case"multiple":s.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":s.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){s.removeAttribute("xlink:href");break}d=Qh(""+m),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?s.setAttribute(d,""+m):s.removeAttribute(d);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":m&&typeof m!="function"&&typeof m!="symbol"?s.setAttribute(d,""):s.removeAttribute(d);break;case"capture":case"download":m===!0?s.setAttribute(d,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?s.setAttribute(d,m):s.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?s.setAttribute(d,m):s.removeAttribute(d);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?s.removeAttribute(d):s.setAttribute(d,m);break;case"popover":bt("beforetoggle",s),bt("toggle",s),Wh(s,"popover",m);break;case"xlinkActuate":ho(s,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":ho(s,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":ho(s,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":ho(s,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":ho(s,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":ho(s,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":ho(s,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":ho(s,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":ho(s,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":Wh(s,"is",m);break;case"innerText":case"textContent":break;default:(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(d=rz.get(d)||d,Wh(s,d,m))}}function iv(s,l,d,m,w,k){switch(d){case"style":IE(s,m,k);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(r(61));if(d=m.__html,d!=null){if(w.children!=null)throw Error(r(60));s.innerHTML=d}}break;case"children":typeof m=="string"?du(s,m):(typeof m=="number"||typeof m=="bigint")&&du(s,""+m);break;case"onScroll":m!=null&&bt("scroll",s);break;case"onScrollEnd":m!=null&&bt("scrollend",s);break;case"onClick":m!=null&&(s.onclick=po);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!_E.hasOwnProperty(d))e:{if(d[0]==="o"&&d[1]==="n"&&(w=d.endsWith("Capture"),l=d.slice(2,w?d.length-7:void 0),k=s[In]||null,k=k!=null?k[d]:null,typeof k=="function"&&s.removeEventListener(l,k,w),typeof m=="function")){typeof k!="function"&&k!==null&&(d in s?s[d]=null:s.hasAttribute(d)&&s.removeAttribute(d)),s.addEventListener(l,m,w);break e}d in s?s[d]=m:m===!0?s.setAttribute(d,""):Wh(s,d,m)}}}function zn(s,l,d){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":bt("error",s),bt("load",s);var m=!1,w=!1,k;for(k in d)if(d.hasOwnProperty(k)){var P=d[k];if(P!=null)switch(k){case"src":m=!0;break;case"srcSet":w=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:Ht(s,l,k,P,d,null)}}w&&Ht(s,l,"srcSet",d.srcSet,d,null),m&&Ht(s,l,"src",d.src,d,null);return;case"input":bt("invalid",s);var q=k=P=w=null,Q=null,de=null;for(m in d)if(d.hasOwnProperty(m)){var be=d[m];if(be!=null)switch(m){case"name":w=be;break;case"type":P=be;break;case"checked":Q=be;break;case"defaultChecked":de=be;break;case"value":k=be;break;case"defaultValue":q=be;break;case"children":case"dangerouslySetInnerHTML":if(be!=null)throw Error(r(137,l));break;default:Ht(s,l,m,be,d,null)}}OE(s,k,q,Q,de,P,w,!1);return;case"select":bt("invalid",s),m=P=k=null;for(w in d)if(d.hasOwnProperty(w)&&(q=d[w],q!=null))switch(w){case"value":k=q;break;case"defaultValue":P=q;break;case"multiple":m=q;default:Ht(s,l,w,q,d,null)}l=k,d=P,s.multiple=!!m,l!=null?fu(s,!!m,l,!1):d!=null&&fu(s,!!m,d,!0);return;case"textarea":bt("invalid",s),k=w=m=null;for(P in d)if(d.hasOwnProperty(P)&&(q=d[P],q!=null))switch(P){case"value":m=q;break;case"defaultValue":w=q;break;case"children":k=q;break;case"dangerouslySetInnerHTML":if(q!=null)throw Error(r(91));break;default:Ht(s,l,P,q,d,null)}PE(s,m,w,k);return;case"option":for(Q in d)if(d.hasOwnProperty(Q)&&(m=d[Q],m!=null))switch(Q){case"selected":s.selected=m&&typeof m!="function"&&typeof m!="symbol";break;default:Ht(s,l,Q,m,d,null)}return;case"dialog":bt("beforetoggle",s),bt("toggle",s),bt("cancel",s),bt("close",s);break;case"iframe":case"object":bt("load",s);break;case"video":case"audio":for(m=0;m<Zf.length;m++)bt(Zf[m],s);break;case"image":bt("error",s),bt("load",s);break;case"details":bt("toggle",s);break;case"embed":case"source":case"link":bt("error",s),bt("load",s);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(de in d)if(d.hasOwnProperty(de)&&(m=d[de],m!=null))switch(de){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:Ht(s,l,de,m,d,null)}return;default:if(bb(l)){for(be in d)d.hasOwnProperty(be)&&(m=d[be],m!==void 0&&iv(s,l,be,m,d,void 0));return}}for(q in d)d.hasOwnProperty(q)&&(m=d[q],m!=null&&Ht(s,l,q,m,d,null))}function D5(s,l,d,m){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var w=null,k=null,P=null,q=null,Q=null,de=null,be=null;for(ye in d){var Ee=d[ye];if(d.hasOwnProperty(ye)&&Ee!=null)switch(ye){case"checked":break;case"value":break;case"defaultValue":Q=Ee;default:m.hasOwnProperty(ye)||Ht(s,l,ye,null,m,Ee)}}for(var pe in m){var ye=m[pe];if(Ee=d[pe],m.hasOwnProperty(pe)&&(ye!=null||Ee!=null))switch(pe){case"type":k=ye;break;case"name":w=ye;break;case"checked":de=ye;break;case"defaultChecked":be=ye;break;case"value":P=ye;break;case"defaultValue":q=ye;break;case"children":case"dangerouslySetInnerHTML":if(ye!=null)throw Error(r(137,l));break;default:ye!==Ee&&Ht(s,l,pe,ye,m,Ee)}}gb(s,P,q,Q,de,be,k,w);return;case"select":ye=P=q=pe=null;for(k in d)if(Q=d[k],d.hasOwnProperty(k)&&Q!=null)switch(k){case"value":break;case"multiple":ye=Q;default:m.hasOwnProperty(k)||Ht(s,l,k,null,m,Q)}for(w in m)if(k=m[w],Q=d[w],m.hasOwnProperty(w)&&(k!=null||Q!=null))switch(w){case"value":pe=k;break;case"defaultValue":q=k;break;case"multiple":P=k;default:k!==Q&&Ht(s,l,w,k,m,Q)}l=q,d=P,m=ye,pe!=null?fu(s,!!d,pe,!1):!!m!=!!d&&(l!=null?fu(s,!!d,l,!0):fu(s,!!d,d?[]:"",!1));return;case"textarea":ye=pe=null;for(q in d)if(w=d[q],d.hasOwnProperty(q)&&w!=null&&!m.hasOwnProperty(q))switch(q){case"value":break;case"children":break;default:Ht(s,l,q,null,m,w)}for(P in m)if(w=m[P],k=d[P],m.hasOwnProperty(P)&&(w!=null||k!=null))switch(P){case"value":pe=w;break;case"defaultValue":ye=w;break;case"children":break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(r(91));break;default:w!==k&&Ht(s,l,P,w,m,k)}$E(s,pe,ye);return;case"option":for(var Be in d)if(pe=d[Be],d.hasOwnProperty(Be)&&pe!=null&&!m.hasOwnProperty(Be))switch(Be){case"selected":s.selected=!1;break;default:Ht(s,l,Be,null,m,pe)}for(Q in m)if(pe=m[Q],ye=d[Q],m.hasOwnProperty(Q)&&pe!==ye&&(pe!=null||ye!=null))switch(Q){case"selected":s.selected=pe&&typeof pe!="function"&&typeof pe!="symbol";break;default:Ht(s,l,Q,pe,m,ye)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var et in d)pe=d[et],d.hasOwnProperty(et)&&pe!=null&&!m.hasOwnProperty(et)&&Ht(s,l,et,null,m,pe);for(de in m)if(pe=m[de],ye=d[de],m.hasOwnProperty(de)&&pe!==ye&&(pe!=null||ye!=null))switch(de){case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(r(137,l));break;default:Ht(s,l,de,pe,m,ye)}return;default:if(bb(l)){for(var Gt in d)pe=d[Gt],d.hasOwnProperty(Gt)&&pe!==void 0&&!m.hasOwnProperty(Gt)&&iv(s,l,Gt,void 0,m,pe);for(be in m)pe=m[be],ye=d[be],!m.hasOwnProperty(be)||pe===ye||pe===void 0&&ye===void 0||iv(s,l,be,pe,m,ye);return}}for(var se in d)pe=d[se],d.hasOwnProperty(se)&&pe!=null&&!m.hasOwnProperty(se)&&Ht(s,l,se,null,m,pe);for(Ee in m)pe=m[Ee],ye=d[Ee],!m.hasOwnProperty(Ee)||pe===ye||pe==null&&ye==null||Ht(s,l,Ee,pe,m,ye)}function j2(s){switch(s){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function M5(){if(typeof performance.getEntriesByType=="function"){for(var s=0,l=0,d=performance.getEntriesByType("resource"),m=0;m<d.length;m++){var w=d[m],k=w.transferSize,P=w.initiatorType,q=w.duration;if(k&&q&&j2(P)){for(P=0,q=w.responseEnd,m+=1;m<d.length;m++){var Q=d[m],de=Q.startTime;if(de>q)break;var be=Q.transferSize,Ee=Q.initiatorType;be&&j2(Ee)&&(Q=Q.responseEnd,P+=be*(Q<q?1:(q-de)/(Q-de)))}if(--m,l+=8*(k+P)/(w.duration/1e3),s++,10<s)break}}if(0<s)return l/s/1e6}return navigator.connection&&(s=navigator.connection.downlink,typeof s=="number")?s:5}var ov=null,sv=null;function Vp(s){return s.nodeType===9?s:s.ownerDocument}function L2(s){switch(s){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function F2(s,l){if(s===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return s===1&&l==="foreignObject"?0:s}function av(s,l){return s==="textarea"||s==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var lv=null;function O5(){var s=window.event;return s&&s.type==="popstate"?s===lv?!1:(lv=s,!0):(lv=null,!1)}var z2=typeof setTimeout=="function"?setTimeout:void 0,$5=typeof clearTimeout=="function"?clearTimeout:void 0,B2=typeof Promise=="function"?Promise:void 0,P5=typeof queueMicrotask=="function"?queueMicrotask:typeof B2<"u"?function(s){return B2.resolve(null).then(s).catch(N5)}:z2;function N5(s){setTimeout(function(){throw s})}function _s(s){return s==="head"}function U2(s,l){var d=l,m=0;do{var w=d.nextSibling;if(s.removeChild(d),w&&w.nodeType===8)if(d=w.data,d==="/$"||d==="/&"){if(m===0){s.removeChild(w),Hu(l);return}m--}else if(d==="$"||d==="$?"||d==="$~"||d==="$!"||d==="&")m++;else if(d==="html")ed(s.ownerDocument.documentElement);else if(d==="head"){d=s.ownerDocument.head,ed(d);for(var k=d.firstChild;k;){var P=k.nextSibling,q=k.nodeName;k[bf]||q==="SCRIPT"||q==="STYLE"||q==="LINK"&&k.rel.toLowerCase()==="stylesheet"||d.removeChild(k),k=P}}else d==="body"&&ed(s.ownerDocument.body);d=w}while(d);Hu(l)}function H2(s,l){var d=s;s=0;do{var m=d.nextSibling;if(d.nodeType===1?l?(d._stashedDisplay=d.style.display,d.style.display="none"):(d.style.display=d._stashedDisplay||"",d.getAttribute("style")===""&&d.removeAttribute("style")):d.nodeType===3&&(l?(d._stashedText=d.nodeValue,d.nodeValue=""):d.nodeValue=d._stashedText||""),m&&m.nodeType===8)if(d=m.data,d==="/$"){if(s===0)break;s--}else d!=="$"&&d!=="$?"&&d!=="$~"&&d!=="$!"||s++;d=m}while(d)}function uv(s){var l=s.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var d=l;switch(l=l.nextSibling,d.nodeName){case"HTML":case"HEAD":case"BODY":uv(d),pb(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}s.removeChild(d)}}function I5(s,l,d,m){for(;s.nodeType===1;){var w=d;if(s.nodeName.toLowerCase()!==l.toLowerCase()){if(!m&&(s.nodeName!=="INPUT"||s.type!=="hidden"))break}else if(m){if(!s[bf])switch(l){case"meta":if(!s.hasAttribute("itemprop"))break;return s;case"link":if(k=s.getAttribute("rel"),k==="stylesheet"&&s.hasAttribute("data-precedence"))break;if(k!==w.rel||s.getAttribute("href")!==(w.href==null||w.href===""?null:w.href)||s.getAttribute("crossorigin")!==(w.crossOrigin==null?null:w.crossOrigin)||s.getAttribute("title")!==(w.title==null?null:w.title))break;return s;case"style":if(s.hasAttribute("data-precedence"))break;return s;case"script":if(k=s.getAttribute("src"),(k!==(w.src==null?null:w.src)||s.getAttribute("type")!==(w.type==null?null:w.type)||s.getAttribute("crossorigin")!==(w.crossOrigin==null?null:w.crossOrigin))&&k&&s.hasAttribute("async")&&!s.hasAttribute("itemprop"))break;return s;default:return s}}else if(l==="input"&&s.type==="hidden"){var k=w.name==null?null:""+w.name;if(w.type==="hidden"&&s.getAttribute("name")===k)return s}else return s;if(s=ai(s.nextSibling),s===null)break}return null}function j5(s,l,d){if(l==="")return null;for(;s.nodeType!==3;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!d||(s=ai(s.nextSibling),s===null))return null;return s}function G2(s,l){for(;s.nodeType!==8;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!l||(s=ai(s.nextSibling),s===null))return null;return s}function cv(s){return s.data==="$?"||s.data==="$~"}function fv(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function L5(s,l){var d=s.ownerDocument;if(s.data==="$~")s._reactRetry=l;else if(s.data!=="$?"||d.readyState!=="loading")l();else{var m=function(){l(),d.removeEventListener("DOMContentLoaded",m)};d.addEventListener("DOMContentLoaded",m),s._reactRetry=m}}function ai(s){for(;s!=null;s=s.nextSibling){var l=s.nodeType;if(l===1||l===3)break;if(l===8){if(l=s.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return s}var dv=null;function q2(s){s=s.nextSibling;for(var l=0;s;){if(s.nodeType===8){var d=s.data;if(d==="/$"||d==="/&"){if(l===0)return ai(s.nextSibling);l--}else d!=="$"&&d!=="$!"&&d!=="$?"&&d!=="$~"&&d!=="&"||l++}s=s.nextSibling}return null}function V2(s){s=s.previousSibling;for(var l=0;s;){if(s.nodeType===8){var d=s.data;if(d==="$"||d==="$!"||d==="$?"||d==="$~"||d==="&"){if(l===0)return s;l--}else d!=="/$"&&d!=="/&"||l++}s=s.previousSibling}return null}function Y2(s,l,d){switch(l=Vp(d),s){case"html":if(s=l.documentElement,!s)throw Error(r(452));return s;case"head":if(s=l.head,!s)throw Error(r(453));return s;case"body":if(s=l.body,!s)throw Error(r(454));return s;default:throw Error(r(451))}}function ed(s){for(var l=s.attributes;l.length;)s.removeAttributeNode(l[0]);pb(s)}var li=new Map,W2=new Set;function Yp(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var Do=U.d;U.d={f:F5,r:z5,D:B5,C:U5,L:H5,m:G5,X:V5,S:q5,M:Y5};function F5(){var s=Do.f(),l=Lp();return s||l}function z5(s){var l=lu(s);l!==null&&l.tag===5&&l.type==="form"?fR(l):Do.r(s)}var zu=typeof document>"u"?null:document;function K2(s,l,d){var m=zu;if(m&&typeof l=="string"&&l){var w=ei(l);w='link[rel="'+s+'"][href="'+w+'"]',typeof d=="string"&&(w+='[crossorigin="'+d+'"]'),W2.has(w)||(W2.add(w),s={rel:s,crossOrigin:d,href:l},m.querySelector(w)===null&&(l=m.createElement("link"),zn(l,"link",s),Dn(l),m.head.appendChild(l)))}}function B5(s){Do.D(s),K2("dns-prefetch",s,null)}function U5(s,l){Do.C(s,l),K2("preconnect",s,l)}function H5(s,l,d){Do.L(s,l,d);var m=zu;if(m&&s&&l){var w='link[rel="preload"][as="'+ei(l)+'"]';l==="image"&&d&&d.imageSrcSet?(w+='[imagesrcset="'+ei(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(w+='[imagesizes="'+ei(d.imageSizes)+'"]')):w+='[href="'+ei(s)+'"]';var k=w;switch(l){case"style":k=Bu(s);break;case"script":k=Uu(s)}li.has(k)||(s=p({rel:"preload",href:l==="image"&&d&&d.imageSrcSet?void 0:s,as:l},d),li.set(k,s),m.querySelector(w)!==null||l==="style"&&m.querySelector(td(k))||l==="script"&&m.querySelector(nd(k))||(l=m.createElement("link"),zn(l,"link",s),Dn(l),m.head.appendChild(l)))}}function G5(s,l){Do.m(s,l);var d=zu;if(d&&s){var m=l&&typeof l.as=="string"?l.as:"script",w='link[rel="modulepreload"][as="'+ei(m)+'"][href="'+ei(s)+'"]',k=w;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":k=Uu(s)}if(!li.has(k)&&(s=p({rel:"modulepreload",href:s},l),li.set(k,s),d.querySelector(w)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(nd(k)))return}m=d.createElement("link"),zn(m,"link",s),Dn(m),d.head.appendChild(m)}}}function q5(s,l,d){Do.S(s,l,d);var m=zu;if(m&&s){var w=uu(m).hoistableStyles,k=Bu(s);l=l||"default";var P=w.get(k);if(!P){var q={loading:0,preload:null};if(P=m.querySelector(td(k)))q.loading=5;else{s=p({rel:"stylesheet",href:s,"data-precedence":l},d),(d=li.get(k))&&hv(s,d);var Q=P=m.createElement("link");Dn(Q),zn(Q,"link",s),Q._p=new Promise(function(de,be){Q.onload=de,Q.onerror=be}),Q.addEventListener("load",function(){q.loading|=1}),Q.addEventListener("error",function(){q.loading|=2}),q.loading|=4,Wp(P,l,m)}P={type:"stylesheet",instance:P,count:1,state:q},w.set(k,P)}}}function V5(s,l){Do.X(s,l);var d=zu;if(d&&s){var m=uu(d).hoistableScripts,w=Uu(s),k=m.get(w);k||(k=d.querySelector(nd(w)),k||(s=p({src:s,async:!0},l),(l=li.get(w))&&pv(s,l),k=d.createElement("script"),Dn(k),zn(k,"link",s),d.head.appendChild(k)),k={type:"script",instance:k,count:1,state:null},m.set(w,k))}}function Y5(s,l){Do.M(s,l);var d=zu;if(d&&s){var m=uu(d).hoistableScripts,w=Uu(s),k=m.get(w);k||(k=d.querySelector(nd(w)),k||(s=p({src:s,async:!0,type:"module"},l),(l=li.get(w))&&pv(s,l),k=d.createElement("script"),Dn(k),zn(k,"link",s),d.head.appendChild(k)),k={type:"script",instance:k,count:1,state:null},m.set(w,k))}}function X2(s,l,d,m){var w=(w=he.current)?Yp(w):null;if(!w)throw Error(r(446));switch(s){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(l=Bu(d.href),d=uu(w).hoistableStyles,m=d.get(l),m||(m={type:"style",instance:null,count:0,state:null},d.set(l,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(d.rel==="stylesheet"&&typeof d.href=="string"&&typeof d.precedence=="string"){s=Bu(d.href);var k=uu(w).hoistableStyles,P=k.get(s);if(P||(w=w.ownerDocument||w,P={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},k.set(s,P),(k=w.querySelector(td(s)))&&!k._p&&(P.instance=k,P.state.loading=5),li.has(s)||(d={rel:"preload",as:"style",href:d.href,crossOrigin:d.crossOrigin,integrity:d.integrity,media:d.media,hrefLang:d.hrefLang,referrerPolicy:d.referrerPolicy},li.set(s,d),k||W5(w,s,d,P.state))),l&&m===null)throw Error(r(528,""));return P}if(l&&m!==null)throw Error(r(529,""));return null;case"script":return l=d.async,d=d.src,typeof d=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=Uu(d),d=uu(w).hoistableScripts,m=d.get(l),m||(m={type:"script",instance:null,count:0,state:null},d.set(l,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,s))}}function Bu(s){return'href="'+ei(s)+'"'}function td(s){return'link[rel="stylesheet"]['+s+"]"}function Q2(s){return p({},s,{"data-precedence":s.precedence,precedence:null})}function W5(s,l,d,m){s.querySelector('link[rel="preload"][as="style"]['+l+"]")?m.loading=1:(l=s.createElement("link"),m.preload=l,l.addEventListener("load",function(){return m.loading|=1}),l.addEventListener("error",function(){return m.loading|=2}),zn(l,"link",d),Dn(l),s.head.appendChild(l))}function Uu(s){return'[src="'+ei(s)+'"]'}function nd(s){return"script[async]"+s}function Z2(s,l,d){if(l.count++,l.instance===null)switch(l.type){case"style":var m=s.querySelector('style[data-href~="'+ei(d.href)+'"]');if(m)return l.instance=m,Dn(m),m;var w=p({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return m=(s.ownerDocument||s).createElement("style"),Dn(m),zn(m,"style",w),Wp(m,d.precedence,s),l.instance=m;case"stylesheet":w=Bu(d.href);var k=s.querySelector(td(w));if(k)return l.state.loading|=4,l.instance=k,Dn(k),k;m=Q2(d),(w=li.get(w))&&hv(m,w),k=(s.ownerDocument||s).createElement("link"),Dn(k);var P=k;return P._p=new Promise(function(q,Q){P.onload=q,P.onerror=Q}),zn(k,"link",m),l.state.loading|=4,Wp(k,d.precedence,s),l.instance=k;case"script":return k=Uu(d.src),(w=s.querySelector(nd(k)))?(l.instance=w,Dn(w),w):(m=d,(w=li.get(k))&&(m=p({},d),pv(m,w)),s=s.ownerDocument||s,w=s.createElement("script"),Dn(w),zn(w,"link",m),s.head.appendChild(w),l.instance=w);case"void":return null;default:throw Error(r(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(m=l.instance,l.state.loading|=4,Wp(m,d.precedence,s));return l.instance}function Wp(s,l,d){for(var m=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),w=m.length?m[m.length-1]:null,k=w,P=0;P<m.length;P++){var q=m[P];if(q.dataset.precedence===l)k=q;else if(k!==w)break}k?k.parentNode.insertBefore(s,k.nextSibling):(l=d.nodeType===9?d.head:d,l.insertBefore(s,l.firstChild))}function hv(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.title==null&&(s.title=l.title)}function pv(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.integrity==null&&(s.integrity=l.integrity)}var Kp=null;function J2(s,l,d){if(Kp===null){var m=new Map,w=Kp=new Map;w.set(d,m)}else w=Kp,m=w.get(d),m||(m=new Map,w.set(d,m));if(m.has(s))return m;for(m.set(s,null),d=d.getElementsByTagName(s),w=0;w<d.length;w++){var k=d[w];if(!(k[bf]||k[on]||s==="link"&&k.getAttribute("rel")==="stylesheet")&&k.namespaceURI!=="http://www.w3.org/2000/svg"){var P=k.getAttribute(l)||"";P=s+P;var q=m.get(P);q?q.push(k):m.set(P,[k])}}return m}function e_(s,l,d){s=s.ownerDocument||s,s.head.insertBefore(d,l==="title"?s.querySelector("head > title"):null)}function K5(s,l,d){if(d===1||l.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return s=l.disabled,typeof l.precedence=="string"&&s==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function t_(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function X5(s,l,d,m){if(d.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(d.state.loading&4)===0){if(d.instance===null){var w=Bu(m.href),k=l.querySelector(td(w));if(k){l=k._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(s.count++,s=Xp.bind(s),l.then(s,s)),d.state.loading|=4,d.instance=k,Dn(k);return}k=l.ownerDocument||l,m=Q2(m),(w=li.get(w))&&hv(m,w),k=k.createElement("link"),Dn(k);var P=k;P._p=new Promise(function(q,Q){P.onload=q,P.onerror=Q}),zn(k,"link",m),d.instance=k}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(d,l),(l=d.state.preload)&&(d.state.loading&3)===0&&(s.count++,d=Xp.bind(s),l.addEventListener("load",d),l.addEventListener("error",d))}}var mv=0;function Q5(s,l){return s.stylesheets&&s.count===0&&Zp(s,s.stylesheets),0<s.count||0<s.imgCount?function(d){var m=setTimeout(function(){if(s.stylesheets&&Zp(s,s.stylesheets),s.unsuspend){var k=s.unsuspend;s.unsuspend=null,k()}},6e4+l);0<s.imgBytes&&mv===0&&(mv=62500*M5());var w=setTimeout(function(){if(s.waitingForImages=!1,s.count===0&&(s.stylesheets&&Zp(s,s.stylesheets),s.unsuspend)){var k=s.unsuspend;s.unsuspend=null,k()}},(s.imgBytes>mv?50:800)+l);return s.unsuspend=d,function(){s.unsuspend=null,clearTimeout(m),clearTimeout(w)}}:null}function Xp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Zp(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var Qp=null;function Zp(s,l){s.stylesheets=null,s.unsuspend!==null&&(s.count++,Qp=new Map,l.forEach(Z5,s),Qp=null,Xp.call(s))}function Z5(s,l){if(!(l.state.loading&4)){var d=Qp.get(s);if(d)var m=d.get(null);else{d=new Map,Qp.set(s,d);for(var w=s.querySelectorAll("link[data-precedence],style[data-precedence]"),k=0;k<w.length;k++){var P=w[k];(P.nodeName==="LINK"||P.getAttribute("media")!=="not all")&&(d.set(P.dataset.precedence,P),m=P)}m&&d.set(null,m)}w=l.instance,P=w.getAttribute("data-precedence"),k=d.get(P)||m,k===m&&d.set(null,w),d.set(P,w),this.count++,m=Xp.bind(this),w.addEventListener("load",m),w.addEventListener("error",m),k?k.parentNode.insertBefore(w,k.nextSibling):(s=s.nodeType===9?s.head:s,s.insertBefore(w,s.firstChild)),l.state.loading|=4}}var rd={$$typeof:R,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function J5(s,l,d,m,w,k,P,q,Q){this.tag=1,this.containerInfo=s,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Na(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Na(0),this.hiddenUpdates=Na(null),this.identifierPrefix=m,this.onUncaughtError=w,this.onCaughtError=k,this.onRecoverableError=P,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.incompleteTransitions=new Map}function n_(s,l,d,m,w,k,P,q,Q,de,be,Ee){return s=new J5(s,l,d,P,Q,de,be,Ee,q),l=1,k===!0&&(l|=24),k=$r(3,null,null,l),s.current=k,k.stateNode=s,l=Wb(),l.refCount++,s.pooledCache=l,l.refCount++,k.memoizedState={element:m,isDehydrated:d,cache:l},Zb(k),s}function r_(s){return s?(s=vu,s):vu}function i_(s,l,d,m,w,k){w=r_(w),m.context===null?m.context=w:m.pendingContext=w,m=gs(l),m.payload={element:d},k=k===void 0?null:k,k!==null&&(m.callback=k),d=ys(s,m,l),d!==null&&(yr(d,s,l),Nf(d,s,l))}function o_(s,l){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var d=s.retryLane;s.retryLane=d!==0&&d<l?d:l}}function gv(s,l){o_(s,l),(s=s.alternate)&&o_(s,l)}function s_(s){if(s.tag===13||s.tag===31){var l=Ha(s,67108864);l!==null&&yr(l,s,67108864),gv(s,67108864)}}function a_(s){if(s.tag===13||s.tag===31){var l=Lr();l=Ia(l);var d=Ha(s,l);d!==null&&yr(d,s,l),gv(s,l)}}var Jp=!0;function e8(s,l,d,m){var w=F.T;F.T=null;var k=U.p;try{U.p=2,yv(s,l,d,m)}finally{U.p=k,F.T=w}}function t8(s,l,d,m){var w=F.T;F.T=null;var k=U.p;try{U.p=8,yv(s,l,d,m)}finally{U.p=k,F.T=w}}function yv(s,l,d,m){if(Jp){var w=bv(m);if(w===null)rv(s,l,m,em,d),u_(s,m);else if(r8(w,s,l,d,m))m.stopPropagation();else if(u_(s,m),l&4&&-1<n8.indexOf(s)){for(;w!==null;){var k=lu(w);if(k!==null)switch(k.tag){case 3:if(k=k.stateNode,k.current.memoizedState.isDehydrated){var P=tn(k.pendingLanes);if(P!==0){var q=k;for(q.pendingLanes|=2,q.entangledLanes|=2;P;){var Q=1<<31-Ne(P);q.entanglements[1]|=Q,P&=~Q}Vi(k),($t&6)===0&&(Ip=_e()+500,Qf(0))}}break;case 31:case 13:q=Ha(k,2),q!==null&&yr(q,k,2),Lp(),gv(k,2)}if(k=bv(m),k===null&&rv(s,l,m,em,d),k===w)break;w=k}w!==null&&m.stopPropagation()}else rv(s,l,m,null,d)}}function bv(s){return s=xb(s),vv(s)}var em=null;function vv(s){if(em=null,s=au(s),s!==null){var l=o(s);if(l===null)s=null;else{var d=l.tag;if(d===13){if(s=a(l),s!==null)return s;s=null}else if(d===31){if(s=u(l),s!==null)return s;s=null}else if(d===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;s=null}else l!==s&&(s=null)}}return em=s,null}function l_(s){switch(s){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(De()){case ue:return 2;case Se:return 8;case ke:case Pe:return 32;case Le:return 268435456;default:return 32}default:return 32}}var xv=!1,Ts=null,As=null,Ds=null,id=new Map,od=new Map,Ms=[],n8="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function u_(s,l){switch(s){case"focusin":case"focusout":Ts=null;break;case"dragenter":case"dragleave":As=null;break;case"mouseover":case"mouseout":Ds=null;break;case"pointerover":case"pointerout":id.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":od.delete(l.pointerId)}}function sd(s,l,d,m,w,k){return s===null||s.nativeEvent!==k?(s={blockedOn:l,domEventName:d,eventSystemFlags:m,nativeEvent:k,targetContainers:[w]},l!==null&&(l=lu(l),l!==null&&s_(l)),s):(s.eventSystemFlags|=m,l=s.targetContainers,w!==null&&l.indexOf(w)===-1&&l.push(w),s)}function r8(s,l,d,m,w){switch(l){case"focusin":return Ts=sd(Ts,s,l,d,m,w),!0;case"dragenter":return As=sd(As,s,l,d,m,w),!0;case"mouseover":return Ds=sd(Ds,s,l,d,m,w),!0;case"pointerover":var k=w.pointerId;return id.set(k,sd(id.get(k)||null,s,l,d,m,w)),!0;case"gotpointercapture":return k=w.pointerId,od.set(k,sd(od.get(k)||null,s,l,d,m,w)),!0}return!1}function c_(s){var l=au(s.target);if(l!==null){var d=o(l);if(d!==null){if(l=d.tag,l===13){if(l=a(d),l!==null){s.blockedOn=l,La(s.priority,function(){a_(d)});return}}else if(l===31){if(l=u(d),l!==null){s.blockedOn=l,La(s.priority,function(){a_(d)});return}}else if(l===3&&d.stateNode.current.memoizedState.isDehydrated){s.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}s.blockedOn=null}function tm(s){if(s.blockedOn!==null)return!1;for(var l=s.targetContainers;0<l.length;){var d=bv(s.nativeEvent);if(d===null){d=s.nativeEvent;var m=new d.constructor(d.type,d);vb=m,d.target.dispatchEvent(m),vb=null}else return l=lu(d),l!==null&&s_(l),s.blockedOn=d,!1;l.shift()}return!0}function f_(s,l,d){tm(s)&&d.delete(l)}function i8(){xv=!1,Ts!==null&&tm(Ts)&&(Ts=null),As!==null&&tm(As)&&(As=null),Ds!==null&&tm(Ds)&&(Ds=null),id.forEach(f_),od.forEach(f_)}function nm(s,l){s.blockedOn===l&&(s.blockedOn=null,xv||(xv=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,i8)))}var rm=null;function d_(s){rm!==s&&(rm=s,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){rm===s&&(rm=null);for(var l=0;l<s.length;l+=3){var d=s[l],m=s[l+1],w=s[l+2];if(typeof m!="function"){if(vv(m||d)===null)continue;break}var k=lu(d);k!==null&&(s.splice(l,3),l-=3,b0(k,{pending:!0,data:w,method:d.method,action:m},m,w))}}))}function Hu(s){function l(Q){return nm(Q,s)}Ts!==null&&nm(Ts,s),As!==null&&nm(As,s),Ds!==null&&nm(Ds,s),id.forEach(l),od.forEach(l);for(var d=0;d<Ms.length;d++){var m=Ms[d];m.blockedOn===s&&(m.blockedOn=null)}for(;0<Ms.length&&(d=Ms[0],d.blockedOn===null);)c_(d),d.blockedOn===null&&Ms.shift();if(d=(s.ownerDocument||s).$$reactFormReplay,d!=null)for(m=0;m<d.length;m+=3){var w=d[m],k=d[m+1],P=w[In]||null;if(typeof k=="function")P||d_(d);else if(P){var q=null;if(k&&k.hasAttribute("formAction")){if(w=k,P=k[In]||null)q=P.formAction;else if(vv(w)!==null)continue}else q=P.action;typeof q=="function"?d[m+1]=q:(d.splice(m,3),m-=3),d_(d)}}}function h_(){function s(k){k.canIntercept&&k.info==="react-transition"&&k.intercept({handler:function(){return new Promise(function(P){return w=P})},focusReset:"manual",scroll:"manual"})}function l(){w!==null&&(w(),w=null),m||setTimeout(d,20)}function d(){if(!m&&!navigation.transition){var k=navigation.currentEntry;k&&k.url!=null&&navigation.navigate(k.url,{state:k.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,w=null;return navigation.addEventListener("navigate",s),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(d,100),function(){m=!0,navigation.removeEventListener("navigate",s),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),w!==null&&(w(),w=null)}}}function wv(s){this._internalRoot=s}im.prototype.render=wv.prototype.render=function(s){var l=this._internalRoot;if(l===null)throw Error(r(409));var d=l.current,m=Lr();i_(d,m,s,l,null,null)},im.prototype.unmount=wv.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var l=s.containerInfo;i_(s.current,2,null,s,null,null),Lp(),l[fo]=null}};function im(s){this._internalRoot=s}im.prototype.unstable_scheduleHydration=function(s){if(s){var l=Ui();s={blockedOn:null,target:s,priority:l};for(var d=0;d<Ms.length&&l!==0&&l<Ms[d].priority;d++);Ms.splice(d,0,s),d===0&&c_(s)}};var p_=t.version;if(p_!=="19.2.5")throw Error(r(527,p_,"19.2.5"));U.findDOMNode=function(s){var l=s._reactInternals;if(l===void 0)throw typeof s.render=="function"?Error(r(188)):(s=Object.keys(s).join(","),Error(r(268,s)));return s=f(l),s=s!==null?h(s):null,s=s===null?null:s.stateNode,s};var o8={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:F,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var om=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!om.isDisabled&&om.supportsFiber)try{Ot=om.inject(o8),Me=om}catch{}}return ld.createRoot=function(s,l){if(!i(s))throw Error(r(299));var d=!1,m="",w=wR,k=SR,P=CR;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(m=l.identifierPrefix),l.onUncaughtError!==void 0&&(w=l.onUncaughtError),l.onCaughtError!==void 0&&(k=l.onCaughtError),l.onRecoverableError!==void 0&&(P=l.onRecoverableError)),l=n_(s,1,!1,null,null,d,m,null,w,k,P,h_),s[fo]=l.current,nv(s),new wv(l)},ld.hydrateRoot=function(s,l,d){if(!i(s))throw Error(r(299));var m=!1,w="",k=wR,P=SR,q=CR,Q=null;return d!=null&&(d.unstable_strictMode===!0&&(m=!0),d.identifierPrefix!==void 0&&(w=d.identifierPrefix),d.onUncaughtError!==void 0&&(k=d.onUncaughtError),d.onCaughtError!==void 0&&(P=d.onCaughtError),d.onRecoverableError!==void 0&&(q=d.onRecoverableError),d.formState!==void 0&&(Q=d.formState)),l=n_(s,1,!0,l,d??null,m,w,Q,k,P,q,h_),l.context=r_(null),d=l.current,m=Lr(),m=Ia(m),w=gs(m),w.callback=null,ys(d,w,m),d=m,l.current.lanes=d,ki(l,d),Vi(l),s[fo]=l.current,nv(s),new im(l)},ld.version="19.2.5",ld}var R_;function v8(){if(R_)return kv.exports;R_=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(t){console.error(t)}}return e(),kv.exports=b8(),kv.exports}var x8=v8(),Jc=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(){}},bl,qs,wc,xO,w8=(xO=class extends Jc{constructor(){super();He(this,bl);He(this,qs);He(this,wc);$e(this,wc,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){K(this,qs)||this.setEventListener(K(this,wc))}onUnsubscribe(){var t;this.hasListeners()||((t=K(this,qs))==null||t.call(this),$e(this,qs,void 0))}setEventListener(t){var n;$e(this,wc,t),(n=K(this,qs))==null||n.call(this),$e(this,qs,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){K(this,bl)!==t&&($e(this,bl,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof K(this,bl)=="boolean"?K(this,bl):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},bl=new WeakMap,qs=new WeakMap,wc=new WeakMap,xO),eS=new w8,S8={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Vs,Zw,wO,C8=(wO=class{constructor(){He(this,Vs,S8);He(this,Zw,!1)}setTimeoutProvider(e){$e(this,Vs,e)}setTimeout(e,t){return K(this,Vs).setTimeout(e,t)}clearTimeout(e){K(this,Vs).clearTimeout(e)}setInterval(e,t){return K(this,Vs).setInterval(e,t)}clearInterval(e){K(this,Vs).clearInterval(e)}},Vs=new WeakMap,Zw=new WeakMap,wO),fl=new C8;function E8(e){setTimeout(e,0)}var k8=typeof window>"u"||"Deno"in globalThis;function rr(){}function R8(e,t){return typeof e=="function"?e(t):e}function ax(e){return typeof e=="number"&&e>=0&&e!==1/0}function OO(e,t){return Math.max(e+(t||0)-Date.now(),0)}function la(e,t){return typeof e=="function"?e(t):e}function pi(e,t){return typeof e=="function"?e(t):e}function __(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:a,stale:u}=e;if(a){if(r){if(t.queryHash!==tS(a,t.options))return!1}else if(!Hd(t.queryKey,a))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||i&&i!==t.state.fetchStatus||o&&!o(t))}function T_(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Il(t.options.mutationKey)!==Il(o))return!1}else if(!Hd(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function tS(e,t){return((t==null?void 0:t.queryKeyHashFn)||Il)(e)}function Il(e){return JSON.stringify(e,(t,n)=>lx(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Hd(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Hd(e[n],t[n])):!1}var _8=Object.prototype.hasOwnProperty;function $O(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=A_(e)&&A_(t);if(!r&&!(lx(e)&&lx(t)))return t;const o=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),u=a.length,c=r?new Array(u):{};let f=0;for(let h=0;h<u;h++){const p=r?h:a[h],g=e[p],y=t[p];if(g===y){c[p]=g,(r?h<o:_8.call(e,p))&&f++;continue}if(g===null||y===null||typeof g!="object"||typeof y!="object"){c[p]=y;continue}const b=$O(g,y,n+1);c[p]=b,b===g&&f++}return o===u&&f===o?e:c}function xg(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function A_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function lx(e){if(!D_(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!D_(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function D_(e){return Object.prototype.toString.call(e)==="[object Object]"}function T8(e){return new Promise(t=>{fl.setTimeout(t,e)})}function ux(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?$O(e,t):t}function Sh(e){return e}function A8(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function D8(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var nS=Symbol();function PO(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===nS?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function rS(e,t){return typeof e=="function"?e(...t):!!e}function M8(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var Gd=(()=>{let e=()=>k8;return{isServer(){return e()},setIsServer(t){e=t}}})();function cx(){let e,t;const n=new Promise((i,o)=>{e=i,t=o});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var O8=E8;function $8(){let e=[],t=0,n=u=>{u()},r=u=>{u()},i=O8;const o=u=>{t?e.push(u):i(()=>{n(u)})},a=()=>{const u=e;e=[],u.length&&i(()=>{r(()=>{u.forEach(c=>{n(c)})})})};return{batch:u=>{let c;t++;try{c=u()}finally{t--,t||a()}return c},batchCalls:u=>(...c)=>{o(()=>{u(...c)})},schedule:o,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{i=u}}}var Rn=$8(),Sc,Ys,Cc,SO,P8=(SO=class extends Jc{constructor(){super();He(this,Sc,!0);He(this,Ys);He(this,Cc);$e(this,Cc,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){K(this,Ys)||this.setEventListener(K(this,Cc))}onUnsubscribe(){var t;this.hasListeners()||((t=K(this,Ys))==null||t.call(this),$e(this,Ys,void 0))}setEventListener(t){var n;$e(this,Cc,t),(n=K(this,Ys))==null||n.call(this),$e(this,Ys,t(this.setOnline.bind(this)))}setOnline(t){K(this,Sc)!==t&&($e(this,Sc,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return K(this,Sc)}},Sc=new WeakMap,Ys=new WeakMap,Cc=new WeakMap,SO),wg=new P8;function N8(e){return Math.min(1e3*2**e,3e4)}function NO(e){return(e??"online")==="online"?wg.isOnline():!0}var fx=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function IO(e){let t=!1,n=0,r;const i=cx(),o=()=>i.status!=="pending",a=v=>{var S;if(!o()){const x=new fx(v);g(x),(S=e.onCancel)==null||S.call(e,x)}},u=()=>{t=!0},c=()=>{t=!1},f=()=>eS.isFocused()&&(e.networkMode==="always"||wg.isOnline())&&e.canRun(),h=()=>NO(e.networkMode)&&e.canRun(),p=v=>{o()||(r==null||r(),i.resolve(v))},g=v=>{o()||(r==null||r(),i.reject(v))},y=()=>new Promise(v=>{var S;r=x=>{(o()||f())&&v(x)},(S=e.onPause)==null||S.call(e)}).then(()=>{var v;r=void 0,o()||(v=e.onContinue)==null||v.call(e)}),b=()=>{if(o())return;let v;const S=n===0?e.initialPromise:void 0;try{v=S??e.fn()}catch(x){v=Promise.reject(x)}Promise.resolve(v).then(p).catch(x=>{var D;if(o())return;const _=e.retry??(Gd.isServer()?0:3),R=e.retryDelay??N8,T=typeof R=="function"?R(n,x):R,A=_===!0||typeof _=="number"&&n<_||typeof _=="function"&&_(n,x);if(t||!A){g(x);return}n++,(D=e.onFail)==null||D.call(e,n,x),T8(T).then(()=>f()?void 0:y()).then(()=>{t?g(x):b()})})};return{promise:i,status:()=>i.status,cancel:a,continue:()=>(r==null||r(),i),cancelRetry:u,continueRetry:c,canStart:h,start:()=>(h()?b():y().then(b),i)}}var vl,CO,jO=(CO=class{constructor(){He(this,vl)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ax(this.gcTime)&&$e(this,vl,fl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Gd.isServer()?1/0:300*1e3))}clearGcTimeout(){K(this,vl)!==void 0&&(fl.clearTimeout(K(this,vl)),$e(this,vl,void 0))}},vl=new WeakMap,CO),xl,Ec,di,wl,On,mh,Sl,Br,LO,No,EO,I8=(EO=class extends jO{constructor(t){super();He(this,Br);He(this,xl);He(this,Ec);He(this,di);He(this,wl);He(this,On);He(this,mh);He(this,Sl);$e(this,Sl,!1),$e(this,mh,t.defaultOptions),this.setOptions(t.options),this.observers=[],$e(this,wl,t.client),$e(this,di,K(this,wl).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,$e(this,xl,O_(this.options)),this.state=t.state??K(this,xl),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=K(this,On))==null?void 0:t.promise}setOptions(t){if(this.options={...K(this,mh),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=O_(this.options);n.data!==void 0&&(this.setState(M_(n.data,n.dataUpdatedAt)),$e(this,xl,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&K(this,di).remove(this)}setData(t,n){const r=ux(this.state.data,t,this.options);return rt(this,Br,No).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){rt(this,Br,No).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=K(this,On))==null?void 0:r.promise;return(i=K(this,On))==null||i.cancel(t),n?n.then(rr).catch(rr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return K(this,xl)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>pi(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===nS||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>la(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!OO(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=K(this,On))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=K(this,On))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),K(this,di).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(K(this,On)&&(K(this,Sl)||rt(this,Br,LO).call(this)?K(this,On).cancel({revert:!0}):K(this,On).cancelRetry()),this.scheduleGc()),K(this,di).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||rt(this,Br,No).call(this,{type:"invalidate"})}async fetch(t,n){var c,f,h,p,g,y,b,v,S,x,_,R;if(this.state.fetchStatus!=="idle"&&((c=K(this,On))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(K(this,On))return K(this,On).continueRetry(),K(this,On).promise}if(t&&this.setOptions(t),!this.options.queryFn){const T=this.observers.find(A=>A.options.queryFn);T&&this.setOptions(T.options)}const r=new AbortController,i=T=>{Object.defineProperty(T,"signal",{enumerable:!0,get:()=>($e(this,Sl,!0),r.signal)})},o=()=>{const T=PO(this.options,n),D=(()=>{const O={client:K(this,wl),queryKey:this.queryKey,meta:this.meta};return i(O),O})();return $e(this,Sl,!1),this.options.persister?this.options.persister(T,D,this):T(D)},u=(()=>{const T={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:K(this,wl),state:this.state,fetchFn:o};return i(T),T})();(f=this.options.behavior)==null||f.onFetch(u,this),$e(this,Ec,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=u.fetchOptions)==null?void 0:h.meta))&&rt(this,Br,No).call(this,{type:"fetch",meta:(p=u.fetchOptions)==null?void 0:p.meta}),$e(this,On,IO({initialPromise:n==null?void 0:n.initialPromise,fn:u.fetchFn,onCancel:T=>{T instanceof fx&&T.revert&&this.setState({...K(this,Ec),fetchStatus:"idle"}),r.abort()},onFail:(T,A)=>{rt(this,Br,No).call(this,{type:"failed",failureCount:T,error:A})},onPause:()=>{rt(this,Br,No).call(this,{type:"pause"})},onContinue:()=>{rt(this,Br,No).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0}));try{const T=await K(this,On).start();if(T===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(T),(y=(g=K(this,di).config).onSuccess)==null||y.call(g,T,this),(v=(b=K(this,di).config).onSettled)==null||v.call(b,T,this.state.error,this),T}catch(T){if(T instanceof fx){if(T.silent)return K(this,On).promise;if(T.revert){if(this.state.data===void 0)throw T;return this.state.data}}throw rt(this,Br,No).call(this,{type:"error",error:T}),(x=(S=K(this,di).config).onError)==null||x.call(S,T,this),(R=(_=K(this,di).config).onSettled)==null||R.call(_,this.state.data,T,this),T}finally{this.scheduleGc()}}},xl=new WeakMap,Ec=new WeakMap,di=new WeakMap,wl=new WeakMap,On=new WeakMap,mh=new WeakMap,Sl=new WeakMap,Br=new WeakSet,LO=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},No=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...FO(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,...M_(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return $e(this,Ec,t.manual?i:void 0),i;case"error":const o=t.error;return{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Rn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),K(this,di).notify({query:this,type:"updated",action:t})})},EO);function FO(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:NO(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function M_(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function O_(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var xr,kt,gh,nr,Cl,kc,Lo,Ws,yh,Rc,_c,El,kl,Ks,Tc,jt,Ed,dx,hx,px,mx,gx,yx,bx,zO,kO,j8=(kO=class extends Jc{constructor(t,n){super();He(this,jt);He(this,xr);He(this,kt);He(this,gh);He(this,nr);He(this,Cl);He(this,kc);He(this,Lo);He(this,Ws);He(this,yh);He(this,Rc);He(this,_c);He(this,El);He(this,kl);He(this,Ks);He(this,Tc,new Set);this.options=n,$e(this,xr,t),$e(this,Ws,null),$e(this,Lo,cx()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(K(this,kt).addObserver(this),$_(K(this,kt),this.options)?rt(this,jt,Ed).call(this):this.updateResult(),rt(this,jt,mx).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return vx(K(this,kt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return vx(K(this,kt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,rt(this,jt,gx).call(this),rt(this,jt,yx).call(this),K(this,kt).removeObserver(this)}setOptions(t){const n=this.options,r=K(this,kt);if(this.options=K(this,xr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof pi(this.options.enabled,K(this,kt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");rt(this,jt,bx).call(this),K(this,kt).setOptions(this.options),n._defaulted&&!xg(this.options,n)&&K(this,xr).getQueryCache().notify({type:"observerOptionsUpdated",query:K(this,kt),observer:this});const i=this.hasListeners();i&&P_(K(this,kt),r,this.options,n)&&rt(this,jt,Ed).call(this),this.updateResult(),i&&(K(this,kt)!==r||pi(this.options.enabled,K(this,kt))!==pi(n.enabled,K(this,kt))||la(this.options.staleTime,K(this,kt))!==la(n.staleTime,K(this,kt)))&&rt(this,jt,dx).call(this);const o=rt(this,jt,hx).call(this);i&&(K(this,kt)!==r||pi(this.options.enabled,K(this,kt))!==pi(n.enabled,K(this,kt))||o!==K(this,Ks))&&rt(this,jt,px).call(this,o)}getOptimisticResult(t){const n=K(this,xr).getQueryCache().build(K(this,xr),t),r=this.createResult(n,t);return F8(this,r)&&($e(this,nr,r),$e(this,kc,this.options),$e(this,Cl,K(this,kt).state)),r}getCurrentResult(){return K(this,nr)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&K(this,Lo).status==="pending"&&K(this,Lo).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(t){K(this,Tc).add(t)}getCurrentQuery(){return K(this,kt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=K(this,xr).defaultQueryOptions(t),r=K(this,xr).getQueryCache().build(K(this,xr),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return rt(this,jt,Ed).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),K(this,nr)))}createResult(t,n){var z;const r=K(this,kt),i=this.options,o=K(this,nr),a=K(this,Cl),u=K(this,kc),f=t!==r?t.state:K(this,gh),{state:h}=t;let p={...h},g=!1,y;if(n._optimisticResults){const j=this.hasListeners(),I=!j&&$_(t,n),M=j&&P_(t,r,n,i);(I||M)&&(p={...p,...FO(h.data,t.options)}),n._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:b,errorUpdatedAt:v,status:S}=p;y=p.data;let x=!1;if(n.placeholderData!==void 0&&y===void 0&&S==="pending"){let j;o!=null&&o.isPlaceholderData&&n.placeholderData===(u==null?void 0:u.placeholderData)?(j=o.data,x=!0):j=typeof n.placeholderData=="function"?n.placeholderData((z=K(this,_c))==null?void 0:z.state.data,K(this,_c)):n.placeholderData,j!==void 0&&(S="success",y=ux(o==null?void 0:o.data,j,n),g=!0)}if(n.select&&y!==void 0&&!x)if(o&&y===(a==null?void 0:a.data)&&n.select===K(this,yh))y=K(this,Rc);else try{$e(this,yh,n.select),y=n.select(y),y=ux(o==null?void 0:o.data,y,n),$e(this,Rc,y),$e(this,Ws,null)}catch(j){$e(this,Ws,j)}K(this,Ws)&&(b=K(this,Ws),y=K(this,Rc),v=Date.now(),S="error");const _=p.fetchStatus==="fetching",R=S==="pending",T=S==="error",A=R&&_,D=y!==void 0,$={status:S,fetchStatus:p.fetchStatus,isPending:R,isSuccess:S==="success",isError:T,isInitialLoading:A,isLoading:A,data:y,dataUpdatedAt:p.dataUpdatedAt,error:b,errorUpdatedAt:v,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:p.dataUpdateCount>f.dataUpdateCount||p.errorUpdateCount>f.errorUpdateCount,isFetching:_,isRefetching:_&&!R,isLoadingError:T&&!D,isPaused:p.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:T&&D,isStale:iS(t,n),refetch:this.refetch,promise:K(this,Lo),isEnabled:pi(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const j=$.data!==void 0,I=$.status==="error"&&!j,M=L=>{I?L.reject($.error):j&&L.resolve($.data)},B=()=>{const L=$e(this,Lo,$.promise=cx());M(L)},G=K(this,Lo);switch(G.status){case"pending":t.queryHash===r.queryHash&&M(G);break;case"fulfilled":(I||$.data!==G.value)&&B();break;case"rejected":(!I||$.error!==G.reason)&&B();break}}return $}updateResult(){const t=K(this,nr),n=this.createResult(K(this,kt),this.options);if($e(this,Cl,K(this,kt).state),$e(this,kc,this.options),K(this,Cl).data!==void 0&&$e(this,_c,K(this,kt)),xg(n,t))return;$e(this,nr,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,o=typeof i=="function"?i():i;if(o==="all"||!o&&!K(this,Tc).size)return!0;const a=new Set(o??K(this,Tc));return this.options.throwOnError&&a.add("error"),Object.keys(K(this,nr)).some(u=>{const c=u;return K(this,nr)[c]!==t[c]&&a.has(c)})};rt(this,jt,zO).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&rt(this,jt,mx).call(this)}},xr=new WeakMap,kt=new WeakMap,gh=new WeakMap,nr=new WeakMap,Cl=new WeakMap,kc=new WeakMap,Lo=new WeakMap,Ws=new WeakMap,yh=new WeakMap,Rc=new WeakMap,_c=new WeakMap,El=new WeakMap,kl=new WeakMap,Ks=new WeakMap,Tc=new WeakMap,jt=new WeakSet,Ed=function(t){rt(this,jt,bx).call(this);let n=K(this,kt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(rr)),n},dx=function(){rt(this,jt,gx).call(this);const t=la(this.options.staleTime,K(this,kt));if(Gd.isServer()||K(this,nr).isStale||!ax(t))return;const r=OO(K(this,nr).dataUpdatedAt,t)+1;$e(this,El,fl.setTimeout(()=>{K(this,nr).isStale||this.updateResult()},r))},hx=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(K(this,kt)):this.options.refetchInterval)??!1},px=function(t){rt(this,jt,yx).call(this),$e(this,Ks,t),!(Gd.isServer()||pi(this.options.enabled,K(this,kt))===!1||!ax(K(this,Ks))||K(this,Ks)===0)&&$e(this,kl,fl.setInterval(()=>{(this.options.refetchIntervalInBackground||eS.isFocused())&&rt(this,jt,Ed).call(this)},K(this,Ks)))},mx=function(){rt(this,jt,dx).call(this),rt(this,jt,px).call(this,rt(this,jt,hx).call(this))},gx=function(){K(this,El)!==void 0&&(fl.clearTimeout(K(this,El)),$e(this,El,void 0))},yx=function(){K(this,kl)!==void 0&&(fl.clearInterval(K(this,kl)),$e(this,kl,void 0))},bx=function(){const t=K(this,xr).getQueryCache().build(K(this,xr),this.options);if(t===K(this,kt))return;const n=K(this,kt);$e(this,kt,t),$e(this,gh,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},zO=function(t){Rn.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(K(this,nr))}),K(this,xr).getQueryCache().notify({query:K(this,kt),type:"observerResultsUpdated"})})},kO);function L8(e,t){return pi(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function $_(e,t){return L8(e,t)||e.state.data!==void 0&&vx(e,t,t.refetchOnMount)}function vx(e,t,n){if(pi(t.enabled,e)!==!1&&la(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&iS(e,t)}return!1}function P_(e,t,n,r){return(e!==t||pi(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&iS(e,n)}function iS(e,t){return pi(t.enabled,e)!==!1&&e.isStaleByTime(la(t.staleTime,e))}function F8(e,t){return!xg(e.getCurrentResult(),t)}function N_(e){return{onFetch:(t,n)=>{var h,p,g,y,b;const r=t.options,i=(g=(p=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:p.fetchMore)==null?void 0:g.direction,o=((y=t.state.data)==null?void 0:y.pages)||[],a=((b=t.state.data)==null?void 0:b.pageParams)||[];let u={pages:[],pageParams:[]},c=0;const f=async()=>{let v=!1;const S=R=>{M8(R,()=>t.signal,()=>v=!0)},x=PO(t.options,t.fetchOptions),_=async(R,T,A)=>{if(v)return Promise.reject();if(T==null&&R.pages.length)return Promise.resolve(R);const O=(()=>{const I={client:t.client,queryKey:t.queryKey,pageParam:T,direction:A?"backward":"forward",meta:t.options.meta};return S(I),I})(),$=await x(O),{maxPages:z}=t.options,j=A?D8:A8;return{pages:j(R.pages,$,z),pageParams:j(R.pageParams,T,z)}};if(i&&o.length){const R=i==="backward",T=R?z8:I_,A={pages:o,pageParams:a},D=T(r,A);u=await _(A,D,R)}else{const R=e??o.length;do{const T=c===0?a[0]??r.initialPageParam:I_(r,u);if(c>0&&T==null)break;u=await _(u,T),c++}while(c<R)}return u};t.options.persister?t.fetchFn=()=>{var v,S;return(S=(v=t.options).persister)==null?void 0:S.call(v,f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=f}}}function I_(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function z8(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var bh,Zi,Yn,Rl,Ji,js,RO,B8=(RO=class extends jO{constructor(t){super();He(this,Ji);He(this,bh);He(this,Zi);He(this,Yn);He(this,Rl);$e(this,bh,t.client),this.mutationId=t.mutationId,$e(this,Yn,t.mutationCache),$e(this,Zi,[]),this.state=t.state||BO(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){K(this,Zi).includes(t)||(K(this,Zi).push(t),this.clearGcTimeout(),K(this,Yn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){$e(this,Zi,K(this,Zi).filter(n=>n!==t)),this.scheduleGc(),K(this,Yn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){K(this,Zi).length||(this.state.status==="pending"?this.scheduleGc():K(this,Yn).remove(this))}continue(){var t;return((t=K(this,Rl))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,u,c,f,h,p,g,y,b,v,S,x,_,R,T,A,D,O;const n=()=>{rt(this,Ji,js).call(this,{type:"continue"})},r={client:K(this,bh),meta:this.options.meta,mutationKey:this.options.mutationKey};$e(this,Rl,IO({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:($,z)=>{rt(this,Ji,js).call(this,{type:"failed",failureCount:$,error:z})},onPause:()=>{rt(this,Ji,js).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>K(this,Yn).canRun(this)}));const i=this.state.status==="pending",o=!K(this,Rl).canStart();try{if(i)n();else{rt(this,Ji,js).call(this,{type:"pending",variables:t,isPaused:o}),K(this,Yn).config.onMutate&&await K(this,Yn).config.onMutate(t,this,r);const z=await((u=(a=this.options).onMutate)==null?void 0:u.call(a,t,r));z!==this.state.context&&rt(this,Ji,js).call(this,{type:"pending",context:z,variables:t,isPaused:o})}const $=await K(this,Rl).start();return await((f=(c=K(this,Yn).config).onSuccess)==null?void 0:f.call(c,$,t,this.state.context,this,r)),await((p=(h=this.options).onSuccess)==null?void 0:p.call(h,$,t,this.state.context,r)),await((y=(g=K(this,Yn).config).onSettled)==null?void 0:y.call(g,$,null,this.state.variables,this.state.context,this,r)),await((v=(b=this.options).onSettled)==null?void 0:v.call(b,$,null,t,this.state.context,r)),rt(this,Ji,js).call(this,{type:"success",data:$}),$}catch($){try{await((x=(S=K(this,Yn).config).onError)==null?void 0:x.call(S,$,t,this.state.context,this,r))}catch(z){Promise.reject(z)}try{await((R=(_=this.options).onError)==null?void 0:R.call(_,$,t,this.state.context,r))}catch(z){Promise.reject(z)}try{await((A=(T=K(this,Yn).config).onSettled)==null?void 0:A.call(T,void 0,$,this.state.variables,this.state.context,this,r))}catch(z){Promise.reject(z)}try{await((O=(D=this.options).onSettled)==null?void 0:O.call(D,void 0,$,t,this.state.context,r))}catch(z){Promise.reject(z)}throw rt(this,Ji,js).call(this,{type:"error",error:$}),$}finally{K(this,Yn).runNext(this)}}},bh=new WeakMap,Zi=new WeakMap,Yn=new WeakMap,Rl=new WeakMap,Ji=new WeakSet,js=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Rn.batch(()=>{K(this,Zi).forEach(r=>{r.onMutationUpdate(t)}),K(this,Yn).notify({mutation:this,type:"updated",action:t})})},RO);function BO(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Fo,Oi,vh,_O,U8=(_O=class extends Jc{constructor(t={}){super();He(this,Fo);He(this,Oi);He(this,vh);this.config=t,$e(this,Fo,new Set),$e(this,Oi,new Map),$e(this,vh,0)}build(t,n,r){const i=new B8({client:t,mutationCache:this,mutationId:++sm(this,vh)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){K(this,Fo).add(t);const n=am(t);if(typeof n=="string"){const r=K(this,Oi).get(n);r?r.push(t):K(this,Oi).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(K(this,Fo).delete(t)){const n=am(t);if(typeof n=="string"){const r=K(this,Oi).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&K(this,Oi).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=am(t);if(typeof n=="string"){const r=K(this,Oi).get(n),i=r==null?void 0:r.find(o=>o.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=am(t);if(typeof n=="string"){const i=(r=K(this,Oi).get(n))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Rn.batch(()=>{K(this,Fo).forEach(t=>{this.notify({type:"removed",mutation:t})}),K(this,Fo).clear(),K(this,Oi).clear()})}getAll(){return Array.from(K(this,Fo))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>T_(n,r))}findAll(t={}){return this.getAll().filter(n=>T_(t,n))}notify(t){Rn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Rn.batch(()=>Promise.all(t.map(n=>n.continue().catch(rr))))}},Fo=new WeakMap,Oi=new WeakMap,vh=new WeakMap,_O);function am(e){var t;return(t=e.options.scope)==null?void 0:t.id}var zo,Xs,wr,Bo,es,Xm,xx,TO,H8=(TO=class extends Jc{constructor(n,r){super();He(this,es);He(this,zo);He(this,Xs);He(this,wr);He(this,Bo);$e(this,zo,n),this.setOptions(r),this.bindMethods(),rt(this,es,Xm).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=K(this,zo).defaultMutationOptions(n),xg(this.options,r)||K(this,zo).getMutationCache().notify({type:"observerOptionsUpdated",mutation:K(this,wr),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Il(r.mutationKey)!==Il(this.options.mutationKey)?this.reset():((i=K(this,wr))==null?void 0:i.state.status)==="pending"&&K(this,wr).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=K(this,wr))==null||n.removeObserver(this)}onMutationUpdate(n){rt(this,es,Xm).call(this),rt(this,es,xx).call(this,n)}getCurrentResult(){return K(this,Xs)}reset(){var n;(n=K(this,wr))==null||n.removeObserver(this),$e(this,wr,void 0),rt(this,es,Xm).call(this),rt(this,es,xx).call(this)}mutate(n,r){var i;return $e(this,Bo,r),(i=K(this,wr))==null||i.removeObserver(this),$e(this,wr,K(this,zo).getMutationCache().build(K(this,zo),this.options)),K(this,wr).addObserver(this),K(this,wr).execute(n)}},zo=new WeakMap,Xs=new WeakMap,wr=new WeakMap,Bo=new WeakMap,es=new WeakSet,Xm=function(){var r;const n=((r=K(this,wr))==null?void 0:r.state)??BO();$e(this,Xs,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},xx=function(n){Rn.batch(()=>{var r,i,o,a,u,c,f,h;if(K(this,Bo)&&this.hasListeners()){const p=K(this,Xs).variables,g=K(this,Xs).context,y={client:K(this,zo),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(i=(r=K(this,Bo)).onSuccess)==null||i.call(r,n.data,p,g,y)}catch(b){Promise.reject(b)}try{(a=(o=K(this,Bo)).onSettled)==null||a.call(o,n.data,null,p,g,y)}catch(b){Promise.reject(b)}}else if((n==null?void 0:n.type)==="error"){try{(c=(u=K(this,Bo)).onError)==null||c.call(u,n.error,p,g,y)}catch(b){Promise.reject(b)}try{(h=(f=K(this,Bo)).onSettled)==null||h.call(f,void 0,n.error,p,g,y)}catch(b){Promise.reject(b)}}}this.listeners.forEach(p=>{p(K(this,Xs))})})},TO),eo,AO,G8=(AO=class extends Jc{constructor(t={}){super();He(this,eo);this.config=t,$e(this,eo,new Map)}build(t,n,r){const i=n.queryKey,o=n.queryHash??tS(i,n);let a=this.get(o);return a||(a=new I8({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(a)),a}add(t){K(this,eo).has(t.queryHash)||(K(this,eo).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=K(this,eo).get(t.queryHash);n&&(t.destroy(),n===t&&K(this,eo).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Rn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return K(this,eo).get(t)}getAll(){return[...K(this,eo).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>__(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>__(t,r)):n}notify(t){Rn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Rn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Rn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},eo=new WeakMap,AO),ln,Qs,Zs,Ac,Dc,Js,Mc,Oc,DO,q8=(DO=class{constructor(e={}){He(this,ln);He(this,Qs);He(this,Zs);He(this,Ac);He(this,Dc);He(this,Js);He(this,Mc);He(this,Oc);$e(this,ln,e.queryCache||new G8),$e(this,Qs,e.mutationCache||new U8),$e(this,Zs,e.defaultOptions||{}),$e(this,Ac,new Map),$e(this,Dc,new Map),$e(this,Js,0)}mount(){sm(this,Js)._++,K(this,Js)===1&&($e(this,Mc,eS.subscribe(async e=>{e&&(await this.resumePausedMutations(),K(this,ln).onFocus())})),$e(this,Oc,wg.subscribe(async e=>{e&&(await this.resumePausedMutations(),K(this,ln).onOnline())})))}unmount(){var e,t;sm(this,Js)._--,K(this,Js)===0&&((e=K(this,Mc))==null||e.call(this),$e(this,Mc,void 0),(t=K(this,Oc))==null||t.call(this),$e(this,Oc,void 0))}isFetching(e){return K(this,ln).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return K(this,Qs).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=K(this,ln).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=K(this,ln).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(la(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return K(this,ln).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=K(this,ln).get(r.queryHash),o=i==null?void 0:i.state.data,a=R8(t,o);if(a!==void 0)return K(this,ln).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Rn.batch(()=>K(this,ln).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=K(this,ln).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=K(this,ln);Rn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=K(this,ln);return Rn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Rn.batch(()=>K(this,ln).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(rr).catch(rr)}invalidateQueries(e,t={}){return Rn.batch(()=>(K(this,ln).findAll(e).forEach(n=>{n.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"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Rn.batch(()=>K(this,ln).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(rr)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(rr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=K(this,ln).build(this,t);return n.isStaleByTime(la(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(rr).catch(rr)}fetchInfiniteQuery(e){return e.behavior=N_(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(rr).catch(rr)}ensureInfiniteQueryData(e){return e.behavior=N_(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return wg.isOnline()?K(this,Qs).resumePausedMutations():Promise.resolve()}getQueryCache(){return K(this,ln)}getMutationCache(){return K(this,Qs)}getDefaultOptions(){return K(this,Zs)}setDefaultOptions(e){$e(this,Zs,e)}setQueryDefaults(e,t){K(this,Ac).set(Il(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...K(this,Ac).values()],n={};return t.forEach(r=>{Hd(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){K(this,Dc).set(Il(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...K(this,Dc).values()],n={};return t.forEach(r=>{Hd(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...K(this,Zs).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=tS(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===nS&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...K(this,Zs).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){K(this,ln).clear(),K(this,Qs).clear()}},ln=new WeakMap,Qs=new WeakMap,Zs=new WeakMap,Ac=new WeakMap,Dc=new WeakMap,Js=new WeakMap,Mc=new WeakMap,Oc=new WeakMap,DO),UO=C.createContext(void 0),yy=e=>{const t=C.useContext(UO);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},V8=({client:e,children:t})=>(C.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),E.jsx(UO.Provider,{value:e,children:t})),HO=C.createContext(!1),Y8=()=>C.useContext(HO);HO.Provider;function W8(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var K8=C.createContext(W8()),X8=()=>C.useContext(K8),Q8=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?rS(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Z8=e=>{C.useEffect(()=>{e.clearReset()},[e])},J8=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||rS(n,[e.error,r])),eB=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},tB=(e,t)=>e.isLoading&&e.isFetching&&!t,nB=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,j_=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function rB(e,t,n){var g,y,b,v;const r=Y8(),i=X8(),o=yy(),a=o.defaultQueryOptions(e);(y=(g=o.getDefaultOptions().queries)==null?void 0:g._experimental_beforeQuery)==null||y.call(g,a);const u=o.getQueryCache().get(a.queryHash);a._optimisticResults=r?"isRestoring":"optimistic",eB(a),Q8(a,i,u),Z8(i);const c=!o.getQueryCache().get(a.queryHash),[f]=C.useState(()=>new t(o,a)),h=f.getOptimisticResult(a),p=!r&&e.subscribed!==!1;if(C.useSyncExternalStore(C.useCallback(S=>{const x=p?f.subscribe(Rn.batchCalls(S)):rr;return f.updateResult(),x},[f,p]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),C.useEffect(()=>{f.setOptions(a)},[a,f]),nB(a,h))throw j_(a,f,i);if(J8({result:h,errorResetBoundary:i,throwOnError:a.throwOnError,query:u,suspense:a.suspense}))throw h.error;if((v=(b=o.getDefaultOptions().queries)==null?void 0:b._experimental_afterQuery)==null||v.call(b,a,h),a.experimental_prefetchInRender&&!Gd.isServer()&&tB(h,r)){const S=c?j_(a,f,i):u==null?void 0:u.promise;S==null||S.catch(rr).finally(()=>{f.updateResult()})}return a.notifyOnChangeProps?h:f.trackResult(h)}function Si(e,t){return rB(e,j8)}function L_(e,t){const n=yy(),[r]=C.useState(()=>new H8(n,e));C.useEffect(()=>{r.setOptions(e)},[r,e]);const i=C.useSyncExternalStore(C.useCallback(a=>r.subscribe(Rn.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=C.useCallback((a,u)=>{r.mutate(a,u).catch(rr)},[r]);if(i.error&&rS(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}var kd=typeof window<"u"?C.useLayoutEffect:C.useEffect;function Av(e){const t=C.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function iB(e,t,n={},r={}){C.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const i=new IntersectionObserver(([o])=>{t(o)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function oB(e){const t=C.useRef(null);return C.useImperativeHandle(e,()=>t.current,[]),t}var GO=!1;function qd(e){return e[e.length-1]}function sB(e){return typeof e=="function"}function ra(e,t){return sB(e)?e(t):e}var aB=Object.prototype.hasOwnProperty,F_=Object.prototype.propertyIsEnumerable,lB=()=>Object.create(null),nl=(e,t)=>ia(e,t,lB);function ia(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;const i=t,o=U_(e)&&U_(i);if(!o&&!($c(e)&&$c(i)))return i;const a=o?e:z_(e);if(!a)return i;const u=o?i:z_(i);if(!u)return i;const c=a.length,f=u.length,h=o?new Array(f):n();let p=0;for(let g=0;g<f;g++){const y=o?g:u[g],b=e[y],v=i[y];if(b===v){h[y]=b,(o?g<c:aB.call(e,y))&&p++;continue}if(b===null||v===null||typeof b!="object"||typeof v!="object"){h[y]=v;continue}const S=ia(b,v,n,r+1);h[y]=S,S===b&&p++}return c===f&&p===c?e:h}function z_(e){const t=Object.getOwnPropertyNames(e);for(const i of t)if(!F_.call(e,i))return!1;const n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;const r=t;for(const i of n){if(!F_.call(e,i))return!1;r.push(i)}return r}function $c(e){if(!B_(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!B_(n)||!n.hasOwnProperty("isPrototypeOf"))}function B_(e){return Object.prototype.toString.call(e)==="[object Object]"}function U_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Al(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!Al(e[r],t[r],n))return!1;return!0}if($c(e)&&$c(t)){const r=(n==null?void 0:n.ignoreUndefined)??!0;if(n!=null&&n.partial){for(const a in t)if((!r||t[a]!==void 0)&&!Al(e[a],t[a],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(const a in e)e[a]!==void 0&&i++;let o=0;for(const a in t)if((!r||t[a]!==void 0)&&(o++,o>i||!Al(e[a],t[a],n)))return!1;return i===o}return!1}function Pc(e){let t,n;const r=new Promise((i,o)=>{t=i,n=o});return r.status="pending",r.resolve=i=>{r.status="resolved",r.value=i,t(i),e==null||e(i)},r.reject=i=>{r.status="rejected",n(i)},r}function Vd(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function uB(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function H_(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return uB(t)}var cB=["http:","https:","mailto:","tel:"];function Sg(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function ud(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let n=0,r="",i;for(;(i=t.exec(e))!==null;)r+=H_(e.slice(n,i.index))+i[0],n=t.lastIndex;r=r+H_(n?e.slice(n):e);let o=!1;return r.startsWith("//")&&(o=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:o}}function fB(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function dB(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Wo(){throw new Error("Invariant failed")}function Yd(e){const t=new Map;let n,r;const i=o=>{o.next&&(o.prev?(o.prev.next=o.next,o.next.prev=o.prev,o.next=void 0,r&&(r.next=o,o.prev=r)):(o.next.prev=void 0,n=o.next,o.next=void 0,r&&(o.prev=r,r.next=o)),r=o)};return{get(o){const a=t.get(o);if(a)return i(a),a.value},set(o,a){if(t.size>=e&&n){const c=n;t.delete(c.key),c.next&&(n=c.next,c.next.prev=void 0),c===r&&(r=void 0)}const u=t.get(o);if(u)u.value=a,i(u);else{const c={key:o,value:a,prev:r};r&&(r.next=c),r=c,n||(n=c),t.set(o,c)}},clear(){t.clear(),n=void 0,r=void 0}}}var dl=4,qO=5;function hB(e){const t=e.indexOf("{");if(t===-1)return null;const n=e.indexOf("}",t);return n===-1||t+1>=e.length?null:[t,n]}function oS(e,t,n=new Uint16Array(6)){const r=e.indexOf("/",t),i=r===-1?e.length:r,o=e.substring(t,i);if(!o||!o.includes("$"))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(o==="$"){const u=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=u,n[4]=u,n[5]=u,n}if(o.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;const a=hB(o);if(a){const[u,c]=a,f=o.charCodeAt(u+1);if(f===45){if(u+2<o.length&&o.charCodeAt(u+2)===36){const h=u+3,p=c;if(h<p)return n[0]=3,n[1]=t+u,n[2]=t+h,n[3]=t+p,n[4]=t+c+1,n[5]=i,n}}else if(f===36){const h=u+1,p=u+2;return p===c?(n[0]=2,n[1]=t+u,n[2]=t+h,n[3]=t+p,n[4]=t+c+1,n[5]=e.length,n):(n[0]=1,n[1]=t+u,n[2]=t+p,n[3]=t+c,n[4]=t+c+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function by(e,t,n,r,i,o,a){var c,f,h,p,g,y,b,v,S,x,_,R,T;a==null||a(n);let u=r;{const A=n.fullPath??n.from,D=A.length,O=((c=n.options)==null?void 0:c.caseSensitive)??e,$=!!((h=(f=n.options)==null?void 0:f.params)!=null&&h.parse&&((g=(p=n.options)==null?void 0:p.skipRouteOnParseError)!=null&&g.params));for(;u<D;){const j=oS(A,u,t);let I;const M=u,B=j[5];switch(u=B+1,o++,j[0]){case 0:{const G=A.substring(j[2],j[3]);if(O){const L=(y=i.static)==null?void 0:y.get(G);if(L)I=L;else{i.static??(i.static=new Map);const F=hl(n.fullPath??n.from);F.parent=i,F.depth=o,I=F,i.static.set(G,F)}}else{const L=G.toLowerCase(),F=(b=i.staticInsensitive)==null?void 0:b.get(L);if(F)I=F;else{i.staticInsensitive??(i.staticInsensitive=new Map);const U=hl(n.fullPath??n.from);U.parent=i,U.depth=o,I=U,i.staticInsensitive.set(L,U)}}break}case 1:{const G=A.substring(M,j[1]),L=A.substring(j[4],B),F=O&&!!(G||L),U=G?F?G:G.toLowerCase():void 0,V=L?F?L:L.toLowerCase():void 0,W=!$&&((v=i.dynamic)==null?void 0:v.find(N=>!N.skipOnParamError&&N.caseSensitive===F&&N.prefix===U&&N.suffix===V));if(W)I=W;else{const N=Mv(1,n.fullPath??n.from,F,U,V);I=N,N.depth=o,N.parent=i,i.dynamic??(i.dynamic=[]),i.dynamic.push(N)}break}case 3:{const G=A.substring(M,j[1]),L=A.substring(j[4],B),F=O&&!!(G||L),U=G?F?G:G.toLowerCase():void 0,V=L?F?L:L.toLowerCase():void 0,W=!$&&((S=i.optional)==null?void 0:S.find(N=>!N.skipOnParamError&&N.caseSensitive===F&&N.prefix===U&&N.suffix===V));if(W)I=W;else{const N=Mv(3,n.fullPath??n.from,F,U,V);I=N,N.parent=i,N.depth=o,i.optional??(i.optional=[]),i.optional.push(N)}break}case 2:{const G=A.substring(M,j[1]),L=A.substring(j[4],B),F=O&&!!(G||L),U=G?F?G:G.toLowerCase():void 0,V=L?F?L:L.toLowerCase():void 0,W=Mv(2,n.fullPath??n.from,F,U,V);I=W,W.parent=i,W.depth=o,i.wildcard??(i.wildcard=[]),i.wildcard.push(W)}}i=I}if($&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const j=hl(n.fullPath??n.from);j.kind=qO,j.parent=i,o++,j.depth=o,i.pathless??(i.pathless=[]),i.pathless.push(j),i=j}const z=(n.path||!n.children)&&!n.isRoot;if(z&&A.endsWith("/")){const j=hl(n.fullPath??n.from);j.kind=dl,j.parent=i,o++,j.depth=o,i.index=j,i=j}i.parse=((_=(x=n.options)==null?void 0:x.params)==null?void 0:_.parse)??null,i.skipOnParamError=$,i.parsingPriority=((T=(R=n.options)==null?void 0:R.skipRouteOnParseError)==null?void 0:T.priority)??0,z&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(const A of n.children)by(e,t,A,u,i,o,a)}function Dv(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Bs(e){var t,n,r;if(e.pathless)for(const i of e.pathless)Bs(i);if(e.static)for(const i of e.static.values())Bs(i);if(e.staticInsensitive)for(const i of e.staticInsensitive.values())Bs(i);if((t=e.dynamic)!=null&&t.length){e.dynamic.sort(Dv);for(const i of e.dynamic)Bs(i)}if((n=e.optional)!=null&&n.length){e.optional.sort(Dv);for(const i of e.optional)Bs(i)}if((r=e.wildcard)!=null&&r.length){e.wildcard.sort(Dv);for(const i of e.wildcard)Bs(i)}}function hl(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function Mv(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:n,prefix:r,suffix:i}}function pB(e,t){const n=hl("/"),r=new Uint16Array(6);for(const i of e)by(!1,r,i,1,n,0);Bs(n),t.masksTree=n,t.flatCache=Yd(1e3)}function mB(e,t){e||(e="/");const n=t.flatCache.get(e);if(n)return n;const r=sS(e,t.masksTree);return t.flatCache.set(e,r),r}function gB(e,t,n,r,i){e||(e="/"),r||(r="/");const o=t?`case\0${e}`:e;let a=i.singleCache.get(o);return a||(a=hl("/"),by(t,new Uint16Array(6),{from:e},1,a,0),i.singleCache.set(o,a)),sS(r,a,n)}function yB(e,t,n=!1){const r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||(e="/");let o;try{o=sS(e,t.segmentTree,n)}catch(a){if(a instanceof URIError)o=null;else throw a}return o&&(o.branch=xB(o.route)),t.matchCache.set(r,o),o}function bB(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function vB(e,t=!1,n){const r=hl(e.fullPath),i=new Uint16Array(6),o={},a={};let u=0;return by(t,i,e,1,r,0,c=>{if(n==null||n(c,u),c.id in o&&Wo(),o[c.id]=c,u!==0&&c.path){const f=bB(c.fullPath);(!a[f]||c.fullPath.endsWith("/"))&&(a[f]=c)}u++}),Bs(r),{processedTree:{segmentTree:r,singleCache:Yd(1e3),matchCache:Yd(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:a}}function sS(e,t,n=!1){const r=e.split("/"),i=SB(e,r,t,n);if(!i)return null;const[o]=VO(e,r,i);return{route:i.node.route,rawParams:o,parsedParams:i.parsedParams}}function VO(e,t,n){var h,p,g,y,b,v,S,x,_,R;const r=wB(n.node);let i=null;const o=Object.create(null);let a=((h=n.extract)==null?void 0:h.part)??0,u=((p=n.extract)==null?void 0:p.node)??0,c=((g=n.extract)==null?void 0:g.path)??0,f=((y=n.extract)==null?void 0:y.segment)??0;for(;u<r.length;a++,u++,c++,f++){const T=r[u];if(T.kind===dl)break;if(T.kind===qO){f--,a--,c--;continue}const A=t[a],D=c;if(A&&(c+=A.length),T.kind===1){i??(i=n.node.fullPath.split("/"));const O=i[f],$=((b=T.prefix)==null?void 0:b.length)??0;if(O.charCodeAt($)===123){const z=((v=T.suffix)==null?void 0:v.length)??0,j=O.substring($+2,O.length-z-1),I=A.substring($,A.length-z);o[j]=decodeURIComponent(I)}else{const z=O.substring(1);o[z]=decodeURIComponent(A)}}else if(T.kind===3){if(n.skipped&1<<u){a--,c=D-1;continue}i??(i=n.node.fullPath.split("/"));const O=i[f],$=((S=T.prefix)==null?void 0:S.length)??0,z=((x=T.suffix)==null?void 0:x.length)??0,j=O.substring($+3,O.length-z-1),I=T.suffix||T.prefix?A.substring($,A.length-z):A;I&&(o[j]=decodeURIComponent(I))}else if(T.kind===2){const O=T,$=e.substring(D+(((_=O.prefix)==null?void 0:_.length)??0),e.length-(((R=O.suffix)==null?void 0:R.length)??0)),z=decodeURIComponent($);o["*"]=z,o._splat=z;break}}return n.rawParams&&Object.assign(o,n.rawParams),[o,{part:a,node:u,path:c,segment:f}]}function xB(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function wB(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function SB(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const i=!qd(t),o=i&&e!=="/",a=t.length-(i?1:0),u=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let c=null,f=null,h=null;for(;u.length;){const p=u.pop(),{node:g,index:y,skipped:b,depth:v,statics:S,dynamics:x,optionals:_}=p;let{extract:R,rawParams:T,parsedParams:A}=p;if(g.skipOnParamError){if(!Ov(e,t,p))continue;T=p.rawParams,R=p.extract,A=p.parsedParams}r&&g.route&&g.kind!==dl&&cd(f,p)&&(f=p);const D=y===a;if(D&&(g.route&&!o&&cd(h,p)&&(h=p),!g.optional&&!g.wildcard&&!g.index&&!g.pathless))continue;const O=D?void 0:t[y];let $;if(D&&g.index){const z={node:g.index,index:y,skipped:b,depth:v+1,statics:S,dynamics:x,optionals:_,extract:R,rawParams:T,parsedParams:A};let j=!0;if(g.index.skipOnParamError&&(Ov(e,t,z)||(j=!1)),j){if(S===a&&!x&&!_&&!b)return z;cd(h,z)&&(h=z)}}if(g.wildcard&&cd(c,p))for(const z of g.wildcard){const{prefix:j,suffix:I}=z;if(j&&(D||!(z.caseSensitive?O:$??($=O.toLowerCase())).startsWith(j)))continue;if(I){if(D)continue;const B=t.slice(y).join("/").slice(-I.length);if((z.caseSensitive?B:B.toLowerCase())!==I)continue}const M={node:z,index:a,skipped:b,depth:v,statics:S,dynamics:x,optionals:_,extract:R,rawParams:T,parsedParams:A};if(!(z.skipOnParamError&&!Ov(e,t,M))){c=M;break}}if(g.optional){const z=b|1<<v,j=v+1;for(let I=g.optional.length-1;I>=0;I--){const M=g.optional[I];u.push({node:M,index:y,skipped:z,depth:j,statics:S,dynamics:x,optionals:_,extract:R,rawParams:T,parsedParams:A})}if(!D)for(let I=g.optional.length-1;I>=0;I--){const M=g.optional[I],{prefix:B,suffix:G}=M;if(B||G){const L=M.caseSensitive?O:$??($=O.toLowerCase());if(B&&!L.startsWith(B)||G&&!L.endsWith(G))continue}u.push({node:M,index:y+1,skipped:b,depth:j,statics:S,dynamics:x,optionals:_+1,extract:R,rawParams:T,parsedParams:A})}}if(!D&&g.dynamic&&O)for(let z=g.dynamic.length-1;z>=0;z--){const j=g.dynamic[z],{prefix:I,suffix:M}=j;if(I||M){const B=j.caseSensitive?O:$??($=O.toLowerCase());if(I&&!B.startsWith(I)||M&&!B.endsWith(M))continue}u.push({node:j,index:y+1,skipped:b,depth:v+1,statics:S,dynamics:x+1,optionals:_,extract:R,rawParams:T,parsedParams:A})}if(!D&&g.staticInsensitive){const z=g.staticInsensitive.get($??($=O.toLowerCase()));z&&u.push({node:z,index:y+1,skipped:b,depth:v+1,statics:S+1,dynamics:x,optionals:_,extract:R,rawParams:T,parsedParams:A})}if(!D&&g.static){const z=g.static.get(O);z&&u.push({node:z,index:y+1,skipped:b,depth:v+1,statics:S+1,dynamics:x,optionals:_,extract:R,rawParams:T,parsedParams:A})}if(g.pathless){const z=v+1;for(let j=g.pathless.length-1;j>=0;j--){const I=g.pathless[j];u.push({node:I,index:y,skipped:b,depth:z,statics:S,dynamics:x,optionals:_,extract:R,rawParams:T,parsedParams:A})}}}if(h&&c)return cd(c,h)?h:c;if(h)return h;if(c)return c;if(r&&f){let p=f.index;for(let y=0;y<f.index;y++)p+=t[y].length;const g=p===e.length?"/":e.slice(p);return f.rawParams??(f.rawParams=Object.create(null)),f.rawParams["**"]=decodeURIComponent(g),f}return null}function Ov(e,t,n){try{const[r,i]=VO(e,t,n);n.rawParams=r,n.extract=i;const o=n.node.parse(r);return n.parsedParams=Object.assign(Object.create(null),n.parsedParams,o),!0}catch{return null}}function cd(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===dl)>(e.node.kind===dl)||t.node.kind===dl==(e.node.kind===dl)&&t.depth>e.depth))):!0}function Qm(e){return aS(e.filter(t=>t!==void 0).join("/"))}function aS(e){return e.replace(/\/{2,}/g,"/")}function YO(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function ua(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function WO(e){return ua(YO(e))}function Cg(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function CB(e,t,n){return Cg(e,n)===Cg(t,n)}function EB({base:e,to:t,trailingSlash:n="never",cache:r}){const i=t.startsWith("/"),o=!i&&t===".";let a;if(r){a=i?t:o?e:e+"\0"+t;const p=r.get(a);if(p)return p}let u;if(o)u=e.split("/");else if(i)u=t.split("/");else{for(u=e.split("/");u.length>1&&qd(u)==="";)u.pop();const p=t.split("/");for(let g=0,y=p.length;g<y;g++){const b=p[g];b===""?g?g===y-1&&u.push(b):u=[b]:b===".."?u.pop():b==="."||u.push(b)}}u.length>1&&(qd(u)===""?n==="never"&&u.pop():n==="always"&&u.push(""));let c,f="";for(let p=0;p<u.length;p++){p>0&&(f+="/");const g=u[p];if(!g)continue;c=oS(g,0,c);const y=c[0];if(y===0){f+=g;continue}const b=c[5],v=g.substring(0,c[1]),S=g.substring(c[4],b),x=g.substring(c[2],c[3]);y===1?f+=v||S?`${v}{$${x}}${S}`:`$${x}`:y===2?f+=v||S?`${v}{$}${S}`:"$":f+=`${v}{-$${x}}${S}`}f=aS(f);const h=f||"/";return a&&r&&r.set(a,h),h}function kB(e){const t=new Map(e.map(i=>[encodeURIComponent(i),i])),n=Array.from(t.keys()).map(i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(n,"g");return i=>i.replace(r,o=>t.get(o)??o)}function $v(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(i=>q_(i,n)).join("/"):q_(r,n)}function G_({path:e,params:t,decoder:n,...r}){let i=!1;const o=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:o,isMissingParams:i};if(!e.includes("$"))return{interpolatedPath:e,usedParams:o,isMissingParams:i};const a=e.length;let u=0,c,f="";for(;u<a;){const h=u;c=oS(e,h,c);const p=c[5];if(u=p+1,h===p)continue;const g=c[0];if(g===0){f+="/"+e.substring(h,p);continue}if(g===2){const y=t._splat;o._splat=y,o["*"]=y;const b=e.substring(h,c[1]),v=e.substring(c[4],p);if(!y){i=!0,(b||v)&&(f+="/"+b+v);continue}const S=$v("_splat",t,n);f+="/"+b+S+v;continue}if(g===1){const y=e.substring(c[2],c[3]);!i&&!(y in t)&&(i=!0),o[y]=t[y];const b=e.substring(h,c[1]),v=e.substring(c[4],p),S=$v(y,t,n)??"undefined";f+="/"+b+S+v;continue}if(g===3){const y=e.substring(c[2],c[3]),b=t[y];if(b==null)continue;o[y]=b;const v=e.substring(h,c[1]),S=e.substring(c[4],p),x=$v(y,t,n)??"";f+="/"+v+x+S;continue}}return e.endsWith("/")&&(f+="/"),{usedParams:o,interpolatedPath:f||"/",isMissingParams:i}}function q_(e,t){const n=encodeURIComponent(e);return(t==null?void 0:t(n))??n}function Zn(e){return(e==null?void 0:e.isNotFound)===!0}function RB(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var _B="tsr-scroll-restoration-v1_3";function TB(){const e=RB();if(!e)return null;let t={};try{const r=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");$c(r)&&(t=r)}catch{}return{get state(){return t},set:r=>{t=ra(r,t)||t},persist:()=>{try{e.setItem(_B,JSON.stringify(t))}catch{}}}}var V_=TB(),AB=e=>e.state.__TSR_key||e.href;function DB(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}var lm=!1,fd="window",Y_="data-scroll-restoration-id";function MB(e,t){if(!V_)return;const n=V_;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!n)return;e.isScrollRestorationSetup=!0,lm=!1;const r=e.options.getScrollRestorationKey||AB,i=new Map;window.history.scrollRestoration="manual";const o=u=>{if(!(lm||!e.isScrollRestoring))if(u.target===document||u.target===window)i.set(fd,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const c=u.target;i.set(c,{scrollX:c.scrollLeft||0,scrollY:c.scrollTop||0})}},a=u=>{var f;if(!e.isScrollRestoring||!u||i.size===0||!n)return;const c=(f=n.state)[u]||(f[u]={});for(const[h,p]of i){let g;if(h===fd)g=fd;else if(h.isConnected){const y=h.getAttribute(Y_);g=y?`[${Y_}="${y}"]`:DB(h)}g&&(c[g]=p)}};document.addEventListener("scroll",o,!0),e.subscribe("onBeforeLoad",u=>{a(u.fromLocation?r(u.fromLocation):void 0),i.clear()}),window.addEventListener("pagehide",()=>{a(r(e.stores.resolvedLocation.get()??e.stores.location.get())),n.persist()}),e.subscribe("onRendered",u=>{var p;const c=r(u.toLocation),f=e.options.scrollRestorationBehavior,h=e.options.scrollToTopSelectors;if(i.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){lm=!0;try{const g=e.isScrollRestoring?n.state[c]:void 0;let y=!1;if(g)for(const b in g){const v=g[b];if(!$c(v))continue;const{scrollX:S,scrollY:x}=v;if(!(!Number.isFinite(S)||!Number.isFinite(x))){if(b===fd)window.scrollTo({top:x,left:S,behavior:f}),y=!0;else if(b){let _;try{_=document.querySelector(b)}catch{continue}_&&(_.scrollLeft=S,_.scrollTop=x,y=!0)}}}if(!y){const b=e.history.location.hash.slice(1);if(b){const v=((p=window.history.state)==null?void 0:p.__hashScrollIntoViewOptions)??!0;if(v){const S=document.getElementById(b);S&&S.scrollIntoView(v)}}else{const v={top:0,left:0,behavior:f};if(window.scrollTo(v),h)for(const S of h){if(S===fd)continue;const x=typeof S=="function"?S():document.querySelector(S);x&&x.scrollTo(v)}}}}finally{lm=!1}e.isScrollRestoring&&n.set(g=>(g[c]||(g[c]={}),g))}})}function OB(e,t=String){const n=new URLSearchParams;for(const r in e){const i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function Pv(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function $B(e){const t=new URLSearchParams(e),n=Object.create(null);for(const[r,i]of t.entries()){const o=n[r];o==null?n[r]=Pv(i):Array.isArray(o)?o.push(Pv(i)):n[r]=[o,Pv(i)]}return n}var PB=IB(JSON.parse),NB=jB(JSON.stringify,JSON.parse);function IB(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=$B(t);for(const r in n){const i=n[r];if(typeof i=="string")try{n[r]=e(i)}catch{}}return n}}function jB(e,t){const n=typeof t=="function";function r(i){if(typeof i=="object"&&i!==null)try{return e(i)}catch{}else if(n&&typeof i=="string")try{return t(i),e(i)}catch{}return i}return i=>{const o=OB(i,r);return o?`?${o}`:""}}var Dl="__root__";function LB(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function Er(e){return e instanceof Response&&!!e.options}function FB(e){return{input:({url:t})=>{for(const n of e)t=wx(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=KO(e[n],t);return t}}}function zB(e){const t=WO(e.basepath),n=`/${t}`,r=`${n}/`,i=e.caseSensitive?n:n.toLowerCase(),o=e.caseSensitive?r:r.toLowerCase();return{input:({url:a})=>{const u=e.caseSensitive?a.pathname:a.pathname.toLowerCase();return u===i?a.pathname="/":u.startsWith(o)&&(a.pathname=a.pathname.slice(n.length)),a},output:({url:a})=>(a.pathname=Qm(["/",t,a.pathname]),a)}}function wx(e,t){var r;const n=(r=e==null?void 0:e.input)==null?void 0:r.call(e,{url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function KO(e,t){var r;const n=(r=e==null?void 0:e.output)==null?void 0:r.call(e,{url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function BB(e,t){const{createMutableStore:n,createReadonlyStore:r,batch:i,init:o}=t,a=new Map,u=new Map,c=new Map,f=n(e.status),h=n(e.loadedAt),p=n(e.isLoading),g=n(e.isTransitioning),y=n(e.location),b=n(e.resolvedLocation),v=n(e.statusCode),S=n(e.redirect),x=n([]),_=n([]),R=n([]),T=r(()=>Nv(a,x.get())),A=r(()=>Nv(u,_.get())),D=r(()=>Nv(c,R.get())),O=r(()=>x.get()[0]),$=r(()=>x.get().some(U=>{var V;return((V=a.get(U))==null?void 0:V.get().status)==="pending"})),z=r(()=>{var U;return{locationHref:y.get().href,resolvedLocationHref:(U=b.get())==null?void 0:U.href,status:f.get()}}),j=r(()=>({status:f.get(),loadedAt:h.get(),isLoading:p.get(),isTransitioning:g.get(),matches:T.get(),location:y.get(),resolvedLocation:b.get(),statusCode:v.get(),redirect:S.get()})),I=Yd(64);function M(U){let V=I.get(U);return V||(V=r(()=>{const W=x.get();for(const N of W){const Y=a.get(N);if(Y&&Y.routeId===U)return Y.get()}}),I.set(U,V)),V}const B={status:f,loadedAt:h,isLoading:p,isTransitioning:g,location:y,resolvedLocation:b,statusCode:v,redirect:S,matchesId:x,pendingIds:_,cachedIds:R,matches:T,pendingMatches:A,cachedMatches:D,firstId:O,hasPending:$,matchRouteDeps:z,matchStores:a,pendingMatchStores:u,cachedMatchStores:c,__store:j,getRouteMatchStore:M,setMatches:G,setPending:L,setCached:F};G(e.matches),o==null||o(B);function G(U){Iv(U,a,x,n,i)}function L(U){Iv(U,u,_,n,i)}function F(U){Iv(U,c,R,n,i)}return B}function Nv(e,t){const n=[];for(const r of t){const i=e.get(r);i&&n.push(i.get())}return n}function Iv(e,t,n,r,i){const o=e.map(u=>u.id),a=new Set(o);i(()=>{for(const u of t.keys())a.has(u)||t.delete(u);for(const u of e){const c=t.get(u.id);if(!c){const f=r(u);f.routeId=u.routeId,t.set(u.id,f);continue}c.routeId=u.routeId,c.get()!==u&&c.set(u)}dB(n.get(),o)||n.set(o)})}var Sx=e=>{var t;if(!e.rendered)return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)},UB=e=>e.stores.matchesId.get().some(t=>{var n;return(n=e.stores.matchStores.get(t))==null?void 0:n.get()._forcePending}),vy=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),Ml=(e,t,n=!0)=>{const r={...e.router.options.context??{}},i=n?t:t-1;for(let o=0;o<=i;o++){const a=e.matches[o];if(!a)continue;const u=e.router.getMatch(a.id);u&&Object.assign(r,u.__routeContext,u.__beforeLoadContext)}return r},W_=(e,t)=>{if(!e.matches.length)return;const n=t.routeId,r=e.matches.findIndex(a=>a.routeId===e.router.routeTree.id),i=r>=0?r:0;let o=n?e.matches.findIndex(a=>a.routeId===n):e.firstBadMatchIndex??e.matches.length-1;o<0&&(o=i);for(let a=o;a>=0;a--){const u=e.matches[a];if(e.router.looseRoutesById[u.routeId].options.notFoundComponent)return a}return n?o:i},oa=(e,t,n)=>{var r,i,o;if(!(!Er(n)&&!Zn(n)))throw Er(n)&&n.redirectHandled&&!n.options.reloadDocument||(t&&((r=t._nonReactive.beforeLoadPromise)==null||r.resolve(),(i=t._nonReactive.loaderPromise)==null||i.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,a=>({...a,status:Er(n)?"redirected":Zn(n)?"notFound":a.status==="pending"?"success":a.status,context:Ml(e,t.index),isFetching:!1,error:n})),Zn(n)&&!n.routeId&&(n.routeId=t.routeId),(o=t._nonReactive.loadPromise)==null||o.resolve()),Er(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n))),n},XO=(e,t)=>{const n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},K_=(e,t,n)=>{const r=Ml(e,n);e.updateMatch(t,i=>({...i,context:r}))},dd=(e,t,n,r)=>{var u,c;const{id:i,routeId:o}=e.matches[t],a=e.router.looseRoutesById[o];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??(e.firstBadMatchIndex=t),oa(e,e.router.getMatch(i),n);try{(c=(u=a.options).onError)==null||c.call(u,n)}catch(f){n=f,oa(e,e.router.getMatch(i),n)}e.updateMatch(i,f=>{var h,p;return(h=f._nonReactive.beforeLoadPromise)==null||h.resolve(),f._nonReactive.beforeLoadPromise=void 0,(p=f._nonReactive.loadPromise)==null||p.resolve(),{...f,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!e.preload&&!Er(n)&&!Zn(n)&&(e.serialError??(e.serialError=n))},QO=(e,t,n,r)=>{var o;if(r._nonReactive.pendingTimeout!==void 0)return;const i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!vy(e,t)&&(n.options.loader||n.options.beforeLoad||JO(n))&&typeof i=="number"&&i!==1/0&&(n.options.pendingComponent??((o=e.router.options)==null?void 0:o.defaultPendingComponent))){const a=setTimeout(()=>{Sx(e)},i);r._nonReactive.pendingTimeout=a}},HB=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;QO(e,t,n,r);const i=()=>{const o=e.router.getMatch(t);o.preload&&(o.status==="redirected"||o.status==="notFound")&&oa(e,o,o.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},GB=(e,t,n,r)=>{const i=e.router.getMatch(t);let o=i._nonReactive.loadPromise;i._nonReactive.loadPromise=Pc(()=>{o==null||o.resolve(),o=void 0});const{paramsError:a,searchError:u}=i;a&&dd(e,n,a,"PARSE_PARAMS"),u&&dd(e,n,u,"VALIDATE_SEARCH"),QO(e,t,r,i);const c=new AbortController;let f=!1;const h=()=>{f||(f=!0,e.updateMatch(t,T=>({...T,isFetching:"beforeLoad",fetchCount:T.fetchCount+1,abortController:c})))},p=()=>{var T;(T=i._nonReactive.beforeLoadPromise)==null||T.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,A=>({...A,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{h(),p()});return}i._nonReactive.beforeLoadPromise=Pc();const g={...Ml(e,n,!1),...i.__routeContext},{search:y,params:b,cause:v}=i,S=vy(e,t),x={search:y,abortController:c,params:b,preload:S,context:g,location:e.location,navigate:T=>e.router.navigate({...T,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:S?"preload":v,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},_=T=>{if(T===void 0){e.router.batch(()=>{h(),p()});return}(Er(T)||Zn(T))&&(h(),dd(e,n,T,"BEFORE_LOAD")),e.router.batch(()=>{h(),e.updateMatch(t,A=>({...A,__beforeLoadContext:T})),p()})};let R;try{if(R=r.options.beforeLoad(x),Vd(R))return h(),R.catch(T=>{dd(e,n,T,"BEFORE_LOAD")}).then(_)}catch(T){h(),dd(e,n,T,"BEFORE_LOAD")}_(R)},qB=(e,t)=>{const{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],o=()=>u(),a=()=>GB(e,n,t,i),u=()=>{if(XO(e,n))return;const c=HB(e,n,i);return Vd(c)?c.then(a):a()};return o()},VB=(e,t,n)=>{var o,a,u,c,f,h;const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([(a=(o=n.options).head)==null?void 0:a.call(o,i),(c=(u=n.options).scripts)==null?void 0:c.call(u,i),(h=(f=n.options).headers)==null?void 0:h.call(f,i)]).then(([p,g,y])=>({meta:p==null?void 0:p.meta,links:p==null?void 0:p.links,headScripts:p==null?void 0:p.scripts,headers:y,scripts:g,styles:p==null?void 0:p.styles}))},ZO=(e,t,n,r,i)=>{const o=t[r-1],{params:a,loaderDeps:u,abortController:c,cause:f}=e.router.getMatch(n),h=Ml(e,r),p=vy(e,n);return{params:a,deps:u,preload:!!p,parentMatchPromise:o,abortController:c,context:h,location:e.location,navigate:g=>e.router.navigate({...g,_fromLocation:e.location}),cause:p?"preload":f,route:i,...e.router.options.additionalContext}},X_=async(e,t,n,r,i)=>{var o,a,u,c,f;try{const h=e.router.getMatch(n);try{(!(GO??e.router.isServer)||h.ssr===!0)&&Wd(i);const p=i.options.loader,g=typeof p=="function"?p:p==null?void 0:p.handler,y=g==null?void 0:g(ZO(e,t,n,r,i)),b=!!g&&Vd(y);if((b||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||h._nonReactive.minPendingPromise)&&e.updateMatch(n,S=>({...S,isFetching:"loader"})),g){const S=b?await y:y;oa(e,e.router.getMatch(n),S),S!==void 0&&e.updateMatch(n,x=>({...x,loaderData:S}))}i._lazyPromise&&await i._lazyPromise;const v=h._nonReactive.minPendingPromise;v&&await v,i._componentsPromise&&await i._componentsPromise,e.updateMatch(n,S=>({...S,error:void 0,context:Ml(e,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(p){let g=p;if((g==null?void 0:g.name)==="AbortError"){if(h.abortController.signal.aborted){(o=h._nonReactive.loaderPromise)==null||o.resolve(),h._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,b=>({...b,status:b.status==="pending"?"success":b.status,isFetching:!1,context:Ml(e,r)}));return}const y=h._nonReactive.minPendingPromise;y&&await y,Zn(p)&&await((u=(a=i.options.notFoundComponent)==null?void 0:a.preload)==null?void 0:u.call(a)),oa(e,e.router.getMatch(n),p);try{(f=(c=i.options).onError)==null||f.call(c,p)}catch(b){g=b,oa(e,e.router.getMatch(n),b)}!Er(g)&&!Zn(g)&&await Wd(i,["errorComponent"]),e.updateMatch(n,b=>({...b,error:g,context:Ml(e,r),status:"error",isFetching:!1}))}}catch(h){const p=e.router.getMatch(n);p&&(p._nonReactive.loaderPromise=void 0),oa(e,p,h)}},YB=async(e,t,n)=>{var y,b,v,S;async function r(x,_,R,T,A){const D=Date.now()-_.updatedAt,O=x?A.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:A.options.staleTime??e.router.options.defaultStaleTime??0,$=A.options.shouldReload,z=typeof $=="function"?$(ZO(e,t,i,n,A)):$,{status:j,invalid:I}=T,M=D>=O&&(!!e.forceStaleReload||T.cause==="enter"||R!==void 0&&R!==T.id);a=j==="success"&&(I||(z??M)),x&&A.options.preload===!1||(a&&!e.sync&&h?(u=!0,(async()=>{var B,G;try{await X_(e,t,i,n,A);const L=e.router.getMatch(i);(B=L._nonReactive.loaderPromise)==null||B.resolve(),(G=L._nonReactive.loadPromise)==null||G.resolve(),L._nonReactive.loaderPromise=void 0,L._nonReactive.loadPromise=void 0}catch(L){Er(L)&&await e.router.navigate(L.options)}})()):j!=="success"||a?await X_(e,t,i,n,A):K_(e,i,n))}const{id:i,routeId:o}=e.matches[n];let a=!1,u=!1;const c=e.router.looseRoutesById[o],f=c.options.loader,h=((typeof f=="function"||f==null?void 0:f.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(XO(e,i)){if(!e.router.getMatch(i))return e.matches[n];K_(e,i,n)}else{const x=e.router.getMatch(i),_=e.router.stores.matchesId.get()[n],R=((y=_&&e.router.stores.matchStores.get(_)||null)==null?void 0:y.routeId)===o?_:(b=e.router.stores.matches.get().find(A=>A.routeId===o))==null?void 0:b.id,T=vy(e,i);if(x._nonReactive.loaderPromise){if(x.status==="success"&&!e.sync&&!x.preload&&h)return x;await x._nonReactive.loaderPromise;const A=e.router.getMatch(i),D=A._nonReactive.error||A.error;D&&oa(e,A,D),A.status==="pending"&&await r(T,x,R,A,c)}else{const A=T&&!e.router.stores.matchStores.has(i),D=e.router.getMatch(i);D._nonReactive.loaderPromise=Pc(),A!==D.preload&&e.updateMatch(i,O=>({...O,preload:A})),await r(T,x,R,D,c)}}const p=e.router.getMatch(i);u||((v=p._nonReactive.loaderPromise)==null||v.resolve(),(S=p._nonReactive.loadPromise)==null||S.resolve(),p._nonReactive.loadPromise=void 0),clearTimeout(p._nonReactive.pendingTimeout),p._nonReactive.pendingTimeout=void 0,u||(p._nonReactive.loaderPromise=void 0),p._nonReactive.dehydrated=void 0;const g=u?p.isFetching:!1;return g!==p.isFetching||p.invalid!==!1?(e.updateMatch(i,x=>({...x,isFetching:g,invalid:!1})),e.router.getMatch(i)):p};async function Q_(e){var g,y;const t=e,n=[];UB(t.router)&&Sx(t);let r;for(let b=0;b<t.matches.length;b++){try{const v=qB(t,b);Vd(v)&&await v}catch(v){if(Er(v))throw v;if(Zn(v))r=v;else if(!t.preload)throw v;break}if(t.serialError||t.firstBadMatchIndex!=null)break}const i=t.firstBadMatchIndex??t.matches.length,o=r&&!t.preload?W_(t,r):void 0,a=r&&t.preload?0:o!==void 0?Math.min(o+1,i):i;let u,c;for(let b=0;b<a;b++)n.push(YB(t,n,b));try{await Promise.all(n)}catch{const b=await Promise.allSettled(n);for(const v of b){if(v.status!=="rejected")continue;const S=v.reason;if(Er(S))throw S;Zn(S)?u??(u=S):c??(c=S)}if(c!==void 0)throw c}const f=u??(r&&!t.preload?r:void 0);let h=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!f&&r&&t.preload)return t.matches;if(f){const b=W_(t,f);b===void 0&&Wo();const v=t.matches[b],S=t.router.looseRoutesById[v.routeId],x=(g=t.router.options)==null?void 0:g.defaultNotFoundComponent;!S.options.notFoundComponent&&x&&(S.options.notFoundComponent=x),f.routeId=v.routeId;const _=v.routeId===t.router.routeTree.id;t.updateMatch(v.id,R=>({...R,..._?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:f},isFetching:!1})),h=b,await Wd(S,["notFoundComponent"])}else if(!t.preload){const b=t.matches[0];b.globalNotFound||(y=t.router.getMatch(b.id))!=null&&y.globalNotFound&&t.updateMatch(b.id,v=>({...v,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const b=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await Wd(b,["errorComponent"])}for(let b=0;b<=h;b++){const{id:v,routeId:S}=t.matches[b],x=t.router.looseRoutesById[S];try{const _=VB(t,v,x);if(_){const R=await _;t.updateMatch(v,T=>({...T,...R}))}}catch(_){console.error(`Error executing head for route ${S}:`,_)}}const p=Sx(t);if(Vd(p)&&await p,f)throw f;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function Z_(e,t){const n=t.map(r=>{var i,o;return(o=(i=e.options[r])==null?void 0:i.preload)==null?void 0:o.call(i)}).filter(Boolean);if(n.length!==0)return Promise.all(n)}function Wd(e,t=Zm){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(r=>{const{id:i,...o}=r.options;Object.assign(e.options,o),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const n=()=>e._componentsLoaded?void 0:t===Zm?(()=>{if(e._componentsPromise===void 0){const r=Z_(e,Zm);r?e._componentsPromise=r.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():Z_(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function JO(e){var t;for(const n of Zm)if((t=e.options[n])!=null&&t.preload)return!0;return!1}var Zm=["component","errorComponent","pendingComponent","notFoundComponent"],ca="__TSR_index",J_="popstate",eT="beforeunload";function WB(e){let t=e.getLocation();const n=new Set,r=a=>{t=e.getLocation(),n.forEach(u=>u({location:t,action:a}))},i=a=>{e.notifyOnIndexChange??!0?r(a):t=e.getLocation()},o=async({task:a,navigateOpts:u,...c})=>{var p,g;if((u==null?void 0:u.ignoreBlocker)??!1){a();return}const f=((p=e.getBlockers)==null?void 0:p.call(e))??[],h=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&f.length&&h)for(const y of f){const b=Eg(c.path,c.state);if(await y.blockerFn({currentLocation:t,nextLocation:b,action:c.type})){(g=e.onBlocked)==null||g.call(e);return}}a()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:a=>(n.add(a),()=>{n.delete(a)}),push:(a,u,c)=>{const f=t.state[ca];u=tT(f+1,u),o({task:()=>{e.pushState(a,u),r({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:a,state:u})},replace:(a,u,c)=>{const f=t.state[ca];u=tT(f,u),o({task:()=>{e.replaceState(a,u),r({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:a,state:u})},go:(a,u)=>{o({task:()=>{e.go(a),i({type:"GO",index:a})},navigateOpts:u,type:"GO"})},back:a=>{o({task:()=>{e.back((a==null?void 0:a.ignoreBlocker)??!1),i({type:"BACK"})},navigateOpts:a,type:"BACK"})},forward:a=>{o({task:()=>{e.forward((a==null?void 0:a.ignoreBlocker)??!1),i({type:"FORWARD"})},navigateOpts:a,type:"FORWARD"})},canGoBack:()=>t.state[ca]!==0,createHref:a=>e.createHref(a),block:a=>{var c;if(!e.setBlockers)return()=>{};const u=((c=e.getBlockers)==null?void 0:c.call(e))??[];return e.setBlockers([...u,a]),()=>{var h,p;const f=((h=e.getBlockers)==null?void 0:h.call(e))??[];(p=e.setBlockers)==null||p.call(e,f.filter(g=>g!==a))}},flush:()=>{var a;return(a=e.flush)==null?void 0:a.call(e)},destroy:()=>{var a;return(a=e.destroy)==null?void 0:a.call(e)},notify:r}}function tT(e,t){t||(t={});const n=lS();return{...t,key:n,__TSR_key:n,[ca]:e}}function KB(e){var $,z;const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let i=[];const o=()=>i,a=j=>i=j,u=(j=>j),c=(()=>Eg(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!(($=t.history.state)!=null&&$.__TSR_key)&&!((z=t.history.state)!=null&&z.key)){const j=lS();t.history.replaceState({[ca]:0,key:j,__TSR_key:j},"")}let f=c(),h,p=!1,g=!1,y=!1,b=!1;const v=()=>f;let S,x;const _=()=>{S&&(O._ignoreSubscribers=!0,(S.isPush?t.history.pushState:t.history.replaceState)(S.state,"",S.href),O._ignoreSubscribers=!1,S=void 0,x=void 0,h=void 0)},R=(j,I,M)=>{const B=u(I);x||(h=f),f=Eg(I,M),S={href:B,state:M,isPush:(S==null?void 0:S.isPush)||j==="push"},x||(x=Promise.resolve().then(()=>_()))},T=j=>{f=c(),O.notify({type:j})},A=async()=>{if(g){g=!1;return}const j=c(),I=j.state[ca]-f.state[ca],M=I===1,B=I===-1,G=!M&&!B||p;p=!1;const L=G?"GO":B?"BACK":"FORWARD",F=G?{type:"GO",index:I}:{type:B?"BACK":"FORWARD"};if(y)y=!1;else{const U=o();if(typeof document<"u"&&U.length){for(const V of U)if(await V.blockerFn({currentLocation:f,nextLocation:j,action:L})){g=!0,t.history.go(1),O.notify(F);return}}}f=c(),O.notify(F)},D=j=>{if(b){b=!1;return}let I=!1;const M=o();if(typeof document<"u"&&M.length)for(const B of M){const G=B.enableBeforeUnload??!0;if(G===!0){I=!0;break}if(typeof G=="function"&&G()===!0){I=!0;break}}if(I)return j.preventDefault(),j.returnValue=""},O=WB({getLocation:v,getLength:()=>t.history.length,pushState:(j,I)=>R("push",j,I),replaceState:(j,I)=>R("replace",j,I),back:j=>(j&&(y=!0),b=!0,t.history.back()),forward:j=>{j&&(y=!0),b=!0,t.history.forward()},go:j=>{p=!0,t.history.go(j)},createHref:j=>u(j),flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(eT,D,{capture:!0}),t.removeEventListener(J_,A)},onBlocked:()=>{h&&f!==h&&(f=h)},getBlockers:o,setBlockers:a,notifyOnIndexChange:!1});return t.addEventListener(eT,D,{capture:!0}),t.addEventListener(J_,A),t.history.pushState=function(...j){const I=n.apply(t.history,j);return O._ignoreSubscribers||T("PUSH"),I},t.history.replaceState=function(...j){const I=r.apply(t.history,j);return O._ignoreSubscribers||T("REPLACE"),I},O}function XB(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Eg(e,t){const n=XB(e),r=n.indexOf("#"),i=n.indexOf("?"),o=lS();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):"",search:i>-1?n.slice(i,r===-1?void 0:r):"",state:t||{[ca]:0,key:o,__TSR_key:o}}}function lS(){return(Math.random()+1).toString(36).substring(7)}function ac(e,t){const n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:(n==null?void 0:n.pathname)!==r.pathname,hrefChanged:(n==null?void 0:n.href)!==r.href,hashChanged:(n==null?void 0:n.hash)!==r.hash}}var QB=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{var h;const r=this.options,i=this.basepath??(r==null?void 0:r.basepath)??"/",o=this.basepath===void 0,a=r==null?void 0:r.rewrite;if(this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=kB(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=KB()),this.origin=this.options.origin,this.origin||(window!=null&&window.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let p;this.resolvePathCache=Yd(1e3),p=this.buildRouteTree(),this.setRoutes(p)}if(!this.stores&&this.latestLocation){const p=this.getStoreConfig(this);this.batch=p.batch,this.stores=BB(JB(this.latestLocation),p),MB(this)}let u=!1;const c=this.options.basepath??"/",f=this.options.rewrite;if(o||i!==c||a!==f){this.basepath=c;const p=[],g=WO(c);g&&g!=="/"&&p.push(zB({basepath:c})),f&&p.push(f),this.rewrite=p.length===0?void 0:p.length===1?p[0]:FB(p),this.history&&this.updateLatestLocation(),u=!0}u&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof((h=window.CSS)==null?void 0:h.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const n=vB(this.routeTree,this.options.caseSensitive,(r,i)=>{r.init({originalIndex:i})});return this.options.routeMasks&&pB(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,r)=>{const i={eventType:n,fn:r};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const i=({pathname:c,search:f,hash:h,href:p,state:g})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const x=this.options.parseSearch(f),_=this.options.stringifySearch(x);return{href:c+_+h,publicHref:c+_+h,pathname:ud(c).path,external:!1,searchStr:_,search:nl(r==null?void 0:r.search,x),hash:ud(h.slice(1)).path,state:ia(r==null?void 0:r.state,g)}}const y=new URL(p,this.origin),b=wx(this.rewrite,y),v=this.options.parseSearch(b.search),S=this.options.stringifySearch(v);return b.search=S,{href:b.href.replace(b.origin,""),publicHref:p,pathname:ud(b.pathname).path,external:!!this.rewrite&&b.origin!==this.origin,searchStr:S,search:nl(r==null?void 0:r.search,v),hash:ud(b.hash.slice(1)).path,state:ia(r==null?void 0:r.state,g)}},o=i(n),{__tempLocation:a,__tempKey:u}=o.state;if(a&&(!u||u===this.tempLocationKey)){const c=i(a);return c.state.key=o.state.key,c.state.__TSR_key=o.state.__TSR_key,delete c.state.__tempLocation,{...c,maskedLocation:o}}return o},this.resolvePathWithBase=(n,r)=>EB({base:n,to:aS(r),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,i)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},i):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>e7({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(n=>{this.cancelMatch(n)}),this.stores.matchesId.get().forEach(n=>{var i;if(this.stores.pendingMatchStores.has(n))return;const r=(i=this.stores.matchStores.get(n))==null?void 0:i.get();r&&(r.status==="pending"||r.isFetching==="loader")&&this.cancelMatch(n)})},this.buildLocation=n=>{const r=(o={})=>{var j,I;const a=o._fromLocation||this.pendingBuiltLocation||this.latestLocation,u=this.matchRoutesLightweight(a);o.from;const c=o.unsafeRelative==="path"?a.pathname:o.from??u.fullPath,f=this.resolvePathWithBase(c,"."),h=u.search,p=Object.assign(Object.create(null),u.params),g=o.to?this.resolvePathWithBase(f,`${o.to}`):this.resolvePathWithBase(f,"."),y=o.params===!1||o.params===null?Object.create(null):(o.params??!0)===!0?p:Object.assign(p,ra(o.params,p)),b=this.getMatchedRoutes(g);let v=b.matchedRoutes;if((!b.foundRoute||b.foundRoute.path!=="/"&&b.routeParams["**"])&&this.options.notFoundRoute&&(v=[...v,this.options.notFoundRoute]),Object.keys(y).length>0)for(const M of v){const B=((j=M.options.params)==null?void 0:j.stringify)??M.options.stringifyParams;if(B)try{Object.assign(y,B(y))}catch{}}const S=n.leaveParams?g:ud(G_({path:g,params:y,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let x=h;if(n._includeValidateSearch&&((I=this.options.search)!=null&&I.strict)){const M={};v.forEach(B=>{if(B.options.validateSearch)try{Object.assign(M,Jm(B.options.validateSearch,{...M,...x}))}catch{}}),x=M}x=t7({search:x,dest:o,destRoutes:v,_includeValidateSearch:n._includeValidateSearch}),x=nl(h,x);const _=this.options.stringifySearch(x),R=o.hash===!0?a.hash:o.hash?ra(o.hash,a.hash):void 0,T=R?`#${R}`:"";let A=o.state===!0?a.state:o.state?ra(o.state,a.state):{};A=ia(a.state,A);const D=`${S}${_}${T}`;let O,$,z=!1;if(this.rewrite){const M=new URL(D,this.origin),B=KO(this.rewrite,M);O=M.href.replace(M.origin,""),B.origin!==this.origin?($=B.href,z=!0):$=B.pathname+B.search+B.hash}else O=fB(D),$=O;return{publicHref:$,href:O,pathname:S,search:x,searchStr:_,state:A,hash:R??"",external:z,unmaskOnReload:o.unmaskOnReload}},i=(o={},a)=>{const u=r(o);let c=a?r(a):void 0;if(!c){const f=Object.create(null);if(this.options.routeMasks){const h=mB(u.pathname,this.processedTree);if(h){Object.assign(f,h.rawParams);const{from:p,params:g,...y}=h.route,b=g===!1||g===null?Object.create(null):(g??!0)===!0?f:Object.assign(f,ra(g,f));a={from:n.from,...y,params:b},c=r(a)}}}return c&&(u.maskedLocation=c),u};return n.mask?i(n,{from:n.from,...n.mask}):i(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:r,...i})=>{const o=()=>{const c=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];c.forEach(h=>{i.state[h]=this.latestLocation.state[h]});const f=Al(i.state,this.latestLocation.state);return c.forEach(h=>{delete i.state[h]}),f},a=ua(this.latestLocation.href)===ua(i.href);let u=this.commitLocationPromise;if(this.commitLocationPromise=Pc(()=>{u==null||u.resolve(),u=void 0}),a&&o())this.load();else{let{maskedLocation:c,hashScrollIntoView:f,...h}=i;c&&(h={...c,state:{...c.state,__tempKey:void 0,__tempLocation:{...h,search:h.searchStr,state:{...h.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(h.unmaskOnReload??this.options.unmaskOnReload??!1)&&(h.state.__tempKey=this.tempLocationKey)),h.state.__hashScrollIntoViewOptions=f??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[i.replace?"replace":"push"](h.publicHref,h.state,{ignoreBlocker:r})}return this.resetNextScroll=i.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:i,viewTransition:o,ignoreBlocker:a,href:u,...c}={})=>{if(u){const p=this.history.location.state.__TSR_index,g=Eg(u,{__TSR_index:n?p:p+1}),y=new URL(g.pathname,this.origin);c.to=wx(this.rewrite,y).pathname,c.search=this.options.parseSearch(g.search),c.hash=g.hash.slice(1)}const f=this.buildLocation({...c,_includeValidateSearch:!0});this.pendingBuiltLocation=f;const h=this.commitLocation({...f,viewTransition:o,replace:n,resetScroll:r,hashScrollIntoView:i,ignoreBlocker:a});return Promise.resolve().then(()=>{this.pendingBuiltLocation===f&&(this.pendingBuiltLocation=void 0)}),h},this.navigate=async({to:n,reloadDocument:r,href:i,publicHref:o,...a})=>{var c,f;let u=!1;if(i)try{new URL(`${i}`),u=!0}catch{}if(u&&!r&&(r=!0),r){if(n!==void 0||!i){const p=this.buildLocation({to:n,...a});i=i??p.publicHref,o=o??p.publicHref}const h=!u&&o?o:i;if(Sg(h,this.protocolAllowlist))return Promise.resolve();if(!a.ignoreBlocker){const p=((f=(c=this.history).getBlockers)==null?void 0:f.call(c))??[];for(const g of p)if(g!=null&&g.blockerFn&&await g.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return a.replace?window.location.replace(h):window.location.href=h,Promise.resolve()}return this.buildAndCommitLocation({...a,href:i,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation),r=this.stores.cachedMatches.get().filter(i=>!n.some(o=>o.id===i.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(n),this.stores.setCached(r)})},this.load=async n=>{let r,i,o;const a=this.stores.resolvedLocation.get()??this.stores.location.get();for(o=new Promise(c=>{this.startTransition(async()=>{var f;try{this.beforeLoad();const h=this.latestLocation,p=ac(h,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...p}),this.emit({type:"onBeforeLoad",...p}),await Q_({router:this,sync:n==null?void 0:n.sync,forceStaleReload:a.href===h.href,matches:this.stores.pendingMatches.get(),location:h,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{var S,x;let g=null,y=null,b=null,v=null;this.batch(()=>{const _=this.stores.pendingMatches.get(),R=_.length,T=this.stores.matches.get();g=R?T.filter(O=>!this.stores.pendingMatchStores.has(O.id)):null;const A=new Set;for(const O of this.stores.pendingMatchStores.values())O.routeId&&A.add(O.routeId);const D=new Set;for(const O of this.stores.matchStores.values())O.routeId&&D.add(O.routeId);y=R?T.filter(O=>!A.has(O.routeId)):null,b=R?_.filter(O=>!D.has(O.routeId)):null,v=R?_.filter(O=>D.has(O.routeId)):T,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),R&&(this.stores.setMatches(_),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...g.filter(O=>O.status!=="error"&&O.status!=="notFound"&&O.status!=="redirected")]),this.clearExpiredCache())});for(const[_,R]of[[y,"onLeave"],[b,"onEnter"],[v,"onStay"]])if(_)for(const T of _)(x=(S=this.looseRoutesById[T.routeId].options)[R])==null||x.call(S,T)})})}})}catch(h){Er(h)?(r=h,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):Zn(h)&&(i=h);const p=r?r.status:i?404:this.stores.matches.get().some(g=>g.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(p),this.stores.redirect.set(r)})}this.latestLoadPromise===o&&((f=this.commitLocationPromise)==null||f.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),c()})}),this.latestLoadPromise=o,await o;this.latestLoadPromise&&o!==this.latestLoadPromise;)await this.latestLoadPromise;let u;this.hasNotFoundMatch()?u=404:this.stores.matches.get().some(c=>c.status==="error")&&(u=500),u!==void 0&&this.stores.statusCode.set(u)},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let i;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const o=this.latestLocation,a=this.stores.resolvedLocation.get(),u=typeof r.types=="function"?r.types(ac(o,a)):r.types;if(u===!1){n();return}i={update:n,types:u}}else i=n;document.startViewTransition(i)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const i=this.stores.pendingMatchStores.get(n);if(i){i.set(r);return}const o=this.stores.matchStores.get(n);if(o){o.set(r);return}const a=this.stores.cachedMatchStores.get(n);if(a){const u=r(a.get());u.status==="redirected"?this.stores.cachedMatchStores.delete(n)&&this.stores.cachedIds.set(c=>c.filter(f=>f!==n)):a.set(u)}})},this.getMatch=n=>{var r,i,o;return((r=this.stores.cachedMatchStores.get(n))==null?void 0:r.get())??((i=this.stores.pendingMatchStores.get(n))==null?void 0:i.get())??((o=this.stores.matchStores.get(n))==null?void 0:o.get())},this.invalidate=n=>{const r=i=>{var o;return((o=n==null?void 0:n.filter)==null?void 0:o.call(n,i))??!0?{...i,invalid:!0,...n!=null&&n.forcePending||i.status==="error"||i.status==="notFound"?{status:"pending",error:void 0}:void 0}:i};return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(r)),this.stores.setCached(this.stores.cachedMatches.get().map(r)),this.stores.setPending(this.stores.pendingMatches.get().map(r))}),this.shouldViewTransition=!1,this.load({sync:n==null?void 0:n.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const r=n.headers.get("Location");if(!n.options.href||n.options._builtLocation){const i=n.options._builtLocation??this.buildLocation(n.options),o=this.getParsedLocationHref(i);n.options.href=o,n.headers.set("Location",o)}else if(r)try{const i=new URL(r);if(this.origin&&i.origin===this.origin){const o=i.pathname+i.search+i.hash;n.options.href=o,n.headers.set("Location",o)}}catch{}if(n.options.href&&!n.options._builtLocation&&Sg(n.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n==null?void 0:n.filter;r!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(i=>!r(i))):this.stores.setCached([])},this.clearExpiredCache=()=>{const n=Date.now(),r=i=>{const o=this.looseRoutesById[i.routeId];if(!o.options.loader)return!0;const a=(i.preload?o.options.preloadGcTime??this.options.defaultPreloadGcTime:o.options.gcTime??this.options.defaultGcTime)??300*1e3;return i.status==="error"?!0:n-i.updatedAt>=a};this.clearCache({filter:r})},this.loadRouteChunk=Wd,this.preloadRoute=async n=>{const r=n._builtLocation??this.buildLocation(n);let i=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const o=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),a=new Set([...o,...this.stores.cachedIds.get()]),u=i.filter(c=>!a.has(c.id));if(u.length){const c=this.stores.cachedMatches.get();this.stores.setCached([...c,...u])}try{return i=await Q_({router:this,matches:i,location:r,preload:!0,updateMatch:(c,f)=>{o.has(c)?i=i.map(h=>h.id===c?f(h):h):this.updateMatch(c,f)}}),i}catch(c){if(Er(c))return c.options.reloadDocument?void 0:await this.preloadRoute({...c.options,_fromLocation:r});Zn(c)||console.error(c);return}},this.matchRoute=(n,r)=>{const i={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},o=this.buildLocation(i);if(r!=null&&r.pending&&this.stores.status.get()!=="pending")return!1;const a=((r==null?void 0:r.pending)===void 0?!this.stores.isLoading.get():r.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),u=gB(o.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,a.pathname,this.processedTree);return!u||n.params&&!Al(u.rawParams,n.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?Al(a.search,o.search,{partial:!0})?u.rawParams:!1:u.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(n=>n.status==="notFound"||n.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??NB,parseSearch:e.parseSearch??PB,protocolAllowlist:e.protocolAllowlist??cB}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}get looseRoutesById(){return this.routesById}getParentContext(e){return e!=null&&e.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){var p,g;const n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:i,parsedParams:o}=n;let{matchedRoutes:a}=n,u=!1;(r?r.path!=="/"&&i["**"]:ua(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:u=!0);const c=u?r7(this.options.notFoundMode,a):void 0,f=new Array(a.length),h=new Map;for(const y of this.stores.matchStores.values())y.routeId&&h.set(y.routeId,y.get());for(let y=0;y<a.length;y++){const b=a[y],v=f[y-1];let S,x,_;{const L=(v==null?void 0:v.search)??e.search,F=(v==null?void 0:v._strictSearch)??void 0;try{const U=Jm(b.options.validateSearch,{...L})??void 0;S={...L,...U},x={...F,...U},_=void 0}catch(U){let V=U;if(U instanceof kg||(V=new kg(U.message,{cause:U})),t!=null&&t.throwOnError)throw V;S=L,x={},_=V}}const R=((g=(p=b.options).loaderDeps)==null?void 0:g.call(p,{search:S}))??"",T=R?JSON.stringify(R):"",{interpolatedPath:A,usedParams:D}=G_({path:b.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),O=b.id+A+T,$=this.getMatch(O),z=h.get(b.id),j=($==null?void 0:$._strictParams)??D;let I;if(!$)try{nT(b,D,o,j)}catch(L){if(Zn(L)||Er(L)?I=L:I=new ZB(L.message,{cause:L}),t!=null&&t.throwOnError)throw I}Object.assign(i,j);const M=z?"stay":"enter";let B;if($)B={...$,cause:M,params:(z==null?void 0:z.params)??i,_strictParams:j,search:nl(z?z.search:$.search,S),_strictSearch:x};else{const L=b.options.loader||b.options.beforeLoad||b.lazyFn||JO(b)?"pending":"success";B={id:O,ssr:b.options.ssr,index:y,routeId:b.id,params:(z==null?void 0:z.params)??i,_strictParams:j,pathname:A,updatedAt:Date.now(),search:z?nl(z.search,S):S,_strictSearch:x,searchError:void 0,status:L,isFetching:!1,error:void 0,paramsError:I,__routeContext:void 0,_nonReactive:{loadPromise:Pc()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:M,loaderDeps:z?ia(z.loaderDeps,R):R,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:b.options.staticData||{},fullPath:b.fullPath}}t!=null&&t.preload||(B.globalNotFound=c===b.id),B.searchError=_;const G=this.getParentContext(v);B.context={...G,...B.__routeContext,...B.__beforeLoadContext},f[y]=B}for(let y=0;y<f.length;y++){const b=f[y],v=this.looseRoutesById[b.routeId],S=this.getMatch(b.id),x=h.get(b.routeId);if(b.params=x?nl(x.params,i):i,!S){const _=f[y-1],R=this.getParentContext(_);if(v.options.context){const T={deps:b.loaderDeps,params:b.params,context:R??{},location:e,navigate:A=>this.navigate({...A,_fromLocation:e}),buildLocation:this.buildLocation,cause:b.cause,abortController:b.abortController,preload:!!b.preload,matches:f,routeId:v.id};b.__routeContext=v.options.context(T)??void 0}b.context={...R,...b.__routeContext,...b.__beforeLoadContext}}}return f}matchRoutesLightweight(e){var h;const{matchedRoutes:t,routeParams:n,parsedParams:r}=this.getMatchedRoutes(e.pathname),i=qd(t),o={...e.search};for(const p of t)try{Object.assign(o,Jm(p.options.validateSearch,o))}catch{}const a=qd(this.stores.matchesId.get()),u=a&&((h=this.stores.matchStores.get(a))==null?void 0:h.get()),c=u&&u.routeId===i.id&&u.pathname===e.pathname;let f;if(c)f=u.params;else{const p=Object.assign(Object.create(null),n);for(const g of t)try{nT(g,n,r??{},p)}catch{}f=p}return{matchedRoutes:t,fullPath:i.fullPath,search:o,params:f}}},kg=class extends Error{},ZB=class extends Error{};function JB(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Jm(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new kg("Async validation not supported");if(n.issues)throw new kg(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function e7({pathname:e,routesById:t,processedTree:n}){const r=Object.create(null),i=ua(e);let o,a;const u=yB(i,n,!0);return u&&(o=u.route,Object.assign(r,u.rawParams),a=Object.assign(Object.create(null),u.parsedParams)),{matchedRoutes:(u==null?void 0:u.branch)||[t.__root__],routeParams:r,foundRoute:o,parsedParams:a}}function t7({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return n7(n)(e,t,r??!1)}function n7(e){var i;const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const o of e){if("search"in o.options)(i=o.options.search)!=null&&i.middlewares&&t.middlewares.push(...o.options.search.middlewares);else if(o.options.preSearchFilters||o.options.postSearchFilters){const a=({search:u,next:c})=>{let f=u;"preSearchFilters"in o.options&&o.options.preSearchFilters&&(f=o.options.preSearchFilters.reduce((p,g)=>g(p),u));const h=c(f);return"postSearchFilters"in o.options&&o.options.postSearchFilters?o.options.postSearchFilters.reduce((p,g)=>g(p),h):h};t.middlewares.push(a)}if(o.options.validateSearch){const a=({search:u,next:c})=>{const f=c(u);if(!t._includeValidateSearch)return f;try{return{...f,...Jm(o.options.validateSearch,f)??void 0}}catch{return f}};t.middlewares.push(a)}}const n=({search:o})=>{const a=t.dest;return a.search?a.search===!0?o:ra(a.search,o):{}};t.middlewares.push(n);const r=(o,a,u)=>{if(o>=u.length)return a;const c=u[o];return c({search:a,next:h=>r(o+1,h,u)})};return function(a,u,c){return t.dest=u,t._includeValidateSearch=c,r(0,a,t.middlewares)}}function r7(e,t){if(e!=="root")for(let n=t.length-1;n>=0;n--){const r=t[n];if(r.children)return r.id}return Dl}function nT(e,t,n,r){var o;const i=((o=e.options.params)==null?void 0:o.parse)??e.options.parseParams;if(i)if(e.options.skipRouteOnParseError)for(const a in t)a in n&&(r[a]=n[a]);else{const a=i(r);Object.assign(r,a)}}var i7="Error preloading route! ☝️",e3=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=t=>{var c,f;this.originalIndex=t.originalIndex;const n=this.options,r=!(n!=null&&n.path)&&!(n!=null&&n.id);this.parentRoute=(f=(c=this.options).getParentRoute)==null?void 0:f.call(c),r?this._path=Dl:this.parentRoute||Wo();let i=r?Dl:n==null?void 0:n.path;i&&i!=="/"&&(i=YO(i));const o=(n==null?void 0:n.id)||i;let a=r?Dl:Qm([this.parentRoute.id==="__root__"?"":this.parentRoute.id,o]);i==="__root__"&&(i="/"),a!=="__root__"&&(a=Qm(["/",a]));const u=a==="__root__"?"/":Qm([this.parentRoute.fullPath,i]);this._path=i,this._id=a,this._fullPath=u,this._to=ua(u)},this.addChildren=t=>this._addFileChildren(t),this._addFileChildren=t=>(Array.isArray(t)&&(this.children=t),typeof t=="object"&&t!==null&&(this.children=Object.values(t)),this),this._addFileTypes=()=>this,this.updateLoader=t=>(Object.assign(this.options,t),this),this.update=t=>(Object.assign(this.options,t),this),this.lazy=t=>(this.lazyFn=t,this),this.redirect=t=>LB({from:this.fullPath,...t}),this.options=e||{},this.isRoot=!(e!=null&&e.getParentRoute),e!=null&&e.id&&(e!=null&&e.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},o7=class extends e3{constructor(e){super(e)}};function s7(e){if(typeof document<"u"&&document.querySelector){const t=e.stores.location.get(),n=t.state.__hashScrollIntoViewOptions??!0;if(n&&t.hash!==""){const r=document.getElementById(t.hash);r&&r.scrollIntoView(n)}}}function uS(e){const t=e.errorComponent??cS;return E.jsx(a7,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?C.createElement(t,{error:n,reset:r}):e.children})}var a7=class extends C.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){const n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function cS({error:e}){const[t,n]=C.useState(!1);return E.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[E.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[E.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),E.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),E.jsx("div",{style:{height:".25rem"}}),t?E.jsx("div",{children:E.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?E.jsx("code",{children:e.message}):null})}):null]})}function l7({children:e,fallback:t=null}){return t3()?E.jsx(va.Fragment,{children:e}):E.jsx(va.Fragment,{children:t})}function t3(){return va.useSyncExternalStore(u7,()=>!0,()=>!1)}function u7(){return()=>{}}var n3=C.createContext(null);function Xr(e){return C.useContext(n3)}var xy=C.createContext(void 0),c7=C.createContext(void 0),rn=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(rn||{});function f7({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:o,checkDirty:a,shallowPropagate:u};function r(f,h,p){const g=h.depsTail;if(g!==void 0&&g.dep===f)return;const y=g!==void 0?g.nextDep:h.deps;if(y!==void 0&&y.dep===f){y.version=p,h.depsTail=y;return}const b=f.subsTail;if(b!==void 0&&b.version===p&&b.sub===h)return;const v=h.depsTail=f.subsTail={version:p,dep:f,sub:h,prevDep:g,nextDep:y,prevSub:b,nextSub:void 0};y!==void 0&&(y.prevDep=v),g!==void 0?g.nextDep=v:h.deps=v,b!==void 0?b.nextSub=v:f.subs=v}function i(f,h=f.sub){const p=f.dep,g=f.prevDep,y=f.nextDep,b=f.nextSub,v=f.prevSub;return y!==void 0?y.prevDep=g:h.depsTail=g,g!==void 0?g.nextDep=y:h.deps=y,b!==void 0?b.prevSub=v:p.subsTail=v,v!==void 0?v.nextSub=b:(p.subs=b)===void 0&&n(p),y}function o(f){let h=f.nextSub,p;e:do{const g=f.sub;let y=g.flags;if(y&60?y&12?y&4?!(y&48)&&c(f,g)?(g.flags=y|40,y&=1):y=0:g.flags=y&-9|32:y=0:g.flags=y|32,y&2&&t(g),y&1){const b=g.subs;if(b!==void 0){const v=(f=b).nextSub;v!==void 0&&(p={value:h,prev:p},h=v);continue}}if((f=h)!==void 0){h=f.nextSub;continue}for(;p!==void 0;)if(f=p.value,p=p.prev,f!==void 0){h=f.nextSub;continue e}break}while(!0)}function a(f,h){let p,g=0,y=!1;e:do{const b=f.dep,v=b.flags;if(h.flags&16)y=!0;else if((v&17)===17){if(e(b)){const S=b.subs;S.nextSub!==void 0&&u(S),y=!0}}else if((v&33)===33){(f.nextSub!==void 0||f.prevSub!==void 0)&&(p={value:f,prev:p}),f=b.deps,h=b,++g;continue}if(!y){const S=f.nextDep;if(S!==void 0){f=S;continue}}for(;g--;){const S=h.subs,x=S.nextSub!==void 0;if(x?(f=p.value,p=p.prev):f=S,y){if(e(h)){x&&u(S),h=f.sub;continue}y=!1}else h.flags&=-33;h=f.sub;const _=f.nextDep;if(_!==void 0){f=_;continue e}}return y}while(!0)}function u(f){do{const h=f.sub,p=h.flags;(p&48)===32&&(h.flags=p|16,(p&6)===2&&t(h))}while((f=f.nextSub)!==void 0)}function c(f,h){let p=h.depsTail;for(;p!==void 0;){if(p===f)return!0;p=p.prevDep}return!1}}function d7(e,t,n){var o,a,u;const r=typeof e=="object",i=r?e:void 0;return{next:(o=r?e.next:e)==null?void 0:o.bind(i),error:(a=r?e.error:t)==null?void 0:a.bind(i),complete:(u=r?e.complete:n)==null?void 0:u.bind(i)}}const Cx=[];let eg=0;const{link:rT,unlink:h7,propagate:p7,checkDirty:r3,shallowPropagate:iT}=f7({update(e){return e._update()},notify(e){Cx[Ex++]=e,e.flags&=~rn.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=rn.Mutable|rn.Dirty,Rg(e))}});let um=0,Ex=0,Xi,kx=0;function i3(e){try{++kx,e()}finally{--kx||o3()}}function Rg(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=h7(n,e)}function o3(){if(!(kx>0)){for(;um<Ex;){const e=Cx[um];Cx[um++]=void 0,e.notify()}um=0,Ex=0}}function oT(e,t){const n=typeof e=="function",r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?rn.None:rn.Mutable,get(){return Xi!==void 0&&rT(i,Xi,eg),i._snapshot},subscribe(o){const a=d7(o),u={current:!1},c=m7(()=>{var f;i.get(),u.current?(f=a.next)==null||f.call(a,i._snapshot):u.current=!0});return{unsubscribe:()=>{c.stop()}}},_update(o){const a=Xi,u=(t==null?void 0:t.compare)??Object.is;if(n)Xi=i,++eg,i.depsTail=void 0;else if(o===void 0)return!1;n&&(i.flags=rn.Mutable|rn.RecursedCheck);try{const c=i._snapshot,f=typeof o=="function"?o(c):o===void 0&&n?r(c):o;return c===void 0||!u(c,f)?(i._snapshot=f,!0):!1}finally{Xi=a,n&&(i.flags&=~rn.RecursedCheck),Rg(i)}}};return n?(i.flags=rn.Mutable|rn.Dirty,i.get=function(){const o=i.flags;if(o&rn.Dirty||o&rn.Pending&&r3(i.deps,i)){if(i._update()){const a=i.subs;a!==void 0&&iT(a)}}else o&rn.Pending&&(i.flags=o&~rn.Pending);return Xi!==void 0&&rT(i,Xi,eg),i._snapshot}):i.set=function(o){if(i._update(o)){const a=i.subs;a!==void 0&&(p7(a),iT(a),o3())}},i}function m7(e){const t=()=>{const r=Xi;Xi=n,++eg,n.depsTail=void 0,n.flags=rn.Watching|rn.RecursedCheck;try{return e()}finally{Xi=r,n.flags&=~rn.RecursedCheck,Rg(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:rn.Watching|rn.RecursedCheck,notify(){const r=this.flags;r&rn.Dirty||r&rn.Pending&&r3(this.deps,this)?t():this.flags=rn.Watching},stop(){this.flags=rn.None,this.depsTail=void 0,Rg(this)}};return t(),n}var jv={exports:{}},Lv={},Fv={exports:{}},zv={};/**
51
+ * @license React
52
+ * use-sync-external-store-shim.production.js
53
+ *
54
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
55
+ *
56
+ * This source code is licensed under the MIT license found in the
57
+ * LICENSE file in the root directory of this source tree.
58
+ */var sT;function g7(){if(sT)return zv;sT=1;var e=wh();function t(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function u(p,g){var y=g(),b=r({inst:{value:y,getSnapshot:g}}),v=b[0].inst,S=b[1];return o(function(){v.value=y,v.getSnapshot=g,c(v)&&S({inst:v})},[p,y,g]),i(function(){return c(v)&&S({inst:v}),p(function(){c(v)&&S({inst:v})})},[p]),a(y),y}function c(p){var g=p.getSnapshot;p=p.value;try{var y=g();return!n(p,y)}catch{return!0}}function f(p,g){return g()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:u;return zv.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,zv}var aT;function s3(){return aT||(aT=1,Fv.exports=g7()),Fv.exports}/**
59
+ * @license React
60
+ * use-sync-external-store-shim/with-selector.production.js
61
+ *
62
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
63
+ *
64
+ * This source code is licensed under the MIT license found in the
65
+ * LICENSE file in the root directory of this source tree.
66
+ */var lT;function y7(){if(lT)return Lv;lT=1;var e=wh(),t=s3();function n(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,a=e.useEffect,u=e.useMemo,c=e.useDebugValue;return Lv.useSyncExternalStoreWithSelector=function(f,h,p,g,y){var b=o(null);if(b.current===null){var v={hasValue:!1,value:null};b.current=v}else v=b.current;b=u(function(){function x(D){if(!_){if(_=!0,R=D,D=g(D),y!==void 0&&v.hasValue){var O=v.value;if(y(O,D))return T=O}return T=D}if(O=T,r(R,D))return O;var $=g(D);return y!==void 0&&y(O,$)?(R=D,O):(R=D,T=$)}var _=!1,R,T,A=p===void 0?null:p;return[function(){return x(h())},A===null?void 0:function(){return x(A())}]},[h,p,g,y]);var S=i(f,b[0],b[1]);return a(function(){v.hasValue=!0,v.value=S},[S]),c(S),S},Lv}var uT;function b7(){return uT||(uT=1,jv.exports=y7()),jv.exports}var a3=b7();function v7(e,t){return e===t}function Rr(e,t,n=v7){const r=C.useCallback(a=>{if(!e)return()=>{};const{unsubscribe:u}=e.subscribe(a);return u},[e]),i=C.useCallback(()=>e==null?void 0:e.get(),[e]);return a3.useSyncExternalStoreWithSelector(r,i,i,t,n)}var x7={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function Vl(e){const t=Xr(),n=C.useContext(e.from?c7:xy),r=e.from??n,i=r?e.from?t.stores.getRouteMatchStore(r):t.stores.matchStores.get(r):void 0,o=C.useRef(void 0);return Rr(i??x7,a=>{if((e.shouldThrow??!0)&&!a&&Wo(),a===void 0)return;const u=e.select?e.select(a):a;if(e.structuralSharing??t.options.defaultStructuralSharing){const c=ia(o.current,u);return o.current=c,c}return u})}function l3(e){return Vl({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function u3(e){const{select:t,...n}=e;return Vl({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function c3(e){return Vl({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function f3(e){return Vl({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function d3(e){const t=Xr();return C.useCallback(n=>t.navigate({...n,from:n.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,t])}function h3(e){return Vl({...e,select:t=>e.select?e.select(t.context):t.context})}var gn=MO();function w7(e,t){const n=Xr(),r=oB(t),{activeProps:i,inactiveProps:o,activeOptions:a,to:u,preload:c,preloadDelay:f,preloadIntentProximity:h,hashScrollIntoView:p,replace:g,startTransition:y,resetScroll:b,viewTransition:v,children:S,target:x,disabled:_,style:R,className:T,onClick:A,onBlur:D,onFocus:O,onMouseEnter:$,onMouseLeave:z,onTouchStart:j,ignoreBlocker:I,params:M,search:B,hash:G,state:L,mask:F,reloadDocument:U,unsafeRelative:V,from:W,_fromLocation:N,...Y}=e,J=t3(),H=C.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),ie=Rr(n.stores.location,De=>De,(De,ue)=>De.href===ue.href),re=C.useMemo(()=>{const De={_fromLocation:ie,...H};return n.buildLocation(De)},[n,ie,H]),he=re.maskedLocation?re.maskedLocation.publicHref:re.publicHref,ve=re.maskedLocation?re.maskedLocation.external:re.external,Re=C.useMemo(()=>_7(he,ve,n.history,_),[_,ve,he,n.history]),ce=C.useMemo(()=>{if(Re!=null&&Re.external)return Sg(Re.href,n.protocolAllowlist)?void 0:Re.href;if(!T7(u)&&!(typeof u!="string"||u.indexOf(":")===-1))try{return new URL(u),Sg(u,n.protocolAllowlist)?void 0:u}catch{}},[u,Re,n.protocolAllowlist]),Ie=C.useMemo(()=>{if(ce)return!1;if(a!=null&&a.exact){if(!CB(ie.pathname,re.pathname,n.basepath))return!1}else{const De=Cg(ie.pathname,n.basepath),ue=Cg(re.pathname,n.basepath);if(!(De.startsWith(ue)&&(De.length===ue.length||De[ue.length]==="/")))return!1}return((a==null?void 0:a.includeSearch)??!0)&&!Al(ie.search,re.search,{partial:!(a!=null&&a.exact),ignoreUndefined:!(a!=null&&a.explicitUndefined)})?!1:a!=null&&a.includeHash?J&&ie.hash===re.hash:!0},[a==null?void 0:a.exact,a==null?void 0:a.explicitUndefined,a==null?void 0:a.includeHash,a==null?void 0:a.includeSearch,ie,ce,J,re.hash,re.pathname,re.search,n.basepath]),Ve=Ie?ra(i,{})??S7:Bv,X=Ie?Bv:ra(o,{})??Bv,Z=[T,Ve.className,X.className].filter(Boolean).join(" "),ne=(R||Ve.style||X.style)&&{...R,...Ve.style,...X.style},[xe,ge]=C.useState(!1),Ce=C.useRef(!1),le=e.reloadDocument||ce?!1:c??n.options.defaultPreload,oe=f??n.options.defaultPreloadDelay??0,me=C.useCallback(()=>{n.preloadRoute({...H,_builtLocation:re}).catch(De=>{console.warn(De),console.warn(i7)})},[n,H,re]);iB(r,C.useCallback(De=>{De!=null&&De.isIntersecting&&me()},[me]),R7,{disabled:!!_||le!=="viewport"}),C.useEffect(()=>{Ce.current||!_&&le==="render"&&(me(),Ce.current=!0)},[_,me,le]);const ae=De=>{const ue=De.currentTarget.getAttribute("target"),Se=x!==void 0?x:ue;if(!_&&!A7(De)&&!De.defaultPrevented&&(!Se||Se==="_self")&&De.button===0){De.preventDefault(),gn.flushSync(()=>{ge(!0)});const ke=n.subscribe("onResolved",()=>{ke(),ge(!1)});n.navigate({...H,replace:g,resetScroll:b,hashScrollIntoView:p,startTransition:y,viewTransition:v,ignoreBlocker:I})}};if(ce)return{...Y,ref:r,href:ce,...S&&{children:S},...x&&{target:x},..._&&{disabled:_},...R&&{style:R},...T&&{className:T},...A&&{onClick:A},...D&&{onBlur:D},...O&&{onFocus:O},...$&&{onMouseEnter:$},...z&&{onMouseLeave:z},...j&&{onTouchStart:j}};const Oe=De=>{if(_||le!=="intent")return;if(!oe){me();return}const ue=De.currentTarget;if(hd.has(ue))return;const Se=setTimeout(()=>{hd.delete(ue),me()},oe);hd.set(ue,Se)},Te=De=>{_||le!=="intent"||me()},_e=De=>{if(_||!le||!oe)return;const ue=De.currentTarget,Se=hd.get(ue);Se&&(clearTimeout(Se),hd.delete(ue))};return{...Y,...Ve,...X,href:Re==null?void 0:Re.href,ref:r,onClick:Gu([A,ae]),onBlur:Gu([D,_e]),onFocus:Gu([O,Oe]),onMouseEnter:Gu([$,Oe]),onMouseLeave:Gu([z,_e]),onTouchStart:Gu([j,Te]),disabled:!!_,target:x,...ne&&{style:ne},...Z&&{className:Z},..._&&C7,...Ie&&E7,...J&&xe&&k7}}var Bv={},S7={className:"active"},C7={role:"link","aria-disabled":!0},E7={"data-status":"active","aria-current":"page"},k7={"data-transitioning":"transitioning"},hd=new WeakMap,R7={rootMargin:"100px"},Gu=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function _7(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function T7(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var ef=C.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:i,...o}=w7(r,t),a=typeof r.children=="function"?r.children({isActive:o["data-status"]==="active"}):r.children;if(!n){const{disabled:u,...c}=o;return C.createElement("a",c,a)}return C.createElement(n,o,a)});function A7(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var D7=class extends e3{constructor(t){super(t),this.useMatch=n=>Vl({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>h3({...n,from:this.id}),this.useSearch=n=>f3({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>c3({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>u3({...n,from:this.id}),this.useLoaderData=n=>l3({...n,from:this.id}),this.useNavigate=()=>d3({from:this.fullPath}),this.Link=va.forwardRef((n,r)=>E.jsx(ef,{ref:r,from:this.fullPath,...n}))}};function M7(e){return new D7(e)}var O7=class extends o7{constructor(e){super(e),this.useMatch=t=>Vl({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>h3({...t,from:this.id}),this.useSearch=t=>f3({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>c3({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>u3({...t,from:this.id}),this.useLoaderData=t=>l3({...t,from:this.id}),this.useNavigate=()=>d3({from:this.fullPath}),this.Link=va.forwardRef((t,n)=>E.jsx(ef,{ref:n,from:this.fullPath,...t}))}};function $7(e){return new O7(e)}function wy(e){return new P7(e,{silent:!0}).createRoute}var P7=class{constructor(e,t){this.path=e,this.createRoute=n=>{const r=M7(n);return r.isRoot=!1,r},this.silent=t==null?void 0:t.silent}};function N7(e){const t=Xr(),n=`not-found-${Rr(t.stores.location,r=>r.pathname)}-${Rr(t.stores.status,r=>r)}`;return E.jsx(uS,{getResetKey:()=>n,onCatch:(r,i)=>{var o;if(Zn(r))(o=e.onCatch)==null||o.call(e,r,i);else throw r},errorComponent:({error:r})=>{var i;if(Zn(r))return(i=e.fallback)==null?void 0:i.call(e,r);throw r},children:e.children})}function I7(){return E.jsx("p",{children:"Not Found"})}function Qu(e){return E.jsx(E.Fragment,{children:e.children})}function p3(e,t,n){return t.options.notFoundComponent?E.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?E.jsx(e.options.defaultNotFoundComponent,{...n}):E.jsx(I7,{})}function j7(e){return null}function L7(){return j7(Xr()),null}var m3=C.memo(function({matchId:t}){const n=Xr(),r=n.stores.matchStores.get(t);r||Wo();const i=Rr(n.stores.loadedAt,a=>a),o=Rr(r,a=>a);return E.jsx(F7,{router:n,matchId:t,resetKey:i,matchState:C.useMemo(()=>{var c;const a=o.routeId,u=(c=n.routesById[a].parentRoute)==null?void 0:c.id;return{routeId:a,ssr:o.ssr,_displayPending:o._displayPending,parentRouteId:u}},[o._displayPending,o.routeId,o.ssr,n.routesById])})});function F7({router:e,matchId:t,resetKey:n,matchState:r}){var b,v;const i=e.routesById[r.routeId],o=i.options.pendingComponent??e.options.defaultPendingComponent,a=o?E.jsx(o,{}):null,u=i.options.errorComponent??e.options.defaultErrorComponent,c=i.options.onCatch??e.options.defaultOnCatch,f=i.isRoot?i.options.notFoundComponent??((b=e.options.notFoundRoute)==null?void 0:b.options.component):i.options.notFoundComponent,h=r.ssr===!1||r.ssr==="data-only",p=(!i.isRoot||i.options.wrapInSuspense||h)&&(i.options.wrapInSuspense??o??(((v=i.options.errorComponent)==null?void 0:v.preload)||h))?C.Suspense:Qu,g=u?uS:Qu,y=f?N7:Qu;return E.jsxs(i.isRoot?i.options.shellComponent??Qu:Qu,{children:[E.jsx(xy.Provider,{value:t,children:E.jsx(p,{fallback:a,children:E.jsx(g,{getResetKey:()=>n,errorComponent:u||cS,onCatch:(S,x)=>{if(Zn(S))throw S.routeId??(S.routeId=r.routeId),S;c==null||c(S,x)},children:E.jsx(y,{fallback:S=>{if(S.routeId??(S.routeId=r.routeId),!f||S.routeId&&S.routeId!==r.routeId||!S.routeId&&!i.isRoot)throw S;return C.createElement(f,S)},children:h||r._displayPending?E.jsx(l7,{fallback:a,children:E.jsx(cT,{matchId:t})}):E.jsx(cT,{matchId:t})})})})}),r.parentRouteId===Dl?E.jsxs(E.Fragment,{children:[E.jsx(z7,{resetKey:n}),e.options.scrollRestoration&&GO?E.jsx(L7,{}):null]}):null]})}function z7({resetKey:e}){const t=Xr(),n=C.useRef(void 0);return kd(()=>{const r=t.latestLocation.href;(n.current===void 0||n.current!==r)&&(t.emit({type:"onRendered",...ac(t.stores.location.get(),t.stores.resolvedLocation.get())}),n.current=r)},[t.latestLocation.state.__TSR_key,e,t]),null}var cT=C.memo(function({matchId:t}){const n=Xr(),r=(h,p)=>{var g;return((g=n.getMatch(h.id))==null?void 0:g._nonReactive[p])??h._nonReactive[p]},i=n.stores.matchStores.get(t);i||Wo();const o=Rr(i,h=>h),a=o.routeId,u=n.routesById[a],c=C.useMemo(()=>{var p;const h=(p=n.routesById[a].options.remountDeps??n.options.defaultRemountDeps)==null?void 0:p({routeId:a,loaderDeps:o.loaderDeps,params:o._strictParams,search:o._strictSearch});return h?JSON.stringify(h):void 0},[a,o.loaderDeps,o._strictParams,o._strictSearch,n.options.defaultRemountDeps,n.routesById]),f=C.useMemo(()=>{const h=u.options.component??n.options.defaultComponent;return h?E.jsx(h,{},c):E.jsx(fS,{})},[c,u.options.component,n.options.defaultComponent]);if(o._displayPending)throw r(o,"displayPendingPromise");if(o._forcePending)throw r(o,"minPendingPromise");if(o.status==="pending"){const h=u.options.pendingMinMs??n.options.defaultPendingMinMs;if(h){const p=n.getMatch(o.id);if(p&&!p._nonReactive.minPendingPromise){const g=Pc();p._nonReactive.minPendingPromise=g,setTimeout(()=>{g.resolve(),p._nonReactive.minPendingPromise=void 0},h)}}throw r(o,"loadPromise")}if(o.status==="notFound")return Zn(o.error)||Wo(),p3(n,u,o.error);if(o.status==="redirected")throw Er(o.error)||Wo(),r(o,"loadPromise");if(o.status==="error")throw o.error;return f}),fS=C.memo(function(){const t=Xr(),n=C.useContext(xy);let r,i=!1,o;{const f=n?t.stores.matchStores.get(n):void 0;[r,i]=Rr(f,h=>[h==null?void 0:h.routeId,(h==null?void 0:h.globalNotFound)??!1]),o=Rr(t.stores.matchesId,h=>h[h.findIndex(p=>p===n)+1])}const a=r?t.routesById[r]:void 0,u=t.options.defaultPendingComponent?E.jsx(t.options.defaultPendingComponent,{}):null;if(i)return a||Wo(),p3(t,a,void 0);if(!o)return null;const c=E.jsx(m3,{matchId:o});return r===Dl?E.jsx(C.Suspense,{fallback:u,children:c}):c});function B7(){const e=Xr(),t=C.useRef({router:e,mounted:!1}),[n,r]=C.useState(!1),i=Rr(e.stores.isLoading,p=>p),o=Rr(e.stores.hasPending,p=>p),a=Av(i),u=i||n||o,c=Av(u),f=i||o,h=Av(f);return e.startTransition=p=>{r(!0),C.startTransition(()=>{p(),r(!1)})},C.useEffect(()=>{const p=e.history.subscribe(e.load),g=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return ua(e.latestLocation.publicHref)!==ua(g.publicHref)&&e.commitLocation({...g,replace:!0}),()=>{p()}},[e,e.history]),kd(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(g){console.error(g)}})()},[e]),kd(()=>{a&&!i&&e.emit({type:"onLoad",...ac(e.stores.location.get(),e.stores.resolvedLocation.get())})},[a,e,i]),kd(()=>{h&&!f&&e.emit({type:"onBeforeRouteMount",...ac(e.stores.location.get(),e.stores.resolvedLocation.get())})},[f,h,e]),kd(()=>{if(c&&!u){const p=ac(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...p}),i3(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),p.hrefChanged&&s7(e)}},[u,c,e]),null}function U7(){const e=Xr(),t=e.routesById[Dl].options.pendingComponent??e.options.defaultPendingComponent,n=t?E.jsx(t,{}):null,r=E.jsxs(typeof document<"u"&&e.ssr?Qu:C.Suspense,{fallback:n,children:[E.jsx(B7,{}),E.jsx(H7,{})]});return e.options.InnerWrap?E.jsx(e.options.InnerWrap,{children:r}):r}function H7(){const e=Xr(),t=Rr(e.stores.firstId,i=>i),n=Rr(e.stores.loadedAt,i=>i),r=t?E.jsx(m3,{matchId:t}):null;return E.jsx(xy.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:E.jsx(uS,{getResetKey:()=>n,errorComponent:cS,onCatch:void 0,children:r})})}var G7=e=>({createMutableStore:oT,createReadonlyStore:oT,batch:i3}),q7=e=>new V7(e),V7=class extends QB{constructor(e){super(e,G7)}};function Y7({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=E.jsx(n3.Provider,{value:e,children:t});return e.options.Wrap?E.jsx(e.options.Wrap,{children:r}):r}function W7({router:e,...t}){return E.jsx(Y7,{router:e,...t,children:E.jsx(U7,{})})}function K7(e){const t=Xr({warn:(e==null?void 0:e.router)===void 0}),n=(e==null?void 0:e.router)||t,r=C.useRef(void 0);return Rr(n.stores.__store,i=>{if(e!=null&&e.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const o=ia(r.current,e.select(i));return r.current=o,o}return e.select(i)}return i})}function g3(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=g3(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Uv(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=g3(e))&&(r&&(r+=" "),r+=t);return r}const fT=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,X7=e=>{const t=function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var u,c;return typeof(e==null||(u=e.hooks)===null||u===void 0?void 0:u["cx:done"])<"u"?e==null?void 0:e.hooks["cx:done"](Uv(o)):typeof(e==null||(c=e.hooks)===null||c===void 0?void 0:c.onComplete)<"u"?e==null?void 0:e.hooks.onComplete(Uv(o)):Uv(o)};return{compose:function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return u=>{const c=Object.fromEntries(Object.entries(u||{}).filter(f=>{let[h]=f;return!["class","className"].includes(h)}));return t(o.map(f=>f(c)),u==null?void 0:u.class,u==null?void 0:u.className)}},cva:i=>o=>{var a;if((i==null?void 0:i.variants)==null)return t(i==null?void 0:i.base,o==null?void 0:o.class,o==null?void 0:o.className);const{variants:u,defaultVariants:c}=i,f=Object.keys(u).map(g=>{const y=o==null?void 0:o[g],b=c==null?void 0:c[g],v=fT(y)||fT(b);return u[g][v]}),h={...c,...o&&Object.entries(o).reduce((g,y)=>{let[b,v]=y;return typeof v>"u"?g:{...g,[b]:v}},{})},p=i==null||(a=i.compoundVariants)===null||a===void 0?void 0:a.reduce((g,y)=>{let{class:b,className:v,...S}=y;return Object.entries(S).every(x=>{let[_,R]=x;const T=h[_];return Array.isArray(R)?R.includes(T):T===R})?[...g,b,v]:g},[]);return t(i==null?void 0:i.base,f,p,o==null?void 0:o.class,o==null?void 0:o.className)},cx:t}},Q7=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Z7=(e,t)=>({classGroupId:e,validator:t}),y3=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),_g="-",dT=[],J7="arbitrary..",e9=e=>{const t=n9(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return t9(a);const u=a.split(_g),c=u[0]===""&&u.length>1?1:0;return b3(u,c,t)},getConflictingClassGroupIds:(a,u)=>{if(u){const c=r[a],f=n[a];return c?f?Q7(f,c):c:f||dT}return n[a]||dT}}},b3=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],o=n.nextPart.get(i);if(o){const f=b3(e,t+1,o);if(f)return f}const a=n.validators;if(a===null)return;const u=t===0?e.join(_g):e.slice(t).join(_g),c=a.length;for(let f=0;f<c;f++){const h=a[f];if(h.validator(u))return h.classGroupId}},t9=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?J7+r:void 0})(),n9=e=>{const{theme:t,classGroups:n}=e;return r9(n,t)},r9=(e,t)=>{const n=y3();for(const r in e){const i=e[r];dS(i,n,r,t)}return n},dS=(e,t,n,r)=>{const i=e.length;for(let o=0;o<i;o++){const a=e[o];i9(a,t,n,r)}},i9=(e,t,n,r)=>{if(typeof e=="string"){o9(e,t,n);return}if(typeof e=="function"){s9(e,t,n,r);return}a9(e,t,n,r)},o9=(e,t,n)=>{const r=e===""?t:v3(t,e);r.classGroupId=n},s9=(e,t,n,r)=>{if(l9(e)){dS(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Z7(n,e))},a9=(e,t,n,r)=>{const i=Object.entries(e),o=i.length;for(let a=0;a<o;a++){const[u,c]=i[a];dS(c,v3(t,u),n,r)}},v3=(e,t)=>{let n=e;const r=t.split(_g),i=r.length;for(let o=0;o<i;o++){const a=r[o];let u=n.nextPart.get(a);u||(u=y3(),n.nextPart.set(a,u)),n=u}return n},l9=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,u9=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(o,a)=>{n[o]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(o){let a=n[o];if(a!==void 0)return a;if((a=r[o])!==void 0)return i(o,a),a},set(o,a){o in n?n[o]=a:i(o,a)}}},Rx="!",hT=":",c9=[],pT=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),f9=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const o=[];let a=0,u=0,c=0,f;const h=i.length;for(let v=0;v<h;v++){const S=i[v];if(a===0&&u===0){if(S===hT){o.push(i.slice(c,v)),c=v+1;continue}if(S==="/"){f=v;continue}}S==="["?a++:S==="]"?a--:S==="("?u++:S===")"&&u--}const p=o.length===0?i:i.slice(c);let g=p,y=!1;p.endsWith(Rx)?(g=p.slice(0,-1),y=!0):p.startsWith(Rx)&&(g=p.slice(1),y=!0);const b=f&&f>c?f-c:void 0;return pT(o,y,g,b)};if(t){const i=t+hT,o=r;r=a=>a.startsWith(i)?o(a.slice(i.length)):pT(c9,!1,a,void 0,!0)}if(n){const i=r;r=o=>n({className:o,parseClassName:i})}return r},d9=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let o=0;o<n.length;o++){const a=n[o],u=a[0]==="[",c=t.has(a);u||c?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(a)):i.push(a)}return i.length>0&&(i.sort(),r.push(...i)),r}},h9=e=>({cache:u9(e.cacheSize),parseClassName:f9(e),sortModifiers:d9(e),...e9(e)}),p9=/\s+/,m9=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:o}=t,a=[],u=e.trim().split(p9);let c="";for(let f=u.length-1;f>=0;f-=1){const h=u[f],{isExternal:p,modifiers:g,hasImportantModifier:y,baseClassName:b,maybePostfixModifierPosition:v}=n(h);if(p){c=h+(c.length>0?" "+c:c);continue}let S=!!v,x=r(S?b.substring(0,v):b);if(!x){if(!S){c=h+(c.length>0?" "+c:c);continue}if(x=r(b),!x){c=h+(c.length>0?" "+c:c);continue}S=!1}const _=g.length===0?"":g.length===1?g[0]:o(g).join(":"),R=y?_+Rx:_,T=R+x;if(a.indexOf(T)>-1)continue;a.push(T);const A=i(x,S);for(let D=0;D<A.length;++D){const O=A[D];a.push(R+O)}c=h+(c.length>0?" "+c:c)}return c},g9=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=x3(n))&&(i&&(i+=" "),i+=r);return i},x3=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=x3(e[r]))&&(n&&(n+=" "),n+=t);return n},y9=(e,...t)=>{let n,r,i,o;const a=c=>{const f=t.reduce((h,p)=>p(h),e());return n=h9(f),r=n.cache.get,i=n.cache.set,o=u,u(c)},u=c=>{const f=r(c);if(f)return f;const h=m9(c,n);return i(c,h),h};return o=a,(...c)=>o(g9(...c))},b9=[],En=e=>{const t=n=>n[e]||b9;return t.isThemeGetter=!0,t},w3=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,S3=/^\((?:(\w[\w-]*):)?(.+)\)$/i,v9=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,x9=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,w9=/\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$/,S9=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,C9=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,E9=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$s=e=>v9.test(e),ht=e=>!!e&&!Number.isNaN(Number(e)),Ps=e=>!!e&&Number.isInteger(Number(e)),Hv=e=>e.endsWith("%")&&ht(e.slice(0,-1)),Mo=e=>x9.test(e),C3=()=>!0,k9=e=>w9.test(e)&&!S9.test(e),hS=()=>!1,R9=e=>C9.test(e),_9=e=>E9.test(e),T9=e=>!Ue(e)&&!Ge(e),A9=e=>Ca(e,R3,hS),Ue=e=>w3.test(e),rl=e=>Ca(e,_3,k9),mT=e=>Ca(e,j9,ht),D9=e=>Ca(e,A3,C3),M9=e=>Ca(e,T3,hS),gT=e=>Ca(e,E3,hS),O9=e=>Ca(e,k3,_9),cm=e=>Ca(e,D3,R9),Ge=e=>S3.test(e),pd=e=>Yl(e,_3),$9=e=>Yl(e,T3),yT=e=>Yl(e,E3),P9=e=>Yl(e,R3),N9=e=>Yl(e,k3),fm=e=>Yl(e,D3,!0),I9=e=>Yl(e,A3,!0),Ca=(e,t,n)=>{const r=w3.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Yl=(e,t,n=!1)=>{const r=S3.exec(e);return r?r[1]?t(r[1]):n:!1},E3=e=>e==="position"||e==="percentage",k3=e=>e==="image"||e==="url",R3=e=>e==="length"||e==="size"||e==="bg-size",_3=e=>e==="length",j9=e=>e==="number",T3=e=>e==="family-name",A3=e=>e==="number"||e==="weight",D3=e=>e==="shadow",L9=()=>{const e=En("color"),t=En("font"),n=En("text"),r=En("font-weight"),i=En("tracking"),o=En("leading"),a=En("breakpoint"),u=En("container"),c=En("spacing"),f=En("radius"),h=En("shadow"),p=En("inset-shadow"),g=En("text-shadow"),y=En("drop-shadow"),b=En("blur"),v=En("perspective"),S=En("aspect"),x=En("ease"),_=En("animate"),R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...T(),Ge,Ue],D=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],$=()=>[Ge,Ue,c],z=()=>[$s,"full","auto",...$()],j=()=>[Ps,"none","subgrid",Ge,Ue],I=()=>["auto",{span:["full",Ps,Ge,Ue]},Ps,Ge,Ue],M=()=>[Ps,"auto",Ge,Ue],B=()=>["auto","min","max","fr",Ge,Ue],G=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],L=()=>["start","end","center","stretch","center-safe","end-safe"],F=()=>["auto",...$()],U=()=>[$s,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...$()],V=()=>[$s,"screen","full","dvw","lvw","svw","min","max","fit",...$()],W=()=>[$s,"screen","full","lh","dvh","lvh","svh","min","max","fit",...$()],N=()=>[e,Ge,Ue],Y=()=>[...T(),yT,gT,{position:[Ge,Ue]}],J=()=>["no-repeat",{repeat:["","x","y","space","round"]}],H=()=>["auto","cover","contain",P9,A9,{size:[Ge,Ue]}],ie=()=>[Hv,pd,rl],re=()=>["","none","full",f,Ge,Ue],he=()=>["",ht,pd,rl],ve=()=>["solid","dashed","dotted","double"],Re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ce=()=>[ht,Hv,yT,gT],Ie=()=>["","none",b,Ge,Ue],Ve=()=>["none",ht,Ge,Ue],X=()=>["none",ht,Ge,Ue],Z=()=>[ht,Ge,Ue],ne=()=>[$s,"full",...$()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Mo],breakpoint:[Mo],color:[C3],container:[Mo],"drop-shadow":[Mo],ease:["in","out","in-out"],font:[T9],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Mo],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Mo],shadow:[Mo],spacing:["px",ht],text:[Mo],"text-shadow":[Mo],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",$s,Ue,Ge,S]}],container:["container"],columns:[{columns:[ht,Ue,Ge,u]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"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:A()}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:z()}],"inset-x":[{"inset-x":z()}],"inset-y":[{"inset-y":z()}],start:[{"inset-s":z(),start:z()}],end:[{"inset-e":z(),end:z()}],"inset-bs":[{"inset-bs":z()}],"inset-be":[{"inset-be":z()}],top:[{top:z()}],right:[{right:z()}],bottom:[{bottom:z()}],left:[{left:z()}],visibility:["visible","invisible","collapse"],z:[{z:[Ps,"auto",Ge,Ue]}],basis:[{basis:[$s,"full","auto",u,...$()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ht,$s,"auto","initial","none",Ue]}],grow:[{grow:["",ht,Ge,Ue]}],shrink:[{shrink:["",ht,Ge,Ue]}],order:[{order:[Ps,"first","last","none",Ge,Ue]}],"grid-cols":[{"grid-cols":j()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":j()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":B()}],"auto-rows":[{"auto-rows":B()}],gap:[{gap:$()}],"gap-x":[{"gap-x":$()}],"gap-y":[{"gap-y":$()}],"justify-content":[{justify:[...G(),"normal"]}],"justify-items":[{"justify-items":[...L(),"normal"]}],"justify-self":[{"justify-self":["auto",...L()]}],"align-content":[{content:["normal",...G()]}],"align-items":[{items:[...L(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...L(),{baseline:["","last"]}]}],"place-content":[{"place-content":G()}],"place-items":[{"place-items":[...L(),"baseline"]}],"place-self":[{"place-self":["auto",...L()]}],p:[{p:$()}],px:[{px:$()}],py:[{py:$()}],ps:[{ps:$()}],pe:[{pe:$()}],pbs:[{pbs:$()}],pbe:[{pbe:$()}],pt:[{pt:$()}],pr:[{pr:$()}],pb:[{pb:$()}],pl:[{pl:$()}],m:[{m:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mbs:[{mbs:F()}],mbe:[{mbe:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"space-x":[{"space-x":$()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":$()}],"space-y-reverse":["space-y-reverse"],size:[{size:U()}],"inline-size":[{inline:["auto",...V()]}],"min-inline-size":[{"min-inline":["auto",...V()]}],"max-inline-size":[{"max-inline":["none",...V()]}],"block-size":[{block:["auto",...W()]}],"min-block-size":[{"min-block":["auto",...W()]}],"max-block-size":[{"max-block":["none",...W()]}],w:[{w:[u,"screen",...U()]}],"min-w":[{"min-w":[u,"screen","none",...U()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[a]},...U()]}],h:[{h:["screen","lh",...U()]}],"min-h":[{"min-h":["screen","lh","none",...U()]}],"max-h":[{"max-h":["screen","lh",...U()]}],"font-size":[{text:["base",n,pd,rl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,I9,D9]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Hv,Ue]}],"font-family":[{font:[$9,M9,t]}],"font-features":[{"font-features":[Ue]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Ge,Ue]}],"line-clamp":[{"line-clamp":[ht,"none",Ge,mT]}],leading:[{leading:[o,...$()]}],"list-image":[{"list-image":["none",Ge,Ue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ge,Ue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[ht,"from-font","auto",Ge,rl]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[ht,"auto",Ge,Ue]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ge,Ue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ge,Ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Y()}],"bg-repeat":[{bg:J()}],"bg-size":[{bg:H()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ps,Ge,Ue],radial:["",Ge,Ue],conic:[Ps,Ge,Ue]},N9,O9]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:re()}],"rounded-s":[{"rounded-s":re()}],"rounded-e":[{"rounded-e":re()}],"rounded-t":[{"rounded-t":re()}],"rounded-r":[{"rounded-r":re()}],"rounded-b":[{"rounded-b":re()}],"rounded-l":[{"rounded-l":re()}],"rounded-ss":[{"rounded-ss":re()}],"rounded-se":[{"rounded-se":re()}],"rounded-ee":[{"rounded-ee":re()}],"rounded-es":[{"rounded-es":re()}],"rounded-tl":[{"rounded-tl":re()}],"rounded-tr":[{"rounded-tr":re()}],"rounded-br":[{"rounded-br":re()}],"rounded-bl":[{"rounded-bl":re()}],"border-w":[{border:he()}],"border-w-x":[{"border-x":he()}],"border-w-y":[{"border-y":he()}],"border-w-s":[{"border-s":he()}],"border-w-e":[{"border-e":he()}],"border-w-bs":[{"border-bs":he()}],"border-w-be":[{"border-be":he()}],"border-w-t":[{"border-t":he()}],"border-w-r":[{"border-r":he()}],"border-w-b":[{"border-b":he()}],"border-w-l":[{"border-l":he()}],"divide-x":[{"divide-x":he()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":he()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ve(),"hidden","none"]}],"divide-style":[{divide:[...ve(),"hidden","none"]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-bs":[{"border-bs":N()}],"border-color-be":[{"border-be":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ht,Ge,Ue]}],"outline-w":[{outline:["",ht,pd,rl]}],"outline-color":[{outline:N()}],shadow:[{shadow:["","none",h,fm,cm]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":["none",p,fm,cm]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:he()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[ht,rl]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":he()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":["none",g,fm,cm]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[ht,Ge,Ue]}],"mix-blend":[{"mix-blend":[...Re(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Re()}],"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":[ht]}],"mask-image-linear-from-pos":[{"mask-linear-from":ce()}],"mask-image-linear-to-pos":[{"mask-linear-to":ce()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":ce()}],"mask-image-t-to-pos":[{"mask-t-to":ce()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":ce()}],"mask-image-r-to-pos":[{"mask-r-to":ce()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":ce()}],"mask-image-b-to-pos":[{"mask-b-to":ce()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":ce()}],"mask-image-l-to-pos":[{"mask-l-to":ce()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":ce()}],"mask-image-x-to-pos":[{"mask-x-to":ce()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":ce()}],"mask-image-y-to-pos":[{"mask-y-to":ce()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[Ge,Ue]}],"mask-image-radial-from-pos":[{"mask-radial-from":ce()}],"mask-image-radial-to-pos":[{"mask-radial-to":ce()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"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":T()}],"mask-image-conic-pos":[{"mask-conic":[ht]}],"mask-image-conic-from-pos":[{"mask-conic-from":ce()}],"mask-image-conic-to-pos":[{"mask-conic-to":ce()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Y()}],"mask-repeat":[{mask:J()}],"mask-size":[{mask:H()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ge,Ue]}],filter:[{filter:["","none",Ge,Ue]}],blur:[{blur:Ie()}],brightness:[{brightness:[ht,Ge,Ue]}],contrast:[{contrast:[ht,Ge,Ue]}],"drop-shadow":[{"drop-shadow":["","none",y,fm,cm]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:["",ht,Ge,Ue]}],"hue-rotate":[{"hue-rotate":[ht,Ge,Ue]}],invert:[{invert:["",ht,Ge,Ue]}],saturate:[{saturate:[ht,Ge,Ue]}],sepia:[{sepia:["",ht,Ge,Ue]}],"backdrop-filter":[{"backdrop-filter":["","none",Ge,Ue]}],"backdrop-blur":[{"backdrop-blur":Ie()}],"backdrop-brightness":[{"backdrop-brightness":[ht,Ge,Ue]}],"backdrop-contrast":[{"backdrop-contrast":[ht,Ge,Ue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ht,Ge,Ue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ht,Ge,Ue]}],"backdrop-invert":[{"backdrop-invert":["",ht,Ge,Ue]}],"backdrop-opacity":[{"backdrop-opacity":[ht,Ge,Ue]}],"backdrop-saturate":[{"backdrop-saturate":[ht,Ge,Ue]}],"backdrop-sepia":[{"backdrop-sepia":["",ht,Ge,Ue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":$()}],"border-spacing-x":[{"border-spacing-x":$()}],"border-spacing-y":[{"border-spacing-y":$()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ge,Ue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ht,"initial",Ge,Ue]}],ease:[{ease:["linear","initial",x,Ge,Ue]}],delay:[{delay:[ht,Ge,Ue]}],animate:[{animate:["none",_,Ge,Ue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,Ge,Ue]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:Ve()}],"rotate-x":[{"rotate-x":Ve()}],"rotate-y":[{"rotate-y":Ve()}],"rotate-z":[{"rotate-z":Ve()}],scale:[{scale:X()}],"scale-x":[{"scale-x":X()}],"scale-y":[{"scale-y":X()}],"scale-z":[{"scale-z":X()}],"scale-3d":["scale-3d"],skew:[{skew:Z()}],"skew-x":[{"skew-x":Z()}],"skew-y":[{"skew-y":Z()}],transform:[{transform:[Ge,Ue,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ne()}],"translate-x":[{"translate-x":ne()}],"translate-y":[{"translate-y":ne()}],"translate-z":[{"translate-z":ne()}],"translate-none":["translate-none"],accent:[{accent:N()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:N()}],"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",Ge,Ue]}],"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":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mbs":[{"scroll-mbs":$()}],"scroll-mbe":[{"scroll-mbe":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pbs":[{"scroll-pbs":$()}],"scroll-pbe":[{"scroll-pbe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"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",Ge,Ue]}],fill:[{fill:["none",...N()]}],"stroke-w":[{stroke:[ht,pd,rl,mT]}],stroke:[{stroke:["none",...N()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},F9=y9(L9),M3=X7({hooks:{onComplete:e=>F9(e)}}),Jn=M3.cva;function ze(...e){const t=M3.cx(...e);return t.trim()?t:void 0}const O3=({render:e,children:t,props:n,fallbackElement:r="div"})=>C.isValidElement(e)?C.cloneElement(e,{...n,children:t??e.props.children,className:ze(e.props.className,n.className),style:{...e.props.style,...n.style}}):C.createElement(r,n,t);function bT(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function z9(...e){return t=>{let n=!1;const r=e.map(i=>{const o=bT(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():bT(e[i],null)}}}}function B9(...e){return C.useCallback(t=>z9(...e)(t),e)}const U9=["evenly","fullwidth","fullheight","fullscreen"],H9=["ax","ay","direction"],G9={property:"justifyContent",values:["space-around","baseline","space-between","center","end","evenly","normal","start","stretch"]},q9={property:"alignItems",values:["baseline","center","end","start","stretch"]},V9={property:"flexDirection",values:["column","row"]},Y9=["b","bx","bl","br","by","bt","bb"],W9={property:"borderWidth"},K9={property:"borderInlineWidth"},X9={property:"borderInlineStartWidth"},Q9={property:"borderInlineEndWidth"},Z9={property:"borderBlockWidth"},J9={property:"borderBlockStartWidth"},eU={property:"borderBlockEndWidth"},tU=["gap","m","mx","ml","mr","my","mt","mb","p","px","pl","pr","py","pt","pb"],nU={property:"gap",unit:{variable:"--spacing-unit"}},rU={property:"margin",unit:{variable:"--spacing-unit"}},iU={property:"marginInline",unit:{variable:"--spacing-inline"}},oU={property:"marginInlineStart",unit:{variable:"--spacing-inline"}},sU={property:"marginInlineEnd",unit:{variable:"--spacing-inline"}},aU={property:"marginBlock",unit:{variable:"--spacing-block"}},lU={property:"marginBlockStart",unit:{variable:"--spacing-block"}},uU={property:"marginBlockEnd",unit:{variable:"--spacing-block"}},cU={property:"padding",unit:{variable:"--spacing-unit"}},fU={property:"paddingInline",unit:{variable:"--spacing-inline"}},dU={property:"paddingInlineStart",unit:{variable:"--spacing-inline"}},hU={property:"paddingInlineEnd",unit:{variable:"--spacing-inline"}},pU={property:"paddingBlock",unit:{variable:"--spacing-block"}},mU={property:"paddingBlockStart",unit:{variable:"--spacing-block"}},gU={property:"paddingBlockEnd",unit:{variable:"--spacing-block"}},yU=["w","minw","maxw","h","minh","maxh"],bU={property:"width"},vU={property:"minWidth"},xU={property:"maxWidth"},wU={property:"height"},SU={property:"minHeight"},CU={property:"maxHeight"},$3={b:W9,bx:K9,bl:X9,br:Q9,by:Z9,bt:J9,bb:eU,ax:G9,ay:q9,direction:V9,gap:nU,m:rU,mx:iU,ml:oU,mr:sU,my:aU,mt:lU,mb:uU,p:cU,px:fU,pl:dU,pr:hU,py:pU,pt:mU,pb:gU,w:bU,minw:vU,maxw:xU,h:wU,minh:SU,maxh:CU},EU=Object.keys($3);({...Object.fromEntries(tU.map(e=>[e,"spacing"])),...Object.fromEntries(H9.map(e=>[e,"layout"])),...Object.fromEntries(yU.map(e=>[e,"sizing"])),...Object.fromEntries(Y9.map(e=>[e,"border"])),...Object.fromEntries(U9.map(e=>[e,"toggle"]))});function P3({componentName:e,props:t,styleProps:n=[]}){const r={"data-slot":e},i={},o={};for(const[u,c]of Object.entries(t))if(n.includes(u)&&c!==void 0){const f=$3[u];if(f&&c!=null)if("unit"in f&&f.unit&&typeof c=="number"){const h="suffix"in f.unit&&f.unit.suffix||"",p=`calc(${c} * var(${f.unit.variable}))${h}`;o[f.property]=p}else typeof c=="number"?o[f.property]=`${c}px`:o[f.property]=c}else i[u]=c;const a=Object.keys(o).length>0?{...o,...i.style||{}}:i.style;return{...r,...i,...a&&{style:a}}}const kU="_box_1f7bt_1",Ls={box:kU,"toggle-evenly":"_toggle-evenly_1f7bt_8","toggle-fullheight":"_toggle-fullheight_1f7bt_15","toggle-fullwidth":"_toggle-fullwidth_1f7bt_20","toggle-fullscreen":"_toggle-fullscreen_1f7bt_26","toggle-rounded":"_toggle-rounded_1f7bt_31","toggle-square":"_toggle-square_1f7bt_35","toggle-bordered":"_toggle-bordered_1f7bt_39"},RU=Jn({variants:{bordered:{true:Ls["toggle-bordered"]},evenly:{true:Ls["toggle-evenly"]},rounded:{true:Ls["toggle-rounded"]},square:{true:Ls["toggle-square"]},fullheight:{true:Ls["toggle-fullheight"]},fullwidth:{true:Ls["toggle-fullwidth"]},fullscreen:{true:Ls["toggle-fullscreen"]}}}),Ko=({bordered:e,evenly:t,fullwidth:n,fullheight:r,fullscreen:i,rounded:o,square:a,render:u,className:c,children:f,...h})=>{const p=P3({componentName:"box",styleProps:EU,props:h});return O3({fallbackElement:"div",props:{...p,className:ze(Ls.box,RU({bordered:e,evenly:t,fullwidth:n,fullheight:r,fullscreen:i,rounded:o,square:a}),c)},render:u,children:f})};Ko.displayName="Box";function cr({condition:e,render:t,children:n}){if(!e||!t)return E.jsx(E.Fragment,{children:n});const r=n??t.props.children;return C.cloneElement(t,void 0,r)}cr.displayName="ConditionalRender";const _U="_group_h0evt_1",TU={group:_U},Xe=({className:e,...t})=>E.jsx(Ko,{"data-slot":"group",className:ze(TU.group,e),...t});Xe.displayName="Group";const AU="_layer_hu2g5_1",DU={layer:AU},pS=({offset:e,className:t,style:n,children:r,...i})=>{const o={...n,...(e==null?void 0:e.x)!==void 0&&{"--layer-offset-x":`${e.x}px`},...(e==null?void 0:e.y)!==void 0&&{"--layer-offset-y":`${e.y}px`}};return E.jsx(Ko,{"data-slot":"layer",className:ze(DU.layer,t),style:o,...i,children:r})};pS.displayName="Layer";const MU="_text_opfqd_3",OU="_colored_opfqd_138",mt={text:MU,"text-size--1":"_text-size--1_opfqd_25","text-size-0":"_text-size-0_opfqd_31","text-size-1":"_text-size-1_opfqd_37","text-size-2":"_text-size-2_opfqd_43","text-size-3":"_text-size-3_opfqd_51","text-size-4":"_text-size-4_opfqd_59","text-size-5":"_text-size-5_opfqd_67","text-size-6":"_text-size-6_opfqd_75","shade-background":"_shade-background_opfqd_84","shade-surface":"_shade-surface_opfqd_87","shade-accent":"_shade-accent_opfqd_90","shade-halftone":"_shade-halftone_opfqd_93","shade-muted":"_shade-muted_opfqd_96","shade-foreground":"_shade-foreground_opfqd_99","color-red":"_color-red_opfqd_104","color-orange":"_color-orange_opfqd_108","color-yellow":"_color-yellow_opfqd_112","color-green":"_color-green_opfqd_116","color-blue":"_color-blue_opfqd_120","color-indigo":"_color-indigo_opfqd_124","color-purple":"_color-purple_opfqd_128","color-neutral":"_color-neutral_opfqd_132",colored:OU,"toggle-underline":"_toggle-underline_opfqd_145","toggle-no-underline":"_toggle-no-underline_opfqd_149","toggle-strikethrough":"_toggle-strikethrough_opfqd_153","toggle-balance":"_toggle-balance_opfqd_157","toggle-truncate":"_toggle-truncate_opfqd_161","family-mono":"_family-mono_opfqd_169","family-serif":"_family-serif_opfqd_173","family-sans":"_family-sans_opfqd_177","weight-thin":"_weight-thin_opfqd_181","weight-light":"_weight-light_opfqd_184","weight-normal":"_weight-normal_opfqd_187","weight-medium":"_weight-medium_opfqd_190","weight-semibold":"_weight-semibold_opfqd_193","weight-bold":"_weight-bold_opfqd_196"},mS={red:mt["color-red"],orange:mt["color-orange"],yellow:mt["color-yellow"],green:mt["color-green"],blue:mt["color-blue"],indigo:mt["color-indigo"],purple:mt["color-purple"],neutral:mt["color-neutral"]},$U=mt.colored,PU=Object.fromEntries(Object.entries(mS).map(([e,t])=>[e,`${t} ${$U}`])),NU=Jn({variants:{strikethrough:{true:mt["toggle-strikethrough"]},balance:{true:mt["toggle-balance"]},truncate:{true:mt["toggle-truncate"]},underline:{true:mt["toggle-underline"],false:mt["toggle-no-underline"]},family:{mono:mt["family-mono"],serif:mt["family-serif"],sans:mt["family-sans"]},weight:{thin:mt["weight-thin"],light:mt["weight-light"],normal:mt["weight-normal"],medium:mt["weight-medium"],semibold:mt["weight-semibold"],bold:mt["weight-bold"]},shade:{background:mt["shade-background"],surface:mt["shade-surface"],accent:mt["shade-accent"],halftone:mt["shade-halftone"],muted:mt["shade-muted"],foreground:mt["shade-foreground"]},color:PU,size:{[-1]:mt["text-size--1"],0:mt["text-size-0"],1:mt["text-size-1"],2:mt["text-size-2"],3:mt["text-size-3"],4:mt["text-size-4"],5:mt["text-size-5"],6:mt["text-size-6"]}}}),IU=0,jU="sans",je=({shade:e,color:t,weight:n,underline:r,strikethrough:i,balance:o,truncate:a,size:u=IU,family:c=jU,render:f,className:h,children:p,...g})=>{const y=P3({componentName:"text",styleProps:["p","px","py","pl","pr","pt","pb","m","mx","my","ml","mr","mt","mb"],props:g});return O3({fallbackElement:"span",props:{...y,className:ze(mt.text,NU({shade:e,color:t,size:u,weight:n,family:c,balance:o,truncate:a,underline:r,strikethrough:i}),h)},render:f,children:p})},LU="_stack_1svur_1",FU={stack:LU},Ye=({ax:e,ay:t,className:n,...r})=>E.jsx(Ko,{"data-slot":"stack",ax:t,ay:e,className:ze(FU.stack,n),...r});Ye.displayName="Stack";const tf=({condition:e,render:t,children:n,...r})=>{const i=e?t.true:t.false;if(!i)return E.jsx(E.Fragment,{children:n});const o=n??i.props.children;return C.cloneElement(i,r,o)};tf.displayName="SwitchRender";const zU="_separator_1u3u3_1",BU="_line_1u3u3_34",hi={separator:zU,"shade-background":"_shade-background_1u3u3_5","shade-surface":"_shade-surface_1u3u3_8","shade-accent":"_shade-accent_1u3u3_11","shade-halftone":"_shade-halftone_1u3u3_14","shade-muted":"_shade-muted_1u3u3_17","shade-foreground":"_shade-foreground_1u3u3_20","orientation-horizontal":"_orientation-horizontal_1u3u3_24","orientation-vertical":"_orientation-vertical_1u3u3_28",line:BU,"line-horizontal":"_line-horizontal_1u3u3_37","line-vertical":"_line-vertical_1u3u3_40"},vT=Jn({variants:{orientation:{horizontal:hi["orientation-horizontal"],vertical:hi["orientation-vertical"]},shade:{background:hi["shade-background"],surface:hi["shade-surface"],accent:hi["shade-accent"],halftone:hi["shade-halftone"],muted:hi["shade-muted"],foreground:hi["shade-foreground"]}}}),xT={};function N3(e,t){const n=C.useRef(xT);return n.current===xT&&(n.current=e(t)),n}function wT(e,t,n,r){const i=N3(I3).current;return HU(i,e,t,n,r)&&j3(i,[e,t,n,r]),i.callback}function UU(e){const t=N3(I3).current;return GU(t,e)&&j3(t,e),t.callback}function I3(){return{callback:null,cleanup:null,refs:[]}}function HU(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function GU(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function j3(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const a=o(n);typeof a=="function"&&(r[i]=a);break}case"object":{o.current=n;break}}}e.cleanup=()=>{for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const a=r[i];typeof a=="function"?a():o(null);break}case"object":{o.current=null;break}}}}}}}const qU=parseInt(C.version,10);function VU(e){return qU>=e}function ST(e){if(!C.isValidElement(e))return null;const t=e,n=t.props;return(VU(19)?n==null?void 0:n.ref:t.ref)??null}function _x(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function YU(e,t){const n={};for(const r in e){const i=e[r];if(t!=null&&t.hasOwnProperty(r)){const o=t[r](i);o!=null&&Object.assign(n,o);continue}i===!0?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function WU(e,t){return typeof e=="function"?e(t):e}function KU(e,t){return typeof e=="function"?e(t):e}const Zu=Object.freeze({}),_d={};function XU(e,t,n,r,i){let o={...Tx(e,_d)};return t&&(o=L3(o,t)),o}function QU(e){if(e.length===0)return _d;if(e.length===1)return Tx(e[0],_d);let t={...Tx(e[0],_d)};for(let n=1;n<e.length;n+=1)t=L3(t,e[n]);return t}function L3(e,t){return F3(t)?t(e):ZU(e,t)}function ZU(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=_x(e.style,r);break}case"className":{e[n]=z3(e.className,r);break}default:JU(n,r)?e[n]=eH(e[n],r):e[n]=r}}return e}function JU(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t=="function"||typeof t>"u")}function F3(e){return typeof e=="function"}function Tx(e,t){return F3(e)?e(t):e??_d}function eH(e,t){return t?e?n=>{if(nH(n)){const i=n;tH(i);const o=t(i);return i.baseUIHandlerPrevented||(e==null||e(i)),o}const r=t(n);return e==null||e(n),r}:t:e}function tH(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function z3(e,t){return t?e?t+" "+e:t:e}function nH(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function rH(e,t,n={}){const r=t.render,i=iH(t,n);if(n.enabled===!1)return null;const o=n.state??Zu;return sH(e,r,i,o)}function iH(e,t={}){const{className:n,style:r,render:i}=e,{state:o=Zu,ref:a,props:u,stateAttributesMapping:c,enabled:f=!0}=t,h=f?WU(n,o):void 0,p=f?KU(r,o):void 0,g=f?YU(o,c):Zu,y=f?_x(g,Array.isArray(u)?QU(u):u)??Zu:Zu;return typeof document<"u"&&(f?Array.isArray(a)?y.ref=UU([y.ref,ST(i),...a]):y.ref=wT(y.ref,ST(i),a):wT(null,null)),f?(h!==void 0&&(y.className=z3(y.className,h)),p!==void 0&&(y.style=_x(y.style,p)),y):Zu}const oH=Symbol.for("react.lazy");function sH(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=XU(n,t.props);i.ref=n.ref;let o=t;return(o==null?void 0:o.$$typeof)===oH&&(o=C.Children.toArray(t)[0]),C.cloneElement(o,i)}return aH(e,n)}function aH(e,t){return C.createElement(e,t)}const lH=C.forwardRef(function(e,t){const{className:n,render:r,orientation:i="horizontal",...o}=e;return rH("div",e,{state:{orientation:i},ref:t,props:[{role:"separator","aria-orientation":i},o]})}),gS=({shade:e,orientation:t="horizontal",className:n,children:r,render:i,...o})=>{if(r){const a=ze(hi.separator,hi.line,hi[`line-${t}`],vT({shade:e}));return E.jsxs(tf,{condition:t==="horizontal",render:{true:E.jsx(Xe,{ay:"center",gap:2,fullwidth:!0}),false:E.jsx(Ye,{ax:"center",gap:2,fullheight:!0})},role:"separator","data-slot":"separator","data-orientation":t,className:n,...o,children:[E.jsx(Ko,{className:a}),E.jsx(cr,{condition:typeof r=="string",render:E.jsx(je,{shade:"muted",weight:"bold"}),children:r}),E.jsx(Ko,{className:a})]})}return E.jsx(lH,{"data-slot":"separator",render:i??E.jsx(Ko,{}),className:ze(hi.separator,vT({shade:e,orientation:t}),n),"data-orientation":t,...o})};gS.displayName="Separator";const uH="_button_4h2ty_3 _disabled_dkczp_2",cH="_fullwidth_4h2ty_138",vr={button:uH,"button-content-container":"_button-content-container_4h2ty_46","button-spinner":"_button-spinner_4h2ty_58","variant-subtle":"_variant-subtle_4h2ty_72","variant-ghost":"_variant-ghost_4h2ty_81","variant-inverted":"_variant-inverted_4h2ty_91","size-xsmall":"_size-xsmall_4h2ty_101","size-small":"_size-small_4h2ty_107","size-medium":"_size-medium_4h2ty_112","size-large":"_size-large_4h2ty_117","shape-pill":"_shape-pill_4h2ty_123","shape-square":"_shape-square_4h2ty_127","shape-circle":"_shape-circle_4h2ty_132",fullwidth:cH},fH="medium",dH=Jn({variants:{shape:{pill:vr["shape-pill"],square:vr["shape-square"],circle:vr["shape-circle"]},fullwidth:{true:vr.fullwidth},variant:{subtle:vr["variant-subtle"],ghost:vr["variant-ghost"],inverted:vr["variant-inverted"]},size:{xsmall:vr["size-xsmall"],small:vr["size-small"],medium:vr["size-medium"],large:vr["size-large"]}},defaultVariants:{size:fH}}),B3=({loading:e,children:t,...n})=>E.jsx(Xe,{"data-slot":"button-content-container",className:vr["button-content-container"],"data-loading":e,"aria-hidden":e,ay:"center",gap:2,...n,children:t});B3.displayName="ButtonContentContainer";function hH(){return typeof window<"u"}function pH(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function mH(e){return hH()?e instanceof HTMLElement||e instanceof pH(e).HTMLElement:!1}const CT={};function yS(e,t){const n=C.useRef(CT);return n.current===CT&&(n.current=e(t)),n}const Gv=os[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],gH=Gv&&Gv!==C.useLayoutEffect?Gv:e=>e();function Ax(e){const t=yS(yH).current;return t.next=e,gH(t.effect),t.trampoline}function yH(){const e={next:void 0,callback:bH,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function bH(){}const vH={...os},xH=()=>{},Dx=typeof document<"u"?C.useLayoutEffect:xH;function bS(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}const wH=C.createContext(void 0);function U3(e=!1){const t=C.useContext(wH);if(t===void 0&&!e)throw new Error(bS(16));return t}function SH(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:o}=e,a=r&&t!==!1,u=r&&t===!1;return{props:C.useMemo(()=>{const c={onKeyDown(f){n&&t&&f.key!=="Tab"&&f.preventDefault()}};return r||(c.tabIndex=i,!o&&n&&(c.tabIndex=t?i:-1)),(o&&(t||a)||!o&&n)&&(c["aria-disabled"]=n),o&&(!t||u)&&(c.disabled=n),c},[r,n,t,a,u,o,i])}}function Mx(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const Td={};function H3(e,t,n,r,i){let o={...Ox(e,Td)};return t&&(o=tg(o,t)),n&&(o=tg(o,n)),r&&(o=tg(o,r)),o}function CH(e){if(e.length===0)return Td;if(e.length===1)return Ox(e[0],Td);let t={...Ox(e[0],Td)};for(let n=1;n<e.length;n+=1)t=tg(t,e[n]);return t}function tg(e,t){return G3(t)?t(e):EH(e,t)}function EH(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=Mx(e.style,r);break}case"className":{e[n]=q3(e.className,r);break}default:kH(n,r)?e[n]=RH(e[n],r):e[n]=r}}return e}function kH(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t=="function"||typeof t>"u")}function G3(e){return typeof e=="function"}function Ox(e,t){return G3(e)?e(t):e??Td}function RH(e,t){return t?e?n=>{if(_H(n)){const i=n;$x(i);const o=t(i);return i.baseUIHandlerPrevented||(e==null||e(i)),o}const r=t(n);return e==null||e(n),r}:t:e}function $x(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function q3(e,t){return t?e?t+" "+e:t:e}function _H(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function V3(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,o=C.useRef(null),a=U3(!0)!==void 0,u=Ax(()=>{const g=o.current;return!!((g==null?void 0:g.tagName)==="A"&&(g!=null&&g.href))}),{props:c}=SH({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:i}),f=C.useCallback(()=>{const g=o.current;TH(g)&&a&&t&&c.disabled===void 0&&g.disabled&&(g.disabled=!1)},[t,c.disabled,a]);Dx(f,[f]);const h=C.useCallback((g={})=>{const{onClick:y,onMouseDown:b,onKeyUp:v,onKeyDown:S,onPointerDown:x,..._}=g;return H3({type:i?"button":void 0,onClick(R){if(t){R.preventDefault();return}y==null||y(R)},onMouseDown(R){t||(b==null||b(R))},onKeyDown(R){if(t||($x(R),S==null||S(R)),R.baseUIHandlerPrevented)return;const T=R.target===R.currentTarget&&!i&&!u()&&!t,A=R.key==="Enter",D=R.key===" ";T&&((D||A)&&R.preventDefault(),A&&(y==null||y(R)))},onKeyUp(R){t||($x(R),v==null||v(R)),!R.baseUIHandlerPrevented&&R.target===R.currentTarget&&!i&&!t&&R.key===" "&&(y==null||y(R))},onPointerDown(R){if(t){R.preventDefault();return}x==null||x(R)}},i?void 0:{role:"button"},c,_)},[t,c,i,u]),p=Ax(g=>{o.current=g,f()});return{getButtonProps:h,buttonRef:p}}function TH(e){return mH(e)&&e.tagName==="BUTTON"}function Px(e,t,n,r){const i=yS(Y3).current;return DH(i,e,t,n,r)&&W3(i,[e,t,n,r]),i.callback}function AH(e){const t=yS(Y3).current;return MH(t,e)&&W3(t,e),t.callback}function Y3(){return{callback:null,cleanup:null,refs:[]}}function DH(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function MH(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function W3(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const a=o(n);typeof a=="function"&&(r[i]=a);break}case"object":{o.current=n;break}}}e.cleanup=()=>{for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const a=r[i];typeof a=="function"?a():o(null);break}case"object":{o.current=null;break}}}}}}}const OH=parseInt(C.version,10);function $H(e){return OH>=e}function ET(e){if(!C.isValidElement(e))return null;const t=e,n=t.props;return($H(19)?n==null?void 0:n.ref:t.ref)??null}function PH(e,t){const n={};for(const r in e){const i=e[r];if(t!=null&&t.hasOwnProperty(r)){const o=t[r](i);o!=null&&Object.assign(n,o);continue}i===!0?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function NH(e,t){return typeof e=="function"?e(t):e}function IH(e,t){return typeof e=="function"?e(t):e}const kT=Object.freeze([]),Hs=Object.freeze({});function vS(e,t,n={}){const r=t.render,i=jH(t,n);if(n.enabled===!1)return null;const o=n.state??Hs;return FH(e,r,i,o)}function jH(e,t={}){const{className:n,style:r,render:i}=e,{state:o=Hs,ref:a,props:u,stateAttributesMapping:c,enabled:f=!0}=t,h=f?NH(n,o):void 0,p=f?IH(r,o):void 0,g=f?PH(o,c):Hs,y=f?Mx(g,Array.isArray(u)?CH(u):u)??Hs:Hs;return typeof document<"u"&&(f?Array.isArray(a)?y.ref=AH([y.ref,ET(i),...a]):y.ref=Px(y.ref,ET(i),a):Px(null,null)),f?(h!==void 0&&(y.className=q3(y.className,h)),p!==void 0&&(y.style=Mx(y.style,p)),y):Hs}const LH=Symbol.for("react.lazy");function FH(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=H3(n,t.props);i.ref=n.ref;let o=t;return(o==null?void 0:o.$$typeof)===LH&&(o=C.Children.toArray(t)[0]),C.cloneElement(o,i)}if(e&&typeof e=="string")return zH(e,n);throw new Error(bS(8))}function zH(e,t){return e==="button"?C.createElement("button",{type:"button",...t,key:t.key}):e==="img"?C.createElement("img",{alt:"",...t,key:t.key}):C.createElement(e,t)}const BH=C.forwardRef(function(e,t){const{render:n,className:r,disabled:i=!1,focusableWhenDisabled:o=!1,nativeButton:a=!0,...u}=e,{getButtonProps:c,buttonRef:f}=V3({disabled:i,focusableWhenDisabled:o,native:a});return vS("button",e,{state:{disabled:i},ref:[t,f],props:[u,c]})});/**
67
+ * @license lucide-react v0.564.0 - ISC
68
+ *
69
+ * This source code is licensed under the ISC license.
70
+ * See the LICENSE file in the root directory of this source tree.
71
+ */const K3=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
72
+ * @license lucide-react v0.564.0 - ISC
73
+ *
74
+ * This source code is licensed under the ISC license.
75
+ * See the LICENSE file in the root directory of this source tree.
76
+ */const UH=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
77
+ * @license lucide-react v0.564.0 - ISC
78
+ *
79
+ * This source code is licensed under the ISC license.
80
+ * See the LICENSE file in the root directory of this source tree.
81
+ */const HH=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
82
+ * @license lucide-react v0.564.0 - ISC
83
+ *
84
+ * This source code is licensed under the ISC license.
85
+ * See the LICENSE file in the root directory of this source tree.
86
+ */const RT=e=>{const t=HH(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
87
+ * @license lucide-react v0.564.0 - ISC
88
+ *
89
+ * This source code is licensed under the ISC license.
90
+ * See the LICENSE file in the root directory of this source tree.
91
+ */var GH={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"};/**
92
+ * @license lucide-react v0.564.0 - ISC
93
+ *
94
+ * This source code is licensed under the ISC license.
95
+ * See the LICENSE file in the root directory of this source tree.
96
+ */const qH=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
97
+ * @license lucide-react v0.564.0 - ISC
98
+ *
99
+ * This source code is licensed under the ISC license.
100
+ * See the LICENSE file in the root directory of this source tree.
101
+ */const VH=C.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:a,...u},c)=>C.createElement("svg",{ref:c,...GH,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:K3("lucide",i),...!o&&!qH(u)&&{"aria-hidden":"true"},...u},[...a.map(([f,h])=>C.createElement(f,h)),...Array.isArray(o)?o:[o]]));/**
102
+ * @license lucide-react v0.564.0 - ISC
103
+ *
104
+ * This source code is licensed under the ISC license.
105
+ * See the LICENSE file in the root directory of this source tree.
106
+ */const ft=(e,t)=>{const n=C.forwardRef(({className:r,...i},o)=>C.createElement(VH,{ref:o,iconNode:t,className:K3(`lucide-${UH(RT(e))}`,`lucide-${e}`,r),...i}));return n.displayName=RT(e),n};/**
107
+ * @license lucide-react v0.564.0 - ISC
108
+ *
109
+ * This source code is licensed under the ISC license.
110
+ * See the LICENSE file in the root directory of this source tree.
111
+ */const YH=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h2",key:"tvwodi"}],["path",{d:"M20 8v11a2 2 0 0 1-2 2h-2",key:"1gkqxj"}],["path",{d:"m9 15 3-3 3 3",key:"1pd0qc"}],["path",{d:"M12 12v9",key:"192myk"}]],WH=ft("archive-restore",YH);/**
112
+ * @license lucide-react v0.564.0 - ISC
113
+ *
114
+ * This source code is licensed under the ISC license.
115
+ * See the LICENSE file in the root directory of this source tree.
116
+ */const KH=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],XH=ft("archive",KH);/**
117
+ * @license lucide-react v0.564.0 - ISC
118
+ *
119
+ * This source code is licensed under the ISC license.
120
+ * See the LICENSE file in the root directory of this source tree.
121
+ */const QH=[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]],ZH=ft("arrow-left-right",QH);/**
122
+ * @license lucide-react v0.564.0 - ISC
123
+ *
124
+ * This source code is licensed under the ISC license.
125
+ * See the LICENSE file in the root directory of this source tree.
126
+ */const JH=[["path",{d:"m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16",key:"d5nyq2"}],["path",{d:"M22 9v7",key:"pvm9v3"}],["path",{d:"M3.304 13h6.392",key:"1q3zxz"}],["circle",{cx:"18.5",cy:"12.5",r:"3.5",key:"z97x68"}]],eG=ft("case-sensitive",JH);/**
127
+ * @license lucide-react v0.564.0 - ISC
128
+ *
129
+ * This source code is licensed under the ISC license.
130
+ * See the LICENSE file in the root directory of this source tree.
131
+ */const tG=[["path",{d:"M10 6h8",key:"zvc2xc"}],["path",{d:"M12 16h6",key:"yi5mkt"}],["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M8 11h7",key:"wz2hg0"}]],nG=ft("chart-gantt",tG);/**
132
+ * @license lucide-react v0.564.0 - ISC
133
+ *
134
+ * This source code is licensed under the ISC license.
135
+ * See the LICENSE file in the root directory of this source tree.
136
+ */const rG=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ch=ft("check",rG);/**
137
+ * @license lucide-react v0.564.0 - ISC
138
+ *
139
+ * This source code is licensed under the ISC license.
140
+ * See the LICENSE file in the root directory of this source tree.
141
+ */const iG=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],X3=ft("chevron-right",iG);/**
142
+ * @license lucide-react v0.564.0 - ISC
143
+ *
144
+ * This source code is licensed under the ISC license.
145
+ * See the LICENSE file in the root directory of this source tree.
146
+ */const oG=[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]],sG=ft("chevrons-down-up",oG);/**
147
+ * @license lucide-react v0.564.0 - ISC
148
+ *
149
+ * This source code is licensed under the ISC license.
150
+ * See the LICENSE file in the root directory of this source tree.
151
+ */const aG=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],xS=ft("chevrons-up-down",aG);/**
152
+ * @license lucide-react v0.564.0 - ISC
153
+ *
154
+ * This source code is licensed under the ISC license.
155
+ * See the LICENSE file in the root directory of this source tree.
156
+ */const lG=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Q3=ft("clock",lG);/**
157
+ * @license lucide-react v0.564.0 - ISC
158
+ *
159
+ * This source code is licensed under the ISC license.
160
+ * See the LICENSE file in the root directory of this source tree.
161
+ */const uG=[["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"}]],Eh=ft("copy",uG);/**
162
+ * @license lucide-react v0.564.0 - ISC
163
+ *
164
+ * This source code is licensed under the ISC license.
165
+ * See the LICENSE file in the root directory of this source tree.
166
+ */const cG=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],fG=ft("cpu",cG);/**
167
+ * @license lucide-react v0.564.0 - ISC
168
+ *
169
+ * This source code is licensed under the ISC license.
170
+ * See the LICENSE file in the root directory of this source tree.
171
+ */const dG=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],Z3=ft("ellipsis-vertical",dG);/**
172
+ * @license lucide-react v0.564.0 - ISC
173
+ *
174
+ * This source code is licensed under the ISC license.
175
+ * See the LICENSE file in the root directory of this source tree.
176
+ */const hG=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],pG=ft("ellipsis",hG);/**
177
+ * @license lucide-react v0.564.0 - ISC
178
+ *
179
+ * This source code is licensed under the ISC license.
180
+ * See the LICENSE file in the root directory of this source tree.
181
+ */const mG=[["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"}]],gG=ft("external-link",mG);/**
182
+ * @license lucide-react v0.564.0 - ISC
183
+ *
184
+ * This source code is licensed under the ISC license.
185
+ * See the LICENSE file in the root directory of this source tree.
186
+ */const yG=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],bG=ft("eye-off",yG);/**
187
+ * @license lucide-react v0.564.0 - ISC
188
+ *
189
+ * This source code is licensed under the ISC license.
190
+ * See the LICENSE file in the root directory of this source tree.
191
+ */const vG=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],xG=ft("eye",vG);/**
192
+ * @license lucide-react v0.564.0 - ISC
193
+ *
194
+ * This source code is licensed under the ISC license.
195
+ * See the LICENSE file in the root directory of this source tree.
196
+ */const wG=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]],J3=ft("file-diff",wG);/**
197
+ * @license lucide-react v0.564.0 - ISC
198
+ *
199
+ * This source code is licensed under the ISC license.
200
+ * See the LICENSE file in the root directory of this source tree.
201
+ */const SG=[["path",{d:"M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8",key:"14sh0y"}],["path",{d:"M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z",key:"1970lx"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1",key:"l4dndm"}]],e4=ft("files",SG);/**
202
+ * @license lucide-react v0.564.0 - ISC
203
+ *
204
+ * This source code is licensed under the ISC license.
205
+ * See the LICENSE file in the root directory of this source tree.
206
+ */const CG=[["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"}]],EG=ft("folder-open",CG);/**
207
+ * @license lucide-react v0.564.0 - ISC
208
+ *
209
+ * This source code is licensed under the ISC license.
210
+ * See the LICENSE file in the root directory of this source tree.
211
+ */const kG=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],RG=ft("gauge",kG);/**
212
+ * @license lucide-react v0.564.0 - ISC
213
+ *
214
+ * This source code is licensed under the ISC license.
215
+ * See the LICENSE file in the root directory of this source tree.
216
+ */const _G=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]],TG=ft("git-pull-request",_G);/**
217
+ * @license lucide-react v0.564.0 - ISC
218
+ *
219
+ * This source code is licensed under the ISC license.
220
+ * See the LICENSE file in the root directory of this source tree.
221
+ */const AG=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],DG=ft("grip-vertical",AG);/**
222
+ * @license lucide-react v0.564.0 - ISC
223
+ *
224
+ * This source code is licensed under the ISC license.
225
+ * See the LICENSE file in the root directory of this source tree.
226
+ */const MG=[["path",{d:"M3 7V5c0-1.1.9-2 2-2h2",key:"adw53z"}],["path",{d:"M17 3h2c1.1 0 2 .9 2 2v2",key:"an4l38"}],["path",{d:"M21 17v2c0 1.1-.9 2-2 2h-2",key:"144t0e"}],["path",{d:"M7 21H5c-1.1 0-2-.9-2-2v-2",key:"rtnfgi"}],["rect",{width:"7",height:"5",x:"7",y:"7",rx:"1",key:"1eyiv7"}],["rect",{width:"7",height:"5",x:"10",y:"12",rx:"1",key:"1qlmkx"}]],OG=ft("group",MG);/**
227
+ * @license lucide-react v0.564.0 - ISC
228
+ *
229
+ * This source code is licensed under the ISC license.
230
+ * See the LICENSE file in the root directory of this source tree.
231
+ */const $G=[["path",{d:"m11 17 2 2a1 1 0 1 0 3-3",key:"efffak"}],["path",{d:"m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4",key:"9pr0kb"}],["path",{d:"m21 3 1 11h-2",key:"1tisrp"}],["path",{d:"M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3",key:"1uvwmv"}],["path",{d:"M3 4h8",key:"1ep09j"}]],PG=ft("handshake",$G);/**
232
+ * @license lucide-react v0.564.0 - ISC
233
+ *
234
+ * This source code is licensed under the ISC license.
235
+ * See the LICENSE file in the root directory of this source tree.
236
+ */const NG=[["path",{d:"M5 22h14",key:"ehvnwv"}],["path",{d:"M5 2h14",key:"pdyrp9"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",key:"1d314k"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2",key:"1vvvr6"}]],IG=ft("hourglass",NG);/**
237
+ * @license lucide-react v0.564.0 - ISC
238
+ *
239
+ * This source code is licensed under the ISC license.
240
+ * See the LICENSE file in the root directory of this source tree.
241
+ */const jG=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 11h.01",key:"z322tv"}],["path",{d:"M16 11h.01",key:"xkw8gn"}],["path",{d:"M8 11h.01",key:"1dfujw"}]],LG=ft("message-square-more",jG);/**
242
+ * @license lucide-react v0.564.0 - ISC
243
+ *
244
+ * This source code is licensed under the ISC license.
245
+ * See the LICENSE file in the root directory of this source tree.
246
+ */const FG=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M7 11h10",key:"1twpyw"}],["path",{d:"M7 15h6",key:"d9of3u"}],["path",{d:"M7 7h8",key:"af5zfr"}]],zG=ft("message-square-text",FG);/**
247
+ * @license lucide-react v0.564.0 - ISC
248
+ *
249
+ * This source code is licensed under the ISC license.
250
+ * See the LICENSE file in the root directory of this source tree.
251
+ */const BG=[["path",{d:"M5 12h14",key:"1ays0h"}]],UG=ft("minus",BG);/**
252
+ * @license lucide-react v0.564.0 - ISC
253
+ *
254
+ * This source code is licensed under the ISC license.
255
+ * See the LICENSE file in the root directory of this source tree.
256
+ */const HG=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],GG=ft("monitor",HG);/**
257
+ * @license lucide-react v0.564.0 - ISC
258
+ *
259
+ * This source code is licensed under the ISC license.
260
+ * See the LICENSE file in the root directory of this source tree.
261
+ */const qG=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],VG=ft("moon",qG);/**
262
+ * @license lucide-react v0.564.0 - ISC
263
+ *
264
+ * This source code is licensed under the ISC license.
265
+ * See the LICENSE file in the root directory of this source tree.
266
+ */const YG=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],WG=ft("panel-right",YG);/**
267
+ * @license lucide-react v0.564.0 - ISC
268
+ *
269
+ * This source code is licensed under the ISC license.
270
+ * See the LICENSE file in the root directory of this source tree.
271
+ */const KG=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],XG=ft("search",KG);/**
272
+ * @license lucide-react v0.564.0 - ISC
273
+ *
274
+ * This source code is licensed under the ISC license.
275
+ * See the LICENSE file in the root directory of this source tree.
276
+ */const QG=[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71",key:"1jlk70"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264",key:"18rp1v"}]],ZG=ft("shield-off",QG);/**
277
+ * @license lucide-react v0.564.0 - ISC
278
+ *
279
+ * This source code is licensed under the ISC license.
280
+ * See the LICENSE file in the root directory of this source tree.
281
+ */const JG=[["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"}]],eq=ft("sun",JG);/**
282
+ * @license lucide-react v0.564.0 - ISC
283
+ *
284
+ * This source code is licensed under the ISC license.
285
+ * See the LICENSE file in the root directory of this source tree.
286
+ */const tq=[["path",{d:"M13.172 2a2 2 0 0 1 1.414.586l6.71 6.71a2.4 2.4 0 0 1 0 3.408l-4.592 4.592a2.4 2.4 0 0 1-3.408 0l-6.71-6.71A2 2 0 0 1 6 9.172V3a1 1 0 0 1 1-1z",key:"16rjxf"}],["path",{d:"M2 7v6.172a2 2 0 0 0 .586 1.414l6.71 6.71a2.4 2.4 0 0 0 3.191.193",key:"178nd4"}],["circle",{cx:"10.5",cy:"6.5",r:".5",fill:"currentColor",key:"12ikhr"}]],nq=ft("tags",tq);/**
287
+ * @license lucide-react v0.564.0 - ISC
288
+ *
289
+ * This source code is licensed under the ISC license.
290
+ * See the LICENSE file in the root directory of this source tree.
291
+ */const rq=[["path",{d:"m16 16-3 3 3 3",key:"117b85"}],["path",{d:"M3 12h14.5a1 1 0 0 1 0 7H13",key:"18xa6z"}],["path",{d:"M3 19h6",key:"1ygdsz"}],["path",{d:"M3 5h18",key:"1u36vt"}]],_T=ft("text-wrap",rq);/**
292
+ * @license lucide-react v0.564.0 - ISC
293
+ *
294
+ * This source code is licensed under the ISC license.
295
+ * See the LICENSE file in the root directory of this source tree.
296
+ */const iq=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],oq=ft("trash-2",iq);/**
297
+ * @license lucide-react v0.564.0 - ISC
298
+ *
299
+ * This source code is licensed under the ISC license.
300
+ * See the LICENSE file in the root directory of this source tree.
301
+ */const sq=[["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"}]],aq=ft("triangle-alert",sq);/**
302
+ * @license lucide-react v0.564.0 - ISC
303
+ *
304
+ * This source code is licensed under the ISC license.
305
+ * See the LICENSE file in the root directory of this source tree.
306
+ */const lq=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],uq=ft("wrench",lq),t4=({size:e=14,fill:t="currentColor",...n})=>E.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:t,viewBox:"0 0 24 24",width:e,height:e,...n,children:[E.jsx("path",{d:"M12 1a11 11 0 1 0 11 11A11 11 0 0 0 12 1Zm0 19a8 8 0 1 1 8-8 8 8 0 0 1-8 8Z",opacity:.25}),E.jsx("path",{d:"M10.72 19.9a8 8 0 0 1-6.5-9.79 7.77 7.77 0 0 1 6.18-5.95 8 8 0 0 1 9.49 6.52A1.54 1.54 0 0 0 21.38 12h.13a1.37 1.37 0 0 0 1.38-1.54 11 11 0 1 0-12.7 12.39A1.54 1.54 0 0 0 12 21.34a1.47 1.47 0 0 0-1.28-1.44Z",children:E.jsx("animateTransform",{attributeName:"transform",dur:"0.75s",repeatCount:"indefinite",type:"rotate",values:"0 12 12;360 12 12"})})]});t4.displayName="LoadingSpinner";const n4=({loading:e,...t})=>E.jsx(t4,{"data-slot":"button-spinner",className:vr["button-spinner"],"data-loading":e,"aria-hidden":e,...t});n4.displayName="ButtonSpinner";const cq="_card_ndkjt_3",Vo={card:cq,"card-thumbnail":"_card-thumbnail_ndkjt_39","card-header-cell":"_card-header-cell_ndkjt_51","card-icon":"_card-icon_ndkjt_55","card-action":"_card-action_ndkjt_61","toggle-inverted":"_toggle-inverted_ndkjt_70","toggle-trimmed":"_toggle-trimmed_ndkjt_75","toggle-ghost":"_toggle-ghost_ndkjt_80","toggle-transparent":"_toggle-transparent_ndkjt_87"},fq=Jn({variants:{inverted:{true:Vo["toggle-inverted"]},trimmed:{true:Vo["toggle-trimmed"]},transparent:{true:Vo["toggle-transparent"]},ghost:{true:Vo["toggle-ghost"]}}}),r4=({gap:e=3,trimmed:t,transparent:n,ghost:r,inverted:i,className:o,children:a,...u})=>E.jsx(Ye,{"data-slot":"card-container",gap:e,className:ze(Vo.card,fq({trimmed:t,transparent:n,ghost:r,inverted:i}),o),...u,children:a});r4.displayName="CardContainer";const i4=({className:e,children:t,...n})=>E.jsx(Ye,{"data-slot":"card-thumbnail",className:ze(Vo["card-thumbnail"],e),ax:"stretch",fullwidth:!0,...n,children:t});i4.displayName="CardThumbnail";const o4=({children:e,...t})=>E.jsx(Xe,{"data-slot":"card-header",ay:"start",gap:3,fullwidth:!0,...t,children:e});o4.displayName="CardHeader";const s4=({icon:e,render:t,className:n})=>E.jsx(cr,{condition:!!t,render:t,children:e?E.jsx(e,{"data-slot":"card-icon",className:ze(Vo["card-icon"],n)}):null});s4.displayName="CardIcon";const a4=({children:e,...t})=>E.jsx(je,{"data-slot":"card-title",render:E.jsx("h3",{}),size:1,weight:"semibold",...t,children:e});a4.displayName="CardTitle";const l4=({children:e,className:t,...n})=>E.jsx(Xe,{"data-slot":"card-action",className:ze(Vo["card-action"],t),gap:2,...n,children:e});l4.displayName="CardAction";const u4=({children:e,...t})=>E.jsx(je,{"data-slot":"card-description",render:E.jsx("p",{}),shade:"muted",balance:!0,...t,children:e});u4.displayName="CardDescription";const c4=({children:e,...t})=>E.jsxs(E.Fragment,{children:[E.jsx(gS,{}),E.jsx(Xe,{"data-slot":"card-footer",gap:2,fullwidth:!0,...t,children:e})]});c4.displayName="CardFooter";const qt=({title:e,description:t,thumbnail:n,icon:r,action:i,footer:o,ContainerProps:a,HeaderProps:u,TitleProps:c,DescriptionProps:f,IconProps:h,ActionProps:p,FooterProps:g,ThumbnailProps:y,InnerContainerProps:b,children:v,...S})=>{const x=(f==null?void 0:f.children)||t,_=(c==null?void 0:c.children)||e,R=(p==null?void 0:p.children)||i,T=(h==null?void 0:h.icon)||r,A=!!T,D=!!_,O=!!R,$=!!x,z=A||D||O;return E.jsxs(r4,{...S,...a,children:[n&&E.jsx(i4,{mb:2,...y,children:n}),(z||$)&&E.jsxs(cr,{condition:z&&$,render:E.jsx(Ye,{gap:2,fullwidth:!0}),children:[z&&E.jsxs(o4,{...u,children:[A&&E.jsx(qv,{children:E.jsx(s4,{icon:T,...h})}),D&&E.jsx(qv,{children:E.jsx(a4,{...c,children:_})}),O&&E.jsx(qv,{ml:"auto",children:E.jsx(l4,{...p,children:R})})]}),$&&E.jsx(u4,{...f,children:x})]}),v&&E.jsx(Ye,{"data-slot":"card-inner-container",my:2,...b,children:v}),o&&E.jsx(c4,{...g,children:o})]})};qt.displayName="Card";const qv=({children:e,className:t,...n})=>E.jsx(Ye,{className:ze(Vo["card-header-cell"],t),ay:"center",...n,children:e}),TT={};function fr(e,t){const n=C.useRef(TT);return n.current===TT&&(n.current=e(t)),n}function wS(e){const t=C.useRef(!0);t.current&&(t.current=!1,e())}const Vv=os[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],dq=Vv&&Vv!==C.useLayoutEffect?Vv:e=>e();function tt(e){const t=fr(hq).current;return t.next=e,dq(t.effect),t.trampoline}function hq(){const e={next:void 0,callback:pq,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function pq(){}function Sy(){return typeof window<"u"}function Ea(e){return SS(e)?(e.nodeName||"").toLowerCase():"#document"}function fn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function lo(e){var t;return(t=(SS(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function SS(e){return Sy()?e instanceof Node||e instanceof fn(e).Node:!1}function Nt(e){return Sy()?e instanceof Element||e instanceof fn(e).Element:!1}function mn(e){return Sy()?e instanceof HTMLElement||e instanceof fn(e).HTMLElement:!1}function Nx(e){return!Sy()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof fn(e).ShadowRoot}const mq=new Set(["inline","contents"]);function ka(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Kr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!mq.has(i)}const gq=new Set(["table","td","th"]);function yq(e){return gq.has(Ea(e))}const bq=[":popover-open",":modal"];function Cy(e){return bq.some(t=>{try{return e.matches(t)}catch{return!1}})}const vq=["transform","translate","scale","rotate","perspective"],xq=["transform","translate","scale","rotate","perspective","filter"],wq=["paint","layout","strict","content"];function CS(e){const t=Ey(),n=Nt(e)?Kr(e):e;return vq.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||xq.some(r=>(n.willChange||"").includes(r))||wq.some(r=>(n.contain||"").includes(r))}function Sq(e){let t=ts(e);for(;mn(t)&&!Xo(t);){if(CS(t))return t;if(Cy(t))return null;t=ts(t)}return null}function Ey(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Cq=new Set(["html","body","#document"]);function Xo(e){return Cq.has(Ea(e))}function Kr(e){return fn(e).getComputedStyle(e)}function ky(e){return Nt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ts(e){if(Ea(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Nx(e)&&e.host||lo(e);return Nx(t)?t.host:t}function f4(e){const t=ts(e);return Xo(t)?e.ownerDocument?e.ownerDocument.body:e.body:mn(t)&&ka(t)?t:f4(t)}function fa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=f4(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=fn(i);if(o){const u=Ix(a);return t.concat(a,a.visualViewport||[],ka(i)?i:[],u&&n?fa(u):[])}return t.concat(i,fa(i,[],n))}function Ix(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const nf=typeof navigator<"u",Yv=kq(),d4=_q(),h4=Rq(),p4=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),m4=Yv.platform==="MacIntel"&&Yv.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(Yv.platform),g4=nf&&/apple/i.test(navigator.vendor),jx=nf&&/android/i.test(d4)||/android/i.test(h4),Eq=nf&&d4.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,y4=h4.includes("jsdom/");function kq(){if(!nf)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e!=null&&e.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function Rq(){if(!nf)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function _q(){if(!nf)return"";const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform??""}function Mt(e){return(e==null?void 0:e.ownerDocument)||document}const Tq=()=>{},gt=typeof document<"u"?C.useLayoutEffect:Tq,Aq=[];function kh(e){C.useEffect(e,Aq)}const md=0;let zi=class b4{constructor(){te(this,"currentId",md);te(this,"clear",()=>{this.currentId!==md&&(clearTimeout(this.currentId),this.currentId=md)});te(this,"disposeEffect",()=>this.clear)}static create(){return new b4}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=md,n()},t)}isStarted(){return this.currentId!==md}};function xa(){const e=fr(zi.create).current;return kh(e.disposeEffect),e}const dm=null;let Dq=class{constructor(){te(this,"callbacks",[]);te(this,"callbacksCount",0);te(this,"nextId",1);te(this,"startId",1);te(this,"isScheduled",!1);te(this,"tick",t=>{var i;this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)(i=n[o])==null||i.call(n,t)})}request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,(!this.isScheduled||!1)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}};const hm=new Dq;let Us=class v4{constructor(){te(this,"currentId",dm);te(this,"cancel",()=>{this.currentId!==dm&&(hm.cancel(this.currentId),this.currentId=dm)});te(this,"disposeEffect",()=>this.cancel)}static create(){return new v4}static request(t){return hm.request(t)}static cancel(t){return hm.cancel(t)}request(t){this.cancel(),this.currentId=hm.request(()=>{this.currentId=dm,t()})}};function ES(){const e=fr(Us.create).current;return kh(e.disposeEffect),e}function x4(){}const Sr=Object.freeze({});let AT={},DT={},MT="";function Mq(e){if(typeof document>"u")return!1;const t=Mt(e);return fn(t).innerWidth-t.documentElement.clientWidth>0}function Oq(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const t=Mt(e),n=t.documentElement,r=t.body,i=ka(n)?n:r,o=i.style.overflowY,a=n.style.scrollbarGutter;n.style.scrollbarGutter="stable",i.style.overflowY="scroll";const u=i.offsetWidth;i.style.overflowY="hidden";const c=i.offsetWidth;return i.style.overflowY=o,n.style.scrollbarGutter=a,u===c}function $q(e){const t=Mt(e),n=t.documentElement,r=t.body,i=ka(n)?n:r,o={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(i.style,o)}}function Pq(e){var g;const t=Mt(e),n=t.documentElement,r=t.body,i=fn(n);let o=0,a=0,u=!1;const c=Us.create();if(p4&&(((g=i.visualViewport)==null?void 0:g.scale)??1)!==1)return()=>{};function f(){const y=i.getComputedStyle(n),b=i.getComputedStyle(r),v=(y.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";o=n.scrollTop,a=n.scrollLeft,AT={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},MT=n.style.scrollBehavior,DT={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const S=n.scrollHeight>n.clientHeight,x=n.scrollWidth>n.clientWidth,_=y.overflowY==="scroll"||b.overflowY==="scroll",R=y.overflowX==="scroll"||b.overflowX==="scroll",T=Math.max(0,i.innerWidth-r.clientWidth),A=Math.max(0,i.innerHeight-r.clientHeight),D=parseFloat(b.marginTop)+parseFloat(b.marginBottom),O=parseFloat(b.marginLeft)+parseFloat(b.marginRight),$=ka(n)?n:r;if(u=Oq(e),u){n.style.scrollbarGutter=v,$.style.overflowY="hidden",$.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:v,overflowY:"hidden",overflowX:"hidden"}),(S||_)&&(n.style.overflowY="scroll"),(x||R)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:D||A?`calc(100dvh - ${D+A}px)`:"100dvh",width:O||T?`calc(100vw - ${O+T}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=o,r.scrollLeft=a,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function h(){Object.assign(n.style,AT),Object.assign(r.style,DT),u||(n.scrollTop=o,n.scrollLeft=a,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=MT)}function p(){h(),c.request(f)}return f(),i.addEventListener("resize",p),()=>{c.cancel(),h(),typeof i.removeEventListener=="function"&&i.removeEventListener("resize",p)}}let Nq=class{constructor(){te(this,"lockCount",0);te(this,"restore",null);te(this,"timeoutLock",zi.create());te(this,"timeoutUnlock",zi.create());te(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});te(this,"unlock",()=>{var t;this.lockCount===0&&this.restore&&((t=this.restore)==null||t.call(this),this.restore=null)})}acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}lock(t){if(this.lockCount===0||this.restore!==null)return;const n=Mt(t).documentElement,r=fn(n).getComputedStyle(n).overflowY;if(r==="hidden"||r==="clip"){this.restore=x4;return}const i=m4||!Mq(t);this.restore=i?$q(t):Pq(t)}};const Iq=new Nq;function w4(e=!0,t=null){gt(()=>{if(e)return Iq.acquire(t)},[e,t])}function jq(e){const t=C.useRef(""),n=C.useCallback(r=>{r.defaultPrevented||(t.current=r.pointerType,e(r,r.pointerType))},[e]);return{onClick:C.useCallback(r=>{if(r.detail===0){e(r,"keyboard");return}"pointerType"in r?e(r,r.pointerType):e(r,t.current),t.current=""},[e]),onPointerDown:n}}function S4(e){const[t,n]=C.useState(null),r=tt((u,c)=>{e||n(c||(m4?"touch":""))}),i=C.useCallback(()=>{n(null)},[]),{onClick:o,onPointerDown:a}=jq(r);return C.useMemo(()=>({openMethod:t,reset:i,triggerProps:{onClick:o,onPointerDown:a}}),[t,i,o,a])}function Vt(e,t,n,r){let i=!1,o=!1;const a=Sr;return{reason:e,event:t??new Event("base-ui"),cancel(){i=!0},allowPropagation(){o=!0},get isCanceled(){return i},get isPropagationAllowed(){return o},trigger:n,...a}}function Lq(e,t=!1,n=!1){const[r,i]=C.useState(e&&t?"idle":void 0),[o,a]=C.useState(e);return e&&!o&&(a(!0),i("starting")),!e&&o&&r!=="ending"&&!n&&i("ending"),!e&&!o&&r==="ending"&&i(void 0),gt(()=>{if(!e&&o&&r!=="ending"&&n){const u=Us.request(()=>{i("ending")});return()=>{Us.cancel(u)}}},[e,o,r,n]),gt(()=>{if(!e||t)return;const u=Us.request(()=>{i(void 0)});return()=>{Us.cancel(u)}},[t,e]),gt(()=>{if(!e||!t)return;e&&o&&r!=="idle"&&i("starting");const u=Us.request(()=>{i("idle")});return()=>{Us.cancel(u)}},[t,e,o,i,r]),C.useMemo(()=>({mounted:o,setMounted:a,transitionStatus:r}),[o,r])}function Io(e){return e==null?e:"current"in e?e.current:e}let Kd=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const Fq={[Kd.startingStyle]:""},zq={[Kd.endingStyle]:""},rf={transitionStatus(e){return e==="starting"?Fq:e==="ending"?zq:null}};function C4(e,t=!1,n=!0){const r=ES();return tt((i,o=null)=>{r.cancel();function a(){gn.flushSync(i)}const u=Io(e);if(u==null)return;const c=u;if(typeof c.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)i();else{let f=function(){const p=Kd.startingStyle;if(!c.hasAttribute(p)){r.request(h);return}const g=new MutationObserver(()=>{c.hasAttribute(p)||(g.disconnect(),h())});g.observe(c,{attributes:!0,attributeFilter:[p]}),o==null||o.addEventListener("abort",()=>g.disconnect(),{once:!0})},h=function(){Promise.all(c.getAnimations().map(p=>p.finished)).then(()=>{o!=null&&o.aborted||a()}).catch(()=>{const p=c.getAnimations();if(n){if(o!=null&&o.aborted)return;a()}else p.length>0&&p.some(g=>g.pending||g.playState!=="finished")&&h()})};if(t){f();return}r.request(h)}})}function Rh(e){const{enabled:t=!0,open:n,ref:r,onComplete:i}=e,o=tt(i),a=C4(r,n,!1);C.useEffect(()=>{if(!t)return;const u=new AbortController;return a(o,u.signal),()=>{u.abort()}},[t,n,o,a])}function Bq(e,t){const n=C.useRef(null),r=C.useRef(null);return C.useCallback(i=>{if(e!==void 0){if(n.current!==null){const o=n.current,a=r.current,u=t.context.triggerElements.getById(o);a&&u===a&&t.context.triggerElements.delete(o),n.current=null,r.current=null}i!==null&&(n.current=e,r.current=i,t.context.triggerElements.add(e,i))}},[t,e])}function kS(e,t,n,r){const i=n.useState("isMountedByTrigger",e),o=Bq(e,n),a=tt(u=>{if(o(u),!u||!n.select("open"))return;const c=n.select("activeTriggerId");if(c===e){n.update({activeTriggerElement:u,...r});return}c==null&&n.update({activeTriggerId:e,activeTriggerElement:u,...r})});return gt(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:a,isMountedByThisTrigger:i}}function RS(e){const t=e.useState("open");gt(()=>{if(t&&!e.select("activeTriggerId")&&e.context.triggerElements.size===1){const n=e.context.triggerElements.entries().next();if(!n.done){const[r,i]=n.value;e.update({activeTriggerId:r,activeTriggerElement:i})}}},[t,e])}function _S(e,t,n){const{mounted:r,setMounted:i,transitionStatus:o}=Lq(e);t.useSyncedValues({mounted:r,transitionStatus:o});const a=tt(()=>{var c,f;i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n==null||n(),(f=(c=t.context).onOpenChangeComplete)==null||f.call(c,!1)}),u=t.useState("preventUnmountingOnClose");return Rh({enabled:!u,open:e,ref:t.context.popupRef,onComplete(){e||a()}}),{forceUnmount:a,transitionStatus:o}}const Uq={...os};let OT=0;function Hq(e,t="mui"){const[n,r]=C.useState(e),i=e||n;return C.useEffect(()=>{n==null&&(OT+=1,r(`${t}-${OT}`))},[n,t]),i}const $T=Uq.useId;function Wl(e,t){if($T!==void 0){const n=$T();return e??(t?`${t}-${n}`:n)}return Hq(e,t)}function E4(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}let Gq=class{constructor(){te(this,"nodesRef",{current:[]});te(this,"events",E4())}addNode(t){this.nodesRef.current.push(t)}removeNode(t){const n=this.nodesRef.current.findIndex(r=>r===t);n!==-1&&this.nodesRef.current.splice(n,1)}};const k4=C.createContext(null),R4=C.createContext(null),Kl=()=>{var e;return((e=C.useContext(k4))==null?void 0:e.id)||null},of=e=>{const t=C.useContext(R4);return e??t};function qq(e){const t=Wl(),n=of(e),r=Kl();return gt(()=>{if(!t)return;const i={id:t,parentId:r};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,r]),t}function Vq(e){const{children:t,id:n}=e,r=Kl();return E.jsx(k4.Provider,{value:C.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function Yq(e){const{children:t,externalTree:n}=e,r=fr(()=>n??new Gq).current;return E.jsx(R4.Provider,{value:r,children:t})}var Wv={exports:{}},Kv={},PT;function Wq(){if(PT)return Kv;PT=1;var e=va;function t(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function u(p,g){var y=g(),b=r({inst:{value:y,getSnapshot:g}}),v=b[0].inst,S=b[1];return o(function(){v.value=y,v.getSnapshot=g,c(v)&&S({inst:v})},[p,y,g]),i(function(){return c(v)&&S({inst:v}),p(function(){c(v)&&S({inst:v})})},[p]),a(y),y}function c(p){var g=p.getSnapshot;p=p.value;try{var y=g();return!n(p,y)}catch{return!0}}function f(p,g){return g()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:u;return Kv.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,Kv}var NT;function _4(){return NT||(NT=1,Wv.exports=Wq()),Wv.exports}var T4=_4(),Xv={exports:{}},Qv={},IT;function Kq(){if(IT)return Qv;IT=1;var e=va,t=_4();function n(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,a=e.useEffect,u=e.useMemo,c=e.useDebugValue;return Qv.useSyncExternalStoreWithSelector=function(f,h,p,g,y){var b=o(null);if(b.current===null){var v={hasValue:!1,value:null};b.current=v}else v=b.current;b=u(function(){function x(D){if(!_){if(_=!0,R=D,D=g(D),y!==void 0&&v.hasValue){var O=v.value;if(y(O,D))return T=O}return T=D}if(O=T,r(R,D))return O;var $=g(D);return y!==void 0&&y(O,$)?(R=D,O):(R=D,T=$)}var _=!1,R,T,A=p===void 0?null:p;return[function(){return x(h())},A===null?void 0:function(){return x(A())}]},[h,p,g,y]);var S=i(f,b[0],b[1]);return a(function(){v.hasValue=!0,v.value=S},[S]),c(S),S},Qv}var jT;function Xq(){return jT||(jT=1,Xv.exports=Kq()),Xv.exports}var Qq=Xq();const Zq=parseInt(C.version,10);function TS(e){return Zq>=e}const Lx=[];let Fx;function Jq(){return Fx}function eV(e){Lx.push(e)}function A4(e){const t=(n,r)=>{const i=fr(nV).current;let o;try{Fx=i;for(const a of Lx)a.before(i);o=e(n,r);for(const a of Lx)a.after(i);i.didInitialize=!0}finally{Fx=void 0}return o};return t.displayName=e.displayName||e.name,t}function tV(e){return C.forwardRef(A4(e))}function nV(){return{didInitialize:!1}}const rV=TS(19),iV=rV?sV:aV;function D4(e,t,n,r,i){return iV(e,t,n,r,i)}function oV(e,t,n,r,i){const o=C.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return T4.useSyncExternalStore(e.subscribe,o,o)}eV({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){const r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);(r.didChange||!Object.is(r.value,i))&&(t=!0,r.value=i,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const n=new Set;for(const i of e.syncHooks)n.add(i.store);const r=[];for(const i of n)r.push(i.subscribe(t));return()=>{for(const i of r)i()}}),T4.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function sV(e,t,n,r,i){const o=Jq();if(!o)return oV(e,t,n,r,i);const a=o.syncIndex;o.syncIndex+=1;let u;return o.didInitialize?(u=o.syncHooks[a],(u.store!==e||u.selector!==t||!Object.is(u.a1,n)||!Object.is(u.a2,r)||!Object.is(u.a3,i))&&(u.store!==e&&(o.didChangeStore=!0),u.store=e,u.selector=t,u.a1=n,u.a2=r,u.a3=i,u.didChange=!0)):(u={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i),didChange:!1},o.syncHooks.push(u)),u.value}function aV(e,t,n,r,i){return Qq.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,o=>t(o,n,r,i))}let lV=class{constructor(t){te(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t)}));te(this,"getSnapshot",()=>this.state);this.state=t,this.listeners=new Set,this.updateTick=0}setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,r,i){return D4(this,t,n,r,i)}},_h=class extends lV{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){C.useDebugValue(t),gt(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;gt(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this,r=Object.values(t);gt(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){C.useDebugValue(t);const r=n!==void 0;gt(()=>{r&&!Object.is(this.state[t],n)&&super.setState({...this.state,[t]:n})},[t,n,r])}select(t,n,r,i){const o=this.selectors[t];return o(this.state,n,r,i)}useState(t,n,r,i){return C.useDebugValue(t),D4(this,this.selectors[t],n,r,i)}useContextCallback(t,n){C.useDebugValue(t);const r=tt(n??x4);this.context[t]=r}useStateSetter(t){const n=C.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let i=r(this.state);return n(i,i,this),this.subscribe(o=>{const a=r(o);if(!Object.is(i,a)){const u=i;i=a,n(a,u,this)}})}};function uV(e){e.preventDefault(),e.stopPropagation()}function cV(e){return"nativeEvent"in e}function fV(e){return e.pointerType===""&&e.isTrusted?!0:jx&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function dV(e){return y4?!1:!jx&&e.width===0&&e.height===0||jx&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function jl(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function M4(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}function Tn(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}var Tg=Symbol("NOT_FOUND");function hV(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function pV(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function mV(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var LT=e=>Array.isArray(e)?e:[e];function gV(e){const t=Array.isArray(e[0])?e[0]:e;return mV(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function yV(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}function bV(e){let t;return{get(n){return t&&e(t.key,n)?t.value:Tg},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function vV(e,t){let n=[];function r(u){const c=n.findIndex(f=>t(u,f.key));if(c>-1){const f=n[c];return c>0&&(n.splice(c,1),n.unshift(f)),f.value}return Tg}function i(u,c){r(u)===Tg&&(n.unshift({key:u,value:c}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var xV=(e,t)=>e===t;function wV(e){return function(t,n){if(t===null||n===null||t.length!==n.length)return!1;const{length:r}=t;for(let i=0;i<r;i++)if(!e(t[i],n[i]))return!1;return!0}}function SV(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=xV,maxSize:i=1,resultEqualityCheck:o}=n,a=wV(r);let u=0;const c=i<=1?bV(a):vV(i,a);function f(){let h=c.get(arguments);if(h===Tg){if(h=e.apply(null,arguments),u++,o){const p=c.getEntries().find(g=>o(g.value,h));p&&(h=p.value,u!==0&&u--)}c.put(arguments,h)}return h}return f.clearCache=()=>{c.clear(),f.resetResultsCount()},f.resultsCount=()=>u,f.resetResultsCount=()=>{u=0},f}var CV=class{constructor(t){this.value=t}deref(){return this.value}},EV=typeof WeakRef<"u"?WeakRef:CV,kV=0,FT=1;function pm(){return{s:kV,v:void 0,o:null,p:null}}function O4(e,t={}){let n=pm();const{resultEqualityCheck:r}=t;let i,o=0;function a(){var p;let u=n;const{length:c}=arguments;for(let g=0,y=c;g<y;g++){const b=arguments[g];if(typeof b=="function"||typeof b=="object"&&b!==null){let v=u.o;v===null&&(u.o=v=new WeakMap);const S=v.get(b);S===void 0?(u=pm(),v.set(b,u)):u=S}else{let v=u.p;v===null&&(u.p=v=new Map);const S=v.get(b);S===void 0?(u=pm(),v.set(b,u)):u=S}}const f=u;let h;if(u.s===FT)h=u.v;else if(h=e.apply(null,arguments),o++,r){const g=((p=i==null?void 0:i.deref)==null?void 0:p.call(i))??i;g!=null&&r(g,h)&&(h=g,o!==0&&o--),i=typeof h=="object"&&h!==null||typeof h=="function"?new EV(h):h}return f.s=FT,f.v=h,h}return a.clearCache=()=>{n=pm(),a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function $4(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,a=0,u,c={},f=i.pop();typeof f=="object"&&(c=f,f=i.pop()),hV(f,`createSelector expects an output function after the inputs, but received: [${typeof f}]`);const h={...n,...c},{memoize:p,memoizeOptions:g=[],argsMemoize:y=O4,argsMemoizeOptions:b=[]}=h,v=LT(g),S=LT(b),x=gV(i),_=p(function(){return o++,f.apply(null,arguments)},...v),R=y(function(){a++;const T=yV(x,arguments);return u=_.apply(null,T),u},...S);return Object.assign(R,{resultFunc:f,memoizedResultFunc:_,dependencies:x,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>u,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:p,argsMemoize:y})};return Object.assign(r,{withTypes:()=>r}),r}var RV=$4(O4),_V=Object.assign((e,t=RV)=>{pV(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(i=>e[i]);return t(r,(...i)=>i.reduce((o,a,u)=>(o[n[u]]=a,o),{}))},{withTypes:()=>_V});const TV=$4({memoize:SV,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),We=(e,t,n,r,i,o,...a)=>{if(a.length>0)throw new Error(Tn(1));let u;if(e&&t)u=(c,f,h,p)=>{const g=e(c,f,h,p);return t(g,f,h,p)};else if(e)u=e;else throw new Error("Missing arguments");return u},AV=(...e)=>{const t=new WeakMap;let n=1;const r=e[e.length-1],i=e.length-1||1,o=r.length-i;if(o>3)throw new Error(Tn(2));return(a,u,c,f)=>{let h=a.__cacheKey__;h||(h={id:n},a.__cacheKey__=h,n+=1);let p=t.get(h);if(!p){let g=e;const y=[void 0,void 0,void 0];switch(o){case 0:break;case 1:{g=[...e.slice(0,-1),()=>y[0],r];break}case 2:{g=[...e.slice(0,-1),()=>y[0],()=>y[1],r];break}case 3:{g=[...e.slice(0,-1),()=>y[0],()=>y[1],()=>y[2],r];break}default:throw new Error(Tn(2))}p=TV(...g),p.selectorArgs=y,t.set(h,p)}switch(p.selectorArgs[0]=u,p.selectorArgs[1]=c,p.selectorArgs[2]=f,o){case 0:return p(a);case 1:return p(a,u);case 2:return p(a,u,c);case 3:return p(a,u,c,f);default:throw new Error("unreachable")}}},DV={open:We(e=>e.open),domReferenceElement:We(e=>e.domReferenceElement),referenceElement:We(e=>e.positionReference??e.referenceElement),floatingElement:We(e=>e.floatingElement),floatingId:We(e=>e.floatingId)};let AS=class extends _h{constructor(n){const{nested:r,noEmit:i,onOpenChange:o,triggerElements:a,...u}=n;super({...u,positionReference:u.referenceElement,domReferenceElement:u.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:E4(),nested:r,noEmit:i,triggerElements:a},DV);te(this,"setOpen",(n,r)=>{var i,o;if((!n||!this.state.open||M4(r.event))&&(this.context.dataRef.current.openEvent=n?r.event:void 0),!this.context.noEmit){const a={open:n,reason:r.reason,nativeEvent:r.event,nested:this.context.nested,triggerElement:r.trigger};this.context.events.emit("openchange",a)}(o=(i=this.context).onOpenChange)==null||o.call(i,n,r)})}};function DS(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:i}=e,o=Wl(),a=Kl()!=null,u=t.useState("open"),c=t.useState("activeTriggerElement"),f=t.useState(r?"popupElement":"positionerElement"),h=t.context.triggerElements,p=fr(()=>new AS({open:u,referenceElement:c,floatingElement:f,triggerElements:h,onOpenChange:i,floatingId:o,nested:a,noEmit:n})).current;return gt(()=>{const g={open:u,floatingId:o,referenceElement:c,floatingElement:f};Nt(c)&&(g.domReferenceElement=c),p.state.positionReference===p.state.referenceElement&&(g.positionReference=c),p.update(g)},[u,o,c,f,p]),p.context.onOpenChange=i,p.context.nested=a,p.context.noEmit=n,p}const zx="data-base-ui-focusable",P4="active",N4="selected",I4="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Ur(e){var n;let t=e.activeElement;for(;((n=t==null?void 0:t.shadowRoot)==null?void 0:n.activeElement)!=null;)t=t.shadowRoot.activeElement;return t}function ct(e,t){var r;if(!e||!t)return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e.contains(t))return!0;if(n&&Nx(n)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function Ag(e,t){if(!Nt(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,r]of t.entries())if(ct(r,n))return!r.hasAttribute("data-trigger-disabled");return!1}function Un(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Di(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function MV(e){return e.matches("html,body")}function Ry(e){return mn(e)&&e.matches(I4)}function zT(e){return e?e.getAttribute("role")==="combobox"&&Ry(e):!1}function Dg(e){if(!e||y4)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Bx(e){return e?e.hasAttribute(zx)?e:e.querySelector(`[${zx}]`)||e:null}const OV=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function j4(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingId"),o=n.useState("domReferenceElement"),a=n.useState("floatingElement"),{role:u="dialog"}=t,c=Wl(),f=(o==null?void 0:o.id)||c,h=C.useMemo(()=>{var x;return((x=Bx(a))==null?void 0:x.id)||i},[a,i]),p=OV.get(u)??u,g=Kl()!=null,y=C.useMemo(()=>p==="tooltip"||u==="label"?Sr:{"aria-haspopup":p==="alertdialog"?"dialog":p,"aria-expanded":"false",...p==="listbox"&&{role:"combobox"},...p==="menu"&&g&&{role:"menuitem"},...u==="select"&&{"aria-autocomplete":"none"},...u==="combobox"&&{"aria-autocomplete":"list"}},[p,g,u]),b=C.useMemo(()=>p==="tooltip"||u==="label"?{[`aria-${u==="label"?"labelledby":"describedby"}`]:r?h:void 0}:{...y,"aria-expanded":r?"true":"false","aria-controls":r?h:void 0,...p==="menu"&&{id:f}},[p,h,r,f,u,y]),v=C.useMemo(()=>{const x={id:h,...p&&{role:p}};return p==="tooltip"||u==="label"?x:{...x,...p==="menu"&&{"aria-labelledby":f}}},[p,h,f,u]),S=C.useCallback(({active:x,selected:_})=>{const R={role:"option",...x&&{id:`${h}-fui-option`}};switch(u){case"select":case"combobox":return{...R,"aria-selected":_}}return{}},[h,u]);return C.useMemo(()=>({reference:b,floating:v,item:S,trigger:y}),[b,v,y,S])}function Nc(e){return`data-base-ui-${e}`}function Ol(e,t,n=!0){return e.filter(r=>{var i;return r.parentId===t&&(!n||((i=r.context)==null?void 0:i.open))}).flatMap(r=>[r,...Ol(e,r.id,n)])}function BT(e,t){var i;let n=[],r=(i=e.find(o=>o.id===t))==null?void 0:i.parentId;for(;r;){const o=e.find(a=>a.id===r);r=o==null?void 0:o.parentId,o&&(n=n.concat(o))}return n}const MS="none",wa="trigger-press",Kn="trigger-hover",ng="trigger-focus",L4="outside-press",Xd="focus-out",_y="escape-key",$V="disabled",OS="imperative-action",PV={intentional:"onClick",sloppy:"onPointerDown"};function NV(e){return{escapeKey:typeof e=="boolean"?e:(e==null?void 0:e.escapeKey)??!1,outsidePress:typeof e=="boolean"?e:(e==null?void 0:e.outsidePress)??!0}}function $S(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),o=n.useState("referenceElement"),a=n.useState("domReferenceElement"),{onOpenChange:u,dataRef:c}=n.context,{enabled:f=!0,escapeKey:h=!0,outsidePress:p=!0,outsidePressEvent:g="sloppy",referencePress:y=!1,referencePressEvent:b="sloppy",ancestorScroll:v=!1,bubbles:S,externalTree:x}=t,_=of(x),R=tt(typeof p=="function"?p:()=>!1),T=typeof p=="function"?R:p,A=C.useRef(!1),{escapeKey:D,outsidePress:O}=NV(S),$=C.useRef(null),z=xa(),j=xa(),I=tt(()=>{j.clear(),c.current.insideReactTree=!1}),M=C.useRef(!1),B=C.useRef(""),G=tt(X=>{B.current=X.pointerType}),L=tt(()=>{const X=B.current,Z=X==="pen"||!X?"mouse":X,ne=typeof g=="function"?g():g;return typeof ne=="string"?ne:ne[Z]}),F=tt(X=>{var Ce;if(!r||!f||!h||X.key!=="Escape"||M.current)return;const Z=(Ce=c.current.floatingContext)==null?void 0:Ce.nodeId,ne=_?Ol(_.nodesRef.current,Z):[];if(!D&&ne.length>0){let le=!0;if(ne.forEach(oe=>{var me;(me=oe.context)!=null&&me.open&&!oe.context.dataRef.current.__escapeKeyBubbles&&(le=!1)}),!le)return}const xe=cV(X)?X.nativeEvent:X,ge=Vt(_y,xe);n.setOpen(!1,ge),!D&&!ge.isPropagationAllowed&&X.stopPropagation()}),U=tt(X=>{const Z=L();return Z==="intentional"&&X.type!=="click"||Z==="sloppy"&&X.type==="click"}),V=tt(()=>{c.current.insideReactTree=!0,j.start(0,I)}),W=tt((X,Z=!1)=>{var Oe;if(U(X)){I();return}if(c.current.insideReactTree){I();return}if(L()==="intentional"&&Z||typeof T=="function"&&!T(X))return;const ne=Un(X),xe=`[${Nc("inert")}]`,ge=Mt(n.select("floatingElement")).querySelectorAll(xe),Ce=n.context.triggerElements;if(ne&&(Ce.hasElement(ne)||Ce.hasMatchingElement(Te=>ct(Te,ne))))return;let le=Nt(ne)?ne:null;for(;le&&!Xo(le);){const Te=ts(le);if(Xo(Te)||!Nt(Te))break;le=Te}if(ge.length&&Nt(ne)&&!MV(ne)&&!ct(ne,n.select("floatingElement"))&&Array.from(ge).every(Te=>!ct(le,Te)))return;if(mn(ne)&&!("touches"in X)){const Te=Xo(ne),_e=Kr(ne),De=/auto|scroll/,ue=Te||De.test(_e.overflowX),Se=Te||De.test(_e.overflowY),ke=ue&&ne.clientWidth>0&&ne.scrollWidth>ne.clientWidth,Pe=Se&&ne.clientHeight>0&&ne.scrollHeight>ne.clientHeight,Le=_e.direction==="rtl",st=Pe&&(Le?X.offsetX<=ne.offsetWidth-ne.clientWidth:X.offsetX>ne.clientWidth),Bt=ke&&X.offsetY>ne.clientHeight;if(st||Bt)return}const oe=(Oe=c.current.floatingContext)==null?void 0:Oe.nodeId,me=_&&Ol(_.nodesRef.current,oe).some(Te=>{var _e;return Di(X,(_e=Te.context)==null?void 0:_e.elements.floating)});if(Di(X,n.select("floatingElement"))||Di(X,n.select("domReferenceElement"))||me)return;const ae=_?Ol(_.nodesRef.current,oe):[];if(ae.length>0){let Te=!0;if(ae.forEach(_e=>{var De;(De=_e.context)!=null&&De.open&&!_e.context.dataRef.current.__outsidePressBubbles&&(Te=!1)}),!Te)return}n.setOpen(!1,Vt(L4,X)),I()}),N=tt(X=>{L()!=="sloppy"||X.pointerType==="touch"||!n.select("open")||!f||Di(X,n.select("floatingElement"))||Di(X,n.select("domReferenceElement"))||W(X)}),Y=tt(X=>{if(L()!=="sloppy"||!n.select("open")||!f||Di(X,n.select("floatingElement"))||Di(X,n.select("domReferenceElement")))return;const Z=X.touches[0];Z&&($.current={startTime:Date.now(),startX:Z.clientX,startY:Z.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},z.start(1e3,()=>{$.current&&($.current.dismissOnTouchEnd=!1,$.current.dismissOnMouseDown=!1)}))}),J=tt(X=>{const Z=Un(X);function ne(){Y(X),Z==null||Z.removeEventListener(X.type,ne)}Z==null||Z.addEventListener(X.type,ne)}),H=tt(X=>{const Z=A.current;if(A.current=!1,z.clear(),X.type==="mousedown"&&$.current&&!$.current.dismissOnMouseDown)return;const ne=Un(X);function xe(){X.type==="pointerdown"?N(X):W(X,Z),ne==null||ne.removeEventListener(X.type,xe)}ne==null||ne.addEventListener(X.type,xe)}),ie=tt(X=>{if(L()!=="sloppy"||!$.current||Di(X,n.select("floatingElement"))||Di(X,n.select("domReferenceElement")))return;const Z=X.touches[0];if(!Z)return;const ne=Math.abs(Z.clientX-$.current.startX),xe=Math.abs(Z.clientY-$.current.startY),ge=Math.sqrt(ne*ne+xe*xe);ge>5&&($.current.dismissOnTouchEnd=!0),ge>10&&(W(X),z.clear(),$.current=null)}),re=tt(X=>{const Z=Un(X);function ne(){ie(X),Z==null||Z.removeEventListener(X.type,ne)}Z==null||Z.addEventListener(X.type,ne)}),he=tt(X=>{L()!=="sloppy"||!$.current||Di(X,n.select("floatingElement"))||Di(X,n.select("domReferenceElement"))||($.current.dismissOnTouchEnd&&W(X),z.clear(),$.current=null)}),ve=tt(X=>{const Z=Un(X);function ne(){he(X),Z==null||Z.removeEventListener(X.type,ne)}Z==null||Z.addEventListener(X.type,ne)});C.useEffect(()=>{if(!r||!f)return;c.current.__escapeKeyBubbles=D,c.current.__outsidePressBubbles=O;const X=new zi;function Z(le){n.setOpen(!1,Vt(MS,le))}function ne(){X.clear(),M.current=!0}function xe(){X.start(Ey()?5:0,()=>{M.current=!1})}const ge=Mt(i);ge.addEventListener("pointerdown",G,!0),h&&(ge.addEventListener("keydown",F),ge.addEventListener("compositionstart",ne),ge.addEventListener("compositionend",xe)),T&&(ge.addEventListener("click",H,!0),ge.addEventListener("pointerdown",H,!0),ge.addEventListener("touchstart",J,!0),ge.addEventListener("touchmove",re,!0),ge.addEventListener("touchend",ve,!0),ge.addEventListener("mousedown",H,!0));let Ce=[];return v&&(Nt(a)&&(Ce=fa(a)),Nt(i)&&(Ce=Ce.concat(fa(i))),!Nt(o)&&o&&o.contextElement&&(Ce=Ce.concat(fa(o.contextElement)))),Ce=Ce.filter(le=>{var oe;return le!==((oe=ge.defaultView)==null?void 0:oe.visualViewport)}),Ce.forEach(le=>{le.addEventListener("scroll",Z,{passive:!0})}),()=>{ge.removeEventListener("pointerdown",G,!0),h&&(ge.removeEventListener("keydown",F),ge.removeEventListener("compositionstart",ne),ge.removeEventListener("compositionend",xe)),T&&(ge.removeEventListener("click",H,!0),ge.removeEventListener("pointerdown",H,!0),ge.removeEventListener("touchstart",J,!0),ge.removeEventListener("touchmove",re,!0),ge.removeEventListener("touchend",ve,!0),ge.removeEventListener("mousedown",H,!0)),Ce.forEach(le=>{le.removeEventListener("scroll",Z)}),X.clear(),A.current=!1}},[c,i,o,a,h,T,r,u,v,f,D,O,F,W,H,N,J,re,ve,G,n]),C.useEffect(I,[T,I]);const Re=C.useMemo(()=>({onKeyDown:F,...y&&{[PV[b]]:X=>{n.setOpen(!1,Vt(wa,X.nativeEvent))},...b!=="intentional"&&{onClick(X){n.setOpen(!1,Vt(wa,X.nativeEvent))}}}}),[F,n,y,b]),ce=tt(X=>{const Z=Un(X.nativeEvent);!ct(n.select("floatingElement"),Z)||X.button!==0||(A.current=!0)}),Ie=tt(X=>{!r||!f||X.button!==0||(A.current=!0)}),Ve=C.useMemo(()=>({onKeyDown:F,onPointerDown:ce,onMouseDown:ce,onMouseUp:ce,onClickCapture:V,onMouseDownCapture(X){V(),Ie(X)},onPointerDownCapture(X){V(),Ie(X)},onMouseUpCapture:V,onTouchEndCapture:V,onTouchMoveCapture:V}),[F,ce,V,Ie]);return C.useMemo(()=>f?{reference:Re,floating:Ve,trigger:Re}:{},[f,Re,Ve])}function Th(e=[]){const t=e.map(f=>f==null?void 0:f.reference),n=e.map(f=>f==null?void 0:f.floating),r=e.map(f=>f==null?void 0:f.item),i=e.map(f=>f==null?void 0:f.trigger),o=C.useCallback(f=>mm(f,e,"reference"),t),a=C.useCallback(f=>mm(f,e,"floating"),n),u=C.useCallback(f=>mm(f,e,"item"),r),c=C.useCallback(f=>mm(f,e,"trigger"),i);return C.useMemo(()=>({getReferenceProps:o,getFloatingProps:a,getItemProps:u,getTriggerProps:c}),[o,a,u,c])}function mm(e,t,n){var a;const r=new Map,i=n==="item",o={};n==="floating"&&(o.tabIndex=-1,o[zx]="");for(const u in e)i&&e&&(u===P4||u===N4)||(o[u]=e[u]);for(let u=0;u<t.length;u+=1){let c;const f=(a=t[u])==null?void 0:a[n];typeof f=="function"?c=e?f(e):null:c=f,c&&UT(o,c,i,r)}return UT(o,e,i,r),o}function UT(e,t,n,r){var i;for(const o in t){const a=t[o];n&&(o===P4||o===N4)||(o.startsWith("on")?(r.has(o)||r.set(o,[]),typeof a=="function"&&((i=r.get(o))==null||i.push(a),e[o]=(...u)=>{var c;return(c=r.get(o))==null?void 0:c.map(f=>f(...u)).find(f=>f!==void 0)})):e[o]=a)}}function IV(e){const{store:t,parentContext:n,actionsRef:r}=e,i=t.useState("open"),o=t.useState("disablePointerDismissal"),a=t.useState("modal"),u=t.useState("popupElement"),{openMethod:c,triggerProps:f,reset:h}=S4(i);RS(t);const{forceUnmount:p}=_S(i,t,()=>{h()}),g=tt(j=>{const I=Vt(j);return I.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},I}),y=C.useCallback(()=>{t.setOpen(!1,g(OS))},[t,g]);C.useImperativeHandle(r,()=>({unmount:p,close:y}),[p,y]);const b=DS({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[v,S]=C.useState(0),x=v===0,_=j4(b),R=$S(b,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:a==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(j){if(!t.context.outsidePressEnabledRef.current||"button"in j&&j.button!==0||"touches"in j&&j.touches.length!==1)return!1;const I=Un(j);if(x&&!o){const M=I;return a&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===M||t.context.backdropRef.current===M||ct(M,u)&&!(M!=null&&M.hasAttribute("data-base-ui-portal")):!0}return!1},escapeKey:x});w4(i&&a===!0,u);const{getReferenceProps:T,getFloatingProps:A,getTriggerProps:D}=Th([_,R]);t.useContextCallback("onNestedDialogOpen",j=>{S(j+1)}),t.useContextCallback("onNestedDialogClose",()=>{S(0)}),C.useEffect(()=>(n!=null&&n.onNestedDialogOpen&&i&&n.onNestedDialogOpen(v),n!=null&&n.onNestedDialogClose&&!i&&n.onNestedDialogClose(),()=>{n!=null&&n.onNestedDialogClose&&i&&n.onNestedDialogClose()}),[i,n,v]);const O=C.useMemo(()=>T(f),[T,f]),$=C.useMemo(()=>D(f),[D,f]),z=C.useMemo(()=>A(),[A]);t.useSyncedValues({openMethod:c,activeTriggerProps:O,inactiveTriggerProps:$,popupProps:z,floatingRootContext:b,nestedOpenDialogCount:v})}const F4=C.createContext(void 0);function Ah(e){const t=C.useContext(F4);if(e===!1&&t===void 0)throw new Error(Tn(27));return t}let Dh=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);r!==n&&(r!==void 0&&this.elementsSet.delete(r),this.elementsSet.add(n),this.idMap.set(t,n))}delete(t){const n=this.idMap.get(t);n&&(this.elementsSet.delete(n),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(const n of this.elementsSet)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function jV(){return new AS({open:!1,floatingElement:null,referenceElement:null,triggerElements:new Dh,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function PS(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:"idle",floatingRootContext:jV(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Sr,inactiveTriggerProps:Sr,popupProps:Sr}}const gm=We(e=>e.triggerIdProp??e.activeTriggerId),NS={open:We(e=>e.openProp??e.open),mounted:We(e=>e.mounted),transitionStatus:We(e=>e.transitionStatus),floatingRootContext:We(e=>e.floatingRootContext),preventUnmountingOnClose:We(e=>e.preventUnmountingOnClose),payload:We(e=>e.payload),activeTriggerId:gm,activeTriggerElement:We(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:We((e,t)=>t!==void 0&&gm(e)===t),isOpenedByTrigger:We((e,t)=>t!==void 0&&gm(e)===t&&e.open),isMountedByTrigger:We((e,t)=>t!==void 0&&gm(e)===t&&e.mounted),triggerProps:We((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:We(e=>e.popupProps),popupElement:We(e=>e.popupElement),positionerElement:We(e=>e.positionerElement)},LV={...NS,modal:We(e=>e.modal),nested:We(e=>e.nested),nestedOpenDialogCount:We(e=>e.nestedOpenDialogCount),disablePointerDismissal:We(e=>e.disablePointerDismissal),openMethod:We(e=>e.openMethod),descriptionElementId:We(e=>e.descriptionElementId),titleElementId:We(e=>e.titleElementId),viewportElement:We(e=>e.viewportElement),role:We(e=>e.role)};let FV=class extends _h{constructor(n){super(zV(n),{popupRef:C.createRef(),backdropRef:C.createRef(),internalBackdropRef:C.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new Dh,onOpenChange:void 0,onOpenChangeComplete:void 0},LV);te(this,"setOpen",(n,r)=>{var u,c,f,h;if(r.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!n&&r.trigger==null&&this.state.activeTriggerId!=null&&(r.trigger=this.state.activeTriggerElement??void 0),(c=(u=this.context).onOpenChange)==null||c.call(u,n,r),r.isCanceled)return;const i={open:n,nativeEvent:r.event,reason:r.reason,nested:this.state.nested};(f=this.state.floatingRootContext.context.events)==null||f.emit("openchange",i);const o={open:n},a=((h=r.trigger)==null?void 0:h.id)??null;(a||n)&&(o.activeTriggerId=a,o.activeTriggerElement=r.trigger??null),this.update(o)})}};function zV(e={}){return{...PS(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}function BV(e){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:o,disablePointerDismissal:a=!1,modal:u=!0,actionsRef:c,handle:f,triggerId:h,defaultTriggerId:p=null}=e,g=Ah(!0),y=!!g,b=fr(()=>(f==null?void 0:f.store)??new FV({open:r,openProp:n,activeTriggerId:p,triggerIdProp:h,modal:u,disablePointerDismissal:a,nested:y})).current;wS(()=>{n===void 0&&b.state.open===!1&&r===!0&&b.update({open:!0,activeTriggerId:p})}),b.useControlledProp("openProp",n),b.useControlledProp("triggerIdProp",h),b.useSyncedValues({disablePointerDismissal:a,nested:y,modal:u}),b.useContextCallback("onOpenChange",i),b.useContextCallback("onOpenChangeComplete",o);const v=b.useState("payload");IV({store:b,actionsRef:c,parentContext:g==null?void 0:g.store.context});const S=C.useMemo(()=>({store:b}),[b]);return E.jsx(F4.Provider,{value:S,children:typeof t=="function"?t({payload:v}):t})}const UV=C.createContext(void 0);function HV(e=!1){const t=C.useContext(UV);if(t===void 0&&!e)throw new Error(Tn(16));return t}function GV(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:o}=e,a=r&&t!==!1,u=r&&t===!1;return{props:C.useMemo(()=>{const c={onKeyDown(f){n&&t&&f.key!=="Tab"&&f.preventDefault()}};return r||(c.tabIndex=i,!o&&n&&(c.tabIndex=t?i:-1)),(o&&(t||a)||!o&&n)&&(c["aria-disabled"]=n),o&&(!t||u)&&(c.disabled=n),c},[r,n,t,a,u,o,i])}}function Ux(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const Ad={};function z4(e,t,n,r,i){let o={...Hx(e,Ad)};return t&&(o=rg(o,t)),n&&(o=rg(o,n)),r&&(o=rg(o,r)),o}function qV(e){if(e.length===0)return Ad;if(e.length===1)return Hx(e[0],Ad);let t={...Hx(e[0],Ad)};for(let n=1;n<e.length;n+=1)t=rg(t,e[n]);return t}function rg(e,t){return B4(t)?t(e):VV(e,t)}function VV(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=Ux(e.style,r);break}case"className":{e[n]=U4(e.className,r);break}default:YV(n,r)?e[n]=WV(e[n],r):e[n]=r}}return e}function YV(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t=="function"||typeof t>"u")}function B4(e){return typeof e=="function"}function Hx(e,t){return B4(e)?e(t):e??Ad}function WV(e,t){return t?e?n=>{if(KV(n)){const i=n;Gx(i);const o=t(i);return i.baseUIHandlerPrevented||(e==null||e(i)),o}const r=t(n);return e==null||e(n),r}:t:e}function Gx(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function U4(e,t){return t?e?t+" "+e:t:e}function KV(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function H4(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,o=C.useRef(null),a=HV(!0)!==void 0,u=tt(()=>{const g=o.current;return!!((g==null?void 0:g.tagName)==="A"&&(g!=null&&g.href))}),{props:c}=GV({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:i}),f=C.useCallback(()=>{const g=o.current;XV(g)&&a&&t&&c.disabled===void 0&&g.disabled&&(g.disabled=!1)},[t,c.disabled,a]);gt(f,[f]);const h=C.useCallback((g={})=>{const{onClick:y,onMouseDown:b,onKeyUp:v,onKeyDown:S,onPointerDown:x,..._}=g;return z4({type:i?"button":void 0,onClick(R){if(t){R.preventDefault();return}y==null||y(R)},onMouseDown(R){t||(b==null||b(R))},onKeyDown(R){if(t||(Gx(R),S==null||S(R)),R.baseUIHandlerPrevented)return;const T=R.target===R.currentTarget&&!i&&!u()&&!t,A=R.key==="Enter",D=R.key===" ";T&&((D||A)&&R.preventDefault(),A&&(y==null||y(R)))},onKeyUp(R){t||(Gx(R),v==null||v(R)),!R.baseUIHandlerPrevented&&R.target===R.currentTarget&&!i&&!t&&R.key===" "&&(y==null||y(R))},onPointerDown(R){if(t){R.preventDefault();return}x==null||x(R)}},i?void 0:{role:"button"},c,_)},[t,c,i,u]),p=tt(g=>{o.current=g,f()});return{getButtonProps:h,buttonRef:p}}function XV(e){return mn(e)&&e.tagName==="BUTTON"}function Mg(e,t,n,r){const i=fr(G4).current;return ZV(i,e,t,n,r)&&q4(i,[e,t,n,r]),i.callback}function QV(e){const t=fr(G4).current;return JV(t,e)&&q4(t,e),t.callback}function G4(){return{callback:null,cleanup:null,refs:[]}}function ZV(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function JV(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function q4(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const a=o(n);typeof a=="function"&&(r[i]=a);break}case"object":{o.current=n;break}}}e.cleanup=()=>{for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const a=r[i];typeof a=="function"?a():o(null);break}case"object":{o.current=null;break}}}}}}}function HT(e){if(!C.isValidElement(e))return null;const t=e,n=t.props;return(TS(19)?n==null?void 0:n.ref:t.ref)??null}function eY(e,t){const n={};for(const r in e){const i=e[r];if(t!=null&&t.hasOwnProperty(r)){const o=t[r](i);o!=null&&Object.assign(n,o);continue}i===!0?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function tY(e,t){return typeof e=="function"?e(t):e}function nY(e,t){return typeof e=="function"?e(t):e}function Ar(e,t,n={}){const r=t.render,i=rY(t,n);if(n.enabled===!1)return null;const o=n.state??Sr;return oY(e,r,i,o)}function rY(e,t={}){const{className:n,style:r,render:i}=e,{state:o=Sr,ref:a,props:u,stateAttributesMapping:c,enabled:f=!0}=t,h=f?tY(n,o):void 0,p=f?nY(r,o):void 0,g=f?eY(o,c):Sr,y=f?Ux(g,Array.isArray(u)?qV(u):u)??Sr:Sr;return typeof document<"u"&&(f?Array.isArray(a)?y.ref=QV([y.ref,HT(i),...a]):y.ref=Mg(y.ref,HT(i),a):Mg(null,null)),f?(h!==void 0&&(y.className=U4(y.className,h)),p!==void 0&&(y.style=Ux(y.style,p)),y):Sr}const iY=Symbol.for("react.lazy");function oY(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=z4(n,t.props);i.ref=n.ref;let o=t;return(o==null?void 0:o.$$typeof)===iY&&(o=C.Children.toArray(t)[0]),C.cloneElement(o,i)}if(e&&typeof e=="string")return sY(e,n);throw new Error(Tn(8))}function sY(e,t){return e==="button"?C.createElement("button",{type:"button",...t,key:t.key}):e==="img"?C.createElement("img",{alt:"",...t,key:t.key}):C.createElement(e,t)}let pl=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Kd.startingStyle]="startingStyle",e[e.endingStyle=Kd.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),Og=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const aY={[Og.popupOpen]:""},lY={[Og.popupOpen]:"",[Og.pressed]:""},uY={[pl.open]:""},cY={[pl.closed]:""},fY={[pl.anchorHidden]:""},IS={open(e){return e?aY:null}},dY={open(e){return e?lY:null}},Xl={open(e){return e?uY:cY},anchorHidden(e){return e?fY:null}},hY=500,pY={style:{transition:"none"}},jS="data-base-ui-click-trigger",V4={fallbackAxisSide:"end"},mY={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function LS(e){return Wl(e,"base-ui")}function Y4(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:i=!0,event:o="click",toggle:a=!0,ignoreMouse:u=!1,stickIfOpen:c=!0,touchOpenDelay:f=0,reason:h=wa}=t,p=C.useRef(void 0),g=ES(),y=xa(),b=C.useMemo(()=>({onPointerDown(v){p.current=v.pointerType},onMouseDown(v){const S=p.current,x=v.nativeEvent,_=n.select("open");if(v.button!==0||o==="click"||jl(S,!0)&&u)return;const R=r.current.openEvent,T=R==null?void 0:R.type,A=n.select("domReferenceElement")!==v.currentTarget,D=_&&A||!(_&&a&&(!(R&&c)||T==="click"||T==="mousedown"));if(Ry(x.target)){const $=Vt(h,x,x.target);D&&S==="touch"&&f>0?y.start(f,()=>{n.setOpen(!0,$)}):n.setOpen(D,$);return}const O=v.currentTarget;g.request(()=>{const $=Vt(h,x,O);D&&S==="touch"&&f>0?y.start(f,()=>{n.setOpen(!0,$)}):n.setOpen(D,$)})},onClick(v){if(o==="mousedown-only")return;const S=p.current;if(o==="mousedown"&&S){p.current=void 0;return}if(jl(S,!0)&&u)return;const x=n.select("open"),_=r.current.openEvent,R=n.select("domReferenceElement")!==v.currentTarget,T=x&&R||!(x&&a&&(!(_&&c)||M4(_))),A=Vt(h,v.nativeEvent,v.currentTarget);T&&S==="touch"&&f>0?y.start(f,()=>{n.setOpen(!0,A)}):n.setOpen(T,A)},onKeyDown(){p.current=void 0}}),[r,o,u,n,c,a,g,y,f,h]);return C.useMemo(()=>i?{reference:b}:Sr,[i,b])}const gY=C.forwardRef(function(e,t){const{render:n,className:r,disabled:i=!1,nativeButton:o=!0,id:a,payload:u,handle:c,...f}=e,h=Ah(!0),p=(c==null?void 0:c.store)??(h==null?void 0:h.store);if(!p)throw new Error(Tn(79));const g=LS(a),y=p.useState("floatingRootContext"),b=p.useState("isOpenedByTrigger",g),v=C.useRef(null),{registerTrigger:S,isMountedByThisTrigger:x}=kS(g,v,p,{payload:u}),{getButtonProps:_,buttonRef:R}=H4({disabled:i,native:o}),T=Y4(y,{enabled:y!=null}),A=Th([T]),D={disabled:i,open:b},O=p.useState("triggerProps",x);return Ar("button",e,{state:D,ref:[R,t,S,v],props:[A.getReferenceProps(),O,{[jS]:"",id:g},f,_],stateAttributesMapping:IS})});function FS(e){return TS(19)?e:e?"true":void 0}const W4=C.createContext(void 0);function yY(){const e=C.useContext(W4);if(e===void 0)throw new Error(Tn(26));return e}const K4=C.forwardRef(function(e,t){const{cutout:n,...r}=e;let i;if(n){const o=n==null?void 0:n.getBoundingClientRect();i=`polygon(
307
+ 0% 0%,
308
+ 100% 0%,
309
+ 100% 100%,
310
+ 0% 100%,
311
+ 0% 0%,
312
+ ${o.left}px ${o.top}px,
313
+ ${o.left}px ${o.bottom}px,
314
+ ${o.right}px ${o.bottom}px,
315
+ ${o.right}px ${o.top}px,
316
+ ${o.left}px ${o.top}px
317
+ )`}return E.jsx("div",{ref:t,role:"presentation","data-base-ui-inert":"",...r,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:i}})}),bY={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},zS={...bY,position:"fixed",top:0,left:0},Qo=C.forwardRef(function(e,t){const[n,r]=C.useState();return gt(()=>{g4&&r("button")},[]),E.jsx("span",{...e,ref:t,style:zS,"aria-hidden":n?void 0:!0,tabIndex:0,role:n,"data-base-ui-focus-guard":""})});var vY=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],$g=vY.join(","),X4=typeof Element>"u",Ic=X4?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Pg=!X4&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Ng=function(e,t){var n;t===void 0&&(t=!0);var r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"inert"),i=r===""||r==="true",o=i||t&&e&&(typeof e.closest=="function"?e.closest("[inert]"):Ng(e.parentNode));return o},xY=function(e){var t,n=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return n===""||n==="true"},Q4=function(e,t,n){if(Ng(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll($g));return t&&Ic.call(e,$g)&&r.unshift(e),r=r.filter(n),r},Ig=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var o=i.shift();if(!Ng(o,!1))if(o.tagName==="SLOT"){var a=o.assignedElements(),u=a.length?a:o.children,c=Ig(u,!0,n);n.flatten?r.push.apply(r,c):r.push({scopeParent:o,candidates:c})}else{var f=Ic.call(o,$g);f&&n.filter(o)&&(t||!e.includes(o))&&r.push(o);var h=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),p=!Ng(h,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(h&&p){var g=Ig(h===!0?o.children:h.children,!0,n);n.flatten?r.push.apply(r,g):r.push({scopeParent:o,candidates:g})}else i.unshift.apply(i,o.children)}}return r},Z4=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},J4=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||xY(e))&&!Z4(e)?0:e.tabIndex},wY=function(e,t){var n=J4(e);return n<0&&t&&!Z4(e)?0:n},SY=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},e$=function(e){return e.tagName==="INPUT"},CY=function(e){return e$(e)&&e.type==="hidden"},EY=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return t},kY=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},RY=function(e){if(!e.name)return!0;var t=e.form||Pg(e),n=function(o){return t.querySelectorAll('input[type="radio"][name="'+o+'"]')},r;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var i=kY(r,e.form);return!i||i===e},_Y=function(e){return e$(e)&&e.type==="radio"},TY=function(e){return _Y(e)&&!RY(e)},AY=function(e){var t,n=e&&Pg(e),r=(t=n)===null||t===void 0?void 0:t.host,i=!1;if(n&&n!==e){var o,a,u;for(i=!!((o=r)!==null&&o!==void 0&&(a=o.ownerDocument)!==null&&a!==void 0&&a.contains(r)||e!=null&&(u=e.ownerDocument)!==null&&u!==void 0&&u.contains(e));!i&&r;){var c,f,h;n=Pg(r),r=(c=n)===null||c===void 0?void 0:c.host,i=!!((f=r)!==null&&f!==void 0&&(h=f.ownerDocument)!==null&&h!==void 0&&h.contains(r))}}return i},GT=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},DY=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n==="full-native"&&"checkVisibility"in e){var i=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}if(getComputedStyle(e).visibility==="hidden")return!0;var o=Ic.call(e,"details>summary:first-of-type"),a=o?e.parentElement:e;if(Ic.call(a,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof r=="function"){for(var u=e;e;){var c=e.parentElement,f=Pg(e);if(c&&!c.shadowRoot&&r(c)===!0)return GT(e);e.assignedSlot?e=e.assignedSlot:!c&&f!==e.ownerDocument?e=f.host:e=c}e=u}if(AY(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return GT(e);return!1},MY=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName==="LEGEND")return Ic.call(t,"fieldset[disabled] *")?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},qx=function(e,t){return!(t.disabled||CY(t)||DY(t,e)||EY(t)||MY(t))},Vx=function(e,t){return!(TY(t)||J4(t)<0||!qx(e,t))},OY=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},t$=function(e){var t=[],n=[];return e.forEach(function(r,i){var o=!!r.scopeParent,a=o?r.scopeParent:r,u=wY(a,o),c=o?t$(r.candidates):a;u===0?o?t.push.apply(t,c):t.push(a):n.push({documentOrder:i,tabIndex:u,item:r,isScope:o,content:c})}),n.sort(SY).reduce(function(r,i){return i.isScope?r.push.apply(r,i.content):r.push(i.content),r},[]).concat(t)},Mh=function(e,t){t=t||{};var n;return t.getShadowRoot?n=Ig([e],t.includeContainer,{filter:Vx.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:OY}):n=Q4(e,t.includeContainer,Vx.bind(null,t)),t$(n)},$Y=function(e,t){t=t||{};var n;return t.getShadowRoot?n=Ig([e],t.includeContainer,{filter:qx.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):n=Q4(e,t.includeContainer,qx.bind(null,t)),n},n$=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return Ic.call(e,$g)===!1?!1:Vx(t,e)};const sf=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function r$(e,t){const n=Mh(e,sf()),r=n.length;if(r===0)return;const i=Ur(Mt(e)),o=n.indexOf(i),a=o===-1?t===1?0:r-1:o+t;return n[a]}function BS(e){return r$(Mt(e).body,1)||e}function i$(e){return r$(Mt(e).body,-1)||e}function o$(e,t){if(!e)return null;const n=Mh(Mt(e).body,sf()),r=n.length;if(r===0)return null;const i=n.indexOf(e);if(i===-1)return null;const o=(i+t+r)%r;return n[o]}function PY(e){return o$(e,1)}function NY(e){return o$(e,-1)}function lc(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!ct(n,r)}function IY(e){Mh(e,sf()).forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")})}function qT(e){e.querySelectorAll("[data-tabindex]").forEach(t=>{const n=t.dataset.tabindex;delete t.dataset.tabindex,n?t.setAttribute("tabindex",n):t.removeAttribute("tabindex")})}const s$=C.createContext(null),a$=()=>C.useContext(s$),jY=Nc("portal");function l$(e={}){var b;const{ref:t,container:n,componentProps:r=Sr,elementProps:i}=e,o=Wl(),a=(b=a$())==null?void 0:b.portalNode,[u,c]=C.useState(null),[f,h]=C.useState(null),p=tt(v=>{v!==null&&h(v)}),g=C.useRef(null);gt(()=>{if(n===null){g.current&&(g.current=null,h(null),c(null));return}if(o==null)return;const v=(n&&(SS(n)?n:n.current))??a??document.body;if(v==null){g.current&&(g.current=null,h(null),c(null));return}g.current!==v&&(g.current=v,h(null),c(v))},[n,a,o]);const y=Ar("div",r,{ref:[t,p],props:[{id:o,[jY]:""},i]});return{portalNode:f,portalSubtree:u&&y?gn.createPortal(y,u):null}}const u$=C.forwardRef(function(e,t){const{children:n,container:r,className:i,render:o,renderGuards:a,...u}=e,{portalNode:c,portalSubtree:f}=l$({container:r,ref:t,componentProps:e,elementProps:u}),h=C.useRef(null),p=C.useRef(null),g=C.useRef(null),y=C.useRef(null),[b,v]=C.useState(null),S=b==null?void 0:b.modal,x=b==null?void 0:b.open,_=typeof a=="boolean"?a:!!b&&!b.modal&&b.open&&!!c;C.useEffect(()=>{if(!c||S)return;function T(A){c&&A.relatedTarget&&lc(A)&&(A.type==="focusin"?qT:IY)(c)}return c.addEventListener("focusin",T,!0),c.addEventListener("focusout",T,!0),()=>{c.removeEventListener("focusin",T,!0),c.removeEventListener("focusout",T,!0)}},[c,S]),C.useEffect(()=>{!c||x||qT(c)},[x,c]);const R=C.useMemo(()=>({beforeOutsideRef:h,afterOutsideRef:p,beforeInsideRef:g,afterInsideRef:y,portalNode:c,setFocusManagerState:v}),[c]);return E.jsxs(C.Fragment,{children:[f,E.jsxs(s$.Provider,{value:R,children:[_&&c&&E.jsx(Qo,{"data-type":"outside",ref:h,onFocus:T=>{var A,D;if(lc(T,c))(A=g.current)==null||A.focus();else{const O=b?b.domReference:null;(D=i$(O))==null||D.focus()}}}),_&&c&&E.jsx("span",{"aria-owns":c.id,style:mY}),c&&gn.createPortal(n,c),_&&c&&E.jsx(Qo,{"data-type":"outside",ref:p,onFocus:T=>{var A,D;if(lc(T,c))(A=y.current)==null||A.focus();else{const O=b?b.domReference:null;(D=BS(O))==null||D.focus(),b!=null&&b.closeOnFocusOut&&(b==null||b.onOpenChange(!1,Vt(Xd,T.nativeEvent)))}}})]})]})}),LY=C.forwardRef(function(e,t){const{keepMounted:n=!1,...r}=e,{store:i}=Ah(),o=i.useState("mounted"),a=i.useState("modal"),u=i.useState("open");return o||n?E.jsx(W4.Provider,{value:n,children:E.jsxs(u$,{ref:t,...r,children:[o&&a===!0&&E.jsx(K4,{ref:i.context.internalBackdropRef,inert:FS(!u)}),e.children]})}):null}),FY={...Xl,...rf},zY=C.forwardRef(function(e,t){const{render:n,className:r,forceRender:i=!1,...o}=e,{store:a}=Ah(),u=a.useState("open"),c=a.useState("nested"),f=a.useState("mounted"),h=a.useState("transitionStatus");return Ar("div",e,{state:{open:u,transitionStatus:h},ref:[a.context.backdropRef,t],stateAttributesMapping:FY,props:[{role:"presentation",hidden:!f,style:{userSelect:"none",WebkitUserSelect:"none"}},o],enabled:i||!c})});let BY=(function(e){return e.nestedDialogs="--nested-dialogs",e})({}),UY=(function(e){return e[e.open=pl.open]="open",e[e.closed=pl.closed]="closed",e[e.startingStyle=pl.startingStyle]="startingStyle",e[e.endingStyle=pl.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const c$="ArrowUp",f$="ArrowDown",d$="ArrowLeft",h$="ArrowRight",HY="Home",GY=new Set([d$,h$]),qY=new Set([c$,f$]),VY=new Set([...GY,...qY]);[...VY];const p$=new Set([c$,f$,d$,h$,HY,"End"]);function no(e){const t=fr(YY,e).current;return t.next=e,gt(t.effect),t}function YY(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}let VT=0;function Zv(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(VT);const o=()=>e==null?void 0:e.focus({preventScroll:n});i?o():VT=requestAnimationFrame(o)}const uc={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function YT(e){return e==="inert"?uc.inert:e==="aria-hidden"?uc["aria-hidden"]:uc.none}let ym=new WeakSet,bm={},Jv=0;const m$=e=>e&&(e.host||m$(e.parentNode)),WY=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=m$(n);return e.contains(r)?r:null}).filter(n=>n!=null);function KY(e,t,n,r){const i="data-base-ui-inert",o=r?"inert":n?"aria-hidden":null,a=WY(t,e),u=new Set,c=new Set(a),f=[];bm[i]||(bm[i]=new WeakMap);const h=bm[i];a.forEach(p),g(t),u.clear();function p(y){!y||u.has(y)||(u.add(y),y.parentNode&&p(y.parentNode))}function g(y){!y||c.has(y)||[].forEach.call(y.children,b=>{if(Ea(b)!=="script")if(u.has(b))g(b);else{const v=o?b.getAttribute(o):null,S=v!==null&&v!=="false",x=YT(o),_=(x.get(b)||0)+1,R=(h.get(b)||0)+1;x.set(b,_),h.set(b,R),f.push(b),_===1&&S&&ym.add(b),R===1&&b.setAttribute(i,""),!S&&o&&b.setAttribute(o,o==="inert"?"":"true")}})}return Jv+=1,()=>{f.forEach(y=>{const b=YT(o),v=(b.get(y)||0)-1,S=(h.get(y)||0)-1;b.set(y,v),h.set(y,S),v||(!ym.has(y)&&o&&y.removeAttribute(o),ym.delete(y)),S||y.removeAttribute(i)}),Jv-=1,Jv||(uc.inert=new WeakMap,uc["aria-hidden"]=new WeakMap,uc.none=new WeakMap,ym=new WeakSet,bm={})}}function XY(e,t=!1,n=!1){const r=Mt(e[0]).body;return KY(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}function QY(e,t){const n=fn(e.target);return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const WT=20;let sa=[];function US(){sa=sa.filter(e=>{var t;return(t=e.deref())==null?void 0:t.isConnected})}function ZY(e){US(),e&&Ea(e)!=="body"&&(sa.push(new WeakRef(e)),sa.length>WT&&(sa=sa.slice(-WT)))}function e1(){var e;return US(),(e=sa[sa.length-1])==null?void 0:e.deref()}function JY(e){if(!e)return null;const t=sf();return n$(e,t)?e:Mh(e,t)[0]||e}function eW(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():Kr(e).display!=="none"}function KT(e,t){var o;if(!t.current.includes("floating")&&!((o=e.getAttribute("role"))!=null&&o.includes("dialog")))return;const n=sf(),r=$Y(e,n).filter(a=>{const u=a.getAttribute("data-tabindex")||"";return n$(a,n)||a.hasAttribute("data-tabindex")&&!u.startsWith("-")}),i=e.getAttribute("tabindex");t.current.includes("floating")||r.length===0?i!=="0"&&e.setAttribute("tabindex","0"):(i!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function g$(e){const{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:o=!0,restoreFocus:a=!1,modal:u=!0,closeOnFocusOut:c=!0,openInteractionType:f="",nextFocusableElement:h,previousFocusableElement:p,beforeContentFocusGuardRef:g,externalTree:y}=e,b="rootStore"in t?t.rootStore:t,v=b.useState("open"),S=b.useState("domReferenceElement"),x=b.useState("floatingElement"),{events:_,dataRef:R}=b.context,T=tt(()=>{var Z;return(Z=R.current.floatingContext)==null?void 0:Z.nodeId}),A=i===!1,D=zT(S)&&A,O=C.useRef(["content"]),$=no(i),z=no(o),j=no(f),I=of(y),M=a$(),B=C.useRef(null),G=C.useRef(null),L=C.useRef(!1),F=C.useRef(!1),U=C.useRef(!1),V=C.useRef(-1),W=C.useRef(""),N=C.useRef(""),Y=C.useRef(null),J=C.useRef(null),H=Mg(Y,g,M==null?void 0:M.beforeInsideRef),ie=Mg(J,M==null?void 0:M.afterInsideRef),re=xa(),he=xa(),ve=ES(),Re=M!=null,ce=Bx(x),Ie=tt((Z=ce)=>Z?Mh(Z,sf()):[]),Ve=tt(Z=>{const ne=Ie(Z);return O.current.map(()=>ne).filter(Boolean).flat()});C.useEffect(()=>{if(r||!u)return;function Z(xe){xe.key==="Tab"&&ct(ce,Ur(Mt(ce)))&&Ie().length===0&&!D&&uV(xe)}const ne=Mt(ce);return ne.addEventListener("keydown",Z),()=>{ne.removeEventListener("keydown",Z)}},[r,S,ce,u,O,D,Ie,Ve]),C.useEffect(()=>{if(r||!v)return;const Z=Mt(ce);function ne(){U.current=!1}function xe(Ce){const le=Un(Ce),oe=ct(x,le)||ct(S,le)||ct(M==null?void 0:M.portalNode,le);U.current=!oe,N.current=Ce.pointerType||"keyboard",le!=null&&le.closest(`[${jS}]`)&&(F.current=!0)}function ge(){N.current="keyboard"}return Z.addEventListener("pointerdown",xe,!0),Z.addEventListener("pointerup",ne,!0),Z.addEventListener("pointercancel",ne,!0),Z.addEventListener("keydown",ge,!0),()=>{Z.removeEventListener("pointerdown",xe,!0),Z.removeEventListener("pointerup",ne,!0),Z.removeEventListener("pointercancel",ne,!0),Z.removeEventListener("keydown",ge,!0)}},[r,x,S,ce,v,M]),C.useEffect(()=>{if(r||!c)return;const Z=Mt(ce);function ne(){F.current=!0,he.start(0,()=>{F.current=!1})}function xe(me){const ae=Un(me),Oe=Ie().indexOf(ae);Oe!==-1&&(V.current=Oe)}function ge(me){const ae=me.relatedTarget,Oe=me.currentTarget,Te=Un(me);queueMicrotask(()=>{const _e=T(),De=b.context.triggerElements,ue=(ae==null?void 0:ae.hasAttribute(Nc("focus-guard")))&&[Y.current,J.current,M==null?void 0:M.beforeInsideRef.current,M==null?void 0:M.afterInsideRef.current,M==null?void 0:M.beforeOutsideRef.current,M==null?void 0:M.afterOutsideRef.current,Io(p),Io(h)].includes(ae),Se=!(ct(S,ae)||ct(x,ae)||ct(ae,x)||ct(M==null?void 0:M.portalNode,ae)||ae!=null&&De.hasElement(ae)||De.hasMatchingElement(ke=>ct(ke,ae))||ue||I&&(Ol(I.nodesRef.current,_e).find(ke=>{var Pe,Le;return ct((Pe=ke.context)==null?void 0:Pe.elements.floating,ae)||ct((Le=ke.context)==null?void 0:Le.elements.domReference,ae)})||BT(I.nodesRef.current,_e).find(ke=>{var Pe,Le,st;return[(Pe=ke.context)==null?void 0:Pe.elements.floating,Bx((Le=ke.context)==null?void 0:Le.elements.floating)].includes(ae)||((st=ke.context)==null?void 0:st.elements.domReference)===ae})));if(Oe===S&&ce&&KT(ce,O),a&&Oe!==S&&!eW(Te)&&Ur(Z)===Z.body){if(mn(ce)&&(ce.focus(),a==="popup")){ve.request(()=>{ce.focus()});return}const ke=V.current,Pe=Ie(),Le=Pe[ke]||Pe[Pe.length-1]||ce;mn(Le)&&Le.focus()}if(R.current.insideReactTree){R.current.insideReactTree=!1;return}(D||!u)&&ae&&Se&&!F.current&&(D||ae!==e1())&&(L.current=!0,b.setOpen(!1,Vt(Xd,me)))})}function Ce(){U.current||(R.current.insideReactTree=!0,re.start(0,()=>{R.current.insideReactTree=!1}))}const le=mn(S)?S:null,oe=[];if(!(!x&&!le))return le&&(le.addEventListener("focusout",ge),le.addEventListener("pointerdown",ne),oe.push(()=>{le.removeEventListener("focusout",ge),le.removeEventListener("pointerdown",ne)})),x&&(x.addEventListener("focusin",xe),x.addEventListener("focusout",ge),M&&(x.addEventListener("focusout",Ce,!0),oe.push(()=>{x.removeEventListener("focusout",Ce,!0)})),oe.push(()=>{x.removeEventListener("focusin",xe),x.removeEventListener("focusout",ge)})),()=>{oe.forEach(me=>{me()})}},[r,S,x,ce,u,I,M,b,c,a,Ie,D,T,O,R,re,he,ve,h,p]),C.useEffect(()=>{var ge,Ce,le;if(r||!x||!v)return;const Z=Array.from(((ge=M==null?void 0:M.portalNode)==null?void 0:ge.querySelectorAll(`[${Nc("portal")}]`))||[]),ne=(le=(Ce=(I?BT(I.nodesRef.current,T()):[]).find(oe=>{var me;return zT(((me=oe.context)==null?void 0:me.elements.domReference)||null)}))==null?void 0:Ce.context)==null?void 0:le.elements.domReference,xe=[x,ne,...Z,B.current,G.current,Y.current,J.current,M==null?void 0:M.beforeOutsideRef.current,M==null?void 0:M.afterOutsideRef.current,Io(p),Io(h),D?S:null].filter(oe=>oe!=null);return XY(xe,u||D)},[v,r,S,x,u,O,M,D,I,T,h,p]),gt(()=>{if(!v||r||!mn(ce))return;const Z=Mt(ce),ne=Ur(Z);queueMicrotask(()=>{const xe=Ve(ce),ge=$.current,Ce=typeof ge=="function"?ge(j.current||""):ge;if(Ce===void 0||Ce===!1)return;let le;Ce===!0||Ce===null?le=xe[0]||ce:le=Io(Ce),le=le||xe[0]||ce,!ct(ce,ne)&&Zv(le,{preventScroll:le===ce})})},[r,v,ce,A,Ve,$,j]),gt(()=>{if(r||!ce)return;const Z=Mt(ce),ne=Ur(Z);ZY(ne);function xe(le){if(le.open||(W.current=QY(le.nativeEvent,N.current)),le.reason===Kn&&le.nativeEvent.type==="mouseleave"&&(L.current=!0),le.reason===L4)if(le.nested)L.current=!1;else if(fV(le.nativeEvent)||dV(le.nativeEvent))L.current=!1;else{let oe=!1;document.createElement("div").focus({get preventScroll(){return oe=!0,!1}}),oe?L.current=!1:L.current=!0}}_.on("openchange",xe);const ge=Z.createElement("span");ge.setAttribute("tabindex","-1"),ge.setAttribute("aria-hidden","true"),Object.assign(ge.style,zS),Re&&S&&S.insertAdjacentElement("afterend",ge);function Ce(){const le=z.current;let oe=typeof le=="function"?le(W.current):le;if(oe===void 0||oe===!1)return null;if(oe===null&&(oe=!0),typeof oe=="boolean"){const ae=S||e1();return ae&&ae.isConnected?ae:ge}const me=S||e1()||ge;return Io(oe)||me}return()=>{_.off("openchange",xe);const le=Ur(Z),oe=ct(x,le)||I&&Ol(I.nodesRef.current,T(),!1).some(ae=>{var Oe;return ct((Oe=ae.context)==null?void 0:Oe.elements.floating,le)}),me=Ce();queueMicrotask(()=>{const ae=JY(me),Oe=typeof z.current!="boolean";z.current&&!L.current&&mn(ae)&&(!(!Oe&&ae!==le&&le!==Z.body)||oe)&&ae.focus({preventScroll:!0}),ge.remove(),L.current=!1})}},[r,x,ce,z,R,_,I,Re,S,T]),gt(()=>{if(!p4||v||!x)return;const Z=Ur(Mt(x));!mn(Z)||!Ry(Z)||ct(x,Z)&&Z.blur()},[v,x]),gt(()=>{if(!(r||!M))return M.setFocusManagerState({modal:u,closeOnFocusOut:c,open:v,onOpenChange:b.setOpen,domReference:S}),()=>{M.setFocusManagerState(null)}},[r,M,u,v,b,c,S]),gt(()=>{if(!(r||!ce))return KT(ce,O),()=>{queueMicrotask(US)}},[r,ce,O]);const X=!r&&(u?!D:!0)&&(Re||u);return E.jsxs(C.Fragment,{children:[X&&E.jsx(Qo,{"data-type":"inside",ref:H,onFocus:Z=>{var ne,xe;if(u){const ge=Ve();Zv(ge[ge.length-1])}else M!=null&&M.portalNode&&(L.current=!1,lc(Z,M.portalNode)?(ne=BS(S))==null||ne.focus():(xe=Io(p??M.beforeOutsideRef))==null||xe.focus())}}),n,X&&E.jsx(Qo,{"data-type":"inside",ref:ie,onFocus:Z=>{var ne,xe;u?Zv(Ve()[0]):M!=null&&M.portalNode&&(c&&(L.current=!0),lc(Z,M.portalNode)?(ne=i$(S))==null||ne.focus():(xe=Io(h??M.afterOutsideRef))==null||xe.focus())}})]})}const tW={...Xl,...rf,nestedDialogOpen(e){return e?{[UY.nestedDialogOpen]:""}:null}},nW=C.forwardRef(function(e,t){const{className:n,finalFocus:r,initialFocus:i,render:o,...a}=e,{store:u}=Ah(),c=u.useState("descriptionElementId"),f=u.useState("disablePointerDismissal"),h=u.useState("floatingRootContext"),p=u.useState("popupProps"),g=u.useState("modal"),y=u.useState("mounted"),b=u.useState("nested"),v=u.useState("nestedOpenDialogCount"),S=u.useState("open"),x=u.useState("openMethod"),_=u.useState("titleElementId"),R=u.useState("transitionStatus"),T=u.useState("role");yY(),Rh({open:S,ref:u.context.popupRef,onComplete(){var z,j;S&&((j=(z=u.context).onOpenChangeComplete)==null||j.call(z,!0))}});function A(z){return z==="touch"?u.context.popupRef.current:!0}const D=i===void 0?A:i,O=v>0,$=Ar("div",e,{state:{open:S,nested:b,transitionStatus:R,nestedDialogOpen:O},props:[p,{"aria-labelledby":_??void 0,"aria-describedby":c??void 0,role:T,tabIndex:-1,hidden:!y,onKeyDown(z){p$.has(z.key)&&z.stopPropagation()},style:{[BY.nestedDialogs]:v}},a],ref:[t,u.context.popupRef,u.useStateSetter("popupElement")],stateAttributesMapping:tW});return E.jsx(g$,{context:h,openInteractionType:x,disabled:!y,closeOnFocusOut:!f,initialFocus:D,returnFocus:r,modal:g!==!1,restoreFocus:"popup",children:$})}),y$=C.createContext(void 0);function af(e){const t=C.useContext(y$);if(t===void 0&&!e)throw new Error(Tn(47));return t}function rW(){return{...PS(),disabled:!1,modal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1}}const iW={...NS,disabled:We(e=>e.disabled),instantType:We(e=>e.instantType),openMethod:We(e=>e.openMethod),openChangeReason:We(e=>e.openChangeReason),modal:We(e=>e.modal),stickIfOpen:We(e=>e.stickIfOpen),titleElementId:We(e=>e.titleElementId),descriptionElementId:We(e=>e.descriptionElementId),openOnHover:We(e=>e.openOnHover),closeDelay:We(e=>e.closeDelay),hasViewport:We(e=>e.hasViewport)};let oW=class b$ extends _h{constructor(n){const r={...rW(),...n};r.open&&(n==null?void 0:n.mounted)===void 0&&(r.mounted=!0);super(r,{popupRef:C.createRef(),backdropRef:C.createRef(),internalBackdropRef:C.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:C.createRef(),beforeContentFocusGuardRef:C.createRef(),stickIfOpenTimeout:new zi,triggerElements:new Dh},iW);te(this,"setOpen",(n,r)=>{var f,h,p;const i=r.reason===Kn,o=r.reason===wa&&r.event.detail===0,a=!n&&(r.reason===_y||r.reason==null);if(r.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},(h=(f=this.context).onOpenChange)==null||h.call(f,n,r),r.isCanceled)return;const u={open:n,nativeEvent:r.event,reason:r.reason,nested:this.state.nested,triggerElement:r.trigger};(p=this.state.floatingRootContext.context.events)==null||p.emit("openchange",u);const c=()=>{var b;const g={open:n,openChangeReason:r.reason},y=((b=r.trigger)==null?void 0:b.id)??null;(y||n)&&(g.activeTriggerId=y,g.activeTriggerElement=r.trigger??null),this.update(g)};i?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(hY,()=>{this.set("stickIfOpen",!1)}),gn.flushSync(c)):c(),o||a?this.set("instantType",o?"click":"dismiss"):r.reason===Xd?this.set("instantType","focus"):this.set("instantType",void 0)});te(this,"disposeEffect",()=>this.context.stickIfOpenTimeout.disposeEffect())}static useStore(n,r){const i=fr(()=>new b$(r)).current,o=n??i;return kh(i.disposeEffect),o}};function XT({props:e}){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:o,modal:a=!1,handle:u,triggerId:c,defaultTriggerId:f=null}=e,h=oW.useStore(u==null?void 0:u.store,{modal:a,open:r,openProp:n,activeTriggerId:f,triggerIdProp:c});wS(()=>{n===void 0&&h.state.open===!1&&r===!0&&h.update({open:!0,activeTriggerId:f})}),h.useControlledProp("openProp",n),h.useControlledProp("triggerIdProp",c);const p=h.useState("open"),g=h.useState("positionerElement"),y=h.useState("payload"),b=h.useState("openChangeReason");h.useContextCallback("onOpenChange",i),h.useContextCallback("onOpenChangeComplete",o);const{openMethod:v,triggerProps:S,reset:x}=S4(p);RS(h);const{forceUnmount:_}=_S(p,h,()=>{h.update({stickIfOpen:!0,openChangeReason:null}),x()});w4(p&&a===!0&&b!==Kn&&v!=="touch",g),C.useEffect(()=>{p||h.context.stickIfOpenTimeout.clear()},[h,p]);const R=C.useCallback(L=>{const F=Vt(L);return F.preventUnmountOnClose=()=>{h.set("preventUnmountingOnClose",!0)},F},[h]),T=C.useCallback(()=>{h.setOpen(!1,R(OS))},[h,R]);C.useImperativeHandle(e.actionsRef,()=>({unmount:_,close:T}),[_,T]);const A=DS({popupStore:h,onOpenChange:h.setOpen}),D=$S(A,{outsidePressEvent:{mouse:a==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),O=j4(A),{getReferenceProps:$,getFloatingProps:z,getTriggerProps:j}=Th([D,O]),I=C.useMemo(()=>$(S),[$,S]),M=C.useMemo(()=>j(S),[j,S]),B=C.useMemo(()=>z(),[z]);h.useSyncedValues({modal:a,openMethod:v,activeTriggerProps:I,inactiveTriggerProps:M,popupProps:B,floatingRootContext:A,nested:Kl()!=null});const G=C.useMemo(()=>({store:h}),[h]);return E.jsx(y$.Provider,{value:G,children:typeof t=="function"?t({payload:y}):t})}function sW(e){return af(!0)?E.jsx(XT,{props:e}):E.jsx(Yq,{children:E.jsx(XT,{props:e})})}const v$=({children:e,...t})=>E.jsx(sW,{"data-slot":"popover-root",...t,children:e});v$.displayName="PopoverRoot";const aW=300;function ig(e,t,n){if(n&&!jl(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r==null?void 0:r[t]}return e==null?void 0:e[t]}const Yx=Nc("safe-polygon"),lW=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${I4}`;function uW(e){return e?!!e.closest(lW):!1}let cW=class x${constructor(){te(this,"dispose",()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()});te(this,"disposeEffect",()=>this.dispose);this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.unbindMouseMove=()=>{},this.restTimeoutPending=!1,this.openChangeTimeout=new zi,this.restTimeout=new zi,this.handleCloseOptions=void 0}static create(){return new x$}};function w$(e){const t=fr(cW.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||(n.hoverInteractionState=t),kh(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}function t1(e){return typeof e=="function"?e():e}const fW={current:null};function S$(e,t={}){var j;const n="rootStore"in e?e.rootStore:e,{dataRef:r,events:i}=n.context,{enabled:o=!0,delay:a=0,handleClose:u=null,mouseOnly:c=!1,restMs:f=0,move:h=!0,triggerElementRef:p=fW,externalTree:g,isActiveTrigger:y=!0}=t,b=of(g),v=w$(n),S=no(u),x=no(a),_=no(f),R=no(o);y&&(v.handleCloseOptions=(j=S.current)==null?void 0:j.__options);const T=tt(()=>v.interactedInside?!0:r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1),A=tt(I=>Ag(I,n.context.triggerElements)),D=C.useCallback((I,M=!0)=>{const B=ig(x.current,"close",v.pointerType);B&&!v.handler?v.openChangeTimeout.start(B,()=>n.setOpen(!1,Vt(Kn,I))):M&&(v.openChangeTimeout.clear(),n.setOpen(!1,Vt(Kn,I)))},[x,n,v]),O=tt(()=>{v.unbindMouseMove(),v.handler=void 0}),$=tt(()=>{if(v.performedPointerEventsMutation){const I=Mt(n.select("domReferenceElement")).body;I.style.pointerEvents="",I.removeAttribute(Yx),v.performedPointerEventsMutation=!1}});C.useEffect(()=>{if(!o)return;function I(M){M.open||(v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return i.on("openchange",I),()=>{i.off("openchange",I)}},[o,i,v]);const z=tt(I=>{var B;if(T()||!r.current.floatingContext||A(I.relatedTarget))return;const M=p.current;(B=S.current)==null||B.call(S,{...r.current.floatingContext,tree:b,x:I.clientX,y:I.clientY,onClose(){$(),O(),!T()&&M===n.select("domReferenceElement")&&D(I)}})(I)});return C.useEffect(()=>{if(!o)return;const I=p.current??(y?n.select("domReferenceElement"):null);if(!Nt(I))return;function M(L){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,c&&!jl(v.pointerType)||t1(_.current)>0&&!ig(x.current,"open"))return;const F=ig(x.current,"open",v.pointerType),U=n.select("domReferenceElement"),V=n.context.triggerElements,W=(V.hasElement(L.target)||V.hasMatchingElement(H=>ct(H,L.target)))&&(!U||!ct(U,L.target)),N=L.currentTarget??null,Y=n.select("open"),J=!Y||W;W&&Y?n.setOpen(!0,Vt(Kn,L,N)):F?v.openChangeTimeout.start(F,()=>{J&&n.setOpen(!0,Vt(Kn,L,N))}):J&&n.setOpen(!0,Vt(Kn,L,N))}function B(L){if(T()){$();return}v.unbindMouseMove();const F=n.select("domReferenceElement"),U=Mt(F);if(v.restTimeout.clear(),v.restTimeoutPending=!1,!A(L.relatedTarget)){if(S.current&&r.current.floatingContext){n.select("open")||v.openChangeTimeout.clear();const V=p.current;v.handler=S.current({...r.current.floatingContext,tree:b,x:L.clientX,y:L.clientY,onClose(){$(),O(),R.current&&!T()&&V===n.select("domReferenceElement")&&D(L,!0)}});const W=v.handler;W(L),U.addEventListener("mousemove",W),v.unbindMouseMove=()=>{U.removeEventListener("mousemove",W)};return}(v.pointerType!=="touch"||!ct(n.select("floatingElement"),L.relatedTarget))&&D(L)}}function G(L){z(L)}return n.select("open")&&I.addEventListener("mouseleave",G),h&&I.addEventListener("mousemove",M,{once:!0}),I.addEventListener("mouseenter",M),I.addEventListener("mouseleave",B),()=>{I.removeEventListener("mouseleave",G),h&&I.removeEventListener("mousemove",M),I.removeEventListener("mouseenter",M),I.removeEventListener("mouseleave",B)}},[O,$,r,x,D,n,o,S,z,v,y,T,A,c,h,_,p,b,R]),C.useMemo(()=>{if(!o)return;function I(M){v.pointerType=M.pointerType}return{onPointerDown:I,onPointerEnter:I,onMouseMove(M){const{nativeEvent:B}=M,G=M.currentTarget,L=n.select("domReferenceElement"),F=n.context.triggerElements,U=n.select("open"),V=(F.hasElement(M.target)||F.hasMatchingElement(N=>ct(N,M.target)))&&(!L||!ct(L,M.target));if(c&&!jl(v.pointerType)||U&&!V||t1(_.current)===0||!V&&v.restTimeoutPending&&M.movementX**2+M.movementY**2<2)return;v.restTimeout.clear();function W(){if(v.restTimeoutPending=!1,T())return;const N=n.select("open");!v.blockMouseMove&&(!N||V)&&n.setOpen(!0,Vt(Kn,B,G))}v.pointerType==="touch"?gn.flushSync(()=>{W()}):V&&U?W():(v.restTimeoutPending=!0,v.restTimeout.start(t1(_.current),W))}}},[o,v,T,c,n,_])}function QT(e,t){const[n,r]=e;let i=!1;const o=t.length;for(let a=0,u=o-1;a<o;u=a++){const[c,f]=t[a]||[0,0],[h,p]=t[u]||[0,0];f>=r!=p>=r&&n<=(h-c)*(r-f)/(p-f)+c&&(i=!i)}return i}function dW(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function C$(e={}){const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i=new zi;let o=!1,a=null,u=null,c=typeof performance<"u"?performance.now():0;function f(p,g){const y=performance.now(),b=y-c;if(a===null||u===null||b===0)return a=p,u=g,c=y,null;const v=p-a,S=g-u,x=Math.sqrt(v*v+S*S)/b;return a=p,u=g,c=y,x}const h=({x:p,y:g,placement:y,elements:b,onClose:v,nodeId:S,tree:x})=>function(_){function R(){i.clear(),v()}if(i.clear(),!b.domReference||!b.floating||y==null||p==null||g==null)return;const{clientX:T,clientY:A}=_,D=[T,A],O=Un(_),$=_.type==="mouseleave",z=ct(b.floating,O),j=ct(b.domReference,O),I=b.domReference.getBoundingClientRect(),M=b.floating.getBoundingClientRect(),B=y.split("-")[0],G=p>M.right-M.width/2,L=g>M.bottom-M.height/2,F=dW(D,I),U=M.width>I.width,V=M.height>I.height,W=(U?I:M).left,N=(U?I:M).right,Y=(V?I:M).top,J=(V?I:M).bottom;if(z&&(o=!0,!$))return;if(j&&(o=!1),j&&!$){o=!0;return}if($&&Nt(_.relatedTarget)&&ct(b.floating,_.relatedTarget)||x&&Ol(x.nodesRef.current,S).some(({context:re})=>re==null?void 0:re.open))return;if(B==="top"&&g>=I.bottom-1||B==="bottom"&&g<=I.top+1||B==="left"&&p>=I.right-1||B==="right"&&p<=I.left+1)return R();let H=[];switch(B){case"top":H=[[W,I.top+1],[W,M.bottom-1],[N,M.bottom-1],[N,I.top+1]];break;case"bottom":H=[[W,M.top+1],[W,I.bottom-1],[N,I.bottom-1],[N,M.top+1]];break;case"left":H=[[M.right-1,J],[M.right-1,Y],[I.left+1,Y],[I.left+1,J]];break;case"right":H=[[I.right-1,J],[I.right-1,Y],[M.left+1,Y],[M.left+1,J]];break}function ie([re,he]){switch(B){case"top":{const ve=[U?re+t/2:G?re+t*4:re-t*4,he+t+1],Re=[U?re-t/2:G?re+t*4:re-t*4,he+t+1],ce=[[M.left,G||U?M.bottom-t:M.top],[M.right,G?U?M.bottom-t:M.top:M.bottom-t]];return[ve,Re,...ce]}case"bottom":{const ve=[U?re+t/2:G?re+t*4:re-t*4,he-t],Re=[U?re-t/2:G?re+t*4:re-t*4,he-t],ce=[[M.left,G||U?M.top+t:M.bottom],[M.right,G?U?M.top+t:M.bottom:M.top+t]];return[ve,Re,...ce]}case"left":{const ve=[re+t+1,V?he+t/2:L?he+t*4:he-t*4],Re=[re+t+1,V?he-t/2:L?he+t*4:he-t*4];return[[L||V?M.right-t:M.left,M.top],[L?V?M.right-t:M.left:M.right-t,M.bottom],ve,Re]}case"right":{const ve=[re-t,V?he+t/2:L?he+t*4:he-t*4],Re=[re-t,V?he-t/2:L?he+t*4:he-t*4],ce=[[L||V?M.left+t:M.right,M.top],[L?V?M.left+t:M.right:M.left+t,M.bottom]];return[ve,Re,...ce]}default:return[]}}if(!QT([T,A],H)){if(o&&!F)return R();if(!$&&r){const re=f(_.clientX,_.clientY);if(re!==null&&re<.1)return R()}QT([T,A],ie([p,g]))?!o&&r&&i.start(40,R):R()}};return h.__options={blockPointerEvents:n},h}const hW=C.forwardRef(function(e,t){const{render:n,className:r,disabled:i=!1,nativeButton:o=!0,handle:a,payload:u,openOnHover:c=!1,delay:f=aW,closeDelay:h=0,id:p,...g}=e,y=af(!0),b=(a==null?void 0:a.store)??(y==null?void 0:y.store);if(!b)throw new Error(Tn(74));const v=LS(p),S=b.useState("isTriggerActive",v),x=b.useState("floatingRootContext"),_=b.useState("isOpenedByTrigger",v),R=C.useRef(null),{registerTrigger:T,isMountedByThisTrigger:A}=kS(v,R,b,{payload:u,disabled:i,openOnHover:c,closeDelay:h}),D=b.useState("openChangeReason"),O=b.useState("stickIfOpen"),$=b.useState("openMethod"),z=S$(x,{enabled:x!=null&&c&&($!=="touch"||D!==wa),mouseOnly:!0,move:!1,handleClose:C$(),restMs:f,delay:{close:h},triggerElementRef:R,isActiveTrigger:S}),j=Y4(x,{enabled:x!=null,stickIfOpen:O}),I=Th([j]),M=b.useState("triggerProps",A),B={disabled:i,open:_},{getButtonProps:G,buttonRef:L}=H4({disabled:i,native:o}),F=C.useMemo(()=>({open(Y){return Y&&D===wa?dY.open(Y):IS.open(Y)}}),[D]),U=Ar("button",e,{state:B,ref:[L,t,T,R],props:[I.getReferenceProps(),z,M,{[jS]:"",id:v},g,G],stateAttributesMapping:F}),V=C.useRef(null),W=tt(Y=>{var J;gn.flushSync(()=>{b.setOpen(!1,Vt(Xd,Y.nativeEvent,Y.currentTarget))}),(J=NY(V.current))==null||J.focus()}),N=tt(Y=>{var H;const J=b.select("positionerElement");if(J&&lc(Y,J))(H=b.context.beforeContentFocusGuardRef.current)==null||H.focus();else{gn.flushSync(()=>{b.setOpen(!1,Vt(Xd,Y.nativeEvent,Y.currentTarget))});let ie=PY(b.context.triggerFocusTargetRef.current||R.current);for(;ie!==null&&ct(J,ie);){const re=ie;if(ie=BS(ie),ie===re)break}ie==null||ie.focus()}});return S?E.jsxs(C.Fragment,{children:[E.jsx(Qo,{ref:V,onFocus:W}),E.jsx(C.Fragment,{children:U},v),E.jsx(Qo,{ref:b.context.triggerFocusTargetRef,onFocus:N})]}):E.jsx(C.Fragment,{children:U},v)}),E$=({children:e,...t})=>{const n=C.isValidElement(e);return E.jsx(hW,{"data-slot":"popover-trigger",nativeButton:n,render:n?e:E.jsx("span",{role:"button",tabIndex:0,children:e}),...t})};E$.displayName="PopoverTrigger";const k$=C.createContext(void 0);function pW(){const e=C.useContext(k$);if(e===void 0)throw new Error(Tn(45));return e}const mW=C.forwardRef(function(e,t){const{keepMounted:n=!1,...r}=e,{store:i}=af();return i.useState("mounted")||n?E.jsx(k$.Provider,{value:n,children:E.jsx(u$,{ref:t,...r})}):null}),R$=({children:e,...t})=>E.jsx(mW,{"data-slot":"popover-portal",...t,children:e});R$.displayName="PopoverPortal";const gW={...Xl,...rf},yW=C.forwardRef(function(e,t){const{className:n,render:r,...i}=e,{store:o}=af(),a=o.useState("open"),u=o.useState("mounted"),c=o.useState("transitionStatus"),f=o.useState("openChangeReason");return Ar("div",e,{state:{open:a,transitionStatus:c},ref:[o.context.backdropRef,t],props:[{role:"presentation",hidden:!u,style:{pointerEvents:f===Kn?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},i],stateAttributesMapping:gW})}),_$=({...e})=>E.jsx(yW,{"data-slot":"popover-backdrop",...e});_$.displayName="PopoverBackdrop";const T$=C.createContext(void 0);function bW(){const e=C.useContext(T$);if(!e)throw new Error(Tn(46));return e}const vW=["top","right","bottom","left"],jc=Math.min,Hr=Math.max,jg=Math.round,vm=Math.floor,io=e=>({x:e,y:e}),xW={left:"right",right:"left",bottom:"top",top:"bottom"},wW={start:"end",end:"start"};function Wx(e,t,n){return Hr(e,jc(t,n))}function ns(e,t){return typeof e=="function"?e(t):e}function kr(e){return e.split("-")[0]}function Ra(e){return e.split("-")[1]}function HS(e){return e==="x"?"y":"x"}function GS(e){return e==="y"?"height":"width"}const SW=new Set(["top","bottom"]);function vi(e){return SW.has(kr(e))?"y":"x"}function qS(e){return HS(vi(e))}function CW(e,t,n){n===void 0&&(n=!1);const r=Ra(e),i=qS(e),o=GS(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Lg(a)),[a,Lg(a)]}function EW(e){const t=Lg(e);return[Kx(e),t,Kx(t)]}function Kx(e){return e.replace(/start|end/g,t=>wW[t])}const ZT=["left","right"],JT=["right","left"],kW=["top","bottom"],RW=["bottom","top"];function _W(e,t,n){switch(e){case"top":case"bottom":return n?t?JT:ZT:t?ZT:JT;case"left":case"right":return t?kW:RW;default:return[]}}function TW(e,t,n,r){const i=Ra(e);let o=_W(kr(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(Kx)))),o}function Lg(e){return e.replace(/left|right|bottom|top/g,t=>xW[t])}function AW(e){return{top:0,right:0,bottom:0,left:0,...e}}function A$(e){return typeof e!="number"?AW(e):{top:e,right:e,bottom:e,left:e}}function Fg(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}const DW=C.createContext(void 0);function MW(){var e;return((e=C.useContext(DW))==null?void 0:e.direction)??"ltr"}const OW=e=>({name:"arrow",options:e,async fn(t){var W,N;const{x:n,y:r,placement:i,rects:o,platform:a,elements:u,middlewareData:c}=t,{element:f,padding:h=0,offsetParent:p="real"}=ns(e,t)||{};if(f==null)return{};const g=A$(h),y={x:n,y:r},b=qS(i),v=GS(b),S=await a.getDimensions(f),x=b==="y",_=x?"top":"left",R=x?"bottom":"right",T=x?"clientHeight":"clientWidth",A=o.reference[v]+o.reference[b]-y[b]-o.floating[v],D=y[b]-o.reference[b],O=p==="real"?await((W=a.getOffsetParent)==null?void 0:W.call(a,f)):u.floating;let $=u.floating[T]||o.floating[v];(!$||!await((N=a.isElement)==null?void 0:N.call(a,O)))&&($=u.floating[T]||o.floating[v]);const z=A/2-D/2,j=$/2-S[v]/2-1,I=Math.min(g[_],j),M=Math.min(g[R],j),B=I,G=$-S[v]-M,L=$/2-S[v]/2+z,F=Wx(B,L,G),U=!c.arrow&&Ra(i)!=null&&L!==F&&o.reference[v]/2-(L<B?I:M)-S[v]/2<0,V=U?L<B?L-B:L-G:0;return{[b]:y[b]+V,data:{[b]:F,centerOffset:L-F-V,...U&&{alignmentOffset:V}},reset:U}}}),$W=(e,t)=>({...OW(e),options:[e,t]});function eA(e,t,n){let{reference:r,floating:i}=e;const o=vi(t),a=qS(t),u=GS(a),c=kr(t),f=o==="y",h=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,g=r[u]/2-i[u]/2;let y;switch(c){case"top":y={x:h,y:r.y-i.height};break;case"bottom":y={x:h,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:p};break;case"left":y={x:r.x-i.width,y:p};break;default:y={x:r.x,y:r.y}}switch(Ra(t)){case"start":y[a]-=g*(n&&f?-1:1);break;case"end":y[a]+=g*(n&&f?-1:1);break}return y}async function PW(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:u,strategy:c}=e,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:g=!1,padding:y=0}=ns(t,e),b=A$(y),v=u[g?p==="floating"?"reference":"floating":p],S=Fg(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(v)))==null||n?v:v.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(u.floating)),boundary:f,rootBoundary:h,strategy:c})),x=p==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,_=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),R=await(o.isElement==null?void 0:o.isElement(_))?await(o.getScale==null?void 0:o.getScale(_))||{x:1,y:1}:{x:1,y:1},T=Fg(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:x,offsetParent:_,strategy:c}):x);return{top:(S.top-T.top+b.top)/R.y,bottom:(T.bottom-S.bottom+b.bottom)/R.y,left:(S.left-T.left+b.left)/R.x,right:(T.right-S.right+b.right)/R.x}}const NW=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,u=o.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let f=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:h,y:p}=eA(f,r,c),g=r,y={},b=0;for(let S=0;S<u.length;S++){var v;const{name:x,fn:_}=u[S],{x:R,y:T,data:A,reset:D}=await _({x:h,y:p,initialPlacement:r,placement:g,strategy:i,middlewareData:y,rects:f,platform:{...a,detectOverflow:(v=a.detectOverflow)!=null?v:PW},elements:{reference:e,floating:t}});h=R??h,p=T??p,y={...y,[x]:{...y[x],...A}},D&&b<=50&&(b++,typeof D=="object"&&(D.placement&&(g=D.placement),D.rects&&(f=D.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):D.rects),{x:h,y:p}=eA(f,g,c)),S=-1)}return{x:h,y:p,placement:g,strategy:i,middlewareData:y}},IW=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:a,initialPlacement:u,platform:c,elements:f}=t,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0,...S}=ns(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const x=kr(i),_=vi(u),R=kr(u)===u,T=await(c.isRTL==null?void 0:c.isRTL(f.floating)),A=g||(R||!v?[Lg(u)]:EW(u)),D=b!=="none";!g&&D&&A.push(...TW(u,v,b,T));const O=[u,...A],$=await c.detectOverflow(t,S),z=[];let j=((r=o.flip)==null?void 0:r.overflows)||[];if(h&&z.push($[x]),p){const G=CW(i,a,T);z.push($[G[0]],$[G[1]])}if(j=[...j,{placement:i,overflows:z}],!z.every(G=>G<=0)){var I,M;const G=(((I=o.flip)==null?void 0:I.index)||0)+1,L=O[G];if(L&&(!(p==="alignment"&&_!==vi(L))||j.every(U=>vi(U.placement)===_?U.overflows[0]>0:!0)))return{data:{index:G,overflows:j},reset:{placement:L}};let F=(M=j.filter(U=>U.overflows[0]<=0).sort((U,V)=>U.overflows[1]-V.overflows[1])[0])==null?void 0:M.placement;if(!F)switch(y){case"bestFit":{var B;const U=(B=j.filter(V=>{if(D){const W=vi(V.placement);return W===_||W==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(W=>W>0).reduce((W,N)=>W+N,0)]).sort((V,W)=>V[1]-W[1])[0])==null?void 0:B[0];U&&(F=U);break}case"initialPlacement":F=u;break}if(i!==F)return{reset:{placement:F}}}return{}}}};function tA(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function nA(e){return vW.some(t=>e[t]>=0)}const jW=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...o}=ns(e,t);switch(i){case"referenceHidden":{const a=await r.detectOverflow(t,{...o,elementContext:"reference"}),u=tA(a,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:nA(u)}}}case"escaped":{const a=await r.detectOverflow(t,{...o,altBoundary:!0}),u=tA(a,n.floating);return{data:{escapedOffsets:u,escaped:nA(u)}}}default:return{}}}}},D$=new Set(["left","top"]);async function LW(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=kr(n),u=Ra(n),c=vi(n)==="y",f=D$.has(a)?-1:1,h=o&&c?-1:1,p=ns(t,e);let{mainAxis:g,crossAxis:y,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof b=="number"&&(y=u==="end"?b*-1:b),c?{x:y*h,y:g*f}:{x:g*f,y:y*h}}const FW=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:u}=t,c=await LW(t,e);return a===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:o+c.y,data:{...c,placement:a}}}}},zW=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:o}=t,{mainAxis:a=!0,crossAxis:u=!1,limiter:c={fn:x=>{let{x:_,y:R}=x;return{x:_,y:R}}},...f}=ns(e,t),h={x:n,y:r},p=await o.detectOverflow(t,f),g=vi(kr(i)),y=HS(g);let b=h[y],v=h[g];if(a){const x=y==="y"?"top":"left",_=y==="y"?"bottom":"right",R=b+p[x],T=b-p[_];b=Wx(R,b,T)}if(u){const x=g==="y"?"top":"left",_=g==="y"?"bottom":"right",R=v+p[x],T=v-p[_];v=Wx(R,v,T)}const S=c.fn({...t,[y]:b,[g]:v});return{...S,data:{x:S.x-n,y:S.y-r,enabled:{[y]:a,[g]:u}}}}}},BW=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:u=0,mainAxis:c=!0,crossAxis:f=!0}=ns(e,t),h={x:n,y:r},p=vi(i),g=HS(p);let y=h[g],b=h[p];const v=ns(u,t),S=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const R=g==="y"?"height":"width",T=o.reference[g]-o.floating[R]+S.mainAxis,A=o.reference[g]+o.reference[R]-S.mainAxis;y<T?y=T:y>A&&(y=A)}if(f){var x,_;const R=g==="y"?"width":"height",T=D$.has(kr(i)),A=o.reference[p]-o.floating[R]+(T&&((x=a.offset)==null?void 0:x[p])||0)+(T?0:S.crossAxis),D=o.reference[p]+o.reference[R]+(T?0:((_=a.offset)==null?void 0:_[p])||0)-(T?S.crossAxis:0);b<A?b=A:b>D&&(b=D)}return{[g]:y,[p]:b}}}},UW=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:a,elements:u}=t,{apply:c=()=>{},...f}=ns(e,t),h=await a.detectOverflow(t,f),p=kr(i),g=Ra(i),y=vi(i)==="y",{width:b,height:v}=o.floating;let S,x;p==="top"||p==="bottom"?(S=p,x=g===(await(a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(x=p,S=g==="end"?"top":"bottom");const _=v-h.top-h.bottom,R=b-h.left-h.right,T=jc(v-h[S],_),A=jc(b-h[x],R),D=!t.middlewareData.shift;let O=T,$=A;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&($=R),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(O=_),D&&!g){const j=Hr(h.left,0),I=Hr(h.right,0),M=Hr(h.top,0),B=Hr(h.bottom,0);y?$=b-2*(j!==0||I!==0?j+I:Hr(h.left,h.right)):O=v-2*(M!==0||B!==0?M+B:Hr(h.top,h.bottom))}await c({...t,availableWidth:$,availableHeight:O});const z=await a.getDimensions(u.floating);return b!==z.width||v!==z.height?{reset:{rects:!0}}:{}}}};function M$(e){const t=Kr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=mn(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,u=jg(n)!==o||jg(r)!==a;return u&&(n=o,r=a),{width:n,height:r,$:u}}function VS(e){return Nt(e)?e:e.contextElement}function cc(e){const t=VS(e);if(!mn(t))return io(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=M$(t);let a=(o?jg(n.width):n.width)/r,u=(o?jg(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}const HW=io(0);function O$(e){const t=fn(e);return!Ey()||!t.visualViewport?HW:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function GW(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==fn(e)?!1:t}function Ll(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=VS(e);let a=io(1);t&&(r?Nt(r)&&(a=cc(r)):a=cc(e));const u=GW(o,n,r)?O$(o):io(0);let c=(i.left+u.x)/a.x,f=(i.top+u.y)/a.y,h=i.width/a.x,p=i.height/a.y;if(o){const g=fn(o),y=r&&Nt(r)?fn(r):r;let b=g,v=Ix(b);for(;v&&r&&y!==b;){const S=cc(v),x=v.getBoundingClientRect(),_=Kr(v),R=x.left+(v.clientLeft+parseFloat(_.paddingLeft))*S.x,T=x.top+(v.clientTop+parseFloat(_.paddingTop))*S.y;c*=S.x,f*=S.y,h*=S.x,p*=S.y,c+=R,f+=T,b=fn(v),v=Ix(b)}}return Fg({width:h,height:p,x:c,y:f})}function Ty(e,t){const n=ky(e).scrollLeft;return t?t.left+n:Ll(lo(e)).left+n}function $$(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ty(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function qW(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=lo(r),u=t?Cy(t.floating):!1;if(r===a||u&&o)return n;let c={scrollLeft:0,scrollTop:0},f=io(1);const h=io(0),p=mn(r);if((p||!p&&!o)&&((Ea(r)!=="body"||ka(a))&&(c=ky(r)),mn(r))){const y=Ll(r);f=cc(r),h.x=y.x+r.clientLeft,h.y=y.y+r.clientTop}const g=a&&!p&&!o?$$(a,c):io(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-c.scrollLeft*f.x+h.x+g.x,y:n.y*f.y-c.scrollTop*f.y+h.y+g.y}}function VW(e){return Array.from(e.getClientRects())}function YW(e){const t=lo(e),n=ky(e),r=e.ownerDocument.body,i=Hr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Hr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Ty(e);const u=-n.scrollTop;return Kr(r).direction==="rtl"&&(a+=Hr(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:u}}const rA=25;function WW(e,t){const n=fn(e),r=lo(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,u=0,c=0;if(i){o=i.width,a=i.height;const h=Ey();(!h||h&&t==="fixed")&&(u=i.offsetLeft,c=i.offsetTop)}const f=Ty(r);if(f<=0){const h=r.ownerDocument,p=h.body,g=getComputedStyle(p),y=h.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,b=Math.abs(r.clientWidth-p.clientWidth-y);b<=rA&&(o-=b)}else f<=rA&&(o+=f);return{width:o,height:a,x:u,y:c}}const KW=new Set(["absolute","fixed"]);function XW(e,t){const n=Ll(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=mn(e)?cc(e):io(1),a=e.clientWidth*o.x,u=e.clientHeight*o.y,c=i*o.x,f=r*o.y;return{width:a,height:u,x:c,y:f}}function iA(e,t,n){let r;if(t==="viewport")r=WW(e,n);else if(t==="document")r=YW(lo(e));else if(Nt(t))r=XW(t,n);else{const i=O$(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Fg(r)}function P$(e,t){const n=ts(e);return n===t||!Nt(n)||Xo(n)?!1:Kr(n).position==="fixed"||P$(n,t)}function QW(e,t){const n=t.get(e);if(n)return n;let r=fa(e,[],!1).filter(u=>Nt(u)&&Ea(u)!=="body"),i=null;const o=Kr(e).position==="fixed";let a=o?ts(e):e;for(;Nt(a)&&!Xo(a);){const u=Kr(a),c=CS(a);!c&&u.position==="fixed"&&(i=null),(o?!c&&!i:!c&&u.position==="static"&&i&&KW.has(i.position)||ka(a)&&!c&&P$(e,a))?r=r.filter(f=>f!==a):i=u,a=ts(a)}return t.set(e,r),r}function ZW(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?Cy(t)?[]:QW(t,this._c):[].concat(n),r],a=o[0],u=o.reduce((c,f)=>{const h=iA(t,f,i);return c.top=Hr(h.top,c.top),c.right=jc(h.right,c.right),c.bottom=jc(h.bottom,c.bottom),c.left=Hr(h.left,c.left),c},iA(t,a,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function JW(e){const{width:t,height:n}=M$(e);return{width:t,height:n}}function eK(e,t,n){const r=mn(t),i=lo(t),o=n==="fixed",a=Ll(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const c=io(0);function f(){c.x=Ty(i)}if(r||!r&&!o)if((Ea(t)!=="body"||ka(i))&&(u=ky(t)),r){const y=Ll(t,!0,o,t);c.x=y.x+t.clientLeft,c.y=y.y+t.clientTop}else i&&f();o&&!r&&i&&f();const h=i&&!r&&!o?$$(i,u):io(0),p=a.left+u.scrollLeft-c.x-h.x,g=a.top+u.scrollTop-c.y-h.y;return{x:p,y:g,width:a.width,height:a.height}}function n1(e){return Kr(e).position==="static"}function oA(e,t){if(!mn(e)||Kr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return lo(e)===n&&(n=n.ownerDocument.body),n}function N$(e,t){const n=fn(e);if(Cy(e))return n;if(!mn(e)){let i=ts(e);for(;i&&!Xo(i);){if(Nt(i)&&!n1(i))return i;i=ts(i)}return n}let r=oA(e,t);for(;r&&yq(r)&&n1(r);)r=oA(r,t);return r&&Xo(r)&&n1(r)&&!CS(r)?n:r||Sq(e)||n}const tK=async function(e){const t=this.getOffsetParent||N$,n=this.getDimensions,r=await n(e.floating);return{reference:eK(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function nK(e){return Kr(e).direction==="rtl"}const rK={convertOffsetParentRelativeRectToViewportRelativeRect:qW,getDocumentElement:lo,getClippingRect:ZW,getOffsetParent:N$,getElementRects:tK,getClientRects:VW,getDimensions:JW,getScale:cc,isElement:Nt,isRTL:nK};function I$(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function iK(e,t){let n=null,r;const i=lo(e);function o(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function a(u,c){u===void 0&&(u=!1),c===void 0&&(c=1),o();const f=e.getBoundingClientRect(),{left:h,top:p,width:g,height:y}=f;if(u||t(),!g||!y)return;const b=vm(p),v=vm(i.clientWidth-(h+g)),S=vm(i.clientHeight-(p+y)),x=vm(h),_={rootMargin:-b+"px "+-v+"px "+-S+"px "+-x+"px",threshold:Hr(0,jc(1,c))||1};let R=!0;function T(A){const D=A[0].intersectionRatio;if(D!==c){if(!R)return a();D?a(!1,D):r=setTimeout(()=>{a(!1,1e-7)},1e3)}D===1&&!I$(f,e.getBoundingClientRect())&&a(),R=!1}try{n=new IntersectionObserver(T,{..._,root:i.ownerDocument})}catch{n=new IntersectionObserver(T,_)}n.observe(e)}return a(!0),o}function sA(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,f=VS(e),h=i||o?[...f?fa(f):[],...fa(t)]:[];h.forEach(x=>{i&&x.addEventListener("scroll",n,{passive:!0}),o&&x.addEventListener("resize",n)});const p=f&&u?iK(f,n):null;let g=-1,y=null;a&&(y=new ResizeObserver(x=>{let[_]=x;_&&_.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var R;(R=y)==null||R.observe(t)})),n()}),f&&!c&&y.observe(f),y.observe(t));let b,v=c?Ll(e):null;c&&S();function S(){const x=Ll(e);v&&!I$(v,x)&&n(),v=x,b=requestAnimationFrame(S)}return n(),()=>{var x;h.forEach(_=>{i&&_.removeEventListener("scroll",n),o&&_.removeEventListener("resize",n)}),p==null||p(),(x=y)==null||x.disconnect(),y=null,c&&cancelAnimationFrame(b)}}const oK=FW,sK=zW,aK=IW,lK=UW,uK=jW,cK=BW,fK=(e,t,n)=>{const r=new Map,i={platform:rK,...n},o={...i.platform,_c:r};return NW(e,t,{...i,platform:o})};var dK=typeof document<"u",hK=function(){},og=dK?C.useLayoutEffect:hK;function zg(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!zg(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!zg(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function j$(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function aA(e,t){const n=j$(e);return Math.round(t*n)/n}function r1(e){const t=C.useRef(e);return og(()=>{t.current=e}),t}function pK(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:u=!0,whileElementsMounted:c,open:f}=e,[h,p]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,y]=C.useState(r);zg(g,r)||y(r);const[b,v]=C.useState(null),[S,x]=C.useState(null),_=C.useCallback(V=>{V!==D.current&&(D.current=V,v(V))},[]),R=C.useCallback(V=>{V!==O.current&&(O.current=V,x(V))},[]),T=o||b,A=a||S,D=C.useRef(null),O=C.useRef(null),$=C.useRef(h),z=c!=null,j=r1(c),I=r1(i),M=r1(f),B=C.useCallback(()=>{if(!D.current||!O.current)return;const V={placement:t,strategy:n,middleware:g};I.current&&(V.platform=I.current),fK(D.current,O.current,V).then(W=>{const N={...W,isPositioned:M.current!==!1};G.current&&!zg($.current,N)&&($.current=N,gn.flushSync(()=>{p(N)}))})},[g,t,n,I,M]);og(()=>{f===!1&&$.current.isPositioned&&($.current.isPositioned=!1,p(V=>({...V,isPositioned:!1})))},[f]);const G=C.useRef(!1);og(()=>(G.current=!0,()=>{G.current=!1}),[]),og(()=>{if(T&&(D.current=T),A&&(O.current=A),T&&A){if(j.current)return j.current(T,A,B);B()}},[T,A,B,j,z]);const L=C.useMemo(()=>({reference:D,floating:O,setReference:_,setFloating:R}),[_,R]),F=C.useMemo(()=>({reference:T,floating:A}),[T,A]),U=C.useMemo(()=>{const V={position:n,left:0,top:0};if(!F.floating)return V;const W=aA(F.floating,h.x),N=aA(F.floating,h.y);return u?{...V,transform:"translate("+W+"px, "+N+"px)",...j$(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:N}},[n,u,F.floating,h.x,h.y]);return C.useMemo(()=>({...h,update:B,refs:L,elements:F,floatingStyles:U}),[h,B,L,F,U])}const mK=(e,t)=>({...oK(e),options:[e,t]}),gK=(e,t)=>({...sK(e),options:[e,t]}),yK=(e,t)=>({...cK(e),options:[e,t]}),bK=(e,t)=>({...aK(e),options:[e,t]}),vK=(e,t)=>({...lK(e),options:[e,t]}),xK=(e,t)=>({...uK(e),options:[e,t]}),wK={name:"hide",async fn(e){var a;const{width:t,height:n,x:r,y:i}=e.rects.reference,o=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:((a=(await xK().fn(e)).data)==null?void 0:a.referenceHidden)||o}}}},sg={sideX:"left",sideY:"top"},L$={name:"adaptiveOrigin",async fn(e){var x,_;const{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:o,strategy:a,placement:u}=e,c=fn(i),f=c.getComputedStyle(i);if(!(f.transitionDuration!=="0s"&&f.transitionDuration!==""))return{x:t,y:n,data:sg};const h=await((x=o.getOffsetParent)==null?void 0:x.call(o,i));let p={width:0,height:0};if(a==="fixed"&&(c!=null&&c.visualViewport))p={width:c.visualViewport.width,height:c.visualViewport.height};else if(h===c){const R=Mt(i);p={width:R.documentElement.clientWidth,height:R.documentElement.clientHeight}}else await((_=o.isElement)==null?void 0:_.call(o,h))&&(p=await o.getDimensions(h));const g=kr(u);let y=t,b=n;g==="left"&&(y=p.width-(t+r.width)),g==="top"&&(b=p.height-(n+r.height));const v=g==="left"?"right":sg.sideX,S=g==="top"?"bottom":sg.sideY;return{x:y,y:b,data:{sideX:v,sideY:S}}}};function SK(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,i=Wl(),o=Kl()!=null,a=fr(()=>new AS({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Dh,floatingId:i,nested:o,noEmit:!1})).current;return gt(()=>{const u={open:t,floatingId:i};r.reference!==void 0&&(u.referenceElement=r.reference,u.domReferenceElement=Nt(r.reference)?r.reference:null),r.floating!==void 0&&(u.floatingElement=r.floating),a.update(u)},[t,i,r.reference,r.floating,a]),a.context.onOpenChange=n,a.context.nested=o,a.context.noEmit=!1,a}function CK(e={}){const{nodeId:t,externalTree:n}=e,r=SK(e),i=e.rootContext||r,o={reference:i.useState("referenceElement"),floating:i.useState("floatingElement"),domReference:i.useState("domReferenceElement")},[a,u]=C.useState(null),c=C.useRef(null),f=of(n);gt(()=>{o.domReference&&(c.current=o.domReference)},[o.domReference]);const h=pK({...e,elements:{...o,...a&&{reference:a}}}),p=C.useCallback(O=>{const $=Nt(O)?{getBoundingClientRect:()=>O.getBoundingClientRect(),getClientRects:()=>O.getClientRects(),contextElement:O}:O;u($),h.refs.setReference($)},[h.refs]),[g,y]=C.useState(null),[b,v]=C.useState(null);i.useSyncedValue("referenceElement",g),i.useSyncedValue("domReferenceElement",Nt(g)?g:null),i.useSyncedValue("floatingElement",b);const S=C.useCallback(O=>{(Nt(O)||O===null)&&(c.current=O,y(O)),(Nt(h.refs.reference.current)||h.refs.reference.current===null||O!==null&&!Nt(O))&&h.refs.setReference(O)},[h.refs,y]),x=C.useCallback(O=>{v(O),h.refs.setFloating(O)},[h.refs]),_=C.useMemo(()=>({...h.refs,setReference:S,setFloating:x,setPositionReference:p,domReference:c}),[h.refs,S,x,p]),R=C.useMemo(()=>({...h.elements,domReference:o.domReference}),[h.elements,o.domReference]),T=i.useState("open"),A=i.useState("floatingId"),D=C.useMemo(()=>({...h,dataRef:i.context.dataRef,open:T,onOpenChange:i.setOpen,events:i.context.events,floatingId:A,refs:_,elements:R,nodeId:t,rootStore:i}),[h,_,R,t,i,T,A]);return gt(()=>{i.context.dataRef.current.floatingContext=D;const O=f==null?void 0:f.nodesRef.current.find($=>$.id===t);O&&(O.context=D)}),C.useMemo(()=>({...h,context:D,refs:_,elements:R,rootStore:i}),[h,_,R,D,i])}function F$(e,t,n){const r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function lA(e,t,n){const{rects:r,placement:i}=e;return{side:F$(t,kr(i),n),align:Ra(i)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function z$(e){var Me,Qe;const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:a=0,collisionBoundary:u,collisionPadding:c=5,sticky:f=!1,arrowPadding:h=5,disableAnchorTracking:p=!1,keepMounted:g=!1,floatingRootContext:y,mounted:b,collisionAvoidance:v,shiftCrossAxis:S=!1,nodeId:x,adaptiveOrigin:_,lazyFlip:R=!1,externalTree:T}=e,[A,D]=C.useState(null);!b&&A!==null&&D(null);const O=v.side||"flip",$=v.align||"flip",z=v.fallbackAxisSide||"end",j=typeof t=="function"?t:void 0,I=tt(j),M=j?I:t,B=no(t),G=MW()==="rtl",L=A||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":G?"left":"right","inline-start":G?"right":"left"}[r],F=o==="center"?L:`${L}-${o}`;let U=c;const V=1,W=r==="bottom"?V:0,N=r==="top"?V:0,Y=r==="right"?V:0,J=r==="left"?V:0;typeof U=="number"?U={top:U+W,right:U+J,bottom:U+N,left:U+Y}:U&&(U={top:(U.top||0)+W,right:(U.right||0)+J,bottom:(U.bottom||0)+N,left:(U.left||0)+Y});const H={boundary:u==="clipping-ancestors"?"clippingAncestors":u,padding:U},ie=C.useRef(null),re=no(i),he=no(a),ve=[mK(Ne=>{const Tt=lA(Ne,r,G),dt=typeof re.current=="function"?re.current(Tt):re.current,ut=typeof he.current=="function"?he.current(Tt):he.current;return{mainAxis:dt,crossAxis:ut,alignmentAxis:ut}},[typeof i!="function"?i:0,typeof a!="function"?a:0,G,r])],Re=$==="none"&&O!=="shift",ce=!Re&&(f||S||O==="shift"),Ie=O==="none"?null:bK({...H,padding:{top:U.top+V,right:U.right+V,bottom:U.bottom+V,left:U.left+V},mainAxis:!S&&O==="flip",crossAxis:$==="flip"?"alignment":!1,fallbackAxisSideDirection:z}),Ve=Re?null:gK(Ne=>{const Tt=Mt(Ne.elements.floating).documentElement;return{...H,rootBoundary:S?{x:0,y:0,width:Tt.clientWidth,height:Tt.clientHeight}:void 0,mainAxis:$!=="none",crossAxis:ce,limiter:f||S?void 0:yK(dt=>{if(!ie.current)return{};const{width:ut,height:Rt}=ie.current.getBoundingClientRect(),en=vi(kr(dt.placement)),Xt=en==="y"?ut:Rt,tn=en==="y"?U.left+U.right:U.top+U.bottom;return{offset:Xt/2+tn/2}})}},[H,f,S,U,$]);O==="shift"||$==="shift"||o==="center"?ve.push(Ve,Ie):ve.push(Ie,Ve),ve.push(vK({...H,apply({elements:{floating:Ne},rects:{reference:Tt},availableWidth:dt,availableHeight:ut}){const Rt=Ne.style;Rt.setProperty("--available-width",`${dt}px`),Rt.setProperty("--available-height",`${ut}px`),Rt.setProperty("--anchor-width",`${Tt.width}px`),Rt.setProperty("--anchor-height",`${Tt.height}px`)}}),$W(()=>({element:ie.current||document.createElement("div"),padding:h,offsetParent:"floating"}),[h]),{name:"transformOrigin",fn(Ne){var La,Mr,on;const{elements:Tt,middlewareData:dt,placement:ut,rects:Rt,y:en}=Ne,Xt=kr(ut),tn=vi(Xt),yn=ie.current,Zr=((La=dt.arrow)==null?void 0:La.x)||0,Pa=((Mr=dt.arrow)==null?void 0:Mr.y)||0,Ei=(yn==null?void 0:yn.clientWidth)||0,Na=(yn==null?void 0:yn.clientHeight)||0,ki=Zr+Ei/2,iu=Pa+Na/2,ou=Math.abs(((on=dt.shift)==null?void 0:on.y)||0),us=Rt.reference.height/2,Ri=typeof i=="function"?i(lA(Ne,r,G)):i,Ia=ou>Ri,ja={top:`${ki}px calc(100% + ${Ri}px)`,bottom:`${ki}px ${-Ri}px`,left:`calc(100% + ${Ri}px) ${iu}px`,right:`${-Ri}px ${iu}px`}[Xt],Ui=`${ki}px ${Rt.reference.y+us-en}px`;return Tt.floating.style.setProperty("--transform-origin",ce&&tn==="y"&&Ia?Ui:ja),{}}},wK,_),gt(()=>{!b&&y&&y.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[b,y]);const X=C.useMemo(()=>({elementResize:!p&&typeof ResizeObserver<"u",layoutShift:!p&&typeof IntersectionObserver<"u"}),[p]),{refs:Z,elements:ne,x:xe,y:ge,middlewareData:Ce,update:le,placement:oe,context:me,isPositioned:ae,floatingStyles:Oe}=CK({rootContext:y,placement:F,middleware:ve,strategy:n,whileElementsMounted:g?void 0:(...Ne)=>sA(...Ne,X),nodeId:x,externalTree:T}),{sideX:Te,sideY:_e}=Ce.adaptiveOrigin||sg,De=ae?n:"fixed",ue=C.useMemo(()=>{const Ne=_?{position:De,[Te]:xe,[_e]:ge}:{position:De,...Oe};return ae||(Ne.opacity=0),Ne},[_,De,Te,xe,_e,ge,Oe,ae]),Se=C.useRef(null);gt(()=>{if(!b)return;const Ne=B.current,Tt=typeof Ne=="function"?Ne():Ne,dt=(uA(Tt)?Tt.current:Tt)||null||null;dt!==Se.current&&(Z.setPositionReference(dt),Se.current=dt)},[b,Z,M,B]),C.useEffect(()=>{if(!b)return;const Ne=B.current;typeof Ne!="function"&&uA(Ne)&&Ne.current!==Se.current&&(Z.setPositionReference(Ne.current),Se.current=Ne.current)},[b,Z,M,B]),C.useEffect(()=>{if(g&&b&&ne.domReference&&ne.floating)return sA(ne.domReference,ne.floating,le,X)},[g,b,ne,le,X]);const ke=kr(oe),Pe=F$(r,ke,G),Le=Ra(oe)||"center",st=!!((Me=Ce.hide)!=null&&Me.referenceHidden);gt(()=>{R&&b&&ae&&D(ke)},[R,b,ae,ke]);const Bt=C.useMemo(()=>{var Ne,Tt;return{position:"absolute",top:(Ne=Ce.arrow)==null?void 0:Ne.y,left:(Tt=Ce.arrow)==null?void 0:Tt.x}},[Ce.arrow]),Ot=((Qe=Ce.arrow)==null?void 0:Qe.centerOffset)!==0;return C.useMemo(()=>({positionerStyles:ue,arrowStyles:Bt,arrowRef:ie,arrowUncentered:Ot,side:Pe,align:Le,physicalSide:ke,anchorHidden:st,refs:Z,context:me,isPositioned:ae,update:le}),[ue,Bt,ie,Ot,Pe,Le,ke,st,Z,me,ae,le])}function uA(e){return e!=null&&"current"in e}function Ay(e){return e==="starting"?pY:Sr}const EK=C.forwardRef(function(e,t){const{render:n,className:r,anchor:i,positionMethod:o="absolute",side:a="bottom",align:u="center",sideOffset:c=0,alignOffset:f=0,collisionBoundary:h="clipping-ancestors",collisionPadding:p=5,arrowPadding:g=5,sticky:y=!1,disableAnchorTracking:b=!1,collisionAvoidance:v=V4,...S}=e,{store:x}=af(),_=pW(),R=qq(),T=x.useState("floatingRootContext"),A=x.useState("mounted"),D=x.useState("open"),O=x.useState("openChangeReason"),$=x.useState("activeTriggerElement"),z=x.useState("modal"),j=x.useState("positionerElement"),I=x.useState("instantType"),M=x.useState("transitionStatus"),B=x.useState("hasViewport"),G=C.useRef(null),L=C4(j,!1,!1),F=z$({anchor:i,floatingRootContext:T,positionMethod:o,mounted:A,side:a,sideOffset:c,align:u,alignOffset:f,arrowPadding:g,collisionBoundary:h,collisionPadding:p,sticky:y,disableAnchorTracking:b,keepMounted:_,nodeId:R,collisionAvoidance:v,adaptiveOrigin:B?L$:void 0}),U=C.useMemo(()=>{const H={};return D||(H.pointerEvents="none"),{role:"presentation",hidden:!A,style:{...F.positionerStyles,...H}}},[D,A,F.positionerStyles]),V=C.useMemo(()=>({props:U,...F}),[U,F]),W=T.useState("domReferenceElement");gt(()=>{const H=W,ie=G.current;if(H&&(G.current=H),ie&&H&&H!==ie){x.set("instantType",void 0);const re=new AbortController;return L(()=>{x.set("instantType","trigger-change")},re.signal),()=>{re.abort()}}},[W,L,x]);const N={open:D,side:V.side,align:V.align,anchorHidden:V.anchorHidden,instant:I},Y=C.useCallback(H=>{x.set("positionerElement",H)},[x]),J=Ar("div",e,{state:N,props:[V.props,Ay(M),S],ref:[t,Y],stateAttributesMapping:Xl});return E.jsxs(T$.Provider,{value:V,children:[A&&z===!0&&O!==Kn&&E.jsx(K4,{ref:x.context.internalBackdropRef,inert:FS(!D),cutout:$}),E.jsx(Vq,{id:R,children:J})]})}),B$=({children:e,...t})=>E.jsx(EK,{"data-slot":"popover-positioner",...t,children:e});B$.displayName="PopoverPositioner";const kK={"popover-popup":"_popover-popup_hjuwr_3"},RK=C.createContext(void 0);function _K(e){return C.useContext(RK)}const TK=new Set(["click","mousedown"]);function U$(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),o=n.useState("domReferenceElement"),{dataRef:a}=n.context,{enabled:u=!0,closeDelay:c=0}=t,f=w$(n),h=of(),p=Kl(),g=tt(()=>f.interactedInside?!0:a.current.openEvent?TK.has(a.current.openEvent.type):!1),y=tt(()=>{var T;const R=(T=a.current.openEvent)==null?void 0:T.type;return(R==null?void 0:R.includes("mouse"))&&R!=="mousedown"}),b=tt(R=>Ag(R,n.context.triggerElements)),v=C.useCallback((R,T=!0)=>{const A=AK(c,f.pointerType);A&&!f.handler?f.openChangeTimeout.start(A,()=>n.setOpen(!1,Vt(Kn,R))):T&&(f.openChangeTimeout.clear(),n.setOpen(!1,Vt(Kn,R)))},[c,n,f]),S=tt(()=>{f.unbindMouseMove(),f.handler=void 0}),x=tt(()=>{if(f.performedPointerEventsMutation){const R=Mt(i).body;R.style.pointerEvents="",R.removeAttribute(Yx),f.performedPointerEventsMutation=!1}}),_=tt(R=>{const T=Un(R);if(!uW(T)){f.interactedInside=!1;return}f.interactedInside=!0});gt(()=>{r||(f.pointerType=void 0,f.restTimeoutPending=!1,f.interactedInside=!1,S(),x())},[r,f,S,x]),C.useEffect(()=>()=>{S()},[S]),C.useEffect(()=>x,[x]),gt(()=>{var R,T,A;if(u&&r&&((R=f.handleCloseOptions)!=null&&R.blockPointerEvents)&&y()&&Nt(o)&&i){f.performedPointerEventsMutation=!0;const D=Mt(i).body;D.setAttribute(Yx,"");const O=o,$=i,z=(A=(T=h==null?void 0:h.nodesRef.current.find(j=>j.id===p))==null?void 0:T.context)==null?void 0:A.elements.floating;return z&&(z.style.pointerEvents=""),D.style.pointerEvents="none",O.style.pointerEvents="auto",$.style.pointerEvents="auto",()=>{D.style.pointerEvents="",O.style.pointerEvents="",$.style.pointerEvents=""}}},[u,r,o,i,f,y,h,p]),C.useEffect(()=>{if(!u)return;function R(O){g()||!a.current.floatingContext||!n.select("open")||b(O.relatedTarget)||(x(),S(),g()||v(O))}function T(O){var $;f.openChangeTimeout.clear(),x(),($=f.handler)==null||$.call(f,O),S()}function A(O){g()||v(O,!1)}const D=i;return D&&(D.addEventListener("mouseleave",R),D.addEventListener("mouseenter",T),D.addEventListener("mouseleave",A),D.addEventListener("pointerdown",_,!0)),()=>{D&&(D.removeEventListener("mouseleave",R),D.removeEventListener("mouseenter",T),D.removeEventListener("mouseleave",A),D.removeEventListener("pointerdown",_,!0))}},[u,i,n,a,g,b,v,x,S,_,f])}function AK(e,t){return t&&!jl(t)?0:typeof e=="function"?e():e}const DK={...Xl,...rf},MK=C.forwardRef(function(e,t){const{className:n,render:r,initialFocus:i,finalFocus:o,...a}=e,{store:u}=af(),c=bW(),f=_K()!=null,h=u.useState("open"),p=u.useState("openMethod"),g=u.useState("instantType"),y=u.useState("transitionStatus"),b=u.useState("popupProps"),v=u.useState("titleElementId"),S=u.useState("descriptionElementId"),x=u.useState("modal"),_=u.useState("mounted"),R=u.useState("openChangeReason"),T=u.useState("activeTriggerElement"),A=u.useState("floatingRootContext");Rh({open:h,ref:u.context.popupRef,onComplete(){var G,L;h&&((L=(G=u.context).onOpenChangeComplete)==null||L.call(G,!0))}});const D=u.useState("disabled"),O=u.useState("openOnHover"),$=u.useState("closeDelay");U$(A,{enabled:O&&!D,closeDelay:$});function z(G){return G==="touch"?u.context.popupRef.current:!0}const j=i===void 0?z:i,I={open:h,side:c.side,align:c.align,instant:g,transitionStatus:y},M=C.useCallback(G=>{u.set("popupElement",G)},[u]),B=Ar("div",e,{state:I,ref:[t,u.context.popupRef,M],props:[b,{"aria-labelledby":v,"aria-describedby":S,onKeyDown(G){f&&p$.has(G.key)&&G.stopPropagation()}},Ay(y),a],stateAttributesMapping:DK});return E.jsx(g$,{context:A,openInteractionType:p,modal:x==="trap-focus",disabled:!_||R===Kn,initialFocus:j,returnFocus:o,restoreFocus:"popup",previousFocusableElement:mn(T)?T:void 0,nextFocusableElement:u.context.triggerFocusTargetRef,beforeContentFocusGuardRef:u.context.beforeContentFocusGuardRef,children:B})}),H$=({title:e,description:t,icon:n,action:r,footer:i,children:o,className:a,...u})=>E.jsx(MK,{"data-slot":"popover-popup",render:E.jsx(qt,{title:e,description:t,icon:n,action:r,footer:i,children:o}),className:ze(kK["popover-popup"],a),"data-is-popup":!0,...u,children:o});H$.displayName="PopoverPopup";const G$=({trigger:e,open:t,onOpenChange:n,title:r,description:i,icon:o,action:a,footer:u,RootProps:c,TriggerProps:f,PortalProps:h,BackdropProps:p,PositionerProps:g={sideOffset:4,collisionPadding:16},PopupProps:y,children:b})=>E.jsxs(v$,{open:t,onOpenChange:n,...c,children:[E.jsx(E$,{...f,children:e}),E.jsxs(R$,{...h,children:[E.jsx(_$,{...p}),E.jsx(B$,{...g,children:E.jsx(H$,{title:r,description:i,icon:o,action:a,footer:u,...y,children:b})})]})]});G$.displayName="Popover";const q$=({children:e,...t})=>E.jsx(BV,{"data-slot":"sheet-root",...t,children:e});q$.displayName="SheetRoot";const V$=({children:e,...t})=>{const n=C.isValidElement(e);return E.jsx(gY,{"data-slot":"sheet-trigger",nativeButton:n,render:n?e:E.jsx("span",{role:"button",tabIndex:0,children:e}),...t,children:e})};V$.displayName="SheetTrigger";const Y$=({children:e,...t})=>E.jsx(LY,{"data-slot":"sheet-portal",...t,children:e});Y$.displayName="SheetPortal";const rc={"sheet-backdrop":"_sheet-backdrop_1hzld_3","sheet-popup":"_sheet-popup_1hzld_17","side-right":"_side-right_1hzld_41","side-left":"_side-left_1hzld_50","side-top":"_side-top_1hzld_59","side-bottom":"_side-bottom_1hzld_68"},W$=({className:e,...t})=>E.jsx(zY,{"data-slot":"sheet-backdrop",className:ze(rc["sheet-backdrop"],e),...t});W$.displayName="SheetBackdrop";const OK=Jn({variants:{side:{top:rc["side-top"],right:rc["side-right"],bottom:rc["side-bottom"],left:rc["side-left"]}}}),K$=({side:e,title:t,description:n,icon:r,action:i,footer:o,className:a,children:u,...c})=>E.jsx(nW,{render:E.jsx(qt,{gap:4,title:t,description:n,icon:r,action:i,footer:o,FooterProps:{style:{marginTop:"auto"}}}),className:ze(rc["sheet-popup"],OK({side:e}),a),...c,children:u});K$.displayName="SheetPopup";const X$=({side:e="right",title:t,description:n,icon:r,action:i,footer:o,RootProps:a,TriggerProps:u,PortalProps:c,BackdropProps:f,PopupProps:h,trigger:p,open:g,onOpenChange:y,children:b})=>E.jsxs(q$,{open:g,onOpenChange:y,...a,children:[E.jsx(V$,{...u,children:p??(u==null?void 0:u.children)}),E.jsxs(Y$,{...c,children:[E.jsx(W$,{...f}),E.jsx(K$,{side:e,title:t,description:n,icon:r,action:i,footer:o,...h,children:b??(h==null?void 0:h.children)})]})]});X$.displayName="Sheet";const $K="_toast_ornow_1",Q$={"toast-viewport":"_toast-viewport_ornow_1",toast:$K},YS=C.createContext(void 0);function Z$(){const e=C.useContext(YS);if(!e)throw new Error(Tn(73));return e}let cA=0;function PK(e){return cA+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${cA}`}function i1(e,t){if(typeof e=="string")return{description:e};if(typeof e=="function"){const n=e(t);return typeof n=="string"?{description:n}:n}return e}const xm=AV(e=>e.toasts,e=>{const t=new Map;let n=0,r=0;return e.forEach((i,o)=>{const a=i.transitionStatus==="ending";t.set(i.id,{value:i,domIndex:o,visibleIndex:a?-1:n,offsetY:r}),r+=i.height||0,a||(n+=1)}),t}),Oo={toasts:We(e=>e.toasts),isEmpty:We(e=>e.toasts.length===0),toast:We(xm,(e,t)=>{var n;return(n=e.get(t))==null?void 0:n.value}),toastIndex:We(xm,(e,t)=>{var n;return((n=e.get(t))==null?void 0:n.domIndex)??-1}),toastOffsetY:We(xm,(e,t)=>{var n;return((n=e.get(t))==null?void 0:n.offsetY)??0}),toastVisibleIndex:We(xm,(e,t)=>{var n;return((n=e.get(t))==null?void 0:n.visibleIndex)??-1}),hovering:We(e=>e.hovering),focused:We(e=>e.focused),expanded:We(e=>e.hovering||e.focused),expandedOrOutOfFocus:We(e=>e.hovering||e.focused||!e.isWindowFocused),prevFocusElement:We(e=>e.prevFocusElement)};let NK=class extends _h{constructor(n){super(n,{},Oo);te(this,"timers",new Map);te(this,"areTimersPaused",!1);te(this,"setViewport",n=>{this.set("viewport",n)});te(this,"disposeEffect",()=>()=>{this.timers.forEach(n=>{var r;(r=n.timeout)==null||r.clear()}),this.timers.clear()});te(this,"addToast",n=>{const{toasts:r,timeout:i,limit:o}=this.state,a=n.id||PK("toast"),u={...n,id:a,transitionStatus:"starting"},c=[u,...r],f=c.filter(p=>p.transitionStatus!=="ending");if(f.length>o){const p=f.length-o,g=f.slice(-p),y=new Set(g.map(b=>b.id));this.setToasts(c.map(b=>{const v=y.has(b.id);return b.limited!==v?{...b,limited:v}:b}))}else this.setToasts(c.map(p=>p.limited?{...p,limited:!1}:p));const h=u.timeout??i;return u.type!=="loading"&&h>0&&this.scheduleTimer(a,h,()=>this.closeToast(a)),Oo.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),a});te(this,"updateToast",(n,r)=>{this.updateToastInternal(n,r)});te(this,"updateToastInternal",(n,r)=>{var v,S,x;const{timeout:i,toasts:o}=this.state,a=Oo.toast(this.state,n)??null;if(!a||a.transitionStatus==="ending")return;const u={...a,...r};this.setToasts(o.map(_=>_.id===n?{..._,...r}:_));const c=u.timeout??i,f=(a==null?void 0:a.timeout)??i,h=Object.hasOwn(r,"timeout"),p=u.transitionStatus!=="ending"&&u.type!=="loading"&&c>0,g=this.timers.has(n),y=f!==c,b=(a==null?void 0:a.type)==="loading";if(!p&&g){(S=(v=this.timers.get(n))==null?void 0:v.timeout)==null||S.clear(),this.timers.delete(n);return}if(p&&(!g||y||h||b)){const _=this.timers.get(n);_&&((x=_.timeout)==null||x.clear(),this.timers.delete(n)),this.scheduleTimer(n,c,()=>this.closeToast(n)),Oo.expandedOrOutOfFocus(this.state)&&this.pauseTimers()}});te(this,"closeToast",n=>{var c,f;(f=(c=Oo.toast(this.state,n))==null?void 0:c.onClose)==null||f.call(c);const{limit:r,toasts:i}=this.state;let o=0;const a=i.map(h=>{if(h.id===n)return{...h,transitionStatus:"ending",height:0};if(h.transitionStatus==="ending")return h;const p=o>=r;return o+=1,h.limited!==p?{...h,limited:p}:h}),u=this.timers.get(n);u&&u.timeout&&(u.timeout.clear(),this.timers.delete(n)),this.handleFocusManagement(n),this.setToasts(a)});te(this,"promiseToast",(n,r)=>{const i=i1(r.loading),o=this.addToast({...i,type:"loading"}),a=n.then(u=>{const c=i1(r.success,u);return this.updateToast(o,{...c,type:"success",timeout:c.timeout}),u}).catch(u=>{const c=i1(r.error,u);return this.updateToast(o,{...c,type:"error",timeout:c.timeout}),Promise.reject(u)});return{}.hasOwnProperty.call(r,"setPromise")&&r.setPromise(a),a});te(this,"handleDocumentPointerDown",n=>{if(n.pointerType!=="touch")return;const r=Un(n);ct(this.state.viewport,r)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))})}setFocused(n){this.set("focused",n)}setHovering(n){this.set("hovering",n)}setIsWindowFocused(n){this.set("isWindowFocused",n)}setPrevFocusElement(n){this.set("prevFocusElement",n)}removeToast(n){var o,a;const r=Oo.toastIndex(this.state,n);if(r===-1)return;(a=(o=this.state.toasts[r])==null?void 0:o.onRemove)==null||a.call(o);const i=[...this.state.toasts];i.splice(r,1),this.setToasts(i)}pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(n=>{if(n.timeout){n.timeout.clear();const r=Date.now()-n.start,i=n.delay-r;n.remaining=i>0?i:0}}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((n,r)=>{n.remaining=n.remaining>0?n.remaining:n.delay,n.timeout??(n.timeout=zi.create()),n.timeout.start(n.remaining,()=>{this.timers.delete(r),n.callback()}),n.start=Date.now()}))}restoreFocusToPrevElement(){var n;(n=this.state.prevFocusElement)==null||n.focus({preventScroll:!0})}scheduleTimer(n,r,i){const o=Date.now(),a=!Oo.expandedOrOutOfFocus(this.state),u=a?zi.create():void 0;u==null||u.start(r,()=>{this.timers.delete(n),i()}),this.timers.set(n,{timeout:u,start:a?o:0,delay:r,remaining:r,callback:i})}setToasts(n){const r={toasts:n};n.length===0&&(r.hovering=!1,r.focused=!1),this.update(r)}handleFocusManagement(n){var c,f;const r=Ur(Mt(this.state.viewport));if(!this.state.viewport||!ct(this.state.viewport,r)||!Dg(r))return;const i=Oo.toasts(this.state),o=Oo.toastIndex(this.state,n);let a=null,u=o+1;for(;u<i.length;){if(i[u].transitionStatus!=="ending"){a=i[u];break}u+=1}if(!a)for(u=o-1;u>=0;){if(i[u].transitionStatus!=="ending"){a=i[u];break}u-=1}a?(f=(c=a.ref)==null?void 0:c.current)==null||f.focus():this.restoreFocusToPrevElement()}};const IK=function(e){const{children:t,timeout:n=5e3,limit:r=3,toastManager:i}=e,o=fr(()=>new NK({timeout:n,limit:r,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return kh(o.disposeEffect),C.useEffect(function(){return i?i[" subscribe"](({action:a,options:u})=>{const c=u.id;a==="promise"&&u.promise?o.promiseToast(u.promise,u):a==="update"&&c?o.updateToast(c,u):a==="close"&&c?o.closeToast(c):o.addToast(u)}):void 0},[o,n,i]),o.useSyncedValues({timeout:n,limit:r}),E.jsx(YS.Provider,{value:o,children:t})};function jK(){const e=C.useContext(YS);if(!e)throw new Error(Tn(73));const t=e.useState("toasts");return C.useMemo(()=>({toasts:t,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[t,e])}const LK=IK,J$=jK,eP=C.forwardRef(function(e,t){const{children:n,container:r,className:i,render:o,...a}=e,{portalNode:u,portalSubtree:c}=l$({container:r,ref:t,componentProps:e,elementProps:a});return!c&&!u?null:E.jsxs(C.Fragment,{children:[c,u&&gn.createPortal(n,u)]})}),FK=eP;let zK=(function(e){return e.frontmostHeight="--toast-frontmost-height",e})({});const BK=C.forwardRef(function(e,t){var I;const{render:n,className:r,children:i,...o}=e,a=Z$(),u=xa(),c=C.useRef(!1),f=C.useRef(!1),h=a.useState("isEmpty"),p=a.useState("toasts"),g=a.useState("focused"),y=a.useState("expanded"),b=a.useState("prevFocusElement"),v=((I=p[0])==null?void 0:I.height)??0,S=C.useMemo(()=>p.some(M=>M.transitionStatus==="ending"),[p]);C.useEffect(()=>{const M=a.state.viewport;if(!M)return;function B(L){h||L.key==="F6"&&L.target!==M&&(L.preventDefault(),a.setPrevFocusElement(Ur(Mt(M))),M==null||M.focus({preventScroll:!0}),a.pauseTimers(),a.setFocused(!0))}const G=fn(M);return G.addEventListener("keydown",B),()=>{G.removeEventListener("keydown",B)}},[a,h]),C.useEffect(()=>{const M=a.state.viewport;if(!M||h)return;const B=fn(M);function G(F){F.target===B&&(a.setIsWindowFocused(!1),a.pauseTimers())}function L(F){if(F.relatedTarget||F.target===B)return;const U=Un(F),V=Ur(Mt(M));(!ct(M,U)||!Dg(V))&&a.resumeTimers(),u.start(0,()=>a.setIsWindowFocused(!0))}return B.addEventListener("blur",G,!0),B.addEventListener("focus",L,!0),()=>{B.removeEventListener("blur",G,!0),B.removeEventListener("focus",L,!0)}},[a,u,h]),C.useEffect(()=>{const M=a.state.viewport;if(!M||h)return;const B=Mt(M);return B.addEventListener("pointerdown",a.handleDocumentPointerDown,!0),()=>{B.removeEventListener("pointerdown",a.handleDocumentPointerDown,!0)}},[h,a]);function x(M){var G,L,F;const B=a.state.viewport;B&&(c.current=!0,M.relatedTarget===B?(F=(L=(G=p[0])==null?void 0:G.ref)==null?void 0:L.current)==null||F.focus():a.restoreFocusToPrevElement())}function _(M){M.key==="Tab"&&M.shiftKey&&M.target===a.state.viewport&&(M.preventDefault(),a.restoreFocusToPrevElement(),a.resumeTimers())}C.useEffect(()=>{!a.state.isWindowFocused||S||!f.current||(a.resumeTimers(),a.setHovering(!1),f.current=!1)},[S,a]);function R(){a.pauseTimers(),a.setHovering(!0),f.current=!1}function T(){S?f.current=!0:(a.resumeTimers(),a.setHovering(!1))}function A(){if(c.current){c.current=!1;return}g||Dg(Mt(a.state.viewport).activeElement)&&(a.setFocused(!0),a.pauseTimers())}function D(M){!g||ct(a.state.viewport,M.relatedTarget)||(a.setFocused(!1),a.resumeTimers())}const O={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:R,onMouseMove:R,onMouseLeave:T,onFocus:A,onBlur:D,onKeyDown:_,onClick:A},$={expanded:y},z=Ar("div",e,{ref:[t,a.setViewport],state:$,props:[O,{style:{[zK.frontmostHeight]:v?`${v}px`:void 0}},o,{children:E.jsxs(C.Fragment,{children:[!h&&b&&E.jsx(Qo,{onFocus:x}),i,!h&&b&&E.jsx(Qo,{onFocus:x})]})}]}),j=C.useMemo(()=>p.filter(M=>M.priority==="high"),[p]);return E.jsxs(C.Fragment,{children:[!h&&b&&E.jsx(Qo,{onFocus:x}),z,!g&&j.length>0&&E.jsx("div",{style:zS,children:j.map(M=>E.jsxs("div",{role:"alert","aria-atomic":!0,children:[E.jsx("div",{children:M.title}),E.jsx("div",{children:M.description})]},M.id))})]})}),tP=C.createContext(void 0);function UK(){const e=C.useContext(tP);if(!e)throw new Error(Tn(66));return e}let il=(function(e){return e.index="--toast-index",e.offsetY="--toast-offset-y",e.height="--toast-height",e.swipeMovementX="--toast-swipe-movement-x",e.swipeMovementY="--toast-swipe-movement-y",e})({});const HK={...rf,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},gd=40,GK=10,Ns=.5,qK=1;function fA(e,t,n){switch(e){case"up":return-n;case"down":return n;case"left":return-t;case"right":return t;default:return 0}}function VK(e){const t=window.getComputedStyle(e).transform;let n=0,r=0,i=1;if(t&&t!=="none"){const o=t.match(/matrix(?:3d)?\(([^)]+)\)/);if(o){const a=o[1].split(", ").map(parseFloat);a.length===6?(n=a[4],r=a[5],i=Math.sqrt(a[0]*a[0]+a[1]*a[1])):a.length===16&&(n=a[12],r=a[13],i=a[0])}}return{x:n,y:r,scale:i}}const YK=C.forwardRef(function(e,t){var le;const{toast:n,render:r,className:i,swipeDirection:o=["down","right"],...a}=e,u=((le=n.positionerProps)==null?void 0:le.anchor)!==void 0;let c=[];u||(c=Array.isArray(o)?o:[o]);const f=c.length>0,h=Z$(),[p,g]=C.useState(void 0),[y,b]=C.useState(!1),[v,S]=C.useState(!1),[x,_]=C.useState(!1),[R,T]=C.useState({x:0,y:0}),[A,D]=C.useState({x:0,y:0,scale:1}),[O,$]=C.useState(),[z,j]=C.useState(),[I,M]=C.useState(null),B=C.useRef(null),G=C.useRef({x:0,y:0}),L=C.useRef({x:0,y:0,scale:1}),F=C.useRef(void 0),U=C.useRef(0),V=C.useRef(!1),W=C.useRef({x:0,y:0}),N=C.useRef(!1),Y=h.useState("toastIndex",n.id),J=h.useState("toastVisibleIndex",n.id),H=h.useState("toastOffsetY",n.id),ie=h.useState("focused"),re=h.useState("expanded");Rh({open:n.transitionStatus!=="ending",ref:B,onComplete(){n.transitionStatus==="ending"&&h.removeToast(n.id)}});const he=tt((oe=!1)=>{const me=B.current;if(!me)return;const ae=me.style.height;me.style.height="auto";const Oe=me.offsetHeight;me.style.height=ae;function Te(){h.updateToastInternal(n.id,{ref:B,height:Oe,...n.transitionStatus==="starting"?{transitionStatus:void 0}:{}})}oe?gn.flushSync(Te):Te()});gt(he,[he]);function ve(oe,me){let ae=oe,Oe=me;return!c.includes("left")&&!c.includes("right")?ae=oe>0?oe**Ns:-(Math.abs(oe)**Ns):(!c.includes("right")&&oe>0&&(ae=oe**Ns),!c.includes("left")&&oe<0&&(ae=-(Math.abs(oe)**Ns))),!c.includes("up")&&!c.includes("down")?Oe=me>0?me**Ns:-(Math.abs(me)**Ns):(!c.includes("down")&&me>0&&(Oe=me**Ns),!c.includes("up")&&me<0&&(Oe=-(Math.abs(me)**Ns))),{x:ae,y:Oe}}function Re(oe){var ae;if(oe.button!==0)return;oe.pointerType==="touch"&&h.pauseTimers();const me=Un(oe.nativeEvent);if(!(me&&me.closest('button,a,input,textarea,[role="button"],[data-swipe-ignore]'))){if(V.current=!1,F.current=void 0,U.current=0,G.current={x:oe.clientX,y:oe.clientY},W.current=G.current,B.current){const Oe=VK(B.current);L.current=Oe,D(Oe),T({x:Oe.x,y:Oe.y})}h.setHovering(!0),b(!0),S(!1),M(null),N.current=!0,(ae=B.current)==null||ae.setPointerCapture(oe.pointerId)}}function ce(oe){if(!y)return;oe.preventDefault(),N.current&&(G.current={x:oe.clientX,y:oe.clientY},N.current=!1);const{clientY:me,clientX:ae,movementX:Oe,movementY:Te}=oe;(Te<0&&me>W.current.y||Te>0&&me<W.current.y)&&(W.current={x:W.current.x,y:me}),(Oe<0&&ae>W.current.x||Oe>0&&ae<W.current.x)&&(W.current={x:ae,y:W.current.y});const _e=ae-G.current.x,De=me-G.current.y,ue=me-W.current.y,Se=ae-W.current.x;if(!v&&Math.sqrt(_e*_e+De*De)>=qK&&(S(!0),I===null)){const Bt=c.includes("left")||c.includes("right"),Ot=c.includes("up")||c.includes("down");if(Bt&&Ot){const Me=Math.abs(_e),Qe=Math.abs(De);M(Me>Qe?"horizontal":"vertical")}}let ke;if(!F.current)I==="vertical"?De>0?ke="down":De<0&&(ke="up"):I==="horizontal"?_e>0?ke="right":_e<0&&(ke="left"):Math.abs(_e)>=Math.abs(De)?ke=_e>0?"right":"left":ke=De>0?"down":"up",ke&&c.includes(ke)&&(F.current=ke,U.current=fA(ke,_e,De),g(ke));else{const Bt=F.current,Ot=fA(Bt,Se,ue);Ot>gd?(V.current=!1,g(Bt)):!(c.includes("left")&&c.includes("right"))&&!(c.includes("up")&&c.includes("down"))&&U.current-Ot>=GK&&(V.current=!0)}const Pe=ve(_e,De);let Le=L.current.x,st=L.current.y;I==="horizontal"?(c.includes("left")||c.includes("right"))&&(Le+=Pe.x):(I==="vertical"||(c.includes("left")||c.includes("right"))&&(Le+=Pe.x),(c.includes("up")||c.includes("down"))&&(st+=Pe.y)),T({x:Le,y:st})}function Ie(oe){var _e;if(!y)return;if(b(!1),S(!1),M(null),(_e=B.current)==null||_e.releasePointerCapture(oe.pointerId),V.current){T({x:A.x,y:A.y}),g(void 0);return}let me=!1;const ae=R.x-A.x,Oe=R.y-A.y;let Te;for(const De of c){switch(De){case"right":ae>gd&&(me=!0,Te="right");break;case"left":ae<-gd&&(me=!0,Te="left");break;case"down":Oe>gd&&(me=!0,Te="down");break;case"up":Oe<-gd&&(me=!0,Te="up");break}if(me)break}me?(g(Te),_(!0),h.closeToast(n.id)):(T({x:A.x,y:A.y}),g(void 0))}function Ve(oe){if(oe.key==="Escape"){if(!B.current||!ct(B.current,Ur(Mt(B.current))))return;h.closeToast(n.id)}}C.useEffect(()=>{if(!f)return;const oe=B.current;if(!oe)return;function me(ae){ct(oe,ae.target)&&ae.preventDefault()}return oe.addEventListener("touchmove",me,{passive:!1}),()=>{oe.removeEventListener("touchmove",me)}},[f]);function X(){if(!y&&R.x===A.x&&R.y===A.y&&!x)return{[il.swipeMovementX]:"0px",[il.swipeMovementY]:"0px"};const oe=R.x-A.x,me=R.y-A.y;return{transition:y?"none":void 0,transform:y?`translateX(${R.x}px) translateY(${R.y}px) scale(${A.scale})`:void 0,[il.swipeMovementX]:`${oe}px`,[il.swipeMovementY]:`${me}px`}}const Z=n.priority==="high",ne={role:Z?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":O,"aria-describedby":z,"aria-hidden":Z&&!ie?!0:void 0,onPointerDown:f?Re:void 0,onPointerMove:f?ce:void 0,onPointerUp:f?Ie:void 0,onKeyDown:Ve,inert:FS(n.limited),style:{...X(),[il.index]:n.transitionStatus==="ending"?Y:J,[il.offsetY]:`${H}px`,[il.height]:n.height?`${n.height}px`:void 0}},xe=C.useMemo(()=>({rootRef:B,toast:n,titleId:O,setTitleId:$,descriptionId:z,setDescriptionId:j,swiping:y,swipeDirection:p,recalculateHeight:he,index:Y,visibleIndex:J,expanded:re}),[n,O,z,y,p,he,Y,J,re]),ge={transitionStatus:n.transitionStatus,expanded:re,limited:n.limited||!1,type:n.type,swiping:xe.swiping,swipeDirection:xe.swipeDirection},Ce=Ar("div",e,{ref:[t,xe.rootRef],state:ge,stateAttributesMapping:HK,props:[ne,a]});return E.jsx(tP.Provider,{value:xe,children:Ce})}),WK=C.forwardRef(function(e,t){const{render:n,className:r,id:i,children:o,...a}=e,{toast:u,setDescriptionId:c}=UK(),f=o??u.description,h=!!f,p=Wl(i);gt(()=>{if(h)return c(p),()=>{c(void 0)}},[h,p,c]);const g={type:u.type},y=Ar("p",e,{ref:t,state:g,props:{...a,id:p,children:f}});return h?y:null}),nP=()=>{const{toasts:e}=J$();return e.map(t=>E.jsx(YK,{toast:t,className:Q$.toast,render:E.jsx(qt,{"data-slot":"toast",children:E.jsx(je,{size:0,shade:"muted",render:E.jsx(WK,{})})})},t.id))};nP.displayName="ToastList";const rP=({position:e="bottom"})=>E.jsx(FK,{children:E.jsx(BK,{className:Q$["toast-viewport"],"data-position":e,children:E.jsx(nP,{})})});rP.displayName="Toaster";const iP=C.createContext(void 0);function KK(){return C.useContext(iP)}const oP=C.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new zi,currentIdRef:{current:null},currentContextRef:{current:null}});function XK(e){const{children:t,delay:n,timeoutMs:r=0}=e,i=C.useRef(n),o=C.useRef(n),a=C.useRef(null),u=C.useRef(null),c=xa();return E.jsx(oP.Provider,{value:C.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:o,currentIdRef:a,timeoutMs:r,currentContextRef:u,timeout:c}),[r,c]),children:t})}function QK(e,t={open:!1}){const n="rootStore"in e?e.rootStore:e,r=n.useState("floatingId"),{open:i}=t,o=C.useContext(oP),{currentIdRef:a,delayRef:u,timeoutMs:c,initialDelayRef:f,currentContextRef:h,hasProvider:p,timeout:g}=o,[y,b]=C.useState(!1);return gt(()=>{function v(){var S;b(!1),(S=h.current)==null||S.setIsInstantPhase(!1),a.current=null,h.current=null,u.current=f.current}if(a.current&&!i&&a.current===r){if(b(!1),c){const S=r;return g.start(c,()=>{n.select("open")||a.current&&a.current!==S||v()}),()=>{g.clear()}}v()}},[i,r,a,u,c,f,h,g,n]),gt(()=>{if(!i)return;const v=h.current,S=a.current;g.clear(),h.current={onOpenChange:n.setOpen,setIsInstantPhase:b},a.current=r,u.current={open:0,close:ig(f.current,"close")},S!==null&&S!==r?(b(!0),v==null||v.setIsInstantPhase(!0),v==null||v.onOpenChange(!1,Vt(MS))):(b(!1),v==null||v.setIsInstantPhase(!1))},[i,r,n,a,u,c,f,h,g]),gt(()=>()=>{h.current=null},[h]),C.useMemo(()=>({hasProvider:p,delayRef:u,isInstantPhase:y}),[p,u,y])}const ZK=function(e){const{delay:t,closeDelay:n,timeout:r=400}=e,i=C.useMemo(()=>({delay:t,closeDelay:n}),[t,n]),o=C.useMemo(()=>({open:t,close:n}),[t,n]);return E.jsx(iP.Provider,{value:i,children:E.jsx(XK,{delay:o,timeoutMs:r,children:e.children})})},sP=({children:e,...t})=>E.jsx(ZK,{"data-slot":"tooltip-provider",...t,children:e});sP.displayName="TooltipProvider";const aP=C.createContext(void 0);function Dy(e){const t=C.useContext(aP);if(t===void 0&&!e)throw new Error(Tn(72));return t}const JK={...NS,disabled:We(e=>e.disabled),instantType:We(e=>e.instantType),isInstantPhase:We(e=>e.isInstantPhase),trackCursorAxis:We(e=>e.trackCursorAxis),disableHoverablePopup:We(e=>e.disableHoverablePopup),lastOpenChangeReason:We(e=>e.openChangeReason),closeDelay:We(e=>e.closeDelay),hasViewport:We(e=>e.hasViewport)};let eX=class lP extends _h{constructor(n){super({...tX(),...n},{popupRef:C.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new Dh},JK);te(this,"setOpen",(n,r)=>{var f,h;const i=r.reason,o=i===Kn,a=n&&i===ng,u=!n&&(i===wa||i===_y);if(r.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},(h=(f=this.context).onOpenChange)==null||h.call(f,n,r),r.isCanceled)return;const c=()=>{var y;const p={open:n,openChangeReason:i};a?p.instantType="focus":u?p.instantType="dismiss":i===Kn&&(p.instantType=void 0);const g=((y=r.trigger)==null?void 0:y.id)??null;(g||n)&&(p.activeTriggerId=g,p.activeTriggerElement=r.trigger??null),this.update(p)};o?gn.flushSync(c):c()})}static useStore(n,r){const i=fr(()=>new lP(r)).current,o=n??i,a=DS({popupStore:o,onOpenChange:o.setOpen});return o.state.floatingRootContext=a,o}};function tX(){return{...PS(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeDelay:0,hasViewport:!1}}function nX(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){var y;const o=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},a=t.axis==="x"||t.axis==="both",u=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((y=t.dataRef.current.openEvent)==null?void 0:y.type)||"")&&t.pointerType!=="touch";let f=o.width,h=o.height,p=o.x,g=o.y;return n==null&&t.x&&a&&(n=o.x-t.x),r==null&&t.y&&u&&(r=o.y-t.y),p-=n||0,g-=r||0,f=0,h=0,!i||c?(f=t.axis==="y"?o.width:0,h=t.axis==="x"?o.height:0,p=a&&t.x!=null?t.x:p,g=u&&t.y!=null?t.y:g):i&&!c&&(h=t.axis==="x"?o.height:h,f=t.axis==="y"?o.width:f),i=!0,{width:f,height:h,x:p,y:g,top:g,right:p+f,bottom:g+h,left:p}}}}function dA(e){return e!=null&&e.clientX!=null}function rX(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),o=n.useState("domReferenceElement"),a=n.context.dataRef,{enabled:u=!0,axis:c="both"}=t,f=C.useRef(!1),h=C.useRef(null),[p,g]=C.useState(),[y,b]=C.useState([]),v=tt((T,A,D)=>{f.current||a.current.openEvent&&!dA(a.current.openEvent)||n.set("positionReference",nX(D??o,{x:T,y:A,axis:c,dataRef:a,pointerType:p}))}),S=tt(T=>{r?h.current||b([]):v(T.clientX,T.clientY,T.currentTarget)}),x=jl(p)?i:r,_=C.useCallback(()=>{if(!x||!u)return;const T=fn(i);function A(D){const O=Un(D);ct(i,O)?(T.removeEventListener("mousemove",A),h.current=null):v(D.clientX,D.clientY)}if(!a.current.openEvent||dA(a.current.openEvent)){T.addEventListener("mousemove",A);const D=()=>{T.removeEventListener("mousemove",A),h.current=null};return h.current=D,D}n.set("positionReference",o)},[x,u,i,a,o,n,v]);C.useEffect(()=>_(),[_,y]),C.useEffect(()=>{u&&!i&&(f.current=!1)},[u,i]),C.useEffect(()=>{!u&&r&&(f.current=!0)},[u,r]);const R=C.useMemo(()=>{function T(A){g(A.pointerType)}return{onPointerDown:T,onPointerEnter:T,onMouseMove:S,onMouseEnter:S}},[S]);return C.useMemo(()=>u?{reference:R,trigger:R}:{},[u,R])}const iX=A4(function(e){const{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:o="none",actionsRef:a,onOpenChange:u,onOpenChangeComplete:c,handle:f,triggerId:h,defaultTriggerId:p=null,children:g}=e,y=eX.useStore(f==null?void 0:f.store,{open:n,openProp:r,activeTriggerId:p,triggerIdProp:h});wS(()=>{r===void 0&&y.state.open===!1&&n===!0&&y.update({open:!0,activeTriggerId:p})}),y.useControlledProp("openProp",r),y.useControlledProp("triggerIdProp",h),y.useContextCallback("onOpenChange",u),y.useContextCallback("onOpenChangeComplete",c);const b=y.useState("open"),v=!t&&b,S=y.useState("activeTriggerId"),x=y.useState("payload");y.useSyncedValues({trackCursorAxis:o,disableHoverablePopup:i}),gt(()=>{b&&t&&y.setOpen(!1,Vt($V))},[b,t,y]),y.useSyncedValue("disabled",t),RS(y);const{forceUnmount:_,transitionStatus:R}=_S(v,y),T=y.useState("isInstantPhase"),A=y.useState("instantType"),D=y.useState("lastOpenChangeReason"),O=C.useRef(null);gt(()=>{R==="ending"&&D===MS||R!=="ending"&&T?(A!=="delay"&&(O.current=A),y.set("instantType","delay")):O.current!==null&&(y.set("instantType",O.current),O.current=null)},[R,T,D,A,y]),gt(()=>{v&&S==null&&y.set("payload",void 0)},[y,S,v]);const $=C.useCallback(()=>{y.setOpen(!1,oX(y,OS))},[y]);C.useImperativeHandle(a,()=>({unmount:_,close:$}),[_,$]);const z=y.useState("floatingRootContext"),j=$S(z,{enabled:!t,referencePress:!0}),I=rX(z,{enabled:!t&&o!=="none",axis:o==="none"?void 0:o}),{getReferenceProps:M,getFloatingProps:B,getTriggerProps:G}=Th([j,I]),L=C.useMemo(()=>M(),[M]),F=C.useMemo(()=>G(),[G]),U=C.useMemo(()=>B(),[B]);return y.useSyncedValues({activeTriggerProps:L,inactiveTriggerProps:F,popupProps:U}),E.jsx(aP.Provider,{value:y,children:typeof g=="function"?g({payload:x}):g})});function oX(e,t){const n=Vt(t);return n.preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},n}const uP=({children:e,...t})=>E.jsx(iX,{"data-slot":"tooltip-root",...t,children:e});uP.displayName="TooltipRoot";let sX=(function(e){return e[e.popupOpen=Og.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});const aX=600,o1=Eq&&g4;function lX(e,t={}){const n="rootStore"in e?e.rootStore:e,{events:r,dataRef:i}=n.context,{enabled:o=!0,delay:a}=t,u=C.useRef(!1),c=C.useRef(null),f=xa(),h=C.useRef(!0);C.useEffect(()=>{const g=n.select("domReferenceElement");if(!o)return;const y=fn(g);function b(){const x=n.select("domReferenceElement");!n.select("open")&&mn(x)&&x===Ur(Mt(x))&&(u.current=!0)}function v(){h.current=!0}function S(){h.current=!1}return y.addEventListener("blur",b),o1&&(y.addEventListener("keydown",v,!0),y.addEventListener("pointerdown",S,!0)),()=>{y.removeEventListener("blur",b),o1&&(y.removeEventListener("keydown",v,!0),y.removeEventListener("pointerdown",S,!0))}},[n,o]),C.useEffect(()=>{if(!o)return;function g(y){if(y.reason===wa||y.reason===_y){const b=n.select("domReferenceElement");Nt(b)&&(c.current=b,u.current=!0)}}return r.on("openchange",g),()=>{r.off("openchange",g)}},[r,o,n]);const p=C.useMemo(()=>({onMouseLeave(){u.current=!1,c.current=null},onFocus(g){const y=g.currentTarget;if(u.current){if(c.current===y)return;u.current=!1,c.current=null}const b=Un(g.nativeEvent);if(Nt(b)){if(o1&&!g.relatedTarget){if(!h.current&&!Ry(b))return}else if(!Dg(b))return}const v=Ag(g.relatedTarget,n.context.triggerElements),{nativeEvent:S,currentTarget:x}=g,_=typeof a=="function"?a():a;if(n.select("open")&&v||_===0||_===void 0){n.setOpen(!0,Vt(ng,S,x));return}f.start(_,()=>{u.current||n.setOpen(!0,Vt(ng,S,x))})},onBlur(g){u.current=!1,c.current=null;const y=g.relatedTarget,b=g.nativeEvent,v=Nt(y)&&y.hasAttribute(Nc("focus-guard"))&&y.getAttribute("data-type")==="outside";f.start(0,()=>{var _;const S=n.select("domReferenceElement"),x=Ur(S?S.ownerDocument:document);!y&&x===S||ct((_=i.current.floatingContext)==null?void 0:_.refs.floating.current,x)||ct(S,x)||v||Ag(y??x,n.context.triggerElements)||n.setOpen(!1,Vt(ng,b))})}}),[i,n,f,a]);return C.useMemo(()=>o?{reference:p,trigger:p}:{},[o,p])}const uX=tV(function(e,t){const{className:n,render:r,handle:i,payload:o,disabled:a,delay:u,closeDelay:c,id:f,...h}=e,p=Dy(!0),g=(i==null?void 0:i.store)??p;if(!g)throw new Error(Tn(82));const y=LS(f),b=g.useState("isTriggerActive",y),v=g.useState("isOpenedByTrigger",y),S=g.useState("floatingRootContext"),x=C.useRef(null),_=u??aX,R=c??0,{registerTrigger:T,isMountedByThisTrigger:A}=kS(y,x,g,{payload:o,closeDelay:R}),D=KK(),{delayRef:O,isInstantPhase:$,hasProvider:z}=QK(S,{open:v});g.useSyncedValue("isInstantPhase",$);const j=g.useState("disabled"),I=a??j,M=g.useState("trackCursorAxis"),B=g.useState("disableHoverablePopup"),G=S$(S,{enabled:!I,mouseOnly:!0,move:!1,handleClose:!B&&M!=="both"?C$():null,restMs(){const V=D==null?void 0:D.delay,W=typeof O.current=="object"?O.current.open:void 0;let N=_;return z&&(W!==0?N=u??V??_:N=0),N},delay(){const V=typeof O.current=="object"?O.current.close:void 0;let W=R;return c==null&&z&&(W=V),{close:W}},triggerElementRef:x,isActiveTrigger:b}),L=lX(S,{enabled:!I}).reference,F={open:v},U=g.useState("triggerProps",A);return Ar("button",e,{state:F,ref:[t,T,x],props:[G,L,U,{id:y,[sX.triggerDisabled]:I?"":void 0},h],stateAttributesMapping:IS})}),cP=({children:e,...t})=>{const n=C.isValidElement(e);return E.jsx(uX,{"data-slot":"tooltip-trigger",render:n?e:E.jsx("span",{role:"button",tabIndex:0,children:e}),...t,children:e})};cP.displayName="TooltipTrigger";const fP=C.createContext(void 0);function cX(){const e=C.useContext(fP);if(e===void 0)throw new Error(Tn(70));return e}const fX=C.forwardRef(function(e,t){const{keepMounted:n=!1,...r}=e;return Dy().useState("mounted")||n?E.jsx(fP.Provider,{value:n,children:E.jsx(eP,{ref:t,...r})}):null}),dP=({children:e,...t})=>E.jsx(fX,{"data-slot":"tooltip-portal",...t,children:e});dP.displayName="TooltipPortal";const hP=C.createContext(void 0);function dX(){const e=C.useContext(hP);if(e===void 0)throw new Error(Tn(71));return e}const hX=C.forwardRef(function(e,t){const{render:n,className:r,anchor:i,positionMethod:o="absolute",side:a="top",align:u="center",sideOffset:c=0,alignOffset:f=0,collisionBoundary:h="clipping-ancestors",collisionPadding:p=5,arrowPadding:g=5,sticky:y=!1,disableAnchorTracking:b=!1,collisionAvoidance:v=V4,...S}=e,x=Dy(),_=cX(),R=x.useState("open"),T=x.useState("mounted"),A=x.useState("trackCursorAxis"),D=x.useState("disableHoverablePopup"),O=x.useState("floatingRootContext"),$=x.useState("instantType"),z=x.useState("transitionStatus"),j=x.useState("hasViewport"),I=z$({anchor:i,positionMethod:o,floatingRootContext:O,mounted:T,side:a,sideOffset:c,align:u,alignOffset:f,collisionBoundary:h,collisionPadding:p,sticky:y,arrowPadding:g,disableAnchorTracking:b,keepMounted:_,collisionAvoidance:v,adaptiveOrigin:j?L$:void 0}),M=C.useMemo(()=>{const F={};return(!R||A==="both"||D)&&(F.pointerEvents="none"),{role:"presentation",hidden:!T,style:{...I.positionerStyles,...F}}},[R,A,D,T,I.positionerStyles]),B=C.useMemo(()=>({open:R,side:I.side,align:I.align,anchorHidden:I.anchorHidden,instant:A!=="none"?"tracking-cursor":$}),[R,I.side,I.align,I.anchorHidden,A,$]),G=C.useMemo(()=>({...B,arrowRef:I.arrowRef,arrowStyles:I.arrowStyles,arrowUncentered:I.arrowUncentered}),[B,I.arrowRef,I.arrowStyles,I.arrowUncentered]),L=Ar("div",e,{state:B,props:[M,Ay(z),S],ref:[t,x.useStateSetter("positionerElement")],stateAttributesMapping:Xl});return E.jsx(hP.Provider,{value:G,children:L})}),pP=({children:e,...t})=>E.jsx(hX,{"data-slot":"tooltip-positioner",style:{zIndex:1e3},...t,children:e});pP.displayName="TooltipPositioner";const pX={...Xl,...rf},mX=C.forwardRef(function(e,t){const{className:n,render:r,...i}=e,o=Dy(),{side:a,align:u}=dX(),c=o.useState("open"),f=o.useState("instantType"),h=o.useState("transitionStatus"),p=o.useState("popupProps"),g=o.useState("floatingRootContext");Rh({open:c,ref:o.context.popupRef,onComplete(){var v,S;c&&((S=(v=o.context).onOpenChangeComplete)==null||S.call(v,!0))}});const y=o.useState("disabled"),b=o.useState("closeDelay");return U$(g,{enabled:!y,closeDelay:b}),Ar("div",e,{state:{open:c,side:a,align:u,instant:f,transitionStatus:h},ref:[t,o.context.popupRef,o.useStateSetter("popupElement")],props:[p,Ay(h),i],stateAttributesMapping:pX})}),mP=({children:e,...t})=>E.jsx(mX,{"data-slot":"tooltip-popup",render:E.jsx(qt,{py:2,px:2,inverted:!0}),"data-is-popup":!0,...t,children:E.jsx(je,{size:-1,children:e})});mP.displayName="TooltipPopup";const $l=({trigger:e,delay:t,open:n,onOpenChange:r,ProviderProps:i,RootProps:o,TriggerProps:a,PortalProps:u,PositionerProps:c={sideOffset:8,collisionPadding:16},PopupProps:f,children:h})=>E.jsx(sP,{delay:t,...i,children:E.jsxs(uP,{open:n,onOpenChange:r,...o,children:[E.jsx(cP,{...a,children:e}),E.jsx(dP,{...u,children:E.jsx(pP,{...c,children:E.jsx(mP,{...f,children:h})})})]})});$l.displayName="Tooltip";const gP=({tooltip:e,children:t})=>E.jsx($l,{"data-slot":"button-tooltip-wrapper",trigger:t,TriggerProps:{render:E.jsx("div",{})},delay:300,children:e});gP.displayName="ButtonTooltipWrapper";const Ci=({tooltip:e,shape:t,fullwidth:n,size:r,variant:i,loading:o,className:a,children:u,...c})=>E.jsx(cr,{condition:!!e,render:E.jsx(gP,{tooltip:e}),children:E.jsx(BH,{nativeButton:!c.render,"data-slot":"button",className:ze(vr.button,dH({shape:t,size:r,variant:i,fullwidth:n}),a),...c,children:E.jsxs(pS,{ay:"center",ax:"center",children:[E.jsx(B3,{loading:o,children:u}),E.jsx(n4,{loading:o})]})})});Ci.displayName="Button";function gX({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=C.useRef(e!==void 0),[o,a]=C.useState(t),u=i?e:o,c=C.useCallback(f=>{i||a(f)},[]);return[u,c]}let hA=0;function yX(e,t="mui"){const[n,r]=C.useState(e),i=e||n;return C.useEffect(()=>{n==null&&(hA+=1,r(`${t}-${hA}`))},[n,t]),i}const pA=vH.useId;function bX(e,t){if(pA!==void 0){const n=pA();return e??`${t}-${n}`}return yX(e,t)}function vX(e){return bX(e,"base-ui")}const xX=C.createContext(void 0);function wX(e=!0){const t=C.useContext(xX);if(t===void 0&&!e)throw new Error(bS(7));return t}const SX=C.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function CX(){return C.useContext(SX)}let EX=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function kX(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:o}=e,{register:a,unregister:u,subscribeMapChange:c,elementsRef:f,labelsRef:h,nextIndexRef:p}=CX(),g=C.useRef(-1),[y,b]=C.useState(o??(i===EX.GuessFromOrder?()=>{if(g.current===-1){const x=p.current;p.current+=1,g.current=x}return g.current}:-1)),v=C.useRef(null),S=C.useCallback(x=>{var _;if(v.current=x,y!==-1&&x!==null&&(f.current[y]=x,h)){const R=t!==void 0;h.current[y]=R?t:((_=r==null?void 0:r.current)==null?void 0:_.textContent)??x.textContent}},[y,f,h,t,r]);return Dx(()=>{if(o!=null)return;const x=v.current;if(x)return a(x,n),()=>{u(x)}},[o,a,u,n]),Dx(()=>{if(o==null)return c(x=>{var R;const _=v.current?(R=x.get(v.current))==null?void 0:R.index:null;_!=null&&b(_)})},[o,c,b]),C.useMemo(()=>({ref:S,index:y}),[y,S])}function RX(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=U3(),{ref:i,index:o}=kX(e),a=n===o,u=C.useRef(null),c=Px(i,u);return{compositeProps:C.useMemo(()=>({tabIndex:a?0:-1,onFocus(){r(o)},onMouseMove(){const f=u.current;if(!t||!f)return;const h=f.hasAttribute("disabled")||f.ariaDisabled==="true";!a&&!h&&f.focus()}}),[a,r,o,t]),compositeRef:c,index:o}}function _X(e){const{render:t,className:n,state:r=Hs,props:i=kT,refs:o=kT,metadata:a,stateAttributesMapping:u,tag:c="div",...f}=e,{compositeProps:h,compositeRef:p}=RX({metadata:a});return vS(c,e,{state:r,ref:[...o,p],props:[h,...i,f],stateAttributesMapping:u})}function TX(e,t,n,r){let i=!1,o=!1;const a=Hs;return{reason:e,event:t??new Event("base-ui"),cancel(){i=!0},allowPropagation(){o=!0},get isCanceled(){return i},get isPropagationAllowed(){return o},trigger:n,...a}}const AX="none",DX=C.forwardRef(function(e,t){const{className:n,defaultPressed:r=!1,disabled:i=!1,form:o,onPressedChange:a,pressed:u,render:c,type:f,value:h,nativeButton:p=!0,...g}=e,y=vX(h||void 0),b=wX(),v=(b==null?void 0:b.value)??[],S=b?void 0:r,x=(i||(b==null?void 0:b.disabled))??!1,[_,R]=gX({controlled:b?y!==void 0&&v.indexOf(y)>-1:u,default:S,name:"Toggle",state:"pressed"}),T=Ax((I,M)=>{var B;y&&((B=b==null?void 0:b.setGroupValue)==null||B.call(b,y,I,M)),a==null||a(I,M)}),{getButtonProps:A,buttonRef:D}=V3({disabled:x,native:p}),O={disabled:x,pressed:_},$=[D,t],z=[{"aria-pressed":_,onClick(I){const M=!_,B=TX(AX,I.nativeEvent);T(M,B),!B.isCanceled&&R(M)}},g,A],j=vS("button",e,{enabled:!b,state:O,ref:$,props:z});return b?E.jsx(_X,{tag:"button",render:c,className:n,state:O,refs:$,props:z}):j}),Qd=({text:e,icon:t,children:n,...r})=>E.jsx(DX,{...r,render:(i,o)=>{const a=o.pressed?e==null?void 0:e.pressed:e==null?void 0:e.unpressed,u=o.pressed?t==null?void 0:t.pressed:t==null?void 0:t.unpressed;return E.jsxs(Ci,{...i,children:[u,a??n]})}});Qd.displayName="ToggleButton";const MX="_badge_1nwto_3",OX="_colored_1nwto_37",fc={badge:MX,"badge-text":"_badge-text_1nwto_15","size-small":"_size-small_1nwto_26","size-medium":"_size-medium_1nwto_29","size-large":"_size-large_1nwto_32",colored:OX},$X=fc.colored,WS=Object.fromEntries(Object.entries(mS).map(([e,t])=>[e,`${t} ${$X}`])),PX=Jn({variants:{size:{small:fc["size-small"],medium:fc["size-medium"],large:fc["size-large"]},color:WS},defaultVariants:{size:"medium"}}),cn=({size:e,color:t,className:n,children:r,...i})=>E.jsx(Xe,{"data-slot":"badge",className:ze(fc.badge,PX({size:e,color:t}),n),ay:"center",gap:1,...i,children:E.jsx(je,{"data-slot":"badge-text",className:fc["badge-text"],size:-1,weight:"bold",children:r})});cn.displayName="Badge";const NX="_status_iof57_1",Bg={status:NX,"status-dot":"_status-dot_iof57_5","toggle-inverted":"_toggle-inverted_iof57_26","toggle-pulse":"_toggle-pulse_iof57_31"},IX=Jn({variants:{inverted:{true:Bg["toggle-inverted"]},pulse:{true:Bg["toggle-pulse"]},color:mS}}),My=({pulse:e,inverted:t,color:n,className:r,children:i,...o})=>E.jsxs(cr,{condition:!!i,render:E.jsx(Xe,{"data-slot":"status",className:ze(Bg.status,r),ay:"center",gap:2,...o}),children:[E.jsx("span",{"data-slot":"status-dot","data-colored":n?"":void 0,className:ze(Bg["status-dot"],IX({pulse:e,inverted:t,color:n}))}),i&&E.jsx(je,{"data-slot":"status-text",size:0,children:i})]});My.displayName="Status";const mA={meta:"Meta",ctrl:"Control",alt:"Alt",shift:"Shift"},jX={meta:"⌘",ctrl:"⌃",alt:"⌥",shift:"⇧",enter:"↵",backspace:"⌫",delete:"⌦",escape:"⎋",tab:"⇥",space:"␣",arrowup:"↑",arrowdown:"↓",arrowleft:"←",arrowright:"→"};function LX(e){const t=new Set;let n="";for(const r of e){const i=r.toLowerCase();mA[i]?t.add(mA[i]):n=i}return{modifiers:t,key:n}}function FX(e,t){const{modifiers:n,key:r}=LX(t);return n.has("Meta")!==e.metaKey||n.has("Control")!==e.ctrlKey||n.has("Alt")!==e.altKey||n.has("Shift")!==e.shiftKey?!1:r?e.key.toLowerCase()===r:n.has(e.key)}function zX(e){return e.map(t=>jX[t.toLowerCase()]??t.toUpperCase()).join(" + ")}const BX="_kbd_19d6z_1",UX={kbd:BX},yP=({className:e,active:t,hotkey:n,...r})=>{const[i,o]=C.useState(!1);return C.useEffect(()=>{if(!n||t!==void 0)return;const a=f=>{FX(f,n)&&o(!0)},u=()=>o(!1),c=()=>o(!1);return window.addEventListener("keydown",a),window.addEventListener("keyup",u),window.addEventListener("blur",c),()=>{window.removeEventListener("keydown",a),window.removeEventListener("keyup",u),window.removeEventListener("blur",c)}},[n,t]),E.jsx("kbd",{"data-slot":"kbd","data-active":(t??i)||void 0,className:ze(UX.kbd,e),...r,children:n?zX(n):null})};yP.displayName="Kbd";const HX="_progress_ttyvd_1",Gs={progress:HX,"progress-label":"_progress-label_ttyvd_11","progress-value":"_progress-value_ttyvd_18","progress-track":"_progress-track_ttyvd_27","progress-indicator":"_progress-indicator_ttyvd_35","size-small":"_size-small_ttyvd_43","size-medium":"_size-medium_ttyvd_46","size-large":"_size-large_ttyvd_49"},GX=Jn({variants:{size:{small:Gs["size-small"],medium:Gs["size-medium"],large:Gs["size-large"]},color:WS},defaultVariants:{size:"medium"}}),qX=()=>{},bP=typeof document<"u"?C.useLayoutEffect:qX,gA={};function KS(e,t){const n=C.useRef(gA);return n.current===gA&&(n.current=e(t)),n}function VX(e){const t=KS(YX,e).current;return t.next=e,bP(t.effect),t}function YX(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const yA=new Map;function WX(e,t){const n=JSON.stringify({locale:e,options:t}),r=yA.get(n);if(r)return r;const i=new Intl.NumberFormat(e,t);return yA.set(n,i),i}function bA(e,t,n){return e==null?"":WX(t,n).format(e)}function KX(e,t,n){return e==null?"":n?bA(e,t,n):bA(e/100,t,{style:"percent"})}function vP(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}function vA(e,t,n,r){const i=KS(xP).current;return QX(i,e,t,n,r)&&wP(i,[e,t,n,r]),i.callback}function XX(e){const t=KS(xP).current;return ZX(t,e)&&wP(t,e),t.callback}function xP(){return{callback:null,cleanup:null,refs:[]}}function QX(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function ZX(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function wP(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const a=o(n);typeof a=="function"&&(r[i]=a);break}case"object":{o.current=n;break}}}e.cleanup=()=>{for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const a=r[i];typeof a=="function"?a():o(null);break}case"object":{o.current=null;break}}}}}}}const JX=parseInt(C.version,10);function eQ(e){return JX>=e}function xA(e){if(!C.isValidElement(e))return null;const t=e,n=t.props;return(eQ(19)?n==null?void 0:n.ref:t.ref)??null}function Xx(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function tQ(e,t){const n={};for(const r in e){const i=e[r];if(t!=null&&t.hasOwnProperty(r)){const o=t[r](i);o!=null&&Object.assign(n,o);continue}i===!0?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function nQ(e,t){return typeof e=="function"?e(t):e}function rQ(e,t){return typeof e=="function"?e(t):e}const Ju=Object.freeze({}),Dd={};function iQ(e,t,n,r,i){let o={...Qx(e,Dd)};return t&&(o=SP(o,t)),o}function oQ(e){if(e.length===0)return Dd;if(e.length===1)return Qx(e[0],Dd);let t={...Qx(e[0],Dd)};for(let n=1;n<e.length;n+=1)t=SP(t,e[n]);return t}function SP(e,t){return CP(t)?t(e):sQ(e,t)}function sQ(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=Xx(e.style,r);break}case"className":{e[n]=EP(e.className,r);break}default:aQ(n,r)?e[n]=lQ(e[n],r):e[n]=r}}return e}function aQ(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t=="function"||typeof t>"u")}function CP(e){return typeof e=="function"}function Qx(e,t){return CP(e)?e(t):e??Dd}function lQ(e,t){return t?e?n=>{if(cQ(n)){const i=n;uQ(i);const o=t(i);return i.baseUIHandlerPrevented||(e==null||e(i)),o}const r=t(n);return e==null||e(n),r}:t:e}function uQ(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function EP(e,t){return t?e?t+" "+e:t:e}function cQ(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Oh(e,t,n={}){const r=t.render,i=fQ(t,n);if(n.enabled===!1)return null;const o=n.state??Ju;return hQ(e,r,i,o)}function fQ(e,t={}){const{className:n,style:r,render:i}=e,{state:o=Ju,ref:a,props:u,stateAttributesMapping:c,enabled:f=!0}=t,h=f?nQ(n,o):void 0,p=f?rQ(r,o):void 0,g=f?tQ(o,c):Ju,y=f?Xx(g,Array.isArray(u)?oQ(u):u)??Ju:Ju;return typeof document<"u"&&(f?Array.isArray(a)?y.ref=XX([y.ref,xA(i),...a]):y.ref=vA(y.ref,xA(i),a):vA(null,null)),f?(h!==void 0&&(y.className=EP(y.className,h)),p!==void 0&&(y.style=Xx(y.style,p)),y):Ju}const dQ=Symbol.for("react.lazy");function hQ(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=iQ(n,t.props);i.ref=n.ref;let o=t;return(o==null?void 0:o.$$typeof)===dQ&&(o=C.Children.toArray(t)[0]),C.cloneElement(o,i)}if(e&&typeof e=="string")return pQ(e,n);throw new Error(vP(8))}function pQ(e,t){return e==="button"?C.createElement("button",{type:"button",...t,key:t.key}):e==="img"?C.createElement("img",{alt:"",...t,key:t.key}):C.createElement(e,t)}const kP=C.createContext(void 0);function Oy(){const e=C.useContext(kP);if(e===void 0)throw new Error(vP(51));return e}let s1=(function(e){return e.complete="data-complete",e.indeterminate="data-indeterminate",e.progressing="data-progressing",e})({});const $h={status(e){return e==="progressing"?{[s1.progressing]:""}:e==="complete"?{[s1.complete]:""}:e==="indeterminate"?{[s1.indeterminate]:""}:null}};function mQ(e,t){return t==null?"indeterminate progress":e||`${t}%`}const gQ=C.forwardRef(function(e,t){const{format:n,getAriaValueText:r=mQ,locale:i,max:o=100,min:a=0,value:u,render:c,className:f,...h}=e,[p,g]=C.useState(),y=VX(n);let b="indeterminate";Number.isFinite(u)&&(b=u===o?"complete":"progressing");const v=KX(u,i,y.current),S=C.useMemo(()=>({status:b}),[b]),x={"aria-labelledby":p,"aria-valuemax":o,"aria-valuemin":a,"aria-valuenow":u??void 0,"aria-valuetext":r(v,u),role:"progressbar"},_=C.useMemo(()=>({formattedValue:v,max:o,min:a,setLabelId:g,state:S,status:b,value:u}),[v,o,a,g,S,b,u]),R=Oh("div",e,{state:S,ref:t,props:[x,h],stateAttributesMapping:$h});return E.jsx(kP.Provider,{value:_,children:R})}),yQ={...os};let wA=0;function bQ(e,t="mui"){const[n,r]=C.useState(e),i=e||n;return C.useEffect(()=>{n==null&&(wA+=1,r(`${t}-${wA}`))},[n,t]),i}const SA=yQ.useId;function vQ(e,t){if(SA!==void 0){const n=SA();return e??`${t}-${n}`}return bQ(e,t)}function xQ(e){return vQ(e,"base-ui")}const wQ=C.forwardRef(function(e,t){const{render:n,className:r,id:i,...o}=e,a=xQ(i),{setLabelId:u,state:c}=Oy();return bP(()=>(u(a),()=>u(void 0)),[a,u]),Oh("span",e,{state:c,ref:t,props:[{id:a},o],stateAttributesMapping:$h})}),SQ=C.forwardRef(function(e,t){const{className:n,render:r,children:i,...o}=e,{value:a,formattedValue:u,state:c}=Oy(),f=a==null?"indeterminate":u,h=a==null?null:u;return Oh("span",e,{state:c,ref:t,props:[{"aria-hidden":!0,children:typeof i=="function"?i(f,a):h},o],stateAttributesMapping:$h})}),CQ=C.forwardRef(function(e,t){const{render:n,className:r,...i}=e,{state:o}=Oy();return Oh("div",e,{state:o,ref:t,props:i,stateAttributesMapping:$h})});function EQ(e,t,n){return(e-t)*100/(n-t)}const kQ=C.forwardRef(function(e,t){const{render:n,className:r,...i}=e,{max:o,min:a,value:u,state:c}=Oy(),f=Number.isFinite(u)&&u!==null?EQ(u,a,o):null,h=C.useCallback(()=>f==null?{}:{insetInlineStart:0,height:"inherit",width:`${f}%`},[f]);return Oh("div",e,{state:c,ref:t,props:[{style:h()},i],stateAttributesMapping:$h})}),XS=({value:e=0,label:t,size:n,color:r,className:i,RootProps:o,TrackProps:a,IndicatorProps:u,ValueProps:c,LabelProps:f})=>E.jsxs(gQ,{"data-slot":"progress",className:ze(Gs.progress,GX({size:n,color:r}),i),value:e,...o,children:[t&&E.jsx(wQ,{"data-slot":"progress-label",className:Gs["progress-label"],...f,children:t}),E.jsx(SQ,{"data-slot":"progress-value",className:Gs["progress-value"],...c}),E.jsx(CQ,{"data-slot":"progress-track",className:Gs["progress-track"],...a,children:E.jsx(kQ,{"data-slot":"progress-indicator",className:Gs["progress-indicator"],...u})})]});XS.displayName="Progress";const QS="Timeline",Zx="TimelineItem",RQ="TimelineDot",CA="TimelineConnector",_Q="TimelineContent",TQ="vertical",ZS=C.createContext(null);function AQ(e){const t=C.useContext(ZS);if(!t)throw new Error(`\`${e}\` must be used within \`${QS}\``);return t}const RP=C.createContext(null);function _P(e){const t=C.useContext(RP);if(!t)throw new Error(`\`${e}\` must be used within \`${QS}\``);return t}const TP=C.createContext(null);function JS(e){const t=C.useContext(TP);if(!t)throw new Error(`\`${e}\` must be used within \`${Zx}\``);return t}const DQ=typeof window<"u"?C.useLayoutEffect:C.useEffect;function EA(e){const t=C.useRef(null);return t.current===null&&(t.current=e()),t}function AP(e){const t=C.useContext(ZS);if(!t)throw new Error(`\`useStore\` must be used within \`${QS}\``);const n=C.useCallback(()=>e(t),[t,e]);return C.useSyncExternalStore(t.subscribe,n,n)}function DP(e,t){return t===void 0?"pending":e<t?"completed":e===t?"active":"pending"}function kA(e){return e.sort((t,n)=>{const r=t[1].current,i=n[1].current;if(!r||!i)return 0;const o=r.compareDocumentPosition(i);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0})}const MQ="_timeline_vzu9j_1",OQ="_completed_vzu9j_40",Ii={timeline:MQ,"timeline-item":"_timeline-item_vzu9j_7","timeline-dot":"_timeline-dot_vzu9j_12","timeline-connector":"_timeline-connector_vzu9j_35",completed:OQ,"orientation-vertical":"_orientation-vertical_vzu9j_48","orientation-horizontal":"_orientation-horizontal_vzu9j_55"},MP=Jn({variants:{color:WS}}),$Q=Jn({base:Ii["timeline-item"]}),PQ=Jn({base:Ii["timeline-dot"],variants:{status:{completed:Ii["status-completed"],active:Ii["status-active"],pending:Ii["status-pending"]}},defaultVariants:{status:"pending"}}),NQ=Jn({base:Ii["timeline-connector"],variants:{isCompleted:{true:Ii.completed},orientation:{vertical:Ii["orientation-vertical"],horizontal:Ii["orientation-horizontal"]}},defaultVariants:{isCompleted:!1,orientation:"vertical"}}),IQ=C.createContext(void 0);function jQ(){var e;return((e=C.useContext(IQ))==null?void 0:e.direction)??"ltr"}const OP=({className:e,id:t,ref:n,color:r,children:i,...o})=>{const{dir:a,orientation:u,activeIndex:c}=_P(Zx),f=AQ(Zx),h=C.useId(),p=t??h,g=C.useRef(null),y=B9(n,g),b=AP(_=>_.getItemIndex(p)),v=C.useMemo(()=>DP(b,c),[c,b]);DQ(()=>(f.onItemRegister(p,g),()=>{f.onItemUnregister(p)}),[t,f]);const S=C.useMemo(()=>({id:p,status:v}),[p,v]),x={role:"listitem","aria-current":v==="active"?"step":void 0,"data-slot":"timeline-item","data-status":v,"data-orientation":u,id:p,dir:a,ref:y,className:ze($Q(),MP({color:r}),e),...o};return E.jsx(TP.Provider,{value:S,children:u==="vertical"?E.jsx(Xe,{gap:3,pb:4,...x,children:i}):E.jsx(Ye,{gap:3,...x,children:i})})};OP.displayName="TimelineItem";const $P=({className:e,children:t,...n})=>{const{status:r}=JS(RQ);return E.jsx("div",{"data-slot":"timeline-dot","data-status":r,className:ze(PQ({status:r}),e),...n,children:t})};$P.displayName="TimelineDot";const PP=({forceMount:e,className:t,children:n,...r})=>{const{orientation:i,activeIndex:o}=_P(CA),{id:a,status:u}=JS(CA),c=AP(h=>h.getNextItemStatus(a,o));if(!e&&c===void 0)return null;const f=c==="completed"||c==="active";return E.jsx("div",{"aria-hidden":"true","data-slot":"timeline-connector","data-completed":f?"":void 0,"data-status":u,"data-orientation":i,className:ze(NQ({isCompleted:f,orientation:i}),t),...r,children:n})};PP.displayName="TimelineConnector";const NP=({variant:e,children:t,...n})=>{const{status:r}=JS(_Q);return E.jsx(cr,{condition:e==="card",render:E.jsx(qt,{}),children:E.jsx(Ye,{"data-slot":"timeline-content","data-status":r,gap:3,pb:2,pr:4,...n,children:t})})};NP.displayName="TimelineContent";const IP=({className:e,children:t,...n})=>E.jsx(je,{"data-slot":"timeline-title",className:ze(Ii["timeline-title"],e),size:1,weight:"bold",...n,children:t});IP.displayName="TimelineTitle";const jP=({children:e,...t})=>E.jsx(je,{"data-slot":"timeline-time",render:E.jsx("time",{}),shade:"muted",size:-1,...t,children:e});jP.displayName="TimelineTime";const LP=({children:e,...t})=>E.jsx(je,{"data-slot":"timeline-description",shade:"muted",mt:1,...t,children:e});LP.displayName="TimelineDescription";function FP({orientation:e=TQ,dir:t,activeIndex:n,color:r,items:i,ItemProps:o,DotProps:a,ConnectorProps:u,ContentProps:c,TitleProps:f,DescriptionProps:h,TimeProps:p,className:g,children:y,...b}){const v=jQ(),S=t??v??"ltr",x=EA(()=>new Set),_=EA(()=>({items:new Map})),R=C.useMemo(()=>({subscribe:A=>(x.current.add(A),()=>x.current.delete(A)),getState:()=>_.current,notify:()=>{for(const A of x.current)A()},onItemRegister:(A,D)=>{_.current.items.set(A,D),R.notify()},onItemUnregister:A=>{_.current.items.delete(A),R.notify()},getNextItemStatus:(A,D)=>{const O=Array.from(_.current.items.entries()),$=kA(O),z=$.findIndex(([I])=>I===A);if(z===-1||z===$.length-1)return;const j=z+1;return DP(j,D)},getItemIndex:A=>{const D=Array.from(_.current.items.entries());return kA(D).findIndex(([O])=>O===A)}}),[x,_]),T=C.useMemo(()=>({dir:S,orientation:e,activeIndex:n}),[S,e,n]);return E.jsx(ZS.Provider,{value:R,children:E.jsx(RP.Provider,{value:T,children:E.jsx(tf,{"data-slot":"timeline",role:"list",className:ze(Ii.timeline,MP({color:r}),g),render:{true:E.jsx(Ye,{gap:2}),false:E.jsx(Xe,{gap:2})},condition:e==="vertical","aria-orientation":e,"data-orientation":e,dir:S,...b,children:i?i.map(({title:A,description:D,time:O,color:$,content:z},j)=>E.jsxs(OP,{color:$,...o,children:[E.jsx($P,{...a}),E.jsx(PP,{...u}),E.jsxs(NP,{...c,children:[E.jsx(IP,{...f,children:A}),O&&E.jsx(jP,{...p,children:O}),D&&E.jsx(LP,{...h,children:D}),z]})]},j)):y})})})}FP.displayName="Timeline";const LQ="typescript",zP=!1,FQ=!0,BP="",UP=!1,HP={javascript:"JavaScript",typescript:"TypeScript",jsx:"JSX",tsx:"TSX",json:"JSON",css:"CSS",html:"HTML",bash:"Bash",markdown:"Markdown",python:"Python"},wm={"code-typography":"_code-typography_hkdop_4","shiki-theme":"_shiki-theme_hkdop_14","shiki-reset":"_shiki-reset_hkdop_24","line-numbers":"_line-numbers_hkdop_47"},zQ=Jn({base:[wm["code-typography"],wm["shiki-theme"],wm["shiki-reset"]],variants:{showLineNumbers:{true:wm["line-numbers"]}},defaultVariants:{showLineNumbers:zP}}),BQ="modulepreload",UQ=function(e){return"/"+e},RA={},fi=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let a=function(f){return Promise.all(f.map(h=>Promise.resolve(h).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),c=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));i=a(n.map(f=>{if(f=UQ(f),f in RA)return;RA[f]=!0;const h=f.endsWith(".css"),p=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${p}`))return;const g=document.createElement("link");if(g.rel=h?"stylesheet":BQ,h||(g.as="script"),g.crossOrigin="",g.href=f,c&&g.setAttribute("nonce",c),document.head.appendChild(g),h)return new Promise((y,b)=>{g.addEventListener("load",y),g.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(a){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=a,window.dispatchEvent(u),!u.defaultPrevented)throw a}return i.then(a=>{for(const u of a||[])u.status==="rejected"&&o(u.reason);return t().catch(o)})};let $n=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function HQ(e){return eC(e)}function eC(e){return Array.isArray(e)?GQ(e):e instanceof RegExp?e:typeof e=="object"?qQ(e):e}function GQ(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=eC(e[n]);return t}function qQ(e){let t={};for(let n in e)t[n]=eC(e[n]);return t}function GP(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function qP(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?qP(e.substring(0,e.length-1)):e.substr(~t+1)}var a1=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Sm=class{static hasCaptures(e){return e===null?!1:(a1.lastIndex=0,a1.test(e))}static replaceCaptures(e,t,n){return e.replace(a1,(r,i,o,a)=>{let u=n[parseInt(i||o,10)];if(u){let c=t.substring(u.start,u.end);for(;c[0]===".";)c=c.substring(1);switch(a){case"downcase":return c.toLowerCase();case"upcase":return c.toUpperCase();default:return c}}else return r})}};function VP(e,t){return e<t?-1:e>t?1:0}function YP(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let i=0;i<n;i++){let o=VP(e[i],t[i]);if(o!==0)return o}return 0}return n-r}function _A(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function WP(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var KP=class{constructor(e){te(this,"cache",new Map);this.fn=e}get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},Ug=class{constructor(e,t,n){te(this,"_cachedMatchRoot",new KP(e=>this._root.match(e)));this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(WQ(e),t)}static createFromParsedTheme(e,t){return XQ(e,t)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(i=>VQ(e.parent,i.parentScopes));return r?new XP(r.fontStyle,r.foreground,r.background):null}},l1=class ag{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new ag(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new ag(n,t[r]);return n}push(t){return new ag(this,t)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push(r.scopeName),r=r.parent;return r===t?n.reverse():void 0}};function VQ(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===">"){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!YQ(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function YQ(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var XP=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function WQ(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let i=0,o=t.length;i<o;i++){let a=t[i];if(!a.settings)continue;let u;if(typeof a.scope=="string"){let p=a.scope;p=p.replace(/^[,]+/,""),p=p.replace(/[,]+$/,""),u=p.split(",")}else Array.isArray(a.scope)?u=a.scope:u=[""];let c=-1;if(typeof a.settings.fontStyle=="string"){c=0;let p=a.settings.fontStyle.split(" ");for(let g=0,y=p.length;g<y;g++)switch(p[g]){case"italic":c=c|1;break;case"bold":c=c|2;break;case"underline":c=c|4;break;case"strikethrough":c=c|8;break}}let f=null;typeof a.settings.foreground=="string"&&_A(a.settings.foreground)&&(f=a.settings.foreground);let h=null;typeof a.settings.background=="string"&&_A(a.settings.background)&&(h=a.settings.background);for(let p=0,g=u.length;p<g;p++){let b=u[p].trim().split(" "),v=b[b.length-1],S=null;b.length>1&&(S=b.slice(0,b.length-1),S.reverse()),n[r++]=new KQ(v,S,i,c,f,h)}}return n}var KQ=class{constructor(e,t,n,r,i,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=o}},Xn=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(Xn||{});function XQ(e,t){e.sort((c,f)=>{let h=VP(c.scope,f.scope);return h!==0||(h=YP(c.parentScopes,f.parentScopes),h!==0)?h:c.index-f.index});let n=0,r="#000000",i="#ffffff";for(;e.length>=1&&e[0].scope==="";){let c=e.shift();c.fontStyle!==-1&&(n=c.fontStyle),c.foreground!==null&&(r=c.foreground),c.background!==null&&(i=c.background)}let o=new QQ(t),a=new XP(n,o.getId(r),o.getId(i)),u=new JQ(new Jx(0,null,-1,0,0),[]);for(let c=0,f=e.length;c<f;c++){let h=e[c];u.insert(0,h.scope,h.parentScopes,h.fontStyle,o.getId(h.foreground),o.getId(h.background))}return new Ug(o,a,u)}var QQ=class{constructor(e){te(this,"_isFrozen");te(this,"_lastColorId");te(this,"_id2color");te(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},ZQ=Object.freeze([]),Jx=class QP{constructor(t,n,r,i,o){te(this,"scopeDepth");te(this,"parentScopes");te(this,"fontStyle");te(this,"foreground");te(this,"background");this.scopeDepth=t,this.parentScopes=n||ZQ,this.fontStyle=r,this.foreground=i,this.background=o}clone(){return new QP(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,i=t.length;r<i;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,i){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},JQ=class ew{constructor(t,n=[],r={}){te(this,"_rulesWithParentScopes");this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,i=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=t.parentScopes.length||i>=n.parentScopes.length);){const o=n.parentScopes[i].length-t.parentScopes[r].length;if(o!==0)return o;r++,i++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),i,o;if(r===-1?(i=t,o=""):(i=t.substring(0,r),o=t.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(ew._cmpBySpecificity),n}insert(t,n,r,i,o,a){if(n===""){this._doInsertHere(t,r,i,o,a);return}let u=n.indexOf("."),c,f;u===-1?(c=n,f=""):(c=n.substring(0,u),f=n.substring(u+1));let h;this._children.hasOwnProperty(c)?h=this._children[c]:(h=new ew(this._mainRule.clone(),Jx.cloneArr(this._rulesWithParentScopes)),this._children[c]=h),h.insert(t+1,f,r,i,o,a)}_doInsertHere(t,n,r,i,o){if(n===null){this._mainRule.acceptOverwrite(t,r,i,o);return}for(let a=0,u=this._rulesWithParentScopes.length;a<u;a++){let c=this._rulesWithParentScopes[a];if(YP(c.parentScopes,n)===0){c.acceptOverwrite(t,r,i,o);return}}r===-1&&(r=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new Jx(t,n,r,i,o))}},Lc=class ui{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=ui.getLanguageId(t),r=ui.getTokenType(t),i=ui.getFontStyle(t),o=ui.getForeground(t),a=ui.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:o,background:a})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,i,o,a,u){let c=ui.getLanguageId(t),f=ui.getTokenType(t),h=ui.containsBalancedBrackets(t)?1:0,p=ui.getFontStyle(t),g=ui.getForeground(t),y=ui.getBackground(t);return n!==0&&(c=n),r!==8&&(f=r),i!==null&&(h=i?1:0),o!==-1&&(p=o),a!==0&&(g=a),u!==0&&(y=u),(c<<0|f<<8|h<<10|p<<11|g<<15|y<<24)>>>0}};function Hg(e,t){const n=[],r=eZ(e);let i=r.next();for(;i!==null;){let c=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":c=1;break;case"L":c=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let f=a();if(n.push({matcher:f,priority:c}),i!==",")break;i=r.next()}return n;function o(){if(i==="-"){i=r.next();const c=o();return f=>!!c&&!c(f)}if(i==="("){i=r.next();const c=u();return i===")"&&(i=r.next()),c}if(TA(i)){const c=[];do c.push(i),i=r.next();while(TA(i));return f=>t(c,f)}return null}function a(){const c=[];let f=o();for(;f;)c.push(f),f=o();return h=>c.every(p=>p(h))}function u(){const c=[];let f=a();for(;f&&(c.push(f),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");f=a()}return h=>c.some(p=>p(h))}}function TA(e){return!!e&&!!e.match(/[\w\.:]+/)}function eZ(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}function ZP(e){typeof e.dispose=="function"&&e.dispose()}var Zd=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},tZ=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},nZ=class{constructor(){te(this,"_references",[]);te(this,"_seenReferenceKeys",new Set);te(this,"visitedRule",new Set)}get references(){return this._references}add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},rZ=class{constructor(e,t){te(this,"seenFullScopeRequests",new Set);te(this,"seenPartialScopeRequests",new Set);te(this,"Q");this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Zd(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new nZ;for(const n of e)iZ(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Zd){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function iZ(e,t,n,r){const i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof Zd?lg({baseGrammar:o,selfGrammar:i},r):tw(e.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},r);const a=n.injections(e.scopeName);if(a)for(const u of a)r.add(new Zd(u))}function tw(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];Gg([r],t,n)}}function lg(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Gg(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Gg(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Gg(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?GP({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Gg(r.patterns,{...t,repository:i},n);const o=r.include;if(!o)continue;const a=JP(o);switch(a.kind){case 0:lg({...t,selfGrammar:t.baseGrammar},n);break;case 1:lg(t,n);break;case 2:tw(a.ruleName,{...t,repository:i},n);break;case 3:case 4:const u=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(u){const c={baseGrammar:t.baseGrammar,selfGrammar:u,repository:i};a.kind===4?tw(a.ruleName,c,n):lg(c,n)}else a.kind===4?n.add(new tZ(a.scopeName,a.ruleName)):n.add(new Zd(a.scopeName));break}}}var oZ=class{constructor(){te(this,"kind",0)}},sZ=class{constructor(){te(this,"kind",1)}},aZ=class{constructor(e){te(this,"kind",2);this.ruleName=e}},lZ=class{constructor(e){te(this,"kind",3);this.scopeName=e}},uZ=class{constructor(e,t){te(this,"kind",4);this.scopeName=e,this.ruleName=t}};function JP(e){if(e==="$base")return new oZ;if(e==="$self")return new sZ;const t=e.indexOf("#");if(t===-1)return new lZ(e);if(t===0)return new aZ(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new uZ(n,r)}}var cZ=/\\(\d+)/,AA=/\\(\d+)/g,fZ=-1,eN=-2;var Ph=class{constructor(e,t,n,r){te(this,"$location");te(this,"id");te(this,"_nameIsCapturing");te(this,"_name");te(this,"_contentNameIsCapturing");te(this,"_contentName");this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Sm.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Sm.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${qP(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Sm.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Sm.replaceCaptures(this._contentName,e,t)}},dZ=class extends Ph{constructor(t,n,r,i,o){super(t,n,r,i);te(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(t,n){throw new Error("Not supported!")}compile(t,n){throw new Error("Not supported!")}compileAG(t,n,r,i){throw new Error("Not supported!")}},hZ=class extends Ph{constructor(t,n,r,i,o){super(t,n,r,null);te(this,"_match");te(this,"captures");te(this,"_cachedCompiledPatterns");this._match=new Jd(i,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,n){n.push(this._match)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,i){return this._getCachedCompiledPatterns(t).compileAG(t,r,i)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new eh,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},DA=class extends Ph{constructor(t,n,r,i,o){super(t,n,r,i);te(this,"hasMissingPatterns");te(this,"patterns");te(this,"_cachedCompiledPatterns");this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,n){for(const r of this.patterns)t.getRule(r).collectPatterns(t,n)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,i){return this._getCachedCompiledPatterns(t).compileAG(t,r,i)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new eh,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},nw=class extends Ph{constructor(t,n,r,i,o,a,u,c,f,h){super(t,n,r,i);te(this,"_begin");te(this,"beginCaptures");te(this,"_end");te(this,"endHasBackReferences");te(this,"endCaptures");te(this,"applyEndPatternLast");te(this,"hasMissingPatterns");te(this,"patterns");te(this,"_cachedCompiledPatterns");this._begin=new Jd(o,this.id),this.beginCaptures=a,this._end=new Jd(u||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=c,this.applyEndPatternLast=f||!1,this.patterns=h.patterns,this.hasMissingPatterns=h.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,n){return this._end.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t,n).compile(t)}compileAG(t,n,r,i){return this._getCachedCompiledPatterns(t,n).compileAG(t,r,i)}_getCachedCompiledPatterns(t,n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new eh;for(const r of this.patterns)t.getRule(r).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,n):this._cachedCompiledPatterns.setSource(0,n)),this._cachedCompiledPatterns}},qg=class extends Ph{constructor(t,n,r,i,o,a,u,c,f){super(t,n,r,i);te(this,"_begin");te(this,"beginCaptures");te(this,"whileCaptures");te(this,"_while");te(this,"whileHasBackReferences");te(this,"hasMissingPatterns");te(this,"patterns");te(this,"_cachedCompiledPatterns");te(this,"_cachedCompiledWhilePatterns");this._begin=new Jd(o,this.id),this.beginCaptures=a,this.whileCaptures=c,this._while=new Jd(u,eN),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=f.patterns,this.hasMissingPatterns=f.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,n){return this._while.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,i){return this._getCachedCompiledPatterns(t).compileAG(t,r,i)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new eh;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,n){return this._getCachedCompiledWhilePatterns(t,n).compile(t)}compileWhileAG(t,n,r,i){return this._getCachedCompiledWhilePatterns(t,n).compileAG(t,r,i)}_getCachedCompiledWhilePatterns(t,n){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new eh,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||"￿"),this._cachedCompiledWhilePatterns}},tN=class Vn{static createCaptureRule(t,n,r,i,o){return t.registerRule(a=>new dZ(n,a,r,i,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new hZ(t.$vscodeTextmateLocation,t.id,t.name,t.match,Vn._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=GP({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new DA(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,Vn._compilePatterns(o,n,r))}return t.while?new qg(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Vn._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,Vn._compileCaptures(t.whileCaptures||t.captures,n,r),Vn._compilePatterns(t.patterns,n,r)):new nw(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Vn._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,Vn._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,Vn._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let o=0;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const u=parseInt(a,10);u>o&&(o=u)}for(let a=0;a<=o;a++)i[a]=null;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const u=parseInt(a,10);let c=0;t[a].patterns&&(c=Vn.getCompiledRuleId(t[a],n,r)),i[u]=Vn.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,c)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let o=0,a=t.length;o<a;o++){const u=t[o];let c=-1;if(u.include){const f=JP(u.include);switch(f.kind){case 0:case 1:c=Vn.getCompiledRuleId(r[u.include],n,r);break;case 2:let h=r[f.ruleName];h&&(c=Vn.getCompiledRuleId(h,n,r));break;case 3:case 4:const p=f.scopeName,g=f.kind===4?f.ruleName:null,y=n.getExternalGrammar(p,r);if(y)if(g){let b=y.repository[g];b&&(c=Vn.getCompiledRuleId(b,n,y.repository))}else c=Vn.getCompiledRuleId(y.repository.$self,n,y.repository);break}}else c=Vn.getCompiledRuleId(u,n,r);if(c!==-1){const f=n.getRule(c);let h=!1;if((f instanceof DA||f instanceof nw||f instanceof qg)&&f.hasMissingPatterns&&f.patterns.length===0&&(h=!0),h)continue;i.push(c)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Jd=class nN{constructor(t,n){te(this,"source");te(this,"ruleId");te(this,"hasAnchor");te(this,"hasBackReferences");te(this,"_anchorCache");if(t&&typeof t=="string"){const r=t.length;let i=0,o=[],a=!1;for(let u=0;u<r;u++)if(t.charAt(u)==="\\"&&u+1<r){const f=t.charAt(u+1);f==="z"?(o.push(t.substring(i,u)),o.push("$(?!\\n)(?<!\\n)"),i=u+2):(f==="A"||f==="G")&&(a=!0),u++}this.hasAnchor=a,i===0?this.source=t:(o.push(t.substring(i,r)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=cZ.test(this.source):this.hasBackReferences=!1}clone(){return new nN(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(i=>t.substring(i.start,i.end));return AA.lastIndex=0,this.source.replace(AA,(i,o)=>WP(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],i=[],o,a,u,c;for(o=0,a=this.source.length;o<a;o++)u=this.source.charAt(o),t[o]=u,n[o]=u,r[o]=u,i[o]=u,u==="\\"&&o+1<a&&(c=this.source.charAt(o+1),c==="A"?(t[o+1]="￿",n[o+1]="￿",r[o+1]="A",i[o+1]="A"):c==="G"?(t[o+1]="￿",n[o+1]="G",r[o+1]="￿",i[o+1]="G"):(t[o+1]=c,n[o+1]=c,r[o+1]=c,i[o+1]=c),o++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:i.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},eh=class{constructor(){te(this,"_items");te(this,"_hasAnchors");te(this,"_cached");te(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new MA(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(i=>i.resolveAnchors(t,n));return new MA(e,r,this._items.map(i=>i.ruleId))}},MA=class{constructor(e,t,n){te(this,"scanner");this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
318
+ `)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},u1=class{constructor(e,t){this.languageId=e,this.tokenType=t}},qo,pZ=(qo=class{constructor(t,n){te(this,"_defaultAttributes");te(this,"_embeddedLanguagesMatcher");te(this,"_getBasicScopeAttributes",new KP(t=>{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new u1(n,r)}));this._defaultAttributes=new u1(t,8),this._embeddedLanguagesMatcher=new mZ(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?qo._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(qo.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}},te(qo,"_NULL_SCOPE_METADATA",new u1(0,0)),te(qo,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),qo),mZ=class{constructor(e){te(this,"values");te(this,"scopesRegExp");if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>WP(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},OA=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function rN(e,t,n,r,i,o,a,u){const c=t.content.length;let f=!1,h=-1;if(a){const y=gZ(e,t,n,r,i,o);i=y.stack,r=y.linePos,n=y.isFirstLine,h=y.anchorPosition}const p=Date.now();for(;!f;){if(u!==0&&Date.now()-p>u)return new OA(i,!0);g()}return new OA(i,!1);function g(){const y=yZ(e,t,n,r,i,h);if(!y){o.produce(i,c),f=!0;return}const b=y.captureIndices,v=y.matchedRuleId,S=b&&b.length>0?b[0].end>r:!1;if(v===fZ){const x=i.getRule(e);o.produce(i,b[0].start),i=i.withContentNameScopesList(i.nameScopesList),Rd(e,t,n,i,o,x.endCaptures,b),o.produce(i,b[0].end);const _=i;if(i=i.parent,h=_.getAnchorPos(),!S&&_.getEnterPos()===r){i=_,o.produce(i,c),f=!0;return}}else{const x=e.getRule(v);o.produce(i,b[0].start);const _=i,R=x.getName(t.content,b),T=i.contentNameScopesList.pushAttributed(R,e);if(i=i.push(v,r,h,b[0].end===c,null,T,T),x instanceof nw){const A=x;Rd(e,t,n,i,o,A.beginCaptures,b),o.produce(i,b[0].end),h=b[0].end;const D=A.getContentName(t.content,b),O=T.pushAttributed(D,e);if(i=i.withContentNameScopesList(O),A.endHasBackReferences&&(i=i.withEndRule(A.getEndWithResolvedBackReferences(t.content,b))),!S&&_.hasSameRuleAs(i)){i=i.pop(),o.produce(i,c),f=!0;return}}else if(x instanceof qg){const A=x;Rd(e,t,n,i,o,A.beginCaptures,b),o.produce(i,b[0].end),h=b[0].end;const D=A.getContentName(t.content,b),O=T.pushAttributed(D,e);if(i=i.withContentNameScopesList(O),A.whileHasBackReferences&&(i=i.withEndRule(A.getWhileWithResolvedBackReferences(t.content,b))),!S&&_.hasSameRuleAs(i)){i=i.pop(),o.produce(i,c),f=!0;return}}else if(Rd(e,t,n,i,o,x.captures,b),o.produce(i,b[0].end),i=i.pop(),!S){i=i.safePop(),o.produce(i,c),f=!0;return}}b[0].end>r&&(r=b[0].end,n=!1)}}function gZ(e,t,n,r,i,o){let a=i.beginRuleCapturedEOL?0:-1;const u=[];for(let c=i;c;c=c.pop()){const f=c.getRule(e);f instanceof qg&&u.push({rule:f,stack:c})}for(let c=u.pop();c;c=u.pop()){const{ruleScanner:f,findOptions:h}=xZ(c.rule,e,c.stack.endRule,n,r===a),p=f.findNextMatchSync(t,r,h);if(p){if(p.ruleId!==eN){i=c.stack.pop();break}p.captureIndices&&p.captureIndices.length&&(o.produce(c.stack,p.captureIndices[0].start),Rd(e,t,n,c.stack,o,c.rule.whileCaptures,p.captureIndices),o.produce(c.stack,p.captureIndices[0].end),a=p.captureIndices[0].end,p.captureIndices[0].end>r&&(r=p.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:a,isFirstLine:n}}function yZ(e,t,n,r,i,o){const a=bZ(e,t,n,r,i,o),u=e.getInjections();if(u.length===0)return a;const c=vZ(u,e,t,n,r,i,o);if(!c)return a;if(!a)return c;const f=a.captureIndices[0].start,h=c.captureIndices[0].start;return h<f||c.priorityMatch&&h===f?c:a}function bZ(e,t,n,r,i,o){const a=i.getRule(e),{ruleScanner:u,findOptions:c}=iN(a,e,i.endRule,n,r===o),f=u.findNextMatchSync(t,r,c);return f?{captureIndices:f.captureIndices,matchedRuleId:f.ruleId}:null}function vZ(e,t,n,r,i,o,a){let u=Number.MAX_VALUE,c=null,f,h=0;const p=o.contentNameScopesList.getScopeNames();for(let g=0,y=e.length;g<y;g++){const b=e[g];if(!b.matcher(p))continue;const v=t.getRule(b.ruleId),{ruleScanner:S,findOptions:x}=iN(v,t,null,r,i===a),_=S.findNextMatchSync(n,i,x);if(!_)continue;const R=_.captureIndices[0].start;if(!(R>=u)&&(u=R,c=_.captureIndices,f=_.ruleId,h=b.priority,u===i))break}return c?{priorityMatch:h===-1,captureIndices:c,matchedRuleId:f}:null}function iN(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function xZ(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function Rd(e,t,n,r,i,o,a){if(o.length===0)return;const u=t.content,c=Math.min(o.length,a.length),f=[],h=a[0].end;for(let p=0;p<c;p++){const g=o[p];if(g===null)continue;const y=a[p];if(y.length===0)continue;if(y.start>h)break;for(;f.length>0&&f[f.length-1].endPos<=y.start;)i.produceFromScopes(f[f.length-1].scopes,f[f.length-1].endPos),f.pop();if(f.length>0?i.produceFromScopes(f[f.length-1].scopes,y.start):i.produce(r,y.start),g.retokenizeCapturedWithRuleId){const v=g.getName(u,a),S=r.contentNameScopesList.pushAttributed(v,e),x=g.getContentName(u,a),_=S.pushAttributed(x,e),R=r.push(g.retokenizeCapturedWithRuleId,y.start,-1,!1,null,S,_),T=e.createOnigString(u.substring(0,y.end));rN(e,T,n&&y.start===0,y.start,R,i,!1,0),ZP(T);continue}const b=g.getName(u,a);if(b!==null){const S=(f.length>0?f[f.length-1].scopes:r.contentNameScopesList).pushAttributed(b,e);f.push(new wZ(S,y.end))}}for(;f.length>0;)i.produceFromScopes(f[f.length-1].scopes,f[f.length-1].endPos),f.pop()}var wZ=class{constructor(e,t){te(this,"scopes");te(this,"endPos");this.scopes=e,this.endPos=t}};function SZ(e,t,n,r,i,o,a,u){return new EZ(e,t,n,r,i,o,a,u)}function $A(e,t,n,r,i){const o=Hg(t,Vg),a=tN.getCompiledRuleId(n,r,i.repository);for(const u of o)e.push({debugSelector:t,matcher:u.matcher,ruleId:a,grammar:i,priority:u.priority})}function Vg(e,t){if(t.length<e.length)return!1;let n=0;return e.every(r=>{for(let i=n;i<t.length;i++)if(CZ(t[i],r))return n=i+1,!0;return!1})}function CZ(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]==="."}var EZ=class{constructor(e,t,n,r,i,o,a,u){te(this,"_rootId");te(this,"_lastRuleId");te(this,"_ruleId2desc");te(this,"_includedGrammars");te(this,"_grammarRepository");te(this,"_grammar");te(this,"_injections");te(this,"_basicScopeAttributesProvider");te(this,"_tokenTypeMatchers");if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=u,this._basicScopeAttributesProvider=new pZ(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=a,this._grammar=PA(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const c of Object.keys(i)){const f=Hg(c,Vg);for(const h of f)this._tokenTypeMatchers.push({matcher:h.matcher,type:i[c]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){const i=r.injections;if(i)for(let a in i)$A(t,a,i[a],this,r);const o=this._grammarRepository.injections(n);o&&o.forEach(a=>{const u=this.getExternalGrammar(a);if(u){const c=u.injectionSelector;c&&$A(t,c,u,this,u)}})}return t.sort((i,o)=>i.priority-o.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=PA(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){const r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=tN.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===rw.NULL){i=!0;const f=this._basicScopeAttributesProvider.getDefaultAttributes(),h=this.themeProvider.getDefaults(),p=Lc.set(0,f.languageId,f.tokenType,null,h.fontStyle,h.foregroundId,h.backgroundId),g=this.getRule(this._rootId).getName(null,null);let y;g?y=Md.createRootAndLookUpScopeName(g,p,this):y=Md.createRoot("unknown",p),t=new rw(null,this._rootId,-1,-1,!1,null,y,y)}else i=!1,t.reset();e=e+`
319
+ `;const o=this.createOnigString(e),a=o.content.length,u=new RZ(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=rN(this,o,i,0,t,u,!0,r);return ZP(o),{lineLength:a,lineTokens:u,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function PA(e,t){return e=HQ(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Md=class Wi{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,i=(t==null?void 0:t.scopePath)??null;for(const o of n)i=l1.push(i,o.scopeNames),r=new Wi(r,i,o.encodedTokenAttributes);return r}static createRoot(t,n){return new Wi(null,new l1(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const i=r.getMetadataForScope(t),o=new l1(null,t),a=r.themeProvider.themeMatch(o),u=Wi.mergeAttributes(n,i,a);return new Wi(null,o,u)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Wi.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,r){let i=-1,o=0,a=0;return r!==null&&(i=r.fontStyle,o=r.foregroundId,a=r.backgroundId),Lc.set(t,n.languageId,n.tokenType,null,i,o,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return Wi._pushAttributed(this,t,n);const r=t.split(/ /g);let i=this;for(const o of r)i=Wi._pushAttributed(i,o,n);return i}static _pushAttributed(t,n,r){const i=r.getMetadataForScope(n),o=t.scopePath.push(n),a=r.themeProvider.themeMatch(o),u=Wi.mergeAttributes(t.tokenAttributes,i,a);return new Wi(t,o,u)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){var i;const n=[];let r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(((i=r.parent)==null?void 0:i.scopePath)??null)}),r=r.parent;return r===t?n.reverse():void 0}},yi,rw=(yi=class{constructor(t,n,r,i,o,a,u,c){te(this,"_stackElementBrand");te(this,"_enterPos");te(this,"_anchorPos");te(this,"depth");this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=a,this.nameScopesList=u,this.contentNameScopesList=c,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=i}equals(t){return t===null?!1:yi._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?Md.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){yi._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,o,a,u){return new yi(this,t,n,r,i,o,a,u)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){var r,i;return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${(r=this.nameScopesList)==null?void 0:r.toString()}, ${(i=this.contentNameScopesList)==null?void 0:i.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new yi(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){var t,n,r;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((n=this.nameScopesList)==null?void 0:n.getExtensionIfDefined(((t=this.parent)==null?void 0:t.nameScopesList)??null))??[],contentNameScopesList:((r=this.contentNameScopesList)==null?void 0:r.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(t,n){const r=Md.fromExtension((t==null?void 0:t.nameScopesList)??null,n.nameScopesList);return new yi(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Md.fromExtension(r,n.contentNameScopesList))}},te(yi,"NULL",new yi(null,0,0,0,!1,null,null,null)),yi),kZ=class{constructor(e,t){te(this,"balancedBracketScopes");te(this,"unbalancedBracketScopes");te(this,"allowAny",!1);this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Hg(n,Vg).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>Hg(n,Vg).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},RZ=class{constructor(e,t,n,r){te(this,"_emitBinaryTokens");te(this,"_lineText");te(this,"_tokens");te(this,"_binaryTokens");te(this,"_lastTokenEndIndex");te(this,"_tokenTypeOverrides");this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){var r;if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let i=(e==null?void 0:e.tokenAttributes)??0,o=!1;if((r=this.balancedBracketSelectors)!=null&&r.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const a=(e==null?void 0:e.getScopeNames())??[];for(const u of this._tokenTypeOverrides)u.matcher(a)&&(i=Lc.set(i,0,u.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(a))}if(o&&(i=Lc.set(i,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===i){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(i),this._lastTokenEndIndex=t;return}const n=(e==null?void 0:e.getScopeNames())??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,i=this._binaryTokens.length;r<i;r++)n[r]=this._binaryTokens[r];return n}},_Z=class{constructor(e,t){te(this,"_grammars",new Map);te(this,"_rawGrammars",new Map);te(this,"_injectionGrammars",new Map);te(this,"_theme");this._onigLib=t,this._theme=e}dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,SZ(e,o,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},TZ=class{constructor(t){te(this,"_options");te(this,"_syncRegistry");te(this,"_ensureGrammarCache");this._options=t,this._syncRegistry=new _Z(Ug.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(Ug.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,r){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(t,n,r){return this._loadGrammar(t,n,r.embeddedLanguages,r.tokenTypes,new kZ(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,i,o){const a=new rZ(this._syncRegistry,t);for(;a.Q.length>0;)a.Q.map(u=>this._loadSingleGrammar(u.scopeName)),a.processQueue();return this._grammarForScopeName(t,n,r,i,o)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(t,n=[],r=0,i=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,r,i)}_grammarForScopeName(t,n=0,r=null,i=null,o=null){return this._syncRegistry.grammarForScopeName(t,n,r,i,o)}},iw=rw.NULL;const AZ=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class Nh{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Nh.prototype.normal={};Nh.prototype.property={};Nh.prototype.space=void 0;function oN(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Nh(n,r,t)}function ow(e){return e.toLowerCase()}class Dr{constructor(t,n){this.attribute=n,this.property=t}}Dr.prototype.attribute="";Dr.prototype.booleanish=!1;Dr.prototype.boolean=!1;Dr.prototype.commaOrSpaceSeparated=!1;Dr.prototype.commaSeparated=!1;Dr.prototype.defined=!1;Dr.prototype.mustUseProperty=!1;Dr.prototype.number=!1;Dr.prototype.overloadedBoolean=!1;Dr.prototype.property="";Dr.prototype.spaceSeparated=!1;Dr.prototype.space=void 0;let DZ=0;const lt=Ql(),Sn=Ql(),sw=Ql(),Ae=Ql(),Kt=Ql(),dc=Ql(),Fr=Ql();function Ql(){return 2**++DZ}const aw=Object.freeze(Object.defineProperty({__proto__:null,boolean:lt,booleanish:Sn,commaOrSpaceSeparated:Fr,commaSeparated:dc,number:Ae,overloadedBoolean:sw,spaceSeparated:Kt},Symbol.toStringTag,{value:"Module"})),c1=Object.keys(aw);class tC extends Dr{constructor(t,n,r,i){let o=-1;if(super(t,n),NA(this,"space",i),typeof r=="number")for(;++o<c1.length;){const a=c1[o];NA(this,c1[o],(r&aw[a])===aw[a])}}}tC.prototype.defined=!0;function NA(e,t,n){n&&(e[t]=n)}function lf(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new tC(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[ow(r)]=r,n[ow(o.attribute)]=r}return new Nh(t,n,e.space)}const sN=lf({properties:{ariaActiveDescendant:null,ariaAtomic:Sn,ariaAutoComplete:null,ariaBusy:Sn,ariaChecked:Sn,ariaColCount:Ae,ariaColIndex:Ae,ariaColSpan:Ae,ariaControls:Kt,ariaCurrent:null,ariaDescribedBy:Kt,ariaDetails:null,ariaDisabled:Sn,ariaDropEffect:Kt,ariaErrorMessage:null,ariaExpanded:Sn,ariaFlowTo:Kt,ariaGrabbed:Sn,ariaHasPopup:null,ariaHidden:Sn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Kt,ariaLevel:Ae,ariaLive:null,ariaModal:Sn,ariaMultiLine:Sn,ariaMultiSelectable:Sn,ariaOrientation:null,ariaOwns:Kt,ariaPlaceholder:null,ariaPosInSet:Ae,ariaPressed:Sn,ariaReadOnly:Sn,ariaRelevant:null,ariaRequired:Sn,ariaRoleDescription:Kt,ariaRowCount:Ae,ariaRowIndex:Ae,ariaRowSpan:Ae,ariaSelected:Sn,ariaSetSize:Ae,ariaSort:null,ariaValueMax:Ae,ariaValueMin:Ae,ariaValueNow:Ae,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function aN(e,t){return t in e?e[t]:t}function lN(e,t){return aN(e,t.toLowerCase())}const MZ=lf({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:dc,acceptCharset:Kt,accessKey:Kt,action:null,allow:null,allowFullScreen:lt,allowPaymentRequest:lt,allowUserMedia:lt,alt:null,as:null,async:lt,autoCapitalize:null,autoComplete:Kt,autoFocus:lt,autoPlay:lt,blocking:Kt,capture:null,charSet:null,checked:lt,cite:null,className:Kt,cols:Ae,colSpan:null,content:null,contentEditable:Sn,controls:lt,controlsList:Kt,coords:Ae|dc,crossOrigin:null,data:null,dateTime:null,decoding:null,default:lt,defer:lt,dir:null,dirName:null,disabled:lt,download:sw,draggable:Sn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:lt,formTarget:null,headers:Kt,height:Ae,hidden:sw,high:Ae,href:null,hrefLang:null,htmlFor:Kt,httpEquiv:Kt,id:null,imageSizes:null,imageSrcSet:null,inert:lt,inputMode:null,integrity:null,is:null,isMap:lt,itemId:null,itemProp:Kt,itemRef:Kt,itemScope:lt,itemType:Kt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:lt,low:Ae,manifest:null,max:null,maxLength:Ae,media:null,method:null,min:null,minLength:Ae,multiple:lt,muted:lt,name:null,nonce:null,noModule:lt,noValidate:lt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:lt,optimum:Ae,pattern:null,ping:Kt,placeholder:null,playsInline:lt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:lt,referrerPolicy:null,rel:Kt,required:lt,reversed:lt,rows:Ae,rowSpan:Ae,sandbox:Kt,scope:null,scoped:lt,seamless:lt,selected:lt,shadowRootClonable:lt,shadowRootDelegatesFocus:lt,shadowRootMode:null,shape:null,size:Ae,sizes:null,slot:null,span:Ae,spellCheck:Sn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ae,step:null,style:null,tabIndex:Ae,target:null,title:null,translate:null,type:null,typeMustMatch:lt,useMap:null,value:Sn,width:Ae,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Kt,axis:null,background:null,bgColor:null,border:Ae,borderColor:null,bottomMargin:Ae,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:lt,declare:lt,event:null,face:null,frame:null,frameBorder:null,hSpace:Ae,leftMargin:Ae,link:null,longDesc:null,lowSrc:null,marginHeight:Ae,marginWidth:Ae,noResize:lt,noHref:lt,noShade:lt,noWrap:lt,object:null,profile:null,prompt:null,rev:null,rightMargin:Ae,rules:null,scheme:null,scrolling:Sn,standby:null,summary:null,text:null,topMargin:Ae,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ae,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:lt,disableRemotePlayback:lt,prefix:null,property:null,results:Ae,security:null,unselectable:null},space:"html",transform:lN}),OZ=lf({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Fr,accentHeight:Ae,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ae,amplitude:Ae,arabicForm:null,ascent:Ae,attributeName:null,attributeType:null,azimuth:Ae,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ae,by:null,calcMode:null,capHeight:Ae,className:Kt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Ae,diffuseConstant:Ae,direction:null,display:null,dur:null,divisor:Ae,dominantBaseline:null,download:lt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ae,enableBackground:null,end:null,event:null,exponent:Ae,externalResourcesRequired:null,fill:null,fillOpacity:Ae,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:dc,g2:dc,glyphName:dc,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ae,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ae,horizOriginX:Ae,horizOriginY:Ae,id:null,ideographic:Ae,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ae,k:Ae,k1:Ae,k2:Ae,k3:Ae,k4:Ae,kernelMatrix:Fr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ae,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ae,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ae,overlineThickness:Ae,paintOrder:null,panose1:null,path:null,pathLength:Ae,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Kt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ae,pointsAtY:Ae,pointsAtZ:Ae,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Fr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Fr,rev:Fr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Fr,requiredFeatures:Fr,requiredFonts:Fr,requiredFormats:Fr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Ae,specularExponent:Ae,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ae,strikethroughThickness:Ae,string:null,stroke:null,strokeDashArray:Fr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ae,strokeOpacity:Ae,strokeWidth:null,style:null,surfaceScale:Ae,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Fr,tabIndex:Ae,tableValues:null,target:null,targetX:Ae,targetY:Ae,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Fr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ae,underlineThickness:Ae,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ae,values:null,vAlphabetic:Ae,vMathematical:Ae,vectorEffect:null,vHanging:Ae,vIdeographic:Ae,version:null,vertAdvY:Ae,vertOriginX:Ae,vertOriginY:Ae,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ae,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:aN}),uN=lf({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),cN=lf({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:lN}),fN=lf({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),$Z={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},PZ=/[A-Z]/g,IA=/-[a-z]/g,NZ=/^data[-\w.:]+$/i;function dN(e,t){const n=ow(t);let r=t,i=Dr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&NZ.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(IA,jZ);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!IA.test(o)){let a=o.replace(PZ,IZ);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=tC}return new i(r,t)}function IZ(e){return"-"+e.toLowerCase()}function jZ(e){return e.charAt(1).toUpperCase()}const hN=oN([sN,MZ,uN,cN,fN],"html"),Ih=oN([sN,OZ,uN,cN,fN],"svg"),jA={}.hasOwnProperty;function LZ(e,t){const n=t||{};function r(i,...o){let a=r.invalid;const u=r.handlers;if(i&&jA.call(i,e)){const c=String(i[e]);a=jA.call(u,c)?u[c]:r.unknown}if(a)return a.call(this,i,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const FZ=/["&'<>`]/g,zZ=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,BZ=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,UZ=/[|\\{}()[\]^$+*?.]/g,LA=new WeakMap;function HZ(e,t){if(e=e.replace(t.subset?GZ(t.subset):FZ,r),t.subset||t.escapeOnly)return e;return e.replace(zZ,n).replace(BZ,r);function n(i,o,a){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,a.charCodeAt(o+2),t)}function r(i,o,a){return t.format(i.charCodeAt(0),a.charCodeAt(o+1),t)}}function GZ(e){let t=LA.get(e);return t||(t=qZ(e),LA.set(e,t)),t}function qZ(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(UZ,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const VZ=/[\dA-Fa-f]/;function YZ(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!VZ.test(String.fromCharCode(t))?r:r+";"}const WZ=/\d/;function KZ(e,t,n){const r="&#"+String(e);return n&&t&&!WZ.test(String.fromCharCode(t))?r:r+";"}const XZ=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],f1={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},QZ=["cent","copy","divide","gt","lt","not","para","times"],pN={}.hasOwnProperty,lw={};let Cm;for(Cm in f1)pN.call(f1,Cm)&&(lw[f1[Cm]]=Cm);const ZZ=/[^\dA-Za-z]/;function JZ(e,t,n,r){const i=String.fromCharCode(e);if(pN.call(lw,i)){const o=lw[i],a="&"+o;return n&&XZ.includes(o)&&!QZ.includes(o)&&(!r||t&&t!==61&&ZZ.test(String.fromCharCode(t)))?a:a+";"}return""}function eJ(e,t,n){let r=YZ(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=JZ(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const o=KZ(e,t,n.omitOptionalSemicolons);o.length<r.length&&(r=o)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function hc(e,t){return HZ(e,Object.assign({format:eJ},t))}const tJ=/^>|^->|<!--|-->|--!>|<!-$/g,nJ=[">"],rJ=["<",">"];function iJ(e,t,n,r){return r.settings.bogusComments?"<?"+hc(e.value,Object.assign({},r.settings.characterReferences,{subset:nJ}))+">":"<!--"+e.value.replace(tJ,i)+"-->";function i(o){return hc(o,Object.assign({},r.settings.characterReferences,{subset:rJ}))}}function oJ(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function Yg(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function mN(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function gN(e){return e.join(" ").trim()}const sJ=/[ \t\n\f\r]/g;function $y(e){return typeof e=="object"?e.type==="text"?FA(e.value):!1:FA(e)}function FA(e){return e.replace(sJ,"")===""}const An=bN(1),yN=bN(-1),aJ=[];function bN(e){return t;function t(n,r,i){const o=n?n.children:aJ;let a=(r||0)+e,u=o[a];if(!i)for(;u&&$y(u);)a+=e,u=o[a];return u}}const lJ={}.hasOwnProperty;function vN(e){return t;function t(n,r,i){return lJ.call(e,n.tagName)&&e[n.tagName](n,r,i)}}const nC=vN({body:cJ,caption:d1,colgroup:d1,dd:pJ,dt:hJ,head:d1,html:uJ,li:dJ,optgroup:mJ,option:gJ,p:fJ,rp:zA,rt:zA,tbody:bJ,td:BA,tfoot:vJ,th:BA,thead:yJ,tr:xJ});function d1(e,t,n){const r=An(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&$y(r.value.charAt(0)))}function uJ(e,t,n){const r=An(n,t);return!r||r.type!=="comment"}function cJ(e,t,n){const r=An(n,t);return!r||r.type!=="comment"}function fJ(e,t,n){const r=An(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function dJ(e,t,n){const r=An(n,t);return!r||r.type==="element"&&r.tagName==="li"}function hJ(e,t,n){const r=An(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function pJ(e,t,n){const r=An(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function zA(e,t,n){const r=An(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function mJ(e,t,n){const r=An(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function gJ(e,t,n){const r=An(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function yJ(e,t,n){const r=An(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function bJ(e,t,n){const r=An(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function vJ(e,t,n){return!An(n,t)}function xJ(e,t,n){const r=An(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function BA(e,t,n){const r=An(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const wJ=vN({body:EJ,colgroup:kJ,head:CJ,html:SJ,tbody:RJ});function SJ(e){const t=An(e,-1);return!t||t.type!=="comment"}function CJ(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function EJ(e){const t=An(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&$y(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function kJ(e,t,n){const r=yN(n,t),i=An(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&nC(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function RJ(e,t,n){const r=yN(n,t),i=An(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&nC(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const Em={name:[[`
320
+ \f\r &/=>`.split(""),`
321
+ \f\r "&'/=>\``.split("")],[`\0
322
+ \f\r "&'/<=>`.split(""),`\0
323
+ \f\r "&'/<=>\``.split("")]],unquoted:[[`
324
+ \f\r &>`.split(""),`\0
325
+ \f\r "&'<=>\``.split("")],[`\0
326
+ \f\r "&'<=>\``.split(""),`\0
327
+ \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function _J(e,t,n,r){const i=r.schema,o=i.space==="svg"?!1:r.settings.omitOptionalTags;let a=i.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const u=[];let c;i.space==="html"&&e.tagName==="svg"&&(r.schema=Ih);const f=TJ(r,e.properties),h=r.all(i.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=i,h&&(a=!1),(f||!o||!wJ(e,t,n))&&(u.push("<",e.tagName,f?" "+f:""),a&&(i.space==="svg"||r.settings.closeSelfClosing)&&(c=f.charAt(f.length-1),(!r.settings.tightSelfClosing||c==="/"||c&&c!=='"'&&c!=="'")&&u.push(" "),u.push("/")),u.push(">")),u.push(h),!a&&(!o||!nC(e,t,n))&&u.push("</"+e.tagName+">"),u.join("")}function TJ(e,t){const n=[];let r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){const o=AJ(e,i,t[i]);o&&n.push(o)}}for(;++r<n.length;){const o=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&o!=='"'&&o!=="'"&&(n[r]+=" ")}return n.join("")}function AJ(e,t,n){const r=dN(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,o=e.settings.allowDangerousCharacters?0:1;let a=e.quote,u;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!="string"||n===r.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const c=hc(r.attribute,Object.assign({},e.settings.characterReferences,{subset:Em.name[i][o]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?mN:gN)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(u=hc(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Em.unquoted[i][o]}))),u!==n&&(e.settings.quoteSmart&&Yg(n,a)>Yg(n,e.alternative)&&(a=e.alternative),u=a+hc(n,Object.assign({},e.settings.characterReferences,{subset:(a==="'"?Em.single:Em.double)[i][o],attribute:!0}))+a),c+(u&&"="+u))}const DJ=["<","&"];function xN(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:hc(e.value,Object.assign({},r.settings.characterReferences,{subset:DJ}))}function MJ(e,t,n,r){return r.settings.allowDangerousHtml?e.value:xN(e,t,n,r)}function OJ(e,t,n,r){return r.all(e)}const $J=LZ("type",{invalid:PJ,unknown:NJ,handlers:{comment:iJ,doctype:oJ,element:_J,raw:MJ,root:OJ,text:xN}});function PJ(e){throw new Error("Expected node, not `"+e+"`")}function NJ(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const IJ={},jJ={},LJ=[];function FJ(e,t){const n=t||IJ,r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:zJ,all:BJ,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||AZ,characterReferences:n.characterReferences||jJ,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?Ih:hN,quote:r,alternative:i}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function zJ(e,t,n){return $J(e,t,n,this)}function BJ(e){const t=[],n=e&&e.children||LJ;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function Wg(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[i,o]of Object.entries((t==null?void 0:t.colorReplacements)||{}))typeof o=="string"?n[i]=o:i===r&&Object.assign(n,o);return n}function da(e,t){return e&&((t==null?void 0:t[e==null?void 0:e.toLowerCase()])||e)}function UJ(e){return Array.isArray(e)?e:[e]}async function wN(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function rC(e){return!e||["plaintext","txt","text","plain"].includes(e)}function HJ(e){return e==="ansi"||rC(e)}function iC(e){return e==="none"}function GJ(e){return iC(e)}function SN(e,t){var r;if(!t)return e;e.properties||(e.properties={}),(r=e.properties).class||(r.class=[]),typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(/\s+/g);for(const i of n)i&&!e.properties.class.includes(i)&&e.properties.class.push(i);return e}function Py(e,t=!1){var o;if(e.length===0)return[["",0]];const n=e.split(/(\r?\n)/g);let r=0;const i=[];for(let a=0;a<n.length;a+=2){const u=t?n[a]+(n[a+1]||""):n[a];i.push([u,r]),r+=n[a].length,r+=((o=n[a+1])==null?void 0:o.length)||0}return i}function qJ(e){const t=Py(e,!0).map(([i])=>i);function n(i){if(i===e.length)return{line:t.length-1,character:t[t.length-1].length};let o=i,a=0;for(const u of t){if(o<u.length)break;o-=u.length,a++}return{line:a,character:o}}function r(i,o){let a=0;for(let u=0;u<i;u++)a+=t[u].length;return a+=o,a}return{lines:t,indexToPos:n,posToIndex:r}}const oC="light-dark()",VJ=["color","background-color"];function YJ(e,t){let n=0;const r=[];for(const i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function WJ(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((r,i)=>r-i);return n.length?e.map(r=>r.flatMap(i=>{const o=n.filter(a=>i.offset<a&&a<i.offset+i.content.length).map(a=>a-i.offset).sort((a,u)=>a-u);return o.length?YJ(i,o):i})):e}function KJ(e,t,n,r,i="css-vars"){const o={content:e.content,explanation:e.explanation,offset:e.offset},a=t.map(h=>Kg(e.variants[h])),u=new Set(a.flatMap(h=>Object.keys(h))),c={},f=(h,p)=>{const g=p==="color"?"":p==="background-color"?"-bg":`-${p}`;return n+t[h]+(p==="color"?"":g)};return a.forEach((h,p)=>{for(const g of u){const y=h[g]||"inherit";if(p===0&&r&&VJ.includes(g))if(r===oC&&a.length>1){const b=t.findIndex(_=>_==="light"),v=t.findIndex(_=>_==="dark");if(b===-1||v===-1)throw new $n('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const S=a[b][g]||"inherit",x=a[v][g]||"inherit";c[g]=`light-dark(${S}, ${x})`,i==="css-vars"&&(c[f(p,g)]=y)}else c[g]=y;else i==="css-vars"&&(c[f(p,g)]=y)}}),o.htmlStyle=c,o}function Kg(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&Xn.Italic&&(t["font-style"]="italic"),e.fontStyle&Xn.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&Xn.Underline&&n.push("underline"),e.fontStyle&Xn.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function uw(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}const CN=new WeakMap;function Ny(e,t){CN.set(e,t)}function th(e){return CN.get(e)}class uf{constructor(...t){te(this,"_stacks",{});te(this,"lang");if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,i]=t;this.lang=r,this._stacks={[i]:n}}}get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new uf(Object.fromEntries(UJ(n).map(r=>[r,iw])),t)}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return XJ(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function XJ(e){const t=[],n=new Set;function r(i){var a;if(n.has(i))return;n.add(i);const o=(a=i==null?void 0:i.nameScopesList)==null?void 0:a.scopeName;o&&t.push(o),i.parent&&r(i.parent)}return r(e),t}function QJ(e,t){if(!(e instanceof uf))throw new $n("Invalid grammar state");return e.getInternalStack(t)}function ZJ(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let r=function(a){if(typeof a=="number"){if(a<0||a>n.source.length)throw new $n(`Invalid decoration offset: ${a}. Code length: ${n.source.length}`);return{...i.indexToPos(a),offset:a}}else{const u=i.lines[a.line];if(u===void 0)throw new $n(`Invalid decoration position ${JSON.stringify(a)}. Lines length: ${i.lines.length}`);let c=a.character;if(c<0&&(c=u.length+c),c<0||c>u.length)throw new $n(`Invalid decoration position ${JSON.stringify(a)}. Line ${a.line} length: ${u.length}`);return{...a,character:c,offset:i.posToIndex(a.line,c)}}};const i=qJ(n.source),o=(n.options.decorations||[]).map(a=>({...a,start:r(a.start),end:r(a.end)}));JJ(o),e.set(n.meta,{decorations:o,converter:i,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){var a;if(!((a=this.options.decorations)!=null&&a.length))return;const i=t(this).decorations.flatMap(u=>[u.start.offset,u.end.offset]);return WJ(n,i)},code(n){var h;if(!((h=this.options.decorations)!=null&&h.length))return;const r=t(this),i=Array.from(n.children).filter(p=>p.type==="element"&&p.tagName==="span");if(i.length!==r.converter.lines.length)throw new $n(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function o(p,g,y,b){const v=i[p];let S="",x=-1,_=-1;if(g===0&&(x=0),y===0&&(_=0),y===Number.POSITIVE_INFINITY&&(_=v.children.length),x===-1||_===-1)for(let T=0;T<v.children.length;T++)S+=EN(v.children[T]),x===-1&&S.length===g&&(x=T+1),_===-1&&S.length===y&&(_=T+1);if(x===-1)throw new $n(`Failed to find start index for decoration ${JSON.stringify(b.start)}`);if(_===-1)throw new $n(`Failed to find end index for decoration ${JSON.stringify(b.end)}`);const R=v.children.slice(x,_);if(!b.alwaysWrap&&R.length===v.children.length)u(v,b,"line");else if(!b.alwaysWrap&&R.length===1&&R[0].type==="element")u(R[0],b,"token");else{const T={type:"element",tagName:"span",properties:{},children:R};u(T,b,"wrapper"),v.children.splice(x,R.length,T)}}function a(p,g){i[p]=u(i[p],g,"line")}function u(p,g,y){var S;const b=g.properties||{},v=g.transform||(x=>x);return p.tagName=g.tagName||"span",p.properties={...p.properties,...b,class:p.properties.class},(S=g.properties)!=null&&S.class&&SN(p,g.properties.class),p=v(p,y)||p,p}const c=[],f=r.decorations.sort((p,g)=>g.start.offset-p.start.offset||p.end.offset-g.end.offset);for(const p of f){const{start:g,end:y}=p;if(g.line===y.line)o(g.line,g.character,y.character,p);else if(g.line<y.line){o(g.line,g.character,Number.POSITIVE_INFINITY,p);for(let b=g.line+1;b<y.line;b++)c.unshift(()=>a(b,p));o(y.line,0,y.character,p)}}c.forEach(p=>p())}}}function JJ(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new $n(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){const i=e[r],o=n.start.offset<=i.start.offset&&i.start.offset<n.end.offset,a=n.start.offset<i.end.offset&&i.end.offset<=n.end.offset,u=i.start.offset<=n.start.offset&&n.start.offset<i.end.offset,c=i.start.offset<n.end.offset&&n.end.offset<=i.end.offset;if(o||a||u||c){if(o&&a||u&&c||u&&n.start.offset===n.end.offset||a&&i.start.offset===i.end.offset)continue;throw new $n(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(i.start)} intersect.`)}}}}function EN(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(EN).join(""):""}const eee=[ZJ()];function Xg(e){const t=tee(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...eee]}function tee(e){const t=[],n=[],r=[];for(const i of e)switch(i.enforce){case"pre":t.push(i);break;case"post":n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var ml=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],h1={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function nee(e,t){const n=e.indexOf("\x1B",t);if(n!==-1&&e[n+1]==="["){const r=e.indexOf("m",n);if(r!==-1)return{sequence:e.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:e.length}}function UA(e){const t=e.shift();if(t==="2"){const n=e.splice(0,3).map(r=>Number.parseInt(r));return n.length!==3||n.some(r=>Number.isNaN(r))?void 0:{type:"rgb",rgb:n}}else if(t==="5"){const n=e.shift();if(n)return{type:"table",index:Number(n)}}}function ree(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:"resetAll"});else if(r<=9)h1[r]&&t.push({type:"setDecoration",value:h1[r]});else if(r<=29){const i=h1[r-20];i&&(t.push({type:"resetDecoration",value:i}),i==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:ml[r-30]}});else if(r===38){const i=UA(e);i&&t.push({type:"setForegroundColor",value:i})}else if(r===39)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:ml[r-40]}});else if(r===48){const i=UA(e);i&&t.push({type:"setBackgroundColor",value:i})}else r===49?t.push({type:"resetBackgroundColor"}):r===53?t.push({type:"setDecoration",value:"overline"}):r===55?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:ml[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:ml[r-100+8]}})}return t}function iee(){let e=null,t=null,n=new Set;return{parse(r){const i=[];let o=0;do{const a=nee(r,o),u=a.sequence?r.substring(o,a.startPosition):r.substring(o);if(u.length>0&&i.push({value:u,foreground:e,background:t,decorations:new Set(n)}),a.sequence){const c=ree(a.sequence);for(const f of c)f.type==="resetAll"?(e=null,t=null,n.clear()):f.type==="resetForegroundColor"?e=null:f.type==="resetBackgroundColor"?t=null:f.type==="resetDecoration"&&n.delete(f.value);for(const f of c)f.type==="setForegroundColor"?e=f.value:f.type==="setBackgroundColor"?t=f.value:f.type==="setDecoration"&&n.add(f.value)}o=a.position}while(o<r.length);return i}}}var oee={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function see(e=oee){function t(u){return e[u]}function n(u){return`#${u.map(c=>Math.max(0,Math.min(c,255)).toString(16).padStart(2,"0")).join("")}`}let r;function i(){if(r)return r;r=[];for(let f=0;f<ml.length;f++)r.push(t(ml[f]));let u=[0,95,135,175,215,255];for(let f=0;f<6;f++)for(let h=0;h<6;h++)for(let p=0;p<6;p++)r.push(n([u[f],u[h],u[p]]));let c=8;for(let f=0;f<24;f++,c+=10)r.push(n([c,c,c]));return r}function o(u){return i()[u]}function a(u){switch(u.type){case"named":return t(u.name);case"rgb":return n(u.rgb);case"table":return o(u.index)}}return{value:a}}const aee={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function lee(e,t,n){const r=Wg(e,n),i=Py(t),o=Object.fromEntries(ml.map(c=>{var p;const f=`terminal.ansi${c[0].toUpperCase()}${c.substring(1)}`,h=(p=e.colors)==null?void 0:p[f];return[c,h||aee[c]]})),a=see(o),u=iee();return i.map(c=>u.parse(c[0]).map(f=>{let h,p;f.decorations.has("reverse")?(h=f.background?a.value(f.background):e.bg,p=f.foreground?a.value(f.foreground):e.fg):(h=f.foreground?a.value(f.foreground):e.fg,p=f.background?a.value(f.background):void 0),h=da(h,r),p=da(p,r),f.decorations.has("dim")&&(h=uee(h));let g=Xn.None;return f.decorations.has("bold")&&(g|=Xn.Bold),f.decorations.has("italic")&&(g|=Xn.Italic),f.decorations.has("underline")&&(g|=Xn.Underline),f.decorations.has("strikethrough")&&(g|=Xn.Strikethrough),{content:f.value,offset:c[1],color:h,bgColor:p,fontStyle:g}}))}function uee(e){const t=e.match(/#([0-9a-f]{3,8})/i);if(t){const r=t[1];if(r.length===8){const i=Math.round(Number.parseInt(r.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${r.slice(0,6)}${i}`}else{if(r.length===6)return`#${r}80`;if(r.length===4){const i=r[0],o=r[1],a=r[2],u=r[3],c=Math.round(Number.parseInt(`${u}${u}`,16)/2).toString(16).padStart(2,"0");return`#${i}${i}${o}${o}${a}${a}${c}`}else if(r.length===3){const i=r[0],o=r[1],a=r[2];return`#${i}${i}${o}${o}${a}${a}80`}}}const n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function sC(e,t,n={}){const{theme:r=e.getLoadedThemes()[0]}=n,i=e.resolveLangAlias(n.lang||"text");if(rC(i)||iC(r))return Py(t).map(c=>[{content:c[0],offset:c[1]}]);const{theme:o,colorMap:a}=e.setTheme(r);if(i==="ansi")return lee(o,t,n);const u=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==u.name)throw new $n(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${u.name}"`);if(!n.grammarState.themes.includes(o.name))throw new $n(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${o.name}"`)}return fee(t,u,o,a,n)}function cee(...e){if(e.length===2)return th(e[1]);const[t,n,r={}]=e,{lang:i="text",theme:o=t.getLoadedThemes()[0]}=r;if(rC(i)||iC(o))throw new $n("Plain language does not have grammar state");if(i==="ansi")throw new $n("ANSI language does not have grammar state");const{theme:a,colorMap:u}=t.setTheme(o),c=t.getLanguage(i);return new uf(aC(n,c,a,u,r).stateStack,c.name,a.name)}function fee(e,t,n,r,i){const o=aC(e,t,n,r,i),a=new uf(o.stateStack,t.name,n.name);return Ny(o.tokens,a),o.tokens}function aC(e,t,n,r,i){const o=Wg(n,i),{tokenizeMaxLineLength:a=0,tokenizeTimeLimit:u=500}=i,c=Py(e);let f=i.grammarState?QJ(i.grammarState,n.name)??iw:i.grammarContextCode!=null?aC(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:iw,h=[];const p=[];for(let g=0,y=c.length;g<y;g++){const[b,v]=c[g];if(b===""){h=[],p.push([]);continue}if(a>0&&b.length>=a){h=[],p.push([{content:b,offset:v,color:"",fontStyle:0}]);continue}let S,x,_;i.includeExplanation&&(S=t.tokenizeLine(b,f,u),x=S.tokens,_=0);const R=t.tokenizeLine2(b,f,u),T=R.tokens.length/2;for(let A=0;A<T;A++){const D=R.tokens[2*A],O=A+1<T?R.tokens[2*A+2]:b.length;if(D===O)continue;const $=R.tokens[2*A+1],z=da(r[Lc.getForeground($)],o),j=Lc.getFontStyle($),I={content:b.substring(D,O),offset:v+D,color:z,fontStyle:j};if(i.includeExplanation){const M=[];if(i.includeExplanation!=="scopeName")for(const G of n.settings){let L;switch(typeof G.scope){case"string":L=G.scope.split(/,/).map(F=>F.trim());break;case"object":L=G.scope;break;default:continue}M.push({settings:G,selectors:L.map(F=>F.split(/ /))})}I.explanation=[];let B=0;for(;D+B<O;){const G=x[_],L=b.substring(G.startIndex,G.endIndex);B+=L.length,I.explanation.push({content:L,scopes:i.includeExplanation==="scopeName"?dee(G.scopes):hee(M,G.scopes)}),_+=1}}h.push(I)}p.push(h),h=[],f=R.ruleStack}return{tokens:p,stateStack:f}}function dee(e){return e.map(t=>({scopeName:t}))}function hee(e,t){const n=[];for(let r=0,i=t.length;r<i;r++){const o=t[r];n[r]={scopeName:o,themeMatches:mee(e,o,t.slice(0,r))}}return n}function HA(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function pee(e,t,n){if(!HA(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)HA(e[r],n[i])&&(r-=1),i-=1;return r===-1}function mee(e,t,n){const r=[];for(const{selectors:i,settings:o}of e)for(const a of i)if(pee(a,t,n)){r.push(o);break}return r}function kN(e,t,n){const r=Object.entries(n.themes).filter(c=>c[1]).map(c=>({color:c[0],theme:c[1]})),i=r.map(c=>{const f=sC(e,t,{...n,theme:c.theme}),h=th(f),p=typeof c.theme=="string"?c.theme:c.theme.name;return{tokens:f,state:h,theme:p}}),o=gee(...i.map(c=>c.tokens)),a=o[0].map((c,f)=>c.map((h,p)=>{const g={content:h.content,variants:{},offset:h.offset};return"includeExplanation"in n&&n.includeExplanation&&(g.explanation=h.explanation),o.forEach((y,b)=>{const{content:v,explanation:S,offset:x,..._}=y[f][p];g.variants[r[b].color]=_}),g})),u=i[0].state?new uf(Object.fromEntries(i.map(c=>{var f;return[c.theme,(f=c.state)==null?void 0:f.getInternalStack(c.theme)]})),i[0].state.lang):void 0;return u&&Ny(a,u),a}function gee(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const i=e.map(c=>c[r]),o=t.map(()=>[]);t.forEach((c,f)=>c.push(o[f]));const a=i.map(()=>0),u=i.map(c=>c[0]);for(;u.every(c=>c);){const c=Math.min(...u.map(f=>f.content.length));for(let f=0;f<n;f++){const h=u[f];h.content.length===c?(o[f].push(h),a[f]+=1,u[f]=i[f][a[f]]):(o[f].push({...h,content:h.content.slice(0,c)}),u[f]={...h,content:h.content.slice(c),offset:h.offset+c})}}}return t}function Qg(e,t,n){let r,i,o,a,u,c;if("themes"in n){const{defaultColor:f="light",cssVariablePrefix:h="--shiki-",colorsRendering:p="css-vars"}=n,g=Object.entries(n.themes).filter(x=>x[1]).map(x=>({color:x[0],theme:x[1]})).sort((x,_)=>x.color===f?-1:_.color===f?1:0);if(g.length===0)throw new $n("`themes` option must not be empty");const y=kN(e,t,n);if(c=th(y),f&&oC!==f&&!g.find(x=>x.color===f))throw new $n(`\`themes\` option must contain the defaultColor key \`${f}\``);const b=g.map(x=>e.getTheme(x.theme)),v=g.map(x=>x.color);o=y.map(x=>x.map(_=>KJ(_,v,h,f,p))),c&&Ny(o,c);const S=g.map(x=>Wg(x.theme,n));i=GA(g,b,S,h,f,"fg",p),r=GA(g,b,S,h,f,"bg",p),a=`shiki-themes ${b.map(x=>x.name).join(" ")}`,u=f?void 0:[i,r].join(";")}else if("theme"in n){const f=Wg(n.theme,n);o=sC(e,t,n);const h=e.getTheme(n.theme);r=da(h.bg,f),i=da(h.fg,f),a=h.name,c=th(o)}else throw new $n("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:i,bg:r,themeName:a,rootStyle:u,grammarState:c}}function GA(e,t,n,r,i,o,a){return e.map((u,c)=>{const f=da(t[c][o],n[c])||"inherit",h=`${r+u.color}${o==="bg"?"-bg":""}:${f}`;if(c===0&&i){if(i===oC&&e.length>1){const p=e.findIndex(v=>v.color==="light"),g=e.findIndex(v=>v.color==="dark");if(p===-1||g===-1)throw new $n('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const y=da(t[p][o],n[p])||"inherit",b=da(t[g][o],n[g])||"inherit";return`light-dark(${y}, ${b});${h}`}return f}return a==="css-vars"?h:null}).filter(u=>!!u).join(";")}function Zg(e,t,n,r={meta:{},options:n,codeToHast:(i,o)=>Zg(e,i,o),codeToTokens:(i,o)=>Qg(e,i,o)}){var b,v;let i=t;for(const S of Xg(n))i=((b=S.preprocess)==null?void 0:b.call(r,i,n))||i;let{tokens:o,fg:a,bg:u,themeName:c,rootStyle:f,grammarState:h}=Qg(e,i,n);const{mergeWhitespaces:p=!0,mergeSameStyleTokens:g=!1}=n;p===!0?o=bee(o):p==="never"&&(o=vee(o)),g&&(o=xee(o));const y={...r,get source(){return i}};for(const S of Xg(n))o=((v=S.tokens)==null?void 0:v.call(y,o))||o;return yee(o,{...n,fg:a,bg:u,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??f},y,h)}function yee(e,t,n,r=th(e)){var v,S,x,_;const i=Xg(t),o=[],a={type:"root",children:[]},{structure:u="classic",tabindex:c="0"}=t,f={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?f.style=t.rootStyle:f.style=`background-color:${t.bg};color:${t.fg}`),c!==!1&&c!=null&&(f.tabindex=c.toString());for(const[R,T]of Object.entries(t.meta||{}))R.startsWith("_")||(f[R]=T);let h={type:"element",tagName:"pre",properties:f,children:[],data:t.data},p={type:"element",tagName:"code",properties:{},children:o};const g=[],y={...n,structure:u,addClassToHast:SN,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return a},get pre(){return h},get code(){return p},get lines(){return g}};if(e.forEach((R,T)=>{var O,$;T&&(u==="inline"?a.children.push({type:"element",tagName:"br",properties:{},children:[]}):u==="classic"&&o.push({type:"text",value:`
328
+ `}));let A={type:"element",tagName:"span",properties:{class:"line"},children:[]},D=0;for(const z of R){let j={type:"element",tagName:"span",properties:{...z.htmlAttrs},children:[{type:"text",value:z.content}]};const I=uw(z.htmlStyle||Kg(z));I&&(j.properties.style=I);for(const M of i)j=((O=M==null?void 0:M.span)==null?void 0:O.call(y,j,T+1,D,A,z))||j;u==="inline"?a.children.push(j):u==="classic"&&A.children.push(j),D+=z.content.length}if(u==="classic"){for(const z of i)A=(($=z==null?void 0:z.line)==null?void 0:$.call(y,A,T+1))||A;g.push(A),o.push(A)}else u==="inline"&&g.push(A)}),u==="classic"){for(const R of i)p=((v=R==null?void 0:R.code)==null?void 0:v.call(y,p))||p;h.children.push(p);for(const R of i)h=((S=R==null?void 0:R.pre)==null?void 0:S.call(y,h))||h;a.children.push(h)}else if(u==="inline"){const R=[];let T={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const O of a.children)O.type==="element"&&O.tagName==="br"?(R.push(T),T={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(O.type==="element"||O.type==="text")&&T.children.push(O);R.push(T);let D={type:"element",tagName:"code",properties:{},children:R};for(const O of i)D=((x=O==null?void 0:O.code)==null?void 0:x.call(y,D))||D;a.children=[];for(let O=0;O<D.children.length;O++){O>0&&a.children.push({type:"element",tagName:"br",properties:{},children:[]});const $=D.children[O];$.type==="element"&&a.children.push(...$.children)}}let b=a;for(const R of i)b=((_=R==null?void 0:R.root)==null?void 0:_.call(y,b))||b;return r&&Ny(b,r),b}function bee(e){return e.map(t=>{const n=[];let r="",i;return t.forEach((o,a)=>{const c=!(o.fontStyle&&(o.fontStyle&Xn.Underline||o.fontStyle&Xn.Strikethrough));c&&o.content.match(/^\s+$/)&&t[a+1]?(i===void 0&&(i=o.offset),r+=o.content):r?(c?n.push({...o,offset:i,content:r+o.content}):n.push({content:r,offset:i},o),i=void 0,r=""):n.push(o)}),n})}function vee(e){return e.map(t=>t.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const r=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!r)return n;const[,i,o,a]=r;if(!i&&!a)return n;const u=[{...n,offset:n.offset+i.length,content:o}];return i&&u.unshift({content:i,offset:n.offset}),a&&u.push({content:a,offset:n.offset+i.length+o.length}),u}))}function xee(e){return e.map(t=>{const n=[];for(const r of t){if(n.length===0){n.push({...r});continue}const i=n[n.length-1],o=uw(i.htmlStyle||Kg(i)),a=uw(r.htmlStyle||Kg(r)),u=i.fontStyle&&(i.fontStyle&Xn.Underline||i.fontStyle&Xn.Strikethrough),c=r.fontStyle&&(r.fontStyle&Xn.Underline||r.fontStyle&Xn.Strikethrough);!u&&!c&&o===a?i.content+=r.content:n.push({...r})}return n})}const wee=FJ;function See(e,t,n){var o;const r={meta:{},options:n,codeToHast:(a,u)=>Zg(e,a,u),codeToTokens:(a,u)=>Qg(e,a,u)};let i=wee(Zg(e,t,n,r));for(const a of Xg(n))i=((o=a.postprocess)==null?void 0:o.call(r,i,n))||i;return i}const qA={light:"#333333",dark:"#bbbbbb"},VA={light:"#fffffe",dark:"#1e1e1e"},YA="__shiki_resolved";function lC(e){var u,c,f,h,p;if(e!=null&&e[YA])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||(t.type="dark"),t.colorReplacements={...t.colorReplacements},t.settings||(t.settings=[]);let{bg:n,fg:r}=t;if(!n||!r){const g=t.settings?t.settings.find(y=>!y.name&&!y.scope):void 0;(u=g==null?void 0:g.settings)!=null&&u.foreground&&(r=g.settings.foreground),(c=g==null?void 0:g.settings)!=null&&c.background&&(n=g.settings.background),!r&&((f=t==null?void 0:t.colors)!=null&&f["editor.foreground"])&&(r=t.colors["editor.foreground"]),!n&&((h=t==null?void 0:t.colors)!=null&&h["editor.background"])&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?qA.light:qA.dark),n||(n=t.type==="light"?VA.light:VA.dark),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0;const o=new Map;function a(g){var b;if(o.has(g))return o.get(g);i+=1;const y=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return(b=t.colorReplacements)!=null&&b[`#${y}`]?a(g):(o.set(g,y),y)}t.settings=t.settings.map(g=>{var S,x;const y=((S=g.settings)==null?void 0:S.foreground)&&!g.settings.foreground.startsWith("#"),b=((x=g.settings)==null?void 0:x.background)&&!g.settings.background.startsWith("#");if(!y&&!b)return g;const v={...g,settings:{...g.settings}};if(y){const _=a(g.settings.foreground);t.colorReplacements[_]=g.settings.foreground,v.settings.foreground=_}if(b){const _=a(g.settings.background);t.colorReplacements[_]=g.settings.background,v.settings.background=_}return v});for(const g of Object.keys(t.colors||{}))if((g==="editor.foreground"||g==="editor.background"||g.startsWith("terminal.ansi"))&&!((p=t.colors[g])!=null&&p.startsWith("#"))){const y=a(t.colors[g]);t.colorReplacements[y]=t.colors[g],t.colors[g]=y}return Object.defineProperty(t,YA,{enumerable:!1,writable:!1,value:!0}),t}async function RN(e){return Array.from(new Set((await Promise.all(e.filter(t=>!HJ(t)).map(async t=>await wN(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function _N(e){return(await Promise.all(e.map(async n=>GJ(n)?null:lC(await wN(n))))).filter(n=>!!n)}let Cee=3;function Eee(e,t=3){t>Cee||console.trace(`[SHIKI DEPRECATE]: ${e}`)}class ic extends Error{constructor(t){super(t),this.name="ShikiError"}}function TN(e,t){if(!t)return e;if(t[e]){const n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new ic(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}class kee extends TZ{constructor(n,r,i,o={}){super(n);te(this,"_resolvedThemes",new Map);te(this,"_resolvedGrammars",new Map);te(this,"_langMap",new Map);te(this,"_langGraph",new Map);te(this,"_textmateThemeCache",new WeakMap);te(this,"_loadedThemesCache",null);te(this,"_loadedLanguagesCache",null);this._resolver=n,this._themes=r,this._langs=i,this._alias=o,this._themes.map(a=>this.loadTheme(a)),this.loadLanguages(this._langs)}getTheme(n){return typeof n=="string"?this._resolvedThemes.get(n):this.loadTheme(n)}loadTheme(n){const r=lC(n);return r.name&&(this._resolvedThemes.set(r.name,r),this._loadedThemesCache=null),r}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(n){let r=this._textmateThemeCache.get(n);r||(r=Ug.createFromRawTheme(n),this._textmateThemeCache.set(n,r)),this._syncRegistry.setTheme(r)}getGrammar(n){return n=TN(n,this._alias),this._resolvedGrammars.get(n)}loadLanguage(n){var a,u,c,f;if(this.getGrammar(n.name))return;const r=new Set([...this._langMap.values()].filter(h=>{var p;return(p=h.embeddedLangsLazy)==null?void 0:p.includes(n.name)}));this._resolver.addLanguage(n);const i={balancedBracketSelectors:n.balancedBracketSelectors||["*"],unbalancedBracketSelectors:n.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(n.scopeName,n);const o=this.loadGrammarWithConfiguration(n.scopeName,1,i);if(o.name=n.name,this._resolvedGrammars.set(n.name,o),n.aliases&&n.aliases.forEach(h=>{this._alias[h]=n.name}),this._loadedLanguagesCache=null,r.size)for(const h of r)this._resolvedGrammars.delete(h.name),this._loadedLanguagesCache=null,(u=(a=this._syncRegistry)==null?void 0:a._injectionGrammars)==null||u.delete(h.scopeName),(f=(c=this._syncRegistry)==null?void 0:c._grammars)==null||f.delete(h.scopeName),this.loadLanguage(this._langMap.get(h.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(n){for(const o of n)this.resolveEmbeddedLanguages(o);const r=Array.from(this._langGraph.entries()),i=r.filter(([o,a])=>!a);if(i.length){const o=r.filter(([a,u])=>{if(!u)return!1;const c=u.embeddedLanguages||u.embeddedLangs;return c==null?void 0:c.some(f=>i.map(([h])=>h).includes(f))}).filter(a=>!i.includes(a));throw new ic(`Missing languages ${i.map(([a])=>`\`${a}\``).join(", ")}, required by ${o.map(([a])=>`\`${a}\``).join(", ")}`)}for(const[o,a]of r)this._resolver.addLanguage(a);for(const[o,a]of r)this.loadLanguage(a)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(n){this._langMap.set(n.name,n),this._langGraph.set(n.name,n);const r=n.embeddedLanguages??n.embeddedLangs;if(r)for(const i of r)this._langGraph.set(i,this._langMap.get(i))}}class Ree{constructor(t,n){te(this,"_langs",new Map);te(this,"_scopeToLang",new Map);te(this,"_injections",new Map);te(this,"_onigLib");this._onigLib={createOnigScanner:r=>t.createScanner(r),createOnigString:r=>t.createString(r)},n.forEach(r=>this.addLanguage(r))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(n=>{this._langs.set(n,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(t.scopeName)})}getInjections(t){const n=t.split(".");let r=[];for(let i=1;i<=n.length;i++){const o=n.slice(0,i).join(".");r=[...r,...this._injections.get(o)||[]]}return r}}let yd=0;function _ee(e){yd+=1,e.warnings!==!1&&yd>=10&&yd%10===0&&console.warn(`[Shiki] ${yd} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new ic("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(lC),i=new Ree(e.engine,n),o=new kee(i,r,n,e.langAlias);let a;function u(R){return TN(R,e.langAlias)}function c(R){x();const T=o.getGrammar(typeof R=="string"?R:R.name);if(!T)throw new ic(`Language \`${R}\` not found, you may need to load it first`);return T}function f(R){if(R==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};x();const T=o.getTheme(R);if(!T)throw new ic(`Theme \`${R}\` not found, you may need to load it first`);return T}function h(R){x();const T=f(R);a!==R&&(o.setTheme(T),a=R);const A=o.getColorMap();return{theme:T,colorMap:A}}function p(){return x(),o.getLoadedThemes()}function g(){return x(),o.getLoadedLanguages()}function y(...R){x(),o.loadLanguages(R.flat(1))}async function b(...R){return y(await RN(R))}function v(...R){x();for(const T of R.flat(1))o.loadTheme(T)}async function S(...R){return x(),v(await _N(R))}function x(){if(t)throw new ic("Shiki instance has been disposed")}function _(){t||(t=!0,o.dispose(),yd-=1)}return{setTheme:h,getTheme:f,getLanguage:c,getLoadedThemes:p,getLoadedLanguages:g,resolveLangAlias:u,loadLanguage:b,loadLanguageSync:y,loadTheme:S,loadThemeSync:v,dispose:_,[Symbol.dispose]:_}}async function Tee(e){e.engine||Eee("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([_N(e.themes||[]),RN(e.langs||[]),e.engine]);return _ee({...e,themes:t,langs:n,engine:r})}async function Aee(e){const t=await Tee(e);return{getLastGrammarState:(...n)=>cee(t,...n),codeToTokensBase:(n,r)=>sC(t,n,r),codeToTokensWithThemes:(n,r)=>kN(t,n,r),codeToTokens:(n,r)=>Qg(t,n,r),codeToHast:(n,r)=>Zg(t,n,r),codeToHtml:(n,r)=>See(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function cf(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function Dee(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}const uC=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),Pn=String.raw;function ff(e,t){if(e==null)throw new Error(t??"Value expected");return e}const AN=Pn`\[\^?`,DN=`c.? | C(?:-.?)?|${Pn`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${Pn`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${Pn`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${Pn`o\{[^\}]*\}?`}|${Pn`\d{1,3}`}`,cC=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,km=new RegExp(Pn`
329
+ \\ (?:
330
+ ${DN}
331
+ | [gk]<[^>]*>?
332
+ | [gk]'[^']*'?
333
+ | .
334
+ )
335
+ | \( (?:
336
+ \? (?:
337
+ [:=!>({]
338
+ | <[=!]
339
+ | <[^>]*>
340
+ | '[^']*'
341
+ | ~\|?
342
+ | #(?:[^)\\]|\\.?)*
343
+ | [^:)]*[:)]
344
+ )?
345
+ | \*[^\)]*\)?
346
+ )?
347
+ | (?:${cC.source})+
348
+ | ${AN}
349
+ | .
350
+ `.replace(/\s+/g,""),"gsu"),p1=new RegExp(Pn`
351
+ \\ (?:
352
+ ${DN}
353
+ | .
354
+ )
355
+ | \[:(?:\^?\p{Alpha}+|\^):\]
356
+ | ${AN}
357
+ | &&
358
+ | .
359
+ `.replace(/\s+/g,""),"gsu");function Mee(e,t={}){const n={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const r=Xee(n.flags),i=[r.extended],o={captureGroup:n.rules.captureGroup,getCurrentModX(){return i.at(-1)},numOpenGroups:0,popModX(){i.pop()},pushModX(p){i.push(p)},replaceCurrentModX(p){i[i.length-1]=p},singleline:n.rules.singleline};let a=[],u;for(km.lastIndex=0;u=km.exec(e);){const p=Oee(o,e,u[0],km.lastIndex);p.tokens?a.push(...p.tokens):p.token&&a.push(p.token),p.lastIndex!==void 0&&(km.lastIndex=p.lastIndex)}const c=[];let f=0;a.filter(p=>p.type==="GroupOpen").forEach(p=>{p.kind==="capturing"?p.number=++f:p.raw==="("&&c.push(p)}),f||c.forEach((p,g)=>{p.kind="capturing",p.number=g+1});const h=f||c.length;return{tokens:a.map(p=>p.type==="EscapedNumber"?Zee(p,h):p).flat(),flags:r}}function Oee(e,t,n,r){const[i,o]=n;if(n==="["||n==="[^"){const a=$ee(t,n,r);return{tokens:a.tokens,lastIndex:a.lastIndex}}if(i==="\\"){if("AbBGyYzZ".includes(o))return{token:WA(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:Hee(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:ON(n)}}if(o==="K")return{token:$N("keep",n)};if(o==="N"||o==="R")return{token:gl("newline",n,{negate:o==="N"})};if(o==="O")return{token:gl("any",n)};if(o==="X")return{token:gl("text_segment",n)};const a=MN(n,{inCharClass:!1});return Array.isArray(a)?{tokens:a}:{token:a}}if(i==="("){if(o==="*")return{token:Yee(n)};if(n==="(?{")throw new Error(`Unsupported callout "${n}"`);if(n.startsWith("(?#")){if(t[r]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:Vee(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n==="("&&!e.captureGroup||n==="(?:")return{token:ec("group",n)};if(n==="(?>")return{token:ec("atomic",n)};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?<!")return{token:ec(n[2]==="<"?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if(n==="("&&e.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:ec("capturing",n,{...n!=="("&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if(n==="(?~|")throw new Error(`Unsupported absence function kind "${n}"`);return{token:ec("absence_repeater",n)}}throw n==="(?("?new Error(`Unsupported conditional "${n}"`):new Error(`Invalid or unsupported group option "${n}"`)}if(n===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:zee(n)}}if(e.getCurrentModX()){if(n==="#"){const a=t.indexOf(`
360
+ `,r);return{lastIndex:a===-1?t.length:a}}if(/^\s$/.test(n)){const a=/\s+/y;return a.lastIndex=r,{lastIndex:a.exec(t)?a.lastIndex:r}}}if(n===".")return{token:gl("dot",n)};if(n==="^"||n==="$"){const a=e.singleline?{"^":Pn`\A`,$:Pn`\Z`}[n]:n;return{token:WA(a,n)}}return n==="|"?{token:Nee(n)}:cC.test(n)?{tokens:Jee(n)}:{token:Yo(cf(n),n)}}function $ee(e,t,n){const r=[KA(t[1]==="^",t)];let i=1,o;for(p1.lastIndex=n;o=p1.exec(e);){const a=o[0];if(a[0]==="["&&a[1]!==":")i++,r.push(KA(a[1]==="^",a));else if(a==="]"){if(r.at(-1).type==="CharacterClassOpen")r.push(Yo(93,a));else if(i--,r.push(Iee(a)),!i)break}else{const u=Pee(a);Array.isArray(u)?r.push(...u):r.push(u)}}return{tokens:r,lastIndex:p1.lastIndex||e.length}}function Pee(e){if(e[0]==="\\")return MN(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!uC.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return gl("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?jee(e):e==="&&"?Lee(e):Yo(cf(e),e)}function MN(e,{inCharClass:t}){const n=e[1];if(n==="c"||n==="C")return qee(e);if("dDhHsSwW".includes(n))return Wee(e);if(e.startsWith(Pn`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return Kee(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const r=e.split(/\\x/).slice(1).map(a=>parseInt(a,16)),i=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(r)),o=new TextEncoder;return[...i].map(a=>{const u=[...o.encode(a)].map(c=>`\\x${c.toString(16)}`).join("");return Yo(cf(a),u)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return Yo(Qee(e),e);if(XA.has(n))return Yo(XA.get(n),e);if(/\d/.test(n))return Fee(t,e);if(e==="\\")throw new Error(Pn`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return Yo(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function Nee(e){return{type:"Alternator",raw:e}}function WA(e,t){return{type:"Assertion",kind:e,raw:t}}function ON(e){return{type:"Backreference",raw:e}}function Yo(e,t){return{type:"Character",value:e,raw:t}}function Iee(e){return{type:"CharacterClassClose",raw:e}}function jee(e){return{type:"CharacterClassHyphen",raw:e}}function Lee(e){return{type:"CharacterClassIntersector",raw:e}}function KA(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function gl(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function $N(e,t,n={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:ff(n.flags),raw:t}}function Fee(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function zee(e){return{type:"GroupClose",raw:e}}function ec(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}function Bee(e,t,n,r){return{type:"NamedCallout",kind:e,tag:t,arguments:n,raw:r}}function Uee(e,t,n,r){return{type:"Quantifier",kind:e,min:t,max:n,raw:r}}function Hee(e){return{type:"Subroutine",raw:e}}const Gee=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),XA=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function qee(e){const t=e[1]==="c"?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw new Error(`Unsupported control character "${e}"`);return Yo(cf(t.toUpperCase())-64,e)}function Vee(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??(r="");const i=(t.getCurrentModX()||n.includes("x"))&&!r.includes("x"),o=ZA(n),a=ZA(r),u={};if(o&&(u.enable=o),a&&(u.disable=a),e.endsWith(")"))return t.replaceCurrentModX(i),$N("flags",e,{flags:u});if(e.endsWith(":"))return t.pushModX(i),t.numOpenGroups++,ec("group",e,{...(o||a)&&{flags:u}});throw new Error(`Unexpected flag modifier "${e}"`)}function Yee(e){const t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:n,tag:r,args:i}=t.groups;if(!n)throw new Error(`Invalid named callout "${e}"`);if(r==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const o=i?i.split(",").filter(h=>h!=="").map(h=>/^[+-]?\d+$/.test(h)?+h:h):[],[a,u,c]=o,f=Gee.has(n)?n.toLowerCase():"custom";switch(f){case"fail":case"mismatch":case"skip":if(o.length>0)throw new Error(`Named callout arguments not allowed "${o}"`);break;case"error":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(typeof a=="string")throw new Error(`Named callout argument must be a number "${a}"`);break;case"max":if(!o.length||o.length>2)throw new Error(`Named callout must have one or two arguments "${o}"`);if(typeof a=="string"&&!/^[A-Za-z_]\w*$/.test(a))throw new Error(`Named callout argument one must be a tag or number "${a}"`);if(o.length===2&&(typeof u=="number"||!/^[<>X]$/.test(u)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${u}"`);break;case"count":case"total_count":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(o.length===1&&(typeof a=="number"||!/^[<>X]$/.test(a)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${a}"`);break;case"cmp":if(o.length!==3)throw new Error(`Named callout must have three arguments "${o}"`);if(typeof a=="string"&&!/^[A-Za-z_]\w*$/.test(a))throw new Error(`Named callout argument one must be a tag or number "${a}"`);if(typeof u=="number"||!/^(?:[<>!=]=|[<>])$/.test(u))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${u}"`);if(typeof c=="string"&&!/^[A-Za-z_]\w*$/.test(c))throw new Error(`Named callout argument three must be a tag or number "${c}"`);break;case"custom":throw new Error(`Undefined callout name "${n}"`);default:throw new Error(`Unexpected named callout kind "${f}"`)}return Bee(f,r??null,(i==null?void 0:i.split(","))??null,e)}function QA(e){let t=null,n,r;if(e[0]==="{"){const{minStr:i,maxStr:o}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,a=1e5;if(+i>a||o&&+o>a)throw new Error("Quantifier value unsupported in Oniguruma");if(n=+i,r=o===void 0?+i:o===""?1/0:+o,n>r&&(t="possessive",[n,r]=[r,n]),e.endsWith("?")){if(t==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else n=e[0]==="+"?1:0,r=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return Uee(t,n,r,e)}function Wee(e){const t=e[1].toLowerCase();return gl({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function Kee(e){const{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return gl("property",e,{value:r,negate:t==="P"&&!n||t==="p"&&!!n})}function ZA(e){const t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function Xee(e){const t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){const r=e[n];if(!"imxDPSWy".includes(r))throw new Error(`Invalid flag "${r}"`);if(r==="y"){if(!/^y{[gw]}/.test(e.slice(n)))throw new Error('Invalid or unspecified flag "y" mode');t.textSegmentMode=e[n+2]==="g"?"grapheme":"word",n+=3;continue}t[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[r]]=!0}return t}function Qee(e){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(e))throw new Error(`Incomplete or invalid escape "${e}"`);const t=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function Zee(e,t){const{raw:n,inCharClass:r}=e,i=n.slice(1);if(!r&&(i!=="0"&&i.length===1||i[0]!=="0"&&+i<=t))return[ON(n)];const o=[],a=i.match(/^[0-7]+|\d/g);for(let u=0;u<a.length;u++){const c=a[u];let f;if(u===0&&c!=="8"&&c!=="9"){if(f=parseInt(c,8),f>127)throw new Error(Pn`Octal encoded byte above 177 unsupported "${n}"`)}else f=cf(c);o.push(Yo(f,(u===0?"\\":"")+c))}return o}function Jee(e){const t=[],n=new RegExp(cC,"gy");let r;for(;r=n.exec(e);){const i=r[0];if(i[0]==="{"){const o=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(i);if(o){const{min:a,max:u}=o.groups;if(+a>+u&&i.endsWith("?")){n.lastIndex--,t.push(QA(i.slice(0,-1)));continue}}}t.push(QA(i))}return t}function PN(e,t){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const n=e.body[0];return!t||Object.keys(t).every(r=>t[r]===n[r])}function ete(e){return tte.has(e.type)}const tte=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function NN(e,t={}){const n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=Mee(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),i=(g,y)=>{const b=r.tokens[o.nextIndex];switch(o.parent=g,o.nextIndex++,b.type){case"Alternator":return Fl();case"Assertion":return nte(b);case"Backreference":return rte(b,o);case"Character":return Iy(b.value,{useLastValid:!!y.isCheckingRangeEnd});case"CharacterClassHyphen":return ite(b,o,y);case"CharacterClassOpen":return ote(b,o,y);case"CharacterSet":return ste(b,o);case"Directive":return dte(b.kind,{flags:b.flags});case"GroupOpen":return ate(b,o,y);case"NamedCallout":return pte(b.kind,b.tag,b.arguments);case"Quantifier":return lte(b,o);case"Subroutine":return ute(b,o);default:throw new Error(`Unexpected token type "${b.type}"`)}},o={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:i},a=gte(hte(r.flags));let u=a.body[0];for(;o.nextIndex<r.tokens.length;){const g=i(u,{});g.type==="Alternative"?(a.body.push(g),u=g):u.body.push(g)}const{capturingGroups:c,hasNumberedRef:f,namedGroupsByName:h,subroutines:p}=o;if(f&&h.size&&!n.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:g}of p)if(typeof g=="number"){if(g>c.length)throw new Error("Subroutine uses a group number that's not defined");g&&(c[g-1].isSubroutined=!0)}else if(h.has(g)){if(h.get(g).length>1)throw new Error(Pn`Subroutine uses a duplicate group name "\g<${g}>"`);h.get(g)[0].isSubroutined=!0}else throw new Error(Pn`Subroutine uses a group name that's not defined "\g<${g}>"`);return a}function nte({kind:e}){return cw(ff({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===Pn`\B`||e===Pn`\Y`})}function rte({raw:e},t){const n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),i=(o,a=!1)=>{const u=t.capturingGroups.length;let c=!1;if(o>u)if(t.skipBackrefValidation)c=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,fw(a?u+1-o:o,{orphan:c})};if(n){const o=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(o)return i(+o.groups.num,!!o.groups.sign);if(/[-+]/.test(r))throw new Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw new Error(`Group name not defined to the left "${e}"`);return fw(r)}return i(+r)}function ite(e,t,n){const{tokens:r,walk:i}=t,o=t.parent,a=o.body.at(-1),u=r[t.nextIndex];if(!n.isCheckingRangeEnd&&a&&a.type!=="CharacterClass"&&a.type!=="CharacterClassRange"&&u&&u.type!=="CharacterClassOpen"&&u.type!=="CharacterClassClose"&&u.type!=="CharacterClassIntersector"){const c=i(o,{...n,isCheckingRangeEnd:!0});if(a.type==="Character"&&c.type==="Character")return o.body.pop(),fte(a,c);throw new Error("Invalid character class range")}return Iy(cf("-"))}function ote({negate:e},t,n){const{tokens:r,walk:i}=t,o=[ug()],a=r[t.nextIndex];let u=tD(a);for(;u.type!=="CharacterClassClose";){if(u.type==="CharacterClassIntersector")o.push(ug()),t.nextIndex++;else{const f=o.at(-1);f.body.push(i(f,n))}u=tD(r[t.nextIndex],a)}const c=ug({negate:e});return o.length===1?c.body=o[0].body:(c.kind="intersection",c.body=o.map(f=>f.body.length===1?f.body[0]:f)),t.nextIndex++,c}function ste({kind:e,negate:t,value:n},r){const{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:o,unicodePropertyMap:a}=r;if(e==="property"){const u=jy(n);if(uC.has(u)&&!(a!=null&&a.has(u)))e="posix",n=u;else return tc(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:o,unicodePropertyMap:a})}return e==="posix"?mte(n,{negate:t}):dw(e,{negate:t})}function ate(e,t,n){const{tokens:r,capturingGroups:i,namedGroupsByName:o,skipLookbehindValidation:a,walk:u}=t,c=yte(e),f=c.type==="AbsenceFunction",h=eD(c),p=h&&c.negate;if(c.type==="CapturingGroup"&&(i.push(c),c.name&&Dee(o,c.name,[]).push(c)),f&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let g=nD(r[t.nextIndex]);for(;g.type!=="GroupClose";){if(g.type==="Alternator")c.body.push(Fl()),t.nextIndex++;else{const y=c.body.at(-1),b=u(y,{...n,isInAbsenceFunction:n.isInAbsenceFunction||f,isInLookbehind:n.isInLookbehind||h,isInNegLookbehind:n.isInNegLookbehind||p});if(y.body.push(b),(h||n.isInLookbehind)&&!a){const v="Lookbehind includes a pattern not allowed by Oniguruma";if(p||n.isInNegLookbehind){if(JA(b)||b.type==="CapturingGroup")throw new Error(v)}else if(JA(b)||eD(b)&&b.negate)throw new Error(v)}}g=nD(r[t.nextIndex])}return t.nextIndex++,c}function lte({kind:e,min:t,max:n},r){const i=r.parent,o=i.body.at(-1);if(!o||!ete(o))throw new Error("Quantifier requires a repeatable token");const a=jN(e,t,n,o);return i.body.pop(),a}function ute({raw:e},t){const{capturingGroups:n,subroutines:r}=t;let i=e.slice(3,-1);const o=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);if(o){const u=+o.groups.num,c=n.length;if(t.hasNumberedRef=!0,i={"":u,"+":c+u,"-":c+1-u}[o.groups.sign],i<1)throw new Error("Invalid subroutine number")}else i==="0"&&(i=0);const a=LN(i);return r.push(a),a}function cte(e,t){return{type:"AbsenceFunction",kind:e,body:jh(t==null?void 0:t.body)}}function Fl(e){return{type:"Alternative",body:FN(e==null?void 0:e.body)}}function cw(e,t){const n={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(n.negate=!!(t!=null&&t.negate)),n}function fw(e,t){const n=!!(t!=null&&t.orphan);return{type:"Backreference",ref:e,...n&&{orphan:n}}}function IN(e,t){const n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!bte(n.name))throw new Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:jh(t==null?void 0:t.body)}}function Iy(e,t){const n={useLastValid:!1,...t};if(e>1114111){const r=e.toString(16);if(n.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${r}}"`):new Error(`Invalid code point out of range in JS "\\x{${r}}"`)}return{type:"Character",value:e}}function ug(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:FN(e==null?void 0:e.body)}}function fte(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function dw(e,t){const n=!!(t!=null&&t.negate),r={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(r.negate=n),(e==="text_segment"||e==="newline"&&!n)&&(r.variableLength=!0),r}function dte(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:ff(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function hte(e){return{type:"Flags",...e}}function $i(e){const t=e==null?void 0:e.atomic,n=e==null?void 0:e.flags;if(t&&n)throw new Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...n&&{flags:n},body:jh(e==null?void 0:e.body)}}function cl(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:jh(e==null?void 0:e.body)}}function pte(e,t,n){return{type:"NamedCallout",kind:e,tag:t,arguments:n}}function mte(e,t){const n=!!(t!=null&&t.negate);if(!uC.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}function jN(e,t,n,r){if(t>n)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:n,body:r}}function gte(e,t){return{type:"Regex",body:jh(t==null?void 0:t.body),flags:e}}function LN(e){return{type:"Subroutine",ref:e}}function tc(e,t){var i;const n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let r=(i=n.unicodePropertyMap)==null?void 0:i.get(jy(e));if(!r){if(n.normalizeUnknownPropertyNames)r=vte(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error(Pn`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:r??e,negate:n.negate}}function yte({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case"absence_repeater":return cte("repeater");case"atomic":return $i({atomic:!0});case"capturing":return IN(i,{name:n});case"group":return $i({flags:e});case"lookahead":case"lookbehind":return cl({behind:t==="lookbehind",negate:r});default:throw new Error(`Unexpected group kind "${t}"`)}}function jh(e){if(e===void 0)e=[Fl()];else if(!Array.isArray(e)||!e.length||!e.every(t=>t.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}function FN(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(t=>!!t.type))throw new Error("Invalid body; expected array of nodes");return e}function JA(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function eD(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function bte(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function vte(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function jy(e){return e.replace(/[- _]+/g,"").toLowerCase()}function tD(e,t){const n=t;return ff(e,`Unclosed character class${(n==null?void 0:n.type)==="Character"&&n.value===93&&n.raw==="]"?' (started with "]")':""}`)}function nD(e){return ff(e,"Unclosed group")}function Od(e,t,n=null){function r(o,a){for(let u=0;u<o.length;u++){const c=i(o[u],a,u,o);u=Math.max(-1,u+c)}}function i(o,a=null,u=null,c=null){var x,_;let f=0,h=!1;const p={node:o,parent:a,key:u,container:c,root:e,remove(){Rm(c).splice(Math.max(0,qu(u)+f),1),f--,h=!0},removeAllNextSiblings(){return Rm(c).splice(qu(u)+1)},removeAllPrevSiblings(){const R=qu(u)+f;return f-=R,Rm(c).splice(0,Math.max(0,R))},replaceWith(R,T={}){const A=!!T.traverse;c?c[Math.max(0,qu(u)+f)]=R:ff(a,"Can't replace root node")[u]=R,A&&i(R,a,u,c),h=!0},replaceWithMultiple(R,T={}){const A=!!T.traverse;if(Rm(c).splice(Math.max(0,qu(u)+f),1,...R),f+=R.length-1,A){let D=0;for(let O=0;O<R.length;O++)D+=i(R[O],a,qu(u)+O+D,c)}h=!0},skip(){h=!0}},{type:g}=o,y=t["*"],b=t[g],v=typeof y=="function"?y:y==null?void 0:y.enter,S=typeof b=="function"?b:b==null?void 0:b.enter;if(v==null||v(p,n),S==null||S(p,n),!h)switch(g){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":r(o.body,o);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":i(o.min,o,"min"),i(o.max,o,"max");break;case"Quantifier":i(o.body,o,"body");break;case"Regex":r(o.body,o),i(o.flags,o,"flags");break;default:throw new Error(`Unexpected node type "${g}"`)}return(x=b==null?void 0:b.exit)==null||x.call(b,p,n),(_=y==null?void 0:y.exit)==null||_.call(y,p,n),f}return i(e),e}function Rm(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function qu(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const xte=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function wte(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function Ste(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}const xi=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function fC(e,t,n,r){const i=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),o=[!1];let a=0,u="";for(const c of e.matchAll(i)){const{0:f,groups:{$skip:h}}=c;if(!h&&(!r||r===xi.DEFAULT==!a)){n instanceof Function?u+=n(c,{context:a?xi.CHAR_CLASS:xi.DEFAULT,negated:o[o.length-1]}):u+=n;continue}f[0]==="["?(a++,o.push(f[1]==="^")):f==="]"&&a&&(a--,o.pop()),u+=f}return u}function zN(e,t,n,r){fC(e,t,n,r)}function Cte(e,t,n=0,r){if(!new RegExp(t,"su").test(e))return null;const i=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");i.lastIndex=n;let o=0,a;for(;a=i.exec(e);){const{0:u,groups:{$skip:c}}=a;if(!c&&(!r||r===xi.DEFAULT==!o))return a;u==="["?o++:u==="]"&&o&&o--,i.lastIndex==a.index&&i.lastIndex++}return null}function _m(e,t,n){return!!Cte(e,t,0,n)}function Ete(e,t){const n=/\\?./gsu;n.lastIndex=t;let r=e.length,i=0,o=1,a;for(;a=n.exec(e);){const[u]=a;if(u==="[")i++;else if(i)u==="]"&&i--;else if(u==="(")o++;else if(u===")"&&(o--,!o)){r=a.index;break}}return e.slice(t,r)}const rD=new RegExp(String.raw`(?<noncapturingStart>${xte})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function kte(e,t){const n=(t==null?void 0:t.hiddenCaptures)??[];let r=(t==null?void 0:t.captureTransfers)??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};const i="(?>",o="(?:(?=(",a=[0],u=[];let c=0,f=0,h=NaN,p;do{p=!1;let g=0,y=0,b=!1,v;for(rD.lastIndex=Number.isNaN(h)?0:h+o.length;v=rD.exec(e);){const{0:S,index:x,groups:{capturingStart:_,noncapturingStart:R}}=v;if(S==="[")g++;else if(g)S==="]"&&g--;else if(S===i&&!b)h=x,b=!0;else if(b&&R)y++;else if(_)b?y++:(c++,a.push(c+f));else if(S===")"&&b){if(!y){f++;const T=c+f;if(e=`${e.slice(0,h)}${o}${e.slice(h+i.length,x)}))<$$${T}>)${e.slice(x+1)}`,p=!0,u.push(T),wte(n,T),r.size){const A=new Map;r.forEach((D,O)=>{A.set(O>=T?O+1:O,D.map($=>$>=T?$+1:$))}),r=A}break}y--}}}while(p);return n.push(...u),e=fC(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:g,groups:{backrefNum:y,wrappedBackrefNum:b}})=>{if(y){const v=+y;if(v>a.length-1)throw new Error(`Backref "${g}" greater than number of captures`);return`\\${a[v]}`}return`\\${b}`},xi.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}const BN=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,m1=new RegExp(String.raw`
361
+ \\(?: \d+
362
+ | c[A-Za-z]
363
+ | [gk]<[^>]+>
364
+ | [pPu]\{[^\}]+\}
365
+ | u[A-Fa-f\d]{4}
366
+ | x[A-Fa-f\d]{2}
367
+ )
368
+ | \((?: \? (?: [:=!>]
369
+ | <(?:[=!]|[^>]+>)
370
+ | [A-Za-z\-]+:
371
+ | \(DEFINE\)
372
+ ))?
373
+ | (?<qBase>${BN})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
374
+ | \\?.
375
+ `.replace(/\s+/g,""),"gsu");function Rte(e){if(!new RegExp(`${BN}\\+`).test(e))return{pattern:e};const t=[];let n=null,r=null,i="",o=0,a;for(m1.lastIndex=0;a=m1.exec(e);){const{0:u,index:c,groups:{qBase:f,qMod:h,invalidQ:p}}=a;if(u==="[")o||(r=c),o++;else if(u==="]")o?o--:r=null;else if(!o)if(h==="+"&&i&&!i.startsWith("(")){if(p)throw new Error(`Invalid quantifier "${u}"`);let g=-1;if(/^\{\d+\}$/.test(f))e=Ste(e,c+f.length,h,"");else{if(i===")"||i==="]"){const y=i===")"?n:r;if(y===null)throw new Error(`Invalid unmatched "${i}"`);e=`${e.slice(0,y)}(?>${e.slice(y,c)}${f})${e.slice(c+u.length)}`}else e=`${e.slice(0,c-i.length)}(?>${i}${f})${e.slice(c+u.length)}`;g+=4}m1.lastIndex+=g}else u[0]==="("?t.push(c):u===")"&&(n=t.length?t.pop():null);i=u}return{pattern:e}}const bi=String.raw,_te=bi`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,hw=bi`\(\?R=(?<rDepth>[^\)]+)\)|${_te}`,Ly=bi`\(\?<(?![=!])(?<captureName>[^>]+)>`,UN=bi`${Ly}|(?<unnamed>\()(?!\?)`,ol=new RegExp(bi`${Ly}|${hw}|\(\?|\\?.`,"gsu"),g1="Cannot use multiple overlapping recursions";function Tte(e,t){const{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:"plugin",...t};let i=(t==null?void 0:t.captureTransfers)??new Map;if(!new RegExp(hw,"su").test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if(r==="plugin"&&_m(e,bi`\(\?\(DEFINE\)`,xi.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const o=[],a=_m(e,bi`\\[1-9]`,xi.DEFAULT),u=new Map,c=[];let f=!1,h=0,p=0,g;for(ol.lastIndex=0;g=ol.exec(e);){const{0:y,groups:{captureName:b,rDepth:v,gRNameOrNum:S,gRDepth:x}}=g;if(y==="[")h++;else if(h)y==="]"&&h--;else if(v){if(iD(v),f)throw new Error(g1);if(a)throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const _=e.slice(0,g.index),R=e.slice(ol.lastIndex);if(_m(R,hw,xi.DEFAULT))throw new Error(g1);const T=+v-1;e=oD(_,R,T,!1,n,o,p),i=aD(i,_,T,o.length,0,p);break}else if(S){iD(x);let _=!1;for(const M of c)if(M.name===S||M.num===+S){if(_=!0,M.hasRecursedWithin)throw new Error(g1);break}if(!_)throw new Error(bi`Recursive \g cannot be used outside the referenced group "${r==="external"?S:bi`\g<${S}&R=${x}>`}"`);const R=u.get(S),T=Ete(e,R);if(a&&_m(T,bi`${Ly}|\((?!\?)`,xi.DEFAULT))throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const A=e.slice(R,g.index),D=T.slice(A.length+y.length),O=o.length,$=+x-1,z=oD(A,D,$,!0,n,o,p);i=aD(i,A,$,o.length-O,O,p);const j=e.slice(0,R),I=e.slice(R+T.length);e=`${j}${z}${I}`,ol.lastIndex+=z.length-y.length-A.length-D.length,c.forEach(M=>M.hasRecursedWithin=!0),f=!0}else if(b)p++,u.set(String(p),ol.lastIndex),u.set(b,ol.lastIndex),c.push({num:p,name:b});else if(y[0]==="("){const _=y==="(";_&&(p++,u.set(String(p),ol.lastIndex)),c.push(_?{num:p}:{})}else y===")"&&c.pop()}return n.push(...o),{pattern:e,captureTransfers:i,hiddenCaptures:n}}function iD(e){const t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e))throw new Error(t);if(e=+e,e<2||e>100)throw new Error(t)}function oD(e,t,n,r,i,o,a){const u=new Set;r&&zN(e+t,Ly,({groups:{captureName:f}})=>{u.add(f)},xi.DEFAULT);const c=[n,r?u:null,i,o,a];return`${e}${sD(`(?:${e}`,"forward",...c)}(?:)${sD(`${t})`,"backward",...c)}${t}`}function sD(e,t,n,r,i,o,a){const c=h=>t==="forward"?h+2:n-h+2-1;let f="";for(let h=0;h<n;h++){const p=c(h);f+=fC(e,bi`${UN}|\\k<(?<backref>[^>]+)>`,({0:g,groups:{captureName:y,unnamed:b,backref:v}})=>{if(v&&r&&!r.has(v))return g;const S=`_$${p}`;if(b||y){const x=a+o.length+1;return o.push(x),Ate(i,x),b?g:`(?<${y}${S}>`}return bi`\k<${v}${S}>`},xi.DEFAULT)}return f}function Ate(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function aD(e,t,n,r,i,o){if(e.size&&r){let a=0;zN(t,UN,()=>a++,xi.DEFAULT);const u=o-a+i,c=new Map;return e.forEach((f,h)=>{const p=(r-a*n)/n,g=a*n,y=h>u+a?h+r:h,b=[];for(const v of f)if(v<=u)b.push(v);else if(v>u+a+p)b.push(v+r);else if(v<=u+a)for(let S=0;S<=n;S++)b.push(v+a*S);else for(let S=0;S<=n;S++)b.push(v+g+p*S);c.set(y,b)}),c}return e}var kn=String.fromCodePoint,it=String.raw,Li={},Fy=globalThis.RegExp;Li.flagGroups=(()=>{try{new Fy("(?i:)")}catch{return!1}return!0})();Li.unicodeSets=(()=>{try{new Fy("[[]]","v")}catch{return!1}return!0})();Li.bugFlagVLiteralHyphenIsRange=Li.unicodeSets?(()=>{try{new Fy(it`[\d\-a]`,"v")}catch{return!0}return!1})():!1;Li.bugNestedClassIgnoresNegation=Li.unicodeSets&&new Fy("[[^a]]","v").test("a");function Jg(e,{enable:t,disable:n}){return{dotAll:!(n!=null&&n.dotAll)&&!!(t!=null&&t.dotAll||e.dotAll),ignoreCase:!(n!=null&&n.ignoreCase)&&!!(t!=null&&t.ignoreCase||e.ignoreCase)}}function nh(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function pw(e,t){return lD[e]>=lD[t]}function Dte(e,t){if(e==null)throw new Error(t??"Value expected");return e}var lD={ES2025:2025,ES2024:2024,ES2018:2018},Mte={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function HN(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!Mte[e.target])throw new Error(`Unexpected target "${e.target}"`);const t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target==="auto"&&(t.target=Li.flagGroups?"ES2025":Li.unicodeSets?"ES2024":"ES2018"),t}var Ote="[ -\r ]",$te=new Set([kn(304),kn(305)]),$o=it`[\p{L}\p{M}\p{N}\p{Pc}]`;function GN(e){if($te.has(e))return[e];const t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),i=Ite.get(n),o=Pte.get(n),a=Nte.get(n);return[...r].length===1&&t.add(r),a&&t.add(a),i&&t.add(i),t.add(n),o&&t.add(o),[...t]}var dC=new Map(`C Other
376
+ Cc Control cntrl
377
+ Cf Format
378
+ Cn Unassigned
379
+ Co Private_Use
380
+ Cs Surrogate
381
+ L Letter
382
+ LC Cased_Letter
383
+ Ll Lowercase_Letter
384
+ Lm Modifier_Letter
385
+ Lo Other_Letter
386
+ Lt Titlecase_Letter
387
+ Lu Uppercase_Letter
388
+ M Mark Combining_Mark
389
+ Mc Spacing_Mark
390
+ Me Enclosing_Mark
391
+ Mn Nonspacing_Mark
392
+ N Number
393
+ Nd Decimal_Number digit
394
+ Nl Letter_Number
395
+ No Other_Number
396
+ P Punctuation punct
397
+ Pc Connector_Punctuation
398
+ Pd Dash_Punctuation
399
+ Pe Close_Punctuation
400
+ Pf Final_Punctuation
401
+ Pi Initial_Punctuation
402
+ Po Other_Punctuation
403
+ Ps Open_Punctuation
404
+ S Symbol
405
+ Sc Currency_Symbol
406
+ Sk Modifier_Symbol
407
+ Sm Math_Symbol
408
+ So Other_Symbol
409
+ Z Separator
410
+ Zl Line_Separator
411
+ Zp Paragraph_Separator
412
+ Zs Space_Separator
413
+ ASCII
414
+ ASCII_Hex_Digit AHex
415
+ Alphabetic Alpha
416
+ Any
417
+ Assigned
418
+ Bidi_Control Bidi_C
419
+ Bidi_Mirrored Bidi_M
420
+ Case_Ignorable CI
421
+ Cased
422
+ Changes_When_Casefolded CWCF
423
+ Changes_When_Casemapped CWCM
424
+ Changes_When_Lowercased CWL
425
+ Changes_When_NFKC_Casefolded CWKCF
426
+ Changes_When_Titlecased CWT
427
+ Changes_When_Uppercased CWU
428
+ Dash
429
+ Default_Ignorable_Code_Point DI
430
+ Deprecated Dep
431
+ Diacritic Dia
432
+ Emoji
433
+ Emoji_Component EComp
434
+ Emoji_Modifier EMod
435
+ Emoji_Modifier_Base EBase
436
+ Emoji_Presentation EPres
437
+ Extended_Pictographic ExtPict
438
+ Extender Ext
439
+ Grapheme_Base Gr_Base
440
+ Grapheme_Extend Gr_Ext
441
+ Hex_Digit Hex
442
+ IDS_Binary_Operator IDSB
443
+ IDS_Trinary_Operator IDST
444
+ ID_Continue IDC
445
+ ID_Start IDS
446
+ Ideographic Ideo
447
+ Join_Control Join_C
448
+ Logical_Order_Exception LOE
449
+ Lowercase Lower
450
+ Math
451
+ Noncharacter_Code_Point NChar
452
+ Pattern_Syntax Pat_Syn
453
+ Pattern_White_Space Pat_WS
454
+ Quotation_Mark QMark
455
+ Radical
456
+ Regional_Indicator RI
457
+ Sentence_Terminal STerm
458
+ Soft_Dotted SD
459
+ Terminal_Punctuation Term
460
+ Unified_Ideograph UIdeo
461
+ Uppercase Upper
462
+ Variation_Selector VS
463
+ White_Space space
464
+ XID_Continue XIDC
465
+ XID_Start XIDS`.split(/\s/).map(e=>[jy(e),e])),Pte=new Map([["s",kn(383)],[kn(383),"s"]]),Nte=new Map([[kn(223),kn(7838)],[kn(107),kn(8490)],[kn(229),kn(8491)],[kn(969),kn(8486)]]),Ite=new Map([Fs(453),Fs(456),Fs(459),Fs(498),...y1(8072,8079),...y1(8088,8095),...y1(8104,8111),Fs(8124),Fs(8140),Fs(8188)]),jte=new Map([["alnum",it`[\p{Alpha}\p{Nd}]`],["alpha",it`\p{Alpha}`],["ascii",it`\p{ASCII}`],["blank",it`[\p{Zs}\t]`],["cntrl",it`\p{Cc}`],["digit",it`\p{Nd}`],["graph",it`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",it`\p{Lower}`],["print",it`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",it`[\p{P}\p{S}]`],["space",it`\p{space}`],["upper",it`\p{Upper}`],["word",it`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",it`\p{AHex}`]]);function Lte(e,t){const n=[];for(let r=e;r<=t;r++)n.push(r);return n}function Fs(e){const t=kn(e);return[t.toLowerCase(),t]}function y1(e,t){return Lte(e,t).map(n=>Fs(n))}var qN=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function Fte(e,t){const n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};VN(e);const r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:pw(n.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};Od(e,zte,r);const i={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},o={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};Od(e,Bte,o);const a={groupsByName:o.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:o.reffedNodesByReferencer};return Od(e,Ute,a),e._originMap=o.groupOriginByCopy,e._strategy=r.strategy,e}var zte={AbsenceFunction({node:e,parent:t,replaceWith:n}){const{body:r,kind:i}=e;if(i==="repeater"){const o=$i();o.body[0].body.push(cl({negate:!0,body:r}),tc("Any"));const a=$i();a.body[0].body.push(jN("greedy",0,1/0,o)),n(pn(a,t),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){const i=e.body.filter(o=>o.kind==="flags");for(let o=n+1;o<t.body.length;o++){const a=t.body[o];nh(r,a,[]).push(...i)}},exit({node:e},{flagDirectivesByAlt:t}){var n;if((n=t.get(e))!=null&&n.length){const r=WN(t.get(e));if(r){const i=$i({flags:r});i.body[0].body=e.body,e.body=[pn(i,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:i,remove:o,replaceWith:a},u){const{kind:c,negate:f}=e,{asciiWordBoundaries:h,avoidSubclass:p,supportedGNodes:g,wordIsAscii:y}=u;if(c==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${f?"Y":"y"}"`);if(c==="line_end")a(pn(cl({body:[Fl({body:[cw("string_end")]}),Fl({body:[Iy(10)]})]}),t));else if(c==="line_start")a(pn(Po(it`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(c==="search_start")if(g.has(e))i.flags.sticky=!0,o();else{const b=r[n-1];if(b&&Wte(b))a(pn(cl({negate:!0}),t));else{if(p)throw new Error(it`Uses "\G" in a way that requires a subclass`);a(zs(cw("string_start"),t)),u.strategy="clip_search"}}else if(!(c==="string_end"||c==="string_start"))if(c==="string_end_newline")a(pn(Po(it`(?=\n?\z)`),t));else if(c==="word_boundary"){if(!y&&!h){const b=`(?:(?<=${$o})(?!${$o})|(?<!${$o})(?=${$o}))`,v=`(?:(?<=${$o})(?=${$o})|(?<!${$o})(?!${$o}))`;a(pn(Po(f?v:b),t))}}else throw new Error(`Unexpected assertion kind "${c}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!v1(n)&&(n=b1(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!v1(r)&&(r=b1(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){if(t.kind==="intersection"){const r=ug({body:[e]});n(pn(r,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:i,digitIsAscii:o,spaceIsAscii:a,wordIsAscii:u}){const{kind:c,negate:f,value:h}=e;if(o&&(c==="digit"||h==="digit")){n(zs(dw("digit",{negate:f}),t));return}if(a&&(c==="space"||h==="space")){n(pn(x1(Po(Ote),f),t));return}if(u&&(c==="word"||h==="word")){n(zs(dw("word",{negate:f}),t));return}if(c==="any")n(zs(tc("Any"),t));else if(c==="digit")n(zs(tc("Nd",{negate:f}),t));else if(c!=="dot")if(c==="text_segment"){if(r==="strict")throw new Error(it`Use of "\X" requires non-strict accuracy`);const p="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",g=it`\p{RI}{2}|${p}(?:\u200D${p})*`;n(pn(Po(it`(?>\r\n|${i?it`\p{RGI_Emoji}`:g}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(c==="hex")n(zs(tc("AHex",{negate:f}),t));else if(c==="newline")n(pn(Po(f?`[^
466
+ ]`:`(?>\r
467
+ ?|[
468
+ \v\f…\u2028\u2029])`),t));else if(c==="posix")if(!i&&(h==="graph"||h==="print")){if(r==="strict")throw new Error(`POSIX class "${h}" requires min target ES2024 or non-strict accuracy`);let p={graph:"!-~",print:" -~"}[h];f&&(p=`\0-${kn(p.codePointAt(0)-1)}${kn(p.codePointAt(2)+1)}-􏿿`),n(pn(Po(`[${p}]`),t))}else n(pn(x1(Po(jte.get(h)),f),t));else if(c==="property")dC.has(jy(h))||(e.key="sc");else if(c==="space")n(zs(tc("space",{negate:f}),t));else if(c==="word")n(pn(x1(Po($o),f),t));else throw new Error(`Unexpected character set kind "${c}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:i,removeAllPrevSiblings:o,removeAllNextSiblings:a}){const{kind:u,flags:c}=e;if(u==="flags")if(!c.enable&&!c.disable)r();else{const f=$i({flags:c});f.body[0].body=a(),i(pn(f,t),{traverse:!0})}else if(u==="keep"){const f=n.body[0],p=n.body.length===1&&PN(f,{type:"Group"})&&f.body[0].body.length===1?f.body[0]:n;if(t.parent!==p||p.body.length>1)throw new Error(it`Uses "\K" in a way that's unsupported`);const g=cl({behind:!0});g.body[0].body=o(),i(pn(g,t))}else throw new Error(`Unexpected directive kind "${u}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(n=>delete e[n]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:t,disable:n}=e.flags;t!=null&&t.extended&&delete t.extended,n!=null&&n.extended&&delete n.extended,t!=null&&t.dotAll&&(n!=null&&n.dotAll)&&delete t.dotAll,t!=null&&t.ignoreCase&&(n!=null&&n.ignoreCase)&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){const{kind:n}=e;n==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){const{kind:r}=e;if(r==="fail")n(pn(cl({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=$i();t.body[0].body.push(e.body),e.body=pn(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const n=[];let r=!1,i=!1;for(const o of e.body)if(o.body.length===1&&o.body[0].kind==="search_start")o.body.pop();else{const a=XN(o.body);a?(r=!0,Array.isArray(a)?n.push(...a):n.push(a)):i=!0}r&&!i&&n.forEach(o=>t.add(o))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t==="strict"&&n&&r)throw new Error(it`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!v1(n)&&(n=b1(n,t),e.ref=n)}},Bte={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){const{orphan:r,ref:i}=e;r||n.set(e,[...t.get(i).map(({node:o})=>o)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:i,groupsByName:o,multiplexCapturesToLeftByRef:a,openRefs:u,reffedNodesByReferencer:c}){const f=i.get(e);if(f&&u.has(e.number)){const p=zs(uD(e.number),t);c.set(p,u.get(e.number)),n(p);return}u.set(e.number,e),a.set(e.number,[]),e.name&&nh(a,e.name,[]);const h=a.get(e.name??e.number);for(let p=0;p<h.length;p++){const g=h[p];if(f===g.node||f&&f===g.origin||e===g.origin){h.splice(p,1);break}}if(a.get(e.number).push({node:e,origin:f}),e.name&&a.get(e.name).push({node:e,origin:f}),e.name){const p=nh(o,e.name,new Map);let g=!1;if(f)g=!0;else for(const y of p.values())if(!y.hasDuplicateNameToRemove){g=!0;break}o.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:g})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=Jg(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){const{isRecursive:i,ref:o}=e;if(i){let h=t;for(;(h=h.parent)&&!(h.type==="CapturingGroup"&&(h.name===o||h.number===o)););r.reffedNodesByReferencer.set(e,h);return}const a=r.subroutineRefMap.get(o),u=o===0,c=u?uD(0):YN(a,r.groupOriginByCopy,null);let f=c;if(!u){const h=WN(qte(a,g=>g.type==="Group"&&!!g.flags)),p=h?Jg(r.globalFlags,h):r.globalFlags;Hte(p,r.currentFlags)||(f=$i({flags:Vte(p)}),f.body[0].body.push(c))}n(pn(f,t),{traverse:!u})}},Ute={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}const o=r.reffedNodesByReferencer.get(e).filter(a=>Gte(a,e));if(!o.length)n(pn(cl({negate:!0}),t));else if(o.length>1){const a=$i({atomic:!0,body:o.reverse().map(u=>Fl({body:[fw(u.number)]}))});n(pn(a,t))}else e.ref=o[0].number},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){const n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let r=0;r<n;r++){const i=IN();e.body.at(-1).body.push(i)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function VN(e){Od(e,{"*"({node:t,parent:n}){t.parent=n}})}function Hte(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function Gte(e,t){let n=t;do{if(n.type==="Regex")return!1;if(n.type==="Alternative")continue;if(n===e)return!1;const r=KN(n.parent);for(const i of r){if(i===n)break;if(i===e||QN(i,e))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function YN(e,t,n,r){const i=Array.isArray(e)?[]:{};for(const[o,a]of Object.entries(e))o==="parent"?i.parent=Array.isArray(n)?r:n:a&&typeof a=="object"?i[o]=YN(a,t,i,n):(o==="type"&&a==="CapturingGroup"&&t.set(i,t.get(e)??e),i[o]=a);return i}function uD(e){const t=LN(e);return t.isRecursive=!0,t}function qte(e,t){const n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function b1(e,t){if(t.has(e))return t.get(e);const n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,n),n}function WN(e){const t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return e.forEach(({flags:r})=>{t.forEach(i=>{var o,a;(o=r.enable)!=null&&o[i]&&(delete n.disable[i],n.enable[i]=!0),(a=r.disable)!=null&&a[i]&&(n.disable[i]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function Vte({dotAll:e,ignoreCase:t}){const n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function KN(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function XN(e){const t=e.find(n=>n.kind==="search_start"||Kte(n,{negate:!1})||!Yte(n));if(!t)return null;if(t.kind==="search_start")return t;if(t.type==="LookaroundAssertion")return t.body[0].body[0];if(t.type==="CapturingGroup"||t.type==="Group"){const n=[];for(const r of t.body){const i=XN(r.body);if(!i)return null;Array.isArray(i)?n.push(...i):n.push(i)}return n}return null}function QN(e,t){const n=KN(e)??[];for(const r of n)if(r===t||QN(r,t))return!0;return!1}function Yte({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function Wte(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function Kte(e,t){const n={negate:null,...t};return e.type==="LookaroundAssertion"&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&PN(e.body[0],{type:"Assertion",kind:"search_start"})}function v1(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function Po(e,t){const r=NN(e,{...t,unicodePropertyMap:dC}).body;return r.length>1||r[0].body.length>1?$i({body:r}):r[0].body[0]}function x1(e,t){return e.negate=t,e}function zs(e,t){return e.parent=t,e}function pn(e,t){return VN(e),e.parent=t,e}function Xte(e,t){const n=HN(t),r=pw(n.target,"ES2024"),i=pw(n.target,"ES2025"),o=n.rules.recursionLimit;if(!Number.isInteger(o)||o<2||o>20)throw new Error("Invalid recursionLimit; use 2-20");let a=null,u=null;if(!i){const y=[e.flags.ignoreCase];Od(e,Qte,{getCurrentModI:()=>y.at(-1),popModI(){y.pop()},pushModI(b){y.push(b)},setHasCasedChar(){y.at(-1)?a=!0:u=!0}})}const c={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||a)&&!u)};let f=e;const h={accuracy:n.accuracy,appliedGlobalFlags:c,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:f,originMap:e._originMap,recursionLimit:o,useAppliedIgnoreCase:!!(!i&&a&&u),useFlagMods:i,useFlagV:r,verbose:n.verbose};function p(y){return h.lastNode=f,f=y,Dte(Zte[y.type],`Unexpected node type "${y.type}"`)(y,h,p)}const g={pattern:e.body.map(p).join("|"),flags:p(e.flags),options:{...e.options}};return r||(delete g.options.force.v,g.options.disable.v=!0,g.options.unicodeSetsPlugin=null),g._captureTransfers=new Map,g._hiddenCaptures=[],h.captureMap.forEach((y,b)=>{y.hidden&&g._hiddenCaptures.push(b),y.transferTo&&nh(g._captureTransfers,y.transferTo,[]).push(b)}),g}var Qte={"*":{enter({node:e},t){if(fD(e)){const n=t.getCurrentModI();t.pushModI(e.flags?Jg({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){fD(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){hC(kn(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),ZN(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&qN.has(e.value)&&t.setHasCasedChar()}},Zte={Alternative({body:e},t,n){return e.map(n).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?it`\B`:it`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,n){const{body:r,name:i,number:o}=e,a={ignoreCase:t.currentFlags.ignoreCase},u=t.originMap.get(e);return u&&(a.hidden=!0,o>u.number&&(a.transferTo=u.number)),t.captureMap.set(o,a),`(${i?`?<${i}>`:""}${r.map(n).join("|")})`},Character({value:e},t){const n=kn(e),r=Vu(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&hC(n)){const i=GN(n);return t.inCharClass?i.join(""):i.length>1?`[${i.join("")}]`:i[0]}return n},CharacterClass(e,t,n){const{kind:r,negate:i,parent:o}=e;let{body:a}=e;if(r==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");Li.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&a.some(dD)&&(a=[Iy(45),...a.filter(f=>!dD(f))]);const u=()=>`[${i?"^":""}${a.map(n).join(r==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||Li.bugNestedClassIgnoresNegation)&&!i){const h=a.filter(p=>p.type==="CharacterClass"&&p.kind==="union"&&p.negate);if(h.length){const p=$i(),g=p.body[0];return p.parent=o,g.parent=p,a=a.filter(y=>!h.includes(y)),e.body=a,a.length?(e.parent=g,g.body.push(e)):p.body.pop(),h.forEach(y=>{const b=Fl({body:[y]});y.parent=b,b.parent=p,p.body.push(b)}),n(p)}}t.inCharClass=!0;const f=u();return t.inCharClass=!1,f}const c=a[0];if(r==="union"&&!i&&c&&((!t.useFlagV||!t.verbose)&&o.kind==="union"&&!(Li.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&o.kind==="intersection"&&a.length===1&&c.type!=="CharacterClassRange"))return a.map(n).join("");if(!t.useFlagV&&o.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return u()},CharacterClassRange(e,t){const n=e.min.value,r=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},o=Vu(n,i),a=Vu(r,i),u=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const c=ZN(e);rne(c).forEach(h=>{u.add(Array.isArray(h)?`${Vu(h[0],i)}-${Vu(h[1],i)}`:Vu(h,i))})}return`${o}-${a}${[...u].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:r},i){if(e==="dot")return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?".":"[^]":it`[^\n]`;if(e==="digit")return t?it`\D`:it`\d`;if(e==="property"){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&qN.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?it`\P`:it`\p`}{${r?`${r}=`:""}${n}}`}if(e==="word")return t?it`\W`:it`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:t,flags:n,parent:r},i,o){const a=i.currentFlags;n&&(i.currentFlags=Jg(a,n));const u=t.map(o).join("|"),c=!i.verbose&&t.length===1&&r.type!=="Quantifier"&&!e&&(!i.useFlagMods||!n)?u:`(?${ine(e,n,i.useFlagMods)}${u})`;return i.currentFlags=a,c},LookaroundAssertion({body:e,kind:t,negate:n},r,i){return`(?${`${t==="lookahead"?"":"<"}${n?"!":"="}`}${e.map(i).join("|")})`},Quantifier(e,t,n){return n(e.body)+one(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const r=n.recursionLimit;return t===0?`(?R=${r})`:it`\g<${t}&R=${r}>`}},Jte=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),ene=new Set(["-","\\","]","^","["]),tne=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),cD=new Map([[9,it`\t`],[10,it`\n`],[11,it`\v`],[12,it`\f`],[13,it`\r`],[8232,it`\u2028`],[8233,it`\u2029`],[65279,it`\uFEFF`]]),nne=new RegExp("^\\p{Cased}$","u");function hC(e){return nne.test(e)}function ZN(e,t){const n=!!(t!=null&&t.firstOnly),r=e.min.value,i=e.max.value,o=[];if(r<65&&(i===65535||i>=131071)||r===65536&&i>=131071)return o;for(let a=r;a<=i;a++){const u=kn(a);if(!hC(u))continue;const c=GN(u).filter(f=>{const h=f.codePointAt(0);return h<r||h>i});if(c.length&&(o.push(...c),n))break}return o}function Vu(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(cD.has(e))return cD.get(e);if(e<32||e>126&&e<160||e>262143||t&&sne(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const i=n?r?tne:ene:Jte,o=kn(e);return(i.has(o)?"\\":"")+o}function rne(e){const t=e.map(i=>i.codePointAt(0)).sort((i,o)=>i-o),n=[];let r=null;for(let i=0;i<t.length;i++)t[i+1]===t[i]+1?r??(r=t[i]):r===null?n.push(t[i]):(n.push([r,t[i]]),r=null);return n}function ine(e,t,n){if(e)return">";let r="";if(t&&n){const{enable:i,disable:o}=t;r=(i!=null&&i.ignoreCase?"i":"")+(i!=null&&i.dotAll?"s":"")+(o?"-":"")+(o!=null&&o.ignoreCase?"i":"")+(o!=null&&o.dotAll?"s":"")}return`${r}:`}function one({kind:e,max:t,min:n}){let r;return!n&&t===1?r="?":!n&&t===1/0?r="*":n===1&&t===1/0?r="+":n===t?r=`{${n}}`:r=`{${n},${t===1/0?"":t}}`,r+{greedy:"",lazy:"?",possessive:"+"}[e]}function fD({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function sne(e){return e>47&&e<58}function dD({type:e,value:t}){return e==="Character"&&t===45}var ea,Uo,_l,ta,Tl,xh,mw,ba,ane=(ba=class extends RegExp{constructor(n,r,i){var t=(...x0e)=>(super(...x0e),He(this,xh),He(this,ea,new Map),He(this,Uo,null),He(this,_l),He(this,ta,null),He(this,Tl,null),te(this,"rawOptions",{}),this);const o=!!(i!=null&&i.lazyCompile);if(n instanceof RegExp){if(i)throw new Error("Cannot provide options when copying a regexp");const a=n;t(a,r),$e(this,_l,a.source),a instanceof ba&&($e(this,ea,K(a,ea)),$e(this,ta,K(a,ta)),$e(this,Tl,K(a,Tl)),this.rawOptions=a.rawOptions)}else{const a={hiddenCaptures:[],strategy:null,transfers:[],...i};t(o?"":n,r),$e(this,_l,n),$e(this,ea,une(a.hiddenCaptures,a.transfers)),$e(this,Tl,a.strategy),this.rawOptions=i??{}}o||$e(this,Uo,this)}get source(){return K(this,_l)||"(?:)"}exec(n){if(!K(this,Uo)){const{lazyCompile:o,...a}=this.rawOptions;$e(this,Uo,new ba(K(this,_l),this.flags,a))}const r=this.global||this.sticky,i=this.lastIndex;if(K(this,Tl)==="clip_search"&&r&&i){this.lastIndex=0;const o=rt(this,xh,mw).call(this,n.slice(i));return o&&(lne(o,i,n,this.hasIndices),this.lastIndex+=i),o}return rt(this,xh,mw).call(this,n)}},ea=new WeakMap,Uo=new WeakMap,_l=new WeakMap,ta=new WeakMap,Tl=new WeakMap,xh=new WeakSet,mw=function(n){K(this,Uo).lastIndex=this.lastIndex;const r=g_(ba.prototype,this,"exec").call(K(this,Uo),n);if(this.lastIndex=K(this,Uo).lastIndex,!r||!K(this,ea).size)return r;const i=[...r];r.length=1;let o;this.hasIndices&&(o=[...r.indices],r.indices.length=1);const a=[0];for(let u=1;u<i.length;u++){const{hidden:c,transferTo:f}=K(this,ea).get(u)??{};if(c?a.push(null):(a.push(r.length),r.push(i[u]),this.hasIndices&&r.indices.push(o[u])),f&&i[u]!==void 0){const h=a[f];if(!h)throw new Error(`Invalid capture transfer to "${h}"`);if(r[h]=i[u],this.hasIndices&&(r.indices[h]=o[u]),r.groups){K(this,ta)||$e(this,ta,cne(this.source));const p=K(this,ta).get(f);p&&(r.groups[p]=i[u],this.hasIndices&&(r.indices.groups[p]=o[u]))}}}return r},ba);function lne(e,t,n,r){if(e.index+=t,e.input=n,r){const i=e.indices;for(let a=0;a<i.length;a++){const u=i[a];u&&(i[a]=[u[0]+t,u[1]+t])}const o=i.groups;o&&Object.keys(o).forEach(a=>{const u=o[a];u&&(o[a]=[u[0]+t,u[1]+t])})}}function une(e,t){const n=new Map;for(const r of e)n.set(r,{hidden:!0});for(const[r,i]of t)for(const o of i)nh(n,o,{}).transferTo=r;return n}function cne(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map;let r=0,i=0,o;for(;o=t.exec(e);){const{0:a,groups:{capture:u,name:c}}=o;a==="["?r++:r?a==="]"&&r--:u&&(i++,c&&n.set(i,c))}return n}function fne(e,t){const n=dne(e,t);return n.options?new ane(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function dne(e,t){const n=HN(t),r=NN(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:dC}),i=Fte(r,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),o=Xte(i,n),a=Tte(o.pattern,{captureTransfers:o._captureTransfers,hiddenCaptures:o._hiddenCaptures,mode:"external"}),u=Rte(a.pattern),c=kte(u.pattern,{captureTransfers:a.captureTransfers,hiddenCaptures:a.hiddenCaptures}),f={pattern:c.pattern,flags:`${n.hasIndices?"d":""}${n.global?"g":""}${o.flags}${o.options.disable.v?"u":"v"}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const h=c.hiddenCaptures.sort((b,v)=>b-v),p=Array.from(c.captureTransfers),g=i._strategy,y=f.pattern.length>=n.lazyCompileLength;(h.length||p.length||g||y)&&(f.options={...h.length&&{hiddenCaptures:h},...p.length&&{transfers:p},...g&&{strategy:g},...y&&{lazyCompile:y}})}return f}const hD=4294967295;class hne{constructor(t,n={}){te(this,"regexps");this.patterns=t,this.options=n;const{forgiving:r=!1,cache:i,regexConstructor:o}=n;if(!o)throw new Error("Option `regexConstructor` is not provided");this.regexps=t.map(a=>{if(typeof a!="string")return a;const u=i==null?void 0:i.get(a);if(u){if(u instanceof RegExp)return u;if(r)return null;throw u}try{const c=o(a);return i==null||i.set(a,c),c}catch(c){if(i==null||i.set(a,c),r)return null;throw c}})}findNextMatchSync(t,n,r){const i=typeof t=="string"?t:t.content,o=[];function a(u,c,f=0){return{index:u,captureIndices:c.indices.map(h=>h==null?{start:hD,end:hD,length:0}:{start:h[0]+f,end:h[1]+f,length:h[1]-h[0]})}}for(let u=0;u<this.regexps.length;u++){const c=this.regexps[u];if(c)try{c.lastIndex=n;const f=c.exec(i);if(!f)continue;if(f.index===n)return a(u,f,0);o.push([u,f,0])}catch(f){if(this.options.forgiving)continue;throw f}}if(o.length){const u=Math.min(...o.map(c=>c[1].index));for(const[c,f,h]of o)if(f.index===u)return a(c,f,h)}return null}}function pne(e,t){return fne(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function mne(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||(t.regexConstructor=n=>pne(n,{target:t.target})),{createScanner(n){return new hne(n,t)},createString(n){return{content:n}}}}const gne=[[/^(<!--)(.+)(-->)$/,!1],[/^(\/\*)(.+)(\*\/)$/,!1],[/^(\/\/|["'#]|;{1,2}|%{1,2}|--)(.*)$/,!0],[/^(\*)(.+)$/,!0]];function yne(e,t,n){const r=[];for(const i of e){if(n==="v3"){const u=i.children.flatMap((c,f)=>{if(c.type!=="element")return c;const h=c.children[0];if(h.type!=="text")return c;const p=f===i.children.length-1;if(!w1(h.value,p))return c;const y=h.value.split(/(\s+\/\/)/);if(y.length<=1)return c;let b=[y[0]];for(let v=1;v<y.length;v+=2)b.push(y[v]+(y[v+1]||""));return b=b.filter(Boolean),b.length<=1?c:b.map(v=>({...c,children:[{type:"text",value:v}]}))});u.length!==i.children.length&&(i.children=u)}const o=i.children;let a=o.length-1;n==="v1"?a=0:t&&(a=o.length-2);for(let u=Math.max(a,0);u<o.length;u++){const c=o[u];if(c.type!=="element")continue;const f=c.children.at(0);if((f==null?void 0:f.type)!=="text")continue;const h=u===o.length-1;let p=w1(f.value,h),g;if(!p&&u>0&&f.value.trim().startsWith("[!code")){const y=o[u-1];if((y==null?void 0:y.type)==="element"){const b=y.children.at(0);if((b==null?void 0:b.type)==="text"&&b.value.includes("//")){const v=b.value+f.value,S=w1(v,h);if(S){p=S,r.push({info:S,line:i,token:y,isLineCommentOnly:o.length===2&&y.children.length===1&&c.children.length===1,isJsxStyle:!1,additionalTokens:[c]});continue}}}}if(p)if(t&&!h&&u!==0){const y=pD(o[u-1],"{")&&pD(o[u+1],"}");r.push({info:p,line:i,token:c,isLineCommentOnly:o.length===3&&c.children.length===1,isJsxStyle:y,additionalTokens:g})}else r.push({info:p,line:i,token:c,isLineCommentOnly:o.length===1&&c.children.length===1,isJsxStyle:!1,additionalTokens:g})}}return r}function pD(e,t){if(e.type!=="element")return!1;const n=e.children[0];return n.type!=="text"?!1:n.value.trim()===t}function w1(e,t){let n=e.trimStart();const r=e.length-n.length;n=n.trimEnd();const i=e.length-n.length-r;for(const[o,a]of gne){if(a&&!t)continue;const u=o.exec(n);if(u)return[" ".repeat(r)+u[1],u[2],u[3]?u[3]+" ".repeat(i):void 0]}}function bne(e){const t=e.match(/(?:\/\/|["'#]|;{1,2}|%{1,2}|--)(\s*)$/);return t&&t[1].trim().length===0?e.slice(0,t.index):e}function vne(e,t,n,r){return r==null&&(r="v3"),{name:e,code(i){const o=i.children.filter(f=>f.type==="element"),a=[];i.data??(i.data={});const u=i.data;u._shiki_notation??(u._shiki_notation=yne(o,["jsx","tsx"].includes(this.options.lang),r));const c=u._shiki_notation;for(const f of c){if(f.info[1].length===0)continue;let h=o.indexOf(f.line);f.isLineCommentOnly&&r!=="v1"&&h++;let p=!1;if(f.info[1]=f.info[1].replace(t,(...y)=>n.call(this,y,f.line,f.token,o,h)?(p=!0,""):y[0]),!p)continue;r==="v1"&&(f.info[1]=bne(f.info[1]));const g=f.info[1].trim().length===0;if(g&&(f.info[1]=""),g&&f.isLineCommentOnly)a.push(f.line);else if(g&&f.isJsxStyle)f.line.children.splice(f.line.children.indexOf(f.token)-1,3);else if(g){if(f.additionalTokens)for(let y=f.additionalTokens.length-1;y>=0;y--){const b=f.additionalTokens[y],v=f.line.children.indexOf(b);v!==-1&&f.line.children.splice(v,1)}f.line.children.splice(f.line.children.indexOf(f.token),1)}else{const y=f.token.children[0];if(y.type==="text"&&(y.value=f.info.join(""),f.additionalTokens))for(const b of f.additionalTokens){const v=b.children[0];(v==null?void 0:v.type)==="text"&&(v.value="")}}}for(const f of a){const h=i.children.indexOf(f),p=i.children[h+1];let g=1;(p==null?void 0:p.type)==="text"&&(p==null?void 0:p.value)===`
469
+ `&&(g=2),i.children.splice(h,g)}}}}function xne(e){if(!e)return null;const t=e.match(/\{([\d,-]+)\}/);return t?t[1].split(",").flatMap(r=>{const i=r.split("-").map(o=>Number.parseInt(o,10));return i.length===1?[i[0]]:Array.from({length:i[1]-i[0]+1},(o,a)=>i[0]+a)}):null}const Tm=Symbol("highlighted-lines");function wne(e={}){const{className:t="highlighted",zeroIndexed:n=!1}=e;return{name:"@shikijs/transformers:meta-highlight",line(r,i){var c;if(!((c=this.options.meta)!=null&&c.__raw))return;const o=this.meta;o[Tm]??(o[Tm]=xne(this.options.meta.__raw));const a=o[Tm]??[],u=n?i-1:i;return a.includes(u)&&this.addClassToHast(r,t),r}}}function Sne(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function JN(e={},t="@shikijs/transformers:notation-map"){const{classMap:n={},classActivePre:r=void 0,classActiveCode:i=void 0}=e;return vne(t,new RegExp(`#?\\s*\\[!code (${Object.keys(n).map(Sne).join("|")})(:\\d+)?\\]`,"gi"),function([o,a,u=":1"],c,f,h,p){const g=Number.parseInt(u.slice(1),10);for(let y=p;y<Math.min(p+g,h.length);y++)this.addClassToHast(h[y],n[a]);return r&&this.addClassToHast(this.pre,r),i&&this.addClassToHast(this.code,i),!0},e.matchAlgorithm)}function Cne(e={}){const{classLineAdd:t="diff add",classLineRemove:n="diff remove",classActivePre:r="has-diff",classActiveCode:i}=e;return JN({classMap:{"++":t,"--":n},classActivePre:r,classActiveCode:i,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-diff")}function Ene(e={}){const{classActiveLine:t="highlighted",classActivePre:n="has-highlighted",classActiveCode:r}=e;return JN({classMap:{highlight:t,hl:t},classActivePre:n,classActiveCode:r,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-highlight")}const kne="vitesse-black",Rne="vitesse-light",_ne={javascript:()=>fi(()=>import("./javascript-wDzz0qaB.js"),[]),typescript:()=>fi(()=>import("./typescript-BPQ3VLAy.js"),[]),jsx:()=>fi(()=>import("./jsx-g9-lgVsj.js"),[]),tsx:()=>fi(()=>import("./tsx-COt5Ahok.js"),[]),json:()=>fi(()=>import("./json-Cp-IABpG.js"),[]),css:()=>fi(()=>import("./css-DPfMkruS.js"),[]),html:()=>fi(()=>import("./html-GMplVEZG.js"),__vite__mapDeps([0,1,2])),bash:()=>fi(()=>import("./bash-Yzrsuije.js"),[]),markdown:()=>fi(()=>import("./markdown-Cvjx9yec.js"),[]),python:()=>fi(()=>import("./python-B6aJPvgy.js"),[])},Tne=()=>fi(()=>import("./vitesse-black-Bkuqu6BP.js"),[]),Ane=()=>fi(()=>import("./vitesse-light-CVO1_9PV.js"),[]);let S1=null,C1=null;const mD=new Set;async function pC(){return S1||C1||(C1=Aee({themes:[Tne,Ane],langs:[],engine:mne()}),S1=await C1,S1)}async function eI(e){if(mD.has(e))return;const t=_ne[e];if(!t)throw new Error(`Unknown language: ${e}`);const n=await pC(),r=await t();await n.loadLanguage(r),mD.add(e)}async function Dne(e,t="typescript",n={}){await eI(t);const r=await pC(),{highlightLines:i}=n,o=i!=null&&i.length?{__raw:`{${i.join(",")}}`}:void 0;return r.codeToHtml(e,{lang:t,themes:{light:Rne,dark:kne},defaultColor:!1,...o&&{meta:o},transformers:[Cne(),Ene(),wne()]})}function tI(e,t="typescript",n={}){var p;const[r,i]=C.useState(""),[o,a]=C.useState(!0),[u,c]=C.useState(null),f=C.useRef(0),h=((p=n.highlightLines)==null?void 0:p.join(","))??"";return C.useEffect(()=>{const g=++f.current;Dne(e,t,{highlightLines:n.highlightLines}).then(y=>{f.current===g&&(i(y),a(!1),c(null))}).catch(y=>{f.current===g&&(c(y),a(!1))})},[e,t,h]),{html:r,loading:o,error:u}}const ro={"code-block":"_code-block_2wyt9_1","code-block-header":"_code-block-header_2wyt9_10","code-block-language-icon":"_code-block-language-icon_2wyt9_18","code-block-icon-button":"_code-block-icon-button_2wyt9_23","code-block-scroll":"_code-block-scroll_2wyt9_32","code-block-content":"_code-block-content_2wyt9_36","code-block-content-wrap":"_code-block-content-wrap_2wyt9_88","code-block-error":"_code-block-error_2wyt9_100","code-block-expand-toggle":"_code-block-expand-toggle_2wyt9_107"},nI=({code:e=BP,onCopy:t,className:n,...r})=>{const[i,o]=C.useState(!1),a=C.useCallback(async()=>{try{await navigator.clipboard.writeText(e),o(!0),t==null||t(e),setTimeout(()=>o(!1),2e3)}catch(u){console.error("Failed to copy code:",u)}},[e,t]);return E.jsx(Ci,{type:"button","data-slot":"code-block-copy-button","data-copied":i,"aria-label":i?"Copied":"Copy code",tooltip:i?"Copied":"Copy",className:ze(ro["code-block-icon-button"],n),onClick:a,size:"xsmall",variant:"inverted",...r,children:i?E.jsx(Ch,{}):E.jsx(Eh,{})})};nI.displayName="CodeBlockCopyButton";const rI=({pressed:e,defaultPressed:t,onPressedChange:n,className:r,...i})=>E.jsx(Qd,{"data-slot":"code-block-wrap-button","aria-label":"Toggle line wrap",tooltip:"Toggle line wrap",className:ze(ro["code-block-icon-button"],r),size:"xsmall",variant:"inverted",pressed:e,defaultPressed:t,onPressedChange:n,icon:{pressed:E.jsx(_T,{}),unpressed:E.jsx(_T,{})},...i});rI.displayName="CodeBlockWrapButton";const Mne='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill="#fff" d="M22.67 47h99.67v73.67H22.67z"/><path data-name="original" fill="#007acc" d="M1.5 63.91v62.5h125v-125H1.5zm100.73-5a15.56 15.56 0 017.82 4.5 20.58 20.58 0 013 4c0 .16-5.4 3.81-8.69 5.85-.12.08-.6-.44-1.13-1.23a7.09 7.09 0 00-5.87-3.53c-3.79-.26-6.23 1.73-6.21 5a4.58 4.58 0 00.54 2.34c.83 1.73 2.38 2.76 7.24 4.86 8.95 3.85 12.78 6.39 15.16 10 2.66 4 3.25 10.46 1.45 15.24-2 5.2-6.9 8.73-13.83 9.9a38.32 38.32 0 01-9.52-.1 23 23 0 01-12.72-6.63c-1.15-1.27-3.39-4.58-3.25-4.82a9.34 9.34 0 011.15-.73L82 101l3.59-2.08.75 1.11a16.78 16.78 0 004.74 4.54c4 2.1 9.46 1.81 12.16-.62a5.43 5.43 0 00.69-6.92c-1-1.39-3-2.56-8.59-5-6.45-2.78-9.23-4.5-11.77-7.24a16.48 16.48 0 01-3.43-6.25 25 25 0 01-.22-8c1.33-6.23 6-10.58 12.82-11.87a31.66 31.66 0 019.49.26zm-29.34 5.24v5.12H56.66v46.23H45.15V69.26H28.88v-5a49.19 49.19 0 01.12-5.17C29.08 59 39 59 51 59h21.83z"/></svg>',One='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill="#F0DB4F" d="M1.408 1.408h125.184v125.185H1.408z"/><path fill="#323330" d="M116.347 96.736c-.917-5.711-4.641-10.508-15.672-14.981-3.832-1.761-8.104-3.022-9.377-5.926-.452-1.69-.512-2.642-.226-3.665.821-3.32 4.784-4.355 7.925-3.403 2.023.678 3.938 2.237 5.093 4.724 5.402-3.498 5.391-3.475 9.163-5.879-1.381-2.141-2.118-3.129-3.022-4.045-3.249-3.629-7.676-5.498-14.756-5.355l-3.688.477c-3.534.893-6.902 2.748-8.877 5.235-5.926 6.724-4.236 18.492 2.975 23.335 7.104 5.332 17.54 6.545 18.873 11.531 1.297 6.104-4.486 8.08-10.234 7.378-4.236-.881-6.592-3.034-9.139-6.949-4.688 2.713-4.688 2.713-9.508 5.485 1.143 2.499 2.344 3.63 4.26 5.795 9.068 9.198 31.76 8.746 35.83-5.176.165-.478 1.261-3.666.38-8.581zM69.462 58.943H57.753l-.048 30.272c0 6.438.333 12.34-.714 14.149-1.713 3.558-6.152 3.117-8.175 2.427-2.059-1.012-3.106-2.451-4.319-4.485-.333-.584-.583-1.036-.667-1.071l-9.52 5.83c1.583 3.249 3.915 6.069 6.902 7.901 4.462 2.678 10.459 3.499 16.731 2.059 4.082-1.189 7.604-3.652 9.448-7.401 2.666-4.915 2.094-10.864 2.07-17.444.06-10.735.001-21.468.001-32.237z"/></svg>',gD='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><g fill="#61DAFB"><circle cx="64" cy="64" r="11.4"/><path d="M107.3 45.2c-2.2-.8-4.5-1.6-6.9-2.3.6-2.4 1.1-4.8 1.5-7.1 2.1-13.2-.2-22.5-6.6-26.1-1.9-1.1-4-1.6-6.4-1.6-7 0-15.9 5.2-24.9 13.9-9-8.7-17.9-13.9-24.9-13.9-2.4 0-4.5.5-6.4 1.6-6.4 3.7-8.7 13-6.6 26.1.4 2.3.9 4.7 1.5 7.1-2.4.7-4.7 1.4-6.9 2.3C8.2 50 1.4 56.6 1.4 64s6.9 14 19.3 18.8c2.2.8 4.5 1.6 6.9 2.3-.6 2.4-1.1 4.8-1.5 7.1-2.1 13.2.2 22.5 6.6 26.1 1.9 1.1 4 1.6 6.4 1.6 7.1 0 16-5.2 24.9-13.9 9 8.7 17.9 13.9 24.9 13.9 2.4 0 4.5-.5 6.4-1.6 6.4-3.7 8.7-13 6.6-26.1-.4-2.3-.9-4.7-1.5-7.1 2.4-.7 4.7-1.4 6.9-2.3 12.5-4.8 19.3-11.4 19.3-18.8s-6.8-14-19.3-18.8zM92.5 14.7c4.1 2.4 5.5 9.8 3.8 20.3-.3 2.1-.8 4.3-1.4 6.6-5.2-1.2-10.7-2-16.5-2.5-3.4-4.8-6.9-9.1-10.4-13 7.4-7.3 14.9-12.3 21-12.3 1.3 0 2.5.3 3.5.9zM81.3 74c-1.8 3.2-3.9 6.4-6.1 9.6-3.7.3-7.4.4-11.2.4-3.9 0-7.6-.1-11.2-.4-2.2-3.2-4.2-6.4-6-9.6-1.9-3.3-3.7-6.7-5.3-10 1.6-3.3 3.4-6.7 5.3-10 1.8-3.2 3.9-6.4 6.1-9.6 3.7-.3 7.4-.4 11.2-.4 3.9 0 7.6.1 11.2.4 2.2 3.2 4.2 6.4 6 9.6 1.9 3.3 3.7 6.7 5.3 10-1.7 3.3-3.4 6.6-5.3 10zm8.3-3.3c1.5 3.5 2.7 6.9 3.8 10.3-3.4.8-7 1.4-10.8 1.9 1.2-1.9 2.5-3.9 3.6-6 1.2-2.1 2.3-4.2 3.4-6.2zM64 97.8c-2.4-2.6-4.7-5.4-6.9-8.3 2.3.1 4.6.2 6.9.2 2.3 0 4.6-.1 6.9-.2-2.2 2.9-4.5 5.7-6.9 8.3zm-18.6-15c-3.8-.5-7.4-1.1-10.8-1.9 1.1-3.3 2.3-6.8 3.8-10.3 1.1 2 2.2 4.1 3.4 6.1 1.2 2.2 2.4 4.1 3.6 6.1zm-7-25.5c-1.5-3.5-2.7-6.9-3.8-10.3 3.4-.8 7-1.4 10.8-1.9-1.2 1.9-2.5 3.9-3.6 6-1.2 2.1-2.3 4.2-3.4 6.2zM64 30.2c2.4 2.6 4.7 5.4 6.9 8.3-2.3-.1-4.6-.2-6.9-.2-2.3 0-4.6.1-6.9.2 2.2-2.9 4.5-5.7 6.9-8.3zm22.2 21l-3.6-6c3.8.5 7.4 1.1 10.8 1.9-1.1 3.3-2.3 6.8-3.8 10.3-1.1-2.1-2.2-4.2-3.4-6.2zM31.7 35c-1.7-10.5-.3-17.9 3.8-20.3 1-.6 2.2-.9 3.5-.9 6 0 13.5 4.9 21 12.3-3.5 3.8-7 8.2-10.4 13-5.8.5-11.3 1.4-16.5 2.5-.6-2.3-1-4.5-1.4-6.6zM7 64c0-4.7 5.7-9.7 15.7-13.4 2-.8 4.2-1.5 6.4-2.1 1.6 5 3.6 10.3 6 15.6-2.4 5.3-4.5 10.5-6 15.5C15.3 75.6 7 69.6 7 64zm28.5 49.3c-4.1-2.4-5.5-9.8-3.8-20.3.3-2.1.8-4.3 1.4-6.6 5.2 1.2 10.7 2 16.5 2.5 3.4 4.8 6.9 9.1 10.4 13-7.4 7.3-14.9 12.3-21 12.3-1.3 0-2.5-.3-3.5-.9zM96.3 93c1.7 10.5.3 17.9-3.8 20.3-1 .6-2.2.9-3.5.9-6 0-13.5-4.9-21-12.3 3.5-3.8 7-8.2 10.4-13 5.8-.5 11.3-1.4 16.5-2.5.6 2.3 1 4.5 1.4 6.6zm9-15.6c-2 .8-4.2 1.5-6.4 2.1-1.6-5-3.6-10.3-6-15.6 2.4-5.3 4.5-10.5 6-15.5 13.8 4 22.1 10 22.1 15.6 0 4.7-5.8 9.7-15.7 13.4z"/></g></svg>',$ne=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><linearGradient id="python-original-a" gradientUnits="userSpaceOnUse" x1="70.252" y1="1237.476" x2="170.659" y2="1151.089" gradientTransform="matrix(.563 0 0 -.568 -29.215 707.817)"><stop offset="0" stop-color="#5A9FD4"/><stop offset="1" stop-color="#306998"/></linearGradient><linearGradient id="python-original-b" gradientUnits="userSpaceOnUse" x1="209.474" y1="1098.811" x2="173.62" y2="1149.537" gradientTransform="matrix(.563 0 0 -.568 -29.215 707.817)"><stop offset="0" stop-color="#FFD43B"/><stop offset="1" stop-color="#FFE873"/></linearGradient><path fill="url(#python-original-a)" d="M63.391 1.988c-4.222.02-8.252.379-11.8 1.007-10.45 1.846-12.346 5.71-12.346 12.837v9.411h24.693v3.137H29.977c-7.176 0-13.46 4.313-15.426 12.521-2.268 9.405-2.368 15.275 0 25.096 1.755 7.311 5.947 12.519 13.124 12.519h8.491V67.234c0-8.151 7.051-15.34 15.426-15.34h24.665c6.866 0 12.346-5.654 12.346-12.548V15.833c0-6.693-5.646-11.72-12.346-12.837-4.244-.706-8.645-1.027-12.866-1.008zM50.037 9.557c2.55 0 4.634 2.117 4.634 4.721 0 2.593-2.083 4.69-4.634 4.69-2.56 0-4.633-2.097-4.633-4.69-.001-2.604 2.073-4.721 4.633-4.721z" transform="translate(0 10.26)"/><path fill="url(#python-original-b)" d="M91.682 28.38v10.966c0 8.5-7.208 15.655-15.426 15.655H51.591c-6.756 0-12.346 5.783-12.346 12.549v23.515c0 6.691 5.818 10.628 12.346 12.547 7.816 2.297 15.312 2.713 24.665 0 6.216-1.801 12.346-5.423 12.346-12.547v-9.412H63.938v-3.138h37.012c7.176 0 9.852-5.005 12.348-12.519 2.578-7.735 2.467-15.174 0-25.096-1.774-7.145-5.161-12.521-12.348-12.521h-9.268zM77.809 87.927c2.561 0 4.634 2.097 4.634 4.692 0 2.602-2.074 4.719-4.634 4.719-2.55 0-4.633-2.117-4.633-4.719 0-2.595 2.083-4.692 4.633-4.692z" transform="translate(0 10.26)"/><radialGradient id="python-original-c" cx="1825.678" cy="444.45" r="26.743" gradientTransform="matrix(0 -.24 -1.055 0 532.979 557.576)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#B8B8B8" stop-opacity=".498"/><stop offset="1" stop-color="#7F7F7F" stop-opacity="0"/></radialGradient><path opacity=".444" fill="url(#python-original-c)" d="M97.309 119.597c0 3.543-14.816 6.416-33.091 6.416-18.276 0-33.092-2.873-33.092-6.416 0-3.544 14.815-6.417 33.092-6.417 18.275 0 33.091 2.872 33.091 6.417z"/></svg>
470
+ `,Pne='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill="#E44D26" d="M19.037 113.876L9.032 1.661h109.936l-10.016 112.198-45.019 12.48z"/><path fill="#F16529" d="M64 116.8l36.378-10.086 8.559-95.878H64z"/><path fill="#EBEBEB" d="M64 52.455H45.788L44.53 38.361H64V24.599H29.489l.33 3.692 3.382 37.927H64zm0 35.743l-.061.017-15.327-4.14-.979-10.975H33.816l1.928 21.609 28.193 7.826.063-.017z"/><path fill="#fff" d="M63.952 52.455v13.763h16.947l-1.597 17.849-15.35 4.143v14.319l28.215-7.82.207-2.325 3.234-36.233.335-3.696h-3.708zm0-27.856v13.762h33.244l.276-3.092.628-6.978.329-3.692z"/></svg>',Nne='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill="#1572B6" d="M18.814 114.123L8.76 1.352h110.48l-10.064 112.754-45.243 12.543-45.119-12.526z"/><path fill="#33A9DC" d="M64.001 117.062l36.559-10.136 8.601-96.354h-45.16v106.49z"/><path fill="#fff" d="M64.001 51.429h18.302l1.264-14.163H64.001V23.435h34.682l-.332 3.711-3.4 38.114h-30.95V51.429z"/><path fill="#EBEBEB" d="M64.083 87.349l-.061.018-15.403-4.159-.985-11.031H33.752l1.937 21.717 28.331 7.863.063-.018v-14.39z"/><path fill="#fff" d="M81.127 64.675l-1.666 18.522-15.426 4.164v14.39l28.354-7.858.208-2.337 2.406-26.881H81.127z"/><path fill="#EBEBEB" d="M64.048 23.435v13.831H30.64l-.277-3.108-.63-7.012-.331-3.711h34.646zm-.047 27.996v13.831H48.792l-.277-3.108-.631-7.012-.33-3.711h16.447z"/></svg>',Ine=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><linearGradient id="a" x1="-670.564" x2="-583.105" y1="-280.831" y2="-368.306" gradientTransform="matrix(.9988 0 0 -.9987 689.011 -259.008)" gradientUnits="userSpaceOnUse"><stop offset="0"/><stop offset="1" stop-color="#fff"/></linearGradient><path fill="url(#a)" fill-rule="evenodd" d="M63.895 94.303c27.433 37.398 54.281-10.438 54.241-39.205-.046-34.012-34.518-53.021-54.263-53.021C32.182 2.077 2 28.269 2 64.105 2 103.937 36.596 126 63.873 126c-6.172-.889-26.742-5.296-27.019-52.674-.186-32.044 10.453-44.846 26.974-39.214.37.137 18.223 7.18 18.223 30.187 0 22.908-18.156 30.004-18.156 30.004z" clip-rule="evenodd"/><linearGradient id="b" x1="-579.148" x2="-666.607" y1="-364.34" y2="-276.873" gradientTransform="matrix(.9988 0 0 -.9987 689.011 -259.008)" gradientUnits="userSpaceOnUse"><stop offset="0"/><stop offset="1" stop-color="#fff"/></linearGradient><path fill="url(#b)" fill-rule="evenodd" d="M63.863 34.086C45.736 27.838 23.53 42.778 23.53 72.703 23.53 121.565 59.739 126 64.128 126 95.818 126 126 99.808 126 63.972 126 24.14 91.404 2.077 64.127 2.077c7.555-1.046 40.719 8.176 40.719 53.504 0 29.559-24.764 45.651-40.87 38.776-.37-.137-18.223-7.18-18.223-30.187 0-22.91 18.11-30.085 18.11-30.084z" clip-rule="evenodd"/></svg>
471
+ `,jne=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill="#293138" d="M112.205 26.129 71.8 2.142A15.326 15.326 0 0 0 64.005 0c-2.688 0-5.386.717-7.796 2.152L15.795 26.14C10.976 28.999 8 34.289 8 40.018v47.975c0 5.729 2.967 11.019 7.796 13.878L56.2 125.858A15.193 15.193 0 0 0 63.995 128a15.32 15.32 0 0 0 7.796-2.142l40.414-23.987c4.819-2.86 7.796-8.16 7.796-13.878V40.007c0-5.718-2.967-11.019-7.796-13.878zm-31.29 74.907.063 3.448c0 .418-.267.889-.588 1.06l-2.046 1.178c-.321.16-.6-.032-.6-.45l-.032-3.394c-1.745.728-3.523.9-4.647.45-.214-.086-.31-.397-.225-.76l.739-3.117c.064-.246.193-.493.364-.643a.726.726 0 0 1 .193-.139c.117-.064.235-.075.332-.032 1.22.407 2.773.214 4.272-.535 1.907-.964 3.18-2.913 3.16-4.84-.022-1.757-.964-2.474-3.267-2.496-2.934.01-5.675-.567-5.718-4.894-.032-3.555 1.81-7.26 4.744-9.595l-.032-3.48c0-.428.257-.9.589-1.07l1.98-1.264c.322-.161.6.042.6.46l.033 3.48c1.456-.578 2.72-.738 3.865-.47.247.063.364.406.257.802l-.77 3.084a1.372 1.372 0 0 1-.354.622.825.825 0 0 1-.203.15c-.108.053-.204.064-.3.053-.525-.118-1.767-.385-3.727.6-2.056 1.038-2.773 2.827-2.763 4.155.022 1.585.825 2.066 3.63 2.11 3.738.063 5.344 1.691 5.387 5.45.053 3.684-1.917 7.657-4.937 10.077zm28.206-64.787L70.89 59.86c-4.765 2.784-8.278 5.911-8.288 11.662v47.107c0 3.437 1.392 5.665 3.523 6.318a12.81 12.81 0 0 1-2.12.204c-2.239 0-4.445-.61-6.383-1.757L17.219 99.408c-3.951-2.345-6.403-6.725-6.403-11.426V40.007c0-4.7 2.452-9.08 6.403-11.426L57.634 4.594a12.555 12.555 0 0 1 6.382-1.756c2.238 0 4.444.61 6.382 1.756l40.415 23.987c3.33 1.981 5.579 5.397 6.21 9.242-1.36-2.86-4.38-3.63-7.902-1.574z"/><path fill="#4fa847" d="m101.614 92.619-10.066 6.018c-.268.16-.46.332-.46.653v2.635c0 .32.214.46.481.3l10.216-6.212c.268-.16.31-.45.31-.77v-2.324c0-.322-.213-.45-.481-.3z"/></svg>
472
+ `,Lne=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path style="line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;text-orientation:mixed;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;isolation:auto;mix-blend-mode:normal;solid-color:#000;solid-opacity:1" d="M11.95 24.348c-5.836 0-10.618 4.867-10.618 10.681v57.942c0 5.814 4.782 10.681 10.617 10.681h104.102c5.835 0 10.617-4.867 10.617-10.681V35.03c0-5.814-4.783-10.681-10.617-10.681H14.898l-.002-.002H11.95zm-.007 9.543h104.108c.625 0 1.076.423 1.076 1.14v57.94c0 .717-.453 1.14-1.076 1.14H11.949c-.623 0-1.076-.423-1.076-1.14V35.029c0-.715.451-1.135 1.07-1.138z" color="#000" font-weight="400" font-family="sans-serif" overflow="visible"/><path d="M20.721 84.1V43.9H32.42l11.697 14.78L55.81 43.9h11.696v40.2H55.81V61.044l-11.694 14.78-11.698-14.78V84.1H20.722zm73.104 0L76.28 64.591h11.697V43.9h11.698v20.69h11.698zm0 0"/></svg>
473
+ `;function Yi(e){var r,i;const t=((r=e.match(/viewBox="([^"]+)"/))==null?void 0:r[1])??"0 0 128 128",n=((i=e.match(/<svg[^>]*>([\s\S]*)<\/svg>/))==null?void 0:i[1])??"";return{viewBox:t,body:n}}const Fne={typescript:Yi(Mne),tsx:Yi(gD),javascript:Yi(One),jsx:Yi(gD),python:Yi($ne),html:Yi(Pne),css:Yi(Nne),json:Yi(Ine),bash:Yi(jne),markdown:Yi(Lne)},iI=({language:e,size:t=16,...n})=>{const r=Fne[e];return r?E.jsx("svg",{"data-slot":"language-icon","data-language":e,role:"img","aria-label":e,viewBox:r.viewBox,width:t,height:t,dangerouslySetInnerHTML:{__html:r.body},...n}):null};iI.displayName="LanguageIcon";const oI=({filename:e,language:t,copyable:n=FQ,code:r=BP,wrappable:i=!1,wrap:o,defaultWrap:a,onWrapChange:u,className:c,LanguageIconProps:f,WrapButtonProps:h,CopyButtonProps:p,children:g,...y})=>E.jsxs(Xe,{"data-slot":"code-block-header",className:ze(ro["code-block-header"],c),ay:"center",ax:"space-between",gap:3,py:2,px:4,fullwidth:!0,...y,children:[E.jsxs(Xe,{ay:"center",gap:2,children:[t&&E.jsx(iI,{language:t,className:ro["code-block-language-icon"],...f}),e&&E.jsx(je,{size:-1,family:"mono",shade:"muted",children:e})]}),g,(i||n)&&E.jsxs(Xe,{ay:"center",gap:1,children:[i&&E.jsx(rI,{pressed:o,defaultPressed:a,onPressedChange:u,...h}),n&&E.jsx(nI,{code:r,disabled:!r,...p})]})]});oI.displayName="CodeBlockHeader";const sI=({html:e,code:t,showLineNumbers:n=zP,wrap:r=UP,className:i,...o})=>{const a=ze(ro["code-block-content"],r&&ro["code-block-content-wrap"],zQ({showLineNumbers:n}),i),u={"data-slot":"code-block-content","data-line-numbers":n||void 0,"data-wrap":r||void 0,ax:"stretch",fullwidth:!0};if(e)return E.jsx(Ye,{...u,className:a,dangerouslySetInnerHTML:{__html:e},...o});const c=(t??"").split(`
474
+ `);return E.jsx(Ye,{...u,className:a,...o,children:E.jsx("pre",{children:E.jsx("code",{children:c.map((f,h)=>E.jsx("span",{className:"line",children:f||" "},h))})})})};sI.displayName="CodeBlockContent";const mC=({code:e,language:t,filename:n,showLineNumbers:r,highlightLines:i,rows:o,defaultExpanded:a=!1,defaultWrap:u=UP,onWrapChange:c,onCopy:f,html:h,className:p,HeaderProps:g,LanguageIconProps:y,WrapButtonProps:b,CopyButtonProps:v,...S})=>{const x=t??LQ,[_,R]=C.useState(u),T=C.useCallback(U=>{R(U),c==null||c(U)},[c]),{html:A,error:D}=tI(e,x,{highlightLines:i}),O=h||A||void 0,[$,z]=C.useState(a),[j,I]=C.useState(!1),M=C.useRef(null),B=o?`calc(${o} * var(--code-font-size) * var(--code-line-height) + 2 * var(--code-padding))`:void 0,G=o!=null&&!$,L=B?{maxHeight:G?B:void 0,overflowY:"auto"}:void 0;C.useEffect(()=>{if(!o||!M.current||!O)return;const U=M.current;I(U.scrollHeight>U.clientHeight+1)},[O,o,_,$]);const F=o!=null&&(j||$);return E.jsxs("div",{"data-slot":"code-block","data-expanded":o!=null&&$||void 0,"data-wrap":_||void 0,className:ze(ro["code-block"],p),...S,children:[E.jsx(oI,{filename:n,language:t,copyable:!0,code:e,wrappable:!0,wrap:_,onWrapChange:T,LanguageIconProps:y,WrapButtonProps:b,CopyButtonProps:{onCopy:f,...v},...g}),E.jsx("div",{ref:M,"data-slot":"code-block-scroll",className:ro["code-block-scroll"],style:L,children:E.jsx(sI,{html:O,code:e,showLineNumbers:r,wrap:_})}),D&&!h&&E.jsxs("div",{"data-slot":"code-block-error",className:ro["code-block-error"],children:["[Error: ",D.message,"]"]}),F&&E.jsx("button",{type:"button","data-slot":"code-block-expand-toggle",className:ro["code-block-expand-toggle"],onClick:()=>z(U=>!U),"aria-expanded":$,children:$?"Show less":"Show more"})]})};mC.displayName="CodeBlock";const E1={"code-inline":"_code-inline_h7rdt_1"},aI=({language:e,html:t,className:n,children:r,...i})=>{const o=typeof r=="string"?r:"",{html:a}=tI(o,e||"typescript");if(!e)return E.jsx("code",{"data-slot":"code-inline",className:ze(E1["code-inline"],n),...i,children:r});const u=t||a;if(u){const c=u.replace(/<pre[^>]*><code[^>]*>/,"").replace(/<\/code><\/pre>/,"");return E.jsx("code",{"data-slot":"code-inline",className:ze(E1["code-inline"],n),dangerouslySetInnerHTML:{__html:c},...i})}return E.jsx("code",{"data-slot":"code-inline",className:ze(E1["code-inline"],n),...i,children:r})};aI.displayName="CodeInline";const yD={};function _a(e,t){const n=C.useRef(yD);return n.current===yD&&(n.current=e(t)),n}const k1=os[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],zne=k1&&k1!==C.useLayoutEffect?k1:e=>e();function ar(e){const t=_a(Bne).current;return t.next=e,zne(t.effect),t.trampoline}function Bne(){const e={next:void 0,callback:Une,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function Une(){}function lI({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=C.useRef(e!==void 0),[o,a]=C.useState(t),u=i?e:o,c=C.useCallback(f=>{i||a(f)},[]);return[u,c]}const Hne=()=>{},Hn=typeof document<"u"?C.useLayoutEffect:Hne;function gw(e,t,n,r){const i=_a(uI).current;return qne(i,e,t,n,r)&&cI(i,[e,t,n,r]),i.callback}function Gne(e){const t=_a(uI).current;return Vne(t,e)&&cI(t,e),t.callback}function uI(){return{callback:null,cleanup:null,refs:[]}}function qne(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function Vne(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function cI(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const a=o(n);typeof a=="function"&&(r[i]=a);break}case"object":{o.current=n;break}}}e.cleanup=()=>{for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const a=r[i];typeof a=="function"?a():o(null);break}case"object":{o.current=null;break}}}}}}}const fI={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},Yne={...fI,position:"fixed",top:0,left:0},Wne={...fI,position:"absolute"};function Cr(){}const Pi=Object.freeze({});function dI(e,t,n,r){let i=!1,o=!1;const a=Pi;return{reason:e,event:t??new Event("base-ui"),cancel(){i=!0},allowPropagation(){o=!0},get isCanceled(){return i},get isPropagationAllowed(){return o},trigger:n,...a}}function df(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}const Kne=[];function hI(e){C.useEffect(e,Kne)}const Am=null;let Xne=class{constructor(){te(this,"callbacks",[]);te(this,"callbacksCount",0);te(this,"nextId",1);te(this,"startId",1);te(this,"isScheduled",!1);te(this,"tick",t=>{var i;this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)(i=n[o])==null||i.call(n,t)})}request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,(!this.isScheduled||!1)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}};const Dm=new Xne;let ul=class pI{constructor(){te(this,"currentId",Am);te(this,"cancel",()=>{this.currentId!==Am&&(Dm.cancel(this.currentId),this.currentId=Am)});te(this,"disposeEffect",()=>this.cancel)}static create(){return new pI}static request(t){return Dm.request(t)}static cancel(t){return Dm.cancel(t)}request(t){this.cancel(),this.currentId=Dm.request(()=>{this.currentId=Am,t()})}};function Qne(){const e=_a(ul.create).current;return hI(e.disposeEffect),e}function Zne(e){return e==null?e:"current"in e?e.current:e}let gC=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const Jne={[gC.startingStyle]:""},ere={[gC.endingStyle]:""},mI={transitionStatus(e){return e==="starting"?Jne:e==="ending"?ere:null}};function tre(e,t=!1,n=!0){const r=Qne();return ar((i,o=null)=>{r.cancel();function a(){gn.flushSync(i)}const u=Zne(e);if(u==null)return;const c=u;if(typeof c.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)i();else{let f=function(){const p=gC.startingStyle;if(!c.hasAttribute(p)){r.request(h);return}const g=new MutationObserver(()=>{c.hasAttribute(p)||(g.disconnect(),h())});g.observe(c,{attributes:!0,attributeFilter:[p]}),o==null||o.addEventListener("abort",()=>g.disconnect(),{once:!0})},h=function(){Promise.all(c.getAnimations().map(p=>p.finished)).then(()=>{o!=null&&o.aborted||a()}).catch(()=>{const p=c.getAnimations();if(n){if(o!=null&&o.aborted)return;a()}else p.length>0&&p.some(g=>g.pending||g.playState!=="finished")&&h()})};if(t){f();return}r.request(h)}})}function gI(e){const{enabled:t=!0,open:n,ref:r,onComplete:i}=e,o=ar(i),a=tre(r,n,!1);C.useEffect(()=>{if(!t)return;const u=new AbortController;return a(o,u.signal),()=>{u.abort()}},[t,n,o,a])}let bD=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const zy={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Zl={valid(e){return e===null?null:e?{[bD.valid]:""}:{[bD.invalid]:""}}},yI=C.createContext({invalid:void 0,name:void 0,validityData:{state:zy,errors:[],error:"",value:"",initialValue:null},setValidityData:Cr,disabled:void 0,touched:!1,setTouched:Cr,dirty:!1,setDirty:Cr,filled:!1,setFilled:Cr,focused:!1,setFocused:Cr,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=Pi)=>e,getInputValidationProps:(e=Pi)=>e,inputRef:{current:null},commit:async()=>{}}});function hf(e=!0){const t=C.useContext(yI);if(t.setValidityData===Cr&&!e)throw new Error(df(28));return t}function yw(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const nre=C.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Cr,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function Lh(){return C.useContext(nre)}function bI(e){const{enabled:t=!0,value:n,id:r,name:i,controlRef:o,commit:a}=e,{formRef:u}=Lh(),{invalid:c,markedDirtyRef:f,validityData:h,setValidityData:p}=hf(),g=ar(e.getValue);Hn(()=>{if(!t)return;let y=n;y===void 0&&(y=g()),h.initialValue===null&&y!==null&&p(b=>({...b,initialValue:y}))},[t,p,n,h.initialValue,g]),Hn(()=>{!t||!r||u.current.fields.set(r,{getValue:g,name:i,controlRef:o,validityData:yw(h,c),validate(y=!0){let b=n;b===void 0&&(b=g()),f.current=!0,y?gn.flushSync(()=>a(b)):a(b)}})},[a,o,t,u,g,r,c,f,i,h,n]),Hn(()=>{const y=u.current.fields;return()=>{r&&y.delete(r)}},[u,r])}function vI(){return typeof window<"u"}function xI(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function rre(e){return vI()?e instanceof Element||e instanceof xI(e).Element:!1}function wI(e){return vI()?e instanceof HTMLElement||e instanceof xI(e).HTMLElement:!1}const ire={...os};let vD=0;function ore(e,t="mui"){const[n,r]=C.useState(e),i=e||n;return C.useEffect(()=>{n==null&&(vD+=1,r(`${t}-${vD}`))},[n,t]),i}const xD=ire.useId;function sre(e,t){if(xD!==void 0){const n=xD();return e??`${t}-${n}`}return ore(e,t)}function zl(e){return sre(e,"base-ui")}const SI=C.createContext({controlId:void 0,registerControlId:Cr,labelId:void 0,setLabelId:Cr,messageIds:[],setMessageIds:Cr,getDescriptionProps:e=>e});function Ta(){return C.useContext(SI)}function are(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:o}=Ta(),a=zl(t),u=n?i:void 0,c=_a(()=>Symbol("labelable-control")),f=C.useRef(!1),h=C.useRef(t!=null),p=ar(()=>{!f.current||o===Cr||(f.current=!1,o(c.current,void 0))});return Hn(()=>{if(o===Cr)return;let g;if(n){const y=r==null?void 0:r.current;rre(y)&&y.closest("label")!=null?g=t??null:g=u??a}else if(t!=null)h.current=!0,g=t;else if(h.current)g=a;else{p();return}if(g===void 0){p();return}f.current=!0,o(c.current,g)},[t,r,u,o,n,a,c,p]),C.useEffect(()=>p,[p]),i??a}function CI(e,t=!1,n=!1){const[r,i]=C.useState(e&&t?"idle":void 0),[o,a]=C.useState(e);return e&&!o&&(a(!0),i("starting")),!e&&o&&r!=="ending"&&!n&&i("ending"),!e&&!o&&r==="ending"&&i(void 0),Hn(()=>{if(!e&&o&&r!=="ending"&&n){const u=ul.request(()=>{i("ending")});return()=>{ul.cancel(u)}}},[e,o,r,n]),Hn(()=>{if(!e||t)return;const u=ul.request(()=>{i(void 0)});return()=>{ul.cancel(u)}},[t,e]),Hn(()=>{if(!e||!t)return;e&&o&&r!=="idle"&&i("starting");const u=ul.request(()=>{i("idle")});return()=>{ul.cancel(u)}},[t,e,o,i,r]),C.useMemo(()=>({mounted:o,setMounted:a,transitionStatus:r}),[o,r])}function lre(e,t){const n=C.useRef(e),r=ar(t);Hn(()=>{n.current!==e&&r(n.current)},[e,r]),Hn(()=>{n.current=e},[e])}const ure=parseInt(C.version,10);function cre(e){return ure>=e}function fre(e){var n;let t=e.activeElement;for(;((n=t==null?void 0:t.shadowRoot)==null?void 0:n.activeElement)!=null;)t=t.shadowRoot.activeElement;return t}function dre(e){return"composedPath"in e?e.composedPath()[0]:e.target}const bd=0;let hre=class EI{constructor(){te(this,"currentId",bd);te(this,"clear",()=>{this.currentId!==bd&&(clearTimeout(this.currentId),this.currentId=bd)});te(this,"disposeEffect",()=>this.clear)}static create(){return new EI}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=bd,n()},t)}isStarted(){return this.currentId!==bd}};function pre(){const e=_a(hre.create).current;return hI(e.disposeEffect),e}const kI="none";function RI(e){return(e==null?void 0:e.ownerDocument)||document}const Pl={"field-label-group":"_field-label-group_1bag1_3","field-label":"_field-label_1bag1_3","field-root-floating":"_field-root-floating_1bag1_15","field-hint":"_field-hint_1bag1_19","field-error-tooltip":"_field-error-tooltip_1bag1_20","field-error-absolute":"_field-error-absolute_1bag1_31"},_I=50,TI=({icon:e,text:t,tooltip:n,className:r,...i})=>n&&e?E.jsxs("span",{"data-slot":"field-hint",className:ze(Pl["field-hint"],r),...i,children:[E.jsx($l,{trigger:E.jsx(e,{}),delay:_I,TriggerProps:{render:E.jsx("span",{})},PositionerProps:{align:"end"},children:n}),t&&E.jsx(je,{size:-1,children:t})]}):E.jsxs("span",{"data-slot":"field-hint",className:ze(Pl["field-hint"],r),...i,children:[e&&E.jsx(e,{}),t&&E.jsx(je,{size:-1,children:t})]});TI.displayName="FieldHint";const mre=C.createContext({legendId:void 0,setLegendId:()=>{},disabled:void 0});function gre(e=!1){const t=C.useContext(mre);if(!t&&!e)throw new Error(df(86));return t}function wD(e){if(!C.isValidElement(e))return null;const t=e,n=t.props;return(cre(19)?n==null?void 0:n.ref:t.ref)??null}function bw(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function yre(e,t){const n={};for(const r in e){const i=e[r];if(t!=null&&t.hasOwnProperty(r)){const o=t[r](i);o!=null&&Object.assign(n,o);continue}i===!0?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function bre(e,t){return typeof e=="function"?e(t):e}function vre(e,t){return typeof e=="function"?e(t):e}const $d={};function Fc(e,t,n,r,i){let o={...vw(e,$d)};return t&&(o=cg(o,t)),n&&(o=cg(o,n)),r&&(o=cg(o,r)),o}function xre(e){if(e.length===0)return $d;if(e.length===1)return vw(e[0],$d);let t={...vw(e[0],$d)};for(let n=1;n<e.length;n+=1)t=cg(t,e[n]);return t}function cg(e,t){return AI(t)?t(e):wre(e,t)}function wre(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=bw(e.style,r);break}case"className":{e[n]=DI(e.className,r);break}default:Sre(n,r)?e[n]=Cre(e[n],r):e[n]=r}}return e}function Sre(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t=="function"||typeof t>"u")}function AI(e){return typeof e=="function"}function vw(e,t){return AI(e)?e(t):e??$d}function Cre(e,t){return t?e?n=>{if(Ere(n)){const i=n;xw(i);const o=t(i);return i.baseUIHandlerPrevented||(e==null||e(i)),o}const r=t(n);return e==null||e(n),r}:t:e}function xw(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function DI(e,t){return t?e?t+" "+e:t:e}function Ere(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Jl(e,t,n={}){const r=t.render,i=kre(t,n);if(n.enabled===!1)return null;const o=n.state??Pi;return _re(e,r,i,o)}function kre(e,t={}){const{className:n,style:r,render:i}=e,{state:o=Pi,ref:a,props:u,stateAttributesMapping:c,enabled:f=!0}=t,h=f?bre(n,o):void 0,p=f?vre(r,o):void 0,g=f?yre(o,c):Pi,y=f?bw(g,Array.isArray(u)?xre(u):u)??Pi:Pi;return typeof document<"u"&&(f?Array.isArray(a)?y.ref=Gne([y.ref,wD(i),...a]):y.ref=gw(y.ref,wD(i),a):gw(null,null)),f?(h!==void 0&&(y.className=DI(y.className,h)),p!==void 0&&(y.style=bw(y.style,p)),y):Pi}const Rre=Symbol.for("react.lazy");function _re(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=Fc(n,t.props);i.ref=n.ref;let o=t;return(o==null?void 0:o.$$typeof)===Rre&&(o=C.Children.toArray(t)[0]),C.cloneElement(o,i)}if(e&&typeof e=="string")return Tre(e,n);throw new Error(df(8))}function Tre(e,t){return e==="button"?C.createElement("button",{type:"button",...t,key:t.key}):e==="img"?C.createElement("img",{alt:"",...t,key:t.key}):C.createElement(e,t)}const fg=Object.keys(zy);function Are(e){if(!e||e.valid||!e.valueMissing)return!1;let t=!1;for(const n of fg)n!=="valid"&&(n==="valueMissing"&&(t=e[n]),e[n]&&(t=!1));return t}function Dre(e){const{formRef:t,clearErrors:n}=Lh(),{setValidityData:r,validate:i,validityData:o,validationDebounceTime:a,invalid:u,markedDirtyRef:c,state:f,name:h,shouldValidateOnChange:p}=e,{controlId:g,getDescriptionProps:y}=Ta(),b=pre(),v=C.useRef(null),S=ar(async(R,T=!1)=>{const A=v.current;if(!A)return;if(T){if(f.valid!==!1)return;const B=A.validity;if(!B.valueMissing){const L={value:R,state:{...zy,valid:!0},error:"",errors:[],initialValue:o.initialValue};if(A.setCustomValidity(""),g){const F=t.current.fields.get(g);F&&t.current.fields.set(g,{...F,...yw(L,!1)})}r(L);return}const G=fg.reduce((L,F)=>(L[F]=B[F],L),{});if(!G.valid&&!Are(G))return}function D(B){const G=fg.reduce((F,U)=>(F[U]=B.validity[U],F),{});let L=!1;for(const F of fg)if(F!=="valid"){if(F==="valueMissing"&&G[F])L=!0;else if(G[F])return G}return L&&!c.current&&(G.valid=!0,G.valueMissing=!1),G}b.clear();let O=null,$=[];const z=D(A);let j;const I=p();if(A.validationMessage&&!I)j=A.validationMessage,$=[A.validationMessage];else{const B=Array.from(t.current.fields.values()).reduce((L,F)=>(F.name&&(L[F.name]=F.getValue()),L),{}),G=i(R,B);typeof G=="object"&&G!==null&&"then"in G?O=await G:O=G,O!==null?(z.valid=!1,z.customError=!0,Array.isArray(O)?($=O,A.setCustomValidity(O.join(`
475
+ `))):O&&($=[O],A.setCustomValidity(O))):I&&(A.setCustomValidity(""),z.customError=!1,A.validationMessage?(j=A.validationMessage,$=[A.validationMessage]):A.validity.valid&&!z.valid&&(z.valid=!0))}const M={value:R,state:z,error:j??(Array.isArray(O)?O[0]:O??""),errors:$,initialValue:o.initialValue};if(g){const B=t.current.fields.get(g);B&&t.current.fields.set(g,{...B,...yw(M,u)})}r(M)}),x=C.useCallback((R={})=>Fc(y,f.valid===!1?{"aria-invalid":!0}:Pi,R),[y,f.valid]),_=C.useCallback((R={})=>Fc({onChange(T){if(T.nativeEvent.defaultPrevented)return;if(n(h),!p()){S(T.currentTarget.value,!0);return}if(u)return;const A=T.currentTarget;if(A.value===""){S(A.value);return}b.clear(),a?b.start(a,()=>{S(A.value)}):S(A.value)}},x(R)),[x,n,h,b,S,u,a,p]);return C.useMemo(()=>({getValidationProps:x,getInputValidationProps:_,inputRef:v,commit:S}),[x,_,S])}const Mre=function(e){const t=zl(),[n,r]=C.useState(e.initialControlId===void 0?t:e.initialControlId),[i,o]=C.useState(void 0),[a,u]=C.useState([]),c=_a(()=>new Map),{messageIds:f}=Ta(),h=ar((y,b)=>{const v=c.current;if(b===void 0){v.delete(y);return}v.set(y,b),r(S=>{if(v.size===0)return;let x;for(const _ of v.values()){if(S!==void 0&&_===S)return S;x===void 0&&(x=_)}return x})}),p=C.useCallback(y=>Fc({"aria-describedby":f.concat(a).join(" ")||void 0},y),[f,a]),g=C.useMemo(()=>({controlId:n,registerControlId:h,labelId:i,setLabelId:o,messageIds:a,setMessageIds:u,getDescriptionProps:p}),[n,h,i,o,a,u,p]);return E.jsx(SI.Provider,{value:g,children:e.children})},Ore=C.forwardRef(function(e,t){const{errors:n,validationMode:r,submitAttemptedRef:i}=Lh(),{render:o,className:a,validate:u,validationDebounceTime:c=0,validationMode:f=r,name:h,disabled:p=!1,invalid:g,dirty:y,touched:b,actionsRef:v,...S}=e,{disabled:x}=gre(),_=ar(u||(()=>null)),R=x||p,[T,A]=C.useState(!1),[D,O]=C.useState(!1),[$,z]=C.useState(!1),[j,I]=C.useState(!1),M=y??D,B=b??T,G=C.useRef(!1),L=ar(ve=>{y===void 0&&(ve&&(G.current=!0),O(ve))}),F=ar(ve=>{b===void 0&&A(ve)}),U=ar(()=>f==="onChange"||f==="onSubmit"&&i.current),V=!!(g||h&&{}.hasOwnProperty.call(n,h)&&n[h]!==void 0),[W,N]=C.useState({state:zy,error:"",errors:[],value:null,initialValue:null}),Y=!V&&W.state.valid,J=C.useMemo(()=>({disabled:R,touched:B,dirty:M,valid:Y,filled:$,focused:j}),[R,B,M,Y,$,j]),H=Dre({setValidityData:N,validate:_,validityData:W,validationDebounceTime:c,invalid:V,markedDirtyRef:G,state:J,name:h,shouldValidateOnChange:U}),ie=C.useCallback(()=>{G.current=!0,H.commit(W.value)},[H,W]);C.useImperativeHandle(v,()=>({validate:ie}),[ie]);const re=C.useMemo(()=>({invalid:V,name:h,validityData:W,setValidityData:N,disabled:R,touched:B,setTouched:F,dirty:M,setDirty:L,filled:$,setFilled:z,focused:j,setFocused:I,validate:_,validationMode:f,validationDebounceTime:c,shouldValidateOnChange:U,state:J,markedDirtyRef:G,validation:H}),[V,h,W,R,B,F,M,L,$,z,j,I,_,f,c,U,J,H]),he=Jl("div",e,{ref:t,state:J,props:S,stateAttributesMapping:Zl});return E.jsx(yI.Provider,{value:re,children:he})}),$re=C.forwardRef(function(e,t){return E.jsx(Mre,{children:E.jsx(Ore,{...e,ref:t})})}),yC=({children:e,fullwidth:t,...n})=>E.jsx($re,{"data-slot":"field-root",render:E.jsx(Ye,{gap:3,ax:"stretch",fullwidth:t}),...n,children:e});yC.displayName="FieldRoot";const Pre=C.forwardRef(function(e,t){const{render:n,className:r,id:i,nativeLabel:o=!0,...a}=e,u=hf(!1),{controlId:c,setLabelId:f,labelId:h}=Ta(),p=zl(i),g=C.useRef(null),y=ar(b=>{var S;if((S=dre(b.nativeEvent))!=null&&S.closest("button,input,select,textarea")||(!b.defaultPrevented&&b.detail>1&&b.preventDefault(),o||!c))return;const v=RI(b.currentTarget).getElementById(c);wI(v)&&v.focus({focusVisible:!0})});return Hn(()=>(p&&f(p),()=>{f(void 0)}),[p,f]),Jl("label",e,{ref:[t,g],state:u.state,props:[{id:h},o?{htmlFor:c??void 0,onMouseDown:y}:{onClick:y,onPointerDown(b){b.preventDefault()}},a],stateAttributesMapping:Zl})}),bC=({required:e,weight:t="bold",className:n,children:r,...i})=>E.jsx(Pre,{"data-slot":"field-label","data-required":e??void 0,render:E.jsx(je,{render:E.jsx("label",{}),weight:t}),className:ze(Pl["field-label"],n),...i,children:r});bC.displayName="FieldLabel";const Nre={...Zl,...mI},MI=C.forwardRef(function(e,t){const{render:n,id:r,className:i,match:o,...a}=e,u=zl(r),{validityData:c,state:f,name:h}=hf(!1),{setMessageIds:p}=Ta(),{errors:g}=Lh(),y=h?g[h]:null;let b=!1;y||o===!0?b=!0:o?b=!!c.state[o]:b=c.state.valid===!1;const{mounted:v,transitionStatus:S,setMounted:x}=CI(b);Hn(()=>{if(!(!b||!u))return p(I=>I.concat(u)),()=>{p(I=>I.filter(M=>M!==u))}},[b,u,p]);const _=C.useRef(null),[R,T]=C.useState(null),[A,D]=C.useState(null),O=y||(c.errors.length>1?E.jsx("ul",{children:c.errors.map(I=>E.jsx("li",{children:I},I))}):c.error);let $=c.error;y!=null?$=Array.isArray(y)?JSON.stringify(y):y:c.errors.length>1&&($=JSON.stringify(c.errors)),b&&$!==A&&(D($),T(O)),gI({open:b,ref:_,onComplete(){b||x(!1)}});const z={...f,transitionStatus:S},j=Jl("div",e,{ref:[t,_],state:z,props:[{id:u,children:b?O:R},a],stateAttributesMapping:Nre,enabled:v});return v?j:null}),OI=e=>E.jsx(MI,{"data-slot":"field-error-tooltip",render:E.jsx($l,{delay:_I,PositionerProps:{align:"end"},PopupProps:{style:{backgroundColor:"var(--shade-foreground)"}},trigger:E.jsx("span",{className:Pl["field-error-tooltip"],children:E.jsx(aq,{color:"var(--shade-foreground)"})})}),...e});OI.displayName="FieldErrorTooltip";const ey=e=>E.jsx(MI,{"data-slot":"field-error",render:E.jsx(je,{shade:"foreground"}),...e});ey.displayName="FieldError";const Ire=C.forwardRef(function(e,t){const{render:n,id:r,className:i,...o}=e,a=zl(r),u=hf(!1),{setMessageIds:c}=Ta();return Hn(()=>{if(a)return c(f=>f.concat(a)),()=>{c(f=>f.filter(h=>h!==a))}},[a,c]),Jl("p",e,{ref:t,state:u.state,props:[{id:a},o],stateAttributesMapping:Zl})}),vC=({children:e,...t})=>E.jsx(Ire,{"data-slot":"field-description",render:E.jsx(je,{shade:"muted"}),...t,children:e});vC.displayName="FieldDescription";const $I=({label:e,hint:t,errorType:n="inline",description:r,required:i,RootProps:o,LabelProps:a,ErrorProps:u,HintProps:c,DescriptionProps:f,children:h,...p})=>E.jsxs(yC,{...p,...o,className:ze(n==="absolute"&&Pl["field-root-floating"],o==null?void 0:o.className),children:[(e||t||n==="tooltip")&&E.jsxs(Xe,{className:Pl["field-label-group"],ax:"space-between",ay:"center",children:[e&&E.jsx(bC,{required:i,...a,children:e}),E.jsxs(Xe,{ay:"center",children:[n==="tooltip"&&E.jsx(OI,{...u}),t&&E.jsx(TI,{...t,...c})]})]}),h,n==="absolute"&&E.jsx(ey,{className:Pl["field-error-absolute"],...u}),n==="inline"&&E.jsx(ey,{...u}),r&&E.jsx(vC,{...f,children:r})]});$I.displayName="Field";const jre="_input_1dqa6_3 _disabled_dkczp_2",Ni={input:jre,"size-small":"_size-small_1dqa6_47","size-medium":"_size-medium_1dqa6_52","size-large":"_size-large_1dqa6_57","toggle-fullwidth":"_toggle-fullwidth_1dqa6_63","toggle-ghost":"_toggle-ghost_1dqa6_68","input-wrapper":"_input-wrapper_1dqa6_87","input-inner":"_input-inner_1dqa6_110","input-slot":"_input-slot_1dqa6_129"},Lre="medium",PI=Jn({variants:{fullwidth:{true:Ni["toggle-fullwidth"]},ghost:{true:Ni["toggle-ghost"]},size:{small:Ni["size-small"],medium:Ni["size-medium"],large:Ni["size-large"]}},defaultVariants:{size:Lre}}),NI=({before:e,after:t,size:n,fullwidth:r,ghost:i,className:o,children:a})=>!e&&!t?E.jsx(E.Fragment,{children:a}):E.jsxs(Xe,{"data-slot":"input-wrapper",ay:"center",className:ze(Ni.input,Ni["input-wrapper"],PI({size:n,fullwidth:r,ghost:i}),o),children:[e&&E.jsx("span",{"data-slot":"input-before",className:Ni["input-slot"],children:e}),a,t&&E.jsx("span",{"data-slot":"input-after",className:Ni["input-slot"],children:t})]});NI.displayName="InputWrapper";const Fre=C.forwardRef(function(e,t){const{render:n,className:r,id:i,name:o,value:a,disabled:u=!1,onValueChange:c,defaultValue:f,autoFocus:h=!1,...p}=e,{state:g,name:y,disabled:b,setTouched:v,setDirty:S,validityData:x,setFocused:_,setFilled:R,validationMode:T,validation:A}=hf(),D=b||u,O=y??o,$={...g,disabled:D},{labelId:z}=Ta(),j=are({id:i});Hn(()=>{var F;const L=a!=null;(F=A.inputRef.current)!=null&&F.value||L&&a!==""?R(!0):L&&a===""&&R(!1)},[A.inputRef,R,a]);const I=C.useRef(null);Hn(()=>{h&&I.current===fre(RI(I.current))&&_(!0)},[h,_]);const[M]=lI({controlled:a,default:f,name:"FieldControl",state:"value"}),B=a!==void 0,G=B?M:void 0;return bI({id:j,name:O,commit:A.commit,value:G,getValue:()=>{var L;return(L=A.inputRef.current)==null?void 0:L.value},controlRef:A.inputRef}),Jl("input",e,{ref:[t,I],state:$,props:[{id:j,disabled:D,name:O,ref:A.inputRef,"aria-labelledby":z,autoFocus:h,...B?{value:G}:{defaultValue:f},onChange(L){const F=L.currentTarget.value;c==null||c(F,dI(kI,L.nativeEvent)),S(F!==x.initialValue),R(F!=="")},onFocus(){_(!0)},onBlur(L){v(!0),_(!1),T==="onBlur"&&A.commit(L.currentTarget.value)},onKeyDown(L){L.currentTarget.tagName==="INPUT"&&L.key==="Enter"&&(v(!0),A.commit(L.currentTarget.value))}},A.getInputValidationProps(),p],stateAttributesMapping:Zl})}),zre=C.forwardRef(function(e,t){return E.jsx(Fre,{ref:t,...e})}),II=({label:e,description:t,required:n,name:r,size:i,fullwidth:o,ghost:a,before:u,after:c,FieldProps:f,className:h,ref:p,...g})=>{const y=!!(u||c);return E.jsx(cr,{condition:!!(e||t),render:E.jsx($I,{name:r,label:e,description:t,required:n,...f}),children:E.jsx(NI,{before:u,after:c,size:i,fullwidth:o,ghost:a,children:E.jsx(zre,{"data-slot":"input",ref:p,name:r,className:ze(Ni.input,y?Ni["input-inner"]:PI({size:i,fullwidth:o,ghost:a}),h),...g})})})};II.displayName="Input";const jI=16,Bre=12,Ure="medium",Hre="none",Gre="column",qre="_list_10sxx_3",Ho={list:qre,"list-item-group-collapsible-trigger":"_list-item-group-collapsible-trigger_10sxx_53","list-item-group":"_list-item-group_10sxx_53","list-item-group-category":"_list-item-group-category_10sxx_86","list-item-panel":"_list-item-panel_10sxx_92","list-item":"_list-item_10sxx_53","list-text-label":"_list-text-label_10sxx_129","list-text-description":"_list-text-description_10sxx_141"};function By({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=C.useRef(e!==void 0),[o,a]=C.useState(t),u=i?e:o,c=C.useCallback(f=>{i||a(f)},[]);return[u,c]}const SD={};function _r(e,t){const n=C.useRef(SD);return n.current===SD&&(n.current=e(t)),n}const R1=os[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Vre=R1&&R1!==C.useLayoutEffect?R1:e=>e();function Fe(e){const t=_r(Yre).current;return t.next=e,Vre(t.effect),t.trampoline}function Yre(){const e={next:void 0,callback:Wre,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function Wre(){}const Kre=()=>{},Ke=typeof document<"u"?C.useLayoutEffect:Kre,LI=C.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function Xre(){return C.useContext(LI)}function xC(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,o=Fe(i),a=C.useRef(0),u=_r(Zre).current,c=_r(Qre).current,[f,h]=C.useState(0),p=C.useRef(f),g=Fe((x,_)=>{c.set(x,_??null),p.current+=1,h(p.current)}),y=Fe(x=>{c.delete(x),p.current+=1,h(p.current)}),b=C.useMemo(()=>{const x=new Map;return Array.from(c.keys()).filter(R=>R.isConnected).sort(Jre).forEach((R,T)=>{const A=c.get(R)??{};x.set(R,{...A,index:T})}),x},[c,f]);Ke(()=>{if(typeof MutationObserver!="function"||b.size===0)return;const x=new MutationObserver(_=>{const R=new Set,T=A=>R.has(A)?R.delete(A):R.add(A);_.forEach(A=>{A.removedNodes.forEach(T),A.addedNodes.forEach(T)}),R.size===0&&(p.current+=1,h(p.current))});return b.forEach((_,R)=>{R.parentElement&&x.observe(R.parentElement,{childList:!0})}),()=>{x.disconnect()}},[b]),Ke(()=>{p.current===f&&(n.current.length!==b.size&&(n.current.length=b.size),r&&r.current.length!==b.size&&(r.current.length=b.size),a.current=b.size),o(b)},[o,b,n,r,f]),Ke(()=>()=>{n.current=[]},[n]),Ke(()=>()=>{r&&(r.current=[])},[r]);const v=Fe(x=>(u.add(x),()=>{u.delete(x)}));Ke(()=>{u.forEach(x=>x(b))},[u,b]);const S=C.useMemo(()=>({register:g,unregister:y,subscribeMapChange:v,elementsRef:n,labelsRef:r,nextIndexRef:a}),[g,y,v,n,r,a]);return E.jsx(LI.Provider,{value:S,children:t})}function Qre(){return new Map}function Zre(){return new Set}function Jre(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const eie=C.createContext(void 0);function Uy(){const e=C.useContext(eie);return(e==null?void 0:e.direction)??"ltr"}function Qr(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}function Sa(e,t,n,r){const i=_r(FI).current;return nie(i,e,t,n,r)&&zI(i,[e,t,n,r]),i.callback}function tie(e){const t=_r(FI).current;return rie(t,e)&&zI(t,e),t.callback}function FI(){return{callback:null,cleanup:null,refs:[]}}function nie(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function rie(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function zI(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const a=o(n);typeof a=="function"&&(r[i]=a);break}case"object":{o.current=n;break}}}e.cleanup=()=>{for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const a=r[i];typeof a=="function"?a():o(null);break}case"object":{o.current=null;break}}}}}}}const iie=parseInt(C.version,10);function wC(e){return iie>=e}function CD(e){if(!C.isValidElement(e))return null;const t=e,n=t.props;return(wC(19)?n==null?void 0:n.ref:t.ref)??null}function ww(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function oie(e,t){const n={};for(const r in e){const i=e[r];if(t!=null&&t.hasOwnProperty(r)){const o=t[r](i);o!=null&&Object.assign(n,o);continue}i===!0?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function sie(e,t){return typeof e=="function"?e(t):e}function aie(e,t){return typeof e=="function"?e(t):e}const Pd={};function rh(e,t,n,r,i){let o={...Sw(e,Pd)};return t&&(o=dg(o,t)),n&&(o=dg(o,n)),r&&(o=dg(o,r)),o}function lie(e){if(e.length===0)return Pd;if(e.length===1)return Sw(e[0],Pd);let t={...Sw(e[0],Pd)};for(let n=1;n<e.length;n+=1)t=dg(t,e[n]);return t}function dg(e,t){return BI(t)?t(e):uie(e,t)}function uie(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=ww(e.style,r);break}case"className":{e[n]=UI(e.className,r);break}default:cie(n,r)?e[n]=fie(e[n],r):e[n]=r}}return e}function cie(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t=="function"||typeof t>"u")}function BI(e){return typeof e=="function"}function Sw(e,t){return BI(e)?e(t):e??Pd}function fie(e,t){return t?e?n=>{if(die(n)){const i=n;Cw(i);const o=t(i);return i.baseUIHandlerPrevented||e==null||e(i),o}const r=t(n);return e==null||e(n),r}:t:e}function Cw(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function UI(e,t){return t?e?t+" "+e:t:e}function die(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function HI(){}const zc=Object.freeze([]),_n=Object.freeze({}),hie=500,pie=500,mie={style:{transition:"none"}},gie="data-base-ui-click-trigger",yie={fallbackAxisSide:"none"},bie={fallbackAxisSide:"end"},vie={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function Gn(e,t,n={}){const r=t.render,i=xie(t,n);if(n.enabled===!1)return null;const o=n.state??_n;return Sie(e,r,i,o)}function xie(e,t={}){const{className:n,style:r,render:i}=e,{state:o=_n,ref:a,props:u,stateAttributesMapping:c,enabled:f=!0}=t,h=f?sie(n,o):void 0,p=f?aie(r,o):void 0,g=f?oie(o,c):_n,y=f?ww(g,Array.isArray(u)?lie(u):u)??_n:_n;return typeof document<"u"&&(f?Array.isArray(a)?y.ref=tie([y.ref,CD(i),...a]):y.ref=Sa(y.ref,CD(i),a):Sa(null,null)),f?(h!==void 0&&(y.className=UI(y.className,h)),p!==void 0&&(y.style=ww(y.style,p)),y):_n}const wie=Symbol.for("react.lazy");function Sie(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=rh(n,t.props);i.ref=n.ref;let o=t;return(o==null?void 0:o.$$typeof)===wie&&(o=C.Children.toArray(t)[0]),C.cloneElement(o,i)}if(e&&typeof e=="string")return Cie(e,n);throw new Error(Qr(8))}function Cie(e,t){return e==="button"?C.createElement("button",{type:"button",...t,key:t.key}):e==="img"?C.createElement("img",{alt:"",...t,key:t.key}):C.createElement(e,t)}const ih="none",Bc="trigger-press",Gr="trigger-hover",Nd="trigger-focus",SC="outside-press",GI="item-press",Uc="focus-out",CC="escape-key",hg="list-navigation",Eie="cancel-open",pg="sibling-open",kie="imperative-action";function xt(e,t,n,r){let i=!1,o=!1;const a=r??_n;return{reason:e,event:t??new Event("base-ui"),cancel(){i=!0},allowPropagation(){o=!0},get isCanceled(){return i},get isPropagationAllowed(){return o},trigger:n,...a}}const Rie={...os};let ED=0;function _ie(e,t="mui"){const[n,r]=C.useState(e),i=e||n;return C.useEffect(()=>{n==null&&(ED+=1,r(`${t}-${ED}`))},[n,t]),i}const kD=Rie.useId;function eu(e,t){if(kD!==void 0){const n=kD();return e??(t?`${t}-${n}`:n)}return _ie(e,t)}function tu(e){return eu(e,"base-ui")}const Tie=[];function Fh(e){C.useEffect(e,Tie)}const Mm=null;class Aie{constructor(){te(this,"callbacks",[]);te(this,"callbacksCount",0);te(this,"nextId",1);te(this,"startId",1);te(this,"isScheduled",!1);te(this,"tick",t=>{var i;this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)(i=n[o])==null||i.call(n,t)})}request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,(!this.isScheduled||!1)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const Om=new Aie;class un{constructor(){te(this,"currentId",Mm);te(this,"cancel",()=>{this.currentId!==Mm&&(Om.cancel(this.currentId),this.currentId=Mm)});te(this,"disposeEffect",()=>this.cancel)}static create(){return new un}static request(t){return Om.request(t)}static cancel(t){return Om.cancel(t)}request(t){this.cancel(),this.currentId=Om.request(()=>{this.currentId=Mm,t()})}}function Hy(){const e=_r(un.create).current;return Fh(e.disposeEffect),e}function jo(e){return e==null?e:"current"in e?e.current:e}let Bl=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const Die={[Bl.startingStyle]:""},Mie={[Bl.endingStyle]:""},Gy={transitionStatus(e){return e==="starting"?Die:e==="ending"?Mie:null}};function qI(e,t=!1,n=!0){const r=Hy();return Fe((i,o=null)=>{r.cancel();function a(){gn.flushSync(i)}const u=jo(e);if(u==null)return;const c=u;if(typeof c.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)i();else{let p=function(){const y=Bl.startingStyle;if(!c.hasAttribute(y)){r.request(g);return}const b=new MutationObserver(()=>{c.hasAttribute(y)||(b.disconnect(),g())});b.observe(c,{attributes:!0,attributeFilter:[y]}),o==null||o.addEventListener("abort",()=>b.disconnect(),{once:!0})},g=function(){Promise.all(c.getAnimations().map(y=>y.finished)).then(()=>{o!=null&&o.aborted||a()}).catch(()=>{const y=c.getAnimations();if(n){if(o!=null&&o.aborted)return;a()}else y.length>0&&y.some(b=>b.pending||b.playState!=="finished")&&g()})};var f=p,h=g;if(t){p();return}r.request(g)}})}function EC(e,t=!1,n=!1){const[r,i]=C.useState(e&&t?"idle":void 0),[o,a]=C.useState(e);return e&&!o&&(a(!0),i("starting")),!e&&o&&r!=="ending"&&!n&&i("ending"),!e&&!o&&r==="ending"&&i(void 0),Ke(()=>{if(!e&&o&&r!=="ending"&&n){const u=un.request(()=>{i("ending")});return()=>{un.cancel(u)}}},[e,o,r,n]),Ke(()=>{if(!e||t)return;const u=un.request(()=>{i(void 0)});return()=>{un.cancel(u)}},[t,e]),Ke(()=>{if(!e||!t)return;e&&o&&r!=="idle"&&i("starting");const u=un.request(()=>{i("idle")});return()=>{un.cancel(u)}},[t,e,o,i,r]),C.useMemo(()=>({mounted:o,setMounted:a,transitionStatus:r}),[o,r])}function Oie(e){const{open:t,defaultOpen:n,onOpenChange:r,disabled:i}=e,o=t!==void 0,[a,u]=By({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:c,setMounted:f,transitionStatus:h}=EC(a,!0,!0),[p,g]=C.useState(a),[{height:y,width:b},v]=C.useState({height:void 0,width:void 0}),S=tu(),[x,_]=C.useState(),R=x??S,[T,A]=C.useState(!1),[D,O]=C.useState(!1),$=C.useRef(null),z=C.useRef(null),j=C.useRef(null),I=C.useRef(null),M=qI(I,!1),B=Fe(G=>{const L=!a,F=xt(Bc,G.nativeEvent);if(r(L,F),F.isCanceled)return;const U=I.current;z.current==="css-animation"&&U!=null&&U.style.removeProperty("animation-name"),!T&&!D&&(z.current!=null&&z.current!=="css-animation"&&!c&&L&&f(!0),z.current==="css-animation"&&(!p&&L&&g(!0),!c&&L&&f(!0))),u(L),z.current==="none"&&c&&!L&&f(!1)});return Ke(()=>{o&&z.current==="none"&&!D&&!a&&f(!1)},[o,D,a,t,f]),C.useMemo(()=>({abortControllerRef:$,animationTypeRef:z,disabled:i,handleTrigger:B,height:y,mounted:c,open:a,panelId:R,panelRef:I,runOnceAnimationsFinish:M,setDimensions:v,setHiddenUntilFound:A,setKeepMounted:O,setMounted:f,setOpen:u,setPanelIdState:_,setVisible:g,transitionDimensionRef:j,transitionStatus:h,visible:p,width:b}),[$,z,i,B,y,c,a,R,I,M,v,A,O,f,u,g,j,h,p,b])}const VI=C.createContext(void 0);function YI(){const e=C.useContext(VI);if(e===void 0)throw new Error(Qr(15));return e}let $ie=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function qy(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:o}=e,{register:a,unregister:u,subscribeMapChange:c,elementsRef:f,labelsRef:h,nextIndexRef:p}=Xre(),g=C.useRef(-1),[y,b]=C.useState(o??(i===$ie.GuessFromOrder?()=>{if(g.current===-1){const x=p.current;p.current+=1,g.current=x}return g.current}:-1)),v=C.useRef(null),S=C.useCallback(x=>{var _;if(v.current=x,y!==-1&&x!==null&&(f.current[y]=x,h)){const R=t!==void 0;h.current[y]=R?t:((_=r==null?void 0:r.current)==null?void 0:_.textContent)??x.textContent}},[y,f,h,t,r]);return Ke(()=>{if(o!=null)return;const x=v.current;if(x)return a(x,n),()=>{u(x)}},[o,a,u,n]),Ke(()=>{if(o==null)return c(x=>{var R;const _=v.current?(R=x.get(v.current))==null?void 0:R.index:null;_!=null&&b(_)})},[o,c,b]),C.useMemo(()=>({ref:S,index:y}),[y,S])}let Id=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Bl.startingStyle]="startingStyle",e[e.endingStyle=Bl.endingStyle]="endingStyle",e})({}),Pie=(function(e){return e.panelOpen="data-panel-open",e})({});const Nie={[Id.open]:""},Iie={[Id.closed]:""},jie={open(e){return e?{[Pie.panelOpen]:""}:null}},Lie={open(e){return e?Nie:Iie}};function Fie(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}function Vy(){return typeof window<"u"}function Aa(e){return kC(e)?(e.nodeName||"").toLowerCase():"#document"}function Nn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function uo(e){var t;return(t=(kC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function kC(e){return Vy()?e instanceof Node||e instanceof Nn(e).Node:!1}function It(e){return Vy()?e instanceof Element||e instanceof Nn(e).Element:!1}function Jt(e){return Vy()?e instanceof HTMLElement||e instanceof Nn(e).HTMLElement:!1}function Ew(e){return!Vy()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Nn(e).ShadowRoot}function Da(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Tr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!=="inline"&&i!=="contents"}function zie(e){return/^(table|td|th)$/.test(Aa(e))}function Yy(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Bie=/transform|translate|scale|rotate|perspective|filter/,Uie=/paint|layout|strict|content/,sl=e=>!!e&&e!=="none";let _1;function RC(e){const t=It(e)?Tr(e):e;return sl(t.transform)||sl(t.translate)||sl(t.scale)||sl(t.rotate)||sl(t.perspective)||!Wy()&&(sl(t.backdropFilter)||sl(t.filter))||Bie.test(t.willChange||"")||Uie.test(t.contain||"")}function Hie(e){let t=ao(e);for(;Jt(t)&&!oo(t);){if(RC(t))return t;if(Yy(t))return null;t=ao(t)}return null}function Wy(){return _1==null&&(_1=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),_1}function oo(e){return/^(html|body|#document)$/.test(Aa(e))}function Tr(e){return Nn(e).getComputedStyle(e)}function Ky(e){return It(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ao(e){if(Aa(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ew(e)&&e.host||uo(e);return Ew(t)?t.host:t}function WI(e){const t=ao(e);return oo(t)?e.ownerDocument?e.ownerDocument.body:e.body:Jt(t)&&Da(t)?t:WI(t)}function ha(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=WI(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Nn(i);if(o){const u=kw(a);return t.concat(a,a.visualViewport||[],Da(i)?i:[],u&&n?ha(u):[])}else return t.concat(i,ha(i,[],n))}function kw(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const KI=C.createContext(void 0);function _C(e=!1){const t=C.useContext(KI);if(t===void 0&&!e)throw new Error(Qr(16));return t}function Gie(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:o}=e,a=r&&t!==!1,u=r&&t===!1;return{props:C.useMemo(()=>{const f={onKeyDown(h){n&&t&&h.key!=="Tab"&&h.preventDefault()}};return r||(f.tabIndex=i,!o&&n&&(f.tabIndex=t?i:-1)),(o&&(t||a)||!o&&n)&&(f["aria-disabled"]=n),o&&(!t||u)&&(f.disabled=n),f},[r,n,t,a,u,o,i])}}function zh(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,o=C.useRef(null),a=_C(!0)!==void 0,u=Fe(()=>{const g=o.current;return!!((g==null?void 0:g.tagName)==="A"&&(g!=null&&g.href))}),{props:c}=Gie({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:i}),f=C.useCallback(()=>{const g=o.current;qie(g)&&a&&t&&c.disabled===void 0&&g.disabled&&(g.disabled=!1)},[t,c.disabled,a]);Ke(f,[f]);const h=C.useCallback((g={})=>{const{onClick:y,onMouseDown:b,onKeyUp:v,onKeyDown:S,onPointerDown:x,..._}=g;return rh({type:i?"button":void 0,onClick(T){if(t){T.preventDefault();return}y==null||y(T)},onMouseDown(T){t||b==null||b(T)},onKeyDown(T){if(t||(Cw(T),S==null||S(T)),T.baseUIHandlerPrevented)return;const A=T.target===T.currentTarget&&!i&&!u()&&!t,D=T.key==="Enter",O=T.key===" ";A&&((O||D)&&T.preventDefault(),D&&(y==null||y(T)))},onKeyUp(T){t||(Cw(T),v==null||v(T)),!T.baseUIHandlerPrevented&&T.target===T.currentTarget&&!i&&!t&&T.key===" "&&(y==null||y(T))},onPointerDown(T){if(t){T.preventDefault();return}x==null||x(T)}},i?void 0:{role:"button"},c,_)},[t,c,i,u]),p=Fe(g=>{o.current=g,f()});return{getButtonProps:h,buttonRef:p}}function qie(e){return Jt(e)&&e.tagName==="BUTTON"}const pf=typeof navigator<"u",T1=Yie(),XI=Kie(),QI=Wie(),ZI=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),JI=T1.platform==="MacIntel"&&T1.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(T1.platform),ej=pf&&/apple/i.test(navigator.vendor),Rw=pf&&/android/i.test(XI)||/android/i.test(QI),Vie=pf&&XI.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,tj=QI.includes("jsdom/");function Yie(){if(!pf)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e!=null&&e.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function Wie(){if(!pf)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function Kie(){if(!pf)return"";const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform??""}const _w="data-base-ui-focusable",nj="active",rj="selected",ij="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",pa="ArrowLeft",ma="ArrowRight",TC="ArrowUp",Bh="ArrowDown";function mi(e){var n;let t=e.activeElement;for(;((n=t==null?void 0:t.shadowRoot)==null?void 0:n.activeElement)!=null;)t=t.shadowRoot.activeElement;return t}function pt(e,t){var r;if(!e||!t)return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e.contains(t))return!0;if(n&&Ew(n)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function ty(e,t){if(!It(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,r]of t.entries())if(pt(r,n))return!r.hasAttribute("data-trigger-disabled");return!1}function qr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Mi(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Xie(e){return e.matches("html,body")}function Xy(e){return Jt(e)&&e.matches(ij)}function Tw(e){return e?e.getAttribute("role")==="combobox"&&Xy(e):!1}function Qie(e){if(!e||tj)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function ny(e){return e?e.hasAttribute(_w)?e:e.querySelector(`[${_w}]`)||e:null}function Nl(e,t,n=!0){return e.filter(i=>{var o;return i.parentId===t&&(!n||((o=i.context)==null?void 0:o.open))}).flatMap(i=>[i,...Nl(e,i.id,n)])}function RD(e,t){var i;let n=[],r=(i=e.find(o=>o.id===t))==null?void 0:i.parentId;for(;r;){const o=e.find(a=>a.id===r);r=o==null?void 0:o.parentId,o&&(n=n.concat(o))}return n}function Wn(e){e.preventDefault(),e.stopPropagation()}function Zie(e){return"nativeEvent"in e}function oj(e){return e.pointerType===""&&e.isTrusted?!0:Rw&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function sj(e){return tj?!1:!Rw&&e.width===0&&e.height===0||Rw&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Hc(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function aj(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const Jie=["top","right","bottom","left"],Gc=Math.min,Vr=Math.max,qc=Math.round,oc=Math.floor,so=e=>({x:e,y:e}),eoe={left:"right",right:"left",bottom:"top",top:"bottom"};function Aw(e,t,n){return Vr(e,Gc(t,n))}function rs(e,t){return typeof e=="function"?e(t):e}function Yr(e){return e.split("-")[0]}function Ma(e){return e.split("-")[1]}function AC(e){return e==="x"?"y":"x"}function DC(e){return e==="y"?"height":"width"}function wi(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function MC(e){return AC(wi(e))}function toe(e,t,n){n===void 0&&(n=!1);const r=Ma(e),i=MC(e),o=DC(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=ry(a)),[a,ry(a)]}function noe(e){const t=ry(e);return[Dw(e),t,Dw(t)]}function Dw(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const _D=["left","right"],TD=["right","left"],roe=["top","bottom"],ioe=["bottom","top"];function ooe(e,t,n){switch(e){case"top":case"bottom":return n?t?TD:_D:t?_D:TD;case"left":case"right":return t?roe:ioe;default:return[]}}function soe(e,t,n,r){const i=Ma(e);let o=ooe(Yr(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(Dw)))),o}function ry(e){const t=Yr(e);return eoe[t]+e.slice(t.length)}function aoe(e){return{top:0,right:0,bottom:0,left:0,...e}}function lj(e){return typeof e!="number"?aoe(e):{top:e,right:e,bottom:e,left:e}}function iy(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function $m(e,t,n){return Math.floor(e/t)!==n}function pc(e,t){return t<0||t>=e.current.length}function mg(e,t){return Bn(e,{disabledIndices:t})}function Mw(e,t){return Bn(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Bn(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let o=t;do o+=n?-i:i;while(o>=0&&o<=e.current.length-1&&ga(e,o,r));return o}function uj(e,{event:t,orientation:n,loopFocus:r,rtl:i,cols:o,disabledIndices:a,minIndex:u,maxIndex:c,prevIndex:f,stopEvent:h=!1}){let p=f;const g=[],y={};let b=!1;{let x=null,_=-1;e.current.forEach((R,T)=>{if(R==null)return;const A=R.closest('[role="row"]');A&&(b=!0),(A!==x||_===-1)&&(x=A,_+=1,g[_]=[]),g[_].push(T),y[T]=_})}const v=b&&g.length>0&&g.some(x=>x.length!==o);function S(x){if(!v||f===-1)return;const _=y[f];if(_==null)return;const R=g[_].indexOf(f);let T=x==="up"?_-1:_+1;r&&(T<0?T=g.length-1:T>=g.length&&(T=0));const A=new Set;for(;T>=0&&T<g.length&&!A.has(T);){A.add(T);const D=g[T];if(D.length===0){T=x==="up"?T-1:T+1;continue}const O=Math.min(R,D.length-1);for(let $=O;$>=0;$-=1){const z=D[$];if(!ga(e,z,a))return z}T=x==="up"?T-1:T+1,r&&(T<0?T=g.length-1:T>=g.length&&(T=0))}}if(t.key===TC){const x=S("up");if(x!==void 0)h&&Wn(t),p=x;else{if(h&&Wn(t),f===-1)p=c;else if(p=Bn(e,{startingIndex:p,amount:o,decrement:!0,disabledIndices:a}),r&&(f-o<u||p<0)){const _=f%o,R=c%o,T=c-(R-_);R===_?p=c:p=R>_?T:T-o}pc(e,p)&&(p=f)}}if(t.key===Bh){const x=S("down");x!==void 0?(h&&Wn(t),p=x):(h&&Wn(t),f===-1?p=u:(p=Bn(e,{startingIndex:f,amount:o,disabledIndices:a}),r&&f+o>c&&(p=Bn(e,{startingIndex:f%o-o,amount:o,disabledIndices:a}))),pc(e,p)&&(p=f))}if(n==="both"){const x=oc(f/o);t.key===(i?pa:ma)&&(h&&Wn(t),f%o!==o-1?(p=Bn(e,{startingIndex:f,disabledIndices:a}),r&&$m(p,o,x)&&(p=Bn(e,{startingIndex:f-f%o-1,disabledIndices:a}))):r&&(p=Bn(e,{startingIndex:f-f%o-1,disabledIndices:a})),$m(p,o,x)&&(p=f)),t.key===(i?ma:pa)&&(h&&Wn(t),f%o!==0?(p=Bn(e,{startingIndex:f,decrement:!0,disabledIndices:a}),r&&$m(p,o,x)&&(p=Bn(e,{startingIndex:f+(o-f%o),decrement:!0,disabledIndices:a}))):r&&(p=Bn(e,{startingIndex:f+(o-f%o),decrement:!0,disabledIndices:a})),$m(p,o,x)&&(p=f));const _=oc(c/o)===x;pc(e,p)&&(r&&_?p=t.key===(i?ma:pa)?c:Bn(e,{startingIndex:f-f%o-1,disabledIndices:a}):p=f)}return p}function cj(e,t,n){const r=[];let i=0;return e.forEach(({width:o,height:a},u)=>{let c=!1;for(n&&(i=0);!c;){const f=[];for(let h=0;h<o;h+=1)for(let p=0;p<a;p+=1)f.push(i+h+p*t);i%t+o<=t&&f.every(h=>r[h]==null)?(f.forEach(h=>{r[h]=u}),c=!0):i+=1}}),[...r]}function fj(e,t,n,r,i){if(e===-1)return-1;const o=n.indexOf(e),a=t[e];switch(i){case"tl":return o;case"tr":return a?o+a.width-1:o;case"bl":return a?o+(a.height-1)*r:o;case"br":return n.lastIndexOf(e);default:return-1}}function dj(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function ga(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const r=e.current[t];return r?r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true":!1}/*!
476
+ * tabbable 6.4.0
477
+ * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
478
+ */var loe=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],oy=loe.join(","),hj=typeof Element>"u",Vc=hj?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,sy=!hj&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},ay=function(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),o=i===""||i==="true",a=o||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):ay(t.parentNode));return a},uoe=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},pj=function(t,n,r){if(ay(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(oy));return n&&Vc.call(t,oy)&&i.unshift(t),i=i.filter(r),i},ly=function(t,n,r){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!ay(a,!1))if(a.tagName==="SLOT"){var u=a.assignedElements(),c=u.length?u:a.children,f=ly(c,!0,r);r.flatten?i.push.apply(i,f):i.push({scopeParent:a,candidates:f})}else{var h=Vc.call(a,oy);h&&r.filter(a)&&(n||!t.includes(a))&&i.push(a);var p=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),g=!ay(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(p&&g){var y=ly(p===!0?a.children:p.children,!0,r);r.flatten?i.push.apply(i,y):i.push({scopeParent:a,candidates:y})}else o.unshift.apply(o,a.children)}}return i},mj=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},gj=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||uoe(t))&&!mj(t)?0:t.tabIndex},coe=function(t,n){var r=gj(t);return r<0&&n&&!mj(t)?0:r},foe=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},yj=function(t){return t.tagName==="INPUT"},doe=function(t){return yj(t)&&t.type==="hidden"},hoe=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},poe=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},moe=function(t){if(!t.name)return!0;var n=t.form||sy(t),r=function(u){return n.querySelectorAll('input[type="radio"][name="'+u+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var o=poe(i,t.form);return!o||o===t},goe=function(t){return yj(t)&&t.type==="radio"},yoe=function(t){return goe(t)&&!moe(t)},boe=function(t){var n,r=t&&sy(t),i=(n=r)===null||n===void 0?void 0:n.host,o=!1;if(r&&r!==t){var a,u,c;for(o=!!((a=i)!==null&&a!==void 0&&(u=a.ownerDocument)!==null&&u!==void 0&&u.contains(i)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!o&&i;){var f,h,p;r=sy(i),i=(f=r)===null||f===void 0?void 0:f.host,o=!!((h=i)!==null&&h!==void 0&&(p=h.ownerDocument)!==null&&p!==void 0&&p.contains(i))}}return o},AD=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},voe=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var o=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!o}if(getComputedStyle(t).visibility==="hidden")return!0;var a=Vc.call(t,"details>summary:first-of-type"),u=a?t.parentElement:t;if(Vc.call(u,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof i=="function"){for(var c=t;t;){var f=t.parentElement,h=sy(t);if(f&&!f.shadowRoot&&i(f)===!0)return AD(t);t.assignedSlot?t=t.assignedSlot:!f&&h!==t.ownerDocument?t=h.host:t=f}t=c}if(boe(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return AD(t);return!1},xoe=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return Vc.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},Ow=function(t,n){return!(n.disabled||doe(n)||voe(n,t)||hoe(n)||xoe(n))},$w=function(t,n){return!(yoe(n)||gj(n)<0||!Ow(t,n))},woe=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},bj=function(t){var n=[],r=[];return t.forEach(function(i,o){var a=!!i.scopeParent,u=a?i.scopeParent:i,c=coe(u,a),f=a?bj(i.candidates):u;c===0?a?n.push.apply(n,f):n.push(u):r.push({documentOrder:o,tabIndex:c,item:i,isScope:a,content:f})}),r.sort(foe).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},Uh=function(t,n){n=n||{};var r;return n.getShadowRoot?r=ly([t],n.includeContainer,{filter:$w.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:woe}):r=pj(t,n.includeContainer,$w.bind(null,n)),bj(r)},Soe=function(t,n){n=n||{};var r;return n.getShadowRoot?r=ly([t],n.includeContainer,{filter:Ow.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=pj(t,n.includeContainer,Ow.bind(null,n)),r},vj=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Vc.call(t,oy)===!1?!1:$w(n,t)};function Pt(e){return(e==null?void 0:e.ownerDocument)||document}const mf=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function xj(e,t){const n=Uh(e,mf()),r=n.length;if(r===0)return;const i=mi(Pt(e)),o=n.indexOf(i),a=o===-1?t===1?0:r-1:o+t;return n[a]}function OC(e){return xj(Pt(e).body,1)||e}function wj(e){return xj(Pt(e).body,-1)||e}function Sj(e,t){if(!e)return null;const n=Uh(Pt(e).body,mf()),r=n.length;if(r===0)return null;const i=n.indexOf(e);if(i===-1)return null;const o=(i+t+r)%r;return n[o]}function Coe(e){return Sj(e,1)}function Eoe(e){return Sj(e,-1)}function mc(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!pt(n,r)}function koe(e){Uh(e,mf()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function DD(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const gc="ArrowUp",yl="ArrowDown",oh="ArrowLeft",yc="ArrowRight",Hh="Home",Gh="End",Cj=new Set([oh,yc]),Roe=new Set([oh,yc,Hh,Gh]),Ej=new Set([gc,yl]),_oe=new Set([gc,yl,Hh,Gh]),kj=new Set([...Cj,...Ej]),Toe=new Set([...kj,Hh,Gh]),Aoe=new Set([gc,yl,oh,yc,Hh,Gh]),Doe="Shift",Moe="Control",Ooe="Alt",$oe="Meta",Poe=new Set([Doe,Moe,Ooe,$oe]);function Noe(e){return Jt(e)&&e.tagName==="INPUT"}function MD(e){return!!(Noe(e)&&e.selectionStart!=null||Jt(e)&&e.tagName==="TEXTAREA")}function OD(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,o=e.scrollTop;const a=e.clientWidth<e.scrollWidth,u=e.clientHeight<e.scrollHeight;if(a&&r!=="vertical"){const c=$D(e,t,"left"),f=Pm(e),h=Pm(t);n==="ltr"&&(c+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-f.scrollPaddingRight?i=c+t.offsetWidth+h.scrollMarginRight-e.clientWidth+f.scrollPaddingRight:c-h.scrollMarginLeft<e.scrollLeft+f.scrollPaddingLeft&&(i=c-h.scrollMarginLeft-f.scrollPaddingLeft)),n==="rtl"&&(c-h.scrollMarginRight<e.scrollLeft+f.scrollPaddingLeft?i=c-h.scrollMarginLeft-f.scrollPaddingLeft:c+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-f.scrollPaddingRight&&(i=c+t.offsetWidth+h.scrollMarginRight-e.clientWidth+f.scrollPaddingRight))}if(u&&r!=="horizontal"){const c=$D(e,t,"top"),f=Pm(e),h=Pm(t);c-h.scrollMarginTop<e.scrollTop+f.scrollPaddingTop?o=c-h.scrollMarginTop-f.scrollPaddingTop:c+t.offsetHeight+h.scrollMarginBottom>e.scrollTop+e.clientHeight-f.scrollPaddingBottom&&(o=c+t.offsetHeight+h.scrollMarginBottom-e.clientHeight+f.scrollPaddingBottom)}e.scrollTo({left:i,top:o,behavior:"auto"})}function $D(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function Pm(e){const t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}let Ioe=(function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e})({});function joe(e){const{abortControllerRef:t,animationTypeRef:n,externalRef:r,height:i,hiddenUntilFound:o,keepMounted:a,id:u,mounted:c,onOpenChange:f,open:h,panelRef:p,runOnceAnimationsFinish:g,setDimensions:y,setMounted:b,setOpen:v,setVisible:S,transitionDimensionRef:x,visible:_,width:R}=e,T=C.useRef(!1),A=C.useRef(null),D=C.useRef(h),O=C.useRef(h),$=Hy(),z=C.useMemo(()=>n.current==="css-animation"?!_:!h&&!c,[h,c,_,n]),j=Fe(M=>{if(!M)return;if(n.current==null||x.current==null){const L=getComputedStyle(M),F=L.animationName!=="none"&&L.animationName!=="",U=L.transitionDuration!=="0s"&&L.transitionDuration!=="";F&&U||(L.animationName==="none"&&L.transitionDuration!=="0s"?n.current="css-transition":L.animationName!=="none"&&L.transitionDuration==="0s"?n.current="css-animation":n.current="none"),M.getAttribute(Ioe.orientation)==="horizontal"||L.transitionProperty.indexOf("width")>-1?x.current="width":x.current="height"}if(n.current!=="css-transition")return;(i===void 0||R===void 0)&&(y({height:M.scrollHeight,width:M.scrollWidth}),O.current&&M.style.setProperty("transition-duration","0s"));let B=-1,G=-1;return B=un.request(()=>{O.current=!1,G=un.request(()=>{setTimeout(()=>{M.style.removeProperty("transition-duration")})})}),()=>{un.cancel(B),un.cancel(G)}}),I=Sa(r,p,j);return Ke(()=>{if(n.current!=="css-transition")return;const M=p.current;if(!M)return;let B=-1;if(t.current!=null&&(t.current.abort(),t.current=null),h){const G={"justify-content":M.style.justifyContent,"align-items":M.style.alignItems,"align-content":M.style.alignContent,"justify-items":M.style.justifyItems};Object.keys(G).forEach(L=>{M.style.setProperty(L,"initial","important")}),!O.current&&!a&&M.setAttribute(Id.startingStyle,""),y({height:M.scrollHeight,width:M.scrollWidth}),B=un.request(()=>{Object.entries(G).forEach(([L,F])=>{F===""?M.style.removeProperty(L):M.style.setProperty(L,F)})})}else{if(M.scrollHeight===0&&M.scrollWidth===0)return;y({height:M.scrollHeight,width:M.scrollWidth});const G=new AbortController;t.current=G;const L=G.signal;let F=null;const U=Id.endingStyle;return F=new MutationObserver(V=>{V.some(N=>N.type==="attributes"&&N.attributeName===U)&&(F==null||F.disconnect(),F=null,g(()=>{y({height:0,width:0}),M.style.removeProperty("content-visibility"),b(!1),t.current===G&&(t.current=null)},L))}),F.observe(M,{attributes:!0,attributeFilter:[U]}),()=>{F==null||F.disconnect(),$.cancel(),t.current===G&&(G.abort(),t.current=null)}}return()=>{un.cancel(B)}},[t,n,$,o,a,c,h,p,g,y,b]),Ke(()=>{if(n.current!=="css-animation")return;const M=p.current;M&&(A.current=M.style.animationName||A.current,M.style.setProperty("animation-name","none"),y({height:M.scrollHeight,width:M.scrollWidth}),!D.current&&!T.current&&M.style.removeProperty("animation-name"),h?(t.current!=null&&(t.current.abort(),t.current=null),b(!0),S(!0)):(t.current=new AbortController,g(()=>{b(!1),S(!1),t.current=null},t.current.signal)))},[t,n,h,p,g,y,b,S,_]),Fh(()=>{const M=un.request(()=>{D.current=!1});return()=>un.cancel(M)}),Ke(()=>{if(!o)return;const M=p.current;if(!M)return;let B=-1,G=-1;return h&&T.current&&(M.style.transitionDuration="0s",y({height:M.scrollHeight,width:M.scrollWidth}),B=un.request(()=>{T.current=!1,G=un.request(()=>{setTimeout(()=>{M.style.removeProperty("transition-duration")})})})),()=>{un.cancel(B),un.cancel(G)}},[o,h,p,y]),Ke(()=>{const M=p.current;M&&o&&z&&(M.setAttribute("hidden","until-found"),n.current==="css-transition"&&M.setAttribute(Id.startingStyle,""))},[o,z,n,p]),C.useEffect(function(){const B=p.current;if(!B)return;function G(L){T.current=!0,v(!0),f(!0,xt(ih,L))}return B.addEventListener("beforematch",G),()=>{B.removeEventListener("beforematch",G)}},[f,p,v]),C.useMemo(()=>({props:{hidden:z,id:u,ref:I}}),[z,u,I])}function Qy(e){const{enabled:t=!0,open:n,ref:r,onComplete:i}=e,o=Fe(i),a=qI(r,n,!1);C.useEffect(()=>{if(!t)return;const u=new AbortController;return a(o,u.signal),()=>{u.abort()}},[t,n,o,a])}const vd=0;class is{constructor(){te(this,"currentId",vd);te(this,"clear",()=>{this.currentId!==vd&&(clearTimeout(this.currentId),this.currentId=vd)});te(this,"disposeEffect",()=>this.clear)}static create(){return new is}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=vd,n()},t)}isStarted(){return this.currentId!==vd}}function Bi(){const e=_r(is.create).current;return Fh(e.disposeEffect),e}let PD={},ND={},ID="";function Loe(e){if(typeof document>"u")return!1;const t=Pt(e);return Nn(t).innerWidth-t.documentElement.clientWidth>0}function Foe(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=Pt(e),r=n.documentElement,i=n.body,o=Da(r)?r:i,a=o.style.overflowY,u=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",o.style.overflowY="scroll";const c=o.offsetWidth;o.style.overflowY="hidden";const f=o.offsetWidth;return o.style.overflowY=a,r.style.scrollbarGutter=u,c===f}function zoe(e){const t=Pt(e),n=t.documentElement,r=t.body,i=Da(n)?n:r,o={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(i.style,o)}}function Boe(e){var g;const t=Pt(e),n=t.documentElement,r=t.body,i=Nn(n);let o=0,a=0,u=!1;const c=un.create();if(ZI&&(((g=i.visualViewport)==null?void 0:g.scale)??1)!==1)return()=>{};function f(){const y=i.getComputedStyle(n),b=i.getComputedStyle(r),x=(y.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";o=n.scrollTop,a=n.scrollLeft,PD={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},ID=n.style.scrollBehavior,ND={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const _=n.scrollHeight>n.clientHeight,R=n.scrollWidth>n.clientWidth,T=y.overflowY==="scroll"||b.overflowY==="scroll",A=y.overflowX==="scroll"||b.overflowX==="scroll",D=Math.max(0,i.innerWidth-r.clientWidth),O=Math.max(0,i.innerHeight-r.clientHeight),$=parseFloat(b.marginTop)+parseFloat(b.marginBottom),z=parseFloat(b.marginLeft)+parseFloat(b.marginRight),j=Da(n)?n:r;if(u=Foe(e),u){n.style.scrollbarGutter=x,j.style.overflowY="hidden",j.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:x,overflowY:"hidden",overflowX:"hidden"}),(_||T)&&(n.style.overflowY="scroll"),(R||A)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:$||O?`calc(100dvh - ${$+O}px)`:"100dvh",width:z||D?`calc(100vw - ${z+D}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=o,r.scrollLeft=a,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function h(){Object.assign(n.style,PD),Object.assign(r.style,ND),u||(n.scrollTop=o,n.scrollLeft=a,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=ID)}function p(){h(),c.request(f)}return f(),i.addEventListener("resize",p),()=>{c.cancel(),h(),typeof i.removeEventListener=="function"&&i.removeEventListener("resize",p)}}class Uoe{constructor(){te(this,"lockCount",0);te(this,"restore",null);te(this,"timeoutLock",is.create());te(this,"timeoutUnlock",is.create());te(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});te(this,"unlock",()=>{var t;this.lockCount===0&&this.restore&&((t=this.restore)==null||t.call(this),this.restore=null)})}acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}lock(t){if(this.lockCount===0||this.restore!==null)return;const r=Pt(t).documentElement,i=Nn(r).getComputedStyle(r).overflowY;if(i==="hidden"||i==="clip"){this.restore=HI;return}const o=JI||!Loe(t);this.restore=o?zoe(t):Boe(t)}}const Hoe=new Uoe;function Goe(e=!0,t=null){Ke(()=>{if(e)return Hoe.acquire(t)},[e,t])}function or(e){const t=_r(qoe,e).current;return t.next=e,Ke(t.effect),t}function qoe(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function Rj(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}class $C{constructor(){te(this,"nodesRef",{current:[]});te(this,"events",Rj())}addNode(t){this.nodesRef.current.push(t)}removeNode(t){const n=this.nodesRef.current.findIndex(r=>r===t);n!==-1&&this.nodesRef.current.splice(n,1)}}const _j=C.createContext(null),Tj=C.createContext(null),ss=()=>{var e;return((e=C.useContext(_j))==null?void 0:e.id)||null},Oa=e=>{const t=C.useContext(Tj);return e??t};function Aj(e){const t=eu(),n=Oa(e),r=ss();return Ke(()=>{if(!t)return;const i={id:t,parentId:r};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,r]),t}function Voe(e){const{children:t,id:n}=e,r=ss();return E.jsx(_j.Provider,{value:C.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function Yoe(e){const{children:t,externalTree:n}=e,r=_r(()=>n??new $C).current;return E.jsx(Tj.Provider,{value:r,children:t})}function Yc(e){return`data-base-ui-${e}`}function A1(e,t,n){if(n&&!Hc(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r==null?void 0:r[t]}return e==null?void 0:e[t]}const Woe={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},Dj={...Woe,position:"fixed",top:0,left:0},Wc=C.forwardRef(function(t,n){const[r,i]=C.useState();Ke(()=>{ej&&i("button")},[]);const o={tabIndex:0,role:r};return E.jsx("span",{...t,ref:n,style:Dj,"aria-hidden":r?void 0:!0,...o,"data-base-ui-focus-guard":""})});let jD=0;function jd(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(jD);const o=()=>e==null?void 0:e.focus({preventScroll:n});i?o():jD=requestAnimationFrame(o)}const bc={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function LD(e){return e==="inert"?bc.inert:e==="aria-hidden"?bc["aria-hidden"]:bc.none}let Nm=new WeakSet,Im={},D1=0;const Mj=e=>e&&(e.host||Mj(e.parentNode)),Koe=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Mj(n);return e.contains(r)?r:null}).filter(n=>n!=null);function Xoe(e,t,n,r){const i="data-base-ui-inert",o=r?"inert":n?"aria-hidden":null,a=Koe(t,e),u=new Set,c=new Set(a),f=[];Im[i]||(Im[i]=new WeakMap);const h=Im[i];a.forEach(p),g(t),u.clear();function p(y){!y||u.has(y)||(u.add(y),y.parentNode&&p(y.parentNode))}function g(y){!y||c.has(y)||[].forEach.call(y.children,b=>{if(Aa(b)!=="script")if(u.has(b))g(b);else{const v=o?b.getAttribute(o):null,S=v!==null&&v!=="false",x=LD(o),_=(x.get(b)||0)+1,R=(h.get(b)||0)+1;x.set(b,_),h.set(b,R),f.push(b),_===1&&S&&Nm.add(b),R===1&&b.setAttribute(i,""),!S&&o&&b.setAttribute(o,o==="inert"?"":"true")}})}return D1+=1,()=>{f.forEach(y=>{const b=LD(o),S=(b.get(y)||0)-1,x=(h.get(y)||0)-1;b.set(y,S),h.set(y,x),S||(!Nm.has(y)&&o&&y.removeAttribute(o),Nm.delete(y)),x||y.removeAttribute(i)}),D1-=1,D1||(bc.inert=new WeakMap,bc["aria-hidden"]=new WeakMap,bc.none=new WeakMap,Nm=new WeakSet,Im={})}}function Qoe(e,t=!1,n=!1){const r=Pt(e[0]).body;return Xoe(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Oj=C.createContext(null),$j=()=>C.useContext(Oj),Zoe=Yc("portal");function Joe(e={}){const{ref:t,container:n,componentProps:r=_n,elementProps:i}=e,o=eu(),a=$j(),u=a==null?void 0:a.portalNode,[c,f]=C.useState(null),[h,p]=C.useState(null),g=Fe(S=>{S!==null&&p(S)}),y=C.useRef(null);Ke(()=>{if(n===null){y.current&&(y.current=null,p(null),f(null));return}if(o==null)return;const S=(n&&(kC(n)?n:n.current))??u??document.body;if(S==null){y.current&&(y.current=null,p(null),f(null));return}y.current!==S&&(y.current=S,p(null),f(S))},[n,u,o]);const b=Gn("div",r,{ref:[t,g],props:[{id:o,[Zoe]:""},i]});return{portalNode:h,portalSubtree:c&&b?gn.createPortal(b,c):null}}const ese=C.forwardRef(function(t,n){const{children:r,container:i,className:o,render:a,renderGuards:u,...c}=t,{portalNode:f,portalSubtree:h}=Joe({container:i,ref:n,componentProps:t,elementProps:c}),p=C.useRef(null),g=C.useRef(null),y=C.useRef(null),b=C.useRef(null),[v,S]=C.useState(null),x=v==null?void 0:v.modal,_=v==null?void 0:v.open,R=typeof u=="boolean"?u:!!v&&!v.modal&&v.open&&!!f;C.useEffect(()=>{if(!f||x)return;function A(D){f&&D.relatedTarget&&mc(D)&&(D.type==="focusin"?DD:koe)(f)}return f.addEventListener("focusin",A,!0),f.addEventListener("focusout",A,!0),()=>{f.removeEventListener("focusin",A,!0),f.removeEventListener("focusout",A,!0)}},[f,x]),C.useEffect(()=>{!f||_||DD(f)},[_,f]);const T=C.useMemo(()=>({beforeOutsideRef:p,afterOutsideRef:g,beforeInsideRef:y,afterInsideRef:b,portalNode:f,setFocusManagerState:S}),[f]);return E.jsxs(C.Fragment,{children:[h,E.jsxs(Oj.Provider,{value:T,children:[R&&f&&E.jsx(Wc,{"data-type":"outside",ref:p,onFocus:A=>{var D;if(mc(A,f))(D=y.current)==null||D.focus();else{const O=v?v.domReference:null,$=wj(O);$==null||$.focus()}}}),R&&f&&E.jsx("span",{"aria-owns":f.id,style:vie}),f&&gn.createPortal(r,f),R&&f&&E.jsx(Wc,{"data-type":"outside",ref:g,onFocus:A=>{var D;if(mc(A,f))(D=b.current)==null||D.focus();else{const O=v?v.domReference:null,$=OC(O);$==null||$.focus(),v!=null&&v.closeOnFocusOut&&(v==null||v.onOpenChange(!1,xt(Uc,A.nativeEvent)))}}})]})]})});function tse(e,t){const n=Nn(e.target);return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const FD=20;let aa=[];function PC(){aa=aa.filter(e=>{var t;return(t=e.deref())==null?void 0:t.isConnected})}function nse(e){PC(),e&&Aa(e)!=="body"&&(aa.push(new WeakRef(e)),aa.length>FD&&(aa=aa.slice(-FD)))}function M1(){var e;return PC(),(e=aa[aa.length-1])==null?void 0:e.deref()}function rse(e){if(!e)return null;const t=mf();return vj(e,t)?e:Uh(e,t)[0]||e}function ise(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():Tr(e).display!=="none"}function zD(e,t){var a;if(!t.current.includes("floating")&&!((a=e.getAttribute("role"))!=null&&a.includes("dialog")))return;const n=mf(),i=Soe(e,n).filter(u=>{const c=u.getAttribute("data-tabindex")||"";return vj(u,n)||u.hasAttribute("data-tabindex")&&!c.startsWith("-")}),o=e.getAttribute("tabindex");t.current.includes("floating")||i.length===0?o!=="0"&&e.setAttribute("tabindex","0"):(o!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function ose(e){const{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:o=!0,restoreFocus:a=!1,modal:u=!0,closeOnFocusOut:c=!0,openInteractionType:f="",nextFocusableElement:h,previousFocusableElement:p,beforeContentFocusGuardRef:g,externalTree:y}=e,b="rootStore"in t?t.rootStore:t,v=b.useState("open"),S=b.useState("domReferenceElement"),x=b.useState("floatingElement"),{events:_,dataRef:R}=b.context,T=Fe(()=>{var Z;return(Z=R.current.floatingContext)==null?void 0:Z.nodeId}),A=i===!1,D=Tw(S)&&A,O=C.useRef(["content"]),$=or(i),z=or(o),j=or(f),I=Oa(y),M=$j(),B=C.useRef(null),G=C.useRef(null),L=C.useRef(!1),F=C.useRef(!1),U=C.useRef(!1),V=C.useRef(-1),W=C.useRef(""),N=C.useRef(""),Y=C.useRef(null),J=C.useRef(null),H=Sa(Y,g,M==null?void 0:M.beforeInsideRef),ie=Sa(J,M==null?void 0:M.afterInsideRef),re=Bi(),he=Bi(),ve=Hy(),Re=M!=null,ce=ny(x),Ie=Fe((Z=ce)=>Z?Uh(Z,mf()):[]),Ve=Fe(Z=>{const ne=Ie(Z);return O.current.map(()=>ne).filter(Boolean).flat()});C.useEffect(()=>{if(r||!u)return;function Z(xe){xe.key==="Tab"&&pt(ce,mi(Pt(ce)))&&Ie().length===0&&!D&&Wn(xe)}const ne=Pt(ce);return ne.addEventListener("keydown",Z),()=>{ne.removeEventListener("keydown",Z)}},[r,S,ce,u,O,D,Ie,Ve]),C.useEffect(()=>{if(r||!v)return;const Z=Pt(ce);function ne(){U.current=!1}function xe(Ce){const le=qr(Ce),oe=pt(x,le)||pt(S,le)||pt(M==null?void 0:M.portalNode,le);U.current=!oe,N.current=Ce.pointerType||"keyboard",le!=null&&le.closest(`[${gie}]`)&&(F.current=!0)}function ge(){N.current="keyboard"}return Z.addEventListener("pointerdown",xe,!0),Z.addEventListener("pointerup",ne,!0),Z.addEventListener("pointercancel",ne,!0),Z.addEventListener("keydown",ge,!0),()=>{Z.removeEventListener("pointerdown",xe,!0),Z.removeEventListener("pointerup",ne,!0),Z.removeEventListener("pointercancel",ne,!0),Z.removeEventListener("keydown",ge,!0)}},[r,x,S,ce,v,M]),C.useEffect(()=>{if(r||!c)return;const Z=Pt(ce);function ne(){F.current=!0,he.start(0,()=>{F.current=!1})}function xe(me){const ae=qr(me),Te=Ie().indexOf(ae);Te!==-1&&(V.current=Te)}function ge(me){const ae=me.relatedTarget,Oe=me.currentTarget,Te=qr(me);queueMicrotask(()=>{const _e=T(),De=b.context.triggerElements,ue=(ae==null?void 0:ae.hasAttribute(Yc("focus-guard")))&&[Y.current,J.current,M==null?void 0:M.beforeInsideRef.current,M==null?void 0:M.afterInsideRef.current,M==null?void 0:M.beforeOutsideRef.current,M==null?void 0:M.afterOutsideRef.current,jo(p),jo(h)].includes(ae),Se=!(pt(S,ae)||pt(x,ae)||pt(ae,x)||pt(M==null?void 0:M.portalNode,ae)||ae!=null&&De.hasElement(ae)||De.hasMatchingElement(ke=>pt(ke,ae))||ue||I&&(Nl(I.nodesRef.current,_e).find(ke=>{var Pe,Le;return pt((Pe=ke.context)==null?void 0:Pe.elements.floating,ae)||pt((Le=ke.context)==null?void 0:Le.elements.domReference,ae)})||RD(I.nodesRef.current,_e).find(ke=>{var Pe,Le,st;return[(Pe=ke.context)==null?void 0:Pe.elements.floating,ny((Le=ke.context)==null?void 0:Le.elements.floating)].includes(ae)||((st=ke.context)==null?void 0:st.elements.domReference)===ae})));if(Oe===S&&ce&&zD(ce,O),a&&Oe!==S&&!ise(Te)&&mi(Z)===Z.body){if(Jt(ce)&&(ce.focus(),a==="popup")){ve.request(()=>{ce.focus()});return}const ke=V.current,Pe=Ie(),Le=Pe[ke]||Pe[Pe.length-1]||ce;Jt(Le)&&Le.focus()}if(R.current.insideReactTree){R.current.insideReactTree=!1;return}(D||!u)&&ae&&Se&&!F.current&&(D||ae!==M1())&&(L.current=!0,b.setOpen(!1,xt(Uc,me)))})}function Ce(){U.current||(R.current.insideReactTree=!0,re.start(0,()=>{R.current.insideReactTree=!1}))}const le=Jt(S)?S:null,oe=[];if(!(!x&&!le))return le&&(le.addEventListener("focusout",ge),le.addEventListener("pointerdown",ne),oe.push(()=>{le.removeEventListener("focusout",ge),le.removeEventListener("pointerdown",ne)})),x&&(x.addEventListener("focusin",xe),x.addEventListener("focusout",ge),M&&(x.addEventListener("focusout",Ce,!0),oe.push(()=>{x.removeEventListener("focusout",Ce,!0)})),oe.push(()=>{x.removeEventListener("focusin",xe),x.removeEventListener("focusout",ge)})),()=>{oe.forEach(me=>{me()})}},[r,S,x,ce,u,I,M,b,c,a,Ie,D,T,O,R,re,he,ve,h,p]),C.useEffect(()=>{var Ce,le,oe;if(r||!x||!v)return;const Z=Array.from(((Ce=M==null?void 0:M.portalNode)==null?void 0:Ce.querySelectorAll(`[${Yc("portal")}]`))||[]),xe=(oe=(le=(I?RD(I.nodesRef.current,T()):[]).find(me=>{var ae;return Tw(((ae=me.context)==null?void 0:ae.elements.domReference)||null)}))==null?void 0:le.context)==null?void 0:oe.elements.domReference,ge=[x,xe,...Z,B.current,G.current,Y.current,J.current,M==null?void 0:M.beforeOutsideRef.current,M==null?void 0:M.afterOutsideRef.current,jo(p),jo(h),D?S:null].filter(me=>me!=null);return Qoe(ge,u||D)},[v,r,S,x,u,O,M,D,I,T,h,p]),Ke(()=>{if(!v||r||!Jt(ce))return;const Z=Pt(ce),ne=mi(Z);queueMicrotask(()=>{const xe=Ve(ce),ge=$.current,Ce=typeof ge=="function"?ge(j.current||""):ge;if(Ce===void 0||Ce===!1)return;let le;Ce===!0||Ce===null?le=xe[0]||ce:le=jo(Ce),le=le||xe[0]||ce,!pt(ce,ne)&&jd(le,{preventScroll:le===ce})})},[r,v,ce,A,Ve,$,j]),Ke(()=>{if(r||!ce)return;const Z=Pt(ce),ne=mi(Z);nse(ne);function xe(le){if(le.open||(W.current=tse(le.nativeEvent,N.current)),le.reason===Gr&&le.nativeEvent.type==="mouseleave"&&(L.current=!0),le.reason===SC)if(le.nested)L.current=!1;else if(oj(le.nativeEvent)||sj(le.nativeEvent))L.current=!1;else{let oe=!1;document.createElement("div").focus({get preventScroll(){return oe=!0,!1}}),oe?L.current=!1:L.current=!0}}_.on("openchange",xe);const ge=Z.createElement("span");ge.setAttribute("tabindex","-1"),ge.setAttribute("aria-hidden","true"),Object.assign(ge.style,Dj),Re&&S&&S.insertAdjacentElement("afterend",ge);function Ce(){const le=z.current;let oe=typeof le=="function"?le(W.current):le;if(oe===void 0||oe===!1)return null;if(oe===null&&(oe=!0),typeof oe=="boolean"){const ae=S||M1();return ae&&ae.isConnected?ae:ge}const me=S||M1()||ge;return jo(oe)||me}return()=>{_.off("openchange",xe);const le=mi(Z),oe=pt(x,le)||I&&Nl(I.nodesRef.current,T(),!1).some(ae=>{var Oe;return pt((Oe=ae.context)==null?void 0:Oe.elements.floating,le)}),me=Ce();queueMicrotask(()=>{const ae=rse(me),Oe=typeof z.current!="boolean";z.current&&!L.current&&Jt(ae)&&(!(!Oe&&ae!==le&&le!==Z.body)||oe)&&ae.focus({preventScroll:!0}),ge.remove(),L.current=!1})}},[r,x,ce,z,R,_,I,Re,S,T]),Ke(()=>{if(!ZI||v||!x)return;const Z=mi(Pt(x));!Jt(Z)||!Xy(Z)||pt(x,Z)&&Z.blur()},[v,x]),Ke(()=>{if(!(r||!M))return M.setFocusManagerState({modal:u,closeOnFocusOut:c,open:v,onOpenChange:b.setOpen,domReference:S}),()=>{M.setFocusManagerState(null)}},[r,M,u,v,b,c,S]),Ke(()=>{if(!(r||!ce))return zD(ce,O),()=>{queueMicrotask(PC)}},[r,ce,O]);const X=!r&&(u?!D:!0)&&(Re||u);return E.jsxs(C.Fragment,{children:[X&&E.jsx(Wc,{"data-type":"inside",ref:H,onFocus:Z=>{var ne;if(u){const xe=Ve();jd(xe[xe.length-1])}else if(M!=null&&M.portalNode)if(L.current=!1,mc(Z,M.portalNode)){const xe=OC(S);xe==null||xe.focus()}else(ne=jo(p??M.beforeOutsideRef))==null||ne.focus()}}),n,X&&E.jsx(Wc,{"data-type":"inside",ref:ie,onFocus:Z=>{var ne;if(u)jd(Ve()[0]);else if(M!=null&&M.portalNode)if(c&&(L.current=!0),mc(Z,M.portalNode)){const xe=wj(S);xe==null||xe.focus()}else(ne=jo(h??M.afterOutsideRef))==null||ne.focus()}})]})}function Pj(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:i=!0,event:o="click",toggle:a=!0,ignoreMouse:u=!1,stickIfOpen:c=!0,touchOpenDelay:f=0,reason:h=Bc}=t,p=C.useRef(void 0),g=Hy(),y=Bi(),b=C.useMemo(()=>({onPointerDown(v){p.current=v.pointerType},onMouseDown(v){const S=p.current,x=v.nativeEvent,_=n.select("open");if(v.button!==0||o==="click"||Hc(S,!0)&&u)return;const R=r.current.openEvent,T=R==null?void 0:R.type,A=n.select("domReferenceElement")!==v.currentTarget,D=_&&A||!(_&&a&&(!(R&&c)||T==="click"||T==="mousedown"));if(Xy(x.target)){const $=xt(h,x,x.target);D&&S==="touch"&&f>0?y.start(f,()=>{n.setOpen(!0,$)}):n.setOpen(D,$);return}const O=v.currentTarget;g.request(()=>{const $=xt(h,x,O);D&&S==="touch"&&f>0?y.start(f,()=>{n.setOpen(!0,$)}):n.setOpen(D,$)})},onClick(v){if(o==="mousedown-only")return;const S=p.current;if(o==="mousedown"&&S){p.current=void 0;return}if(Hc(S,!0)&&u)return;const x=n.select("open"),_=r.current.openEvent,R=n.select("domReferenceElement")!==v.currentTarget,T=x&&R||!(x&&a&&(!(_&&c)||aj(_))),A=xt(h,v.nativeEvent,v.currentTarget);T&&S==="touch"&&f>0?y.start(f,()=>{n.setOpen(!0,A)}):n.setOpen(T,A)},onKeyDown(){p.current=void 0}}),[r,o,u,n,c,a,g,y,f,h]);return C.useMemo(()=>i?{reference:b}:_n,[i,b])}function BD(e,t,n){let{reference:r,floating:i}=e;const o=wi(t),a=MC(t),u=DC(a),c=Yr(t),f=o==="y",h=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,g=r[u]/2-i[u]/2;let y;switch(c){case"top":y={x:h,y:r.y-i.height};break;case"bottom":y={x:h,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:p};break;case"left":y={x:r.x-i.width,y:p};break;default:y={x:r.x,y:r.y}}switch(Ma(t)){case"start":y[a]-=g*(n&&f?-1:1);break;case"end":y[a]+=g*(n&&f?-1:1);break}return y}async function sse(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:u,strategy:c}=e,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:g=!1,padding:y=0}=rs(t,e),b=lj(y),S=u[g?p==="floating"?"reference":"floating":p],x=iy(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(S)))==null||n?S:S.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(u.floating)),boundary:f,rootBoundary:h,strategy:c})),_=p==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,R=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),T=await(o.isElement==null?void 0:o.isElement(R))?await(o.getScale==null?void 0:o.getScale(R))||{x:1,y:1}:{x:1,y:1},A=iy(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:_,offsetParent:R,strategy:c}):_);return{top:(x.top-A.top+b.top)/T.y,bottom:(A.bottom-x.bottom+b.bottom)/T.y,left:(x.left-A.left+b.left)/T.x,right:(A.right-x.right+b.right)/T.x}}const ase=50,lse=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,u=a.detectOverflow?a:{...a,detectOverflow:sse},c=await(a.isRTL==null?void 0:a.isRTL(t));let f=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:h,y:p}=BD(f,r,c),g=r,y=0;const b={};for(let v=0;v<o.length;v++){const S=o[v];if(!S)continue;const{name:x,fn:_}=S,{x:R,y:T,data:A,reset:D}=await _({x:h,y:p,initialPlacement:r,placement:g,strategy:i,middlewareData:b,rects:f,platform:u,elements:{reference:e,floating:t}});h=R??h,p=T??p,b[x]={...b[x],...A},D&&y<ase&&(y++,typeof D=="object"&&(D.placement&&(g=D.placement),D.rects&&(f=D.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):D.rects),{x:h,y:p}=BD(f,g,c)),v=-1)}return{x:h,y:p,placement:g,strategy:i,middlewareData:b}},use=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:a,initialPlacement:u,platform:c,elements:f}=t,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0,...S}=rs(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const x=Yr(i),_=wi(u),R=Yr(u)===u,T=await(c.isRTL==null?void 0:c.isRTL(f.floating)),A=g||(R||!v?[ry(u)]:noe(u)),D=b!=="none";!g&&D&&A.push(...soe(u,v,b,T));const O=[u,...A],$=await c.detectOverflow(t,S),z=[];let j=((r=o.flip)==null?void 0:r.overflows)||[];if(h&&z.push($[x]),p){const G=toe(i,a,T);z.push($[G[0]],$[G[1]])}if(j=[...j,{placement:i,overflows:z}],!z.every(G=>G<=0)){var I,M;const G=(((I=o.flip)==null?void 0:I.index)||0)+1,L=O[G];if(L&&(!(p==="alignment"?_!==wi(L):!1)||j.every(V=>wi(V.placement)===_?V.overflows[0]>0:!0)))return{data:{index:G,overflows:j},reset:{placement:L}};let F=(M=j.filter(U=>U.overflows[0]<=0).sort((U,V)=>U.overflows[1]-V.overflows[1])[0])==null?void 0:M.placement;if(!F)switch(y){case"bestFit":{var B;const U=(B=j.filter(V=>{if(D){const W=wi(V.placement);return W===_||W==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(W=>W>0).reduce((W,N)=>W+N,0)]).sort((V,W)=>V[1]-W[1])[0])==null?void 0:B[0];U&&(F=U);break}case"initialPlacement":F=u;break}if(i!==F)return{reset:{placement:F}}}return{}}}};function UD(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function HD(e){return Jie.some(t=>e[t]>=0)}const cse=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...o}=rs(e,t);switch(i){case"referenceHidden":{const a=await r.detectOverflow(t,{...o,elementContext:"reference"}),u=UD(a,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:HD(u)}}}case"escaped":{const a=await r.detectOverflow(t,{...o,altBoundary:!0}),u=UD(a,n.floating);return{data:{escapedOffsets:u,escaped:HD(u)}}}default:return{}}}}},Nj=new Set(["left","top"]);async function fse(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=Yr(n),u=Ma(n),c=wi(n)==="y",f=Nj.has(a)?-1:1,h=o&&c?-1:1,p=rs(t,e);let{mainAxis:g,crossAxis:y,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof b=="number"&&(y=u==="end"?b*-1:b),c?{x:y*h,y:g*f}:{x:g*f,y:y*h}}const dse=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:u}=t,c=await fse(t,e);return a===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:o+c.y,data:{...c,placement:a}}}}},hse=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:o}=t,{mainAxis:a=!0,crossAxis:u=!1,limiter:c={fn:x=>{let{x:_,y:R}=x;return{x:_,y:R}}},...f}=rs(e,t),h={x:n,y:r},p=await o.detectOverflow(t,f),g=wi(Yr(i)),y=AC(g);let b=h[y],v=h[g];if(a){const x=y==="y"?"top":"left",_=y==="y"?"bottom":"right",R=b+p[x],T=b-p[_];b=Aw(R,b,T)}if(u){const x=g==="y"?"top":"left",_=g==="y"?"bottom":"right",R=v+p[x],T=v-p[_];v=Aw(R,v,T)}const S=c.fn({...t,[y]:b,[g]:v});return{...S,data:{x:S.x-n,y:S.y-r,enabled:{[y]:a,[g]:u}}}}}},pse=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:u=0,mainAxis:c=!0,crossAxis:f=!0}=rs(e,t),h={x:n,y:r},p=wi(i),g=AC(p);let y=h[g],b=h[p];const v=rs(u,t),S=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const R=g==="y"?"height":"width",T=o.reference[g]-o.floating[R]+S.mainAxis,A=o.reference[g]+o.reference[R]-S.mainAxis;y<T?y=T:y>A&&(y=A)}if(f){var x,_;const R=g==="y"?"width":"height",T=Nj.has(Yr(i)),A=o.reference[p]-o.floating[R]+(T&&((x=a.offset)==null?void 0:x[p])||0)+(T?0:S.crossAxis),D=o.reference[p]+o.reference[R]+(T?0:((_=a.offset)==null?void 0:_[p])||0)-(T?S.crossAxis:0);b<A?b=A:b>D&&(b=D)}return{[g]:y,[p]:b}}}},mse=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:a,elements:u}=t,{apply:c=()=>{},...f}=rs(e,t),h=await a.detectOverflow(t,f),p=Yr(i),g=Ma(i),y=wi(i)==="y",{width:b,height:v}=o.floating;let S,x;p==="top"||p==="bottom"?(S=p,x=g===(await(a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(x=p,S=g==="end"?"top":"bottom");const _=v-h.top-h.bottom,R=b-h.left-h.right,T=Gc(v-h[S],_),A=Gc(b-h[x],R),D=!t.middlewareData.shift;let O=T,$=A;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&($=R),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(O=_),D&&!g){const j=Vr(h.left,0),I=Vr(h.right,0),M=Vr(h.top,0),B=Vr(h.bottom,0);y?$=b-2*(j!==0||I!==0?j+I:Vr(h.left,h.right)):O=v-2*(M!==0||B!==0?M+B:Vr(h.top,h.bottom))}await c({...t,availableWidth:$,availableHeight:O});const z=await a.getDimensions(u.floating);return b!==z.width||v!==z.height?{reset:{rects:!0}}:{}}}};function Ij(e){const t=Tr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Jt(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,u=qc(n)!==o||qc(r)!==a;return u&&(n=o,r=a),{width:n,height:r,$:u}}function NC(e){return It(e)?e:e.contextElement}function vc(e){const t=NC(e);if(!Jt(t))return so(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=Ij(t);let a=(o?qc(n.width):n.width)/r,u=(o?qc(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}const gse=so(0);function jj(e){const t=Nn(e);return!Wy()||!t.visualViewport?gse:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function yse(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Nn(e)?!1:t}function Ul(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=NC(e);let a=so(1);t&&(r?It(r)&&(a=vc(r)):a=vc(e));const u=yse(o,n,r)?jj(o):so(0);let c=(i.left+u.x)/a.x,f=(i.top+u.y)/a.y,h=i.width/a.x,p=i.height/a.y;if(o){const g=Nn(o),y=r&&It(r)?Nn(r):r;let b=g,v=kw(b);for(;v&&r&&y!==b;){const S=vc(v),x=v.getBoundingClientRect(),_=Tr(v),R=x.left+(v.clientLeft+parseFloat(_.paddingLeft))*S.x,T=x.top+(v.clientTop+parseFloat(_.paddingTop))*S.y;c*=S.x,f*=S.y,h*=S.x,p*=S.y,c+=R,f+=T,b=Nn(v),v=kw(b)}}return iy({width:h,height:p,x:c,y:f})}function Zy(e,t){const n=Ky(e).scrollLeft;return t?t.left+n:Ul(uo(e)).left+n}function Lj(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Zy(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function bse(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=uo(r),u=t?Yy(t.floating):!1;if(r===a||u&&o)return n;let c={scrollLeft:0,scrollTop:0},f=so(1);const h=so(0),p=Jt(r);if((p||!p&&!o)&&((Aa(r)!=="body"||Da(a))&&(c=Ky(r)),p)){const y=Ul(r);f=vc(r),h.x=y.x+r.clientLeft,h.y=y.y+r.clientTop}const g=a&&!p&&!o?Lj(a,c):so(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-c.scrollLeft*f.x+h.x+g.x,y:n.y*f.y-c.scrollTop*f.y+h.y+g.y}}function vse(e){return Array.from(e.getClientRects())}function xse(e){const t=uo(e),n=Ky(e),r=e.ownerDocument.body,i=Vr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Vr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Zy(e);const u=-n.scrollTop;return Tr(r).direction==="rtl"&&(a+=Vr(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:u}}const GD=25;function wse(e,t){const n=Nn(e),r=uo(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,u=0,c=0;if(i){o=i.width,a=i.height;const h=Wy();(!h||h&&t==="fixed")&&(u=i.offsetLeft,c=i.offsetTop)}const f=Zy(r);if(f<=0){const h=r.ownerDocument,p=h.body,g=getComputedStyle(p),y=h.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,b=Math.abs(r.clientWidth-p.clientWidth-y);b<=GD&&(o-=b)}else f<=GD&&(o+=f);return{width:o,height:a,x:u,y:c}}function Sse(e,t){const n=Ul(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Jt(e)?vc(e):so(1),a=e.clientWidth*o.x,u=e.clientHeight*o.y,c=i*o.x,f=r*o.y;return{width:a,height:u,x:c,y:f}}function qD(e,t,n){let r;if(t==="viewport")r=wse(e,n);else if(t==="document")r=xse(uo(e));else if(It(t))r=Sse(t,n);else{const i=jj(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return iy(r)}function Fj(e,t){const n=ao(e);return n===t||!It(n)||oo(n)?!1:Tr(n).position==="fixed"||Fj(n,t)}function Cse(e,t){const n=t.get(e);if(n)return n;let r=ha(e,[],!1).filter(u=>It(u)&&Aa(u)!=="body"),i=null;const o=Tr(e).position==="fixed";let a=o?ao(e):e;for(;It(a)&&!oo(a);){const u=Tr(a),c=RC(a);!c&&u.position==="fixed"&&(i=null),(o?!c&&!i:!c&&u.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Da(a)&&!c&&Fj(e,a))?r=r.filter(h=>h!==a):i=u,a=ao(a)}return t.set(e,r),r}function Ese(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Yy(t)?[]:Cse(t,this._c):[].concat(n),r],u=qD(t,a[0],i);let c=u.top,f=u.right,h=u.bottom,p=u.left;for(let g=1;g<a.length;g++){const y=qD(t,a[g],i);c=Vr(y.top,c),f=Gc(y.right,f),h=Gc(y.bottom,h),p=Vr(y.left,p)}return{width:f-p,height:h-c,x:p,y:c}}function kse(e){const{width:t,height:n}=Ij(e);return{width:t,height:n}}function Rse(e,t,n){const r=Jt(t),i=uo(t),o=n==="fixed",a=Ul(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const c=so(0);function f(){c.x=Zy(i)}if(r||!r&&!o)if((Aa(t)!=="body"||Da(i))&&(u=Ky(t)),r){const y=Ul(t,!0,o,t);c.x=y.x+t.clientLeft,c.y=y.y+t.clientTop}else i&&f();o&&!r&&i&&f();const h=i&&!r&&!o?Lj(i,u):so(0),p=a.left+u.scrollLeft-c.x-h.x,g=a.top+u.scrollTop-c.y-h.y;return{x:p,y:g,width:a.width,height:a.height}}function O1(e){return Tr(e).position==="static"}function VD(e,t){if(!Jt(e)||Tr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return uo(e)===n&&(n=n.ownerDocument.body),n}function zj(e,t){const n=Nn(e);if(Yy(e))return n;if(!Jt(e)){let i=ao(e);for(;i&&!oo(i);){if(It(i)&&!O1(i))return i;i=ao(i)}return n}let r=VD(e,t);for(;r&&zie(r)&&O1(r);)r=VD(r,t);return r&&oo(r)&&O1(r)&&!RC(r)?n:r||Hie(e)||n}const _se=async function(e){const t=this.getOffsetParent||zj,n=this.getDimensions,r=await n(e.floating);return{reference:Rse(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Tse(e){return Tr(e).direction==="rtl"}const Ase={convertOffsetParentRelativeRectToViewportRelativeRect:bse,getDocumentElement:uo,getClippingRect:Ese,getOffsetParent:zj,getElementRects:_se,getClientRects:vse,getDimensions:kse,getScale:vc,isElement:It,isRTL:Tse};function Bj(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Dse(e,t){let n=null,r;const i=uo(e);function o(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function a(u,c){u===void 0&&(u=!1),c===void 0&&(c=1),o();const f=e.getBoundingClientRect(),{left:h,top:p,width:g,height:y}=f;if(u||t(),!g||!y)return;const b=oc(p),v=oc(i.clientWidth-(h+g)),S=oc(i.clientHeight-(p+y)),x=oc(h),R={rootMargin:-b+"px "+-v+"px "+-S+"px "+-x+"px",threshold:Vr(0,Gc(1,c))||1};let T=!0;function A(D){const O=D[0].intersectionRatio;if(O!==c){if(!T)return a();O?a(!1,O):r=setTimeout(()=>{a(!1,1e-7)},1e3)}O===1&&!Bj(f,e.getBoundingClientRect())&&a(),T=!1}try{n=new IntersectionObserver(A,{...R,root:i.ownerDocument})}catch{n=new IntersectionObserver(A,R)}n.observe(e)}return a(!0),o}function YD(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,f=NC(e),h=i||o?[...f?ha(f):[],...t?ha(t):[]]:[];h.forEach(x=>{i&&x.addEventListener("scroll",n,{passive:!0}),o&&x.addEventListener("resize",n)});const p=f&&u?Dse(f,n):null;let g=-1,y=null;a&&(y=new ResizeObserver(x=>{let[_]=x;_&&_.target===f&&y&&t&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var R;(R=y)==null||R.observe(t)})),n()}),f&&!c&&y.observe(f),t&&y.observe(t));let b,v=c?Ul(e):null;c&&S();function S(){const x=Ul(e);v&&!Bj(v,x)&&n(),v=x,b=requestAnimationFrame(S)}return n(),()=>{var x;h.forEach(_=>{i&&_.removeEventListener("scroll",n),o&&_.removeEventListener("resize",n)}),p==null||p(),(x=y)==null||x.disconnect(),y=null,c&&cancelAnimationFrame(b)}}const Mse=dse,Ose=hse,$se=use,Pse=mse,Nse=cse,Ise=pse,jse=(e,t,n)=>{const r=new Map,i={platform:Ase,...n},o={...i.platform,_c:r};return lse(e,t,{...i,platform:o})};var Lse=typeof document<"u",Fse=function(){},gg=Lse?C.useLayoutEffect:Fse;function uy(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!uy(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!uy(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Uj(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function WD(e,t){const n=Uj(e);return Math.round(t*n)/n}function $1(e){const t=C.useRef(e);return gg(()=>{t.current=e}),t}function zse(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:u=!0,whileElementsMounted:c,open:f}=e,[h,p]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,y]=C.useState(r);uy(g,r)||y(r);const[b,v]=C.useState(null),[S,x]=C.useState(null),_=C.useCallback(V=>{V!==D.current&&(D.current=V,v(V))},[]),R=C.useCallback(V=>{V!==O.current&&(O.current=V,x(V))},[]),T=o||b,A=a||S,D=C.useRef(null),O=C.useRef(null),$=C.useRef(h),z=c!=null,j=$1(c),I=$1(i),M=$1(f),B=C.useCallback(()=>{if(!D.current||!O.current)return;const V={placement:t,strategy:n,middleware:g};I.current&&(V.platform=I.current),jse(D.current,O.current,V).then(W=>{const N={...W,isPositioned:M.current!==!1};G.current&&!uy($.current,N)&&($.current=N,gn.flushSync(()=>{p(N)}))})},[g,t,n,I,M]);gg(()=>{f===!1&&$.current.isPositioned&&($.current.isPositioned=!1,p(V=>({...V,isPositioned:!1})))},[f]);const G=C.useRef(!1);gg(()=>(G.current=!0,()=>{G.current=!1}),[]),gg(()=>{if(T&&(D.current=T),A&&(O.current=A),T&&A){if(j.current)return j.current(T,A,B);B()}},[T,A,B,j,z]);const L=C.useMemo(()=>({reference:D,floating:O,setReference:_,setFloating:R}),[_,R]),F=C.useMemo(()=>({reference:T,floating:A}),[T,A]),U=C.useMemo(()=>{const V={position:n,left:0,top:0};if(!F.floating)return V;const W=WD(F.floating,h.x),N=WD(F.floating,h.y);return u?{...V,transform:"translate("+W+"px, "+N+"px)",...Uj(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:N}},[n,u,F.floating,h.x,h.y]);return C.useMemo(()=>({...h,update:B,refs:L,elements:F,floatingStyles:U}),[h,B,L,F,U])}const Bse=(e,t)=>{const n=Mse(e);return{name:n.name,fn:n.fn,options:[e,t]}},Use=(e,t)=>{const n=Ose(e);return{name:n.name,fn:n.fn,options:[e,t]}},Hse=(e,t)=>({fn:Ise(e).fn,options:[e,t]}),Gse=(e,t)=>{const n=$se(e);return{name:n.name,fn:n.fn,options:[e,t]}},qse=(e,t)=>{const n=Pse(e);return{name:n.name,fn:n.fn,options:[e,t]}},Vse=(e,t)=>{const n=Nse(e);return{name:n.name,fn:n.fn,options:[e,t]}},Yse={intentional:"onClick",sloppy:"onPointerDown"};function Wse(e){return{escapeKey:typeof e=="boolean"?e:(e==null?void 0:e.escapeKey)??!1,outsidePress:typeof e=="boolean"?e:(e==null?void 0:e.outsidePress)??!0}}function Kse(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),o=n.useState("referenceElement"),a=n.useState("domReferenceElement"),{onOpenChange:u,dataRef:c}=n.context,{enabled:f=!0,escapeKey:h=!0,outsidePress:p=!0,outsidePressEvent:g="sloppy",referencePress:y=!1,referencePressEvent:b="sloppy",ancestorScroll:v=!1,bubbles:S,externalTree:x}=t,_=Oa(x),R=Fe(typeof p=="function"?p:()=>!1),T=typeof p=="function"?R:p,A=C.useRef(!1),{escapeKey:D,outsidePress:O}=Wse(S),$=C.useRef(null),z=Bi(),j=Bi(),I=Fe(()=>{j.clear(),c.current.insideReactTree=!1}),M=C.useRef(!1),B=C.useRef(""),G=Fe(X=>{B.current=X.pointerType}),L=Fe(()=>{const X=B.current,Z=X==="pen"||!X?"mouse":X,ne=typeof g=="function"?g():g;return typeof ne=="string"?ne:ne[Z]}),F=Fe(X=>{var Ce;if(!r||!f||!h||X.key!=="Escape"||M.current)return;const Z=(Ce=c.current.floatingContext)==null?void 0:Ce.nodeId,ne=_?Nl(_.nodesRef.current,Z):[];if(!D&&ne.length>0){let le=!0;if(ne.forEach(oe=>{var me;(me=oe.context)!=null&&me.open&&!oe.context.dataRef.current.__escapeKeyBubbles&&(le=!1)}),!le)return}const xe=Zie(X)?X.nativeEvent:X,ge=xt(CC,xe);n.setOpen(!1,ge),!D&&!ge.isPropagationAllowed&&X.stopPropagation()}),U=Fe(X=>{const Z=L();return Z==="intentional"&&X.type!=="click"||Z==="sloppy"&&X.type==="click"}),V=Fe(()=>{c.current.insideReactTree=!0,j.start(0,I)}),W=Fe((X,Z=!1)=>{var Oe;if(U(X)){I();return}if(c.current.insideReactTree){I();return}if(L()==="intentional"&&Z||typeof T=="function"&&!T(X))return;const ne=qr(X),xe=`[${Yc("inert")}]`,ge=Pt(n.select("floatingElement")).querySelectorAll(xe),Ce=n.context.triggerElements;if(ne&&(Ce.hasElement(ne)||Ce.hasMatchingElement(Te=>pt(Te,ne))))return;let le=It(ne)?ne:null;for(;le&&!oo(le);){const Te=ao(le);if(oo(Te)||!It(Te))break;le=Te}if(ge.length&&It(ne)&&!Xie(ne)&&!pt(ne,n.select("floatingElement"))&&Array.from(ge).every(Te=>!pt(le,Te)))return;if(Jt(ne)&&!("touches"in X)){const Te=oo(ne),_e=Tr(ne),De=/auto|scroll/,ue=Te||De.test(_e.overflowX),Se=Te||De.test(_e.overflowY),ke=ue&&ne.clientWidth>0&&ne.scrollWidth>ne.clientWidth,Pe=Se&&ne.clientHeight>0&&ne.scrollHeight>ne.clientHeight,Le=_e.direction==="rtl",st=Pe&&(Le?X.offsetX<=ne.offsetWidth-ne.clientWidth:X.offsetX>ne.clientWidth),Bt=ke&&X.offsetY>ne.clientHeight;if(st||Bt)return}const oe=(Oe=c.current.floatingContext)==null?void 0:Oe.nodeId,me=_&&Nl(_.nodesRef.current,oe).some(Te=>{var _e;return Mi(X,(_e=Te.context)==null?void 0:_e.elements.floating)});if(Mi(X,n.select("floatingElement"))||Mi(X,n.select("domReferenceElement"))||me)return;const ae=_?Nl(_.nodesRef.current,oe):[];if(ae.length>0){let Te=!0;if(ae.forEach(_e=>{var De;(De=_e.context)!=null&&De.open&&!_e.context.dataRef.current.__outsidePressBubbles&&(Te=!1)}),!Te)return}n.setOpen(!1,xt(SC,X)),I()}),N=Fe(X=>{L()!=="sloppy"||X.pointerType==="touch"||!n.select("open")||!f||Mi(X,n.select("floatingElement"))||Mi(X,n.select("domReferenceElement"))||W(X)}),Y=Fe(X=>{if(L()!=="sloppy"||!n.select("open")||!f||Mi(X,n.select("floatingElement"))||Mi(X,n.select("domReferenceElement")))return;const Z=X.touches[0];Z&&($.current={startTime:Date.now(),startX:Z.clientX,startY:Z.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},z.start(1e3,()=>{$.current&&($.current.dismissOnTouchEnd=!1,$.current.dismissOnMouseDown=!1)}))}),J=Fe(X=>{const Z=qr(X);function ne(){Y(X),Z==null||Z.removeEventListener(X.type,ne)}Z==null||Z.addEventListener(X.type,ne)}),H=Fe(X=>{const Z=A.current;if(A.current=!1,z.clear(),X.type==="mousedown"&&$.current&&!$.current.dismissOnMouseDown)return;const ne=qr(X);function xe(){X.type==="pointerdown"?N(X):W(X,Z),ne==null||ne.removeEventListener(X.type,xe)}ne==null||ne.addEventListener(X.type,xe)}),ie=Fe(X=>{if(L()!=="sloppy"||!$.current||Mi(X,n.select("floatingElement"))||Mi(X,n.select("domReferenceElement")))return;const Z=X.touches[0];if(!Z)return;const ne=Math.abs(Z.clientX-$.current.startX),xe=Math.abs(Z.clientY-$.current.startY),ge=Math.sqrt(ne*ne+xe*xe);ge>5&&($.current.dismissOnTouchEnd=!0),ge>10&&(W(X),z.clear(),$.current=null)}),re=Fe(X=>{const Z=qr(X);function ne(){ie(X),Z==null||Z.removeEventListener(X.type,ne)}Z==null||Z.addEventListener(X.type,ne)}),he=Fe(X=>{L()!=="sloppy"||!$.current||Mi(X,n.select("floatingElement"))||Mi(X,n.select("domReferenceElement"))||($.current.dismissOnTouchEnd&&W(X),z.clear(),$.current=null)}),ve=Fe(X=>{const Z=qr(X);function ne(){he(X),Z==null||Z.removeEventListener(X.type,ne)}Z==null||Z.addEventListener(X.type,ne)});C.useEffect(()=>{if(!r||!f)return;c.current.__escapeKeyBubbles=D,c.current.__outsidePressBubbles=O;const X=new is;function Z(le){n.setOpen(!1,xt(ih,le))}function ne(){X.clear(),M.current=!0}function xe(){X.start(Wy()?5:0,()=>{M.current=!1})}const ge=Pt(i);ge.addEventListener("pointerdown",G,!0),h&&(ge.addEventListener("keydown",F),ge.addEventListener("compositionstart",ne),ge.addEventListener("compositionend",xe)),T&&(ge.addEventListener("click",H,!0),ge.addEventListener("pointerdown",H,!0),ge.addEventListener("touchstart",J,!0),ge.addEventListener("touchmove",re,!0),ge.addEventListener("touchend",ve,!0),ge.addEventListener("mousedown",H,!0));let Ce=[];return v&&(It(a)&&(Ce=ha(a)),It(i)&&(Ce=Ce.concat(ha(i))),!It(o)&&o&&o.contextElement&&(Ce=Ce.concat(ha(o.contextElement)))),Ce=Ce.filter(le=>{var oe;return le!==((oe=ge.defaultView)==null?void 0:oe.visualViewport)}),Ce.forEach(le=>{le.addEventListener("scroll",Z,{passive:!0})}),()=>{ge.removeEventListener("pointerdown",G,!0),h&&(ge.removeEventListener("keydown",F),ge.removeEventListener("compositionstart",ne),ge.removeEventListener("compositionend",xe)),T&&(ge.removeEventListener("click",H,!0),ge.removeEventListener("pointerdown",H,!0),ge.removeEventListener("touchstart",J,!0),ge.removeEventListener("touchmove",re,!0),ge.removeEventListener("touchend",ve,!0),ge.removeEventListener("mousedown",H,!0)),Ce.forEach(le=>{le.removeEventListener("scroll",Z)}),X.clear(),A.current=!1}},[c,i,o,a,h,T,r,u,v,f,D,O,F,W,H,N,J,re,ve,G,n]),C.useEffect(I,[T,I]);const Re=C.useMemo(()=>({onKeyDown:F,...y&&{[Yse[b]]:X=>{n.setOpen(!1,xt(Bc,X.nativeEvent))},...b!=="intentional"&&{onClick(X){n.setOpen(!1,xt(Bc,X.nativeEvent))}}}}),[F,n,y,b]),ce=Fe(X=>{const Z=qr(X.nativeEvent);!pt(n.select("floatingElement"),Z)||X.button!==0||(A.current=!0)}),Ie=Fe(X=>{!r||!f||X.button!==0||(A.current=!0)}),Ve=C.useMemo(()=>({onKeyDown:F,onPointerDown:ce,onMouseDown:ce,onMouseUp:ce,onClickCapture:V,onMouseDownCapture(X){V(),Ie(X)},onPointerDownCapture(X){V(),Ie(X)},onMouseUpCapture:V,onTouchEndCapture:V,onTouchMoveCapture:V}),[F,ce,V,Ie]);return C.useMemo(()=>f?{reference:Re,floating:Ve,trigger:Re}:{},[f,Re,Ve])}var cy=Symbol("NOT_FOUND");function Xse(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Qse(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Zse(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var KD=e=>Array.isArray(e)?e:[e];function Jse(e){const t=Array.isArray(e[0])?e[0]:e;return Zse(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function eae(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}function tae(e){let t;return{get(n){return t&&e(t.key,n)?t.value:cy},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function nae(e,t){let n=[];function r(u){const c=n.findIndex(f=>t(u,f.key));if(c>-1){const f=n[c];return c>0&&(n.splice(c,1),n.unshift(f)),f.value}return cy}function i(u,c){r(u)===cy&&(n.unshift({key:u,value:c}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var rae=(e,t)=>e===t;function iae(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:i}=n;for(let o=0;o<i;o++)if(!e(n[o],r[o]))return!1;return!0}}function oae(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=rae,maxSize:i=1,resultEqualityCheck:o}=n,a=iae(r);let u=0;const c=i<=1?tae(a):nae(i,a);function f(){let h=c.get(arguments);if(h===cy){if(h=e.apply(null,arguments),u++,o){const g=c.getEntries().find(y=>o(y.value,h));g&&(h=g.value,u!==0&&u--)}c.put(arguments,h)}return h}return f.clearCache=()=>{c.clear(),f.resetResultsCount()},f.resultsCount=()=>u,f.resetResultsCount=()=>{u=0},f}var sae=class{constructor(e){this.value=e}deref(){return this.value}},aae=typeof WeakRef<"u"?WeakRef:sae,lae=0,XD=1;function jm(){return{s:lae,v:void 0,o:null,p:null}}function Hj(e,t={}){let n=jm();const{resultEqualityCheck:r}=t;let i,o=0;function a(){var p;let u=n;const{length:c}=arguments;for(let g=0,y=c;g<y;g++){const b=arguments[g];if(typeof b=="function"||typeof b=="object"&&b!==null){let v=u.o;v===null&&(u.o=v=new WeakMap);const S=v.get(b);S===void 0?(u=jm(),v.set(b,u)):u=S}else{let v=u.p;v===null&&(u.p=v=new Map);const S=v.get(b);S===void 0?(u=jm(),v.set(b,u)):u=S}}const f=u;let h;if(u.s===XD)h=u.v;else if(h=e.apply(null,arguments),o++,r){const g=((p=i==null?void 0:i.deref)==null?void 0:p.call(i))??i;g!=null&&r(g,h)&&(h=g,o!==0&&o--),i=typeof h=="object"&&h!==null||typeof h=="function"?new aae(h):h}return f.s=XD,f.v=h,h}return a.clearCache=()=>{n=jm(),a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function Gj(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,a=0,u,c={},f=i.pop();typeof f=="object"&&(c=f,f=i.pop()),Xse(f,`createSelector expects an output function after the inputs, but received: [${typeof f}]`);const h={...n,...c},{memoize:p,memoizeOptions:g=[],argsMemoize:y=Hj,argsMemoizeOptions:b=[]}=h,v=KD(g),S=KD(b),x=Jse(i),_=p(function(){return o++,f.apply(null,arguments)},...v),R=y(function(){a++;const A=eae(x,arguments);return u=_.apply(null,A),u},...S);return Object.assign(R,{resultFunc:f,memoizedResultFunc:_,dependencies:x,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>u,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:p,argsMemoize:y})};return Object.assign(r,{withTypes:()=>r}),r}var uae=Gj(Hj),cae=Object.assign((e,t=uae)=>{Qse(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(o=>e[o]);return t(r,(...o)=>o.reduce((a,u,c)=>(a[n[c]]=u,a),{}))},{withTypes:()=>cae});Gj({memoize:oae,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const vt=(e,t,n,r,i,o,...a)=>{if(a.length>0)throw new Error(Qr(1));let u;if(e)u=e;else throw new Error("Missing arguments");return u};var qj=s3();const Pw=[];let Nw;function fae(){return Nw}function dae(e){Pw.push(e)}function Vj(e){const t=(n,r)=>{const i=_r(pae).current;let o;try{Nw=i;for(const a of Pw)a.before(i);o=e(n,r);for(const a of Pw)a.after(i);i.didInitialize=!0}finally{Nw=void 0}return o};return t.displayName=e.displayName||e.name,t}function hae(e){return C.forwardRef(Vj(e))}function pae(){return{didInitialize:!1}}const mae=wC(19),gae=mae?bae:vae;function Yj(e,t,n,r,i){return gae(e,t,n,r,i)}function yae(e,t,n,r,i){const o=C.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return qj.useSyncExternalStore(e.subscribe,o,o)}dae({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){const r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);(r.didChange||!Object.is(r.value,i))&&(t=!0,r.value=i,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const n=new Set;for(const i of e.syncHooks)n.add(i.store);const r=[];for(const i of n)r.push(i.subscribe(t));return()=>{for(const i of r)i()}}),qj.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function bae(e,t,n,r,i){const o=fae();if(!o)return yae(e,t,n,r,i);const a=o.syncIndex;o.syncIndex+=1;let u;return o.didInitialize?(u=o.syncHooks[a],(u.store!==e||u.selector!==t||!Object.is(u.a1,n)||!Object.is(u.a2,r)||!Object.is(u.a3,i))&&(u.store!==e&&(o.didChangeStore=!0),u.store=e,u.selector=t,u.a1=n,u.a2=r,u.a3=i,u.didChange=!0)):(u={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i),didChange:!1},o.syncHooks.push(u)),u.value}function vae(e,t,n,r,i){return a3.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,o=>t(o,n,r,i))}class xae{constructor(t){te(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t)}));te(this,"getSnapshot",()=>this.state);this.state=t,this.listeners=new Set,this.updateTick=0}setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,r,i){return Yj(this,t,n,r,i)}}class Wj extends xae{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){C.useDebugValue(t),Ke(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;Ke(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this,r=Object.values(t);Ke(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){C.useDebugValue(t);const r=n!==void 0;Ke(()=>{r&&!Object.is(this.state[t],n)&&super.setState({...this.state,[t]:n})},[t,n,r])}select(t,n,r,i){const o=this.selectors[t];return o(this.state,n,r,i)}useState(t,n,r,i){return C.useDebugValue(t),Yj(this,this.selectors[t],n,r,i)}useContextCallback(t,n){C.useDebugValue(t);const r=Fe(n??HI);this.context[t]=r}useStateSetter(t){const n=C.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let i=r(this.state);return n(i,i,this),this.subscribe(o=>{const a=r(o);if(!Object.is(i,a)){const u=i;i=a,n(a,u,this)}})}}function wae(){const[,e]=C.useState({});return C.useCallback(()=>{e({})},[])}const Sae={open:vt(e=>e.open),domReferenceElement:vt(e=>e.domReferenceElement),referenceElement:vt(e=>e.positionReference??e.referenceElement),floatingElement:vt(e=>e.floatingElement),floatingId:vt(e=>e.floatingId)};class IC extends Wj{constructor(n){const{nested:r,noEmit:i,onOpenChange:o,triggerElements:a,...u}=n;super({...u,positionReference:u.referenceElement,domReferenceElement:u.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:Rj(),nested:r,noEmit:i,triggerElements:a},Sae);te(this,"setOpen",(n,r)=>{var i,o;if((!n||!this.state.open||aj(r.event))&&(this.context.dataRef.current.openEvent=n?r.event:void 0),!this.context.noEmit){const a={open:n,reason:r.reason,nativeEvent:r.event,nested:this.context.nested,triggerElement:r.trigger};this.context.events.emit("openchange",a)}(o=(i=this.context).onOpenChange)==null||o.call(i,n,r)})}}function Kj(e,t){const n=C.useRef(null),r=C.useRef(null);return C.useCallback(i=>{if(e!==void 0){if(n.current!==null){const o=n.current,a=r.current,u=t.context.triggerElements.getById(o);a&&u===a&&t.context.triggerElements.delete(o),n.current=null,r.current=null}i!==null&&(n.current=e,r.current=i,t.context.triggerElements.add(e,i))}},[t,e])}function Cae(e,t,n,r){const i=n.useState("isMountedByTrigger",e),o=Kj(e,n),a=Fe(u=>{if(o(u),!u||!n.select("open"))return;const c=n.select("activeTriggerId");if(c===e){n.update({activeTriggerElement:u,...r});return}c==null&&n.update({activeTriggerId:e,activeTriggerElement:u,...r})});return Ke(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:a,isMountedByThisTrigger:i}}function Eae(e){const t=e.useState("open");Ke(()=>{if(t&&!e.select("activeTriggerId")&&e.context.triggerElements.size===1){const n=e.context.triggerElements.entries().next();if(!n.done){const[r,i]=n.value;e.update({activeTriggerId:r,activeTriggerElement:i})}}},[t,e])}function kae(e,t,n){const{mounted:r,setMounted:i,transitionStatus:o}=EC(e);t.useSyncedValues({mounted:r,transitionStatus:o});const a=Fe(()=>{var c,f;i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n==null||n(),(f=(c=t.context).onOpenChangeComplete)==null||f.call(c,!1)}),u=t.useState("preventUnmountingOnClose");return Qy({enabled:!u,open:e,ref:t.context.popupRef,onComplete(){e||a()}}),{forceUnmount:a,transitionStatus:o}}class jC{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);r!==n&&(r!==void 0&&this.elementsSet.delete(r),this.elementsSet.add(n),this.idMap.set(t,n))}delete(t){const n=this.idMap.get(t);n&&(this.elementsSet.delete(n),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(const n of this.elementsSet)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}function Rae(){return new IC({open:!1,floatingElement:null,referenceElement:null,triggerElements:new jC,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function _ae(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:"idle",floatingRootContext:Rae(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:_n,inactiveTriggerProps:_n,popupProps:_n}}const Lm=vt(e=>e.triggerIdProp??e.activeTriggerId),Tae={open:vt(e=>e.openProp??e.open),mounted:vt(e=>e.mounted),transitionStatus:vt(e=>e.transitionStatus),floatingRootContext:vt(e=>e.floatingRootContext),preventUnmountingOnClose:vt(e=>e.preventUnmountingOnClose),payload:vt(e=>e.payload),activeTriggerId:Lm,activeTriggerElement:vt(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:vt((e,t)=>t!==void 0&&Lm(e)===t),isOpenedByTrigger:vt((e,t)=>t!==void 0&&Lm(e)===t&&e.open),isMountedByTrigger:vt((e,t)=>t!==void 0&&Lm(e)===t&&e.mounted),triggerProps:vt((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:vt(e=>e.popupProps),popupElement:vt(e=>e.popupElement),positionerElement:vt(e=>e.positionerElement)};function Aae(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,i=eu(),o=ss()!=null,a=_r(()=>new IC({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new jC,floatingId:i,nested:o,noEmit:!1})).current;return Ke(()=>{const u={open:t,floatingId:i};r.reference!==void 0&&(u.referenceElement=r.reference,u.domReferenceElement=It(r.reference)?r.reference:null),r.floating!==void 0&&(u.floatingElement=r.floating),a.update(u)},[t,i,r.reference,r.floating,a]),a.context.onOpenChange=n,a.context.nested=o,a.context.noEmit=!1,a}function Dae(e={}){const{nodeId:t,externalTree:n}=e,r=Aae(e),i=e.rootContext||r,o={reference:i.useState("referenceElement"),floating:i.useState("floatingElement"),domReference:i.useState("domReferenceElement")},[a,u]=C.useState(null),c=C.useRef(null),f=Oa(n);Ke(()=>{o.domReference&&(c.current=o.domReference)},[o.domReference]);const h=zse({...e,elements:{...o,...a&&{reference:a}}}),p=C.useCallback(O=>{const $=It(O)?{getBoundingClientRect:()=>O.getBoundingClientRect(),getClientRects:()=>O.getClientRects(),contextElement:O}:O;u($),h.refs.setReference($)},[h.refs]),[g,y]=C.useState(null),[b,v]=C.useState(null);i.useSyncedValue("referenceElement",g),i.useSyncedValue("domReferenceElement",It(g)?g:null),i.useSyncedValue("floatingElement",b);const S=C.useCallback(O=>{(It(O)||O===null)&&(c.current=O,y(O)),(It(h.refs.reference.current)||h.refs.reference.current===null||O!==null&&!It(O))&&h.refs.setReference(O)},[h.refs,y]),x=C.useCallback(O=>{v(O),h.refs.setFloating(O)},[h.refs]),_=C.useMemo(()=>({...h.refs,setReference:S,setFloating:x,setPositionReference:p,domReference:c}),[h.refs,S,x,p]),R=C.useMemo(()=>({...h.elements,domReference:o.domReference}),[h.elements,o.domReference]),T=i.useState("open"),A=i.useState("floatingId"),D=C.useMemo(()=>({...h,dataRef:i.context.dataRef,open:T,onOpenChange:i.setOpen,events:i.context.events,floatingId:A,refs:_,elements:R,nodeId:t,rootStore:i}),[h,_,R,t,i,T,A]);return Ke(()=>{i.context.dataRef.current.floatingContext=D;const O=f==null?void 0:f.nodesRef.current.find($=>$.id===t);O&&(O.context=D)}),C.useMemo(()=>({...h,context:D,refs:_,elements:R,rootStore:i}),[h,_,R,D,i])}function Mae(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:i}=e,o=eu(),a=ss()!=null,u=t.useState("open"),c=t.useState("activeTriggerElement"),f=t.useState(r?"popupElement":"positionerElement"),h=t.context.triggerElements,p=_r(()=>new IC({open:u,referenceElement:c,floatingElement:f,triggerElements:h,onOpenChange:i,floatingId:o,nested:a,noEmit:n})).current;return Ke(()=>{const g={open:u,floatingId:o,referenceElement:c,floatingElement:f};It(c)&&(g.domReferenceElement=c),p.state.positionReference===p.state.referenceElement&&(g.positionReference=c),p.update(g)},[u,o,c,f,p]),p.context.onOpenChange=i,p.context.nested=a,p.context.noEmit=n,p}const P1=Vie&&ej;function Oae(e,t={}){const n="rootStore"in e?e.rootStore:e,{events:r,dataRef:i}=n.context,{enabled:o=!0,delay:a}=t,u=C.useRef(!1),c=C.useRef(null),f=Bi(),h=C.useRef(!0);C.useEffect(()=>{const g=n.select("domReferenceElement");if(!o)return;const y=Nn(g);function b(){const x=n.select("domReferenceElement");!n.select("open")&&Jt(x)&&x===mi(Pt(x))&&(u.current=!0)}function v(){h.current=!0}function S(){h.current=!1}return y.addEventListener("blur",b),P1&&(y.addEventListener("keydown",v,!0),y.addEventListener("pointerdown",S,!0)),()=>{y.removeEventListener("blur",b),P1&&(y.removeEventListener("keydown",v,!0),y.removeEventListener("pointerdown",S,!0))}},[n,o]),C.useEffect(()=>{if(!o)return;function g(y){if(y.reason===Bc||y.reason===CC){const b=n.select("domReferenceElement");It(b)&&(c.current=b,u.current=!0)}}return r.on("openchange",g),()=>{r.off("openchange",g)}},[r,o,n]);const p=C.useMemo(()=>({onMouseLeave(){u.current=!1,c.current=null},onFocus(g){const y=g.currentTarget;if(u.current){if(c.current===y)return;u.current=!1,c.current=null}const b=qr(g.nativeEvent);if(It(b)){if(P1&&!g.relatedTarget){if(!h.current&&!Xy(b))return}else if(!Qie(b))return}const v=ty(g.relatedTarget,n.context.triggerElements),{nativeEvent:S,currentTarget:x}=g,_=typeof a=="function"?a():a;if(n.select("open")&&v||_===0||_===void 0){n.setOpen(!0,xt(Nd,S,x));return}f.start(_,()=>{u.current||n.setOpen(!0,xt(Nd,S,x))})},onBlur(g){u.current=!1,c.current=null;const y=g.relatedTarget,b=g.nativeEvent,v=It(y)&&y.hasAttribute(Yc("focus-guard"))&&y.getAttribute("data-type")==="outside";f.start(0,()=>{var R;const S=n.select("domReferenceElement"),x=mi(S?S.ownerDocument:document);!y&&x===S||pt((R=i.current.floatingContext)==null?void 0:R.refs.floating.current,x)||pt(S,x)||v||ty(y??x,n.context.triggerElements)||n.setOpen(!1,xt(Nd,b))})}}),[i,n,f,a]);return C.useMemo(()=>o?{reference:p,trigger:p}:{},[o,p])}const Iw=Yc("safe-polygon"),$ae=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${ij}`;function Pae(e){return e?!!e.closest($ae):!1}class LC{constructor(){te(this,"dispose",()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()});te(this,"disposeEffect",()=>this.dispose);this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.unbindMouseMove=()=>{},this.restTimeoutPending=!1,this.openChangeTimeout=new is,this.restTimeout=new is,this.handleCloseOptions=void 0}static create(){return new LC}}function Xj(e){const t=_r(LC.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||(n.hoverInteractionState=t),Fh(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}const Nae=new Set(["click","mousedown"]);function Iae(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),o=n.useState("domReferenceElement"),{dataRef:a}=n.context,{enabled:u=!0,closeDelay:c=0}=t,f=Xj(n),h=Oa(),p=ss(),g=Fe(()=>f.interactedInside?!0:a.current.openEvent?Nae.has(a.current.openEvent.type):!1),y=Fe(()=>{var T;const R=(T=a.current.openEvent)==null?void 0:T.type;return(R==null?void 0:R.includes("mouse"))&&R!=="mousedown"}),b=Fe(R=>ty(R,n.context.triggerElements)),v=C.useCallback((R,T=!0)=>{const A=jae(c,f.pointerType);A&&!f.handler?f.openChangeTimeout.start(A,()=>n.setOpen(!1,xt(Gr,R))):T&&(f.openChangeTimeout.clear(),n.setOpen(!1,xt(Gr,R)))},[c,n,f]),S=Fe(()=>{f.unbindMouseMove(),f.handler=void 0}),x=Fe(()=>{if(f.performedPointerEventsMutation){const R=Pt(i).body;R.style.pointerEvents="",R.removeAttribute(Iw),f.performedPointerEventsMutation=!1}}),_=Fe(R=>{const T=qr(R);if(!Pae(T)){f.interactedInside=!1;return}f.interactedInside=!0});Ke(()=>{r||(f.pointerType=void 0,f.restTimeoutPending=!1,f.interactedInside=!1,S(),x())},[r,f,S,x]),C.useEffect(()=>()=>{S()},[S]),C.useEffect(()=>x,[x]),Ke(()=>{var R,T,A;if(u&&r&&(R=f.handleCloseOptions)!=null&&R.blockPointerEvents&&y()&&It(o)&&i){f.performedPointerEventsMutation=!0;const D=Pt(i).body;D.setAttribute(Iw,"");const O=o,$=i,z=(A=(T=h==null?void 0:h.nodesRef.current.find(j=>j.id===p))==null?void 0:T.context)==null?void 0:A.elements.floating;return z&&(z.style.pointerEvents=""),D.style.pointerEvents="none",O.style.pointerEvents="auto",$.style.pointerEvents="auto",()=>{D.style.pointerEvents="",O.style.pointerEvents="",$.style.pointerEvents=""}}},[u,r,o,i,f,y,h,p]),C.useEffect(()=>{if(!u)return;function R(O){g()||!a.current.floatingContext||!n.select("open")||b(O.relatedTarget)||(x(),S(),g()||v(O))}function T(O){var $;f.openChangeTimeout.clear(),x(),($=f.handler)==null||$.call(f,O),S()}function A(O){g()||v(O,!1)}const D=i;return D&&(D.addEventListener("mouseleave",R),D.addEventListener("mouseenter",T),D.addEventListener("mouseleave",A),D.addEventListener("pointerdown",_,!0)),()=>{D&&(D.removeEventListener("mouseleave",R),D.removeEventListener("mouseenter",T),D.removeEventListener("mouseleave",A),D.removeEventListener("pointerdown",_,!0))}},[u,i,n,a,g,b,v,x,S,_,f])}function jae(e,t){return t&&!Hc(t)?0:typeof e=="function"?e():e}function N1(e){return typeof e=="function"?e():e}const Lae={current:null};function Qj(e,t={}){var j;const n="rootStore"in e?e.rootStore:e,{dataRef:r,events:i}=n.context,{enabled:o=!0,delay:a=0,handleClose:u=null,mouseOnly:c=!1,restMs:f=0,move:h=!0,triggerElementRef:p=Lae,externalTree:g,isActiveTrigger:y=!0}=t,b=Oa(g),v=Xj(n),S=or(u),x=or(a),_=or(f),R=or(o);y&&(v.handleCloseOptions=(j=S.current)==null?void 0:j.__options);const T=Fe(()=>v.interactedInside?!0:r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1),A=Fe(I=>ty(I,n.context.triggerElements)),D=C.useCallback((I,M=!0)=>{const B=A1(x.current,"close",v.pointerType);B&&!v.handler?v.openChangeTimeout.start(B,()=>n.setOpen(!1,xt(Gr,I))):M&&(v.openChangeTimeout.clear(),n.setOpen(!1,xt(Gr,I)))},[x,n,v]),O=Fe(()=>{v.unbindMouseMove(),v.handler=void 0}),$=Fe(()=>{if(v.performedPointerEventsMutation){const I=Pt(n.select("domReferenceElement")).body;I.style.pointerEvents="",I.removeAttribute(Iw),v.performedPointerEventsMutation=!1}});C.useEffect(()=>{if(!o)return;function I(M){M.open||(v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return i.on("openchange",I),()=>{i.off("openchange",I)}},[o,i,v]);const z=Fe(I=>{var B;if(T()||!r.current.floatingContext||A(I.relatedTarget))return;const M=p.current;(B=S.current)==null||B.call(S,{...r.current.floatingContext,tree:b,x:I.clientX,y:I.clientY,onClose(){$(),O(),!T()&&M===n.select("domReferenceElement")&&D(I)}})(I)});return C.useEffect(()=>{if(!o)return;const I=p.current??(y?n.select("domReferenceElement"):null);if(!It(I))return;function M(L){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,c&&!Hc(v.pointerType)||N1(_.current)>0&&!A1(x.current,"open"))return;const F=A1(x.current,"open",v.pointerType),U=n.select("domReferenceElement"),V=n.context.triggerElements,W=(V.hasElement(L.target)||V.hasMatchingElement(H=>pt(H,L.target)))&&(!U||!pt(U,L.target)),N=L.currentTarget??null,Y=n.select("open"),J=!Y||W;W&&Y?n.setOpen(!0,xt(Gr,L,N)):F?v.openChangeTimeout.start(F,()=>{J&&n.setOpen(!0,xt(Gr,L,N))}):J&&n.setOpen(!0,xt(Gr,L,N))}function B(L){if(T()){$();return}v.unbindMouseMove();const F=n.select("domReferenceElement"),U=Pt(F);if(v.restTimeout.clear(),v.restTimeoutPending=!1,A(L.relatedTarget))return;if(S.current&&r.current.floatingContext){n.select("open")||v.openChangeTimeout.clear();const W=p.current;v.handler=S.current({...r.current.floatingContext,tree:b,x:L.clientX,y:L.clientY,onClose(){$(),O(),R.current&&!T()&&W===n.select("domReferenceElement")&&D(L,!0)}});const N=v.handler;N(L),U.addEventListener("mousemove",N),v.unbindMouseMove=()=>{U.removeEventListener("mousemove",N)};return}(v.pointerType==="touch"?!pt(n.select("floatingElement"),L.relatedTarget):!0)&&D(L)}function G(L){z(L)}return n.select("open")&&I.addEventListener("mouseleave",G),h&&I.addEventListener("mousemove",M,{once:!0}),I.addEventListener("mouseenter",M),I.addEventListener("mouseleave",B),()=>{I.removeEventListener("mouseleave",G),h&&I.removeEventListener("mousemove",M),I.removeEventListener("mouseenter",M),I.removeEventListener("mouseleave",B)}},[O,$,r,x,D,n,o,S,z,v,y,T,A,c,h,_,p,b,R]),C.useMemo(()=>{if(!o)return;function I(M){v.pointerType=M.pointerType}return{onPointerDown:I,onPointerEnter:I,onMouseMove(M){const{nativeEvent:B}=M,G=M.currentTarget,L=n.select("domReferenceElement"),F=n.context.triggerElements,U=n.select("open"),V=(F.hasElement(M.target)||F.hasMatchingElement(N=>pt(N,M.target)))&&(!L||!pt(L,M.target));if(c&&!Hc(v.pointerType)||U&&!V||N1(_.current)===0||!V&&v.restTimeoutPending&&M.movementX**2+M.movementY**2<2)return;v.restTimeout.clear();function W(){if(v.restTimeoutPending=!1,T())return;const N=n.select("open");!v.blockMouseMove&&(!N||V)&&n.setOpen(!0,xt(Gr,B,G))}v.pointerType==="touch"?gn.flushSync(()=>{W()}):V&&U?W():(v.restTimeoutPending=!0,v.restTimeout.start(N1(_.current),W))}}},[o,v,T,c,n,_])}function FC(e=[]){const t=e.map(f=>f==null?void 0:f.reference),n=e.map(f=>f==null?void 0:f.floating),r=e.map(f=>f==null?void 0:f.item),i=e.map(f=>f==null?void 0:f.trigger),o=C.useCallback(f=>Fm(f,e,"reference"),t),a=C.useCallback(f=>Fm(f,e,"floating"),n),u=C.useCallback(f=>Fm(f,e,"item"),r),c=C.useCallback(f=>Fm(f,e,"trigger"),i);return C.useMemo(()=>({getReferenceProps:o,getFloatingProps:a,getItemProps:u,getTriggerProps:c}),[o,a,u,c])}function Fm(e,t,n){var a;const r=new Map,i=n==="item",o={};n==="floating"&&(o.tabIndex=-1,o[_w]="");for(const u in e)i&&e&&(u===nj||u===rj)||(o[u]=e[u]);for(let u=0;u<t.length;u+=1){let c;const f=(a=t[u])==null?void 0:a[n];typeof f=="function"?c=e?f(e):null:c=f,c&&QD(o,c,i,r)}return QD(o,e,i,r),o}function QD(e,t,n,r){var i;for(const o in t){const a=t[o];n&&(o===nj||o===rj)||(o.startsWith("on")?(r.has(o)||r.set(o,[]),typeof a=="function"&&((i=r.get(o))==null||i.push(a),e[o]=(...u)=>{var c;return(c=r.get(o))==null?void 0:c.map(f=>f(...u)).find(f=>f!==void 0)})):e[o]=a)}}const Fae="Escape";function Jy(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function zm(e,t){return Jy(t,e===TC||e===Bh,e===pa||e===ma)}function I1(e,t,n){return Jy(t,e===Bh,n?e===pa:e===ma)||e==="Enter"||e===" "||e===""}function zae(e,t,n){return Jy(t,n?e===pa:e===ma,e===Bh)}function Bae(e,t,n,r){const i=n?e===ma:e===pa,o=e===TC;return t==="both"||t==="horizontal"&&r&&r>1?e===Fae:Jy(t,i,o)}function Uae(e,t){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),o=n.useState("domReferenceElement"),a=n.context.dataRef,{listRef:u,activeIndex:c,onNavigate:f=()=>{},enabled:h=!0,selectedIndex:p=null,allowEscape:g=!1,loopFocus:y=!1,nested:b=!1,rtl:v=!1,virtual:S=!1,focusItemOnOpen:x="auto",focusItemOnHover:_=!0,openOnArrowKeyDown:R=!0,disabledIndices:T=void 0,orientation:A="vertical",parentOrientation:D,cols:O=1,id:$,resetOnPointerLeave:z=!0,externalTree:j}=t,I=ny(i),M=or(I),B=ss(),G=Oa(j);Ke(()=>{a.current.orientation=A},[a,A]);const L=Tw(o),F=C.useRef(x),U=C.useRef(p??-1),V=C.useRef(null),W=C.useRef(!0),N=Fe(oe=>{f(U.current===-1?null:U.current,oe)}),Y=C.useRef(N),J=C.useRef(!!i),H=C.useRef(r),ie=C.useRef(!1),re=C.useRef(!1),he=or(T),ve=or(r),Re=or(p),ce=or(z),Ie=Fe(()=>{function oe(Te){S?G==null||G.events.emit("virtualfocus",Te):jd(Te,{sync:ie.current,preventScroll:!0})}const me=u.current[U.current],ae=re.current;me&&oe(me),(ie.current?Te=>Te():requestAnimationFrame)(()=>{var De;const Te=u.current[U.current]||me;if(!Te)return;me||oe(Te),X&&(ae||!W.current)&&((De=Te.scrollIntoView)==null||De.call(Te,{block:"nearest",inline:"nearest"}))})});Ke(()=>{h&&(r&&i?(U.current=p??-1,F.current&&p!=null&&(re.current=!0,N())):J.current&&(U.current=-1,Y.current()))},[h,r,i,p,N]),Ke(()=>{if(h){if(!r){ie.current=!1;return}if(i)if(c==null){if(ie.current=!1,Re.current!=null)return;if(J.current&&(U.current=-1,Ie()),(!H.current||!J.current)&&F.current&&(V.current!=null||F.current===!0&&V.current==null)){let oe=0;const me=()=>{u.current[0]==null?(oe<2&&(oe?requestAnimationFrame:queueMicrotask)(me),oe+=1):(U.current=V.current==null||I1(V.current,A,v)||b?mg(u):Mw(u),V.current=null,N())};me()}}else pc(u,c)||(U.current=c,Ie(),re.current=!1)}},[h,r,i,c,Re,b,u,A,v,N,Ie,he]),Ke(()=>{var Te,_e;if(!h||i||!G||S||!J.current)return;const oe=G.nodesRef.current,me=(_e=(Te=oe.find(De=>De.id===B))==null?void 0:Te.context)==null?void 0:_e.elements.floating,ae=mi(Pt(i)),Oe=oe.some(De=>De.context&&pt(De.context.elements.floating,ae));me&&!Oe&&W.current&&me.focus({preventScroll:!0})},[h,i,G,B,S]),Ke(()=>{Y.current=N,H.current=r,J.current=!!i}),Ke(()=>{r||(V.current=null,F.current=x)},[r,x]);const Ve=c!=null,X=C.useMemo(()=>{function oe(ae){if(!ve.current)return;const Oe=u.current.indexOf(ae.currentTarget);Oe!==-1&&U.current!==Oe&&(U.current=Oe,N(ae))}return{onFocus(ae){ie.current=!0,oe(ae)},onClick:({currentTarget:ae})=>ae.focus({preventScroll:!0}),onMouseMove(ae){ie.current=!0,re.current=!1,_&&oe(ae)},onPointerLeave(ae){var Te;if(!ve.current||!W.current||ae.pointerType==="touch")return;ie.current=!0;const Oe=ae.relatedTarget;!_||u.current.includes(Oe)||ce.current&&(jd(null,{sync:!0}),U.current=-1,N(ae),S||(Te=M.current)==null||Te.focus({preventScroll:!0}))}}},[ve,M,_,u,N,ce,S]),Z=C.useCallback(()=>{var oe,me,ae;return D??((ae=(me=(oe=G==null?void 0:G.nodesRef.current.find(Oe=>Oe.id===B))==null?void 0:oe.context)==null?void 0:me.dataRef)==null?void 0:ae.current.orientation)},[B,G,D]),ne=Fe(oe=>{if(W.current=!1,ie.current=!0,oe.which===229||!ve.current&&oe.currentTarget===M.current)return;if(b&&Bae(oe.key,A,v,O)){zm(oe.key,Z())||Wn(oe),n.setOpen(!1,xt(hg,oe.nativeEvent)),Jt(o)&&(S?G==null||G.events.emit("virtualfocus",o):o.focus());return}const me=U.current,ae=mg(u,T),Oe=Mw(u,T);if(L||(oe.key==="Home"&&(Wn(oe),U.current=ae,N(oe)),oe.key==="End"&&(Wn(oe),U.current=Oe,N(oe))),O>1){const Te=Array.from({length:u.current.length},()=>({width:1,height:1})),_e=cj(Te,O,!1),De=_e.findIndex(ke=>ke!=null&&!ga(u,ke,T)),ue=_e.reduce((ke,Pe,Le)=>Pe!=null&&!ga(u,Pe,T)?Le:ke,-1),Se=_e[uj({current:_e.map(ke=>ke!=null?u.current[ke]:null)},{event:oe,orientation:A,loopFocus:y,rtl:v,cols:O,disabledIndices:dj([...(typeof T!="function"?T:null)||u.current.map((ke,Pe)=>ga(u,Pe,T)?Pe:void 0),void 0],_e),minIndex:De,maxIndex:ue,prevIndex:fj(U.current>Oe?ae:U.current,Te,_e,O,oe.key===Bh?"bl":oe.key===(v?pa:ma)?"tr":"tl"),stopEvent:!0})];if(Se!=null&&(U.current=Se,N(oe)),A==="both")return}if(zm(oe.key,A)){if(Wn(oe),r&&!S&&mi(oe.currentTarget.ownerDocument)===oe.currentTarget){U.current=I1(oe.key,A,v)?ae:Oe,N(oe);return}I1(oe.key,A,v)?y?me>=Oe?g&&me!==u.current.length?U.current=-1:(ie.current=!1,U.current=ae):U.current=Bn(u,{startingIndex:me,disabledIndices:T}):U.current=Math.min(Oe,Bn(u,{startingIndex:me,disabledIndices:T})):y?me<=ae?g&&me!==-1?U.current=u.current.length:(ie.current=!1,U.current=Oe):U.current=Bn(u,{startingIndex:me,decrement:!0,disabledIndices:T}):U.current=Math.max(ae,Bn(u,{startingIndex:me,decrement:!0,disabledIndices:T})),pc(u,U.current)&&(U.current=-1),N(oe)}}),xe=C.useMemo(()=>S&&r&&Ve&&{"aria-activedescendant":`${$}-${c}`},[S,r,Ve,$,c]),ge=C.useMemo(()=>({"aria-orientation":A==="both"?void 0:A,...L?{}:xe,onKeyDown(oe){if(oe.key==="Tab"&&oe.shiftKey&&r&&!S){const me=qr(oe.nativeEvent);if(me&&!pt(M.current,me))return;Wn(oe),n.setOpen(!1,xt(Uc,oe.nativeEvent)),Jt(o)&&o.focus();return}ne(oe)},onPointerMove(){W.current=!0}}),[xe,ne,M,A,L,n,r,S,o]),Ce=C.useMemo(()=>{function oe(ae){x==="auto"&&oj(ae.nativeEvent)&&(F.current=!S)}function me(ae){F.current=x,x==="auto"&&sj(ae.nativeEvent)&&(F.current=!0)}return{onKeyDown(ae){const Oe=n.select("open");W.current=!1;const Te=ae.key.startsWith("Arrow"),_e=zae(ae.key,Z(),v),De=zm(ae.key,A),ue=(b?_e:De)||ae.key==="Enter"||ae.key.trim()==="";if(S&&Oe)return ne(ae);if(!(!Oe&&!R&&Te)){if(ue){const Se=zm(ae.key,Z());V.current=b&&Se?null:ae.key}if(b){_e&&(Wn(ae),Oe?(U.current=mg(u,he.current),N(ae)):n.setOpen(!0,xt(hg,ae.nativeEvent,ae.currentTarget)));return}De&&(Re.current!=null&&(U.current=Re.current),Wn(ae),!Oe&&R?n.setOpen(!0,xt(hg,ae.nativeEvent,ae.currentTarget)):ne(ae),Oe&&N(ae))}},onFocus(ae){n.select("open")&&!S&&(U.current=-1,N(ae))},onPointerDown:me,onPointerEnter:me,onMouseDown:oe,onClick:oe}},[ne,he,x,u,b,N,n,R,A,Z,v,Re,S]),le=C.useMemo(()=>({...xe,...Ce}),[xe,Ce]);return C.useMemo(()=>h?{reference:le,floating:ge,item:X,trigger:Ce}:{},[h,le,ge,Ce,X])}const Hae=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Gae(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingId"),o=n.useState("domReferenceElement"),a=n.useState("floatingElement"),{role:u="dialog"}=t,c=eu(),f=(o==null?void 0:o.id)||c,h=C.useMemo(()=>{var _;return((_=ny(a))==null?void 0:_.id)||i},[a,i]),p=Hae.get(u)??u,y=ss()!=null,b=C.useMemo(()=>p==="tooltip"||u==="label"?_n:{"aria-haspopup":p==="alertdialog"?"dialog":p,"aria-expanded":"false",...p==="listbox"&&{role:"combobox"},...p==="menu"&&y&&{role:"menuitem"},...u==="select"&&{"aria-autocomplete":"none"},...u==="combobox"&&{"aria-autocomplete":"list"}},[p,y,u]),v=C.useMemo(()=>p==="tooltip"||u==="label"?{[`aria-${u==="label"?"labelledby":"describedby"}`]:r?h:void 0}:{...b,"aria-expanded":r?"true":"false","aria-controls":r?h:void 0,...p==="menu"&&{id:f}},[p,h,r,f,u,b]),S=C.useMemo(()=>{const _={id:h,...p&&{role:p}};return p==="tooltip"||u==="label"?_:{..._,...p==="menu"&&{"aria-labelledby":f}}},[p,h,f,u]),x=C.useCallback(({active:_,selected:R})=>{const T={role:"option",..._&&{id:`${h}-fui-option`}};switch(u){case"select":case"combobox":return{...T,"aria-selected":R}}return{}},[h,u]);return C.useMemo(()=>({reference:v,floating:S,item:x,trigger:b}),[v,S,b,x])}function qae(e,t){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,i=n.useState("open"),{listRef:o,activeIndex:a,onMatch:u,onTypingChange:c,enabled:f=!0,resetMs:h=750,selectedIndex:p=null}=t,g=Bi(),y=C.useRef(""),b=C.useRef(p??a??-1),v=C.useRef(null);Ke(()=>{!i&&p!==null||(g.clear(),v.current=null,y.current!==""&&(y.current=""))},[i,p,g]),Ke(()=>{i&&y.current===""&&(b.current=p??a??-1)},[i,p,a]);const S=Fe(A=>{A?r.current.typing||(r.current.typing=A,c==null||c(A)):r.current.typing&&(r.current.typing=A,c==null||c(A))}),x=Fe(A=>{function D(M,B,G){const L=B.find(F=>(F==null?void 0:F.toLocaleLowerCase().indexOf(G.toLocaleLowerCase()))===0);return L?M.indexOf(L):-1}const O=o.current;if(y.current.length>0&&y.current[0]!==" "&&(D(O,O,y.current)===-1?S(!1):A.key===" "&&Wn(A)),O==null||A.key.length!==1||A.ctrlKey||A.metaKey||A.altKey)return;i&&A.key!==" "&&(Wn(A),S(!0));const $=y.current==="";$&&(b.current=p??a??-1),O.every(M=>{var B,G;return M?((B=M[0])==null?void 0:B.toLocaleLowerCase())!==((G=M[1])==null?void 0:G.toLocaleLowerCase()):!0})&&y.current===A.key&&(y.current="",b.current=v.current),y.current+=A.key,g.start(h,()=>{y.current="",b.current=v.current,S(!1)});const j=$?p??a??-1:b.current,I=D(O,[...O.slice((j||0)+1),...O.slice(0,(j||0)+1)],y.current);I!==-1?(u==null||u(I),v.current=I):A.key!==" "&&(y.current="",S(!1))}),_=Fe(A=>{const D=A.relatedTarget,O=n.select("domReferenceElement"),$=n.select("floatingElement"),z=pt(O,D),j=pt($,D);z||j||(g.clear(),y.current="",b.current=v.current,S(!1))}),R=C.useMemo(()=>({onKeyDown:x,onBlur:_}),[x,_]),T=C.useMemo(()=>({onKeyDown:x,onKeyUp(A){A.key===" "&&S(!1)},onBlur:_}),[x,_,S]);return C.useMemo(()=>f?{reference:R,floating:T}:{},[f,R,T])}function ZD(e,t){const[n,r]=e;let i=!1;const o=t.length;for(let a=0,u=o-1;a<o;u=a++){const[c,f]=t[a]||[0,0],[h,p]=t[u]||[0,0];f>=r!=p>=r&&n<=(h-c)*(r-f)/(p-f)+c&&(i=!i)}return i}function Vae(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Zj(e={}){const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i=new is;let o=!1,a=null,u=null,c=typeof performance<"u"?performance.now():0;function f(p,g){const y=performance.now(),b=y-c;if(a===null||u===null||b===0)return a=p,u=g,c=y,null;const v=p-a,S=g-u,_=Math.sqrt(v*v+S*S)/b;return a=p,u=g,c=y,_}const h=({x:p,y:g,placement:y,elements:b,onClose:v,nodeId:S,tree:x})=>function(R){function T(){i.clear(),v()}if(i.clear(),!b.domReference||!b.floating||y==null||p==null||g==null)return;const{clientX:A,clientY:D}=R,O=[A,D],$=qr(R),z=R.type==="mouseleave",j=pt(b.floating,$),I=pt(b.domReference,$),M=b.domReference.getBoundingClientRect(),B=b.floating.getBoundingClientRect(),G=y.split("-")[0],L=p>B.right-B.width/2,F=g>B.bottom-B.height/2,U=Vae(O,M),V=B.width>M.width,W=B.height>M.height,N=(V?M:B).left,Y=(V?M:B).right,J=(W?M:B).top,H=(W?M:B).bottom;if(j&&(o=!0,!z))return;if(I&&(o=!1),I&&!z){o=!0;return}if(z&&It(R.relatedTarget)&&pt(b.floating,R.relatedTarget)||x&&Nl(x.nodesRef.current,S).some(({context:he})=>he==null?void 0:he.open))return;if(G==="top"&&g>=M.bottom-1||G==="bottom"&&g<=M.top+1||G==="left"&&p>=M.right-1||G==="right"&&p<=M.left+1)return T();let ie=[];switch(G){case"top":ie=[[N,M.top+1],[N,B.bottom-1],[Y,B.bottom-1],[Y,M.top+1]];break;case"bottom":ie=[[N,B.top+1],[N,M.bottom-1],[Y,M.bottom-1],[Y,B.top+1]];break;case"left":ie=[[B.right-1,H],[B.right-1,J],[M.left+1,J],[M.left+1,H]];break;case"right":ie=[[M.right-1,H],[M.right-1,J],[B.left+1,J],[B.left+1,H]];break}function re([he,ve]){switch(G){case"top":{const Re=[V?he+t/2:L?he+t*4:he-t*4,ve+t+1],ce=[V?he-t/2:L?he+t*4:he-t*4,ve+t+1],Ie=[[B.left,L||V?B.bottom-t:B.top],[B.right,L?V?B.bottom-t:B.top:B.bottom-t]];return[Re,ce,...Ie]}case"bottom":{const Re=[V?he+t/2:L?he+t*4:he-t*4,ve-t],ce=[V?he-t/2:L?he+t*4:he-t*4,ve-t],Ie=[[B.left,L||V?B.top+t:B.bottom],[B.right,L?V?B.top+t:B.bottom:B.top+t]];return[Re,ce,...Ie]}case"left":{const Re=[he+t+1,W?ve+t/2:F?ve+t*4:ve-t*4],ce=[he+t+1,W?ve-t/2:F?ve+t*4:ve-t*4];return[...[[F||W?B.right-t:B.left,B.top],[F?W?B.right-t:B.left:B.right-t,B.bottom]],Re,ce]}case"right":{const Re=[he-t,W?ve+t/2:F?ve+t*4:ve-t*4],ce=[he-t,W?ve-t/2:F?ve+t*4:ve-t*4],Ie=[[F||W?B.left+t:B.right,B.top],[F?W?B.left+t:B.right:B.left+t,B.bottom]];return[Re,ce,...Ie]}default:return[]}}if(!ZD([A,D],ie)){if(o&&!U)return T();if(!z&&r){const he=f(R.clientX,R.clientY);if(he!==null&&he<.1)return T()}ZD([A,D],re([p,g]))?!o&&r&&i.start(40,T):T()}};return h.__options={blockPointerEvents:n},h}function Yae(e){const t=C.useRef(""),n=C.useCallback(i=>{i.defaultPrevented||(t.current=i.pointerType,e(i,i.pointerType))},[e]);return{onClick:C.useCallback(i=>{if(i.detail===0){e(i,"keyboard");return}"pointerType"in i?e(i,i.pointerType):e(i,t.current),t.current=""},[e]),onPointerDown:n}}function Wae(e){const[t,n]=C.useState(null),r=Fe((u,c)=>{e||n(c||(JI?"touch":""))}),i=C.useCallback(()=>{n(null)},[]),{onClick:o,onPointerDown:a}=Yae(r);return C.useMemo(()=>({openMethod:t,reset:i,triggerProps:{onClick:o,onPointerDown:a}}),[t,i,o,a])}let zC=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Bl.startingStyle]="startingStyle",e[e.endingStyle=Bl.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),jw=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const Kae={[jw.popupOpen]:""},Xae={[jw.popupOpen]:"",[jw.pressed]:""},Qae={[zC.open]:""},Zae={[zC.closed]:""},Jae={[zC.anchorHidden]:""},ele={open(e){return e?Kae:null}},JD={open(e){return e?Xae:null}},Jj={open(e){return e?Qae:Zae},anchorHidden(e){return e?Jae:null}};function eL(e){return wC(19)?e:e?"true":void 0}const tle=C.forwardRef(function(t,n){const{cutout:r,...i}=t;let o;if(r){const a=r==null?void 0:r.getBoundingClientRect();o=`polygon(
479
+ 0% 0%,
480
+ 100% 0%,
481
+ 100% 100%,
482
+ 0% 100%,
483
+ 0% 0%,
484
+ ${a.left}px ${a.top}px,
485
+ ${a.left}px ${a.bottom}px,
486
+ ${a.right}px ${a.bottom}px,
487
+ ${a.right}px ${a.top}px,
488
+ ${a.left}px ${a.top}px
489
+ )`}return E.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...i,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:o}})});function nle(e){const t=C.useRef(!0);t.current&&(t.current=!1,e())}function rle(e){const t=e.getBoundingClientRect(),n=window.getComputedStyle(e,"::before"),r=window.getComputedStyle(e,"::after");if(!(n.content!=="none"||r.content!=="none"))return t;const o=parseFloat(n.width)||0,a=parseFloat(n.height)||0,u=parseFloat(r.width)||0,c=parseFloat(r.height)||0,f=Math.max(t.width,o,u),h=Math.max(t.height,a,c),p=f-t.width,g=h-t.height;return{left:t.left-p/2,right:t.right+p/2,top:t.top-g/2,bottom:t.bottom+g/2}}const ile=e=>({name:"arrow",options:e,async fn(t){var W,N;const{x:n,y:r,placement:i,rects:o,platform:a,elements:u,middlewareData:c}=t,{element:f,padding:h=0,offsetParent:p="real"}=rs(e,t)||{};if(f==null)return{};const g=lj(h),y={x:n,y:r},b=MC(i),v=DC(b),S=await a.getDimensions(f),x=b==="y",_=x?"top":"left",R=x?"bottom":"right",T=x?"clientHeight":"clientWidth",A=o.reference[v]+o.reference[b]-y[b]-o.floating[v],D=y[b]-o.reference[b],O=p==="real"?await((W=a.getOffsetParent)==null?void 0:W.call(a,f)):u.floating;let $=u.floating[T]||o.floating[v];(!$||!await((N=a.isElement)==null?void 0:N.call(a,O)))&&($=u.floating[T]||o.floating[v]);const z=A/2-D/2,j=$/2-S[v]/2-1,I=Math.min(g[_],j),M=Math.min(g[R],j),B=I,G=$-S[v]-M,L=$/2-S[v]/2+z,F=Aw(B,L,G),U=!c.arrow&&Ma(i)!=null&&L!==F&&o.reference[v]/2-(L<B?I:M)-S[v]/2<0,V=U?L<B?L-B:L-G:0;return{[b]:y[b]+V,data:{[b]:F,centerOffset:L-F-V,...U&&{alignmentOffset:V}},reset:U}}}),ole=(e,t)=>({...ile(e),options:[e,t]}),sle={name:"hide",async fn(e){var u;const{width:t,height:n,x:r,y:i}=e.rects.reference,o=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:((u=(await Vse().fn(e)).data)==null?void 0:u.referenceHidden)||o}}}},ale={sideX:"left",sideY:"top"};function tL(e,t,n){const r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function eM(e,t,n){const{rects:r,placement:i}=e;return{side:tL(t,Yr(i),n),align:Ma(i)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function lle(e){var Tt,dt;const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:a=0,collisionBoundary:u,collisionPadding:c=5,sticky:f=!1,arrowPadding:h=5,disableAnchorTracking:p=!1,keepMounted:g=!1,floatingRootContext:y,mounted:b,collisionAvoidance:v,shiftCrossAxis:S=!1,nodeId:x,adaptiveOrigin:_,lazyFlip:R=!1,externalTree:T}=e,[A,D]=C.useState(null);!b&&A!==null&&D(null);const O=v.side||"flip",$=v.align||"flip",z=v.fallbackAxisSide||"end",j=typeof t=="function"?t:void 0,I=Fe(j),M=j?I:t,B=or(t),L=Uy()==="rtl",F=A||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":L?"left":"right","inline-start":L?"right":"left"}[r],U=o==="center"?F:`${F}-${o}`;let V=c;const W=1,N=r==="bottom"?W:0,Y=r==="top"?W:0,J=r==="right"?W:0,H=r==="left"?W:0;typeof V=="number"?V={top:V+N,right:V+H,bottom:V+Y,left:V+J}:V&&(V={top:(V.top||0)+N,right:(V.right||0)+H,bottom:(V.bottom||0)+Y,left:(V.left||0)+J});const ie={boundary:u==="clipping-ancestors"?"clippingAncestors":u,padding:V},re=C.useRef(null),he=or(i),ve=or(a),Ie=[Bse(ut=>{const Rt=eM(ut,r,L),en=typeof he.current=="function"?he.current(Rt):he.current,Xt=typeof ve.current=="function"?ve.current(Rt):ve.current;return{mainAxis:en,crossAxis:Xt,alignmentAxis:Xt}},[typeof i!="function"?i:0,typeof a!="function"?a:0,L,r])],Ve=$==="none"&&O!=="shift",X=!Ve&&(f||S||O==="shift"),Z=O==="none"?null:Gse({...ie,padding:{top:V.top+W,right:V.right+W,bottom:V.bottom+W,left:V.left+W},mainAxis:!S&&O==="flip",crossAxis:$==="flip"?"alignment":!1,fallbackAxisSideDirection:z}),ne=Ve?null:Use(ut=>{const Rt=Pt(ut.elements.floating).documentElement;return{...ie,rootBoundary:S?{x:0,y:0,width:Rt.clientWidth,height:Rt.clientHeight}:void 0,mainAxis:$!=="none",crossAxis:X,limiter:f||S?void 0:Hse(en=>{if(!re.current)return{};const{width:Xt,height:tn}=re.current.getBoundingClientRect(),yn=wi(Yr(en.placement)),Zr=yn==="y"?Xt:tn,Pa=yn==="y"?V.left+V.right:V.top+V.bottom;return{offset:Zr/2+Pa/2}})}},[ie,f,S,V,$]);O==="shift"||$==="shift"||o==="center"?Ie.push(ne,Z):Ie.push(Z,ne),Ie.push(qse({...ie,apply({elements:{floating:ut},rects:{reference:Rt},availableWidth:en,availableHeight:Xt}){const tn=ut.style;tn.setProperty("--available-width",`${en}px`),tn.setProperty("--available-height",`${Xt}px`),tn.setProperty("--anchor-width",`${Rt.width}px`),tn.setProperty("--anchor-height",`${Rt.height}px`)}}),ole(()=>({element:re.current||document.createElement("div"),padding:h,offsetParent:"floating"}),[h]),{name:"transformOrigin",fn(ut){var In,fo,su;const{elements:Rt,middlewareData:en,placement:Xt,rects:tn,y:yn}=ut,Zr=Yr(Xt),Pa=wi(Zr),Ei=re.current,Na=((In=en.arrow)==null?void 0:In.x)||0,ki=((fo=en.arrow)==null?void 0:fo.y)||0,iu=(Ei==null?void 0:Ei.clientWidth)||0,ou=(Ei==null?void 0:Ei.clientHeight)||0,us=Na+iu/2,Ri=ki+ou/2,Ia=Math.abs(((su=en.shift)==null?void 0:su.y)||0),ja=tn.reference.height/2,Ui=typeof i=="function"?i(eM(ut,r,L)):i,La=Ia>Ui,Mr={top:`${us}px calc(100% + ${Ui}px)`,bottom:`${us}px ${-Ui}px`,left:`calc(100% + ${Ui}px) ${Ri}px`,right:`${-Ui}px ${Ri}px`}[Zr],on=`${us}px ${tn.reference.y+ja-yn}px`;return Rt.floating.style.setProperty("--transform-origin",X&&Pa==="y"&&La?on:Mr),{}}},sle,_),Ke(()=>{!b&&y&&y.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[b,y]);const xe=C.useMemo(()=>({elementResize:!p&&typeof ResizeObserver<"u",layoutShift:!p&&typeof IntersectionObserver<"u"}),[p]),{refs:ge,elements:Ce,x:le,y:oe,middlewareData:me,update:ae,placement:Oe,context:Te,isPositioned:_e,floatingStyles:De}=Dae({rootContext:y,placement:U,middleware:Ie,strategy:n,whileElementsMounted:g?void 0:(...ut)=>YD(...ut,xe),nodeId:x,externalTree:T}),{sideX:ue,sideY:Se}=me.adaptiveOrigin||ale,ke=_e?n:"fixed",Pe=C.useMemo(()=>{const ut=_?{position:ke,[ue]:le,[Se]:oe}:{position:ke,...De};return _e||(ut.opacity=0),ut},[_,ke,ue,le,Se,oe,De,_e]),Le=C.useRef(null);Ke(()=>{if(!b)return;const ut=B.current,Rt=typeof ut=="function"?ut():ut,Xt=(tM(Rt)?Rt.current:Rt)||null||null;Xt!==Le.current&&(ge.setPositionReference(Xt),Le.current=Xt)},[b,ge,M,B]),C.useEffect(()=>{if(!b)return;const ut=B.current;typeof ut!="function"&&tM(ut)&&ut.current!==Le.current&&(ge.setPositionReference(ut.current),Le.current=ut.current)},[b,ge,M,B]),C.useEffect(()=>{if(g&&b&&Ce.domReference&&Ce.floating)return YD(Ce.domReference,Ce.floating,ae,xe)},[g,b,Ce,ae,xe]);const st=Yr(Oe),Bt=tL(r,st,L),Ot=Ma(Oe)||"center",Me=!!((Tt=me.hide)!=null&&Tt.referenceHidden);Ke(()=>{R&&b&&_e&&D(st)},[R,b,_e,st]);const Qe=C.useMemo(()=>{var ut,Rt;return{position:"absolute",top:(ut=me.arrow)==null?void 0:ut.y,left:(Rt=me.arrow)==null?void 0:Rt.x}},[me.arrow]),Ne=((dt=me.arrow)==null?void 0:dt.centerOffset)!==0;return C.useMemo(()=>({positionerStyles:Pe,arrowStyles:Qe,arrowRef:re,arrowUncentered:Ne,side:Bt,align:Ot,physicalSide:st,anchorHidden:Me,refs:ge,context:Te,isPositioned:_e,update:ae}),[Pe,Qe,re,Ne,Bt,Ot,st,Me,ge,Te,_e,ae])}function tM(e){return e!=null&&"current"in e}function nL(e){return e==="starting"?mie:_n}const rL={...Lie,...Gy},ule=C.forwardRef(function(t,n){const{render:r,className:i,defaultOpen:o=!1,disabled:a=!1,onOpenChange:u,open:c,...f}=t,h=Fe(u),p=Oie({open:c,defaultOpen:o,onOpenChange:h,disabled:a}),g=C.useMemo(()=>({open:p.open,disabled:p.disabled,transitionStatus:p.transitionStatus}),[p.open,p.disabled,p.transitionStatus]),y=C.useMemo(()=>({...p,onOpenChange:h,state:g}),[p,h,g]),b=Gn("div",t,{state:g,ref:n,props:f,stateAttributesMapping:rL});return E.jsx(VI.Provider,{value:y,children:b})}),cle={...jie,...Gy},fle=C.forwardRef(function(t,n){const{panelId:r,open:i,handleTrigger:o,state:a,disabled:u}=YI(),{className:c,disabled:f=u,id:h,render:p,nativeButton:g=!0,...y}=t,{getButtonProps:b,buttonRef:v}=zh({disabled:f,focusableWhenDisabled:!0,native:g}),S=C.useMemo(()=>({"aria-controls":i?r:void 0,"aria-expanded":i,onClick:o}),[r,i,o]);return Gn("button",t,{state:a,ref:[n,v],props:[S,y,b],stateAttributesMapping:cle})});let nM=(function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e})({});const dle=C.forwardRef(function(t,n){const{className:r,hiddenUntilFound:i,keepMounted:o,render:a,id:u,...c}=t,{abortControllerRef:f,animationTypeRef:h,height:p,mounted:g,onOpenChange:y,open:b,panelId:v,panelRef:S,runOnceAnimationsFinish:x,setDimensions:_,setHiddenUntilFound:R,setKeepMounted:T,setMounted:A,setPanelIdState:D,setOpen:O,setVisible:$,state:z,transitionDimensionRef:j,visible:I,width:M,transitionStatus:B}=YI(),G=i??!1,L=o??!1;Ke(()=>{if(u)return D(u),()=>{D(void 0)}},[u,D]),Ke(()=>{R(G)},[R,G]),Ke(()=>{T(L)},[T,L]);const{props:F}=joe({abortControllerRef:f,animationTypeRef:h,externalRef:n,height:p,hiddenUntilFound:G,id:v,keepMounted:L,mounted:g,onOpenChange:y,open:b,panelRef:S,runOnceAnimationsFinish:x,setDimensions:_,setMounted:A,setOpen:O,setVisible:$,transitionDimensionRef:j,visible:I,width:M});Qy({open:b&&B==="idle",ref:S,onComplete(){b&&_({height:void 0,width:void 0})}});const U=C.useMemo(()=>({...z,transitionStatus:B}),[z,B]),V=Gn("div",t,{state:U,ref:[n,S],props:[F,{style:{[nM.collapsiblePanelHeight]:p===void 0?"auto":`${p}px`,[nM.collapsiblePanelWidth]:M===void 0?"auto":`${M}px`}},c],stateAttributesMapping:rL});return L||G||!L&&g?V:null}),hle=C.createContext(void 0);function eb(e=!0){const t=C.useContext(hle);if(t===void 0&&!e)throw new Error(Qr(25));return t}const iL=C.createContext(void 0);function BC(e){const t=C.useContext(iL);if(t===void 0&&!e)throw new Error(Qr(33));return t}const oL=C.createContext(void 0);function as(e){const t=C.useContext(oL);if(t===void 0&&!e)throw new Error(Qr(36));return t}function ple(e){const{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:o,itemRef:a,itemMetadata:u}=e,{events:c}=o.useState("floatingTreeRoot"),f=eb(!0),h=f!==void 0;return C.useMemo(()=>({id:r,role:"menuitem",tabIndex:n?0:-1,onMouseMove(p){i&&c.emit("itemhover",{nodeId:i,target:p.currentTarget})},onClick(p){t&&c.emit("close",{domEvent:p,reason:GI})},onMouseUp(p){if(f){const g=f.initialCursorPointRef.current;if(f.initialCursorPointRef.current=null,h&&g&&Math.abs(p.clientX-g.x)<=1&&Math.abs(p.clientY-g.y)<=1)return}a.current&&o.context.allowMouseUpTriggerRef.current&&(!h||p.button===2)&&(!u||u.type==="regular-item")&&a.current.click()}}),[t,n,r,c,i,o,a,f,h,u])}const mle={type:"regular-item"};function sL(e){const{closeOnClick:t,disabled:n=!1,highlighted:r,id:i,store:o,nativeButton:a,itemMetadata:u,nodeId:c}=e,f=C.useRef(null),{getButtonProps:h,buttonRef:p}=zh({disabled:n,focusableWhenDisabled:!0,native:a}),g=ple({closeOnClick:t,highlighted:r,id:i,nodeId:c,store:o,itemRef:f,itemMetadata:u}),y=C.useCallback(v=>rh(g,{onMouseEnter(){u.type==="submenu-trigger"&&u.setActive()},onKeyUp(S){S.key===" "&&o.context.typingRef.current&&S.preventBaseUIHandler()}},v,h),[g,h,o,u]),b=Sa(f,p);return C.useMemo(()=>({getItemProps:y,itemRef:b}),[y,b])}const gle=C.forwardRef(function(t,n){const{render:r,className:i,id:o,label:a,nativeButton:u=!1,disabled:c=!1,closeOnClick:f=!0,...h}=t,p=qy({label:a}),g=BC(!0),y=tu(o),{store:b}=as(),v=b.useState("isActive",p.index),S=b.useState("itemProps"),{getItemProps:x,itemRef:_}=sL({closeOnClick:f,disabled:c,highlighted:v,id:y,store:b,nativeButton:u,nodeId:g==null?void 0:g.nodeId,itemMetadata:mle});return Gn("div",t,{state:{disabled:c,highlighted:v},props:[S,h,x],ref:[_,n,p.ref]})}),yle=C.createContext(void 0);function aL(e){return C.useContext(yle)}const ble={...Jj,...Gy},vle=C.forwardRef(function(t,n){const{render:r,className:i,finalFocus:o,...a}=t,{store:u}=as(),{side:c,align:f}=BC(),h=aL()!=null,p=u.useState("open"),g=u.useState("transitionStatus"),y=u.useState("popupProps"),b=u.useState("mounted"),v=u.useState("instantType"),S=u.useState("activeTriggerElement"),x=u.useState("parent"),_=u.useState("lastOpenChangeReason"),R=u.useState("rootId"),T=u.useState("floatingRootContext"),A=u.useState("floatingTreeRoot"),D=u.useState("closeDelay"),O=u.useState("activeTriggerElement"),$=x.type==="context-menu";Qy({open:p,ref:u.context.popupRef,onComplete(){var G,L;p&&((L=(G=u.context).onOpenChangeComplete)==null||L.call(G,!0))}}),C.useEffect(()=>{function G(L){u.setOpen(!1,xt(L.reason,L.domEvent))}return A.events.on("close",G),()=>{A.events.off("close",G)}},[A.events,u]);const z=u.useState("hoverEnabled"),j=u.useState("disabled");Iae(T,{enabled:z&&!j&&!$&&x.type!=="menubar",closeDelay:D});const I={transitionStatus:g,side:c,align:f,open:p,nested:x.type==="menu",instant:v},M=Gn("div",t,{state:I,ref:[n,u.context.popupRef],stateAttributesMapping:ble,props:[y,{onKeyDown(G){h&&Aoe.has(G.key)&&G.stopPropagation()}},nL(g),a,{"data-rootownerid":R}]});let B=x.type===void 0||$;return(S||x.type==="menubar"&&_!==SC)&&(B=!0),E.jsx(ose,{context:T,modal:$,disabled:!b,returnFocus:o===void 0?B:o,initialFocus:x.type!=="menu",restoreFocus:!0,externalTree:x.type!=="menubar"?A:void 0,previousFocusableElement:O,nextFocusableElement:x.type===void 0?u.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:x.type===void 0?u.context.beforeContentFocusGuardRef:void 0,children:M})}),lL=C.createContext(void 0);function xle(){const e=C.useContext(lL);if(e===void 0)throw new Error(Qr(32));return e}const wle=C.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t,{store:o}=as();return o.useState("mounted")||r?E.jsx(lL.Provider,{value:r,children:E.jsx(ese,{ref:n,...i})}):null}),Sle=C.forwardRef(function(t,n){var Ve;const{anchor:r,positionMethod:i="absolute",className:o,render:a,side:u,align:c,sideOffset:f=0,alignOffset:h=0,collisionBoundary:p="clipping-ancestors",collisionPadding:g=5,arrowPadding:y=5,sticky:b=!1,disableAnchorTracking:v=!1,collisionAvoidance:S=yie,...x}=t,{store:_}=as(),R=xle(),T=eb(!0),A=_.useState("parent"),D=_.useState("floatingRootContext"),O=_.useState("floatingTreeRoot"),$=_.useState("mounted"),z=_.useState("open"),j=_.useState("modal"),I=_.useState("activeTriggerElement"),M=_.useState("transitionStatus"),B=_.useState("lastOpenChangeReason"),G=_.useState("floatingNodeId"),L=_.useState("floatingParentNodeId");let F=r,U=f,V=h,W=c,N=S;A.type==="context-menu"&&(F=r??((Ve=A.context)==null?void 0:Ve.anchor),W=W??"start",!u&&W!=="center"&&(V=t.alignOffset??2,U=t.sideOffset??-5));let Y=u,J=W;A.type==="menu"?(Y=Y??"inline-end",J=J??"start",N=t.collisionAvoidance??bie):A.type==="menubar"&&(Y=Y??"bottom",J=J??"start");const H=A.type==="context-menu",ie=lle({anchor:F,floatingRootContext:D,positionMethod:T?"fixed":i,mounted:$,side:Y,sideOffset:U,align:J,alignOffset:V,arrowPadding:H?0:y,collisionBoundary:p,collisionPadding:g,sticky:b,nodeId:G,keepMounted:R,disableAnchorTracking:v,collisionAvoidance:N,shiftCrossAxis:H&&!("side"in N&&N.side==="flip"),externalTree:O}),re=C.useMemo(()=>{const X={};return z||(X.pointerEvents="none"),{role:"presentation",hidden:!$,style:{...ie.positionerStyles,...X}}},[z,$,ie.positionerStyles]);C.useEffect(()=>{function X(Z){Z.open&&(Z.parentNodeId===G&&_.set("hoverEnabled",!1),Z.nodeId!==G&&Z.parentNodeId===_.select("floatingParentNodeId")&&_.setOpen(!1,xt(pg)))}return O.events.on("menuopenchange",X),()=>{O.events.off("menuopenchange",X)}},[_,O.events,G]),C.useEffect(()=>{if(_.select("floatingParentNodeId")==null)return;function X(Z){if(Z.open||Z.nodeId!==_.select("floatingParentNodeId"))return;const ne=Z.reason??pg;_.setOpen(!1,xt(ne))}return O.events.on("menuopenchange",X),()=>{O.events.off("menuopenchange",X)}},[O.events,_]),C.useEffect(()=>{function X(Z){!z||Z.nodeId!==_.select("floatingParentNodeId")||Z.target&&I&&I!==Z.target&&_.setOpen(!1,xt(pg))}return O.events.on("itemhover",X),()=>{O.events.off("itemhover",X)}},[O.events,z,I,_]),C.useEffect(()=>{const X={open:z,nodeId:G,parentNodeId:L,reason:_.select("lastOpenChangeReason")};O.events.emit("menuopenchange",X)},[O.events,z,_,G,L]);const he={open:z,side:ie.side,align:ie.align,anchorHidden:ie.anchorHidden,nested:A.type==="menu"},ve=C.useMemo(()=>({side:ie.side,align:ie.align,arrowRef:ie.arrowRef,arrowUncentered:ie.arrowUncentered,arrowStyles:ie.arrowStyles,nodeId:ie.context.nodeId}),[ie.side,ie.align,ie.arrowRef,ie.arrowUncentered,ie.arrowStyles,ie.context.nodeId]),Re=Gn("div",t,{state:he,stateAttributesMapping:Jj,ref:[n,_.useStateSetter("positionerElement")],props:[re,nL(M),x]}),ce=$&&A.type!=="menu"&&(A.type!=="menubar"&&j&&B!==Gr||A.type==="menubar"&&A.context.modal);let Ie=null;return A.type==="menubar"?Ie=A.context.contentElement:A.type===void 0&&(Ie=I),E.jsxs(iL.Provider,{value:ve,children:[ce&&E.jsx(tle,{ref:A.type==="context-menu"||A.type==="nested-context-menu"?A.context.internalBackdropRef:null,inert:eL(!z),cutout:Ie}),E.jsx(Voe,{id:G,children:E.jsx(xC,{elementsRef:_.context.itemDomElements,labelsRef:_.context.itemLabels,children:Re})})]})}),Cle=C.createContext(null);function uL(e){return C.useContext(Cle)}const Ele={...Tae,disabled:vt(e=>e.parent.type==="menubar"&&e.parent.context.disabled||e.disabled),modal:vt(e=>(e.parent.type===void 0||e.parent.type==="context-menu")&&(e.modal??!0)),allowMouseEnter:vt(e=>e.allowMouseEnter),stickIfOpen:vt(e=>e.stickIfOpen),parent:vt(e=>e.parent),rootId:vt(e=>e.parent.type==="menu"?e.parent.store.select("rootId"):e.parent.type!==void 0?e.parent.context.rootId:e.rootId),activeIndex:vt(e=>e.activeIndex),isActive:vt((e,t)=>e.activeIndex===t),hoverEnabled:vt(e=>e.hoverEnabled),instantType:vt(e=>e.instantType),lastOpenChangeReason:vt(e=>e.openChangeReason),floatingTreeRoot:vt(e=>e.parent.type==="menu"?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot),floatingNodeId:vt(e=>e.floatingNodeId),floatingParentNodeId:vt(e=>e.floatingParentNodeId),itemProps:vt(e=>e.itemProps),closeDelay:vt(e=>e.closeDelay),keyboardEventRelay:vt(e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type==="menu")return e.parent.store.select("keyboardEventRelay")})};class UC extends Wj{constructor(n){super({...kle(),...n},{positionerRef:C.createRef(),popupRef:C.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:C.createRef(),beforeContentFocusGuardRef:C.createRef(),onOpenChangeComplete:void 0,triggerElements:new jC},Ele);te(this,"unsubscribeParentListener",null);this.unsubscribeParentListener=this.observe("parent",r=>{var i;if((i=this.unsubscribeParentListener)==null||i.call(this),r.type==="menu"){this.unsubscribeParentListener=r.store.subscribe(()=>{this.notifyAll()}),this.context.allowMouseUpTriggerRef=r.store.context.allowMouseUpTriggerRef;return}r.type!==void 0&&(this.context.allowMouseUpTriggerRef=r.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(n,r){this.state.floatingRootContext.context.events.emit("setOpen",{open:n,eventDetails:r})}static useStore(n,r){const i=_r(()=>new UC(r)).current;return n??i}}function kle(){return{..._ae(),disabled:!1,modal:!0,allowMouseEnter:!1,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new $C,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:_n,keyboardEventRelay:void 0,closeDelay:0}}const cL=C.createContext(void 0);function fL(){return C.useContext(cL)}const dL=Vj(function(t){const{children:n,open:r,onOpenChange:i,onOpenChangeComplete:o,defaultOpen:a=!1,disabled:u=!1,modal:c,loopFocus:f=!0,orientation:h="vertical",actionsRef:p,closeParentOnEsc:g=!1,handle:y,triggerId:b,defaultTriggerId:v=null,highlightItemOnHover:S=!0}=t,x=eb(!0),_=as(!0),R=uL(!0),T=fL(),A=C.useMemo(()=>T&&_?{type:"menu",store:_.store}:R?{type:"menubar",context:R}:x&&!_?{type:"context-menu",context:x}:{type:void 0},[x,_,R,T]),D=UC.useStore(y==null?void 0:y.store,{open:a,openProp:r,activeTriggerId:v,triggerIdProp:b,parent:A});nle(()=>{r===void 0&&D.state.open===!1&&a===!0&&D.update({open:!0,activeTriggerId:v})}),D.useControlledProp("openProp",r),D.useControlledProp("triggerIdProp",b),D.useContextCallback("onOpenChangeComplete",o);const O=D.useState("floatingTreeRoot"),$=Aj(O),z=ss();Ke(()=>{x&&!_?D.update({parent:{type:"context-menu",context:x},floatingNodeId:$,floatingParentNodeId:z}):_&&D.update({floatingNodeId:$,floatingParentNodeId:z})},[x,_,$,z,D]);const j=D.useState("open"),I=D.useState("activeTriggerElement"),M=D.useState("positionerElement"),B=D.useState("hoverEnabled"),G=D.useState("modal"),L=D.useState("disabled"),F=D.useState("lastOpenChangeReason"),U=D.useState("parent"),V=D.useState("activeIndex"),W=D.useState("payload"),N=D.useState("floatingParentNodeId"),Y=C.useRef(null),J=N!=null;let H;D.useSyncedValues({disabled:u,modal:U.type===void 0?c:void 0,rootId:eu()});const{openMethod:ie,triggerProps:re,reset:he}=Wae(j);Eae(D);const{forceUnmount:ve}=kae(j,D,()=>{D.update({allowMouseEnter:!1,stickIfOpen:!0}),he()}),Re=C.useRef(U.type!=="context-menu"),ce=Bi();C.useEffect(()=>{if(j||(Y.current=null),U.type==="context-menu"){if(!j){ce.clear(),Re.current=!1;return}ce.start(500,()=>{Re.current=!0})}},[ce,j,U.type]),Goe(j&&G&&F!==Gr&&ie!=="touch",M),Ke(()=>{!j&&!B&&D.set("hoverEnabled",!0)},[j,B,D]);const Ie=C.useRef(!0),Ve=Bi(),X=Fe((Me,Qe)=>{var tn;const Ne=Qe.reason;if(j===Me&&Qe.trigger===I&&F===Ne||(Qe.preventUnmountOnClose=()=>{D.set("preventUnmountingOnClose",!0)},!Me&&Qe.trigger==null&&(Qe.trigger=I??void 0),i==null||i(Me,Qe),Qe.isCanceled))return;const Tt={open:Me,nativeEvent:Qe.event,reason:Qe.reason,nested:J};H==null||H.emit("openchange",Tt);const dt=Qe.event;if(Me===!1&&(dt==null?void 0:dt.type)==="click"&&dt.pointerType==="touch"&&!Ie.current)return;if(!Me&&V!==null){const yn=D.context.itemDomElements.current[V];queueMicrotask(()=>{yn==null||yn.setAttribute("tabindex","-1")})}Me&&Ne===Nd?(Ie.current=!1,Ve.start(300,()=>{Ie.current=!0})):(Ie.current=!0,Ve.clear());const ut=(Ne===Bc||Ne===GI)&&dt.detail===0&&(dt==null?void 0:dt.isTrusted),Rt=!Me&&(Ne===CC||Ne==null),en={open:Me,openChangeReason:Ne};Y.current=Qe.event??null;const Xt=((tn=Qe.trigger)==null?void 0:tn.id)??null;(Xt||Me)&&(en.activeTriggerId=Xt,en.activeTriggerElement=Qe.trigger??null),D.update(en),U.type==="menubar"&&(Ne===Nd||Ne===Uc||Ne===Gr||Ne===hg||Ne===pg)?D.set("instantType","group"):ut||Rt?D.set("instantType",ut?"click":"dismiss"):D.set("instantType",void 0)}),Z=C.useCallback(Me=>{const Qe=xt(Me);return Qe.preventUnmountOnClose=()=>{D.set("preventUnmountingOnClose",!0)},Qe},[D]),ne=C.useCallback(()=>{D.setOpen(!1,Z(kie))},[D,Z]);C.useImperativeHandle(p,()=>({unmount:ve,close:ne}),[ve,ne]);let xe;U.type==="context-menu"&&(xe=U.context),C.useImperativeHandle(xe==null?void 0:xe.positionerRef,()=>M,[M]),C.useImperativeHandle(xe==null?void 0:xe.actionsRef,()=>({setOpen:X}),[X]);const ge=Mae({popupStore:D,onOpenChange:X});H=ge.context.events,C.useEffect(()=>{const Me=({open:Qe,eventDetails:Ne})=>X(Qe,Ne);return H.on("setOpen",Me),()=>{H==null||H.off("setOpen",Me)}},[H,X]);const Ce=Kse(ge,{enabled:!L,bubbles:{escapeKey:g&&U.type==="menu"},outsidePress(){var Me;return U.type!=="context-menu"||((Me=Y.current)==null?void 0:Me.type)==="contextmenu"?!0:Re.current},externalTree:J?O:void 0}),le=Gae(ge,{role:"menu"}),oe=Uy(),me=C.useCallback(Me=>{D.select("activeIndex")!==Me&&D.set("activeIndex",Me)},[D]),ae=Uae(ge,{enabled:!L,listRef:D.context.itemDomElements,activeIndex:V,nested:U.type!==void 0,loopFocus:f,orientation:h,parentOrientation:U.type==="menubar"?U.context.orientation:void 0,rtl:oe==="rtl",disabledIndices:zc,onNavigate:me,openOnArrowKeyDown:U.type!=="context-menu",externalTree:J?O:void 0,focusItemOnHover:S}),Oe=C.useCallback(Me=>{D.context.typingRef.current=Me},[D]),Te=qae(ge,{listRef:D.context.itemLabels,activeIndex:V,resetMs:hie,onMatch:Me=>{j&&Me!==V&&D.set("activeIndex",Me)},onTypingChange:Oe}),{getReferenceProps:_e,getFloatingProps:De,getItemProps:ue,getTriggerProps:Se}=FC([Ce,le,ae,Te]),ke=C.useMemo(()=>{const Me=rh(_e(),{onMouseMove(){D.set("allowMouseEnter",!0)}},re);return delete Me.role,Me},[_e,D,re]),Pe=C.useMemo(()=>{const Me=Se();if(!Me)return Me;const Qe=rh(Me,re);return delete Qe.role,delete Qe["aria-controls"],Qe},[Se,re]),Le=C.useMemo(()=>De({onMouseMove(){D.set("allowMouseEnter",!0),U.type==="menu"&&D.set("hoverEnabled",!1)},onClick(){D.select("hoverEnabled")&&D.set("hoverEnabled",!1)},onKeyDown(Me){const Qe=D.select("keyboardEventRelay");Qe&&!Me.isPropagationStopped()&&Qe(Me)}}),[De,U.type,D]),st=C.useMemo(()=>ue(),[ue]);D.useSyncedValues({floatingRootContext:ge,activeTriggerProps:ke,inactiveTriggerProps:Pe,popupProps:Le,itemProps:st});const Bt=C.useMemo(()=>({store:D,parent:A}),[D,A]),Ot=E.jsx(oL.Provider,{value:Bt,children:typeof n=="function"?n({payload:W}):n});return U.type===void 0||U.type==="context-menu"?E.jsx(Yoe,{externalTree:O,children:Ot}):Ot});function Rle(e){const t=as().store,n=C.useMemo(()=>({parentMenu:t}),[t]);return E.jsx(cL.Provider,{value:n,children:E.jsx(dL,{...e})})}function hL(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=_C(),{ref:i,index:o}=qy(e),a=n===o,u=C.useRef(null),c=Sa(i,u);return{compositeProps:C.useMemo(()=>({tabIndex:a?0:-1,onFocus(){r(o)},onMouseMove(){const h=u.current;if(!t||!h)return;const p=h.hasAttribute("disabled")||h.ariaDisabled==="true";!a&&!p&&h.focus()}}),[a,r,o,t]),compositeRef:c,index:o}}function pL(e){const{render:t,className:n,state:r=_n,props:i=zc,refs:o=zc,metadata:a,stateAttributesMapping:u,tag:c="div",...f}=e,{compositeProps:h,compositeRef:p}=hL({metadata:a});return Gn(c,e,{state:r,ref:[...o,p],props:[h,...i,f],stateAttributesMapping:u})}function mL(e){if(Jt(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid")??void 0;if(!oo(e))return mL(ao(e))}function _le(e){const{enabled:t=!0,mouseDownAction:n,open:r}=e,i=C.useRef(!1);return C.useMemo(()=>t?{onMouseDown:o=>{(n==="open"&&!r||n==="close"&&r)&&(i.current=!0,Pt(o.currentTarget).addEventListener("click",()=>{i.current=!1},{once:!0}))},onClick:o=>{i.current&&(i.current=!1,o.preventBaseUIHandler())}}:_n,[t,n,r])}const Bm=2,Tle=hae(function(t,n){const{render:r,className:i,disabled:o=!1,nativeButton:a=!0,id:u,openOnHover:c,delay:f=100,closeDelay:h=0,handle:p,payload:g,...y}=t,b=as(!0),v=(p==null?void 0:p.store)??(b==null?void 0:b.store);if(!v)throw new Error(Qr(85));const S=tu(u),x=v.useState("isTriggerActive",S),_=v.useState("floatingRootContext"),R=v.useState("isOpenedByTrigger",S),T=C.useRef(null),A=Dle(),D=_C(!0),O=Oa(),$=C.useMemo(()=>O??new $C,[O]),z=Aj($),j=ss(),{registerTrigger:I,isMountedByThisTrigger:M}=Cae(S,T,v,{payload:g,closeDelay:h,parent:A,floatingTreeRoot:$,floatingNodeId:z,floatingParentNodeId:j,keyboardEventRelay:D==null?void 0:D.relayKeyboardEvent}),B=A.type==="menubar",G=v.useState("disabled"),L=o||G||B&&A.context.disabled,{getButtonProps:F,buttonRef:U}=zh({disabled:L,native:a});C.useEffect(()=>{!R&&A.type===void 0&&(v.context.allowMouseUpTriggerRef.current=!1)},[v,R,A.type]);const V=C.useRef(null),W=Bi(),N=Fe(Ce=>{if(!V.current)return;W.clear(),v.context.allowMouseUpTriggerRef.current=!1;const le=Ce.target;if(pt(V.current,le)||pt(v.select("positionerElement"),le)||le===V.current||le!=null&&mL(le)===v.select("rootId"))return;const oe=rle(V.current);Ce.clientX>=oe.left-Bm&&Ce.clientX<=oe.right+Bm&&Ce.clientY>=oe.top-Bm&&Ce.clientY<=oe.bottom+Bm||$.events.emit("close",{domEvent:Ce,reason:Eie})});C.useEffect(()=>{R&&v.select("lastOpenChangeReason")===Gr&&Pt(V.current).addEventListener("mouseup",N,{once:!0})},[R,N,v]);const Y=B&&A.context.hasSubmenuOpen,H=Qj(_,{enabled:(c??Y)&&!L&&A.type!=="context-menu"&&(!B||Y&&!M),handleClose:Zj({blockPointerEvents:!B}),mouseOnly:!0,move:!1,restMs:A.type===void 0?f:void 0,delay:{close:h},triggerElementRef:T,externalTree:$,isActiveTrigger:x}),ie=Ale(R,v.select("lastOpenChangeReason")),re=Pj(_,{enabled:!L&&A.type!=="context-menu",event:R&&B?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:A.type===void 0?ie:!1}),he=Oae(_,{enabled:!L&&Y}),ve=_le({open:R,enabled:B,mouseDownAction:"open"}),Re=FC([re,he]),ce={disabled:L,open:R},Ie=v.useState("triggerProps",M),Ve=[V,n,U,I,T],X=[Re.getReferenceProps(),H??_n,Ie,{"aria-haspopup":"menu",id:S,onMouseDown:Ce=>{if(v.select("open"))return;W.start(200,()=>{v.context.allowMouseUpTriggerRef.current=!0}),Pt(Ce.currentTarget).addEventListener("mouseup",N,{once:!0})}},B?{role:"menuitem"}:{},ve,y,F],Z=C.useRef(null),ne=Fe(Ce=>{gn.flushSync(()=>{v.setOpen(!1,xt(Uc,Ce.nativeEvent,Ce.currentTarget))});const le=Eoe(Z.current);le==null||le.focus()}),xe=Fe(Ce=>{var oe;const le=v.select("positionerElement");if(le&&mc(Ce,le))(oe=v.context.beforeContentFocusGuardRef.current)==null||oe.focus();else{gn.flushSync(()=>{v.setOpen(!1,xt(Uc,Ce.nativeEvent,Ce.currentTarget))});let me=Coe(v.context.triggerFocusTargetRef.current||T.current);for(;me!==null&&pt(le,me);){const ae=me;if(me=OC(me),me===ae)break}me==null||me.focus()}}),ge=Gn("button",t,{enabled:!B,stateAttributesMapping:JD,state:ce,ref:Ve,props:X});return B?E.jsx(pL,{tag:"button",render:r,className:i,state:ce,refs:Ve,props:X,stateAttributesMapping:JD}):R?E.jsxs(C.Fragment,{children:[E.jsx(Wc,{ref:Z,onFocus:ne},`${S}-pre-focus-guard`),E.jsx(C.Fragment,{children:ge},S),E.jsx(Wc,{ref:v.context.triggerFocusTargetRef,onFocus:xe},`${S}-post-focus-guard`)]}):E.jsx(C.Fragment,{children:ge},S)});function Ale(e,t){const n=Bi(),[r,i]=C.useState(!1);return Ke(()=>{e&&t==="trigger-hover"?(i(!0),n.start(pie,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function Dle(){const e=eb(!0),t=as(!0),n=uL();return C.useMemo(()=>n?{type:"menubar",context:n}:e&&!t?{type:"context-menu",context:e}:{type:void 0},[e,t,n])}const Mle=C.forwardRef(function(t,n){const{render:r,className:i,label:o,id:a,nativeButton:u=!1,openOnHover:c=!0,delay:f=100,closeDelay:h=0,disabled:p=!1,...g}=t,y=qy(),b=BC(),{store:v}=as(),S=tu(a),x=v.useState("open"),_=v.useState("floatingRootContext"),R=v.useState("floatingTreeRoot"),T=Kj(S,v),A=C.useCallback(re=>{const he=T(re);return re!==null&&v.select("open")&&v.select("activeTriggerId")==null&&v.update({activeTriggerId:S,activeTriggerElement:re,closeDelay:h}),he},[T,h,v,S]),D=C.useRef(null),O=C.useCallback(re=>{D.current=re,v.set("activeTriggerElement",re)},[v]),$=fL();if(!($!=null&&$.parentMenu))throw new Error(Qr(37));v.useSyncedValue("closeDelay",h);const z=$.parentMenu,j=z.useState("itemProps"),I=z.useState("isActive",y.index),M=C.useMemo(()=>({type:"submenu-trigger",setActive(){z.set("activeIndex",y.index)}}),[z,y.index]),B=v.useState("disabled"),G=p||B,{getItemProps:L,itemRef:F}=sL({closeOnClick:!1,disabled:G,highlighted:I,id:S,store:v,nativeButton:u,itemMetadata:M,nodeId:b==null?void 0:b.nodeId}),U=v.useState("hoverEnabled"),V=z.useState("allowMouseEnter"),W=Qj(_,{enabled:U&&c&&!G,handleClose:Zj({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:f,delay:V?{open:f,close:h}:0,triggerElementRef:D,externalTree:R}),N=Pj(_,{enabled:!G,event:"mousedown",toggle:!c,ignoreMouse:c,stickIfOpen:!1}),Y=FC([N]),J=v.useState("triggerProps",!0);return delete J.id,Gn("div",t,{state:{disabled:G,highlighted:I,open:x},stateAttributesMapping:ele,props:[Y.getReferenceProps(),W,J,j,{tabIndex:x||I?0:-1,onBlur(){I&&z.set("activeIndex",null)}},g,L],ref:[n,y.ref,F,A,O]})}),Ole=C.createContext(void 0),$le={disableStyleElements:!1};function Ple(){return C.useContext(Ole)??$le}const gL="data-composite-item-active",Nle=[];function Ile(e){const{itemSizes:t,cols:n=1,loopFocus:r=!0,dense:i=!1,orientation:o="both",direction:a,highlightedIndex:u,onHighlightedIndexChange:c,rootRef:f,enableHomeAndEndKeys:h=!1,stopEventPropagation:p=!1,disabledIndices:g,modifierKeys:y=Nle}=e,[b,v]=C.useState(0),S=n>1,x=C.useRef(null),_=Sa(x,f),R=C.useRef([]),T=C.useRef(!1),A=u??b,D=Fe((z,j=!1)=>{if((c??v)(z),j){const I=R.current[z];OD(x.current,I,a,o)}}),O=Fe(z=>{if(z.size===0||T.current)return;T.current=!0;const j=Array.from(z.keys()),I=j.find(B=>B==null?void 0:B.hasAttribute(gL))??null,M=I?j.indexOf(I):-1;M!==-1&&D(M),OD(x.current,I,a,o)}),$=C.useMemo(()=>({"aria-orientation":o==="both"?void 0:o,ref:_,onFocus(z){!x.current||!MD(z.target)||z.target.setSelectionRange(0,z.target.value.length??0)},onKeyDown(z){const j=h?Toe:kj;if(!j.has(z.key)||jle(z,y)||!x.current)return;const M=a==="rtl",B=M?oh:yc,G={horizontal:B,vertical:yl,both:B}[o],L=M?yc:oh,F={horizontal:L,vertical:gc,both:L}[o];if(MD(z.target)&&!Fie(z.target)){const H=z.target.selectionStart,ie=z.target.selectionEnd,re=z.target.value??"";if(H==null||z.shiftKey||H!==ie||z.key!==F&&H<re.length||z.key!==G&&H>0)return}let U=A;const V=mg(R,g),W=Mw(R,g);if(S){const H=t||Array.from({length:R.current.length},()=>({width:1,height:1})),ie=cj(H,n,i),re=ie.findIndex(ve=>ve!=null&&!ga(R,ve,g)),he=ie.reduce((ve,Re,ce)=>Re!=null&&!ga(R,Re,g)?ce:ve,-1);U=ie[uj({current:ie.map(ve=>ve?R.current[ve]:null)},{event:z,orientation:o,loopFocus:r,cols:n,disabledIndices:dj([...g||R.current.map((ve,Re)=>ga(R,Re)?Re:void 0),void 0],ie),minIndex:re,maxIndex:he,prevIndex:fj(A>W?V:A,H,ie,n,z.key===yl?"bl":z.key===yc?"tr":"tl"),rtl:M})]}const N={horizontal:[B],vertical:[yl],both:[B,yl]}[o],Y={horizontal:[L],vertical:[gc],both:[L,gc]}[o],J=S?j:{horizontal:h?Roe:Cj,vertical:h?_oe:Ej,both:j}[o];h&&(z.key===Hh?U=V:z.key===Gh&&(U=W)),U===A&&(N.includes(z.key)||Y.includes(z.key))&&(r&&U===W&&N.includes(z.key)?U=V:r&&U===V&&Y.includes(z.key)?U=W:U=Bn(R,{startingIndex:U,decrement:Y.includes(z.key),disabledIndices:g})),U!==A&&!pc(R,U)&&(p&&z.stopPropagation(),J.has(z.key)&&z.preventDefault(),D(U,!0),queueMicrotask(()=>{var H;(H=R.current[U])==null||H.focus()}))}}),[n,i,a,g,R,h,A,S,t,r,_,y,D,o,p]);return C.useMemo(()=>({props:$,highlightedIndex:A,onHighlightedIndexChange:D,elementsRef:R,disabledIndices:g,onMapChange:O,relayKeyboardEvent:$.onKeyDown}),[$,A,D,R,g,O])}function jle(e,t){for(const n of Poe.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function yL(e){const{render:t,className:n,refs:r=zc,props:i=zc,state:o=_n,stateAttributesMapping:a,highlightedIndex:u,onHighlightedIndexChange:c,orientation:f,dense:h,itemSizes:p,loopFocus:g,cols:y,enableHomeAndEndKeys:b,onMapChange:v,stopEventPropagation:S=!0,rootRef:x,disabledIndices:_,modifierKeys:R,highlightItemOnHover:T=!1,tag:A="div",...D}=e,O=Uy(),{props:$,highlightedIndex:z,onHighlightedIndexChange:j,elementsRef:I,onMapChange:M,relayKeyboardEvent:B}=Ile({itemSizes:p,cols:y,loopFocus:g,dense:h,orientation:f,highlightedIndex:u,onHighlightedIndexChange:c,rootRef:x,stopEventPropagation:S,enableHomeAndEndKeys:b,direction:O,disabledIndices:_,modifierKeys:R}),G=Gn(A,e,{state:o,ref:r,props:[$,...i,D],stateAttributesMapping:a}),L=C.useMemo(()=>({highlightedIndex:z,onHighlightedIndexChange:j,highlightItemOnHover:T,relayKeyboardEvent:B}),[z,j,T,B]);return E.jsx(KI.Provider,{value:L,children:E.jsx(xC,{elementsRef:I,onMapChange:F=>{v==null||v(F),M(F)},children:G})})}function rM(e){const t=Tr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Jt(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r;return(qc(n)!==o||qc(r)!==a)&&(n=o,r=a),{width:n,height:r}}const bL=C.createContext(void 0);function sh(){const e=C.useContext(bL);if(e===void 0)throw new Error(Qr(64));return e}let Lle=(function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e})({});const tb={tabActivationDirection:e=>({[Lle.activationDirection]:e})},Fle=C.forwardRef(function(t,n){const{className:r,defaultValue:i=0,onValueChange:o,orientation:a="horizontal",render:u,value:c,...f}=t,h=Uy(),p=Object.hasOwn(t,"defaultValue"),g=C.useRef([]),[y,b]=C.useState(()=>new Map),[v,S]=By({controlled:c,default:i,name:"Tabs",state:"value"}),x=c!==void 0,[_,R]=C.useState(()=>new Map),[T,A]=C.useState("none"),D=Fe((U,V)=>{o==null||o(U,V),!V.isCanceled&&(S(U),A(V.activationDirection))}),O=Fe((U,V)=>{b(W=>{if(W.get(U)===V)return W;const N=new Map(W);return N.set(U,V),N})}),$=Fe((U,V)=>{b(W=>{if(!W.has(U)||W.get(U)!==V)return W;const N=new Map(W);return N.delete(U),N})}),z=C.useCallback(U=>y.get(U),[y]),j=C.useCallback(U=>{for(const V of _.values())if(U===(V==null?void 0:V.value))return V==null?void 0:V.id},[_]),I=C.useCallback(U=>{if(U===void 0)return null;for(const[V,W]of _.entries())if(W!=null&&U===(W.value??W.index))return V;return null},[_]),M=C.useMemo(()=>({direction:h,getTabElementBySelectedValue:I,getTabIdByPanelValue:j,getTabPanelIdByValue:z,onValueChange:D,orientation:a,registerMountedTabPanel:O,setTabMap:R,unregisterMountedTabPanel:$,tabActivationDirection:T,value:v}),[h,I,j,z,D,a,O,R,$,T,v]),B=C.useMemo(()=>{for(const U of _.values())if(U!=null&&U.value===v)return U},[_,v]),G=C.useMemo(()=>{for(const U of _.values())if(U!=null&&!U.disabled)return U.value},[_]);Ke(()=>{if(x||_.size===0)return;const U=B==null?void 0:B.disabled,V=B==null&&v!==null;if(p&&U&&v===i||!U&&!V)return;const N=G??null;v!==N&&(S(N),A("none"))},[i,G,p,x,B,A,S,_,v]);const F=Gn("div",t,{state:{orientation:a,tabActivationDirection:T},ref:n,props:f,stateAttributesMapping:tb});return E.jsx(bL.Provider,{value:M,children:E.jsx(xC,{elementsRef:g,children:F})})}),vL=C.createContext(void 0);function xL(){const e=C.useContext(vL);if(e===void 0)throw new Error(Qr(65));return e}const zle=C.forwardRef(function(t,n){const{className:r,disabled:i=!1,render:o,value:a,id:u,nativeButton:c=!0,...f}=t,{value:h,getTabPanelIdByValue:p,orientation:g}=sh(),{activateOnFocus:y,highlightedTabIndex:b,onTabActivation:v,setHighlightedTabIndex:S,tabsListElement:x}=xL(),_=tu(u),R=C.useMemo(()=>({disabled:i,id:_,value:a}),[i,_,a]),{compositeProps:T,compositeRef:A,index:D}=hL({metadata:R}),O=a===h,$=C.useRef(!1);Ke(()=>{if($.current){$.current=!1;return}if(!(O&&D>-1&&b!==D))return;const W=x;if(W!=null){const N=mi(Pt(W));if(N&&pt(W,N))return}i||S(D)},[O,D,b,S,i,x]);const{getButtonProps:z,buttonRef:j}=zh({disabled:i,native:c,focusableWhenDisabled:!0}),I=p(a),M=C.useRef(!1),B=C.useRef(!1);function G(W){O||i||v(a,xt(ih,W.nativeEvent,void 0,{activationDirection:"none"}))}function L(W){O||(D>-1&&!i&&S(D),!i&&y&&(!M.current||M.current&&B.current)&&v(a,xt(ih,W.nativeEvent,void 0,{activationDirection:"none"})))}function F(W){if(O||i)return;M.current=!0;function N(){M.current=!1,B.current=!1}(!W.button||W.button===0)&&(B.current=!0,Pt(W.currentTarget).addEventListener("pointerup",N,{once:!0}))}return Gn("button",t,{state:{disabled:i,active:O,orientation:g},ref:[n,j,A],props:[T,{role:"tab","aria-controls":I,"aria-selected":O,id:_,onClick:G,onFocus:L,onPointerDown:F,[gL]:O?"":void 0,onKeyDownCapture(){$.current=!0}},f,z]})}),Ble='!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();';let Yu=(function(e){return e.activeTabLeft="--active-tab-left",e.activeTabRight="--active-tab-right",e.activeTabTop="--active-tab-top",e.activeTabBottom="--active-tab-bottom",e.activeTabWidth="--active-tab-width",e.activeTabHeight="--active-tab-height",e})({});const Ule={...tb,activeTabPosition:()=>null,activeTabSize:()=>null},Hle=C.forwardRef(function(t,n){const{className:r,render:i,renderBeforeHydration:o=!1,...a}=t,{nonce:u}=Ple(),{getTabElementBySelectedValue:c,orientation:f,tabActivationDirection:h,value:p}=sh(),{tabsListElement:g}=xL(),[y,b]=C.useState(!1),{value:v}=sh();Fh(()=>b(!0));const S=wae();C.useEffect(()=>{if(p!=null&&g!=null&&typeof ResizeObserver<"u"){const G=new ResizeObserver(S);return G.observe(g),()=>{G.disconnect()}}},[p,g,S]);let x=0,_=0,R=0,T=0,A=0,D=0,O=!1;if(p!=null&&g!=null){const G=c(p);if(O=!0,G!=null){const{width:L,height:F}=rM(G),{width:U,height:V}=rM(g),W=G.getBoundingClientRect(),N=g.getBoundingClientRect(),Y=U>0?N.width/U:1,J=V>0?N.height/V:1;if(Math.abs(Y)>Number.EPSILON&&Math.abs(J)>Number.EPSILON){const ie=W.left-N.left,re=W.top-N.top;x=ie/Y+g.scrollLeft-g.clientLeft,R=re/J+g.scrollTop-g.clientTop}else x=G.offsetLeft,R=G.offsetTop;A=L,D=F,_=g.scrollWidth-x-A,T=g.scrollHeight-R-D}}const $=C.useMemo(()=>O?{left:x,right:_,top:R,bottom:T}:null,[x,_,R,T,O]),z=C.useMemo(()=>O?{width:A,height:D}:null,[A,D,O]),j=C.useMemo(()=>{if(O)return{[Yu.activeTabLeft]:`${x}px`,[Yu.activeTabRight]:`${_}px`,[Yu.activeTabTop]:`${R}px`,[Yu.activeTabBottom]:`${T}px`,[Yu.activeTabWidth]:`${A}px`,[Yu.activeTabHeight]:`${D}px`}},[x,_,R,T,A,D,O]),I=O&&A>0&&D>0,B=Gn("span",t,{state:{orientation:f,activeTabPosition:$,activeTabSize:z,tabActivationDirection:h},ref:n,props:[{role:"presentation",style:j,hidden:!I},a,{suppressHydrationWarning:!0}],stateAttributesMapping:Ule});return v==null?null:E.jsxs(C.Fragment,{children:[B,!y&&o&&E.jsx("script",{nonce:u,dangerouslySetInnerHTML:{__html:Ble},suppressHydrationWarning:!0})]})});let Gle=(function(e){return e.index="data-index",e.activationDirection="data-activation-direction",e.orientation="data-orientation",e.hidden="data-hidden",e})({});const qle={...tb,...Gy},Vle=C.forwardRef(function(t,n){const{className:r,value:i,render:o,keepMounted:a=!1,...u}=t,{value:c,getTabIdByPanelValue:f,orientation:h,tabActivationDirection:p,registerMountedTabPanel:g,unregisterMountedTabPanel:y}=sh(),b=tu(),v=C.useMemo(()=>({id:b,value:i}),[b,i]),{ref:S,index:x}=qy({metadata:v}),_=i===c,{mounted:R,transitionStatus:T,setMounted:A}=EC(_),D=!R,O=f(i),$={hidden:D,orientation:h,tabActivationDirection:p,transitionStatus:T},z=C.useRef(null),j=Gn("div",t,{state:$,ref:[n,S,z],props:[{"aria-labelledby":O,hidden:D,id:b,role:"tabpanel",tabIndex:_?0:-1,inert:eL(!_),[Gle.index]:x},u],stateAttributesMapping:qle});return Qy({open:_,ref:z,onComplete(){_||A(!1)}}),Ke(()=>{if(!(D&&!a)&&b!=null)return g(i,b),()=>{y(i,b)}},[D,a,i,b,g,y]),a||R?j:null}),Yle=C.forwardRef(function(t,n){const{activateOnFocus:r=!1,className:i,loopFocus:o=!0,render:a,...u}=t,{getTabElementBySelectedValue:c,onValueChange:f,orientation:h,value:p,setTabMap:g,tabActivationDirection:y}=sh(),[b,v]=C.useState(0),[S,x]=C.useState(null),_=Wle(p,h,S,c),R=Fe((O,$)=>{if(O!==p){const z=_(O);$.activationDirection=z,f(O,$)}}),T={orientation:h,tabActivationDirection:y},A={"aria-orientation":h==="vertical"?"vertical":void 0,role:"tablist"},D=C.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:b,onTabActivation:R,setHighlightedTabIndex:v,tabsListElement:S,value:p}),[r,b,R,v,S,p]);return E.jsx(vL.Provider,{value:D,children:E.jsx(yL,{render:a,className:i,state:T,refs:[n,x],props:[A,u],stateAttributesMapping:tb,highlightedIndex:b,enableHomeAndEndKeys:!0,loopFocus:o,orientation:h,onHighlightedIndexChange:v,onMapChange:g,disabledIndices:zc})})});function iM(e,t){const{left:n,top:r}=e.getBoundingClientRect(),{left:i,top:o}=t.getBoundingClientRect(),a=n-i,u=r-o;return{left:a,top:u}}function Wle(e,t,n,r){const[i,o]=C.useState(null);return Ke(()=>{if(e==null||n==null){o(null);return}const a=r(e);if(a==null){o(null);return}const{left:u,top:c}=iM(a,n);o(t==="horizontal"?u:c)},[t,r,n,e]),C.useCallback(a=>{if(a===e)return"none";if(a==null)return o(null),"none";if(a!=null&&n!=null){const u=r(a);if(u!=null){const{left:c,top:f}=iM(u,n);if(i==null)return o(t==="horizontal"?c:f),"none";if(t==="horizontal"){if(c<i)return o(c),"left";if(c>i)return o(c),"right"}else{if(f<i)return o(f),"up";if(f>i)return o(f),"down"}}}return"none"},[r,t,i,n,e])}const wL=C.createContext(void 0);function Kle(e=!0){const t=C.useContext(wL);if(t===void 0&&!e)throw new Error(Qr(7));return t}const xc=C.forwardRef(function(t,n){const{className:r,defaultPressed:i=!1,disabled:o=!1,form:a,onPressedChange:u,pressed:c,render:f,type:h,value:p,nativeButton:g=!0,...y}=t,b=tu(p||void 0),v=Kle(),S=(v==null?void 0:v.value)??[],x=v?void 0:i,_=(o||(v==null?void 0:v.disabled))??!1,[R,T]=By({controlled:v?b!==void 0&&S.indexOf(b)>-1:c,default:x,name:"Toggle",state:"pressed"}),A=Fe((M,B)=>{var G;b&&((G=v==null?void 0:v.setGroupValue)==null||G.call(v,b,M,B)),u==null||u(M,B)}),{getButtonProps:D,buttonRef:O}=zh({disabled:_,native:g}),$={disabled:_,pressed:R},z=[O,n],j=[{"aria-pressed":R,onClick(M){const B=!R,G=xt(ih,M.nativeEvent);A(B,G),!G.isCanceled&&T(B)}},y,D],I=Gn("button",t,{enabled:!v,state:$,ref:z,props:j});return v?E.jsx(pL,{tag:"button",render:f,className:r,state:$,refs:z,props:j}):I});let Xle=(function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e.multiple="data-multiple",e})({});const oM={multiple(e){return e?{[Xle.multiple]:""}:null}},Qle=C.forwardRef(function(t,n){const{defaultValue:r,disabled:i=!1,loopFocus:o=!0,onValueChange:a,orientation:u="horizontal",multiple:c=!1,value:f,className:h,render:p,...g}=t,y=aL(),b=C.useMemo(()=>{if(f===void 0)return r??[]},[f,r]),v=C.useMemo(()=>f!==void 0||r!==void 0,[f,r]),S=((y==null?void 0:y.disabled)??!1)||i,[x,_]=By({controlled:f,default:b,name:"ToggleGroup",state:"value"}),R=Fe(($,z,j)=>{let I;if(c?(I=x.slice(),z?I.push($):I.splice(x.indexOf($),1)):I=z?[$]:[],Array.isArray(I)){if(a==null||a(I,j),j.isCanceled)return;_(I)}}),T={disabled:S,multiple:c,orientation:u},A=C.useMemo(()=>({disabled:S,orientation:u,setGroupValue:R,value:x,isValueInitialized:v}),[S,u,R,x,v]),D={role:"group"},O=Gn("div",t,{enabled:!!y,state:T,ref:n,props:[D,g],stateAttributesMapping:oM});return E.jsx(wL.Provider,{value:A,children:y?O:E.jsx(yL,{render:p,className:h,state:T,refs:[n],props:[D,g],stateAttributesMapping:oM,loopFocus:o,enableHomeAndEndKeys:!0})})}),SL=({className:e,children:t,...n})=>E.jsx(je,{"data-slot":"list-text-label",className:ze(Ho["list-text-label"],e),size:0,...n,children:t});SL.displayName="ListLabel";const CL=({className:e,children:t,...n})=>E.jsx(je,{"data-slot":"list-text-description",className:ze(Ho["list-text-description"],e),size:0,...n,children:t});CL.displayName="ListDescription";const EL=({label:e,description:t,...n})=>E.jsxs(cr,{condition:!!t,render:E.jsx(Ye,{"data-slot":"list-text-block",gap:2,...n}),children:[E.jsx(SL,{children:e}),t&&E.jsx(CL,{children:t})]});EL.displayName="ListTextBlock";const kL=()=>E.jsx(Ch,{size:Bre,strokeWidth:4,stroke:"var(--shade-foreground)",style:{marginInlineStart:"auto"}});kL.displayName="ListSelectedIcon";const HC=({disabled:e,selected:t,render:n,className:r,icon:i,label:o,description:a,content:u,action:c,...f})=>E.jsx(Xe,{"data-slot":"list-item",render:n??E.jsx("li",{}),ay:"start",ax:"space-between",gap:8,className:ze(Ho["list-item"],r),tabIndex:e?-1:0,"data-disabled":e?"":void 0,"data-selected":t?"":void 0,...f,children:E.jsxs(cr,{condition:!!(i||t),render:E.jsx(Xe,{gap:3,ay:"start",fullwidth:!0,style:{listStyleType:"none"}}),children:[i&&E.jsx(i,{"data-slot":"list-item-icon",size:jI,style:{color:"var(--shade-foreground)"}}),E.jsxs(cr,{condition:!!u,render:E.jsx(Ye,{fullwidth:!0,gap:1}),children:[E.jsxs(cr,{condition:!!t||!!c,render:E.jsx(Xe,{fullwidth:!0,ay:"center",gap:2,ax:"space-between"}),children:[E.jsx(EL,{"data-slot":"list-item-text",label:o,description:a}),t&&E.jsx(kL,{}),c]}),u]})]})});HC.displayName="ListItem";const GC=({category:e,collapsible:t,open:n,defaultOpen:r=!0,onOpenChange:i,icon:o,items:a})=>E.jsxs(Ye,{"data-slot":"list-item-group",ax:"stretch",fullwidth:!0,className:Ho["list-item-group"],render:t?E.jsx(ule,{render:E.jsx("li",{}),open:n,defaultOpen:r,onOpenChange:i}):E.jsx("li",{}),children:[e&&E.jsxs(Xe,{"data-slot":"list-item-group-collapsible-trigger",render:t?E.jsx(fle,{}):E.jsx("div",{}),className:Ho["list-item-group-collapsible-trigger"],ay:"center",ax:"start",gap:2,py:2,fullwidth:!0,children:[t&&E.jsx(xS,{size:14,strokeWidth:3}),o&&E.jsx(o,{"data-slot":"list-item-group-icon",size:jI}),E.jsx(je,{"data-slot":"list-item-group-category-text",render:E.jsx("h3",{}),className:Ho["list-item-group-category"],mr:t?8:void 0,weight:"bold",size:0,"data-is-collapsible":t,children:e})]}),E.jsx(tf,{condition:!!t,render:{true:E.jsx(dle,{render:E.jsx("ul",{"data-slot":"list-item-panel",className:Ho["list-item-panel"]})}),false:E.jsx("ul",{"data-slot":"list-item-panel",className:Ho["list-item-panel"]})},children:a.map(u=>"items"in u?E.jsx(GC,{...u},u.id??u.category):E.jsx(HC,{...u},u.value))})]});GC.displayName="ListItemGroup";const Kc=({type:e=Hre,direction:t=Gre,size:n=Ure,line:r,items:i,children:o,ItemProps:a,...u})=>{const c=e==="ordered"?E.jsx("ol",{}):E.jsx("ul",{}),f={"data-slot":"list","data-type":e,"data-size":n,"data-direction":t,"data-line":r?"true":void 0,className:Ho.list,...u};return E.jsx(tf,{condition:t==="row",p:0,m:0,...f,render:{true:E.jsx(Xe,{render:c,ay:"start",gap:4}),false:E.jsx(Ye,{render:c,ax:"stretch"})},children:i?i.map((h,p)=>"items"in h?E.jsx(GC,{"data-line":!0,...h},h.id??`${h.category??"group"}-${p}`):E.jsx(HC,{fullwidth:t==="column",...h,...a},h.value)):o})};Kc.displayName="List";const Zle=C.createContext(void 0);function Jle(e=!1){const t=C.useContext(Zle);if(t===void 0&&!e)throw new Error(df(16));return t}function eue(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:o}=e,a=r&&t!==!1,u=r&&t===!1;return{props:C.useMemo(()=>{const c={onKeyDown(f){n&&t&&f.key!=="Tab"&&f.preventDefault()}};return r||(c.tabIndex=i,!o&&n&&(c.tabIndex=t?i:-1)),(o&&(t||a)||!o&&n)&&(c["aria-disabled"]=n),o&&(!t||u)&&(c.disabled=n),c},[r,n,t,a,u,o,i])}}function tue(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,o=C.useRef(null),a=Jle(!0)!==void 0,u=ar(()=>{const g=o.current;return!!((g==null?void 0:g.tagName)==="A"&&(g!=null&&g.href))}),{props:c}=eue({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:i}),f=C.useCallback(()=>{const g=o.current;nue(g)&&a&&t&&c.disabled===void 0&&g.disabled&&(g.disabled=!1)},[t,c.disabled,a]);Hn(f,[f]);const h=C.useCallback((g={})=>{const{onClick:y,onMouseDown:b,onKeyUp:v,onKeyDown:S,onPointerDown:x,..._}=g;return Fc({type:i?"button":void 0,onClick(R){if(t){R.preventDefault();return}y==null||y(R)},onMouseDown(R){t||(b==null||b(R))},onKeyDown(R){if(t||(xw(R),S==null||S(R)),R.baseUIHandlerPrevented)return;const T=R.target===R.currentTarget&&!i&&!u()&&!t,A=R.key==="Enter",D=R.key===" ";T&&((D||A)&&R.preventDefault(),A&&(y==null||y(R)))},onKeyUp(R){t||(xw(R),v==null||v(R)),!R.baseUIHandlerPrevented&&R.target===R.currentTarget&&!i&&!t&&R.key===" "&&(y==null||y(R))},onPointerDown(R){if(t){R.preventDefault();return}x==null||x(R)}},i?void 0:{role:"button"},c,_)},[t,c,i,u]),p=ar(g=>{o.current=g,f()});return{getButtonProps:h,buttonRef:p}}function nue(e){return wI(e)&&e.tagName==="BUTTON"}const rue="_checkbox_13h6m_3 _disabled_dkczp_2",Go={checkbox:rue,"checkbox-label":"_checkbox-label_13h6m_48","checkbox-indicator":"_checkbox-indicator_13h6m_53","size-small":"_size-small_13h6m_62","checkbox-icon":"_checkbox-icon_13h6m_65","size-medium":"_size-medium_13h6m_70","size-large":"_size-large_13h6m_78","toggle-bordered":"_toggle-bordered_13h6m_87","toggle-reversed":"_toggle-reversed_13h6m_104"},RL=Jn({variants:{bordered:{true:Go["toggle-bordered"]},reversed:{true:Go["toggle-reversed"]},size:{small:Go["size-small"],medium:Go["size-medium"],large:Go["size-large"]}}}),_L=({name:e,label:t,description:n,reversed:r,bordered:i,LabelProps:o,DescriptionProps:a,ErrorProps:u,className:c,children:f,...h})=>{const p=!!t,g=p&&!!n;return E.jsxs(cr,{condition:p,render:E.jsx(Xe,{render:E.jsx("label",{}),className:ze(Go["checkbox-label"],RL({reversed:r,bordered:i}),c),ay:g?"start":"center",gap:3,...h}),children:[f,!!(t||n)&&E.jsx(yC,{name:e,children:E.jsxs(cr,{condition:g,render:E.jsx(Ye,{gap:3}),children:[t&&E.jsx(bC,{weight:"normal",...o,children:t}),n&&E.jsx(vC,{...a,children:n}),E.jsx(ey,{...u})]})})]})};_L.displayName="CheckboxField";const iue="small";let sM=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.indeterminate="data-indeterminate",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});function TL(e){return C.useMemo(()=>({checked(t){return e.indeterminate?{}:t?{[sM.checked]:""}:{[sM.unchecked]:""}},...Zl}),[e.indeterminate])}const oue=C.createContext({disabled:!1});function sue(){return C.useContext(oue)}const aue=C.createContext(void 0);function lue(e=!0){const t=C.useContext(aue);if(t===void 0&&!e)throw new Error(df(3));return t}const AL=C.createContext(void 0);function uue(){const e=C.useContext(AL);if(e===void 0)throw new Error(df(14));return e}const cue="data-parent",fue=C.forwardRef(function(e,t){const{checked:n,className:r,defaultChecked:i=!1,disabled:o=!1,id:a,indeterminate:u=!1,inputRef:c,name:f,onCheckedChange:h,parent:p=!1,readOnly:g=!1,render:y,required:b=!1,uncheckedValue:v,value:S,nativeButton:x=!1,..._}=e,{clearErrors:R}=Lh(),{disabled:T,name:A,setDirty:D,setFilled:O,setFocused:$,setTouched:z,state:j,validationMode:I,validityData:M,shouldValidateOnChange:B,validation:G}=hf(),L=sue(),{labelId:F,controlId:U,registerControlId:V,getDescriptionProps:W}=Ta(),N=lue(),Y=N==null?void 0:N.parent,J=Y&&N.allValues,H=T||L.disabled||(N==null?void 0:N.disabled)||o,ie=A??f,re=S??ie,he=zl(),ve=zl();let Re=U;J?Re=p?ve:`${Y.id}-${re}`:a&&(Re=a);let ce={};J&&(p?ce=N.parent.getParentProps():re&&(ce=N.parent.getChildProps(re)));const Ie=ar(h),{checked:Ve=n,indeterminate:X=u,onCheckedChange:Z,...ne}=ce,xe=N==null?void 0:N.value,ge=N==null?void 0:N.setValue,Ce=N==null?void 0:N.defaultValue,le=C.useRef(null),oe=_a(()=>Symbol("checkbox-control")),me=C.useRef(!1),{getButtonProps:ae,buttonRef:Oe}=tue({disabled:H,native:x}),Te=(N==null?void 0:N.validation)??G,[_e,De]=lI({controlled:re&&xe&&!p?xe.includes(re):Ve,default:re&&Ce&&!p?Ce.includes(re):i,name:"Checkbox",state:"checked"});Hn(()=>{V!==Cr&&(me.current=!0,V(oe.current,Re))},[Re,N,V,p,oe]),C.useEffect(()=>{const Me=oe.current;return()=>{!me.current||V===Cr||(me.current=!1,V(Me,void 0))}},[V,oe]),bI({enabled:!N,id:he,commit:Te.commit,value:_e,controlRef:le,name:ie,getValue:()=>_e});const ue=C.useRef(null),Se=gw(c,ue,Te.inputRef);Hn(()=>{ue.current&&(ue.current.indeterminate=X,_e&&O(!0))},[_e,X,O]),lre(_e,()=>{N&&!p||(R(ie),O(_e),D(_e!==M.initialValue),B()?Te.commit(_e):Te.commit(_e,!0))});const ke=Fc({checked:_e,disabled:H,name:p?void 0:ie,id:x?void 0:Re??void 0,required:b,ref:Se,style:ie?Wne:Yne,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(Me){if(Me.nativeEvent.defaultPrevented)return;const Qe=Me.target.checked,Ne=dI(kI,Me.nativeEvent);if(Z==null||Z(Qe,Ne),Ie(Qe,Ne),!Ne.isCanceled&&(De(Qe),re&&xe&&ge&&!p)){const Tt=Qe?[...xe,re]:xe.filter(dt=>dt!==re);ge(Tt,Ne)}},onFocus(){var Me;(Me=le.current)==null||Me.focus()}},S!==void 0?{value:(N?_e&&S:S)||""}:Pi,W,N?Te.getValidationProps:Te.getInputValidationProps),Pe=J?!!Ve:_e,Le=J&&X||u;C.useEffect(()=>{if(!Y||!re)return;const Me=Y.disabledStatesRef.current;return Me.set(re,H),()=>{Me.delete(re)}},[Y,H,re]);const st=C.useMemo(()=>({...j,checked:Pe,disabled:H,readOnly:g,required:b,indeterminate:Le}),[j,Pe,H,g,b,Le]),Bt=TL(st),Ot=Jl("span",e,{state:st,ref:[Oe,le,t,N==null?void 0:N.registerControlRef],props:[{id:x?Re??void 0:he,role:"checkbox","aria-checked":X?"mixed":_e,"aria-readonly":g||void 0,"aria-required":b||void 0,"aria-labelledby":F,[cue]:p?"":void 0,onFocus(){$(!0)},onBlur(){const Me=ue.current;Me&&(z(!0),$(!1),I==="onBlur"&&Te.commit(N?xe:Me.checked))},onClick(Me){var Qe;g||H||(Me.preventDefault(),(Qe=ue.current)==null||Qe.dispatchEvent(new PointerEvent("click",{bubbles:!0,shiftKey:Me.shiftKey,ctrlKey:Me.ctrlKey,altKey:Me.altKey,metaKey:Me.metaKey})))}},W,Te.getValidationProps,_,ne,ae],stateAttributesMapping:Bt});return E.jsxs(AL.Provider,{value:st,children:[Ot,!_e&&!N&&ie&&!p&&v!==void 0&&E.jsx("input",{type:"hidden",name:ie,value:v}),E.jsx("input",{...ke})]})}),DL=({size:e=iue,hideIndicator:t,className:n,...r})=>E.jsx(fue,{"data-slot":"checkbox","aria-label":"checkbox",className:ze(Go.checkbox,RL({size:e}),n,{"sr-only":t}),...r});DL.displayName="CheckboxRoot";const due=C.forwardRef(function(e,t){const{render:n,className:r,keepMounted:i=!1,...o}=e,a=uue(),u=a.checked||a.indeterminate,{mounted:c,transitionStatus:f,setMounted:h}=CI(u),p=C.useRef(null),g={...a,transitionStatus:f};gI({open:u,ref:p,onComplete(){u||h(!1)}});const y=TL(a),b=C.useMemo(()=>({...y,...mI,...Zl}),[y]),v=i||c,S=Jl("span",e,{ref:[t,p],state:g,stateAttributesMapping:b,props:o});return v?S:null}),ML=({indeterminate:e,className:t,...n})=>E.jsx(due,{"data-slot":"checkbox-indicator",className:ze(Go["checkbox-indicator"],t),...n,children:E.jsx(tf,{condition:!!e,className:Go["checkbox-icon"],"data-slot":"checkbox-icon",render:{true:E.jsx(UG,{strokeWidth:3}),false:E.jsx(Ch,{strokeWidth:3})}})});ML.displayName="CheckboxIndicator";const OL=({name:e,label:t,description:n,reversed:r,bordered:i,indeterminate:o,hideIndicator:a,FieldProps:u,IndicatorProps:c,...f})=>E.jsx(_L,{name:e,label:t,description:n,reversed:r,bordered:i,...u,children:E.jsx(DL,{name:e,hideIndicator:a,...f,children:E.jsx(ML,{indeterminate:o,...c})})});OL.displayName="Checkbox";const nb=({children:e,...t})=>E.jsx(dL,{...t,children:e});nb.displayName="MenuRoot";const rb=({children:e,...t})=>{const n=C.isValidElement(e),r=!!t.render;return E.jsx(Tle,{"data-slot":"menu-trigger",...!r&&{render:E.jsx("div",{tabIndex:n?-1:0}),nativeButton:!1},...t,children:e})};rb.displayName="MenuTrigger";const ah=({children:e,...t})=>E.jsx(wle,{"data-slot":"menu-portal",...t,children:e});ah.displayName="MenuPortal";const hue="_positioner_12j95_1",pue="_popup_12j95_5",mue="_item_12j95_23",ib={positioner:hue,popup:pue,item:mue,"submenu-trigger":"_submenu-trigger_12j95_24"},lh=({className:e,children:t,...n})=>E.jsx(Sle,{"data-slot":"menu-positioner",className:ze(ib.positioner,e),sideOffset:4,collisionPadding:16,...n,children:t});lh.displayName="MenuPositioner";const uh=({className:e,children:t,...n})=>E.jsx(vle,{"data-slot":"menu-popup",className:ze(ib.popup,e),...n,children:t});uh.displayName="MenuPopup";const $L=({children:e,...t})=>E.jsx(Rle,{"data-slot":"submenu-root",...t,children:e});$L.displayName="SubmenuRoot";const PL=({className:e,children:t,...n})=>E.jsx(Mle,{"data-slot":"submenu-trigger",render:E.jsx(Xe,{gap:4,ay:"center",ax:"space-between"}),className:ze(ib["submenu-trigger"],e),...n,children:t});PL.displayName="SubmenuTrigger";const Xc=({className:e,children:t,...n})=>E.jsx(gle,{"data-slot":"menu-item",className:ze(ib.item,e),...n,children:t});Xc.displayName="MenuItem";const NL=({items:e,trigger:t,align:n,side:r,RootProps:i,TriggerProps:o,PopupProps:a,PositionerProps:u,ItemProps:c,SubmenuRootProps:f,SubmenuTriggerProps:h})=>E.jsxs(nb,{...i,children:[E.jsx(rb,{...o,children:t}),E.jsx(ah,{children:E.jsx(lh,{side:r,align:n,...u,children:E.jsx(uh,{...a,children:e.map(p=>{const g=p.items;return g?E.jsxs($L,{...f,children:[E.jsxs(PL,{...h,children:[p.label,E.jsx(X3,{size:12})]}),E.jsx(ah,{children:E.jsx(lh,{children:E.jsx(uh,{children:g.map(y=>E.jsx(Xc,{children:y.label},y.value))})})})]},p.value):E.jsx(Xc,{...c,children:p.label},p.value)})})})})]});NL.displayName="Menu";const IL=({children:e,...t})=>E.jsx(Fle,{"data-slot":"tabs-root",render:E.jsx(Ye,{}),...t,children:e});IL.displayName="TabsRoot";const gue="_tab_4eh43_3",ob={"tabs-list":"_tabs-list_4eh43_3",tab:gue,"tabs-indicator":"_tabs-indicator_4eh43_65","tabs-panel":"_tabs-panel_4eh43_86"},jL=({size:e="md",ghost:t,fullwidth:n,className:r,children:i,...o})=>E.jsx(Yle,{"data-slot":"tabs-list","data-size":e,"data-ghost":t||void 0,render:E.jsx(Xe,{gap:4,ay:"center",fullwidth:n}),className:ze(ob["tabs-list"],r),...o,children:i});jL.displayName="TabsList";const LL=({className:e,children:t,...n})=>E.jsx(zle,{"data-slot":"tabs-tab",className:ze(ob.tab,e),...n,children:t});LL.displayName="TabsTab";const FL=({className:e,...t})=>E.jsx(Hle,{"data-slot":"tabs-indicator",className:ze(ob["tabs-indicator"],e),...t});FL.displayName="TabsIndicator";const zL=({className:e,children:t,...n})=>E.jsx(Vle,{"data-slot":"tabs-panel",render:E.jsx(Ye,{ay:"center",ax:"center",fullwidth:!0}),className:ze(ob["tabs-panel"],e),tabIndex:-1,...n,children:t});zL.displayName="TabsPanel";const qC=({items:e,defaultValue:t,value:n,onValueChange:r,keepMounted:i,size:o,ghost:a,fullwidth:u,RootProps:c,ListProps:f,TabProps:h,IndicatorProps:p,PanelProps:g,ContainerProps:y})=>E.jsxs(IL,{defaultValue:t||e[0].value,value:n,onValueChange:r,...c,children:[E.jsxs(jL,{size:o,ghost:a,fullwidth:u,...f,children:[e.map(b=>E.jsx(LL,{value:b.value,...h,children:b.label},b.value)),E.jsx(FL,{...p})]}),E.jsx(pS,{"data-slot":"tabs-container",...y,children:e.map(b=>E.jsx(zL,{value:b.value,keepMounted:i,...g,children:b.render},b.value))})]});qC.displayName="Tabs";const yue=(e,t,n)=>{const r=C.useRef(null),i=C.useRef(new Map),o=C.useCallback(()=>{const a=(e??t)[0],u=a?i.current.get(String(a)):null,c=r.current;if(u&&c){const f=n==="vertical",h=u.getBoundingClientRect(),p=c.getBoundingClientRect();f?(c.style.setProperty("--active-toggle-top",`${h.top-p.top-1}px`),c.style.setProperty("--active-toggle-height",`${h.height}px`)):(c.style.setProperty("--active-toggle-left",`${h.left-p.left-1}px`),c.style.setProperty("--active-toggle-width",`${h.width}px`))}},[e,t,n]);return C.useEffect(()=>{o();const a=r.current,u=(e??t)[0],c=u?i.current.get(String(u)):null;if(!a)return;const f=new ResizeObserver(()=>{o()});return f.observe(a),c&&f.observe(c),()=>{f.disconnect()}},[e,t,n,o]),{panelRef:r,buttonsRef:i}},j1={"toggle-group-panel":"_toggle-group-panel_al39a_1","toggle-group-indicator":"_toggle-group-indicator_al39a_33","toggle-group-button":"_toggle-group-button_al39a_59"},VC=({size:e="md",ghost:t,orientation:n,value:r,defaultValue:i,onValueChange:o,children:a,...u})=>{const[c,f]=C.useState(i?[...i]:[]),{panelRef:h,buttonsRef:p}=yue(r,c,n),g=b=>{f(b),o==null||o(b)},y=C.Children.map(a,b=>{if(C.isValidElement(b)){const v=b.props.value,S=b.props.className||"";return C.cloneElement(b,{className:`${j1["toggle-group-button"]} ${S}`.trim(),ref:x=>{x&&v&&p.current.set(v,x)}})}return b});return E.jsxs(Qle,{ref:h,value:r,defaultValue:i,onValueChange:g,className:j1["toggle-group-panel"],"data-size":e,"data-ghost":t||void 0,"data-orientation":n,render:n==="vertical"?E.jsx(Ye,{}):E.jsx(Xe,{}),...u,children:[E.jsx("div",{"data-slot":"toggle-group-indicator",className:j1["toggle-group-indicator"]}),y]})};VC.displayName="ToggleGroup";function bue(e,t){const n=getComputedStyle(e),r=parseFloat(n.fontSize);return t*r}function vue(e,t){const n=getComputedStyle(e.ownerDocument.body),r=parseFloat(n.fontSize);return t*r}function xue(e){return e/100*window.innerHeight}function wue(e){return e/100*window.innerWidth}function Sue(e){switch(typeof e){case"number":return[e,"px"];case"string":{const t=parseFloat(e);return e.endsWith("%")?[t,"%"]:e.endsWith("px")?[t,"px"]:e.endsWith("rem")?[t,"rem"]:e.endsWith("em")?[t,"em"]:e.endsWith("vh")?[t,"vh"]:e.endsWith("vw")?[t,"vw"]:[t,"%"]}}}function Um({groupSize:e,panelElement:t,styleProp:n}){let r;const[i,o]=Sue(n);switch(o){case"%":{r=i/100*e;break}case"px":{r=i;break}case"rem":{r=vue(t,i);break}case"em":{r=bue(t,i);break}case"vh":{r=xue(i);break}case"vw":{r=wue(i);break}}return r}function ji(e){return parseFloat(e.toFixed(3))}function Qc({group:e}){const{orientation:t,panels:n}=e;return n.reduce((r,i)=>(r+=t==="horizontal"?i.element.offsetWidth:i.element.offsetHeight,r),0)}function Lw(e){const{panels:t}=e,n=Qc({group:e});return n===0?t.map(r=>({collapsedSize:0,collapsible:r.panelConstraints.collapsible===!0,defaultSize:void 0,disabled:r.panelConstraints.disabled,minSize:0,maxSize:100,panelId:r.id})):t.map(r=>{const{element:i,panelConstraints:o}=r;let a=0;if(o.collapsedSize!==void 0){const h=Um({groupSize:n,panelElement:i,styleProp:o.collapsedSize});a=ji(h/n*100)}let u;if(o.defaultSize!==void 0){const h=Um({groupSize:n,panelElement:i,styleProp:o.defaultSize});u=ji(h/n*100)}let c=0;if(o.minSize!==void 0){const h=Um({groupSize:n,panelElement:i,styleProp:o.minSize});c=ji(h/n*100)}let f=100;if(o.maxSize!==void 0){const h=Um({groupSize:n,panelElement:i,styleProp:o.maxSize});f=ji(h/n*100)}return{collapsedSize:a,collapsible:o.collapsible===!0,defaultSize:u,disabled:o.disabled,minSize:c,maxSize:f,panelId:r.id}})}function zt(e,t="Assertion error"){if(!e)throw Error(t)}function Fw(e,t){return Array.from(t).sort(e==="horizontal"?Cue:Eue)}function Cue(e,t){const n=e.element.offsetLeft-t.element.offsetLeft;return n!==0?n:e.element.offsetWidth-t.element.offsetWidth}function Eue(e,t){const n=e.element.offsetTop-t.element.offsetTop;return n!==0?n:e.element.offsetHeight-t.element.offsetHeight}function BL(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function UL(e,t){return{x:e.x>=t.left&&e.x<=t.right?0:Math.min(Math.abs(e.x-t.left),Math.abs(e.x-t.right)),y:e.y>=t.top&&e.y<=t.bottom?0:Math.min(Math.abs(e.y-t.top),Math.abs(e.y-t.bottom))}}function kue({orientation:e,rects:t,targetRect:n}){const r={x:n.x+n.width/2,y:n.y+n.height/2};let i,o=Number.MAX_VALUE;for(const a of t){const{x:u,y:c}=UL(r,a),f=e==="horizontal"?u:c;f<o&&(o=f,i=a)}return zt(i,"No rect found"),i}let Hm;function Rue(){return Hm===void 0&&(typeof matchMedia=="function"?Hm=!!matchMedia("(pointer:coarse)").matches:Hm=!1),Hm}function HL(e){const{element:t,orientation:n,panels:r,separators:i}=e,o=Fw(n,Array.from(t.children).filter(BL).map(b=>({element:b}))).map(({element:b})=>b),a=[];let u=!1,c=!1,f=-1,h=-1,p=0,g,y=[];{let b=-1;for(const v of o)v.hasAttribute("data-panel")&&(b++,v.ariaDisabled===null&&(p++,f===-1&&(f=b),h=b))}if(p>1){let b=-1;for(const v of o)if(v.hasAttribute("data-panel")){b++;const S=r.find(x=>x.element===v);if(S){if(g){const x=g.element.getBoundingClientRect(),_=v.getBoundingClientRect();let R;if(c){const T=n==="horizontal"?new DOMRect(x.right,x.top,0,x.height):new DOMRect(x.left,x.bottom,x.width,0),A=n==="horizontal"?new DOMRect(_.left,_.top,0,_.height):new DOMRect(_.left,_.top,_.width,0);switch(y.length){case 0:{R=[T,A];break}case 1:{const D=y[0],O=kue({orientation:n,rects:[x,_],targetRect:D.element.getBoundingClientRect()});R=[D,O===x?A:T];break}default:{R=y;break}}}else y.length?R=y:R=[n==="horizontal"?new DOMRect(x.right,_.top,_.left-x.right,_.height):new DOMRect(_.left,x.bottom,_.width,_.top-x.bottom)];for(const T of R){let A="width"in T?T:T.element.getBoundingClientRect();const D=Rue()?e.resizeTargetMinimumSize.coarse:e.resizeTargetMinimumSize.fine;if(A.width<D){const $=D-A.width;A=new DOMRect(A.x-$/2,A.y,A.width+$,A.height)}if(A.height<D){const $=D-A.height;A=new DOMRect(A.x,A.y-$/2,A.width,A.height+$)}const O=b<=f||b>h;!u&&!O&&a.push({group:e,groupSize:Qc({group:e}),panels:[g,S],separator:"width"in T?void 0:T,rect:A}),u=!1}}c=!1,g=S,y=[]}}else if(v.hasAttribute("data-separator")){v.ariaDisabled!==null&&(u=!0);const S=i.find(x=>x.element===v);S?y.push(S):(g=void 0,y=[])}else c=!0}return a}var na;class _ue{constructor(){He(this,na,{})}addListener(t,n){const r=K(this,na)[t];return r===void 0?K(this,na)[t]=[n]:r.includes(n)||r.push(n),()=>{this.removeListener(t,n)}}emit(t,n){const r=K(this,na)[t];if(r!==void 0)if(r.length===1)r[0].call(null,n);else{let i=!1,o=null;const a=Array.from(r);for(let u=0;u<a.length;u++){const c=a[u];try{c.call(null,n)}catch(f){o===null&&(i=!0,o=f)}}if(i)throw o}}removeAllListeners(){$e(this,na,{})}removeListener(t,n){const r=K(this,na)[t];if(r!==void 0){const i=r.indexOf(n);i>=0&&r.splice(i,1)}}}na=new WeakMap;function ir(e,t,n=0){return Math.abs(ji(e)-ji(t))<=n}let ci={cursorFlags:0,interactionState:{state:"inactive"},mountedGroups:new Map};const Zo=new _ue;function lr(){return ci}function ur(e){const t=typeof e=="function"?e(ci):e;if(ci===t)return ci;const n=ci;return ci={...ci,...t},t.cursorFlags!==void 0&&Zo.emit("cursorFlagsChange",ci.cursorFlags),t.interactionState!==void 0&&Zo.emit("interactionStateChange",ci.interactionState),t.mountedGroups!==void 0&&(ci.mountedGroups.forEach((r,i)=>{r.derivedPanelConstraints.forEach(o=>{if(o.collapsible){const{layout:a}=n.mountedGroups.get(i)??{};if(a){const u=ir(o.collapsedSize,r.layout[o.panelId]),c=ir(o.collapsedSize,a[o.panelId]);u&&!c&&(i.inMemoryLastExpandedPanelSizes[o.panelId]=a[o.panelId])}}})}),Zo.emit("mountedGroupsChange",ci.mountedGroups)),ci}function Tue(e,t,n){let r,i={x:1/0,y:1/0};for(const o of t){const a=UL(n,o.rect);switch(e){case"horizontal":{a.x<=i.x&&(r=o,i=a);break}case"vertical":{a.y<=i.y&&(r=o,i=a);break}}}return r?{distance:i,hitRegion:r}:void 0}function Aue(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function Due(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:uM(e),b:uM(t)};let r;for(;n.a.at(-1)===n.b.at(-1);)r=n.a.pop(),n.b.pop();zt(r,"Stacking order can only be calculated for elements with a common ancestor");const i={a:lM(aM(n.a)),b:lM(aM(n.b))};if(i.a===i.b){const o=r.childNodes,a={a:n.a.at(-1),b:n.b.at(-1)};let u=o.length;for(;u--;){const c=o[u];if(c===a.a)return 1;if(c===a.b)return-1}}return Math.sign(i.a-i.b)}const Mue=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Oue(e){const t=getComputedStyle(GL(e)??e).display;return t==="flex"||t==="inline-flex"}function $ue(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||Oue(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||Mue.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function aM(e){let t=e.length;for(;t--;){const n=e[t];if(zt(n,"Missing node"),$ue(n))return n}return null}function lM(e){return e&&Number(getComputedStyle(e).zIndex)||0}function uM(e){const t=[];for(;e;)t.push(e),e=GL(e);return t}function GL(e){const{parentNode:t}=e;return Aue(t)?t.host:t}function Pue(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function Nue({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!BL(n)||n.contains(e)||e.contains(n))return!0;if(Due(n,e)>0){let r=n;for(;r;){if(r.contains(e))return!0;if(Pue(r.getBoundingClientRect(),t))return!1;r=r.parentElement}}return!0}function YC(e,t){const n=[];return t.forEach((r,i)=>{if(i.disabled)return;const o=HL(i),a=Tue(i.orientation,o,{x:e.clientX,y:e.clientY});a&&a.distance.x<=0&&a.distance.y<=0&&Nue({groupElement:i.element,hitRegion:a.hitRegion.rect,pointerEventTarget:e.target})&&n.push(a.hitRegion)}),n}function Iue(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function Qi(e,t){return ir(e,t)?0:e>t?1:-1}function sc({overrideDisabledPanels:e,panelConstraints:t,prevSize:n,size:r}){const{collapsedSize:i=0,collapsible:o,disabled:a,maxSize:u=100,minSize:c=0}=t;if(a&&!e)return n;if(Qi(r,c)<0)if(o){const f=(i+c)/2;Qi(r,f)<0?r=i:r=c}else r=c;return r=Math.min(u,r),r=ji(r),r}function ch({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:o}){if(ir(e,0))return t;const a=o==="imperative-api",u=Object.values(t),c=Object.values(i),f=[...u],[h,p]=r;zt(h!=null,"Invalid first pivot index"),zt(p!=null,"Invalid second pivot index");let g=0;switch(o){case"keyboard":{{const v=e<0?p:h,S=n[v];zt(S,`Panel constraints not found for index ${v}`);const{collapsedSize:x=0,collapsible:_,minSize:R=0}=S;if(_){const T=u[v];if(zt(T!=null,`Previous layout not found for panel index ${v}`),ir(T,x)){const A=R-T;Qi(A,Math.abs(e))>0&&(e=e<0?0-A:A)}}}{const v=e<0?h:p,S=n[v];zt(S,`No panel constraints found for index ${v}`);const{collapsedSize:x=0,collapsible:_,minSize:R=0}=S;if(_){const T=u[v];if(zt(T!=null,`Previous layout not found for panel index ${v}`),ir(T,R)){const A=T-x;Qi(A,Math.abs(e))>0&&(e=e<0?0-A:A)}}}break}default:{const v=e<0?p:h,S=n[v];zt(S,`Panel constraints not found for index ${v}`);const x=u[v],{collapsible:_,collapsedSize:R,minSize:T}=S;if(_&&Qi(x,T)<0)if(e>0){const A=T-R,D=A/2,O=x+e;Qi(O,T)<0&&(e=Qi(e,D)<=0?0:A)}else{const A=T-R,D=100-A/2,O=x-e;Qi(O,T)<0&&(e=Qi(100+e,D)>0?0:-A)}break}}{const v=e<0?1:-1;let S=e<0?p:h,x=0;for(;;){const R=u[S];zt(R!=null,`Previous layout not found for panel index ${S}`);const T=sc({overrideDisabledPanels:a,panelConstraints:n[S],prevSize:R,size:100})-R;if(x+=T,S+=v,S<0||S>=n.length)break}const _=Math.min(Math.abs(e),Math.abs(x));e=e<0?0-_:_}{let v=e<0?h:p;for(;v>=0&&v<n.length;){const S=Math.abs(e)-Math.abs(g),x=u[v];zt(x!=null,`Previous layout not found for panel index ${v}`);const _=x-S,R=sc({overrideDisabledPanels:a,panelConstraints:n[v],prevSize:x,size:_});if(!ir(x,R)&&(g+=x-R,f[v]=R,g.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?v--:v++}}if(Iue(c,f))return i;{const v=e<0?p:h,S=u[v];zt(S!=null,`Previous layout not found for panel index ${v}`);const x=S+g,_=sc({overrideDisabledPanels:a,panelConstraints:n[v],prevSize:S,size:x});if(f[v]=_,!ir(_,x)){let R=x-_,T=e<0?p:h;for(;T>=0&&T<n.length;){const A=f[T];zt(A!=null,`Previous layout not found for panel index ${T}`);const D=A+R,O=sc({overrideDisabledPanels:a,panelConstraints:n[T],prevSize:A,size:D});if(ir(A,O)||(R-=O-A,f[T]=O),ir(R,0))break;e>0?T--:T++}}}const y=Object.values(f).reduce((v,S)=>S+v,0);if(!ir(y,100,.1))return i;const b=Object.keys(i);return f.reduce((v,S,x)=>(v[b[x]]=S,v),{})}function Hl(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(t[n]===void 0||Qi(e[n],t[n])!==0)return!1;return!0}function Gl({layout:e,panelConstraints:t}){const n=Object.values(e),r=[...n],i=r.reduce((u,c)=>u+c,0);if(r.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${r.map(u=>`${u}%`).join(", ")}`);if(!ir(i,100)&&r.length>0)for(let u=0;u<t.length;u++){const c=r[u];zt(c!=null,`No layout data found for index ${u}`);const f=100/i*c;r[u]=f}let o=0;for(let u=0;u<t.length;u++){const c=n[u];zt(c!=null,`No layout data found for index ${u}`);const f=r[u];zt(f!=null,`No layout data found for index ${u}`);const h=sc({overrideDisabledPanels:!0,panelConstraints:t[u],prevSize:c,size:f});f!=h&&(o+=f-h,r[u]=h)}if(!ir(o,0))for(let u=0;u<t.length;u++){const c=r[u];zt(c!=null,`No layout data found for index ${u}`);const f=c+o,h=sc({overrideDisabledPanels:!0,panelConstraints:t[u],prevSize:c,size:f});if(c!==h&&(o-=h-c,r[u]=h,ir(o,0)))break}const a=Object.keys(e);return r.reduce((u,c,f)=>(u[a[f]]=c,u),{})}function qL({groupId:e,panelId:t}){const n=()=>{const{mountedGroups:u}=lr();for(const[c,{defaultLayoutDeferred:f,derivedPanelConstraints:h,layout:p,separatorToPanels:g}]of u)if(c.id===e)return{defaultLayoutDeferred:f,derivedPanelConstraints:h,group:c,layout:p,separatorToPanels:g};throw Error(`Group ${e} not found`)},r=()=>{const u=n().derivedPanelConstraints.find(c=>c.panelId===t);if(u!==void 0)return u;throw Error(`Panel constraints not found for Panel ${t}`)},i=()=>{const u=n().group.panels.find(c=>c.id===t);if(u!==void 0)return u;throw Error(`Layout not found for Panel ${t}`)},o=()=>{const u=n().layout[t];if(u!==void 0)return u;throw Error(`Layout not found for Panel ${t}`)},a=u=>{const c=o();if(u===c)return;const{defaultLayoutDeferred:f,derivedPanelConstraints:h,group:p,layout:g,separatorToPanels:y}=n(),b=p.panels.findIndex(_=>_.id===t),v=b===p.panels.length-1,S=ch({delta:v?c-u:u-c,initialLayout:g,panelConstraints:h,pivotIndices:v?[b-1,b]:[b,b+1],prevLayout:g,trigger:"imperative-api"}),x=Gl({layout:S,panelConstraints:h});Hl(g,x)||ur(_=>({mountedGroups:new Map(_.mountedGroups).set(p,{defaultLayoutDeferred:f,derivedPanelConstraints:h,layout:x,separatorToPanels:y})}))};return{collapse:()=>{const{collapsible:u,collapsedSize:c}=r(),{mutableValues:f}=i(),h=o();u&&h!==c&&(f.expandToSize=h,a(c))},expand:()=>{const{collapsible:u,collapsedSize:c,minSize:f}=r(),{mutableValues:h}=i(),p=o();if(u&&p===c){let g=h.expandToSize??f;g===0&&(g=1),a(g)}},getSize:()=>{const{group:u}=n(),c=o(),{element:f}=i(),h=u.orientation==="horizontal"?f.offsetWidth:f.offsetHeight;return{asPercentage:c,inPixels:h}},isCollapsed:()=>{const{collapsible:u,collapsedSize:c}=r(),f=o();return u&&ir(c,f)},resize:u=>{if(o()!==u){let c;switch(typeof u){case"number":{const{group:f}=n(),h=Qc({group:f});c=ji(u/h*100);break}case"string":{c=parseFloat(u);break}}a(c)}}}}function cM(e){if(e.defaultPrevented)return;const{mountedGroups:t}=lr();YC(e,t).forEach(n=>{if(n.separator){const r=n.panels.find(i=>i.panelConstraints.defaultSize!==void 0);if(r){const i=r.panelConstraints.defaultSize,o=qL({groupId:n.group.id,panelId:r.id});o&&i!==void 0&&(o.resize(i),e.preventDefault())}}})}function yg(e){const{mountedGroups:t}=lr();for(const[n]of t)if(n.separators.some(r=>r.element===e))return n;throw Error("Could not find parent Group for separator element")}function VL({groupId:e}){const t=()=>{const{mountedGroups:n}=lr();for(const[r,i]of n)if(r.id===e)return{group:r,...i};throw Error(`Could not find Group with id "${e}"`)};return{getLayout(){const{defaultLayoutDeferred:n,layout:r}=t();return n?{}:r},setLayout(n){const{defaultLayoutDeferred:r,derivedPanelConstraints:i,group:o,layout:a,separatorToPanels:u}=t(),c=Gl({layout:n,panelConstraints:i});if(r)return a;if(!Hl(a,c)){ur(h=>({mountedGroups:new Map(h.mountedGroups).set(o,{defaultLayoutDeferred:r,derivedPanelConstraints:i,layout:c,separatorToPanels:u})}));const f=o.panels.map(({id:h})=>h).join(",");o.inMemoryLayouts[f]=c}return c}}}function YL(e){const{mountedGroups:t}=lr(),n=t.get(e);return zt(n,`Mounted Group ${e.id} not found`),n}function al(e,t){const n=yg(e),r=YL(n),i=n.separators.find(h=>h.element===e);zt(i,"Matching separator not found");const o=r.separatorToPanels.get(i);zt(o,"Matching panels not found");const a=o.map(h=>n.panels.indexOf(h)),u=VL({groupId:n.id}).getLayout(),c=ch({delta:t,initialLayout:u,panelConstraints:r.derivedPanelConstraints,pivotIndices:a,prevLayout:u,trigger:"keyboard"}),f=Gl({layout:c,panelConstraints:r.derivedPanelConstraints});Hl(u,f)||ur(h=>({mountedGroups:new Map(h.mountedGroups).set(n,{defaultLayoutDeferred:r.defaultLayoutDeferred,derivedPanelConstraints:r.derivedPanelConstraints,layout:f,separatorToPanels:r.separatorToPanels})}))}function fM(e){if(e.defaultPrevented)return;const t=e.currentTarget,n=yg(t);if(!n.disabled)switch(e.key){case"ArrowDown":{e.preventDefault(),n.orientation==="vertical"&&al(t,5);break}case"ArrowLeft":{e.preventDefault(),n.orientation==="horizontal"&&al(t,-5);break}case"ArrowRight":{e.preventDefault(),n.orientation==="horizontal"&&al(t,5);break}case"ArrowUp":{e.preventDefault(),n.orientation==="vertical"&&al(t,-5);break}case"End":{e.preventDefault(),al(t,100);break}case"Enter":{e.preventDefault();const r=yg(t),{derivedPanelConstraints:i,layout:o,separatorToPanels:a}=YL(r),u=r.separators.find(p=>p.element===t);zt(u,"Matching separator not found");const c=a.get(u);zt(c,"Matching panels not found");const f=c[0],h=i.find(p=>p.panelId===f.id);if(zt(h,"Panel metadata not found"),h.collapsible){const p=o[f.id],g=h.collapsedSize===p?r.inMemoryLastExpandedPanelSizes[f.id]??h.minSize:h.collapsedSize;al(t,g-p)}break}case"F6":{e.preventDefault();const r=yg(t).separators.map(a=>a.element),i=Array.from(r).findIndex(a=>a===e.currentTarget);zt(i!==null,"Index not found");const o=e.shiftKey?i>0?i-1:r.length-1:i+1<r.length?i+1:0;r[o].focus();break}case"Home":{e.preventDefault(),al(t,-100);break}}}function dM(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const{mountedGroups:t}=lr(),n=YC(e,t),r=new Map;let i=!1;n.forEach(o=>{o.separator&&(i||(i=!0,o.separator.element.focus()));const a=t.get(o.group);a&&r.set(o.group,a.layout)}),ur({interactionState:{hitRegions:n,initialLayoutMap:r,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:"active"}}),n.length&&e.preventDefault()}const jue=e=>e,L1=()=>{},WL=1,KL=2,XL=4,QL=8,hM=3,pM=12;let Gm;function mM(){return Gm===void 0&&(Gm=!1,typeof window<"u"&&(window.navigator.userAgent.includes("Chrome")||window.navigator.userAgent.includes("Firefox"))&&(Gm=!0)),Gm}function Lue({cursorFlags:e,groups:t,state:n}){let r=0,i=0;switch(n){case"active":case"hover":t.forEach(o=>{if(!o.disableCursor)switch(o.orientation){case"horizontal":{r++;break}case"vertical":{i++;break}}})}if(!(r===0&&i===0)){switch(n){case"active":{if(e&&mM()){const o=(e&WL)!==0,a=(e&KL)!==0,u=(e&XL)!==0,c=(e&QL)!==0;if(o)return u?"se-resize":c?"ne-resize":"e-resize";if(a)return u?"sw-resize":c?"nw-resize":"w-resize";if(u)return"s-resize";if(c)return"n-resize"}break}}return mM()?r>0&&i>0?"move":r>0?"ew-resize":"ns-resize":r>0&&i>0?"grab":r>0?"col-resize":"row-resize"}}const gM=new WeakMap;function WC(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:n}=gM.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets.push(n));const{cursorFlags:r,interactionState:i}=lr();switch(i.state){case"active":case"hover":{const o=Lue({cursorFlags:r,groups:i.hitRegions.map(u=>u.group),state:i.state}),a=`*, *:hover {cursor: ${o} !important; }`;if(t===a)return;t=a,o?n.cssRules.length===0?n.insertRule(a):n.replaceSync(a):n.cssRules.length===1&&n.deleteRule(0);break}case"inactive":{t=void 0,n.cssRules.length===1&&n.deleteRule(0);break}}gM.set(e,{prevStyle:t,styleSheet:n})}function ZL({document:e,event:t,hitRegions:n,initialLayoutMap:r,mountedGroups:i,pointerDownAtPoint:o,prevCursorFlags:a}){let u=0;const c=new Map(i);n.forEach(h=>{const{group:p,groupSize:g}=h,{disableCursor:y,orientation:b,panels:v}=p;let S=0;o?b==="horizontal"?S=(t.clientX-o.x)/g*100:S=(t.clientY-o.y)/g*100:b==="horizontal"?S=t.clientX<0?-100:100:S=t.clientY<0?-100:100;const x=r.get(p),{defaultLayoutDeferred:_,derivedPanelConstraints:R,layout:T,separatorToPanels:A}=i.get(p)??{defaultLayoutDeferred:!1};if(R&&x&&T&&A){const D=ch({delta:S,initialLayout:x,panelConstraints:R,pivotIndices:h.panels.map(O=>v.indexOf(O)),prevLayout:T,trigger:"mouse-or-touch"});if(Hl(D,T)){if(S!==0&&!y)switch(b){case"horizontal":{u|=S<0?WL:KL;break}case"vertical":{u|=S<0?XL:QL;break}}}else{c.set(h.group,{defaultLayoutDeferred:_,derivedPanelConstraints:R,layout:D,separatorToPanels:A});const O=h.group.panels.map(({id:$})=>$).join(",");h.group.inMemoryLayouts[O]=D}}});let f=0;t.movementX===0?f|=a&hM:f|=u&hM,t.movementY===0?f|=a&pM:f|=u&pM,ur({cursorFlags:f,mountedGroups:c}),WC(e)}function yM(e){const{cursorFlags:t,interactionState:n,mountedGroups:r}=lr();n.state==="active"&&ZL({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:r,prevCursorFlags:t})}function bM(e){if(e.defaultPrevented)return;const{cursorFlags:t,interactionState:n,mountedGroups:r}=lr();switch(n.state){case"active":{if(e.buttons===0){ur(i=>i.interactionState.state==="inactive"?i:{cursorFlags:0,interactionState:{state:"inactive"}}),ur(i=>({mountedGroups:new Map(i.mountedGroups)}));return}ZL({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:r,pointerDownAtPoint:n.pointerDownAtPoint,prevCursorFlags:t});break}default:{const i=YC(e,r);i.length===0?n.state!=="inactive"&&ur({interactionState:{state:"inactive"}}):ur({interactionState:{hitRegions:i,state:"hover"}}),WC(e.currentTarget);break}}}function vM(e){if(e.relatedTarget instanceof HTMLIFrameElement){const{interactionState:t}=lr();t.state==="hover"&&ur({interactionState:{state:"inactive"}})}}function xM(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const{interactionState:t}=lr();t.state==="active"&&(ur({cursorFlags:0,interactionState:{state:"inactive"}}),t.hitRegions.length>0&&(WC(e.currentTarget),ur(n=>({mountedGroups:new Map(n.mountedGroups)})),e.preventDefault()))}function wM(e){let t=0,n=0;const r={};for(const o of e)if(o.defaultSize!==void 0){t++;const a=ji(o.defaultSize);n+=a,r[o.panelId]=a}else r[o.panelId]=void 0;const i=e.length-t;if(i!==0){const o=ji((100-n)/i);for(const a of e)a.defaultSize===void 0&&(r[a.panelId]=o)}return r}function Fue(e,t,n){if(!n[0])return;const r=e.panels.find(c=>c.element===t);if(!r||!r.onResize)return;const i=Qc({group:e}),o=e.orientation==="horizontal"?r.element.offsetWidth:r.element.offsetHeight,a=r.mutableValues.prevSize,u={asPercentage:ji(o/i*100),inPixels:o};r.mutableValues.prevSize=u,r.onResize(u,r.id,a)}function zue(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Bue(e,t){const n=e.map(i=>i.id),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n)if(!r.includes(i))return!1;return!0}const Wu=new Map;function Uue(e){let t=!0;zt(e.element.ownerDocument.defaultView,"Cannot register an unmounted Group");const n=e.element.ownerDocument.defaultView.ResizeObserver,r=new Set,i=new Set,o=new n(b=>{for(const v of b){const{borderBoxSize:S,target:x}=v;if(x===e.element){if(t){if(Qc({group:e})===0)return;ur(_=>{const R=_.mountedGroups.get(e);if(R){const T=Lw(e),A=R.defaultLayoutDeferred?wM(T):R.layout,D=Gl({layout:A,panelConstraints:T});return!R.defaultLayoutDeferred&&Hl(A,D)&&zue(R.derivedPanelConstraints,T)?_:{mountedGroups:new Map(_.mountedGroups).set(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:T,layout:D,separatorToPanels:R.separatorToPanels})}}return _})}}else Fue(e,x,S)}});o.observe(e.element),e.panels.forEach(b=>{zt(!r.has(b.id),`Panel ids must be unique; id "${b.id}" was used more than once`),r.add(b.id),b.onResize&&o.observe(b.element)});const a=Qc({group:e}),u=Lw(e),c=e.panels.map(({id:b})=>b).join(",");let f=e.defaultLayout;f&&(Bue(e.panels,f)||(f=void 0));const h=e.inMemoryLayouts[c]??f??wM(u),p=Gl({layout:h,panelConstraints:u}),g=HL(e),y=e.element.ownerDocument;return ur(b=>{const v=new Map;return Wu.set(y,(Wu.get(y)??0)+1),g.forEach(S=>{S.separator&&v.set(S.separator,S.panels)}),{mountedGroups:new Map(b.mountedGroups).set(e,{defaultLayoutDeferred:a===0,derivedPanelConstraints:u,layout:p,separatorToPanels:v})}}),e.separators.forEach(b=>{zt(!i.has(b.id),`Separator ids must be unique; id "${b.id}" was used more than once`),i.add(b.id),b.element.addEventListener("keydown",fM)}),Wu.get(y)===1&&(y.addEventListener("dblclick",cM,!0),y.addEventListener("pointerdown",dM,!0),y.addEventListener("pointerleave",yM),y.addEventListener("pointermove",bM),y.addEventListener("pointerout",vM),y.addEventListener("pointerup",xM,!0)),function(){t=!1,Wu.set(y,Math.max(0,(Wu.get(y)??0)-1)),ur(b=>{const v=new Map(b.mountedGroups);return v.delete(e),{mountedGroups:v}}),e.separators.forEach(b=>{b.element.removeEventListener("keydown",fM)}),Wu.get(y)||(y.removeEventListener("dblclick",cM,!0),y.removeEventListener("pointerdown",dM,!0),y.removeEventListener("pointerleave",yM),y.removeEventListener("pointermove",bM),y.removeEventListener("pointerout",vM),y.removeEventListener("pointerup",xM,!0)),o.disconnect()}}function Hue(){const[e,t]=C.useState({}),n=C.useCallback(()=>t({}),[]);return[e,n]}function KC(e){const t=C.useId();return`${e??t}`}const nu=typeof window<"u"?C.useLayoutEffect:C.useEffect;function Ld(e){const t=C.useRef(e);return nu(()=>{t.current=e},[e]),C.useCallback((...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[t])}function XC(...e){return Ld(t=>{e.forEach(n=>{if(n)switch(typeof n){case"function":{n(t);break}case"object":{n.current=t;break}}})})}function QC(e){const t=C.useRef({...e});return nu(()=>{for(const n in e)t.current[n]=e[n]},[e]),t.current}const JL=C.createContext(null);function Gue(e,t){const n=C.useRef({getLayout:()=>({}),setLayout:jue});C.useImperativeHandle(t,()=>n.current,[]),nu(()=>{Object.assign(n.current,VL({groupId:e}))})}function eF({children:e,className:t,defaultLayout:n,disableCursor:r,disabled:i,elementRef:o,groupRef:a,id:u,onLayoutChange:c,onLayoutChanged:f,orientation:h="horizontal",resizeTargetMinimumSize:p={coarse:20,fine:10},style:g,...y}){const b=C.useRef({onLayoutChange:{},onLayoutChanged:{}}),v=Ld(I=>{Hl(b.current.onLayoutChange,I)||(b.current.onLayoutChange=I,c==null||c(I))}),S=Ld(I=>{Hl(b.current.onLayoutChanged,I)||(b.current.onLayoutChanged=I,f==null||f(I))}),x=KC(u),_=C.useRef(null),[R,T]=Hue(),A=C.useRef({lastExpandedPanelSizes:{},layouts:{},panels:[],resizeTargetMinimumSize:p,separators:[]}),D=XC(_,o);Gue(x,a);const O=Ld((I,M)=>{const{interactionState:B,mountedGroups:G}=lr();for(const L of G.keys())if(L.id===I){const F=G.get(L);if(F){let U=!1;return B.state==="active"&&(U=B.hitRegions.some(V=>V.group===L)),{flexGrow:F.layout[M]??1,pointerEvents:U?"none":void 0}}}return{flexGrow:(n==null?void 0:n[M])??1}}),$=QC({defaultLayout:n,disableCursor:r}),z=C.useMemo(()=>({get disableCursor(){return!!$.disableCursor},getPanelStyles:O,id:x,orientation:h,registerPanel:I=>{const M=A.current;return M.panels=Fw(h,[...M.panels,I]),T(),()=>{M.panels=M.panels.filter(B=>B!==I),T()}},registerSeparator:I=>{const M=A.current;return M.separators=Fw(h,[...M.separators,I]),T(),()=>{M.separators=M.separators.filter(B=>B!==I),T()}},togglePanelDisabled:(I,M)=>{const B=A.current.panels.find(L=>L.id===I);B&&(B.panelConstraints.disabled=M);const{mountedGroups:G}=lr();for(const L of G.keys())if(L.id===x){const F=G.get(L);F&&(F.derivedPanelConstraints=Lw(L))}},toggleSeparatorDisabled:(I,M)=>{const B=A.current.separators.find(G=>G.id===I);B&&(B.disabled=M)}}),[O,x,T,h,$]),j=C.useRef(null);return nu(()=>{const I=_.current;if(I===null)return;const M=A.current;let B;if($.defaultLayout!==void 0&&Object.keys($.defaultLayout).length===M.panels.length){B={};for(const W of M.panels){const N=$.defaultLayout[W.id];N!==void 0&&(B[W.id]=N)}}const G={defaultLayout:B,disableCursor:!!$.disableCursor,disabled:!!i,element:I,id:x,inMemoryLastExpandedPanelSizes:A.current.lastExpandedPanelSizes,inMemoryLayouts:A.current.layouts,orientation:h,panels:M.panels,resizeTargetMinimumSize:M.resizeTargetMinimumSize,separators:M.separators};j.current=G;const L=Uue(G),F=lr().mountedGroups.get(G);if(F){const{defaultLayoutDeferred:W,derivedPanelConstraints:N,layout:Y}=F;!W&&N.length>0&&(v(Y),S(Y))}const U=Zo.addListener("interactionStateChange",W=>{W.state}),V=Zo.addListener("mountedGroupsChange",W=>{const N=W.get(G);if(N){const{defaultLayoutDeferred:Y,derivedPanelConstraints:J,layout:H}=N;if(Y||J.length===0)return;const{interactionState:ie}=lr(),re=ie.state!=="active";v(H),re&&S(H)}});return()=>{j.current=null,L(),U(),V()}},[i,x,S,v,h,R,$]),C.useEffect(()=>{const I=j.current;I&&(I.defaultLayout=n,I.disableCursor=!!r)}),E.jsx(JL.Provider,{value:z,children:E.jsx("div",{...y,className:t,"data-group":!0,"data-testid":x,id:x,ref:D,style:{height:"100%",width:"100%",overflow:"hidden",...g,display:"flex",flexDirection:h==="horizontal"?"row":"column",flexWrap:"nowrap",touchAction:h==="horizontal"?"pan-y":"pan-x"},children:e})})}eF.displayName="Group";function ZC(){const e=C.useContext(JL);return zt(e,"Group Context not found; did you render a Panel or Separator outside of a Group?"),e}function que(e,t){const{id:n}=ZC(),r=C.useRef({collapse:L1,expand:L1,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:L1});C.useImperativeHandle(t,()=>r.current,[]),nu(()=>{Object.assign(r.current,qL({groupId:n,panelId:e}))})}function tF({children:e,className:t,collapsedSize:n="0%",collapsible:r=!1,defaultSize:i,disabled:o,elementRef:a,id:u,maxSize:c="100%",minSize:f="0%",onResize:h,panelRef:p,style:g,...y}){const b=!!u,v=KC(u),S=QC({disabled:o}),x=C.useRef(null),_=XC(x,a),{getPanelStyles:R,id:T,orientation:A,registerPanel:D,togglePanelDisabled:O}=ZC(),$=h!==null,z=Ld((I,M,B)=>{h==null||h(I,u,B)});nu(()=>{const I=x.current;if(I!==null){const M={element:I,id:v,idIsStable:b,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:$?z:void 0,panelConstraints:{collapsedSize:n,collapsible:r,defaultSize:i,disabled:S.disabled,maxSize:c,minSize:f}};return D(M)}},[n,r,i,$,v,b,c,f,z,D,S]),C.useEffect(()=>{O(v,!!o)},[o,v,O]),que(v,p);const j=C.useSyncExternalStore(I=>(Zo.addListener("mountedGroupsChange",I),()=>{Zo.removeListener("mountedGroupsChange",I)}),()=>JSON.stringify(R(T,v)),()=>JSON.stringify(R(T,v)));return E.jsx("div",{...y,"aria-disabled":o||void 0,"data-panel":!0,"data-testid":v,id:v,ref:_,style:{...Vue,display:"flex",flexBasis:0,flexShrink:1,overflow:"hidden",...JSON.parse(j)},children:E.jsx("div",{className:t,style:{maxHeight:"100%",maxWidth:"100%",flexGrow:1,...g,touchAction:A==="horizontal"?"pan-y":"pan-x"},children:e})})}tF.displayName="Panel";const Vue={minHeight:0,maxHeight:"100%",height:"auto",minWidth:0,maxWidth:"100%",width:"auto",border:"none",borderWidth:0,padding:0,margin:0};function Yue({layout:e,panelConstraints:t,panelId:n,panelIndex:r}){let i,o;const a=e[n],u=t.find(c=>c.panelId===n);if(u){const c=u.maxSize,f=u.collapsible?u.collapsedSize:u.minSize,h=[r,r+1];o=Gl({layout:ch({delta:f-a,initialLayout:e,panelConstraints:t,pivotIndices:h,prevLayout:e}),panelConstraints:t})[n],i=Gl({layout:ch({delta:c-a,initialLayout:e,panelConstraints:t,pivotIndices:h,prevLayout:e}),panelConstraints:t})[n]}return{valueControls:n,valueMax:i,valueMin:o,valueNow:a}}function nF({children:e,className:t,disabled:n,elementRef:r,id:i,style:o,...a}){const u=KC(i),c=QC({disabled:n}),[f,h]=C.useState({}),[p,g]=C.useState("inactive"),y=C.useRef(null),b=XC(y,r),{disableCursor:v,id:S,orientation:x,registerSeparator:_,toggleSeparatorDisabled:R}=ZC(),T=x==="horizontal"?"vertical":"horizontal";nu(()=>{const D=y.current;if(D!==null){const O={disabled:c.disabled,element:D,id:u},$=_(O),z=Zo.addListener("interactionStateChange",I=>{g(I.state!=="inactive"&&I.hitRegions.some(M=>M.separator===O)?I.state:"inactive")}),j=Zo.addListener("mountedGroupsChange",I=>{I.forEach(({derivedPanelConstraints:M,layout:B,separatorToPanels:G},L)=>{if(L.id===S){const F=G.get(O);if(F){const U=F[0],V=L.panels.indexOf(U);h(Yue({layout:B,panelConstraints:M,panelId:U.id,panelIndex:V}))}}})});return()=>{z(),j(),$()}}},[S,u,_,c]),C.useEffect(()=>{R(u,!!n)},[n,u,R]);let A;return n&&!v&&(A="not-allowed"),E.jsx("div",{...a,"aria-controls":f.valueControls,"aria-disabled":n||void 0,"aria-orientation":T,"aria-valuemax":f.valueMax,"aria-valuemin":f.valueMin,"aria-valuenow":f.valueNow,children:e,className:t,"data-separator":n?"disabled":p,"data-testid":u,id:u,ref:b,role:"separator",style:{flexBasis:"auto",cursor:A,...o,flexGrow:0,flexShrink:0,touchAction:"none"},tabIndex:n?void 0:0})}nF.displayName="Separator";const Wue="_resizable_wu6fv_1",fy={resizable:Wue,"resizable-panel":"_resizable-panel_wu6fv_15","resizable-handle":"_resizable-handle_wu6fv_19 _disabled_dkczp_2","resizable-handle-grip":"_resizable-handle-grip_wu6fv_45"},rF=({direction:e,className:t,children:n,...r})=>E.jsx(eF,{"data-slot":"resizable","data-direction":e,orientation:e,className:ze(fy.resizable,t),...r,children:n});rF.displayName="Resizable";const iF=({withHandle:e,className:t,children:n,disabled:r,...i})=>E.jsx(nF,{"data-slot":"resizable-handle","data-disabled":r?"":void 0,className:ze(fy["resizable-handle"],t),...i,children:n??(e!==!1&&E.jsx("div",{className:fy["resizable-handle-grip"],children:E.jsx(DG,{size:10})}))});iF.displayName="ResizableHandle";const zw=({className:e,children:t,...n})=>E.jsx(tF,{"data-slot":"resizable-panel",className:ze(fy["resizable-panel"],e),...n,children:t});zw.displayName="ResizablePanel";const oF=({children:e,...t})=>E.jsx(Ko,{render:E.jsx("nav",{}),"aria-label":"breadcrumbs","data-slot":"breadcrumbs",...t,children:e});oF.displayName="BreadcrumbsContainer";const Kue={"breadcrumbs-list":"_breadcrumbs-list_j5s62_1"},sF=({className:e,...t})=>E.jsx("ol",{"data-slot":"breadcrumbs-list",className:ze(Kue["breadcrumbs-list"],e),...t});sF.displayName="BreadcrumbsList";const Xue={"breadcrumbs-item":"_breadcrumbs-item_fl4mk_1"},aF=({className:e,...t})=>E.jsx("li",{"data-slot":"breadcrumbs-item",className:ze(Xue["breadcrumbs-item"],e),...t});aF.displayName="BreadcrumbsItem";const lF=({children:e,...t})=>E.jsx("li",{"data-slot":"breadcrumbs-separator",role:"presentation","aria-hidden":"true",...t,children:e??E.jsx(X3,{size:16})});lF.displayName="BreadcrumbsSeparator";const JC=({items:e,linkAs:t="a",...n})=>E.jsx(oF,{"data-slot":"breadcrumbs",...n,children:E.jsx(sF,{children:e.map((r,i)=>{const o=i===e.length-1,a=r.icon,u=E.jsxs(cr,{condition:!!a,render:E.jsx(Xe,{gap:2,ay:"center"}),children:[a&&E.jsx(a,{size:14}),r.label]});return E.jsxs(C.Fragment,{children:[E.jsx(aF,{children:o?u:E.jsx(t,{href:r.value,children:u})}),!o&&E.jsx(lF,{})]},r.value)})})});JC.displayName="Breadcrumbs";const gf={"table-cell":"_table-cell_1oqmd_3","table-container":"_table-container_1oqmd_12","table-head":"_table-head_1oqmd_18","table-header":"_table-header_1oqmd_29","table-root":"_table-root_1oqmd_34","table-row":"_table-row_1oqmd_43"},eE=({children:e,className:t,...n})=>E.jsx("div",{"data-slot":"table-container",className:ze(gf["table-container"],t),...n,children:e});eE.displayName="TableContainer";const tE=({striped:e,bordered:t,className:n,children:r,...i})=>E.jsx("table",{"data-slot":"table-root","data-striped":e,"data-bordered":t,className:ze(gf["table-root"],n),...i,children:r});tE.displayName="TableRoot";const uF=({className:e,...t})=>E.jsx("thead",{"data-slot":"table-header",className:ze(gf["table-header"],e),...t});uF.displayName="TableHeader";const nE=({className:e,render:t=E.jsx("tr",{}),...n})=>E.jsx(Ko,{"data-slot":"table-row",className:ze(gf["table-row"],e),render:t,...n});nE.displayName="TableRow";const fh=({className:e,collapse:t,...n})=>E.jsx("td",{"data-slot":"table-cell","data-collapse":t,className:ze(gf["table-cell"],e),...n});fh.displayName="TableCell";const cF=({className:e,collapse:t,...n})=>E.jsx("th",{"data-slot":"table-head","data-collapse":t,className:ze(gf["table-head"],e),...n});cF.displayName="TableHead";const rE=({...e})=>E.jsx("tbody",{"data-slot":"table-body",...e});rE.displayName="TableBody";const fF=({icon:e,tooltip:t="More options",items:n})=>E.jsx(NL,{align:"end",trigger:E.jsx(Ci,{tooltip:t,"aria-label":t,size:"small",variant:"ghost",shape:"square",children:e?E.jsx(e,{}):E.jsx(Z3,{size:14})}),items:n});fF.displayName="TableCellDropdown";function Que({wrapper:e,onClick:t,item:n,...r}){const i=E.jsx(Ci,{tooltip:r.tooltip,size:"small",variant:"ghost",shape:"square",onClick:t?()=>t(n):void 0,children:r.icon?E.jsx(r.icon,{}):E.jsx(Z3,{size:14})},r.tooltip);return e?e(i,n):i}function dF({actions:e,item:t}){var n;return E.jsx(fh,{collapse:!0,children:E.jsxs(Xe,{ax:"end",children:[(n=e.primary)==null?void 0:n.map(r=>E.jsx(Que,{item:t,...r},r.tooltip)),e.secondary&&E.jsx(fF,{...e.secondary})]})})}dF.displayName="TableCellActions";const Zue="bertrand:apiBase";function Jue(){if(typeof window<"u")try{const e=window.localStorage.getItem(Zue);if(e)return e.replace(/\/$/,"")}catch{}return""}function sb(e){return`${Jue()}${e}`}async function ru(e){const t=await fetch(sb(e));if(!t.ok)throw new Error(`${t.status} ${t.statusText}`);return t.json()}class hF extends Error{constructor(n,r){super(n);te(this,"reason");this.name="ArchiveError",this.reason=r}}async function pF(e,t){const n=await fetch(sb(`/api/sessions/${e}/${t}`),{method:"POST"});if(!n.ok){const r=await n.json().catch(()=>({}));throw new hF(r.error??n.statusText,r.reason??"unknown")}return n.json()}const SM=e=>pF(e,"archive"),CM=e=>pF(e,"unarchive"),dh=(e={})=>({queryKey:["sessions",{includeArchived:!!e.includeArchived}],queryFn:()=>ru(e.includeArchived?"/api/sessions?excludeArchived=false":"/api/sessions"),refetchInterval:2e3,placeholderData:Sh}),ece=(e,t=!1)=>({queryKey:["events",e],queryFn:()=>ru(`/api/events/${e}`),enabled:!!e,refetchInterval:t?1e3:!1,placeholderData:Sh}),tce=(e,t=!1)=>({queryKey:["stats",e],queryFn:()=>ru(`/api/stats/${e}`),enabled:!!e,refetchInterval:t?2e3:!1,placeholderData:Sh}),nce=(e=!1)=>({queryKey:["stats"],queryFn:()=>ru("/api/stats"),refetchInterval:e?2e3:!1,placeholderData:Sh}),rce=(e,t=!1)=>({queryKey:["engagement",e],queryFn:()=>ru(`/api/engagement/${e}`),enabled:!!e,refetchInterval:t?2e3:!1,placeholderData:Sh}),ice={queryKey:["recaps"],queryFn:()=>ru("/api/recaps")},mF={queryKey:["projects"],queryFn:()=>ru("/api/projects"),refetchInterval:5e3};async function oce(e){const t=await fetch(sb("/api/active-project"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({slug:e})});if(!t.ok){const n=await t.json().catch(()=>({}));throw new Error(n.error??`${t.status} ${t.statusText}`)}}const sce={"not-found":"Session not found",active:"End the session before archiving","already-archived":"Session is already archived","not-archived":"Session is not archived",unknown:"Something went wrong"};function F1(e){return e instanceof hF?sce[e.reason]??e.message:e instanceof Error?e.message:"Something went wrong"}function gF(e){const t=yy(),n=J$(),r=()=>t.invalidateQueries({queryKey:["sessions"]}),i=f=>(f==="archive"?SM:CM)(e.id).then(r).catch(p=>{n.add({description:`Undo failed: ${F1(p)}`,priority:"high"})}),o=(f,h)=>{let p;const g=()=>{p&&n.close(p),i(h)};p=n.add({priority:"low",description:E.jsxs(Xe,{ay:"center",gap:3,ax:"space-between",fullwidth:!0,children:[E.jsxs(je,{children:[f," ",E.jsx("code",{children:e.slug})]}),E.jsx(Ci,{size:"small",onClick:g,children:"Undo"})]})})},a=L_({mutationFn:()=>SM(e.id),onSuccess:()=>{r(),o("Archived","unarchive")},onError:f=>n.add({description:`Could not archive ${e.slug}: ${F1(f)}`,priority:"high"})}),u=L_({mutationFn:()=>CM(e.id),onSuccess:()=>{r(),o("Unarchived","archive")},onError:f=>n.add({description:`Could not unarchive ${e.slug}: ${F1(f)}`,priority:"high"})});if(e.status==="archived")return{kind:"unarchive",label:"Unarchive",tooltip:"Unarchive (returns to paused)",Icon:WH,disabled:!1,loading:u.isPending,onClick:()=>u.mutate()};const c=e.status==="active"||e.status==="waiting";return{kind:"archive",label:"Archive",tooltip:c?"End the session before archiving":"Archive this session",Icon:XH,disabled:c,loading:a.isPending,onClick:()=>a.mutate()}}const ace={"session.started":{category:"lifecycle",color:"blue",label:"session started"},"session.resumed":{category:"lifecycle",color:"blue",label:"session resumed"},"session.end":{category:"lifecycle",color:"neutral",label:"session ended"},"claude.started":{category:"lifecycle",color:"blue",label:"session started"},"claude.ended":{category:"lifecycle",color:"blue",label:"ended"},"claude.discarded":{category:"lifecycle",color:"neutral",label:"discarded"},"session.waiting":{category:"interaction",color:"green",label:"waiting"},"session.answered":{category:"interaction",color:"green",label:"Q&A"},"permission.request":{category:"work",color:"orange",label:"permission"},"permission.resolve":{category:"work",color:"orange",label:"approved"},"worktree.entered":{category:"lifecycle",color:"indigo",label:"worktree"},"worktree.exited":{category:"lifecycle",color:"indigo",label:"worktree exited"},"gh.pr.created":{category:"milestone",color:"purple",label:"pull request"},"gh.pr.merged":{category:"milestone",color:"purple",label:"merged"},"linear.issue.read":{category:"integration",color:"purple",label:"Linear"},"notion.page.read":{category:"integration",color:"purple",label:"Notion"},"vercel.deploy":{category:"milestone",color:"purple",label:"deploy"},"user.prompt":{category:"interaction",color:"green",label:"prompt"},"context.snapshot":{category:"context",color:"neutral",label:"context"},"session.recap":{category:"lifecycle",color:"blue",label:"session recap"},"tool.work":{category:"work",color:"yellow",label:"tool work"},"tool.applied":{category:"work",color:"yellow",label:"applied"},"tool.used":{category:"work",color:"yellow",label:"tool"},"assistant.message":{category:"assistant",color:"indigo",label:"assistant"},"assistant.recap":{category:"assistant",color:"indigo",label:"thinking recap"}},lce={category:"lifecycle",color:"neutral",label:"unknown"};function iE(e){return ace[e]??lce}function uce(e){return iE(e).category}function cce(e){return iE(e).color}function fce(e){return iE(e).label}const dce={active:"green",waiting:"yellow",paused:"neutral",archived:"neutral"};function oE(e){return dce[e]}function z1(e){if(e<1)return"0s";const t=Math.floor(e/86400),n=Math.floor(e%86400/3600),r=Math.floor(e%3600/60),i=Math.floor(e%60);return t>0?`${t}d ${n}h`:n>0?`${n}h ${r}m`:r>0?`${r}m ${i}s`:`${i}s`}function ab(e){if(e)return e.replace(/^claude-/,"").replace(/-\d{8}$/,"")}function Jo(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function to(e){const t=parseInt(e??"0",10);return Number.isFinite(t)?t:0}function yF(e){return e<=25?"red":e<=50?"yellow":"green"}function Bw(e){const t=(Date.now()-new Date(e).getTime())/1e3;return t<60?"just now":t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:t<604800?`${Math.floor(t/86400)}d ago`:new Date(e).toLocaleDateString()}const hce=cce,pce=fce;function qm(e){return e?e.split(`
490
+ `).length:0}function mce(e){return e.split("/").filter(Boolean).pop()??e}function gce(e){const t=e.permissions;if(!t||t.length===0)return null;const n=new Set;let r=0,i=0,o=0;for(const u of t)if(u.detail&&n.add(u.detail),u.edits&&u.edits.length>0){r+=u.edits.length;for(const c of u.edits)o+=qm(c.oldStr),i+=qm(c.newStr)}else(u.oldStr||u.newStr)&&(r+=1,o+=qm(u.oldStr),i+=qm(u.newStr));if(n.size===0)return null;const a=i||o?` (+${i} -${o})`:"";if(n.size===1){const u=n.values().next().value,c=mce(u);return r>1?`${r} edits to ${c}${a}`:`edited ${c}${a}`}return`edited ${n.size} files${a}`}function yce(e){const t=pce(e.event),n=e.meta;if(!n)return t;switch(e.event){case"session.answered":return n.question??t;case"tool.work":return e.summary??t;case"tool.applied":return gce(n)??t;case"context.snapshot":{const r=n.remaining_pct;return r?`${r}% remaining`:t}case"claude.started":{const r=n.category_path,i=n.session_name,o=[r,i].filter(Boolean).join("/");return o?`created ${o}`:t}default:return t}}function bce(e){return new Date(e).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",second:"2-digit"})}const vce=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,xce=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,wce={};function EM(e,t){return(wce.jsx?xce:vce).test(e)}var Ku={},B1,kM;function Sce(){if(kM)return B1;kM=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,u=/^\s+|\s+$/g,c=`
491
+ `,f="/",h="*",p="",g="comment",y="declaration";function b(S,x){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];x=x||{};var _=1,R=1;function T(G){var L=G.match(t);L&&(_+=L.length);var F=G.lastIndexOf(c);R=~F?G.length-F:R+G.length}function A(){var G={line:_,column:R};return function(L){return L.position=new D(G),z(),L}}function D(G){this.start=G,this.end={line:_,column:R},this.source=x.source}D.prototype.content=S;function O(G){var L=new Error(x.source+":"+_+":"+R+": "+G);if(L.reason=G,L.filename=x.source,L.line=_,L.column=R,L.source=S,!x.silent)throw L}function $(G){var L=G.exec(S);if(L){var F=L[0];return T(F),S=S.slice(F.length),L}}function z(){$(n)}function j(G){var L;for(G=G||[];L=I();)L!==!1&&G.push(L);return G}function I(){var G=A();if(!(f!=S.charAt(0)||h!=S.charAt(1))){for(var L=2;p!=S.charAt(L)&&(h!=S.charAt(L)||f!=S.charAt(L+1));)++L;if(L+=2,p===S.charAt(L-1))return O("End of comment missing");var F=S.slice(2,L-2);return R+=2,T(F),S=S.slice(L),R+=2,G({type:g,comment:F})}}function M(){var G=A(),L=$(r);if(L){if(I(),!$(i))return O("property missing ':'");var F=$(o),U=G({type:y,property:v(L[0].replace(e,p)),value:F?v(F[0].replace(e,p)):p});return $(a),U}}function B(){var G=[];j(G);for(var L;L=M();)L!==!1&&(G.push(L),j(G));return G}return z(),B()}function v(S){return S?S.replace(u,p):p}return B1=b,B1}var RM;function Cce(){if(RM)return Ku;RM=1;var e=Ku&&Ku.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ku,"__esModule",{value:!0}),Ku.default=n;const t=e(Sce());function n(r,i){let o=null;if(!r||typeof r!="string")return o;const a=(0,t.default)(r),u=typeof i=="function";return a.forEach(c=>{if(c.type!=="declaration")return;const{property:f,value:h}=c;u?i(f,h,c):h&&(o=o||{},o[f]=h)}),o}return Ku}var xd={},_M;function Ece(){if(_M)return xd;_M=1,Object.defineProperty(xd,"__esModule",{value:!0}),xd.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(f){return!f||n.test(f)||e.test(f)},a=function(f,h){return h.toUpperCase()},u=function(f,h){return"".concat(h,"-")},c=function(f,h){return h===void 0&&(h={}),o(f)?f:(f=f.toLowerCase(),h.reactCompat?f=f.replace(i,u):f=f.replace(r,u),f.replace(t,a))};return xd.camelCase=c,xd}var wd,TM;function kce(){if(TM)return wd;TM=1;var e=wd&&wd.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(Cce()),n=Ece();function r(i,o){var a={};return!i||typeof i!="string"||(0,t.default)(i,function(u,c){u&&c&&(a[(0,n.camelCase)(u,o)]=c)}),a}return r.default=r,wd=r,wd}var Rce=kce();const _ce=Jw(Rce),bF=vF("end"),sE=vF("start");function vF(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Tce(e){const t=sE(e),n=bF(e);if(t&&n)return{start:t,end:n}}function Fd(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?AM(e.position):"start"in e||"end"in e?AM(e):"line"in e||"column"in e?Uw(e):""}function Uw(e){return DM(e&&e.line)+":"+DM(e&&e.column)}function AM(e){return Uw(e&&e.start)+"-"+Uw(e&&e.end)}function DM(e){return e&&typeof e=="number"?e:1}class er extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},a=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(a=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?o.ruleId=r:(o.source=r.slice(0,c),o.ruleId=r.slice(c+1))}if(!o.place&&o.ancestors&&o.ancestors){const c=o.ancestors[o.ancestors.length-1];c&&(o.place=c.position)}const u=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=u?u.line:void 0,this.name=Fd(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}er.prototype.file="";er.prototype.name="";er.prototype.reason="";er.prototype.message="";er.prototype.stack="";er.prototype.column=void 0;er.prototype.line=void 0;er.prototype.ancestors=void 0;er.prototype.cause=void 0;er.prototype.fatal=void 0;er.prototype.place=void 0;er.prototype.ruleId=void 0;er.prototype.source=void 0;const aE={}.hasOwnProperty,Ace=new Map,Dce=/[A-Z]/g,Mce=new Set(["table","tbody","thead","tfoot","tr"]),Oce=new Set(["td","th"]),xF="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function $ce(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Bce(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=zce(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Ih:hN,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=wF(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function wF(e,t,n){if(t.type==="element")return Pce(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Nce(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return jce(e,t,n);if(t.type==="mdxjsEsm")return Ice(e,t);if(t.type==="root")return Lce(e,t,n);if(t.type==="text")return Fce(e,t)}function Pce(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Ih,e.schema=i),e.ancestors.push(t);const o=CF(e,t.tagName,!1),a=Uce(e,t);let u=uE(e,t);return Mce.has(t.tagName)&&(u=u.filter(function(c){return typeof c=="string"?!$y(c):!0})),SF(e,a,o,t),lE(a,u),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function Nce(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}hh(e,t.position)}function Ice(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);hh(e,t.position)}function jce(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Ih,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:CF(e,t.name,!0),a=Hce(e,t),u=uE(e,t);return SF(e,a,o,t),lE(a,u),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function Lce(e,t,n){const r={};return lE(r,uE(e,t)),e.create(t,e.Fragment,r,n)}function Fce(e,t){return t.value}function SF(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function lE(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function zce(e,t,n){return r;function r(i,o,a,u){const f=Array.isArray(a.children)?n:t;return u?f(o,a,u):f(o,a)}}function Bce(e,t){return n;function n(r,i,o,a){const u=Array.isArray(o.children),c=sE(r);return t(i,o,a,u,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function Uce(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&aE.call(t.properties,i)){const o=Gce(e,i,t.properties[i]);if(o){const[a,u]=o;e.tableCellAlignToStyle&&a==="align"&&typeof u=="string"&&Oce.has(t.tagName)?r=u:n[a]=u}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Hce(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const a=o.expression;a.type;const u=a.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else hh(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,o=e.evaluater.evaluateExpression(u.expression)}else hh(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function uE(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Ace;for(;++r<t.children.length;){const o=t.children[r];let a;if(e.passKeys){const c=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(c){const f=i.get(c)||0;a=c+"-"+f,i.set(c,f+1)}}const u=wF(e,o,a);u!==void 0&&n.push(u)}return n}function Gce(e,t,n){const r=dN(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?mN(n):gN(n)),r.property==="style"){let i=typeof n=="object"?n:qce(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Vce(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?$Z[r.property]||r.property:r.attribute,n]}}function qce(e,t){try{return _ce(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new er("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=xF+"#cannot-parse-style-attribute",i}}function CF(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,a;for(;++o<i.length;){const u=EM(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};a=a?{type:"MemberExpression",object:a,property:u,computed:!!(o&&u.type==="Literal"),optional:!1}:u}r=a}else r=EM(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return aE.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);hh(e)}function hh(e,t){const n=new er("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=xF+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Vce(e){const t={};let n;for(n in e)aE.call(e,n)&&(t[Yce(n)]=e[n]);return t}function Yce(e){let t=e.replace(Dce,Wce);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Wce(e){return"-"+e.toLowerCase()}const U1={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Kce={};function cE(e,t){const n=Kce,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return EF(e,r,i)}function EF(e,t,n){if(Xce(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return MM(e.children,t,n)}return Array.isArray(e)?MM(e,t,n):""}function MM(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=EF(e[i],t,n);return r.join("")}function Xce(e){return!!(e&&typeof e=="object")}const OM=document.createElement("i");function fE(e){const t="&"+e+";";OM.innerHTML=t;const n=OM.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Wr(e,t,n,r){const i=e.length;let o=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);o<r.length;)a=r.slice(o,o+1e4),a.unshift(t,0),e.splice(...a),o+=1e4,t+=1e4}function gi(e,t){return e.length>0?(Wr(e,e.length,0,t),e):t}const $M={}.hasOwnProperty;function kF(e){const t={};let n=-1;for(;++n<e.length;)Qce(t,e[n]);return t}function Qce(e,t){let n;for(n in t){const i=($M.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let a;if(o)for(a in o){$M.call(i,a)||(i[a]=[]);const u=o[a];Zce(i[a],Array.isArray(u)?u:u?[u]:[])}}}function Zce(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Wr(e,0,0,r)}function RF(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Fi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const sr=$a(/[A-Za-z]/),Qn=$a(/[\dA-Za-z]/),Jce=$a(/[#-'*+\--9=?A-Z^-~]/);function dy(e){return e!==null&&(e<32||e===127)}const Hw=$a(/\d/),efe=$a(/[\dA-Fa-f]/),tfe=$a(/[!-/:-@[-`{-~]/);function Je(e){return e!==null&&e<-2}function Wt(e){return e!==null&&(e<0||e===32)}function wt(e){return e===-2||e===-1||e===32}const lb=$a(new RegExp("\\p{P}|\\p{S}","u")),ql=$a(/\s/);function $a(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function yf(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let a="";if(o===37&&Qn(e.charCodeAt(n+1))&&Qn(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){const u=e.charCodeAt(n+1);o<56320&&u>56319&&u<57344?(a=String.fromCharCode(o,u),i=1):a="�"}else a=String.fromCharCode(o);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function _t(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(c){return wt(c)?(e.enter(n),u(c)):t(c)}function u(c){return wt(c)&&o++<i?(e.consume(c),u):(e.exit(n),t(c))}}const nfe={tokenize:rfe};function rfe(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),_t(e,t,"linePrefix")}function i(u){return e.enter("paragraph"),o(u)}function o(u){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,a(u)}function a(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return Je(u)?(e.consume(u),e.exit("chunkText"),o):(e.consume(u),a)}}const ife={tokenize:ofe},PM={tokenize:sfe};function ofe(e){const t=this,n=[];let r=0,i,o,a;return u;function u(R){if(r<n.length){const T=n[r];return t.containerState=T[1],e.attempt(T[0].continuation,c,f)(R)}return f(R)}function c(R){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&_();const T=t.events.length;let A=T,D;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){D=t.events[A][1].end;break}x(r);let O=T;for(;O<t.events.length;)t.events[O][1].end={...D},O++;return Wr(t.events,A+1,0,t.events.slice(T)),t.events.length=O,f(R)}return u(R)}function f(R){if(r===n.length){if(!i)return g(R);if(i.currentConstruct&&i.currentConstruct.concrete)return b(R);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(PM,h,p)(R)}function h(R){return i&&_(),x(r),g(R)}function p(R){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,b(R)}function g(R){return t.containerState={},e.attempt(PM,y,b)(R)}function y(R){return r++,n.push([t.currentConstruct,t.containerState]),g(R)}function b(R){if(R===null){i&&_(),x(0),e.consume(R);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),v(R)}function v(R){if(R===null){S(e.exit("chunkFlow"),!0),x(0),e.consume(R);return}return Je(R)?(e.consume(R),S(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(R),v)}function S(R,T){const A=t.sliceStream(R);if(T&&A.push(null),R.previous=o,o&&(o.next=R),o=R,i.defineSkip(R.start),i.write(A),t.parser.lazy[R.start.line]){let D=i.events.length;for(;D--;)if(i.events[D][1].start.offset<a&&(!i.events[D][1].end||i.events[D][1].end.offset>a))return;const O=t.events.length;let $=O,z,j;for(;$--;)if(t.events[$][0]==="exit"&&t.events[$][1].type==="chunkFlow"){if(z){j=t.events[$][1].end;break}z=!0}for(x(r),D=O;D<t.events.length;)t.events[D][1].end={...j},D++;Wr(t.events,$+1,0,t.events.slice(O)),t.events.length=D}}function x(R){let T=n.length;for(;T-- >R;){const A=n[T];t.containerState=A[1],A[0].exit.call(t,e)}n.length=R}function _(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function sfe(e,t,n){return _t(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Zc(e){if(e===null||Wt(e)||ql(e))return 1;if(lb(e))return 2}function ub(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Gw={name:"attention",resolveAll:afe,tokenize:lfe};function afe(e,t){let n=-1,r,i,o,a,u,c,f,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const p={...e[r][1].end},g={...e[n][1].start};NM(p,-c),NM(g,c),a={type:c>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},u={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:g},o={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?"strong":"emphasis",start:{...a.start},end:{...u.end}},e[r][1].end={...a.start},e[n][1].start={...u.end},f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=gi(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=gi(f,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",o,t]]),f=gi(f,ub(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=gi(f,[["exit",o,t],["enter",u,t],["exit",u,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,f=gi(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Wr(e,r-1,n-r+3,f),n=r+f.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function lfe(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Zc(r);let o;return a;function a(c){return o=c,e.enter("attentionSequence"),u(c)}function u(c){if(c===o)return e.consume(c),u;const f=e.exit("attentionSequence"),h=Zc(c),p=!h||h===2&&i||n.includes(c),g=!i||i===2&&h||n.includes(r);return f._open=!!(o===42?p:p&&(i||!g)),f._close=!!(o===42?g:g&&(h||!p)),t(c)}}function NM(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const ufe={name:"autolink",tokenize:cfe};function cfe(e,t,n){let r=0;return i;function i(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(y){return sr(y)?(e.consume(y),a):y===64?n(y):f(y)}function a(y){return y===43||y===45||y===46||Qn(y)?(r=1,u(y)):f(y)}function u(y){return y===58?(e.consume(y),r=0,c):(y===43||y===45||y===46||Qn(y))&&r++<32?(e.consume(y),u):(r=0,f(y))}function c(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||dy(y)?n(y):(e.consume(y),c)}function f(y){return y===64?(e.consume(y),h):Jce(y)?(e.consume(y),f):n(y)}function h(y){return Qn(y)?p(y):n(y)}function p(y){return y===46?(e.consume(y),r=0,h):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):g(y)}function g(y){if((y===45||Qn(y))&&r++<63){const b=y===45?g:p;return e.consume(y),b}return n(y)}}const qh={partial:!0,tokenize:ffe};function ffe(e,t,n){return r;function r(o){return wt(o)?_t(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||Je(o)?t(o):n(o)}}const _F={continuation:{tokenize:hfe},exit:pfe,name:"blockQuote",tokenize:dfe};function dfe(e,t,n){const r=this;return i;function i(a){if(a===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),o}return n(a)}function o(a){return wt(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function hfe(e,t,n){const r=this;return i;function i(a){return wt(a)?_t(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return e.attempt(_F,t,n)(a)}}function pfe(e){e.exit("blockQuote")}const TF={name:"characterEscape",tokenize:mfe};function mfe(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return tfe(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const AF={name:"characterReference",tokenize:gfe};function gfe(e,t,n){const r=this;let i=0,o,a;return u;function u(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),c}function c(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),o=31,a=Qn,h(p))}function f(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=efe,h):(e.enter("characterReferenceValue"),o=7,a=Hw,h(p))}function h(p){if(p===59&&i){const g=e.exit("characterReferenceValue");return a===Qn&&!fE(r.sliceSerialize(g))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(p)&&i++<o?(e.consume(p),h):n(p)}}const IM={partial:!0,tokenize:bfe},jM={concrete:!0,name:"codeFenced",tokenize:yfe};function yfe(e,t,n){const r=this,i={partial:!0,tokenize:A};let o=0,a=0,u;return c;function c(D){return f(D)}function f(D){const O=r.events[r.events.length-1];return o=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,u=D,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(D)}function h(D){return D===u?(a++,e.consume(D),h):a<3?n(D):(e.exit("codeFencedFenceSequence"),wt(D)?_t(e,p,"whitespace")(D):p(D))}function p(D){return D===null||Je(D)?(e.exit("codeFencedFence"),r.interrupt?t(D):e.check(IM,v,T)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),g(D))}function g(D){return D===null||Je(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(D)):wt(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),_t(e,y,"whitespace")(D)):D===96&&D===u?n(D):(e.consume(D),g)}function y(D){return D===null||Je(D)?p(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(D))}function b(D){return D===null||Je(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(D)):D===96&&D===u?n(D):(e.consume(D),b)}function v(D){return e.attempt(i,T,S)(D)}function S(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),x}function x(D){return o>0&&wt(D)?_t(e,_,"linePrefix",o+1)(D):_(D)}function _(D){return D===null||Je(D)?e.check(IM,v,T)(D):(e.enter("codeFlowValue"),R(D))}function R(D){return D===null||Je(D)?(e.exit("codeFlowValue"),_(D)):(e.consume(D),R)}function T(D){return e.exit("codeFenced"),t(D)}function A(D,O,$){let z=0;return j;function j(L){return D.enter("lineEnding"),D.consume(L),D.exit("lineEnding"),I}function I(L){return D.enter("codeFencedFence"),wt(L)?_t(D,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):M(L)}function M(L){return L===u?(D.enter("codeFencedFenceSequence"),B(L)):$(L)}function B(L){return L===u?(z++,D.consume(L),B):z>=a?(D.exit("codeFencedFenceSequence"),wt(L)?_t(D,G,"whitespace")(L):G(L)):$(L)}function G(L){return L===null||Je(L)?(D.exit("codeFencedFence"),O(L)):$(L)}}}function bfe(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const H1={name:"codeIndented",tokenize:xfe},vfe={partial:!0,tokenize:wfe};function xfe(e,t,n){const r=this;return i;function i(f){return e.enter("codeIndented"),_t(e,o,"linePrefix",5)(f)}function o(f){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?a(f):n(f)}function a(f){return f===null?c(f):Je(f)?e.attempt(vfe,a,c)(f):(e.enter("codeFlowValue"),u(f))}function u(f){return f===null||Je(f)?(e.exit("codeFlowValue"),a(f)):(e.consume(f),u)}function c(f){return e.exit("codeIndented"),t(f)}}function wfe(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):Je(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):_t(e,o,"linePrefix",5)(a)}function o(a){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(a):Je(a)?i(a):n(a)}}const Sfe={name:"codeText",previous:Efe,resolve:Cfe,tokenize:kfe};function Cfe(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Efe(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function kfe(e,t,n){let r=0,i,o;return a;function a(p){return e.enter("codeText"),e.enter("codeTextSequence"),u(p)}function u(p){return p===96?(e.consume(p),r++,u):(e.exit("codeTextSequence"),c(p))}function c(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),c):p===96?(o=e.enter("codeTextSequence"),i=0,h(p)):Je(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("codeTextData"),f(p))}function f(p){return p===null||p===32||p===96||Je(p)?(e.exit("codeTextData"),c(p)):(e.consume(p),f)}function h(p){return p===96?(e.consume(p),i++,h):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(o.type="codeTextData",f(p))}}class Rfe{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Sd(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Sd(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Sd(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Sd(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Sd(this.left,n.reverse())}}}function Sd(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function DF(e){const t={};let n=-1,r,i,o,a,u,c,f;const h=new Rfe(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,o=0,o<c.length&&c[o][1].type==="lineEndingBlank"&&(o+=2),o<c.length&&c[o][1].type==="content"))for(;++o<c.length&&c[o][1].type!=="content";)c[o][1].type==="chunkText"&&(c[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,_fe(h,n)),n=t[n],f=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(a=h.get(o),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(h.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=o);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...h.get(i)[1].start},u=h.slice(i,n),u.unshift(r),h.splice(i,n-i+1,u))}}return Wr(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!f}function _fe(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const u=a.events,c=[],f={};let h,p,g=-1,y=n,b=0,v=0;const S=[v];for(;y;){for(;e.get(++i)[1]!==y;);o.push(i),y._tokenizer||(h=r.sliceStream(y),y.next||h.push(null),p&&a.defineSkip(y.start),y._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(h),y._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),p=y,y=y.next}for(y=n;++g<u.length;)u[g][0]==="exit"&&u[g-1][0]==="enter"&&u[g][1].type===u[g-1][1].type&&u[g][1].start.line!==u[g][1].end.line&&(v=g+1,S.push(v),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(a.events=[],y?(y._tokenizer=void 0,y.previous=void 0):S.pop(),g=S.length;g--;){const x=u.slice(S[g],S[g+1]),_=o.pop();c.push([_,_+x.length-1]),e.splice(_,2,x)}for(c.reverse(),g=-1;++g<c.length;)f[b+c[g][0]]=b+c[g][1],b+=c[g][1]-c[g][0]-1;return f}const Tfe={resolve:Dfe,tokenize:Mfe},Afe={partial:!0,tokenize:Ofe};function Dfe(e){return DF(e),e}function Mfe(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(u)}function i(u){return u===null?o(u):Je(u)?e.check(Afe,a,o)(u):(e.consume(u),i)}function o(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function a(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Ofe(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),_t(e,o,"linePrefix")}function o(a){if(a===null||Je(a))return n(a);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function MF(e,t,n,r,i,o,a,u,c){const f=c||Number.POSITIVE_INFINITY;let h=0;return p;function p(x){return x===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(x),e.exit(o),g):x===null||x===32||x===41||dy(x)?n(x):(e.enter(r),e.enter(a),e.enter(u),e.enter("chunkString",{contentType:"string"}),v(x))}function g(x){return x===62?(e.enter(o),e.consume(x),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),y(x))}function y(x){return x===62?(e.exit("chunkString"),e.exit(u),g(x)):x===null||x===60||Je(x)?n(x):(e.consume(x),x===92?b:y)}function b(x){return x===60||x===62||x===92?(e.consume(x),y):y(x)}function v(x){return!h&&(x===null||x===41||Wt(x))?(e.exit("chunkString"),e.exit(u),e.exit(a),e.exit(r),t(x)):h<f&&x===40?(e.consume(x),h++,v):x===41?(e.consume(x),h--,v):x===null||x===32||x===40||dy(x)?n(x):(e.consume(x),x===92?S:v)}function S(x){return x===40||x===41||x===92?(e.consume(x),v):v(x)}}function OF(e,t,n,r,i,o){const a=this;let u=0,c;return f;function f(y){return e.enter(r),e.enter(i),e.consume(y),e.exit(i),e.enter(o),h}function h(y){return u>999||y===null||y===91||y===93&&!c||y===94&&!u&&"_hiddenFootnoteSupport"in a.parser.constructs?n(y):y===93?(e.exit(o),e.enter(i),e.consume(y),e.exit(i),e.exit(r),t):Je(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===null||y===91||y===93||Je(y)||u++>999?(e.exit("chunkString"),h(y)):(e.consume(y),c||(c=!wt(y)),y===92?g:p)}function g(y){return y===91||y===92||y===93?(e.consume(y),u++,p):p(y)}}function $F(e,t,n,r,i,o){let a;return u;function u(g){return g===34||g===39||g===40?(e.enter(r),e.enter(i),e.consume(g),e.exit(i),a=g===40?41:g,c):n(g)}function c(g){return g===a?(e.enter(i),e.consume(g),e.exit(i),e.exit(r),t):(e.enter(o),f(g))}function f(g){return g===a?(e.exit(o),c(a)):g===null?n(g):Je(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),_t(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===a||g===null||Je(g)?(e.exit("chunkString"),f(g)):(e.consume(g),g===92?p:h)}function p(g){return g===a||g===92?(e.consume(g),h):h(g)}}function zd(e,t){let n;return r;function r(i){return Je(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):wt(i)?_t(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const $fe={name:"definition",tokenize:Nfe},Pfe={partial:!0,tokenize:Ife};function Nfe(e,t,n){const r=this;let i;return o;function o(y){return e.enter("definition"),a(y)}function a(y){return OF.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function u(y){return i=Fi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),c):n(y)}function c(y){return Wt(y)?zd(e,f)(y):f(y)}function f(y){return MF(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function h(y){return e.attempt(Pfe,p,p)(y)}function p(y){return wt(y)?_t(e,g,"whitespace")(y):g(y)}function g(y){return y===null||Je(y)?(e.exit("definition"),r.parser.defined.push(i),t(y)):n(y)}}function Ife(e,t,n){return r;function r(u){return Wt(u)?zd(e,i)(u):n(u)}function i(u){return $F(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function o(u){return wt(u)?_t(e,a,"whitespace")(u):a(u)}function a(u){return u===null||Je(u)?t(u):n(u)}}const jfe={name:"hardBreakEscape",tokenize:Lfe};function Lfe(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return Je(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Ffe={name:"headingAtx",resolve:zfe,tokenize:Bfe};function zfe(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Wr(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Bfe(e,t,n){let r=0;return i;function i(h){return e.enter("atxHeading"),o(h)}function o(h){return e.enter("atxHeadingSequence"),a(h)}function a(h){return h===35&&r++<6?(e.consume(h),a):h===null||Wt(h)?(e.exit("atxHeadingSequence"),u(h)):n(h)}function u(h){return h===35?(e.enter("atxHeadingSequence"),c(h)):h===null||Je(h)?(e.exit("atxHeading"),t(h)):wt(h)?_t(e,u,"whitespace")(h):(e.enter("atxHeadingText"),f(h))}function c(h){return h===35?(e.consume(h),c):(e.exit("atxHeadingSequence"),u(h))}function f(h){return h===null||h===35||Wt(h)?(e.exit("atxHeadingText"),u(h)):(e.consume(h),f)}}const Ufe=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],LM=["pre","script","style","textarea"],Hfe={concrete:!0,name:"htmlFlow",resolveTo:Vfe,tokenize:Yfe},Gfe={partial:!0,tokenize:Kfe},qfe={partial:!0,tokenize:Wfe};function Vfe(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Yfe(e,t,n){const r=this;let i,o,a,u,c;return f;function f(H){return h(H)}function h(H){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(H),p}function p(H){return H===33?(e.consume(H),g):H===47?(e.consume(H),o=!0,v):H===63?(e.consume(H),i=3,r.interrupt?t:N):sr(H)?(e.consume(H),a=String.fromCharCode(H),S):n(H)}function g(H){return H===45?(e.consume(H),i=2,y):H===91?(e.consume(H),i=5,u=0,b):sr(H)?(e.consume(H),i=4,r.interrupt?t:N):n(H)}function y(H){return H===45?(e.consume(H),r.interrupt?t:N):n(H)}function b(H){const ie="CDATA[";return H===ie.charCodeAt(u++)?(e.consume(H),u===ie.length?r.interrupt?t:M:b):n(H)}function v(H){return sr(H)?(e.consume(H),a=String.fromCharCode(H),S):n(H)}function S(H){if(H===null||H===47||H===62||Wt(H)){const ie=H===47,re=a.toLowerCase();return!ie&&!o&&LM.includes(re)?(i=1,r.interrupt?t(H):M(H)):Ufe.includes(a.toLowerCase())?(i=6,ie?(e.consume(H),x):r.interrupt?t(H):M(H)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(H):o?_(H):R(H))}return H===45||Qn(H)?(e.consume(H),a+=String.fromCharCode(H),S):n(H)}function x(H){return H===62?(e.consume(H),r.interrupt?t:M):n(H)}function _(H){return wt(H)?(e.consume(H),_):j(H)}function R(H){return H===47?(e.consume(H),j):H===58||H===95||sr(H)?(e.consume(H),T):wt(H)?(e.consume(H),R):j(H)}function T(H){return H===45||H===46||H===58||H===95||Qn(H)?(e.consume(H),T):A(H)}function A(H){return H===61?(e.consume(H),D):wt(H)?(e.consume(H),A):R(H)}function D(H){return H===null||H===60||H===61||H===62||H===96?n(H):H===34||H===39?(e.consume(H),c=H,O):wt(H)?(e.consume(H),D):$(H)}function O(H){return H===c?(e.consume(H),c=null,z):H===null||Je(H)?n(H):(e.consume(H),O)}function $(H){return H===null||H===34||H===39||H===47||H===60||H===61||H===62||H===96||Wt(H)?A(H):(e.consume(H),$)}function z(H){return H===47||H===62||wt(H)?R(H):n(H)}function j(H){return H===62?(e.consume(H),I):n(H)}function I(H){return H===null||Je(H)?M(H):wt(H)?(e.consume(H),I):n(H)}function M(H){return H===45&&i===2?(e.consume(H),F):H===60&&i===1?(e.consume(H),U):H===62&&i===4?(e.consume(H),Y):H===63&&i===3?(e.consume(H),N):H===93&&i===5?(e.consume(H),W):Je(H)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Gfe,J,B)(H)):H===null||Je(H)?(e.exit("htmlFlowData"),B(H)):(e.consume(H),M)}function B(H){return e.check(qfe,G,J)(H)}function G(H){return e.enter("lineEnding"),e.consume(H),e.exit("lineEnding"),L}function L(H){return H===null||Je(H)?B(H):(e.enter("htmlFlowData"),M(H))}function F(H){return H===45?(e.consume(H),N):M(H)}function U(H){return H===47?(e.consume(H),a="",V):M(H)}function V(H){if(H===62){const ie=a.toLowerCase();return LM.includes(ie)?(e.consume(H),Y):M(H)}return sr(H)&&a.length<8?(e.consume(H),a+=String.fromCharCode(H),V):M(H)}function W(H){return H===93?(e.consume(H),N):M(H)}function N(H){return H===62?(e.consume(H),Y):H===45&&i===2?(e.consume(H),N):M(H)}function Y(H){return H===null||Je(H)?(e.exit("htmlFlowData"),J(H)):(e.consume(H),Y)}function J(H){return e.exit("htmlFlow"),t(H)}}function Wfe(e,t,n){const r=this;return i;function i(a){return Je(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):n(a)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function Kfe(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(qh,t,n)}}const Xfe={name:"htmlText",tokenize:Qfe};function Qfe(e,t,n){const r=this;let i,o,a;return u;function u(N){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(N),c}function c(N){return N===33?(e.consume(N),f):N===47?(e.consume(N),A):N===63?(e.consume(N),R):sr(N)?(e.consume(N),$):n(N)}function f(N){return N===45?(e.consume(N),h):N===91?(e.consume(N),o=0,b):sr(N)?(e.consume(N),_):n(N)}function h(N){return N===45?(e.consume(N),y):n(N)}function p(N){return N===null?n(N):N===45?(e.consume(N),g):Je(N)?(a=p,U(N)):(e.consume(N),p)}function g(N){return N===45?(e.consume(N),y):p(N)}function y(N){return N===62?F(N):N===45?g(N):p(N)}function b(N){const Y="CDATA[";return N===Y.charCodeAt(o++)?(e.consume(N),o===Y.length?v:b):n(N)}function v(N){return N===null?n(N):N===93?(e.consume(N),S):Je(N)?(a=v,U(N)):(e.consume(N),v)}function S(N){return N===93?(e.consume(N),x):v(N)}function x(N){return N===62?F(N):N===93?(e.consume(N),x):v(N)}function _(N){return N===null||N===62?F(N):Je(N)?(a=_,U(N)):(e.consume(N),_)}function R(N){return N===null?n(N):N===63?(e.consume(N),T):Je(N)?(a=R,U(N)):(e.consume(N),R)}function T(N){return N===62?F(N):R(N)}function A(N){return sr(N)?(e.consume(N),D):n(N)}function D(N){return N===45||Qn(N)?(e.consume(N),D):O(N)}function O(N){return Je(N)?(a=O,U(N)):wt(N)?(e.consume(N),O):F(N)}function $(N){return N===45||Qn(N)?(e.consume(N),$):N===47||N===62||Wt(N)?z(N):n(N)}function z(N){return N===47?(e.consume(N),F):N===58||N===95||sr(N)?(e.consume(N),j):Je(N)?(a=z,U(N)):wt(N)?(e.consume(N),z):F(N)}function j(N){return N===45||N===46||N===58||N===95||Qn(N)?(e.consume(N),j):I(N)}function I(N){return N===61?(e.consume(N),M):Je(N)?(a=I,U(N)):wt(N)?(e.consume(N),I):z(N)}function M(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),i=N,B):Je(N)?(a=M,U(N)):wt(N)?(e.consume(N),M):(e.consume(N),G)}function B(N){return N===i?(e.consume(N),i=void 0,L):N===null?n(N):Je(N)?(a=B,U(N)):(e.consume(N),B)}function G(N){return N===null||N===34||N===39||N===60||N===61||N===96?n(N):N===47||N===62||Wt(N)?z(N):(e.consume(N),G)}function L(N){return N===47||N===62||Wt(N)?z(N):n(N)}function F(N){return N===62?(e.consume(N),e.exit("htmlTextData"),e.exit("htmlText"),t):n(N)}function U(N){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),V}function V(N){return wt(N)?_t(e,W,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):W(N)}function W(N){return e.enter("htmlTextData"),a(N)}}const dE={name:"labelEnd",resolveAll:tde,resolveTo:nde,tokenize:rde},Zfe={tokenize:ide},Jfe={tokenize:ode},ede={tokenize:sde};function tde(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Wr(e,0,e.length,n),e}function nde(e,t){let n=e.length,r=0,i,o,a,u;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const c={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},f={type:"label",start:{...e[o][1].start},end:{...e[a][1].end}},h={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[a-2][1].start}};return u=[["enter",c,t],["enter",f,t]],u=gi(u,e.slice(o+1,o+r+3)),u=gi(u,[["enter",h,t]]),u=gi(u,ub(t.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),t)),u=gi(u,[["exit",h,t],e[a-2],e[a-1],["exit",f,t]]),u=gi(u,e.slice(a+1)),u=gi(u,[["exit",c,t]]),Wr(e,o,e.length,u),e}function rde(e,t,n){const r=this;let i=r.events.length,o,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return u;function u(g){return o?o._inactive?p(g):(a=r.parser.defined.includes(Fi(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(g),e.exit("labelMarker"),e.exit("labelEnd"),c):n(g)}function c(g){return g===40?e.attempt(Zfe,h,a?h:p)(g):g===91?e.attempt(Jfe,h,a?f:p)(g):a?h(g):p(g)}function f(g){return e.attempt(ede,h,p)(g)}function h(g){return t(g)}function p(g){return o._balanced=!0,n(g)}}function ide(e,t,n){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),i}function i(p){return Wt(p)?zd(e,o)(p):o(p)}function o(p){return p===41?h(p):MF(e,a,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function a(p){return Wt(p)?zd(e,c)(p):h(p)}function u(p){return n(p)}function c(p){return p===34||p===39||p===40?$F(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):h(p)}function f(p){return Wt(p)?zd(e,h)(p):h(p)}function h(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function ode(e,t,n){const r=this;return i;function i(u){return OF.call(r,e,o,a,"reference","referenceMarker","referenceString")(u)}function o(u){return r.parser.defined.includes(Fi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function a(u){return n(u)}}function sde(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const ade={name:"labelStartImage",resolveAll:dE.resolveAll,tokenize:lde};function lde(e,t,n){const r=this;return i;function i(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),o}function o(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),a):n(u)}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const ude={name:"labelStartLink",resolveAll:dE.resolveAll,tokenize:cde};function cde(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),o}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const G1={name:"lineEnding",tokenize:fde};function fde(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),_t(e,t,"linePrefix")}}const bg={name:"thematicBreak",tokenize:dde};function dde(e,t,n){let r=0,i;return o;function o(f){return e.enter("thematicBreak"),a(f)}function a(f){return i=f,u(f)}function u(f){return f===i?(e.enter("thematicBreakSequence"),c(f)):r>=3&&(f===null||Je(f))?(e.exit("thematicBreak"),t(f)):n(f)}function c(f){return f===i?(e.consume(f),r++,c):(e.exit("thematicBreakSequence"),wt(f)?_t(e,u,"whitespace")(f):u(f))}}const br={continuation:{tokenize:gde},exit:bde,name:"list",tokenize:mde},hde={partial:!0,tokenize:vde},pde={partial:!0,tokenize:yde};function mde(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return u;function u(y){const b=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:Hw(y)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(bg,n,f)(y):f(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(y)}return n(y)}function c(y){return Hw(y)&&++a<10?(e.consume(y),c):(!r.interrupt||a<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),f(y)):n(y)}function f(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(qh,r.interrupt?n:h,e.attempt(hde,g,p))}function h(y){return r.containerState.initialBlankLine=!0,o++,g(y)}function p(y){return wt(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),g):n(y)}function g(y){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function gde(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(qh,i,o);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,_t(e,t,"listItemIndent",r.containerState.size+1)(u)}function o(u){return r.containerState.furtherBlankLines||!wt(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(pde,t,a)(u))}function a(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,_t(e,e.attempt(br,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function yde(e,t,n){const r=this;return _t(e,i,"listItemIndent",r.containerState.size+1);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(o):n(o)}}function bde(e){e.exit(this.containerState.type)}function vde(e,t,n){const r=this;return _t(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const a=r.events[r.events.length-1];return!wt(o)&&a&&a[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const FM={name:"setextUnderline",resolveTo:xde,tokenize:wde};function xde(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",a,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function wde(e,t,n){const r=this;let i;return o;function o(f){let h=r.events.length,p;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){p=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),i=f,a(f)):n(f)}function a(f){return e.enter("setextHeadingLineSequence"),u(f)}function u(f){return f===i?(e.consume(f),u):(e.exit("setextHeadingLineSequence"),wt(f)?_t(e,c,"lineSuffix")(f):c(f))}function c(f){return f===null||Je(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const Sde={tokenize:Cde};function Cde(e){const t=this,n=e.attempt(qh,r,e.attempt(this.parser.constructs.flowInitial,i,_t(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Tfe,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Ede={resolveAll:NF()},kde=PF("string"),Rde=PF("text");function PF(e){return{resolveAll:NF(e==="text"?_de:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,a,u);return a;function a(h){return f(h)?o(h):u(h)}function u(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),c}function c(h){return f(h)?(n.exit("data"),o(h)):(n.consume(h),c)}function f(h){if(h===null)return!0;const p=i[h];let g=-1;if(p)for(;++g<p.length;){const y=p[g];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function NF(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function _de(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,a=-1,u=0,c;for(;o--;){const f=i[o];if(typeof f=="string"){for(a=f.length;f.charCodeAt(a-1)===32;)u++,a--;if(a)break;a=-1}else if(f===-2)c=!0,u++;else if(f!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const f={type:n===e.length||c||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?a:r.start._bufferIndex+a,_index:r.start._index+o,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...f.start},r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const Tde={42:br,43:br,45:br,48:br,49:br,50:br,51:br,52:br,53:br,54:br,55:br,56:br,57:br,62:_F},Ade={91:$fe},Dde={[-2]:H1,[-1]:H1,32:H1},Mde={35:Ffe,42:bg,45:[FM,bg],60:Hfe,61:FM,95:bg,96:jM,126:jM},Ode={38:AF,92:TF},$de={[-5]:G1,[-4]:G1,[-3]:G1,33:ade,38:AF,42:Gw,60:[ufe,Xfe],91:ude,92:[jfe,TF],93:dE,95:Gw,96:Sfe},Pde={null:[Gw,Ede]},Nde={null:[42,95]},Ide={null:[]},jde=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Nde,contentInitial:Ade,disable:Ide,document:Tde,flow:Mde,flowInitial:Dde,insideSpan:Pde,string:Ode,text:$de},Symbol.toStringTag,{value:"Module"}));function Lde(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let a=[],u=[];const c={attempt:O(A),check:O(D),consume:_,enter:R,exit:T,interrupt:O(D,{interrupt:!0})},f={code:null,containerState:{},defineSkip:v,events:[],now:b,parser:e,previous:null,sliceSerialize:g,sliceStream:y,write:p};let h=t.tokenize.call(f,c);return t.resolveAll&&o.push(t),f;function p(I){return a=gi(a,I),S(),a[a.length-1]!==null?[]:($(t,0),f.events=ub(o,f.events,f),f.events)}function g(I,M){return zde(y(I),M)}function y(I){return Fde(a,I)}function b(){const{_bufferIndex:I,_index:M,line:B,column:G,offset:L}=r;return{_bufferIndex:I,_index:M,line:B,column:G,offset:L}}function v(I){i[I.line]=I.column,j()}function S(){let I;for(;r._index<a.length;){const M=a[r._index];if(typeof M=="string")for(I=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===I&&r._bufferIndex<M.length;)x(M.charCodeAt(r._bufferIndex));else x(M)}}function x(I){h=h(I)}function _(I){Je(I)?(r.line++,r.column=1,r.offset+=I===-3?2:1,j()):I!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=I}function R(I,M){const B=M||{};return B.type=I,B.start=b(),f.events.push(["enter",B,f]),u.push(B),B}function T(I){const M=u.pop();return M.end=b(),f.events.push(["exit",M,f]),M}function A(I,M){$(I,M.from)}function D(I,M){M.restore()}function O(I,M){return B;function B(G,L,F){let U,V,W,N;return Array.isArray(G)?J(G):"tokenize"in G?J([G]):Y(G);function Y(he){return ve;function ve(Re){const ce=Re!==null&&he[Re],Ie=Re!==null&&he.null,Ve=[...Array.isArray(ce)?ce:ce?[ce]:[],...Array.isArray(Ie)?Ie:Ie?[Ie]:[]];return J(Ve)(Re)}}function J(he){return U=he,V=0,he.length===0?F:H(he[V])}function H(he){return ve;function ve(Re){return N=z(),W=he,he.partial||(f.currentConstruct=he),he.name&&f.parser.constructs.disable.null.includes(he.name)?re():he.tokenize.call(M?Object.assign(Object.create(f),M):f,c,ie,re)(Re)}}function ie(he){return I(W,N),L}function re(he){return N.restore(),++V<U.length?H(U[V]):F}}}function $(I,M){I.resolveAll&&!o.includes(I)&&o.push(I),I.resolve&&Wr(f.events,M,f.events.length-M,I.resolve(f.events.slice(M),f)),I.resolveTo&&(f.events=I.resolveTo(f.events,f))}function z(){const I=b(),M=f.previous,B=f.currentConstruct,G=f.events.length,L=Array.from(u);return{from:G,restore:F};function F(){r=I,f.previous=M,f.currentConstruct=B,f.events.length=G,u=L,j()}}function j(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Fde(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,o)];else{if(a=e.slice(n,i),r>-1){const u=a[0];typeof u=="string"?a[0]=u.slice(r):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}function zde(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let a;if(typeof o=="string")a=o;else switch(o){case-5:{a="\r";break}case-4:{a=`
492
+ `;break}case-3:{a=`\r
493
+ `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,r.push(a)}return r.join("")}function Bde(e){const r={constructs:kF([jde,...(e||{}).extensions||[]]),content:i(nfe),defined:[],document:i(ife),flow:i(Sde),lazy:{},string:i(kde),text:i(Rde)};return r;function i(o){return a;function a(u){return Lde(r,o,u)}}}function Ude(e){for(;!DF(e););return e}const zM=/[\0\t\n\r]/g;function Hde(){let e=1,t="",n=!0,r;return i;function i(o,a,u){const c=[];let f,h,p,g,y;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(a||void 0).decode(o)),p=0,t="",n&&(o.charCodeAt(0)===65279&&p++,n=void 0);p<o.length;){if(zM.lastIndex=p,f=zM.exec(o),g=f&&f.index!==void 0?f.index:o.length,y=o.charCodeAt(g),!f){t=o.slice(p);break}if(y===10&&p===g&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),p<g&&(c.push(o.slice(p,g)),e+=g-p),y){case 0:{c.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,c.push(-2);e++<h;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}p=g+1}return u&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const Gde=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function qde(e){return e.replace(Gde,Vde)}function Vde(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return RF(n.slice(o?2:1),o?16:10)}return fE(n)||e}const IF={}.hasOwnProperty;function Yde(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Wde(n)(Ude(Bde(n).document().write(Hde()(e,t,!0))))}function Wde(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(oe),autolinkProtocol:z,autolinkEmail:z,atxHeading:o(xe),blockQuote:o(Ie),characterEscape:z,characterReference:z,codeFenced:o(Ve),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(Ve,a),codeText:o(X,a),codeTextData:z,data:z,codeFlowValue:z,definition:o(Z),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(ne),hardBreakEscape:o(ge),hardBreakTrailing:o(ge),htmlFlow:o(Ce,a),htmlFlowData:z,htmlText:o(Ce,a),htmlTextData:z,image:o(le),label:a,link:o(oe),listItem:o(ae),listItemValue:g,listOrdered:o(me,p),listUnordered:o(me),paragraph:o(Oe),reference:H,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(xe),strong:o(Te),thematicBreak:o(De)},exit:{atxHeading:c(),atxHeadingSequence:A,autolink:c(),autolinkEmail:ce,autolinkProtocol:Re,blockQuote:c(),characterEscapeValue:j,characterReferenceMarkerHexadecimal:re,characterReferenceMarkerNumeric:re,characterReferenceValue:he,characterReference:ve,codeFenced:c(S),codeFencedFence:v,codeFencedFenceInfo:y,codeFencedFenceMeta:b,codeFlowValue:j,codeIndented:c(x),codeText:c(L),codeTextData:j,data:j,definition:c(),definitionDestinationString:T,definitionLabelString:_,definitionTitleString:R,emphasis:c(),hardBreakEscape:c(M),hardBreakTrailing:c(M),htmlFlow:c(B),htmlFlowData:j,htmlText:c(G),htmlTextData:j,image:c(U),label:W,labelText:V,lineEnding:I,link:c(F),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ie,resourceDestinationString:N,resourceTitleString:Y,resource:J,setextHeading:c($),setextHeadingLineSequence:O,setextHeadingText:D,strong:c(),thematicBreak:c()}};jF(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ue){let Se={type:"root",children:[]};const ke={stack:[Se],tokenStack:[],config:t,enter:u,exit:f,buffer:a,resume:h,data:n},Pe=[];let Le=-1;for(;++Le<ue.length;)if(ue[Le][1].type==="listOrdered"||ue[Le][1].type==="listUnordered")if(ue[Le][0]==="enter")Pe.push(Le);else{const st=Pe.pop();Le=i(ue,st,Le)}for(Le=-1;++Le<ue.length;){const st=t[ue[Le][0]];IF.call(st,ue[Le][1].type)&&st[ue[Le][1].type].call(Object.assign({sliceSerialize:ue[Le][2].sliceSerialize},ke),ue[Le][1])}if(ke.tokenStack.length>0){const st=ke.tokenStack[ke.tokenStack.length-1];(st[1]||BM).call(ke,void 0,st[0])}for(Se.position={start:Is(ue.length>0?ue[0][1].start:{line:1,column:1,offset:0}),end:Is(ue.length>0?ue[ue.length-2][1].end:{line:1,column:1,offset:0})},Le=-1;++Le<t.transforms.length;)Se=t.transforms[Le](Se)||Se;return Se}function i(ue,Se,ke){let Pe=Se-1,Le=-1,st=!1,Bt,Ot,Me,Qe;for(;++Pe<=ke;){const Ne=ue[Pe];switch(Ne[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ne[0]==="enter"?Le++:Le--,Qe=void 0;break}case"lineEndingBlank":{Ne[0]==="enter"&&(Bt&&!Qe&&!Le&&!Me&&(Me=Pe),Qe=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Qe=void 0}if(!Le&&Ne[0]==="enter"&&Ne[1].type==="listItemPrefix"||Le===-1&&Ne[0]==="exit"&&(Ne[1].type==="listUnordered"||Ne[1].type==="listOrdered")){if(Bt){let Tt=Pe;for(Ot=void 0;Tt--;){const dt=ue[Tt];if(dt[1].type==="lineEnding"||dt[1].type==="lineEndingBlank"){if(dt[0]==="exit")continue;Ot&&(ue[Ot][1].type="lineEndingBlank",st=!0),dt[1].type="lineEnding",Ot=Tt}else if(!(dt[1].type==="linePrefix"||dt[1].type==="blockQuotePrefix"||dt[1].type==="blockQuotePrefixWhitespace"||dt[1].type==="blockQuoteMarker"||dt[1].type==="listItemIndent"))break}Me&&(!Ot||Me<Ot)&&(Bt._spread=!0),Bt.end=Object.assign({},Ot?ue[Ot][1].start:Ne[1].end),ue.splice(Ot||Pe,0,["exit",Bt,Ne[2]]),Pe++,ke++}if(Ne[1].type==="listItemPrefix"){const Tt={type:"listItem",_spread:!1,start:Object.assign({},Ne[1].start),end:void 0};Bt=Tt,ue.splice(Pe,0,["enter",Tt,Ne[2]]),Pe++,ke++,Me=void 0,Qe=!0}}}return ue[Se][1]._spread=st,ke}function o(ue,Se){return ke;function ke(Pe){u.call(this,ue(Pe),Pe),Se&&Se.call(this,Pe)}}function a(){this.stack.push({type:"fragment",children:[]})}function u(ue,Se,ke){this.stack[this.stack.length-1].children.push(ue),this.stack.push(ue),this.tokenStack.push([Se,ke||void 0]),ue.position={start:Is(Se.start),end:void 0}}function c(ue){return Se;function Se(ke){ue&&ue.call(this,ke),f.call(this,ke)}}function f(ue,Se){const ke=this.stack.pop(),Pe=this.tokenStack.pop();if(Pe)Pe[0].type!==ue.type&&(Se?Se.call(this,ue,Pe[0]):(Pe[1]||BM).call(this,ue,Pe[0]));else throw new Error("Cannot close `"+ue.type+"` ("+Fd({start:ue.start,end:ue.end})+"): it’s not open");ke.position.end=Is(ue.end)}function h(){return cE(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function g(ue){if(this.data.expectingFirstListItemValue){const Se=this.stack[this.stack.length-2];Se.start=Number.parseInt(this.sliceSerialize(ue),10),this.data.expectingFirstListItemValue=void 0}}function y(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.lang=ue}function b(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.meta=ue}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.value=ue.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.value=ue.replace(/(\r?\n|\r)$/g,"")}function _(ue){const Se=this.resume(),ke=this.stack[this.stack.length-1];ke.label=Se,ke.identifier=Fi(this.sliceSerialize(ue)).toLowerCase()}function R(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.title=ue}function T(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.url=ue}function A(ue){const Se=this.stack[this.stack.length-1];if(!Se.depth){const ke=this.sliceSerialize(ue).length;Se.depth=ke}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function O(ue){const Se=this.stack[this.stack.length-1];Se.depth=this.sliceSerialize(ue).codePointAt(0)===61?1:2}function $(){this.data.setextHeadingSlurpLineEnding=void 0}function z(ue){const ke=this.stack[this.stack.length-1].children;let Pe=ke[ke.length-1];(!Pe||Pe.type!=="text")&&(Pe=_e(),Pe.position={start:Is(ue.start),end:void 0},ke.push(Pe)),this.stack.push(Pe)}function j(ue){const Se=this.stack.pop();Se.value+=this.sliceSerialize(ue),Se.position.end=Is(ue.end)}function I(ue){const Se=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ke=Se.children[Se.children.length-1];ke.position.end=Is(ue.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Se.type)&&(z.call(this,ue),j.call(this,ue))}function M(){this.data.atHardBreak=!0}function B(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.value=ue}function G(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.value=ue}function L(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.value=ue}function F(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const Se=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=Se,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function U(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const Se=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=Se,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function V(ue){const Se=this.sliceSerialize(ue),ke=this.stack[this.stack.length-2];ke.label=qde(Se),ke.identifier=Fi(Se).toLowerCase()}function W(){const ue=this.stack[this.stack.length-1],Se=this.resume(),ke=this.stack[this.stack.length-1];if(this.data.inReference=!0,ke.type==="link"){const Pe=ue.children;ke.children=Pe}else ke.alt=Se}function N(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.url=ue}function Y(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.title=ue}function J(){this.data.inReference=void 0}function H(){this.data.referenceType="collapsed"}function ie(ue){const Se=this.resume(),ke=this.stack[this.stack.length-1];ke.label=Se,ke.identifier=Fi(this.sliceSerialize(ue)).toLowerCase(),this.data.referenceType="full"}function re(ue){this.data.characterReferenceType=ue.type}function he(ue){const Se=this.sliceSerialize(ue),ke=this.data.characterReferenceType;let Pe;ke?(Pe=RF(Se,ke==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Pe=fE(Se);const Le=this.stack[this.stack.length-1];Le.value+=Pe}function ve(ue){const Se=this.stack.pop();Se.position.end=Is(ue.end)}function Re(ue){j.call(this,ue);const Se=this.stack[this.stack.length-1];Se.url=this.sliceSerialize(ue)}function ce(ue){j.call(this,ue);const Se=this.stack[this.stack.length-1];Se.url="mailto:"+this.sliceSerialize(ue)}function Ie(){return{type:"blockquote",children:[]}}function Ve(){return{type:"code",lang:null,meta:null,value:""}}function X(){return{type:"inlineCode",value:""}}function Z(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ne(){return{type:"emphasis",children:[]}}function xe(){return{type:"heading",depth:0,children:[]}}function ge(){return{type:"break"}}function Ce(){return{type:"html",value:""}}function le(){return{type:"image",title:null,url:"",alt:null}}function oe(){return{type:"link",title:null,url:"",children:[]}}function me(ue){return{type:"list",ordered:ue.type==="listOrdered",start:null,spread:ue._spread,children:[]}}function ae(ue){return{type:"listItem",spread:ue._spread,checked:null,children:[]}}function Oe(){return{type:"paragraph",children:[]}}function Te(){return{type:"strong",children:[]}}function _e(){return{type:"text",value:""}}function De(){return{type:"thematicBreak"}}}function Is(e){return{line:e.line,column:e.column,offset:e.offset}}function jF(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?jF(e,r):Kde(e,r)}}function Kde(e,t){let n;for(n in t)if(IF.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function BM(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Fd({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Fd({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Fd({start:t.start,end:t.end})+") is still open")}function Xde(e){const t=this;t.parser=n;function n(r){return Yde(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Qde(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Zde(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
494
+ `}]}function Jde(e,t){const n=t.value?t.value+`
495
+ `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function ehe(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function the(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function nhe(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=yf(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let a,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=o+1,u+=1,e.footnoteCounts.set(r,u);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,c);const f={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,f),e.applyData(t,f)}function rhe(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ihe(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function LF(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function ohe(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return LF(e,t);const i={src:yf(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function she(e,t){const n={src:yf(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function ahe(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function lhe(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return LF(e,t);const i={href:yf(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function uhe(e,t){const n={href:yf(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function che(e,t,n){const r=e.all(t),i=n?fhe(n):FF(t),o={},a=[];if(typeof t.checked=="boolean"){const h=r[0];let p;h&&h.type==="element"&&h.tagName==="p"?p=h:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const h=r[u];(i||u!==0||h.type!=="element"||h.tagName!=="p")&&a.push({type:"text",value:`
496
+ `}),h.type==="element"&&h.tagName==="p"&&!i?a.push(...h.children):a.push(h)}const c=r[r.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&a.push({type:"text",value:`
497
+ `});const f={type:"element",tagName:"li",properties:o,children:a};return e.patch(t,f),e.applyData(t,f)}function fhe(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=FF(n[r])}return t}function FF(e){const t=e.spread;return t??e.children.length>1}function dhe(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function hhe(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function phe(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function mhe(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ghe(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=sE(t.children[1]),c=bF(t.children[t.children.length-1]);u&&c&&(a.position={start:u,end:c}),i.push(a)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function yhe(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,u=a?a.length:t.children.length;let c=-1;const f=[];for(;++c<u;){const p=t.children[c],g={},y=a?a[c]:void 0;y&&(g.align=y);let b={type:"element",tagName:o,properties:g,children:[]};p&&(b.children=e.all(p),e.patch(p,b),b=e.applyData(p,b)),f.push(b)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,h),e.applyData(t,h)}function bhe(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const UM=9,HM=32;function vhe(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(GM(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(GM(t.slice(i),i>0,!1)),o.join("")}function GM(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===UM||o===HM;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===UM||o===HM;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function xhe(e,t){const n={type:"text",value:vhe(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function whe(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const She={blockquote:Qde,break:Zde,code:Jde,delete:ehe,emphasis:the,footnoteReference:nhe,heading:rhe,html:ihe,imageReference:ohe,image:she,inlineCode:ahe,linkReference:lhe,link:uhe,listItem:che,list:dhe,paragraph:hhe,root:phe,strong:mhe,table:ghe,tableCell:bhe,tableRow:yhe,text:xhe,thematicBreak:whe,toml:Vm,yaml:Vm,definition:Vm,footnoteDefinition:Vm};function Vm(){}const zF=-1,cb=0,Bd=1,hy=2,hE=3,pE=4,mE=5,gE=6,BF=7,UF=8,qM=typeof self=="object"?self:globalThis,Che=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,a]=t[i];switch(o){case cb:case zF:return n(a,i);case Bd:{const u=n([],i);for(const c of a)u.push(r(c));return u}case hy:{const u=n({},i);for(const[c,f]of a)u[r(c)]=r(f);return u}case hE:return n(new Date(a),i);case pE:{const{source:u,flags:c}=a;return n(new RegExp(u,c),i)}case mE:{const u=n(new Map,i);for(const[c,f]of a)u.set(r(c),r(f));return u}case gE:{const u=n(new Set,i);for(const c of a)u.add(r(c));return u}case BF:{const{name:u,message:c}=a;return n(new qM[u](c),i)}case UF:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:u}=new Uint8Array(a);return n(new DataView(u),a)}}return n(new qM[o](a),i)};return r},VM=e=>Che(new Map,e)(0),Xu="",{toString:Ehe}={},{keys:khe}=Object,Cd=e=>{const t=typeof e;if(t!=="object"||!e)return[cb,t];const n=Ehe.call(e).slice(8,-1);switch(n){case"Array":return[Bd,Xu];case"Object":return[hy,Xu];case"Date":return[hE,Xu];case"RegExp":return[pE,Xu];case"Map":return[mE,Xu];case"Set":return[gE,Xu];case"DataView":return[Bd,n]}return n.includes("Array")?[Bd,n]:n.includes("Error")?[BF,n]:[hy,n]},Ym=([e,t])=>e===cb&&(t==="function"||t==="symbol"),Rhe=(e,t,n,r)=>{const i=(a,u)=>{const c=r.push(a)-1;return n.set(u,c),c},o=a=>{if(n.has(a))return n.get(a);let[u,c]=Cd(a);switch(u){case cb:{let h=a;switch(c){case"bigint":u=UF,h=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);h=null;break;case"undefined":return i([zF],a)}return i([u,h],a)}case Bd:{if(c){let g=a;return c==="DataView"?g=new Uint8Array(a.buffer):c==="ArrayBuffer"&&(g=new Uint8Array(a)),i([c,[...g]],a)}const h=[],p=i([u,h],a);for(const g of a)h.push(o(g));return p}case hy:{if(c)switch(c){case"BigInt":return i([c,a.toString()],a);case"Boolean":case"Number":case"String":return i([c,a.valueOf()],a)}if(t&&"toJSON"in a)return o(a.toJSON());const h=[],p=i([u,h],a);for(const g of khe(a))(e||!Ym(Cd(a[g])))&&h.push([o(g),o(a[g])]);return p}case hE:return i([u,a.toISOString()],a);case pE:{const{source:h,flags:p}=a;return i([u,{source:h,flags:p}],a)}case mE:{const h=[],p=i([u,h],a);for(const[g,y]of a)(e||!(Ym(Cd(g))||Ym(Cd(y))))&&h.push([o(g),o(y)]);return p}case gE:{const h=[],p=i([u,h],a);for(const g of a)(e||!Ym(Cd(g)))&&h.push(o(g));return p}}const{message:f}=a;return i([u,{name:c,message:f}],a)};return o},YM=(e,{json:t,lossy:n}={})=>{const r=[];return Rhe(!(t||n),!!t,new Map,r)(e),r},py=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?VM(YM(e,t)):structuredClone(e):(e,t)=>VM(YM(e,t));function _he(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function The(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Ahe(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||_he,r=e.options.footnoteBackLabel||The,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let c=-1;for(;++c<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[c]);if(!f)continue;const h=e.all(f),p=String(f.identifier).toUpperCase(),g=yf(p.toLowerCase());let y=0;const b=[],v=e.footnoteCounts.get(p);for(;v!==void 0&&++y<=v;){b.length>0&&b.push({type:"text",value:" "});let _=typeof n=="string"?n:n(c,y);typeof _=="string"&&(_={type:"text",value:_}),b.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+g+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,y),className:["data-footnote-backref"]},children:Array.isArray(_)?_:[_]})}const S=h[h.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const _=S.children[S.children.length-1];_&&_.type==="text"?_.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...b)}else h.push(...b);const x={type:"element",tagName:"li",properties:{id:t+"fn-"+g},children:e.wrap(h,!0)};e.patch(f,x),u.push(x)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...py(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
498
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
499
+ `}]}}const fb=(function(e){if(e==null)return $he;if(typeof e=="function")return db(e);if(typeof e=="object")return Array.isArray(e)?Dhe(e):Mhe(e);if(typeof e=="string")return Ohe(e);throw new Error("Expected function, string, or object as test")});function Dhe(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=fb(e[n]);return db(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function Mhe(e){const t=e;return db(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function Ohe(e){return db(t);function t(n){return n&&n.type===e}}function db(e){return t;function t(n,r,i){return!!(Phe(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function $he(){return!0}function Phe(e){return e!==null&&typeof e=="object"&&"type"in e}const HF=[],Nhe=!0,qw=!1,Ihe="skip";function GF(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=fb(i),a=r?-1:1;u(e,void 0,[])();function u(c,f,h){const p=c&&typeof c=="object"?c:{};if(typeof p.type=="string"){const y=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(g,"name",{value:"node ("+(c.type+(y?"<"+y+">":""))+")"})}return g;function g(){let y=HF,b,v,S;if((!t||o(c,f,h[h.length-1]||void 0))&&(y=jhe(n(c,h)),y[0]===qw))return y;if("children"in c&&c.children){const x=c;if(x.children&&y[0]!==Ihe)for(v=(r?x.children.length:-1)+a,S=h.concat(x);v>-1&&v<x.children.length;){const _=x.children[v];if(b=u(_,v,S)(),b[0]===qw)return b;v=typeof b[1]=="number"?b[1]:v+a}}return y}}}function jhe(e){return Array.isArray(e)?e:typeof e=="number"?[Nhe,e]:e==null?HF:[e]}function hb(e,t,n,r){let i,o,a;typeof t=="function"&&typeof n!="function"?(o=void 0,a=t,i=n):(o=t,a=n,i=r),GF(e,o,u,i);function u(c,f){const h=f[f.length-1],p=h?h.children.indexOf(c):void 0;return a(c,p,h)}}const Vw={}.hasOwnProperty,Lhe={};function Fhe(e,t){const n=t||Lhe,r=new Map,i=new Map,o=new Map,a={...She,...n.handlers},u={all:f,applyData:Bhe,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:a,one:c,options:n,patch:zhe,wrap:Hhe};return hb(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const p=h.type==="definition"?r:i,g=String(h.identifier).toUpperCase();p.has(g)||p.set(g,h)}}),u;function c(h,p){const g=h.type,y=u.handlers[g];if(Vw.call(u.handlers,g)&&y)return y(u,h,p);if(u.options.passThrough&&u.options.passThrough.includes(g)){if("children"in h){const{children:v,...S}=h,x=py(S);return x.children=u.all(h),x}return py(h)}return(u.options.unknownHandler||Uhe)(u,h,p)}function f(h){const p=[];if("children"in h){const g=h.children;let y=-1;for(;++y<g.length;){const b=u.one(g[y],h);if(b){if(y&&g[y-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=WM(b.value)),!Array.isArray(b)&&b.type==="element")){const v=b.children[0];v&&v.type==="text"&&(v.value=WM(v.value))}Array.isArray(b)?p.push(...b):p.push(b)}}}return p}}function zhe(e,t){e.position&&(t.position=Tce(e))}function Bhe(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&o&&Object.assign(n.properties,py(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Uhe(e,t){const n=t.data||{},r="value"in t&&!(Vw.call(n,"hProperties")||Vw.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Hhe(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
500
+ `});++r<e.length;)r&&n.push({type:"text",value:`
501
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
502
+ `}),n}function WM(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function KM(e,t){const n=Fhe(e,t),r=n.one(e,void 0),i=Ahe(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
503
+ `},i),o}function Ghe(e,t){return e&&"run"in e?async function(n,r){const i=KM(n,{file:r,...t});await e.run(i,r)}:function(n,r){return KM(n,{file:r,...e||t})}}function XM(e){if(e)throw e}var q1,QM;function qhe(){if(QM)return q1;QM=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},o=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var h=e.call(f,"constructor"),p=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!h&&!p)return!1;var g;for(g in f);return typeof g>"u"||e.call(f,g)},a=function(f,h){n&&h.name==="__proto__"?n(f,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):f[h.name]=h.newValue},u=function(f,h){if(h==="__proto__")if(e.call(f,h)){if(r)return r(f,h).value}else return;return f[h]};return q1=function c(){var f,h,p,g,y,b,v=arguments[0],S=1,x=arguments.length,_=!1;for(typeof v=="boolean"&&(_=v,v=arguments[1]||{},S=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});S<x;++S)if(f=arguments[S],f!=null)for(h in f)p=u(v,h),g=u(f,h),v!==g&&(_&&g&&(o(g)||(y=i(g)))?(y?(y=!1,b=p&&i(p)?p:[]):b=p&&o(p)?p:{},a(v,{name:h,newValue:c(_,b,g)})):typeof g<"u"&&a(v,{name:h,newValue:g}));return v},q1}var Vhe=qhe();const V1=Jw(Vhe);function Yw(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Yhe(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);u(null,...i);function u(c,...f){const h=e[++o];let p=-1;if(c){a(c);return}for(;++p<i.length;)(f[p]===null||f[p]===void 0)&&(f[p]=i[p]);i=f,h?Whe(h,u)(...f):a(null,...f)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Whe(e,t){let n;return r;function r(...a){const u=e.length>a.length;let c;u&&a.push(i);try{c=e.apply(this,a)}catch(f){const h=f;if(u&&n)throw h;return i(h)}u||(c&&c.then&&typeof c.then=="function"?c.then(o,i):c instanceof Error?i(c):o(c))}function i(a,...u){n||(n=!0,t(a,...u))}function o(a){i(null,a)}}const Ki={basename:Khe,dirname:Xhe,extname:Qhe,join:Zhe,sep:"/"};function Khe(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Vh(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,u=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else a<0&&(o=!0,a=i+1),u>-1&&(e.codePointAt(i)===t.codePointAt(u--)?u<0&&(r=i):(u=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function Xhe(e){if(Vh(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Qhe(e){Vh(e);let t=e.length,n=-1,r=0,i=-1,o=0,a;for(;t--;){const u=e.codePointAt(t);if(u===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),u===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Zhe(...e){let t=-1,n;for(;++t<e.length;)Vh(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Jhe(n)}function Jhe(e){Vh(e);const t=e.codePointAt(0)===47;let n=epe(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function epe(e,t){let n="",r=0,i=-1,o=0,a=-1,u,c;for(;++a<=e.length;){if(a<e.length)u=e.codePointAt(a);else{if(u===47)break;u=47}if(u===47){if(!(i===a-1||o===1))if(i!==a-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),i=a,o=0;continue}}else if(n.length>0){n="",r=0,i=a,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,o=0}else u===46&&o>-1?o++:o=-1}return n}function Vh(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const tpe={cwd:npe};function npe(){return"/"}function Ww(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function rpe(e){if(typeof e=="string")e=new URL(e);else if(!Ww(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return ipe(e)}function ipe(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Y1=["history","path","basename","stem","extname","dirname"];class qF{constructor(t){let n;t?Ww(t)?n={path:t}:typeof t=="string"||ope(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":tpe.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Y1.length;){const o=Y1[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Y1.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Ki.basename(this.path):void 0}set basename(t){K1(t,"basename"),W1(t,"basename"),this.path=Ki.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ki.dirname(this.path):void 0}set dirname(t){ZM(this.basename,"dirname"),this.path=Ki.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ki.extname(this.path):void 0}set extname(t){if(W1(t,"extname"),ZM(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ki.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Ww(t)&&(t=rpe(t)),K1(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ki.basename(this.path,this.extname):void 0}set stem(t){K1(t,"stem"),W1(t,"stem"),this.path=Ki.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new er(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function W1(e,t){if(e&&e.includes(Ki.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ki.sep+"`")}function K1(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ZM(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function ope(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const spe=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),ape={}.hasOwnProperty;class yE extends spe{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Yhe()}copy(){const t=new yE;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(V1(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Z1("data",this.frozen),this.namespace[t]=n,this):ape.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Z1("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Wm(t),r=this.parser||this.Parser;return X1("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),X1("process",this.parser||this.Parser),Q1("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,a){const u=Wm(t),c=r.parse(u);r.run(c,u,function(h,p,g){if(h||!p||!g)return f(h);const y=p,b=r.stringify(y,g);cpe(b)?g.value=b:g.result=b,f(h,g)});function f(h,p){h||!p?a(h):o?o(p):n(void 0,p)}}}processSync(t){let n=!1,r;return this.freeze(),X1("processSync",this.parser||this.Parser),Q1("processSync",this.compiler||this.Compiler),this.process(t,i),eO("processSync","process",n),r;function i(o,a){n=!0,XM(o),r=a}}run(t,n,r){JM(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(a,u){const c=Wm(n);i.run(t,c,f);function f(h,p,g){const y=p||t;h?u(h):a?a(y):r(void 0,y,g)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),eO("runSync","run",r),i;function o(a,u){XM(a),i=u,r=!0}}stringify(t,n){this.freeze();const r=Wm(n),i=this.compiler||this.Compiler;return Q1("stringify",i),JM(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Z1("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(f){if(typeof f=="function")c(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[h,...p]=f;c(h,p)}else a(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function a(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");u(f.plugins),f.settings&&(i.settings=V1(!0,i.settings,f.settings))}function u(f){let h=-1;if(f!=null)if(Array.isArray(f))for(;++h<f.length;){const p=f[h];o(p)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function c(f,h){let p=-1,g=-1;for(;++p<r.length;)if(r[p][0]===f){g=p;break}if(g===-1)r.push([f,...h]);else if(h.length>0){let[y,...b]=h;const v=r[g][1];Yw(v)&&Yw(y)&&(y=V1(!0,v,y)),r[g]=[f,y,...b]}}}}const lpe=new yE().freeze();function X1(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Q1(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Z1(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function JM(e){if(!Yw(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function eO(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Wm(e){return upe(e)?e:new qF(e)}function upe(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function cpe(e){return typeof e=="string"||fpe(e)}function fpe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const dpe="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",tO=[],nO={allowDangerousHtml:!0},hpe=/^(https?|ircs?|mailto|xmpp)$/i,ppe=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function mpe(e){const t=gpe(e),n=ype(e);return bpe(t.runSync(t.parse(n),n),e)}function gpe(e){const t=e.rehypePlugins||tO,n=e.remarkPlugins||tO,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...nO}:nO;return lpe().use(Xde).use(n).use(Ghe,r).use(t)}function ype(e){const t=e.children||"",n=new qF;return typeof t=="string"&&(n.value=t),n}function bpe(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,a=t.skipHtml,u=t.unwrapDisallowed,c=t.urlTransform||vpe;for(const h of ppe)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+dpe+h.id,void 0);return hb(e,f),$ce(e,{Fragment:E.Fragment,components:i,ignoreInvalidStyle:!0,jsx:E.jsx,jsxs:E.jsxs,passKeys:!0,passNode:!0});function f(h,p,g){if(h.type==="raw"&&g&&typeof p=="number")return a?g.children.splice(p,1):g.children[p]={type:"text",value:h.value},p;if(h.type==="element"){let y;for(y in U1)if(Object.hasOwn(U1,y)&&Object.hasOwn(h.properties,y)){const b=h.properties[y],v=U1[y];(v===null||v.includes(h.tagName))&&(h.properties[y]=c(String(b||""),y,h))}}if(h.type==="element"){let y=n?!n.includes(h.tagName):o?o.includes(h.tagName):!1;if(!y&&r&&typeof p=="number"&&(y=!r(h,p,g)),y&&g&&typeof p=="number")return u&&h.children?g.children.splice(p,1,...h.children):g.children.splice(p,1),p}}}function vpe(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||hpe.test(e.slice(0,t))?e:""}const xpe=/[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g,wpe=Object.hasOwnProperty;class Spe{constructor(){this.occurrences,this.reset()}slug(t,n){const r=this;let i=Cpe(t,n===!0);const o=i;for(;wpe.call(r.occurrences,i);)r.occurrences[o]++,i=o+"-"+r.occurrences[o];return r.occurrences[i]=0,i}reset(){this.occurrences=Object.create(null)}}function Cpe(e,t){return typeof e!="string"?"":(t||(e=e.toLowerCase()),e.replace(xpe,"").replace(/ /g,"-"))}function Epe(e){const t=e.type==="element"?e.tagName.toLowerCase():"",n=t.length===2&&t.charCodeAt(0)===104?t.charCodeAt(1):0;return n>48&&n<55?n-48:void 0}function kpe(e){return"children"in e?VF(e):"value"in e?e.value:""}function Rpe(e){return e.type==="text"?e.value:"children"in e?VF(e):""}function VF(e){let t=-1;const n=[];for(;++t<e.children.length;)n[t]=Rpe(e.children[t]);return n.join("")}const _pe={},rO=new Spe;function Tpe(e){const n=(e||_pe).prefix||"";return function(r){rO.reset(),hb(r,"element",function(i){Epe(i)&&!i.properties.id&&(i.properties.id=n+rO.slug(kpe(i)))})}}function Ape(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Dpe(e,t,n){const i=fb((n||{}).ignore||[]),o=Mpe(t);let a=-1;for(;++a<o.length;)GF(e,"text",u);function u(f,h){let p=-1,g;for(;++p<h.length;){const y=h[p],b=g?g.children:void 0;if(i(y,b?b.indexOf(y):void 0,g))return;g=y}if(g)return c(f,h)}function c(f,h){const p=h[h.length-1],g=o[a][0],y=o[a][1];let b=0;const S=p.children.indexOf(f);let x=!1,_=[];g.lastIndex=0;let R=g.exec(f.value);for(;R;){const T=R.index,A={index:R.index,input:R.input,stack:[...h,f]};let D=y(...R,A);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?g.lastIndex=T+1:(b!==T&&_.push({type:"text",value:f.value.slice(b,T)}),Array.isArray(D)?_.push(...D):D&&_.push(D),b=T+R[0].length,x=!0),!g.global)break;R=g.exec(f.value)}return x?(b<f.value.length&&_.push({type:"text",value:f.value.slice(b)}),p.children.splice(S,1,..._)):_=[f],S+_.length}}function Mpe(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([Ope(i[0]),$pe(i[1])])}return t}function Ope(e){return typeof e=="string"?new RegExp(Ape(e),"g"):e}function $pe(e){return typeof e=="function"?e:function(){return e}}const J1="phrasing",ex=["autolink","link","image","label"];function Ppe(){return{transforms:[Bpe],enter:{literalAutolink:Ipe,literalAutolinkEmail:tx,literalAutolinkHttp:tx,literalAutolinkWww:tx},exit:{literalAutolink:zpe,literalAutolinkEmail:Fpe,literalAutolinkHttp:jpe,literalAutolinkWww:Lpe}}}function Npe(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:J1,notInConstruct:ex},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:J1,notInConstruct:ex},{character:":",before:"[ps]",after:"\\/",inConstruct:J1,notInConstruct:ex}]}}function Ipe(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function tx(e){this.config.enter.autolinkProtocol.call(this,e)}function jpe(e){this.config.exit.autolinkProtocol.call(this,e)}function Lpe(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Fpe(e){this.config.exit.autolinkEmail.call(this,e)}function zpe(e){this.exit(e)}function Bpe(e){Dpe(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Upe],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Hpe]],{ignore:["link","linkReference"]})}function Upe(e,t,n,r,i){let o="";if(!YF(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!Gpe(n)))return!1;const a=qpe(n+r);if(!a[0])return!1;const u={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[u,{type:"text",value:a[1]}]:u}function Hpe(e,t,n,r){return!YF(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Gpe(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function qpe(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Yg(e,"(");let o=Yg(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function YF(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ql(n)||lb(n))&&(!t||n!==47)}WF.peek=eme;function Vpe(){this.buffer()}function Ype(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Wpe(){this.buffer()}function Kpe(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Xpe(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Fi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Qpe(e){this.exit(e)}function Zpe(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Fi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Jpe(e){this.exit(e)}function eme(){return"["}function WF(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const a=n.enter("footnoteReference"),u=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),u(),a(),o+=i.move("]"),o}function tme(){return{enter:{gfmFootnoteCallString:Vpe,gfmFootnoteCall:Ype,gfmFootnoteDefinitionLabelString:Wpe,gfmFootnoteDefinition:Kpe},exit:{gfmFootnoteCallString:Xpe,gfmFootnoteCall:Qpe,gfmFootnoteDefinitionLabelString:Zpe,gfmFootnoteDefinition:Jpe}}}function nme(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:WF},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,a){const u=o.createTracker(a);let c=u.move("[^");const f=o.enter("footnoteDefinition"),h=o.enter("label");return c+=u.move(o.safe(o.associationId(r),{before:c,after:"]"})),h(),c+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),c+=u.move((t?`
504
+ `:" ")+o.indentLines(o.containerFlow(r,u.current()),t?KF:rme))),f(),c}}function rme(e,t,n){return t===0?e:KF(e,t,n)}function KF(e,t,n){return(n?"":" ")+e}const ime=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];XF.peek=ume;function ome(){return{canContainEols:["delete"],enter:{strikethrough:ame},exit:{strikethrough:lme}}}function sme(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:ime}],handlers:{delete:XF}}}function ame(e){this.enter({type:"delete",children:[]},e)}function lme(e){this.exit(e)}function XF(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function ume(){return"~"}function cme(e){return e.length}function fme(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||cme,o=[],a=[],u=[],c=[];let f=0,h=-1;for(;++h<e.length;){const v=[],S=[];let x=-1;for(e[h].length>f&&(f=e[h].length);++x<e[h].length;){const _=dme(e[h][x]);if(n.alignDelimiters!==!1){const R=i(_);S[x]=R,(c[x]===void 0||R>c[x])&&(c[x]=R)}v.push(_)}a[h]=v,u[h]=S}let p=-1;if(typeof r=="object"&&"length"in r)for(;++p<f;)o[p]=iO(r[p]);else{const v=iO(r);for(;++p<f;)o[p]=v}p=-1;const g=[],y=[];for(;++p<f;){const v=o[p];let S="",x="";v===99?(S=":",x=":"):v===108?S=":":v===114&&(x=":");let _=n.alignDelimiters===!1?1:Math.max(1,c[p]-S.length-x.length);const R=S+"-".repeat(_)+x;n.alignDelimiters!==!1&&(_=S.length+_+x.length,_>c[p]&&(c[p]=_),y[p]=_),g[p]=R}a.splice(1,0,g),u.splice(1,0,y),h=-1;const b=[];for(;++h<a.length;){const v=a[h],S=u[h];p=-1;const x=[];for(;++p<f;){const _=v[p]||"";let R="",T="";if(n.alignDelimiters!==!1){const A=c[p]-(S[p]||0),D=o[p];D===114?R=" ".repeat(A):D===99?A%2?(R=" ".repeat(A/2+.5),T=" ".repeat(A/2-.5)):(R=" ".repeat(A/2),T=R):T=" ".repeat(A)}n.delimiterStart!==!1&&!p&&x.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&_==="")&&(n.delimiterStart!==!1||p)&&x.push(" "),n.alignDelimiters!==!1&&x.push(R),x.push(_),n.alignDelimiters!==!1&&x.push(T),n.padding!==!1&&x.push(" "),(n.delimiterEnd!==!1||p!==f-1)&&x.push("|")}b.push(n.delimiterEnd===!1?x.join("").replace(/ +$/,""):x.join(""))}return b.join(`
505
+ `)}function dme(e){return e==null?"":String(e)}function iO(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function hme(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const a=n.indentLines(n.containerFlow(e,o.current()),pme);return i(),a}function pme(e,t,n){return">"+(n?"":" ")+e}function mme(e,t){return oO(e,t.inConstruct,!0)&&!oO(e,t.notInConstruct,!1)}function oO(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function sO(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
506
+ `&&mme(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
507
+ `}function gme(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>a&&(a=o):o=1,i=r+t.length,r=n.indexOf(t,i);return a}function yme(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function bme(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function vme(e,t,n,r){const i=bme(n),o=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(yme(e,n)){const p=n.enter("codeIndented"),g=n.indentLines(o,xme);return p(),g}const u=n.createTracker(r),c=i.repeat(Math.max(gme(o,i)+1,3)),f=n.enter("codeFenced");let h=u.move(c);if(e.lang){const p=n.enter(`codeFencedLang${a}`);h+=u.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...u.current()})),p()}if(e.lang&&e.meta){const p=n.enter(`codeFencedMeta${a}`);h+=u.move(" "),h+=u.move(n.safe(e.meta,{before:h,after:`
508
+ `,encode:["`"],...u.current()})),p()}return h+=u.move(`
509
+ `),o&&(h+=u.move(o+`
510
+ `)),h+=u.move(c),f(),h}function xme(e,t,n){return(n?"":" ")+e}function bE(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function wme(e,t,n,r){const i=bE(n),o=i==='"'?"Quote":"Apostrophe",a=n.enter("definition");let u=n.enter("label");const c=n.createTracker(r);let f=c.move("[");return f+=c.move(n.safe(n.associationId(e),{before:f,after:"]",...c.current()})),f+=c.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),f+=c.move("<"),f+=c.move(n.safe(e.url,{before:f,after:">",...c.current()})),f+=c.move(">")):(u=n.enter("destinationRaw"),f+=c.move(n.safe(e.url,{before:f,after:e.title?" ":`
511
+ `,...c.current()}))),u(),e.title&&(u=n.enter(`title${o}`),f+=c.move(" "+i),f+=c.move(n.safe(e.title,{before:f,after:i,...c.current()})),f+=c.move(i),u()),a(),f}function Sme(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function ph(e){return"&#x"+e.toString(16).toUpperCase()+";"}function my(e,t,n){const r=Zc(e),i=Zc(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}QF.peek=Cme;function QF(e,t,n,r){const i=Sme(n),o=n.enter("emphasis"),a=n.createTracker(r),u=a.move(i);let c=a.move(n.containerPhrasing(e,{after:i,before:u,...a.current()}));const f=c.charCodeAt(0),h=my(r.before.charCodeAt(r.before.length-1),f,i);h.inside&&(c=ph(f)+c.slice(1));const p=c.charCodeAt(c.length-1),g=my(r.after.charCodeAt(0),p,i);g.inside&&(c=c.slice(0,-1)+ph(p));const y=a.move(i);return o(),n.attentionEncodeSurroundingInfo={after:g.outside,before:h.outside},u+c+y}function Cme(e,t,n){return n.options.emphasis||"*"}function Eme(e,t){let n=!1;return hb(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,qw}),!!((!e.depth||e.depth<3)&&cE(e)&&(t.options.setext||n))}function kme(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(Eme(e,n)){const h=n.enter("headingSetext"),p=n.enter("phrasing"),g=n.containerPhrasing(e,{...o.current(),before:`
512
+ `,after:`
513
+ `});return p(),h(),g+`
514
+ `+(i===1?"=":"-").repeat(g.length-(Math.max(g.lastIndexOf("\r"),g.lastIndexOf(`
515
+ `))+1))}const a="#".repeat(i),u=n.enter("headingAtx"),c=n.enter("phrasing");o.move(a+" ");let f=n.containerPhrasing(e,{before:"# ",after:`
516
+ `,...o.current()});return/^[\t ]/.test(f)&&(f=ph(f.charCodeAt(0))+f.slice(1)),f=f?a+" "+f:a,n.options.closeAtx&&(f+=" "+a),c(),u(),f}ZF.peek=Rme;function ZF(e){return e.value||""}function Rme(){return"<"}JF.peek=_me;function JF(e,t,n,r){const i=bE(n),o=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let u=n.enter("label");const c=n.createTracker(r);let f=c.move("![");return f+=c.move(n.safe(e.alt,{before:f,after:"]",...c.current()})),f+=c.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),f+=c.move("<"),f+=c.move(n.safe(e.url,{before:f,after:">",...c.current()})),f+=c.move(">")):(u=n.enter("destinationRaw"),f+=c.move(n.safe(e.url,{before:f,after:e.title?" ":")",...c.current()}))),u(),e.title&&(u=n.enter(`title${o}`),f+=c.move(" "+i),f+=c.move(n.safe(e.title,{before:f,after:i,...c.current()})),f+=c.move(i),u()),f+=c.move(")"),a(),f}function _me(){return"!"}e6.peek=Tme;function e6(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let a=n.enter("label");const u=n.createTracker(r);let c=u.move("![");const f=n.safe(e.alt,{before:c,after:"]",...u.current()});c+=u.move(f+"]["),a();const h=n.stack;n.stack=[],a=n.enter("reference");const p=n.safe(n.associationId(e),{before:c,after:"]",...u.current()});return a(),n.stack=h,o(),i==="full"||!f||f!==p?c+=u.move(p+"]"):i==="shortcut"?c=c.slice(0,-1):c+=u.move("]"),c}function Tme(){return"!"}t6.peek=Ame;function t6(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const a=n.unsafe[o],u=n.compilePattern(a);let c;if(a.atBreak)for(;c=u.exec(r);){let f=c.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(c.index+1)}}return i+r+i}function Ame(){return"`"}function n6(e,t){const n=cE(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}r6.peek=Dme;function r6(e,t,n,r){const i=bE(n),o=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let u,c;if(n6(e,n)){const h=n.stack;n.stack=[],u=n.enter("autolink");let p=a.move("<");return p+=a.move(n.containerPhrasing(e,{before:p,after:">",...a.current()})),p+=a.move(">"),u(),n.stack=h,p}u=n.enter("link"),c=n.enter("label");let f=a.move("[");return f+=a.move(n.containerPhrasing(e,{before:f,after:"](",...a.current()})),f+=a.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=a.move("<"),f+=a.move(n.safe(e.url,{before:f,after:">",...a.current()})),f+=a.move(">")):(c=n.enter("destinationRaw"),f+=a.move(n.safe(e.url,{before:f,after:e.title?" ":")",...a.current()}))),c(),e.title&&(c=n.enter(`title${o}`),f+=a.move(" "+i),f+=a.move(n.safe(e.title,{before:f,after:i,...a.current()})),f+=a.move(i),c()),f+=a.move(")"),u(),f}function Dme(e,t,n){return n6(e,n)?"<":"["}i6.peek=Mme;function i6(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let a=n.enter("label");const u=n.createTracker(r);let c=u.move("[");const f=n.containerPhrasing(e,{before:c,after:"]",...u.current()});c+=u.move(f+"]["),a();const h=n.stack;n.stack=[],a=n.enter("reference");const p=n.safe(n.associationId(e),{before:c,after:"]",...u.current()});return a(),n.stack=h,o(),i==="full"||!f||f!==p?c+=u.move(p+"]"):i==="shortcut"?c=c.slice(0,-1):c+=u.move("]"),c}function Mme(){return"["}function vE(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Ome(e){const t=vE(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function $me(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function o6(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Pme(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let a=e.ordered?$me(n):vE(n);const u=e.ordered?a==="."?")":".":Ome(n);let c=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&h&&(!h.children||!h.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),o6(n)===a&&h){let p=-1;for(;++p<e.children.length;){const g=e.children[p];if(g&&g.type==="listItem"&&g.children&&g.children[0]&&g.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(a=u),n.bulletCurrent=a;const f=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=o,i(),f}function Nme(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Ime(e,t,n,r){const i=Nme(n);let o=n.bulletCurrent||vE(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let a=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const u=n.createTracker(r);u.move(o+" ".repeat(a-o.length)),u.shift(a);const c=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,u.current()),h);return c(),f;function h(p,g,y){return g?(y?"":" ".repeat(a))+p:(y?o:o+" ".repeat(a-o.length))+p}}function jme(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),a=n.containerPhrasing(e,r);return o(),i(),a}const Lme=fb(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Fme(e,t,n,r){return(e.children.some(function(a){return Lme(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function zme(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}s6.peek=Bme;function s6(e,t,n,r){const i=zme(n),o=n.enter("strong"),a=n.createTracker(r),u=a.move(i+i);let c=a.move(n.containerPhrasing(e,{after:i,before:u,...a.current()}));const f=c.charCodeAt(0),h=my(r.before.charCodeAt(r.before.length-1),f,i);h.inside&&(c=ph(f)+c.slice(1));const p=c.charCodeAt(c.length-1),g=my(r.after.charCodeAt(0),p,i);g.inside&&(c=c.slice(0,-1)+ph(p));const y=a.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:g.outside,before:h.outside},u+c+y}function Bme(e,t,n){return n.options.strong||"*"}function Ume(e,t,n,r){return n.safe(e.value,r)}function Hme(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Gme(e,t,n){const r=(o6(n)+(n.options.ruleSpaces?" ":"")).repeat(Hme(n));return n.options.ruleSpaces?r.slice(0,-1):r}const a6={blockquote:hme,break:sO,code:vme,definition:wme,emphasis:QF,hardBreak:sO,heading:kme,html:ZF,image:JF,imageReference:e6,inlineCode:t6,link:r6,linkReference:i6,list:Pme,listItem:Ime,paragraph:jme,root:Fme,strong:s6,text:Ume,thematicBreak:Gme};function qme(){return{enter:{table:Vme,tableData:aO,tableHeader:aO,tableRow:Wme},exit:{codeText:Kme,table:Yme,tableData:nx,tableHeader:nx,tableRow:nx}}}function Vme(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function Yme(e){this.exit(e),this.data.inTable=void 0}function Wme(e){this.enter({type:"tableRow",children:[]},e)}function nx(e){this.exit(e)}function aO(e){this.enter({type:"tableCell",children:[]},e)}function Kme(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Xme));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Xme(e,t){return t==="|"?t:e}function Qme(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
517
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:g,table:a,tableCell:c,tableRow:u}};function a(y,b,v,S){return f(h(y,v,S),y.align)}function u(y,b,v,S){const x=p(y,v,S),_=f([x]);return _.slice(0,_.indexOf(`
518
+ `))}function c(y,b,v,S){const x=v.enter("tableCell"),_=v.enter("phrasing"),R=v.containerPhrasing(y,{...S,before:o,after:o});return _(),x(),R}function f(y,b){return fme(y,{align:b,alignDelimiters:r,padding:n,stringLength:i})}function h(y,b,v){const S=y.children;let x=-1;const _=[],R=b.enter("table");for(;++x<S.length;)_[x]=p(S[x],b,v);return R(),_}function p(y,b,v){const S=y.children;let x=-1;const _=[],R=b.enter("tableRow");for(;++x<S.length;)_[x]=c(S[x],y,b,v);return R(),_}function g(y,b,v){let S=a6.inlineCode(y,b,v);return v.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function Zme(){return{exit:{taskListCheckValueChecked:lO,taskListCheckValueUnchecked:lO,paragraph:ege}}}function Jme(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:tge}}}function lO(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function ege(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,a;for(;++o<i.length;){const u=i[o];if(u.type==="paragraph"){a=u;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function tge(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);o&&u.move(a);let c=a6.listItem(e,t,n,{...r,...u.current()});return o&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),c;function f(h){return h+a}}function nge(){return[Ppe(),tme(),ome(),qme(),Zme()]}function rge(e){return{extensions:[Npe(),nme(e),sme(),Qme(e),Jme()]}}const ige={tokenize:cge,partial:!0},l6={tokenize:fge,partial:!0},u6={tokenize:dge,partial:!0},c6={tokenize:hge,partial:!0},oge={tokenize:pge,partial:!0},f6={name:"wwwAutolink",tokenize:lge,previous:h6},d6={name:"protocolAutolink",tokenize:uge,previous:p6},ls={name:"emailAutolink",tokenize:age,previous:m6},co={};function sge(){return{text:co}}let ll=48;for(;ll<123;)co[ll]=ls,ll++,ll===58?ll=65:ll===91&&(ll=97);co[43]=ls;co[45]=ls;co[46]=ls;co[95]=ls;co[72]=[ls,d6];co[104]=[ls,d6];co[87]=[ls,f6];co[119]=[ls,f6];function age(e,t,n){const r=this;let i,o;return a;function a(p){return!Kw(p)||!m6.call(r,r.previous)||xE(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(p))}function u(p){return Kw(p)?(e.consume(p),u):p===64?(e.consume(p),c):n(p)}function c(p){return p===46?e.check(oge,h,f)(p):p===45||p===95||Qn(p)?(o=!0,e.consume(p),c):h(p)}function f(p){return e.consume(p),i=!0,c}function h(p){return o&&i&&sr(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function lge(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!h6.call(r,r.previous)||xE(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(ige,e.attempt(l6,e.attempt(u6,o),n),n)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function uge(e,t,n){const r=this;let i="",o=!1;return a;function a(p){return(p===72||p===104)&&p6.call(r,r.previous)&&!xE(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(p),e.consume(p),u):n(p)}function u(p){if(sr(p)&&i.length<5)return i+=String.fromCodePoint(p),e.consume(p),u;if(p===58){const g=i.toLowerCase();if(g==="http"||g==="https")return e.consume(p),c}return n(p)}function c(p){return p===47?(e.consume(p),o?f:(o=!0,c)):n(p)}function f(p){return p===null||dy(p)||Wt(p)||ql(p)||lb(p)?n(p):e.attempt(l6,e.attempt(u6,h),n)(p)}function h(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function cge(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),o):n(a)}function o(a){return a===null?n(a):t(a)}}function fge(e,t,n){let r,i,o;return a;function a(f){return f===46||f===95?e.check(c6,c,u)(f):f===null||Wt(f)||ql(f)||f!==45&&lb(f)?c(f):(o=!0,e.consume(f),a)}function u(f){return f===95?r=!0:(i=r,r=void 0),e.consume(f),a}function c(f){return i||r||!o?n(f):t(f)}}function dge(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?o(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(c6,t,o)(a):a===null||Wt(a)||ql(a)?t(a):(e.consume(a),i)}function o(a){return a===41&&r++,e.consume(a),i}}function hge(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),o):u===93?(e.consume(u),i):u===60||u===null||Wt(u)||ql(u)?t(u):n(u)}function i(u){return u===null||u===40||u===91||Wt(u)||ql(u)?t(u):r(u)}function o(u){return sr(u)?a(u):n(u)}function a(u){return u===59?(e.consume(u),r):sr(u)?(e.consume(u),a):n(u)}}function pge(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return Qn(o)?n(o):t(o)}}function h6(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Wt(e)}function p6(e){return!sr(e)}function m6(e){return!(e===47||Kw(e))}function Kw(e){return e===43||e===45||e===46||e===95||Qn(e)}function xE(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const mge={tokenize:Cge,partial:!0};function gge(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:xge,continuation:{tokenize:wge},exit:Sge}},text:{91:{name:"gfmFootnoteCall",tokenize:vge},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:yge,resolveTo:bge}}}}function yge(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const c=r.events[i][1];if(c.type==="labelImage"){a=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return u;function u(c){if(!a||!a._balanced)return n(c);const f=Fi(r.sliceSerialize({start:a.end,end:r.now()}));return f.codePointAt(0)!==94||!o.includes(f.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function bge(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...u),e}function vge(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,a;return u;function u(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),c}function c(p){return p!==94?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(p){if(o>999||p===93&&!a||p===null||p===91||Wt(p))return n(p);if(p===93){e.exit("chunkString");const g=e.exit("gfmFootnoteCallString");return i.includes(Fi(r.sliceSerialize(g)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return Wt(p)||(a=!0),o++,e.consume(p),p===92?h:f}function h(p){return p===91||p===92||p===93?(e.consume(p),o++,f):f(p)}}function xge(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,a=0,u;return c;function c(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(b)}function h(b){if(a>999||b===93&&!u||b===null||b===91||Wt(b))return n(b);if(b===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return o=Fi(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),g}return Wt(b)||(u=!0),a++,e.consume(b),b===92?p:h}function p(b){return b===91||b===92||b===93?(e.consume(b),a++,h):h(b)}function g(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),i.includes(o)||i.push(o),_t(e,y,"gfmFootnoteDefinitionWhitespace")):n(b)}function y(b){return t(b)}}function wge(e,t,n){return e.check(qh,t,e.attempt(mge,t,n))}function Sge(e){e.exit("gfmFootnoteDefinition")}function Cge(e,t,n){const r=this;return _t(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(o):n(o)}}function Ege(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,u){let c=-1;for(;++c<a.length;)if(a[c][0]==="enter"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._close){let f=c;for(;f--;)if(a[f][0]==="exit"&&a[f][1].type==="strikethroughSequenceTemporary"&&a[f][1]._open&&a[c][1].end.offset-a[c][1].start.offset===a[f][1].end.offset-a[f][1].start.offset){a[c][1].type="strikethroughSequence",a[f][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},a[f][1].start),end:Object.assign({},a[c][1].end)},p={type:"strikethroughText",start:Object.assign({},a[f][1].end),end:Object.assign({},a[c][1].start)},g=[["enter",h,u],["enter",a[f][1],u],["exit",a[f][1],u],["enter",p,u]],y=u.parser.constructs.insideSpan.null;y&&Wr(g,g.length,0,ub(y,a.slice(f+1,c),u)),Wr(g,g.length,0,[["exit",p,u],["enter",a[c][1],u],["exit",a[c][1],u],["exit",h,u]]),Wr(a,f-1,c-f+3,g),c=f+g.length-2;break}}for(c=-1;++c<a.length;)a[c][1].type==="strikethroughSequenceTemporary"&&(a[c][1].type="data");return a}function o(a,u,c){const f=this.previous,h=this.events;let p=0;return g;function g(b){return f===126&&h[h.length-1][1].type!=="characterEscape"?c(b):(a.enter("strikethroughSequenceTemporary"),y(b))}function y(b){const v=Zc(f);if(b===126)return p>1?c(b):(a.consume(b),p++,y);if(p<2&&!n)return c(b);const S=a.exit("strikethroughSequenceTemporary"),x=Zc(b);return S._open=!x||x===2&&!!v,S._close=!v||v===2&&!!x,u(b)}}}class kge{constructor(){this.map=[]}add(t,n,r){Rge(this,t,n,r)}consume(t){if(this.map.sort(function(o,a){return o[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0}}function Rge(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function _ge(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Tge(){return{flow:{null:{name:"table",tokenize:Age,resolveAll:Dge}}}}function Age(e,t,n){const r=this;let i=0,o=0,a;return u;function u(j){let I=r.events.length-1;for(;I>-1;){const G=r.events[I][1].type;if(G==="lineEnding"||G==="linePrefix")I--;else break}const M=I>-1?r.events[I][1].type:null,B=M==="tableHead"||M==="tableRow"?D:c;return B===D&&r.parser.lazy[r.now().line]?n(j):B(j)}function c(j){return e.enter("tableHead"),e.enter("tableRow"),f(j)}function f(j){return j===124||(a=!0,o+=1),h(j)}function h(j){return j===null?n(j):Je(j)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),y):n(j):wt(j)?_t(e,h,"whitespace")(j):(o+=1,a&&(a=!1,i+=1),j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),a=!0,h):(e.enter("data"),p(j)))}function p(j){return j===null||j===124||Wt(j)?(e.exit("data"),h(j)):(e.consume(j),j===92?g:p)}function g(j){return j===92||j===124?(e.consume(j),p):p(j)}function y(j){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(j):(e.enter("tableDelimiterRow"),a=!1,wt(j)?_t(e,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):b(j))}function b(j){return j===45||j===58?S(j):j===124?(a=!0,e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),v):A(j)}function v(j){return wt(j)?_t(e,S,"whitespace")(j):S(j)}function S(j){return j===58?(o+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),x):j===45?(o+=1,x(j)):j===null||Je(j)?T(j):A(j)}function x(j){return j===45?(e.enter("tableDelimiterFiller"),_(j)):A(j)}function _(j){return j===45?(e.consume(j),_):j===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),R):(e.exit("tableDelimiterFiller"),R(j))}function R(j){return wt(j)?_t(e,T,"whitespace")(j):T(j)}function T(j){return j===124?b(j):j===null||Je(j)?!a||i!==o?A(j):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(j)):A(j)}function A(j){return n(j)}function D(j){return e.enter("tableRow"),O(j)}function O(j){return j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),O):j===null||Je(j)?(e.exit("tableRow"),t(j)):wt(j)?_t(e,O,"whitespace")(j):(e.enter("data"),$(j))}function $(j){return j===null||j===124||Wt(j)?(e.exit("data"),O(j)):(e.consume(j),j===92?z:$)}function z(j){return j===92||j===124?(e.consume(j),$):$(j)}}function Dge(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],a=[0,0,0,0],u=!1,c=0,f,h,p;const g=new kge;for(;++n<e.length;){const y=e[n],b=y[1];y[0]==="enter"?b.type==="tableHead"?(u=!1,c!==0&&(uO(g,t,c,f,h),h=void 0,c=0),f={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},g.add(n,0,[["enter",f,t]])):b.type==="tableRow"||b.type==="tableDelimiterRow"?(r=!0,p=void 0,o=[0,0,0,0],a=[0,n+1,0,0],u&&(u=!1,h={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},g.add(n,0,[["enter",h,t]])),i=b.type==="tableDelimiterRow"?2:h?3:1):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(o[1]!==0&&(a[0]=a[1],p=Km(g,t,o,i,void 0,p),o=[0,0,0,0]),a[2]=n)):b.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(a[0]=a[1],p=Km(g,t,o,i,void 0,p)),o=a,a=[o[1],n,0,0])):b.type==="tableHead"?(u=!0,c=n):b.type==="tableRow"||b.type==="tableDelimiterRow"?(c=n,o[1]!==0?(a[0]=a[1],p=Km(g,t,o,i,n,p)):a[1]!==0&&(p=Km(g,t,a,i,n,p)),i=0):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(a[3]=n)}for(c!==0&&uO(g,t,c,f,h),g.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=_ge(t.events,n))}return e}function Km(e,t,n,r,i,o){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(o.end=Object.assign({},nc(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const c=nc(t.events,n[1]);if(o={type:a,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const f=nc(t.events,n[2]),h=nc(t.events,n[3]),p={type:u,start:Object.assign({},f),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",p,t]]),r!==2){const g=t.events[n[2]],y=t.events[n[3]];if(g[1].end=Object.assign({},y[1].end),g[1].type="chunkText",g[1].contentType="text",n[3]>n[2]+1){const b=n[2]+1,v=n[3]-n[2]-1;e.add(b,v,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return i!==void 0&&(o.end=Object.assign({},nc(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function uO(e,t,n,r,i){const o=[],a=nc(t.events,n);i&&(i.end=Object.assign({},a),o.push(["exit",i,t])),r.end=Object.assign({},a),o.push(["exit",r,t]),e.add(n+1,0,o)}function nc(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Mge={name:"tasklistCheck",tokenize:$ge};function Oge(){return{text:{91:Mge}}}function $ge(e,t,n){const r=this;return i;function i(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),o)}function o(c){return Wt(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),a):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),a):n(c)}function a(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(c)}function u(c){return Je(c)?t(c):wt(c)?e.check({tokenize:Pge},t,n)(c):n(c)}}function Pge(e,t,n){return _t(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Nge(e){return kF([sge(),gge(),Ege(e),Tge(),Oge()])}const Ige={};function jge(e){const t=this,n=e||Ige,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Nge(n)),o.push(nge()),a.push(rge(n))}const Lge=new Set(Object.keys(HP)),cO={js:"javascript",ts:"typescript",py:"python",sh:"bash",shell:"bash",md:"markdown"};function Fge(e){const t=/language-([\w-]+)/.exec(e??"");if(!t)return;const n=t[1].toLowerCase();if(cO[n])return cO[n];if(Lge.has(n))return n}function g6(e){var t;return C.isValidElement(e)&&((t=e.props)==null?void 0:t.type)==="checkbox"}function zge(e){return C.isValidElement(e)&&e.type===Kc}function Bge(e){return C.Children.toArray(e).some(t=>{if(!C.isValidElement(t))return!1;const n=C.Children.toArray(t.props.children);return g6(n[0])})}function Xw(e){if(e==null||typeof e=="boolean")return"";if(typeof e=="string")return e;if(typeof e=="number")return String(e);if(Array.isArray(e))return e.map(Xw).join("");if(C.isValidElement(e)){const t=e.props.children;return Xw(t)}return""}function fO(e){return C.Children.toArray(e).filter(t=>C.isValidElement(t)).map((t,n)=>{const r=C.Children.toArray(t.props.children),i=r[0];if(g6(i)){const a=!!i.props.checked,u=r.slice(1);return{value:`item-${n}`,label:E.jsxs(Xe,{ay:"center",gap:2,children:[E.jsx(OL,{checked:a,disabled:!0}),E.jsx(je,{size:1,children:u})]})}}const o=r.findIndex(zge);if(o>=0){const a=r[o],u=[...r.slice(0,o),...r.slice(o+1)];return{id:`group-${n}`,category:Xw(u).trim(),items:a.props.items??[]}}return{value:`item-${n}`,label:E.jsx(je,{size:1,children:r})}})}const Uge={p:({children:e})=>E.jsx(je,{my:1,size:1,render:E.jsx("p",{}),children:e}),h1:({children:e,id:t})=>E.jsx(je,{weight:"bold",size:4,my:2,render:E.jsx("h1",{id:t}),children:e}),h2:({children:e,id:t})=>E.jsx(je,{weight:"bold",size:3,mt:2,render:E.jsx("h2",{id:t}),children:e}),h3:({children:e,id:t})=>E.jsx(je,{weight:"bold",size:1,my:1,render:E.jsx("h3",{id:t}),children:e}),h4:({children:e,id:t})=>E.jsx(je,{weight:"bold",size:1,render:E.jsx("h4",{id:t}),children:e}),h5:({children:e,id:t})=>E.jsx(je,{weight:"bold",size:0,render:E.jsx("h5",{id:t}),children:e}),h6:({children:e,id:t})=>E.jsx(je,{weight:"bold",size:-1,render:E.jsx("h6",{id:t}),children:e}),strong:({children:e})=>E.jsx(je,{weight:"bold",children:e}),em:({children:e})=>E.jsx(je,{render:E.jsx("em",{}),children:e}),del:({children:e})=>E.jsx(je,{strikethrough:!0,render:E.jsx("del",{}),children:e}),a:({children:e,href:t})=>E.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:e}),ul:({children:e})=>E.jsx(Kc,{type:Bge(e)?"none":"unordered",size:"large",items:fO(e),style:{display:"block"},my:2}),ol:({children:e})=>E.jsx(Kc,{type:"ordered",size:"large",items:fO(e),style:{display:"block"},my:2}),blockquote:({children:e})=>E.jsx("blockquote",{children:e}),hr:()=>E.jsx(gS,{}),table:({children:e})=>E.jsx(eE,{children:E.jsx(tE,{bordered:!0,children:e})}),thead:({children:e})=>E.jsx(uF,{children:e}),tbody:({children:e})=>E.jsx(rE,{children:e}),tr:({children:e})=>E.jsx(nE,{children:e}),th:({children:e})=>E.jsx(cF,{children:e}),td:({children:e})=>E.jsx(fh,{children:e}),pre:({children:e})=>E.jsx(E.Fragment,{children:e}),code:({className:e,children:t,...n})=>{const r=String(t??"");return r.includes(`
519
+ `)?E.jsx(mC,{code:r.replace(/\n$/,""),language:Fge(e),rows:5,defaultExpanded:!1,HeaderProps:{copyable:!0},style:{width:"100%",marginBlockEnd:"0.5rem"}}):E.jsx(aI,{...n,children:t})}},Hge=[jge],Gge=[Tpe];function qge({children:e,components:t}){return E.jsx(Ye,{gap:4,fullwidth:!0,children:E.jsx(mpe,{remarkPlugins:Hge,rehypePlugins:Gge,components:{...Uge,...t},children:e})})}const ya=C.memo(qge),y6=()=>{var i;const e=yy(),{data:t=[]}=Si(mF),n=t.find(o=>o.active),r=async o=>{if((n==null?void 0:n.slug)!==o){try{await oce(o)}catch(a){console.error("Project switch failed:",a);return}e.invalidateQueries()}};return t.length===0?null:t.length===1?E.jsxs(Xe,{ay:"center",gap:2,px:2,children:[E.jsx(je,{size:-1,shade:"muted",children:"project"}),E.jsx(je,{size:-1,weight:"bold",children:(n==null?void 0:n.name)??((i=t[0])==null?void 0:i.name)??"default"})]}):E.jsxs(nb,{children:[E.jsx(rb,{render:E.jsx(Ci,{variant:"subtle",size:"small",fullwidth:!0,children:E.jsxs(Xe,{ay:"center",ax:"space-between",gap:2,fullwidth:!0,children:[E.jsxs(Xe,{ay:"center",gap:2,children:[E.jsx(je,{size:-1,shade:"muted",children:"project"}),E.jsx(je,{size:-1,weight:"bold",children:(n==null?void 0:n.name)??"—"})]}),E.jsx(xS,{size:14})]})})}),E.jsx(ah,{children:E.jsx(lh,{side:"bottom",align:"start",children:E.jsx(uh,{children:t.map(o=>E.jsx(Xc,{onClick:()=>{r(o.slug)},children:E.jsxs(Xe,{ay:"center",gap:2,children:[E.jsx(je,{size:-1,weight:o.active?"bold":"normal",children:o.name}),o.active&&E.jsx(je,{size:-1,shade:"muted",children:"(active)"})]})},o.slug))})})})]})};y6.displayName="ProjectSwitcher";const wE=({children:e,...t})=>E.jsx(Ye,{"data-slot":"sidebar",render:E.jsx("nav",{}),ax:"stretch",fullwidth:!0,gap:3,p:4,...t,children:e});wE.displayName="SidebarWrapper";const Vge=["active","waiting","paused","archived"],Yge={active:"Active",waiting:"Waiting",paused:"Paused",archived:"Archived"},Wge=["today","yesterday","thisWeek","earlier"],Kge={today:"Today",yesterday:"Yesterday",thisWeek:"This week",earlier:"Earlier"},Xge=1440*60*1e3;function Qge(e,t){const n=new Date(e),r=new Date(t.getFullYear(),t.getMonth(),t.getDate()),i=new Date(n.getFullYear(),n.getMonth(),n.getDate()),o=Math.floor((r.getTime()-i.getTime())/Xge);return o<=0?"today":o===1?"yesterday":o<7?"thisWeek":"earlier"}function rx(e){const t=oE(e.session.status),n=e.session.status==="archived";return{value:e.session.id,label:E.jsx(v6,{session:e}),content:E.jsxs(Xe,{gap:2,ay:"center",mt:1,mb:2,children:[E.jsx(My,{color:t}),E.jsx(x6,{session:e})]}),action:E.jsx(w6,{session:e.session,categoryPath:e.categoryPath}),"data-archived":n?"":void 0,style:n?{opacity:.4}:void 0}}function Zge(e,t){if(t==="status"){const r=new Map;for(const i of e){const o=i.session.status,a=r.get(o);a?a.push(i):r.set(o,[i])}return Vge.filter(i=>r.has(i)).map(i=>({category:Yge[i],collapsible:!0,items:r.get(i).map(rx)}))}if(t==="recent"){const r=new Date,i=new Map;for(const o of e){const a=Qge(o.session.startedAt,r),u=i.get(a);u?u.push(o):i.set(a,[o])}return Wge.filter(o=>i.has(o)).map(o=>({category:Kge[o],collapsible:!0,items:i.get(o).map(rx)}))}const n=new Map;for(const r of e){const i=r.categoryPath,o=n.get(i);o?o.push(r):n.set(i,[r])}return Array.from(n,([r,i])=>({category:r,collapsible:!0,items:i.map(rx)}))}const dO=e=>e.id??e.category??"",b6=({WrapperProps:e})=>{const[t,n]=C.useState(""),[r,i]=C.useState("group"),[o,a]=C.useState(!1),[u,c]=C.useState({}),f=C.useRef(null),{data:h=[]}=Si(dh({includeArchived:o})),p=C.useMemo(()=>{const S=t.trim().toLowerCase(),x=S?h.filter(_=>_.session.slug.toLowerCase().includes(S)||_.session.name.toLowerCase().includes(S)||_.categoryPath.toLowerCase().includes(S)):h;return Zge(x,r)},[h,t,r]),g=p.map(dO),y=g.length>0&&g.every(S=>u[S]!==!1),b=()=>{const S=!y;c(x=>{const _={...x};for(const R of g)_[R]=S;return _})},v=p.map(S=>{const x=dO(S);return{...S,open:u[x]??!0,onOpenChange:_=>c(R=>({...R,[x]:_}))}});return C.useEffect(()=>{const S=x=>{var _,R;(x.metaKey||x.ctrlKey)&&x.key==="k"&&(x.preventDefault(),(_=f.current)==null||_.focus(),(R=f.current)==null||R.select())};return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[]),E.jsxs(wE,{...e,children:[E.jsx(y6,{}),E.jsx(Xe,{ay:"center",gap:2,fullwidth:!0,children:E.jsx(II,{ref:f,placeholder:"Search for a session",before:E.jsx(XG,{}),after:E.jsx(yP,{hotkey:["meta","k"]}),size:"small",fullwidth:!0,style:{flex:1,minWidth:0},value:t,onChange:S=>n(S.target.value)})}),E.jsxs(Xe,{ay:"center",ax:"space-between",gap:2,children:[E.jsxs(VC,{size:"sm",value:[r],onValueChange:S=>{const x=S[0];x&&i(x)},children:[E.jsx(xc,{value:"group","aria-label":"Group by group",children:E.jsx($l,{trigger:E.jsx(OG,{}),children:"Group by group"})}),E.jsx(xc,{value:"status","aria-label":"Group by status",children:E.jsx($l,{trigger:E.jsx(nq,{}),children:"Group by status"})}),E.jsx(xc,{value:"recent","aria-label":"Group by recent",children:E.jsx($l,{trigger:E.jsx(Q3,{}),children:"Group by recent"})})]}),E.jsxs(Xe,{ay:"center",gap:1,children:[E.jsx(Qd,{size:"small",shape:"square",variant:"subtle",tooltip:o?"Hide archived":"Show archived",pressed:o,onPressedChange:a,icon:{unpressed:E.jsx(bG,{}),pressed:E.jsx(xG,{})}}),p.length>0&&E.jsx(Qd,{size:"small",shape:"square",variant:"subtle",tooltip:y?"Collapse all":"Expand all",pressed:!y,onPressedChange:()=>b(),icon:{unpressed:E.jsx(sG,{}),pressed:E.jsx(xS,{})}})]})]}),p.length===0?E.jsxs(je,{size:-1,shade:"muted",style:{padding:"0.5rem"},children:['No sessions match "',t,'".']}):E.jsx(Kc,{items:v,line:!0,size:"small"})]})};b6.displayName="Sidebar";const v6=({session:e})=>E.jsx(ef,{to:"/$",params:{_splat:`${e.categoryPath}/${e.session.slug}`},children:e.session.slug});v6.displayName="SessionLabel";const x6=({session:e})=>{const{data:t=[]}=Si(dh()),n=t.some(p=>p.session.status==="active"||p.session.status==="waiting"),{data:r}=Si(nce(n)),{data:i}=Si(ice),o=r==null?void 0:r[e.session.id],a=i==null?void 0:i[e.session.id],u=(o==null?void 0:o.linesAdded)??0,c=(o==null?void 0:o.linesRemoved)??0,f=(o==null?void 0:o.filesTouched)??0,h=u>0||c>0;return E.jsxs(Xe,{ay:"center",gap:2,children:[E.jsx(je,{size:-1,shade:"muted",children:Bw(e.session.startedAt)}),h&&E.jsxs(Xe,{ay:"center",gap:1,children:[E.jsx(je,{size:-1,family:"mono",color:"green",children:`+${u}`}),E.jsx(je,{size:-1,family:"mono",color:"red",children:`-${c}`})]}),f>0&&E.jsxs(Xe,{ay:"center",gap:1,children:[E.jsx(e4,{size:12}),E.jsx(je,{size:-1,family:"mono",shade:"muted",children:f})]}),a&&E.jsx(G$,{TriggerProps:{openOnHover:!0},trigger:E.jsx(zG,{size:12,"aria-label":"Session recap"}),title:"Session recap",description:Bw(a.createdAt),PositionerProps:{sideOffset:8,side:"right"},PopupProps:{style:{maxWidth:420}},children:E.jsx(Ye,{my:2,children:E.jsx(ya,{children:a.recap})})})]})};x6.displayName="SessionContent";const w6=({session:e,categoryPath:t})=>{const n=gF(e),{Icon:r}=n,i=e.status==="paused",o=`${t}/${e.slug}`;return E.jsxs(nb,{children:[E.jsx(rb,{render:E.jsx(Ci,{variant:"ghost",size:"xsmall",shape:"square","aria-label":"Session actions",children:E.jsx(pG,{})})}),E.jsx(ah,{children:E.jsx(lh,{side:"bottom",align:"end",children:E.jsxs(uh,{children:[E.jsxs(Xc,{disabled:n.disabled,onClick:n.onClick,render:E.jsx(Xe,{ay:"center",gap:2}),children:[E.jsx(r,{size:14}),n.label]}),E.jsxs(Xc,{disabled:!i,onClick:()=>{navigator.clipboard.writeText(o)},render:E.jsx(Xe,{ay:"center",gap:2}),children:[E.jsx(Eh,{size:14}),"Copy session path"]})]})})})]})};w6.displayName="SessionRowActions";const S6=({children:e,...t})=>E.jsx(Xe,{"data-slot":"top-bar-wrapper",fullwidth:!0,ay:"center",p:4,gap:4,bb:1,style:{position:"sticky",top:0,backgroundColor:"var(--shade-background)",zIndex:1,...t.style},...t,children:e});S6.displayName="TopBarWrapper";const Ud="uiid-theme";function Jge(){return localStorage.getItem(Ud)??"system"}function eye(e){const t=n=>{n.key===Ud&&e()};return window.addEventListener("storage",t),()=>window.removeEventListener("storage",t)}function tye(e){e==="system"?document.documentElement.removeAttribute("data-theme"):document.documentElement.setAttribute("data-theme",e)}function nye(){const e=C.useSyncExternalStore(eye,Jge),t=C.useCallback(n=>{n==="system"?localStorage.removeItem(Ud):localStorage.setItem(Ud,n),tye(n),window.dispatchEvent(new StorageEvent("storage",{key:Ud,newValue:n}))},[]);return{theme:e,setTheme:t}}const C6=()=>{const{theme:e,setTheme:t}=nye();return E.jsxs(VC,{value:[e],onValueChange:n=>{const r=n[0];r&&t(r)},size:"sm",children:[E.jsx(xc,{value:"light","aria-label":"Light mode",children:E.jsx(eq,{})}),E.jsx(xc,{value:"dark","aria-label":"Dark mode",children:E.jsx(VG,{})}),E.jsx(xc,{value:"system","aria-label":"System theme",children:E.jsx(GG,{})})]})};C6.displayName="ThemeToggle";const SE=({sessionCount:e})=>E.jsxs(S6,{children:[E.jsx(je,{size:2,weight:"bold",children:"bertrand"}),E.jsx(C.Activity,{mode:e?"visible":"hidden",children:E.jsxs(cn,{color:"blue",children:[e," session(s)"]})}),E.jsxs(Xe,{gap:3,ay:"center",ml:"auto",children:[E.jsxs(Xe,{gap:2,ay:"center",children:[E.jsx(ix,{to:"/",tooltip:"Session timeline",icon:E.jsx(nG,{})}),E.jsx(ix,{to:"/dev/markdown",tooltip:"Markdown viewer",icon:E.jsx(eG,{})}),E.jsx(ix,{to:"/dev/diff",tooltip:"Diff viewer",icon:E.jsx(J3,{})})]}),E.jsx(C6,{})]})]});SE.displayName="TopBar";const ix=({to:e,tooltip:t,icon:n})=>E.jsx(Ci,{render:E.jsx(ef,{to:e}),nativeButton:!1,tooltip:t,variant:"subtle",size:"small",shape:"square",children:n}),Yh=$7({component:rye});function rye(){return K7({select:t=>t.location.pathname}).startsWith("/dev/")?E.jsxs(Ye,{fullwidth:!0,style:{position:"fixed",inset:0,height:"100dvh"},children:[E.jsx(SE,{}),E.jsx(Ye,{render:E.jsx("main",{}),fullwidth:!0,style:{flex:1,overflow:"auto"},children:E.jsx(fS,{})})]}):E.jsx(iye,{})}function iye(){const{data:e=[]}=Si(dh());return E.jsxs(Ye,{fullwidth:!0,style:{position:"fixed",height:"100dvh"},children:[E.jsx(SE,{sessionCount:e.length}),E.jsxs(rF,{direction:"horizontal",children:[E.jsx(zw,{defaultSize:360,minSize:320,maxSize:540,children:E.jsx(b6,{})}),E.jsx(iF,{}),E.jsx(zw,{children:E.jsx(Ye,{render:E.jsx("main",{}),fullwidth:!0,fullheight:!0,children:E.jsx(fS,{})})})]})]})}const oye=new Set(["session.started","session.resumed","session.end"]),sye=e=>{const t=new Map;for(let r=0;r<e.length-1;r++){const i=e[r],o=e[r+1];i.event==="session.started"&&o.event==="claude.started"&&i.conversationId===o.conversationId&&t.set(r+1,{...i.meta??{},...o.meta??{}})}const n=[];for(let r=0;r<e.length;r++){const i=e[r];if(oye.has(i.event))continue;const o=t.get(r);n.push(o?{...i,meta:o}:i)}return n},aye=e=>{var r;const t=[],n=new Set;for(let i=0;i<e.length;i++){if(n.has(i))continue;const o=e[i];if(o.event==="session.waiting"){let a=i+1;const u=[];for(;a<e.length&&(e[a].event==="context.snapshot"||e[a].event==="assistant.recap");)e[a].event==="assistant.recap"&&u.push(e[a]),a++;if(a<e.length&&e[a].event==="session.answered"){for(const f of u)t.push(f);const c=(r=o.meta)==null?void 0:r.question;t.push({...e[a],meta:{...e[a].meta,question:c}});for(let f=i;f<=a;f++)n.add(f);continue}}t.push(o)}return t};function gy(e){return e.edits&&e.edits.length>0?e.edits:e.oldStr||e.newStr?[{oldStr:e.oldStr??"",newStr:e.newStr??""}]:[]}function hO(e){const t=e.meta,n=e.event==="permission.resolve"?"approved":e.event==="tool.used"?"auto":"pending";return{tool:(t==null?void 0:t.tool)??"unknown",detail:(t==null?void 0:t.detail)??"",outcome:(t==null?void 0:t.outcome)??n}}const E6={Bash:"ran",Edit:"edited",MultiEdit:"edited",Write:"wrote",Read:"read",Glob:"globbed",Grep:"grepped",WebFetch:"fetched",WebSearch:"searched",TodoWrite:"updated todos"},lye={Bash:"commands",Edit:"files",MultiEdit:"files",Write:"files",Read:"files",Glob:"patterns",Grep:"patterns",WebFetch:"urls",WebSearch:"queries"},uye=new Set(["Edit","MultiEdit","Write","Read"]);function cye(e){return e.split("/").filter(Boolean).pop()??e}function pO(e,t){return e.length<=t?e:e.slice(0,t-1)+"…"}function fye(e){const t=E6[e.tool]??e.tool;return e.detail?e.tool==="Bash"?`ran \`${pO(e.detail,60)}\``:uye.has(e.tool)?`${t} ${cye(e.detail)}`:`${t} ${pO(e.detail,60)}`:t}function dye(e){const t=[];for(const[n,r]of e){const i=E6[n]??n;if(r===1)t.push(i);else{const o=lye[n]??"calls";t.push(`${i} ${r} ${o}`)}}return t.join(", ")}const mO=new Set(["permission.request","permission.resolve","tool.used"]),hye=e=>{const t=[];let n=0;for(;n<e.length;){const r=e[n];if(!mO.has(r.event)){t.push(r),n++;continue}const i=[];for(;n<e.length;){const h=e[n];if(!mO.has(h.event))break;i.push(h),n++}const o=i.filter(h=>h.event==="permission.request"||h.event==="tool.used");if(o.length===0)continue;const a=o.map(hO),u=i.some(h=>h.event==="permission.resolve"),c=new Map;for(const h of a){const p=`${h.tool}::${h.detail}`,g=c.get(p);if(g){g.count++;const y=[...gy(g),...gy(h)];y.length>0&&(g.edits=y,g.oldStr=void 0,g.newStr=void 0)}else c.set(p,{...h,count:1})}const f=[...c.values()];if(f.length<=1){const h=f[0]??hO(i[0]),p=fye(h);t.push({...i[i.length-1],event:"tool.work",summary:p,meta:{...i[i.length-1].meta,permissions:f,outcome:u?"approved":"pending"}})}else{const h=new Map;for(const v of f)h.set(v.tool,(h.get(v.tool)??0)+v.count);const p=[...h.entries()].sort((v,S)=>S[1]-v[1]),g=dye(p),y=new Date(i[0].createdAt).getTime(),b=new Date(i[i.length-1].createdAt).getTime();t.push({...i[0],event:"tool.work",summary:g,meta:{permissions:f,outcome:u?"approved":"pending"},createdAt:new Date((y+b)/2).toISOString()})}}return t},pye={Edit:"edited a file",Write:"wrote a file",MultiEdit:"edited a file"},mye=e=>{const t=[];let n=0;for(;n<e.length;){const r=e[n];if(r.event!=="tool.applied"){t.push(r),n++;continue}const i=[];for(;n<e.length&&e[n].event==="tool.applied";)i.push(e[n]),n++;if(i.length===1){t.push(i[0]);continue}const o=[];for(const f of i){const h=f.meta,p=h==null?void 0:h.permissions;if(Array.isArray(p))for(const g of p)o.push(g)}const a=new Map;for(const f of o){const h=`${f.tool}::${f.detail}`,p=a.get(h),g=f.count??1;if(p){p.count+=g;const y=[...gy(p),...gy(f)];y.length>0&&(p.edits=y,p.oldStr=void 0,p.newStr=void 0)}else a.set(h,{...f,count:g})}const u=[...a.values()],c=i[i.length-1];t.push({...c,meta:{...c.meta,permissions:u}})}return t},gye=e=>e.map(t=>{var o;if(t.event!=="tool.applied"||t.summary)return t;const n=t.meta,r=(n==null?void 0:n.permissions)??[];if(r.length>1)return{...t,summary:`edited ${r.length} files`};const i=(o=r[0])==null?void 0:o.tool;return i?{...t,summary:pye[i]??`${i} applied`}:t}),yye=e=>{const t=new Set(["claude.started","claude.ended","claude.discarded"]);return e.map((n,r)=>{if(!t.has(n.event))return n;const i=n.meta;if(i!=null&&i.model)return n;const o=(i==null?void 0:i.claude_id)??n.conversationId;if(!o)return n;const u=n.event==="claude.started"?e.slice(r+1):e.slice(0,r).reverse();for(const c of u){if(c.event!=="context.snapshot")continue;const f=c.meta;if(((f==null?void 0:f.claude_id)??c.conversationId)!==o)continue;const p=f==null?void 0:f.model;if(p)return{...n,meta:{...i,model:p}}}return n})},bye=[sye,aye,hye,mye,gye,yye];function vye(e){return bye.reduce((t,n)=>n(t),e)}function xye(e){return e<1500?"●○○":e<5e3?"●●○":"●●●"}const wye=/<recap>[\s\S]*?<\/recap>/gi;function k6({event:e}){var a;const t=e.meta;if(e.event==="assistant.recap"){const u=(a=t==null?void 0:t.recap)==null?void 0:a.trim();return u?E.jsx(Ye,{"data-slot":"assistant-recap",py:4,children:E.jsx(qt,{children:E.jsx(ya,{children:u})})}):null}const r=((t==null?void 0:t.text)??"").replace(wye,"").trim(),i=(t==null?void 0:t.thinkingBlocks)??0,o=(t==null?void 0:t.thinkingBytes)??0;return!r&&i===0?null:E.jsxs(Ye,{"data-slot":"assistant-content",gap:2,children:[i>0&&E.jsx(cn,{color:"indigo",children:`Thought ${xye(o)}`}),r&&E.jsx(ya,{children:r})]})}k6.displayName="AssistantContent";function R6({event:e}){const t=e.meta;if(!t)return null;const n=to(t.remaining_pct),r=to(t.context_window_tokens),i=to(t.input_tokens),o=to(t.cache_read_tokens),a=to(t.cache_creation_tokens),u=ab(t.model);return r===0?null:E.jsxs(Ye,{"data-slot":"context-content",gap:3,fullwidth:!0,children:[E.jsx(XS,{value:n,size:"small",color:yF(n)}),E.jsxs(Xe,{gap:2,children:[u&&E.jsx(cn,{size:"small",children:u}),i>0&&E.jsx(cn,{size:"small",color:"orange",children:`${Jo(i)} input`}),o>0&&E.jsx(cn,{size:"small",color:"blue",children:`${Jo(o)} cache read`}),a>0&&E.jsx(cn,{size:"small",color:"indigo",children:`${Jo(a)} cache write`})]})]})}R6.displayName="ContextContent";function gO(e,t){return e==null?void 0:e.find(n=>n.question===t)}function Sye(e,t,n){const r=[...t].sort((a,u)=>u.label.length-a.label.length),i=[];let o=e;for(;o;){const a=r.find(u=>o===u.label||o.startsWith(u.label+", "));if(!a)break;if(i.push(a.label),o===a.label){o="";break}if(o=o.slice(a.label.length+2),!n)break}return{selectedLabels:i,note:o||void 0}}function _6({event:e}){const t=e.meta;if(e.event==="session.answered"){const n=t==null?void 0:t.answers;if(!n||Object.keys(n).length===0)return null;const r=t==null?void 0:t.questions,i=Object.entries(n),o=(u,c)=>{const f=gO(r,u),h=(f==null?void 0:f.multiSelect)??!1,p=(f==null?void 0:f.options)??[],{selectedLabels:g,note:y}=Sye(c,p,h),b=g.length>0,v=b?void 0:y??c,S=b?y:void 0;return E.jsxs(Ye,{gap:4,fullwidth:!0,children:[v&&E.jsxs(Ye,{"data-slot":"interaction-content-note",gap:4,m:2,fullwidth:!0,children:[E.jsx(je,{color:"yellow",weight:"bold",size:1,children:"Answered manually:"}),E.jsx(ya,{children:v})]}),!b&&!v&&E.jsx(je,{color:"red",weight:"bold",size:1,m:2,children:"Didn't answer."}),p.length>0&&E.jsx(Kc,{type:"ordered",items:p.map(x=>({value:x.label,label:E.jsx(je,{weight:"bold",color:g.includes(x.label)?"green":void 0,children:x.label}),description:x.description,disabled:!g.includes(x.label)}))}),S&&E.jsxs(Ye,{"data-slot":"interaction-content-note",gap:4,m:2,fullwidth:!0,children:[E.jsx(je,{color:"green",weight:"bold",size:1,children:"Additional notes:"}),E.jsx(ya,{children:S})]})]})};if(i.length===1){const[u,c]=i[0];return E.jsx(Ye,{"data-slot":"interaction-content",gap:2,py:4,fullwidth:!0,children:E.jsx(qt,{gap:4,fullwidth:!0,children:o(u,c)})})}const a=i.map(([u,c],f)=>{const h=gO(r,u);return{label:(h==null?void 0:h.header)??`Question ${f+1}`,value:u,render:o(u,c)}});return E.jsx(Ye,{"data-slot":"interaction-content",gap:2,py:4,fullwidth:!0,children:E.jsx(qt,{gap:4,fullwidth:!0,children:E.jsx(qC,{items:a,ContainerProps:{fullwidth:!0,mt:6}})})})}if(e.event==="user.prompt"){const n=t==null?void 0:t.prompt;return n?E.jsx(T6,{children:E.jsx(ya,{children:n})}):null}return null}_6.displayName="InteractionContent";const T6=({children:e})=>E.jsx(Ye,{"data-slot":"interaction-content",py:4,fullwidth:!0,children:E.jsx(qt,{gap:4,fullwidth:!0,children:e})});T6.displayName="CardContainer";function Cye(e){if(e)return e.slice(0,8)}function A6({event:e}){if(e.event==="claude.started")return null;const t=e.meta;if(e.event==="session.recap"){const u=t==null?void 0:t.recap;return u?E.jsx(Ye,{py:4,children:E.jsx(qt,{children:E.jsx(ya,{children:u})})}):null}const n=(t==null?void 0:t.claude_id)??e.conversationId??void 0,r=ab(t==null?void 0:t.model),i=Cye(n??void 0),o=e.event==="claude.ended"?t==null?void 0:t.exit_code:void 0,a=typeof o=="number"&&o!==0;return!r&&!i&&!a?null:E.jsxs(Xe,{gap:2,ay:"center",children:[r&&E.jsx(cn,{color:"orange",size:"small",children:r}),i&&E.jsx(cn,{color:"neutral",size:"small",children:i}),a&&E.jsx(cn,{color:"red",size:"small",children:`exit ${o}`})]})}A6.displayName="LifecycleContent";function D6({event:e}){const t=e.meta;if(!t)return null;switch(e.event){case"gh.pr.created":{const n=t.pr_title,r=t.pr_url;return E.jsxs(E.Fragment,{children:[n&&E.jsx(je,{size:1,children:n}),r&&E.jsx(je,{size:-1,family:"mono",color:"neutral",children:r})]})}case"gh.pr.merged":{const n=t.branch;return n?E.jsx(je,{size:1,family:"mono",children:n}):null}case"vercel.deploy":{const n=t.project_name;return n?E.jsx(je,{size:1,children:n}):null}default:return null}}D6.displayName="MilestoneContent";function Eye({text:e}){const[t,n]=C.useState(!1);return E.jsx(Ci,{size:"small",variant:"ghost",shape:"square",tooltip:t?"Copied!":"Copy path",disabled:t,onClick:()=>{navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),2e3)},children:t?E.jsx(Ch,{color:"green"}):E.jsx(Eh,{})})}function kye(e){if(e)return e.slice(0,8)}function Rye(e){if(e)return e.slice(0,7)}function M6({event:e}){const t=e.meta;if(!t)return null;const n=t.labels??[],r=t.summary,i=t.claude_id??e.conversationId??void 0,o=ab(t.model),a=t.claude_version,u=kye(i),c=t.git??void 0,f=c==null?void 0:c.branch,h=Rye(c==null?void 0:c.sha),p=!!(c!=null&&c.dirty),g=t.cwd,y=[];if(n.length>0&&y.push({field:"Labels",value:n.join(", ")}),r&&y.push({field:"Summary",value:r}),o&&y.push({field:"Model",value:E.jsx(cn,{color:"orange",size:"small",children:o})}),a&&y.push({field:"Version",value:E.jsx(cn,{color:"neutral",size:"small",children:a})}),u&&y.push({field:"Claude ID",value:E.jsx(cn,{color:"neutral",size:"small",children:u})}),f&&y.push({field:"Branch",value:E.jsxs(Xe,{gap:2,ay:"center",children:[E.jsx(cn,{color:"neutral",size:"small",children:f}),h&&E.jsx(cn,{color:"neutral",size:"small",children:h}),p&&E.jsx(cn,{color:"red",size:"small",children:"dirty"})]})}),g&&y.push({field:"CWD",value:E.jsx(je,{family:"mono",size:-1,color:"neutral",children:g})}),y.length===0)return null;const b=x=>x.field==="CWD",v=(x,_)=>b(_)?x:E.jsx(E.Fragment,{}),S={primary:[{icon:gG,tooltip:"Open in Cursor",onClick:x=>{!b(x)||!g||window.open(`cursor://file/${encodeURI(g)}`,"_blank")},wrapper:v},{icon:EG,tooltip:"Open in Finder",onClick:x=>{!b(x)||!g||fetch(sb("/api/open"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:g})})},wrapper:v},{icon:Eh,tooltip:"Copy path",wrapper:(x,_)=>b(_)&&g?E.jsx(Eye,{text:g}):E.jsx(E.Fragment,{})}]};return E.jsx(Ye,{py:4,fullwidth:!0,children:E.jsx(qt,{trimmed:!0,fullwidth:!0,children:E.jsx(eE,{children:E.jsx(tE,{children:E.jsx(rE,{children:y.map(x=>E.jsxs(nE,{children:[E.jsx(fh,{children:E.jsx(je,{weight:"bold",children:x.field})}),E.jsx(fh,{children:x.value}),E.jsx(dF,{actions:S,item:x})]},x.field))})})})})})}M6.displayName="StartedContent";class O6{diff(t,n,r={}){let i;typeof r=="function"?(i=r,r={}):"callback"in r&&(i=r.callback);const o=this.castInput(t,r),a=this.castInput(n,r),u=this.removeEmpty(this.tokenize(o,r)),c=this.removeEmpty(this.tokenize(a,r));return this.diffWithOptionsObj(u,c,r,i)}diffWithOptionsObj(t,n,r,i){var o;const a=_=>{if(_=this.postProcess(_,r),i){setTimeout(function(){i(_)},0);return}else return _},u=n.length,c=t.length;let f=1,h=u+c;r.maxEditLength!=null&&(h=Math.min(h,r.maxEditLength));const p=(o=r.timeout)!==null&&o!==void 0?o:1/0,g=Date.now()+p,y=[{oldPos:-1,lastComponent:void 0}];let b=this.extractCommon(y[0],n,t,0,r);if(y[0].oldPos+1>=c&&b+1>=u)return a(this.buildValues(y[0].lastComponent,n,t));let v=-1/0,S=1/0;const x=()=>{for(let _=Math.max(v,-f);_<=Math.min(S,f);_+=2){let R;const T=y[_-1],A=y[_+1];T&&(y[_-1]=void 0);let D=!1;if(A){const $=A.oldPos-_;D=A&&0<=$&&$<u}const O=T&&T.oldPos+1<c;if(!D&&!O){y[_]=void 0;continue}if(!O||D&&T.oldPos<A.oldPos?R=this.addToPath(A,!0,!1,0,r):R=this.addToPath(T,!1,!0,1,r),b=this.extractCommon(R,n,t,_,r),R.oldPos+1>=c&&b+1>=u)return a(this.buildValues(R.lastComponent,n,t))||!0;y[_]=R,R.oldPos+1>=c&&(S=Math.min(S,_-1)),b+1>=u&&(v=Math.max(v,_+1))}f++};if(i)(function _(){setTimeout(function(){if(f>h||Date.now()>g)return i(void 0);x()||_()},0)})();else for(;f<=h&&Date.now()<=g;){const _=x();if(_)return _}}addToPath(t,n,r,i,o){const a=t.lastComponent;return a&&!o.oneChangePerToken&&a.added===n&&a.removed===r?{oldPos:t.oldPos+i,lastComponent:{count:a.count+1,added:n,removed:r,previousComponent:a.previousComponent}}:{oldPos:t.oldPos+i,lastComponent:{count:1,added:n,removed:r,previousComponent:a}}}extractCommon(t,n,r,i,o){const a=n.length,u=r.length;let c=t.oldPos,f=c-i,h=0;for(;f+1<a&&c+1<u&&this.equals(r[c+1],n[f+1],o);)f++,c++,h++,o.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return h&&!o.oneChangePerToken&&(t.lastComponent={count:h,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=c,f}equals(t,n,r){return r.comparator?r.comparator(t,n):t===n||!!r.ignoreCase&&t.toLowerCase()===n.toLowerCase()}removeEmpty(t){const n=[];for(let r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n}castInput(t,n){return t}tokenize(t,n){return Array.from(t)}join(t){return t.join("")}postProcess(t,n){return t}get useLongestToken(){return!1}buildValues(t,n,r){const i=[];let o;for(;t;)i.push(t),o=t.previousComponent,delete t.previousComponent,t=o;i.reverse();const a=i.length;let u=0,c=0,f=0;for(;u<a;u++){const h=i[u];if(h.removed)h.value=this.join(r.slice(f,f+h.count)),f+=h.count;else{if(!h.added&&this.useLongestToken){let p=n.slice(c,c+h.count);p=p.map(function(g,y){const b=r[f+y];return b.length>g.length?b:g}),h.value=this.join(p)}else h.value=this.join(n.slice(c,c+h.count));c+=h.count,h.added||(f+=h.count)}}return i}}const yO="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}";class _ye extends O6{tokenize(t){const n=new RegExp(`(\\r?\\n)|[${yO}]+|[^\\S\\n\\r]+|[^${yO}]`,"ug");return t.match(n)||[]}}const Tye=new _ye;function Aye(e,t,n){return Tye.diff(e,t,n)}class Dye extends O6{constructor(){super(...arguments),this.tokenize=$ye}equals(t,n,r){return r.ignoreWhitespace?((!r.newlineIsToken||!t.includes(`
520
+ `))&&(t=t.trim()),(!r.newlineIsToken||!n.includes(`
521
+ `))&&(n=n.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(t.endsWith(`
522
+ `)&&(t=t.slice(0,-1)),n.endsWith(`
523
+ `)&&(n=n.slice(0,-1))),super.equals(t,n,r)}}const Mye=new Dye;function Oye(e,t,n){return Mye.diff(e,t,n)}function $ye(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
524
+ `));const n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let i=0;i<r.length;i++){const o=r[i];i%2&&!t.newlineIsToken?n[n.length-1]+=o:n.push(o)}return n}function Pye(e,t){const n=[...e.split(`
525
+ `),...t.split(`
526
+ `)];let r=1/0;for(const o of n){if(o.trim()==="")continue;const a=o.match(/^[ \t]*/),u=a?a[0].length:0;u<r&&(r=u)}if(r===1/0||r===0)return[e,t];const i=o=>o.split(`
527
+ `).map(a=>a.length>=r?a.slice(r):a).join(`
528
+ `);return[i(e),i(t)]}function Nye(e,t){const n=[],r=[],i=[];function o(h,p){const g=n.length,b=(h.endsWith(`
529
+ `)?h.slice(0,-1):h).split(`
530
+ `);for(const v of b)n.push(v),r.push(p);return{startIdx:g,lns:b}}for(let h=0;h<e.length;h++){h>0&&(n.push("…"),r.push("separator"));const{oldStr:p,newStr:g}=e[h],[y,b]=Pye(p,g),v=Oye(y,b);let S=0;for(;S<v.length;){const x=v[S];if(x.removed&&S+1<v.length&&v[S+1].added){const _=o(x.value,"remove"),R=o(v[S+1].value,"add"),T=t?Math.min(_.lns.length,R.lns.length):0;for(let A=0;A<T;A++){const D=Aye(_.lns[A],R.lns[A]);let O=0,$=0;for(const z of D){const j=z.value.length;z.added?(j>0&&i.push({start:{line:R.startIdx+A,character:$},end:{line:R.startIdx+A,character:$+j},properties:{class:"diff-word add"}}),$+=j):z.removed?(j>0&&i.push({start:{line:_.startIdx+A,character:O},end:{line:_.startIdx+A,character:O+j},properties:{class:"diff-word remove"}}),O+=j):(O+=j,$+=j)}}S+=2}else x.removed?(o(x.value,"remove"),S+=1):x.added?(o(x.value,"add"),S+=1):(o(x.value,"context"),S+=1)}}const a=[];let u=1,c=1;for(const h of r)h==="separator"?a.push({old:null,new:null}):h==="remove"?a.push({old:u++,new:null}):h==="add"?a.push({old:null,new:c++}):a.push({old:u++,new:c++});const f=Math.max(u-1,c-1,1);return{code:n.join(`
531
+ `),lineKinds:r,lineNums:a,decorations:i,maxLineNum:f}}function ox(e,t){e.properties||(e.properties={});const n=e.properties.class;typeof n=="string"?e.properties.class=n?`${n} ${t}`:t:Array.isArray(n)?e.properties.class=[...n,t]:e.properties.class=t}function sx(e,t){return{type:"element",tagName:"span",properties:{class:e},children:[{type:"text",value:t}]}}const Iye={ts:"typescript",tsx:"tsx",js:"javascript",jsx:"jsx",mjs:"javascript",cjs:"javascript",json:"json",md:"markdown",markdown:"markdown",css:"css",html:"html",htm:"html",py:"python",sh:"bash",bash:"bash",zsh:"bash"};function jye(e,t){if(!e)return t;const n=e.split("/").pop()??e,r=n.includes(".")?n.split(".").pop().toLowerCase():"";return Iye[r]??t}function CE({edits:e,oldStr:t,newStr:n,language:r,filename:i,wordDiff:o=!1,rows:a,defaultExpanded:u}){var v;const c=e&&e.length>0?e:[{oldStr:t??"",newStr:n??""}],f=r??jye(i,"tsx"),[h,p]=C.useState(""),[g,y]=C.useState(1);C.useEffect(()=>{let S=!1;return(async()=>{const{code:x,lineKinds:_,lineNums:R,decorations:T,maxLineNum:A}=Nye(c,o);await eI(f);const O=(await pC()).codeToHtml(x,{lang:f,themes:{light:"vitesse-light",dark:"vitesse-black"},defaultColor:!1,decorations:T,transformers:[{name:"diff-block:line-marks",pre($){ox($,"has-diff")},line($,z){const j=z-1,I=_[j],M=R[j];if(I==="add"||I==="remove")ox($,`diff ${I}`);else if(I==="separator")return ox($,"diff-separator"),$;const B=I==="add"?"diff-marker add":I==="remove"?"diff-marker remove":"diff-marker",G=I==="add"?"+":I==="remove"?"-":" ",L="diff-num diff-num-old"+(M.old==null?" diff-num-blank":""),F="diff-num diff-num-new"+(M.new==null?" diff-num-blank":""),U=[sx(L,M.old!=null?String(M.old):" "),sx(F,M.new!=null?String(M.new):" "),sx(B,G)];return $.children.unshift(...U),$}}]});S||(p(O),y(String(A).length))})(),()=>{S=!0}},[c,f,o]);const b=((v=c[c.length-1])==null?void 0:v.newStr)??"";return E.jsx("div",{className:"bertrand-diff-block",style:{"--diff-num-width":`${g+2}ch`,width:"100%"},children:E.jsx(mC,{code:b,language:f,filename:i,showLineNumbers:!1,rows:a,defaultExpanded:u,HeaderProps:{copyable:!1},html:h,style:{width:"100%"}})})}CE.displayName="DiffBlock";const Lye=5;function Qw(e){return!!(e.oldStr||e.newStr||e.edits&&e.edits.length>0)}function $6({permission:e}){const t=e.edits&&e.edits.length>0?e.edits.map(n=>({oldStr:n.oldStr??"",newStr:n.newStr??""})):[{oldStr:e.oldStr??"",newStr:e.newStr??""}];return E.jsx(CE,{edits:t,filename:e.detail,rows:Lye,defaultExpanded:!1})}function Fye(e){const t=e.count>1?`${e.count}× `:"";return e.detail?`${t}${e.detail}`:`${t}${e.tool}`}function P6({permission:e}){return E.jsx(je,{size:-1,family:"mono",shade:"muted",children:Fye(e)})}function N6({event:e}){const t=e.meta;if(!(t!=null&&t.permissions))return null;const n=t.permissions;if(n.length===0)return null;if(n.length===1){const r=n[0];return r.detail?Qw(r)?E.jsx($6,{permission:r}):E.jsx(P6,{permission:r}):null}return E.jsx(zye,{permissions:n})}function zye({permissions:e}){const t=e.filter(Qw),n=e.filter(r=>!Qw(r));return E.jsxs(Ye,{"data-slot":"work-content",gap:2,fullwidth:!0,children:[t.length>0&&E.jsx(Ye,{gap:2,fullwidth:!0,children:t.map((r,i)=>E.jsx($6,{permission:r},`diff-${i}`))}),n.length>0&&E.jsx(Ye,{gap:1,fullwidth:!0,children:n.map((r,i)=>E.jsx(P6,{permission:r},`info-${i}`))})]})}N6.displayName="WorkContent";function I6({event:e}){if(e.event==="claude.started")return E.jsx(M6,{event:e});switch(uce(e.event)){case"interaction":return E.jsx(_6,{event:e});case"work":return E.jsx(N6,{event:e});case"milestone":return E.jsx(D6,{event:e});case"assistant":return E.jsx(k6,{event:e});case"context":return E.jsx(R6,{event:e});case"lifecycle":return E.jsx(A6,{event:e});default:return null}}I6.displayName="EventContent";const j6=({sessionId:e,isLive:t,...n})=>{const{data:r}=Si({...tce(e,t),enabled:!!e}),{data:i}=Si({...rce(e,t),enabled:!!e});return E.jsx(wE,{"data-slot":"secondary-sidebar",...n,p:0,minw:540,children:r&&E.jsx(L6,{stats:r,engagement:i})})};j6.displayName="SecondarySidebar";function Bye(e){return Object.entries(e).sort(([,t],[,n])=>n-t).slice(0,3).map(([t,n])=>`${t} ${n}`).join(" · ")}const L6=({stats:e,engagement:t})=>{const n=e.linesAdded>0||e.linesRemoved>0,r=e.filesTouched>0,i=n||r||e.prCount>0,o=t?Object.values(t.toolUsage).reduce((p,g)=>p+g,0):0,a=((t==null?void 0:t.contextTokens.max)??0)>0,u=(t==null?void 0:t.permissionDenials)??0,c=(t==null?void 0:t.discardRate.total)??0,f=!!t&&(o>0||a||u>0||c>0),h=[{label:"Activity",value:"activity",render:E.jsxs(vg,{children:[E.jsx(qt,{title:"Conversations",description:"Distinct conversation threads",icon:LG,action:E.jsx(zr,{value:e.conversationCount})}),E.jsx(qt,{title:"Interactions",description:"User-Claude exchanges",icon:PG,action:E.jsx(zr,{value:e.interactionCount})}),E.jsx(qt,{title:"Events",description:"Total events emitted",icon:ZH,action:E.jsx(zr,{value:e.eventCount})}),E.jsx(qt,{title:"Duration",description:"Total session time",icon:Q3,action:E.jsx(zr,{label:z1(e.durationS)})}),E.jsx(qt,{title:"Claude work",description:"Time Claude spent active",icon:fG,action:E.jsx(zr,{label:z1(e.claudeWorkS)})}),E.jsx(qt,{title:"User wait",description:"Time user spent waiting",icon:IG,action:E.jsx(zr,{label:z1(e.userWaitS)})})]})}];return i&&h.push({label:"Code",value:"code",render:E.jsxs(vg,{children:[n&&E.jsx(qt,{title:"Lines changed",description:"Across all edits",icon:J3,action:E.jsx(F6,{added:e.linesAdded,removed:e.linesRemoved})}),r&&E.jsx(qt,{title:"Files touched",description:"Distinct files edited",icon:e4,action:E.jsx(zr,{value:e.filesTouched})}),e.prCount>0&&E.jsx(qt,{title:"PRs",description:"Pull requests created",icon:TG,action:E.jsx(zr,{value:e.prCount})})]})}),f&&h.push({label:"Engagement",value:"engagement",render:E.jsxs(vg,{children:[o>0&&E.jsx(qt,{title:"Tracked tool calls",description:Bye(t.toolUsage),icon:uq,action:E.jsx(zr,{value:o})}),a&&E.jsx(qt,{title:"Context tokens",description:`avg ${Jo(t.contextTokens.avg)} · max ${Jo(t.contextTokens.max)}`,icon:RG,action:E.jsx(zr,{label:Jo(t.contextTokens.latest)})}),u>0&&E.jsx(qt,{title:"Permission denials",description:"Tool requests denied",icon:ZG,action:E.jsx(zr,{value:u})}),c>0&&E.jsx(qt,{title:"Discarded conversations",description:`${t.discardRate.discarded} of ${c}`,icon:oq,action:E.jsx(zr,{value:t.discardRate.discarded})})]})}),E.jsx(qC,{items:h,fullwidth:!0,ContainerProps:{fullwidth:!0}})};L6.displayName="SessionStats";const vg=({children:e})=>E.jsx(Ye,{"data-slot":"section-stack",ax:"stretch",pt:4,fullwidth:!0,gap:2,children:e});vg.displayName="SectionStack";const zr=e=>E.jsx(je,{"data-slot":"stat",size:3,family:"mono",weight:"bold",children:"label"in e?e.label:e.value});zr.displayName="Stat";const F6=({added:e,removed:t})=>E.jsxs(je,{"data-slot":"diff-stat",size:3,family:"mono",weight:"bold",children:[E.jsx(je,{color:"green",family:"mono",weight:"bold",children:`+${e}`})," / ",E.jsx(je,{color:"red",family:"mono",weight:"bold",children:`-${t}`})]});F6.displayName="DiffStat";const EE=({session:e,categoryPath:t,size:n="small",variant:r="subtle",shape:i="square",...o})=>{const[a,u]=C.useState(!1);if(e.status!=="paused")return null;const c=`${t}/${e.slug}`;return E.jsx(Qd,{tooltip:a?"Copied!":"Copy session path",size:n,variant:r,shape:i,pressed:a,onPressedChange:f=>{f&&(navigator.clipboard.writeText(c),u(!0),setTimeout(()=>u(!1),2e3))},icon:{unpressed:E.jsx(Eh,{}),pressed:E.jsx(Ch,{color:"green"})},onClick:f=>{f.preventDefault(),f.stopPropagation()},...o})};EE.displayName="CopyResumeButton";const z6=({session:e,...t})=>{const{categoryPath:n,session:r}=e,i=oE(r.status);return E.jsxs(Xe,{"data-slot":"session-item",ay:"center",gap:2,ml:2,...t,children:[E.jsxs(Xe,{gap:2,ay:"center",children:[E.jsx(My,{"data-slot":"session-status",color:i}),E.jsx(Ye,{gap:2,children:E.jsxs(je,{"data-slot":"session-link",render:E.jsx(ef,{to:"/$",params:{_splat:`${n}/${r.slug}`}}),weight:"bold",children:[n," / ",r.slug]})}),E.jsx(je,{"data-slot":"session-time",size:-1,shade:"muted",children:Bw(r.startedAt)})]}),E.jsx(cn,{"data-slot":"session-badge",color:i,ml:"auto",children:r.status}),E.jsx(EE,{session:r,categoryPath:n})]})};z6.displayName="SessionItem";const B6=wy("/$")({component:Uye}),U6=({href:e,children:t})=>E.jsx(ef,{to:e,children:t});function H6(e,t,n){const r=t.split("/").filter(Boolean),i=[{label:e,value:"/"}];for(let o=0;o<r.length;o++)i.push({label:r[o],value:`/${r.slice(0,o+1).join("/")}`});return n!==void 0&&i.push({label:n,value:""}),i}function bO(e,t){const n=e.lastIndexOf("/");if(n<=0)return null;const r=e.slice(0,n),i=e.slice(n+1);return i?t.find(o=>o.categoryPath===r&&o.session.slug===i)??null:null}function Uye(){const{_splat:e=""}=B6.useParams(),{data:t=[]}=Si(dh()),{data:n=[]}=Si(dh({includeArchived:!0})),r=bO(e,t)??bO(e,n);return r?E.jsx(V6,{match:r}):E.jsx(q6,{categoryPath:e,sessions:t})}function G6(){var t;const{data:e=[]}=Si(mF);return((t=e.find(n=>n.active))==null?void 0:t.name)??"bertrand"}function q6({categoryPath:e,sessions:t}){const n=G6(),r=t.filter(o=>o.categoryPath===e),i=H6(n,e);return E.jsxs(Ye,{gap:4,ax:"stretch",fullwidth:!0,children:[E.jsx(Ye,{bb:1,p:4,style:{position:"sticky",top:0,backgroundColor:"var(--shade-background)",zIndex:1},children:E.jsx(JC,{items:i,linkAs:U6})}),E.jsx(Ye,{px:8,gap:2,style:{overflow:"auto"},children:r.length>0?r.map(o=>E.jsx(z6,{session:o},o.session.id)):E.jsx(je,{shade:"muted",children:"No sessions in this category."})})]})}q6.displayName="CategoryDetail";function V6({match:e}){const t=G6(),n=e.session.id,r=e.session.status==="active"||e.session.status==="waiting",{data:i=[]}=Si(ece(n,r)),o=C.useMemo(()=>vye(i),[i]),a=C.useMemo(()=>{for(let f=i.length-1;f>=0;f--)if(i[f].event==="context.snapshot")return i[f];return null},[i]),u=C.useMemo(()=>{var f;if(e.session.status!=="waiting")return null;for(let h=i.length-1;h>=0;h--)if(i[h].event==="session.waiting"){const p=(f=i[h].meta)==null?void 0:f.question;return typeof p=="string"?p:null}return null},[i,e.session.status]),c=H6(t,e.categoryPath,e.session.name);return E.jsxs(Ye,{ax:"stretch",fullwidth:!0,style:{overflow:"hidden"},children:[E.jsxs(Xe,{bb:1,px:4,py:2,ay:"center",ax:"space-between",fullwidth:!0,children:[E.jsx(JC,{items:c,linkAs:U6}),E.jsxs(Xe,{ay:"center",gap:2,children:[E.jsx(EE,{session:e.session,categoryPath:e.categoryPath}),E.jsx(Y6,{session:e.session}),E.jsx(X$,{side:"right",title:"Session stats",trigger:E.jsx(Ci,{tooltip:"Session stats",variant:"subtle",size:"small",shape:"square",children:E.jsx(WG,{})}),children:E.jsx(j6,{sessionId:n,isLive:r})})]})]}),E.jsx(Ye,{p:8,ax:"stretch",fullwidth:!0,style:{overflowY:"auto"},children:o.length>0&&E.jsx(FP,{activeIndex:o.length,items:o.map(f=>({title:yce(f),time:bce(f.createdAt),color:hce(f.event),content:E.jsx(I6,{event:f})})),ItemProps:{style:{width:"100%"}},ContentProps:{fullwidth:!0,maxw:860}})}),E.jsx(W6,{session:e.session,context:a,pendingQuestion:u})]})}V6.displayName="SessionDetail";function Y6({session:e}){const t=gF(e),{Icon:n}=t;return E.jsx(Ci,{tooltip:t.tooltip,variant:"subtle",size:"small",shape:"square",disabled:t.disabled,loading:t.loading,onClick:t.onClick,"aria-label":t.label,children:E.jsx(n,{})})}Y6.displayName="ArchiveToggle";function W6({session:e,context:t,pendingQuestion:n}){const r=oE(e.status),i=e.status==="active"||e.status==="waiting";return E.jsxs(Ye,{bt:1,p:4,gap:3,fullwidth:!0,children:[E.jsxs(Xe,{ay:"center",gap:2,fullwidth:!0,children:[E.jsx(My,{color:r,pulse:i}),E.jsx(cn,{color:r,children:e.status}),n&&E.jsx(je,{size:1,shade:"muted",children:n})]}),t&&E.jsx(K6,{event:t})]})}W6.displayName="SessionFooter";function K6({event:e}){const t=e.meta;if(!t)return null;const n=to(t.remaining_pct),r=to(t.context_window_tokens),i=to(t.input_tokens),o=to(t.cache_read_tokens),a=to(t.cache_creation_tokens),u=ab(t.model);return r===0?null:E.jsxs(E.Fragment,{children:[E.jsx(XS,{value:n,size:"small",color:yF(n)}),E.jsxs(Xe,{gap:2,children:[u&&E.jsx(cn,{size:"small",children:u}),i>0&&E.jsx(cn,{size:"small",color:"orange",children:`${Jo(i)} input`}),o>0&&E.jsx(cn,{size:"small",color:"blue",children:`${Jo(o)} cache read`}),a>0&&E.jsx(cn,{size:"small",color:"indigo",children:`${Jo(a)} cache write`})]})]})}K6.displayName="ContextStats";const Hye=wy("/")({component:()=>E.jsx("div",{style:{opacity:.5,fontSize:13},children:"Select a session"})}),Gye=`# Heading 1 — anchored
532
+
533
+ ## Heading 2 — anchored
534
+
535
+ ### Heading 3
536
+
537
+ #### Heading 4
538
+
539
+ ##### Heading 5
540
+
541
+ ###### Heading 6
542
+
543
+ A paragraph with **bold**, *italic*, ~~strikethrough~~, an [external link](https://example.com), and \`inline code\`. Hover the headings to see the slug \`id\` attributes injected by rehype-slug.
544
+
545
+ > A blockquote can sit between paragraphs. It should look distinct enough to read as a quotation, not just indented prose.
546
+
547
+ ---
548
+
549
+ ## Lists
550
+
551
+ - Unordered list item one
552
+ - Unordered list item two with **emphasis** and \`code\`
553
+ - Nested item
554
+ - Another nested item
555
+ - Three levels deep
556
+
557
+ 1. Ordered list item one
558
+ 2. Ordered list item two
559
+ 3. Ordered list item three
560
+
561
+ ### Task list
562
+
563
+ - [x] Done item
564
+ - [x] Another done item
565
+ - [ ] Open item
566
+ - [ ] Open item with [a link](https://example.com)
567
+
568
+ ---
569
+
570
+ ## Tables
571
+
572
+ | Feature | Status | Notes |
573
+ |---|---|---|
574
+ | Headings | ✓ | rehype-slug |
575
+ | Tables | ✓ | mapped to TableRoot/Header/Body/Row/Head/Cell |
576
+ | Code blocks | ✓ | shiki via CodeBlock |
577
+ | Task lists | ✓ | disabled checkbox render |
578
+
579
+ | Left | Center | Right |
580
+ |:---|:---:|---:|
581
+ | 1 | 2 | 3 |
582
+ | left-aligned | center-aligned | right-aligned |
583
+
584
+ ---
585
+
586
+ ## Code
587
+
588
+ Inline: use \`bun run typecheck\` or \`tsc --noEmit\` to validate.
589
+
590
+ \`\`\`ts
591
+ // known language — should syntax-highlight
592
+ import { Markdown } from "../components/markdown";
593
+
594
+ export function Demo() {
595
+ return <Markdown>{"# hi"}</Markdown>;
596
+ }
597
+ \`\`\`
598
+
599
+ \`\`\`tsx
600
+ const App = () => <div>{"jsx works too"}</div>;
601
+ \`\`\`
602
+
603
+ \`\`\`js
604
+ // alias — js → javascript
605
+ function add(a, b) { return a + b; }
606
+ \`\`\`
607
+
608
+ \`\`\`sh
609
+ # alias — sh → bash
610
+ bun run dev
611
+ \`\`\`
612
+
613
+ \`\`\`json
614
+ {
615
+ "language": "json",
616
+ "ok": true
617
+ }
618
+ \`\`\`
619
+
620
+ \`\`\`unknownlanguage
621
+ // unknown language — should render plaintext, not throw
622
+ some content here
623
+ \`\`\`
624
+
625
+ \`\`\`
626
+ no language tag — also plaintext
627
+ multiple lines
628
+ \`\`\`
629
+
630
+ ---
631
+
632
+ ## Edge cases
633
+
634
+ A paragraph immediately followed by a fenced block:
635
+ \`\`\`ts
636
+ const ok = true;
637
+ \`\`\`
638
+
639
+ Paragraph after the fence — should render with normal spacing.
640
+
641
+ A line with **bold at the very end**
642
+
643
+ A line ending with \`inline code\`
644
+
645
+ An empty heading below this line:
646
+
647
+ ##
648
+
649
+ End of fixture.
650
+ `;function qye(){const[e,t]=C.useState(Gye);return E.jsxs(Ye,{gap:4,p:6,fullwidth:!0,style:{overflow:"auto"},children:[E.jsxs(Ye,{gap:2,children:[E.jsx(je,{size:3,weight:"bold",children:"Markdown kitchen sink"}),E.jsx(je,{size:2,shade:"muted",children:"Edit the source on the left, see it rendered on the right. Reset by reloading the page."})]}),E.jsxs(Xe,{gap:4,fullwidth:!0,ay:"stretch",evenly:!0,children:[E.jsxs(Ye,{gap:2,ax:"stretch",children:[E.jsx(je,{size:0,shade:"muted",children:"source"}),E.jsx("textarea",{value:e,onChange:n=>t(n.target.value),spellCheck:!1,style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSize:12,lineHeight:1.5,padding:12,minHeight:600,border:"1px solid var(--color-border)",borderRadius:4,background:"var(--color-surface)",color:"var(--color-text)",resize:"vertical"}})]}),E.jsxs(Ye,{gap:2,children:[E.jsx(je,{size:0,shade:"muted",children:"rendered"}),E.jsx(qt,{children:E.jsx(ya,{children:e})})]})]})]})}const Vye=wy("/dev/markdown")({component:qye}),Yye=`import { useState } from "react";
651
+
652
+ export function Counter() {
653
+ const [count, setCount] = useState(0);
654
+
655
+ function increment() {
656
+ setCount(count + 1);
657
+ }
658
+
659
+ return (
660
+ <button onClick={increment}>
661
+ {count}
662
+ </button>
663
+ );
664
+ }
665
+ `,Wye=`import { useCallback, useState } from "react";
666
+
667
+ type CounterProps = {
668
+ step?: number;
669
+ };
670
+
671
+ export function Counter({ step = 1 }: CounterProps) {
672
+ const [count, setCount] = useState(0);
673
+
674
+ const increment = useCallback(() => {
675
+ setCount((c) => c + step);
676
+ }, [step]);
677
+
678
+ return (
679
+ <button type="button" onClick={increment}>
680
+ count: {count}
681
+ </button>
682
+ );
683
+ }
684
+ `,vO={fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSize:12,lineHeight:1.5,padding:12,minHeight:280,border:"1px solid var(--color-border)",borderRadius:4,background:"var(--color-surface)",color:"var(--color-text)",resize:"vertical"},Kye=Object.entries(HP);function Xye(){const[e,t]=C.useState(Yye),[n,r]=C.useState(Wye),[i,o]=C.useState("tsx"),[a,u]=C.useState(!1);return E.jsxs(Ye,{gap:4,p:6,fullwidth:!0,style:{overflow:"auto"},children:[E.jsxs(Ye,{gap:2,children:[E.jsx(je,{size:3,weight:"bold",children:"Diff kitchen sink"}),E.jsx(je,{size:2,shade:"muted",children:"Edit the old and new sources on the left, see the diff on the right. Backed by jsdiff + the existing CodeBlock primitive."})]}),E.jsxs(Xe,{ay:"center",gap:4,children:[E.jsxs(Xe,{ay:"center",gap:2,children:[E.jsx(je,{size:0,shade:"muted",children:"language"}),E.jsx("select",{value:i,onChange:c=>o(c.target.value),style:{fontSize:12,padding:"4px 8px",border:"1px solid var(--color-border)",borderRadius:4,background:"var(--color-surface)",color:"var(--color-text)"},children:Kye.map(([c,f])=>E.jsx("option",{value:c,children:f},c))})]}),E.jsxs(Xe,{ay:"center",gap:2,children:[E.jsx("input",{id:"word-diff",type:"checkbox",checked:a,onChange:c=>u(c.target.checked)}),E.jsx(je,{size:0,shade:"muted",render:E.jsx("label",{htmlFor:"word-diff"}),children:"word diff"})]})]}),E.jsxs(Xe,{gap:4,fullwidth:!0,ay:"stretch",evenly:!0,children:[E.jsxs(Ye,{gap:3,ax:"stretch",children:[E.jsxs(Ye,{gap:2,ax:"stretch",children:[E.jsx(je,{size:0,shade:"muted",children:"old"}),E.jsx(qt,{ax:"stretch",children:E.jsx("textarea",{value:e,onChange:c=>t(c.target.value),spellCheck:!1,style:vO})})]}),E.jsxs(Ye,{gap:2,ax:"stretch",children:[E.jsx(je,{size:0,shade:"muted",children:"new"}),E.jsx(qt,{ax:"stretch",children:E.jsx("textarea",{value:n,onChange:c=>r(c.target.value),spellCheck:!1,style:vO})})]})]}),E.jsxs(Ye,{gap:2,ax:"stretch",children:[E.jsx(je,{size:0,shade:"muted",children:"diff"}),E.jsx(CE,{oldStr:e,newStr:n,language:i,wordDiff:a})]})]})]})}const Qye=wy("/dev/diff")({component:Xye}),Zye=B6.update({id:"/$",path:"/$",getParentRoute:()=>Yh}),Jye=Hye.update({id:"/",path:"/",getParentRoute:()=>Yh}),ebe=Vye.update({id:"/dev/markdown",path:"/dev/markdown",getParentRoute:()=>Yh}),tbe=Qye.update({id:"/dev/diff",path:"/dev/diff",getParentRoute:()=>Yh}),nbe={IndexRoute:Jye,SplatRoute:Zye,DevDiffRoute:tbe,DevMarkdownRoute:ebe},rbe=Yh._addFileChildren(nbe)._addFileTypes();typeof navigator<"u"&&"serviceWorker"in navigator&&navigator.serviceWorker.getRegistrations().then(e=>{for(const t of e)t.unregister()});const ibe=new q8({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!0}}}),obe=q7({routeTree:rbe});x8.createRoot(document.getElementById("root")).render(E.jsx(C.StrictMode,{children:E.jsx(V8,{client:ibe,children:E.jsxs(LK,{children:[E.jsx(W7,{router:obe}),E.jsx(rP,{position:"bottom"})]})})}));