bertrand 0.25.0 → 0.25.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,696 @@
|
|
|
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 OI=Object.defineProperty;var NI=Object.getPrototypeOf;var LI=Reflect.get;var E_=e=>{throw TypeError(e)};var jI=(e,t,n)=>t in e?OI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ie=(e,t,n)=>jI(e,typeof t!="symbol"?t+"":t,n),Zb=(e,t,n)=>t.has(e)||E_("Cannot "+n);var X=(e,t,n)=>(Zb(e,t,"read from private field"),n?n.call(e):t.get(e)),Ue=(e,t,n)=>t.has(e)?E_("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Le=(e,t,n,r)=>(Zb(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),lt=(e,t,n)=>(Zb(e,t,"access private method"),n);var kp=(e,t,n,r)=>({set _(i){Le(e,t,i,n)},get _(){return X(e,t,r)}}),k_=(e,t,n)=>LI(NI(e),n,t);function zI(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 Rw(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Jb={exports:{}},jf={};/**
|
|
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 __;function PI(){if(__)return jf;__=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 jf.Fragment=t,jf.jsx=n,jf.jsxs=n,jf}var A_;function II(){return A_||(A_=1,Jb.exports=PI()),Jb.exports}var _=II(),ev={exports:{}},at={};/**
|
|
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 R_;function FI(){if(R_)return at;R_=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 w(Y,Q,B){this.props=Y,this.context=Q,this.refs=S,this.updater=B||b}w.prototype.isReactComponent={},w.prototype.setState=function(Y,Q){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,Q,"setState")},w.prototype.forceUpdate=function(Y){this.updater.enqueueForceUpdate(this,Y,"forceUpdate")};function A(){}A.prototype=w.prototype;function k(Y,Q,B){this.props=Y,this.context=Q,this.refs=S,this.updater=B||b}var R=k.prototype=new A;R.constructor=k,v(R,w.prototype),R.isPureReactComponent=!0;var D=Array.isArray;function T(){}var $={H:null,A:null,T:null,S:null},N=Object.prototype.hasOwnProperty;function F(Y,Q,B){var ae=B.ref;return{$$typeof:e,type:Y,key:Q,ref:ae!==void 0?ae:null,props:B}}function j(Y,Q){return F(Y.type,Q,Y.props)}function z(Y){return typeof Y=="object"&&Y!==null&&Y.$$typeof===e}function M(Y){var Q={"=":"=0",":":"=2"};return"$"+Y.replace(/[=:]/g,function(B){return Q[B]})}var q=/\/+/g;function V(Y,Q){return typeof Y=="object"&&Y!==null&&Y.key!=null?M(""+Y.key):Q.toString(36)}function U(Y){switch(Y.status){case"fulfilled":return Y.value;case"rejected":throw Y.reason;default:switch(typeof Y.status=="string"?Y.then(T,T):(Y.status="pending",Y.then(function(Q){Y.status==="pending"&&(Y.status="fulfilled",Y.value=Q)},function(Q){Y.status==="pending"&&(Y.status="rejected",Y.reason=Q)})),Y.status){case"fulfilled":return Y.value;case"rejected":throw Y.reason}}throw Y}function I(Y,Q,B,ae,te){var me=typeof Y;(me==="undefined"||me==="boolean")&&(Y=null);var Ce=!1;if(Y===null)Ce=!0;else switch(me){case"bigint":case"string":case"number":Ce=!0;break;case"object":switch(Y.$$typeof){case e:case t:Ce=!0;break;case h:return Ce=Y._init,I(Ce(Y._payload),Q,B,ae,te)}}if(Ce)return te=te(Y),Ce=ae===""?"."+V(Y,0):ae,D(te)?(B="",Ce!=null&&(B=Ce.replace(q,"$&/")+"/"),I(te,Q,B,"",function(Oe){return Oe})):te!=null&&(z(te)&&(te=j(te,B+(te.key==null||Y&&Y.key===te.key?"":(""+te.key).replace(q,"$&/")+"/")+Ce)),Q.push(te)),1;Ce=0;var Re=ae===""?".":ae+":";if(D(Y))for(var pe=0;pe<Y.length;pe++)ae=Y[pe],me=Re+V(ae,pe),Ce+=I(ae,Q,B,me,te);else if(pe=y(Y),typeof pe=="function")for(Y=pe.call(Y),pe=0;!(ae=Y.next()).done;)ae=ae.value,me=Re+V(ae,pe++),Ce+=I(ae,Q,B,me,te);else if(me==="object"){if(typeof Y.then=="function")return I(U(Y),Q,B,ae,te);throw Q=String(Y),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(Y).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}return Ce}function P(Y,Q,B){if(Y==null)return Y;var ae=[],te=0;return I(Y,ae,"","",function(me){return Q.call(B,me,te++)}),ae}function G(Y){if(Y._status===-1){var Q=Y._result;Q=Q(),Q.then(function(B){(Y._status===0||Y._status===-1)&&(Y._status=1,Y._result=B)},function(B){(Y._status===0||Y._status===-1)&&(Y._status=2,Y._result=B)}),Y._status===-1&&(Y._status=0,Y._result=Q)}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 Q=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(Q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",Y);return}console.error(Y)},L={map:P,forEach:function(Y,Q,B){P(Y,function(){Q.apply(this,arguments)},B)},count:function(Y){var Q=0;return P(Y,function(){Q++}),Q},toArray:function(Y){return P(Y,function(Q){return Q})||[]},only:function(Y){if(!z(Y))throw Error("React.Children.only expected to receive a single React element child.");return Y}};return at.Activity=p,at.Children=L,at.Component=w,at.Fragment=n,at.Profiler=i,at.PureComponent=k,at.StrictMode=r,at.Suspense=c,at.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$,at.__COMPILER_RUNTIME={__proto__:null,c:function(Y){return $.H.useMemoCache(Y)}},at.cache=function(Y){return function(){return Y.apply(null,arguments)}},at.cacheSignal=function(){return null},at.cloneElement=function(Y,Q,B){if(Y==null)throw Error("The argument must be a React element, but you passed "+Y+".");var ae=v({},Y.props),te=Y.key;if(Q!=null)for(me in Q.key!==void 0&&(te=""+Q.key),Q)!N.call(Q,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&Q.ref===void 0||(ae[me]=Q[me]);var me=arguments.length-2;if(me===1)ae.children=B;else if(1<me){for(var Ce=Array(me),Re=0;Re<me;Re++)Ce[Re]=arguments[Re+2];ae.children=Ce}return F(Y.type,te,ae)},at.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},at.createElement=function(Y,Q,B){var ae,te={},me=null;if(Q!=null)for(ae in Q.key!==void 0&&(me=""+Q.key),Q)N.call(Q,ae)&&ae!=="key"&&ae!=="__self"&&ae!=="__source"&&(te[ae]=Q[ae]);var Ce=arguments.length-2;if(Ce===1)te.children=B;else if(1<Ce){for(var Re=Array(Ce),pe=0;pe<Ce;pe++)Re[pe]=arguments[pe+2];te.children=Re}if(Y&&Y.defaultProps)for(ae in Ce=Y.defaultProps,Ce)te[ae]===void 0&&(te[ae]=Ce[ae]);return F(Y,me,te)},at.createRef=function(){return{current:null}},at.forwardRef=function(Y){return{$$typeof:u,render:Y}},at.isValidElement=z,at.lazy=function(Y){return{$$typeof:h,_payload:{_status:-1,_result:Y},_init:G}},at.memo=function(Y,Q){return{$$typeof:f,type:Y,compare:Q===void 0?null:Q}},at.startTransition=function(Y){var Q=$.T,B={};$.T=B;try{var ae=Y(),te=$.S;te!==null&&te(B,ae),typeof ae=="object"&&ae!==null&&typeof ae.then=="function"&&ae.then(T,W)}catch(me){W(me)}finally{Q!==null&&B.types!==null&&(Q.types=B.types),$.T=Q}},at.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},at.use=function(Y){return $.H.use(Y)},at.useActionState=function(Y,Q,B){return $.H.useActionState(Y,Q,B)},at.useCallback=function(Y,Q){return $.H.useCallback(Y,Q)},at.useContext=function(Y){return $.H.useContext(Y)},at.useDebugValue=function(){},at.useDeferredValue=function(Y,Q){return $.H.useDeferredValue(Y,Q)},at.useEffect=function(Y,Q){return $.H.useEffect(Y,Q)},at.useEffectEvent=function(Y){return $.H.useEffectEvent(Y)},at.useId=function(){return $.H.useId()},at.useImperativeHandle=function(Y,Q,B){return $.H.useImperativeHandle(Y,Q,B)},at.useInsertionEffect=function(Y,Q){return $.H.useInsertionEffect(Y,Q)},at.useLayoutEffect=function(Y,Q){return $.H.useLayoutEffect(Y,Q)},at.useMemo=function(Y,Q){return $.H.useMemo(Y,Q)},at.useOptimistic=function(Y,Q){return $.H.useOptimistic(Y,Q)},at.useReducer=function(Y,Q,B){return $.H.useReducer(Y,Q,B)},at.useRef=function(Y){return $.H.useRef(Y)},at.useState=function(Y){return $.H.useState(Y)},at.useSyncExternalStore=function(Y,Q,B){return $.H.useSyncExternalStore(Y,Q,B)},at.useTransition=function(){return $.H.useTransition()},at.version="19.2.5",at}var D_;function Kd(){return D_||(D_=1,ev.exports=FI()),ev.exports}var C=Kd();const ao=Rw(C),wa=zI({__proto__:null,default:ao},[C]);var tv={exports:{}},zf={},nv={exports:{}},rv={};/**
|
|
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 T_;function BI(){return T_||(T_=1,(function(e){function t(I,P){var G=I.length;I.push(P);e:for(;0<G;){var W=G-1>>>1,L=I[W];if(0<i(L,P))I[W]=P,I[G]=L,G=W;else break e}}function n(I){return I.length===0?null:I[0]}function r(I){if(I.length===0)return null;var P=I[0],G=I.pop();if(G!==P){I[0]=G;e:for(var W=0,L=I.length,Y=L>>>1;W<Y;){var Q=2*(W+1)-1,B=I[Q],ae=Q+1,te=I[ae];if(0>i(B,G))ae<L&&0>i(te,B)?(I[W]=te,I[ae]=G,W=ae):(I[W]=B,I[Q]=G,W=Q);else if(ae<L&&0>i(te,G))I[W]=te,I[ae]=G,W=ae;else break e}}return P}function i(I,P){var G=I.sortIndex-P.sortIndex;return G!==0?G:I.id-P.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,w=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function R(I){for(var P=n(f);P!==null;){if(P.callback===null)r(f);else if(P.startTime<=I)r(f),P.sortIndex=P.expirationTime,t(c,P);else break;P=n(f)}}function D(I){if(v=!1,R(I),!b)if(n(c)!==null)b=!0,T||(T=!0,M());else{var P=n(f);P!==null&&U(D,P.startTime-I)}}var T=!1,$=-1,N=5,F=-1;function j(){return S?!0:!(e.unstable_now()-F<N)}function z(){if(S=!1,T){var I=e.unstable_now();F=I;var P=!0;try{e:{b=!1,v&&(v=!1,A($),$=-1),y=!0;var G=g;try{t:{for(R(I),p=n(c);p!==null&&!(p.expirationTime>I&&j());){var W=p.callback;if(typeof W=="function"){p.callback=null,g=p.priorityLevel;var L=W(p.expirationTime<=I);if(I=e.unstable_now(),typeof L=="function"){p.callback=L,R(I),P=!0;break t}p===n(c)&&r(c),R(I)}else r(c);p=n(c)}if(p!==null)P=!0;else{var Y=n(f);Y!==null&&U(D,Y.startTime-I),P=!1}}break e}finally{p=null,g=G,y=!1}P=void 0}}finally{P?M():T=!1}}}var M;if(typeof k=="function")M=function(){k(z)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,V=q.port2;q.port1.onmessage=z,M=function(){V.postMessage(null)}}else M=function(){w(z,0)};function U(I,P){$=w(function(){I(e.unstable_now())},P)}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(I){I.callback=null},e.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):N=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(I){switch(g){case 1:case 2:case 3:var P=3;break;default:P=g}var G=g;g=P;try{return I()}finally{g=G}},e.unstable_requestPaint=function(){S=!0},e.unstable_runWithPriority=function(I,P){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var G=g;g=I;try{return P()}finally{g=G}},e.unstable_scheduleCallback=function(I,P,G){var W=e.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?W+G:W):G=W,I){case 1:var L=-1;break;case 2:L=250;break;case 5:L=1073741823;break;case 4:L=1e4;break;default:L=5e3}return L=G+L,I={id:h++,callback:P,priorityLevel:I,startTime:G,expirationTime:L,sortIndex:-1},G>W?(I.sortIndex=G,t(f,I),n(c)===null&&I===n(f)&&(v?(A($),$=-1):v=!0,U(D,G-W))):(I.sortIndex=L,t(c,I),b||y||(b=!0,T||(T=!0,M()))),I},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(I){var P=g;return function(){var G=g;g=P;try{return I.apply(this,arguments)}finally{g=G}}}})(rv)),rv}var $_;function UI(){return $_||($_=1,nv.exports=BI()),nv.exports}var iv={exports:{}},Gn={};/**
|
|
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 M_;function HI(){if(M_)return Gn;M_=1;var e=Kd();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 Gn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Gn.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)},Gn.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()}},Gn.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))},Gn.prefetchDNS=function(c){typeof c=="string"&&r.d.D(c)},Gn.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})}},Gn.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)},Gn.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})}},Gn.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)},Gn.requestFormReset=function(c){r.d.r(c)},Gn.unstable_batchedUpdates=function(c,f){return c(f)},Gn.useFormState=function(c,f,h){return a.H.useFormState(c,f,h)},Gn.useFormStatus=function(){return a.H.useHostTransitionStatus()},Gn.version="19.2.5",Gn}var O_;function I$(){if(O_)return iv.exports;O_=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(),iv.exports=HI(),iv.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 N_;function qI(){if(N_)return zf;N_=1;var e=UI(),t=Kd(),n=I$();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 x=d.return;if(x===null)break;var E=x.alternate;if(E===null){if(m=x.return,m!==null){d=m;continue}break}if(x.child===E.child){for(E=x.child;E;){if(E===d)return c(x),s;if(E===m)return c(x),l;E=E.sibling}throw Error(r(188))}if(d.return!==m.return)d=x,m=E;else{for(var O=!1,H=x.child;H;){if(H===d){O=!0,d=x,m=E;break}if(H===m){O=!0,m=x,d=E;break}H=H.sibling}if(!O){for(H=E.child;H;){if(H===d){O=!0,d=E,m=x;break}if(H===m){O=!0,m=E,d=x;break}H=H.sibling}if(!O)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"),w=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),k=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),j=Symbol.for("react.memo_cache_sentinel"),z=Symbol.iterator;function M(s){return s===null||typeof s!="object"?null:(s=z&&s[z]||s["@@iterator"],typeof s=="function"?s:null)}var q=Symbol.for("react.client.reference");function V(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===q?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case v:return"Fragment";case w:return"Profiler";case S:return"StrictMode";case D:return"Suspense";case T:return"SuspenseList";case F:return"Activity"}if(typeof s=="object")switch(s.$$typeof){case b:return"Portal";case k:return s.displayName||"Context";case A:return(s._context.displayName||"Context")+".Consumer";case R:var l=s.render;return s=s.displayName,s||(s=l.displayName||l.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case $:return l=s.displayName||null,l!==null?l:V(s.type)||"Memo";case N:l=s._payload,s=s._init;try{return V(s(l))}catch{}}return null}var U=Array.isArray,I=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G={pending:!1,data:null,method:null,action:null},W=[],L=-1;function Y(s){return{current:s}}function Q(s){0>L||(s.current=W[L],W[L]=null,L--)}function B(s,l){L++,W[L]=s.current,s.current=l}var ae=Y(null),te=Y(null),me=Y(null),Ce=Y(null);function Re(s,l){switch(B(me,l),B(te,s),B(ae,null),l.nodeType){case 9:case 11:s=(s=l.documentElement)&&(s=s.namespaceURI)?Y2(s):0;break;default:if(s=l.tagName,l=l.namespaceURI)l=Y2(l),s=W2(l,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}Q(ae),B(ae,s)}function pe(){Q(ae),Q(te),Q(me)}function Oe(s){s.memoizedState!==null&&B(Ce,s);var l=ae.current,d=W2(l,s.type);l!==d&&(B(te,s),B(ae,d))}function Pe(s){te.current===s&&(Q(ae),Q(te)),Ce.current===s&&(Q(Ce),Mf._currentValue=G)}var Z,K;function ee(s){if(Z===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);Z=l&&l[1]||"",K=-1<d.stack.indexOf(`
|
|
43
|
+
at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
44
|
+
`+Z+s+K}var Ee=!1;function he(s,l){if(!s||Ee)return"";Ee=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var m={DetermineComponentFrameRoot:function(){try{if(l){var ke=function(){throw Error()};if(Object.defineProperty(ke.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ke,[])}catch(ye){var ge=ye}Reflect.construct(s,[],ke)}else{try{ke.call()}catch(ye){ge=ye}s.call(ke.prototype)}}else{try{throw Error()}catch(ye){ge=ye}(ke=s())&&typeof ke.catch=="function"&&ke.catch(function(){})}}catch(ye){if(ye&&ge&&typeof ye.stack=="string")return[ye.stack,ge.stack]}return[null,null]}};m.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var x=Object.getOwnPropertyDescriptor(m.DetermineComponentFrameRoot,"name");x&&x.configurable&&Object.defineProperty(m.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var E=m.DetermineComponentFrameRoot(),O=E[0],H=E[1];if(O&&H){var J=O.split(`
|
|
45
|
+
`),de=H.split(`
|
|
46
|
+
`);for(x=m=0;m<J.length&&!J[m].includes("DetermineComponentFrameRoot");)m++;for(;x<de.length&&!de[x].includes("DetermineComponentFrameRoot");)x++;if(m===J.length||x===de.length)for(m=J.length-1,x=de.length-1;1<=m&&0<=x&&J[m]!==de[x];)x--;for(;1<=m&&0<=x;m--,x--)if(J[m]!==de[x]){if(m!==1||x!==1)do if(m--,x--,0>x||J[m]!==de[x]){var xe=`
|
|
47
|
+
`+J[m].replace(" at new "," at ");return s.displayName&&xe.includes("<anonymous>")&&(xe=xe.replace("<anonymous>",s.displayName)),xe}while(1<=m&&0<=x);break}}}finally{Ee=!1,Error.prepareStackTrace=d}return(d=s?s.displayName||s.name:"")?ee(d):""}function _e(s,l){switch(s.tag){case 26:case 27:case 5:return ee(s.type);case 16:return ee("Lazy");case 13:return s.child!==l&&l!==null?ee("Suspense Fallback"):ee("Suspense");case 19:return ee("SuspenseList");case 0:case 15:return he(s.type,!1);case 11:return he(s.type.render,!1);case 1:return he(s.type,!0);case 31:return ee("Activity");default:return""}}function ue(s){try{var l="",d=null;do l+=_e(s,d),d=s,s=s.return;while(s);return l}catch(m){return`
|
|
48
|
+
Error generating stack: `+m.message+`
|
|
49
|
+
`+m.stack}}var re=Object.prototype.hasOwnProperty,ce=e.unstable_scheduleCallback,oe=e.unstable_cancelCallback,Ae=e.unstable_shouldYield,Ne=e.unstable_requestPaint,ve=e.unstable_now,$e=e.unstable_getCurrentPriorityLevel,le=e.unstable_ImmediatePriority,we=e.unstable_UserBlockingPriority,be=e.unstable_NormalPriority,Te=e.unstable_LowPriority,je=e.unstable_IdlePriority,rt=e.log,Mt=e.unstable_setDisableYieldValue,At=null,Xe=null;function gt(s){if(typeof rt=="function"&&Mt(s),Xe&&typeof Xe.setStrictMode=="function")try{Xe.setStrictMode(At,s)}catch{}}var De=Math.clz32?Math.clz32:Wt,We=Math.log,ot=Math.LN2;function Wt(s){return s>>>=0,s===0?32:31-(We(s)/ot|0)|0}var Et=256,Mn=262144,gn=4194304;function ln(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 on(s,l,d){var m=s.pendingLanes;if(m===0)return 0;var x=0,E=s.suspendedLanes,O=s.pingedLanes;s=s.warmLanes;var H=m&134217727;return H!==0?(m=H&~E,m!==0?x=ln(m):(O&=H,O!==0?x=ln(O):d||(d=H&~s,d!==0&&(x=ln(d))))):(H=m&~E,H!==0?x=ln(H):O!==0?x=ln(O):d||(d=m&~s,d!==0&&(x=ln(d)))),x===0?0:l!==0&&l!==x&&(l&E)===0&&(E=x&-x,d=l&-l,E>=d||E===32&&(d&4194048)!==0)?l:x}function rr(s,l){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&l)===0}function Ui(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 _i(){var s=gn;return gn<<=1,(gn&62914560)===0&&(gn=4194304),s}function Ai(s){for(var l=[],d=0;31>d;d++)l.push(s);return l}function Pn(s,l){s.pendingLanes|=l,l!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function Ze(s,l,d,m,x,E){var O=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 H=s.entanglements,J=s.expirationTimes,de=s.hiddenUpdates;for(d=O&~d;0<d;){var xe=31-De(d),ke=1<<xe;H[xe]=0,J[xe]=-1;var ge=de[xe];if(ge!==null)for(de[xe]=null,xe=0;xe<ge.length;xe++){var ye=ge[xe];ye!==null&&(ye.lane&=-536870913)}d&=~ke}m!==0&&zt(s,m,0),E!==0&&x===0&&s.tag!==0&&(s.suspendedLanes|=E&~(O&~l))}function zt(s,l,d){s.pendingLanes|=l,s.suspendedLanes&=~l;var m=31-De(l);s.entangledLanes|=l,s.entanglements[m]=s.entanglements[m]|1073741824|d&261930}function un(s,l){var d=s.entangledLanes|=l;for(s=s.entanglements;d;){var m=31-De(d),x=1<<m;x&l|s[m]&l&&(s[m]|=l),d&=~x}}function Xt(s,l){var d=l&-l;return d=(d&42)!==0?1:cn(d),(d&(s.suspendedLanes|l))!==0?0:d}function cn(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 po(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function Yl(){var s=P.p;return s!==0?s:(s=window.event,s===void 0?32:y_(s.type))}function fs(s,l){var d=P.p;try{return P.p=s,l()}finally{P.p=d}}var pr=Math.random().toString(36).slice(2),sn="__reactFiber$"+pr,mr="__reactProps$"+pr,Wl="__reactContainer$"+pr,Hy="__reactEvents$"+pr,Sz="__reactListeners$"+pr,Cz="__reactHandles$"+pr,NC="__reactResources$"+pr,Vc="__reactMarker$"+pr;function qy(s){delete s[sn],delete s[mr],delete s[Hy],delete s[Sz],delete s[Cz]}function Xl(s){var l=s[sn];if(l)return l;for(var d=s.parentNode;d;){if(l=d[Wl]||d[sn]){if(d=l.alternate,l.child!==null||d!==null&&d.child!==null)for(s=t_(s);s!==null;){if(d=s[sn])return d;s=t_(s)}return l}s=d,d=s.parentNode}return null}function Kl(s){if(s=s[sn]||s[Wl]){var l=s.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return s}return null}function Yc(s){var l=s.tag;if(l===5||l===26||l===27||l===6)return s.stateNode;throw Error(r(33))}function Ql(s){var l=s[NC];return l||(l=s[NC]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function On(s){s[Vc]=!0}var LC=new Set,jC={};function Na(s,l){Zl(s,l),Zl(s+"Capture",l)}function Zl(s,l){for(jC[s]=l,s=0;s<l.length;s++)LC.add(l[s])}var Ez=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]*$"),zC={},PC={};function kz(s){return re.call(PC,s)?!0:re.call(zC,s)?!1:Ez.test(s)?PC[s]=!0:(zC[s]=!0,!1)}function hh(s,l,d){if(kz(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 ph(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 mo(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 ni(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function IC(s){var l=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function _z(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 x=m.get,E=m.set;return Object.defineProperty(s,l,{configurable:!0,get:function(){return x.call(this)},set:function(O){d=""+O,E.call(this,O)}}),Object.defineProperty(s,l,{enumerable:m.enumerable}),{getValue:function(){return d},setValue:function(O){d=""+O},stopTracking:function(){s._valueTracker=null,delete s[l]}}}}function Gy(s){if(!s._valueTracker){var l=IC(s)?"checked":"value";s._valueTracker=_z(s,l,""+s[l])}}function FC(s){if(!s)return!1;var l=s._valueTracker;if(!l)return!0;var d=l.getValue(),m="";return s&&(m=IC(s)?s.checked?"true":"false":s.value),s=m,s!==d?(l.setValue(s),!0):!1}function mh(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 Az=/[\n"\\]/g;function ri(s){return s.replace(Az,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Vy(s,l,d,m,x,E,O,H){s.name="",O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"?s.type=O:s.removeAttribute("type"),l!=null?O==="number"?(l===0&&s.value===""||s.value!=l)&&(s.value=""+ni(l)):s.value!==""+ni(l)&&(s.value=""+ni(l)):O!=="submit"&&O!=="reset"||s.removeAttribute("value"),l!=null?Yy(s,O,ni(l)):d!=null?Yy(s,O,ni(d)):m!=null&&s.removeAttribute("value"),x==null&&E!=null&&(s.defaultChecked=!!E),x!=null&&(s.checked=x&&typeof x!="function"&&typeof x!="symbol"),H!=null&&typeof H!="function"&&typeof H!="symbol"&&typeof H!="boolean"?s.name=""+ni(H):s.removeAttribute("name")}function BC(s,l,d,m,x,E,O,H){if(E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"&&(s.type=E),l!=null||d!=null){if(!(E!=="submit"&&E!=="reset"||l!=null)){Gy(s);return}d=d!=null?""+ni(d):"",l=l!=null?""+ni(l):d,H||l===s.value||(s.value=l),s.defaultValue=l}m=m??x,m=typeof m!="function"&&typeof m!="symbol"&&!!m,s.checked=H?s.checked:!!m,s.defaultChecked=!!m,O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"&&(s.name=O),Gy(s)}function Yy(s,l,d){l==="number"&&mh(s.ownerDocument)===s||s.defaultValue===""+d||(s.defaultValue=""+d)}function Jl(s,l,d,m){if(s=s.options,l){l={};for(var x=0;x<d.length;x++)l["$"+d[x]]=!0;for(d=0;d<s.length;d++)x=l.hasOwnProperty("$"+s[d].value),s[d].selected!==x&&(s[d].selected=x),x&&m&&(s[d].defaultSelected=!0)}else{for(d=""+ni(d),l=null,x=0;x<s.length;x++){if(s[x].value===d){s[x].selected=!0,m&&(s[x].defaultSelected=!0);return}l!==null||s[x].disabled||(l=s[x])}l!==null&&(l.selected=!0)}}function UC(s,l,d){if(l!=null&&(l=""+ni(l),l!==s.value&&(s.value=l),d==null)){s.defaultValue!==l&&(s.defaultValue=l);return}s.defaultValue=d!=null?""+ni(d):""}function HC(s,l,d,m){if(l==null){if(m!=null){if(d!=null)throw Error(r(92));if(U(m)){if(1<m.length)throw Error(r(93));m=m[0]}d=m}d==null&&(d=""),l=d}d=ni(l),s.defaultValue=d,m=s.textContent,m===d&&m!==""&&m!==null&&(s.value=m),Gy(s)}function eu(s,l){if(l){var d=s.firstChild;if(d&&d===s.lastChild&&d.nodeType===3){d.nodeValue=l;return}}s.textContent=l}var Rz=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 qC(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||Rz.has(l)?l==="float"?s.cssFloat=d:s[l]=(""+d).trim():s[l]=d+"px"}function GC(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 x in l)m=l[x],l.hasOwnProperty(x)&&d[x]!==m&&qC(s,x,m)}else for(var E in l)l.hasOwnProperty(E)&&qC(s,E,l[E])}function Wy(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 Dz=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"]]),Tz=/^[\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 gh(s){return Tz.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}function go(){}var Xy=null;function Ky(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var tu=null,nu=null;function VC(s){var l=Kl(s);if(l&&(s=l.stateNode)){var d=s[mr]||null;e:switch(s=l.stateNode,l.type){case"input":if(Vy(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="'+ri(""+l)+'"][type="radio"]'),l=0;l<d.length;l++){var m=d[l];if(m!==s&&m.form===s.form){var x=m[mr]||null;if(!x)throw Error(r(90));Vy(m,x.value,x.defaultValue,x.defaultValue,x.checked,x.defaultChecked,x.type,x.name)}}for(l=0;l<d.length;l++)m=d[l],m.form===s.form&&FC(m)}break e;case"textarea":UC(s,d.value,d.defaultValue);break e;case"select":l=d.value,l!=null&&Jl(s,!!d.multiple,l,!1)}}}var Qy=!1;function YC(s,l,d){if(Qy)return s(l,d);Qy=!0;try{var m=s(l);return m}finally{if(Qy=!1,(tu!==null||nu!==null)&&(rp(),tu&&(l=tu,s=nu,nu=tu=null,VC(l),s)))for(l=0;l<s.length;l++)VC(s[l])}}function Wc(s,l){var d=s.stateNode;if(d===null)return null;var m=d[mr]||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 yo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Zy=!1;if(yo)try{var Xc={};Object.defineProperty(Xc,"passive",{get:function(){Zy=!0}}),window.addEventListener("test",Xc,Xc),window.removeEventListener("test",Xc,Xc)}catch{Zy=!1}var ds=null,Jy=null,yh=null;function WC(){if(yh)return yh;var s,l=Jy,d=l.length,m,x="value"in ds?ds.value:ds.textContent,E=x.length;for(s=0;s<d&&l[s]===x[s];s++);var O=d-s;for(m=1;m<=O&&l[d-m]===x[E-m];m++);return yh=x.slice(s,1<m?1-m:void 0)}function bh(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 vh(){return!0}function XC(){return!1}function gr(s){function l(d,m,x,E,O){this._reactName=d,this._targetInst=x,this.type=m,this.nativeEvent=E,this.target=O,this.currentTarget=null;for(var H in s)s.hasOwnProperty(H)&&(d=s[H],this[H]=d?d(E):E[H]);return this.isDefaultPrevented=(E.defaultPrevented!=null?E.defaultPrevented:E.returnValue===!1)?vh:XC,this.isPropagationStopped=XC,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=vh)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=vh)},persist:function(){},isPersistent:vh}),l}var La={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xh=gr(La),Kc=p({},La,{view:0,detail:0}),$z=gr(Kc),e0,t0,Qc,wh=p({},Kc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:r0,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!==Qc&&(Qc&&s.type==="mousemove"?(e0=s.screenX-Qc.screenX,t0=s.screenY-Qc.screenY):t0=e0=0,Qc=s),e0)},movementY:function(s){return"movementY"in s?s.movementY:t0}}),KC=gr(wh),Mz=p({},wh,{dataTransfer:0}),Oz=gr(Mz),Nz=p({},Kc,{relatedTarget:0}),n0=gr(Nz),Lz=p({},La,{animationName:0,elapsedTime:0,pseudoElement:0}),jz=gr(Lz),zz=p({},La,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),Pz=gr(zz),Iz=p({},La,{data:0}),QC=gr(Iz),Fz={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Bz={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"},Uz={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Hz(s){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(s):(s=Uz[s])?!!l[s]:!1}function r0(){return Hz}var qz=p({},Kc,{key:function(s){if(s.key){var l=Fz[s.key]||s.key;if(l!=="Unidentified")return l}return s.type==="keypress"?(s=bh(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?Bz[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:r0,charCode:function(s){return s.type==="keypress"?bh(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?bh(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),Gz=gr(qz),Vz=p({},wh,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ZC=gr(Vz),Yz=p({},Kc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:r0}),Wz=gr(Yz),Xz=p({},La,{propertyName:0,elapsedTime:0,pseudoElement:0}),Kz=gr(Xz),Qz=p({},wh,{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}),Zz=gr(Qz),Jz=p({},La,{newState:0,oldState:0}),eP=gr(Jz),tP=[9,13,27,32],i0=yo&&"CompositionEvent"in window,Zc=null;yo&&"documentMode"in document&&(Zc=document.documentMode);var nP=yo&&"TextEvent"in window&&!Zc,JC=yo&&(!i0||Zc&&8<Zc&&11>=Zc),eE=" ",tE=!1;function nE(s,l){switch(s){case"keyup":return tP.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function rE(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var ru=!1;function rP(s,l){switch(s){case"compositionend":return rE(l);case"keypress":return l.which!==32?null:(tE=!0,eE);case"textInput":return s=l.data,s===eE&&tE?null:s;default:return null}}function iP(s,l){if(ru)return s==="compositionend"||!i0&&nE(s,l)?(s=WC(),yh=Jy=ds=null,ru=!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 JC&&l.locale!=="ko"?null:l.data;default:return null}}var oP={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 iE(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l==="input"?!!oP[s.type]:l==="textarea"}function oE(s,l,d,m){tu?nu?nu.push(m):nu=[m]:tu=m,l=cp(l,"onChange"),0<l.length&&(d=new xh("onChange","change",null,d,m),s.push({event:d,listeners:l}))}var Jc=null,ef=null;function sP(s){B2(s,0)}function Sh(s){var l=Yc(s);if(FC(l))return s}function sE(s,l){if(s==="change")return l}var aE=!1;if(yo){var o0;if(yo){var s0="oninput"in document;if(!s0){var lE=document.createElement("div");lE.setAttribute("oninput","return;"),s0=typeof lE.oninput=="function"}o0=s0}else o0=!1;aE=o0&&(!document.documentMode||9<document.documentMode)}function uE(){Jc&&(Jc.detachEvent("onpropertychange",cE),ef=Jc=null)}function cE(s){if(s.propertyName==="value"&&Sh(ef)){var l=[];oE(l,ef,s,Ky(s)),YC(sP,l)}}function aP(s,l,d){s==="focusin"?(uE(),Jc=l,ef=d,Jc.attachEvent("onpropertychange",cE)):s==="focusout"&&uE()}function lP(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return Sh(ef)}function uP(s,l){if(s==="click")return Sh(l)}function cP(s,l){if(s==="input"||s==="change")return Sh(l)}function fP(s,l){return s===l&&(s!==0||1/s===1/l)||s!==s&&l!==l}var Nr=typeof Object.is=="function"?Object.is:fP;function tf(s,l){if(Nr(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 x=d[m];if(!re.call(l,x)||!Nr(s[x],l[x]))return!1}return!0}function fE(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function dE(s,l){var d=fE(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=fE(d)}}function hE(s,l){return s&&l?s===l?!0:s&&s.nodeType===3?!1:l&&l.nodeType===3?hE(s,l.parentNode):"contains"in s?s.contains(l):s.compareDocumentPosition?!!(s.compareDocumentPosition(l)&16):!1:!1}function pE(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var l=mh(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=mh(s.document)}return l}function a0(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 dP=yo&&"documentMode"in document&&11>=document.documentMode,iu=null,l0=null,nf=null,u0=!1;function mE(s,l,d){var m=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;u0||iu==null||iu!==mh(m)||(m=iu,"selectionStart"in m&&a0(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}),nf&&tf(nf,m)||(nf=m,m=cp(l0,"onSelect"),0<m.length&&(l=new xh("onSelect","select",null,l,d),s.push({event:l,listeners:m}),l.target=iu)))}function ja(s,l){var d={};return d[s.toLowerCase()]=l.toLowerCase(),d["Webkit"+s]="webkit"+l,d["Moz"+s]="moz"+l,d}var ou={animationend:ja("Animation","AnimationEnd"),animationiteration:ja("Animation","AnimationIteration"),animationstart:ja("Animation","AnimationStart"),transitionrun:ja("Transition","TransitionRun"),transitionstart:ja("Transition","TransitionStart"),transitioncancel:ja("Transition","TransitionCancel"),transitionend:ja("Transition","TransitionEnd")},c0={},gE={};yo&&(gE=document.createElement("div").style,"AnimationEvent"in window||(delete ou.animationend.animation,delete ou.animationiteration.animation,delete ou.animationstart.animation),"TransitionEvent"in window||delete ou.transitionend.transition);function za(s){if(c0[s])return c0[s];if(!ou[s])return s;var l=ou[s],d;for(d in l)if(l.hasOwnProperty(d)&&d in gE)return c0[s]=l[d];return s}var yE=za("animationend"),bE=za("animationiteration"),vE=za("animationstart"),hP=za("transitionrun"),pP=za("transitionstart"),mP=za("transitioncancel"),xE=za("transitionend"),wE=new Map,f0="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(" ");f0.push("scrollEnd");function Ri(s,l){wE.set(s,l),Na(l,[s])}var Ch=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)},ii=[],su=0,d0=0;function Eh(){for(var s=su,l=d0=su=0;l<s;){var d=ii[l];ii[l++]=null;var m=ii[l];ii[l++]=null;var x=ii[l];ii[l++]=null;var E=ii[l];if(ii[l++]=null,m!==null&&x!==null){var O=m.pending;O===null?x.next=x:(x.next=O.next,O.next=x),m.pending=x}E!==0&&SE(d,x,E)}}function kh(s,l,d,m){ii[su++]=s,ii[su++]=l,ii[su++]=d,ii[su++]=m,d0|=m,s.lanes|=m,s=s.alternate,s!==null&&(s.lanes|=m)}function h0(s,l,d,m){return kh(s,l,d,m),_h(s)}function Pa(s,l){return kh(s,null,null,l),_h(s)}function SE(s,l,d){s.lanes|=d;var m=s.alternate;m!==null&&(m.lanes|=d);for(var x=!1,E=s.return;E!==null;)E.childLanes|=d,m=E.alternate,m!==null&&(m.childLanes|=d),E.tag===22&&(s=E.stateNode,s===null||s._visibility&1||(x=!0)),s=E,E=E.return;return s.tag===3?(E=s.stateNode,x&&l!==null&&(x=31-De(d),s=E.hiddenUpdates,m=s[x],m===null?s[x]=[l]:m.push(l),l.lane=d|536870912),E):null}function _h(s){if(50<kf)throw kf=0,Sb=null,Error(r(185));for(var l=s.return;l!==null;)s=l,l=s.return;return s.tag===3?s.stateNode:null}var au={};function gP(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 Lr(s,l,d,m){return new gP(s,l,d,m)}function p0(s){return s=s.prototype,!(!s||!s.isReactComponent)}function bo(s,l){var d=s.alternate;return d===null?(d=Lr(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 CE(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 Ah(s,l,d,m,x,E){var O=0;if(m=s,typeof s=="function")p0(s)&&(O=1);else if(typeof s=="string")O=wI(s,d,ae.current)?26:s==="html"||s==="head"||s==="body"?27:5;else e:switch(s){case F:return s=Lr(31,d,l,x),s.elementType=F,s.lanes=E,s;case v:return Ia(d.children,x,E,l);case S:O=8,x|=24;break;case w:return s=Lr(12,d,l,x|2),s.elementType=w,s.lanes=E,s;case D:return s=Lr(13,d,l,x),s.elementType=D,s.lanes=E,s;case T:return s=Lr(19,d,l,x),s.elementType=T,s.lanes=E,s;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case k:O=10;break e;case A:O=9;break e;case R:O=11;break e;case $:O=14;break e;case N:O=16,m=null;break e}O=29,d=Error(r(130,s===null?"null":typeof s,"")),m=null}return l=Lr(O,d,l,x),l.elementType=s,l.type=m,l.lanes=E,l}function Ia(s,l,d,m){return s=Lr(7,s,m,l),s.lanes=d,s}function m0(s,l,d){return s=Lr(6,s,null,l),s.lanes=d,s}function EE(s){var l=Lr(18,null,null,0);return l.stateNode=s,l}function g0(s,l,d){return l=Lr(4,s.children!==null?s.children:[],s.key,l),l.lanes=d,l.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},l}var kE=new WeakMap;function oi(s,l){if(typeof s=="object"&&s!==null){var d=kE.get(s);return d!==void 0?d:(l={value:s,source:l,stack:ue(l)},kE.set(s,l),l)}return{value:s,source:l,stack:ue(l)}}var lu=[],uu=0,Rh=null,rf=0,si=[],ai=0,hs=null,Hi=1,qi="";function vo(s,l){lu[uu++]=rf,lu[uu++]=Rh,Rh=s,rf=l}function _E(s,l,d){si[ai++]=Hi,si[ai++]=qi,si[ai++]=hs,hs=s;var m=Hi;s=qi;var x=32-De(m)-1;m&=~(1<<x),d+=1;var E=32-De(l)+x;if(30<E){var O=x-x%5;E=(m&(1<<O)-1).toString(32),m>>=O,x-=O,Hi=1<<32-De(l)+x|d<<x|m,qi=E+s}else Hi=1<<E|d<<x|m,qi=s}function y0(s){s.return!==null&&(vo(s,1),_E(s,1,0))}function b0(s){for(;s===Rh;)Rh=lu[--uu],lu[uu]=null,rf=lu[--uu],lu[uu]=null;for(;s===hs;)hs=si[--ai],si[ai]=null,qi=si[--ai],si[ai]=null,Hi=si[--ai],si[ai]=null}function AE(s,l){si[ai++]=Hi,si[ai++]=qi,si[ai++]=hs,Hi=l.id,qi=l.overflow,hs=s}var In=null,Kt=null,kt=!1,ps=null,li=!1,v0=Error(r(519));function ms(s){var l=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw of(oi(l,s)),v0}function RE(s){var l=s.stateNode,d=s.type,m=s.memoizedProps;switch(l[sn]=s,l[mr]=m,d){case"dialog":vt("cancel",l),vt("close",l);break;case"iframe":case"object":case"embed":vt("load",l);break;case"video":case"audio":for(d=0;d<Af.length;d++)vt(Af[d],l);break;case"source":vt("error",l);break;case"img":case"image":case"link":vt("error",l),vt("load",l);break;case"details":vt("toggle",l);break;case"input":vt("invalid",l),BC(l,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":vt("invalid",l);break;case"textarea":vt("invalid",l),HC(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||G2(l.textContent,d)?(m.popover!=null&&(vt("beforetoggle",l),vt("toggle",l)),m.onScroll!=null&&vt("scroll",l),m.onScrollEnd!=null&&vt("scrollend",l),m.onClick!=null&&(l.onclick=go),l=!0):l=!1,l||ms(s,!0)}function DE(s){for(In=s.return;In;)switch(In.tag){case 5:case 31:case 13:li=!1;return;case 27:case 3:li=!0;return;default:In=In.return}}function cu(s){if(s!==In)return!1;if(!kt)return DE(s),kt=!0,!1;var l=s.tag,d;if((d=l!==3&&l!==27)&&((d=l===5)&&(d=s.type,d=!(d!=="form"&&d!=="button")||zb(s.type,s.memoizedProps)),d=!d),d&&Kt&&ms(s),DE(s),l===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));Kt=e_(s)}else if(l===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));Kt=e_(s)}else l===27?(l=Kt,Ds(s.type)?(s=Ub,Ub=null,Kt=s):Kt=l):Kt=In?ci(s.stateNode.nextSibling):null;return!0}function Fa(){Kt=In=null,kt=!1}function x0(){var s=ps;return s!==null&&(xr===null?xr=s:xr.push.apply(xr,s),ps=null),s}function of(s){ps===null?ps=[s]:ps.push(s)}var w0=Y(null),Ba=null,xo=null;function gs(s,l,d){B(w0,l._currentValue),l._currentValue=d}function wo(s){s._currentValue=w0.current,Q(w0)}function S0(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 C0(s,l,d,m){var x=s.child;for(x!==null&&(x.return=s);x!==null;){var E=x.dependencies;if(E!==null){var O=x.child;E=E.firstContext;e:for(;E!==null;){var H=E;E=x;for(var J=0;J<l.length;J++)if(H.context===l[J]){E.lanes|=d,H=E.alternate,H!==null&&(H.lanes|=d),S0(E.return,d,s),m||(O=null);break e}E=H.next}}else if(x.tag===18){if(O=x.return,O===null)throw Error(r(341));O.lanes|=d,E=O.alternate,E!==null&&(E.lanes|=d),S0(O,d,s),O=null}else O=x.child;if(O!==null)O.return=x;else for(O=x;O!==null;){if(O===s){O=null;break}if(x=O.sibling,x!==null){x.return=O.return,O=x;break}O=O.return}x=O}}function fu(s,l,d,m){s=null;for(var x=l,E=!1;x!==null;){if(!E){if((x.flags&524288)!==0)E=!0;else if((x.flags&262144)!==0)break}if(x.tag===10){var O=x.alternate;if(O===null)throw Error(r(387));if(O=O.memoizedProps,O!==null){var H=x.type;Nr(x.pendingProps.value,O.value)||(s!==null?s.push(H):s=[H])}}else if(x===Ce.current){if(O=x.alternate,O===null)throw Error(r(387));O.memoizedState.memoizedState!==x.memoizedState.memoizedState&&(s!==null?s.push(Mf):s=[Mf])}x=x.return}s!==null&&C0(l,s,d,m),l.flags|=262144}function Dh(s){for(s=s.firstContext;s!==null;){if(!Nr(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function Ua(s){Ba=s,xo=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function Fn(s){return TE(Ba,s)}function Th(s,l){return Ba===null&&Ua(s),TE(s,l)}function TE(s,l){var d=l._currentValue;if(l={context:l,memoizedValue:d,next:null},xo===null){if(s===null)throw Error(r(308));xo=l,s.dependencies={lanes:0,firstContext:l},s.flags|=524288}else xo=xo.next=l;return d}var yP=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()})}},bP=e.unstable_scheduleCallback,vP=e.unstable_NormalPriority,xn={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function E0(){return{controller:new yP,data:new Map,refCount:0}}function sf(s){s.refCount--,s.refCount===0&&bP(vP,function(){s.controller.abort()})}var af=null,k0=0,du=0,hu=null;function xP(s,l){if(af===null){var d=af=[];k0=0,du=Rb(),hu={status:"pending",value:void 0,then:function(m){d.push(m)}}}return k0++,l.then($E,$E),l}function $E(){if(--k0===0&&af!==null){hu!==null&&(hu.status="fulfilled");var s=af;af=null,du=0,hu=null;for(var l=0;l<s.length;l++)(0,s[l])()}}function wP(s,l){var d=[],m={status:"pending",value:null,reason:null,then:function(x){d.push(x)}};return s.then(function(){m.status="fulfilled",m.value=l;for(var x=0;x<d.length;x++)(0,d[x])(l)},function(x){for(m.status="rejected",m.reason=x,x=0;x<d.length;x++)(0,d[x])(void 0)}),m}var ME=I.S;I.S=function(s,l){m2=ve(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&xP(s,l),ME!==null&&ME(s,l)};var Ha=Y(null);function _0(){var s=Ha.current;return s!==null?s:qt.pooledCache}function $h(s,l){l===null?B(Ha,Ha.current):B(Ha,l.pool)}function OE(){var s=_0();return s===null?null:{parent:xn._currentValue,pool:s}}var pu=Error(r(460)),A0=Error(r(474)),Mh=Error(r(542)),Oh={then:function(){}};function NE(s){return s=s.status,s==="fulfilled"||s==="rejected"}function LE(s,l,d){switch(d=s[d],d===void 0?s.push(l):d!==l&&(l.then(go,go),l=d),l.status){case"fulfilled":return l.value;case"rejected":throw s=l.reason,zE(s),s;default:if(typeof l.status=="string")l.then(go,go);else{if(s=qt,s!==null&&100<s.shellSuspendCounter)throw Error(r(482));s=l,s.status="pending",s.then(function(m){if(l.status==="pending"){var x=l;x.status="fulfilled",x.value=m}},function(m){if(l.status==="pending"){var x=l;x.status="rejected",x.reason=m}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw s=l.reason,zE(s),s}throw Ga=l,pu}}function qa(s){try{var l=s._init;return l(s._payload)}catch(d){throw d!==null&&typeof d=="object"&&typeof d.then=="function"?(Ga=d,pu):d}}var Ga=null;function jE(){if(Ga===null)throw Error(r(459));var s=Ga;return Ga=null,s}function zE(s){if(s===pu||s===Mh)throw Error(r(483))}var mu=null,lf=0;function Nh(s){var l=lf;return lf+=1,mu===null&&(mu=[]),LE(mu,s,l)}function uf(s,l){l=l.props.ref,s.ref=l!==void 0?l:null}function Lh(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 PE(s){function l(se,ne){if(s){var fe=se.deletions;fe===null?(se.deletions=[ne],se.flags|=16):fe.push(ne)}}function d(se,ne){if(!s)return null;for(;ne!==null;)l(se,ne),ne=ne.sibling;return null}function m(se){for(var ne=new Map;se!==null;)se.key!==null?ne.set(se.key,se):ne.set(se.index,se),se=se.sibling;return ne}function x(se,ne){return se=bo(se,ne),se.index=0,se.sibling=null,se}function E(se,ne,fe){return se.index=fe,s?(fe=se.alternate,fe!==null?(fe=fe.index,fe<ne?(se.flags|=67108866,ne):fe):(se.flags|=67108866,ne)):(se.flags|=1048576,ne)}function O(se){return s&&se.alternate===null&&(se.flags|=67108866),se}function H(se,ne,fe,Se){return ne===null||ne.tag!==6?(ne=m0(fe,se.mode,Se),ne.return=se,ne):(ne=x(ne,fe),ne.return=se,ne)}function J(se,ne,fe,Se){var Ke=fe.type;return Ke===v?xe(se,ne,fe.props.children,Se,fe.key):ne!==null&&(ne.elementType===Ke||typeof Ke=="object"&&Ke!==null&&Ke.$$typeof===N&&qa(Ke)===ne.type)?(ne=x(ne,fe.props),uf(ne,fe),ne.return=se,ne):(ne=Ah(fe.type,fe.key,fe.props,null,se.mode,Se),uf(ne,fe),ne.return=se,ne)}function de(se,ne,fe,Se){return ne===null||ne.tag!==4||ne.stateNode.containerInfo!==fe.containerInfo||ne.stateNode.implementation!==fe.implementation?(ne=g0(fe,se.mode,Se),ne.return=se,ne):(ne=x(ne,fe.children||[]),ne.return=se,ne)}function xe(se,ne,fe,Se,Ke){return ne===null||ne.tag!==7?(ne=Ia(fe,se.mode,Se,Ke),ne.return=se,ne):(ne=x(ne,fe),ne.return=se,ne)}function ke(se,ne,fe){if(typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint")return ne=m0(""+ne,se.mode,fe),ne.return=se,ne;if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case y:return fe=Ah(ne.type,ne.key,ne.props,null,se.mode,fe),uf(fe,ne),fe.return=se,fe;case b:return ne=g0(ne,se.mode,fe),ne.return=se,ne;case N:return ne=qa(ne),ke(se,ne,fe)}if(U(ne)||M(ne))return ne=Ia(ne,se.mode,fe,null),ne.return=se,ne;if(typeof ne.then=="function")return ke(se,Nh(ne),fe);if(ne.$$typeof===k)return ke(se,Th(se,ne),fe);Lh(se,ne)}return null}function ge(se,ne,fe,Se){var Ke=ne!==null?ne.key:null;if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return Ke!==null?null:H(se,ne,""+fe,Se);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case y:return fe.key===Ke?J(se,ne,fe,Se):null;case b:return fe.key===Ke?de(se,ne,fe,Se):null;case N:return fe=qa(fe),ge(se,ne,fe,Se)}if(U(fe)||M(fe))return Ke!==null?null:xe(se,ne,fe,Se,null);if(typeof fe.then=="function")return ge(se,ne,Nh(fe),Se);if(fe.$$typeof===k)return ge(se,ne,Th(se,fe),Se);Lh(se,fe)}return null}function ye(se,ne,fe,Se,Ke){if(typeof Se=="string"&&Se!==""||typeof Se=="number"||typeof Se=="bigint")return se=se.get(fe)||null,H(ne,se,""+Se,Ke);if(typeof Se=="object"&&Se!==null){switch(Se.$$typeof){case y:return se=se.get(Se.key===null?fe:Se.key)||null,J(ne,se,Se,Ke);case b:return se=se.get(Se.key===null?fe:Se.key)||null,de(ne,se,Se,Ke);case N:return Se=qa(Se),ye(se,ne,fe,Se,Ke)}if(U(Se)||M(Se))return se=se.get(fe)||null,xe(ne,se,Se,Ke,null);if(typeof Se.then=="function")return ye(se,ne,fe,Nh(Se),Ke);if(Se.$$typeof===k)return ye(se,ne,fe,Th(ne,Se),Ke);Lh(ne,Se)}return null}function Fe(se,ne,fe,Se){for(var Ke=null,Tt=null,Ge=ne,dt=ne=0,St=null;Ge!==null&&dt<fe.length;dt++){Ge.index>dt?(St=Ge,Ge=null):St=Ge.sibling;var $t=ge(se,Ge,fe[dt],Se);if($t===null){Ge===null&&(Ge=St);break}s&&Ge&&$t.alternate===null&&l(se,Ge),ne=E($t,ne,dt),Tt===null?Ke=$t:Tt.sibling=$t,Tt=$t,Ge=St}if(dt===fe.length)return d(se,Ge),kt&&vo(se,dt),Ke;if(Ge===null){for(;dt<fe.length;dt++)Ge=ke(se,fe[dt],Se),Ge!==null&&(ne=E(Ge,ne,dt),Tt===null?Ke=Ge:Tt.sibling=Ge,Tt=Ge);return kt&&vo(se,dt),Ke}for(Ge=m(Ge);dt<fe.length;dt++)St=ye(Ge,se,dt,fe[dt],Se),St!==null&&(s&&St.alternate!==null&&Ge.delete(St.key===null?dt:St.key),ne=E(St,ne,dt),Tt===null?Ke=St:Tt.sibling=St,Tt=St);return s&&Ge.forEach(function(Ns){return l(se,Ns)}),kt&&vo(se,dt),Ke}function Je(se,ne,fe,Se){if(fe==null)throw Error(r(151));for(var Ke=null,Tt=null,Ge=ne,dt=ne=0,St=null,$t=fe.next();Ge!==null&&!$t.done;dt++,$t=fe.next()){Ge.index>dt?(St=Ge,Ge=null):St=Ge.sibling;var Ns=ge(se,Ge,$t.value,Se);if(Ns===null){Ge===null&&(Ge=St);break}s&&Ge&&Ns.alternate===null&&l(se,Ge),ne=E(Ns,ne,dt),Tt===null?Ke=Ns:Tt.sibling=Ns,Tt=Ns,Ge=St}if($t.done)return d(se,Ge),kt&&vo(se,dt),Ke;if(Ge===null){for(;!$t.done;dt++,$t=fe.next())$t=ke(se,$t.value,Se),$t!==null&&(ne=E($t,ne,dt),Tt===null?Ke=$t:Tt.sibling=$t,Tt=$t);return kt&&vo(se,dt),Ke}for(Ge=m(Ge);!$t.done;dt++,$t=fe.next())$t=ye(Ge,se,dt,$t.value,Se),$t!==null&&(s&&$t.alternate!==null&&Ge.delete($t.key===null?dt:$t.key),ne=E($t,ne,dt),Tt===null?Ke=$t:Tt.sibling=$t,Tt=$t);return s&&Ge.forEach(function(MI){return l(se,MI)}),kt&&vo(se,dt),Ke}function Ht(se,ne,fe,Se){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 Ke=fe.key;ne!==null;){if(ne.key===Ke){if(Ke=fe.type,Ke===v){if(ne.tag===7){d(se,ne.sibling),Se=x(ne,fe.props.children),Se.return=se,se=Se;break e}}else if(ne.elementType===Ke||typeof Ke=="object"&&Ke!==null&&Ke.$$typeof===N&&qa(Ke)===ne.type){d(se,ne.sibling),Se=x(ne,fe.props),uf(Se,fe),Se.return=se,se=Se;break e}d(se,ne);break}else l(se,ne);ne=ne.sibling}fe.type===v?(Se=Ia(fe.props.children,se.mode,Se,fe.key),Se.return=se,se=Se):(Se=Ah(fe.type,fe.key,fe.props,null,se.mode,Se),uf(Se,fe),Se.return=se,se=Se)}return O(se);case b:e:{for(Ke=fe.key;ne!==null;){if(ne.key===Ke)if(ne.tag===4&&ne.stateNode.containerInfo===fe.containerInfo&&ne.stateNode.implementation===fe.implementation){d(se,ne.sibling),Se=x(ne,fe.children||[]),Se.return=se,se=Se;break e}else{d(se,ne);break}else l(se,ne);ne=ne.sibling}Se=g0(fe,se.mode,Se),Se.return=se,se=Se}return O(se);case N:return fe=qa(fe),Ht(se,ne,fe,Se)}if(U(fe))return Fe(se,ne,fe,Se);if(M(fe)){if(Ke=M(fe),typeof Ke!="function")throw Error(r(150));return fe=Ke.call(fe),Je(se,ne,fe,Se)}if(typeof fe.then=="function")return Ht(se,ne,Nh(fe),Se);if(fe.$$typeof===k)return Ht(se,ne,Th(se,fe),Se);Lh(se,fe)}return typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint"?(fe=""+fe,ne!==null&&ne.tag===6?(d(se,ne.sibling),Se=x(ne,fe),Se.return=se,se=Se):(d(se,ne),Se=m0(fe,se.mode,Se),Se.return=se,se=Se),O(se)):d(se,ne)}return function(se,ne,fe,Se){try{lf=0;var Ke=Ht(se,ne,fe,Se);return mu=null,Ke}catch(Ge){if(Ge===pu||Ge===Mh)throw Ge;var Tt=Lr(29,Ge,null,se.mode);return Tt.lanes=Se,Tt.return=se,Tt}finally{}}}var Va=PE(!0),IE=PE(!1),ys=!1;function R0(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function D0(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 bs(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function vs(s,l,d){var m=s.updateQueue;if(m===null)return null;if(m=m.shared,(Ot&2)!==0){var x=m.pending;return x===null?l.next=l:(l.next=x.next,x.next=l),m.pending=l,l=_h(s),SE(s,null,d),l}return kh(s,m,l,d),_h(s)}function cf(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,un(s,d)}}function T0(s,l){var d=s.updateQueue,m=s.alternate;if(m!==null&&(m=m.updateQueue,d===m)){var x=null,E=null;if(d=d.firstBaseUpdate,d!==null){do{var O={lane:d.lane,tag:d.tag,payload:d.payload,callback:null,next:null};E===null?x=E=O:E=E.next=O,d=d.next}while(d!==null);E===null?x=E=l:E=E.next=l}else x=E=l;d={baseState:m.baseState,firstBaseUpdate:x,lastBaseUpdate:E,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 $0=!1;function ff(){if($0){var s=hu;if(s!==null)throw s}}function df(s,l,d,m){$0=!1;var x=s.updateQueue;ys=!1;var E=x.firstBaseUpdate,O=x.lastBaseUpdate,H=x.shared.pending;if(H!==null){x.shared.pending=null;var J=H,de=J.next;J.next=null,O===null?E=de:O.next=de,O=J;var xe=s.alternate;xe!==null&&(xe=xe.updateQueue,H=xe.lastBaseUpdate,H!==O&&(H===null?xe.firstBaseUpdate=de:H.next=de,xe.lastBaseUpdate=J))}if(E!==null){var ke=x.baseState;O=0,xe=de=J=null,H=E;do{var ge=H.lane&-536870913,ye=ge!==H.lane;if(ye?(wt&ge)===ge:(m&ge)===ge){ge!==0&&ge===du&&($0=!0),xe!==null&&(xe=xe.next={lane:0,tag:H.tag,payload:H.payload,callback:null,next:null});e:{var Fe=s,Je=H;ge=l;var Ht=d;switch(Je.tag){case 1:if(Fe=Je.payload,typeof Fe=="function"){ke=Fe.call(Ht,ke,ge);break e}ke=Fe;break e;case 3:Fe.flags=Fe.flags&-65537|128;case 0:if(Fe=Je.payload,ge=typeof Fe=="function"?Fe.call(Ht,ke,ge):Fe,ge==null)break e;ke=p({},ke,ge);break e;case 2:ys=!0}}ge=H.callback,ge!==null&&(s.flags|=64,ye&&(s.flags|=8192),ye=x.callbacks,ye===null?x.callbacks=[ge]:ye.push(ge))}else ye={lane:ge,tag:H.tag,payload:H.payload,callback:H.callback,next:null},xe===null?(de=xe=ye,J=ke):xe=xe.next=ye,O|=ge;if(H=H.next,H===null){if(H=x.shared.pending,H===null)break;ye=H,H=ye.next,ye.next=null,x.lastBaseUpdate=ye,x.shared.pending=null}}while(!0);xe===null&&(J=ke),x.baseState=J,x.firstBaseUpdate=de,x.lastBaseUpdate=xe,E===null&&(x.shared.lanes=0),Es|=O,s.lanes=O,s.memoizedState=ke}}function FE(s,l){if(typeof s!="function")throw Error(r(191,s));s.call(l)}function BE(s,l){var d=s.callbacks;if(d!==null)for(s.callbacks=null,s=0;s<d.length;s++)FE(d[s],l)}var gu=Y(null),jh=Y(0);function UE(s,l){s=To,B(jh,s),B(gu,l),To=s|l.baseLanes}function M0(){B(jh,To),B(gu,gu.current)}function O0(){To=jh.current,Q(gu),Q(jh)}var jr=Y(null),ui=null;function xs(s){var l=s.alternate;B(yn,yn.current&1),B(jr,s),ui===null&&(l===null||gu.current!==null||l.memoizedState!==null)&&(ui=s)}function N0(s){B(yn,yn.current),B(jr,s),ui===null&&(ui=s)}function HE(s){s.tag===22?(B(yn,yn.current),B(jr,s),ui===null&&(ui=s)):ws()}function ws(){B(yn,yn.current),B(jr,jr.current)}function zr(s){Q(jr),ui===s&&(ui=null),Q(yn)}var yn=Y(0);function zh(s){for(var l=s;l!==null;){if(l.tag===13){var d=l.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||Fb(d)||Bb(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 So=0,ft=null,Bt=null,wn=null,Ph=!1,yu=!1,Ya=!1,Ih=0,hf=0,bu=null,SP=0;function fn(){throw Error(r(321))}function L0(s,l){if(l===null)return!1;for(var d=0;d<l.length&&d<s.length;d++)if(!Nr(s[d],l[d]))return!1;return!0}function j0(s,l,d,m,x,E){return So=E,ft=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,I.H=s===null||s.memoizedState===null?_k:Q0,Ya=!1,E=d(m,x),Ya=!1,yu&&(E=GE(l,d,m,x)),qE(s),E}function qE(s){I.H=gf;var l=Bt!==null&&Bt.next!==null;if(So=0,wn=Bt=ft=null,Ph=!1,hf=0,bu=null,l)throw Error(r(300));s===null||Sn||(s=s.dependencies,s!==null&&Dh(s)&&(Sn=!0))}function GE(s,l,d,m){ft=s;var x=0;do{if(yu&&(bu=null),hf=0,yu=!1,25<=x)throw Error(r(301));if(x+=1,wn=Bt=null,s.updateQueue!=null){var E=s.updateQueue;E.lastEffect=null,E.events=null,E.stores=null,E.memoCache!=null&&(E.memoCache.index=0)}I.H=Ak,E=l(d,m)}while(yu);return E}function CP(){var s=I.H,l=s.useState()[0];return l=typeof l.then=="function"?pf(l):l,s=s.useState()[0],(Bt!==null?Bt.memoizedState:null)!==s&&(ft.flags|=1024),l}function z0(){var s=Ih!==0;return Ih=0,s}function P0(s,l,d){l.updateQueue=s.updateQueue,l.flags&=-2053,s.lanes&=~d}function I0(s){if(Ph){for(s=s.memoizedState;s!==null;){var l=s.queue;l!==null&&(l.pending=null),s=s.next}Ph=!1}So=0,wn=Bt=ft=null,yu=!1,hf=Ih=0,bu=null}function ir(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wn===null?ft.memoizedState=wn=s:wn=wn.next=s,wn}function bn(){if(Bt===null){var s=ft.alternate;s=s!==null?s.memoizedState:null}else s=Bt.next;var l=wn===null?ft.memoizedState:wn.next;if(l!==null)wn=l,Bt=s;else{if(s===null)throw ft.alternate===null?Error(r(467)):Error(r(310));Bt=s,s={memoizedState:Bt.memoizedState,baseState:Bt.baseState,baseQueue:Bt.baseQueue,queue:Bt.queue,next:null},wn===null?ft.memoizedState=wn=s:wn=wn.next=s}return wn}function Fh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function pf(s){var l=hf;return hf+=1,bu===null&&(bu=[]),s=LE(bu,s,l),l=ft,(wn===null?l.memoizedState:wn.next)===null&&(l=l.alternate,I.H=l===null||l.memoizedState===null?_k:Q0),s}function Bh(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return pf(s);if(s.$$typeof===k)return Fn(s)}throw Error(r(438,String(s)))}function F0(s){var l=null,d=ft.updateQueue;if(d!==null&&(l=d.memoCache),l==null){var m=ft.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(l={data:m.data.map(function(x){return x.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),d===null&&(d=Fh(),ft.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 Co(s,l){return typeof l=="function"?l(s):l}function Uh(s){var l=bn();return B0(l,Bt,s)}function B0(s,l,d){var m=s.queue;if(m===null)throw Error(r(311));m.lastRenderedReducer=d;var x=s.baseQueue,E=m.pending;if(E!==null){if(x!==null){var O=x.next;x.next=E.next,E.next=O}l.baseQueue=x=E,m.pending=null}if(E=s.baseState,x===null)s.memoizedState=E;else{l=x.next;var H=O=null,J=null,de=l,xe=!1;do{var ke=de.lane&-536870913;if(ke!==de.lane?(wt&ke)===ke:(So&ke)===ke){var ge=de.revertLane;if(ge===0)J!==null&&(J=J.next={lane:0,revertLane:0,gesture:null,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null}),ke===du&&(xe=!0);else if((So&ge)===ge){de=de.next,ge===du&&(xe=!0);continue}else ke={lane:0,revertLane:de.revertLane,gesture:null,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null},J===null?(H=J=ke,O=E):J=J.next=ke,ft.lanes|=ge,Es|=ge;ke=de.action,Ya&&d(E,ke),E=de.hasEagerState?de.eagerState:d(E,ke)}else ge={lane:ke,revertLane:de.revertLane,gesture:de.gesture,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null},J===null?(H=J=ge,O=E):J=J.next=ge,ft.lanes|=ke,Es|=ke;de=de.next}while(de!==null&&de!==l);if(J===null?O=E:J.next=H,!Nr(E,s.memoizedState)&&(Sn=!0,xe&&(d=hu,d!==null)))throw d;s.memoizedState=E,s.baseState=O,s.baseQueue=J,m.lastRenderedState=E}return x===null&&(m.lanes=0),[s.memoizedState,m.dispatch]}function U0(s){var l=bn(),d=l.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=s;var m=d.dispatch,x=d.pending,E=l.memoizedState;if(x!==null){d.pending=null;var O=x=x.next;do E=s(E,O.action),O=O.next;while(O!==x);Nr(E,l.memoizedState)||(Sn=!0),l.memoizedState=E,l.baseQueue===null&&(l.baseState=E),d.lastRenderedState=E}return[E,m]}function VE(s,l,d){var m=ft,x=bn(),E=kt;if(E){if(d===void 0)throw Error(r(407));d=d()}else d=l();var O=!Nr((Bt||x).memoizedState,d);if(O&&(x.memoizedState=d,Sn=!0),x=x.queue,G0(XE.bind(null,m,x,s),[s]),x.getSnapshot!==l||O||wn!==null&&wn.memoizedState.tag&1){if(m.flags|=2048,vu(9,{destroy:void 0},WE.bind(null,m,x,d,l),null),qt===null)throw Error(r(349));E||(So&127)!==0||YE(m,l,d)}return d}function YE(s,l,d){s.flags|=16384,s={getSnapshot:l,value:d},l=ft.updateQueue,l===null?(l=Fh(),ft.updateQueue=l,l.stores=[s]):(d=l.stores,d===null?l.stores=[s]:d.push(s))}function WE(s,l,d,m){l.value=d,l.getSnapshot=m,KE(l)&&QE(s)}function XE(s,l,d){return d(function(){KE(l)&&QE(s)})}function KE(s){var l=s.getSnapshot;s=s.value;try{var d=l();return!Nr(s,d)}catch{return!0}}function QE(s){var l=Pa(s,2);l!==null&&wr(l,s,2)}function H0(s){var l=ir();if(typeof s=="function"){var d=s;if(s=d(),Ya){gt(!0);try{d()}finally{gt(!1)}}}return l.memoizedState=l.baseState=s,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Co,lastRenderedState:s},l}function ZE(s,l,d,m){return s.baseState=d,B0(s,Bt,typeof m=="function"?m:Co)}function EP(s,l,d,m,x){if(Gh(s))throw Error(r(485));if(s=l.action,s!==null){var E={payload:x,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(O){E.listeners.push(O)}};I.T!==null?d(!0):E.isTransition=!1,m(E),d=l.pending,d===null?(E.next=l.pending=E,JE(l,E)):(E.next=d.next,l.pending=d.next=E)}}function JE(s,l){var d=l.action,m=l.payload,x=s.state;if(l.isTransition){var E=I.T,O={};I.T=O;try{var H=d(x,m),J=I.S;J!==null&&J(O,H),ek(s,l,H)}catch(de){q0(s,l,de)}finally{E!==null&&O.types!==null&&(E.types=O.types),I.T=E}}else try{E=d(x,m),ek(s,l,E)}catch(de){q0(s,l,de)}}function ek(s,l,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(m){tk(s,l,m)},function(m){return q0(s,l,m)}):tk(s,l,d)}function tk(s,l,d){l.status="fulfilled",l.value=d,nk(l),s.state=d,l=s.pending,l!==null&&(d=l.next,d===l?s.pending=null:(d=d.next,l.next=d,JE(s,d)))}function q0(s,l,d){var m=s.pending;if(s.pending=null,m!==null){m=m.next;do l.status="rejected",l.reason=d,nk(l),l=l.next;while(l!==m)}s.action=null}function nk(s){s=s.listeners;for(var l=0;l<s.length;l++)(0,s[l])()}function rk(s,l){return l}function ik(s,l){if(kt){var d=qt.formState;if(d!==null){e:{var m=ft;if(kt){if(Kt){t:{for(var x=Kt,E=li;x.nodeType!==8;){if(!E){x=null;break t}if(x=ci(x.nextSibling),x===null){x=null;break t}}E=x.data,x=E==="F!"||E==="F"?x:null}if(x){Kt=ci(x.nextSibling),m=x.data==="F!";break e}}ms(m)}m=!1}m&&(l=d[0])}}return d=ir(),d.memoizedState=d.baseState=l,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rk,lastRenderedState:l},d.queue=m,d=Ck.bind(null,ft,m),m.dispatch=d,m=H0(!1),E=K0.bind(null,ft,!1,m.queue),m=ir(),x={state:l,dispatch:null,action:s,pending:null},m.queue=x,d=EP.bind(null,ft,x,E,d),x.dispatch=d,m.memoizedState=s,[l,d,!1]}function ok(s){var l=bn();return sk(l,Bt,s)}function sk(s,l,d){if(l=B0(s,l,rk)[0],s=Uh(Co)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var m=pf(l)}catch(O){throw O===pu?Mh:O}else m=l;l=bn();var x=l.queue,E=x.dispatch;return d!==l.memoizedState&&(ft.flags|=2048,vu(9,{destroy:void 0},kP.bind(null,x,d),null)),[m,E,s]}function kP(s,l){s.action=l}function ak(s){var l=bn(),d=Bt;if(d!==null)return sk(l,d,s);bn(),l=l.memoizedState,d=bn();var m=d.queue.dispatch;return d.memoizedState=s,[l,m,!1]}function vu(s,l,d,m){return s={tag:s,create:d,deps:m,inst:l,next:null},l=ft.updateQueue,l===null&&(l=Fh(),ft.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 lk(){return bn().memoizedState}function Hh(s,l,d,m){var x=ir();ft.flags|=s,x.memoizedState=vu(1|l,{destroy:void 0},d,m===void 0?null:m)}function qh(s,l,d,m){var x=bn();m=m===void 0?null:m;var E=x.memoizedState.inst;Bt!==null&&m!==null&&L0(m,Bt.memoizedState.deps)?x.memoizedState=vu(l,E,d,m):(ft.flags|=s,x.memoizedState=vu(1|l,E,d,m))}function uk(s,l){Hh(8390656,8,s,l)}function G0(s,l){qh(2048,8,s,l)}function _P(s){ft.flags|=4;var l=ft.updateQueue;if(l===null)l=Fh(),ft.updateQueue=l,l.events=[s];else{var d=l.events;d===null?l.events=[s]:d.push(s)}}function ck(s){var l=bn().memoizedState;return _P({ref:l,nextImpl:s}),function(){if((Ot&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}function fk(s,l){return qh(4,2,s,l)}function dk(s,l){return qh(4,4,s,l)}function hk(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 pk(s,l,d){d=d!=null?d.concat([s]):null,qh(4,4,hk.bind(null,l,s),d)}function V0(){}function mk(s,l){var d=bn();l=l===void 0?null:l;var m=d.memoizedState;return l!==null&&L0(l,m[1])?m[0]:(d.memoizedState=[s,l],s)}function gk(s,l){var d=bn();l=l===void 0?null:l;var m=d.memoizedState;if(l!==null&&L0(l,m[1]))return m[0];if(m=s(),Ya){gt(!0);try{s()}finally{gt(!1)}}return d.memoizedState=[m,l],m}function Y0(s,l,d){return d===void 0||(So&1073741824)!==0&&(wt&261930)===0?s.memoizedState=l:(s.memoizedState=d,s=y2(),ft.lanes|=s,Es|=s,d)}function yk(s,l,d,m){return Nr(d,l)?d:gu.current!==null?(s=Y0(s,d,m),Nr(s,l)||(Sn=!0),s):(So&42)===0||(So&1073741824)!==0&&(wt&261930)===0?(Sn=!0,s.memoizedState=d):(s=y2(),ft.lanes|=s,Es|=s,l)}function bk(s,l,d,m,x){var E=P.p;P.p=E!==0&&8>E?E:8;var O=I.T,H={};I.T=H,K0(s,!1,l,d);try{var J=x(),de=I.S;if(de!==null&&de(H,J),J!==null&&typeof J=="object"&&typeof J.then=="function"){var xe=wP(J,m);mf(s,l,xe,Fr(s))}else mf(s,l,m,Fr(s))}catch(ke){mf(s,l,{then:function(){},status:"rejected",reason:ke},Fr())}finally{P.p=E,O!==null&&H.types!==null&&(O.types=H.types),I.T=O}}function AP(){}function W0(s,l,d,m){if(s.tag!==5)throw Error(r(476));var x=vk(s).queue;bk(s,x,l,G,d===null?AP:function(){return xk(s),d(m)})}function vk(s){var l=s.memoizedState;if(l!==null)return l;l={memoizedState:G,baseState:G,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Co,lastRenderedState:G},next:null};var d={};return l.next={memoizedState:d,baseState:d,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Co,lastRenderedState:d},next:null},s.memoizedState=l,s=s.alternate,s!==null&&(s.memoizedState=l),l}function xk(s){var l=vk(s);l.next===null&&(l=s.alternate.memoizedState),mf(s,l.next.queue,{},Fr())}function X0(){return Fn(Mf)}function wk(){return bn().memoizedState}function Sk(){return bn().memoizedState}function RP(s){for(var l=s.return;l!==null;){switch(l.tag){case 24:case 3:var d=Fr();s=bs(d);var m=vs(l,s,d);m!==null&&(wr(m,l,d),cf(m,l,d)),l={cache:E0()},s.payload=l;return}l=l.return}}function DP(s,l,d){var m=Fr();d={lane:m,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},Gh(s)?Ek(l,d):(d=h0(s,l,d,m),d!==null&&(wr(d,s,m),kk(d,l,m)))}function Ck(s,l,d){var m=Fr();mf(s,l,d,m)}function mf(s,l,d,m){var x={lane:m,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null};if(Gh(s))Ek(l,x);else{var E=s.alternate;if(s.lanes===0&&(E===null||E.lanes===0)&&(E=l.lastRenderedReducer,E!==null))try{var O=l.lastRenderedState,H=E(O,d);if(x.hasEagerState=!0,x.eagerState=H,Nr(H,O))return kh(s,l,x,0),qt===null&&Eh(),!1}catch{}finally{}if(d=h0(s,l,x,m),d!==null)return wr(d,s,m),kk(d,l,m),!0}return!1}function K0(s,l,d,m){if(m={lane:2,revertLane:Rb(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},Gh(s)){if(l)throw Error(r(479))}else l=h0(s,d,m,2),l!==null&&wr(l,s,2)}function Gh(s){var l=s.alternate;return s===ft||l!==null&&l===ft}function Ek(s,l){yu=Ph=!0;var d=s.pending;d===null?l.next=l:(l.next=d.next,d.next=l),s.pending=l}function kk(s,l,d){if((d&4194048)!==0){var m=l.lanes;m&=s.pendingLanes,d|=m,l.lanes=d,un(s,d)}}var gf={readContext:Fn,use:Bh,useCallback:fn,useContext:fn,useEffect:fn,useImperativeHandle:fn,useLayoutEffect:fn,useInsertionEffect:fn,useMemo:fn,useReducer:fn,useRef:fn,useState:fn,useDebugValue:fn,useDeferredValue:fn,useTransition:fn,useSyncExternalStore:fn,useId:fn,useHostTransitionStatus:fn,useFormState:fn,useActionState:fn,useOptimistic:fn,useMemoCache:fn,useCacheRefresh:fn};gf.useEffectEvent=fn;var _k={readContext:Fn,use:Bh,useCallback:function(s,l){return ir().memoizedState=[s,l===void 0?null:l],s},useContext:Fn,useEffect:uk,useImperativeHandle:function(s,l,d){d=d!=null?d.concat([s]):null,Hh(4194308,4,hk.bind(null,l,s),d)},useLayoutEffect:function(s,l){return Hh(4194308,4,s,l)},useInsertionEffect:function(s,l){Hh(4,2,s,l)},useMemo:function(s,l){var d=ir();l=l===void 0?null:l;var m=s();if(Ya){gt(!0);try{s()}finally{gt(!1)}}return d.memoizedState=[m,l],m},useReducer:function(s,l,d){var m=ir();if(d!==void 0){var x=d(l);if(Ya){gt(!0);try{d(l)}finally{gt(!1)}}}else x=l;return m.memoizedState=m.baseState=x,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:x},m.queue=s,s=s.dispatch=DP.bind(null,ft,s),[m.memoizedState,s]},useRef:function(s){var l=ir();return s={current:s},l.memoizedState=s},useState:function(s){s=H0(s);var l=s.queue,d=Ck.bind(null,ft,l);return l.dispatch=d,[s.memoizedState,d]},useDebugValue:V0,useDeferredValue:function(s,l){var d=ir();return Y0(d,s,l)},useTransition:function(){var s=H0(!1);return s=bk.bind(null,ft,s.queue,!0,!1),ir().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,l,d){var m=ft,x=ir();if(kt){if(d===void 0)throw Error(r(407));d=d()}else{if(d=l(),qt===null)throw Error(r(349));(wt&127)!==0||YE(m,l,d)}x.memoizedState=d;var E={value:d,getSnapshot:l};return x.queue=E,uk(XE.bind(null,m,E,s),[s]),m.flags|=2048,vu(9,{destroy:void 0},WE.bind(null,m,E,d,l),null),d},useId:function(){var s=ir(),l=qt.identifierPrefix;if(kt){var d=qi,m=Hi;d=(m&~(1<<32-De(m)-1)).toString(32)+d,l="_"+l+"R_"+d,d=Ih++,0<d&&(l+="H"+d.toString(32)),l+="_"}else d=SP++,l="_"+l+"r_"+d.toString(32)+"_";return s.memoizedState=l},useHostTransitionStatus:X0,useFormState:ik,useActionState:ik,useOptimistic:function(s){var l=ir();l.memoizedState=l.baseState=s;var d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=d,l=K0.bind(null,ft,!0,d),d.dispatch=l,[s,l]},useMemoCache:F0,useCacheRefresh:function(){return ir().memoizedState=RP.bind(null,ft)},useEffectEvent:function(s){var l=ir(),d={impl:s};return l.memoizedState=d,function(){if((Ot&2)!==0)throw Error(r(440));return d.impl.apply(void 0,arguments)}}},Q0={readContext:Fn,use:Bh,useCallback:mk,useContext:Fn,useEffect:G0,useImperativeHandle:pk,useInsertionEffect:fk,useLayoutEffect:dk,useMemo:gk,useReducer:Uh,useRef:lk,useState:function(){return Uh(Co)},useDebugValue:V0,useDeferredValue:function(s,l){var d=bn();return yk(d,Bt.memoizedState,s,l)},useTransition:function(){var s=Uh(Co)[0],l=bn().memoizedState;return[typeof s=="boolean"?s:pf(s),l]},useSyncExternalStore:VE,useId:wk,useHostTransitionStatus:X0,useFormState:ok,useActionState:ok,useOptimistic:function(s,l){var d=bn();return ZE(d,Bt,s,l)},useMemoCache:F0,useCacheRefresh:Sk};Q0.useEffectEvent=ck;var Ak={readContext:Fn,use:Bh,useCallback:mk,useContext:Fn,useEffect:G0,useImperativeHandle:pk,useInsertionEffect:fk,useLayoutEffect:dk,useMemo:gk,useReducer:U0,useRef:lk,useState:function(){return U0(Co)},useDebugValue:V0,useDeferredValue:function(s,l){var d=bn();return Bt===null?Y0(d,s,l):yk(d,Bt.memoizedState,s,l)},useTransition:function(){var s=U0(Co)[0],l=bn().memoizedState;return[typeof s=="boolean"?s:pf(s),l]},useSyncExternalStore:VE,useId:wk,useHostTransitionStatus:X0,useFormState:ak,useActionState:ak,useOptimistic:function(s,l){var d=bn();return Bt!==null?ZE(d,Bt,s,l):(d.baseState=s,[s,d.queue.dispatch])},useMemoCache:F0,useCacheRefresh:Sk};Ak.useEffectEvent=ck;function Z0(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 J0={enqueueSetState:function(s,l,d){s=s._reactInternals;var m=Fr(),x=bs(m);x.payload=l,d!=null&&(x.callback=d),l=vs(s,x,m),l!==null&&(wr(l,s,m),cf(l,s,m))},enqueueReplaceState:function(s,l,d){s=s._reactInternals;var m=Fr(),x=bs(m);x.tag=1,x.payload=l,d!=null&&(x.callback=d),l=vs(s,x,m),l!==null&&(wr(l,s,m),cf(l,s,m))},enqueueForceUpdate:function(s,l){s=s._reactInternals;var d=Fr(),m=bs(d);m.tag=2,l!=null&&(m.callback=l),l=vs(s,m,d),l!==null&&(wr(l,s,d),cf(l,s,d))}};function Rk(s,l,d,m,x,E,O){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(m,E,O):l.prototype&&l.prototype.isPureReactComponent?!tf(d,m)||!tf(x,E):!0}function Dk(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&&J0.enqueueReplaceState(l,l.state,null)}function Wa(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 x in s)d[x]===void 0&&(d[x]=s[x])}return d}function Tk(s){Ch(s)}function $k(s){console.error(s)}function Mk(s){Ch(s)}function Vh(s,l){try{var d=s.onUncaughtError;d(l.value,{componentStack:l.stack})}catch(m){setTimeout(function(){throw m})}}function Ok(s,l,d){try{var m=s.onCaughtError;m(d.value,{componentStack:d.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(x){setTimeout(function(){throw x})}}function eb(s,l,d){return d=bs(d),d.tag=3,d.payload={element:null},d.callback=function(){Vh(s,l)},d}function Nk(s){return s=bs(s),s.tag=3,s}function Lk(s,l,d,m){var x=d.type.getDerivedStateFromError;if(typeof x=="function"){var E=m.value;s.payload=function(){return x(E)},s.callback=function(){Ok(l,d,m)}}var O=d.stateNode;O!==null&&typeof O.componentDidCatch=="function"&&(s.callback=function(){Ok(l,d,m),typeof x!="function"&&(ks===null?ks=new Set([this]):ks.add(this));var H=m.stack;this.componentDidCatch(m.value,{componentStack:H!==null?H:""})})}function TP(s,l,d,m,x){if(d.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(l=d.alternate,l!==null&&fu(l,d,x,!0),d=jr.current,d!==null){switch(d.tag){case 31:case 13:return ui===null?ip():d.alternate===null&&dn===0&&(dn=3),d.flags&=-257,d.flags|=65536,d.lanes=x,m===Oh?d.flags|=16384:(l=d.updateQueue,l===null?d.updateQueue=new Set([m]):l.add(m),kb(s,m,x)),!1;case 22:return d.flags|=65536,m===Oh?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)),kb(s,m,x)),!1}throw Error(r(435,d.tag))}return kb(s,m,x),ip(),!1}if(kt)return l=jr.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=x,m!==v0&&(s=Error(r(422),{cause:m}),of(oi(s,d)))):(m!==v0&&(l=Error(r(423),{cause:m}),of(oi(l,d))),s=s.current.alternate,s.flags|=65536,x&=-x,s.lanes|=x,m=oi(m,d),x=eb(s.stateNode,m,x),T0(s,x),dn!==4&&(dn=2)),!1;var E=Error(r(520),{cause:m});if(E=oi(E,d),Ef===null?Ef=[E]:Ef.push(E),dn!==4&&(dn=2),l===null)return!0;m=oi(m,d),d=l;do{switch(d.tag){case 3:return d.flags|=65536,s=x&-x,d.lanes|=s,s=eb(d.stateNode,m,s),T0(d,s),!1;case 1:if(l=d.type,E=d.stateNode,(d.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||E!==null&&typeof E.componentDidCatch=="function"&&(ks===null||!ks.has(E))))return d.flags|=65536,x&=-x,d.lanes|=x,x=Nk(x),Lk(x,s,d,m),T0(d,x),!1}d=d.return}while(d!==null);return!1}var tb=Error(r(461)),Sn=!1;function Bn(s,l,d,m){l.child=s===null?IE(l,null,d,m):Va(l,s.child,d,m)}function jk(s,l,d,m,x){d=d.render;var E=l.ref;if("ref"in m){var O={};for(var H in m)H!=="ref"&&(O[H]=m[H])}else O=m;return Ua(l),m=j0(s,l,d,O,E,x),H=z0(),s!==null&&!Sn?(P0(s,l,x),Eo(s,l,x)):(kt&&H&&y0(l),l.flags|=1,Bn(s,l,m,x),l.child)}function zk(s,l,d,m,x){if(s===null){var E=d.type;return typeof E=="function"&&!p0(E)&&E.defaultProps===void 0&&d.compare===null?(l.tag=15,l.type=E,Pk(s,l,E,m,x)):(s=Ah(d.type,null,m,l,l.mode,x),s.ref=l.ref,s.return=l,l.child=s)}if(E=s.child,!ub(s,x)){var O=E.memoizedProps;if(d=d.compare,d=d!==null?d:tf,d(O,m)&&s.ref===l.ref)return Eo(s,l,x)}return l.flags|=1,s=bo(E,m),s.ref=l.ref,s.return=l,l.child=s}function Pk(s,l,d,m,x){if(s!==null){var E=s.memoizedProps;if(tf(E,m)&&s.ref===l.ref)if(Sn=!1,l.pendingProps=m=E,ub(s,x))(s.flags&131072)!==0&&(Sn=!0);else return l.lanes=s.lanes,Eo(s,l,x)}return nb(s,l,d,m,x)}function Ik(s,l,d,m){var x=m.children,E=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(E=E!==null?E.baseLanes|d:d,s!==null){for(m=l.child=s.child,x=0;m!==null;)x=x|m.lanes|m.childLanes,m=m.sibling;m=x&~E}else m=0,l.child=null;return Fk(s,l,E,d,m)}if((d&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},s!==null&&$h(l,E!==null?E.cachePool:null),E!==null?UE(l,E):M0(),HE(l);else return m=l.lanes=536870912,Fk(s,l,E!==null?E.baseLanes|d:d,d,m)}else E!==null?($h(l,E.cachePool),UE(l,E),ws(),l.memoizedState=null):(s!==null&&$h(l,null),M0(),ws());return Bn(s,l,x,d),l.child}function yf(s,l){return s!==null&&s.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function Fk(s,l,d,m,x){var E=_0();return E=E===null?null:{parent:xn._currentValue,pool:E},l.memoizedState={baseLanes:d,cachePool:E},s!==null&&$h(l,null),M0(),HE(l),s!==null&&fu(s,l,m,!0),l.childLanes=x,null}function Yh(s,l){return l=Xh({mode:l.mode,children:l.children},s.mode),l.ref=s.ref,s.child=l,l.return=s,l}function Bk(s,l,d){return Va(l,s.child,null,d),s=Yh(l,l.pendingProps),s.flags|=2,zr(l),l.memoizedState=null,s}function $P(s,l,d){var m=l.pendingProps,x=(l.flags&128)!==0;if(l.flags&=-129,s===null){if(kt){if(m.mode==="hidden")return s=Yh(l,m),l.lanes=536870912,yf(null,s);if(N0(l),(s=Kt)?(s=J2(s,li),s=s!==null&&s.data==="&"?s:null,s!==null&&(l.memoizedState={dehydrated:s,treeContext:hs!==null?{id:Hi,overflow:qi}:null,retryLane:536870912,hydrationErrors:null},d=EE(s),d.return=l,l.child=d,In=l,Kt=null)):s=null,s===null)throw ms(l);return l.lanes=536870912,null}return Yh(l,m)}var E=s.memoizedState;if(E!==null){var O=E.dehydrated;if(N0(l),x)if(l.flags&256)l.flags&=-257,l=Bk(s,l,d);else if(l.memoizedState!==null)l.child=s.child,l.flags|=128,l=null;else throw Error(r(558));else if(Sn||fu(s,l,d,!1),x=(d&s.childLanes)!==0,Sn||x){if(m=qt,m!==null&&(O=Xt(m,d),O!==0&&O!==E.retryLane))throw E.retryLane=O,Pa(s,O),wr(m,s,O),tb;ip(),l=Bk(s,l,d)}else s=E.treeContext,Kt=ci(O.nextSibling),In=l,kt=!0,ps=null,li=!1,s!==null&&AE(l,s),l=Yh(l,m),l.flags|=4096;return l}return s=bo(s.child,{mode:m.mode,children:m.children}),s.ref=l.ref,l.child=s,s.return=l,s}function Wh(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 nb(s,l,d,m,x){return Ua(l),d=j0(s,l,d,m,void 0,x),m=z0(),s!==null&&!Sn?(P0(s,l,x),Eo(s,l,x)):(kt&&m&&y0(l),l.flags|=1,Bn(s,l,d,x),l.child)}function Uk(s,l,d,m,x,E){return Ua(l),l.updateQueue=null,d=GE(l,m,d,x),qE(s),m=z0(),s!==null&&!Sn?(P0(s,l,E),Eo(s,l,E)):(kt&&m&&y0(l),l.flags|=1,Bn(s,l,d,E),l.child)}function Hk(s,l,d,m,x){if(Ua(l),l.stateNode===null){var E=au,O=d.contextType;typeof O=="object"&&O!==null&&(E=Fn(O)),E=new d(m,E),l.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,E.updater=J0,l.stateNode=E,E._reactInternals=l,E=l.stateNode,E.props=m,E.state=l.memoizedState,E.refs={},R0(l),O=d.contextType,E.context=typeof O=="object"&&O!==null?Fn(O):au,E.state=l.memoizedState,O=d.getDerivedStateFromProps,typeof O=="function"&&(Z0(l,d,O,m),E.state=l.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(O=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),O!==E.state&&J0.enqueueReplaceState(E,E.state,null),df(l,m,E,x),ff(),E.state=l.memoizedState),typeof E.componentDidMount=="function"&&(l.flags|=4194308),m=!0}else if(s===null){E=l.stateNode;var H=l.memoizedProps,J=Wa(d,H);E.props=J;var de=E.context,xe=d.contextType;O=au,typeof xe=="object"&&xe!==null&&(O=Fn(xe));var ke=d.getDerivedStateFromProps;xe=typeof ke=="function"||typeof E.getSnapshotBeforeUpdate=="function",H=l.pendingProps!==H,xe||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(H||de!==O)&&Dk(l,E,m,O),ys=!1;var ge=l.memoizedState;E.state=ge,df(l,m,E,x),ff(),de=l.memoizedState,H||ge!==de||ys?(typeof ke=="function"&&(Z0(l,d,ke,m),de=l.memoizedState),(J=ys||Rk(l,d,J,m,ge,de,O))?(xe||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount()),typeof E.componentDidMount=="function"&&(l.flags|=4194308)):(typeof E.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=m,l.memoizedState=de),E.props=m,E.state=de,E.context=O,m=J):(typeof E.componentDidMount=="function"&&(l.flags|=4194308),m=!1)}else{E=l.stateNode,D0(s,l),O=l.memoizedProps,xe=Wa(d,O),E.props=xe,ke=l.pendingProps,ge=E.context,de=d.contextType,J=au,typeof de=="object"&&de!==null&&(J=Fn(de)),H=d.getDerivedStateFromProps,(de=typeof H=="function"||typeof E.getSnapshotBeforeUpdate=="function")||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(O!==ke||ge!==J)&&Dk(l,E,m,J),ys=!1,ge=l.memoizedState,E.state=ge,df(l,m,E,x),ff();var ye=l.memoizedState;O!==ke||ge!==ye||ys||s!==null&&s.dependencies!==null&&Dh(s.dependencies)?(typeof H=="function"&&(Z0(l,d,H,m),ye=l.memoizedState),(xe=ys||Rk(l,d,xe,m,ge,ye,J)||s!==null&&s.dependencies!==null&&Dh(s.dependencies))?(de||typeof E.UNSAFE_componentWillUpdate!="function"&&typeof E.componentWillUpdate!="function"||(typeof E.componentWillUpdate=="function"&&E.componentWillUpdate(m,ye,J),typeof E.UNSAFE_componentWillUpdate=="function"&&E.UNSAFE_componentWillUpdate(m,ye,J)),typeof E.componentDidUpdate=="function"&&(l.flags|=4),typeof E.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof E.componentDidUpdate!="function"||O===s.memoizedProps&&ge===s.memoizedState||(l.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||O===s.memoizedProps&&ge===s.memoizedState||(l.flags|=1024),l.memoizedProps=m,l.memoizedState=ye),E.props=m,E.state=ye,E.context=J,m=xe):(typeof E.componentDidUpdate!="function"||O===s.memoizedProps&&ge===s.memoizedState||(l.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||O===s.memoizedProps&&ge===s.memoizedState||(l.flags|=1024),m=!1)}return E=m,Wh(s,l),m=(l.flags&128)!==0,E||m?(E=l.stateNode,d=m&&typeof d.getDerivedStateFromError!="function"?null:E.render(),l.flags|=1,s!==null&&m?(l.child=Va(l,s.child,null,x),l.child=Va(l,null,d,x)):Bn(s,l,d,x),l.memoizedState=E.state,s=l.child):s=Eo(s,l,x),s}function qk(s,l,d,m){return Fa(),l.flags|=256,Bn(s,l,d,m),l.child}var rb={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ib(s){return{baseLanes:s,cachePool:OE()}}function ob(s,l,d){return s=s!==null?s.childLanes&~d:0,l&&(s|=Ir),s}function Gk(s,l,d){var m=l.pendingProps,x=!1,E=(l.flags&128)!==0,O;if((O=E)||(O=s!==null&&s.memoizedState===null?!1:(yn.current&2)!==0),O&&(x=!0,l.flags&=-129),O=(l.flags&32)!==0,l.flags&=-33,s===null){if(kt){if(x?xs(l):ws(),(s=Kt)?(s=J2(s,li),s=s!==null&&s.data!=="&"?s:null,s!==null&&(l.memoizedState={dehydrated:s,treeContext:hs!==null?{id:Hi,overflow:qi}:null,retryLane:536870912,hydrationErrors:null},d=EE(s),d.return=l,l.child=d,In=l,Kt=null)):s=null,s===null)throw ms(l);return Bb(s)?l.lanes=32:l.lanes=536870912,null}var H=m.children;return m=m.fallback,x?(ws(),x=l.mode,H=Xh({mode:"hidden",children:H},x),m=Ia(m,x,d,null),H.return=l,m.return=l,H.sibling=m,l.child=H,m=l.child,m.memoizedState=ib(d),m.childLanes=ob(s,O,d),l.memoizedState=rb,yf(null,m)):(xs(l),sb(l,H))}var J=s.memoizedState;if(J!==null&&(H=J.dehydrated,H!==null)){if(E)l.flags&256?(xs(l),l.flags&=-257,l=ab(s,l,d)):l.memoizedState!==null?(ws(),l.child=s.child,l.flags|=128,l=null):(ws(),H=m.fallback,x=l.mode,m=Xh({mode:"visible",children:m.children},x),H=Ia(H,x,d,null),H.flags|=2,m.return=l,H.return=l,m.sibling=H,l.child=m,Va(l,s.child,null,d),m=l.child,m.memoizedState=ib(d),m.childLanes=ob(s,O,d),l.memoizedState=rb,l=yf(null,m));else if(xs(l),Bb(H)){if(O=H.nextSibling&&H.nextSibling.dataset,O)var de=O.dgst;O=de,m=Error(r(419)),m.stack="",m.digest=O,of({value:m,source:null,stack:null}),l=ab(s,l,d)}else if(Sn||fu(s,l,d,!1),O=(d&s.childLanes)!==0,Sn||O){if(O=qt,O!==null&&(m=Xt(O,d),m!==0&&m!==J.retryLane))throw J.retryLane=m,Pa(s,m),wr(O,s,m),tb;Fb(H)||ip(),l=ab(s,l,d)}else Fb(H)?(l.flags|=192,l.child=s.child,l=null):(s=J.treeContext,Kt=ci(H.nextSibling),In=l,kt=!0,ps=null,li=!1,s!==null&&AE(l,s),l=sb(l,m.children),l.flags|=4096);return l}return x?(ws(),H=m.fallback,x=l.mode,J=s.child,de=J.sibling,m=bo(J,{mode:"hidden",children:m.children}),m.subtreeFlags=J.subtreeFlags&65011712,de!==null?H=bo(de,H):(H=Ia(H,x,d,null),H.flags|=2),H.return=l,m.return=l,m.sibling=H,l.child=m,yf(null,m),m=l.child,H=s.child.memoizedState,H===null?H=ib(d):(x=H.cachePool,x!==null?(J=xn._currentValue,x=x.parent!==J?{parent:J,pool:J}:x):x=OE(),H={baseLanes:H.baseLanes|d,cachePool:x}),m.memoizedState=H,m.childLanes=ob(s,O,d),l.memoizedState=rb,yf(s.child,m)):(xs(l),d=s.child,s=d.sibling,d=bo(d,{mode:"visible",children:m.children}),d.return=l,d.sibling=null,s!==null&&(O=l.deletions,O===null?(l.deletions=[s],l.flags|=16):O.push(s)),l.child=d,l.memoizedState=null,d)}function sb(s,l){return l=Xh({mode:"visible",children:l},s.mode),l.return=s,s.child=l}function Xh(s,l){return s=Lr(22,s,null,l),s.lanes=0,s}function ab(s,l,d){return Va(l,s.child,null,d),s=sb(l,l.pendingProps.children),s.flags|=2,l.memoizedState=null,s}function Vk(s,l,d){s.lanes|=l;var m=s.alternate;m!==null&&(m.lanes|=l),S0(s.return,l,d)}function lb(s,l,d,m,x,E){var O=s.memoizedState;O===null?s.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:m,tail:d,tailMode:x,treeForkCount:E}:(O.isBackwards=l,O.rendering=null,O.renderingStartTime=0,O.last=m,O.tail=d,O.tailMode=x,O.treeForkCount=E)}function Yk(s,l,d){var m=l.pendingProps,x=m.revealOrder,E=m.tail;m=m.children;var O=yn.current,H=(O&2)!==0;if(H?(O=O&1|2,l.flags|=128):O&=1,B(yn,O),Bn(s,l,m,d),m=kt?rf:0,!H&&s!==null&&(s.flags&128)!==0)e:for(s=l.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&Vk(s,d,l);else if(s.tag===19)Vk(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(x){case"forwards":for(d=l.child,x=null;d!==null;)s=d.alternate,s!==null&&zh(s)===null&&(x=d),d=d.sibling;d=x,d===null?(x=l.child,l.child=null):(x=d.sibling,d.sibling=null),lb(l,!1,x,d,E,m);break;case"backwards":case"unstable_legacy-backwards":for(d=null,x=l.child,l.child=null;x!==null;){if(s=x.alternate,s!==null&&zh(s)===null){l.child=x;break}s=x.sibling,x.sibling=d,d=x,x=s}lb(l,!0,d,null,E,m);break;case"together":lb(l,!1,null,null,void 0,m);break;default:l.memoizedState=null}return l.child}function Eo(s,l,d){if(s!==null&&(l.dependencies=s.dependencies),Es|=l.lanes,(d&l.childLanes)===0)if(s!==null){if(fu(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=bo(s,s.pendingProps),l.child=d,d.return=l;s.sibling!==null;)s=s.sibling,d=d.sibling=bo(s,s.pendingProps),d.return=l;d.sibling=null}return l.child}function ub(s,l){return(s.lanes&l)!==0?!0:(s=s.dependencies,!!(s!==null&&Dh(s)))}function MP(s,l,d){switch(l.tag){case 3:Re(l,l.stateNode.containerInfo),gs(l,xn,s.memoizedState.cache),Fa();break;case 27:case 5:Oe(l);break;case 4:Re(l,l.stateNode.containerInfo);break;case 10:gs(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,N0(l),null;break;case 13:var m=l.memoizedState;if(m!==null)return m.dehydrated!==null?(xs(l),l.flags|=128,null):(d&l.child.childLanes)!==0?Gk(s,l,d):(xs(l),s=Eo(s,l,d),s!==null?s.sibling:null);xs(l);break;case 19:var x=(s.flags&128)!==0;if(m=(d&l.childLanes)!==0,m||(fu(s,l,d,!1),m=(d&l.childLanes)!==0),x){if(m)return Yk(s,l,d);l.flags|=128}if(x=l.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),B(yn,yn.current),m)break;return null;case 22:return l.lanes=0,Ik(s,l,d,l.pendingProps);case 24:gs(l,xn,s.memoizedState.cache)}return Eo(s,l,d)}function Wk(s,l,d){if(s!==null)if(s.memoizedProps!==l.pendingProps)Sn=!0;else{if(!ub(s,d)&&(l.flags&128)===0)return Sn=!1,MP(s,l,d);Sn=(s.flags&131072)!==0}else Sn=!1,kt&&(l.flags&1048576)!==0&&_E(l,rf,l.index);switch(l.lanes=0,l.tag){case 16:e:{var m=l.pendingProps;if(s=qa(l.elementType),l.type=s,typeof s=="function")p0(s)?(m=Wa(s,m),l.tag=1,l=Hk(null,l,s,m,d)):(l.tag=0,l=nb(null,l,s,m,d));else{if(s!=null){var x=s.$$typeof;if(x===R){l.tag=11,l=jk(null,l,s,m,d);break e}else if(x===$){l.tag=14,l=zk(null,l,s,m,d);break e}}throw l=V(s)||s,Error(r(306,l,""))}}return l;case 0:return nb(s,l,l.type,l.pendingProps,d);case 1:return m=l.type,x=Wa(m,l.pendingProps),Hk(s,l,m,x,d);case 3:e:{if(Re(l,l.stateNode.containerInfo),s===null)throw Error(r(387));m=l.pendingProps;var E=l.memoizedState;x=E.element,D0(s,l),df(l,m,null,d);var O=l.memoizedState;if(m=O.cache,gs(l,xn,m),m!==E.cache&&C0(l,[xn],d,!0),ff(),m=O.element,E.isDehydrated)if(E={element:m,isDehydrated:!1,cache:O.cache},l.updateQueue.baseState=E,l.memoizedState=E,l.flags&256){l=qk(s,l,m,d);break e}else if(m!==x){x=oi(Error(r(424)),l),of(x),l=qk(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(Kt=ci(s.firstChild),In=l,kt=!0,ps=null,li=!0,d=IE(l,null,m,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling}else{if(Fa(),m===x){l=Eo(s,l,d);break e}Bn(s,l,m,d)}l=l.child}return l;case 26:return Wh(s,l),s===null?(d=o_(l.type,null,l.pendingProps,null))?l.memoizedState=d:kt||(d=l.type,s=l.pendingProps,m=fp(me.current).createElement(d),m[sn]=l,m[mr]=s,Un(m,d,s),On(m),l.stateNode=m):l.memoizedState=o_(l.type,s.memoizedProps,l.pendingProps,s.memoizedState),null;case 27:return Oe(l),s===null&&kt&&(m=l.stateNode=n_(l.type,l.pendingProps,me.current),In=l,li=!0,x=Kt,Ds(l.type)?(Ub=x,Kt=ci(m.firstChild)):Kt=x),Bn(s,l,l.pendingProps.children,d),Wh(s,l),s===null&&(l.flags|=4194304),l.child;case 5:return s===null&&kt&&((x=m=Kt)&&(m=lI(m,l.type,l.pendingProps,li),m!==null?(l.stateNode=m,In=l,Kt=ci(m.firstChild),li=!1,x=!0):x=!1),x||ms(l)),Oe(l),x=l.type,E=l.pendingProps,O=s!==null?s.memoizedProps:null,m=E.children,zb(x,E)?m=null:O!==null&&zb(x,O)&&(l.flags|=32),l.memoizedState!==null&&(x=j0(s,l,CP,null,null,d),Mf._currentValue=x),Wh(s,l),Bn(s,l,m,d),l.child;case 6:return s===null&&kt&&((s=d=Kt)&&(d=uI(d,l.pendingProps,li),d!==null?(l.stateNode=d,In=l,Kt=null,s=!0):s=!1),s||ms(l)),null;case 13:return Gk(s,l,d);case 4:return Re(l,l.stateNode.containerInfo),m=l.pendingProps,s===null?l.child=Va(l,null,m,d):Bn(s,l,m,d),l.child;case 11:return jk(s,l,l.type,l.pendingProps,d);case 7:return Bn(s,l,l.pendingProps,d),l.child;case 8:return Bn(s,l,l.pendingProps.children,d),l.child;case 12:return Bn(s,l,l.pendingProps.children,d),l.child;case 10:return m=l.pendingProps,gs(l,l.type,m.value),Bn(s,l,m.children,d),l.child;case 9:return x=l.type._context,m=l.pendingProps.children,Ua(l),x=Fn(x),m=m(x),l.flags|=1,Bn(s,l,m,d),l.child;case 14:return zk(s,l,l.type,l.pendingProps,d);case 15:return Pk(s,l,l.type,l.pendingProps,d);case 19:return Yk(s,l,d);case 31:return $P(s,l,d);case 22:return Ik(s,l,d,l.pendingProps);case 24:return Ua(l),m=Fn(xn),s===null?(x=_0(),x===null&&(x=qt,E=E0(),x.pooledCache=E,E.refCount++,E!==null&&(x.pooledCacheLanes|=d),x=E),l.memoizedState={parent:m,cache:x},R0(l),gs(l,xn,x)):((s.lanes&d)!==0&&(D0(s,l),df(l,null,null,d),ff()),x=s.memoizedState,E=l.memoizedState,x.parent!==m?(x={parent:m,cache:m},l.memoizedState=x,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=x),gs(l,xn,m)):(m=E.cache,gs(l,xn,m),m!==x.cache&&C0(l,[xn],d,!0))),Bn(s,l,l.pendingProps.children,d),l.child;case 29:throw l.pendingProps}throw Error(r(156,l.tag))}function ko(s){s.flags|=4}function cb(s,l,d,m,x){if((l=(s.mode&32)!==0)&&(l=!1),l){if(s.flags|=16777216,(x&335544128)===x)if(s.stateNode.complete)s.flags|=8192;else if(w2())s.flags|=8192;else throw Ga=Oh,A0}else s.flags&=-16777217}function Xk(s,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!c_(l))if(w2())s.flags|=8192;else throw Ga=Oh,A0}function Kh(s,l){l!==null&&(s.flags|=4),s.flags&16384&&(l=s.tag!==22?_i():536870912,s.lanes|=l,Cu|=l)}function bf(s,l){if(!kt)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 Qt(s){var l=s.alternate!==null&&s.alternate.child===s.child,d=0,m=0;if(l)for(var x=s.child;x!==null;)d|=x.lanes|x.childLanes,m|=x.subtreeFlags&65011712,m|=x.flags&65011712,x.return=s,x=x.sibling;else for(x=s.child;x!==null;)d|=x.lanes|x.childLanes,m|=x.subtreeFlags,m|=x.flags,x.return=s,x=x.sibling;return s.subtreeFlags|=m,s.childLanes=d,l}function OP(s,l,d){var m=l.pendingProps;switch(b0(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qt(l),null;case 1:return Qt(l),null;case 3:return d=l.stateNode,m=null,s!==null&&(m=s.memoizedState.cache),l.memoizedState.cache!==m&&(l.flags|=2048),wo(xn),pe(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(s===null||s.child===null)&&(cu(l)?ko(l):s===null||s.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,x0())),Qt(l),null;case 26:var x=l.type,E=l.memoizedState;return s===null?(ko(l),E!==null?(Qt(l),Xk(l,E)):(Qt(l),cb(l,x,null,m,d))):E?E!==s.memoizedState?(ko(l),Qt(l),Xk(l,E)):(Qt(l),l.flags&=-16777217):(s=s.memoizedProps,s!==m&&ko(l),Qt(l),cb(l,x,s,m,d)),null;case 27:if(Pe(l),d=me.current,x=l.type,s!==null&&l.stateNode!=null)s.memoizedProps!==m&&ko(l);else{if(!m){if(l.stateNode===null)throw Error(r(166));return Qt(l),null}s=ae.current,cu(l)?RE(l):(s=n_(x,m,d),l.stateNode=s,ko(l))}return Qt(l),null;case 5:if(Pe(l),x=l.type,s!==null&&l.stateNode!=null)s.memoizedProps!==m&&ko(l);else{if(!m){if(l.stateNode===null)throw Error(r(166));return Qt(l),null}if(E=ae.current,cu(l))RE(l);else{var O=fp(me.current);switch(E){case 1:E=O.createElementNS("http://www.w3.org/2000/svg",x);break;case 2:E=O.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;default:switch(x){case"svg":E=O.createElementNS("http://www.w3.org/2000/svg",x);break;case"math":E=O.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;case"script":E=O.createElement("div"),E.innerHTML="<script><\/script>",E=E.removeChild(E.firstChild);break;case"select":E=typeof m.is=="string"?O.createElement("select",{is:m.is}):O.createElement("select"),m.multiple?E.multiple=!0:m.size&&(E.size=m.size);break;default:E=typeof m.is=="string"?O.createElement(x,{is:m.is}):O.createElement(x)}}E[sn]=l,E[mr]=m;e:for(O=l.child;O!==null;){if(O.tag===5||O.tag===6)E.appendChild(O.stateNode);else if(O.tag!==4&&O.tag!==27&&O.child!==null){O.child.return=O,O=O.child;continue}if(O===l)break e;for(;O.sibling===null;){if(O.return===null||O.return===l)break e;O=O.return}O.sibling.return=O.return,O=O.sibling}l.stateNode=E;e:switch(Un(E,x,m),x){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}m&&ko(l)}}return Qt(l),cb(l,l.type,s===null?null:s.memoizedProps,l.pendingProps,d),null;case 6:if(s&&l.stateNode!=null)s.memoizedProps!==m&&ko(l);else{if(typeof m!="string"&&l.stateNode===null)throw Error(r(166));if(s=me.current,cu(l)){if(s=l.stateNode,d=l.memoizedProps,m=null,x=In,x!==null)switch(x.tag){case 27:case 5:m=x.memoizedProps}s[sn]=l,s=!!(s.nodeValue===d||m!==null&&m.suppressHydrationWarning===!0||G2(s.nodeValue,d)),s||ms(l,!0)}else s=fp(s).createTextNode(m),s[sn]=l,l.stateNode=s}return Qt(l),null;case 31:if(d=l.memoizedState,s===null||s.memoizedState!==null){if(m=cu(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[sn]=l}else Fa(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Qt(l),s=!1}else d=x0(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=d),s=!0;if(!s)return l.flags&256?(zr(l),l):(zr(l),null);if((l.flags&128)!==0)throw Error(r(558))}return Qt(l),null;case 13:if(m=l.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(x=cu(l),m!==null&&m.dehydrated!==null){if(s===null){if(!x)throw Error(r(318));if(x=l.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(r(317));x[sn]=l}else Fa(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Qt(l),x=!1}else x=x0(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=x),x=!0;if(!x)return l.flags&256?(zr(l),l):(zr(l),null)}return zr(l),(l.flags&128)!==0?(l.lanes=d,l):(d=m!==null,s=s!==null&&s.memoizedState!==null,d&&(m=l.child,x=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(x=m.alternate.memoizedState.cachePool.pool),E=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(E=m.memoizedState.cachePool.pool),E!==x&&(m.flags|=2048)),d!==s&&d&&(l.child.flags|=8192),Kh(l,l.updateQueue),Qt(l),null);case 4:return pe(),s===null&&Mb(l.stateNode.containerInfo),Qt(l),null;case 10:return wo(l.type),Qt(l),null;case 19:if(Q(yn),m=l.memoizedState,m===null)return Qt(l),null;if(x=(l.flags&128)!==0,E=m.rendering,E===null)if(x)bf(m,!1);else{if(dn!==0||s!==null&&(s.flags&128)!==0)for(s=l.child;s!==null;){if(E=zh(s),E!==null){for(l.flags|=128,bf(m,!1),s=E.updateQueue,l.updateQueue=s,Kh(l,s),l.subtreeFlags=0,s=d,d=l.child;d!==null;)CE(d,s),d=d.sibling;return B(yn,yn.current&1|2),kt&&vo(l,m.treeForkCount),l.child}s=s.sibling}m.tail!==null&&ve()>tp&&(l.flags|=128,x=!0,bf(m,!1),l.lanes=4194304)}else{if(!x)if(s=zh(E),s!==null){if(l.flags|=128,x=!0,s=s.updateQueue,l.updateQueue=s,Kh(l,s),bf(m,!0),m.tail===null&&m.tailMode==="hidden"&&!E.alternate&&!kt)return Qt(l),null}else 2*ve()-m.renderingStartTime>tp&&d!==536870912&&(l.flags|=128,x=!0,bf(m,!1),l.lanes=4194304);m.isBackwards?(E.sibling=l.child,l.child=E):(s=m.last,s!==null?s.sibling=E:l.child=E,m.last=E)}return m.tail!==null?(s=m.tail,m.rendering=s,m.tail=s.sibling,m.renderingStartTime=ve(),s.sibling=null,d=yn.current,B(yn,x?d&1|2:d&1),kt&&vo(l,m.treeForkCount),s):(Qt(l),null);case 22:case 23:return zr(l),O0(),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&&(Qt(l),l.subtreeFlags&6&&(l.flags|=8192)):Qt(l),d=l.updateQueue,d!==null&&Kh(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&&Q(Ha),null;case 24:return d=null,s!==null&&(d=s.memoizedState.cache),l.memoizedState.cache!==d&&(l.flags|=2048),wo(xn),Qt(l),null;case 25:return null;case 30:return null}throw Error(r(156,l.tag))}function NP(s,l){switch(b0(l),l.tag){case 1:return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 3:return wo(xn),pe(),s=l.flags,(s&65536)!==0&&(s&128)===0?(l.flags=s&-65537|128,l):null;case 26:case 27:case 5:return Pe(l),null;case 31:if(l.memoizedState!==null){if(zr(l),l.alternate===null)throw Error(r(340));Fa()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 13:if(zr(l),s=l.memoizedState,s!==null&&s.dehydrated!==null){if(l.alternate===null)throw Error(r(340));Fa()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 19:return Q(yn),null;case 4:return pe(),null;case 10:return wo(l.type),null;case 22:case 23:return zr(l),O0(),s!==null&&Q(Ha),s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 24:return wo(xn),null;case 25:return null;default:return null}}function Kk(s,l){switch(b0(l),l.tag){case 3:wo(xn),pe();break;case 26:case 27:case 5:Pe(l);break;case 4:pe();break;case 31:l.memoizedState!==null&&zr(l);break;case 13:zr(l);break;case 19:Q(yn);break;case 10:wo(l.type);break;case 22:case 23:zr(l),O0(),s!==null&&Q(Ha);break;case 24:wo(xn)}}function vf(s,l){try{var d=l.updateQueue,m=d!==null?d.lastEffect:null;if(m!==null){var x=m.next;d=x;do{if((d.tag&s)===s){m=void 0;var E=d.create,O=d.inst;m=E(),O.destroy=m}d=d.next}while(d!==x)}}catch(H){It(l,l.return,H)}}function Ss(s,l,d){try{var m=l.updateQueue,x=m!==null?m.lastEffect:null;if(x!==null){var E=x.next;m=E;do{if((m.tag&s)===s){var O=m.inst,H=O.destroy;if(H!==void 0){O.destroy=void 0,x=l;var J=d,de=H;try{de()}catch(xe){It(x,J,xe)}}}m=m.next}while(m!==E)}}catch(xe){It(l,l.return,xe)}}function Qk(s){var l=s.updateQueue;if(l!==null){var d=s.stateNode;try{BE(l,d)}catch(m){It(s,s.return,m)}}}function Zk(s,l,d){d.props=Wa(s.type,s.memoizedProps),d.state=s.memoizedState;try{d.componentWillUnmount()}catch(m){It(s,l,m)}}function xf(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(x){It(s,l,x)}}function Gi(s,l){var d=s.ref,m=s.refCleanup;if(d!==null)if(typeof m=="function")try{m()}catch(x){It(s,l,x)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof d=="function")try{d(null)}catch(x){It(s,l,x)}else d.current=null}function Jk(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(x){It(s,s.return,x)}}function fb(s,l,d){try{var m=s.stateNode;nI(m,s.type,d,l),m[mr]=l}catch(x){It(s,s.return,x)}}function e2(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&Ds(s.type)||s.tag===4}function db(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||e2(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&&Ds(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 hb(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=go));else if(m!==4&&(m===27&&Ds(s.type)&&(d=s.stateNode,l=null),s=s.child,s!==null))for(hb(s,l,d),s=s.sibling;s!==null;)hb(s,l,d),s=s.sibling}function Qh(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&&Ds(s.type)&&(d=s.stateNode),s=s.child,s!==null))for(Qh(s,l,d),s=s.sibling;s!==null;)Qh(s,l,d),s=s.sibling}function t2(s){var l=s.stateNode,d=s.memoizedProps;try{for(var m=s.type,x=l.attributes;x.length;)l.removeAttributeNode(x[0]);Un(l,m,d),l[sn]=s,l[mr]=d}catch(E){It(s,s.return,E)}}var _o=!1,Cn=!1,pb=!1,n2=typeof WeakSet=="function"?WeakSet:Set,Nn=null;function LP(s,l){if(s=s.containerInfo,Lb=bp,s=pE(s),a0(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 x=m.anchorOffset,E=m.focusNode;m=m.focusOffset;try{d.nodeType,E.nodeType}catch{d=null;break e}var O=0,H=-1,J=-1,de=0,xe=0,ke=s,ge=null;t:for(;;){for(var ye;ke!==d||x!==0&&ke.nodeType!==3||(H=O+x),ke!==E||m!==0&&ke.nodeType!==3||(J=O+m),ke.nodeType===3&&(O+=ke.nodeValue.length),(ye=ke.firstChild)!==null;)ge=ke,ke=ye;for(;;){if(ke===s)break t;if(ge===d&&++de===x&&(H=O),ge===E&&++xe===m&&(J=O),(ye=ke.nextSibling)!==null)break;ke=ge,ge=ke.parentNode}ke=ye}d=H===-1||J===-1?null:{start:H,end:J}}else d=null}d=d||{start:0,end:0}}else d=null;for(jb={focusedElem:s,selectionRange:d},bp=!1,Nn=l;Nn!==null;)if(l=Nn,s=l.child,(l.subtreeFlags&1028)!==0&&s!==null)s.return=l,Nn=s;else for(;Nn!==null;){switch(l=Nn,E=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++)x=s[d],x.ref.impl=x.nextImpl;break;case 11:case 15:break;case 1:if((s&1024)!==0&&E!==null){s=void 0,d=l,x=E.memoizedProps,E=E.memoizedState,m=d.stateNode;try{var Fe=Wa(d.type,x);s=m.getSnapshotBeforeUpdate(Fe,E),m.__reactInternalSnapshotBeforeUpdate=s}catch(Je){It(d,d.return,Je)}}break;case 3:if((s&1024)!==0){if(s=l.stateNode.containerInfo,d=s.nodeType,d===9)Ib(s);else if(d===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":Ib(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,Nn=s;break}Nn=l.return}}function r2(s,l,d){var m=d.flags;switch(d.tag){case 0:case 11:case 15:Ro(s,d),m&4&&vf(5,d);break;case 1:if(Ro(s,d),m&4)if(s=d.stateNode,l===null)try{s.componentDidMount()}catch(O){It(d,d.return,O)}else{var x=Wa(d.type,l.memoizedProps);l=l.memoizedState;try{s.componentDidUpdate(x,l,s.__reactInternalSnapshotBeforeUpdate)}catch(O){It(d,d.return,O)}}m&64&&Qk(d),m&512&&xf(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{BE(s,l)}catch(O){It(d,d.return,O)}}break;case 27:l===null&&m&4&&t2(d);case 26:case 5:Ro(s,d),l===null&&m&4&&Jk(d),m&512&&xf(d,d.return);break;case 12:Ro(s,d);break;case 31:Ro(s,d),m&4&&s2(s,d);break;case 13:Ro(s,d),m&4&&a2(s,d),m&64&&(s=d.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(d=qP.bind(null,d),cI(s,d))));break;case 22:if(m=d.memoizedState!==null||_o,!m){l=l!==null&&l.memoizedState!==null||Cn,x=_o;var E=Cn;_o=m,(Cn=l)&&!E?Do(s,d,(d.subtreeFlags&8772)!==0):Ro(s,d),_o=x,Cn=E}break;case 30:break;default:Ro(s,d)}}function i2(s){var l=s.alternate;l!==null&&(s.alternate=null,i2(l)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(l=s.stateNode,l!==null&&qy(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 tn=null,yr=!1;function Ao(s,l,d){for(d=d.child;d!==null;)o2(s,l,d),d=d.sibling}function o2(s,l,d){if(Xe&&typeof Xe.onCommitFiberUnmount=="function")try{Xe.onCommitFiberUnmount(At,d)}catch{}switch(d.tag){case 26:Cn||Gi(d,l),Ao(s,l,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:Cn||Gi(d,l);var m=tn,x=yr;Ds(d.type)&&(tn=d.stateNode,yr=!1),Ao(s,l,d),Df(d.stateNode),tn=m,yr=x;break;case 5:Cn||Gi(d,l);case 6:if(m=tn,x=yr,tn=null,Ao(s,l,d),tn=m,yr=x,tn!==null)if(yr)try{(tn.nodeType===9?tn.body:tn.nodeName==="HTML"?tn.ownerDocument.body:tn).removeChild(d.stateNode)}catch(E){It(d,l,E)}else try{tn.removeChild(d.stateNode)}catch(E){It(d,l,E)}break;case 18:tn!==null&&(yr?(s=tn,Q2(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,d.stateNode),$u(s)):Q2(tn,d.stateNode));break;case 4:m=tn,x=yr,tn=d.stateNode.containerInfo,yr=!0,Ao(s,l,d),tn=m,yr=x;break;case 0:case 11:case 14:case 15:Ss(2,d,l),Cn||Ss(4,d,l),Ao(s,l,d);break;case 1:Cn||(Gi(d,l),m=d.stateNode,typeof m.componentWillUnmount=="function"&&Zk(d,l,m)),Ao(s,l,d);break;case 21:Ao(s,l,d);break;case 22:Cn=(m=Cn)||d.memoizedState!==null,Ao(s,l,d),Cn=m;break;default:Ao(s,l,d)}}function s2(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{$u(s)}catch(d){It(l,l.return,d)}}}function a2(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{$u(s)}catch(d){It(l,l.return,d)}}function jP(s){switch(s.tag){case 31:case 13:case 19:var l=s.stateNode;return l===null&&(l=s.stateNode=new n2),l;case 22:return s=s.stateNode,l=s._retryCache,l===null&&(l=s._retryCache=new n2),l;default:throw Error(r(435,s.tag))}}function Zh(s,l){var d=jP(s);l.forEach(function(m){if(!d.has(m)){d.add(m);var x=GP.bind(null,s,m);m.then(x,x)}})}function br(s,l){var d=l.deletions;if(d!==null)for(var m=0;m<d.length;m++){var x=d[m],E=s,O=l,H=O;e:for(;H!==null;){switch(H.tag){case 27:if(Ds(H.type)){tn=H.stateNode,yr=!1;break e}break;case 5:tn=H.stateNode,yr=!1;break e;case 3:case 4:tn=H.stateNode.containerInfo,yr=!0;break e}H=H.return}if(tn===null)throw Error(r(160));o2(E,O,x),tn=null,yr=!1,E=x.alternate,E!==null&&(E.return=null),x.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)l2(l,s),l=l.sibling}var Di=null;function l2(s,l){var d=s.alternate,m=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:br(l,s),vr(s),m&4&&(Ss(3,s,s.return),vf(3,s),Ss(5,s,s.return));break;case 1:br(l,s),vr(s),m&512&&(Cn||d===null||Gi(d,d.return)),m&64&&_o&&(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 x=Di;if(br(l,s),vr(s),m&512&&(Cn||d===null||Gi(d,d.return)),m&4){var E=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,x=x.ownerDocument||x;t:switch(m){case"title":E=x.getElementsByTagName("title")[0],(!E||E[Vc]||E[sn]||E.namespaceURI==="http://www.w3.org/2000/svg"||E.hasAttribute("itemprop"))&&(E=x.createElement(m),x.head.insertBefore(E,x.querySelector("head > title"))),Un(E,m,d),E[sn]=s,On(E),m=E;break e;case"link":var O=l_("link","href",x).get(m+(d.href||""));if(O){for(var H=0;H<O.length;H++)if(E=O[H],E.getAttribute("href")===(d.href==null||d.href===""?null:d.href)&&E.getAttribute("rel")===(d.rel==null?null:d.rel)&&E.getAttribute("title")===(d.title==null?null:d.title)&&E.getAttribute("crossorigin")===(d.crossOrigin==null?null:d.crossOrigin)){O.splice(H,1);break t}}E=x.createElement(m),Un(E,m,d),x.head.appendChild(E);break;case"meta":if(O=l_("meta","content",x).get(m+(d.content||""))){for(H=0;H<O.length;H++)if(E=O[H],E.getAttribute("content")===(d.content==null?null:""+d.content)&&E.getAttribute("name")===(d.name==null?null:d.name)&&E.getAttribute("property")===(d.property==null?null:d.property)&&E.getAttribute("http-equiv")===(d.httpEquiv==null?null:d.httpEquiv)&&E.getAttribute("charset")===(d.charSet==null?null:d.charSet)){O.splice(H,1);break t}}E=x.createElement(m),Un(E,m,d),x.head.appendChild(E);break;default:throw Error(r(468,m))}E[sn]=s,On(E),m=E}s.stateNode=m}else u_(x,s.type,s.stateNode);else s.stateNode=a_(x,m,s.memoizedProps);else E!==m?(E===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):E.count--,m===null?u_(x,s.type,s.stateNode):a_(x,m,s.memoizedProps)):m===null&&s.stateNode!==null&&fb(s,s.memoizedProps,d.memoizedProps)}break;case 27:br(l,s),vr(s),m&512&&(Cn||d===null||Gi(d,d.return)),d!==null&&m&4&&fb(s,s.memoizedProps,d.memoizedProps);break;case 5:if(br(l,s),vr(s),m&512&&(Cn||d===null||Gi(d,d.return)),s.flags&32){x=s.stateNode;try{eu(x,"")}catch(Fe){It(s,s.return,Fe)}}m&4&&s.stateNode!=null&&(x=s.memoizedProps,fb(s,x,d!==null?d.memoizedProps:x)),m&1024&&(pb=!0);break;case 6:if(br(l,s),vr(s),m&4){if(s.stateNode===null)throw Error(r(162));m=s.memoizedProps,d=s.stateNode;try{d.nodeValue=m}catch(Fe){It(s,s.return,Fe)}}break;case 3:if(pp=null,x=Di,Di=dp(l.containerInfo),br(l,s),Di=x,vr(s),m&4&&d!==null&&d.memoizedState.isDehydrated)try{$u(l.containerInfo)}catch(Fe){It(s,s.return,Fe)}pb&&(pb=!1,u2(s));break;case 4:m=Di,Di=dp(s.stateNode.containerInfo),br(l,s),vr(s),Di=m;break;case 12:br(l,s),vr(s);break;case 31:br(l,s),vr(s),m&4&&(m=s.updateQueue,m!==null&&(s.updateQueue=null,Zh(s,m)));break;case 13:br(l,s),vr(s),s.child.flags&8192&&s.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(ep=ve()),m&4&&(m=s.updateQueue,m!==null&&(s.updateQueue=null,Zh(s,m)));break;case 22:x=s.memoizedState!==null;var J=d!==null&&d.memoizedState!==null,de=_o,xe=Cn;if(_o=de||x,Cn=xe||J,br(l,s),Cn=xe,_o=de,vr(s),m&8192)e:for(l=s.stateNode,l._visibility=x?l._visibility&-2:l._visibility|1,x&&(d===null||J||_o||Cn||Xa(s)),d=null,l=s;;){if(l.tag===5||l.tag===26){if(d===null){J=d=l;try{if(E=J.stateNode,x)O=E.style,typeof O.setProperty=="function"?O.setProperty("display","none","important"):O.display="none";else{H=J.stateNode;var ke=J.memoizedProps.style,ge=ke!=null&&ke.hasOwnProperty("display")?ke.display:null;H.style.display=ge==null||typeof ge=="boolean"?"":(""+ge).trim()}}catch(Fe){It(J,J.return,Fe)}}}else if(l.tag===6){if(d===null){J=l;try{J.stateNode.nodeValue=x?"":J.memoizedProps}catch(Fe){It(J,J.return,Fe)}}}else if(l.tag===18){if(d===null){J=l;try{var ye=J.stateNode;x?Z2(ye,!0):Z2(J.stateNode,!1)}catch(Fe){It(J,J.return,Fe)}}}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,Zh(s,d))));break;case 19:br(l,s),vr(s),m&4&&(m=s.updateQueue,m!==null&&(s.updateQueue=null,Zh(s,m)));break;case 30:break;case 21:break;default:br(l,s),vr(s)}}function vr(s){var l=s.flags;if(l&2){try{for(var d,m=s.return;m!==null;){if(e2(m)){d=m;break}m=m.return}if(d==null)throw Error(r(160));switch(d.tag){case 27:var x=d.stateNode,E=db(s);Qh(s,E,x);break;case 5:var O=d.stateNode;d.flags&32&&(eu(O,""),d.flags&=-33);var H=db(s);Qh(s,H,O);break;case 3:case 4:var J=d.stateNode.containerInfo,de=db(s);hb(s,de,J);break;default:throw Error(r(161))}}catch(xe){It(s,s.return,xe)}s.flags&=-3}l&4096&&(s.flags&=-4097)}function u2(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var l=s;u2(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;)r2(s,l.alternate,l),l=l.sibling}function Xa(s){for(s=s.child;s!==null;){var l=s;switch(l.tag){case 0:case 11:case 14:case 15:Ss(4,l,l.return),Xa(l);break;case 1:Gi(l,l.return);var d=l.stateNode;typeof d.componentWillUnmount=="function"&&Zk(l,l.return,d),Xa(l);break;case 27:Df(l.stateNode);case 26:case 5:Gi(l,l.return),Xa(l);break;case 22:l.memoizedState===null&&Xa(l);break;case 30:Xa(l);break;default:Xa(l)}s=s.sibling}}function Do(s,l,d){for(d=d&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var m=l.alternate,x=s,E=l,O=E.flags;switch(E.tag){case 0:case 11:case 15:Do(x,E,d),vf(4,E);break;case 1:if(Do(x,E,d),m=E,x=m.stateNode,typeof x.componentDidMount=="function")try{x.componentDidMount()}catch(de){It(m,m.return,de)}if(m=E,x=m.updateQueue,x!==null){var H=m.stateNode;try{var J=x.shared.hiddenCallbacks;if(J!==null)for(x.shared.hiddenCallbacks=null,x=0;x<J.length;x++)FE(J[x],H)}catch(de){It(m,m.return,de)}}d&&O&64&&Qk(E),xf(E,E.return);break;case 27:t2(E);case 26:case 5:Do(x,E,d),d&&m===null&&O&4&&Jk(E),xf(E,E.return);break;case 12:Do(x,E,d);break;case 31:Do(x,E,d),d&&O&4&&s2(x,E);break;case 13:Do(x,E,d),d&&O&4&&a2(x,E);break;case 22:E.memoizedState===null&&Do(x,E,d),xf(E,E.return);break;case 30:break;default:Do(x,E,d)}l=l.sibling}}function mb(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&&sf(d))}function gb(s,l){s=null,l.alternate!==null&&(s=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==s&&(l.refCount++,s!=null&&sf(s))}function Ti(s,l,d,m){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)c2(s,l,d,m),l=l.sibling}function c2(s,l,d,m){var x=l.flags;switch(l.tag){case 0:case 11:case 15:Ti(s,l,d,m),x&2048&&vf(9,l);break;case 1:Ti(s,l,d,m);break;case 3:Ti(s,l,d,m),x&2048&&(s=null,l.alternate!==null&&(s=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==s&&(l.refCount++,s!=null&&sf(s)));break;case 12:if(x&2048){Ti(s,l,d,m),s=l.stateNode;try{var E=l.memoizedProps,O=E.id,H=E.onPostCommit;typeof H=="function"&&H(O,l.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(J){It(l,l.return,J)}}else Ti(s,l,d,m);break;case 31:Ti(s,l,d,m);break;case 13:Ti(s,l,d,m);break;case 23:break;case 22:E=l.stateNode,O=l.alternate,l.memoizedState!==null?E._visibility&2?Ti(s,l,d,m):wf(s,l):E._visibility&2?Ti(s,l,d,m):(E._visibility|=2,xu(s,l,d,m,(l.subtreeFlags&10256)!==0||!1)),x&2048&&mb(O,l);break;case 24:Ti(s,l,d,m),x&2048&&gb(l.alternate,l);break;default:Ti(s,l,d,m)}}function xu(s,l,d,m,x){for(x=x&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var E=s,O=l,H=d,J=m,de=O.flags;switch(O.tag){case 0:case 11:case 15:xu(E,O,H,J,x),vf(8,O);break;case 23:break;case 22:var xe=O.stateNode;O.memoizedState!==null?xe._visibility&2?xu(E,O,H,J,x):wf(E,O):(xe._visibility|=2,xu(E,O,H,J,x)),x&&de&2048&&mb(O.alternate,O);break;case 24:xu(E,O,H,J,x),x&&de&2048&&gb(O.alternate,O);break;default:xu(E,O,H,J,x)}l=l.sibling}}function wf(s,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var d=s,m=l,x=m.flags;switch(m.tag){case 22:wf(d,m),x&2048&&mb(m.alternate,m);break;case 24:wf(d,m),x&2048&&gb(m.alternate,m);break;default:wf(d,m)}l=l.sibling}}var Sf=8192;function wu(s,l,d){if(s.subtreeFlags&Sf)for(s=s.child;s!==null;)f2(s,l,d),s=s.sibling}function f2(s,l,d){switch(s.tag){case 26:wu(s,l,d),s.flags&Sf&&s.memoizedState!==null&&SI(d,Di,s.memoizedState,s.memoizedProps);break;case 5:wu(s,l,d);break;case 3:case 4:var m=Di;Di=dp(s.stateNode.containerInfo),wu(s,l,d),Di=m;break;case 22:s.memoizedState===null&&(m=s.alternate,m!==null&&m.memoizedState!==null?(m=Sf,Sf=16777216,wu(s,l,d),Sf=m):wu(s,l,d));break;default:wu(s,l,d)}}function d2(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 Cf(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];Nn=m,p2(m,s)}d2(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)h2(s),s=s.sibling}function h2(s){switch(s.tag){case 0:case 11:case 15:Cf(s),s.flags&2048&&Ss(9,s,s.return);break;case 3:Cf(s);break;case 12:Cf(s);break;case 22:var l=s.stateNode;s.memoizedState!==null&&l._visibility&2&&(s.return===null||s.return.tag!==13)?(l._visibility&=-3,Jh(s)):Cf(s);break;default:Cf(s)}}function Jh(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];Nn=m,p2(m,s)}d2(s)}for(s=s.child;s!==null;){switch(l=s,l.tag){case 0:case 11:case 15:Ss(8,l,l.return),Jh(l);break;case 22:d=l.stateNode,d._visibility&2&&(d._visibility&=-3,Jh(l));break;default:Jh(l)}s=s.sibling}}function p2(s,l){for(;Nn!==null;){var d=Nn;switch(d.tag){case 0:case 11:case 15:Ss(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:sf(d.memoizedState.cache)}if(m=d.child,m!==null)m.return=d,Nn=m;else e:for(d=s;Nn!==null;){m=Nn;var x=m.sibling,E=m.return;if(i2(m),m===d){Nn=null;break e}if(x!==null){x.return=E,Nn=x;break e}Nn=E}}}var zP={getCacheForType:function(s){var l=Fn(xn),d=l.data.get(s);return d===void 0&&(d=s(),l.data.set(s,d)),d},cacheSignal:function(){return Fn(xn).controller.signal}},PP=typeof WeakMap=="function"?WeakMap:Map,Ot=0,qt=null,bt=null,wt=0,Pt=0,Pr=null,Cs=!1,Su=!1,yb=!1,To=0,dn=0,Es=0,Ka=0,bb=0,Ir=0,Cu=0,Ef=null,xr=null,vb=!1,ep=0,m2=0,tp=1/0,np=null,ks=null,_n=0,_s=null,Eu=null,$o=0,xb=0,wb=null,g2=null,kf=0,Sb=null;function Fr(){return(Ot&2)!==0&&wt!==0?wt&-wt:I.T!==null?Rb():Yl()}function y2(){if(Ir===0)if((wt&536870912)===0||kt){var s=Mn;Mn<<=1,(Mn&3932160)===0&&(Mn=262144),Ir=s}else Ir=536870912;return s=jr.current,s!==null&&(s.flags|=32),Ir}function wr(s,l,d){(s===qt&&(Pt===2||Pt===9)||s.cancelPendingCommit!==null)&&(ku(s,0),As(s,wt,Ir,!1)),Pn(s,d),((Ot&2)===0||s!==qt)&&(s===qt&&((Ot&2)===0&&(Ka|=d),dn===4&&As(s,wt,Ir,!1)),Vi(s))}function b2(s,l,d){if((Ot&6)!==0)throw Error(r(327));var m=!d&&(l&127)===0&&(l&s.expiredLanes)===0||rr(s,l),x=m?BP(s,l):Eb(s,l,!0),E=m;do{if(x===0){Su&&!m&&As(s,l,0,!1);break}else{if(d=s.current.alternate,E&&!IP(d)){x=Eb(s,l,!1),E=!1;continue}if(x===2){if(E=l,s.errorRecoveryDisabledLanes&E)var O=0;else O=s.pendingLanes&-536870913,O=O!==0?O:O&536870912?536870912:0;if(O!==0){l=O;e:{var H=s;x=Ef;var J=H.current.memoizedState.isDehydrated;if(J&&(ku(H,O).flags|=256),O=Eb(H,O,!1),O!==2){if(yb&&!J){H.errorRecoveryDisabledLanes|=E,Ka|=E,x=4;break e}E=xr,xr=x,E!==null&&(xr===null?xr=E:xr.push.apply(xr,E))}x=O}if(E=!1,x!==2)continue}}if(x===1){ku(s,0),As(s,l,0,!0);break}e:{switch(m=s,E=x,E){case 0:case 1:throw Error(r(345));case 4:if((l&4194048)!==l)break;case 6:As(m,l,Ir,!Cs);break e;case 2:xr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((l&62914560)===l&&(x=ep+300-ve(),10<x)){if(As(m,l,Ir,!Cs),on(m,0,!0)!==0)break e;$o=l,m.timeoutHandle=X2(v2.bind(null,m,d,xr,np,vb,l,Ir,Ka,Cu,Cs,E,"Throttled",-0,0),x);break e}v2(m,d,xr,np,vb,l,Ir,Ka,Cu,Cs,E,null,-0,0)}}break}while(!0);Vi(s)}function v2(s,l,d,m,x,E,O,H,J,de,xe,ke,ge,ye){if(s.timeoutHandle=-1,ke=l.subtreeFlags,ke&8192||(ke&16785408)===16785408){ke={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:go},f2(l,E,ke);var Fe=(E&62914560)===E?ep-ve():(E&4194048)===E?m2-ve():0;if(Fe=CI(ke,Fe),Fe!==null){$o=E,s.cancelPendingCommit=Fe(A2.bind(null,s,l,E,d,m,x,O,H,J,xe,ke,null,ge,ye)),As(s,E,O,!de);return}}A2(s,l,E,d,m,x,O,H,J)}function IP(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 x=d[m],E=x.getSnapshot;x=x.value;try{if(!Nr(E(),x))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 As(s,l,d,m){l&=~bb,l&=~Ka,s.suspendedLanes|=l,s.pingedLanes&=~l,m&&(s.warmLanes|=l),m=s.expirationTimes;for(var x=l;0<x;){var E=31-De(x),O=1<<E;m[E]=-1,x&=~O}d!==0&&zt(s,d,l)}function rp(){return(Ot&6)===0?(_f(0),!1):!0}function Cb(){if(bt!==null){if(Pt===0)var s=bt.return;else s=bt,xo=Ba=null,I0(s),mu=null,lf=0,s=bt;for(;s!==null;)Kk(s.alternate,s),s=s.return;bt=null}}function ku(s,l){var d=s.timeoutHandle;d!==-1&&(s.timeoutHandle=-1,oI(d)),d=s.cancelPendingCommit,d!==null&&(s.cancelPendingCommit=null,d()),$o=0,Cb(),qt=s,bt=d=bo(s.current,null),wt=l,Pt=0,Pr=null,Cs=!1,Su=rr(s,l),yb=!1,Cu=Ir=bb=Ka=Es=dn=0,xr=Ef=null,vb=!1,(l&8)!==0&&(l|=l&32);var m=s.entangledLanes;if(m!==0)for(s=s.entanglements,m&=l;0<m;){var x=31-De(m),E=1<<x;l|=s[x],m&=~E}return To=l,Eh(),d}function x2(s,l){ft=null,I.H=gf,l===pu||l===Mh?(l=jE(),Pt=3):l===A0?(l=jE(),Pt=4):Pt=l===tb?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,Pr=l,bt===null&&(dn=1,Vh(s,oi(l,s.current)))}function w2(){var s=jr.current;return s===null?!0:(wt&4194048)===wt?ui===null:(wt&62914560)===wt||(wt&536870912)!==0?s===ui:!1}function S2(){var s=I.H;return I.H=gf,s===null?gf:s}function C2(){var s=I.A;return I.A=zP,s}function ip(){dn=4,Cs||(wt&4194048)!==wt&&jr.current!==null||(Su=!0),(Es&134217727)===0&&(Ka&134217727)===0||qt===null||As(qt,wt,Ir,!1)}function Eb(s,l,d){var m=Ot;Ot|=2;var x=S2(),E=C2();(qt!==s||wt!==l)&&(np=null,ku(s,l)),l=!1;var O=dn;e:do try{if(Pt!==0&&bt!==null){var H=bt,J=Pr;switch(Pt){case 8:Cb(),O=6;break e;case 3:case 2:case 9:case 6:jr.current===null&&(l=!0);var de=Pt;if(Pt=0,Pr=null,_u(s,H,J,de),d&&Su){O=0;break e}break;default:de=Pt,Pt=0,Pr=null,_u(s,H,J,de)}}FP(),O=dn;break}catch(xe){x2(s,xe)}while(!0);return l&&s.shellSuspendCounter++,xo=Ba=null,Ot=m,I.H=x,I.A=E,bt===null&&(qt=null,wt=0,Eh()),O}function FP(){for(;bt!==null;)E2(bt)}function BP(s,l){var d=Ot;Ot|=2;var m=S2(),x=C2();qt!==s||wt!==l?(np=null,tp=ve()+500,ku(s,l)):Su=rr(s,l);e:do try{if(Pt!==0&&bt!==null){l=bt;var E=Pr;t:switch(Pt){case 1:Pt=0,Pr=null,_u(s,l,E,1);break;case 2:case 9:if(NE(E)){Pt=0,Pr=null,k2(l);break}l=function(){Pt!==2&&Pt!==9||qt!==s||(Pt=7),Vi(s)},E.then(l,l);break e;case 3:Pt=7;break e;case 4:Pt=5;break e;case 7:NE(E)?(Pt=0,Pr=null,k2(l)):(Pt=0,Pr=null,_u(s,l,E,7));break;case 5:var O=null;switch(bt.tag){case 26:O=bt.memoizedState;case 5:case 27:var H=bt;if(O?c_(O):H.stateNode.complete){Pt=0,Pr=null;var J=H.sibling;if(J!==null)bt=J;else{var de=H.return;de!==null?(bt=de,op(de)):bt=null}break t}}Pt=0,Pr=null,_u(s,l,E,5);break;case 6:Pt=0,Pr=null,_u(s,l,E,6);break;case 8:Cb(),dn=6;break e;default:throw Error(r(462))}}UP();break}catch(xe){x2(s,xe)}while(!0);return xo=Ba=null,I.H=m,I.A=x,Ot=d,bt!==null?0:(qt=null,wt=0,Eh(),dn)}function UP(){for(;bt!==null&&!Ae();)E2(bt)}function E2(s){var l=Wk(s.alternate,s,To);s.memoizedProps=s.pendingProps,l===null?op(s):bt=l}function k2(s){var l=s,d=l.alternate;switch(l.tag){case 15:case 0:l=Uk(d,l,l.pendingProps,l.type,void 0,wt);break;case 11:l=Uk(d,l,l.pendingProps,l.type.render,l.ref,wt);break;case 5:I0(l);default:Kk(d,l),l=bt=CE(l,To),l=Wk(d,l,To)}s.memoizedProps=s.pendingProps,l===null?op(s):bt=l}function _u(s,l,d,m){xo=Ba=null,I0(l),mu=null,lf=0;var x=l.return;try{if(TP(s,x,l,d,wt)){dn=1,Vh(s,oi(d,s.current)),bt=null;return}}catch(E){if(x!==null)throw bt=x,E;dn=1,Vh(s,oi(d,s.current)),bt=null;return}l.flags&32768?(kt||m===1?s=!0:Su||(wt&536870912)!==0?s=!1:(Cs=s=!0,(m===2||m===9||m===3||m===6)&&(m=jr.current,m!==null&&m.tag===13&&(m.flags|=16384))),_2(l,s)):op(l)}function op(s){var l=s;do{if((l.flags&32768)!==0){_2(l,Cs);return}s=l.return;var d=OP(l.alternate,l,To);if(d!==null){bt=d;return}if(l=l.sibling,l!==null){bt=l;return}bt=l=s}while(l!==null);dn===0&&(dn=5)}function _2(s,l){do{var d=NP(s.alternate,s);if(d!==null){d.flags&=32767,bt=d;return}if(d=s.return,d!==null&&(d.flags|=32768,d.subtreeFlags=0,d.deletions=null),!l&&(s=s.sibling,s!==null)){bt=s;return}bt=s=d}while(s!==null);dn=6,bt=null}function A2(s,l,d,m,x,E,O,H,J){s.cancelPendingCommit=null;do sp();while(_n!==0);if((Ot&6)!==0)throw Error(r(327));if(l!==null){if(l===s.current)throw Error(r(177));if(E=l.lanes|l.childLanes,E|=d0,Ze(s,d,E,O,H,J),s===qt&&(bt=qt=null,wt=0),Eu=l,_s=s,$o=d,xb=E,wb=x,g2=m,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,VP(be,function(){return M2(),null})):(s.callbackNode=null,s.callbackPriority=0),m=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||m){m=I.T,I.T=null,x=P.p,P.p=2,O=Ot,Ot|=4;try{LP(s,l,d)}finally{Ot=O,P.p=x,I.T=m}}_n=1,R2(),D2(),T2()}}function R2(){if(_n===1){_n=0;var s=_s,l=Eu,d=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||d){d=I.T,I.T=null;var m=P.p;P.p=2;var x=Ot;Ot|=4;try{l2(l,s);var E=jb,O=pE(s.containerInfo),H=E.focusedElem,J=E.selectionRange;if(O!==H&&H&&H.ownerDocument&&hE(H.ownerDocument.documentElement,H)){if(J!==null&&a0(H)){var de=J.start,xe=J.end;if(xe===void 0&&(xe=de),"selectionStart"in H)H.selectionStart=de,H.selectionEnd=Math.min(xe,H.value.length);else{var ke=H.ownerDocument||document,ge=ke&&ke.defaultView||window;if(ge.getSelection){var ye=ge.getSelection(),Fe=H.textContent.length,Je=Math.min(J.start,Fe),Ht=J.end===void 0?Je:Math.min(J.end,Fe);!ye.extend&&Je>Ht&&(O=Ht,Ht=Je,Je=O);var se=dE(H,Je),ne=dE(H,Ht);if(se&&ne&&(ye.rangeCount!==1||ye.anchorNode!==se.node||ye.anchorOffset!==se.offset||ye.focusNode!==ne.node||ye.focusOffset!==ne.offset)){var fe=ke.createRange();fe.setStart(se.node,se.offset),ye.removeAllRanges(),Je>Ht?(ye.addRange(fe),ye.extend(ne.node,ne.offset)):(fe.setEnd(ne.node,ne.offset),ye.addRange(fe))}}}}for(ke=[],ye=H;ye=ye.parentNode;)ye.nodeType===1&&ke.push({element:ye,left:ye.scrollLeft,top:ye.scrollTop});for(typeof H.focus=="function"&&H.focus(),H=0;H<ke.length;H++){var Se=ke[H];Se.element.scrollLeft=Se.left,Se.element.scrollTop=Se.top}}bp=!!Lb,jb=Lb=null}finally{Ot=x,P.p=m,I.T=d}}s.current=l,_n=2}}function D2(){if(_n===2){_n=0;var s=_s,l=Eu,d=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||d){d=I.T,I.T=null;var m=P.p;P.p=2;var x=Ot;Ot|=4;try{r2(s,l.alternate,l)}finally{Ot=x,P.p=m,I.T=d}}_n=3}}function T2(){if(_n===4||_n===3){_n=0,Ne();var s=_s,l=Eu,d=$o,m=g2;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?_n=5:(_n=0,Eu=_s=null,$2(s,s.pendingLanes));var x=s.pendingLanes;if(x===0&&(ks=null),po(d),l=l.stateNode,Xe&&typeof Xe.onCommitFiberRoot=="function")try{Xe.onCommitFiberRoot(At,l,void 0,(l.current.flags&128)===128)}catch{}if(m!==null){l=I.T,x=P.p,P.p=2,I.T=null;try{for(var E=s.onRecoverableError,O=0;O<m.length;O++){var H=m[O];E(H.value,{componentStack:H.stack})}}finally{I.T=l,P.p=x}}($o&3)!==0&&sp(),Vi(s),x=s.pendingLanes,(d&261930)!==0&&(x&42)!==0?s===Sb?kf++:(kf=0,Sb=s):kf=0,_f(0)}}function $2(s,l){(s.pooledCacheLanes&=l)===0&&(l=s.pooledCache,l!=null&&(s.pooledCache=null,sf(l)))}function sp(){return R2(),D2(),T2(),M2()}function M2(){if(_n!==5)return!1;var s=_s,l=xb;xb=0;var d=po($o),m=I.T,x=P.p;try{P.p=32>d?32:d,I.T=null,d=wb,wb=null;var E=_s,O=$o;if(_n=0,Eu=_s=null,$o=0,(Ot&6)!==0)throw Error(r(331));var H=Ot;if(Ot|=4,h2(E.current),c2(E,E.current,O,d),Ot=H,_f(0,!1),Xe&&typeof Xe.onPostCommitFiberRoot=="function")try{Xe.onPostCommitFiberRoot(At,E)}catch{}return!0}finally{P.p=x,I.T=m,$2(s,l)}}function O2(s,l,d){l=oi(d,l),l=eb(s.stateNode,l,2),s=vs(s,l,2),s!==null&&(Pn(s,2),Vi(s))}function It(s,l,d){if(s.tag===3)O2(s,s,d);else for(;l!==null;){if(l.tag===3){O2(l,s,d);break}else if(l.tag===1){var m=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(ks===null||!ks.has(m))){s=oi(d,s),d=Nk(2),m=vs(l,d,2),m!==null&&(Lk(d,m,l,s),Pn(m,2),Vi(m));break}}l=l.return}}function kb(s,l,d){var m=s.pingCache;if(m===null){m=s.pingCache=new PP;var x=new Set;m.set(l,x)}else x=m.get(l),x===void 0&&(x=new Set,m.set(l,x));x.has(d)||(yb=!0,x.add(d),s=HP.bind(null,s,l,d),l.then(s,s))}function HP(s,l,d){var m=s.pingCache;m!==null&&m.delete(l),s.pingedLanes|=s.suspendedLanes&d,s.warmLanes&=~d,qt===s&&(wt&d)===d&&(dn===4||dn===3&&(wt&62914560)===wt&&300>ve()-ep?(Ot&2)===0&&ku(s,0):bb|=d,Cu===wt&&(Cu=0)),Vi(s)}function N2(s,l){l===0&&(l=_i()),s=Pa(s,l),s!==null&&(Pn(s,l),Vi(s))}function qP(s){var l=s.memoizedState,d=0;l!==null&&(d=l.retryLane),N2(s,d)}function GP(s,l){var d=0;switch(s.tag){case 31:case 13:var m=s.stateNode,x=s.memoizedState;x!==null&&(d=x.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),N2(s,d)}function VP(s,l){return ce(s,l)}var ap=null,Au=null,_b=!1,lp=!1,Ab=!1,Rs=0;function Vi(s){s!==Au&&s.next===null&&(Au===null?ap=Au=s:Au=Au.next=s),lp=!0,_b||(_b=!0,WP())}function _f(s,l){if(!Ab&&lp){Ab=!0;do for(var d=!1,m=ap;m!==null;){if(s!==0){var x=m.pendingLanes;if(x===0)var E=0;else{var O=m.suspendedLanes,H=m.pingedLanes;E=(1<<31-De(42|s)+1)-1,E&=x&~(O&~H),E=E&201326741?E&201326741|1:E?E|2:0}E!==0&&(d=!0,P2(m,E))}else E=wt,E=on(m,m===qt?E:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(E&3)===0||rr(m,E)||(d=!0,P2(m,E));m=m.next}while(d);Ab=!1}}function YP(){L2()}function L2(){lp=_b=!1;var s=0;Rs!==0&&iI()&&(s=Rs);for(var l=ve(),d=null,m=ap;m!==null;){var x=m.next,E=j2(m,l);E===0?(m.next=null,d===null?ap=x:d.next=x,x===null&&(Au=d)):(d=m,(s!==0||(E&3)!==0)&&(lp=!0)),m=x}_n!==0&&_n!==5||_f(s),Rs!==0&&(Rs=0)}function j2(s,l){for(var d=s.suspendedLanes,m=s.pingedLanes,x=s.expirationTimes,E=s.pendingLanes&-62914561;0<E;){var O=31-De(E),H=1<<O,J=x[O];J===-1?((H&d)===0||(H&m)!==0)&&(x[O]=Ui(H,l)):J<=l&&(s.expiredLanes|=H),E&=~H}if(l=qt,d=wt,d=on(s,s===l?d:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),m=s.callbackNode,d===0||s===l&&(Pt===2||Pt===9)||s.cancelPendingCommit!==null)return m!==null&&m!==null&&oe(m),s.callbackNode=null,s.callbackPriority=0;if((d&3)===0||rr(s,d)){if(l=d&-d,l===s.callbackPriority)return l;switch(m!==null&&oe(m),po(d)){case 2:case 8:d=we;break;case 32:d=be;break;case 268435456:d=je;break;default:d=be}return m=z2.bind(null,s),d=ce(d,m),s.callbackPriority=l,s.callbackNode=d,l}return m!==null&&m!==null&&oe(m),s.callbackPriority=2,s.callbackNode=null,2}function z2(s,l){if(_n!==0&&_n!==5)return s.callbackNode=null,s.callbackPriority=0,null;var d=s.callbackNode;if(sp()&&s.callbackNode!==d)return null;var m=wt;return m=on(s,s===qt?m:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),m===0?null:(b2(s,m,l),j2(s,ve()),s.callbackNode!=null&&s.callbackNode===d?z2.bind(null,s):null)}function P2(s,l){if(sp())return null;b2(s,l,!0)}function WP(){sI(function(){(Ot&6)!==0?ce(le,YP):L2()})}function Rb(){if(Rs===0){var s=du;s===0&&(s=Et,Et<<=1,(Et&261888)===0&&(Et=256)),Rs=s}return Rs}function I2(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:gh(""+s)}function F2(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 XP(s,l,d,m,x){if(l==="submit"&&d&&d.stateNode===x){var E=I2((x[mr]||null).action),O=m.submitter;O&&(l=(l=O[mr]||null)?I2(l.formAction):O.getAttribute("formAction"),l!==null&&(E=l,O=null));var H=new xh("action","action",null,m,x);s.push({event:H,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(Rs!==0){var J=O?F2(x,O):new FormData(x);W0(d,{pending:!0,data:J,method:x.method,action:E},null,J)}}else typeof E=="function"&&(H.preventDefault(),J=O?F2(x,O):new FormData(x),W0(d,{pending:!0,data:J,method:x.method,action:E},E,J))},currentTarget:x}]})}}for(var Db=0;Db<f0.length;Db++){var Tb=f0[Db],KP=Tb.toLowerCase(),QP=Tb[0].toUpperCase()+Tb.slice(1);Ri(KP,"on"+QP)}Ri(yE,"onAnimationEnd"),Ri(bE,"onAnimationIteration"),Ri(vE,"onAnimationStart"),Ri("dblclick","onDoubleClick"),Ri("focusin","onFocus"),Ri("focusout","onBlur"),Ri(hP,"onTransitionRun"),Ri(pP,"onTransitionStart"),Ri(mP,"onTransitionCancel"),Ri(xE,"onTransitionEnd"),Zl("onMouseEnter",["mouseout","mouseover"]),Zl("onMouseLeave",["mouseout","mouseover"]),Zl("onPointerEnter",["pointerout","pointerover"]),Zl("onPointerLeave",["pointerout","pointerover"]),Na("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Na("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Na("onBeforeInput",["compositionend","keypress","textInput","paste"]),Na("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Na("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Na("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Af="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(" "),ZP=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Af));function B2(s,l){l=(l&4)!==0;for(var d=0;d<s.length;d++){var m=s[d],x=m.event;m=m.listeners;e:{var E=void 0;if(l)for(var O=m.length-1;0<=O;O--){var H=m[O],J=H.instance,de=H.currentTarget;if(H=H.listener,J!==E&&x.isPropagationStopped())break e;E=H,x.currentTarget=de;try{E(x)}catch(xe){Ch(xe)}x.currentTarget=null,E=J}else for(O=0;O<m.length;O++){if(H=m[O],J=H.instance,de=H.currentTarget,H=H.listener,J!==E&&x.isPropagationStopped())break e;E=H,x.currentTarget=de;try{E(x)}catch(xe){Ch(xe)}x.currentTarget=null,E=J}}}}function vt(s,l){var d=l[Hy];d===void 0&&(d=l[Hy]=new Set);var m=s+"__bubble";d.has(m)||(U2(l,s,2,!1),d.add(m))}function $b(s,l,d){var m=0;l&&(m|=4),U2(d,s,m,l)}var up="_reactListening"+Math.random().toString(36).slice(2);function Mb(s){if(!s[up]){s[up]=!0,LC.forEach(function(d){d!=="selectionchange"&&(ZP.has(d)||$b(d,!1,s),$b(d,!0,s))});var l=s.nodeType===9?s:s.ownerDocument;l===null||l[up]||(l[up]=!0,$b("selectionchange",!1,l))}}function U2(s,l,d,m){switch(y_(l)){case 2:var x=_I;break;case 8:x=AI;break;default:x=Yb}d=x.bind(null,l,d,s),x=void 0,!Zy||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(x=!0),m?x!==void 0?s.addEventListener(l,d,{capture:!0,passive:x}):s.addEventListener(l,d,!0):x!==void 0?s.addEventListener(l,d,{passive:x}):s.addEventListener(l,d,!1)}function Ob(s,l,d,m,x){var E=m;if((l&1)===0&&(l&2)===0&&m!==null)e:for(;;){if(m===null)return;var O=m.tag;if(O===3||O===4){var H=m.stateNode.containerInfo;if(H===x)break;if(O===4)for(O=m.return;O!==null;){var J=O.tag;if((J===3||J===4)&&O.stateNode.containerInfo===x)return;O=O.return}for(;H!==null;){if(O=Xl(H),O===null)return;if(J=O.tag,J===5||J===6||J===26||J===27){m=E=O;continue e}H=H.parentNode}}m=m.return}YC(function(){var de=E,xe=Ky(d),ke=[];e:{var ge=wE.get(s);if(ge!==void 0){var ye=xh,Fe=s;switch(s){case"keypress":if(bh(d)===0)break e;case"keydown":case"keyup":ye=Gz;break;case"focusin":Fe="focus",ye=n0;break;case"focusout":Fe="blur",ye=n0;break;case"beforeblur":case"afterblur":ye=n0;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=KC;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ye=Oz;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ye=Wz;break;case yE:case bE:case vE:ye=jz;break;case xE:ye=Kz;break;case"scroll":case"scrollend":ye=$z;break;case"wheel":ye=Zz;break;case"copy":case"cut":case"paste":ye=Pz;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ye=ZC;break;case"toggle":case"beforetoggle":ye=eP}var Je=(l&4)!==0,Ht=!Je&&(s==="scroll"||s==="scrollend"),se=Je?ge!==null?ge+"Capture":null:ge;Je=[];for(var ne=de,fe;ne!==null;){var Se=ne;if(fe=Se.stateNode,Se=Se.tag,Se!==5&&Se!==26&&Se!==27||fe===null||se===null||(Se=Wc(ne,se),Se!=null&&Je.push(Rf(ne,Se,fe))),Ht)break;ne=ne.return}0<Je.length&&(ge=new ye(ge,Fe,null,d,xe),ke.push({event:ge,listeners:Je}))}}if((l&7)===0){e:{if(ge=s==="mouseover"||s==="pointerover",ye=s==="mouseout"||s==="pointerout",ge&&d!==Xy&&(Fe=d.relatedTarget||d.fromElement)&&(Xl(Fe)||Fe[Wl]))break e;if((ye||ge)&&(ge=xe.window===xe?xe:(ge=xe.ownerDocument)?ge.defaultView||ge.parentWindow:window,ye?(Fe=d.relatedTarget||d.toElement,ye=de,Fe=Fe?Xl(Fe):null,Fe!==null&&(Ht=o(Fe),Je=Fe.tag,Fe!==Ht||Je!==5&&Je!==27&&Je!==6)&&(Fe=null)):(ye=null,Fe=de),ye!==Fe)){if(Je=KC,Se="onMouseLeave",se="onMouseEnter",ne="mouse",(s==="pointerout"||s==="pointerover")&&(Je=ZC,Se="onPointerLeave",se="onPointerEnter",ne="pointer"),Ht=ye==null?ge:Yc(ye),fe=Fe==null?ge:Yc(Fe),ge=new Je(Se,ne+"leave",ye,d,xe),ge.target=Ht,ge.relatedTarget=fe,Se=null,Xl(xe)===de&&(Je=new Je(se,ne+"enter",Fe,d,xe),Je.target=fe,Je.relatedTarget=Ht,Se=Je),Ht=Se,ye&&Fe)t:{for(Je=JP,se=ye,ne=Fe,fe=0,Se=se;Se;Se=Je(Se))fe++;Se=0;for(var Ke=ne;Ke;Ke=Je(Ke))Se++;for(;0<fe-Se;)se=Je(se),fe--;for(;0<Se-fe;)ne=Je(ne),Se--;for(;fe--;){if(se===ne||ne!==null&&se===ne.alternate){Je=se;break t}se=Je(se),ne=Je(ne)}Je=null}else Je=null;ye!==null&&H2(ke,ge,ye,Je,!1),Fe!==null&&Ht!==null&&H2(ke,Ht,Fe,Je,!0)}}e:{if(ge=de?Yc(de):window,ye=ge.nodeName&&ge.nodeName.toLowerCase(),ye==="select"||ye==="input"&&ge.type==="file")var Tt=sE;else if(iE(ge))if(aE)Tt=cP;else{Tt=lP;var Ge=aP}else ye=ge.nodeName,!ye||ye.toLowerCase()!=="input"||ge.type!=="checkbox"&&ge.type!=="radio"?de&&Wy(de.elementType)&&(Tt=sE):Tt=uP;if(Tt&&(Tt=Tt(s,de))){oE(ke,Tt,d,xe);break e}Ge&&Ge(s,ge,de),s==="focusout"&&de&&ge.type==="number"&&de.memoizedProps.value!=null&&Yy(ge,"number",ge.value)}switch(Ge=de?Yc(de):window,s){case"focusin":(iE(Ge)||Ge.contentEditable==="true")&&(iu=Ge,l0=de,nf=null);break;case"focusout":nf=l0=iu=null;break;case"mousedown":u0=!0;break;case"contextmenu":case"mouseup":case"dragend":u0=!1,mE(ke,d,xe);break;case"selectionchange":if(dP)break;case"keydown":case"keyup":mE(ke,d,xe)}var dt;if(i0)e:{switch(s){case"compositionstart":var St="onCompositionStart";break e;case"compositionend":St="onCompositionEnd";break e;case"compositionupdate":St="onCompositionUpdate";break e}St=void 0}else ru?nE(s,d)&&(St="onCompositionEnd"):s==="keydown"&&d.keyCode===229&&(St="onCompositionStart");St&&(JC&&d.locale!=="ko"&&(ru||St!=="onCompositionStart"?St==="onCompositionEnd"&&ru&&(dt=WC()):(ds=xe,Jy="value"in ds?ds.value:ds.textContent,ru=!0)),Ge=cp(de,St),0<Ge.length&&(St=new QC(St,s,null,d,xe),ke.push({event:St,listeners:Ge}),dt?St.data=dt:(dt=rE(d),dt!==null&&(St.data=dt)))),(dt=nP?rP(s,d):iP(s,d))&&(St=cp(de,"onBeforeInput"),0<St.length&&(Ge=new QC("onBeforeInput","beforeinput",null,d,xe),ke.push({event:Ge,listeners:St}),Ge.data=dt)),XP(ke,s,de,d,xe)}B2(ke,l)})}function Rf(s,l,d){return{instance:s,listener:l,currentTarget:d}}function cp(s,l){for(var d=l+"Capture",m=[];s!==null;){var x=s,E=x.stateNode;if(x=x.tag,x!==5&&x!==26&&x!==27||E===null||(x=Wc(s,d),x!=null&&m.unshift(Rf(s,x,E)),x=Wc(s,l),x!=null&&m.push(Rf(s,x,E))),s.tag===3)return m;s=s.return}return[]}function JP(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function H2(s,l,d,m,x){for(var E=l._reactName,O=[];d!==null&&d!==m;){var H=d,J=H.alternate,de=H.stateNode;if(H=H.tag,J!==null&&J===m)break;H!==5&&H!==26&&H!==27||de===null||(J=de,x?(de=Wc(d,E),de!=null&&O.unshift(Rf(d,de,J))):x||(de=Wc(d,E),de!=null&&O.push(Rf(d,de,J)))),d=d.return}O.length!==0&&s.push({event:l,listeners:O})}var eI=/\r\n?/g,tI=/\u0000|\uFFFD/g;function q2(s){return(typeof s=="string"?s:""+s).replace(eI,`
|
|
50
|
+
`).replace(tI,"")}function G2(s,l){return l=q2(l),q2(s)===l}function Ut(s,l,d,m,x,E){switch(d){case"children":typeof m=="string"?l==="body"||l==="textarea"&&m===""||eu(s,m):(typeof m=="number"||typeof m=="bigint")&&l!=="body"&&eu(s,""+m);break;case"className":ph(s,"class",m);break;case"tabIndex":ph(s,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":ph(s,d,m);break;case"style":GC(s,m,E);break;case"data":if(l!=="object"){ph(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=gh(""+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 E=="function"&&(d==="formAction"?(l!=="input"&&Ut(s,l,"name",x.name,x,null),Ut(s,l,"formEncType",x.formEncType,x,null),Ut(s,l,"formMethod",x.formMethod,x,null),Ut(s,l,"formTarget",x.formTarget,x,null)):(Ut(s,l,"encType",x.encType,x,null),Ut(s,l,"method",x.method,x,null),Ut(s,l,"target",x.target,x,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){s.removeAttribute(d);break}m=gh(""+m),s.setAttribute(d,m);break;case"onClick":m!=null&&(s.onclick=go);break;case"onScroll":m!=null&&vt("scroll",s);break;case"onScrollEnd":m!=null&&vt("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(x.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=gh(""+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":vt("beforetoggle",s),vt("toggle",s),hh(s,"popover",m);break;case"xlinkActuate":mo(s,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":mo(s,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":mo(s,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":mo(s,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":mo(s,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":mo(s,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":mo(s,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":mo(s,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":mo(s,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":hh(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=Dz.get(d)||d,hh(s,d,m))}}function Nb(s,l,d,m,x,E){switch(d){case"style":GC(s,m,E);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(r(61));if(d=m.__html,d!=null){if(x.children!=null)throw Error(r(60));s.innerHTML=d}}break;case"children":typeof m=="string"?eu(s,m):(typeof m=="number"||typeof m=="bigint")&&eu(s,""+m);break;case"onScroll":m!=null&&vt("scroll",s);break;case"onScrollEnd":m!=null&&vt("scrollend",s);break;case"onClick":m!=null&&(s.onclick=go);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!jC.hasOwnProperty(d))e:{if(d[0]==="o"&&d[1]==="n"&&(x=d.endsWith("Capture"),l=d.slice(2,x?d.length-7:void 0),E=s[mr]||null,E=E!=null?E[d]:null,typeof E=="function"&&s.removeEventListener(l,E,x),typeof m=="function")){typeof E!="function"&&E!==null&&(d in s?s[d]=null:s.hasAttribute(d)&&s.removeAttribute(d)),s.addEventListener(l,m,x);break e}d in s?s[d]=m:m===!0?s.setAttribute(d,""):hh(s,d,m)}}}function Un(s,l,d){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":vt("error",s),vt("load",s);var m=!1,x=!1,E;for(E in d)if(d.hasOwnProperty(E)){var O=d[E];if(O!=null)switch(E){case"src":m=!0;break;case"srcSet":x=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:Ut(s,l,E,O,d,null)}}x&&Ut(s,l,"srcSet",d.srcSet,d,null),m&&Ut(s,l,"src",d.src,d,null);return;case"input":vt("invalid",s);var H=E=O=x=null,J=null,de=null;for(m in d)if(d.hasOwnProperty(m)){var xe=d[m];if(xe!=null)switch(m){case"name":x=xe;break;case"type":O=xe;break;case"checked":J=xe;break;case"defaultChecked":de=xe;break;case"value":E=xe;break;case"defaultValue":H=xe;break;case"children":case"dangerouslySetInnerHTML":if(xe!=null)throw Error(r(137,l));break;default:Ut(s,l,m,xe,d,null)}}BC(s,E,H,J,de,O,x,!1);return;case"select":vt("invalid",s),m=O=E=null;for(x in d)if(d.hasOwnProperty(x)&&(H=d[x],H!=null))switch(x){case"value":E=H;break;case"defaultValue":O=H;break;case"multiple":m=H;default:Ut(s,l,x,H,d,null)}l=E,d=O,s.multiple=!!m,l!=null?Jl(s,!!m,l,!1):d!=null&&Jl(s,!!m,d,!0);return;case"textarea":vt("invalid",s),E=x=m=null;for(O in d)if(d.hasOwnProperty(O)&&(H=d[O],H!=null))switch(O){case"value":m=H;break;case"defaultValue":x=H;break;case"children":E=H;break;case"dangerouslySetInnerHTML":if(H!=null)throw Error(r(91));break;default:Ut(s,l,O,H,d,null)}HC(s,m,x,E);return;case"option":for(J in d)if(d.hasOwnProperty(J)&&(m=d[J],m!=null))switch(J){case"selected":s.selected=m&&typeof m!="function"&&typeof m!="symbol";break;default:Ut(s,l,J,m,d,null)}return;case"dialog":vt("beforetoggle",s),vt("toggle",s),vt("cancel",s),vt("close",s);break;case"iframe":case"object":vt("load",s);break;case"video":case"audio":for(m=0;m<Af.length;m++)vt(Af[m],s);break;case"image":vt("error",s),vt("load",s);break;case"details":vt("toggle",s);break;case"embed":case"source":case"link":vt("error",s),vt("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:Ut(s,l,de,m,d,null)}return;default:if(Wy(l)){for(xe in d)d.hasOwnProperty(xe)&&(m=d[xe],m!==void 0&&Nb(s,l,xe,m,d,void 0));return}}for(H in d)d.hasOwnProperty(H)&&(m=d[H],m!=null&&Ut(s,l,H,m,d,null))}function nI(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 x=null,E=null,O=null,H=null,J=null,de=null,xe=null;for(ye in d){var ke=d[ye];if(d.hasOwnProperty(ye)&&ke!=null)switch(ye){case"checked":break;case"value":break;case"defaultValue":J=ke;default:m.hasOwnProperty(ye)||Ut(s,l,ye,null,m,ke)}}for(var ge in m){var ye=m[ge];if(ke=d[ge],m.hasOwnProperty(ge)&&(ye!=null||ke!=null))switch(ge){case"type":E=ye;break;case"name":x=ye;break;case"checked":de=ye;break;case"defaultChecked":xe=ye;break;case"value":O=ye;break;case"defaultValue":H=ye;break;case"children":case"dangerouslySetInnerHTML":if(ye!=null)throw Error(r(137,l));break;default:ye!==ke&&Ut(s,l,ge,ye,m,ke)}}Vy(s,O,H,J,de,xe,E,x);return;case"select":ye=O=H=ge=null;for(E in d)if(J=d[E],d.hasOwnProperty(E)&&J!=null)switch(E){case"value":break;case"multiple":ye=J;default:m.hasOwnProperty(E)||Ut(s,l,E,null,m,J)}for(x in m)if(E=m[x],J=d[x],m.hasOwnProperty(x)&&(E!=null||J!=null))switch(x){case"value":ge=E;break;case"defaultValue":H=E;break;case"multiple":O=E;default:E!==J&&Ut(s,l,x,E,m,J)}l=H,d=O,m=ye,ge!=null?Jl(s,!!d,ge,!1):!!m!=!!d&&(l!=null?Jl(s,!!d,l,!0):Jl(s,!!d,d?[]:"",!1));return;case"textarea":ye=ge=null;for(H in d)if(x=d[H],d.hasOwnProperty(H)&&x!=null&&!m.hasOwnProperty(H))switch(H){case"value":break;case"children":break;default:Ut(s,l,H,null,m,x)}for(O in m)if(x=m[O],E=d[O],m.hasOwnProperty(O)&&(x!=null||E!=null))switch(O){case"value":ge=x;break;case"defaultValue":ye=x;break;case"children":break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(r(91));break;default:x!==E&&Ut(s,l,O,x,m,E)}UC(s,ge,ye);return;case"option":for(var Fe in d)if(ge=d[Fe],d.hasOwnProperty(Fe)&&ge!=null&&!m.hasOwnProperty(Fe))switch(Fe){case"selected":s.selected=!1;break;default:Ut(s,l,Fe,null,m,ge)}for(J in m)if(ge=m[J],ye=d[J],m.hasOwnProperty(J)&&ge!==ye&&(ge!=null||ye!=null))switch(J){case"selected":s.selected=ge&&typeof ge!="function"&&typeof ge!="symbol";break;default:Ut(s,l,J,ge,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 Je in d)ge=d[Je],d.hasOwnProperty(Je)&&ge!=null&&!m.hasOwnProperty(Je)&&Ut(s,l,Je,null,m,ge);for(de in m)if(ge=m[de],ye=d[de],m.hasOwnProperty(de)&&ge!==ye&&(ge!=null||ye!=null))switch(de){case"children":case"dangerouslySetInnerHTML":if(ge!=null)throw Error(r(137,l));break;default:Ut(s,l,de,ge,m,ye)}return;default:if(Wy(l)){for(var Ht in d)ge=d[Ht],d.hasOwnProperty(Ht)&&ge!==void 0&&!m.hasOwnProperty(Ht)&&Nb(s,l,Ht,void 0,m,ge);for(xe in m)ge=m[xe],ye=d[xe],!m.hasOwnProperty(xe)||ge===ye||ge===void 0&&ye===void 0||Nb(s,l,xe,ge,m,ye);return}}for(var se in d)ge=d[se],d.hasOwnProperty(se)&&ge!=null&&!m.hasOwnProperty(se)&&Ut(s,l,se,null,m,ge);for(ke in m)ge=m[ke],ye=d[ke],!m.hasOwnProperty(ke)||ge===ye||ge==null&&ye==null||Ut(s,l,ke,ge,m,ye)}function V2(s){switch(s){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function rI(){if(typeof performance.getEntriesByType=="function"){for(var s=0,l=0,d=performance.getEntriesByType("resource"),m=0;m<d.length;m++){var x=d[m],E=x.transferSize,O=x.initiatorType,H=x.duration;if(E&&H&&V2(O)){for(O=0,H=x.responseEnd,m+=1;m<d.length;m++){var J=d[m],de=J.startTime;if(de>H)break;var xe=J.transferSize,ke=J.initiatorType;xe&&V2(ke)&&(J=J.responseEnd,O+=xe*(J<H?1:(H-de)/(J-de)))}if(--m,l+=8*(E+O)/(x.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 Lb=null,jb=null;function fp(s){return s.nodeType===9?s:s.ownerDocument}function Y2(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 W2(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 zb(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 Pb=null;function iI(){var s=window.event;return s&&s.type==="popstate"?s===Pb?!1:(Pb=s,!0):(Pb=null,!1)}var X2=typeof setTimeout=="function"?setTimeout:void 0,oI=typeof clearTimeout=="function"?clearTimeout:void 0,K2=typeof Promise=="function"?Promise:void 0,sI=typeof queueMicrotask=="function"?queueMicrotask:typeof K2<"u"?function(s){return K2.resolve(null).then(s).catch(aI)}:X2;function aI(s){setTimeout(function(){throw s})}function Ds(s){return s==="head"}function Q2(s,l){var d=l,m=0;do{var x=d.nextSibling;if(s.removeChild(d),x&&x.nodeType===8)if(d=x.data,d==="/$"||d==="/&"){if(m===0){s.removeChild(x),$u(l);return}m--}else if(d==="$"||d==="$?"||d==="$~"||d==="$!"||d==="&")m++;else if(d==="html")Df(s.ownerDocument.documentElement);else if(d==="head"){d=s.ownerDocument.head,Df(d);for(var E=d.firstChild;E;){var O=E.nextSibling,H=E.nodeName;E[Vc]||H==="SCRIPT"||H==="STYLE"||H==="LINK"&&E.rel.toLowerCase()==="stylesheet"||d.removeChild(E),E=O}}else d==="body"&&Df(s.ownerDocument.body);d=x}while(d);$u(l)}function Z2(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 Ib(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":Ib(d),qy(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}s.removeChild(d)}}function lI(s,l,d,m){for(;s.nodeType===1;){var x=d;if(s.nodeName.toLowerCase()!==l.toLowerCase()){if(!m&&(s.nodeName!=="INPUT"||s.type!=="hidden"))break}else if(m){if(!s[Vc])switch(l){case"meta":if(!s.hasAttribute("itemprop"))break;return s;case"link":if(E=s.getAttribute("rel"),E==="stylesheet"&&s.hasAttribute("data-precedence"))break;if(E!==x.rel||s.getAttribute("href")!==(x.href==null||x.href===""?null:x.href)||s.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin)||s.getAttribute("title")!==(x.title==null?null:x.title))break;return s;case"style":if(s.hasAttribute("data-precedence"))break;return s;case"script":if(E=s.getAttribute("src"),(E!==(x.src==null?null:x.src)||s.getAttribute("type")!==(x.type==null?null:x.type)||s.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin))&&E&&s.hasAttribute("async")&&!s.hasAttribute("itemprop"))break;return s;default:return s}}else if(l==="input"&&s.type==="hidden"){var E=x.name==null?null:""+x.name;if(x.type==="hidden"&&s.getAttribute("name")===E)return s}else return s;if(s=ci(s.nextSibling),s===null)break}return null}function uI(s,l,d){if(l==="")return null;for(;s.nodeType!==3;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!d||(s=ci(s.nextSibling),s===null))return null;return s}function J2(s,l){for(;s.nodeType!==8;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!l||(s=ci(s.nextSibling),s===null))return null;return s}function Fb(s){return s.data==="$?"||s.data==="$~"}function Bb(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function cI(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 ci(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 Ub=null;function e_(s){s=s.nextSibling;for(var l=0;s;){if(s.nodeType===8){var d=s.data;if(d==="/$"||d==="/&"){if(l===0)return ci(s.nextSibling);l--}else d!=="$"&&d!=="$!"&&d!=="$?"&&d!=="$~"&&d!=="&"||l++}s=s.nextSibling}return null}function t_(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 n_(s,l,d){switch(l=fp(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 Df(s){for(var l=s.attributes;l.length;)s.removeAttributeNode(l[0]);qy(s)}var fi=new Map,r_=new Set;function dp(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var Mo=P.d;P.d={f:fI,r:dI,D:hI,C:pI,L:mI,m:gI,X:bI,S:yI,M:vI};function fI(){var s=Mo.f(),l=rp();return s||l}function dI(s){var l=Kl(s);l!==null&&l.tag===5&&l.type==="form"?xk(l):Mo.r(s)}var Ru=typeof document>"u"?null:document;function i_(s,l,d){var m=Ru;if(m&&typeof l=="string"&&l){var x=ri(l);x='link[rel="'+s+'"][href="'+x+'"]',typeof d=="string"&&(x+='[crossorigin="'+d+'"]'),r_.has(x)||(r_.add(x),s={rel:s,crossOrigin:d,href:l},m.querySelector(x)===null&&(l=m.createElement("link"),Un(l,"link",s),On(l),m.head.appendChild(l)))}}function hI(s){Mo.D(s),i_("dns-prefetch",s,null)}function pI(s,l){Mo.C(s,l),i_("preconnect",s,l)}function mI(s,l,d){Mo.L(s,l,d);var m=Ru;if(m&&s&&l){var x='link[rel="preload"][as="'+ri(l)+'"]';l==="image"&&d&&d.imageSrcSet?(x+='[imagesrcset="'+ri(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(x+='[imagesizes="'+ri(d.imageSizes)+'"]')):x+='[href="'+ri(s)+'"]';var E=x;switch(l){case"style":E=Du(s);break;case"script":E=Tu(s)}fi.has(E)||(s=p({rel:"preload",href:l==="image"&&d&&d.imageSrcSet?void 0:s,as:l},d),fi.set(E,s),m.querySelector(x)!==null||l==="style"&&m.querySelector(Tf(E))||l==="script"&&m.querySelector($f(E))||(l=m.createElement("link"),Un(l,"link",s),On(l),m.head.appendChild(l)))}}function gI(s,l){Mo.m(s,l);var d=Ru;if(d&&s){var m=l&&typeof l.as=="string"?l.as:"script",x='link[rel="modulepreload"][as="'+ri(m)+'"][href="'+ri(s)+'"]',E=x;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":E=Tu(s)}if(!fi.has(E)&&(s=p({rel:"modulepreload",href:s},l),fi.set(E,s),d.querySelector(x)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector($f(E)))return}m=d.createElement("link"),Un(m,"link",s),On(m),d.head.appendChild(m)}}}function yI(s,l,d){Mo.S(s,l,d);var m=Ru;if(m&&s){var x=Ql(m).hoistableStyles,E=Du(s);l=l||"default";var O=x.get(E);if(!O){var H={loading:0,preload:null};if(O=m.querySelector(Tf(E)))H.loading=5;else{s=p({rel:"stylesheet",href:s,"data-precedence":l},d),(d=fi.get(E))&&Hb(s,d);var J=O=m.createElement("link");On(J),Un(J,"link",s),J._p=new Promise(function(de,xe){J.onload=de,J.onerror=xe}),J.addEventListener("load",function(){H.loading|=1}),J.addEventListener("error",function(){H.loading|=2}),H.loading|=4,hp(O,l,m)}O={type:"stylesheet",instance:O,count:1,state:H},x.set(E,O)}}}function bI(s,l){Mo.X(s,l);var d=Ru;if(d&&s){var m=Ql(d).hoistableScripts,x=Tu(s),E=m.get(x);E||(E=d.querySelector($f(x)),E||(s=p({src:s,async:!0},l),(l=fi.get(x))&&qb(s,l),E=d.createElement("script"),On(E),Un(E,"link",s),d.head.appendChild(E)),E={type:"script",instance:E,count:1,state:null},m.set(x,E))}}function vI(s,l){Mo.M(s,l);var d=Ru;if(d&&s){var m=Ql(d).hoistableScripts,x=Tu(s),E=m.get(x);E||(E=d.querySelector($f(x)),E||(s=p({src:s,async:!0,type:"module"},l),(l=fi.get(x))&&qb(s,l),E=d.createElement("script"),On(E),Un(E,"link",s),d.head.appendChild(E)),E={type:"script",instance:E,count:1,state:null},m.set(x,E))}}function o_(s,l,d,m){var x=(x=me.current)?dp(x):null;if(!x)throw Error(r(446));switch(s){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(l=Du(d.href),d=Ql(x).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=Du(d.href);var E=Ql(x).hoistableStyles,O=E.get(s);if(O||(x=x.ownerDocument||x,O={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},E.set(s,O),(E=x.querySelector(Tf(s)))&&!E._p&&(O.instance=E,O.state.loading=5),fi.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},fi.set(s,d),E||xI(x,s,d,O.state))),l&&m===null)throw Error(r(528,""));return O}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=Tu(d),d=Ql(x).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 Du(s){return'href="'+ri(s)+'"'}function Tf(s){return'link[rel="stylesheet"]['+s+"]"}function s_(s){return p({},s,{"data-precedence":s.precedence,precedence:null})}function xI(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}),Un(l,"link",d),On(l),s.head.appendChild(l))}function Tu(s){return'[src="'+ri(s)+'"]'}function $f(s){return"script[async]"+s}function a_(s,l,d){if(l.count++,l.instance===null)switch(l.type){case"style":var m=s.querySelector('style[data-href~="'+ri(d.href)+'"]');if(m)return l.instance=m,On(m),m;var x=p({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return m=(s.ownerDocument||s).createElement("style"),On(m),Un(m,"style",x),hp(m,d.precedence,s),l.instance=m;case"stylesheet":x=Du(d.href);var E=s.querySelector(Tf(x));if(E)return l.state.loading|=4,l.instance=E,On(E),E;m=s_(d),(x=fi.get(x))&&Hb(m,x),E=(s.ownerDocument||s).createElement("link"),On(E);var O=E;return O._p=new Promise(function(H,J){O.onload=H,O.onerror=J}),Un(E,"link",m),l.state.loading|=4,hp(E,d.precedence,s),l.instance=E;case"script":return E=Tu(d.src),(x=s.querySelector($f(E)))?(l.instance=x,On(x),x):(m=d,(x=fi.get(E))&&(m=p({},d),qb(m,x)),s=s.ownerDocument||s,x=s.createElement("script"),On(x),Un(x,"link",m),s.head.appendChild(x),l.instance=x);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,hp(m,d.precedence,s));return l.instance}function hp(s,l,d){for(var m=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),x=m.length?m[m.length-1]:null,E=x,O=0;O<m.length;O++){var H=m[O];if(H.dataset.precedence===l)E=H;else if(E!==x)break}E?E.parentNode.insertBefore(s,E.nextSibling):(l=d.nodeType===9?d.head:d,l.insertBefore(s,l.firstChild))}function Hb(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.title==null&&(s.title=l.title)}function qb(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.integrity==null&&(s.integrity=l.integrity)}var pp=null;function l_(s,l,d){if(pp===null){var m=new Map,x=pp=new Map;x.set(d,m)}else x=pp,m=x.get(d),m||(m=new Map,x.set(d,m));if(m.has(s))return m;for(m.set(s,null),d=d.getElementsByTagName(s),x=0;x<d.length;x++){var E=d[x];if(!(E[Vc]||E[sn]||s==="link"&&E.getAttribute("rel")==="stylesheet")&&E.namespaceURI!=="http://www.w3.org/2000/svg"){var O=E.getAttribute(l)||"";O=s+O;var H=m.get(O);H?H.push(E):m.set(O,[E])}}return m}function u_(s,l,d){s=s.ownerDocument||s,s.head.insertBefore(d,l==="title"?s.querySelector("head > title"):null)}function wI(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 c_(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function SI(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 x=Du(m.href),E=l.querySelector(Tf(x));if(E){l=E._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(s.count++,s=mp.bind(s),l.then(s,s)),d.state.loading|=4,d.instance=E,On(E);return}E=l.ownerDocument||l,m=s_(m),(x=fi.get(x))&&Hb(m,x),E=E.createElement("link"),On(E);var O=E;O._p=new Promise(function(H,J){O.onload=H,O.onerror=J}),Un(E,"link",m),d.instance=E}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(d,l),(l=d.state.preload)&&(d.state.loading&3)===0&&(s.count++,d=mp.bind(s),l.addEventListener("load",d),l.addEventListener("error",d))}}var Gb=0;function CI(s,l){return s.stylesheets&&s.count===0&&yp(s,s.stylesheets),0<s.count||0<s.imgCount?function(d){var m=setTimeout(function(){if(s.stylesheets&&yp(s,s.stylesheets),s.unsuspend){var E=s.unsuspend;s.unsuspend=null,E()}},6e4+l);0<s.imgBytes&&Gb===0&&(Gb=62500*rI());var x=setTimeout(function(){if(s.waitingForImages=!1,s.count===0&&(s.stylesheets&&yp(s,s.stylesheets),s.unsuspend)){var E=s.unsuspend;s.unsuspend=null,E()}},(s.imgBytes>Gb?50:800)+l);return s.unsuspend=d,function(){s.unsuspend=null,clearTimeout(m),clearTimeout(x)}}:null}function mp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)yp(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var gp=null;function yp(s,l){s.stylesheets=null,s.unsuspend!==null&&(s.count++,gp=new Map,l.forEach(EI,s),gp=null,mp.call(s))}function EI(s,l){if(!(l.state.loading&4)){var d=gp.get(s);if(d)var m=d.get(null);else{d=new Map,gp.set(s,d);for(var x=s.querySelectorAll("link[data-precedence],style[data-precedence]"),E=0;E<x.length;E++){var O=x[E];(O.nodeName==="LINK"||O.getAttribute("media")!=="not all")&&(d.set(O.dataset.precedence,O),m=O)}m&&d.set(null,m)}x=l.instance,O=x.getAttribute("data-precedence"),E=d.get(O)||m,E===m&&d.set(null,x),d.set(O,x),this.count++,m=mp.bind(this),x.addEventListener("load",m),x.addEventListener("error",m),E?E.parentNode.insertBefore(x,E.nextSibling):(s=s.nodeType===9?s.head:s,s.insertBefore(x,s.firstChild)),l.state.loading|=4}}var Mf={$$typeof:k,Provider:null,Consumer:null,_currentValue:G,_currentValue2:G,_threadCount:0};function kI(s,l,d,m,x,E,O,H,J){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=Ai(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ai(0),this.hiddenUpdates=Ai(null),this.identifierPrefix=m,this.onUncaughtError=x,this.onCaughtError=E,this.onRecoverableError=O,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=J,this.incompleteTransitions=new Map}function f_(s,l,d,m,x,E,O,H,J,de,xe,ke){return s=new kI(s,l,d,O,J,de,xe,ke,H),l=1,E===!0&&(l|=24),E=Lr(3,null,null,l),s.current=E,E.stateNode=s,l=E0(),l.refCount++,s.pooledCache=l,l.refCount++,E.memoizedState={element:m,isDehydrated:d,cache:l},R0(E),s}function d_(s){return s?(s=au,s):au}function h_(s,l,d,m,x,E){x=d_(x),m.context===null?m.context=x:m.pendingContext=x,m=bs(l),m.payload={element:d},E=E===void 0?null:E,E!==null&&(m.callback=E),d=vs(s,m,l),d!==null&&(wr(d,s,l),cf(d,s,l))}function p_(s,l){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var d=s.retryLane;s.retryLane=d!==0&&d<l?d:l}}function Vb(s,l){p_(s,l),(s=s.alternate)&&p_(s,l)}function m_(s){if(s.tag===13||s.tag===31){var l=Pa(s,67108864);l!==null&&wr(l,s,67108864),Vb(s,67108864)}}function g_(s){if(s.tag===13||s.tag===31){var l=Fr();l=cn(l);var d=Pa(s,l);d!==null&&wr(d,s,l),Vb(s,l)}}var bp=!0;function _I(s,l,d,m){var x=I.T;I.T=null;var E=P.p;try{P.p=2,Yb(s,l,d,m)}finally{P.p=E,I.T=x}}function AI(s,l,d,m){var x=I.T;I.T=null;var E=P.p;try{P.p=8,Yb(s,l,d,m)}finally{P.p=E,I.T=x}}function Yb(s,l,d,m){if(bp){var x=Wb(m);if(x===null)Ob(s,l,m,vp,d),b_(s,m);else if(DI(x,s,l,d,m))m.stopPropagation();else if(b_(s,m),l&4&&-1<RI.indexOf(s)){for(;x!==null;){var E=Kl(x);if(E!==null)switch(E.tag){case 3:if(E=E.stateNode,E.current.memoizedState.isDehydrated){var O=ln(E.pendingLanes);if(O!==0){var H=E;for(H.pendingLanes|=2,H.entangledLanes|=2;O;){var J=1<<31-De(O);H.entanglements[1]|=J,O&=~J}Vi(E),(Ot&6)===0&&(tp=ve()+500,_f(0))}}break;case 31:case 13:H=Pa(E,2),H!==null&&wr(H,E,2),rp(),Vb(E,2)}if(E=Wb(m),E===null&&Ob(s,l,m,vp,d),E===x)break;x=E}x!==null&&m.stopPropagation()}else Ob(s,l,m,null,d)}}function Wb(s){return s=Ky(s),Xb(s)}var vp=null;function Xb(s){if(vp=null,s=Xl(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 vp=s,null}function y_(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($e()){case le:return 2;case we:return 8;case be:case Te:return 32;case je:return 268435456;default:return 32}default:return 32}}var Kb=!1,Ts=null,$s=null,Ms=null,Of=new Map,Nf=new Map,Os=[],RI="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 b_(s,l){switch(s){case"focusin":case"focusout":Ts=null;break;case"dragenter":case"dragleave":$s=null;break;case"mouseover":case"mouseout":Ms=null;break;case"pointerover":case"pointerout":Of.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":Nf.delete(l.pointerId)}}function Lf(s,l,d,m,x,E){return s===null||s.nativeEvent!==E?(s={blockedOn:l,domEventName:d,eventSystemFlags:m,nativeEvent:E,targetContainers:[x]},l!==null&&(l=Kl(l),l!==null&&m_(l)),s):(s.eventSystemFlags|=m,l=s.targetContainers,x!==null&&l.indexOf(x)===-1&&l.push(x),s)}function DI(s,l,d,m,x){switch(l){case"focusin":return Ts=Lf(Ts,s,l,d,m,x),!0;case"dragenter":return $s=Lf($s,s,l,d,m,x),!0;case"mouseover":return Ms=Lf(Ms,s,l,d,m,x),!0;case"pointerover":var E=x.pointerId;return Of.set(E,Lf(Of.get(E)||null,s,l,d,m,x)),!0;case"gotpointercapture":return E=x.pointerId,Nf.set(E,Lf(Nf.get(E)||null,s,l,d,m,x)),!0}return!1}function v_(s){var l=Xl(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,fs(s.priority,function(){g_(d)});return}}else if(l===31){if(l=u(d),l!==null){s.blockedOn=l,fs(s.priority,function(){g_(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 xp(s){if(s.blockedOn!==null)return!1;for(var l=s.targetContainers;0<l.length;){var d=Wb(s.nativeEvent);if(d===null){d=s.nativeEvent;var m=new d.constructor(d.type,d);Xy=m,d.target.dispatchEvent(m),Xy=null}else return l=Kl(d),l!==null&&m_(l),s.blockedOn=d,!1;l.shift()}return!0}function x_(s,l,d){xp(s)&&d.delete(l)}function TI(){Kb=!1,Ts!==null&&xp(Ts)&&(Ts=null),$s!==null&&xp($s)&&($s=null),Ms!==null&&xp(Ms)&&(Ms=null),Of.forEach(x_),Nf.forEach(x_)}function wp(s,l){s.blockedOn===l&&(s.blockedOn=null,Kb||(Kb=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,TI)))}var Sp=null;function w_(s){Sp!==s&&(Sp=s,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Sp===s&&(Sp=null);for(var l=0;l<s.length;l+=3){var d=s[l],m=s[l+1],x=s[l+2];if(typeof m!="function"){if(Xb(m||d)===null)continue;break}var E=Kl(d);E!==null&&(s.splice(l,3),l-=3,W0(E,{pending:!0,data:x,method:d.method,action:m},m,x))}}))}function $u(s){function l(J){return wp(J,s)}Ts!==null&&wp(Ts,s),$s!==null&&wp($s,s),Ms!==null&&wp(Ms,s),Of.forEach(l),Nf.forEach(l);for(var d=0;d<Os.length;d++){var m=Os[d];m.blockedOn===s&&(m.blockedOn=null)}for(;0<Os.length&&(d=Os[0],d.blockedOn===null);)v_(d),d.blockedOn===null&&Os.shift();if(d=(s.ownerDocument||s).$$reactFormReplay,d!=null)for(m=0;m<d.length;m+=3){var x=d[m],E=d[m+1],O=x[mr]||null;if(typeof E=="function")O||w_(d);else if(O){var H=null;if(E&&E.hasAttribute("formAction")){if(x=E,O=E[mr]||null)H=O.formAction;else if(Xb(x)!==null)continue}else H=O.action;typeof H=="function"?d[m+1]=H:(d.splice(m,3),m-=3),w_(d)}}}function S_(){function s(E){E.canIntercept&&E.info==="react-transition"&&E.intercept({handler:function(){return new Promise(function(O){return x=O})},focusReset:"manual",scroll:"manual"})}function l(){x!==null&&(x(),x=null),m||setTimeout(d,20)}function d(){if(!m&&!navigation.transition){var E=navigation.currentEntry;E&&E.url!=null&&navigation.navigate(E.url,{state:E.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,x=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),x!==null&&(x(),x=null)}}}function Qb(s){this._internalRoot=s}Cp.prototype.render=Qb.prototype.render=function(s){var l=this._internalRoot;if(l===null)throw Error(r(409));var d=l.current,m=Fr();h_(d,m,s,l,null,null)},Cp.prototype.unmount=Qb.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var l=s.containerInfo;h_(s.current,2,null,s,null,null),rp(),l[Wl]=null}};function Cp(s){this._internalRoot=s}Cp.prototype.unstable_scheduleHydration=function(s){if(s){var l=Yl();s={blockedOn:null,target:s,priority:l};for(var d=0;d<Os.length&&l!==0&&l<Os[d].priority;d++);Os.splice(d,0,s),d===0&&v_(s)}};var C_=t.version;if(C_!=="19.2.5")throw Error(r(527,C_,"19.2.5"));P.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 $I={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ep=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ep.isDisabled&&Ep.supportsFiber)try{At=Ep.inject($I),Xe=Ep}catch{}}return zf.createRoot=function(s,l){if(!i(s))throw Error(r(299));var d=!1,m="",x=Tk,E=$k,O=Mk;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(m=l.identifierPrefix),l.onUncaughtError!==void 0&&(x=l.onUncaughtError),l.onCaughtError!==void 0&&(E=l.onCaughtError),l.onRecoverableError!==void 0&&(O=l.onRecoverableError)),l=f_(s,1,!1,null,null,d,m,null,x,E,O,S_),s[Wl]=l.current,Mb(s),new Qb(l)},zf.hydrateRoot=function(s,l,d){if(!i(s))throw Error(r(299));var m=!1,x="",E=Tk,O=$k,H=Mk,J=null;return d!=null&&(d.unstable_strictMode===!0&&(m=!0),d.identifierPrefix!==void 0&&(x=d.identifierPrefix),d.onUncaughtError!==void 0&&(E=d.onUncaughtError),d.onCaughtError!==void 0&&(O=d.onCaughtError),d.onRecoverableError!==void 0&&(H=d.onRecoverableError),d.formState!==void 0&&(J=d.formState)),l=f_(s,1,!0,l,d??null,m,x,J,E,O,H,S_),l.context=d_(null),d=l.current,m=Fr(),m=cn(m),x=bs(m),x.callback=null,vs(d,x,m),d=m,l.current.lanes=d,Pn(l,d),Vi(l),s[Wl]=l.current,Mb(s),new Cp(l)},zf.version="19.2.5",zf}var L_;function GI(){if(L_)return tv.exports;L_=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=qI(),tv.exports}var VI=GI(),$c=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(){}},fl,Ys,ac,R$,YI=(R$=class extends $c{constructor(){super();Ue(this,fl);Ue(this,Ys);Ue(this,ac);Le(this,ac,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){X(this,Ys)||this.setEventListener(X(this,ac))}onUnsubscribe(){var t;this.hasListeners()||((t=X(this,Ys))==null||t.call(this),Le(this,Ys,void 0))}setEventListener(t){var n;Le(this,ac,t),(n=X(this,Ys))==null||n.call(this),Le(this,Ys,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){X(this,fl)!==t&&(Le(this,fl,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof X(this,fl)=="boolean"?X(this,fl):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},fl=new WeakMap,Ys=new WeakMap,ac=new WeakMap,R$),Dw=new YI,WI={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Ws,Aw,D$,XI=(D$=class{constructor(){Ue(this,Ws,WI);Ue(this,Aw,!1)}setTimeoutProvider(e){Le(this,Ws,e)}setTimeout(e,t){return X(this,Ws).setTimeout(e,t)}clearTimeout(e){X(this,Ws).clearTimeout(e)}setInterval(e,t){return X(this,Ws).setInterval(e,t)}clearInterval(e){X(this,Ws).clearInterval(e)}},Ws=new WeakMap,Aw=new WeakMap,D$),ol=new XI;function KI(e){setTimeout(e,0)}var QI=typeof window>"u"||"Deno"in globalThis;function sr(){}function ZI(e,t){return typeof e=="function"?e(t):e}function F1(e){return typeof e=="number"&&e>=0&&e!==1/0}function F$(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ca(e,t){return typeof e=="function"?e(t):e}function yi(e,t){return typeof e=="function"?e(t):e}function j_(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:a,stale:u}=e;if(a){if(r){if(t.queryHash!==Tw(a,t.options))return!1}else if(!Ed(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 z_(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Dl(t.options.mutationKey)!==Dl(o))return!1}else if(!Ed(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Tw(e,t){return((t==null?void 0:t.queryKeyHashFn)||Dl)(e)}function Dl(e){return JSON.stringify(e,(t,n)=>B1(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Ed(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Ed(e[n],t[n])):!1}var JI=Object.prototype.hasOwnProperty;function B$(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=P_(e)&&P_(t);if(!r&&!(B1(e)&&B1(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:JI.call(e,p))&&f++;continue}if(g===null||y===null||typeof g!="object"||typeof y!="object"){c[p]=y;continue}const b=B$(g,y,n+1);c[p]=b,b===g&&f++}return o===u&&f===o?e:c}function Pm(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 P_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function B1(e){if(!I_(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!I_(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function I_(e){return Object.prototype.toString.call(e)==="[object Object]"}function eF(e){return new Promise(t=>{ol.setTimeout(t,e)})}function U1(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?B$(e,t):t}function Mc(e){return e}function tF(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function nF(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var $w=Symbol();function U$(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===$w?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Mw(e,t){return typeof e=="function"?e(...t):!!e}function rF(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 kd=(()=>{let e=()=>QI;return{isServer(){return e()},setIsServer(t){e=t}}})();function H1(){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 iF=KI;function oF(){let e=[],t=0,n=u=>{u()},r=u=>{u()},i=iF;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 Dn=oF(),lc,Xs,uc,T$,sF=(T$=class extends $c{constructor(){super();Ue(this,lc,!0);Ue(this,Xs);Ue(this,uc);Le(this,uc,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(){X(this,Xs)||this.setEventListener(X(this,uc))}onUnsubscribe(){var t;this.hasListeners()||((t=X(this,Xs))==null||t.call(this),Le(this,Xs,void 0))}setEventListener(t){var n;Le(this,uc,t),(n=X(this,Xs))==null||n.call(this),Le(this,Xs,t(this.setOnline.bind(this)))}setOnline(t){X(this,lc)!==t&&(Le(this,lc,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return X(this,lc)}},lc=new WeakMap,Xs=new WeakMap,uc=new WeakMap,T$),Im=new sF;function aF(e){return Math.min(1e3*2**e,3e4)}function H$(e){return(e??"online")==="online"?Im.isOnline():!0}var q1=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function q$(e){let t=!1,n=0,r;const i=H1(),o=()=>i.status!=="pending",a=v=>{var S;if(!o()){const w=new q1(v);g(w),(S=e.onCancel)==null||S.call(e,w)}},u=()=>{t=!0},c=()=>{t=!1},f=()=>Dw.isFocused()&&(e.networkMode==="always"||Im.isOnline())&&e.canRun(),h=()=>H$(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=w=>{(o()||f())&&v(w)},(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(w){v=Promise.reject(w)}Promise.resolve(v).then(p).catch(w=>{var T;if(o())return;const A=e.retry??(kd.isServer()?0:3),k=e.retryDelay??aF,R=typeof k=="function"?k(n,w):k,D=A===!0||typeof A=="number"&&n<A||typeof A=="function"&&A(n,w);if(t||!D){g(w);return}n++,(T=e.onFail)==null||T.call(e,n,w),eF(R).then(()=>f()?void 0:y()).then(()=>{t?g(w):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 dl,$$,G$=($$=class{constructor(){Ue(this,dl)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),F1(this.gcTime)&&Le(this,dl,ol.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(kd.isServer()?1/0:300*1e3))}clearGcTimeout(){X(this,dl)!==void 0&&(ol.clearTimeout(X(this,dl)),Le(this,dl,void 0))}},dl=new WeakMap,$$),hl,cc,mi,pl,Ln,qd,ml,Hr,V$,zo,M$,lF=(M$=class extends G${constructor(t){super();Ue(this,Hr);Ue(this,hl);Ue(this,cc);Ue(this,mi);Ue(this,pl);Ue(this,Ln);Ue(this,qd);Ue(this,ml);Le(this,ml,!1),Le(this,qd,t.defaultOptions),this.setOptions(t.options),this.observers=[],Le(this,pl,t.client),Le(this,mi,X(this,pl).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Le(this,hl,B_(this.options)),this.state=t.state??X(this,hl),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=X(this,Ln))==null?void 0:t.promise}setOptions(t){if(this.options={...X(this,qd),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=B_(this.options);n.data!==void 0&&(this.setState(F_(n.data,n.dataUpdatedAt)),Le(this,hl,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&X(this,mi).remove(this)}setData(t,n){const r=U1(this.state.data,t,this.options);return lt(this,Hr,zo).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){lt(this,Hr,zo).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=X(this,Ln))==null?void 0:r.promise;return(i=X(this,Ln))==null||i.cancel(t),n?n.then(sr).catch(sr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return X(this,hl)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>yi(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===$w||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ca(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:!F$(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=X(this,Ln))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=X(this,Ln))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),X(this,mi).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(X(this,Ln)&&(X(this,ml)||lt(this,Hr,V$).call(this)?X(this,Ln).cancel({revert:!0}):X(this,Ln).cancelRetry()),this.scheduleGc()),X(this,mi).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||lt(this,Hr,zo).call(this,{type:"invalidate"})}async fetch(t,n){var c,f,h,p,g,y,b,v,S,w,A,k;if(this.state.fetchStatus!=="idle"&&((c=X(this,Ln))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(X(this,Ln))return X(this,Ln).continueRetry(),X(this,Ln).promise}if(t&&this.setOptions(t),!this.options.queryFn){const R=this.observers.find(D=>D.options.queryFn);R&&this.setOptions(R.options)}const r=new AbortController,i=R=>{Object.defineProperty(R,"signal",{enumerable:!0,get:()=>(Le(this,ml,!0),r.signal)})},o=()=>{const R=U$(this.options,n),T=(()=>{const $={client:X(this,pl),queryKey:this.queryKey,meta:this.meta};return i($),$})();return Le(this,ml,!1),this.options.persister?this.options.persister(R,T,this):R(T)},u=(()=>{const R={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:X(this,pl),state:this.state,fetchFn:o};return i(R),R})();(f=this.options.behavior)==null||f.onFetch(u,this),Le(this,cc,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=u.fetchOptions)==null?void 0:h.meta))&<(this,Hr,zo).call(this,{type:"fetch",meta:(p=u.fetchOptions)==null?void 0:p.meta}),Le(this,Ln,q$({initialPromise:n==null?void 0:n.initialPromise,fn:u.fetchFn,onCancel:R=>{R instanceof q1&&R.revert&&this.setState({...X(this,cc),fetchStatus:"idle"}),r.abort()},onFail:(R,D)=>{lt(this,Hr,zo).call(this,{type:"failed",failureCount:R,error:D})},onPause:()=>{lt(this,Hr,zo).call(this,{type:"pause"})},onContinue:()=>{lt(this,Hr,zo).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0}));try{const R=await X(this,Ln).start();if(R===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(R),(y=(g=X(this,mi).config).onSuccess)==null||y.call(g,R,this),(v=(b=X(this,mi).config).onSettled)==null||v.call(b,R,this.state.error,this),R}catch(R){if(R instanceof q1){if(R.silent)return X(this,Ln).promise;if(R.revert){if(this.state.data===void 0)throw R;return this.state.data}}throw lt(this,Hr,zo).call(this,{type:"error",error:R}),(w=(S=X(this,mi).config).onError)==null||w.call(S,R,this),(k=(A=X(this,mi).config).onSettled)==null||k.call(A,this.state.data,R,this),R}finally{this.scheduleGc()}}},hl=new WeakMap,cc=new WeakMap,mi=new WeakMap,pl=new WeakMap,Ln=new WeakMap,qd=new WeakMap,ml=new WeakMap,Hr=new WeakSet,V$=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},zo=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,...Y$(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,...F_(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Le(this,cc,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),Dn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),X(this,mi).notify({query:this,type:"updated",action:t})})},M$);function Y$(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:H$(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function F_(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function B_(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 Er,_t,Gd,or,gl,fc,Bo,Ks,Vd,dc,hc,yl,bl,Qs,pc,jt,Zf,G1,V1,Y1,W1,X1,K1,Q1,W$,O$,uF=(O$=class extends $c{constructor(t,n){super();Ue(this,jt);Ue(this,Er);Ue(this,_t);Ue(this,Gd);Ue(this,or);Ue(this,gl);Ue(this,fc);Ue(this,Bo);Ue(this,Ks);Ue(this,Vd);Ue(this,dc);Ue(this,hc);Ue(this,yl);Ue(this,bl);Ue(this,Qs);Ue(this,pc,new Set);this.options=n,Le(this,Er,t),Le(this,Ks,null),Le(this,Bo,H1()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(X(this,_t).addObserver(this),U_(X(this,_t),this.options)?lt(this,jt,Zf).call(this):this.updateResult(),lt(this,jt,W1).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Z1(X(this,_t),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Z1(X(this,_t),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,lt(this,jt,X1).call(this),lt(this,jt,K1).call(this),X(this,_t).removeObserver(this)}setOptions(t){const n=this.options,r=X(this,_t);if(this.options=X(this,Er).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof yi(this.options.enabled,X(this,_t))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");lt(this,jt,Q1).call(this),X(this,_t).setOptions(this.options),n._defaulted&&!Pm(this.options,n)&&X(this,Er).getQueryCache().notify({type:"observerOptionsUpdated",query:X(this,_t),observer:this});const i=this.hasListeners();i&&H_(X(this,_t),r,this.options,n)&<(this,jt,Zf).call(this),this.updateResult(),i&&(X(this,_t)!==r||yi(this.options.enabled,X(this,_t))!==yi(n.enabled,X(this,_t))||ca(this.options.staleTime,X(this,_t))!==ca(n.staleTime,X(this,_t)))&<(this,jt,G1).call(this);const o=lt(this,jt,V1).call(this);i&&(X(this,_t)!==r||yi(this.options.enabled,X(this,_t))!==yi(n.enabled,X(this,_t))||o!==X(this,Qs))&<(this,jt,Y1).call(this,o)}getOptimisticResult(t){const n=X(this,Er).getQueryCache().build(X(this,Er),t),r=this.createResult(n,t);return fF(this,r)&&(Le(this,or,r),Le(this,fc,this.options),Le(this,gl,X(this,_t).state)),r}getCurrentResult(){return X(this,or)}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&&X(this,Bo).status==="pending"&&X(this,Bo).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(t){X(this,pc).add(t)}getCurrentQuery(){return X(this,_t)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=X(this,Er).defaultQueryOptions(t),r=X(this,Er).getQueryCache().build(X(this,Er),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return lt(this,jt,Zf).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),X(this,or)))}createResult(t,n){var F;const r=X(this,_t),i=this.options,o=X(this,or),a=X(this,gl),u=X(this,fc),f=t!==r?t.state:X(this,Gd),{state:h}=t;let p={...h},g=!1,y;if(n._optimisticResults){const j=this.hasListeners(),z=!j&&U_(t,n),M=j&&H_(t,r,n,i);(z||M)&&(p={...p,...Y$(h.data,t.options)}),n._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:b,errorUpdatedAt:v,status:S}=p;y=p.data;let w=!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,w=!0):j=typeof n.placeholderData=="function"?n.placeholderData((F=X(this,hc))==null?void 0:F.state.data,X(this,hc)):n.placeholderData,j!==void 0&&(S="success",y=U1(o==null?void 0:o.data,j,n),g=!0)}if(n.select&&y!==void 0&&!w)if(o&&y===(a==null?void 0:a.data)&&n.select===X(this,Vd))y=X(this,dc);else try{Le(this,Vd,n.select),y=n.select(y),y=U1(o==null?void 0:o.data,y,n),Le(this,dc,y),Le(this,Ks,null)}catch(j){Le(this,Ks,j)}X(this,Ks)&&(b=X(this,Ks),y=X(this,dc),v=Date.now(),S="error");const A=p.fetchStatus==="fetching",k=S==="pending",R=S==="error",D=k&&A,T=y!==void 0,N={status:S,fetchStatus:p.fetchStatus,isPending:k,isSuccess:S==="success",isError:R,isInitialLoading:D,isLoading:D,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:A,isRefetching:A&&!k,isLoadingError:R&&!T,isPaused:p.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:R&&T,isStale:Ow(t,n),refetch:this.refetch,promise:X(this,Bo),isEnabled:yi(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const j=N.data!==void 0,z=N.status==="error"&&!j,M=U=>{z?U.reject(N.error):j&&U.resolve(N.data)},q=()=>{const U=Le(this,Bo,N.promise=H1());M(U)},V=X(this,Bo);switch(V.status){case"pending":t.queryHash===r.queryHash&&M(V);break;case"fulfilled":(z||N.data!==V.value)&&q();break;case"rejected":(!z||N.error!==V.reason)&&q();break}}return N}updateResult(){const t=X(this,or),n=this.createResult(X(this,_t),this.options);if(Le(this,gl,X(this,_t).state),Le(this,fc,this.options),X(this,gl).data!==void 0&&Le(this,hc,X(this,_t)),Pm(n,t))return;Le(this,or,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,o=typeof i=="function"?i():i;if(o==="all"||!o&&!X(this,pc).size)return!0;const a=new Set(o??X(this,pc));return this.options.throwOnError&&a.add("error"),Object.keys(X(this,or)).some(u=>{const c=u;return X(this,or)[c]!==t[c]&&a.has(c)})};lt(this,jt,W$).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&<(this,jt,W1).call(this)}},Er=new WeakMap,_t=new WeakMap,Gd=new WeakMap,or=new WeakMap,gl=new WeakMap,fc=new WeakMap,Bo=new WeakMap,Ks=new WeakMap,Vd=new WeakMap,dc=new WeakMap,hc=new WeakMap,yl=new WeakMap,bl=new WeakMap,Qs=new WeakMap,pc=new WeakMap,jt=new WeakSet,Zf=function(t){lt(this,jt,Q1).call(this);let n=X(this,_t).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(sr)),n},G1=function(){lt(this,jt,X1).call(this);const t=ca(this.options.staleTime,X(this,_t));if(kd.isServer()||X(this,or).isStale||!F1(t))return;const r=F$(X(this,or).dataUpdatedAt,t)+1;Le(this,yl,ol.setTimeout(()=>{X(this,or).isStale||this.updateResult()},r))},V1=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(X(this,_t)):this.options.refetchInterval)??!1},Y1=function(t){lt(this,jt,K1).call(this),Le(this,Qs,t),!(kd.isServer()||yi(this.options.enabled,X(this,_t))===!1||!F1(X(this,Qs))||X(this,Qs)===0)&&Le(this,bl,ol.setInterval(()=>{(this.options.refetchIntervalInBackground||Dw.isFocused())&<(this,jt,Zf).call(this)},X(this,Qs)))},W1=function(){lt(this,jt,G1).call(this),lt(this,jt,Y1).call(this,lt(this,jt,V1).call(this))},X1=function(){X(this,yl)!==void 0&&(ol.clearTimeout(X(this,yl)),Le(this,yl,void 0))},K1=function(){X(this,bl)!==void 0&&(ol.clearInterval(X(this,bl)),Le(this,bl,void 0))},Q1=function(){const t=X(this,Er).getQueryCache().build(X(this,Er),this.options);if(t===X(this,_t))return;const n=X(this,_t);Le(this,_t,t),Le(this,Gd,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},W$=function(t){Dn.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(X(this,or))}),X(this,Er).getQueryCache().notify({query:X(this,_t),type:"observerResultsUpdated"})})},O$);function cF(e,t){return yi(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function U_(e,t){return cF(e,t)||e.state.data!==void 0&&Z1(e,t,t.refetchOnMount)}function Z1(e,t,n){if(yi(t.enabled,e)!==!1&&ca(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Ow(e,t)}return!1}function H_(e,t,n,r){return(e!==t||yi(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Ow(e,n)}function Ow(e,t){return yi(t.enabled,e)!==!1&&e.isStaleByTime(ca(t.staleTime,e))}function fF(e,t){return!Pm(e.getCurrentResult(),t)}function q_(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=k=>{rF(k,()=>t.signal,()=>v=!0)},w=U$(t.options,t.fetchOptions),A=async(k,R,D)=>{if(v)return Promise.reject();if(R==null&&k.pages.length)return Promise.resolve(k);const $=(()=>{const z={client:t.client,queryKey:t.queryKey,pageParam:R,direction:D?"backward":"forward",meta:t.options.meta};return S(z),z})(),N=await w($),{maxPages:F}=t.options,j=D?nF:tF;return{pages:j(k.pages,N,F),pageParams:j(k.pageParams,R,F)}};if(i&&o.length){const k=i==="backward",R=k?dF:G_,D={pages:o,pageParams:a},T=R(r,D);u=await A(D,T,k)}else{const k=e??o.length;do{const R=c===0?a[0]??r.initialPageParam:G_(r,u);if(c>0&&R==null)break;u=await A(u,R),c++}while(c<k)}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 G_(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 dF(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 Yd,Ji,Yn,vl,eo,Is,N$,hF=(N$=class extends G${constructor(t){super();Ue(this,eo);Ue(this,Yd);Ue(this,Ji);Ue(this,Yn);Ue(this,vl);Le(this,Yd,t.client),this.mutationId=t.mutationId,Le(this,Yn,t.mutationCache),Le(this,Ji,[]),this.state=t.state||X$(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){X(this,Ji).includes(t)||(X(this,Ji).push(t),this.clearGcTimeout(),X(this,Yn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Le(this,Ji,X(this,Ji).filter(n=>n!==t)),this.scheduleGc(),X(this,Yn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){X(this,Ji).length||(this.state.status==="pending"?this.scheduleGc():X(this,Yn).remove(this))}continue(){var t;return((t=X(this,vl))==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,w,A,k,R,D,T,$;const n=()=>{lt(this,eo,Is).call(this,{type:"continue"})},r={client:X(this,Yd),meta:this.options.meta,mutationKey:this.options.mutationKey};Le(this,vl,q$({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(N,F)=>{lt(this,eo,Is).call(this,{type:"failed",failureCount:N,error:F})},onPause:()=>{lt(this,eo,Is).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>X(this,Yn).canRun(this)}));const i=this.state.status==="pending",o=!X(this,vl).canStart();try{if(i)n();else{lt(this,eo,Is).call(this,{type:"pending",variables:t,isPaused:o}),X(this,Yn).config.onMutate&&await X(this,Yn).config.onMutate(t,this,r);const F=await((u=(a=this.options).onMutate)==null?void 0:u.call(a,t,r));F!==this.state.context&<(this,eo,Is).call(this,{type:"pending",context:F,variables:t,isPaused:o})}const N=await X(this,vl).start();return await((f=(c=X(this,Yn).config).onSuccess)==null?void 0:f.call(c,N,t,this.state.context,this,r)),await((p=(h=this.options).onSuccess)==null?void 0:p.call(h,N,t,this.state.context,r)),await((y=(g=X(this,Yn).config).onSettled)==null?void 0:y.call(g,N,null,this.state.variables,this.state.context,this,r)),await((v=(b=this.options).onSettled)==null?void 0:v.call(b,N,null,t,this.state.context,r)),lt(this,eo,Is).call(this,{type:"success",data:N}),N}catch(N){try{await((w=(S=X(this,Yn).config).onError)==null?void 0:w.call(S,N,t,this.state.context,this,r))}catch(F){Promise.reject(F)}try{await((k=(A=this.options).onError)==null?void 0:k.call(A,N,t,this.state.context,r))}catch(F){Promise.reject(F)}try{await((D=(R=X(this,Yn).config).onSettled)==null?void 0:D.call(R,void 0,N,this.state.variables,this.state.context,this,r))}catch(F){Promise.reject(F)}try{await(($=(T=this.options).onSettled)==null?void 0:$.call(T,void 0,N,t,this.state.context,r))}catch(F){Promise.reject(F)}throw lt(this,eo,Is).call(this,{type:"error",error:N}),N}finally{X(this,Yn).runNext(this)}}},Yd=new WeakMap,Ji=new WeakMap,Yn=new WeakMap,vl=new WeakMap,eo=new WeakSet,Is=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),Dn.batch(()=>{X(this,Ji).forEach(r=>{r.onMutationUpdate(t)}),X(this,Yn).notify({mutation:this,type:"updated",action:t})})},N$);function X$(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Uo,Oi,Wd,L$,pF=(L$=class extends $c{constructor(t={}){super();Ue(this,Uo);Ue(this,Oi);Ue(this,Wd);this.config=t,Le(this,Uo,new Set),Le(this,Oi,new Map),Le(this,Wd,0)}build(t,n,r){const i=new hF({client:t,mutationCache:this,mutationId:++kp(this,Wd)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){X(this,Uo).add(t);const n=_p(t);if(typeof n=="string"){const r=X(this,Oi).get(n);r?r.push(t):X(this,Oi).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(X(this,Uo).delete(t)){const n=_p(t);if(typeof n=="string"){const r=X(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&&X(this,Oi).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=_p(t);if(typeof n=="string"){const r=X(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=_p(t);if(typeof n=="string"){const i=(r=X(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(){Dn.batch(()=>{X(this,Uo).forEach(t=>{this.notify({type:"removed",mutation:t})}),X(this,Uo).clear(),X(this,Oi).clear()})}getAll(){return Array.from(X(this,Uo))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>z_(n,r))}findAll(t={}){return this.getAll().filter(n=>z_(t,n))}notify(t){Dn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Dn.batch(()=>Promise.all(t.map(n=>n.continue().catch(sr))))}},Uo=new WeakMap,Oi=new WeakMap,Wd=new WeakMap,L$);function _p(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Ho,Zs,kr,qo,ns,ym,J1,j$,mF=(j$=class extends $c{constructor(n,r){super();Ue(this,ns);Ue(this,Ho);Ue(this,Zs);Ue(this,kr);Ue(this,qo);Le(this,Ho,n),this.setOptions(r),this.bindMethods(),lt(this,ns,ym).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=X(this,Ho).defaultMutationOptions(n),Pm(this.options,r)||X(this,Ho).getMutationCache().notify({type:"observerOptionsUpdated",mutation:X(this,kr),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Dl(r.mutationKey)!==Dl(this.options.mutationKey)?this.reset():((i=X(this,kr))==null?void 0:i.state.status)==="pending"&&X(this,kr).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=X(this,kr))==null||n.removeObserver(this)}onMutationUpdate(n){lt(this,ns,ym).call(this),lt(this,ns,J1).call(this,n)}getCurrentResult(){return X(this,Zs)}reset(){var n;(n=X(this,kr))==null||n.removeObserver(this),Le(this,kr,void 0),lt(this,ns,ym).call(this),lt(this,ns,J1).call(this)}mutate(n,r){var i;return Le(this,qo,r),(i=X(this,kr))==null||i.removeObserver(this),Le(this,kr,X(this,Ho).getMutationCache().build(X(this,Ho),this.options)),X(this,kr).addObserver(this),X(this,kr).execute(n)}},Ho=new WeakMap,Zs=new WeakMap,kr=new WeakMap,qo=new WeakMap,ns=new WeakSet,ym=function(){var r;const n=((r=X(this,kr))==null?void 0:r.state)??X$();Le(this,Zs,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},J1=function(n){Dn.batch(()=>{var r,i,o,a,u,c,f,h;if(X(this,qo)&&this.hasListeners()){const p=X(this,Zs).variables,g=X(this,Zs).context,y={client:X(this,Ho),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(i=(r=X(this,qo)).onSuccess)==null||i.call(r,n.data,p,g,y)}catch(b){Promise.reject(b)}try{(a=(o=X(this,qo)).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=X(this,qo)).onError)==null||c.call(u,n.error,p,g,y)}catch(b){Promise.reject(b)}try{(h=(f=X(this,qo)).onSettled)==null||h.call(f,void 0,n.error,p,g,y)}catch(b){Promise.reject(b)}}}this.listeners.forEach(p=>{p(X(this,Zs))})})},j$),to,z$,gF=(z$=class extends $c{constructor(t={}){super();Ue(this,to);this.config=t,Le(this,to,new Map)}build(t,n,r){const i=n.queryKey,o=n.queryHash??Tw(i,n);let a=this.get(o);return a||(a=new lF({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(a)),a}add(t){X(this,to).has(t.queryHash)||(X(this,to).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=X(this,to).get(t.queryHash);n&&(t.destroy(),n===t&&X(this,to).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Dn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return X(this,to).get(t)}getAll(){return[...X(this,to).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>j_(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>j_(t,r)):n}notify(t){Dn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Dn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Dn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},to=new WeakMap,z$),hn,Js,ea,mc,gc,ta,yc,bc,P$,yF=(P$=class{constructor(e={}){Ue(this,hn);Ue(this,Js);Ue(this,ea);Ue(this,mc);Ue(this,gc);Ue(this,ta);Ue(this,yc);Ue(this,bc);Le(this,hn,e.queryCache||new gF),Le(this,Js,e.mutationCache||new pF),Le(this,ea,e.defaultOptions||{}),Le(this,mc,new Map),Le(this,gc,new Map),Le(this,ta,0)}mount(){kp(this,ta)._++,X(this,ta)===1&&(Le(this,yc,Dw.subscribe(async e=>{e&&(await this.resumePausedMutations(),X(this,hn).onFocus())})),Le(this,bc,Im.subscribe(async e=>{e&&(await this.resumePausedMutations(),X(this,hn).onOnline())})))}unmount(){var e,t;kp(this,ta)._--,X(this,ta)===0&&((e=X(this,yc))==null||e.call(this),Le(this,yc,void 0),(t=X(this,bc))==null||t.call(this),Le(this,bc,void 0))}isFetching(e){return X(this,hn).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return X(this,Js).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=X(this,hn).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=X(this,hn).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ca(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return X(this,hn).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=X(this,hn).get(r.queryHash),o=i==null?void 0:i.state.data,a=ZI(t,o);if(a!==void 0)return X(this,hn).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Dn.batch(()=>X(this,hn).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=X(this,hn).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=X(this,hn);Dn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=X(this,hn);return Dn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Dn.batch(()=>X(this,hn).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(sr).catch(sr)}invalidateQueries(e,t={}){return Dn.batch(()=>(X(this,hn).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=Dn.batch(()=>X(this,hn).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(sr)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(sr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=X(this,hn).build(this,t);return n.isStaleByTime(ca(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(sr).catch(sr)}fetchInfiniteQuery(e){return e.behavior=q_(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(sr).catch(sr)}ensureInfiniteQueryData(e){return e.behavior=q_(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Im.isOnline()?X(this,Js).resumePausedMutations():Promise.resolve()}getQueryCache(){return X(this,hn)}getMutationCache(){return X(this,Js)}getDefaultOptions(){return X(this,ea)}setDefaultOptions(e){Le(this,ea,e)}setQueryDefaults(e,t){X(this,mc).set(Dl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...X(this,mc).values()],n={};return t.forEach(r=>{Ed(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){X(this,gc).set(Dl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...X(this,gc).values()],n={};return t.forEach(r=>{Ed(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...X(this,ea).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Tw(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===$w&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...X(this,ea).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){X(this,hn).clear(),X(this,Js).clear()}},hn=new WeakMap,Js=new WeakMap,ea=new WeakMap,mc=new WeakMap,gc=new WeakMap,ta=new WeakMap,yc=new WeakMap,bc=new WeakMap,P$),K$=C.createContext(void 0),Nw=e=>{const t=C.useContext(K$);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},bF=({client:e,children:t})=>(C.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),_.jsx(K$.Provider,{value:e,children:t})),Q$=C.createContext(!1),vF=()=>C.useContext(Q$);Q$.Provider;function xF(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var wF=C.createContext(xF()),SF=()=>C.useContext(wF),CF=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?Mw(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},EF=e=>{C.useEffect(()=>{e.clearReset()},[e])},kF=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Mw(n,[e.error,r])),_F=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))}},AF=(e,t)=>e.isLoading&&e.isFetching&&!t,RF=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,V_=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function DF(e,t,n){var g,y,b,v;const r=vF(),i=SF(),o=Nw(),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",_F(a),CF(a,i,u),EF(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 w=p?f.subscribe(Dn.batchCalls(S)):sr;return f.updateResult(),w},[f,p]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),C.useEffect(()=>{f.setOptions(a)},[a,f]),RF(a,h))throw V_(a,f,i);if(kF({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&&!kd.isServer()&&AF(h,r)){const S=c?V_(a,f,i):u==null?void 0:u.promise;S==null||S.catch(sr).finally(()=>{f.updateResult()})}return a.notifyOnChangeProps?h:f.trackResult(h)}function ki(e,t){return DF(e,uF)}function Y_(e,t){const n=Nw(),[r]=C.useState(()=>new mF(n,e));C.useEffect(()=>{r.setOptions(e)},[r,e]);const i=C.useSyncExternalStore(C.useCallback(a=>r.subscribe(Dn.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=C.useCallback((a,u)=>{r.mutate(a,u).catch(sr)},[r]);if(i.error&&Mw(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}var Jf=typeof window<"u"?C.useLayoutEffect:C.useEffect;function ov(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 TF(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 $F(e){const t=C.useRef(null);return C.useImperativeHandle(e,()=>t.current,[]),t}var Z$=!1;function _d(e){return e[e.length-1]}function MF(e){return typeof e=="function"}function oa(e,t){return MF(e)?e(t):e}var OF=Object.prototype.hasOwnProperty,W_=Object.prototype.propertyIsEnumerable,NF=()=>Object.create(null),Qa=(e,t)=>sa(e,t,NF);function sa(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;const i=t,o=Q_(e)&&Q_(i);if(!o&&!(vc(e)&&vc(i)))return i;const a=o?e:X_(e);if(!a)return i;const u=o?i:X_(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:OF.call(e,y))&&p++;continue}if(b===null||v===null||typeof b!="object"||typeof v!="object"){h[y]=v;continue}const S=sa(b,v,n,r+1);h[y]=S,S===b&&p++}return c===f&&p===c?e:h}function X_(e){const t=Object.getOwnPropertyNames(e);for(const i of t)if(!W_.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(!W_.call(e,i))return!1;r.push(i)}return r}function vc(e){if(!K_(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!K_(n)||!n.hasOwnProperty("isPrototypeOf"))}function K_(e){return Object.prototype.toString.call(e)==="[object Object]"}function Q_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Sl(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(!Sl(e[r],t[r],n))return!1;return!0}if(vc(e)&&vc(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)&&!Sl(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||!Sl(e[a],t[a],n)))return!1;return i===o}return!1}function xc(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 Ad(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function LF(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function Z_(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 LF(t)}var jF=["http:","https:","mailto:","tel:"];function Fm(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function Pf(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+=Z_(e.slice(n,i.index))+i[0],n=t.lastIndex;r=r+Z_(n?e.slice(n):e);let o=!1;return r.startsWith("//")&&(o=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:o}}function zF(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function PF(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 Ko(){throw new Error("Invariant failed")}function Rd(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 sl=4,J$=5;function IF(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 Lw(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=IF(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 Bg(e,t,n,r,i,o,a){var c,f,h,p,g,y,b,v,S,w,A,k,R;a==null||a(n);let u=r;{const D=n.fullPath??n.from,T=D.length,$=((c=n.options)==null?void 0:c.caseSensitive)??e,N=!!((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<T;){const j=Lw(D,u,t);let z;const M=u,q=j[5];switch(u=q+1,o++,j[0]){case 0:{const V=D.substring(j[2],j[3]);if($){const U=(y=i.static)==null?void 0:y.get(V);if(U)z=U;else{i.static??(i.static=new Map);const I=al(n.fullPath??n.from);I.parent=i,I.depth=o,z=I,i.static.set(V,I)}}else{const U=V.toLowerCase(),I=(b=i.staticInsensitive)==null?void 0:b.get(U);if(I)z=I;else{i.staticInsensitive??(i.staticInsensitive=new Map);const P=al(n.fullPath??n.from);P.parent=i,P.depth=o,z=P,i.staticInsensitive.set(U,P)}}break}case 1:{const V=D.substring(M,j[1]),U=D.substring(j[4],q),I=$&&!!(V||U),P=V?I?V:V.toLowerCase():void 0,G=U?I?U:U.toLowerCase():void 0,W=!N&&((v=i.dynamic)==null?void 0:v.find(L=>!L.skipOnParamError&&L.caseSensitive===I&&L.prefix===P&&L.suffix===G));if(W)z=W;else{const L=av(1,n.fullPath??n.from,I,P,G);z=L,L.depth=o,L.parent=i,i.dynamic??(i.dynamic=[]),i.dynamic.push(L)}break}case 3:{const V=D.substring(M,j[1]),U=D.substring(j[4],q),I=$&&!!(V||U),P=V?I?V:V.toLowerCase():void 0,G=U?I?U:U.toLowerCase():void 0,W=!N&&((S=i.optional)==null?void 0:S.find(L=>!L.skipOnParamError&&L.caseSensitive===I&&L.prefix===P&&L.suffix===G));if(W)z=W;else{const L=av(3,n.fullPath??n.from,I,P,G);z=L,L.parent=i,L.depth=o,i.optional??(i.optional=[]),i.optional.push(L)}break}case 2:{const V=D.substring(M,j[1]),U=D.substring(j[4],q),I=$&&!!(V||U),P=V?I?V:V.toLowerCase():void 0,G=U?I?U:U.toLowerCase():void 0,W=av(2,n.fullPath??n.from,I,P,G);z=W,W.parent=i,W.depth=o,i.wildcard??(i.wildcard=[]),i.wildcard.push(W)}}i=z}if(N&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const j=al(n.fullPath??n.from);j.kind=J$,j.parent=i,o++,j.depth=o,i.pathless??(i.pathless=[]),i.pathless.push(j),i=j}const F=(n.path||!n.children)&&!n.isRoot;if(F&&D.endsWith("/")){const j=al(n.fullPath??n.from);j.kind=sl,j.parent=i,o++,j.depth=o,i.index=j,i=j}i.parse=((A=(w=n.options)==null?void 0:w.params)==null?void 0:A.parse)??null,i.skipOnParamError=N,i.parsingPriority=((R=(k=n.options)==null?void 0:k.skipRouteOnParseError)==null?void 0:R.priority)??0,F&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(const D of n.children)Bg(e,t,D,u,i,o,a)}function sv(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 Hs(e){var t,n,r;if(e.pathless)for(const i of e.pathless)Hs(i);if(e.static)for(const i of e.static.values())Hs(i);if(e.staticInsensitive)for(const i of e.staticInsensitive.values())Hs(i);if((t=e.dynamic)!=null&&t.length){e.dynamic.sort(sv);for(const i of e.dynamic)Hs(i)}if((n=e.optional)!=null&&n.length){e.optional.sort(sv);for(const i of e.optional)Hs(i)}if((r=e.wildcard)!=null&&r.length){e.wildcard.sort(sv);for(const i of e.wildcard)Hs(i)}}function al(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 av(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 FF(e,t){const n=al("/"),r=new Uint16Array(6);for(const i of e)Bg(!1,r,i,1,n,0);Hs(n),t.masksTree=n,t.flatCache=Rd(1e3)}function BF(e,t){e||(e="/");const n=t.flatCache.get(e);if(n)return n;const r=jw(e,t.masksTree);return t.flatCache.set(e,r),r}function UF(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=al("/"),Bg(t,new Uint16Array(6),{from:e},1,a,0),i.singleCache.set(o,a)),jw(r,a,n)}function HF(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=jw(e,t.segmentTree,n)}catch(a){if(a instanceof URIError)o=null;else throw a}return o&&(o.branch=VF(o.route)),t.matchCache.set(r,o),o}function qF(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function GF(e,t=!1,n){const r=al(e.fullPath),i=new Uint16Array(6),o={},a={};let u=0;return Bg(t,i,e,1,r,0,c=>{if(n==null||n(c,u),c.id in o&&Ko(),o[c.id]=c,u!==0&&c.path){const f=qF(c.fullPath);(!a[f]||c.fullPath.endsWith("/"))&&(a[f]=c)}u++}),Hs(r),{processedTree:{segmentTree:r,singleCache:Rd(1e3),matchCache:Rd(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:a}}function jw(e,t,n=!1){const r=e.split("/"),i=WF(e,r,t,n);if(!i)return null;const[o]=eM(e,r,i);return{route:i.node.route,rawParams:o,parsedParams:i.parsedParams}}function eM(e,t,n){var h,p,g,y,b,v,S,w,A,k;const r=YF(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 R=r[u];if(R.kind===sl)break;if(R.kind===J$){f--,a--,c--;continue}const D=t[a],T=c;if(D&&(c+=D.length),R.kind===1){i??(i=n.node.fullPath.split("/"));const $=i[f],N=((b=R.prefix)==null?void 0:b.length)??0;if($.charCodeAt(N)===123){const F=((v=R.suffix)==null?void 0:v.length)??0,j=$.substring(N+2,$.length-F-1),z=D.substring(N,D.length-F);o[j]=decodeURIComponent(z)}else{const F=$.substring(1);o[F]=decodeURIComponent(D)}}else if(R.kind===3){if(n.skipped&1<<u){a--,c=T-1;continue}i??(i=n.node.fullPath.split("/"));const $=i[f],N=((S=R.prefix)==null?void 0:S.length)??0,F=((w=R.suffix)==null?void 0:w.length)??0,j=$.substring(N+3,$.length-F-1),z=R.suffix||R.prefix?D.substring(N,D.length-F):D;z&&(o[j]=decodeURIComponent(z))}else if(R.kind===2){const $=R,N=e.substring(T+(((A=$.prefix)==null?void 0:A.length)??0),e.length-(((k=$.suffix)==null?void 0:k.length)??0)),F=decodeURIComponent(N);o["*"]=F,o._splat=F;break}}return n.rawParams&&Object.assign(o,n.rawParams),[o,{part:a,node:u,path:c,segment:f}]}function VF(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function YF(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function WF(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const i=!_d(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:w,optionals:A}=p;let{extract:k,rawParams:R,parsedParams:D}=p;if(g.skipOnParamError){if(!lv(e,t,p))continue;R=p.rawParams,k=p.extract,D=p.parsedParams}r&&g.route&&g.kind!==sl&&If(f,p)&&(f=p);const T=y===a;if(T&&(g.route&&!o&&If(h,p)&&(h=p),!g.optional&&!g.wildcard&&!g.index&&!g.pathless))continue;const $=T?void 0:t[y];let N;if(T&&g.index){const F={node:g.index,index:y,skipped:b,depth:v+1,statics:S,dynamics:w,optionals:A,extract:k,rawParams:R,parsedParams:D};let j=!0;if(g.index.skipOnParamError&&(lv(e,t,F)||(j=!1)),j){if(S===a&&!w&&!A&&!b)return F;If(h,F)&&(h=F)}}if(g.wildcard&&If(c,p))for(const F of g.wildcard){const{prefix:j,suffix:z}=F;if(j&&(T||!(F.caseSensitive?$:N??(N=$.toLowerCase())).startsWith(j)))continue;if(z){if(T)continue;const q=t.slice(y).join("/").slice(-z.length);if((F.caseSensitive?q:q.toLowerCase())!==z)continue}const M={node:F,index:a,skipped:b,depth:v,statics:S,dynamics:w,optionals:A,extract:k,rawParams:R,parsedParams:D};if(!(F.skipOnParamError&&!lv(e,t,M))){c=M;break}}if(g.optional){const F=b|1<<v,j=v+1;for(let z=g.optional.length-1;z>=0;z--){const M=g.optional[z];u.push({node:M,index:y,skipped:F,depth:j,statics:S,dynamics:w,optionals:A,extract:k,rawParams:R,parsedParams:D})}if(!T)for(let z=g.optional.length-1;z>=0;z--){const M=g.optional[z],{prefix:q,suffix:V}=M;if(q||V){const U=M.caseSensitive?$:N??(N=$.toLowerCase());if(q&&!U.startsWith(q)||V&&!U.endsWith(V))continue}u.push({node:M,index:y+1,skipped:b,depth:j,statics:S,dynamics:w,optionals:A+1,extract:k,rawParams:R,parsedParams:D})}}if(!T&&g.dynamic&&$)for(let F=g.dynamic.length-1;F>=0;F--){const j=g.dynamic[F],{prefix:z,suffix:M}=j;if(z||M){const q=j.caseSensitive?$:N??(N=$.toLowerCase());if(z&&!q.startsWith(z)||M&&!q.endsWith(M))continue}u.push({node:j,index:y+1,skipped:b,depth:v+1,statics:S,dynamics:w+1,optionals:A,extract:k,rawParams:R,parsedParams:D})}if(!T&&g.staticInsensitive){const F=g.staticInsensitive.get(N??(N=$.toLowerCase()));F&&u.push({node:F,index:y+1,skipped:b,depth:v+1,statics:S+1,dynamics:w,optionals:A,extract:k,rawParams:R,parsedParams:D})}if(!T&&g.static){const F=g.static.get($);F&&u.push({node:F,index:y+1,skipped:b,depth:v+1,statics:S+1,dynamics:w,optionals:A,extract:k,rawParams:R,parsedParams:D})}if(g.pathless){const F=v+1;for(let j=g.pathless.length-1;j>=0;j--){const z=g.pathless[j];u.push({node:z,index:y,skipped:b,depth:F,statics:S,dynamics:w,optionals:A,extract:k,rawParams:R,parsedParams:D})}}}if(h&&c)return If(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 lv(e,t,n){try{const[r,i]=eM(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 If(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===sl)>(e.node.kind===sl)||t.node.kind===sl==(e.node.kind===sl)&&t.depth>e.depth))):!0}function bm(e){return zw(e.filter(t=>t!==void 0).join("/"))}function zw(e){return e.replace(/\/{2,}/g,"/")}function tM(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function fa(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function nM(e){return fa(tM(e))}function Bm(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function XF(e,t,n){return Bm(e,n)===Bm(t,n)}function KF({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&&_d(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&&(_d(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=Lw(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),w=g.substring(c[2],c[3]);y===1?f+=v||S?`${v}{$${w}}${S}`:`$${w}`:y===2?f+=v||S?`${v}{$}${S}`:"$":f+=`${v}{-$${w}}${S}`}f=zw(f);const h=f||"/";return a&&r&&r.set(a,h),h}function QF(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 uv(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=>eA(i,n)).join("/"):eA(r,n)}function J_({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=Lw(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=uv("_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=uv(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),w=uv(y,t,n)??"";f+="/"+v+w+S;continue}}return e.endsWith("/")&&(f+="/"),{usedParams:o,interpolatedPath:f||"/",isMissingParams:i}}function eA(e,t){const n=encodeURIComponent(e);return(t==null?void 0:t(n))??n}function er(e){return(e==null?void 0:e.isNotFound)===!0}function ZF(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var JF="tsr-scroll-restoration-v1_3";function e8(){const e=ZF();if(!e)return null;let t={};try{const r=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");vc(r)&&(t=r)}catch{}return{get state(){return t},set:r=>{t=oa(r,t)||t},persist:()=>{try{e.setItem(JF,JSON.stringify(t))}catch{}}}}var tA=e8(),t8=e=>e.state.__TSR_key||e.href;function n8(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 Ap=!1,Ff="window",nA="data-scroll-restoration-id";function r8(e,t){if(!tA)return;const n=tA;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!n)return;e.isScrollRestorationSetup=!0,Ap=!1;const r=e.options.getScrollRestorationKey||t8,i=new Map;window.history.scrollRestoration="manual";const o=u=>{if(!(Ap||!e.isScrollRestoring))if(u.target===document||u.target===window)i.set(Ff,{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===Ff)g=Ff;else if(h.isConnected){const y=h.getAttribute(nA);g=y?`[${nA}="${y}"]`:n8(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}))){Ap=!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(!vc(v))continue;const{scrollX:S,scrollY:w}=v;if(!(!Number.isFinite(S)||!Number.isFinite(w))){if(b===Ff)window.scrollTo({top:w,left:S,behavior:f}),y=!0;else if(b){let A;try{A=document.querySelector(b)}catch{continue}A&&(A.scrollLeft=S,A.scrollTop=w,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===Ff)continue;const w=typeof S=="function"?S():document.querySelector(S);w&&w.scrollTo(v)}}}}finally{Ap=!1}e.isScrollRestoring&&n.set(g=>(g[c]||(g[c]={}),g))}})}function i8(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 cv(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function o8(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]=cv(i):Array.isArray(o)?o.push(cv(i)):n[r]=[o,cv(i)]}return n}var s8=l8(JSON.parse),a8=u8(JSON.stringify,JSON.parse);function l8(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=o8(t);for(const r in n){const i=n[r];if(typeof i=="string")try{n[r]=e(i)}catch{}}return n}}function u8(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=i8(i,r);return o?`?${o}`:""}}var Cl="__root__";function c8(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 Rr(e){return e instanceof Response&&!!e.options}function f8(e){return{input:({url:t})=>{for(const n of e)t=ex(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=rM(e[n],t);return t}}}function d8(e){const t=nM(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=bm(["/",t,a.pathname]),a)}}function ex(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 rM(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 h8(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),w=n([]),A=n([]),k=n([]),R=r(()=>fv(a,w.get())),D=r(()=>fv(u,A.get())),T=r(()=>fv(c,k.get())),$=r(()=>w.get()[0]),N=r(()=>w.get().some(P=>{var G;return((G=a.get(P))==null?void 0:G.get().status)==="pending"})),F=r(()=>{var P;return{locationHref:y.get().href,resolvedLocationHref:(P=b.get())==null?void 0:P.href,status:f.get()}}),j=r(()=>({status:f.get(),loadedAt:h.get(),isLoading:p.get(),isTransitioning:g.get(),matches:R.get(),location:y.get(),resolvedLocation:b.get(),statusCode:v.get(),redirect:S.get()})),z=Rd(64);function M(P){let G=z.get(P);return G||(G=r(()=>{const W=w.get();for(const L of W){const Y=a.get(L);if(Y&&Y.routeId===P)return Y.get()}}),z.set(P,G)),G}const q={status:f,loadedAt:h,isLoading:p,isTransitioning:g,location:y,resolvedLocation:b,statusCode:v,redirect:S,matchesId:w,pendingIds:A,cachedIds:k,matches:R,pendingMatches:D,cachedMatches:T,firstId:$,hasPending:N,matchRouteDeps:F,matchStores:a,pendingMatchStores:u,cachedMatchStores:c,__store:j,getRouteMatchStore:M,setMatches:V,setPending:U,setCached:I};V(e.matches),o==null||o(q);function V(P){dv(P,a,w,n,i)}function U(P){dv(P,u,A,n,i)}function I(P){dv(P,c,k,n,i)}return q}function fv(e,t){const n=[];for(const r of t){const i=e.get(r);i&&n.push(i.get())}return n}function dv(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)}PF(n.get(),o)||n.set(o)})}var tx=e=>{var t;if(!e.rendered)return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)},p8=e=>e.stores.matchesId.get().some(t=>{var n;return(n=e.stores.matchStores.get(t))==null?void 0:n.get()._forcePending}),Ug=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),El=(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},rA=(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},aa=(e,t,n)=>{var r,i,o;if(!(!Rr(n)&&!er(n)))throw Rr(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:Rr(n)?"redirected":er(n)?"notFound":a.status==="pending"?"success":a.status,context:El(e,t.index),isFetching:!1,error:n})),er(n)&&!n.routeId&&(n.routeId=t.routeId),(o=t._nonReactive.loadPromise)==null||o.resolve()),Rr(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n))),n},iM=(e,t)=>{const n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},iA=(e,t,n)=>{const r=El(e,n);e.updateMatch(t,i=>({...i,context:r}))},Bf=(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),aa(e,e.router.getMatch(i),n);try{(c=(u=a.options).onError)==null||c.call(u,n)}catch(f){n=f,aa(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&&!Rr(n)&&!er(n)&&(e.serialError??(e.serialError=n))},oM=(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&&!Ug(e,t)&&(n.options.loader||n.options.beforeLoad||aM(n))&&typeof i=="number"&&i!==1/0&&(n.options.pendingComponent??((o=e.router.options)==null?void 0:o.defaultPendingComponent))){const a=setTimeout(()=>{tx(e)},i);r._nonReactive.pendingTimeout=a}},m8=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;oM(e,t,n,r);const i=()=>{const o=e.router.getMatch(t);o.preload&&(o.status==="redirected"||o.status==="notFound")&&aa(e,o,o.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},g8=(e,t,n,r)=>{const i=e.router.getMatch(t);let o=i._nonReactive.loadPromise;i._nonReactive.loadPromise=xc(()=>{o==null||o.resolve(),o=void 0});const{paramsError:a,searchError:u}=i;a&&Bf(e,n,a,"PARSE_PARAMS"),u&&Bf(e,n,u,"VALIDATE_SEARCH"),oM(e,t,r,i);const c=new AbortController;let f=!1;const h=()=>{f||(f=!0,e.updateMatch(t,R=>({...R,isFetching:"beforeLoad",fetchCount:R.fetchCount+1,abortController:c})))},p=()=>{var R;(R=i._nonReactive.beforeLoadPromise)==null||R.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,D=>({...D,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{h(),p()});return}i._nonReactive.beforeLoadPromise=xc();const g={...El(e,n,!1),...i.__routeContext},{search:y,params:b,cause:v}=i,S=Ug(e,t),w={search:y,abortController:c,params:b,preload:S,context:g,location:e.location,navigate:R=>e.router.navigate({...R,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:S?"preload":v,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},A=R=>{if(R===void 0){e.router.batch(()=>{h(),p()});return}(Rr(R)||er(R))&&(h(),Bf(e,n,R,"BEFORE_LOAD")),e.router.batch(()=>{h(),e.updateMatch(t,D=>({...D,__beforeLoadContext:R})),p()})};let k;try{if(k=r.options.beforeLoad(w),Ad(k))return h(),k.catch(R=>{Bf(e,n,R,"BEFORE_LOAD")}).then(A)}catch(R){h(),Bf(e,n,R,"BEFORE_LOAD")}A(k)},y8=(e,t)=>{const{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],o=()=>u(),a=()=>g8(e,n,t,i),u=()=>{if(iM(e,n))return;const c=m8(e,n,i);return Ad(c)?c.then(a):a()};return o()},b8=(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}))},sM=(e,t,n,r,i)=>{const o=t[r-1],{params:a,loaderDeps:u,abortController:c,cause:f}=e.router.getMatch(n),h=El(e,r),p=Ug(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}},oA=async(e,t,n,r,i)=>{var o,a,u,c,f;try{const h=e.router.getMatch(n);try{(!(Z$??e.router.isServer)||h.ssr===!0)&&Dd(i);const p=i.options.loader,g=typeof p=="function"?p:p==null?void 0:p.handler,y=g==null?void 0:g(sM(e,t,n,r,i)),b=!!g&&Ad(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;aa(e,e.router.getMatch(n),S),S!==void 0&&e.updateMatch(n,w=>({...w,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:El(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:El(e,r)}));return}const y=h._nonReactive.minPendingPromise;y&&await y,er(p)&&await((u=(a=i.options.notFoundComponent)==null?void 0:a.preload)==null?void 0:u.call(a)),aa(e,e.router.getMatch(n),p);try{(f=(c=i.options).onError)==null||f.call(c,p)}catch(b){g=b,aa(e,e.router.getMatch(n),b)}!Rr(g)&&!er(g)&&await Dd(i,["errorComponent"]),e.updateMatch(n,b=>({...b,error:g,context:El(e,r),status:"error",isFetching:!1}))}}catch(h){const p=e.router.getMatch(n);p&&(p._nonReactive.loaderPromise=void 0),aa(e,p,h)}},v8=async(e,t,n)=>{var y,b,v,S;async function r(w,A,k,R,D){const T=Date.now()-A.updatedAt,$=w?D.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:D.options.staleTime??e.router.options.defaultStaleTime??0,N=D.options.shouldReload,F=typeof N=="function"?N(sM(e,t,i,n,D)):N,{status:j,invalid:z}=R,M=T>=$&&(!!e.forceStaleReload||R.cause==="enter"||k!==void 0&&k!==R.id);a=j==="success"&&(z||(F??M)),w&&D.options.preload===!1||(a&&!e.sync&&h?(u=!0,(async()=>{var q,V;try{await oA(e,t,i,n,D);const U=e.router.getMatch(i);(q=U._nonReactive.loaderPromise)==null||q.resolve(),(V=U._nonReactive.loadPromise)==null||V.resolve(),U._nonReactive.loaderPromise=void 0,U._nonReactive.loadPromise=void 0}catch(U){Rr(U)&&await e.router.navigate(U.options)}})()):j!=="success"||a?await oA(e,t,i,n,D):iA(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(iM(e,i)){if(!e.router.getMatch(i))return e.matches[n];iA(e,i,n)}else{const w=e.router.getMatch(i),A=e.router.stores.matchesId.get()[n],k=((y=A&&e.router.stores.matchStores.get(A)||null)==null?void 0:y.routeId)===o?A:(b=e.router.stores.matches.get().find(D=>D.routeId===o))==null?void 0:b.id,R=Ug(e,i);if(w._nonReactive.loaderPromise){if(w.status==="success"&&!e.sync&&!w.preload&&h)return w;await w._nonReactive.loaderPromise;const D=e.router.getMatch(i),T=D._nonReactive.error||D.error;T&&aa(e,D,T),D.status==="pending"&&await r(R,w,k,D,c)}else{const D=R&&!e.router.stores.matchStores.has(i),T=e.router.getMatch(i);T._nonReactive.loaderPromise=xc(),D!==T.preload&&e.updateMatch(i,$=>({...$,preload:D})),await r(R,w,k,T,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,w=>({...w,isFetching:g,invalid:!1})),e.router.getMatch(i)):p};async function sA(e){var g,y;const t=e,n=[];p8(t.router)&&tx(t);let r;for(let b=0;b<t.matches.length;b++){try{const v=y8(t,b);Ad(v)&&await v}catch(v){if(Rr(v))throw v;if(er(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?rA(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(v8(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(Rr(S))throw S;er(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=rA(t,f);b===void 0&&Ko();const v=t.matches[b],S=t.router.looseRoutesById[v.routeId],w=(g=t.router.options)==null?void 0:g.defaultNotFoundComponent;!S.options.notFoundComponent&&w&&(S.options.notFoundComponent=w),f.routeId=v.routeId;const A=v.routeId===t.router.routeTree.id;t.updateMatch(v.id,k=>({...k,...A?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:f},isFetching:!1})),h=b,await Dd(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 Dd(b,["errorComponent"])}for(let b=0;b<=h;b++){const{id:v,routeId:S}=t.matches[b],w=t.router.looseRoutesById[S];try{const A=b8(t,v,w);if(A){const k=await A;t.updateMatch(v,R=>({...R,...k}))}}catch(A){console.error(`Error executing head for route ${S}:`,A)}}const p=tx(t);if(Ad(p)&&await p,f)throw f;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function aA(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 Dd(e,t=vm){!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===vm?(()=>{if(e._componentsPromise===void 0){const r=aA(e,vm);r?e._componentsPromise=r.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():aA(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function aM(e){var t;for(const n of vm)if((t=e.options[n])!=null&&t.preload)return!0;return!1}var vm=["component","errorComponent","pendingComponent","notFoundComponent"],da="__TSR_index",lA="popstate",uA="beforeunload";function x8(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=Um(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[da];u=cA(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[da];u=cA(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[da]!==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 cA(e,t){t||(t={});const n=Pw();return{...t,key:n,__TSR_key:n,[da]:e}}function w8(e){var N,F;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=(()=>Um(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!((N=t.history.state)!=null&&N.__TSR_key)&&!((F=t.history.state)!=null&&F.key)){const j=Pw();t.history.replaceState({[da]:0,key:j,__TSR_key:j},"")}let f=c(),h,p=!1,g=!1,y=!1,b=!1;const v=()=>f;let S,w;const A=()=>{S&&($._ignoreSubscribers=!0,(S.isPush?t.history.pushState:t.history.replaceState)(S.state,"",S.href),$._ignoreSubscribers=!1,S=void 0,w=void 0,h=void 0)},k=(j,z,M)=>{const q=u(z);w||(h=f),f=Um(z,M),S={href:q,state:M,isPush:(S==null?void 0:S.isPush)||j==="push"},w||(w=Promise.resolve().then(()=>A()))},R=j=>{f=c(),$.notify({type:j})},D=async()=>{if(g){g=!1;return}const j=c(),z=j.state[da]-f.state[da],M=z===1,q=z===-1,V=!M&&!q||p;p=!1;const U=V?"GO":q?"BACK":"FORWARD",I=V?{type:"GO",index:z}:{type:q?"BACK":"FORWARD"};if(y)y=!1;else{const P=o();if(typeof document<"u"&&P.length){for(const G of P)if(await G.blockerFn({currentLocation:f,nextLocation:j,action:U})){g=!0,t.history.go(1),$.notify(I);return}}}f=c(),$.notify(I)},T=j=>{if(b){b=!1;return}let z=!1;const M=o();if(typeof document<"u"&&M.length)for(const q of M){const V=q.enableBeforeUnload??!0;if(V===!0){z=!0;break}if(typeof V=="function"&&V()===!0){z=!0;break}}if(z)return j.preventDefault(),j.returnValue=""},$=x8({getLocation:v,getLength:()=>t.history.length,pushState:(j,z)=>k("push",j,z),replaceState:(j,z)=>k("replace",j,z),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:A,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(uA,T,{capture:!0}),t.removeEventListener(lA,D)},onBlocked:()=>{h&&f!==h&&(f=h)},getBlockers:o,setBlockers:a,notifyOnIndexChange:!1});return t.addEventListener(uA,T,{capture:!0}),t.addEventListener(lA,D),t.history.pushState=function(...j){const z=n.apply(t.history,j);return $._ignoreSubscribers||R("PUSH"),z},t.history.replaceState=function(...j){const z=r.apply(t.history,j);return $._ignoreSubscribers||R("REPLACE"),z},$}function S8(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Um(e,t){const n=S8(e),r=n.indexOf("#"),i=n.indexOf("?"),o=Pw();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||{[da]:0,key:o,__TSR_key:o}}}function Pw(){return(Math.random()+1).toString(36).substring(7)}function Qu(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 C8=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=QF(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=w8()),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=Rd(1e3),p=this.buildRouteTree(),this.setRoutes(p)}if(!this.stores&&this.latestLocation){const p=this.getStoreConfig(this);this.batch=p.batch,this.stores=h8(k8(this.latestLocation),p),r8(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=nM(c);g&&g!=="/"&&p.push(d8({basepath:c})),f&&p.push(f),this.rewrite=p.length===0?void 0:p.length===1?p[0]:f8(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=GF(this.routeTree,this.options.caseSensitive,(r,i)=>{r.init({originalIndex:i})});return this.options.routeMasks&&FF(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 w=this.options.parseSearch(f),A=this.options.stringifySearch(w);return{href:c+A+h,publicHref:c+A+h,pathname:Pf(c).path,external:!1,searchStr:A,search:Qa(r==null?void 0:r.search,w),hash:Pf(h.slice(1)).path,state:sa(r==null?void 0:r.state,g)}}const y=new URL(p,this.origin),b=ex(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:Pf(b.pathname).path,external:!!this.rewrite&&b.origin!==this.origin,searchStr:S,search:Qa(r==null?void 0:r.search,v),hash:Pf(b.hash.slice(1)).path,state:sa(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)=>KF({base:n,to:zw(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=>_8({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,z;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,oa(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 q=((j=M.options.params)==null?void 0:j.stringify)??M.options.stringifyParams;if(q)try{Object.assign(y,q(y))}catch{}}const S=n.leaveParams?g:Pf(J_({path:g,params:y,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let w=h;if(n._includeValidateSearch&&((z=this.options.search)!=null&&z.strict)){const M={};v.forEach(q=>{if(q.options.validateSearch)try{Object.assign(M,xm(q.options.validateSearch,{...M,...w}))}catch{}}),w=M}w=A8({search:w,dest:o,destRoutes:v,_includeValidateSearch:n._includeValidateSearch}),w=Qa(h,w);const A=this.options.stringifySearch(w),k=o.hash===!0?a.hash:o.hash?oa(o.hash,a.hash):void 0,R=k?`#${k}`:"";let D=o.state===!0?a.state:o.state?oa(o.state,a.state):{};D=sa(a.state,D);const T=`${S}${A}${R}`;let $,N,F=!1;if(this.rewrite){const M=new URL(T,this.origin),q=rM(this.rewrite,M);$=M.href.replace(M.origin,""),q.origin!==this.origin?(N=q.href,F=!0):N=q.pathname+q.search+q.hash}else $=zF(T),N=$;return{publicHref:N,href:$,pathname:S,search:w,searchStr:A,state:D,hash:k??"",external:F,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=BF(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,oa(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=Sl(i.state,this.latestLocation.state);return c.forEach(h=>{delete i.state[h]}),f},a=fa(this.latestLocation.href)===fa(i.href);let u=this.commitLocationPromise;if(this.commitLocationPromise=xc(()=>{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=Um(u,{__TSR_index:n?p:p+1}),y=new URL(g.pathname,this.origin);c.to=ex(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(Fm(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=Qu(h,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...p}),this.emit({type:"onBeforeLoad",...p}),await sA({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,w;let g=null,y=null,b=null,v=null;this.batch(()=>{const A=this.stores.pendingMatches.get(),k=A.length,R=this.stores.matches.get();g=k?R.filter($=>!this.stores.pendingMatchStores.has($.id)):null;const D=new Set;for(const $ of this.stores.pendingMatchStores.values())$.routeId&&D.add($.routeId);const T=new Set;for(const $ of this.stores.matchStores.values())$.routeId&&T.add($.routeId);y=k?R.filter($=>!D.has($.routeId)):null,b=k?A.filter($=>!T.has($.routeId)):null,v=k?A.filter($=>T.has($.routeId)):R,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),k&&(this.stores.setMatches(A),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...g.filter($=>$.status!=="error"&&$.status!=="notFound"&&$.status!=="redirected")]),this.clearExpiredCache())});for(const[A,k]of[[y,"onLeave"],[b,"onEnter"],[v,"onStay"]])if(A)for(const R of A)(w=(S=this.looseRoutesById[R.routeId].options)[k])==null||w.call(S,R)})})}})}catch(h){Rr(h)?(r=h,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):er(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(Qu(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&&Fm(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=Dd,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 sA({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(Rr(c))return c.options.reloadDocument?void 0:await this.preloadRoute({...c.options,_fromLocation:r});er(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=UF(o.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,a.pathname,this.processedTree);return!u||n.params&&!Sl(u.rawParams,n.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?Sl(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??a8,parseSearch:e.parseSearch??s8,protocolAllowlist:e.protocolAllowlist??jF}),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["**"]:fa(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:u=!0);const c=u?D8(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,w,A;{const U=(v==null?void 0:v.search)??e.search,I=(v==null?void 0:v._strictSearch)??void 0;try{const P=xm(b.options.validateSearch,{...U})??void 0;S={...U,...P},w={...I,...P},A=void 0}catch(P){let G=P;if(P instanceof Hm||(G=new Hm(P.message,{cause:P})),t!=null&&t.throwOnError)throw G;S=U,w={},A=G}}const k=((g=(p=b.options).loaderDeps)==null?void 0:g.call(p,{search:S}))??"",R=k?JSON.stringify(k):"",{interpolatedPath:D,usedParams:T}=J_({path:b.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),$=b.id+D+R,N=this.getMatch($),F=h.get(b.id),j=(N==null?void 0:N._strictParams)??T;let z;if(!N)try{fA(b,T,o,j)}catch(U){if(er(U)||Rr(U)?z=U:z=new E8(U.message,{cause:U}),t!=null&&t.throwOnError)throw z}Object.assign(i,j);const M=F?"stay":"enter";let q;if(N)q={...N,cause:M,params:(F==null?void 0:F.params)??i,_strictParams:j,search:Qa(F?F.search:N.search,S),_strictSearch:w};else{const U=b.options.loader||b.options.beforeLoad||b.lazyFn||aM(b)?"pending":"success";q={id:$,ssr:b.options.ssr,index:y,routeId:b.id,params:(F==null?void 0:F.params)??i,_strictParams:j,pathname:D,updatedAt:Date.now(),search:F?Qa(F.search,S):S,_strictSearch:w,searchError:void 0,status:U,isFetching:!1,error:void 0,paramsError:z,__routeContext:void 0,_nonReactive:{loadPromise:xc()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:M,loaderDeps:F?sa(F.loaderDeps,k):k,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||(q.globalNotFound=c===b.id),q.searchError=A;const V=this.getParentContext(v);q.context={...V,...q.__routeContext,...q.__beforeLoadContext},f[y]=q}for(let y=0;y<f.length;y++){const b=f[y],v=this.looseRoutesById[b.routeId],S=this.getMatch(b.id),w=h.get(b.routeId);if(b.params=w?Qa(w.params,i):i,!S){const A=f[y-1],k=this.getParentContext(A);if(v.options.context){const R={deps:b.loaderDeps,params:b.params,context:k??{},location:e,navigate:D=>this.navigate({...D,_fromLocation:e}),buildLocation:this.buildLocation,cause:b.cause,abortController:b.abortController,preload:!!b.preload,matches:f,routeId:v.id};b.__routeContext=v.options.context(R)??void 0}b.context={...k,...b.__routeContext,...b.__beforeLoadContext}}}return f}matchRoutesLightweight(e){var h;const{matchedRoutes:t,routeParams:n,parsedParams:r}=this.getMatchedRoutes(e.pathname),i=_d(t),o={...e.search};for(const p of t)try{Object.assign(o,xm(p.options.validateSearch,o))}catch{}const a=_d(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{fA(g,n,r??{},p)}catch{}f=p}return{matchedRoutes:t,fullPath:i.fullPath,search:o,params:f}}},Hm=class extends Error{},E8=class extends Error{};function k8(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function xm(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Hm("Async validation not supported");if(n.issues)throw new Hm(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 _8({pathname:e,routesById:t,processedTree:n}){const r=Object.create(null),i=fa(e);let o,a;const u=HF(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 A8({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return R8(n)(e,t,r??!1)}function R8(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,...xm(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:oa(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 D8(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 Cl}function fA(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 T8="Error preloading route! ☝️",lM=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=Cl:this.parentRoute||Ko();let i=r?Cl:n==null?void 0:n.path;i&&i!=="/"&&(i=tM(i));const o=(n==null?void 0:n.id)||i;let a=r?Cl:bm([this.parentRoute.id==="__root__"?"":this.parentRoute.id,o]);i==="__root__"&&(i="/"),a!=="__root__"&&(a=bm(["/",a]));const u=a==="__root__"?"/":bm([this.parentRoute.fullPath,i]);this._path=i,this._id=a,this._fullPath=u,this._to=fa(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=>c8({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.")}},$8=class extends lM{constructor(e){super(e)}};function M8(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 Iw(e){const t=e.errorComponent??Fw;return _.jsx(O8,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?C.createElement(t,{error:n,reset:r}):e.children})}var O8=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 Fw({error:e}){const[t,n]=C.useState(!1);return _.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[_.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[_.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),_.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"})]}),_.jsx("div",{style:{height:".25rem"}}),t?_.jsx("div",{children:_.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?_.jsx("code",{children:e.message}):null})}):null]})}function N8({children:e,fallback:t=null}){return uM()?_.jsx(ao.Fragment,{children:e}):_.jsx(ao.Fragment,{children:t})}function uM(){return ao.useSyncExternalStore(L8,()=>!0,()=>!1)}function L8(){return()=>{}}var cM=C.createContext(null);function ei(e){return C.useContext(cM)}var Hg=C.createContext(void 0),j8=C.createContext(void 0),nn=(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))(nn||{});function z8({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,w=S.nextSub!==void 0;if(w?(f=p.value,p=p.prev):f=S,y){if(e(h)){w&&u(S),h=f.sub;continue}y=!1}else h.flags&=-33;h=f.sub;const A=f.nextDep;if(A!==void 0){f=A;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 P8(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 nx=[];let wm=0;const{link:dA,unlink:I8,propagate:F8,checkDirty:fM,shallowPropagate:hA}=z8({update(e){return e._update()},notify(e){nx[rx++]=e,e.flags&=~nn.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=nn.Mutable|nn.Dirty,qm(e))}});let Rp=0,rx=0,Qi,ix=0;function dM(e){try{++ix,e()}finally{--ix||hM()}}function qm(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=I8(n,e)}function hM(){if(!(ix>0)){for(;Rp<rx;){const e=nx[Rp];nx[Rp++]=void 0,e.notify()}Rp=0,rx=0}}function pA(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?nn.None:nn.Mutable,get(){return Qi!==void 0&&dA(i,Qi,wm),i._snapshot},subscribe(o){const a=P8(o),u={current:!1},c=B8(()=>{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=Qi,u=(t==null?void 0:t.compare)??Object.is;if(n)Qi=i,++wm,i.depsTail=void 0;else if(o===void 0)return!1;n&&(i.flags=nn.Mutable|nn.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{Qi=a,n&&(i.flags&=~nn.RecursedCheck),qm(i)}}};return n?(i.flags=nn.Mutable|nn.Dirty,i.get=function(){const o=i.flags;if(o&nn.Dirty||o&nn.Pending&&fM(i.deps,i)){if(i._update()){const a=i.subs;a!==void 0&&hA(a)}}else o&nn.Pending&&(i.flags=o&~nn.Pending);return Qi!==void 0&&dA(i,Qi,wm),i._snapshot}):i.set=function(o){if(i._update(o)){const a=i.subs;a!==void 0&&(F8(a),hA(a),hM())}},i}function B8(e){const t=()=>{const r=Qi;Qi=n,++wm,n.depsTail=void 0,n.flags=nn.Watching|nn.RecursedCheck;try{return e()}finally{Qi=r,n.flags&=~nn.RecursedCheck,qm(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:nn.Watching|nn.RecursedCheck,notify(){const r=this.flags;r&nn.Dirty||r&nn.Pending&&fM(this.deps,this)?t():this.flags=nn.Watching},stop(){this.flags=nn.None,this.depsTail=void 0,qm(this)}};return t(),n}var hv={exports:{}},pv={},mv={exports:{}},gv={};/**
|
|
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 mA;function U8(){if(mA)return gv;mA=1;var e=Kd();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 gv.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,gv}var gA;function H8(){return gA||(gA=1,mv.exports=U8()),mv.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 yA;function q8(){if(yA)return pv;yA=1;var e=Kd(),t=H8();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 pv.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 w(T){if(!A){if(A=!0,k=T,T=g(T),y!==void 0&&v.hasValue){var $=v.value;if(y($,T))return R=$}return R=T}if($=R,r(k,T))return $;var N=g(T);return y!==void 0&&y($,N)?(k=T,$):(k=T,R=N)}var A=!1,k,R,D=p===void 0?null:p;return[function(){return w(h())},D===null?void 0:function(){return w(D())}]},[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},pv}var bA;function G8(){return bA||(bA=1,hv.exports=q8()),hv.exports}var V8=G8();function Y8(e,t){return e===t}function $r(e,t,n=Y8){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 V8.useSyncExternalStoreWithSelector(r,i,i,t,n)}var W8={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function Bl(e){const t=ei(),n=C.useContext(e.from?j8:Hg),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 $r(i??W8,a=>{if((e.shouldThrow??!0)&&!a&&Ko(),a===void 0)return;const u=e.select?e.select(a):a;if(e.structuralSharing??t.options.defaultStructuralSharing){const c=sa(o.current,u);return o.current=c,c}return u})}function pM(e){return Bl({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function mM(e){const{select:t,...n}=e;return Bl({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function gM(e){return Bl({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 yM(e){return Bl({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function bM(e){const t=ei();return C.useCallback(n=>t.navigate({...n,from:n.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,t])}function vM(e){return Bl({...e,select:t=>e.select?e.select(t.context):t.context})}var tr=I$();function X8(e,t){const n=ei(),r=$F(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:w,disabled:A,style:k,className:R,onClick:D,onBlur:T,onFocus:$,onMouseEnter:N,onMouseLeave:F,onTouchStart:j,ignoreBlocker:z,params:M,search:q,hash:V,state:U,mask:I,reloadDocument:P,unsafeRelative:G,from:W,_fromLocation:L,...Y}=e,Q=uM(),B=C.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),ae=$r(n.stores.location,$e=>$e,($e,le)=>$e.href===le.href),te=C.useMemo(()=>{const $e={_fromLocation:ae,...B};return n.buildLocation($e)},[n,ae,B]),me=te.maskedLocation?te.maskedLocation.publicHref:te.publicHref,Ce=te.maskedLocation?te.maskedLocation.external:te.external,Re=C.useMemo(()=>t7(me,Ce,n.history,A),[A,Ce,me,n.history]),pe=C.useMemo(()=>{if(Re!=null&&Re.external)return Fm(Re.href,n.protocolAllowlist)?void 0:Re.href;if(!n7(u)&&!(typeof u!="string"||u.indexOf(":")===-1))try{return new URL(u),Fm(u,n.protocolAllowlist)?void 0:u}catch{}},[u,Re,n.protocolAllowlist]),Oe=C.useMemo(()=>{if(pe)return!1;if(a!=null&&a.exact){if(!XF(ae.pathname,te.pathname,n.basepath))return!1}else{const $e=Bm(ae.pathname,n.basepath),le=Bm(te.pathname,n.basepath);if(!($e.startsWith(le)&&($e.length===le.length||$e[le.length]==="/")))return!1}return((a==null?void 0:a.includeSearch)??!0)&&!Sl(ae.search,te.search,{partial:!(a!=null&&a.exact),ignoreUndefined:!(a!=null&&a.explicitUndefined)})?!1:a!=null&&a.includeHash?Q&&ae.hash===te.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,ae,pe,Q,te.hash,te.pathname,te.search,n.basepath]),Pe=Oe?oa(i,{})??K8:yv,Z=Oe?yv:oa(o,{})??yv,K=[R,Pe.className,Z.className].filter(Boolean).join(" "),ee=(k||Pe.style||Z.style)&&{...k,...Pe.style,...Z.style},[Ee,he]=C.useState(!1),_e=C.useRef(!1),ue=e.reloadDocument||pe?!1:c??n.options.defaultPreload,re=f??n.options.defaultPreloadDelay??0,ce=C.useCallback(()=>{n.preloadRoute({...B,_builtLocation:te}).catch($e=>{console.warn($e),console.warn(T8)})},[n,B,te]);TF(r,C.useCallback($e=>{$e!=null&&$e.isIntersecting&&ce()},[ce]),e7,{disabled:!!A||ue!=="viewport"}),C.useEffect(()=>{_e.current||!A&&ue==="render"&&(ce(),_e.current=!0)},[A,ce,ue]);const oe=$e=>{const le=$e.currentTarget.getAttribute("target"),we=w!==void 0?w:le;if(!A&&!r7($e)&&!$e.defaultPrevented&&(!we||we==="_self")&&$e.button===0){$e.preventDefault(),tr.flushSync(()=>{he(!0)});const be=n.subscribe("onResolved",()=>{be(),he(!1)});n.navigate({...B,replace:g,resetScroll:b,hashScrollIntoView:p,startTransition:y,viewTransition:v,ignoreBlocker:z})}};if(pe)return{...Y,ref:r,href:pe,...S&&{children:S},...w&&{target:w},...A&&{disabled:A},...k&&{style:k},...R&&{className:R},...D&&{onClick:D},...T&&{onBlur:T},...$&&{onFocus:$},...N&&{onMouseEnter:N},...F&&{onMouseLeave:F},...j&&{onTouchStart:j}};const Ae=$e=>{if(A||ue!=="intent")return;if(!re){ce();return}const le=$e.currentTarget;if(Uf.has(le))return;const we=setTimeout(()=>{Uf.delete(le),ce()},re);Uf.set(le,we)},Ne=$e=>{A||ue!=="intent"||ce()},ve=$e=>{if(A||!ue||!re)return;const le=$e.currentTarget,we=Uf.get(le);we&&(clearTimeout(we),Uf.delete(le))};return{...Y,...Pe,...Z,href:Re==null?void 0:Re.href,ref:r,onClick:Mu([D,oe]),onBlur:Mu([T,ve]),onFocus:Mu([$,Ae]),onMouseEnter:Mu([N,Ae]),onMouseLeave:Mu([F,ve]),onTouchStart:Mu([j,Ne]),disabled:!!A,target:w,...ee&&{style:ee},...K&&{className:K},...A&&Q8,...Oe&&Z8,...Q&&Ee&&J8}}var yv={},K8={className:"active"},Q8={role:"link","aria-disabled":!0},Z8={"data-status":"active","aria-current":"page"},J8={"data-transitioning":"transitioning"},Uf=new WeakMap,e7={rootMargin:"100px"},Mu=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function t7(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function n7(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var Ul=C.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:i,...o}=X8(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 r7(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var i7=class extends lM{constructor(t){super(t),this.useMatch=n=>Bl({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>vM({...n,from:this.id}),this.useSearch=n=>yM({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>gM({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>mM({...n,from:this.id}),this.useLoaderData=n=>pM({...n,from:this.id}),this.useNavigate=()=>bM({from:this.fullPath}),this.Link=ao.forwardRef((n,r)=>_.jsx(Ul,{ref:r,from:this.fullPath,...n}))}};function o7(e){return new i7(e)}var s7=class extends $8{constructor(e){super(e),this.useMatch=t=>Bl({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>vM({...t,from:this.id}),this.useSearch=t=>yM({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>gM({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>mM({...t,from:this.id}),this.useLoaderData=t=>pM({...t,from:this.id}),this.useNavigate=()=>bM({from:this.fullPath}),this.Link=ao.forwardRef((t,n)=>_.jsx(Ul,{ref:n,from:this.fullPath,...t}))}};function a7(e){return new s7(e)}function Qd(e){return new l7(e,{silent:!0}).createRoute}var l7=class{constructor(e,t){this.path=e,this.createRoute=n=>{const r=o7(n);return r.isRoot=!1,r},this.silent=t==null?void 0:t.silent}};function u7(e){const t=ei(),n=`not-found-${$r(t.stores.location,r=>r.pathname)}-${$r(t.stores.status,r=>r)}`;return _.jsx(Iw,{getResetKey:()=>n,onCatch:(r,i)=>{var o;if(er(r))(o=e.onCatch)==null||o.call(e,r,i);else throw r},errorComponent:({error:r})=>{var i;if(er(r))return(i=e.fallback)==null?void 0:i.call(e,r);throw r},children:e.children})}function c7(){return _.jsx("p",{children:"Not Found"})}function Fu(e){return _.jsx(_.Fragment,{children:e.children})}function xM(e,t,n){return t.options.notFoundComponent?_.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?_.jsx(e.options.defaultNotFoundComponent,{...n}):_.jsx(c7,{})}function f7(e){return null}function d7(){return f7(ei()),null}var wM=C.memo(function({matchId:t}){const n=ei(),r=n.stores.matchStores.get(t);r||Ko();const i=$r(n.stores.loadedAt,a=>a),o=$r(r,a=>a);return _.jsx(h7,{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 h7({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?_.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:Fu,g=u?Iw:Fu,y=f?u7:Fu;return _.jsxs(i.isRoot?i.options.shellComponent??Fu:Fu,{children:[_.jsx(Hg.Provider,{value:t,children:_.jsx(p,{fallback:a,children:_.jsx(g,{getResetKey:()=>n,errorComponent:u||Fw,onCatch:(S,w)=>{if(er(S))throw S.routeId??(S.routeId=r.routeId),S;c==null||c(S,w)},children:_.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?_.jsx(N8,{fallback:a,children:_.jsx(vA,{matchId:t})}):_.jsx(vA,{matchId:t})})})})}),r.parentRouteId===Cl?_.jsxs(_.Fragment,{children:[_.jsx(p7,{resetKey:n}),e.options.scrollRestoration&&Z$?_.jsx(d7,{}):null]}):null]})}function p7({resetKey:e}){const t=ei(),n=C.useRef(void 0);return Jf(()=>{const r=t.latestLocation.href;(n.current===void 0||n.current!==r)&&(t.emit({type:"onRendered",...Qu(t.stores.location.get(),t.stores.resolvedLocation.get())}),n.current=r)},[t.latestLocation.state.__TSR_key,e,t]),null}var vA=C.memo(function({matchId:t}){const n=ei(),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||Ko();const o=$r(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?_.jsx(h,{},c):_.jsx(Bw,{})},[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=xc();p._nonReactive.minPendingPromise=g,setTimeout(()=>{g.resolve(),p._nonReactive.minPendingPromise=void 0},h)}}throw r(o,"loadPromise")}if(o.status==="notFound")return er(o.error)||Ko(),xM(n,u,o.error);if(o.status==="redirected")throw Rr(o.error)||Ko(),r(o,"loadPromise");if(o.status==="error")throw o.error;return f}),Bw=C.memo(function(){const t=ei(),n=C.useContext(Hg);let r,i=!1,o;{const f=n?t.stores.matchStores.get(n):void 0;[r,i]=$r(f,h=>[h==null?void 0:h.routeId,(h==null?void 0:h.globalNotFound)??!1]),o=$r(t.stores.matchesId,h=>h[h.findIndex(p=>p===n)+1])}const a=r?t.routesById[r]:void 0,u=t.options.defaultPendingComponent?_.jsx(t.options.defaultPendingComponent,{}):null;if(i)return a||Ko(),xM(t,a,void 0);if(!o)return null;const c=_.jsx(wM,{matchId:o});return r===Cl?_.jsx(C.Suspense,{fallback:u,children:c}):c});function m7(){const e=ei(),t=C.useRef({router:e,mounted:!1}),[n,r]=C.useState(!1),i=$r(e.stores.isLoading,p=>p),o=$r(e.stores.hasPending,p=>p),a=ov(i),u=i||n||o,c=ov(u),f=i||o,h=ov(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 fa(e.latestLocation.publicHref)!==fa(g.publicHref)&&e.commitLocation({...g,replace:!0}),()=>{p()}},[e,e.history]),Jf(()=>{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]),Jf(()=>{a&&!i&&e.emit({type:"onLoad",...Qu(e.stores.location.get(),e.stores.resolvedLocation.get())})},[a,e,i]),Jf(()=>{h&&!f&&e.emit({type:"onBeforeRouteMount",...Qu(e.stores.location.get(),e.stores.resolvedLocation.get())})},[f,h,e]),Jf(()=>{if(c&&!u){const p=Qu(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...p}),dM(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),p.hrefChanged&&M8(e)}},[u,c,e]),null}function g7(){const e=ei(),t=e.routesById[Cl].options.pendingComponent??e.options.defaultPendingComponent,n=t?_.jsx(t,{}):null,r=_.jsxs(typeof document<"u"&&e.ssr?Fu:C.Suspense,{fallback:n,children:[_.jsx(m7,{}),_.jsx(y7,{})]});return e.options.InnerWrap?_.jsx(e.options.InnerWrap,{children:r}):r}function y7(){const e=ei(),t=$r(e.stores.firstId,i=>i),n=$r(e.stores.loadedAt,i=>i),r=t?_.jsx(wM,{matchId:t}):null;return _.jsx(Hg.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:_.jsx(Iw,{getResetKey:()=>n,errorComponent:Fw,onCatch:void 0,children:r})})}var b7=e=>({createMutableStore:pA,createReadonlyStore:pA,batch:dM}),v7=e=>new x7(e),x7=class extends C8{constructor(e){super(e,b7)}};function w7({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=_.jsx(cM.Provider,{value:e,children:t});return e.options.Wrap?_.jsx(e.options.Wrap,{children:r}):r}function S7({router:e,...t}){return _.jsx(w7,{router:e,...t,children:_.jsx(g7,{})})}function C7(e){const t=ei({warn:(e==null?void 0:e.router)===void 0}),n=(e==null?void 0:e.router)||t,r=C.useRef(void 0);return $r(n.stores.__store,i=>{if(e!=null&&e.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const o=sa(r.current,e.select(i));return r.current=o,o}return e.select(i)}return i})}function SM(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=SM(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function bv(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=SM(e))&&(r&&(r+=" "),r+=t);return r}const xA=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,E7=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"](bv(o)):typeof(e==null||(c=e.hooks)===null||c===void 0?void 0:c.onComplete)<"u"?e==null?void 0:e.hooks.onComplete(bv(o)):bv(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=xA(y)||xA(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(w=>{let[A,k]=w;const R=h[A];return Array.isArray(k)?k.includes(R):R===k})?[...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}},k7=(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},_7=(e,t)=>({classGroupId:e,validator:t}),CM=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Gm="-",wA=[],A7="arbitrary..",R7=e=>{const t=T7(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return D7(a);const u=a.split(Gm),c=u[0]===""&&u.length>1?1:0;return EM(u,c,t)},getConflictingClassGroupIds:(a,u)=>{if(u){const c=r[a],f=n[a];return c?f?k7(f,c):c:f||wA}return n[a]||wA}}},EM=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],o=n.nextPart.get(i);if(o){const f=EM(e,t+1,o);if(f)return f}const a=n.validators;if(a===null)return;const u=t===0?e.join(Gm):e.slice(t).join(Gm),c=a.length;for(let f=0;f<c;f++){const h=a[f];if(h.validator(u))return h.classGroupId}},D7=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?A7+r:void 0})(),T7=e=>{const{theme:t,classGroups:n}=e;return $7(n,t)},$7=(e,t)=>{const n=CM();for(const r in e){const i=e[r];Uw(i,n,r,t)}return n},Uw=(e,t,n,r)=>{const i=e.length;for(let o=0;o<i;o++){const a=e[o];M7(a,t,n,r)}},M7=(e,t,n,r)=>{if(typeof e=="string"){O7(e,t,n);return}if(typeof e=="function"){N7(e,t,n,r);return}L7(e,t,n,r)},O7=(e,t,n)=>{const r=e===""?t:kM(t,e);r.classGroupId=n},N7=(e,t,n,r)=>{if(j7(e)){Uw(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(_7(n,e))},L7=(e,t,n,r)=>{const i=Object.entries(e),o=i.length;for(let a=0;a<o;a++){const[u,c]=i[a];Uw(c,kM(t,u),n,r)}},kM=(e,t)=>{let n=e;const r=t.split(Gm),i=r.length;for(let o=0;o<i;o++){const a=r[o];let u=n.nextPart.get(a);u||(u=CM(),n.nextPart.set(a,u)),n=u}return n},j7=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,z7=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)}}},ox="!",SA=":",P7=[],CA=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),I7=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===SA){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(ox)?(g=p.slice(0,-1),y=!0):p.startsWith(ox)&&(g=p.slice(1),y=!0);const b=f&&f>c?f-c:void 0;return CA(o,y,g,b)};if(t){const i=t+SA,o=r;r=a=>a.startsWith(i)?o(a.slice(i.length)):CA(P7,!1,a,void 0,!0)}if(n){const i=r;r=o=>n({className:o,parseClassName:i})}return r},F7=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}},B7=e=>({cache:z7(e.cacheSize),parseClassName:I7(e),sortModifiers:F7(e),...R7(e)}),U7=/\s+/,H7=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:o}=t,a=[],u=e.trim().split(U7);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,w=r(S?b.substring(0,v):b);if(!w){if(!S){c=h+(c.length>0?" "+c:c);continue}if(w=r(b),!w){c=h+(c.length>0?" "+c:c);continue}S=!1}const A=g.length===0?"":g.length===1?g[0]:o(g).join(":"),k=y?A+ox:A,R=k+w;if(a.indexOf(R)>-1)continue;a.push(R);const D=i(w,S);for(let T=0;T<D.length;++T){const $=D[T];a.push(k+$)}c=h+(c.length>0?" "+c:c)}return c},q7=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=_M(n))&&(i&&(i+=" "),i+=r);return i},_M=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=_M(e[r]))&&(n&&(n+=" "),n+=t);return n},G7=(e,...t)=>{let n,r,i,o;const a=c=>{const f=t.reduce((h,p)=>p(h),e());return n=B7(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=H7(c,n);return i(c,h),h};return o=a,(...c)=>o(q7(...c))},V7=[],An=e=>{const t=n=>n[e]||V7;return t.isThemeGetter=!0,t},AM=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,RM=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Y7=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,W7=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,X7=/\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$/,K7=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Q7=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Z7=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ls=e=>Y7.test(e),pt=e=>!!e&&!Number.isNaN(Number(e)),js=e=>!!e&&Number.isInteger(Number(e)),vv=e=>e.endsWith("%")&&pt(e.slice(0,-1)),Oo=e=>W7.test(e),DM=()=>!0,J7=e=>X7.test(e)&&!K7.test(e),Hw=()=>!1,e9=e=>Q7.test(e),t9=e=>Z7.test(e),n9=e=>!Be(e)&&!He(e),r9=e=>Sa(e,MM,Hw),Be=e=>AM.test(e),Za=e=>Sa(e,OM,J7),EA=e=>Sa(e,f9,pt),i9=e=>Sa(e,LM,DM),o9=e=>Sa(e,NM,Hw),kA=e=>Sa(e,TM,Hw),s9=e=>Sa(e,$M,t9),Dp=e=>Sa(e,jM,e9),He=e=>RM.test(e),Hf=e=>Hl(e,OM),a9=e=>Hl(e,NM),_A=e=>Hl(e,TM),l9=e=>Hl(e,MM),u9=e=>Hl(e,$M),Tp=e=>Hl(e,jM,!0),c9=e=>Hl(e,LM,!0),Sa=(e,t,n)=>{const r=AM.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Hl=(e,t,n=!1)=>{const r=RM.exec(e);return r?r[1]?t(r[1]):n:!1},TM=e=>e==="position"||e==="percentage",$M=e=>e==="image"||e==="url",MM=e=>e==="length"||e==="size"||e==="bg-size",OM=e=>e==="length",f9=e=>e==="number",NM=e=>e==="family-name",LM=e=>e==="number"||e==="weight",jM=e=>e==="shadow",d9=()=>{const e=An("color"),t=An("font"),n=An("text"),r=An("font-weight"),i=An("tracking"),o=An("leading"),a=An("breakpoint"),u=An("container"),c=An("spacing"),f=An("radius"),h=An("shadow"),p=An("inset-shadow"),g=An("text-shadow"),y=An("drop-shadow"),b=An("blur"),v=An("perspective"),S=An("aspect"),w=An("ease"),A=An("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],D=()=>[...R(),He,Be],T=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto","contain","none"],N=()=>[He,Be,c],F=()=>[Ls,"full","auto",...N()],j=()=>[js,"none","subgrid",He,Be],z=()=>["auto",{span:["full",js,He,Be]},js,He,Be],M=()=>[js,"auto",He,Be],q=()=>["auto","min","max","fr",He,Be],V=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],U=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...N()],P=()=>[Ls,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],G=()=>[Ls,"screen","full","dvw","lvw","svw","min","max","fit",...N()],W=()=>[Ls,"screen","full","lh","dvh","lvh","svh","min","max","fit",...N()],L=()=>[e,He,Be],Y=()=>[...R(),_A,kA,{position:[He,Be]}],Q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],B=()=>["auto","cover","contain",l9,r9,{size:[He,Be]}],ae=()=>[vv,Hf,Za],te=()=>["","none","full",f,He,Be],me=()=>["",pt,Hf,Za],Ce=()=>["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"],pe=()=>[pt,vv,_A,kA],Oe=()=>["","none",b,He,Be],Pe=()=>["none",pt,He,Be],Z=()=>["none",pt,He,Be],K=()=>[pt,He,Be],ee=()=>[Ls,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Oo],breakpoint:[Oo],color:[DM],container:[Oo],"drop-shadow":[Oo],ease:["in","out","in-out"],font:[n9],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Oo],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Oo],shadow:[Oo],spacing:["px",pt],text:[Oo],"text-shadow":[Oo],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ls,Be,He,S]}],container:["container"],columns:[{columns:[pt,Be,He,u]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"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:D()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:F()}],"inset-x":[{"inset-x":F()}],"inset-y":[{"inset-y":F()}],start:[{"inset-s":F(),start:F()}],end:[{"inset-e":F(),end:F()}],"inset-bs":[{"inset-bs":F()}],"inset-be":[{"inset-be":F()}],top:[{top:F()}],right:[{right:F()}],bottom:[{bottom:F()}],left:[{left:F()}],visibility:["visible","invisible","collapse"],z:[{z:[js,"auto",He,Be]}],basis:[{basis:[Ls,"full","auto",u,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[pt,Ls,"auto","initial","none",Be]}],grow:[{grow:["",pt,He,Be]}],shrink:[{shrink:["",pt,He,Be]}],order:[{order:[js,"first","last","none",He,Be]}],"grid-cols":[{"grid-cols":j()}],"col-start-end":[{col:z()}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":j()}],"row-start-end":[{row:z()}],"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":q()}],"auto-rows":[{"auto-rows":q()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...V(),"normal"]}],"justify-items":[{"justify-items":[...U(),"normal"]}],"justify-self":[{"justify-self":["auto",...U()]}],"align-content":[{content:["normal",...V()]}],"align-items":[{items:[...U(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...U(),{baseline:["","last"]}]}],"place-content":[{"place-content":V()}],"place-items":[{"place-items":[...U(),"baseline"]}],"place-self":[{"place-self":["auto",...U()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pbs:[{pbs:N()}],pbe:[{pbe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mbs:[{mbs:I()}],mbe:[{mbe:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:P()}],"inline-size":[{inline:["auto",...G()]}],"min-inline-size":[{"min-inline":["auto",...G()]}],"max-inline-size":[{"max-inline":["none",...G()]}],"block-size":[{block:["auto",...W()]}],"min-block-size":[{"min-block":["auto",...W()]}],"max-block-size":[{"max-block":["none",...W()]}],w:[{w:[u,"screen",...P()]}],"min-w":[{"min-w":[u,"screen","none",...P()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[a]},...P()]}],h:[{h:["screen","lh",...P()]}],"min-h":[{"min-h":["screen","lh","none",...P()]}],"max-h":[{"max-h":["screen","lh",...P()]}],"font-size":[{text:["base",n,Hf,Za]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,c9,i9]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",vv,Be]}],"font-family":[{font:[a9,o9,t]}],"font-features":[{"font-features":[Be]}],"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,He,Be]}],"line-clamp":[{"line-clamp":[pt,"none",He,EA]}],leading:[{leading:[o,...N()]}],"list-image":[{"list-image":["none",He,Be]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",He,Be]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ce(),"wavy"]}],"text-decoration-thickness":[{decoration:[pt,"from-font","auto",He,Za]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[pt,"auto",He,Be]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",He,Be]}],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",He,Be]}],"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:Q()}],"bg-size":[{bg:B()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},js,He,Be],radial:["",He,Be],conic:[js,He,Be]},u9,s9]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:ae()}],"gradient-via-pos":[{via:ae()}],"gradient-to-pos":[{to:ae()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:te()}],"rounded-s":[{"rounded-s":te()}],"rounded-e":[{"rounded-e":te()}],"rounded-t":[{"rounded-t":te()}],"rounded-r":[{"rounded-r":te()}],"rounded-b":[{"rounded-b":te()}],"rounded-l":[{"rounded-l":te()}],"rounded-ss":[{"rounded-ss":te()}],"rounded-se":[{"rounded-se":te()}],"rounded-ee":[{"rounded-ee":te()}],"rounded-es":[{"rounded-es":te()}],"rounded-tl":[{"rounded-tl":te()}],"rounded-tr":[{"rounded-tr":te()}],"rounded-br":[{"rounded-br":te()}],"rounded-bl":[{"rounded-bl":te()}],"border-w":[{border:me()}],"border-w-x":[{"border-x":me()}],"border-w-y":[{"border-y":me()}],"border-w-s":[{"border-s":me()}],"border-w-e":[{"border-e":me()}],"border-w-bs":[{"border-bs":me()}],"border-w-be":[{"border-be":me()}],"border-w-t":[{"border-t":me()}],"border-w-r":[{"border-r":me()}],"border-w-b":[{"border-b":me()}],"border-w-l":[{"border-l":me()}],"divide-x":[{"divide-x":me()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":me()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ce(),"hidden","none"]}],"divide-style":[{divide:[...Ce(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-bs":[{"border-bs":L()}],"border-color-be":[{"border-be":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...Ce(),"none","hidden"]}],"outline-offset":[{"outline-offset":[pt,He,Be]}],"outline-w":[{outline:["",pt,Hf,Za]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",h,Tp,Dp]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",p,Tp,Dp]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:me()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[pt,Za]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":me()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",g,Tp,Dp]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[pt,He,Be]}],"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":[pt]}],"mask-image-linear-from-pos":[{"mask-linear-from":pe()}],"mask-image-linear-to-pos":[{"mask-linear-to":pe()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":pe()}],"mask-image-t-to-pos":[{"mask-t-to":pe()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":pe()}],"mask-image-r-to-pos":[{"mask-r-to":pe()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":pe()}],"mask-image-b-to-pos":[{"mask-b-to":pe()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":pe()}],"mask-image-l-to-pos":[{"mask-l-to":pe()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":pe()}],"mask-image-x-to-pos":[{"mask-x-to":pe()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":pe()}],"mask-image-y-to-pos":[{"mask-y-to":pe()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[He,Be]}],"mask-image-radial-from-pos":[{"mask-radial-from":pe()}],"mask-image-radial-to-pos":[{"mask-radial-to":pe()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":R()}],"mask-image-conic-pos":[{"mask-conic":[pt]}],"mask-image-conic-from-pos":[{"mask-conic-from":pe()}],"mask-image-conic-to-pos":[{"mask-conic-to":pe()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Y()}],"mask-repeat":[{mask:Q()}],"mask-size":[{mask:B()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",He,Be]}],filter:[{filter:["","none",He,Be]}],blur:[{blur:Oe()}],brightness:[{brightness:[pt,He,Be]}],contrast:[{contrast:[pt,He,Be]}],"drop-shadow":[{"drop-shadow":["","none",y,Tp,Dp]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",pt,He,Be]}],"hue-rotate":[{"hue-rotate":[pt,He,Be]}],invert:[{invert:["",pt,He,Be]}],saturate:[{saturate:[pt,He,Be]}],sepia:[{sepia:["",pt,He,Be]}],"backdrop-filter":[{"backdrop-filter":["","none",He,Be]}],"backdrop-blur":[{"backdrop-blur":Oe()}],"backdrop-brightness":[{"backdrop-brightness":[pt,He,Be]}],"backdrop-contrast":[{"backdrop-contrast":[pt,He,Be]}],"backdrop-grayscale":[{"backdrop-grayscale":["",pt,He,Be]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[pt,He,Be]}],"backdrop-invert":[{"backdrop-invert":["",pt,He,Be]}],"backdrop-opacity":[{"backdrop-opacity":[pt,He,Be]}],"backdrop-saturate":[{"backdrop-saturate":[pt,He,Be]}],"backdrop-sepia":[{"backdrop-sepia":["",pt,He,Be]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",He,Be]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[pt,"initial",He,Be]}],ease:[{ease:["linear","initial",w,He,Be]}],delay:[{delay:[pt,He,Be]}],animate:[{animate:["none",A,He,Be]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,He,Be]}],"perspective-origin":[{"perspective-origin":D()}],rotate:[{rotate:Pe()}],"rotate-x":[{"rotate-x":Pe()}],"rotate-y":[{"rotate-y":Pe()}],"rotate-z":[{"rotate-z":Pe()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:K()}],"skew-x":[{"skew-x":K()}],"skew-y":[{"skew-y":K()}],transform:[{transform:[He,Be,"","none","gpu","cpu"]}],"transform-origin":[{origin:D()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ee()}],"translate-x":[{"translate-x":ee()}],"translate-y":[{"translate-y":ee()}],"translate-z":[{"translate-z":ee()}],"translate-none":["translate-none"],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"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",He,Be]}],"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":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mbs":[{"scroll-mbs":N()}],"scroll-mbe":[{"scroll-mbe":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pbs":[{"scroll-pbs":N()}],"scroll-pbe":[{"scroll-pbe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"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",He,Be]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[pt,Hf,Za,EA]}],stroke:[{stroke:["none",...L()]}],"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"]}},h9=G7(d9),zM=E7({hooks:{onComplete:e=>h9(e)}}),Mr=zM.cva;function Ie(...e){const t=zM.cx(...e);return t.trim()?t:void 0}const PM=({render:e,children:t,props:n,fallbackElement:r="div"})=>C.isValidElement(e)?C.cloneElement(e,{...n,children:t??e.props.children,className:Ie(e.props.className,n.className),style:{...e.props.style,...n.style}}):C.createElement(r,n,t),p9=["evenly","fullwidth","fullheight","fullscreen"],m9=["ax","ay","direction"],g9={property:"justifyContent",values:["space-around","baseline","space-between","center","end","evenly","normal","start","stretch"]},y9={property:"alignItems",values:["baseline","center","end","start","stretch"]},b9={property:"flexDirection",values:["column","row"]},v9=["b","bx","bl","br","by","bt","bb"],x9={property:"borderWidth"},w9={property:"borderInlineWidth"},S9={property:"borderInlineStartWidth"},C9={property:"borderInlineEndWidth"},E9={property:"borderBlockWidth"},k9={property:"borderBlockStartWidth"},_9={property:"borderBlockEndWidth"},A9=["gap","m","mx","ml","mr","my","mt","mb","p","px","pl","pr","py","pt","pb"],R9={property:"gap",unit:{variable:"--spacing-unit"}},D9={property:"margin",unit:{variable:"--spacing-unit"}},T9={property:"marginInline",unit:{variable:"--spacing-inline"}},$9={property:"marginInlineStart",unit:{variable:"--spacing-inline"}},M9={property:"marginInlineEnd",unit:{variable:"--spacing-inline"}},O9={property:"marginBlock",unit:{variable:"--spacing-block"}},N9={property:"marginBlockStart",unit:{variable:"--spacing-block"}},L9={property:"marginBlockEnd",unit:{variable:"--spacing-block"}},j9={property:"padding",unit:{variable:"--spacing-unit"}},z9={property:"paddingInline",unit:{variable:"--spacing-inline"}},P9={property:"paddingInlineStart",unit:{variable:"--spacing-inline"}},I9={property:"paddingInlineEnd",unit:{variable:"--spacing-inline"}},F9={property:"paddingBlock",unit:{variable:"--spacing-block"}},B9={property:"paddingBlockStart",unit:{variable:"--spacing-block"}},U9={property:"paddingBlockEnd",unit:{variable:"--spacing-block"}},H9=["w","minw","maxw","h","minh","maxh"],q9={property:"width"},G9={property:"minWidth"},V9={property:"maxWidth"},Y9={property:"height"},W9={property:"minHeight"},X9={property:"maxHeight"},IM={b:x9,bx:w9,bl:S9,br:C9,by:E9,bt:k9,bb:_9,ax:g9,ay:y9,direction:b9,gap:R9,m:D9,mx:T9,ml:$9,mr:M9,my:O9,mt:N9,mb:L9,p:j9,px:z9,pl:P9,pr:I9,py:F9,pt:B9,pb:U9,w:q9,minw:G9,maxw:V9,h:Y9,minh:W9,maxh:X9},K9=Object.keys(IM);({...Object.fromEntries(A9.map(e=>[e,"spacing"])),...Object.fromEntries(m9.map(e=>[e,"layout"])),...Object.fromEntries(H9.map(e=>[e,"sizing"])),...Object.fromEntries(v9.map(e=>[e,"border"])),...Object.fromEntries(p9.map(e=>[e,"toggle"]))});function FM({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=IM[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 Q9="_box_1f7bt_1",Fs={box:Q9,"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"},Z9=Mr({variants:{bordered:{true:Fs["toggle-bordered"]},evenly:{true:Fs["toggle-evenly"]},rounded:{true:Fs["toggle-rounded"]},square:{true:Fs["toggle-square"]},fullheight:{true:Fs["toggle-fullheight"]},fullwidth:{true:Fs["toggle-fullwidth"]},fullscreen:{true:Fs["toggle-fullscreen"]}}}),Qo=({bordered:e,evenly:t,fullwidth:n,fullheight:r,fullscreen:i,rounded:o,square:a,render:u,className:c,children:f,...h})=>{const p=FM({componentName:"box",styleProps:K9,props:h});return PM({fallbackElement:"div",props:{...p,className:Ie(Fs.box,Z9({bordered:e,evenly:t,fullwidth:n,fullheight:r,fullscreen:i,rounded:o,square:a}),c)},render:u,children:f})};Qo.displayName="Box";function Kr({condition:e,render:t,children:n}){if(!e||!t)return _.jsx(_.Fragment,{children:n});const r=n??t.props.children;return C.cloneElement(t,void 0,r)}Kr.displayName="ConditionalRender";const J9="_group_h0evt_1",eB={group:J9},tt=({className:e,...t})=>_.jsx(Qo,{"data-slot":"group",className:Ie(eB.group,e),...t});tt.displayName="Group";const tB="_layer_hu2g5_1",nB={layer:tB},qw=({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 _.jsx(Qo,{"data-slot":"layer",className:Ie(nB.layer,t),style:o,...i,children:r})};qw.displayName="Layer";const rB="_text_opfqd_3",iB="_colored_opfqd_138",yt={text:rB,"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:iB,"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"},Gw={red:yt["color-red"],orange:yt["color-orange"],yellow:yt["color-yellow"],green:yt["color-green"],blue:yt["color-blue"],indigo:yt["color-indigo"],purple:yt["color-purple"],neutral:yt["color-neutral"]},oB=yt.colored,sB=Object.fromEntries(Object.entries(Gw).map(([e,t])=>[e,`${t} ${oB}`])),aB=Mr({variants:{strikethrough:{true:yt["toggle-strikethrough"]},balance:{true:yt["toggle-balance"]},truncate:{true:yt["toggle-truncate"]},underline:{true:yt["toggle-underline"],false:yt["toggle-no-underline"]},family:{mono:yt["family-mono"],serif:yt["family-serif"],sans:yt["family-sans"]},weight:{thin:yt["weight-thin"],light:yt["weight-light"],normal:yt["weight-normal"],medium:yt["weight-medium"],semibold:yt["weight-semibold"],bold:yt["weight-bold"]},shade:{background:yt["shade-background"],surface:yt["shade-surface"],accent:yt["shade-accent"],halftone:yt["shade-halftone"],muted:yt["shade-muted"],foreground:yt["shade-foreground"]},color:sB,size:{[-1]:yt["text-size--1"],0:yt["text-size-0"],1:yt["text-size-1"],2:yt["text-size-2"],3:yt["text-size-3"],4:yt["text-size-4"],5:yt["text-size-5"],6:yt["text-size-6"]}}}),lB=0,uB="sans",ze=({shade:e,color:t,weight:n,underline:r,strikethrough:i,balance:o,truncate:a,size:u=lB,family:c=uB,render:f,className:h,children:p,...g})=>{const y=FM({componentName:"text",styleProps:["p","px","py","pl","pr","pt","pb","m","mx","my","ml","mr","mt","mb"],props:g});return PM({fallbackElement:"span",props:{...y,className:Ie(yt.text,aB({shade:e,color:t,size:u,weight:n,family:c,balance:o,truncate:a,underline:r,strikethrough:i}),h)},render:f,children:p})},cB="_stack_1svur_1",fB={stack:cB},Ve=({ax:e,ay:t,className:n,...r})=>_.jsx(Qo,{"data-slot":"stack",ax:t,ay:e,className:Ie(fB.stack,n),...r});Ve.displayName="Stack";const Vw=({condition:e,render:t,children:n,...r})=>{const i=e?t.true:t.false;if(!i)return _.jsx(_.Fragment,{children:n});const o=n??i.props.children;return C.cloneElement(i,r,o)};Vw.displayName="SwitchRender";const dB="_separator_1u3u3_1",hB="_line_1u3u3_34",gi={separator:dB,"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:hB,"line-horizontal":"_line-horizontal_1u3u3_37","line-vertical":"_line-vertical_1u3u3_40"},AA=Mr({variants:{orientation:{horizontal:gi["orientation-horizontal"],vertical:gi["orientation-vertical"]},shade:{background:gi["shade-background"],surface:gi["shade-surface"],accent:gi["shade-accent"],halftone:gi["shade-halftone"],muted:gi["shade-muted"],foreground:gi["shade-foreground"]}}}),RA={};function BM(e,t){const n=C.useRef(RA);return n.current===RA&&(n.current=e(t)),n}function DA(e,t,n,r){const i=BM(UM).current;return mB(i,e,t,n,r)&&HM(i,[e,t,n,r]),i.callback}function pB(e){const t=BM(UM).current;return gB(t,e)&&HM(t,e),t.callback}function UM(){return{callback:null,cleanup:null,refs:[]}}function mB(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function gB(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function HM(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 yB=parseInt(C.version,10);function bB(e){return yB>=e}function TA(e){if(!C.isValidElement(e))return null;const t=e,n=t.props;return(bB(19)?n==null?void 0:n.ref:t.ref)??null}function sx(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function vB(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 xB(e,t){return typeof e=="function"?e(t):e}function wB(e,t){return typeof e=="function"?e(t):e}const Bu=Object.freeze({}),nd={};function SB(e,t,n,r,i){let o={...ax(e,nd)};return t&&(o=qM(o,t)),o}function CB(e){if(e.length===0)return nd;if(e.length===1)return ax(e[0],nd);let t={...ax(e[0],nd)};for(let n=1;n<e.length;n+=1)t=qM(t,e[n]);return t}function qM(e,t){return GM(t)?t(e):EB(e,t)}function EB(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=sx(e.style,r);break}case"className":{e[n]=VM(e.className,r);break}default:kB(n,r)?e[n]=_B(e[n],r):e[n]=r}}return e}function kB(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 GM(e){return typeof e=="function"}function ax(e,t){return GM(e)?e(t):e??nd}function _B(e,t){return t?e?n=>{if(RB(n)){const i=n;AB(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 AB(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function VM(e,t){return t?e?t+" "+e:t:e}function RB(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function DB(e,t,n={}){const r=t.render,i=TB(t,n);if(n.enabled===!1)return null;const o=n.state??Bu;return MB(e,r,i,o)}function TB(e,t={}){const{className:n,style:r,render:i}=e,{state:o=Bu,ref:a,props:u,stateAttributesMapping:c,enabled:f=!0}=t,h=f?xB(n,o):void 0,p=f?wB(r,o):void 0,g=f?vB(o,c):Bu,y=f?sx(g,Array.isArray(u)?CB(u):u)??Bu:Bu;return typeof document<"u"&&(f?Array.isArray(a)?y.ref=pB([y.ref,TA(i),...a]):y.ref=DA(y.ref,TA(i),a):DA(null,null)),f?(h!==void 0&&(y.className=VM(y.className,h)),p!==void 0&&(y.style=sx(y.style,p)),y):Bu}const $B=Symbol.for("react.lazy");function MB(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=SB(n,t.props);i.ref=n.ref;let o=t;return(o==null?void 0:o.$$typeof)===$B&&(o=C.Children.toArray(t)[0]),C.cloneElement(o,i)}return OB(e,n)}function OB(e,t){return C.createElement(e,t)}const NB=C.forwardRef(function(e,t){const{className:n,render:r,orientation:i="horizontal",...o}=e;return DB("div",e,{state:{orientation:i},ref:t,props:[{role:"separator","aria-orientation":i},o]})}),Yw=({shade:e,orientation:t="horizontal",className:n,children:r,render:i,...o})=>{if(r){const a=Ie(gi.separator,gi.line,gi[`line-${t}`],AA({shade:e}));return _.jsxs(Vw,{condition:t==="horizontal",render:{true:_.jsx(tt,{ay:"center",gap:2,fullwidth:!0}),false:_.jsx(Ve,{ax:"center",gap:2,fullheight:!0})},role:"separator","data-slot":"separator","data-orientation":t,className:n,...o,children:[_.jsx(Qo,{className:a}),_.jsx(Kr,{condition:typeof r=="string",render:_.jsx(ze,{shade:"muted",weight:"bold"}),children:r}),_.jsx(Qo,{className:a})]})}return _.jsx(NB,{"data-slot":"separator",render:i??_.jsx(Qo,{}),className:Ie(gi.separator,AA({shade:e,orientation:t}),n),"data-orientation":t,...o})};Yw.displayName="Separator";const LB="_button_1gilt_3 _disabled_1m2av_2",jB="_fullwidth_1gilt_129",Cr={button:LB,"button-content-container":"_button-content-container_1gilt_46","button-spinner":"_button-spinner_1gilt_58","variant-subtle":"_variant-subtle_1gilt_72","variant-ghost":"_variant-ghost_1gilt_81","variant-inverted":"_variant-inverted_1gilt_91","size-xsmall":"_size-xsmall_1gilt_101 _size-xsmall_1m2av_12","size-small":"_size-small_1gilt_104 _size-small_1m2av_17","size-medium":"_size-medium_1gilt_107 _size-medium_1m2av_22","size-large":"_size-large_1gilt_110 _size-large_1m2av_27","shape-pill":"_shape-pill_1gilt_114","shape-square":"_shape-square_1gilt_118","shape-circle":"_shape-circle_1gilt_123",fullwidth:jB},zB="medium",PB=Mr({variants:{shape:{pill:Cr["shape-pill"],square:Cr["shape-square"],circle:Cr["shape-circle"]},fullwidth:{true:Cr.fullwidth},variant:{subtle:Cr["variant-subtle"],ghost:Cr["variant-ghost"],inverted:Cr["variant-inverted"]},size:{xsmall:Cr["size-xsmall"],small:Cr["size-small"],medium:Cr["size-medium"],large:Cr["size-large"]}},defaultVariants:{size:zB}}),YM=({loading:e,children:t,...n})=>_.jsx(tt,{"data-slot":"button-content-container",className:Cr["button-content-container"],"data-loading":e,"aria-hidden":e,ay:"center",gap:2,...n,children:t});YM.displayName="ButtonContentContainer";function IB(){return typeof window<"u"}function FB(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function BB(e){return IB()?e instanceof HTMLElement||e instanceof FB(e).HTMLElement:!1}const $A={};function Ww(e,t){const n=C.useRef($A);return n.current===$A&&(n.current=e(t)),n}const xv=wa[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],UB=xv&&xv!==C.useLayoutEffect?xv:e=>e();function lx(e){const t=Ww(HB).current;return t.next=e,UB(t.effect),t.trampoline}function HB(){const e={next:void 0,callback:qB,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function qB(){}const GB={...wa},VB=()=>{},ux=typeof document<"u"?C.useLayoutEffect:VB;function Xw(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 YB=C.createContext(void 0);function WM(e=!1){const t=C.useContext(YB);if(t===void 0&&!e)throw new Error(Xw(16));return t}function WB(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 cx(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const rd={};function XM(e,t,n,r,i){let o={...fx(e,rd)};return t&&(o=Sm(o,t)),n&&(o=Sm(o,n)),r&&(o=Sm(o,r)),o}function XB(e){if(e.length===0)return rd;if(e.length===1)return fx(e[0],rd);let t={...fx(e[0],rd)};for(let n=1;n<e.length;n+=1)t=Sm(t,e[n]);return t}function Sm(e,t){return KM(t)?t(e):KB(e,t)}function KB(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=cx(e.style,r);break}case"className":{e[n]=QM(e.className,r);break}default:QB(n,r)?e[n]=ZB(e[n],r):e[n]=r}}return e}function QB(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 KM(e){return typeof e=="function"}function fx(e,t){return KM(e)?e(t):e??rd}function ZB(e,t){return t?e?n=>{if(JB(n)){const i=n;dx(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 dx(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function QM(e,t){return t?e?t+" "+e:t:e}function JB(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function ZM(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,o=C.useRef(null),a=WM(!0)!==void 0,u=lx(()=>{const g=o.current;return!!((g==null?void 0:g.tagName)==="A"&&(g!=null&&g.href))}),{props:c}=WB({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:i}),f=C.useCallback(()=>{const g=o.current;eU(g)&&a&&t&&c.disabled===void 0&&g.disabled&&(g.disabled=!1)},[t,c.disabled,a]);ux(f,[f]);const h=C.useCallback((g={})=>{const{onClick:y,onMouseDown:b,onKeyUp:v,onKeyDown:S,onPointerDown:w,...A}=g;return XM({type:i?"button":void 0,onClick(k){if(t){k.preventDefault();return}y==null||y(k)},onMouseDown(k){t||(b==null||b(k))},onKeyDown(k){if(t||(dx(k),S==null||S(k)),k.baseUIHandlerPrevented)return;const R=k.target===k.currentTarget&&!i&&!u()&&!t,D=k.key==="Enter",T=k.key===" ";R&&((T||D)&&k.preventDefault(),D&&(y==null||y(k)))},onKeyUp(k){t||(dx(k),v==null||v(k)),!k.baseUIHandlerPrevented&&k.target===k.currentTarget&&!i&&!t&&k.key===" "&&(y==null||y(k))},onPointerDown(k){if(t){k.preventDefault();return}w==null||w(k)}},i?void 0:{role:"button"},c,A)},[t,c,i,u]),p=lx(g=>{o.current=g,f()});return{getButtonProps:h,buttonRef:p}}function eU(e){return BB(e)&&e.tagName==="BUTTON"}function hx(e,t,n,r){const i=Ww(JM).current;return nU(i,e,t,n,r)&&e3(i,[e,t,n,r]),i.callback}function tU(e){const t=Ww(JM).current;return rU(t,e)&&e3(t,e),t.callback}function JM(){return{callback:null,cleanup:null,refs:[]}}function nU(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function rU(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function e3(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 iU=parseInt(C.version,10);function oU(e){return iU>=e}function MA(e){if(!C.isValidElement(e))return null;const t=e,n=t.props;return(oU(19)?n==null?void 0:n.ref:t.ref)??null}function sU(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 aU(e,t){return typeof e=="function"?e(t):e}function lU(e,t){return typeof e=="function"?e(t):e}const OA=Object.freeze([]),Vs=Object.freeze({});function Kw(e,t,n={}){const r=t.render,i=uU(t,n);if(n.enabled===!1)return null;const o=n.state??Vs;return fU(e,r,i,o)}function uU(e,t={}){const{className:n,style:r,render:i}=e,{state:o=Vs,ref:a,props:u,stateAttributesMapping:c,enabled:f=!0}=t,h=f?aU(n,o):void 0,p=f?lU(r,o):void 0,g=f?sU(o,c):Vs,y=f?cx(g,Array.isArray(u)?XB(u):u)??Vs:Vs;return typeof document<"u"&&(f?Array.isArray(a)?y.ref=tU([y.ref,MA(i),...a]):y.ref=hx(y.ref,MA(i),a):hx(null,null)),f?(h!==void 0&&(y.className=QM(y.className,h)),p!==void 0&&(y.style=cx(y.style,p)),y):Vs}const cU=Symbol.for("react.lazy");function fU(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=XM(n,t.props);i.ref=n.ref;let o=t;return(o==null?void 0:o.$$typeof)===cU&&(o=C.Children.toArray(t)[0]),C.cloneElement(o,i)}if(e&&typeof e=="string")return dU(e,n);throw new Error(Xw(8))}function dU(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 hU=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}=ZM({disabled:i,focusableWhenDisabled:o,native:a});return Kw("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 t3=(...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 pU=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 mU=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 NA=e=>{const t=mU(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 gU={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 yU=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 bU=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,...gU,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:t3("lucide",i),...!o&&!yU(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 ct=(e,t)=>{const n=C.forwardRef(({className:r,...i},o)=>C.createElement(bU,{ref:o,iconNode:t,className:t3(`lucide-${pU(NA(e))}`,`lucide-${e}`,r),...i}));return n.displayName=NA(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 vU=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],xU=ct("activity",vU);/**
|
|
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 wU=[["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"}]],SU=ct("archive-restore",wU);/**
|
|
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 CU=[["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"}]],EU=ct("archive",CU);/**
|
|
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 kU=[["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"}]],_U=ct("arrow-left-right",kU);/**
|
|
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 AU=[["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"}]],RU=ct("case-sensitive",AU);/**
|
|
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 DU=[["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"}]],TU=ct("chart-gantt",DU);/**
|
|
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 $U=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],qg=ct("check",$U);/**
|
|
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 MU=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],OU=ct("chevrons-up-down",MU);/**
|
|
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 NU=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],LU=ct("circle-check",NU);/**
|
|
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 jU=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],zU=ct("circle-dot",jU);/**
|
|
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 PU=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],IU=ct("circle-question-mark",PU);/**
|
|
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 FU=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],BU=ct("circle-x",FU);/**
|
|
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 UU=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],n3=ct("clock",UU);/**
|
|
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 HU=[["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"}]],r3=ct("copy",HU);/**
|
|
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 qU=[["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"}]],GU=ct("cpu",qU);/**
|
|
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 VU=[["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"}]],YU=ct("eye-off",VU);/**
|
|
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 WU=[["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"}]],XU=ct("eye",WU);/**
|
|
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 KU=[["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"}]],i3=ct("file-diff",KU);/**
|
|
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 QU=[["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"}]],o3=ct("files",QU);/**
|
|
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 ZU=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],JU=ct("folder",ZU);/**
|
|
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 eH=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],tH=ct("git-branch",eH);/**
|
|
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 nH=[["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"}]],rH=ct("grip-vertical",nH);/**
|
|
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 iH=[["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"}]],oH=ct("group",iH);/**
|
|
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 sH=[["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"}]],aH=ct("handshake",sH);/**
|
|
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 lH=[["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"}]],uH=ct("hourglass",lH);/**
|
|
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 cH=[["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"}]],fH=ct("message-square-more",cH);/**
|
|
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 dH=[["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"}]],hH=ct("message-square",dH);/**
|
|
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 pH=[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]],mH=ct("messages-square",pH);/**
|
|
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 gH=[["path",{d:"M5 12h14",key:"1ays0h"}]],yH=ct("minus",gH);/**
|
|
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 bH=[["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"}]],vH=ct("monitor",bH);/**
|
|
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 xH=[["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"}]],wH=ct("moon",xH);/**
|
|
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 SH=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],CH=ct("panel-right",SH);/**
|
|
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 EH=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],kH=ct("pencil",EH);/**
|
|
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 _H=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],AH=ct("play",_H);/**
|
|
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 RH=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],DH=ct("search",RH);/**
|
|
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 TH=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],$H=ct("sparkles",TH);/**
|
|
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 MH=[["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"}]],OH=ct("sun",MH);/**
|
|
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 NH=[["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"}]],LH=ct("tags",NH);/**
|
|
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 jH=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],zH=ct("terminal",jH);/**
|
|
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 PH=[["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"}]],LA=ct("text-wrap",PH);/**
|
|
307
|
+
* @license lucide-react v0.564.0 - ISC
|
|
308
|
+
*
|
|
309
|
+
* This source code is licensed under the ISC license.
|
|
310
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
311
|
+
*/const IH=[["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"}]],FH=ct("trash-2",IH);/**
|
|
312
|
+
* @license lucide-react v0.564.0 - ISC
|
|
313
|
+
*
|
|
314
|
+
* This source code is licensed under the ISC license.
|
|
315
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
316
|
+
*/const BH=[["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"}]],UH=ct("triangle-alert",BH);/**
|
|
317
|
+
* @license lucide-react v0.564.0 - ISC
|
|
318
|
+
*
|
|
319
|
+
* This source code is licensed under the ISC license.
|
|
320
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
321
|
+
*/const HH=[["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"}]],s3=ct("wrench",HH),a3=({size:e=14,fill:t="currentColor",...n})=>_.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:t,viewBox:"0 0 24 24",width:e,height:e,...n,children:[_.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}),_.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:_.jsx("animateTransform",{attributeName:"transform",dur:"0.75s",repeatCount:"indefinite",type:"rotate",values:"0 12 12;360 12 12"})})]});a3.displayName="LoadingSpinner";const l3=({loading:e,...t})=>_.jsx(a3,{"data-slot":"button-spinner",className:Cr["button-spinner"],"data-loading":e,"aria-hidden":e,...t});l3.displayName="ButtonSpinner";const qH="_card_1smyy_3",Tl={card:qH,"card-thumbnail":"_card-thumbnail_1smyy_39","card-lockup":"_card-lockup_1smyy_51","card-header-cell":"_card-header-cell_1smyy_56","card-action-cell":"_card-action-cell_1smyy_60","card-icon":"_card-icon_1smyy_64","card-action":"_card-action_1smyy_60"},u3=({gap:e=3,className:t,children:n,...r})=>_.jsx(Ve,{"data-slot":"card-container",gap:e,className:Ie(Tl.card,t),...r,children:n});u3.displayName="CardContainer";const c3=({className:e,children:t,...n})=>_.jsx(Ve,{"data-slot":"card-thumbnail",className:Ie(Tl["card-thumbnail"],e),ax:"stretch",fullwidth:!0,...n,children:t});c3.displayName="CardThumbnail";const f3=({children:e,...t})=>_.jsx(tt,{"data-slot":"card-header",ay:"start",gap:3,fullwidth:!0,...t,children:e});f3.displayName="CardHeader";const d3=({icon:e,render:t,className:n})=>_.jsx(Kr,{condition:!!t,render:t,children:e?_.jsx(e,{"data-slot":"card-icon",className:Ie(Tl["card-icon"],n)}):null});d3.displayName="CardIcon";const h3=({children:e,...t})=>_.jsx(ze,{"data-slot":"card-title",render:_.jsx("h3",{}),size:1,weight:"semibold",...t,children:e});h3.displayName="CardTitle";const p3=({children:e,...t})=>_.jsx(ze,{"data-slot":"card-description",render:_.jsx("p",{}),shade:"muted",balance:!0,...t,children:e});p3.displayName="CardDescription";const m3=({children:e,className:t,...n})=>_.jsx(tt,{"data-slot":"card-action",className:Ie(Tl["card-action"],t),gap:2,...n,children:e});m3.displayName="CardAction";const g3=({children:e,...t})=>_.jsxs(_.Fragment,{children:[_.jsx(Yw,{}),_.jsx(tt,{"data-slot":"card-footer",gap:2,fullwidth:!0,...t,children:e})]});g3.displayName="CardFooter";const an=({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 w=(f==null?void 0:f.children)||t,A=(c==null?void 0:c.children)||e,k=(p==null?void 0:p.children)||i,R=(h==null?void 0:h.icon)||r,D=!!R,T=!!A,$=!!k,N=!!w,F=D||T,j=F||N,z=j||$;return _.jsxs(u3,{...S,...a,children:[n&&_.jsx(c3,{mb:2,...y,children:n}),z&&_.jsxs(tt,{"data-slot":"card-header-region",ay:"start",gap:3,fullwidth:!0,children:[j&&_.jsxs(Ve,{className:Tl["card-lockup"],gap:1,children:[F&&_.jsxs(f3,{...u,children:[D&&_.jsx(wv,{children:_.jsx(d3,{icon:R,...h})}),T&&_.jsx(wv,{children:_.jsx(h3,{...c,children:A})})]}),N&&_.jsx(p3,{...f,children:w})]}),$&&_.jsx(wv,{ml:"auto",className:Tl["card-action-cell"],children:_.jsx(m3,{...p,children:k})})]}),v&&_.jsx(Ve,{"data-slot":"card-inner-container",fullwidth:!0,...b,children:v}),o&&_.jsx(g3,{...g,children:o})]})};an.displayName="Card";const wv=({children:e,className:t,...n})=>_.jsx(Ve,{className:Ie(Tl["card-header-cell"],t),ay:"center",...n,children:e}),jA={};function ti(e,t){const n=C.useRef(jA);return n.current===jA&&(n.current=e(t)),n}function y3(e){const t=C.useRef(!0);t.current&&(t.current=!1,e())}const Sv=wa[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],GH=Sv&&Sv!==C.useLayoutEffect?Sv:e=>e();function st(e){const t=ti(VH).current;return t.next=e,GH(t.effect),t.trampoline}function VH(){const e={next:void 0,callback:YH,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function YH(){}function Gg(){return typeof window<"u"}function Ca(e){return Qw(e)?(e.nodeName||"").toLowerCase():"#document"}function mn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function uo(e){var t;return(t=(Qw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Qw(e){return Gg()?e instanceof Node||e instanceof mn(e).Node:!1}function Lt(e){return Gg()?e instanceof Element||e instanceof mn(e).Element:!1}function kn(e){return Gg()?e instanceof HTMLElement||e instanceof mn(e).HTMLElement:!1}function px(e){return!Gg()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof mn(e).ShadowRoot}const WH=new Set(["inline","contents"]);function Ea(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Qr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!WH.has(i)}const XH=new Set(["table","td","th"]);function KH(e){return XH.has(Ca(e))}const QH=[":popover-open",":modal"];function Vg(e){return QH.some(t=>{try{return e.matches(t)}catch{return!1}})}const ZH=["transform","translate","scale","rotate","perspective"],JH=["transform","translate","scale","rotate","perspective","filter"],eq=["paint","layout","strict","content"];function Zw(e){const t=Yg(),n=Lt(e)?Qr(e):e;return ZH.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)||JH.some(r=>(n.willChange||"").includes(r))||eq.some(r=>(n.contain||"").includes(r))}function tq(e){let t=rs(e);for(;kn(t)&&!Zo(t);){if(Zw(t))return t;if(Vg(t))return null;t=rs(t)}return null}function Yg(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const nq=new Set(["html","body","#document"]);function Zo(e){return nq.has(Ca(e))}function Qr(e){return mn(e).getComputedStyle(e)}function Wg(e){return Lt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function rs(e){if(Ca(e)==="html")return e;const t=e.assignedSlot||e.parentNode||px(e)&&e.host||uo(e);return px(t)?t.host:t}function b3(e){const t=rs(e);return Zo(t)?e.ownerDocument?e.ownerDocument.body:e.body:kn(t)&&Ea(t)?t:b3(t)}function ha(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=b3(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=mn(i);if(o){const u=mx(a);return t.concat(a,a.visualViewport||[],Ea(i)?i:[],u&&n?ha(u):[])}return t.concat(i,ha(i,[],n))}function mx(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Oc=typeof navigator<"u",Cv=iq(),v3=sq(),x3=oq(),w3=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),S3=Cv.platform==="MacIntel"&&Cv.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(Cv.platform),C3=Oc&&/apple/i.test(navigator.vendor),gx=Oc&&/android/i.test(v3)||/android/i.test(x3),rq=Oc&&v3.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,E3=x3.includes("jsdom/");function iq(){if(!Oc)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 oq(){if(!Oc)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function sq(){if(!Oc)return"";const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform??""}function Nt(e){return(e==null?void 0:e.ownerDocument)||document}const aq=()=>{},Ct=typeof document<"u"?C.useLayoutEffect:aq,lq=[];function Xg(e){C.useEffect(e,lq)}const qf=0;let lo=class k3{constructor(){ie(this,"currentId",qf);ie(this,"clear",()=>{this.currentId!==qf&&(clearTimeout(this.currentId),this.currentId=qf)});ie(this,"disposeEffect",()=>this.clear)}static create(){return new k3}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=qf,n()},t)}isStarted(){return this.currentId!==qf}};function va(){const e=ti(lo.create).current;return Xg(e.disposeEffect),e}const $p=null;let uq=class{constructor(){ie(this,"callbacks",[]);ie(this,"callbacksCount",0);ie(this,"nextId",1);ie(this,"startId",1);ie(this,"isScheduled",!1);ie(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 Mp=new uq;let qs=class _3{constructor(){ie(this,"currentId",$p);ie(this,"cancel",()=>{this.currentId!==$p&&(Mp.cancel(this.currentId),this.currentId=$p)});ie(this,"disposeEffect",()=>this.cancel)}static create(){return new _3}static request(t){return Mp.request(t)}static cancel(t){return Mp.cancel(t)}request(t){this.cancel(),this.currentId=Mp.request(()=>{this.currentId=$p,t()})}};function Jw(){const e=ti(qs.create).current;return Xg(e.disposeEffect),e}function A3(){}const _r=Object.freeze({});let zA={},PA={},IA="";function cq(e){if(typeof document>"u")return!1;const t=Nt(e);return mn(t).innerWidth-t.documentElement.clientWidth>0}function fq(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const t=Nt(e),n=t.documentElement,r=t.body,i=Ea(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 dq(e){const t=Nt(e),n=t.documentElement,r=t.body,i=Ea(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 hq(e){var g;const t=Nt(e),n=t.documentElement,r=t.body,i=mn(n);let o=0,a=0,u=!1;const c=qs.create();if(w3&&(((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,zA={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},IA=n.style.scrollBehavior,PA={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,w=n.scrollWidth>n.clientWidth,A=y.overflowY==="scroll"||b.overflowY==="scroll",k=y.overflowX==="scroll"||b.overflowX==="scroll",R=Math.max(0,i.innerWidth-r.clientWidth),D=Math.max(0,i.innerHeight-r.clientHeight),T=parseFloat(b.marginTop)+parseFloat(b.marginBottom),$=parseFloat(b.marginLeft)+parseFloat(b.marginRight),N=Ea(n)?n:r;if(u=fq(e),u){n.style.scrollbarGutter=v,N.style.overflowY="hidden",N.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:v,overflowY:"hidden",overflowX:"hidden"}),(S||A)&&(n.style.overflowY="scroll"),(w||k)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:T||D?`calc(100dvh - ${T+D}px)`:"100dvh",width:$||R?`calc(100vw - ${$+R}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,zA),Object.assign(r.style,PA),u||(n.scrollTop=o,n.scrollLeft=a,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=IA)}function p(){h(),c.request(f)}return f(),i.addEventListener("resize",p),()=>{c.cancel(),h(),typeof i.removeEventListener=="function"&&i.removeEventListener("resize",p)}}let pq=class{constructor(){ie(this,"lockCount",0);ie(this,"restore",null);ie(this,"timeoutLock",lo.create());ie(this,"timeoutUnlock",lo.create());ie(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});ie(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=Nt(t).documentElement,r=mn(n).getComputedStyle(n).overflowY;if(r==="hidden"||r==="clip"){this.restore=A3;return}const i=S3||!cq(t);this.restore=i?dq(t):hq(t)}};const mq=new pq;function gq(e=!0,t=null){Ct(()=>{if(e)return mq.acquire(t)},[e,t])}function yq(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 bq(e){const[t,n]=C.useState(null),r=st((u,c)=>{e||n(c||(S3?"touch":""))}),i=C.useCallback(()=>{n(null)},[]),{onClick:o,onPointerDown:a}=yq(r);return C.useMemo(()=>({openMethod:t,reset:i,triggerProps:{onClick:o,onPointerDown:a}}),[t,i,o,a])}function Jt(e,t,n,r){let i=!1,o=!1;const a=_r;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 vq(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),Ct(()=>{if(!e&&o&&r!=="ending"&&n){const u=qs.request(()=>{i("ending")});return()=>{qs.cancel(u)}}},[e,o,r,n]),Ct(()=>{if(!e||t)return;const u=qs.request(()=>{i(void 0)});return()=>{qs.cancel(u)}},[t,e]),Ct(()=>{if(!e||!t)return;e&&o&&r!=="idle"&&i("starting");const u=qs.request(()=>{i("idle")});return()=>{qs.cancel(u)}},[t,e,o,i,r]),C.useMemo(()=>({mounted:o,setMounted:a,transitionStatus:r}),[o,r])}function Po(e){return e==null?e:"current"in e?e.current:e}let Td=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const xq={[Td.startingStyle]:""},wq={[Td.endingStyle]:""},Kg={transitionStatus(e){return e==="starting"?xq:e==="ending"?wq:null}};function Sq(e,t=!1,n=!0){const r=Jw();return st((i,o=null)=>{r.cancel();function a(){tr.flushSync(i)}const u=Po(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=Td.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 Qg(e){const{enabled:t=!0,open:n,ref:r,onComplete:i}=e,o=st(i),a=Sq(r,n,!1);C.useEffect(()=>{if(!t)return;const u=new AbortController;return a(o,u.signal),()=>{u.abort()}},[t,n,o,a])}function Cq(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 R3(e,t,n,r){const i=n.useState("isMountedByTrigger",e),o=Cq(e,n),a=st(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 Ct(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:a,isMountedByThisTrigger:i}}function D3(e){const t=e.useState("open");Ct(()=>{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 T3(e,t,n){const{mounted:r,setMounted:i,transitionStatus:o}=vq(e);t.useSyncedValues({mounted:r,transitionStatus:o});const a=st(()=>{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 Qg({enabled:!u,open:e,ref:t.context.popupRef,onComplete(){e||a()}}),{forceUnmount:a,transitionStatus:o}}const Eq={...wa};let FA=0;function kq(e,t="mui"){const[n,r]=C.useState(e),i=e||n;return C.useEffect(()=>{n==null&&(FA+=1,r(`${t}-${FA}`))},[n,t]),i}const BA=Eq.useId;function Nc(e,t){if(BA!==void 0){const n=BA();return e??(t?`${t}-${n}`:n)}return kq(e,t)}function _q(){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)}}}const Aq=C.createContext(null),Rq=C.createContext(null),Zg=()=>{var e;return((e=C.useContext(Aq))==null?void 0:e.id)||null},Zd=e=>{const t=C.useContext(Rq);return e??t};var Ev={exports:{}},kv={},UA;function Dq(){if(UA)return kv;UA=1;var e=ao;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 HA;function $3(){return HA||(HA=1,Ev.exports=Dq()),Ev.exports}var M3=$3(),_v={exports:{}},Av={},qA;function Tq(){if(qA)return Av;qA=1;var e=ao,t=$3();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 Av.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 w(T){if(!A){if(A=!0,k=T,T=g(T),y!==void 0&&v.hasValue){var $=v.value;if(y($,T))return R=$}return R=T}if($=R,r(k,T))return $;var N=g(T);return y!==void 0&&y($,N)?(k=T,$):(k=T,R=N)}var A=!1,k,R,D=p===void 0?null:p;return[function(){return w(h())},D===null?void 0:function(){return w(D())}]},[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},Av}var GA;function $q(){return GA||(GA=1,_v.exports=Tq()),_v.exports}var Mq=$q();const Oq=parseInt(C.version,10);function eS(e){return Oq>=e}const yx=[];let bx;function Nq(){return bx}function Lq(e){yx.push(e)}function O3(e){const t=(n,r)=>{const i=ti(zq).current;let o;try{bx=i;for(const a of yx)a.before(i);o=e(n,r);for(const a of yx)a.after(i);i.didInitialize=!0}finally{bx=void 0}return o};return t.displayName=e.displayName||e.name,t}function jq(e){return C.forwardRef(O3(e))}function zq(){return{didInitialize:!1}}const Pq=eS(19),Iq=Pq?Bq:Uq;function N3(e,t,n,r,i){return Iq(e,t,n,r,i)}function Fq(e,t,n,r,i){const o=C.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return M3.useSyncExternalStore(e.subscribe,o,o)}Lq({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()}}),M3.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Bq(e,t,n,r,i){const o=Nq();if(!o)return Fq(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 Uq(e,t,n,r,i){return Mq.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,o=>t(o,n,r,i))}let Hq=class{constructor(t){ie(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t)}));ie(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 N3(this,t,n,r,i)}},Jg=class extends Hq{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){C.useDebugValue(t),Ct(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;Ct(()=>(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);Ct(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){C.useDebugValue(t);const r=n!==void 0;Ct(()=>{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),N3(this,this.selectors[t],n,r,i)}useContextCallback(t,n){C.useDebugValue(t);const r=st(n??A3);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 qq(e){e.preventDefault(),e.stopPropagation()}function Gq(e){return"nativeEvent"in e}function Vq(e){return e.pointerType===""&&e.isTrusted?!0:gx&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Yq(e){return E3?!1:!gx&&e.width===0&&e.height===0||gx&&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 $l(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function L3(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}function hr(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 Vm=Symbol("NOT_FOUND");function Wq(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Xq(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Kq(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 VA=e=>Array.isArray(e)?e:[e];function Qq(e){const t=Array.isArray(e[0])?e[0]:e;return Kq(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Zq(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}function Jq(e){let t;return{get(n){return t&&e(t.key,n)?t.value:Vm},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function eG(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 Vm}function i(u,c){r(u)===Vm&&(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 tG=(e,t)=>e===t;function nG(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 rG(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=tG,maxSize:i=1,resultEqualityCheck:o}=n,a=nG(r);let u=0;const c=i<=1?Jq(a):eG(i,a);function f(){let h=c.get(arguments);if(h===Vm){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 iG=class{constructor(t){this.value=t}deref(){return this.value}},oG=typeof WeakRef<"u"?WeakRef:iG,sG=0,YA=1;function Op(){return{s:sG,v:void 0,o:null,p:null}}function j3(e,t={}){let n=Op();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=Op(),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=Op(),v.set(b,u)):u=S}}const f=u;let h;if(u.s===YA)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 oG(h):h}return f.s=YA,f.v=h,h}return a.clearCache=()=>{n=Op(),a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function z3(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()),Wq(f,`createSelector expects an output function after the inputs, but received: [${typeof f}]`);const h={...n,...c},{memoize:p,memoizeOptions:g=[],argsMemoize:y=j3,argsMemoizeOptions:b=[]}=h,v=VA(g),S=VA(b),w=Qq(i),A=p(function(){return o++,f.apply(null,arguments)},...v),k=y(function(){a++;const R=Zq(w,arguments);return u=A.apply(null,R),u},...S);return Object.assign(k,{resultFunc:f,memoizedResultFunc:A,dependencies:w,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>u,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:p,argsMemoize:y})};return Object.assign(r,{withTypes:()=>r}),r}var aG=z3(j3),lG=Object.assign((e,t=aG)=>{Xq(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:()=>lG});const uG=z3({memoize:rG,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),it=(e,t,n,r,i,o,...a)=>{if(a.length>0)throw new Error(hr(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},cG=(...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(hr(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(hr(2))}p=uG(...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")}}},fG={open:it(e=>e.open),domReferenceElement:it(e=>e.domReferenceElement),referenceElement:it(e=>e.positionReference??e.referenceElement),floatingElement:it(e=>e.floatingElement),floatingId:it(e=>e.floatingId)};let tS=class extends Jg{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:_q(),nested:r,noEmit:i,triggerElements:a},fG);ie(this,"setOpen",(n,r)=>{var i,o;if((!n||!this.state.open||L3(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 P3(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:i}=e,o=Nc(),a=Zg()!=null,u=t.useState("open"),c=t.useState("activeTriggerElement"),f=t.useState(r?"popupElement":"positionerElement"),h=t.context.triggerElements,p=ti(()=>new tS({open:u,referenceElement:c,floatingElement:f,triggerElements:h,onOpenChange:i,floatingId:o,nested:a,noEmit:n})).current;return Ct(()=>{const g={open:u,floatingId:o,referenceElement:c,floatingElement:f};Lt(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 vx="data-base-ui-focusable",I3="active",F3="selected",B3="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function qr(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 mt(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&&px(n)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function Ym(e,t){if(!Lt(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,r]of t.entries())if(mt(r,n))return!r.hasAttribute("data-trigger-disabled");return!1}function Hn(e){return"composedPath"in e?e.composedPath()[0]:e.target}function $i(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 dG(e){return e.matches("html,body")}function ey(e){return kn(e)&&e.matches(B3)}function WA(e){return e?e.getAttribute("role")==="combobox"&&ey(e):!1}function Wm(e){if(!e||E3)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function xx(e){return e?e.hasAttribute(vx)?e:e.querySelector(`[${vx}]`)||e:null}const hG=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function pG(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=Nc(),f=(o==null?void 0:o.id)||c,h=C.useMemo(()=>{var w;return((w=xx(a))==null?void 0:w.id)||i},[a,i]),p=hG.get(u)??u,g=Zg()!=null,y=C.useMemo(()=>p==="tooltip"||u==="label"?_r:{"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 w={id:h,...p&&{role:p}};return p==="tooltip"||u==="label"?w:{...w,...p==="menu"&&{"aria-labelledby":f}}},[p,h,f,u]),S=C.useCallback(({active:w,selected:A})=>{const k={role:"option",...w&&{id:`${h}-fui-option`}};switch(u){case"select":case"combobox":return{...k,"aria-selected":A}}return{}},[h,u]);return C.useMemo(()=>({reference:b,floating:v,item:S,trigger:y}),[b,v,y,S])}function wc(e){return`data-base-ui-${e}`}function kl(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,...kl(e,r.id,n)])}function XA(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 nS="none",$d="trigger-press",Ni="trigger-hover",Cm="trigger-focus",U3="outside-press",H3="focus-out",rS="escape-key",mG="disabled",q3="imperative-action",gG={intentional:"onClick",sloppy:"onPointerDown"};function yG(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 G3(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:w}=t,A=Zd(w),k=st(typeof p=="function"?p:()=>!1),R=typeof p=="function"?k:p,D=C.useRef(!1),{escapeKey:T,outsidePress:$}=yG(S),N=C.useRef(null),F=va(),j=va(),z=st(()=>{j.clear(),c.current.insideReactTree=!1}),M=C.useRef(!1),q=C.useRef(""),V=st(Z=>{q.current=Z.pointerType}),U=st(()=>{const Z=q.current,K=Z==="pen"||!Z?"mouse":Z,ee=typeof g=="function"?g():g;return typeof ee=="string"?ee:ee[K]}),I=st(Z=>{var _e;if(!r||!f||!h||Z.key!=="Escape"||M.current)return;const K=(_e=c.current.floatingContext)==null?void 0:_e.nodeId,ee=A?kl(A.nodesRef.current,K):[];if(!T&&ee.length>0){let ue=!0;if(ee.forEach(re=>{var ce;(ce=re.context)!=null&&ce.open&&!re.context.dataRef.current.__escapeKeyBubbles&&(ue=!1)}),!ue)return}const Ee=Gq(Z)?Z.nativeEvent:Z,he=Jt(rS,Ee);n.setOpen(!1,he),!T&&!he.isPropagationAllowed&&Z.stopPropagation()}),P=st(Z=>{const K=U();return K==="intentional"&&Z.type!=="click"||K==="sloppy"&&Z.type==="click"}),G=st(()=>{c.current.insideReactTree=!0,j.start(0,z)}),W=st((Z,K=!1)=>{var Ae;if(P(Z)){z();return}if(c.current.insideReactTree){z();return}if(U()==="intentional"&&K||typeof R=="function"&&!R(Z))return;const ee=Hn(Z),Ee=`[${wc("inert")}]`,he=Nt(n.select("floatingElement")).querySelectorAll(Ee),_e=n.context.triggerElements;if(ee&&(_e.hasElement(ee)||_e.hasMatchingElement(Ne=>mt(Ne,ee))))return;let ue=Lt(ee)?ee:null;for(;ue&&!Zo(ue);){const Ne=rs(ue);if(Zo(Ne)||!Lt(Ne))break;ue=Ne}if(he.length&&Lt(ee)&&!dG(ee)&&!mt(ee,n.select("floatingElement"))&&Array.from(he).every(Ne=>!mt(ue,Ne)))return;if(kn(ee)&&!("touches"in Z)){const Ne=Zo(ee),ve=Qr(ee),$e=/auto|scroll/,le=Ne||$e.test(ve.overflowX),we=Ne||$e.test(ve.overflowY),be=le&&ee.clientWidth>0&&ee.scrollWidth>ee.clientWidth,Te=we&&ee.clientHeight>0&&ee.scrollHeight>ee.clientHeight,je=ve.direction==="rtl",rt=Te&&(je?Z.offsetX<=ee.offsetWidth-ee.clientWidth:Z.offsetX>ee.clientWidth),Mt=be&&Z.offsetY>ee.clientHeight;if(rt||Mt)return}const re=(Ae=c.current.floatingContext)==null?void 0:Ae.nodeId,ce=A&&kl(A.nodesRef.current,re).some(Ne=>{var ve;return $i(Z,(ve=Ne.context)==null?void 0:ve.elements.floating)});if($i(Z,n.select("floatingElement"))||$i(Z,n.select("domReferenceElement"))||ce)return;const oe=A?kl(A.nodesRef.current,re):[];if(oe.length>0){let Ne=!0;if(oe.forEach(ve=>{var $e;($e=ve.context)!=null&&$e.open&&!ve.context.dataRef.current.__outsidePressBubbles&&(Ne=!1)}),!Ne)return}n.setOpen(!1,Jt(U3,Z)),z()}),L=st(Z=>{U()!=="sloppy"||Z.pointerType==="touch"||!n.select("open")||!f||$i(Z,n.select("floatingElement"))||$i(Z,n.select("domReferenceElement"))||W(Z)}),Y=st(Z=>{if(U()!=="sloppy"||!n.select("open")||!f||$i(Z,n.select("floatingElement"))||$i(Z,n.select("domReferenceElement")))return;const K=Z.touches[0];K&&(N.current={startTime:Date.now(),startX:K.clientX,startY:K.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},F.start(1e3,()=>{N.current&&(N.current.dismissOnTouchEnd=!1,N.current.dismissOnMouseDown=!1)}))}),Q=st(Z=>{const K=Hn(Z);function ee(){Y(Z),K==null||K.removeEventListener(Z.type,ee)}K==null||K.addEventListener(Z.type,ee)}),B=st(Z=>{const K=D.current;if(D.current=!1,F.clear(),Z.type==="mousedown"&&N.current&&!N.current.dismissOnMouseDown)return;const ee=Hn(Z);function Ee(){Z.type==="pointerdown"?L(Z):W(Z,K),ee==null||ee.removeEventListener(Z.type,Ee)}ee==null||ee.addEventListener(Z.type,Ee)}),ae=st(Z=>{if(U()!=="sloppy"||!N.current||$i(Z,n.select("floatingElement"))||$i(Z,n.select("domReferenceElement")))return;const K=Z.touches[0];if(!K)return;const ee=Math.abs(K.clientX-N.current.startX),Ee=Math.abs(K.clientY-N.current.startY),he=Math.sqrt(ee*ee+Ee*Ee);he>5&&(N.current.dismissOnTouchEnd=!0),he>10&&(W(Z),F.clear(),N.current=null)}),te=st(Z=>{const K=Hn(Z);function ee(){ae(Z),K==null||K.removeEventListener(Z.type,ee)}K==null||K.addEventListener(Z.type,ee)}),me=st(Z=>{U()!=="sloppy"||!N.current||$i(Z,n.select("floatingElement"))||$i(Z,n.select("domReferenceElement"))||(N.current.dismissOnTouchEnd&&W(Z),F.clear(),N.current=null)}),Ce=st(Z=>{const K=Hn(Z);function ee(){me(Z),K==null||K.removeEventListener(Z.type,ee)}K==null||K.addEventListener(Z.type,ee)});C.useEffect(()=>{if(!r||!f)return;c.current.__escapeKeyBubbles=T,c.current.__outsidePressBubbles=$;const Z=new lo;function K(ue){n.setOpen(!1,Jt(nS,ue))}function ee(){Z.clear(),M.current=!0}function Ee(){Z.start(Yg()?5:0,()=>{M.current=!1})}const he=Nt(i);he.addEventListener("pointerdown",V,!0),h&&(he.addEventListener("keydown",I),he.addEventListener("compositionstart",ee),he.addEventListener("compositionend",Ee)),R&&(he.addEventListener("click",B,!0),he.addEventListener("pointerdown",B,!0),he.addEventListener("touchstart",Q,!0),he.addEventListener("touchmove",te,!0),he.addEventListener("touchend",Ce,!0),he.addEventListener("mousedown",B,!0));let _e=[];return v&&(Lt(a)&&(_e=ha(a)),Lt(i)&&(_e=_e.concat(ha(i))),!Lt(o)&&o&&o.contextElement&&(_e=_e.concat(ha(o.contextElement)))),_e=_e.filter(ue=>{var re;return ue!==((re=he.defaultView)==null?void 0:re.visualViewport)}),_e.forEach(ue=>{ue.addEventListener("scroll",K,{passive:!0})}),()=>{he.removeEventListener("pointerdown",V,!0),h&&(he.removeEventListener("keydown",I),he.removeEventListener("compositionstart",ee),he.removeEventListener("compositionend",Ee)),R&&(he.removeEventListener("click",B,!0),he.removeEventListener("pointerdown",B,!0),he.removeEventListener("touchstart",Q,!0),he.removeEventListener("touchmove",te,!0),he.removeEventListener("touchend",Ce,!0),he.removeEventListener("mousedown",B,!0)),_e.forEach(ue=>{ue.removeEventListener("scroll",K)}),Z.clear(),D.current=!1}},[c,i,o,a,h,R,r,u,v,f,T,$,I,W,B,L,Q,te,Ce,V,n]),C.useEffect(z,[R,z]);const Re=C.useMemo(()=>({onKeyDown:I,...y&&{[gG[b]]:Z=>{n.setOpen(!1,Jt($d,Z.nativeEvent))},...b!=="intentional"&&{onClick(Z){n.setOpen(!1,Jt($d,Z.nativeEvent))}}}}),[I,n,y,b]),pe=st(Z=>{const K=Hn(Z.nativeEvent);!mt(n.select("floatingElement"),K)||Z.button!==0||(D.current=!0)}),Oe=st(Z=>{!r||!f||Z.button!==0||(D.current=!0)}),Pe=C.useMemo(()=>({onKeyDown:I,onPointerDown:pe,onMouseDown:pe,onMouseUp:pe,onClickCapture:G,onMouseDownCapture(Z){G(),Oe(Z)},onPointerDownCapture(Z){G(),Oe(Z)},onMouseUpCapture:G,onTouchEndCapture:G,onTouchMoveCapture:G}),[I,pe,G,Oe]);return C.useMemo(()=>f?{reference:Re,floating:Pe,trigger:Re}:{},[f,Re,Pe])}function iS(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=>Np(f,e,"reference"),t),a=C.useCallback(f=>Np(f,e,"floating"),n),u=C.useCallback(f=>Np(f,e,"item"),r),c=C.useCallback(f=>Np(f,e,"trigger"),i);return C.useMemo(()=>({getReferenceProps:o,getFloatingProps:a,getItemProps:u,getTriggerProps:c}),[o,a,u,c])}function Np(e,t,n){var a;const r=new Map,i=n==="item",o={};n==="floating"&&(o.tabIndex=-1,o[vx]="");for(const u in e)i&&e&&(u===I3||u===F3)||(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&&KA(o,c,i,r)}return KA(o,e,i,r),o}function KA(e,t,n,r){var i;for(const o in t){const a=t[o];n&&(o===I3||o===F3)||(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 bG(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}=bq(i);D3(t);const{forceUnmount:p}=T3(i,t,()=>{h()}),g=st(j=>{const z=Jt(j);return z.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},z}),y=C.useCallback(()=>{t.setOpen(!1,g(q3))},[t,g]);C.useImperativeHandle(r,()=>({unmount:p,close:y}),[p,y]);const b=P3({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[v,S]=C.useState(0),w=v===0,A=pG(b),k=G3(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 z=Hn(j);if(w&&!o){const M=z;return a&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===M||t.context.backdropRef.current===M||mt(M,u)&&!(M!=null&&M.hasAttribute("data-base-ui-portal")):!0}return!1},escapeKey:w});gq(i&&a===!0,u);const{getReferenceProps:R,getFloatingProps:D,getTriggerProps:T}=iS([A,k]);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 $=C.useMemo(()=>R(f),[R,f]),N=C.useMemo(()=>T(f),[T,f]),F=C.useMemo(()=>D(),[D]);t.useSyncedValues({openMethod:c,activeTriggerProps:$,inactiveTriggerProps:N,popupProps:F,floatingRootContext:b,nestedOpenDialogCount:v})}const V3=C.createContext(void 0);function Jd(e){const t=C.useContext(V3);if(e===!1&&t===void 0)throw new Error(hr(27));return t}let ty=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 vG(){return new tS({open:!1,floatingElement:null,referenceElement:null,triggerElements:new ty,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function Y3(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:"idle",floatingRootContext:vG(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:_r,inactiveTriggerProps:_r,popupProps:_r}}const Lp=it(e=>e.triggerIdProp??e.activeTriggerId),W3={open:it(e=>e.openProp??e.open),mounted:it(e=>e.mounted),transitionStatus:it(e=>e.transitionStatus),floatingRootContext:it(e=>e.floatingRootContext),preventUnmountingOnClose:it(e=>e.preventUnmountingOnClose),payload:it(e=>e.payload),activeTriggerId:Lp,activeTriggerElement:it(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:it((e,t)=>t!==void 0&&Lp(e)===t),isOpenedByTrigger:it((e,t)=>t!==void 0&&Lp(e)===t&&e.open),isMountedByTrigger:it((e,t)=>t!==void 0&&Lp(e)===t&&e.mounted),triggerProps:it((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:it(e=>e.popupProps),popupElement:it(e=>e.popupElement),positionerElement:it(e=>e.positionerElement)},xG={...W3,modal:it(e=>e.modal),nested:it(e=>e.nested),nestedOpenDialogCount:it(e=>e.nestedOpenDialogCount),disablePointerDismissal:it(e=>e.disablePointerDismissal),openMethod:it(e=>e.openMethod),descriptionElementId:it(e=>e.descriptionElementId),titleElementId:it(e=>e.titleElementId),viewportElement:it(e=>e.viewportElement),role:it(e=>e.role)};let wG=class extends Jg{constructor(n){super(SG(n),{popupRef:C.createRef(),backdropRef:C.createRef(),internalBackdropRef:C.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new ty,onOpenChange:void 0,onOpenChangeComplete:void 0},xG);ie(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 SG(e={}){return{...Y3(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}function CG(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=Jd(!0),y=!!g,b=ti(()=>(f==null?void 0:f.store)??new wG({open:r,openProp:n,activeTriggerId:p,triggerIdProp:h,modal:u,disablePointerDismissal:a,nested:y})).current;y3(()=>{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");bG({store:b,actionsRef:c,parentContext:g==null?void 0:g.store.context});const S=C.useMemo(()=>({store:b}),[b]);return _.jsx(V3.Provider,{value:S,children:typeof t=="function"?t({payload:v}):t})}const EG=C.createContext(void 0);function kG(e=!1){const t=C.useContext(EG);if(t===void 0&&!e)throw new Error(hr(16));return t}function _G(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 wx(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const id={};function X3(e,t,n,r,i){let o={...Sx(e,id)};return t&&(o=Em(o,t)),n&&(o=Em(o,n)),r&&(o=Em(o,r)),o}function AG(e){if(e.length===0)return id;if(e.length===1)return Sx(e[0],id);let t={...Sx(e[0],id)};for(let n=1;n<e.length;n+=1)t=Em(t,e[n]);return t}function Em(e,t){return K3(t)?t(e):RG(e,t)}function RG(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=wx(e.style,r);break}case"className":{e[n]=Q3(e.className,r);break}default:DG(n,r)?e[n]=TG(e[n],r):e[n]=r}}return e}function DG(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 K3(e){return typeof e=="function"}function Sx(e,t){return K3(e)?e(t):e??id}function TG(e,t){return t?e?n=>{if($G(n)){const i=n;Cx(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 Cx(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Q3(e,t){return t?e?t+" "+e:t:e}function $G(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function MG(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,o=C.useRef(null),a=kG(!0)!==void 0,u=st(()=>{const g=o.current;return!!((g==null?void 0:g.tagName)==="A"&&(g!=null&&g.href))}),{props:c}=_G({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:i}),f=C.useCallback(()=>{const g=o.current;OG(g)&&a&&t&&c.disabled===void 0&&g.disabled&&(g.disabled=!1)},[t,c.disabled,a]);Ct(f,[f]);const h=C.useCallback((g={})=>{const{onClick:y,onMouseDown:b,onKeyUp:v,onKeyDown:S,onPointerDown:w,...A}=g;return X3({type:i?"button":void 0,onClick(k){if(t){k.preventDefault();return}y==null||y(k)},onMouseDown(k){t||(b==null||b(k))},onKeyDown(k){if(t||(Cx(k),S==null||S(k)),k.baseUIHandlerPrevented)return;const R=k.target===k.currentTarget&&!i&&!u()&&!t,D=k.key==="Enter",T=k.key===" ";R&&((T||D)&&k.preventDefault(),D&&(y==null||y(k)))},onKeyUp(k){t||(Cx(k),v==null||v(k)),!k.baseUIHandlerPrevented&&k.target===k.currentTarget&&!i&&!t&&k.key===" "&&(y==null||y(k))},onPointerDown(k){if(t){k.preventDefault();return}w==null||w(k)}},i?void 0:{role:"button"},c,A)},[t,c,i,u]),p=st(g=>{o.current=g,f()});return{getButtonProps:h,buttonRef:p}}function OG(e){return kn(e)&&e.tagName==="BUTTON"}function Xm(e,t,n,r){const i=ti(Z3).current;return LG(i,e,t,n,r)&&J3(i,[e,t,n,r]),i.callback}function NG(e){const t=ti(Z3).current;return jG(t,e)&&J3(t,e),t.callback}function Z3(){return{callback:null,cleanup:null,refs:[]}}function LG(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function jG(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}}}}}}}function QA(e){if(!C.isValidElement(e))return null;const t=e,n=t.props;return(eS(19)?n==null?void 0:n.ref:t.ref)??null}function zG(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 PG(e,t){return typeof e=="function"?e(t):e}function IG(e,t){return typeof e=="function"?e(t):e}function co(e,t,n={}){const r=t.render,i=FG(t,n);if(n.enabled===!1)return null;const o=n.state??_r;return UG(e,r,i,o)}function FG(e,t={}){const{className:n,style:r,render:i}=e,{state:o=_r,ref:a,props:u,stateAttributesMapping:c,enabled:f=!0}=t,h=f?PG(n,o):void 0,p=f?IG(r,o):void 0,g=f?zG(o,c):_r,y=f?wx(g,Array.isArray(u)?AG(u):u)??_r:_r;return typeof document<"u"&&(f?Array.isArray(a)?y.ref=NG([y.ref,QA(i),...a]):y.ref=Xm(y.ref,QA(i),a):Xm(null,null)),f?(h!==void 0&&(y.className=Q3(y.className,h)),p!==void 0&&(y.style=wx(y.style,p)),y):_r}const BG=Symbol.for("react.lazy");function UG(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=X3(n,t.props);i.ref=n.ref;let o=t;return(o==null?void 0:o.$$typeof)===BG&&(o=C.Children.toArray(t)[0]),C.cloneElement(o,i)}if(e&&typeof e=="string")return HG(e,n);throw new Error(hr(8))}function HG(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 ll=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Td.startingStyle]="startingStyle",e[e.endingStyle=Td.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),e4=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const qG={[e4.popupOpen]:""},GG={[ll.open]:""},VG={[ll.closed]:""},YG={[ll.anchorHidden]:""},t4={open(e){return e?qG:null}},ny={open(e){return e?GG:VG},anchorHidden(e){return e?YG:null}},WG={style:{transition:"none"}},n4="data-base-ui-click-trigger",XG={fallbackAxisSide:"end"},KG={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function r4(e){return Nc(e,"base-ui")}function QG(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=$d}=t,p=C.useRef(void 0),g=Jw(),y=va(),b=C.useMemo(()=>({onPointerDown(v){p.current=v.pointerType},onMouseDown(v){const S=p.current,w=v.nativeEvent,A=n.select("open");if(v.button!==0||o==="click"||$l(S,!0)&&u)return;const k=r.current.openEvent,R=k==null?void 0:k.type,D=n.select("domReferenceElement")!==v.currentTarget,T=A&&D||!(A&&a&&(!(k&&c)||R==="click"||R==="mousedown"));if(ey(w.target)){const N=Jt(h,w,w.target);T&&S==="touch"&&f>0?y.start(f,()=>{n.setOpen(!0,N)}):n.setOpen(T,N);return}const $=v.currentTarget;g.request(()=>{const N=Jt(h,w,$);T&&S==="touch"&&f>0?y.start(f,()=>{n.setOpen(!0,N)}):n.setOpen(T,N)})},onClick(v){if(o==="mousedown-only")return;const S=p.current;if(o==="mousedown"&&S){p.current=void 0;return}if($l(S,!0)&&u)return;const w=n.select("open"),A=r.current.openEvent,k=n.select("domReferenceElement")!==v.currentTarget,R=w&&k||!(w&&a&&(!(A&&c)||L3(A))),D=Jt(h,v.nativeEvent,v.currentTarget);R&&S==="touch"&&f>0?y.start(f,()=>{n.setOpen(!0,D)}):n.setOpen(R,D)},onKeyDown(){p.current=void 0}}),[r,o,u,n,c,a,g,y,f,h]);return C.useMemo(()=>i?{reference:b}:_r,[i,b])}const ZG=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=Jd(!0),p=(c==null?void 0:c.store)??(h==null?void 0:h.store);if(!p)throw new Error(hr(79));const g=r4(a),y=p.useState("floatingRootContext"),b=p.useState("isOpenedByTrigger",g),v=C.useRef(null),{registerTrigger:S,isMountedByThisTrigger:w}=R3(g,v,p,{payload:u}),{getButtonProps:A,buttonRef:k}=MG({disabled:i,native:o}),R=QG(y,{enabled:y!=null}),D=iS([R]),T={disabled:i,open:b},$=p.useState("triggerProps",w);return co("button",e,{state:T,ref:[k,t,S,v],props:[D.getReferenceProps(),$,{[n4]:"",id:g},f,A],stateAttributesMapping:t4})});function i4(e){return eS(19)?e:e?"true":void 0}const o4=C.createContext(void 0);function JG(){const e=C.useContext(o4);if(e===void 0)throw new Error(hr(26));return e}const eV=C.forwardRef(function(e,t){const{cutout:n,...r}=e;let i;if(n){const o=n==null?void 0:n.getBoundingClientRect();i=`polygon(
|
|
322
|
+
0% 0%,
|
|
323
|
+
100% 0%,
|
|
324
|
+
100% 100%,
|
|
325
|
+
0% 100%,
|
|
326
|
+
0% 0%,
|
|
327
|
+
${o.left}px ${o.top}px,
|
|
328
|
+
${o.left}px ${o.bottom}px,
|
|
329
|
+
${o.right}px ${o.bottom}px,
|
|
330
|
+
${o.right}px ${o.top}px,
|
|
331
|
+
${o.left}px ${o.top}px
|
|
332
|
+
)`}return _.jsx("div",{ref:t,role:"presentation","data-base-ui-inert":"",...r,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:i}})}),tV={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},oS={...tV,position:"fixed",top:0,left:0},_l=C.forwardRef(function(e,t){const[n,r]=C.useState();return Ct(()=>{C3&&r("button")},[]),_.jsx("span",{...e,ref:t,style:oS,"aria-hidden":n?void 0:!0,tabIndex:0,role:n,"data-base-ui-focus-guard":""})});var nV=["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] *)"],Km=nV.join(","),s4=typeof Element>"u",Sc=s4?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Qm=!s4&&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},Zm=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]"):Zm(e.parentNode));return o},rV=function(e){var t,n=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return n===""||n==="true"},a4=function(e,t,n){if(Zm(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Km));return t&&Sc.call(e,Km)&&r.unshift(e),r=r.filter(n),r},Jm=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var o=i.shift();if(!Zm(o,!1))if(o.tagName==="SLOT"){var a=o.assignedElements(),u=a.length?a:o.children,c=Jm(u,!0,n);n.flatten?r.push.apply(r,c):r.push({scopeParent:o,candidates:c})}else{var f=Sc.call(o,Km);f&&n.filter(o)&&(t||!e.includes(o))&&r.push(o);var h=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),p=!Zm(h,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(h&&p){var g=Jm(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},l4=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},u4=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||rV(e))&&!l4(e)?0:e.tabIndex},iV=function(e,t){var n=u4(e);return n<0&&t&&!l4(e)?0:n},oV=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},c4=function(e){return e.tagName==="INPUT"},sV=function(e){return c4(e)&&e.type==="hidden"},aV=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return t},lV=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},uV=function(e){if(!e.name)return!0;var t=e.form||Qm(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=lV(r,e.form);return!i||i===e},cV=function(e){return c4(e)&&e.type==="radio"},fV=function(e){return cV(e)&&!uV(e)},dV=function(e){var t,n=e&&Qm(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=Qm(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},ZA=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},hV=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=Sc.call(e,"details>summary:first-of-type"),a=o?e.parentElement:e;if(Sc.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=Qm(e);if(c&&!c.shadowRoot&&r(c)===!0)return ZA(e);e.assignedSlot?e=e.assignedSlot:!c&&f!==e.ownerDocument?e=f.host:e=c}e=u}if(dV(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return ZA(e);return!1},pV=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 Sc.call(t,"fieldset[disabled] *")?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},Ex=function(e,t){return!(t.disabled||sV(t)||hV(t,e)||aV(t)||pV(t))},kx=function(e,t){return!(fV(t)||u4(t)<0||!Ex(e,t))},mV=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},f4=function(e){var t=[],n=[];return e.forEach(function(r,i){var o=!!r.scopeParent,a=o?r.scopeParent:r,u=iV(a,o),c=o?f4(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(oV).reduce(function(r,i){return i.isScope?r.push.apply(r,i.content):r.push(i.content),r},[]).concat(t)},ry=function(e,t){t=t||{};var n;return t.getShadowRoot?n=Jm([e],t.includeContainer,{filter:kx.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:mV}):n=a4(e,t.includeContainer,kx.bind(null,t)),f4(n)},gV=function(e,t){t=t||{};var n;return t.getShadowRoot?n=Jm([e],t.includeContainer,{filter:Ex.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):n=a4(e,t.includeContainer,Ex.bind(null,t)),n},d4=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return Sc.call(e,Km)===!1?!1:kx(t,e)};const eh=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function h4(e,t){const n=ry(e,eh()),r=n.length;if(r===0)return;const i=qr(Nt(e)),o=n.indexOf(i),a=o===-1?t===1?0:r-1:o+t;return n[a]}function p4(e){return h4(Nt(e).body,1)||e}function m4(e){return h4(Nt(e).body,-1)||e}function od(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!mt(n,r)}function yV(e){ry(e,eh()).forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")})}function JA(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 g4=C.createContext(null),y4=()=>C.useContext(g4),bV=wc("portal");function b4(e={}){var b;const{ref:t,container:n,componentProps:r=_r,elementProps:i}=e,o=Nc(),a=(b=y4())==null?void 0:b.portalNode,[u,c]=C.useState(null),[f,h]=C.useState(null),p=st(v=>{v!==null&&h(v)}),g=C.useRef(null);Ct(()=>{if(n===null){g.current&&(g.current=null,h(null),c(null));return}if(o==null)return;const v=(n&&(Qw(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=co("div",r,{ref:[t,p],props:[{id:o,[bV]:""},i]});return{portalNode:f,portalSubtree:u&&y?tr.createPortal(y,u):null}}const vV=C.forwardRef(function(e,t){const{children:n,container:r,className:i,render:o,renderGuards:a,...u}=e,{portalNode:c,portalSubtree:f}=b4({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,w=b==null?void 0:b.open,A=typeof a=="boolean"?a:!!b&&!b.modal&&b.open&&!!c;C.useEffect(()=>{if(!c||S)return;function R(D){c&&D.relatedTarget&&od(D)&&(D.type==="focusin"?JA:yV)(c)}return c.addEventListener("focusin",R,!0),c.addEventListener("focusout",R,!0),()=>{c.removeEventListener("focusin",R,!0),c.removeEventListener("focusout",R,!0)}},[c,S]),C.useEffect(()=>{!c||w||JA(c)},[w,c]);const k=C.useMemo(()=>({beforeOutsideRef:h,afterOutsideRef:p,beforeInsideRef:g,afterInsideRef:y,portalNode:c,setFocusManagerState:v}),[c]);return _.jsxs(C.Fragment,{children:[f,_.jsxs(g4.Provider,{value:k,children:[A&&c&&_.jsx(_l,{"data-type":"outside",ref:h,onFocus:R=>{var D,T;if(od(R,c))(D=g.current)==null||D.focus();else{const $=b?b.domReference:null;(T=m4($))==null||T.focus()}}}),A&&c&&_.jsx("span",{"aria-owns":c.id,style:KG}),c&&tr.createPortal(n,c),A&&c&&_.jsx(_l,{"data-type":"outside",ref:p,onFocus:R=>{var D,T;if(od(R,c))(D=y.current)==null||D.focus();else{const $=b?b.domReference:null;(T=p4($))==null||T.focus(),b!=null&&b.closeOnFocusOut&&(b==null||b.onOpenChange(!1,Jt(H3,R.nativeEvent)))}}})]})]})}),xV=C.forwardRef(function(e,t){const{keepMounted:n=!1,...r}=e,{store:i}=Jd(),o=i.useState("mounted"),a=i.useState("modal"),u=i.useState("open");return o||n?_.jsx(o4.Provider,{value:n,children:_.jsxs(vV,{ref:t,...r,children:[o&&a===!0&&_.jsx(eV,{ref:i.context.internalBackdropRef,inert:i4(!u)}),e.children]})}):null}),wV={...ny,...Kg},SV=C.forwardRef(function(e,t){const{render:n,className:r,forceRender:i=!1,...o}=e,{store:a}=Jd(),u=a.useState("open"),c=a.useState("nested"),f=a.useState("mounted"),h=a.useState("transitionStatus");return co("div",e,{state:{open:u,transitionStatus:h},ref:[a.context.backdropRef,t],stateAttributesMapping:wV,props:[{role:"presentation",hidden:!f,style:{userSelect:"none",WebkitUserSelect:"none"}},o],enabled:i||!c})});let CV=(function(e){return e.nestedDialogs="--nested-dialogs",e})({}),EV=(function(e){return e[e.open=ll.open]="open",e[e.closed=ll.closed]="closed",e[e.startingStyle=ll.startingStyle]="startingStyle",e[e.endingStyle=ll.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const v4="ArrowUp",x4="ArrowDown",w4="ArrowLeft",S4="ArrowRight",kV="Home",_V=new Set([w4,S4]),AV=new Set([v4,x4]),RV=new Set([..._V,...AV]);[...RV];const DV=new Set([v4,x4,w4,S4,kV,"End"]);function ro(e){const t=ti(TV,e).current;return t.next=e,Ct(t.effect),t}function TV(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}let eR=0;function Rv(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(eR);const o=()=>e==null?void 0:e.focus({preventScroll:n});i?o():eR=requestAnimationFrame(o)}const Zu={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function tR(e){return e==="inert"?Zu.inert:e==="aria-hidden"?Zu["aria-hidden"]:Zu.none}let jp=new WeakSet,zp={},Dv=0;const C4=e=>e&&(e.host||C4(e.parentNode)),$V=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=C4(n);return e.contains(r)?r:null}).filter(n=>n!=null);function MV(e,t,n,r){const i="data-base-ui-inert",o=r?"inert":n?"aria-hidden":null,a=$V(t,e),u=new Set,c=new Set(a),f=[];zp[i]||(zp[i]=new WeakMap);const h=zp[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(Ca(b)!=="script")if(u.has(b))g(b);else{const v=o?b.getAttribute(o):null,S=v!==null&&v!=="false",w=tR(o),A=(w.get(b)||0)+1,k=(h.get(b)||0)+1;w.set(b,A),h.set(b,k),f.push(b),A===1&&S&&jp.add(b),k===1&&b.setAttribute(i,""),!S&&o&&b.setAttribute(o,o==="inert"?"":"true")}})}return Dv+=1,()=>{f.forEach(y=>{const b=tR(o),v=(b.get(y)||0)-1,S=(h.get(y)||0)-1;b.set(y,v),h.set(y,S),v||(!jp.has(y)&&o&&y.removeAttribute(o),jp.delete(y)),S||y.removeAttribute(i)}),Dv-=1,Dv||(Zu.inert=new WeakMap,Zu["aria-hidden"]=new WeakMap,Zu.none=new WeakMap,jp=new WeakSet,zp={})}}function OV(e,t=!1,n=!1){const r=Nt(e[0]).body;return MV(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}function NV(e,t){const n=mn(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 nR=20;let la=[];function sS(){la=la.filter(e=>{var t;return(t=e.deref())==null?void 0:t.isConnected})}function LV(e){sS(),e&&Ca(e)!=="body"&&(la.push(new WeakRef(e)),la.length>nR&&(la=la.slice(-nR)))}function Tv(){var e;return sS(),(e=la[la.length-1])==null?void 0:e.deref()}function jV(e){if(!e)return null;const t=eh();return d4(e,t)?e:ry(e,t)[0]||e}function zV(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():Qr(e).display!=="none"}function rR(e,t){var o;if(!t.current.includes("floating")&&!((o=e.getAttribute("role"))!=null&&o.includes("dialog")))return;const n=eh(),r=gV(e,n).filter(a=>{const u=a.getAttribute("data-tabindex")||"";return d4(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 PV(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"),w=b.useState("floatingElement"),{events:A,dataRef:k}=b.context,R=st(()=>{var K;return(K=k.current.floatingContext)==null?void 0:K.nodeId}),D=i===!1,T=WA(S)&&D,$=C.useRef(["content"]),N=ro(i),F=ro(o),j=ro(f),z=Zd(y),M=y4(),q=C.useRef(null),V=C.useRef(null),U=C.useRef(!1),I=C.useRef(!1),P=C.useRef(!1),G=C.useRef(-1),W=C.useRef(""),L=C.useRef(""),Y=C.useRef(null),Q=C.useRef(null),B=Xm(Y,g,M==null?void 0:M.beforeInsideRef),ae=Xm(Q,M==null?void 0:M.afterInsideRef),te=va(),me=va(),Ce=Jw(),Re=M!=null,pe=xx(w),Oe=st((K=pe)=>K?ry(K,eh()):[]),Pe=st(K=>{const ee=Oe(K);return $.current.map(()=>ee).filter(Boolean).flat()});C.useEffect(()=>{if(r||!u)return;function K(Ee){Ee.key==="Tab"&&mt(pe,qr(Nt(pe)))&&Oe().length===0&&!T&&qq(Ee)}const ee=Nt(pe);return ee.addEventListener("keydown",K),()=>{ee.removeEventListener("keydown",K)}},[r,S,pe,u,$,T,Oe,Pe]),C.useEffect(()=>{if(r||!v)return;const K=Nt(pe);function ee(){P.current=!1}function Ee(_e){const ue=Hn(_e),re=mt(w,ue)||mt(S,ue)||mt(M==null?void 0:M.portalNode,ue);P.current=!re,L.current=_e.pointerType||"keyboard",ue!=null&&ue.closest(`[${n4}]`)&&(I.current=!0)}function he(){L.current="keyboard"}return K.addEventListener("pointerdown",Ee,!0),K.addEventListener("pointerup",ee,!0),K.addEventListener("pointercancel",ee,!0),K.addEventListener("keydown",he,!0),()=>{K.removeEventListener("pointerdown",Ee,!0),K.removeEventListener("pointerup",ee,!0),K.removeEventListener("pointercancel",ee,!0),K.removeEventListener("keydown",he,!0)}},[r,w,S,pe,v,M]),C.useEffect(()=>{if(r||!c)return;const K=Nt(pe);function ee(){I.current=!0,me.start(0,()=>{I.current=!1})}function Ee(ce){const oe=Hn(ce),Ae=Oe().indexOf(oe);Ae!==-1&&(G.current=Ae)}function he(ce){const oe=ce.relatedTarget,Ae=ce.currentTarget,Ne=Hn(ce);queueMicrotask(()=>{const ve=R(),$e=b.context.triggerElements,le=(oe==null?void 0:oe.hasAttribute(wc("focus-guard")))&&[Y.current,Q.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,Po(p),Po(h)].includes(oe),we=!(mt(S,oe)||mt(w,oe)||mt(oe,w)||mt(M==null?void 0:M.portalNode,oe)||oe!=null&&$e.hasElement(oe)||$e.hasMatchingElement(be=>mt(be,oe))||le||z&&(kl(z.nodesRef.current,ve).find(be=>{var Te,je;return mt((Te=be.context)==null?void 0:Te.elements.floating,oe)||mt((je=be.context)==null?void 0:je.elements.domReference,oe)})||XA(z.nodesRef.current,ve).find(be=>{var Te,je,rt;return[(Te=be.context)==null?void 0:Te.elements.floating,xx((je=be.context)==null?void 0:je.elements.floating)].includes(oe)||((rt=be.context)==null?void 0:rt.elements.domReference)===oe})));if(Ae===S&&pe&&rR(pe,$),a&&Ae!==S&&!zV(Ne)&&qr(K)===K.body){if(kn(pe)&&(pe.focus(),a==="popup")){Ce.request(()=>{pe.focus()});return}const be=G.current,Te=Oe(),je=Te[be]||Te[Te.length-1]||pe;kn(je)&&je.focus()}if(k.current.insideReactTree){k.current.insideReactTree=!1;return}(T||!u)&&oe&&we&&!I.current&&(T||oe!==Tv())&&(U.current=!0,b.setOpen(!1,Jt(H3,ce)))})}function _e(){P.current||(k.current.insideReactTree=!0,te.start(0,()=>{k.current.insideReactTree=!1}))}const ue=kn(S)?S:null,re=[];if(!(!w&&!ue))return ue&&(ue.addEventListener("focusout",he),ue.addEventListener("pointerdown",ee),re.push(()=>{ue.removeEventListener("focusout",he),ue.removeEventListener("pointerdown",ee)})),w&&(w.addEventListener("focusin",Ee),w.addEventListener("focusout",he),M&&(w.addEventListener("focusout",_e,!0),re.push(()=>{w.removeEventListener("focusout",_e,!0)})),re.push(()=>{w.removeEventListener("focusin",Ee),w.removeEventListener("focusout",he)})),()=>{re.forEach(ce=>{ce()})}},[r,S,w,pe,u,z,M,b,c,a,Oe,T,R,$,k,te,me,Ce,h,p]),C.useEffect(()=>{var he,_e,ue;if(r||!w||!v)return;const K=Array.from(((he=M==null?void 0:M.portalNode)==null?void 0:he.querySelectorAll(`[${wc("portal")}]`))||[]),ee=(ue=(_e=(z?XA(z.nodesRef.current,R()):[]).find(re=>{var ce;return WA(((ce=re.context)==null?void 0:ce.elements.domReference)||null)}))==null?void 0:_e.context)==null?void 0:ue.elements.domReference,Ee=[w,ee,...K,q.current,V.current,Y.current,Q.current,M==null?void 0:M.beforeOutsideRef.current,M==null?void 0:M.afterOutsideRef.current,Po(p),Po(h),T?S:null].filter(re=>re!=null);return OV(Ee,u||T)},[v,r,S,w,u,$,M,T,z,R,h,p]),Ct(()=>{if(!v||r||!kn(pe))return;const K=Nt(pe),ee=qr(K);queueMicrotask(()=>{const Ee=Pe(pe),he=N.current,_e=typeof he=="function"?he(j.current||""):he;if(_e===void 0||_e===!1)return;let ue;_e===!0||_e===null?ue=Ee[0]||pe:ue=Po(_e),ue=ue||Ee[0]||pe,!mt(pe,ee)&&Rv(ue,{preventScroll:ue===pe})})},[r,v,pe,D,Pe,N,j]),Ct(()=>{if(r||!pe)return;const K=Nt(pe),ee=qr(K);LV(ee);function Ee(ue){if(ue.open||(W.current=NV(ue.nativeEvent,L.current)),ue.reason===Ni&&ue.nativeEvent.type==="mouseleave"&&(U.current=!0),ue.reason===U3)if(ue.nested)U.current=!1;else if(Vq(ue.nativeEvent)||Yq(ue.nativeEvent))U.current=!1;else{let re=!1;document.createElement("div").focus({get preventScroll(){return re=!0,!1}}),re?U.current=!1:U.current=!0}}A.on("openchange",Ee);const he=K.createElement("span");he.setAttribute("tabindex","-1"),he.setAttribute("aria-hidden","true"),Object.assign(he.style,oS),Re&&S&&S.insertAdjacentElement("afterend",he);function _e(){const ue=F.current;let re=typeof ue=="function"?ue(W.current):ue;if(re===void 0||re===!1)return null;if(re===null&&(re=!0),typeof re=="boolean"){const oe=S||Tv();return oe&&oe.isConnected?oe:he}const ce=S||Tv()||he;return Po(re)||ce}return()=>{A.off("openchange",Ee);const ue=qr(K),re=mt(w,ue)||z&&kl(z.nodesRef.current,R(),!1).some(oe=>{var Ae;return mt((Ae=oe.context)==null?void 0:Ae.elements.floating,ue)}),ce=_e();queueMicrotask(()=>{const oe=jV(ce),Ae=typeof F.current!="boolean";F.current&&!U.current&&kn(oe)&&(!(!Ae&&oe!==ue&&ue!==K.body)||re)&&oe.focus({preventScroll:!0}),he.remove(),U.current=!1})}},[r,w,pe,F,k,A,z,Re,S,R]),Ct(()=>{if(!w3||v||!w)return;const K=qr(Nt(w));!kn(K)||!ey(K)||mt(w,K)&&K.blur()},[v,w]),Ct(()=>{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]),Ct(()=>{if(!(r||!pe))return rR(pe,$),()=>{queueMicrotask(sS)}},[r,pe,$]);const Z=!r&&(u?!T:!0)&&(Re||u);return _.jsxs(C.Fragment,{children:[Z&&_.jsx(_l,{"data-type":"inside",ref:B,onFocus:K=>{var ee,Ee;if(u){const he=Pe();Rv(he[he.length-1])}else M!=null&&M.portalNode&&(U.current=!1,od(K,M.portalNode)?(ee=p4(S))==null||ee.focus():(Ee=Po(p??M.beforeOutsideRef))==null||Ee.focus())}}),n,Z&&_.jsx(_l,{"data-type":"inside",ref:ae,onFocus:K=>{var ee,Ee;u?Rv(Pe()[0]):M!=null&&M.portalNode&&(c&&(U.current=!0),od(K,M.portalNode)?(ee=m4(S))==null||ee.focus():(Ee=Po(h??M.afterOutsideRef))==null||Ee.focus())}})]})}const IV={...ny,...Kg,nestedDialogOpen(e){return e?{[EV.nestedDialogOpen]:""}:null}},FV=C.forwardRef(function(e,t){const{className:n,finalFocus:r,initialFocus:i,render:o,...a}=e,{store:u}=Jd(),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"),w=u.useState("openMethod"),A=u.useState("titleElementId"),k=u.useState("transitionStatus"),R=u.useState("role");JG(),Qg({open:S,ref:u.context.popupRef,onComplete(){var F,j;S&&((j=(F=u.context).onOpenChangeComplete)==null||j.call(F,!0))}});function D(F){return F==="touch"?u.context.popupRef.current:!0}const T=i===void 0?D:i,$=v>0,N=co("div",e,{state:{open:S,nested:b,transitionStatus:k,nestedDialogOpen:$},props:[p,{"aria-labelledby":A??void 0,"aria-describedby":c??void 0,role:R,tabIndex:-1,hidden:!y,onKeyDown(F){DV.has(F.key)&&F.stopPropagation()},style:{[CV.nestedDialogs]:v}},a],ref:[t,u.context.popupRef,u.useStateSetter("popupElement")],stateAttributesMapping:IV});return _.jsx(PV,{context:h,openInteractionType:w,disabled:!y,closeOnFocusOut:!f,initialFocus:T,returnFocus:r,modal:g!==!1,restoreFocus:"popup",children:N})});function km(e,t,n){if(n&&!$l(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 _x=wc("safe-polygon"),BV=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${B3}`;function UV(e){return e?!!e.closest(BV):!1}let HV=class E4{constructor(){ie(this,"dispose",()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()});ie(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 lo,this.restTimeout=new lo,this.handleCloseOptions=void 0}static create(){return new E4}};function k4(e){const t=ti(HV.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||(n.hoverInteractionState=t),Xg(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}function $v(e){return typeof e=="function"?e():e}const qV={current:null};function GV(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=qV,externalTree:g,isActiveTrigger:y=!0}=t,b=Zd(g),v=k4(n),S=ro(u),w=ro(a),A=ro(f),k=ro(o);y&&(v.handleCloseOptions=(j=S.current)==null?void 0:j.__options);const R=st(()=>v.interactedInside?!0:r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1),D=st(z=>Ym(z,n.context.triggerElements)),T=C.useCallback((z,M=!0)=>{const q=km(w.current,"close",v.pointerType);q&&!v.handler?v.openChangeTimeout.start(q,()=>n.setOpen(!1,Jt(Ni,z))):M&&(v.openChangeTimeout.clear(),n.setOpen(!1,Jt(Ni,z)))},[w,n,v]),$=st(()=>{v.unbindMouseMove(),v.handler=void 0}),N=st(()=>{if(v.performedPointerEventsMutation){const z=Nt(n.select("domReferenceElement")).body;z.style.pointerEvents="",z.removeAttribute(_x),v.performedPointerEventsMutation=!1}});C.useEffect(()=>{if(!o)return;function z(M){M.open||(v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return i.on("openchange",z),()=>{i.off("openchange",z)}},[o,i,v]);const F=st(z=>{var q;if(R()||!r.current.floatingContext||D(z.relatedTarget))return;const M=p.current;(q=S.current)==null||q.call(S,{...r.current.floatingContext,tree:b,x:z.clientX,y:z.clientY,onClose(){N(),$(),!R()&&M===n.select("domReferenceElement")&&T(z)}})(z)});return C.useEffect(()=>{if(!o)return;const z=p.current??(y?n.select("domReferenceElement"):null);if(!Lt(z))return;function M(U){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,c&&!$l(v.pointerType)||$v(A.current)>0&&!km(w.current,"open"))return;const I=km(w.current,"open",v.pointerType),P=n.select("domReferenceElement"),G=n.context.triggerElements,W=(G.hasElement(U.target)||G.hasMatchingElement(B=>mt(B,U.target)))&&(!P||!mt(P,U.target)),L=U.currentTarget??null,Y=n.select("open"),Q=!Y||W;W&&Y?n.setOpen(!0,Jt(Ni,U,L)):I?v.openChangeTimeout.start(I,()=>{Q&&n.setOpen(!0,Jt(Ni,U,L))}):Q&&n.setOpen(!0,Jt(Ni,U,L))}function q(U){if(R()){N();return}v.unbindMouseMove();const I=n.select("domReferenceElement"),P=Nt(I);if(v.restTimeout.clear(),v.restTimeoutPending=!1,!D(U.relatedTarget)){if(S.current&&r.current.floatingContext){n.select("open")||v.openChangeTimeout.clear();const G=p.current;v.handler=S.current({...r.current.floatingContext,tree:b,x:U.clientX,y:U.clientY,onClose(){N(),$(),k.current&&!R()&&G===n.select("domReferenceElement")&&T(U,!0)}});const W=v.handler;W(U),P.addEventListener("mousemove",W),v.unbindMouseMove=()=>{P.removeEventListener("mousemove",W)};return}(v.pointerType!=="touch"||!mt(n.select("floatingElement"),U.relatedTarget))&&T(U)}}function V(U){F(U)}return n.select("open")&&z.addEventListener("mouseleave",V),h&&z.addEventListener("mousemove",M,{once:!0}),z.addEventListener("mouseenter",M),z.addEventListener("mouseleave",q),()=>{z.removeEventListener("mouseleave",V),h&&z.removeEventListener("mousemove",M),z.removeEventListener("mouseenter",M),z.removeEventListener("mouseleave",q)}},[$,N,r,w,T,n,o,S,F,v,y,R,D,c,h,A,p,b,k]),C.useMemo(()=>{if(!o)return;function z(M){v.pointerType=M.pointerType}return{onPointerDown:z,onPointerEnter:z,onMouseMove(M){const{nativeEvent:q}=M,V=M.currentTarget,U=n.select("domReferenceElement"),I=n.context.triggerElements,P=n.select("open"),G=(I.hasElement(M.target)||I.hasMatchingElement(L=>mt(L,M.target)))&&(!U||!mt(U,M.target));if(c&&!$l(v.pointerType)||P&&!G||$v(A.current)===0||!G&&v.restTimeoutPending&&M.movementX**2+M.movementY**2<2)return;v.restTimeout.clear();function W(){if(v.restTimeoutPending=!1,R())return;const L=n.select("open");!v.blockMouseMove&&(!L||G)&&n.setOpen(!0,Jt(Ni,q,V))}v.pointerType==="touch"?tr.flushSync(()=>{W()}):G&&P?W():(v.restTimeoutPending=!0,v.restTimeout.start($v(A.current),W))}}},[o,v,R,c,n,A])}function iR(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 VV(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function YV(e={}){const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i=new lo;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,w=Math.sqrt(v*v+S*S)/b;return a=p,u=g,c=y,w}const h=({x:p,y:g,placement:y,elements:b,onClose:v,nodeId:S,tree:w})=>function(A){function k(){i.clear(),v()}if(i.clear(),!b.domReference||!b.floating||y==null||p==null||g==null)return;const{clientX:R,clientY:D}=A,T=[R,D],$=Hn(A),N=A.type==="mouseleave",F=mt(b.floating,$),j=mt(b.domReference,$),z=b.domReference.getBoundingClientRect(),M=b.floating.getBoundingClientRect(),q=y.split("-")[0],V=p>M.right-M.width/2,U=g>M.bottom-M.height/2,I=VV(T,z),P=M.width>z.width,G=M.height>z.height,W=(P?z:M).left,L=(P?z:M).right,Y=(G?z:M).top,Q=(G?z:M).bottom;if(F&&(o=!0,!N))return;if(j&&(o=!1),j&&!N){o=!0;return}if(N&&Lt(A.relatedTarget)&&mt(b.floating,A.relatedTarget)||w&&kl(w.nodesRef.current,S).some(({context:te})=>te==null?void 0:te.open))return;if(q==="top"&&g>=z.bottom-1||q==="bottom"&&g<=z.top+1||q==="left"&&p>=z.right-1||q==="right"&&p<=z.left+1)return k();let B=[];switch(q){case"top":B=[[W,z.top+1],[W,M.bottom-1],[L,M.bottom-1],[L,z.top+1]];break;case"bottom":B=[[W,M.top+1],[W,z.bottom-1],[L,z.bottom-1],[L,M.top+1]];break;case"left":B=[[M.right-1,Q],[M.right-1,Y],[z.left+1,Y],[z.left+1,Q]];break;case"right":B=[[z.right-1,Q],[z.right-1,Y],[M.left+1,Y],[M.left+1,Q]];break}function ae([te,me]){switch(q){case"top":{const Ce=[P?te+t/2:V?te+t*4:te-t*4,me+t+1],Re=[P?te-t/2:V?te+t*4:te-t*4,me+t+1],pe=[[M.left,V||P?M.bottom-t:M.top],[M.right,V?P?M.bottom-t:M.top:M.bottom-t]];return[Ce,Re,...pe]}case"bottom":{const Ce=[P?te+t/2:V?te+t*4:te-t*4,me-t],Re=[P?te-t/2:V?te+t*4:te-t*4,me-t],pe=[[M.left,V||P?M.top+t:M.bottom],[M.right,V?P?M.top+t:M.bottom:M.top+t]];return[Ce,Re,...pe]}case"left":{const Ce=[te+t+1,G?me+t/2:U?me+t*4:me-t*4],Re=[te+t+1,G?me-t/2:U?me+t*4:me-t*4];return[[U||G?M.right-t:M.left,M.top],[U?G?M.right-t:M.left:M.right-t,M.bottom],Ce,Re]}case"right":{const Ce=[te-t,G?me+t/2:U?me+t*4:me-t*4],Re=[te-t,G?me-t/2:U?me+t*4:me-t*4],pe=[[U||G?M.left+t:M.right,M.top],[U?G?M.left+t:M.right:M.left+t,M.bottom]];return[Ce,Re,...pe]}default:return[]}}if(!iR([R,D],B)){if(o&&!I)return k();if(!N&&r){const te=f(A.clientX,A.clientY);if(te!==null&&te<.1)return k()}iR([R,D],ae([p,g]))?!o&&r&&i.start(40,k):k()}};return h.__options={blockPointerEvents:n},h}const WV=["top","right","bottom","left"],Cc=Math.min,Gr=Math.max,eg=Math.round,Pp=Math.floor,oo=e=>({x:e,y:e}),XV={left:"right",right:"left",bottom:"top",top:"bottom"},KV={start:"end",end:"start"};function Ax(e,t,n){return Gr(e,Cc(t,n))}function is(e,t){return typeof e=="function"?e(t):e}function Tr(e){return e.split("-")[0]}function ka(e){return e.split("-")[1]}function aS(e){return e==="x"?"y":"x"}function lS(e){return e==="y"?"height":"width"}const QV=new Set(["top","bottom"]);function wi(e){return QV.has(Tr(e))?"y":"x"}function uS(e){return aS(wi(e))}function ZV(e,t,n){n===void 0&&(n=!1);const r=ka(e),i=uS(e),o=lS(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=tg(a)),[a,tg(a)]}function JV(e){const t=tg(e);return[Rx(e),t,Rx(t)]}function Rx(e){return e.replace(/start|end/g,t=>KV[t])}const oR=["left","right"],sR=["right","left"],eY=["top","bottom"],tY=["bottom","top"];function nY(e,t,n){switch(e){case"top":case"bottom":return n?t?sR:oR:t?oR:sR;case"left":case"right":return t?eY:tY;default:return[]}}function rY(e,t,n,r){const i=ka(e);let o=nY(Tr(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(Rx)))),o}function tg(e){return e.replace(/left|right|bottom|top/g,t=>XV[t])}function iY(e){return{top:0,right:0,bottom:0,left:0,...e}}function _4(e){return typeof e!="number"?iY(e):{top:e,right:e,bottom:e,left:e}}function ng(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 oY=C.createContext(void 0);function sY(){var e;return((e=C.useContext(oY))==null?void 0:e.direction)??"ltr"}const aY=e=>({name:"arrow",options:e,async fn(t){var W,L;const{x:n,y:r,placement:i,rects:o,platform:a,elements:u,middlewareData:c}=t,{element:f,padding:h=0,offsetParent:p="real"}=is(e,t)||{};if(f==null)return{};const g=_4(h),y={x:n,y:r},b=uS(i),v=lS(b),S=await a.getDimensions(f),w=b==="y",A=w?"top":"left",k=w?"bottom":"right",R=w?"clientHeight":"clientWidth",D=o.reference[v]+o.reference[b]-y[b]-o.floating[v],T=y[b]-o.reference[b],$=p==="real"?await((W=a.getOffsetParent)==null?void 0:W.call(a,f)):u.floating;let N=u.floating[R]||o.floating[v];(!N||!await((L=a.isElement)==null?void 0:L.call(a,$)))&&(N=u.floating[R]||o.floating[v]);const F=D/2-T/2,j=N/2-S[v]/2-1,z=Math.min(g[A],j),M=Math.min(g[k],j),q=z,V=N-S[v]-M,U=N/2-S[v]/2+F,I=Ax(q,U,V),P=!c.arrow&&ka(i)!=null&&U!==I&&o.reference[v]/2-(U<q?z:M)-S[v]/2<0,G=P?U<q?U-q:U-V:0;return{[b]:y[b]+G,data:{[b]:I,centerOffset:U-I-G,...P&&{alignmentOffset:G}},reset:P}}}),lY=(e,t)=>({...aY(e),options:[e,t]});function aR(e,t,n){let{reference:r,floating:i}=e;const o=wi(t),a=uS(t),u=lS(a),c=Tr(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(ka(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 uY(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}=is(t,e),b=_4(y),v=u[g?p==="floating"?"reference":"floating":p],S=ng(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})),w=p==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,A=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),k=await(o.isElement==null?void 0:o.isElement(A))?await(o.getScale==null?void 0:o.getScale(A))||{x:1,y:1}:{x:1,y:1},R=ng(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:w,offsetParent:A,strategy:c}):w);return{top:(S.top-R.top+b.top)/k.y,bottom:(R.bottom-S.bottom+b.bottom)/k.y,left:(S.left-R.left+b.left)/k.x,right:(R.right-S.right+b.right)/k.x}}const cY=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}=aR(f,r,c),g=r,y={},b=0;for(let S=0;S<u.length;S++){var v;const{name:w,fn:A}=u[S],{x:k,y:R,data:D,reset:T}=await A({x:h,y:p,initialPlacement:r,placement:g,strategy:i,middlewareData:y,rects:f,platform:{...a,detectOverflow:(v=a.detectOverflow)!=null?v:uY},elements:{reference:e,floating:t}});h=k??h,p=R??p,y={...y,[w]:{...y[w],...D}},T&&b<=50&&(b++,typeof T=="object"&&(T.placement&&(g=T.placement),T.rects&&(f=T.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):T.rects),{x:h,y:p}=aR(f,g,c)),S=-1)}return{x:h,y:p,placement:g,strategy:i,middlewareData:y}},fY=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}=is(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const w=Tr(i),A=wi(u),k=Tr(u)===u,R=await(c.isRTL==null?void 0:c.isRTL(f.floating)),D=g||(k||!v?[tg(u)]:JV(u)),T=b!=="none";!g&&T&&D.push(...rY(u,v,b,R));const $=[u,...D],N=await c.detectOverflow(t,S),F=[];let j=((r=o.flip)==null?void 0:r.overflows)||[];if(h&&F.push(N[w]),p){const V=ZV(i,a,R);F.push(N[V[0]],N[V[1]])}if(j=[...j,{placement:i,overflows:F}],!F.every(V=>V<=0)){var z,M;const V=(((z=o.flip)==null?void 0:z.index)||0)+1,U=$[V];if(U&&(!(p==="alignment"&&A!==wi(U))||j.every(P=>wi(P.placement)===A?P.overflows[0]>0:!0)))return{data:{index:V,overflows:j},reset:{placement:U}};let I=(M=j.filter(P=>P.overflows[0]<=0).sort((P,G)=>P.overflows[1]-G.overflows[1])[0])==null?void 0:M.placement;if(!I)switch(y){case"bestFit":{var q;const P=(q=j.filter(G=>{if(T){const W=wi(G.placement);return W===A||W==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(W=>W>0).reduce((W,L)=>W+L,0)]).sort((G,W)=>G[1]-W[1])[0])==null?void 0:q[0];P&&(I=P);break}case"initialPlacement":I=u;break}if(i!==I)return{reset:{placement:I}}}return{}}}};function lR(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function uR(e){return WV.some(t=>e[t]>=0)}const dY=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...o}=is(e,t);switch(i){case"referenceHidden":{const a=await r.detectOverflow(t,{...o,elementContext:"reference"}),u=lR(a,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:uR(u)}}}case"escaped":{const a=await r.detectOverflow(t,{...o,altBoundary:!0}),u=lR(a,n.floating);return{data:{escapedOffsets:u,escaped:uR(u)}}}default:return{}}}}},A4=new Set(["left","top"]);async function hY(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=Tr(n),u=ka(n),c=wi(n)==="y",f=A4.has(a)?-1:1,h=o&&c?-1:1,p=is(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 pY=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 hY(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}}}}},mY=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:w=>{let{x:A,y:k}=w;return{x:A,y:k}}},...f}=is(e,t),h={x:n,y:r},p=await o.detectOverflow(t,f),g=wi(Tr(i)),y=aS(g);let b=h[y],v=h[g];if(a){const w=y==="y"?"top":"left",A=y==="y"?"bottom":"right",k=b+p[w],R=b-p[A];b=Ax(k,b,R)}if(u){const w=g==="y"?"top":"left",A=g==="y"?"bottom":"right",k=v+p[w],R=v-p[A];v=Ax(k,v,R)}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}}}}}},gY=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}=is(e,t),h={x:n,y:r},p=wi(i),g=aS(p);let y=h[g],b=h[p];const v=is(u,t),S=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const k=g==="y"?"height":"width",R=o.reference[g]-o.floating[k]+S.mainAxis,D=o.reference[g]+o.reference[k]-S.mainAxis;y<R?y=R:y>D&&(y=D)}if(f){var w,A;const k=g==="y"?"width":"height",R=A4.has(Tr(i)),D=o.reference[p]-o.floating[k]+(R&&((w=a.offset)==null?void 0:w[p])||0)+(R?0:S.crossAxis),T=o.reference[p]+o.reference[k]+(R?0:((A=a.offset)==null?void 0:A[p])||0)-(R?S.crossAxis:0);b<D?b=D:b>T&&(b=T)}return{[g]:y,[p]:b}}}},yY=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}=is(e,t),h=await a.detectOverflow(t,f),p=Tr(i),g=ka(i),y=wi(i)==="y",{width:b,height:v}=o.floating;let S,w;p==="top"||p==="bottom"?(S=p,w=g===(await(a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(w=p,S=g==="end"?"top":"bottom");const A=v-h.top-h.bottom,k=b-h.left-h.right,R=Cc(v-h[S],A),D=Cc(b-h[w],k),T=!t.middlewareData.shift;let $=R,N=D;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(N=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&($=A),T&&!g){const j=Gr(h.left,0),z=Gr(h.right,0),M=Gr(h.top,0),q=Gr(h.bottom,0);y?N=b-2*(j!==0||z!==0?j+z:Gr(h.left,h.right)):$=v-2*(M!==0||q!==0?M+q:Gr(h.top,h.bottom))}await c({...t,availableWidth:N,availableHeight:$});const F=await a.getDimensions(u.floating);return b!==F.width||v!==F.height?{reset:{rects:!0}}:{}}}};function R4(e){const t=Qr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=kn(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,u=eg(n)!==o||eg(r)!==a;return u&&(n=o,r=a),{width:n,height:r,$:u}}function cS(e){return Lt(e)?e:e.contextElement}function Ju(e){const t=cS(e);if(!kn(t))return oo(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=R4(t);let a=(o?eg(n.width):n.width)/r,u=(o?eg(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}const bY=oo(0);function D4(e){const t=mn(e);return!Yg()||!t.visualViewport?bY:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function vY(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==mn(e)?!1:t}function Ml(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=cS(e);let a=oo(1);t&&(r?Lt(r)&&(a=Ju(r)):a=Ju(e));const u=vY(o,n,r)?D4(o):oo(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=mn(o),y=r&&Lt(r)?mn(r):r;let b=g,v=mx(b);for(;v&&r&&y!==b;){const S=Ju(v),w=v.getBoundingClientRect(),A=Qr(v),k=w.left+(v.clientLeft+parseFloat(A.paddingLeft))*S.x,R=w.top+(v.clientTop+parseFloat(A.paddingTop))*S.y;c*=S.x,f*=S.y,h*=S.x,p*=S.y,c+=k,f+=R,b=mn(v),v=mx(b)}}return ng({width:h,height:p,x:c,y:f})}function iy(e,t){const n=Wg(e).scrollLeft;return t?t.left+n:Ml(uo(e)).left+n}function T4(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-iy(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function xY(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=uo(r),u=t?Vg(t.floating):!1;if(r===a||u&&o)return n;let c={scrollLeft:0,scrollTop:0},f=oo(1);const h=oo(0),p=kn(r);if((p||!p&&!o)&&((Ca(r)!=="body"||Ea(a))&&(c=Wg(r)),kn(r))){const y=Ml(r);f=Ju(r),h.x=y.x+r.clientLeft,h.y=y.y+r.clientTop}const g=a&&!p&&!o?T4(a,c):oo(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 wY(e){return Array.from(e.getClientRects())}function SY(e){const t=uo(e),n=Wg(e),r=e.ownerDocument.body,i=Gr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Gr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+iy(e);const u=-n.scrollTop;return Qr(r).direction==="rtl"&&(a+=Gr(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:u}}const cR=25;function CY(e,t){const n=mn(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=Yg();(!h||h&&t==="fixed")&&(u=i.offsetLeft,c=i.offsetTop)}const f=iy(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<=cR&&(o-=b)}else f<=cR&&(o+=f);return{width:o,height:a,x:u,y:c}}const EY=new Set(["absolute","fixed"]);function kY(e,t){const n=Ml(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=kn(e)?Ju(e):oo(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 fR(e,t,n){let r;if(t==="viewport")r=CY(e,n);else if(t==="document")r=SY(uo(e));else if(Lt(t))r=kY(t,n);else{const i=D4(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return ng(r)}function $4(e,t){const n=rs(e);return n===t||!Lt(n)||Zo(n)?!1:Qr(n).position==="fixed"||$4(n,t)}function _Y(e,t){const n=t.get(e);if(n)return n;let r=ha(e,[],!1).filter(u=>Lt(u)&&Ca(u)!=="body"),i=null;const o=Qr(e).position==="fixed";let a=o?rs(e):e;for(;Lt(a)&&!Zo(a);){const u=Qr(a),c=Zw(a);!c&&u.position==="fixed"&&(i=null),(o?!c&&!i:!c&&u.position==="static"&&i&&EY.has(i.position)||Ea(a)&&!c&&$4(e,a))?r=r.filter(f=>f!==a):i=u,a=rs(a)}return t.set(e,r),r}function AY(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?Vg(t)?[]:_Y(t,this._c):[].concat(n),r],a=o[0],u=o.reduce((c,f)=>{const h=fR(t,f,i);return c.top=Gr(h.top,c.top),c.right=Cc(h.right,c.right),c.bottom=Cc(h.bottom,c.bottom),c.left=Gr(h.left,c.left),c},fR(t,a,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function RY(e){const{width:t,height:n}=R4(e);return{width:t,height:n}}function DY(e,t,n){const r=kn(t),i=uo(t),o=n==="fixed",a=Ml(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const c=oo(0);function f(){c.x=iy(i)}if(r||!r&&!o)if((Ca(t)!=="body"||Ea(i))&&(u=Wg(t)),r){const y=Ml(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?T4(i,u):oo(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 Mv(e){return Qr(e).position==="static"}function dR(e,t){if(!kn(e)||Qr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return uo(e)===n&&(n=n.ownerDocument.body),n}function M4(e,t){const n=mn(e);if(Vg(e))return n;if(!kn(e)){let i=rs(e);for(;i&&!Zo(i);){if(Lt(i)&&!Mv(i))return i;i=rs(i)}return n}let r=dR(e,t);for(;r&&KH(r)&&Mv(r);)r=dR(r,t);return r&&Zo(r)&&Mv(r)&&!Zw(r)?n:r||tq(e)||n}const TY=async function(e){const t=this.getOffsetParent||M4,n=this.getDimensions,r=await n(e.floating);return{reference:DY(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function $Y(e){return Qr(e).direction==="rtl"}const MY={convertOffsetParentRelativeRectToViewportRelativeRect:xY,getDocumentElement:uo,getClippingRect:AY,getOffsetParent:M4,getElementRects:TY,getClientRects:wY,getDimensions:RY,getScale:Ju,isElement:Lt,isRTL:$Y};function O4(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function OY(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=Pp(p),v=Pp(i.clientWidth-(h+g)),S=Pp(i.clientHeight-(p+y)),w=Pp(h),A={rootMargin:-b+"px "+-v+"px "+-S+"px "+-w+"px",threshold:Gr(0,Cc(1,c))||1};let k=!0;function R(D){const T=D[0].intersectionRatio;if(T!==c){if(!k)return a();T?a(!1,T):r=setTimeout(()=>{a(!1,1e-7)},1e3)}T===1&&!O4(f,e.getBoundingClientRect())&&a(),k=!1}try{n=new IntersectionObserver(R,{...A,root:i.ownerDocument})}catch{n=new IntersectionObserver(R,A)}n.observe(e)}return a(!0),o}function hR(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=cS(e),h=i||o?[...f?ha(f):[],...ha(t)]:[];h.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),o&&w.addEventListener("resize",n)});const p=f&&u?OY(f,n):null;let g=-1,y=null;a&&(y=new ResizeObserver(w=>{let[A]=w;A&&A.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var k;(k=y)==null||k.observe(t)})),n()}),f&&!c&&y.observe(f),y.observe(t));let b,v=c?Ml(e):null;c&&S();function S(){const w=Ml(e);v&&!O4(v,w)&&n(),v=w,b=requestAnimationFrame(S)}return n(),()=>{var w;h.forEach(A=>{i&&A.removeEventListener("scroll",n),o&&A.removeEventListener("resize",n)}),p==null||p(),(w=y)==null||w.disconnect(),y=null,c&&cancelAnimationFrame(b)}}const NY=pY,LY=mY,jY=fY,zY=yY,PY=dY,IY=gY,FY=(e,t,n)=>{const r=new Map,i={platform:MY,...n},o={...i.platform,_c:r};return cY(e,t,{...i,platform:o})};var BY=typeof document<"u",UY=function(){},_m=BY?C.useLayoutEffect:UY;function rg(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(!rg(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)&&!rg(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function N4(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function pR(e,t){const n=N4(e);return Math.round(t*n)/n}function Ov(e){const t=C.useRef(e);return _m(()=>{t.current=e}),t}function HY(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);rg(g,r)||y(r);const[b,v]=C.useState(null),[S,w]=C.useState(null),A=C.useCallback(G=>{G!==T.current&&(T.current=G,v(G))},[]),k=C.useCallback(G=>{G!==$.current&&($.current=G,w(G))},[]),R=o||b,D=a||S,T=C.useRef(null),$=C.useRef(null),N=C.useRef(h),F=c!=null,j=Ov(c),z=Ov(i),M=Ov(f),q=C.useCallback(()=>{if(!T.current||!$.current)return;const G={placement:t,strategy:n,middleware:g};z.current&&(G.platform=z.current),FY(T.current,$.current,G).then(W=>{const L={...W,isPositioned:M.current!==!1};V.current&&!rg(N.current,L)&&(N.current=L,tr.flushSync(()=>{p(L)}))})},[g,t,n,z,M]);_m(()=>{f===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,p(G=>({...G,isPositioned:!1})))},[f]);const V=C.useRef(!1);_m(()=>(V.current=!0,()=>{V.current=!1}),[]),_m(()=>{if(R&&(T.current=R),D&&($.current=D),R&&D){if(j.current)return j.current(R,D,q);q()}},[R,D,q,j,F]);const U=C.useMemo(()=>({reference:T,floating:$,setReference:A,setFloating:k}),[A,k]),I=C.useMemo(()=>({reference:R,floating:D}),[R,D]),P=C.useMemo(()=>{const G={position:n,left:0,top:0};if(!I.floating)return G;const W=pR(I.floating,h.x),L=pR(I.floating,h.y);return u?{...G,transform:"translate("+W+"px, "+L+"px)",...N4(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:L}},[n,u,I.floating,h.x,h.y]);return C.useMemo(()=>({...h,update:q,refs:U,elements:I,floatingStyles:P}),[h,q,U,I,P])}const qY=(e,t)=>({...NY(e),options:[e,t]}),GY=(e,t)=>({...LY(e),options:[e,t]}),VY=(e,t)=>({...IY(e),options:[e,t]}),YY=(e,t)=>({...jY(e),options:[e,t]}),WY=(e,t)=>({...zY(e),options:[e,t]}),XY=(e,t)=>({...PY(e),options:[e,t]}),KY={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 XY().fn(e)).data)==null?void 0:a.referenceHidden)||o}}}},Am={sideX:"left",sideY:"top"},QY={name:"adaptiveOrigin",async fn(e){var w,A;const{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:o,strategy:a,placement:u}=e,c=mn(i),f=c.getComputedStyle(i);if(!(f.transitionDuration!=="0s"&&f.transitionDuration!==""))return{x:t,y:n,data:Am};const h=await((w=o.getOffsetParent)==null?void 0:w.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 k=Nt(i);p={width:k.documentElement.clientWidth,height:k.documentElement.clientHeight}}else await((A=o.isElement)==null?void 0:A.call(o,h))&&(p=await o.getDimensions(h));const g=Tr(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":Am.sideX,S=g==="top"?"bottom":Am.sideY;return{x:y,y:b,data:{sideX:v,sideY:S}}}};function ZY(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,i=Nc(),o=Zg()!=null,a=ti(()=>new tS({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new ty,floatingId:i,nested:o,noEmit:!1})).current;return Ct(()=>{const u={open:t,floatingId:i};r.reference!==void 0&&(u.referenceElement=r.reference,u.domReferenceElement=Lt(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 JY(e={}){const{nodeId:t,externalTree:n}=e,r=ZY(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=Zd(n);Ct(()=>{o.domReference&&(c.current=o.domReference)},[o.domReference]);const h=HY({...e,elements:{...o,...a&&{reference:a}}}),p=C.useCallback($=>{const N=Lt($)?{getBoundingClientRect:()=>$.getBoundingClientRect(),getClientRects:()=>$.getClientRects(),contextElement:$}:$;u(N),h.refs.setReference(N)},[h.refs]),[g,y]=C.useState(null),[b,v]=C.useState(null);i.useSyncedValue("referenceElement",g),i.useSyncedValue("domReferenceElement",Lt(g)?g:null),i.useSyncedValue("floatingElement",b);const S=C.useCallback($=>{(Lt($)||$===null)&&(c.current=$,y($)),(Lt(h.refs.reference.current)||h.refs.reference.current===null||$!==null&&!Lt($))&&h.refs.setReference($)},[h.refs,y]),w=C.useCallback($=>{v($),h.refs.setFloating($)},[h.refs]),A=C.useMemo(()=>({...h.refs,setReference:S,setFloating:w,setPositionReference:p,domReference:c}),[h.refs,S,w,p]),k=C.useMemo(()=>({...h.elements,domReference:o.domReference}),[h.elements,o.domReference]),R=i.useState("open"),D=i.useState("floatingId"),T=C.useMemo(()=>({...h,dataRef:i.context.dataRef,open:R,onOpenChange:i.setOpen,events:i.context.events,floatingId:D,refs:A,elements:k,nodeId:t,rootStore:i}),[h,A,k,t,i,R,D]);return Ct(()=>{i.context.dataRef.current.floatingContext=T;const $=f==null?void 0:f.nodesRef.current.find(N=>N.id===t);$&&($.context=T)}),C.useMemo(()=>({...h,context:T,refs:A,elements:k,rootStore:i}),[h,A,k,T,i])}function L4(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 mR(e,t,n){const{rects:r,placement:i}=e;return{side:L4(t,Tr(i),n),align:ka(i)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function eW(e){var Xe,gt;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:w,adaptiveOrigin:A,lazyFlip:k=!1,externalTree:R}=e,[D,T]=C.useState(null);!b&&D!==null&&T(null);const $=v.side||"flip",N=v.align||"flip",F=v.fallbackAxisSide||"end",j=typeof t=="function"?t:void 0,z=st(j),M=j?z:t,q=ro(t),V=sY()==="rtl",U=D||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":V?"left":"right","inline-start":V?"right":"left"}[r],I=o==="center"?U:`${U}-${o}`;let P=c;const G=1,W=r==="bottom"?G:0,L=r==="top"?G:0,Y=r==="right"?G:0,Q=r==="left"?G:0;typeof P=="number"?P={top:P+W,right:P+Q,bottom:P+L,left:P+Y}:P&&(P={top:(P.top||0)+W,right:(P.right||0)+Q,bottom:(P.bottom||0)+L,left:(P.left||0)+Y});const B={boundary:u==="clipping-ancestors"?"clippingAncestors":u,padding:P},ae=C.useRef(null),te=ro(i),me=ro(a),Ce=[qY(De=>{const We=mR(De,r,V),ot=typeof te.current=="function"?te.current(We):te.current,Wt=typeof me.current=="function"?me.current(We):me.current;return{mainAxis:ot,crossAxis:Wt,alignmentAxis:Wt}},[typeof i!="function"?i:0,typeof a!="function"?a:0,V,r])],Re=N==="none"&&$!=="shift",pe=!Re&&(f||S||$==="shift"),Oe=$==="none"?null:YY({...B,padding:{top:P.top+G,right:P.right+G,bottom:P.bottom+G,left:P.left+G},mainAxis:!S&&$==="flip",crossAxis:N==="flip"?"alignment":!1,fallbackAxisSideDirection:F}),Pe=Re?null:GY(De=>{const We=Nt(De.elements.floating).documentElement;return{...B,rootBoundary:S?{x:0,y:0,width:We.clientWidth,height:We.clientHeight}:void 0,mainAxis:N!=="none",crossAxis:pe,limiter:f||S?void 0:VY(ot=>{if(!ae.current)return{};const{width:Wt,height:Et}=ae.current.getBoundingClientRect(),Mn=wi(Tr(ot.placement)),gn=Mn==="y"?Wt:Et,ln=Mn==="y"?P.left+P.right:P.top+P.bottom;return{offset:gn/2+ln/2}})}},[B,f,S,P,N]);$==="shift"||N==="shift"||o==="center"?Ce.push(Pe,Oe):Ce.push(Oe,Pe),Ce.push(WY({...B,apply({elements:{floating:De},rects:{reference:We},availableWidth:ot,availableHeight:Wt}){const Et=De.style;Et.setProperty("--available-width",`${ot}px`),Et.setProperty("--available-height",`${Wt}px`),Et.setProperty("--anchor-width",`${We.width}px`),Et.setProperty("--anchor-height",`${We.height}px`)}}),lY(()=>({element:ae.current||document.createElement("div"),padding:h,offsetParent:"floating"}),[h]),{name:"transformOrigin",fn(De){var fs,pr,sn;const{elements:We,middlewareData:ot,placement:Wt,rects:Et,y:Mn}=De,gn=Tr(Wt),ln=wi(gn),on=ae.current,rr=((fs=ot.arrow)==null?void 0:fs.x)||0,Ui=((pr=ot.arrow)==null?void 0:pr.y)||0,_i=(on==null?void 0:on.clientWidth)||0,Ai=(on==null?void 0:on.clientHeight)||0,Pn=rr+_i/2,Ze=Ui+Ai/2,zt=Math.abs(((sn=ot.shift)==null?void 0:sn.y)||0),un=Et.reference.height/2,Xt=typeof i=="function"?i(mR(De,r,V)):i,cn=zt>Xt,po={top:`${Pn}px calc(100% + ${Xt}px)`,bottom:`${Pn}px ${-Xt}px`,left:`calc(100% + ${Xt}px) ${Ze}px`,right:`${-Xt}px ${Ze}px`}[gn],Yl=`${Pn}px ${Et.reference.y+un-Mn}px`;return We.floating.style.setProperty("--transform-origin",pe&&ln==="y"&&cn?Yl:po),{}}},KY,A),Ct(()=>{!b&&y&&y.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[b,y]);const Z=C.useMemo(()=>({elementResize:!p&&typeof ResizeObserver<"u",layoutShift:!p&&typeof IntersectionObserver<"u"}),[p]),{refs:K,elements:ee,x:Ee,y:he,middlewareData:_e,update:ue,placement:re,context:ce,isPositioned:oe,floatingStyles:Ae}=JY({rootContext:y,placement:I,middleware:Ce,strategy:n,whileElementsMounted:g?void 0:(...De)=>hR(...De,Z),nodeId:w,externalTree:R}),{sideX:Ne,sideY:ve}=_e.adaptiveOrigin||Am,$e=oe?n:"fixed",le=C.useMemo(()=>{const De=A?{position:$e,[Ne]:Ee,[ve]:he}:{position:$e,...Ae};return oe||(De.opacity=0),De},[A,$e,Ne,Ee,ve,he,Ae,oe]),we=C.useRef(null);Ct(()=>{if(!b)return;const De=q.current,We=typeof De=="function"?De():De,ot=(gR(We)?We.current:We)||null||null;ot!==we.current&&(K.setPositionReference(ot),we.current=ot)},[b,K,M,q]),C.useEffect(()=>{if(!b)return;const De=q.current;typeof De!="function"&&gR(De)&&De.current!==we.current&&(K.setPositionReference(De.current),we.current=De.current)},[b,K,M,q]),C.useEffect(()=>{if(g&&b&&ee.domReference&&ee.floating)return hR(ee.domReference,ee.floating,ue,Z)},[g,b,ee,ue,Z]);const be=Tr(re),Te=L4(r,be,V),je=ka(re)||"center",rt=!!((Xe=_e.hide)!=null&&Xe.referenceHidden);Ct(()=>{k&&b&&oe&&T(be)},[k,b,oe,be]);const Mt=C.useMemo(()=>{var De,We;return{position:"absolute",top:(De=_e.arrow)==null?void 0:De.y,left:(We=_e.arrow)==null?void 0:We.x}},[_e.arrow]),At=((gt=_e.arrow)==null?void 0:gt.centerOffset)!==0;return C.useMemo(()=>({positionerStyles:le,arrowStyles:Mt,arrowRef:ae,arrowUncentered:At,side:Te,align:je,physicalSide:be,anchorHidden:rt,refs:K,context:ce,isPositioned:oe,update:ue}),[le,Mt,ae,At,Te,je,be,rt,K,ce,oe,ue])}function gR(e){return e!=null&&"current"in e}function j4(e){return e==="starting"?WG:_r}const tW=new Set(["click","mousedown"]);function nW(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=k4(n),h=Zd(),p=Zg(),g=st(()=>f.interactedInside?!0:a.current.openEvent?tW.has(a.current.openEvent.type):!1),y=st(()=>{var R;const k=(R=a.current.openEvent)==null?void 0:R.type;return(k==null?void 0:k.includes("mouse"))&&k!=="mousedown"}),b=st(k=>Ym(k,n.context.triggerElements)),v=C.useCallback((k,R=!0)=>{const D=rW(c,f.pointerType);D&&!f.handler?f.openChangeTimeout.start(D,()=>n.setOpen(!1,Jt(Ni,k))):R&&(f.openChangeTimeout.clear(),n.setOpen(!1,Jt(Ni,k)))},[c,n,f]),S=st(()=>{f.unbindMouseMove(),f.handler=void 0}),w=st(()=>{if(f.performedPointerEventsMutation){const k=Nt(i).body;k.style.pointerEvents="",k.removeAttribute(_x),f.performedPointerEventsMutation=!1}}),A=st(k=>{const R=Hn(k);if(!UV(R)){f.interactedInside=!1;return}f.interactedInside=!0});Ct(()=>{r||(f.pointerType=void 0,f.restTimeoutPending=!1,f.interactedInside=!1,S(),w())},[r,f,S,w]),C.useEffect(()=>()=>{S()},[S]),C.useEffect(()=>w,[w]),Ct(()=>{var k,R,D;if(u&&r&&((k=f.handleCloseOptions)!=null&&k.blockPointerEvents)&&y()&&Lt(o)&&i){f.performedPointerEventsMutation=!0;const T=Nt(i).body;T.setAttribute(_x,"");const $=o,N=i,F=(D=(R=h==null?void 0:h.nodesRef.current.find(j=>j.id===p))==null?void 0:R.context)==null?void 0:D.elements.floating;return F&&(F.style.pointerEvents=""),T.style.pointerEvents="none",$.style.pointerEvents="auto",N.style.pointerEvents="auto",()=>{T.style.pointerEvents="",$.style.pointerEvents="",N.style.pointerEvents=""}}},[u,r,o,i,f,y,h,p]),C.useEffect(()=>{if(!u)return;function k($){g()||!a.current.floatingContext||!n.select("open")||b($.relatedTarget)||(w(),S(),g()||v($))}function R($){var N;f.openChangeTimeout.clear(),w(),(N=f.handler)==null||N.call(f,$),S()}function D($){g()||v($,!1)}const T=i;return T&&(T.addEventListener("mouseleave",k),T.addEventListener("mouseenter",R),T.addEventListener("mouseleave",D),T.addEventListener("pointerdown",A,!0)),()=>{T&&(T.removeEventListener("mouseleave",k),T.removeEventListener("mouseenter",R),T.removeEventListener("mouseleave",D),T.removeEventListener("pointerdown",A,!0))}},[u,i,n,a,g,b,v,w,S,A,f])}function rW(e,t){return t&&!$l(t)?0:typeof e=="function"?e():e}const z4=({children:e,...t})=>_.jsx(CG,{"data-slot":"sheet-root",...t,children:e});z4.displayName="SheetRoot";const P4=({children:e,...t})=>{const n=C.isValidElement(e);return _.jsx(ZG,{"data-slot":"sheet-trigger",nativeButton:n,render:n?e:_.jsx("span",{role:"button",tabIndex:0,children:e}),...t,children:e})};P4.displayName="SheetTrigger";const I4=({children:e,...t})=>_.jsx(xV,{"data-slot":"sheet-portal",...t,children:e});I4.displayName="SheetPortal";const Vu={"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"},F4=({className:e,...t})=>_.jsx(SV,{"data-slot":"sheet-backdrop",className:Ie(Vu["sheet-backdrop"],e),...t});F4.displayName="SheetBackdrop";const iW=Mr({variants:{side:{top:Vu["side-top"],right:Vu["side-right"],bottom:Vu["side-bottom"],left:Vu["side-left"]}}}),B4=({side:e,title:t,description:n,icon:r,action:i,footer:o,className:a,children:u,...c})=>_.jsx(FV,{render:_.jsx(an,{gap:4,title:t,description:n,icon:r,action:i,footer:o,FooterProps:{style:{marginTop:"auto"}}}),className:Ie(Vu["sheet-popup"],iW({side:e}),a),...c,children:u});B4.displayName="SheetPopup";const U4=({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})=>_.jsxs(z4,{open:g,onOpenChange:y,...a,children:[_.jsx(P4,{...u,children:p??(u==null?void 0:u.children)}),_.jsxs(I4,{...c,children:[_.jsx(F4,{...f}),_.jsx(B4,{side:e,title:t,description:n,icon:r,action:i,footer:o,...h,children:b??(h==null?void 0:h.children)})]})]});U4.displayName="Sheet";const oW="_toast_ornow_1",H4={"toast-viewport":"_toast-viewport_ornow_1",toast:oW},fS=C.createContext(void 0);function q4(){const e=C.useContext(fS);if(!e)throw new Error(hr(73));return e}let yR=0;function sW(e){return yR+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${yR}`}function Nv(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 Ip=cG(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}),No={toasts:it(e=>e.toasts),isEmpty:it(e=>e.toasts.length===0),toast:it(Ip,(e,t)=>{var n;return(n=e.get(t))==null?void 0:n.value}),toastIndex:it(Ip,(e,t)=>{var n;return((n=e.get(t))==null?void 0:n.domIndex)??-1}),toastOffsetY:it(Ip,(e,t)=>{var n;return((n=e.get(t))==null?void 0:n.offsetY)??0}),toastVisibleIndex:it(Ip,(e,t)=>{var n;return((n=e.get(t))==null?void 0:n.visibleIndex)??-1}),hovering:it(e=>e.hovering),focused:it(e=>e.focused),expanded:it(e=>e.hovering||e.focused),expandedOrOutOfFocus:it(e=>e.hovering||e.focused||!e.isWindowFocused),prevFocusElement:it(e=>e.prevFocusElement)};let aW=class extends Jg{constructor(n){super(n,{},No);ie(this,"timers",new Map);ie(this,"areTimersPaused",!1);ie(this,"setViewport",n=>{this.set("viewport",n)});ie(this,"disposeEffect",()=>()=>{this.timers.forEach(n=>{var r;(r=n.timeout)==null||r.clear()}),this.timers.clear()});ie(this,"addToast",n=>{const{toasts:r,timeout:i,limit:o}=this.state,a=n.id||sW("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)),No.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),a});ie(this,"updateToast",(n,r)=>{this.updateToastInternal(n,r)});ie(this,"updateToastInternal",(n,r)=>{var v,S,w;const{timeout:i,toasts:o}=this.state,a=No.toast(this.state,n)??null;if(!a||a.transitionStatus==="ending")return;const u={...a,...r};this.setToasts(o.map(A=>A.id===n?{...A,...r}:A));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 A=this.timers.get(n);A&&((w=A.timeout)==null||w.clear(),this.timers.delete(n)),this.scheduleTimer(n,c,()=>this.closeToast(n)),No.expandedOrOutOfFocus(this.state)&&this.pauseTimers()}});ie(this,"closeToast",n=>{var c,f;(f=(c=No.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)});ie(this,"promiseToast",(n,r)=>{const i=Nv(r.loading),o=this.addToast({...i,type:"loading"}),a=n.then(u=>{const c=Nv(r.success,u);return this.updateToast(o,{...c,type:"success",timeout:c.timeout}),u}).catch(u=>{const c=Nv(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});ie(this,"handleDocumentPointerDown",n=>{if(n.pointerType!=="touch")return;const r=Hn(n);mt(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=No.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=lo.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=!No.expandedOrOutOfFocus(this.state),u=a?lo.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=qr(Nt(this.state.viewport));if(!this.state.viewport||!mt(this.state.viewport,r)||!Wm(r))return;const i=No.toasts(this.state),o=No.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 lW=function(e){const{children:t,timeout:n=5e3,limit:r=3,toastManager:i}=e,o=ti(()=>new aW({timeout:n,limit:r,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return Xg(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}),_.jsx(fS.Provider,{value:o,children:t})};function uW(){const e=C.useContext(fS);if(!e)throw new Error(hr(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 cW=lW,G4=uW,V4=C.forwardRef(function(e,t){const{children:n,container:r,className:i,render:o,...a}=e,{portalNode:u,portalSubtree:c}=b4({container:r,ref:t,componentProps:e,elementProps:a});return!c&&!u?null:_.jsxs(C.Fragment,{children:[c,u&&tr.createPortal(n,u)]})}),fW=V4;let dW=(function(e){return e.frontmostHeight="--toast-frontmost-height",e})({});const hW=C.forwardRef(function(e,t){var z;const{render:n,className:r,children:i,...o}=e,a=q4(),u=va(),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=((z=p[0])==null?void 0:z.height)??0,S=C.useMemo(()=>p.some(M=>M.transitionStatus==="ending"),[p]);C.useEffect(()=>{const M=a.state.viewport;if(!M)return;function q(U){h||U.key==="F6"&&U.target!==M&&(U.preventDefault(),a.setPrevFocusElement(qr(Nt(M))),M==null||M.focus({preventScroll:!0}),a.pauseTimers(),a.setFocused(!0))}const V=mn(M);return V.addEventListener("keydown",q),()=>{V.removeEventListener("keydown",q)}},[a,h]),C.useEffect(()=>{const M=a.state.viewport;if(!M||h)return;const q=mn(M);function V(I){I.target===q&&(a.setIsWindowFocused(!1),a.pauseTimers())}function U(I){if(I.relatedTarget||I.target===q)return;const P=Hn(I),G=qr(Nt(M));(!mt(M,P)||!Wm(G))&&a.resumeTimers(),u.start(0,()=>a.setIsWindowFocused(!0))}return q.addEventListener("blur",V,!0),q.addEventListener("focus",U,!0),()=>{q.removeEventListener("blur",V,!0),q.removeEventListener("focus",U,!0)}},[a,u,h]),C.useEffect(()=>{const M=a.state.viewport;if(!M||h)return;const q=Nt(M);return q.addEventListener("pointerdown",a.handleDocumentPointerDown,!0),()=>{q.removeEventListener("pointerdown",a.handleDocumentPointerDown,!0)}},[h,a]);function w(M){var V,U,I;const q=a.state.viewport;q&&(c.current=!0,M.relatedTarget===q?(I=(U=(V=p[0])==null?void 0:V.ref)==null?void 0:U.current)==null||I.focus():a.restoreFocusToPrevElement())}function A(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 k(){a.pauseTimers(),a.setHovering(!0),f.current=!1}function R(){S?f.current=!0:(a.resumeTimers(),a.setHovering(!1))}function D(){if(c.current){c.current=!1;return}g||Wm(Nt(a.state.viewport).activeElement)&&(a.setFocused(!0),a.pauseTimers())}function T(M){!g||mt(a.state.viewport,M.relatedTarget)||(a.setFocused(!1),a.resumeTimers())}const $={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:k,onMouseMove:k,onMouseLeave:R,onFocus:D,onBlur:T,onKeyDown:A,onClick:D},N={expanded:y},F=co("div",e,{ref:[t,a.setViewport],state:N,props:[$,{style:{[dW.frontmostHeight]:v?`${v}px`:void 0}},o,{children:_.jsxs(C.Fragment,{children:[!h&&b&&_.jsx(_l,{onFocus:w}),i,!h&&b&&_.jsx(_l,{onFocus:w})]})}]}),j=C.useMemo(()=>p.filter(M=>M.priority==="high"),[p]);return _.jsxs(C.Fragment,{children:[!h&&b&&_.jsx(_l,{onFocus:w}),F,!g&&j.length>0&&_.jsx("div",{style:oS,children:j.map(M=>_.jsxs("div",{role:"alert","aria-atomic":!0,children:[_.jsx("div",{children:M.title}),_.jsx("div",{children:M.description})]},M.id))})]})}),Y4=C.createContext(void 0);function pW(){const e=C.useContext(Y4);if(!e)throw new Error(hr(66));return e}let Ja=(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 mW={...Kg,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},Gf=40,gW=10,zs=.5,yW=1;function bR(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 bW(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 vW=C.forwardRef(function(e,t){var ue;const{toast:n,render:r,className:i,swipeDirection:o=["down","right"],...a}=e,u=((ue=n.positionerProps)==null?void 0:ue.anchor)!==void 0;let c=[];u||(c=Array.isArray(o)?o:[o]);const f=c.length>0,h=q4(),[p,g]=C.useState(void 0),[y,b]=C.useState(!1),[v,S]=C.useState(!1),[w,A]=C.useState(!1),[k,R]=C.useState({x:0,y:0}),[D,T]=C.useState({x:0,y:0,scale:1}),[$,N]=C.useState(),[F,j]=C.useState(),[z,M]=C.useState(null),q=C.useRef(null),V=C.useRef({x:0,y:0}),U=C.useRef({x:0,y:0,scale:1}),I=C.useRef(void 0),P=C.useRef(0),G=C.useRef(!1),W=C.useRef({x:0,y:0}),L=C.useRef(!1),Y=h.useState("toastIndex",n.id),Q=h.useState("toastVisibleIndex",n.id),B=h.useState("toastOffsetY",n.id),ae=h.useState("focused"),te=h.useState("expanded");Qg({open:n.transitionStatus!=="ending",ref:q,onComplete(){n.transitionStatus==="ending"&&h.removeToast(n.id)}});const me=st((re=!1)=>{const ce=q.current;if(!ce)return;const oe=ce.style.height;ce.style.height="auto";const Ae=ce.offsetHeight;ce.style.height=oe;function Ne(){h.updateToastInternal(n.id,{ref:q,height:Ae,...n.transitionStatus==="starting"?{transitionStatus:void 0}:{}})}re?tr.flushSync(Ne):Ne()});Ct(me,[me]);function Ce(re,ce){let oe=re,Ae=ce;return!c.includes("left")&&!c.includes("right")?oe=re>0?re**zs:-(Math.abs(re)**zs):(!c.includes("right")&&re>0&&(oe=re**zs),!c.includes("left")&&re<0&&(oe=-(Math.abs(re)**zs))),!c.includes("up")&&!c.includes("down")?Ae=ce>0?ce**zs:-(Math.abs(ce)**zs):(!c.includes("down")&&ce>0&&(Ae=ce**zs),!c.includes("up")&&ce<0&&(Ae=-(Math.abs(ce)**zs))),{x:oe,y:Ae}}function Re(re){var oe;if(re.button!==0)return;re.pointerType==="touch"&&h.pauseTimers();const ce=Hn(re.nativeEvent);if(!(ce&&ce.closest('button,a,input,textarea,[role="button"],[data-swipe-ignore]'))){if(G.current=!1,I.current=void 0,P.current=0,V.current={x:re.clientX,y:re.clientY},W.current=V.current,q.current){const Ae=bW(q.current);U.current=Ae,T(Ae),R({x:Ae.x,y:Ae.y})}h.setHovering(!0),b(!0),S(!1),M(null),L.current=!0,(oe=q.current)==null||oe.setPointerCapture(re.pointerId)}}function pe(re){if(!y)return;re.preventDefault(),L.current&&(V.current={x:re.clientX,y:re.clientY},L.current=!1);const{clientY:ce,clientX:oe,movementX:Ae,movementY:Ne}=re;(Ne<0&&ce>W.current.y||Ne>0&&ce<W.current.y)&&(W.current={x:W.current.x,y:ce}),(Ae<0&&oe>W.current.x||Ae>0&&oe<W.current.x)&&(W.current={x:oe,y:W.current.y});const ve=oe-V.current.x,$e=ce-V.current.y,le=ce-W.current.y,we=oe-W.current.x;if(!v&&Math.sqrt(ve*ve+$e*$e)>=yW&&(S(!0),z===null)){const Mt=c.includes("left")||c.includes("right"),At=c.includes("up")||c.includes("down");if(Mt&&At){const Xe=Math.abs(ve),gt=Math.abs($e);M(Xe>gt?"horizontal":"vertical")}}let be;if(!I.current)z==="vertical"?$e>0?be="down":$e<0&&(be="up"):z==="horizontal"?ve>0?be="right":ve<0&&(be="left"):Math.abs(ve)>=Math.abs($e)?be=ve>0?"right":"left":be=$e>0?"down":"up",be&&c.includes(be)&&(I.current=be,P.current=bR(be,ve,$e),g(be));else{const Mt=I.current,At=bR(Mt,we,le);At>Gf?(G.current=!1,g(Mt)):!(c.includes("left")&&c.includes("right"))&&!(c.includes("up")&&c.includes("down"))&&P.current-At>=gW&&(G.current=!0)}const Te=Ce(ve,$e);let je=U.current.x,rt=U.current.y;z==="horizontal"?(c.includes("left")||c.includes("right"))&&(je+=Te.x):(z==="vertical"||(c.includes("left")||c.includes("right"))&&(je+=Te.x),(c.includes("up")||c.includes("down"))&&(rt+=Te.y)),R({x:je,y:rt})}function Oe(re){var ve;if(!y)return;if(b(!1),S(!1),M(null),(ve=q.current)==null||ve.releasePointerCapture(re.pointerId),G.current){R({x:D.x,y:D.y}),g(void 0);return}let ce=!1;const oe=k.x-D.x,Ae=k.y-D.y;let Ne;for(const $e of c){switch($e){case"right":oe>Gf&&(ce=!0,Ne="right");break;case"left":oe<-Gf&&(ce=!0,Ne="left");break;case"down":Ae>Gf&&(ce=!0,Ne="down");break;case"up":Ae<-Gf&&(ce=!0,Ne="up");break}if(ce)break}ce?(g(Ne),A(!0),h.closeToast(n.id)):(R({x:D.x,y:D.y}),g(void 0))}function Pe(re){if(re.key==="Escape"){if(!q.current||!mt(q.current,qr(Nt(q.current))))return;h.closeToast(n.id)}}C.useEffect(()=>{if(!f)return;const re=q.current;if(!re)return;function ce(oe){mt(re,oe.target)&&oe.preventDefault()}return re.addEventListener("touchmove",ce,{passive:!1}),()=>{re.removeEventListener("touchmove",ce)}},[f]);function Z(){if(!y&&k.x===D.x&&k.y===D.y&&!w)return{[Ja.swipeMovementX]:"0px",[Ja.swipeMovementY]:"0px"};const re=k.x-D.x,ce=k.y-D.y;return{transition:y?"none":void 0,transform:y?`translateX(${k.x}px) translateY(${k.y}px) scale(${D.scale})`:void 0,[Ja.swipeMovementX]:`${re}px`,[Ja.swipeMovementY]:`${ce}px`}}const K=n.priority==="high",ee={role:K?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":$,"aria-describedby":F,"aria-hidden":K&&!ae?!0:void 0,onPointerDown:f?Re:void 0,onPointerMove:f?pe:void 0,onPointerUp:f?Oe:void 0,onKeyDown:Pe,inert:i4(n.limited),style:{...Z(),[Ja.index]:n.transitionStatus==="ending"?Y:Q,[Ja.offsetY]:`${B}px`,[Ja.height]:n.height?`${n.height}px`:void 0}},Ee=C.useMemo(()=>({rootRef:q,toast:n,titleId:$,setTitleId:N,descriptionId:F,setDescriptionId:j,swiping:y,swipeDirection:p,recalculateHeight:me,index:Y,visibleIndex:Q,expanded:te}),[n,$,F,y,p,me,Y,Q,te]),he={transitionStatus:n.transitionStatus,expanded:te,limited:n.limited||!1,type:n.type,swiping:Ee.swiping,swipeDirection:Ee.swipeDirection},_e=co("div",e,{ref:[t,Ee.rootRef],state:he,stateAttributesMapping:mW,props:[ee,a]});return _.jsx(Y4.Provider,{value:Ee,children:_e})}),xW=C.forwardRef(function(e,t){const{render:n,className:r,id:i,children:o,...a}=e,{toast:u,setDescriptionId:c}=pW(),f=o??u.description,h=!!f,p=Nc(i);Ct(()=>{if(h)return c(p),()=>{c(void 0)}},[h,p,c]);const g={type:u.type},y=co("p",e,{ref:t,state:g,props:{...a,id:p,children:f}});return h?y:null}),W4=()=>{const{toasts:e}=G4();return e.map(t=>_.jsx(vW,{toast:t,className:H4.toast,render:_.jsx(an,{"data-slot":"toast",children:_.jsx(ze,{size:0,shade:"muted",render:_.jsx(xW,{})})})},t.id))};W4.displayName="ToastList";const X4=({position:e="bottom"})=>_.jsx(fW,{children:_.jsx(hW,{className:H4["toast-viewport"],"data-position":e,children:_.jsx(W4,{})})});X4.displayName="Toaster";const K4=C.createContext(void 0);function wW(){return C.useContext(K4)}const Q4=C.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new lo,currentIdRef:{current:null},currentContextRef:{current:null}});function SW(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=va();return _.jsx(Q4.Provider,{value:C.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:o,currentIdRef:a,timeoutMs:r,currentContextRef:u,timeout:c}),[r,c]),children:t})}function CW(e,t={open:!1}){const n="rootStore"in e?e.rootStore:e,r=n.useState("floatingId"),{open:i}=t,o=C.useContext(Q4),{currentIdRef:a,delayRef:u,timeoutMs:c,initialDelayRef:f,currentContextRef:h,hasProvider:p,timeout:g}=o,[y,b]=C.useState(!1);return Ct(()=>{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]),Ct(()=>{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:km(f.current,"close")},S!==null&&S!==r?(b(!0),v==null||v.setIsInstantPhase(!0),v==null||v.onOpenChange(!1,Jt(nS))):(b(!1),v==null||v.setIsInstantPhase(!1))},[i,r,n,a,u,c,f,h,g]),Ct(()=>()=>{h.current=null},[h]),C.useMemo(()=>({hasProvider:p,delayRef:u,isInstantPhase:y}),[p,u,y])}const EW=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 _.jsx(K4.Provider,{value:i,children:_.jsx(SW,{delay:o,timeoutMs:r,children:e.children})})},Z4=({children:e,...t})=>_.jsx(EW,{"data-slot":"tooltip-provider",...t,children:e});Z4.displayName="TooltipProvider";const J4=C.createContext(void 0);function oy(e){const t=C.useContext(J4);if(t===void 0&&!e)throw new Error(hr(72));return t}const kW={...W3,disabled:it(e=>e.disabled),instantType:it(e=>e.instantType),isInstantPhase:it(e=>e.isInstantPhase),trackCursorAxis:it(e=>e.trackCursorAxis),disableHoverablePopup:it(e=>e.disableHoverablePopup),lastOpenChangeReason:it(e=>e.openChangeReason),closeDelay:it(e=>e.closeDelay),hasViewport:it(e=>e.hasViewport)};let _W=class eO extends Jg{constructor(n){super({...AW(),...n},{popupRef:C.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new ty},kW);ie(this,"setOpen",(n,r)=>{var f,h;const i=r.reason,o=i===Ni,a=n&&i===Cm,u=!n&&(i===$d||i===rS);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===Ni&&(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?tr.flushSync(c):c()})}static useStore(n,r){const i=ti(()=>new eO(r)).current,o=n??i,a=P3({popupStore:o,onOpenChange:o.setOpen});return o.state.floatingRootContext=a,o}};function AW(){return{...Y3(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeDelay:0,hasViewport:!1}}function RW(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 vR(e){return e!=null&&e.clientX!=null}function DW(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=st((R,D,T)=>{f.current||a.current.openEvent&&!vR(a.current.openEvent)||n.set("positionReference",RW(T??o,{x:R,y:D,axis:c,dataRef:a,pointerType:p}))}),S=st(R=>{r?h.current||b([]):v(R.clientX,R.clientY,R.currentTarget)}),w=$l(p)?i:r,A=C.useCallback(()=>{if(!w||!u)return;const R=mn(i);function D(T){const $=Hn(T);mt(i,$)?(R.removeEventListener("mousemove",D),h.current=null):v(T.clientX,T.clientY)}if(!a.current.openEvent||vR(a.current.openEvent)){R.addEventListener("mousemove",D);const T=()=>{R.removeEventListener("mousemove",D),h.current=null};return h.current=T,T}n.set("positionReference",o)},[w,u,i,a,o,n,v]);C.useEffect(()=>A(),[A,y]),C.useEffect(()=>{u&&!i&&(f.current=!1)},[u,i]),C.useEffect(()=>{!u&&r&&(f.current=!0)},[u,r]);const k=C.useMemo(()=>{function R(D){g(D.pointerType)}return{onPointerDown:R,onPointerEnter:R,onMouseMove:S,onMouseEnter:S}},[S]);return C.useMemo(()=>u?{reference:k,trigger:k}:{},[u,k])}const TW=O3(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=_W.useStore(f==null?void 0:f.store,{open:n,openProp:r,activeTriggerId:p,triggerIdProp:h});y3(()=>{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"),w=y.useState("payload");y.useSyncedValues({trackCursorAxis:o,disableHoverablePopup:i}),Ct(()=>{b&&t&&y.setOpen(!1,Jt(mG))},[b,t,y]),y.useSyncedValue("disabled",t),D3(y);const{forceUnmount:A,transitionStatus:k}=T3(v,y),R=y.useState("isInstantPhase"),D=y.useState("instantType"),T=y.useState("lastOpenChangeReason"),$=C.useRef(null);Ct(()=>{k==="ending"&&T===nS||k!=="ending"&&R?(D!=="delay"&&($.current=D),y.set("instantType","delay")):$.current!==null&&(y.set("instantType",$.current),$.current=null)},[k,R,T,D,y]),Ct(()=>{v&&S==null&&y.set("payload",void 0)},[y,S,v]);const N=C.useCallback(()=>{y.setOpen(!1,$W(y,q3))},[y]);C.useImperativeHandle(a,()=>({unmount:A,close:N}),[A,N]);const F=y.useState("floatingRootContext"),j=G3(F,{enabled:!t,referencePress:!0}),z=DW(F,{enabled:!t&&o!=="none",axis:o==="none"?void 0:o}),{getReferenceProps:M,getFloatingProps:q,getTriggerProps:V}=iS([j,z]),U=C.useMemo(()=>M(),[M]),I=C.useMemo(()=>V(),[V]),P=C.useMemo(()=>q(),[q]);return y.useSyncedValues({activeTriggerProps:U,inactiveTriggerProps:I,popupProps:P}),_.jsx(J4.Provider,{value:y,children:typeof g=="function"?g({payload:w}):g})});function $W(e,t){const n=Jt(t);return n.preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},n}const tO=({children:e,...t})=>_.jsx(TW,{"data-slot":"tooltip-root",...t,children:e});tO.displayName="TooltipRoot";let MW=(function(e){return e[e.popupOpen=e4.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});const OW=600,Lv=rq&&C3;function NW(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=va(),h=C.useRef(!0);C.useEffect(()=>{const g=n.select("domReferenceElement");if(!o)return;const y=mn(g);function b(){const w=n.select("domReferenceElement");!n.select("open")&&kn(w)&&w===qr(Nt(w))&&(u.current=!0)}function v(){h.current=!0}function S(){h.current=!1}return y.addEventListener("blur",b),Lv&&(y.addEventListener("keydown",v,!0),y.addEventListener("pointerdown",S,!0)),()=>{y.removeEventListener("blur",b),Lv&&(y.removeEventListener("keydown",v,!0),y.removeEventListener("pointerdown",S,!0))}},[n,o]),C.useEffect(()=>{if(!o)return;function g(y){if(y.reason===$d||y.reason===rS){const b=n.select("domReferenceElement");Lt(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=Hn(g.nativeEvent);if(Lt(b)){if(Lv&&!g.relatedTarget){if(!h.current&&!ey(b))return}else if(!Wm(b))return}const v=Ym(g.relatedTarget,n.context.triggerElements),{nativeEvent:S,currentTarget:w}=g,A=typeof a=="function"?a():a;if(n.select("open")&&v||A===0||A===void 0){n.setOpen(!0,Jt(Cm,S,w));return}f.start(A,()=>{u.current||n.setOpen(!0,Jt(Cm,S,w))})},onBlur(g){u.current=!1,c.current=null;const y=g.relatedTarget,b=g.nativeEvent,v=Lt(y)&&y.hasAttribute(wc("focus-guard"))&&y.getAttribute("data-type")==="outside";f.start(0,()=>{var A;const S=n.select("domReferenceElement"),w=qr(S?S.ownerDocument:document);!y&&w===S||mt((A=i.current.floatingContext)==null?void 0:A.refs.floating.current,w)||mt(S,w)||v||Ym(y??w,n.context.triggerElements)||n.setOpen(!1,Jt(Cm,b))})}}),[i,n,f,a]);return C.useMemo(()=>o?{reference:p,trigger:p}:{},[o,p])}const LW=jq(function(e,t){const{className:n,render:r,handle:i,payload:o,disabled:a,delay:u,closeDelay:c,id:f,...h}=e,p=oy(!0),g=(i==null?void 0:i.store)??p;if(!g)throw new Error(hr(82));const y=r4(f),b=g.useState("isTriggerActive",y),v=g.useState("isOpenedByTrigger",y),S=g.useState("floatingRootContext"),w=C.useRef(null),A=u??OW,k=c??0,{registerTrigger:R,isMountedByThisTrigger:D}=R3(y,w,g,{payload:o,closeDelay:k}),T=wW(),{delayRef:$,isInstantPhase:N,hasProvider:F}=CW(S,{open:v});g.useSyncedValue("isInstantPhase",N);const j=g.useState("disabled"),z=a??j,M=g.useState("trackCursorAxis"),q=g.useState("disableHoverablePopup"),V=GV(S,{enabled:!z,mouseOnly:!0,move:!1,handleClose:!q&&M!=="both"?YV():null,restMs(){const G=T==null?void 0:T.delay,W=typeof $.current=="object"?$.current.open:void 0;let L=A;return F&&(W!==0?L=u??G??A:L=0),L},delay(){const G=typeof $.current=="object"?$.current.close:void 0;let W=k;return c==null&&F&&(W=G),{close:W}},triggerElementRef:w,isActiveTrigger:b}),U=NW(S,{enabled:!z}).reference,I={open:v},P=g.useState("triggerProps",D);return co("button",e,{state:I,ref:[t,R,w],props:[V,U,P,{id:y,[MW.triggerDisabled]:z?"":void 0},h],stateAttributesMapping:t4})}),nO=({children:e,...t})=>{const n=C.isValidElement(e);return _.jsx(LW,{"data-slot":"tooltip-trigger",render:n?e:_.jsx("span",{role:"button",tabIndex:0,children:e}),...t,children:e})};nO.displayName="TooltipTrigger";const rO=C.createContext(void 0);function jW(){const e=C.useContext(rO);if(e===void 0)throw new Error(hr(70));return e}const zW=C.forwardRef(function(e,t){const{keepMounted:n=!1,...r}=e;return oy().useState("mounted")||n?_.jsx(rO.Provider,{value:n,children:_.jsx(V4,{ref:t,...r})}):null}),iO=({children:e,...t})=>_.jsx(zW,{"data-slot":"tooltip-portal",...t,children:e});iO.displayName="TooltipPortal";const oO=C.createContext(void 0);function PW(){const e=C.useContext(oO);if(e===void 0)throw new Error(hr(71));return e}const IW=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=XG,...S}=e,w=oy(),A=jW(),k=w.useState("open"),R=w.useState("mounted"),D=w.useState("trackCursorAxis"),T=w.useState("disableHoverablePopup"),$=w.useState("floatingRootContext"),N=w.useState("instantType"),F=w.useState("transitionStatus"),j=w.useState("hasViewport"),z=eW({anchor:i,positionMethod:o,floatingRootContext:$,mounted:R,side:a,sideOffset:c,align:u,alignOffset:f,collisionBoundary:h,collisionPadding:p,sticky:y,arrowPadding:g,disableAnchorTracking:b,keepMounted:A,collisionAvoidance:v,adaptiveOrigin:j?QY:void 0}),M=C.useMemo(()=>{const I={};return(!k||D==="both"||T)&&(I.pointerEvents="none"),{role:"presentation",hidden:!R,style:{...z.positionerStyles,...I}}},[k,D,T,R,z.positionerStyles]),q=C.useMemo(()=>({open:k,side:z.side,align:z.align,anchorHidden:z.anchorHidden,instant:D!=="none"?"tracking-cursor":N}),[k,z.side,z.align,z.anchorHidden,D,N]),V=C.useMemo(()=>({...q,arrowRef:z.arrowRef,arrowStyles:z.arrowStyles,arrowUncentered:z.arrowUncentered}),[q,z.arrowRef,z.arrowStyles,z.arrowUncentered]),U=co("div",e,{state:q,props:[M,j4(F),S],ref:[t,w.useStateSetter("positionerElement")],stateAttributesMapping:ny});return _.jsx(oO.Provider,{value:V,children:U})}),sO=({children:e,...t})=>_.jsx(IW,{"data-slot":"tooltip-positioner",style:{zIndex:1e3},...t,children:e});sO.displayName="TooltipPositioner";const FW={"tooltip-popup":"_tooltip-popup_n06vm_1 _popup_1m2av_44"},BW={...ny,...Kg},UW=C.forwardRef(function(e,t){const{className:n,render:r,...i}=e,o=oy(),{side:a,align:u}=PW(),c=o.useState("open"),f=o.useState("instantType"),h=o.useState("transitionStatus"),p=o.useState("popupProps"),g=o.useState("floatingRootContext");Qg({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 nW(g,{enabled:!y,closeDelay:b}),co("div",e,{state:{open:c,side:a,align:u,instant:f,transitionStatus:h},ref:[t,o.context.popupRef,o.useStateSetter("popupElement")],props:[p,j4(h),i],stateAttributesMapping:BW})}),aO=({children:e,className:t,...n})=>_.jsx(UW,{"data-slot":"tooltip-popup",render:_.jsx(an,{py:2,px:2,style:{backgroundColor:"var(--shade-foreground)",color:"var(--shade-background)"}}),className:Ie(FW["tooltip-popup"],t),...n,children:_.jsx(ze,{size:-1,children:e})});aO.displayName="TooltipPopup";const Al=({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})=>_.jsx(Z4,{delay:t,...i,children:_.jsxs(tO,{open:n,onOpenChange:r,...o,children:[_.jsx(nO,{...a,children:e}),_.jsx(iO,{...u,children:_.jsx(sO,{...c,children:_.jsx(aO,{...f,children:h})})})]})});Al.displayName="Tooltip";const lO=({tooltip:e,children:t})=>_.jsx(Al,{"data-slot":"button-tooltip-wrapper",trigger:t,TriggerProps:{render:_.jsx("div",{})},delay:300,children:e});lO.displayName="ButtonTooltipWrapper";const _a=({tooltip:e,shape:t,fullwidth:n,size:r,variant:i,loading:o,className:a,children:u,...c})=>_.jsx(Kr,{condition:!!e,render:_.jsx(lO,{tooltip:e}),children:_.jsx(hU,{nativeButton:!c.render,"data-slot":"button",className:Ie(Cr.button,PB({shape:t,size:r,variant:i,fullwidth:n}),a),...c,children:_.jsxs(qw,{ay:"center",ax:"center",children:[_.jsx(YM,{loading:o,children:u}),_.jsx(l3,{loading:o})]})})});_a.displayName="Button";function HW({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 xR=0;function qW(e,t="mui"){const[n,r]=C.useState(e),i=e||n;return C.useEffect(()=>{n==null&&(xR+=1,r(`${t}-${xR}`))},[n,t]),i}const wR=GB.useId;function GW(e,t){if(wR!==void 0){const n=wR();return e??`${t}-${n}`}return qW(e,t)}function VW(e){return GW(e,"base-ui")}const YW=C.createContext(void 0);function WW(e=!0){const t=C.useContext(YW);if(t===void 0&&!e)throw new Error(Xw(7));return t}const XW=C.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function KW(){return C.useContext(XW)}let QW=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function ZW(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}=KW(),g=C.useRef(-1),[y,b]=C.useState(o??(i===QW.GuessFromOrder?()=>{if(g.current===-1){const w=p.current;p.current+=1,g.current=w}return g.current}:-1)),v=C.useRef(null),S=C.useCallback(w=>{var A;if(v.current=w,y!==-1&&w!==null&&(f.current[y]=w,h)){const k=t!==void 0;h.current[y]=k?t:((A=r==null?void 0:r.current)==null?void 0:A.textContent)??w.textContent}},[y,f,h,t,r]);return ux(()=>{if(o!=null)return;const w=v.current;if(w)return a(w,n),()=>{u(w)}},[o,a,u,n]),ux(()=>{if(o==null)return c(w=>{var k;const A=v.current?(k=w.get(v.current))==null?void 0:k.index:null;A!=null&&b(A)})},[o,c,b]),C.useMemo(()=>({ref:S,index:y}),[y,S])}function JW(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=WM(),{ref:i,index:o}=ZW(e),a=n===o,u=C.useRef(null),c=hx(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 eX(e){const{render:t,className:n,state:r=Vs,props:i=OA,refs:o=OA,metadata:a,stateAttributesMapping:u,tag:c="div",...f}=e,{compositeProps:h,compositeRef:p}=JW({metadata:a});return Kw(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=Vs;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 nX="none",rX=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=VW(h||void 0),b=WW(),v=(b==null?void 0:b.value)??[],S=b?void 0:r,w=(i||(b==null?void 0:b.disabled))??!1,[A,k]=HW({controlled:b?y!==void 0&&v.indexOf(y)>-1:u,default:S,name:"Toggle",state:"pressed"}),R=lx((z,M)=>{var q;y&&((q=b==null?void 0:b.setGroupValue)==null||q.call(b,y,z,M)),a==null||a(z,M)}),{getButtonProps:D,buttonRef:T}=ZM({disabled:w,native:p}),$={disabled:w,pressed:A},N=[T,t],F=[{"aria-pressed":A,onClick(z){const M=!A,q=tX(nX,z.nativeEvent);R(M,q),!q.isCanceled&&k(M)}},g,D],j=Kw("button",e,{enabled:!b,state:$,ref:N,props:F});return b?_.jsx(eX,{tag:"button",render:c,className:n,state:$,refs:N,props:F}):j}),sy=({text:e,icon:t,children:n,...r})=>_.jsx(rX,{...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 _.jsxs(_a,{...i,children:[u,a??n]})}});sy.displayName="ToggleButton";const iX="_badge_1nwto_3",oX="_colored_1nwto_37",ec={badge:iX,"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},sX=ec.colored,uO=Object.fromEntries(Object.entries(Gw).map(([e,t])=>[e,`${t} ${sX}`])),aX=Mr({variants:{size:{small:ec["size-small"],medium:ec["size-medium"],large:ec["size-large"]},color:uO},defaultVariants:{size:"medium"}}),os=({size:e,color:t,className:n,children:r,...i})=>_.jsx(tt,{"data-slot":"badge",className:Ie(ec.badge,aX({size:e,color:t}),n),ay:"center",gap:1,...i,children:_.jsx(ze,{"data-slot":"badge-text",className:ec["badge-text"],size:-1,weight:"bold",children:r})});os.displayName="Badge";const lX="_status_iof57_1",ig={status:lX,"status-dot":"_status-dot_iof57_5","toggle-inverted":"_toggle-inverted_iof57_26","toggle-pulse":"_toggle-pulse_iof57_31"},uX=Mr({variants:{inverted:{true:ig["toggle-inverted"]},pulse:{true:ig["toggle-pulse"]},color:Gw}}),ay=({pulse:e,inverted:t,color:n,className:r,children:i,...o})=>_.jsxs(Kr,{condition:!!i,render:_.jsx(tt,{"data-slot":"status",className:Ie(ig.status,r),ay:"center",gap:2,...o}),children:[_.jsx("span",{"data-slot":"status-dot","data-colored":n?"":void 0,className:Ie(ig["status-dot"],uX({pulse:e,inverted:t,color:n}))}),i&&_.jsx(ze,{"data-slot":"status-text",size:0,children:i})]});ay.displayName="Status";const SR={meta:"Meta",ctrl:"Control",alt:"Alt",shift:"Shift"},cX={meta:"⌘",ctrl:"⌃",alt:"⌥",shift:"⇧",enter:"↵",backspace:"⌫",delete:"⌦",escape:"⎋",tab:"⇥",space:"␣",arrowup:"↑",arrowdown:"↓",arrowleft:"←",arrowright:"→"};function fX(e){const t=new Set;let n="";for(const r of e){const i=r.toLowerCase();SR[i]?t.add(SR[i]):n=i}return{modifiers:t,key:n}}function dX(e,t){const{modifiers:n,key:r}=fX(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 hX(e){return e.map(t=>cX[t.toLowerCase()]??t.toUpperCase()).join(" + ")}const pX="_kbd_19d6z_1",mX={kbd:pX},cO=({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=>{dX(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]),_.jsx("kbd",{"data-slot":"kbd","data-active":(t??i)||void 0,className:Ie(mX.kbd,e),...r,children:n?hX(n):null})};cO.displayName="Kbd";const fO="TimelineItem",gX="TimelineMarker",yX="TimelineConnector",bX="TimelineContent",dO=C.createContext(null);function ly(e){const t=C.useContext(dO);if(!t)throw new Error(`\`${e}\` must be used within \`${fO}\``);return t}function vX(e,t){return t===void 0?"pending":e<t?"completed":e===t?"active":"pending"}function xX(e,t){return t!==void 0&&e<t}const wX="_timeline_jo8nv_1",Si={timeline:wX,"timeline-item":"_timeline-item_jo8nv_33","timeline-media":"_timeline-media_jo8nv_43","timeline-rail":"_timeline-rail_jo8nv_53","timeline-marker-box":"_timeline-marker-box_jo8nv_66","timeline-connector":"_timeline-connector_jo8nv_76","connector-active":"_connector-active_jo8nv_88","timeline-marker":"_timeline-marker_jo8nv_66","timeline-content":"_timeline-content_jo8nv_132"},dS=Mr({variants:{color:uO}}),SX=Mr({base:Si["timeline-item"]}),CX=Mr({base:Si["timeline-marker"],variants:{status:{completed:Si["status-completed"],active:Si["status-active"],pending:Si["status-pending"]}},defaultVariants:{status:"pending"}}),EX=Mr({base:Si["timeline-connector"],variants:{active:{true:Si["connector-active"]}},defaultVariants:{active:!1}}),hO=({className:e,children:t,...n})=>_.jsx("div",{"data-slot":"timeline-media",className:Ie(Si["timeline-media"],e),...n,children:t});hO.displayName="TimelineMedia";const pO=({color:e,className:t,children:n,...r})=>{const{status:i}=ly(gX),o=n!=null?"content":"dot";return _.jsx("div",{"data-slot":"timeline-marker","data-variant":o,"data-status":i,className:Ie(CX({status:i}),dS({color:e}),t),...r,children:n})};pO.displayName="TimelineMarker";const mO=({forceMount:e,className:t,...n})=>{const{isLast:r,connectorActive:i}=ly(yX);return r&&!e?null:_.jsx("div",{"aria-hidden":"true","data-slot":"timeline-connector","data-active":i?"":void 0,className:Ie(EX({active:i}),t),...n})};mO.displayName="TimelineConnector";const gO=({className:e,children:t,...n})=>{const{status:r}=ly(bX);return _.jsx(Ve,{"data-slot":"timeline-content","data-status":r,className:Ie(Si["timeline-content"],e),gap:2,fullwidth:!0,ax:"stretch",...n,children:t})};gO.displayName="TimelineContent";const yO=({children:e,...t})=>_.jsx(ze,{"data-slot":"timeline-title",size:1,weight:"bold",...t,children:e});yO.displayName="TimelineTitle";const bO=({children:e,...t})=>_.jsx(ze,{"data-slot":"timeline-time",render:_.jsx("time",{}),shade:"muted",size:-1,...t,children:e});bO.displayName="TimelineTime";const vO=({children:e,...t})=>_.jsx(ze,{"data-slot":"timeline-description",shade:"muted",size:0,...t,children:e});vO.displayName="TimelineDescription";const xO=({title:e,time:t,description:n,color:r,media:i,content:o,className:a,children:u,MediaProps:c,MarkerProps:f,ConnectorProps:h,ContentProps:p,TitleProps:g,TimeProps:y,DescriptionProps:b,...v})=>{const{status:S}=ly(fO),w=e!=null||t!=null;return _.jsxs("li",{"data-slot":"timeline-item","data-status":S,"aria-current":S==="active"?"step":void 0,className:Ie(SX(),a),...v,children:[i!=null&&_.jsx(hO,{...c,children:i}),_.jsxs("div",{"data-slot":"timeline-rail",className:Ie(Si["timeline-rail"],dS({color:r})),children:[_.jsx("div",{className:Si["timeline-marker-box"],children:_.jsx(pO,{...f})}),_.jsx(mO,{...h})]}),_.jsxs(gO,{...p,children:[_.jsxs(Kr,{condition:w,render:_.jsx(Ve,{}),children:[w&&_.jsxs(tt,{gap:2,ay:"baseline","data-slot":"timeline-heading",children:[e!=null&&_.jsx(yO,{...g,children:e}),t!=null&&_.jsx(bO,{...y,children:t})]}),n!=null&&_.jsx(vO,{...b,children:n})]}),o,u]})]})};xO.displayName="TimelineItem";function wO({items:e,activeIndex:t,color:n,dir:r,className:i,children:o,ItemProps:a,...u}){const c=e?e.map((y,b)=>_.jsx(xO,{...a,...y},b)):o,f=C.Children.toArray(c),h=f.length,p=f.some(y=>C.isValidElement(y)&&y.props.media!=null),g=C.useMemo(()=>Array.from({length:h},(y,b)=>({index:b,status:vX(b,t),isLast:b===h-1,connectorActive:xX(b,t)})),[h,t]);return _.jsx("ol",{"data-slot":"timeline","data-has-media":p?"":void 0,className:Ie(Si.timeline,dS({color:n}),i),dir:r,...u,children:f.map((y,b)=>_.jsx(dO.Provider,{value:g[b],children:y},b))})}wO.displayName="Timeline";const kX="typescript",SO=!1,_X=!0,CO="",EO=!1,kO={javascript:"JavaScript",typescript:"TypeScript",jsx:"JSX",tsx:"TSX",json:"JSON",css:"CSS",html:"HTML",bash:"Bash",markdown:"Markdown",python:"Python"},Fp={"code-typography":"_code-typography_hkdop_4","shiki-theme":"_shiki-theme_hkdop_14","shiki-reset":"_shiki-reset_hkdop_24","line-numbers":"_line-numbers_hkdop_47"},AX=Mr({base:[Fp["code-typography"],Fp["shiki-theme"],Fp["shiki-reset"]],variants:{showLineNumbers:{true:Fp["line-numbers"]}},defaultVariants:{showLineNumbers:SO}}),RX="modulepreload",DX=function(e){return"/"+e},CR={},pi=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=DX(f),f in CR)return;CR[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":RX,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 jn=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function TX(e){return hS(e)}function hS(e){return Array.isArray(e)?$X(e):e instanceof RegExp?e:typeof e=="object"?MX(e):e}function $X(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=hS(e[n]);return t}function MX(e){let t={};for(let n in e)t[n]=hS(e[n]);return t}function _O(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function AO(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?AO(e.substring(0,e.length-1)):e.substr(~t+1)}var jv=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Bp=class{static hasCaptures(e){return e===null?!1:(jv.lastIndex=0,jv.test(e))}static replaceCaptures(e,t,n){return e.replace(jv,(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 RO(e,t){return e<t?-1:e>t?1:0}function DO(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=RO(e[i],t[i]);if(o!==0)return o}return 0}return n-r}function ER(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 TO(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var $O=class{constructor(e){ie(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}},og=class{constructor(e,t,n){ie(this,"_cachedMatchRoot",new $O(e=>this._root.match(e)));this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(LX(e),t)}static createFromParsedTheme(e,t){return zX(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=>OX(e.parent,i.parentScopes));return r?new MO(r.fontStyle,r.foreground,r.background):null}},zv=class Rm{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new Rm(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new Rm(n,t[r]);return n}push(t){return new Rm(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 OX(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&&!NX(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function NX(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var MO=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function LX(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"&&ER(a.settings.foreground)&&(f=a.settings.foreground);let h=null;typeof a.settings.background=="string"&&ER(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 jX(v,S,i,c,f,h)}}return n}var jX=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}},Kn=(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))(Kn||{});function zX(e,t){e.sort((c,f)=>{let h=RO(c.scope,f.scope);return h!==0||(h=DO(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 PX(t),a=new MO(n,o.getId(r),o.getId(i)),u=new FX(new Dx(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 og(o,a,u)}var PX=class{constructor(e){ie(this,"_isFrozen");ie(this,"_lastColorId");ie(this,"_id2color");ie(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)}},IX=Object.freeze([]),Dx=class OO{constructor(t,n,r,i,o){ie(this,"scopeDepth");ie(this,"parentScopes");ie(this,"fontStyle");ie(this,"foreground");ie(this,"background");this.scopeDepth=t,this.parentScopes=n||IX,this.fontStyle=r,this.foreground=i,this.background=o}clone(){return new OO(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)}},FX=class Tx{constructor(t,n=[],r={}){ie(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(Tx._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 Tx(this._mainRule.clone(),Dx.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(DO(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 Dx(t,n,r,i,o))}},Ec=class di{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=di.getLanguageId(t),r=di.getTokenType(t),i=di.getFontStyle(t),o=di.getForeground(t),a=di.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=di.getLanguageId(t),f=di.getTokenType(t),h=di.containsBalancedBrackets(t)?1:0,p=di.getFontStyle(t),g=di.getForeground(t),y=di.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 sg(e,t){const n=[],r=BX(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(kR(i)){const c=[];do c.push(i),i=r.next();while(kR(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 kR(e){return!!e&&!!e.match(/[\w\.:]+/)}function BX(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 NO(e){typeof e.dispose=="function"&&e.dispose()}var Md=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},UX=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},HX=class{constructor(){ie(this,"_references",[]);ie(this,"_seenReferenceKeys",new Set);ie(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))}},qX=class{constructor(e,t){ie(this,"seenFullScopeRequests",new Set);ie(this,"seenPartialScopeRequests",new Set);ie(this,"Q");this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Md(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new HX;for(const n of e)GX(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Md){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 GX(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 Md?Dm({baseGrammar:o,selfGrammar:i},r):$x(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 Md(u))}function $x(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];ag([r],t,n)}}function Dm(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&ag(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&ag(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function ag(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?_O({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&ag(r.patterns,{...t,repository:i},n);const o=r.include;if(!o)continue;const a=LO(o);switch(a.kind){case 0:Dm({...t,selfGrammar:t.baseGrammar},n);break;case 1:Dm(t,n);break;case 2:$x(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?$x(a.ruleName,c,n):Dm(c,n)}else a.kind===4?n.add(new UX(a.scopeName,a.ruleName)):n.add(new Md(a.scopeName));break}}}var VX=class{constructor(){ie(this,"kind",0)}},YX=class{constructor(){ie(this,"kind",1)}},WX=class{constructor(e){ie(this,"kind",2);this.ruleName=e}},XX=class{constructor(e){ie(this,"kind",3);this.scopeName=e}},KX=class{constructor(e,t){ie(this,"kind",4);this.scopeName=e,this.ruleName=t}};function LO(e){if(e==="$base")return new VX;if(e==="$self")return new YX;const t=e.indexOf("#");if(t===-1)return new XX(e);if(t===0)return new WX(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new KX(n,r)}}var QX=/\\(\d+)/,_R=/\\(\d+)/g,ZX=-1,jO=-2;var th=class{constructor(e,t,n,r){ie(this,"$location");ie(this,"id");ie(this,"_nameIsCapturing");ie(this,"_name");ie(this,"_contentNameIsCapturing");ie(this,"_contentName");this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Bp.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Bp.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${AO(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:Bp.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Bp.replaceCaptures(this._contentName,e,t)}},JX=class extends th{constructor(t,n,r,i,o){super(t,n,r,i);ie(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!")}},eK=class extends th{constructor(t,n,r,i,o){super(t,n,r,null);ie(this,"_match");ie(this,"captures");ie(this,"_cachedCompiledPatterns");this._match=new Od(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 Nd,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},AR=class extends th{constructor(t,n,r,i,o){super(t,n,r,i);ie(this,"hasMissingPatterns");ie(this,"patterns");ie(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 Nd,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Mx=class extends th{constructor(t,n,r,i,o,a,u,c,f,h){super(t,n,r,i);ie(this,"_begin");ie(this,"beginCaptures");ie(this,"_end");ie(this,"endHasBackReferences");ie(this,"endCaptures");ie(this,"applyEndPatternLast");ie(this,"hasMissingPatterns");ie(this,"patterns");ie(this,"_cachedCompiledPatterns");this._begin=new Od(o,this.id),this.beginCaptures=a,this._end=new Od(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 Nd;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}},lg=class extends th{constructor(t,n,r,i,o,a,u,c,f){super(t,n,r,i);ie(this,"_begin");ie(this,"beginCaptures");ie(this,"whileCaptures");ie(this,"_while");ie(this,"whileHasBackReferences");ie(this,"hasMissingPatterns");ie(this,"patterns");ie(this,"_cachedCompiledPatterns");ie(this,"_cachedCompiledWhilePatterns");this._begin=new Od(o,this.id),this.beginCaptures=a,this.whileCaptures=c,this._while=new Od(u,jO),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 Nd;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 Nd,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||""),this._cachedCompiledWhilePatterns}},zO=class Vn{static createCaptureRule(t,n,r,i,o){return t.registerRule(a=>new JX(n,a,r,i,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new eK(t.$vscodeTextmateLocation,t.id,t.name,t.match,Vn._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=_O({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new AR(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,Vn._compilePatterns(o,n,r))}return t.while?new lg(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 Mx(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=LO(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 AR||f instanceof Mx||f instanceof lg)&&f.hasMissingPatterns&&f.patterns.length===0&&(h=!0),h)continue;i.push(c)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Od=class PO{constructor(t,n){ie(this,"source");ie(this,"ruleId");ie(this,"hasAnchor");ie(this,"hasBackReferences");ie(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=QX.test(this.source):this.hasBackReferences=!1}clone(){return new PO(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 _R.lastIndex=0,this.source.replace(_R,(i,o)=>TO(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}},Nd=class{constructor(){ie(this,"_items");ie(this,"_hasAnchors");ie(this,"_cached");ie(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 RR(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 RR(e,r,this._items.map(i=>i.ruleId))}},RR=class{constructor(e,t,n){ie(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(`
|
|
333
|
+
`)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Pv=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Wo,tK=(Wo=class{constructor(t,n){ie(this,"_defaultAttributes");ie(this,"_embeddedLanguagesMatcher");ie(this,"_getBasicScopeAttributes",new $O(t=>{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new Pv(n,r)}));this._defaultAttributes=new Pv(t,8),this._embeddedLanguagesMatcher=new nK(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?Wo._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(Wo.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!")}},ie(Wo,"_NULL_SCOPE_METADATA",new Pv(0,0)),ie(Wo,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),Wo),nK=class{constructor(e){ie(this,"values");ie(this,"scopesRegExp");if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>TO(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])}},DR=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function IO(e,t,n,r,i,o,a,u){const c=t.content.length;let f=!1,h=-1;if(a){const y=rK(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 DR(i,!0);g()}return new DR(i,!1);function g(){const y=iK(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===ZX){const w=i.getRule(e);o.produce(i,b[0].start),i=i.withContentNameScopesList(i.nameScopesList),ed(e,t,n,i,o,w.endCaptures,b),o.produce(i,b[0].end);const A=i;if(i=i.parent,h=A.getAnchorPos(),!S&&A.getEnterPos()===r){i=A,o.produce(i,c),f=!0;return}}else{const w=e.getRule(v);o.produce(i,b[0].start);const A=i,k=w.getName(t.content,b),R=i.contentNameScopesList.pushAttributed(k,e);if(i=i.push(v,r,h,b[0].end===c,null,R,R),w instanceof Mx){const D=w;ed(e,t,n,i,o,D.beginCaptures,b),o.produce(i,b[0].end),h=b[0].end;const T=D.getContentName(t.content,b),$=R.pushAttributed(T,e);if(i=i.withContentNameScopesList($),D.endHasBackReferences&&(i=i.withEndRule(D.getEndWithResolvedBackReferences(t.content,b))),!S&&A.hasSameRuleAs(i)){i=i.pop(),o.produce(i,c),f=!0;return}}else if(w instanceof lg){const D=w;ed(e,t,n,i,o,D.beginCaptures,b),o.produce(i,b[0].end),h=b[0].end;const T=D.getContentName(t.content,b),$=R.pushAttributed(T,e);if(i=i.withContentNameScopesList($),D.whileHasBackReferences&&(i=i.withEndRule(D.getWhileWithResolvedBackReferences(t.content,b))),!S&&A.hasSameRuleAs(i)){i=i.pop(),o.produce(i,c),f=!0;return}}else if(ed(e,t,n,i,o,w.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 rK(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 lg&&u.push({rule:f,stack:c})}for(let c=u.pop();c;c=u.pop()){const{ruleScanner:f,findOptions:h}=aK(c.rule,e,c.stack.endRule,n,r===a),p=f.findNextMatchSync(t,r,h);if(p){if(p.ruleId!==jO){i=c.stack.pop();break}p.captureIndices&&p.captureIndices.length&&(o.produce(c.stack,p.captureIndices[0].start),ed(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 iK(e,t,n,r,i,o){const a=oK(e,t,n,r,i,o),u=e.getInjections();if(u.length===0)return a;const c=sK(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 oK(e,t,n,r,i,o){const a=i.getRule(e),{ruleScanner:u,findOptions:c}=FO(a,e,i.endRule,n,r===o),f=u.findNextMatchSync(t,r,c);return f?{captureIndices:f.captureIndices,matchedRuleId:f.ruleId}:null}function sK(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:w}=FO(v,t,null,r,i===a),A=S.findNextMatchSync(n,i,w);if(!A)continue;const k=A.captureIndices[0].start;if(!(k>=u)&&(u=k,c=A.captureIndices,f=A.ruleId,h=b.priority,u===i))break}return c?{priorityMatch:h===-1,captureIndices:c,matchedRuleId:f}:null}function FO(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function aK(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function ed(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),w=g.getContentName(u,a),A=S.pushAttributed(w,e),k=r.push(g.retokenizeCapturedWithRuleId,y.start,-1,!1,null,S,A),R=e.createOnigString(u.substring(0,y.end));IO(e,R,n&&y.start===0,y.start,k,i,!1,0),NO(R);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 lK(S,y.end))}}for(;f.length>0;)i.produceFromScopes(f[f.length-1].scopes,f[f.length-1].endPos),f.pop()}var lK=class{constructor(e,t){ie(this,"scopes");ie(this,"endPos");this.scopes=e,this.endPos=t}};function uK(e,t,n,r,i,o,a,u){return new fK(e,t,n,r,i,o,a,u)}function TR(e,t,n,r,i){const o=sg(t,ug),a=zO.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 ug(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(cK(t[i],r))return n=i+1,!0;return!1})}function cK(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 fK=class{constructor(e,t,n,r,i,o,a,u){ie(this,"_rootId");ie(this,"_lastRuleId");ie(this,"_ruleId2desc");ie(this,"_includedGrammars");ie(this,"_grammarRepository");ie(this,"_grammar");ie(this,"_injections");ie(this,"_basicScopeAttributesProvider");ie(this,"_tokenTypeMatchers");if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=u,this._basicScopeAttributesProvider=new tK(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=a,this._grammar=$R(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const c of Object.keys(i)){const f=sg(c,ug);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)TR(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&&TR(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]=$R(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=zO.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Ox.NULL){i=!0;const f=this._basicScopeAttributesProvider.getDefaultAttributes(),h=this.themeProvider.getDefaults(),p=Ec.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=sd.createRootAndLookUpScopeName(g,p,this):y=sd.createRoot("unknown",p),t=new Ox(null,this._rootId,-1,-1,!1,null,y,y)}else i=!1,t.reset();e=e+`
|
|
334
|
+
`;const o=this.createOnigString(e),a=o.content.length,u=new hK(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=IO(this,o,i,0,t,u,!0,r);return NO(o),{lineLength:a,lineTokens:u,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function $R(e,t){return e=TX(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 sd=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=zv.push(i,o.scopeNames),r=new Wi(r,i,o.encodedTokenAttributes);return r}static createRoot(t,n){return new Wi(null,new zv(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const i=r.getMetadataForScope(t),o=new zv(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),Ec.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}},vi,Ox=(vi=class{constructor(t,n,r,i,o,a,u,c){ie(this,"_stackElementBrand");ie(this,"_enterPos");ie(this,"_anchorPos");ie(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:vi._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?sd.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(){vi._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,o,a,u){return new vi(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 vi(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=sd.fromExtension((t==null?void 0:t.nameScopesList)??null,n.nameScopesList);return new vi(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,sd.fromExtension(r,n.contentNameScopesList))}},ie(vi,"NULL",new vi(null,0,0,0,!1,null,null,null)),vi),dK=class{constructor(e,t){ie(this,"balancedBracketScopes");ie(this,"unbalancedBracketScopes");ie(this,"allowAny",!1);this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):sg(n,ug).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>sg(n,ug).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}},hK=class{constructor(e,t,n,r){ie(this,"_emitBinaryTokens");ie(this,"_lineText");ie(this,"_tokens");ie(this,"_binaryTokens");ie(this,"_lastTokenEndIndex");ie(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=Ec.set(i,0,u.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(a))}if(o&&(i=Ec.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}},pK=class{constructor(e,t){ie(this,"_grammars",new Map);ie(this,"_rawGrammars",new Map);ie(this,"_injectionGrammars",new Map);ie(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,uK(e,o,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},mK=class{constructor(t){ie(this,"_options");ie(this,"_syncRegistry");ie(this,"_ensureGrammarCache");this._options=t,this._syncRegistry=new pK(og.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(og.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 dK(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,i,o){const a=new qX(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)}},Nx=Ox.NULL;const gK=["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 BO(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 Lx(e){return e.toLowerCase()}class Or{constructor(t,n){this.attribute=n,this.property=t}}Or.prototype.attribute="";Or.prototype.booleanish=!1;Or.prototype.boolean=!1;Or.prototype.commaOrSpaceSeparated=!1;Or.prototype.commaSeparated=!1;Or.prototype.defined=!1;Or.prototype.mustUseProperty=!1;Or.prototype.number=!1;Or.prototype.overloadedBoolean=!1;Or.prototype.property="";Or.prototype.spaceSeparated=!1;Or.prototype.space=void 0;let yK=0;const ht=ql(),En=ql(),jx=ql(),Me=ql(),Yt=ql(),tc=ql(),Br=ql();function ql(){return 2**++yK}const zx=Object.freeze(Object.defineProperty({__proto__:null,boolean:ht,booleanish:En,commaOrSpaceSeparated:Br,commaSeparated:tc,number:Me,overloadedBoolean:jx,spaceSeparated:Yt},Symbol.toStringTag,{value:"Module"})),Iv=Object.keys(zx);class pS extends Or{constructor(t,n,r,i){let o=-1;if(super(t,n),MR(this,"space",i),typeof r=="number")for(;++o<Iv.length;){const a=Iv[o];MR(this,Iv[o],(r&zx[a])===zx[a])}}}pS.prototype.defined=!0;function MR(e,t,n){n&&(e[t]=n)}function Lc(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new pS(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Lx(r)]=r,n[Lx(o.attribute)]=r}return new nh(t,n,e.space)}const UO=Lc({properties:{ariaActiveDescendant:null,ariaAtomic:En,ariaAutoComplete:null,ariaBusy:En,ariaChecked:En,ariaColCount:Me,ariaColIndex:Me,ariaColSpan:Me,ariaControls:Yt,ariaCurrent:null,ariaDescribedBy:Yt,ariaDetails:null,ariaDisabled:En,ariaDropEffect:Yt,ariaErrorMessage:null,ariaExpanded:En,ariaFlowTo:Yt,ariaGrabbed:En,ariaHasPopup:null,ariaHidden:En,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Yt,ariaLevel:Me,ariaLive:null,ariaModal:En,ariaMultiLine:En,ariaMultiSelectable:En,ariaOrientation:null,ariaOwns:Yt,ariaPlaceholder:null,ariaPosInSet:Me,ariaPressed:En,ariaReadOnly:En,ariaRelevant:null,ariaRequired:En,ariaRoleDescription:Yt,ariaRowCount:Me,ariaRowIndex:Me,ariaRowSpan:Me,ariaSelected:En,ariaSetSize:Me,ariaSort:null,ariaValueMax:Me,ariaValueMin:Me,ariaValueNow:Me,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function HO(e,t){return t in e?e[t]:t}function qO(e,t){return HO(e,t.toLowerCase())}const bK=Lc({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:tc,acceptCharset:Yt,accessKey:Yt,action:null,allow:null,allowFullScreen:ht,allowPaymentRequest:ht,allowUserMedia:ht,alt:null,as:null,async:ht,autoCapitalize:null,autoComplete:Yt,autoFocus:ht,autoPlay:ht,blocking:Yt,capture:null,charSet:null,checked:ht,cite:null,className:Yt,cols:Me,colSpan:null,content:null,contentEditable:En,controls:ht,controlsList:Yt,coords:Me|tc,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ht,defer:ht,dir:null,dirName:null,disabled:ht,download:jx,draggable:En,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ht,formTarget:null,headers:Yt,height:Me,hidden:jx,high:Me,href:null,hrefLang:null,htmlFor:Yt,httpEquiv:Yt,id:null,imageSizes:null,imageSrcSet:null,inert:ht,inputMode:null,integrity:null,is:null,isMap:ht,itemId:null,itemProp:Yt,itemRef:Yt,itemScope:ht,itemType:Yt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ht,low:Me,manifest:null,max:null,maxLength:Me,media:null,method:null,min:null,minLength:Me,multiple:ht,muted:ht,name:null,nonce:null,noModule:ht,noValidate:ht,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:ht,optimum:Me,pattern:null,ping:Yt,placeholder:null,playsInline:ht,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ht,referrerPolicy:null,rel:Yt,required:ht,reversed:ht,rows:Me,rowSpan:Me,sandbox:Yt,scope:null,scoped:ht,seamless:ht,selected:ht,shadowRootClonable:ht,shadowRootDelegatesFocus:ht,shadowRootMode:null,shape:null,size:Me,sizes:null,slot:null,span:Me,spellCheck:En,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Me,step:null,style:null,tabIndex:Me,target:null,title:null,translate:null,type:null,typeMustMatch:ht,useMap:null,value:En,width:Me,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Yt,axis:null,background:null,bgColor:null,border:Me,borderColor:null,bottomMargin:Me,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ht,declare:ht,event:null,face:null,frame:null,frameBorder:null,hSpace:Me,leftMargin:Me,link:null,longDesc:null,lowSrc:null,marginHeight:Me,marginWidth:Me,noResize:ht,noHref:ht,noShade:ht,noWrap:ht,object:null,profile:null,prompt:null,rev:null,rightMargin:Me,rules:null,scheme:null,scrolling:En,standby:null,summary:null,text:null,topMargin:Me,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Me,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ht,disableRemotePlayback:ht,prefix:null,property:null,results:Me,security:null,unselectable:null},space:"html",transform:qO}),vK=Lc({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:Br,accentHeight:Me,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Me,amplitude:Me,arabicForm:null,ascent:Me,attributeName:null,attributeType:null,azimuth:Me,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Me,by:null,calcMode:null,capHeight:Me,className:Yt,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:Me,diffuseConstant:Me,direction:null,display:null,dur:null,divisor:Me,dominantBaseline:null,download:ht,dx:null,dy:null,edgeMode:null,editable:null,elevation:Me,enableBackground:null,end:null,event:null,exponent:Me,externalResourcesRequired:null,fill:null,fillOpacity:Me,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:tc,g2:tc,glyphName:tc,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Me,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Me,horizOriginX:Me,horizOriginY:Me,id:null,ideographic:Me,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Me,k:Me,k1:Me,k2:Me,k3:Me,k4:Me,kernelMatrix:Br,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Me,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:Me,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:Me,overlineThickness:Me,paintOrder:null,panose1:null,path:null,pathLength:Me,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Yt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Me,pointsAtY:Me,pointsAtZ:Me,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Br,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Br,rev:Br,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Br,requiredFeatures:Br,requiredFonts:Br,requiredFormats:Br,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:Me,specularExponent:Me,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Me,strikethroughThickness:Me,string:null,stroke:null,strokeDashArray:Br,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Me,strokeOpacity:Me,strokeWidth:null,style:null,surfaceScale:Me,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Br,tabIndex:Me,tableValues:null,target:null,targetX:Me,targetY:Me,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Br,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Me,underlineThickness:Me,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Me,values:null,vAlphabetic:Me,vMathematical:Me,vectorEffect:null,vHanging:Me,vIdeographic:Me,version:null,vertAdvY:Me,vertOriginX:Me,vertOriginY:Me,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Me,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:HO}),GO=Lc({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()}}),VO=Lc({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:qO}),YO=Lc({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),xK={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"},wK=/[A-Z]/g,OR=/-[a-z]/g,SK=/^data[-\w.:]+$/i;function WO(e,t){const n=Lx(t);let r=t,i=Or;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&SK.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(OR,EK);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!OR.test(o)){let a=o.replace(wK,CK);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=pS}return new i(r,t)}function CK(e){return"-"+e.toLowerCase()}function EK(e){return e.charAt(1).toUpperCase()}const XO=BO([UO,bK,GO,VO,YO],"html"),rh=BO([UO,vK,GO,VO,YO],"svg"),NR={}.hasOwnProperty;function kK(e,t){const n=t||{};function r(i,...o){let a=r.invalid;const u=r.handlers;if(i&&NR.call(i,e)){const c=String(i[e]);a=NR.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 _K=/["&'<>`]/g,AK=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,RK=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,DK=/[|\\{}()[\]^$+*?.]/g,LR=new WeakMap;function TK(e,t){if(e=e.replace(t.subset?$K(t.subset):_K,r),t.subset||t.escapeOnly)return e;return e.replace(AK,n).replace(RK,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 $K(e){let t=LR.get(e);return t||(t=MK(e),LR.set(e,t)),t}function MK(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(DK,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const OK=/[\dA-Fa-f]/;function NK(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!OK.test(String.fromCharCode(t))?r:r+";"}const LK=/\d/;function jK(e,t,n){const r="&#"+String(e);return n&&t&&!LK.test(String.fromCharCode(t))?r:r+";"}const zK=["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"],Fv={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:"€"},PK=["cent","copy","divide","gt","lt","not","para","times"],KO={}.hasOwnProperty,Px={};let Up;for(Up in Fv)KO.call(Fv,Up)&&(Px[Fv[Up]]=Up);const IK=/[^\dA-Za-z]/;function FK(e,t,n,r){const i=String.fromCharCode(e);if(KO.call(Px,i)){const o=Px[i],a="&"+o;return n&&zK.includes(o)&&!PK.includes(o)&&(!r||t&&t!==61&&IK.test(String.fromCharCode(t)))?a:a+";"}return""}function BK(e,t,n){let r=NK(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=FK(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const o=jK(e,t,n.omitOptionalSemicolons);o.length<r.length&&(r=o)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function nc(e,t){return TK(e,Object.assign({format:BK},t))}const UK=/^>|^->|<!--|-->|--!>|<!-$/g,HK=[">"],qK=["<",">"];function GK(e,t,n,r){return r.settings.bogusComments?"<?"+nc(e.value,Object.assign({},r.settings.characterReferences,{subset:HK}))+">":"<!--"+e.value.replace(UK,i)+"-->";function i(o){return nc(o,Object.assign({},r.settings.characterReferences,{subset:qK}))}}function VK(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function cg(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 QO(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function ZO(e){return e.join(" ").trim()}const YK=/[ \t\n\f\r]/g;function uy(e){return typeof e=="object"?e.type==="text"?jR(e.value):!1:jR(e)}function jR(e){return e.replace(YK,"")===""}const $n=eN(1),JO=eN(-1),WK=[];function eN(e){return t;function t(n,r,i){const o=n?n.children:WK;let a=(r||0)+e,u=o[a];if(!i)for(;u&&uy(u);)a+=e,u=o[a];return u}}const XK={}.hasOwnProperty;function tN(e){return t;function t(n,r,i){return XK.call(e,n.tagName)&&e[n.tagName](n,r,i)}}const mS=tN({body:QK,caption:Bv,colgroup:Bv,dd:tQ,dt:eQ,head:Bv,html:KK,li:JK,optgroup:nQ,option:rQ,p:ZK,rp:zR,rt:zR,tbody:oQ,td:PR,tfoot:sQ,th:PR,thead:iQ,tr:aQ});function Bv(e,t,n){const r=$n(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&uy(r.value.charAt(0)))}function KK(e,t,n){const r=$n(n,t);return!r||r.type!=="comment"}function QK(e,t,n){const r=$n(n,t);return!r||r.type!=="comment"}function ZK(e,t,n){const r=$n(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 JK(e,t,n){const r=$n(n,t);return!r||r.type==="element"&&r.tagName==="li"}function eQ(e,t,n){const r=$n(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function tQ(e,t,n){const r=$n(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function zR(e,t,n){const r=$n(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function nQ(e,t,n){const r=$n(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function rQ(e,t,n){const r=$n(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function iQ(e,t,n){const r=$n(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function oQ(e,t,n){const r=$n(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function sQ(e,t,n){return!$n(n,t)}function aQ(e,t,n){const r=$n(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function PR(e,t,n){const r=$n(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const lQ=tN({body:fQ,colgroup:dQ,head:cQ,html:uQ,tbody:hQ});function uQ(e){const t=$n(e,-1);return!t||t.type!=="comment"}function cQ(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 fQ(e){const t=$n(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&uy(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function dQ(e,t,n){const r=JO(n,t),i=$n(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&mS(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function hQ(e,t,n){const r=JO(n,t),i=$n(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&mS(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const Hp={name:[[`
|
|
335
|
+
\f\r &/=>`.split(""),`
|
|
336
|
+
\f\r "&'/=>\``.split("")],[`\0
|
|
337
|
+
\f\r "&'/<=>`.split(""),`\0
|
|
338
|
+
\f\r "&'/<=>\``.split("")]],unquoted:[[`
|
|
339
|
+
\f\r &>`.split(""),`\0
|
|
340
|
+
\f\r "&'<=>\``.split("")],[`\0
|
|
341
|
+
\f\r "&'<=>\``.split(""),`\0
|
|
342
|
+
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function pQ(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=rh);const f=mQ(r,e.properties),h=r.all(i.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=i,h&&(a=!1),(f||!o||!lQ(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||!mS(e,t,n))&&u.push("</"+e.tagName+">"),u.join("")}function mQ(e,t){const n=[];let r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){const o=gQ(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 gQ(e,t,n){const r=WO(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=nc(r.attribute,Object.assign({},e.settings.characterReferences,{subset:Hp.name[i][o]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?QO:ZO)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(u=nc(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Hp.unquoted[i][o]}))),u!==n&&(e.settings.quoteSmart&&cg(n,a)>cg(n,e.alternative)&&(a=e.alternative),u=a+nc(n,Object.assign({},e.settings.characterReferences,{subset:(a==="'"?Hp.single:Hp.double)[i][o],attribute:!0}))+a),c+(u&&"="+u))}const yQ=["<","&"];function nN(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:nc(e.value,Object.assign({},r.settings.characterReferences,{subset:yQ}))}function bQ(e,t,n,r){return r.settings.allowDangerousHtml?e.value:nN(e,t,n,r)}function vQ(e,t,n,r){return r.all(e)}const xQ=kK("type",{invalid:wQ,unknown:SQ,handlers:{comment:GK,doctype:VK,element:pQ,raw:bQ,root:vQ,text:nN}});function wQ(e){throw new Error("Expected node, not `"+e+"`")}function SQ(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const CQ={},EQ={},kQ=[];function _Q(e,t){const n=t||CQ,r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:AQ,all:RQ,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||gK,characterReferences:n.characterReferences||EQ,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?rh:XO,quote:r,alternative:i}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function AQ(e,t,n){return xQ(e,t,n,this)}function RQ(e){const t=[],n=e&&e.children||kQ;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function fg(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 pa(e,t){return e&&((t==null?void 0:t[e==null?void 0:e.toLowerCase()])||e)}function DQ(e){return Array.isArray(e)?e:[e]}async function rN(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function gS(e){return!e||["plaintext","txt","text","plain"].includes(e)}function TQ(e){return e==="ansi"||gS(e)}function yS(e){return e==="none"}function $Q(e){return yS(e)}function iN(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 cy(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 MQ(e){const t=cy(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 bS="light-dark()",OQ=["color","background-color"];function NQ(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 LQ(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?NQ(i,o):i})):e}function jQ(e,t,n,r,i="css-vars"){const o={content:e.content,explanation:e.explanation,offset:e.offset},a=t.map(h=>dg(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&&OQ.includes(g))if(r===bS&&a.length>1){const b=t.findIndex(A=>A==="light"),v=t.findIndex(A=>A==="dark");if(b===-1||v===-1)throw new jn('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const S=a[b][g]||"inherit",w=a[v][g]||"inherit";c[g]=`light-dark(${S}, ${w})`,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 dg(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&Kn.Italic&&(t["font-style"]="italic"),e.fontStyle&Kn.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&Kn.Underline&&n.push("underline"),e.fontStyle&Kn.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function Ix(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}const oN=new WeakMap;function fy(e,t){oN.set(e,t)}function Ld(e){return oN.get(e)}class jc{constructor(...t){ie(this,"_stacks",{});ie(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 jc(Object.fromEntries(DQ(n).map(r=>[r,Nx])),t)}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return zQ(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function zQ(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 PQ(e,t){if(!(e instanceof jc))throw new jn("Invalid grammar state");return e.getInternalStack(t)}function IQ(){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 jn(`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 jn(`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 jn(`Invalid decoration position ${JSON.stringify(a)}. Line ${a.line} length: ${u.length}`);return{...a,character:c,offset:i.posToIndex(a.line,c)}}};const i=MQ(n.source),o=(n.options.decorations||[]).map(a=>({...a,start:r(a.start),end:r(a.end)}));FQ(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 LQ(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 jn(`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="",w=-1,A=-1;if(g===0&&(w=0),y===0&&(A=0),y===Number.POSITIVE_INFINITY&&(A=v.children.length),w===-1||A===-1)for(let R=0;R<v.children.length;R++)S+=sN(v.children[R]),w===-1&&S.length===g&&(w=R+1),A===-1&&S.length===y&&(A=R+1);if(w===-1)throw new jn(`Failed to find start index for decoration ${JSON.stringify(b.start)}`);if(A===-1)throw new jn(`Failed to find end index for decoration ${JSON.stringify(b.end)}`);const k=v.children.slice(w,A);if(!b.alwaysWrap&&k.length===v.children.length)u(v,b,"line");else if(!b.alwaysWrap&&k.length===1&&k[0].type==="element")u(k[0],b,"token");else{const R={type:"element",tagName:"span",properties:{},children:k};u(R,b,"wrapper"),v.children.splice(w,k.length,R)}}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||(w=>w);return p.tagName=g.tagName||"span",p.properties={...p.properties,...b,class:p.properties.class},(S=g.properties)!=null&&S.class&&iN(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 FQ(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new jn(`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 jn(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(i.start)} intersect.`)}}}}function sN(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(sN).join(""):""}const BQ=[IQ()];function hg(e){const t=UQ(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...BQ]}function UQ(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 ul=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Uv={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function HQ(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 IR(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 qQ(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)Uv[r]&&t.push({type:"setDecoration",value:Uv[r]});else if(r<=29){const i=Uv[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:ul[r-30]}});else if(r===38){const i=IR(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:ul[r-40]}});else if(r===48){const i=IR(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:ul[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:ul[r-100+8]}})}return t}function GQ(){let e=null,t=null,n=new Set;return{parse(r){const i=[];let o=0;do{const a=HQ(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=qQ(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 VQ={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 YQ(e=VQ){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<ul.length;f++)r.push(t(ul[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 WQ={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 XQ(e,t,n){const r=fg(e,n),i=cy(t),o=Object.fromEntries(ul.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||WQ[c]]})),a=YQ(o),u=GQ();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=pa(h,r),p=pa(p,r),f.decorations.has("dim")&&(h=KQ(h));let g=Kn.None;return f.decorations.has("bold")&&(g|=Kn.Bold),f.decorations.has("italic")&&(g|=Kn.Italic),f.decorations.has("underline")&&(g|=Kn.Underline),f.decorations.has("strikethrough")&&(g|=Kn.Strikethrough),{content:f.value,offset:c[1],color:h,bgColor:p,fontStyle:g}}))}function KQ(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 vS(e,t,n={}){const{theme:r=e.getLoadedThemes()[0]}=n,i=e.resolveLangAlias(n.lang||"text");if(gS(i)||yS(r))return cy(t).map(c=>[{content:c[0],offset:c[1]}]);const{theme:o,colorMap:a}=e.setTheme(r);if(i==="ansi")return XQ(o,t,n);const u=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==u.name)throw new jn(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${u.name}"`);if(!n.grammarState.themes.includes(o.name))throw new jn(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${o.name}"`)}return ZQ(t,u,o,a,n)}function QQ(...e){if(e.length===2)return Ld(e[1]);const[t,n,r={}]=e,{lang:i="text",theme:o=t.getLoadedThemes()[0]}=r;if(gS(i)||yS(o))throw new jn("Plain language does not have grammar state");if(i==="ansi")throw new jn("ANSI language does not have grammar state");const{theme:a,colorMap:u}=t.setTheme(o),c=t.getLanguage(i);return new jc(xS(n,c,a,u,r).stateStack,c.name,a.name)}function ZQ(e,t,n,r,i){const o=xS(e,t,n,r,i),a=new jc(o.stateStack,t.name,n.name);return fy(o.tokens,a),o.tokens}function xS(e,t,n,r,i){const o=fg(n,i),{tokenizeMaxLineLength:a=0,tokenizeTimeLimit:u=500}=i,c=cy(e);let f=i.grammarState?PQ(i.grammarState,n.name)??Nx:i.grammarContextCode!=null?xS(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:Nx,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,w,A;i.includeExplanation&&(S=t.tokenizeLine(b,f,u),w=S.tokens,A=0);const k=t.tokenizeLine2(b,f,u),R=k.tokens.length/2;for(let D=0;D<R;D++){const T=k.tokens[2*D],$=D+1<R?k.tokens[2*D+2]:b.length;if(T===$)continue;const N=k.tokens[2*D+1],F=pa(r[Ec.getForeground(N)],o),j=Ec.getFontStyle(N),z={content:b.substring(T,$),offset:v+T,color:F,fontStyle:j};if(i.includeExplanation){const M=[];if(i.includeExplanation!=="scopeName")for(const V of n.settings){let U;switch(typeof V.scope){case"string":U=V.scope.split(/,/).map(I=>I.trim());break;case"object":U=V.scope;break;default:continue}M.push({settings:V,selectors:U.map(I=>I.split(/ /))})}z.explanation=[];let q=0;for(;T+q<$;){const V=w[A],U=b.substring(V.startIndex,V.endIndex);q+=U.length,z.explanation.push({content:U,scopes:i.includeExplanation==="scopeName"?JQ(V.scopes):eZ(M,V.scopes)}),A+=1}}h.push(z)}p.push(h),h=[],f=k.ruleStack}return{tokens:p,stateStack:f}}function JQ(e){return e.map(t=>({scopeName:t}))}function eZ(e,t){const n=[];for(let r=0,i=t.length;r<i;r++){const o=t[r];n[r]={scopeName:o,themeMatches:nZ(e,o,t.slice(0,r))}}return n}function FR(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function tZ(e,t,n){if(!FR(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)FR(e[r],n[i])&&(r-=1),i-=1;return r===-1}function nZ(e,t,n){const r=[];for(const{selectors:i,settings:o}of e)for(const a of i)if(tZ(a,t,n)){r.push(o);break}return r}function aN(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=vS(e,t,{...n,theme:c.theme}),h=Ld(f),p=typeof c.theme=="string"?c.theme:c.theme.name;return{tokens:f,state:h,theme:p}}),o=rZ(...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:w,...A}=y[f][p];g.variants[r[b].color]=A}),g})),u=i[0].state?new jc(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&&fy(a,u),a}function rZ(...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 pg(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(w=>w[1]).map(w=>({color:w[0],theme:w[1]})).sort((w,A)=>w.color===f?-1:A.color===f?1:0);if(g.length===0)throw new jn("`themes` option must not be empty");const y=aN(e,t,n);if(c=Ld(y),f&&bS!==f&&!g.find(w=>w.color===f))throw new jn(`\`themes\` option must contain the defaultColor key \`${f}\``);const b=g.map(w=>e.getTheme(w.theme)),v=g.map(w=>w.color);o=y.map(w=>w.map(A=>jQ(A,v,h,f,p))),c&&fy(o,c);const S=g.map(w=>fg(w.theme,n));i=BR(g,b,S,h,f,"fg",p),r=BR(g,b,S,h,f,"bg",p),a=`shiki-themes ${b.map(w=>w.name).join(" ")}`,u=f?void 0:[i,r].join(";")}else if("theme"in n){const f=fg(n.theme,n);o=vS(e,t,n);const h=e.getTheme(n.theme);r=pa(h.bg,f),i=pa(h.fg,f),a=h.name,c=Ld(o)}else throw new jn("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:i,bg:r,themeName:a,rootStyle:u,grammarState:c}}function BR(e,t,n,r,i,o,a){return e.map((u,c)=>{const f=pa(t[c][o],n[c])||"inherit",h=`${r+u.color}${o==="bg"?"-bg":""}:${f}`;if(c===0&&i){if(i===bS&&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 jn('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const y=pa(t[p][o],n[p])||"inherit",b=pa(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 mg(e,t,n,r={meta:{},options:n,codeToHast:(i,o)=>mg(e,i,o),codeToTokens:(i,o)=>pg(e,i,o)}){var b,v;let i=t;for(const S of hg(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}=pg(e,i,n);const{mergeWhitespaces:p=!0,mergeSameStyleTokens:g=!1}=n;p===!0?o=oZ(o):p==="never"&&(o=sZ(o)),g&&(o=aZ(o));const y={...r,get source(){return i}};for(const S of hg(n))o=((v=S.tokens)==null?void 0:v.call(y,o))||o;return iZ(o,{...n,fg:a,bg:u,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??f},y,h)}function iZ(e,t,n,r=Ld(e)){var v,S,w,A;const i=hg(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[k,R]of Object.entries(t.meta||{}))k.startsWith("_")||(f[k]=R);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:iN,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((k,R)=>{var $,N;R&&(u==="inline"?a.children.push({type:"element",tagName:"br",properties:{},children:[]}):u==="classic"&&o.push({type:"text",value:`
|
|
343
|
+
`}));let D={type:"element",tagName:"span",properties:{class:"line"},children:[]},T=0;for(const F of k){let j={type:"element",tagName:"span",properties:{...F.htmlAttrs},children:[{type:"text",value:F.content}]};const z=Ix(F.htmlStyle||dg(F));z&&(j.properties.style=z);for(const M of i)j=(($=M==null?void 0:M.span)==null?void 0:$.call(y,j,R+1,T,D,F))||j;u==="inline"?a.children.push(j):u==="classic"&&D.children.push(j),T+=F.content.length}if(u==="classic"){for(const F of i)D=((N=F==null?void 0:F.line)==null?void 0:N.call(y,D,R+1))||D;g.push(D),o.push(D)}else u==="inline"&&g.push(D)}),u==="classic"){for(const k of i)p=((v=k==null?void 0:k.code)==null?void 0:v.call(y,p))||p;h.children.push(p);for(const k of i)h=((S=k==null?void 0:k.pre)==null?void 0:S.call(y,h))||h;a.children.push(h)}else if(u==="inline"){const k=[];let R={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const $ of a.children)$.type==="element"&&$.tagName==="br"?(k.push(R),R={type:"element",tagName:"span",properties:{class:"line"},children:[]}):($.type==="element"||$.type==="text")&&R.children.push($);k.push(R);let T={type:"element",tagName:"code",properties:{},children:k};for(const $ of i)T=((w=$==null?void 0:$.code)==null?void 0:w.call(y,T))||T;a.children=[];for(let $=0;$<T.children.length;$++){$>0&&a.children.push({type:"element",tagName:"br",properties:{},children:[]});const N=T.children[$];N.type==="element"&&a.children.push(...N.children)}}let b=a;for(const k of i)b=((A=k==null?void 0:k.root)==null?void 0:A.call(y,b))||b;return r&&fy(b,r),b}function oZ(e){return e.map(t=>{const n=[];let r="",i;return t.forEach((o,a)=>{const c=!(o.fontStyle&&(o.fontStyle&Kn.Underline||o.fontStyle&Kn.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 sZ(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 aZ(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=Ix(i.htmlStyle||dg(i)),a=Ix(r.htmlStyle||dg(r)),u=i.fontStyle&&(i.fontStyle&Kn.Underline||i.fontStyle&Kn.Strikethrough),c=r.fontStyle&&(r.fontStyle&Kn.Underline||r.fontStyle&Kn.Strikethrough);!u&&!c&&o===a?i.content+=r.content:n.push({...r})}return n})}const lZ=_Q;function uZ(e,t,n){var o;const r={meta:{},options:n,codeToHast:(a,u)=>mg(e,a,u),codeToTokens:(a,u)=>pg(e,a,u)};let i=lZ(mg(e,t,n,r));for(const a of hg(n))i=((o=a.postprocess)==null?void 0:o.call(r,i,n))||i;return i}const UR={light:"#333333",dark:"#bbbbbb"},HR={light:"#fffffe",dark:"#1e1e1e"},qR="__shiki_resolved";function wS(e){var u,c,f,h,p;if(e!=null&&e[qR])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"?UR.light:UR.dark),n||(n=t.type==="light"?HR.light:HR.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,w;const y=((S=g.settings)==null?void 0:S.foreground)&&!g.settings.foreground.startsWith("#"),b=((w=g.settings)==null?void 0:w.background)&&!g.settings.background.startsWith("#");if(!y&&!b)return g;const v={...g,settings:{...g.settings}};if(y){const A=a(g.settings.foreground);t.colorReplacements[A]=g.settings.foreground,v.settings.foreground=A}if(b){const A=a(g.settings.background);t.colorReplacements[A]=g.settings.background,v.settings.background=A}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,qR,{enumerable:!1,writable:!1,value:!0}),t}async function lN(e){return Array.from(new Set((await Promise.all(e.filter(t=>!TQ(t)).map(async t=>await rN(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function uN(e){return(await Promise.all(e.map(async n=>$Q(n)?null:wS(await rN(n))))).filter(n=>!!n)}let cZ=3;function fZ(e,t=3){t>cZ||console.trace(`[SHIKI DEPRECATE]: ${e}`)}class Yu extends Error{constructor(t){super(t),this.name="ShikiError"}}function cN(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 Yu(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}class dZ extends mK{constructor(n,r,i,o={}){super(n);ie(this,"_resolvedThemes",new Map);ie(this,"_resolvedGrammars",new Map);ie(this,"_langMap",new Map);ie(this,"_langGraph",new Map);ie(this,"_textmateThemeCache",new WeakMap);ie(this,"_loadedThemesCache",null);ie(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=wS(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=og.createFromRawTheme(n),this._textmateThemeCache.set(n,r)),this._syncRegistry.setTheme(r)}getGrammar(n){return n=cN(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 Yu(`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 hZ{constructor(t,n){ie(this,"_langs",new Map);ie(this,"_scopeToLang",new Map);ie(this,"_injections",new Map);ie(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 Vf=0;function pZ(e){Vf+=1,e.warnings!==!1&&Vf>=10&&Vf%10===0&&console.warn(`[Shiki] ${Vf} 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 Yu("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(wS),i=new hZ(e.engine,n),o=new dZ(i,r,n,e.langAlias);let a;function u(k){return cN(k,e.langAlias)}function c(k){w();const R=o.getGrammar(typeof k=="string"?k:k.name);if(!R)throw new Yu(`Language \`${k}\` not found, you may need to load it first`);return R}function f(k){if(k==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};w();const R=o.getTheme(k);if(!R)throw new Yu(`Theme \`${k}\` not found, you may need to load it first`);return R}function h(k){w();const R=f(k);a!==k&&(o.setTheme(R),a=k);const D=o.getColorMap();return{theme:R,colorMap:D}}function p(){return w(),o.getLoadedThemes()}function g(){return w(),o.getLoadedLanguages()}function y(...k){w(),o.loadLanguages(k.flat(1))}async function b(...k){return y(await lN(k))}function v(...k){w();for(const R of k.flat(1))o.loadTheme(R)}async function S(...k){return w(),v(await uN(k))}function w(){if(t)throw new Yu("Shiki instance has been disposed")}function A(){t||(t=!0,o.dispose(),Vf-=1)}return{setTheme:h,getTheme:f,getLanguage:c,getLoadedThemes:p,getLoadedLanguages:g,resolveLangAlias:u,loadLanguage:b,loadLanguageSync:y,loadTheme:S,loadThemeSync:v,dispose:A,[Symbol.dispose]:A}}async function mZ(e){e.engine||fZ("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([uN(e.themes||[]),lN(e.langs||[]),e.engine]);return pZ({...e,themes:t,langs:n,engine:r})}async function gZ(e){const t=await mZ(e);return{getLastGrammarState:(...n)=>QQ(t,...n),codeToTokensBase:(n,r)=>vS(t,n,r),codeToTokensWithThemes:(n,r)=>aN(t,n,r),codeToTokens:(n,r)=>pg(t,n,r),codeToHast:(n,r)=>mg(t,n,r),codeToHtml:(n,r)=>uZ(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function zc(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function yZ(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}const SS=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),zn=String.raw;function Pc(e,t){if(e==null)throw new Error(t??"Value expected");return e}const fN=zn`\[\^?`,dN=`c.? | C(?:-.?)?|${zn`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${zn`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${zn`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${zn`o\{[^\}]*\}?`}|${zn`\d{1,3}`}`,CS=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,qp=new RegExp(zn`
|
|
344
|
+
\\ (?:
|
|
345
|
+
${dN}
|
|
346
|
+
| [gk]<[^>]*>?
|
|
347
|
+
| [gk]'[^']*'?
|
|
348
|
+
| .
|
|
349
|
+
)
|
|
350
|
+
| \( (?:
|
|
351
|
+
\? (?:
|
|
352
|
+
[:=!>({]
|
|
353
|
+
| <[=!]
|
|
354
|
+
| <[^>]*>
|
|
355
|
+
| '[^']*'
|
|
356
|
+
| ~\|?
|
|
357
|
+
| #(?:[^)\\]|\\.?)*
|
|
358
|
+
| [^:)]*[:)]
|
|
359
|
+
)?
|
|
360
|
+
| \*[^\)]*\)?
|
|
361
|
+
)?
|
|
362
|
+
| (?:${CS.source})+
|
|
363
|
+
| ${fN}
|
|
364
|
+
| .
|
|
365
|
+
`.replace(/\s+/g,""),"gsu"),Hv=new RegExp(zn`
|
|
366
|
+
\\ (?:
|
|
367
|
+
${dN}
|
|
368
|
+
| .
|
|
369
|
+
)
|
|
370
|
+
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
371
|
+
| ${fN}
|
|
372
|
+
| &&
|
|
373
|
+
| .
|
|
374
|
+
`.replace(/\s+/g,""),"gsu");function bZ(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=zZ(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(qp.lastIndex=0;u=qp.exec(e);){const p=vZ(o,e,u[0],qp.lastIndex);p.tokens?a.push(...p.tokens):p.token&&a.push(p.token),p.lastIndex!==void 0&&(qp.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"?IZ(p,h):p).flat(),flags:r}}function vZ(e,t,n,r){const[i,o]=n;if(n==="["||n==="[^"){const a=xZ(t,n,r);return{tokens:a.tokens,lastIndex:a.lastIndex}}if(i==="\\"){if("AbBGyYzZ".includes(o))return{token:GR(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:TZ(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:pN(n)}}if(o==="K")return{token:mN("keep",n)};if(o==="N"||o==="R")return{token:cl("newline",n,{negate:o==="N"})};if(o==="O")return{token:cl("any",n)};if(o==="X")return{token:cl("text_segment",n)};const a=hN(n,{inCharClass:!1});return Array.isArray(a)?{tokens:a}:{token:a}}if(i==="("){if(o==="*")return{token:NZ(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:OZ(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n==="("&&!e.captureGroup||n==="(?:")return{token:Uu("group",n)};if(n==="(?>")return{token:Uu("atomic",n)};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?<!")return{token:Uu(n[2]==="<"?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if(n==="("&&e.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:Uu("capturing",n,{...n!=="("&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if(n==="(?~|")throw new Error(`Unsupported absence function kind "${n}"`);return{token:Uu("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:AZ(n)}}if(e.getCurrentModX()){if(n==="#"){const a=t.indexOf(`
|
|
375
|
+
`,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:cl("dot",n)};if(n==="^"||n==="$"){const a=e.singleline?{"^":zn`\A`,$:zn`\Z`}[n]:n;return{token:GR(a,n)}}return n==="|"?{token:SZ(n)}:CS.test(n)?{tokens:FZ(n)}:{token:Xo(zc(n),n)}}function xZ(e,t,n){const r=[VR(t[1]==="^",t)];let i=1,o;for(Hv.lastIndex=n;o=Hv.exec(e);){const a=o[0];if(a[0]==="["&&a[1]!==":")i++,r.push(VR(a[1]==="^",a));else if(a==="]"){if(r.at(-1).type==="CharacterClassOpen")r.push(Xo(93,a));else if(i--,r.push(CZ(a)),!i)break}else{const u=wZ(a);Array.isArray(u)?r.push(...u):r.push(u)}}return{tokens:r,lastIndex:Hv.lastIndex||e.length}}function wZ(e){if(e[0]==="\\")return hN(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!SS.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return cl("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?EZ(e):e==="&&"?kZ(e):Xo(zc(e),e)}function hN(e,{inCharClass:t}){const n=e[1];if(n==="c"||n==="C")return MZ(e);if("dDhHsSwW".includes(n))return LZ(e);if(e.startsWith(zn`\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 jZ(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 Xo(zc(a),u)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return Xo(PZ(e),e);if(YR.has(n))return Xo(YR.get(n),e);if(/\d/.test(n))return _Z(t,e);if(e==="\\")throw new Error(zn`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return Xo(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function SZ(e){return{type:"Alternator",raw:e}}function GR(e,t){return{type:"Assertion",kind:e,raw:t}}function pN(e){return{type:"Backreference",raw:e}}function Xo(e,t){return{type:"Character",value:e,raw:t}}function CZ(e){return{type:"CharacterClassClose",raw:e}}function EZ(e){return{type:"CharacterClassHyphen",raw:e}}function kZ(e){return{type:"CharacterClassIntersector",raw:e}}function VR(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function cl(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function mN(e,t,n={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:Pc(n.flags),raw:t}}function _Z(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function AZ(e){return{type:"GroupClose",raw:e}}function Uu(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}function RZ(e,t,n,r){return{type:"NamedCallout",kind:e,tag:t,arguments:n,raw:r}}function DZ(e,t,n,r){return{type:"Quantifier",kind:e,min:t,max:n,raw:r}}function TZ(e){return{type:"Subroutine",raw:e}}const $Z=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),YR=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function MZ(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 Xo(zc(t.toUpperCase())-64,e)}function OZ(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=XR(n),a=XR(r),u={};if(o&&(u.enable=o),a&&(u.disable=a),e.endsWith(")"))return t.replaceCurrentModX(i),mN("flags",e,{flags:u});if(e.endsWith(":"))return t.pushModX(i),t.numOpenGroups++,Uu("group",e,{...(o||a)&&{flags:u}});throw new Error(`Unexpected flag modifier "${e}"`)}function NZ(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=$Z.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 RZ(f,r??null,(i==null?void 0:i.split(","))??null,e)}function WR(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 DZ(t,n,r,e)}function LZ(e){const t=e[1].toLowerCase();return cl({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function jZ(e){const{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return cl("property",e,{value:r,negate:t==="P"&&!n||t==="p"&&!!n})}function XR(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 zZ(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 PZ(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 IZ(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[pN(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(zn`Octal encoded byte above 177 unsupported "${n}"`)}else f=zc(c);o.push(Xo(f,(u===0?"\\":"")+c))}return o}function FZ(e){const t=[],n=new RegExp(CS,"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(WR(i.slice(0,-1)));continue}}}t.push(WR(i))}return t}function gN(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 BZ(e){return UZ.has(e.type)}const UZ=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function yN(e,t={}){const n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=bZ(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 Ol();case"Assertion":return HZ(b);case"Backreference":return qZ(b,o);case"Character":return dy(b.value,{useLastValid:!!y.isCheckingRangeEnd});case"CharacterClassHyphen":return GZ(b,o,y);case"CharacterClassOpen":return VZ(b,o,y);case"CharacterSet":return YZ(b,o);case"Directive":return JZ(b.kind,{flags:b.flags});case"GroupOpen":return WZ(b,o,y);case"NamedCallout":return tJ(b.kind,b.tag,b.arguments);case"Quantifier":return XZ(b,o);case"Subroutine":return KZ(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=rJ(eJ(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(zn`Subroutine uses a duplicate group name "\g<${g}>"`);h.get(g)[0].isSubroutined=!0}else throw new Error(zn`Subroutine uses a group name that's not defined "\g<${g}>"`);return a}function HZ({kind:e}){return Fx(Pc({"^":"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===zn`\B`||e===zn`\Y`})}function qZ({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,Bx(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 Bx(r)}return i(+r)}function GZ(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(),ZZ(a,c);throw new Error("Invalid character class range")}return dy(zc("-"))}function VZ({negate:e},t,n){const{tokens:r,walk:i}=t,o=[Tm()],a=r[t.nextIndex];let u=ZR(a);for(;u.type!=="CharacterClassClose";){if(u.type==="CharacterClassIntersector")o.push(Tm()),t.nextIndex++;else{const f=o.at(-1);f.body.push(i(f,n))}u=ZR(r[t.nextIndex],a)}const c=Tm({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 YZ({kind:e,negate:t,value:n},r){const{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:o,unicodePropertyMap:a}=r;if(e==="property"){const u=hy(n);if(SS.has(u)&&!(a!=null&&a.has(u)))e="posix",n=u;else return Hu(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:o,unicodePropertyMap:a})}return e==="posix"?nJ(n,{negate:t}):Ux(e,{negate:t})}function WZ(e,t,n){const{tokens:r,capturingGroups:i,namedGroupsByName:o,skipLookbehindValidation:a,walk:u}=t,c=iJ(e),f=c.type==="AbsenceFunction",h=QR(c),p=h&&c.negate;if(c.type==="CapturingGroup"&&(i.push(c),c.name&&yZ(o,c.name,[]).push(c)),f&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let g=JR(r[t.nextIndex]);for(;g.type!=="GroupClose";){if(g.type==="Alternator")c.body.push(Ol()),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(KR(b)||b.type==="CapturingGroup")throw new Error(v)}else if(KR(b)||QR(b)&&b.negate)throw new Error(v)}}g=JR(r[t.nextIndex])}return t.nextIndex++,c}function XZ({kind:e,min:t,max:n},r){const i=r.parent,o=i.body.at(-1);if(!o||!BZ(o))throw new Error("Quantifier requires a repeatable token");const a=vN(e,t,n,o);return i.body.pop(),a}function KZ({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=xN(i);return r.push(a),a}function QZ(e,t){return{type:"AbsenceFunction",kind:e,body:ih(t==null?void 0:t.body)}}function Ol(e){return{type:"Alternative",body:wN(e==null?void 0:e.body)}}function Fx(e,t){const n={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(n.negate=!!(t!=null&&t.negate)),n}function Bx(e,t){const n=!!(t!=null&&t.orphan);return{type:"Backreference",ref:e,...n&&{orphan:n}}}function bN(e,t){const n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!oJ(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:ih(t==null?void 0:t.body)}}function dy(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 Tm(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:wN(e==null?void 0:e.body)}}function ZZ(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function Ux(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 JZ(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:Pc(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function eJ(e){return{type:"Flags",...e}}function ji(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:ih(e==null?void 0:e.body)}}function il(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:ih(e==null?void 0:e.body)}}function tJ(e,t,n){return{type:"NamedCallout",kind:e,tag:t,arguments:n}}function nJ(e,t){const n=!!(t!=null&&t.negate);if(!SS.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}function vN(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 rJ(e,t){return{type:"Regex",body:ih(t==null?void 0:t.body),flags:e}}function xN(e){return{type:"Subroutine",ref:e}}function Hu(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(hy(e));if(!r){if(n.normalizeUnknownPropertyNames)r=sJ(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error(zn`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:r??e,negate:n.negate}}function iJ({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case"absence_repeater":return QZ("repeater");case"atomic":return ji({atomic:!0});case"capturing":return bN(i,{name:n});case"group":return ji({flags:e});case"lookahead":case"lookbehind":return il({behind:t==="lookbehind",negate:r});default:throw new Error(`Unexpected group kind "${t}"`)}}function ih(e){if(e===void 0)e=[Ol()];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 wN(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 KR(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function QR(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function oJ(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function sJ(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 hy(e){return e.replace(/[- _]+/g,"").toLowerCase()}function ZR(e,t){const n=t;return Pc(e,`Unclosed character class${(n==null?void 0:n.type)==="Character"&&n.value===93&&n.raw==="]"?' (started with "]")':""}`)}function JR(e){return Pc(e,"Unclosed group")}function ad(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 w,A;let f=0,h=!1;const p={node:o,parent:a,key:u,container:c,root:e,remove(){Gp(c).splice(Math.max(0,Ou(u)+f),1),f--,h=!0},removeAllNextSiblings(){return Gp(c).splice(Ou(u)+1)},removeAllPrevSiblings(){const k=Ou(u)+f;return f-=k,Gp(c).splice(0,Math.max(0,k))},replaceWith(k,R={}){const D=!!R.traverse;c?c[Math.max(0,Ou(u)+f)]=k:Pc(a,"Can't replace root node")[u]=k,D&&i(k,a,u,c),h=!0},replaceWithMultiple(k,R={}){const D=!!R.traverse;if(Gp(c).splice(Math.max(0,Ou(u)+f),1,...k),f+=k.length-1,D){let T=0;for(let $=0;$<k.length;$++)T+=i(k[$],a,Ou(u)+$+T,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(w=b==null?void 0:b.exit)==null||w.call(b,p,n),(A=y==null?void 0:y.exit)==null||A.call(y,p,n),f}return i(e),e}function Gp(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function Ou(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const aJ=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function lJ(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function uJ(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}const Ci=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function ES(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===Ci.DEFAULT==!a)){n instanceof Function?u+=n(c,{context:a?Ci.CHAR_CLASS:Ci.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 SN(e,t,n,r){ES(e,t,n,r)}function cJ(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===Ci.DEFAULT==!o))return a;u==="["?o++:u==="]"&&o&&o--,i.lastIndex==a.index&&i.lastIndex++}return null}function Vp(e,t,n){return!!cJ(e,t,0,n)}function fJ(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 eD=new RegExp(String.raw`(?<noncapturingStart>${aJ})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function dJ(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(eD.lastIndex=Number.isNaN(h)?0:h+o.length;v=eD.exec(e);){const{0:S,index:w,groups:{capturingStart:A,noncapturingStart:k}}=v;if(S==="[")g++;else if(g)S==="]"&&g--;else if(S===i&&!b)h=w,b=!0;else if(b&&k)y++;else if(A)b?y++:(c++,a.push(c+f));else if(S===")"&&b){if(!y){f++;const R=c+f;if(e=`${e.slice(0,h)}${o}${e.slice(h+i.length,w)}))<$$${R}>)${e.slice(w+1)}`,p=!0,u.push(R),lJ(n,R),r.size){const D=new Map;r.forEach((T,$)=>{D.set($>=R?$+1:$,T.map(N=>N>=R?N+1:N))}),r=D}break}y--}}}while(p);return n.push(...u),e=ES(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}`},Ci.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}const CN=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,qv=new RegExp(String.raw`
|
|
376
|
+
\\(?: \d+
|
|
377
|
+
| c[A-Za-z]
|
|
378
|
+
| [gk]<[^>]+>
|
|
379
|
+
| [pPu]\{[^\}]+\}
|
|
380
|
+
| u[A-Fa-f\d]{4}
|
|
381
|
+
| x[A-Fa-f\d]{2}
|
|
382
|
+
)
|
|
383
|
+
| \((?: \? (?: [:=!>]
|
|
384
|
+
| <(?:[=!]|[^>]+>)
|
|
385
|
+
| [A-Za-z\-]+:
|
|
386
|
+
| \(DEFINE\)
|
|
387
|
+
))?
|
|
388
|
+
| (?<qBase>${CN})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
389
|
+
| \\?.
|
|
390
|
+
`.replace(/\s+/g,""),"gsu");function hJ(e){if(!new RegExp(`${CN}\\+`).test(e))return{pattern:e};const t=[];let n=null,r=null,i="",o=0,a;for(qv.lastIndex=0;a=qv.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=uJ(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}qv.lastIndex+=g}else u[0]==="("?t.push(c):u===")"&&(n=t.length?t.pop():null);i=u}return{pattern:e}}const xi=String.raw,pJ=xi`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,Hx=xi`\(\?R=(?<rDepth>[^\)]+)\)|${pJ}`,py=xi`\(\?<(?![=!])(?<captureName>[^>]+)>`,EN=xi`${py}|(?<unnamed>\()(?!\?)`,el=new RegExp(xi`${py}|${Hx}|\(\?|\\?.`,"gsu"),Gv="Cannot use multiple overlapping recursions";function mJ(e,t){const{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:"plugin",...t};let i=(t==null?void 0:t.captureTransfers)??new Map;if(!new RegExp(Hx,"su").test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if(r==="plugin"&&Vp(e,xi`\(\?\(DEFINE\)`,Ci.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const o=[],a=Vp(e,xi`\\[1-9]`,Ci.DEFAULT),u=new Map,c=[];let f=!1,h=0,p=0,g;for(el.lastIndex=0;g=el.exec(e);){const{0:y,groups:{captureName:b,rDepth:v,gRNameOrNum:S,gRDepth:w}}=g;if(y==="[")h++;else if(h)y==="]"&&h--;else if(v){if(tD(v),f)throw new Error(Gv);if(a)throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const A=e.slice(0,g.index),k=e.slice(el.lastIndex);if(Vp(k,Hx,Ci.DEFAULT))throw new Error(Gv);const R=+v-1;e=nD(A,k,R,!1,n,o,p),i=iD(i,A,R,o.length,0,p);break}else if(S){tD(w);let A=!1;for(const M of c)if(M.name===S||M.num===+S){if(A=!0,M.hasRecursedWithin)throw new Error(Gv);break}if(!A)throw new Error(xi`Recursive \g cannot be used outside the referenced group "${r==="external"?S:xi`\g<${S}&R=${w}>`}"`);const k=u.get(S),R=fJ(e,k);if(a&&Vp(R,xi`${py}|\((?!\?)`,Ci.DEFAULT))throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const D=e.slice(k,g.index),T=R.slice(D.length+y.length),$=o.length,N=+w-1,F=nD(D,T,N,!0,n,o,p);i=iD(i,D,N,o.length-$,$,p);const j=e.slice(0,k),z=e.slice(k+R.length);e=`${j}${F}${z}`,el.lastIndex+=F.length-y.length-D.length-T.length,c.forEach(M=>M.hasRecursedWithin=!0),f=!0}else if(b)p++,u.set(String(p),el.lastIndex),u.set(b,el.lastIndex),c.push({num:p,name:b});else if(y[0]==="("){const A=y==="(";A&&(p++,u.set(String(p),el.lastIndex)),c.push(A?{num:p}:{})}else y===")"&&c.pop()}return n.push(...o),{pattern:e,captureTransfers:i,hiddenCaptures:n}}function tD(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 nD(e,t,n,r,i,o,a){const u=new Set;r&&SN(e+t,py,({groups:{captureName:f}})=>{u.add(f)},Ci.DEFAULT);const c=[n,r?u:null,i,o,a];return`${e}${rD(`(?:${e}`,"forward",...c)}(?:)${rD(`${t})`,"backward",...c)}${t}`}function rD(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+=ES(e,xi`${EN}|\\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 w=a+o.length+1;return o.push(w),gJ(i,w),b?g:`(?<${y}${S}>`}return xi`\k<${v}${S}>`},Ci.DEFAULT)}return f}function gJ(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function iD(e,t,n,r,i,o){if(e.size&&r){let a=0;SN(t,EN,()=>a++,Ci.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 Rn=String.fromCodePoint,ut=String.raw,Ii={},my=globalThis.RegExp;Ii.flagGroups=(()=>{try{new my("(?i:)")}catch{return!1}return!0})();Ii.unicodeSets=(()=>{try{new my("[[]]","v")}catch{return!1}return!0})();Ii.bugFlagVLiteralHyphenIsRange=Ii.unicodeSets?(()=>{try{new my(ut`[\d\-a]`,"v")}catch{return!0}return!1})():!1;Ii.bugNestedClassIgnoresNegation=Ii.unicodeSets&&new my("[[^a]]","v").test("a");function gg(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 jd(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function qx(e,t){return oD[e]>=oD[t]}function yJ(e,t){if(e==null)throw new Error(t??"Value expected");return e}var oD={ES2025:2025,ES2024:2024,ES2018:2018},bJ={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function kN(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!bJ[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=Ii.flagGroups?"ES2025":Ii.unicodeSets?"ES2024":"ES2018"),t}var vJ="[ -\r ]",xJ=new Set([Rn(304),Rn(305)]),Lo=ut`[\p{L}\p{M}\p{N}\p{Pc}]`;function _N(e){if(xJ.has(e))return[e];const t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),i=CJ.get(n),o=wJ.get(n),a=SJ.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 kS=new Map(`C Other
|
|
391
|
+
Cc Control cntrl
|
|
392
|
+
Cf Format
|
|
393
|
+
Cn Unassigned
|
|
394
|
+
Co Private_Use
|
|
395
|
+
Cs Surrogate
|
|
396
|
+
L Letter
|
|
397
|
+
LC Cased_Letter
|
|
398
|
+
Ll Lowercase_Letter
|
|
399
|
+
Lm Modifier_Letter
|
|
400
|
+
Lo Other_Letter
|
|
401
|
+
Lt Titlecase_Letter
|
|
402
|
+
Lu Uppercase_Letter
|
|
403
|
+
M Mark Combining_Mark
|
|
404
|
+
Mc Spacing_Mark
|
|
405
|
+
Me Enclosing_Mark
|
|
406
|
+
Mn Nonspacing_Mark
|
|
407
|
+
N Number
|
|
408
|
+
Nd Decimal_Number digit
|
|
409
|
+
Nl Letter_Number
|
|
410
|
+
No Other_Number
|
|
411
|
+
P Punctuation punct
|
|
412
|
+
Pc Connector_Punctuation
|
|
413
|
+
Pd Dash_Punctuation
|
|
414
|
+
Pe Close_Punctuation
|
|
415
|
+
Pf Final_Punctuation
|
|
416
|
+
Pi Initial_Punctuation
|
|
417
|
+
Po Other_Punctuation
|
|
418
|
+
Ps Open_Punctuation
|
|
419
|
+
S Symbol
|
|
420
|
+
Sc Currency_Symbol
|
|
421
|
+
Sk Modifier_Symbol
|
|
422
|
+
Sm Math_Symbol
|
|
423
|
+
So Other_Symbol
|
|
424
|
+
Z Separator
|
|
425
|
+
Zl Line_Separator
|
|
426
|
+
Zp Paragraph_Separator
|
|
427
|
+
Zs Space_Separator
|
|
428
|
+
ASCII
|
|
429
|
+
ASCII_Hex_Digit AHex
|
|
430
|
+
Alphabetic Alpha
|
|
431
|
+
Any
|
|
432
|
+
Assigned
|
|
433
|
+
Bidi_Control Bidi_C
|
|
434
|
+
Bidi_Mirrored Bidi_M
|
|
435
|
+
Case_Ignorable CI
|
|
436
|
+
Cased
|
|
437
|
+
Changes_When_Casefolded CWCF
|
|
438
|
+
Changes_When_Casemapped CWCM
|
|
439
|
+
Changes_When_Lowercased CWL
|
|
440
|
+
Changes_When_NFKC_Casefolded CWKCF
|
|
441
|
+
Changes_When_Titlecased CWT
|
|
442
|
+
Changes_When_Uppercased CWU
|
|
443
|
+
Dash
|
|
444
|
+
Default_Ignorable_Code_Point DI
|
|
445
|
+
Deprecated Dep
|
|
446
|
+
Diacritic Dia
|
|
447
|
+
Emoji
|
|
448
|
+
Emoji_Component EComp
|
|
449
|
+
Emoji_Modifier EMod
|
|
450
|
+
Emoji_Modifier_Base EBase
|
|
451
|
+
Emoji_Presentation EPres
|
|
452
|
+
Extended_Pictographic ExtPict
|
|
453
|
+
Extender Ext
|
|
454
|
+
Grapheme_Base Gr_Base
|
|
455
|
+
Grapheme_Extend Gr_Ext
|
|
456
|
+
Hex_Digit Hex
|
|
457
|
+
IDS_Binary_Operator IDSB
|
|
458
|
+
IDS_Trinary_Operator IDST
|
|
459
|
+
ID_Continue IDC
|
|
460
|
+
ID_Start IDS
|
|
461
|
+
Ideographic Ideo
|
|
462
|
+
Join_Control Join_C
|
|
463
|
+
Logical_Order_Exception LOE
|
|
464
|
+
Lowercase Lower
|
|
465
|
+
Math
|
|
466
|
+
Noncharacter_Code_Point NChar
|
|
467
|
+
Pattern_Syntax Pat_Syn
|
|
468
|
+
Pattern_White_Space Pat_WS
|
|
469
|
+
Quotation_Mark QMark
|
|
470
|
+
Radical
|
|
471
|
+
Regional_Indicator RI
|
|
472
|
+
Sentence_Terminal STerm
|
|
473
|
+
Soft_Dotted SD
|
|
474
|
+
Terminal_Punctuation Term
|
|
475
|
+
Unified_Ideograph UIdeo
|
|
476
|
+
Uppercase Upper
|
|
477
|
+
Variation_Selector VS
|
|
478
|
+
White_Space space
|
|
479
|
+
XID_Continue XIDC
|
|
480
|
+
XID_Start XIDS`.split(/\s/).map(e=>[hy(e),e])),wJ=new Map([["s",Rn(383)],[Rn(383),"s"]]),SJ=new Map([[Rn(223),Rn(7838)],[Rn(107),Rn(8490)],[Rn(229),Rn(8491)],[Rn(969),Rn(8486)]]),CJ=new Map([Bs(453),Bs(456),Bs(459),Bs(498),...Vv(8072,8079),...Vv(8088,8095),...Vv(8104,8111),Bs(8124),Bs(8140),Bs(8188)]),EJ=new Map([["alnum",ut`[\p{Alpha}\p{Nd}]`],["alpha",ut`\p{Alpha}`],["ascii",ut`\p{ASCII}`],["blank",ut`[\p{Zs}\t]`],["cntrl",ut`\p{Cc}`],["digit",ut`\p{Nd}`],["graph",ut`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",ut`\p{Lower}`],["print",ut`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",ut`[\p{P}\p{S}]`],["space",ut`\p{space}`],["upper",ut`\p{Upper}`],["word",ut`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",ut`\p{AHex}`]]);function kJ(e,t){const n=[];for(let r=e;r<=t;r++)n.push(r);return n}function Bs(e){const t=Rn(e);return[t.toLowerCase(),t]}function Vv(e,t){return kJ(e,t).map(n=>Bs(n))}var AN=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function _J(e,t){const n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};RN(e);const r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:qx(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};ad(e,AJ,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};ad(e,RJ,o);const a={groupsByName:o.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:o.reffedNodesByReferencer};return ad(e,DJ,a),e._originMap=o.groupOriginByCopy,e._strategy=r.strategy,e}var AJ={AbsenceFunction({node:e,parent:t,replaceWith:n}){const{body:r,kind:i}=e;if(i==="repeater"){const o=ji();o.body[0].body.push(il({negate:!0,body:r}),Hu("Any"));const a=ji();a.body[0].body.push(vN("greedy",0,1/0,o)),n(vn(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];jd(r,a,[]).push(...i)}},exit({node:e},{flagDirectivesByAlt:t}){var n;if((n=t.get(e))!=null&&n.length){const r=TN(t.get(e));if(r){const i=ji({flags:r});i.body[0].body=e.body,e.body=[vn(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(vn(il({body:[Ol({body:[Fx("string_end")]}),Ol({body:[dy(10)]})]}),t));else if(c==="line_start")a(vn(jo(ut`(?<=\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&&LJ(b))a(vn(il({negate:!0}),t));else{if(p)throw new Error(ut`Uses "\G" in a way that requires a subclass`);a(Us(Fx("string_start"),t)),u.strategy="clip_search"}}else if(!(c==="string_end"||c==="string_start"))if(c==="string_end_newline")a(vn(jo(ut`(?=\n?\z)`),t));else if(c==="word_boundary"){if(!y&&!h){const b=`(?:(?<=${Lo})(?!${Lo})|(?<!${Lo})(?=${Lo}))`,v=`(?:(?<=${Lo})(?=${Lo})|(?<!${Lo})(?!${Lo}))`;a(vn(jo(f?v:b),t))}}else throw new Error(`Unexpected assertion kind "${c}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!Wv(n)&&(n=Yv(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!Wv(r)&&(r=Yv(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=Tm({body:[e]});n(vn(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(Us(Ux("digit",{negate:f}),t));return}if(a&&(c==="space"||h==="space")){n(vn(Xv(jo(vJ),f),t));return}if(u&&(c==="word"||h==="word")){n(Us(Ux("word",{negate:f}),t));return}if(c==="any")n(Us(Hu("Any"),t));else if(c==="digit")n(Us(Hu("Nd",{negate:f}),t));else if(c!=="dot")if(c==="text_segment"){if(r==="strict")throw new Error(ut`Use of "\X" requires non-strict accuracy`);const p="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",g=ut`\p{RI}{2}|${p}(?:\u200D${p})*`;n(vn(jo(ut`(?>\r\n|${i?ut`\p{RGI_Emoji}`:g}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(c==="hex")n(Us(Hu("AHex",{negate:f}),t));else if(c==="newline")n(vn(jo(f?`[^
|
|
481
|
+
]`:`(?>\r
|
|
482
|
+
?|[
|
|
483
|
+
\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-${Rn(p.codePointAt(0)-1)}${Rn(p.codePointAt(2)+1)}-`),n(vn(jo(`[${p}]`),t))}else n(vn(Xv(jo(EJ.get(h)),f),t));else if(c==="property")kS.has(hy(h))||(e.key="sc");else if(c==="space")n(Us(Hu("space",{negate:f}),t));else if(c==="word")n(vn(Xv(jo(Lo),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=ji({flags:c});f.body[0].body=a(),i(vn(f,t),{traverse:!0})}else if(u==="keep"){const f=n.body[0],p=n.body.length===1&&gN(f,{type:"Group"})&&f.body[0].body.length===1?f.body[0]:n;if(t.parent!==p||p.body.length>1)throw new Error(ut`Uses "\K" in a way that's unsupported`);const g=il({behind:!0});g.body[0].body=o(),i(vn(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(vn(il({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=ji();t.body[0].body.push(e.body),e.body=vn(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=MN(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(ut`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!Wv(n)&&(n=Yv(n,t),e.ref=n)}},RJ={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=Us(sD(e.number),t);c.set(p,u.get(e.number)),n(p);return}u.set(e.number,e),a.set(e.number,[]),e.name&&jd(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=jd(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=gg(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?sD(0):DN(a,r.groupOriginByCopy,null);let f=c;if(!u){const h=TN(MJ(a,g=>g.type==="Group"&&!!g.flags)),p=h?gg(r.globalFlags,h):r.globalFlags;TJ(p,r.currentFlags)||(f=ji({flags:OJ(p)}),f.body[0].body.push(c))}n(vn(f,t),{traverse:!u})}},DJ={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=>$J(a,e));if(!o.length)n(vn(il({negate:!0}),t));else if(o.length>1){const a=ji({atomic:!0,body:o.reverse().map(u=>Ol({body:[Bx(u.number)]}))});n(vn(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=bN();e.body.at(-1).body.push(i)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function RN(e){ad(e,{"*"({node:t,parent:n}){t.parent=n}})}function TJ(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function $J(e,t){let n=t;do{if(n.type==="Regex")return!1;if(n.type==="Alternative")continue;if(n===e)return!1;const r=$N(n.parent);for(const i of r){if(i===n)break;if(i===e||ON(i,e))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function DN(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]=DN(a,t,i,n):(o==="type"&&a==="CapturingGroup"&&t.set(i,t.get(e)??e),i[o]=a);return i}function sD(e){const t=xN(e);return t.isRecursive=!0,t}function MJ(e,t){const n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function Yv(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 TN(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 OJ({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 $N(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function MN(e){const t=e.find(n=>n.kind==="search_start"||jJ(n,{negate:!1})||!NJ(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=MN(r.body);if(!i)return null;Array.isArray(i)?n.push(...i):n.push(i)}return n}return null}function ON(e,t){const n=$N(e)??[];for(const r of n)if(r===t||ON(r,t))return!0;return!1}function NJ({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function LJ(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function jJ(e,t){const n={negate:null,...t};return e.type==="LookaroundAssertion"&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&gN(e.body[0],{type:"Assertion",kind:"search_start"})}function Wv(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function jo(e,t){const r=yN(e,{...t,unicodePropertyMap:kS}).body;return r.length>1||r[0].body.length>1?ji({body:r}):r[0].body[0]}function Xv(e,t){return e.negate=t,e}function Us(e,t){return e.parent=t,e}function vn(e,t){return RN(e),e.parent=t,e}function zJ(e,t){const n=kN(t),r=qx(n.target,"ES2024"),i=qx(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];ad(e,PJ,{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,yJ(IJ[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&&jd(g._captureTransfers,y.transferTo,[]).push(b)}),g}var PJ={"*":{enter({node:e},t){if(lD(e)){const n=t.getCurrentModI();t.pushModI(e.flags?gg({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){lD(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){_S(Rn(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),NN(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&AN.has(e.value)&&t.setHasCasedChar()}},IJ={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?ut`\B`:ut`\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=Rn(e),r=Nu(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&_S(n)){const i=_N(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");Ii.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&a.some(uD)&&(a=[dy(45),...a.filter(f=>!uD(f))]);const u=()=>`[${i?"^":""}${a.map(n).join(r==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||Ii.bugNestedClassIgnoresNegation)&&!i){const h=a.filter(p=>p.type==="CharacterClass"&&p.kind==="union"&&p.negate);if(h.length){const p=ji(),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=Ol({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"&&!(Ii.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=Nu(n,i),a=Nu(r,i),u=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const c=NN(e);qJ(c).forEach(h=>{u.add(Array.isArray(h)?`${Nu(h[0],i)}-${Nu(h[1],i)}`:Nu(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?".":"[^]":ut`[^\n]`;if(e==="digit")return t?ut`\D`:ut`\d`;if(e==="property"){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&AN.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?ut`\P`:ut`\p`}{${r?`${r}=`:""}${n}}`}if(e==="word")return t?ut`\W`:ut`\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=gg(a,n));const u=t.map(o).join("|"),c=!i.verbose&&t.length===1&&r.type!=="Quantifier"&&!e&&(!i.useFlagMods||!n)?u:`(?${GJ(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)+VJ(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})`:ut`\g<${t}&R=${r}>`}},FJ=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),BJ=new Set(["-","\\","]","^","["]),UJ=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),aD=new Map([[9,ut`\t`],[10,ut`\n`],[11,ut`\v`],[12,ut`\f`],[13,ut`\r`],[8232,ut`\u2028`],[8233,ut`\u2029`],[65279,ut`\uFEFF`]]),HJ=new RegExp("^\\p{Cased}$","u");function _S(e){return HJ.test(e)}function NN(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=Rn(a);if(!_S(u))continue;const c=_N(u).filter(f=>{const h=f.codePointAt(0);return h<r||h>i});if(c.length&&(o.push(...c),n))break}return o}function Nu(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(aD.has(e))return aD.get(e);if(e<32||e>126&&e<160||e>262143||t&&YJ(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const i=n?r?UJ:BJ:FJ,o=Rn(e);return(i.has(o)?"\\":"")+o}function qJ(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 GJ(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 VJ({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 lD({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function YJ(e){return e>47&&e<58}function uD({type:e,value:t}){return e==="Character"&&t===45}var na,Go,xl,ra,wl,Xd,Gx,ba,WJ=(ba=class extends RegExp{constructor(n,r,i){var t=(...Eye)=>(super(...Eye),Ue(this,Xd),Ue(this,na,new Map),Ue(this,Go,null),Ue(this,xl),Ue(this,ra,null),Ue(this,wl,null),ie(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),Le(this,xl,a.source),a instanceof ba&&(Le(this,na,X(a,na)),Le(this,ra,X(a,ra)),Le(this,wl,X(a,wl)),this.rawOptions=a.rawOptions)}else{const a={hiddenCaptures:[],strategy:null,transfers:[],...i};t(o?"":n,r),Le(this,xl,n),Le(this,na,KJ(a.hiddenCaptures,a.transfers)),Le(this,wl,a.strategy),this.rawOptions=i??{}}o||Le(this,Go,this)}get source(){return X(this,xl)||"(?:)"}exec(n){if(!X(this,Go)){const{lazyCompile:o,...a}=this.rawOptions;Le(this,Go,new ba(X(this,xl),this.flags,a))}const r=this.global||this.sticky,i=this.lastIndex;if(X(this,wl)==="clip_search"&&r&&i){this.lastIndex=0;const o=lt(this,Xd,Gx).call(this,n.slice(i));return o&&(XJ(o,i,n,this.hasIndices),this.lastIndex+=i),o}return lt(this,Xd,Gx).call(this,n)}},na=new WeakMap,Go=new WeakMap,xl=new WeakMap,ra=new WeakMap,wl=new WeakMap,Xd=new WeakSet,Gx=function(n){X(this,Go).lastIndex=this.lastIndex;const r=k_(ba.prototype,this,"exec").call(X(this,Go),n);if(this.lastIndex=X(this,Go).lastIndex,!r||!X(this,na).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}=X(this,na).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){X(this,ra)||Le(this,ra,QJ(this.source));const p=X(this,ra).get(f);p&&(r.groups[p]=i[u],this.hasIndices&&(r.indices.groups[p]=o[u]))}}}return r},ba);function XJ(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 KJ(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)jd(n,o,{}).transferTo=r;return n}function QJ(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 ZJ(e,t){const n=JJ(e,t);return n.options?new WJ(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function JJ(e,t){const n=kN(t),r=yN(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:kS}),i=_J(r,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),o=zJ(i,n),a=mJ(o.pattern,{captureTransfers:o._captureTransfers,hiddenCaptures:o._hiddenCaptures,mode:"external"}),u=hJ(a.pattern),c=dJ(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 cD=4294967295;class eee{constructor(t,n={}){ie(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:cD,end:cD,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 tee(e,t){return ZJ(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function nee(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||(t.regexConstructor=n=>tee(n,{target:t.target})),{createScanner(n){return new eee(n,t)},createString(n){return{content:n}}}}const ree=[[/^(<!--)(.+)(-->)$/,!1],[/^(\/\*)(.+)(\*\/)$/,!1],[/^(\/\/|["'#]|;{1,2}|%{1,2}|--)(.*)$/,!0],[/^(\*)(.+)$/,!0]];function iee(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(!Kv(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=Kv(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=Kv(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=fD(o[u-1],"{")&&fD(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 fD(e,t){if(e.type!=="element")return!1;const n=e.children[0];return n.type!=="text"?!1:n.value.trim()===t}function Kv(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 ree){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 oee(e){const t=e.match(/(?:\/\/|["'#]|;{1,2}|%{1,2}|--)(\s*)$/);return t&&t[1].trim().length===0?e.slice(0,t.index):e}function see(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=iee(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]=oee(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)===`
|
|
484
|
+
`&&(g=2),i.children.splice(h,g)}}}}function aee(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 Yp=Symbol("highlighted-lines");function lee(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[Yp]??(o[Yp]=aee(this.options.meta.__raw));const a=o[Yp]??[],u=n?i-1:i;return a.includes(u)&&this.addClassToHast(r,t),r}}}function uee(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function LN(e={},t="@shikijs/transformers:notation-map"){const{classMap:n={},classActivePre:r=void 0,classActiveCode:i=void 0}=e;return see(t,new RegExp(`#?\\s*\\[!code (${Object.keys(n).map(uee).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 cee(e={}){const{classLineAdd:t="diff add",classLineRemove:n="diff remove",classActivePre:r="has-diff",classActiveCode:i}=e;return LN({classMap:{"++":t,"--":n},classActivePre:r,classActiveCode:i,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-diff")}function fee(e={}){const{classActiveLine:t="highlighted",classActivePre:n="has-highlighted",classActiveCode:r}=e;return LN({classMap:{highlight:t,hl:t},classActivePre:n,classActiveCode:r,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-highlight")}const dee="vitesse-black",hee="vitesse-light",pee={javascript:()=>pi(()=>import("./javascript-wDzz0qaB.js"),[]),typescript:()=>pi(()=>import("./typescript-BPQ3VLAy.js"),[]),jsx:()=>pi(()=>import("./jsx-g9-lgVsj.js"),[]),tsx:()=>pi(()=>import("./tsx-COt5Ahok.js"),[]),json:()=>pi(()=>import("./json-Cp-IABpG.js"),[]),css:()=>pi(()=>import("./css-DPfMkruS.js"),[]),html:()=>pi(()=>import("./html-GMplVEZG.js"),__vite__mapDeps([0,1,2])),bash:()=>pi(()=>import("./bash-Yzrsuije.js"),[]),markdown:()=>pi(()=>import("./markdown-Cvjx9yec.js"),[]),python:()=>pi(()=>import("./python-B6aJPvgy.js"),[])},mee=()=>pi(()=>import("./vitesse-black-Bkuqu6BP.js"),[]),gee=()=>pi(()=>import("./vitesse-light-CVO1_9PV.js"),[]);let Qv=null,Zv=null;const dD=new Set;async function AS(){return Qv||Zv||(Zv=gZ({themes:[mee,gee],langs:[],engine:nee()}),Qv=await Zv,Qv)}async function jN(e){if(dD.has(e))return;const t=pee[e];if(!t)throw new Error(`Unknown language: ${e}`);const n=await AS(),r=await t();await n.loadLanguage(r),dD.add(e)}async function yee(e,t="typescript",n={}){await jN(t);const r=await AS(),{highlightLines:i}=n,o=i!=null&&i.length?{__raw:`{${i.join(",")}}`}:void 0;return r.codeToHtml(e,{lang:t,themes:{light:hee,dark:dee},defaultColor:!1,...o&&{meta:o},transformers:[cee(),fee(),lee()]})}function zN(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;yee(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 io={"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"},PN=({code:e=CO,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 _.jsx(_a,{type:"button","data-slot":"code-block-copy-button","data-copied":i,"aria-label":i?"Copied":"Copy code",tooltip:i?"Copied":"Copy",className:Ie(io["code-block-icon-button"],n),onClick:a,size:"xsmall",variant:"inverted",...r,children:i?_.jsx(qg,{}):_.jsx(r3,{})})};PN.displayName="CodeBlockCopyButton";const IN=({pressed:e,defaultPressed:t,onPressedChange:n,className:r,...i})=>_.jsx(sy,{"data-slot":"code-block-wrap-button","aria-label":"Toggle line wrap",tooltip:"Toggle line wrap",className:Ie(io["code-block-icon-button"],r),size:"xsmall",variant:"inverted",pressed:e,defaultPressed:t,onPressedChange:n,icon:{pressed:_.jsx(LA,{}),unpressed:_.jsx(LA,{})},...i});IN.displayName="CodeBlockWrapButton";const bee='<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>',vee='<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>',hD='<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>',xee=`<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>
|
|
485
|
+
`,wee='<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>',See='<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>',Cee=`<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>
|
|
486
|
+
`,Eee=`<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>
|
|
487
|
+
`,kee=`<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>
|
|
488
|
+
`;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 _ee={typescript:Yi(bee),tsx:Yi(hD),javascript:Yi(vee),jsx:Yi(hD),python:Yi(xee),html:Yi(wee),css:Yi(See),json:Yi(Cee),bash:Yi(Eee),markdown:Yi(kee)},FN=({language:e,size:t=16,...n})=>{const r=_ee[e];return r?_.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};FN.displayName="LanguageIcon";const BN=({filename:e,language:t,copyable:n=_X,code:r=CO,wrappable:i=!1,wrap:o,defaultWrap:a,onWrapChange:u,className:c,LanguageIconProps:f,WrapButtonProps:h,CopyButtonProps:p,children:g,...y})=>_.jsxs(tt,{"data-slot":"code-block-header",className:Ie(io["code-block-header"],c),ay:"center",ax:"space-between",gap:3,py:2,px:4,fullwidth:!0,...y,children:[_.jsxs(tt,{ay:"center",gap:2,children:[t&&_.jsx(FN,{language:t,className:io["code-block-language-icon"],...f}),e&&_.jsx(ze,{size:-1,family:"mono",shade:"muted",children:e})]}),g,(i||n)&&_.jsxs(tt,{ay:"center",gap:1,children:[i&&_.jsx(IN,{pressed:o,defaultPressed:a,onPressedChange:u,...h}),n&&_.jsx(PN,{code:r,disabled:!r,...p})]})]});BN.displayName="CodeBlockHeader";const UN=({html:e,code:t,showLineNumbers:n=SO,wrap:r=EO,className:i,...o})=>{const a=Ie(io["code-block-content"],r&&io["code-block-content-wrap"],AX({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 _.jsx(Ve,{...u,className:a,dangerouslySetInnerHTML:{__html:e},...o});const c=(t??"").split(`
|
|
489
|
+
`);return _.jsx(Ve,{...u,className:a,...o,children:_.jsx("pre",{children:_.jsx("code",{children:c.map((f,h)=>_.jsx("span",{className:"line",children:f||" "},h))})})})};UN.displayName="CodeBlockContent";const RS=({code:e,language:t,filename:n,showLineNumbers:r,highlightLines:i,rows:o,defaultExpanded:a=!1,defaultWrap:u=EO,onWrapChange:c,onCopy:f,html:h,className:p,HeaderProps:g,LanguageIconProps:y,WrapButtonProps:b,CopyButtonProps:v,...S})=>{const w=t??kX,[A,k]=C.useState(u),R=C.useCallback(P=>{k(P),c==null||c(P)},[c]),{html:D,error:T}=zN(e,w,{highlightLines:i}),$=h||D||void 0,[N,F]=C.useState(a),[j,z]=C.useState(!1),M=C.useRef(null),q=o?`calc(${o} * var(--code-font-size) * var(--code-line-height) + 2 * var(--code-padding))`:void 0,V=o!=null&&!N,U=q?{maxHeight:V?q:void 0,overflowY:"auto"}:void 0;C.useEffect(()=>{if(!o||!M.current||!$)return;const P=M.current;z(P.scrollHeight>P.clientHeight+1)},[$,o,A,N]);const I=o!=null&&(j||N);return _.jsxs("div",{"data-slot":"code-block","data-expanded":o!=null&&N||void 0,"data-wrap":A||void 0,className:Ie(io["code-block"],p),...S,children:[_.jsx(BN,{filename:n,language:t,copyable:!0,code:e,wrappable:!0,wrap:A,onWrapChange:R,LanguageIconProps:y,WrapButtonProps:b,CopyButtonProps:{onCopy:f,...v},...g}),_.jsx("div",{ref:M,"data-slot":"code-block-scroll",className:io["code-block-scroll"],style:U,children:_.jsx(UN,{html:$,code:e,showLineNumbers:r,wrap:A})}),T&&!h&&_.jsxs("div",{"data-slot":"code-block-error",className:io["code-block-error"],children:["[Error: ",T.message,"]"]}),I&&_.jsx("button",{type:"button","data-slot":"code-block-expand-toggle",className:io["code-block-expand-toggle"],onClick:()=>F(P=>!P),"aria-expanded":N,children:N?"Show less":"Show more"})]})};RS.displayName="CodeBlock";const Jv={"code-inline":"_code-inline_h7rdt_1"},HN=({language:e,html:t,className:n,children:r,...i})=>{const o=typeof r=="string"?r:"",{html:a}=zN(o,e||"typescript");if(!e)return _.jsx("code",{"data-slot":"code-inline",className:Ie(Jv["code-inline"],n),...i,children:r});const u=t||a;if(u){const c=u.replace(/<pre[^>]*><code[^>]*>/,"").replace(/<\/code><\/pre>/,"");return _.jsx("code",{"data-slot":"code-inline",className:Ie(Jv["code-inline"],n),dangerouslySetInnerHTML:{__html:c},...i})}return _.jsx("code",{"data-slot":"code-inline",className:Ie(Jv["code-inline"],n),...i,children:r})};HN.displayName="CodeInline";const pD={};function Zr(e,t){const n=C.useRef(pD);return n.current===pD&&(n.current=e(t)),n}const e1=wa[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Aee=e1&&e1!==C.useLayoutEffect?e1:e=>e();function Ye(e){const t=Zr(Ree).current;return t.next=e,Aee(t.effect),t.trampoline}function Ree(){const e={next:void 0,callback:Dee,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function Dee(){}function yg({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 Tee=()=>{},qe=typeof document<"u"?C.useLayoutEffect:Tee;function $ee(e){const t=C.useRef(!0);t.current&&(t.current=!1,e())}function Nl(e,t,n,r){const i=Zr(qN).current;return Oee(i,e,t,n,r)&&GN(i,[e,t,n,r]),i.callback}function Mee(e){const t=Zr(qN).current;return Nee(t,e)&&GN(t,e),t.callback}function qN(){return{callback:null,cleanup:null,refs:[]}}function Oee(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function Nee(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function GN(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 VN={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},gy={...VN,position:"fixed",top:0,left:0},YN={...VN,position:"absolute"};function Ar(e){const t=Zr(Lee,e).current;return t.next=e,qe(t.effect),t}function Lee(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function Qn(){}const mD=Object.freeze([]),lr=Object.freeze({});function en(e,t,n,r){let i=!1,o=!1;const a=lr;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 Bi(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 jee=(e,t)=>Object.is(e,t);function kc(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function zee(e,t,n){return!e||e.length===0?!1:e.some(r=>r===void 0?!1:kc(t,r,n))}function ld(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:kc(r,t,n))}function Pee(e,t,n){return e.filter(r=>!kc(t,r,n))}function Vx(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function WN(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function Iee(e){if(!Array.isArray(e))return e!=null&&!("null"in e);if(WN(e)){for(const t of e)for(const n of t.items)if(n&&n.value==null&&n.label!=null)return!0;return!1}for(const t of e)if(t&&t.value==null&&t.label!=null)return!0;return!1}function Fee(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return Vx(e)}function qu(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?Vx(e.value):Vx(e)}function XN(e,t,n){function r(){return Fee(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){const i=WN(t)?t.flatMap(o=>o.items):t;if(e==null||typeof e!="object"){const o=i.find(a=>a.value===e);return o&&o.label!=null?o.label:r()}if("value"in e){const o=i.find(a=>a&&a.value===e.value);if(o&&o.label!=null)return o.label}}return r()}function Bee(e,t,n){return e.reduce((r,i,o)=>(o>0&&r.push(", "),r.push(_.jsx(C.Fragment,{children:XN(i,t,n)},o)),r),[])}var bg=Symbol("NOT_FOUND");function Uee(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Hee(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function qee(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 gD=e=>Array.isArray(e)?e:[e];function Gee(e){const t=Array.isArray(e[0])?e[0]:e;return qee(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Vee(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}function Yee(e){let t;return{get(n){return t&&e(t.key,n)?t.value:bg},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function Wee(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 bg}function i(u,c){r(u)===bg&&(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 Xee=(e,t)=>e===t;function Kee(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 Qee(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=Xee,maxSize:i=1,resultEqualityCheck:o}=n,a=Kee(r);let u=0;const c=i<=1?Yee(a):Wee(i,a);function f(){let h=c.get(arguments);if(h===bg){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 Zee=class{constructor(t){this.value=t}deref(){return this.value}},Jee=typeof WeakRef<"u"?WeakRef:Zee,ete=0,yD=1;function Wp(){return{s:ete,v:void 0,o:null,p:null}}function KN(e,t={}){let n=Wp();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=Wp(),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=Wp(),v.set(b,u)):u=S}}const f=u;let h;if(u.s===yD)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 Jee(h):h}return f.s=yD,f.v=h,h}return a.clearCache=()=>{n=Wp(),a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function QN(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()),Uee(f,`createSelector expects an output function after the inputs, but received: [${typeof f}]`);const h={...n,...c},{memoize:p,memoizeOptions:g=[],argsMemoize:y=KN,argsMemoizeOptions:b=[]}=h,v=gD(g),S=gD(b),w=Gee(i),A=p(function(){return o++,f.apply(null,arguments)},...v),k=y(function(){a++;const R=Vee(w,arguments);return u=A.apply(null,R),u},...S);return Object.assign(k,{resultFunc:f,memoizedResultFunc:A,dependencies:w,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>u,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:p,argsMemoize:y})};return Object.assign(r,{withTypes:()=>r}),r}var tte=QN(KN),nte=Object.assign((e,t=tte)=>{Hee(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:()=>nte});QN({memoize:Qee,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const Dt=(e,t,n,r,i,o,...a)=>{if(a.length>0)throw new Error(Bi(1));let u;if(e)u=e;else throw new Error("Missing arguments");return u},rte=[];function ZN(e){C.useEffect(e,rte)}const Xp=null;let ite=class{constructor(){ie(this,"callbacks",[]);ie(this,"callbacksCount",0);ie(this,"nextId",1);ie(this,"startId",1);ie(this,"isScheduled",!1);ie(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 Kp=new ite;let Gs=class JN{constructor(){ie(this,"currentId",Xp);ie(this,"cancel",()=>{this.currentId!==Xp&&(Kp.cancel(this.currentId),this.currentId=Xp)});ie(this,"disposeEffect",()=>this.cancel)}static create(){return new JN}static request(t){return Kp.request(t)}static cancel(t){return Kp.cancel(t)}request(t){this.cancel(),this.currentId=Kp.request(()=>{this.currentId=Xp,t()})}};function yy(){const e=Zr(Gs.create).current;return ZN(e.disposeEffect),e}function Io(e){return e==null?e:"current"in e?e.current:e}let zd=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const ote={[zd.startingStyle]:""},ste={[zd.endingStyle]:""},by={transitionStatus(e){return e==="starting"?ote:e==="ending"?ste:null}};function ate(e,t=!1,n=!0){const r=yy();return Ye((i,o=null)=>{r.cancel();function a(){tr.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=zd.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 Ic(e){const{enabled:t=!0,open:n,ref:r,onComplete:i}=e,o=Ye(i),a=ate(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 vy={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Aa={valid(e){return e===null?null:e?{[bD.valid]:""}:{[bD.invalid]:""}}},eL=C.createContext({invalid:void 0,name:void 0,validityData:{state:vy,errors:[],error:"",value:"",initialValue:null},setValidityData:Qn,disabled:void 0,touched:!1,setTouched:Qn,dirty:!1,setDirty:Qn,filled:!1,setFilled:Qn,focused:!1,setFocused:Qn,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=lr)=>e,getInputValidationProps:(e=lr)=>e,inputRef:{current:null},commit:async()=>{}}});function Ra(e=!0){const t=C.useContext(eL);if(t.setValidityData===Qn&&!e)throw new Error(Bi(28));return t}function Yx(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const lte=C.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Qn,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function Fc(){return C.useContext(lte)}function DS(e){const{enabled:t=!0,value:n,id:r,name:i,controlRef:o,commit:a}=e,{formRef:u}=Fc(),{invalid:c,markedDirtyRef:f,validityData:h,setValidityData:p}=Ra(),g=Ye(e.getValue);qe(()=>{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]),qe(()=>{!t||!r||u.current.fields.set(r,{getValue:g,name:i,controlRef:o,validityData:Yx(h,c),validate(y=!0){let b=n;b===void 0&&(b=g()),f.current=!0,y?tr.flushSync(()=>a(b)):a(b)}})},[a,o,t,u,g,r,c,f,i,h,n]),qe(()=>{const y=u.current.fields;return()=>{r&&y.delete(r)}},[u,r])}function xy(){return typeof window<"u"}function Da(e){return TS(e)?(e.nodeName||"").toLowerCase():"#document"}function Tn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function fo(e){var t;return(t=(TS(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function TS(e){return xy()?e instanceof Node||e instanceof Tn(e).Node:!1}function rn(e){return xy()?e instanceof Element||e instanceof Tn(e).Element:!1}function pn(e){return xy()?e instanceof HTMLElement||e instanceof Tn(e).HTMLElement:!1}function Wx(e){return!xy()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Tn(e).ShadowRoot}const ute=new Set(["inline","contents"]);function Ta(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Jr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!ute.has(i)}const cte=new Set(["table","td","th"]);function fte(e){return cte.has(Da(e))}const dte=[":popover-open",":modal"];function wy(e){return dte.some(t=>{try{return e.matches(t)}catch{return!1}})}const hte=["transform","translate","scale","rotate","perspective"],pte=["transform","translate","scale","rotate","perspective","filter"],mte=["paint","layout","strict","content"];function $S(e){const t=Sy(),n=rn(e)?Jr(e):e;return hte.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)||pte.some(r=>(n.willChange||"").includes(r))||mte.some(r=>(n.contain||"").includes(r))}function gte(e){let t=ss(e);for(;pn(t)&&!Jo(t);){if($S(t))return t;if(wy(t))return null;t=ss(t)}return null}function Sy(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const yte=new Set(["html","body","#document"]);function Jo(e){return yte.has(Da(e))}function Jr(e){return Tn(e).getComputedStyle(e)}function Cy(e){return rn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ss(e){if(Da(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Wx(e)&&e.host||fo(e);return Wx(t)?t.host:t}function tL(e){const t=ss(e);return Jo(t)?e.ownerDocument?e.ownerDocument.body:e.body:pn(t)&&Ta(t)?t:tL(t)}function ma(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=tL(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Tn(i);if(o){const u=Xx(a);return t.concat(a,a.visualViewport||[],Ta(i)?i:[],u&&n?ma(u):[])}return t.concat(i,ma(i,[],n))}function Xx(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const bte={...wa};let vD=0;function vte(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=bte.useId;function MS(e,t){if(xD!==void 0){const n=xD();return e??(t?`${t}-${n}`:n)}return vte(e,t)}function Ll(e){return MS(e,"base-ui")}const nL=C.createContext({controlId:void 0,registerControlId:Qn,labelId:void 0,setLabelId:Qn,messageIds:[],setMessageIds:Qn,getDescriptionProps:e=>e});function ls(){return C.useContext(nL)}function OS(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:o}=ls(),a=Ll(t),u=n?i:void 0,c=Zr(()=>Symbol("labelable-control")),f=C.useRef(!1),h=C.useRef(t!=null),p=Ye(()=>{!f.current||o===Qn||(f.current=!1,o(c.current,void 0))});return qe(()=>{if(o===Qn)return;let g;if(n){const y=r==null?void 0:r.current;rn(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 oh(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),qe(()=>{if(!e&&o&&r!=="ending"&&n){const u=Gs.request(()=>{i("ending")});return()=>{Gs.cancel(u)}}},[e,o,r,n]),qe(()=>{if(!e||t)return;const u=Gs.request(()=>{i(void 0)});return()=>{Gs.cancel(u)}},[t,e]),qe(()=>{if(!e||!t)return;e&&o&&r!=="idle"&&i("starting");const u=Gs.request(()=>{i("idle")});return()=>{Gs.cancel(u)}},[t,e,o,i,r]),C.useMemo(()=>({mounted:o,setMounted:a,transitionStatus:r}),[o,r])}function xte(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}}const Bc=typeof navigator<"u",t1=Cte(),rL=kte(),iL=Ete(),NS=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),oL=t1.platform==="MacIntel"&&t1.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(t1.platform),wte=Bc&&/apple/i.test(navigator.vendor),Kx=Bc&&/android/i.test(rL)||/android/i.test(iL);Bc&&rL.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const Ste=iL.includes("jsdom/");function Cte(){if(!Bc)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 Ete(){if(!Bc)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function kte(){if(!Bc)return"";const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform??""}function _te(e){const[t,n]=C.useState(null),r=Ye((u,c)=>{e||n(c||(oL?"touch":""))}),i=C.useCallback(()=>{n(null)},[]),{onClick:o,onPointerDown:a}=xte(r);return C.useMemo(()=>({openMethod:t,reset:i,triggerProps:{onClick:o,onPointerDown:a}}),[t,i,o,a])}function sL(e,t){const n=C.useRef(e),r=Ye(t);qe(()=>{n.current!==e&&r(n.current)},[e,r]),qe(()=>{n.current=e},[e])}var n1={exports:{}},r1={},wD;function Ate(){if(wD)return r1;wD=1;var e=ao;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 r1.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,r1}var SD;function aL(){return SD||(SD=1,n1.exports=Ate()),n1.exports}var Rte=aL(),i1={exports:{}},o1={},CD;function Dte(){if(CD)return o1;CD=1;var e=ao,t=aL();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 o1.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 w(T){if(!A){if(A=!0,k=T,T=g(T),y!==void 0&&v.hasValue){var $=v.value;if(y($,T))return R=$}return R=T}if($=R,r(k,T))return $;var N=g(T);return y!==void 0&&y($,N)?(k=T,$):(k=T,R=N)}var A=!1,k,R,D=p===void 0?null:p;return[function(){return w(h())},D===null?void 0:function(){return w(D())}]},[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},o1}var ED;function Tte(){return ED||(ED=1,i1.exports=Dte()),i1.exports}var $te=Tte();const Mte=parseInt(C.version,10);function LS(e){return Mte>=e}const Ote=LS(19),Nte=Ote?jte:zte;function nt(e,t,n,r,i){return Nte(e,t,n,r,i)}function Lte(e,t,n,r,i){const o=C.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return Rte.useSyncExternalStore(e.subscribe,o,o)}function jte(e,t,n,r,i){return Lte(e,t,n,r,i)}function zte(e,t,n,r,i){return $te.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,o=>t(o,n,r,i))}const Qx="data-base-ui-focusable",lL="active",uL="selected",Pte="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",ga="ArrowLeft",ya="ArrowRight",jS="ArrowUp",sh="ArrowDown";function no(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 Gt(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&&Wx(n)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function Li(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 Ite(e){return e.matches("html,body")}function zS(e){return pn(e)&&e.matches(Pte)}function Zx(e){return e?e.getAttribute("role")==="combobox"&&zS(e):!1}function vg(e){return e?e.hasAttribute(Qx)?e:e.querySelector(`[${Qx}]`)||e:null}const Fte=C.createContext(null),Bte=C.createContext(null),cL=()=>{var e;return((e=C.useContext(Fte))==null?void 0:e.id)||null},Ey=e=>{const t=C.useContext(Bte);return e??t};function Ute(){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 fL=class{constructor(t){ie(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t)}));ie(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 nt(this,t,n,r,i)}},Hte=class extends fL{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){C.useDebugValue(t),qe(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;qe(()=>(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);qe(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){C.useDebugValue(t);const r=n!==void 0;qe(()=>{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),nt(this,this.selectors[t],n,r,i)}useContextCallback(t,n){C.useDebugValue(t);const r=Ye(n??Qn);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 Xn(e){e.preventDefault(),e.stopPropagation()}function qte(e){return"nativeEvent"in e}function dL(e){return e.pointerType===""&&e.isTrusted?!0:Kx&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function hL(e){return Ste?!1:!Kx&&e.width===0&&e.height===0||Kx&&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 kD(e,t){return["mouse","pen"].includes(e)}function pL(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const Gte={open:Dt(e=>e.open),domReferenceElement:Dt(e=>e.domReferenceElement),referenceElement:Dt(e=>e.positionReference??e.referenceElement),floatingElement:Dt(e=>e.floatingElement),floatingId:Dt(e=>e.floatingId)};let Vte=class extends Hte{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:Ute(),nested:r,noEmit:i,triggerElements:a},Gte);ie(this,"setOpen",(n,r)=>{var i,o;if((!n||!this.state.open||pL(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)})}},Yte=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 mL(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,i=MS(),o=cL()!=null,a=Zr(()=>new Vte({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Yte,floatingId:i,nested:o,noEmit:!1})).current;return qe(()=>{const u={open:t,floatingId:i};r.reference!==void 0&&(u.referenceElement=r.reference,u.domReferenceElement=rn(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}const Yf=0;let xg=class gL{constructor(){ie(this,"currentId",Yf);ie(this,"clear",()=>{this.currentId!==Yf&&(clearTimeout(this.currentId),this.currentId=Yf)});ie(this,"disposeEffect",()=>this.clear)}static create(){return new gL}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Yf,n()},t)}isStarted(){return this.currentId!==Yf}};function Dr(){const e=Zr(xg.create).current;return ZN(e.disposeEffect),e}const Uc="none",Jx="trigger-press",Wte="trigger-hover",PS="outside-press",s1="item-press",ky="focus-out",Xte="escape-key",a1="list-navigation",Kte="cancel-open",Qte="window-resize";function Zte(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=Jx}=t,p=C.useRef(void 0),g=yy(),y=Dr(),b=C.useMemo(()=>({onPointerDown(v){p.current=v.pointerType},onMouseDown(v){const S=p.current,w=v.nativeEvent,A=n.select("open");if(v.button!==0||o==="click"||kD(S)&&u)return;const k=r.current.openEvent,R=k==null?void 0:k.type,D=n.select("domReferenceElement")!==v.currentTarget,T=A&&D||!(A&&a&&(!(k&&c)||R==="click"||R==="mousedown"));if(zS(w.target)){const N=en(h,w,w.target);T&&S==="touch"&&f>0?y.start(f,()=>{n.setOpen(!0,N)}):n.setOpen(T,N);return}const $=v.currentTarget;g.request(()=>{const N=en(h,w,$);T&&S==="touch"&&f>0?y.start(f,()=>{n.setOpen(!0,N)}):n.setOpen(T,N)})},onClick(v){if(o==="mousedown-only")return;const S=p.current;if(o==="mousedown"&&S){p.current=void 0;return}if(kD(S)&&u)return;const w=n.select("open"),A=r.current.openEvent,k=n.select("domReferenceElement")!==v.currentTarget,R=w&&k||!(w&&a&&(!(A&&c)||pL(A))),D=en(h,v.nativeEvent,v.currentTarget);R&&S==="touch"&&f>0?y.start(f,()=>{n.setOpen(!0,D)}):n.setOpen(R,D)},onKeyDown(){p.current=void 0}}),[r,o,u,n,c,a,g,y,f,h]);return C.useMemo(()=>i?{reference:b}:lr,[i,b])}function Zt(e){return(e==null?void 0:e.ownerDocument)||document}function wg(e){return`data-base-ui-${e}`}function rc(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,...rc(e,r.id,n)])}function _D(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 Jte={intentional:"onClick",sloppy:"onPointerDown"};function ene(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 tne(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:w}=t,A=Ey(w),k=Ye(typeof p=="function"?p:()=>!1),R=typeof p=="function"?k:p,D=C.useRef(!1),{escapeKey:T,outsidePress:$}=ene(S),N=C.useRef(null),F=Dr(),j=Dr(),z=Ye(()=>{j.clear(),c.current.insideReactTree=!1}),M=C.useRef(!1),q=C.useRef(""),V=Ye(Z=>{q.current=Z.pointerType}),U=Ye(()=>{const Z=q.current,K=Z==="pen"||!Z?"mouse":Z,ee=typeof g=="function"?g():g;return typeof ee=="string"?ee:ee[K]}),I=Ye(Z=>{var _e;if(!r||!f||!h||Z.key!=="Escape"||M.current)return;const K=(_e=c.current.floatingContext)==null?void 0:_e.nodeId,ee=A?rc(A.nodesRef.current,K):[];if(!T&&ee.length>0){let ue=!0;if(ee.forEach(re=>{var ce;(ce=re.context)!=null&&ce.open&&!re.context.dataRef.current.__escapeKeyBubbles&&(ue=!1)}),!ue)return}const Ee=qte(Z)?Z.nativeEvent:Z,he=en(Xte,Ee);n.setOpen(!1,he),!T&&!he.isPropagationAllowed&&Z.stopPropagation()}),P=Ye(Z=>{const K=U();return K==="intentional"&&Z.type!=="click"||K==="sloppy"&&Z.type==="click"}),G=Ye(()=>{c.current.insideReactTree=!0,j.start(0,z)}),W=Ye((Z,K=!1)=>{var Ae;if(P(Z)){z();return}if(c.current.insideReactTree){z();return}if(U()==="intentional"&&K||typeof R=="function"&&!R(Z))return;const ee=Li(Z),Ee=`[${wg("inert")}]`,he=Zt(n.select("floatingElement")).querySelectorAll(Ee),_e=n.context.triggerElements;if(ee&&(_e.hasElement(ee)||_e.hasMatchingElement(Ne=>Gt(Ne,ee))))return;let ue=rn(ee)?ee:null;for(;ue&&!Jo(ue);){const Ne=ss(ue);if(Jo(Ne)||!rn(Ne))break;ue=Ne}if(he.length&&rn(ee)&&!Ite(ee)&&!Gt(ee,n.select("floatingElement"))&&Array.from(he).every(Ne=>!Gt(ue,Ne)))return;if(pn(ee)&&!("touches"in Z)){const Ne=Jo(ee),ve=Jr(ee),$e=/auto|scroll/,le=Ne||$e.test(ve.overflowX),we=Ne||$e.test(ve.overflowY),be=le&&ee.clientWidth>0&&ee.scrollWidth>ee.clientWidth,Te=we&&ee.clientHeight>0&&ee.scrollHeight>ee.clientHeight,je=ve.direction==="rtl",rt=Te&&(je?Z.offsetX<=ee.offsetWidth-ee.clientWidth:Z.offsetX>ee.clientWidth),Mt=be&&Z.offsetY>ee.clientHeight;if(rt||Mt)return}const re=(Ae=c.current.floatingContext)==null?void 0:Ae.nodeId,ce=A&&rc(A.nodesRef.current,re).some(Ne=>{var ve;return Mi(Z,(ve=Ne.context)==null?void 0:ve.elements.floating)});if(Mi(Z,n.select("floatingElement"))||Mi(Z,n.select("domReferenceElement"))||ce)return;const oe=A?rc(A.nodesRef.current,re):[];if(oe.length>0){let Ne=!0;if(oe.forEach(ve=>{var $e;($e=ve.context)!=null&&$e.open&&!ve.context.dataRef.current.__outsidePressBubbles&&(Ne=!1)}),!Ne)return}n.setOpen(!1,en(PS,Z)),z()}),L=Ye(Z=>{U()!=="sloppy"||Z.pointerType==="touch"||!n.select("open")||!f||Mi(Z,n.select("floatingElement"))||Mi(Z,n.select("domReferenceElement"))||W(Z)}),Y=Ye(Z=>{if(U()!=="sloppy"||!n.select("open")||!f||Mi(Z,n.select("floatingElement"))||Mi(Z,n.select("domReferenceElement")))return;const K=Z.touches[0];K&&(N.current={startTime:Date.now(),startX:K.clientX,startY:K.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},F.start(1e3,()=>{N.current&&(N.current.dismissOnTouchEnd=!1,N.current.dismissOnMouseDown=!1)}))}),Q=Ye(Z=>{const K=Li(Z);function ee(){Y(Z),K==null||K.removeEventListener(Z.type,ee)}K==null||K.addEventListener(Z.type,ee)}),B=Ye(Z=>{const K=D.current;if(D.current=!1,F.clear(),Z.type==="mousedown"&&N.current&&!N.current.dismissOnMouseDown)return;const ee=Li(Z);function Ee(){Z.type==="pointerdown"?L(Z):W(Z,K),ee==null||ee.removeEventListener(Z.type,Ee)}ee==null||ee.addEventListener(Z.type,Ee)}),ae=Ye(Z=>{if(U()!=="sloppy"||!N.current||Mi(Z,n.select("floatingElement"))||Mi(Z,n.select("domReferenceElement")))return;const K=Z.touches[0];if(!K)return;const ee=Math.abs(K.clientX-N.current.startX),Ee=Math.abs(K.clientY-N.current.startY),he=Math.sqrt(ee*ee+Ee*Ee);he>5&&(N.current.dismissOnTouchEnd=!0),he>10&&(W(Z),F.clear(),N.current=null)}),te=Ye(Z=>{const K=Li(Z);function ee(){ae(Z),K==null||K.removeEventListener(Z.type,ee)}K==null||K.addEventListener(Z.type,ee)}),me=Ye(Z=>{U()!=="sloppy"||!N.current||Mi(Z,n.select("floatingElement"))||Mi(Z,n.select("domReferenceElement"))||(N.current.dismissOnTouchEnd&&W(Z),F.clear(),N.current=null)}),Ce=Ye(Z=>{const K=Li(Z);function ee(){me(Z),K==null||K.removeEventListener(Z.type,ee)}K==null||K.addEventListener(Z.type,ee)});C.useEffect(()=>{if(!r||!f)return;c.current.__escapeKeyBubbles=T,c.current.__outsidePressBubbles=$;const Z=new xg;function K(ue){n.setOpen(!1,en(Uc,ue))}function ee(){Z.clear(),M.current=!0}function Ee(){Z.start(Sy()?5:0,()=>{M.current=!1})}const he=Zt(i);he.addEventListener("pointerdown",V,!0),h&&(he.addEventListener("keydown",I),he.addEventListener("compositionstart",ee),he.addEventListener("compositionend",Ee)),R&&(he.addEventListener("click",B,!0),he.addEventListener("pointerdown",B,!0),he.addEventListener("touchstart",Q,!0),he.addEventListener("touchmove",te,!0),he.addEventListener("touchend",Ce,!0),he.addEventListener("mousedown",B,!0));let _e=[];return v&&(rn(a)&&(_e=ma(a)),rn(i)&&(_e=_e.concat(ma(i))),!rn(o)&&o&&o.contextElement&&(_e=_e.concat(ma(o.contextElement)))),_e=_e.filter(ue=>{var re;return ue!==((re=he.defaultView)==null?void 0:re.visualViewport)}),_e.forEach(ue=>{ue.addEventListener("scroll",K,{passive:!0})}),()=>{he.removeEventListener("pointerdown",V,!0),h&&(he.removeEventListener("keydown",I),he.removeEventListener("compositionstart",ee),he.removeEventListener("compositionend",Ee)),R&&(he.removeEventListener("click",B,!0),he.removeEventListener("pointerdown",B,!0),he.removeEventListener("touchstart",Q,!0),he.removeEventListener("touchmove",te,!0),he.removeEventListener("touchend",Ce,!0),he.removeEventListener("mousedown",B,!0)),_e.forEach(ue=>{ue.removeEventListener("scroll",K)}),Z.clear(),D.current=!1}},[c,i,o,a,h,R,r,u,v,f,T,$,I,W,B,L,Q,te,Ce,V,n]),C.useEffect(z,[R,z]);const Re=C.useMemo(()=>({onKeyDown:I,...y&&{[Jte[b]]:Z=>{n.setOpen(!1,en(Jx,Z.nativeEvent))},...b!=="intentional"&&{onClick(Z){n.setOpen(!1,en(Jx,Z.nativeEvent))}}}}),[I,n,y,b]),pe=Ye(Z=>{const K=Li(Z.nativeEvent);!Gt(n.select("floatingElement"),K)||Z.button!==0||(D.current=!0)}),Oe=Ye(Z=>{!r||!f||Z.button!==0||(D.current=!0)}),Pe=C.useMemo(()=>({onKeyDown:I,onPointerDown:pe,onMouseDown:pe,onMouseUp:pe,onClickCapture:G,onMouseDownCapture(Z){G(),Oe(Z)},onPointerDownCapture(Z){G(),Oe(Z)},onMouseUpCapture:G,onTouchEndCapture:G,onTouchMoveCapture:G}),[I,pe,G,Oe]);return C.useMemo(()=>f?{reference:Re,floating:Pe,trigger:Re}:{},[f,Re,Pe])}let AD=0;function ud(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(AD);const o=()=>e==null?void 0:e.focus({preventScroll:n});i?o():AD=requestAnimationFrame(o)}const nne=["top","right","bottom","left"],_c=Math.min,Vr=Math.max,Sg=Math.round,Wu=Math.floor,so=e=>({x:e,y:e}),rne={left:"right",right:"left",bottom:"top",top:"bottom"},ine={start:"end",end:"start"};function ew(e,t,n){return Vr(e,_c(t,n))}function as(e,t){return typeof e=="function"?e(t):e}function Wr(e){return e.split("-")[0]}function $a(e){return e.split("-")[1]}function IS(e){return e==="x"?"y":"x"}function FS(e){return e==="y"?"height":"width"}const one=new Set(["top","bottom"]);function Ei(e){return one.has(Wr(e))?"y":"x"}function BS(e){return IS(Ei(e))}function sne(e,t,n){n===void 0&&(n=!1);const r=$a(e),i=BS(e),o=FS(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Cg(a)),[a,Cg(a)]}function ane(e){const t=Cg(e);return[tw(e),t,tw(t)]}function tw(e){return e.replace(/start|end/g,t=>ine[t])}const RD=["left","right"],DD=["right","left"],lne=["top","bottom"],une=["bottom","top"];function cne(e,t,n){switch(e){case"top":case"bottom":return n?t?DD:RD:t?RD:DD;case"left":case"right":return t?lne:une;default:return[]}}function fne(e,t,n,r){const i=$a(e);let o=cne(Wr(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(tw)))),o}function Cg(e){return e.replace(/left|right|bottom|top/g,t=>rne[t])}function dne(e){return{top:0,right:0,bottom:0,left:0,...e}}function yL(e){return typeof e!="number"?dne(e):{top:e,right:e,bottom:e,left:e}}function Eg(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 Qp(e,t,n){return Math.floor(e/t)!==n}function cd(e,t){return t<0||t>=e.current.length}function l1(e,t){return Wn(e,{disabledIndices:t})}function TD(e,t){return Wn(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Wn(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&&fd(e,o,r));return o}function hne(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 w=null,A=-1;e.current.forEach((k,R)=>{if(k==null)return;const D=k.closest('[role="row"]');D&&(b=!0),(D!==w||A===-1)&&(w=D,A+=1,g[A]=[]),g[A].push(R),y[R]=A})}const v=b&&g.length>0&&g.some(w=>w.length!==o);function S(w){if(!v||f===-1)return;const A=y[f];if(A==null)return;const k=g[A].indexOf(f);let R=w==="up"?A-1:A+1;r&&(R<0?R=g.length-1:R>=g.length&&(R=0));const D=new Set;for(;R>=0&&R<g.length&&!D.has(R);){D.add(R);const T=g[R];if(T.length===0){R=w==="up"?R-1:R+1;continue}const $=Math.min(k,T.length-1);for(let N=$;N>=0;N-=1){const F=T[N];if(!fd(e,F,a))return F}R=w==="up"?R-1:R+1,r&&(R<0?R=g.length-1:R>=g.length&&(R=0))}}if(t.key===jS){const w=S("up");if(w!==void 0)h&&Xn(t),p=w;else{if(h&&Xn(t),f===-1)p=c;else if(p=Wn(e,{startingIndex:p,amount:o,decrement:!0,disabledIndices:a}),r&&(f-o<u||p<0)){const A=f%o,k=c%o,R=c-(k-A);k===A?p=c:p=k>A?R:R-o}cd(e,p)&&(p=f)}}if(t.key===sh){const w=S("down");w!==void 0?(h&&Xn(t),p=w):(h&&Xn(t),f===-1?p=u:(p=Wn(e,{startingIndex:f,amount:o,disabledIndices:a}),r&&f+o>c&&(p=Wn(e,{startingIndex:f%o-o,amount:o,disabledIndices:a}))),cd(e,p)&&(p=f))}if(n==="both"){const w=Wu(f/o);t.key===(i?ga:ya)&&(h&&Xn(t),f%o!==o-1?(p=Wn(e,{startingIndex:f,disabledIndices:a}),r&&Qp(p,o,w)&&(p=Wn(e,{startingIndex:f-f%o-1,disabledIndices:a}))):r&&(p=Wn(e,{startingIndex:f-f%o-1,disabledIndices:a})),Qp(p,o,w)&&(p=f)),t.key===(i?ya:ga)&&(h&&Xn(t),f%o!==0?(p=Wn(e,{startingIndex:f,decrement:!0,disabledIndices:a}),r&&Qp(p,o,w)&&(p=Wn(e,{startingIndex:f+(o-f%o),decrement:!0,disabledIndices:a}))):r&&(p=Wn(e,{startingIndex:f+(o-f%o),decrement:!0,disabledIndices:a})),Qp(p,o,w)&&(p=f));const A=Wu(c/o)===w;cd(e,p)&&(r&&A?p=t.key===(i?ya:ga)?c:Wn(e,{startingIndex:f-f%o-1,disabledIndices:a}):p=f)}return p}function pne(e,t,n){const r=[];let i=0;return e.forEach(({width:o,height:a},u)=>{let c=!1;for(n;!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 mne(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 gne(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function fd(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}const yne="Escape";function _y(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Zp(e,t){return _y(t,e===jS||e===sh,e===ga||e===ya)}function u1(e,t,n){return _y(t,e===sh,n?e===ga:e===ya)||e==="Enter"||e===" "||e===""}function bne(e,t,n){return _y(t,n?e===ga:e===ya,e===sh)}function vne(e,t,n,r){const i=n?e===ya:e===ga,o=e===jS;return t==="both"||t==="horizontal"&&r&&r>1?e===yne:_y(t,i,o)}function xne(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:w="auto",focusItemOnHover:A=!0,openOnArrowKeyDown:k=!0,disabledIndices:R=void 0,orientation:D="vertical",parentOrientation:T,cols:$=1,id:N,resetOnPointerLeave:F=!0,externalTree:j}=t,z=vg(i),M=Ar(z),q=cL(),V=Ey(j);qe(()=>{a.current.orientation=D},[a,D]);const U=Zx(o),I=C.useRef(w),P=C.useRef(p??-1),G=C.useRef(null),W=C.useRef(!0),L=Ye(re=>{f(P.current===-1?null:P.current,re)}),Y=C.useRef(L),Q=C.useRef(!!i),B=C.useRef(r),ae=C.useRef(!1),te=C.useRef(!1),me=Ar(R),Ce=Ar(r),Re=Ar(p),pe=Ar(F),Oe=Ye(()=>{function re(Ae){S?V==null||V.events.emit("virtualfocus",Ae):ud(Ae,{sync:ae.current,preventScroll:!0})}const ce=u.current[P.current],oe=te.current;ce&&re(ce),(ae.current?Ae=>Ae():requestAnimationFrame)(()=>{var Ne;const Ae=u.current[P.current]||ce;Ae&&(ce||re(Ae),Z&&(oe||!W.current)&&((Ne=Ae.scrollIntoView)==null||Ne.call(Ae,{block:"nearest",inline:"nearest"})))})});qe(()=>{h&&(r&&i?(P.current=p??-1,I.current&&p!=null&&(te.current=!0,L())):Q.current&&(P.current=-1,Y.current()))},[h,r,i,p,L]),qe(()=>{if(h){if(!r){ae.current=!1;return}if(i)if(c==null){if(ae.current=!1,Re.current!=null)return;if(Q.current&&(P.current=-1,Oe()),(!B.current||!Q.current)&&I.current&&(G.current!=null||I.current===!0&&G.current==null)){let re=0;const ce=()=>{u.current[0]==null?(re<2&&(re?requestAnimationFrame:queueMicrotask)(ce),re+=1):(P.current=G.current==null||u1(G.current,D,v)||b?l1(u):TD(u),G.current=null,L())};ce()}}else cd(u,c)||(P.current=c,Oe(),te.current=!1)}},[h,r,i,c,Re,b,u,D,v,L,Oe,me]),qe(()=>{var Ne,ve;if(!h||i||!V||S||!Q.current)return;const re=V.nodesRef.current,ce=(ve=(Ne=re.find($e=>$e.id===q))==null?void 0:Ne.context)==null?void 0:ve.elements.floating,oe=no(Zt(i)),Ae=re.some($e=>$e.context&&Gt($e.context.elements.floating,oe));ce&&!Ae&&W.current&&ce.focus({preventScroll:!0})},[h,i,V,q,S]),qe(()=>{Y.current=L,B.current=r,Q.current=!!i}),qe(()=>{r||(G.current=null,I.current=w)},[r,w]);const Pe=c!=null,Z=C.useMemo(()=>{function re(ce){if(!Ce.current)return;const oe=u.current.indexOf(ce.currentTarget);oe!==-1&&P.current!==oe&&(P.current=oe,L(ce))}return{onFocus(ce){ae.current=!0,re(ce)},onClick:({currentTarget:ce})=>ce.focus({preventScroll:!0}),onMouseMove(ce){ae.current=!0,te.current=!1,A&&re(ce)},onPointerLeave(ce){var Ae;if(!Ce.current||!W.current||ce.pointerType==="touch")return;ae.current=!0;const oe=ce.relatedTarget;!A||u.current.includes(oe)||pe.current&&(ud(null,{sync:!0}),P.current=-1,L(ce),S||((Ae=M.current)==null||Ae.focus({preventScroll:!0})))}}},[Ce,M,A,u,L,pe,S]),K=C.useCallback(()=>{var re,ce,oe;return T??((oe=(ce=(re=V==null?void 0:V.nodesRef.current.find(Ae=>Ae.id===q))==null?void 0:re.context)==null?void 0:ce.dataRef)==null?void 0:oe.current.orientation)},[q,V,T]),ee=Ye(re=>{if(W.current=!1,ae.current=!0,re.which===229||!Ce.current&&re.currentTarget===M.current)return;if(b&&vne(re.key,D,v,$)){Zp(re.key,K())||Xn(re),n.setOpen(!1,en(a1,re.nativeEvent)),pn(o)&&(S?V==null||V.events.emit("virtualfocus",o):o.focus());return}const ce=P.current,oe=l1(u,R),Ae=TD(u,R);if(U||(re.key==="Home"&&(Xn(re),P.current=oe,L(re)),re.key==="End"&&(Xn(re),P.current=Ae,L(re))),$>1){const Ne=Array.from({length:u.current.length},()=>({width:1,height:1})),ve=pne(Ne,$,!1),$e=ve.findIndex(be=>be!=null&&!fd(u,be,R)),le=ve.reduce((be,Te,je)=>Te!=null&&!fd(u,Te,R)?je:be,-1),we=ve[hne({current:ve.map(be=>be!=null?u.current[be]:null)},{event:re,orientation:D,loopFocus:y,rtl:v,cols:$,disabledIndices:gne([...(typeof R!="function"?R:null)||u.current.map((be,Te)=>fd(u,Te,R)?Te:void 0),void 0],ve),minIndex:$e,maxIndex:le,prevIndex:mne(P.current>Ae?oe:P.current,Ne,ve,$,re.key===sh?"bl":re.key===(v?ga:ya)?"tr":"tl"),stopEvent:!0})];if(we!=null&&(P.current=we,L(re)),D==="both")return}if(Zp(re.key,D)){if(Xn(re),r&&!S&&no(re.currentTarget.ownerDocument)===re.currentTarget){P.current=u1(re.key,D,v)?oe:Ae,L(re);return}u1(re.key,D,v)?y?ce>=Ae?g&&ce!==u.current.length?P.current=-1:(ae.current=!1,P.current=oe):P.current=Wn(u,{startingIndex:ce,disabledIndices:R}):P.current=Math.min(Ae,Wn(u,{startingIndex:ce,disabledIndices:R})):y?ce<=oe?g&&ce!==-1?P.current=u.current.length:(ae.current=!1,P.current=Ae):P.current=Wn(u,{startingIndex:ce,decrement:!0,disabledIndices:R}):P.current=Math.max(oe,Wn(u,{startingIndex:ce,decrement:!0,disabledIndices:R})),cd(u,P.current)&&(P.current=-1),L(re)}}),Ee=C.useMemo(()=>S&&r&&Pe&&{"aria-activedescendant":`${N}-${c}`},[S,r,Pe,N,c]),he=C.useMemo(()=>({"aria-orientation":D==="both"?void 0:D,...U?{}:Ee,onKeyDown(re){if(re.key==="Tab"&&re.shiftKey&&r&&!S){const ce=Li(re.nativeEvent);if(ce&&!Gt(M.current,ce))return;Xn(re),n.setOpen(!1,en(ky,re.nativeEvent)),pn(o)&&o.focus();return}ee(re)},onPointerMove(){W.current=!0}}),[Ee,ee,M,D,U,n,r,S,o]),_e=C.useMemo(()=>{function re(oe){w==="auto"&&dL(oe.nativeEvent)&&(I.current=!S)}function ce(oe){I.current=w,w==="auto"&&hL(oe.nativeEvent)&&(I.current=!0)}return{onKeyDown(oe){const Ae=n.select("open");W.current=!1;const Ne=oe.key.startsWith("Arrow"),ve=bne(oe.key,K(),v),$e=Zp(oe.key,D),le=(b?ve:$e)||oe.key==="Enter"||oe.key.trim()==="";if(S&&Ae)return ee(oe);if(!(!Ae&&!k&&Ne)){if(le){const we=Zp(oe.key,K());G.current=b&&we?null:oe.key}if(b){ve&&(Xn(oe),Ae?(P.current=l1(u,me.current),L(oe)):n.setOpen(!0,en(a1,oe.nativeEvent,oe.currentTarget)));return}$e&&(Re.current!=null&&(P.current=Re.current),Xn(oe),!Ae&&k?n.setOpen(!0,en(a1,oe.nativeEvent,oe.currentTarget)):ee(oe),Ae&&L(oe))}},onFocus(oe){n.select("open")&&!S&&(P.current=-1,L(oe))},onPointerDown:ce,onPointerEnter:ce,onMouseDown:re,onClick:re}},[ee,me,w,u,b,L,n,k,D,K,v,Re,S]),ue=C.useMemo(()=>({...Ee,..._e}),[Ee,_e]);return C.useMemo(()=>h?{reference:ue,floating:he,item:Z,trigger:_e}:{},[h,ue,he,_e,Z])}function wne(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=>Jp(f,e,"reference"),t),a=C.useCallback(f=>Jp(f,e,"floating"),n),u=C.useCallback(f=>Jp(f,e,"item"),r),c=C.useCallback(f=>Jp(f,e,"trigger"),i);return C.useMemo(()=>({getReferenceProps:o,getFloatingProps:a,getItemProps:u,getTriggerProps:c}),[o,a,u,c])}function Jp(e,t,n){var a;const r=new Map,i=n==="item",o={};n==="floating"&&(o.tabIndex=-1,o[Qx]="");for(const u in e)i&&e&&(u===lL||u===uL)||(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&&$D(o,c,i,r)}return $D(o,e,i,r),o}function $D(e,t,n,r){var i;for(const o in t){const a=t[o];n&&(o===lL||o===uL)||(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 Rl={"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"},bL=50,vL=({icon:e,text:t,tooltip:n,className:r,...i})=>n&&e?_.jsxs("span",{"data-slot":"field-hint",className:Ie(Rl["field-hint"],r),...i,children:[_.jsx(Al,{trigger:_.jsx(e,{}),delay:bL,TriggerProps:{render:_.jsx("span",{})},PositionerProps:{align:"end"},children:n}),t&&_.jsx(ze,{size:-1,children:t})]}):_.jsxs("span",{"data-slot":"field-hint",className:Ie(Rl["field-hint"],r),...i,children:[e&&_.jsx(e,{}),t&&_.jsx(ze,{size:-1,children:t})]});vL.displayName="FieldHint";const Sne=C.createContext({legendId:void 0,setLegendId:()=>{},disabled:void 0});function Cne(e=!1){const t=C.useContext(Sne);if(!t&&!e)throw new Error(Bi(86));return t}function MD(e){if(!C.isValidElement(e))return null;const t=e,n=t.props;return(LS(19)?n==null?void 0:n.ref:t.ref)??null}function nw(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Ene(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 kne(e,t){return typeof e=="function"?e(t):e}function _ne(e,t){return typeof e=="function"?e(t):e}const dd={};function xa(e,t,n,r,i){let o={...rw(e,dd)};return t&&(o=td(o,t)),n&&(o=td(o,n)),r&&(o=td(o,r)),i&&(o=td(o,i)),o}function Ane(e){if(e.length===0)return dd;if(e.length===1)return rw(e[0],dd);let t={...rw(e[0],dd)};for(let n=1;n<e.length;n+=1)t=td(t,e[n]);return t}function td(e,t){return xL(t)?t(e):Rne(e,t)}function Rne(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=nw(e.style,r);break}case"className":{e[n]=wL(e.className,r);break}default:Dne(n,r)?e[n]=Tne(e[n],r):e[n]=r}}return e}function Dne(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 xL(e){return typeof e=="function"}function rw(e,t){return xL(e)?e(t):e??dd}function Tne(e,t){return t?e?n=>{if($ne(n)){const i=n;iw(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 iw(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function wL(e,t){return t?e?t+" "+e:t:e}function $ne(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function qn(e,t,n={}){const r=t.render,i=Mne(t,n);if(n.enabled===!1)return null;const o=n.state??lr;return Nne(e,r,i,o)}function Mne(e,t={}){const{className:n,style:r,render:i}=e,{state:o=lr,ref:a,props:u,stateAttributesMapping:c,enabled:f=!0}=t,h=f?kne(n,o):void 0,p=f?_ne(r,o):void 0,g=f?Ene(o,c):lr,y=f?nw(g,Array.isArray(u)?Ane(u):u)??lr:lr;return typeof document<"u"&&(f?Array.isArray(a)?y.ref=Mee([y.ref,MD(i),...a]):y.ref=Nl(y.ref,MD(i),a):Nl(null,null)),f?(h!==void 0&&(y.className=wL(y.className,h)),p!==void 0&&(y.style=nw(y.style,p)),y):lr}const One=Symbol.for("react.lazy");function Nne(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=xa(n,t.props);i.ref=n.ref;let o=t;return(o==null?void 0:o.$$typeof)===One&&(o=C.Children.toArray(t)[0]),C.cloneElement(o,i)}if(e&&typeof e=="string")return Lne(e,n);throw new Error(Bi(8))}function Lne(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 $m=Object.keys(vy);function jne(e){if(!e||e.valid||!e.valueMissing)return!1;let t=!1;for(const n of $m)n!=="valid"&&(n==="valueMissing"&&(t=e[n]),e[n]&&(t=!1));return t}function zne(e){const{formRef:t,clearErrors:n}=Fc(),{setValidityData:r,validate:i,validityData:o,validationDebounceTime:a,invalid:u,markedDirtyRef:c,state:f,name:h,shouldValidateOnChange:p}=e,{controlId:g,getDescriptionProps:y}=ls(),b=Dr(),v=C.useRef(null),S=Ye(async(k,R=!1)=>{const D=v.current;if(!D)return;if(R){if(f.valid!==!1)return;const q=D.validity;if(!q.valueMissing){const U={value:k,state:{...vy,valid:!0},error:"",errors:[],initialValue:o.initialValue};if(D.setCustomValidity(""),g){const I=t.current.fields.get(g);I&&t.current.fields.set(g,{...I,...Yx(U,!1)})}r(U);return}const V=$m.reduce((U,I)=>(U[I]=q[I],U),{});if(!V.valid&&!jne(V))return}function T(q){const V=$m.reduce((I,P)=>(I[P]=q.validity[P],I),{});let U=!1;for(const I of $m)if(I!=="valid"){if(I==="valueMissing"&&V[I])U=!0;else if(V[I])return V}return U&&!c.current&&(V.valid=!0,V.valueMissing=!1),V}b.clear();let $=null,N=[];const F=T(D);let j;const z=p();if(D.validationMessage&&!z)j=D.validationMessage,N=[D.validationMessage];else{const q=Array.from(t.current.fields.values()).reduce((U,I)=>(I.name&&(U[I.name]=I.getValue()),U),{}),V=i(k,q);typeof V=="object"&&V!==null&&"then"in V?$=await V:$=V,$!==null?(F.valid=!1,F.customError=!0,Array.isArray($)?(N=$,D.setCustomValidity($.join(`
|
|
490
|
+
`))):$&&(N=[$],D.setCustomValidity($))):z&&(D.setCustomValidity(""),F.customError=!1,D.validationMessage?(j=D.validationMessage,N=[D.validationMessage]):D.validity.valid&&!F.valid&&(F.valid=!0))}const M={value:k,state:F,error:j??(Array.isArray($)?$[0]:$??""),errors:N,initialValue:o.initialValue};if(g){const q=t.current.fields.get(g);q&&t.current.fields.set(g,{...q,...Yx(M,u)})}r(M)}),w=C.useCallback((k={})=>xa(y,f.valid===!1?{"aria-invalid":!0}:lr,k),[y,f.valid]),A=C.useCallback((k={})=>xa({onChange(R){if(R.nativeEvent.defaultPrevented)return;if(n(h),!p()){S(R.currentTarget.value,!0);return}if(u)return;const D=R.currentTarget;if(D.value===""){S(D.value);return}b.clear(),a?b.start(a,()=>{S(D.value)}):S(D.value)}},w(k)),[w,n,h,b,S,u,a,p]);return C.useMemo(()=>({getValidationProps:w,getInputValidationProps:A,inputRef:v,commit:S}),[w,A,S])}const Pne=function(e){const t=Ll(),[n,r]=C.useState(e.initialControlId===void 0?t:e.initialControlId),[i,o]=C.useState(void 0),[a,u]=C.useState([]),c=Zr(()=>new Map),{messageIds:f}=ls(),h=Ye((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 w;for(const A of v.values()){if(S!==void 0&&A===S)return S;w===void 0&&(w=A)}return w})}),p=C.useCallback(y=>xa({"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 _.jsx(nL.Provider,{value:g,children:e.children})},Ine=C.forwardRef(function(e,t){const{errors:n,validationMode:r,submitAttemptedRef:i}=Fc(),{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:w}=Cne(),A=Ye(u||(()=>null)),k=w||p,[R,D]=C.useState(!1),[T,$]=C.useState(!1),[N,F]=C.useState(!1),[j,z]=C.useState(!1),M=y??T,q=b??R,V=C.useRef(!1),U=Ye(Ce=>{y===void 0&&(Ce&&(V.current=!0),$(Ce))}),I=Ye(Ce=>{b===void 0&&D(Ce)}),P=Ye(()=>f==="onChange"||f==="onSubmit"&&i.current),G=!!(g||h&&{}.hasOwnProperty.call(n,h)&&n[h]!==void 0),[W,L]=C.useState({state:vy,error:"",errors:[],value:null,initialValue:null}),Y=!G&&W.state.valid,Q=C.useMemo(()=>({disabled:k,touched:q,dirty:M,valid:Y,filled:N,focused:j}),[k,q,M,Y,N,j]),B=zne({setValidityData:L,validate:A,validityData:W,validationDebounceTime:c,invalid:G,markedDirtyRef:V,state:Q,name:h,shouldValidateOnChange:P}),ae=C.useCallback(()=>{V.current=!0,B.commit(W.value)},[B,W]);C.useImperativeHandle(v,()=>({validate:ae}),[ae]);const te=C.useMemo(()=>({invalid:G,name:h,validityData:W,setValidityData:L,disabled:k,touched:q,setTouched:I,dirty:M,setDirty:U,filled:N,setFilled:F,focused:j,setFocused:z,validate:A,validationMode:f,validationDebounceTime:c,shouldValidateOnChange:P,state:Q,markedDirtyRef:V,validation:B}),[G,h,W,k,q,I,M,U,N,F,j,z,A,f,c,P,Q,B]),me=qn("div",e,{ref:t,state:Q,props:S,stateAttributesMapping:Aa});return _.jsx(eL.Provider,{value:te,children:me})}),Fne=C.forwardRef(function(e,t){return _.jsx(Pne,{children:_.jsx(Ine,{...e,ref:t})})}),US=({children:e,fullwidth:t,...n})=>_.jsx(Fne,{"data-slot":"field-root",render:_.jsx(Ve,{gap:3,ax:"stretch",fullwidth:t}),...n,children:e});US.displayName="FieldRoot";const Bne=C.forwardRef(function(e,t){const{render:n,className:r,id:i,nativeLabel:o=!0,...a}=e,u=Ra(!1),{controlId:c,setLabelId:f,labelId:h}=ls(),p=Ll(i),g=C.useRef(null),y=Ye(b=>{var S;if((S=Li(b.nativeEvent))!=null&&S.closest("button,input,select,textarea")||(!b.defaultPrevented&&b.detail>1&&b.preventDefault(),o||!c))return;const v=Zt(b.currentTarget).getElementById(c);pn(v)&&v.focus({focusVisible:!0})});return qe(()=>(p&&f(p),()=>{f(void 0)}),[p,f]),qn("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:Aa})}),HS=({required:e,weight:t="bold",className:n,children:r,...i})=>_.jsx(Bne,{"data-slot":"field-label","data-required":e??void 0,render:_.jsx(ze,{render:_.jsx("label",{}),weight:t}),className:Ie(Rl["field-label"],n),...i,children:r});HS.displayName="FieldLabel";const Une={...Aa,...by},SL=C.forwardRef(function(e,t){const{render:n,id:r,className:i,match:o,...a}=e,u=Ll(r),{validityData:c,state:f,name:h}=Ra(!1),{setMessageIds:p}=ls(),{errors:g}=Fc(),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:w}=oh(b);qe(()=>{if(!(!b||!u))return p(z=>z.concat(u)),()=>{p(z=>z.filter(M=>M!==u))}},[b,u,p]);const A=C.useRef(null),[k,R]=C.useState(null),[D,T]=C.useState(null),$=y||(c.errors.length>1?_.jsx("ul",{children:c.errors.map(z=>_.jsx("li",{children:z},z))}):c.error);let N=c.error;y!=null?N=Array.isArray(y)?JSON.stringify(y):y:c.errors.length>1&&(N=JSON.stringify(c.errors)),b&&N!==D&&(T(N),R($)),Ic({open:b,ref:A,onComplete(){b||w(!1)}});const F={...f,transitionStatus:S},j=qn("div",e,{ref:[t,A],state:F,props:[{id:u,children:b?$:k},a],stateAttributesMapping:Une,enabled:v});return v?j:null}),CL=e=>_.jsx(SL,{"data-slot":"field-error-tooltip",render:_.jsx(Al,{delay:bL,PositionerProps:{align:"end"},PopupProps:{style:{backgroundColor:"var(--shade-foreground)"}},trigger:_.jsx("span",{className:Rl["field-error-tooltip"],children:_.jsx(UH,{color:"var(--shade-foreground)"})})}),...e});CL.displayName="FieldErrorTooltip";const kg=e=>_.jsx(SL,{"data-slot":"field-error",render:_.jsx(ze,{shade:"foreground"}),...e});kg.displayName="FieldError";const Hne=C.forwardRef(function(e,t){const{render:n,id:r,className:i,...o}=e,a=Ll(r),u=Ra(!1),{setMessageIds:c}=ls();return qe(()=>{if(a)return c(f=>f.concat(a)),()=>{c(f=>f.filter(h=>h!==a))}},[a,c]),qn("p",e,{ref:t,state:u.state,props:[{id:a},o],stateAttributesMapping:Aa})}),qS=({children:e,...t})=>_.jsx(Hne,{"data-slot":"field-description",render:_.jsx(ze,{shade:"muted"}),...t,children:e});qS.displayName="FieldDescription";const GS=({label:e,hint:t,errorType:n="inline",description:r,required:i,RootProps:o,LabelProps:a,ErrorProps:u,HintProps:c,DescriptionProps:f,children:h,...p})=>_.jsxs(US,{...p,...o,className:Ie(n==="absolute"&&Rl["field-root-floating"],o==null?void 0:o.className),children:[(e||t||n==="tooltip")&&_.jsxs(tt,{className:Rl["field-label-group"],ax:"space-between",ay:"center",children:[e&&_.jsx(HS,{required:i,...a,children:e}),_.jsxs(tt,{ay:"center",children:[n==="tooltip"&&_.jsx(CL,{...u}),t&&_.jsx(vL,{...t,...c})]})]}),h,n==="absolute"&&_.jsx(kg,{className:Rl["field-error-absolute"],...u}),n==="inline"&&_.jsx(kg,{...u}),r&&_.jsx(qS,{...f,children:r})]});GS.displayName="Field";const qne="_input_10qyh_3 _disabled_1m2av_2",Yr={input:qne,"size-small":"_size-small_10qyh_47 _size-small_1m2av_17","size-medium":"_size-medium_10qyh_50 _size-medium_1m2av_22","size-large":"_size-large_10qyh_53 _size-large_1m2av_27","toggle-fullwidth":"_toggle-fullwidth_10qyh_57","toggle-ghost":"_toggle-ghost_10qyh_62","input-wrapper":"_input-wrapper_10qyh_81","input-inner":"_input-inner_10qyh_104","input-slot":"_input-slot_10qyh_123 _field-slot_1m2av_68"},EL="medium",Ay=Mr({variants:{fullwidth:{true:Yr["toggle-fullwidth"]},ghost:{true:Yr["toggle-ghost"]},size:{small:Yr["size-small"],medium:Yr["size-medium"],large:Yr["size-large"]}},defaultVariants:{size:EL}}),kL=({before:e,after:t,size:n,fullwidth:r,ghost:i,className:o,children:a})=>!e&&!t?_.jsx(_.Fragment,{children:a}):_.jsxs(tt,{"data-slot":"input-wrapper",ay:"center",className:Ie(Yr.input,Yr["input-wrapper"],Ay({size:n,fullwidth:r,ghost:i}),o),children:[e&&_.jsx("span",{"data-slot":"input-before",className:Yr["input-slot"],children:e}),a,t&&_.jsx("span",{"data-slot":"input-after",className:Yr["input-slot"],children:t})]});kL.displayName="InputWrapper";const Gne=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:w,setFocused:A,setFilled:k,validationMode:R,validation:D}=Ra(),T=b||u,$=y??o,N={...g,disabled:T},{labelId:F}=ls(),j=OS({id:i});qe(()=>{var I;const U=a!=null;(I=D.inputRef.current)!=null&&I.value||U&&a!==""?k(!0):U&&a===""&&k(!1)},[D.inputRef,k,a]);const z=C.useRef(null);qe(()=>{h&&z.current===no(Zt(z.current))&&A(!0)},[h,A]);const[M]=yg({controlled:a,default:f,name:"FieldControl",state:"value"}),q=a!==void 0,V=q?M:void 0;return DS({id:j,name:$,commit:D.commit,value:V,getValue:()=>{var U;return(U=D.inputRef.current)==null?void 0:U.value},controlRef:D.inputRef}),qn("input",e,{ref:[t,z],state:N,props:[{id:j,disabled:T,name:$,ref:D.inputRef,"aria-labelledby":F,autoFocus:h,...q?{value:V}:{defaultValue:f},onChange(U){const I=U.currentTarget.value;c==null||c(I,en(Uc,U.nativeEvent)),S(I!==w.initialValue),k(I!=="")},onFocus(){A(!0)},onBlur(U){v(!0),A(!1),R==="onBlur"&&D.commit(U.currentTarget.value)},onKeyDown(U){U.currentTarget.tagName==="INPUT"&&U.key==="Enter"&&(v(!0),D.commit(U.currentTarget.value))}},D.getInputValidationProps(),p],stateAttributesMapping:Aa})}),Vne=C.forwardRef(function(e,t){return _.jsx(Gne,{ref:t,...e})}),_L=({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 _.jsx(Kr,{condition:!!(e||t),render:_.jsx(GS,{name:r,label:e,description:t,required:n,...f}),children:_.jsx(kL,{before:u,after:c,size:i,fullwidth:o,ghost:a,children:_.jsx(Vne,{"data-slot":"input",ref:p,name:r,className:Ie(Yr.input,y?Yr["input-inner"]:Ay({size:i,fullwidth:o,ghost:a}),h),...g})})})};_L.displayName="Input";let VS=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=zd.startingStyle]="startingStyle",e[e.endingStyle=zd.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),ow=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const Yne={[ow.popupOpen]:""},Wne={[ow.popupOpen]:"",[ow.pressed]:""},Xne={[VS.open]:""},Kne={[VS.closed]:""},Qne={[VS.anchorHidden]:""},Zne={open(e){return e?Yne:null}},Jne={open(e){return e?Wne:null}},AL={open(e){return e?Xne:Kne},anchorHidden(e){return e?Qne:null}},ere=C.createContext(void 0);function tre(){var e;return((e=C.useContext(ere))==null?void 0:e.direction)??"ltr"}const _g=C.forwardRef(function(e,t){const[n,r]=C.useState();return qe(()=>{wte&&r("button")},[]),_.jsx("span",{...e,ref:t,style:gy,"aria-hidden":n?void 0:!0,tabIndex:0,role:n,"data-base-ui-focus-guard":""})}),nre={style:{transition:"none"}},rre="data-base-ui-click-trigger",ire={fallbackAxisSide:"none"},ore={clipPath:"inset(50%)",position:"fixed",top:0,left:0};var sre=["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] *)"],Ag=sre.join(","),RL=typeof Element>"u",Ac=RL?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Rg=!RL&&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},Dg=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]"):Dg(e.parentNode));return o},are=function(e){var t,n=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return n===""||n==="true"},DL=function(e,t,n){if(Dg(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Ag));return t&&Ac.call(e,Ag)&&r.unshift(e),r=r.filter(n),r},Tg=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var o=i.shift();if(!Dg(o,!1))if(o.tagName==="SLOT"){var a=o.assignedElements(),u=a.length?a:o.children,c=Tg(u,!0,n);n.flatten?r.push.apply(r,c):r.push({scopeParent:o,candidates:c})}else{var f=Ac.call(o,Ag);f&&n.filter(o)&&(t||!e.includes(o))&&r.push(o);var h=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),p=!Dg(h,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(h&&p){var g=Tg(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},TL=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},$L=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||are(e))&&!TL(e)?0:e.tabIndex},lre=function(e,t){var n=$L(e);return n<0&&t&&!TL(e)?0:n},ure=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},ML=function(e){return e.tagName==="INPUT"},cre=function(e){return ML(e)&&e.type==="hidden"},fre=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return t},dre=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},hre=function(e){if(!e.name)return!0;var t=e.form||Rg(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=dre(r,e.form);return!i||i===e},pre=function(e){return ML(e)&&e.type==="radio"},mre=function(e){return pre(e)&&!hre(e)},gre=function(e){var t,n=e&&Rg(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=Rg(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},OD=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},yre=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=Ac.call(e,"details>summary:first-of-type"),a=o?e.parentElement:e;if(Ac.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=Rg(e);if(c&&!c.shadowRoot&&r(c)===!0)return OD(e);e.assignedSlot?e=e.assignedSlot:!c&&f!==e.ownerDocument?e=f.host:e=c}e=u}if(gre(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return OD(e);return!1},bre=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 Ac.call(t,"fieldset[disabled] *")?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},sw=function(e,t){return!(t.disabled||cre(t)||yre(t,e)||fre(t)||bre(t))},aw=function(e,t){return!(mre(t)||$L(t)<0||!sw(e,t))},vre=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},OL=function(e){var t=[],n=[];return e.forEach(function(r,i){var o=!!r.scopeParent,a=o?r.scopeParent:r,u=lre(a,o),c=o?OL(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(ure).reduce(function(r,i){return i.isScope?r.push.apply(r,i.content):r.push(i.content),r},[]).concat(t)},Ry=function(e,t){t=t||{};var n;return t.getShadowRoot?n=Tg([e],t.includeContainer,{filter:aw.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:vre}):n=DL(e,t.includeContainer,aw.bind(null,t)),OL(n)},xre=function(e,t){t=t||{};var n;return t.getShadowRoot?n=Tg([e],t.includeContainer,{filter:sw.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):n=DL(e,t.includeContainer,sw.bind(null,t)),n},NL=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return Ac.call(e,Ag)===!1?!1:aw(t,e)};const ah=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function LL(e,t){const n=Ry(e,ah()),r=n.length;if(r===0)return;const i=no(Zt(e)),o=n.indexOf(i),a=o===-1?t===1?0:r-1:o+t;return n[a]}function jL(e){return LL(Zt(e).body,1)||e}function zL(e){return LL(Zt(e).body,-1)||e}function hd(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Gt(n,r)}function wre(e){Ry(e,ah()).forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")})}function ND(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 PL=C.createContext(null),IL=()=>C.useContext(PL),Sre=wg("portal");function Cre(e={}){var b;const{ref:t,container:n,componentProps:r=lr,elementProps:i}=e,o=MS(),a=(b=IL())==null?void 0:b.portalNode,[u,c]=C.useState(null),[f,h]=C.useState(null),p=Ye(v=>{v!==null&&h(v)}),g=C.useRef(null);qe(()=>{if(n===null){g.current&&(g.current=null,h(null),c(null));return}if(o==null)return;const v=(n&&(TS(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=qn("div",r,{ref:[t,p],props:[{id:o,[Sre]:""},i]});return{portalNode:f,portalSubtree:u&&y?tr.createPortal(y,u):null}}const Ere=C.forwardRef(function(e,t){const{children:n,container:r,className:i,render:o,renderGuards:a,...u}=e,{portalNode:c,portalSubtree:f}=Cre({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,w=b==null?void 0:b.open,A=typeof a=="boolean"?a:!!b&&!b.modal&&b.open&&!!c;C.useEffect(()=>{if(!c||S)return;function R(D){c&&D.relatedTarget&&hd(D)&&(D.type==="focusin"?ND:wre)(c)}return c.addEventListener("focusin",R,!0),c.addEventListener("focusout",R,!0),()=>{c.removeEventListener("focusin",R,!0),c.removeEventListener("focusout",R,!0)}},[c,S]),C.useEffect(()=>{!c||w||ND(c)},[w,c]);const k=C.useMemo(()=>({beforeOutsideRef:h,afterOutsideRef:p,beforeInsideRef:g,afterInsideRef:y,portalNode:c,setFocusManagerState:v}),[c]);return _.jsxs(C.Fragment,{children:[f,_.jsxs(PL.Provider,{value:k,children:[A&&c&&_.jsx(_g,{"data-type":"outside",ref:h,onFocus:R=>{var D,T;if(hd(R,c))(D=g.current)==null||D.focus();else{const $=b?b.domReference:null;(T=zL($))==null||T.focus()}}}),A&&c&&_.jsx("span",{"aria-owns":c.id,style:ore}),c&&tr.createPortal(n,c),A&&c&&_.jsx(_g,{"data-type":"outside",ref:p,onFocus:R=>{var D,T;if(hd(R,c))(D=y.current)==null||D.focus();else{const $=b?b.domReference:null;(T=jL($))==null||T.focus(),b!=null&&b.closeOnFocusOut&&(b==null||b.onOpenChange(!1,en(ky,R.nativeEvent)))}}})]})]})});function kre(e){return LS(19)?e:e?"true":void 0}let LD={},jD={},zD="";function _re(e){if(typeof document>"u")return!1;const t=Zt(e);return Tn(t).innerWidth-t.documentElement.clientWidth>0}function Are(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const t=Zt(e),n=t.documentElement,r=t.body,i=Ta(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 Rre(e){const t=Zt(e),n=t.documentElement,r=t.body,i=Ta(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 Dre(e){var g;const t=Zt(e),n=t.documentElement,r=t.body,i=Tn(n);let o=0,a=0,u=!1;const c=Gs.create();if(NS&&(((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,LD={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},zD=n.style.scrollBehavior,jD={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,w=n.scrollWidth>n.clientWidth,A=y.overflowY==="scroll"||b.overflowY==="scroll",k=y.overflowX==="scroll"||b.overflowX==="scroll",R=Math.max(0,i.innerWidth-r.clientWidth),D=Math.max(0,i.innerHeight-r.clientHeight),T=parseFloat(b.marginTop)+parseFloat(b.marginBottom),$=parseFloat(b.marginLeft)+parseFloat(b.marginRight),N=Ta(n)?n:r;if(u=Are(e),u){n.style.scrollbarGutter=v,N.style.overflowY="hidden",N.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:v,overflowY:"hidden",overflowX:"hidden"}),(S||A)&&(n.style.overflowY="scroll"),(w||k)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:T||D?`calc(100dvh - ${T+D}px)`:"100dvh",width:$||R?`calc(100vw - ${$+R}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,LD),Object.assign(r.style,jD),u||(n.scrollTop=o,n.scrollLeft=a,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=zD)}function p(){h(),c.request(f)}return f(),i.addEventListener("resize",p),()=>{c.cancel(),h(),typeof i.removeEventListener=="function"&&i.removeEventListener("resize",p)}}class Tre{constructor(){ie(this,"lockCount",0);ie(this,"restore",null);ie(this,"timeoutLock",xg.create());ie(this,"timeoutUnlock",xg.create());ie(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});ie(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=Zt(t).documentElement,r=Tn(n).getComputedStyle(n).overflowY;if(r==="hidden"||r==="clip"){this.restore=Qn;return}const i=oL||!_re(t);this.restore=i?Rre(t):Dre(t)}}const $re=new Tre;function Mre(e=!0,t=null){qe(()=>{if(e)return $re.acquire(t)},[e,t])}const Ore=e=>({name:"arrow",options:e,async fn(t){var W,L;const{x:n,y:r,placement:i,rects:o,platform:a,elements:u,middlewareData:c}=t,{element:f,padding:h=0,offsetParent:p="real"}=as(e,t)||{};if(f==null)return{};const g=yL(h),y={x:n,y:r},b=BS(i),v=FS(b),S=await a.getDimensions(f),w=b==="y",A=w?"top":"left",k=w?"bottom":"right",R=w?"clientHeight":"clientWidth",D=o.reference[v]+o.reference[b]-y[b]-o.floating[v],T=y[b]-o.reference[b],$=p==="real"?await((W=a.getOffsetParent)==null?void 0:W.call(a,f)):u.floating;let N=u.floating[R]||o.floating[v];(!N||!await((L=a.isElement)==null?void 0:L.call(a,$)))&&(N=u.floating[R]||o.floating[v]);const F=D/2-T/2,j=N/2-S[v]/2-1,z=Math.min(g[A],j),M=Math.min(g[k],j),q=z,V=N-S[v]-M,U=N/2-S[v]/2+F,I=ew(q,U,V),P=!c.arrow&&$a(i)!=null&&U!==I&&o.reference[v]/2-(U<q?z:M)-S[v]/2<0,G=P?U<q?U-q:U-V:0;return{[b]:y[b]+G,data:{[b]:I,centerOffset:U-I-G,...P&&{alignmentOffset:G}},reset:P}}}),Nre=(e,t)=>({...Ore(e),options:[e,t]});function PD(e,t,n){let{reference:r,floating:i}=e;const o=Ei(t),a=BS(t),u=FS(a),c=Wr(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($a(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 Lre(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}=as(t,e),b=yL(y),v=u[g?p==="floating"?"reference":"floating":p],S=Eg(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})),w=p==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,A=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),k=await(o.isElement==null?void 0:o.isElement(A))?await(o.getScale==null?void 0:o.getScale(A))||{x:1,y:1}:{x:1,y:1},R=Eg(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:w,offsetParent:A,strategy:c}):w);return{top:(S.top-R.top+b.top)/k.y,bottom:(R.bottom-S.bottom+b.bottom)/k.y,left:(S.left-R.left+b.left)/k.x,right:(R.right-S.right+b.right)/k.x}}const jre=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}=PD(f,r,c),g=r,y={},b=0;for(let S=0;S<u.length;S++){var v;const{name:w,fn:A}=u[S],{x:k,y:R,data:D,reset:T}=await A({x:h,y:p,initialPlacement:r,placement:g,strategy:i,middlewareData:y,rects:f,platform:{...a,detectOverflow:(v=a.detectOverflow)!=null?v:Lre},elements:{reference:e,floating:t}});h=k??h,p=R??p,y={...y,[w]:{...y[w],...D}},T&&b<=50&&(b++,typeof T=="object"&&(T.placement&&(g=T.placement),T.rects&&(f=T.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):T.rects),{x:h,y:p}=PD(f,g,c)),S=-1)}return{x:h,y:p,placement:g,strategy:i,middlewareData:y}},zre=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}=as(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const w=Wr(i),A=Ei(u),k=Wr(u)===u,R=await(c.isRTL==null?void 0:c.isRTL(f.floating)),D=g||(k||!v?[Cg(u)]:ane(u)),T=b!=="none";!g&&T&&D.push(...fne(u,v,b,R));const $=[u,...D],N=await c.detectOverflow(t,S),F=[];let j=((r=o.flip)==null?void 0:r.overflows)||[];if(h&&F.push(N[w]),p){const V=sne(i,a,R);F.push(N[V[0]],N[V[1]])}if(j=[...j,{placement:i,overflows:F}],!F.every(V=>V<=0)){var z,M;const V=(((z=o.flip)==null?void 0:z.index)||0)+1,U=$[V];if(U&&(!(p==="alignment"&&A!==Ei(U))||j.every(P=>Ei(P.placement)===A?P.overflows[0]>0:!0)))return{data:{index:V,overflows:j},reset:{placement:U}};let I=(M=j.filter(P=>P.overflows[0]<=0).sort((P,G)=>P.overflows[1]-G.overflows[1])[0])==null?void 0:M.placement;if(!I)switch(y){case"bestFit":{var q;const P=(q=j.filter(G=>{if(T){const W=Ei(G.placement);return W===A||W==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(W=>W>0).reduce((W,L)=>W+L,0)]).sort((G,W)=>G[1]-W[1])[0])==null?void 0:q[0];P&&(I=P);break}case"initialPlacement":I=u;break}if(i!==I)return{reset:{placement:I}}}return{}}}};function ID(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function FD(e){return nne.some(t=>e[t]>=0)}const Pre=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...o}=as(e,t);switch(i){case"referenceHidden":{const a=await r.detectOverflow(t,{...o,elementContext:"reference"}),u=ID(a,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:FD(u)}}}case"escaped":{const a=await r.detectOverflow(t,{...o,altBoundary:!0}),u=ID(a,n.floating);return{data:{escapedOffsets:u,escaped:FD(u)}}}default:return{}}}}},FL=new Set(["left","top"]);async function Ire(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=Wr(n),u=$a(n),c=Ei(n)==="y",f=FL.has(a)?-1:1,h=o&&c?-1:1,p=as(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 Fre=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 Ire(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}}}}},Bre=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:w=>{let{x:A,y:k}=w;return{x:A,y:k}}},...f}=as(e,t),h={x:n,y:r},p=await o.detectOverflow(t,f),g=Ei(Wr(i)),y=IS(g);let b=h[y],v=h[g];if(a){const w=y==="y"?"top":"left",A=y==="y"?"bottom":"right",k=b+p[w],R=b-p[A];b=ew(k,b,R)}if(u){const w=g==="y"?"top":"left",A=g==="y"?"bottom":"right",k=v+p[w],R=v-p[A];v=ew(k,v,R)}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}}}}}},Ure=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}=as(e,t),h={x:n,y:r},p=Ei(i),g=IS(p);let y=h[g],b=h[p];const v=as(u,t),S=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const k=g==="y"?"height":"width",R=o.reference[g]-o.floating[k]+S.mainAxis,D=o.reference[g]+o.reference[k]-S.mainAxis;y<R?y=R:y>D&&(y=D)}if(f){var w,A;const k=g==="y"?"width":"height",R=FL.has(Wr(i)),D=o.reference[p]-o.floating[k]+(R&&((w=a.offset)==null?void 0:w[p])||0)+(R?0:S.crossAxis),T=o.reference[p]+o.reference[k]+(R?0:((A=a.offset)==null?void 0:A[p])||0)-(R?S.crossAxis:0);b<D?b=D:b>T&&(b=T)}return{[g]:y,[p]:b}}}},Hre=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}=as(e,t),h=await a.detectOverflow(t,f),p=Wr(i),g=$a(i),y=Ei(i)==="y",{width:b,height:v}=o.floating;let S,w;p==="top"||p==="bottom"?(S=p,w=g===(await(a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(w=p,S=g==="end"?"top":"bottom");const A=v-h.top-h.bottom,k=b-h.left-h.right,R=_c(v-h[S],A),D=_c(b-h[w],k),T=!t.middlewareData.shift;let $=R,N=D;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(N=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&($=A),T&&!g){const j=Vr(h.left,0),z=Vr(h.right,0),M=Vr(h.top,0),q=Vr(h.bottom,0);y?N=b-2*(j!==0||z!==0?j+z:Vr(h.left,h.right)):$=v-2*(M!==0||q!==0?M+q:Vr(h.top,h.bottom))}await c({...t,availableWidth:N,availableHeight:$});const F=await a.getDimensions(u.floating);return b!==F.width||v!==F.height?{reset:{rects:!0}}:{}}}};function BL(e){const t=Jr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=pn(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,u=Sg(n)!==o||Sg(r)!==a;return u&&(n=o,r=a),{width:n,height:r,$:u}}function YS(e){return rn(e)?e:e.contextElement}function ic(e){const t=YS(e);if(!pn(t))return so(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=BL(t);let a=(o?Sg(n.width):n.width)/r,u=(o?Sg(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}const qre=so(0);function UL(e){const t=Tn(e);return!Sy()||!t.visualViewport?qre:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Gre(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Tn(e)?!1:t}function jl(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=YS(e);let a=so(1);t&&(r?rn(r)&&(a=ic(r)):a=ic(e));const u=Gre(o,n,r)?UL(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=Tn(o),y=r&&rn(r)?Tn(r):r;let b=g,v=Xx(b);for(;v&&r&&y!==b;){const S=ic(v),w=v.getBoundingClientRect(),A=Jr(v),k=w.left+(v.clientLeft+parseFloat(A.paddingLeft))*S.x,R=w.top+(v.clientTop+parseFloat(A.paddingTop))*S.y;c*=S.x,f*=S.y,h*=S.x,p*=S.y,c+=k,f+=R,b=Tn(v),v=Xx(b)}}return Eg({width:h,height:p,x:c,y:f})}function Dy(e,t){const n=Cy(e).scrollLeft;return t?t.left+n:jl(fo(e)).left+n}function HL(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Dy(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function Vre(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=fo(r),u=t?wy(t.floating):!1;if(r===a||u&&o)return n;let c={scrollLeft:0,scrollTop:0},f=so(1);const h=so(0),p=pn(r);if((p||!p&&!o)&&((Da(r)!=="body"||Ta(a))&&(c=Cy(r)),pn(r))){const y=jl(r);f=ic(r),h.x=y.x+r.clientLeft,h.y=y.y+r.clientTop}const g=a&&!p&&!o?HL(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 Yre(e){return Array.from(e.getClientRects())}function Wre(e){const t=fo(e),n=Cy(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+Dy(e);const u=-n.scrollTop;return Jr(r).direction==="rtl"&&(a+=Vr(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:u}}const BD=25;function Xre(e,t){const n=Tn(e),r=fo(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=Sy();(!h||h&&t==="fixed")&&(u=i.offsetLeft,c=i.offsetTop)}const f=Dy(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<=BD&&(o-=b)}else f<=BD&&(o+=f);return{width:o,height:a,x:u,y:c}}const Kre=new Set(["absolute","fixed"]);function Qre(e,t){const n=jl(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=pn(e)?ic(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 UD(e,t,n){let r;if(t==="viewport")r=Xre(e,n);else if(t==="document")r=Wre(fo(e));else if(rn(t))r=Qre(t,n);else{const i=UL(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Eg(r)}function qL(e,t){const n=ss(e);return n===t||!rn(n)||Jo(n)?!1:Jr(n).position==="fixed"||qL(n,t)}function Zre(e,t){const n=t.get(e);if(n)return n;let r=ma(e,[],!1).filter(u=>rn(u)&&Da(u)!=="body"),i=null;const o=Jr(e).position==="fixed";let a=o?ss(e):e;for(;rn(a)&&!Jo(a);){const u=Jr(a),c=$S(a);!c&&u.position==="fixed"&&(i=null),(o?!c&&!i:!c&&u.position==="static"&&i&&Kre.has(i.position)||Ta(a)&&!c&&qL(e,a))?r=r.filter(f=>f!==a):i=u,a=ss(a)}return t.set(e,r),r}function Jre(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?wy(t)?[]:Zre(t,this._c):[].concat(n),r],a=o[0],u=o.reduce((c,f)=>{const h=UD(t,f,i);return c.top=Vr(h.top,c.top),c.right=_c(h.right,c.right),c.bottom=_c(h.bottom,c.bottom),c.left=Vr(h.left,c.left),c},UD(t,a,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function eie(e){const{width:t,height:n}=BL(e);return{width:t,height:n}}function tie(e,t,n){const r=pn(t),i=fo(t),o=n==="fixed",a=jl(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const c=so(0);function f(){c.x=Dy(i)}if(r||!r&&!o)if((Da(t)!=="body"||Ta(i))&&(u=Cy(t)),r){const y=jl(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?HL(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 c1(e){return Jr(e).position==="static"}function HD(e,t){if(!pn(e)||Jr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return fo(e)===n&&(n=n.ownerDocument.body),n}function GL(e,t){const n=Tn(e);if(wy(e))return n;if(!pn(e)){let i=ss(e);for(;i&&!Jo(i);){if(rn(i)&&!c1(i))return i;i=ss(i)}return n}let r=HD(e,t);for(;r&&fte(r)&&c1(r);)r=HD(r,t);return r&&Jo(r)&&c1(r)&&!$S(r)?n:r||gte(e)||n}const nie=async function(e){const t=this.getOffsetParent||GL,n=this.getDimensions,r=await n(e.floating);return{reference:tie(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function rie(e){return Jr(e).direction==="rtl"}const iie={convertOffsetParentRelativeRectToViewportRelativeRect:Vre,getDocumentElement:fo,getClippingRect:Jre,getOffsetParent:GL,getElementRects:nie,getClientRects:Yre,getDimensions:eie,getScale:ic,isElement:rn,isRTL:rie};function VL(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function oie(e,t){let n=null,r;const i=fo(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=Wu(p),v=Wu(i.clientWidth-(h+g)),S=Wu(i.clientHeight-(p+y)),w=Wu(h),A={rootMargin:-b+"px "+-v+"px "+-S+"px "+-w+"px",threshold:Vr(0,_c(1,c))||1};let k=!0;function R(D){const T=D[0].intersectionRatio;if(T!==c){if(!k)return a();T?a(!1,T):r=setTimeout(()=>{a(!1,1e-7)},1e3)}T===1&&!VL(f,e.getBoundingClientRect())&&a(),k=!1}try{n=new IntersectionObserver(R,{...A,root:i.ownerDocument})}catch{n=new IntersectionObserver(R,A)}n.observe(e)}return a(!0),o}function qD(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=YS(e),h=i||o?[...f?ma(f):[],...ma(t)]:[];h.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),o&&w.addEventListener("resize",n)});const p=f&&u?oie(f,n):null;let g=-1,y=null;a&&(y=new ResizeObserver(w=>{let[A]=w;A&&A.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var k;(k=y)==null||k.observe(t)})),n()}),f&&!c&&y.observe(f),y.observe(t));let b,v=c?jl(e):null;c&&S();function S(){const w=jl(e);v&&!VL(v,w)&&n(),v=w,b=requestAnimationFrame(S)}return n(),()=>{var w;h.forEach(A=>{i&&A.removeEventListener("scroll",n),o&&A.removeEventListener("resize",n)}),p==null||p(),(w=y)==null||w.disconnect(),y=null,c&&cancelAnimationFrame(b)}}const sie=Fre,aie=Bre,lie=zre,uie=Hre,cie=Pre,fie=Ure,die=(e,t,n)=>{const r=new Map,i={platform:iie,...n},o={...i.platform,_c:r};return jre(e,t,{...i,platform:o})};var hie=typeof document<"u",pie=function(){},Mm=hie?C.useLayoutEffect:pie;function $g(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(!$g(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)&&!$g(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function YL(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function GD(e,t){const n=YL(e);return Math.round(t*n)/n}function f1(e){const t=C.useRef(e);return Mm(()=>{t.current=e}),t}function mie(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);$g(g,r)||y(r);const[b,v]=C.useState(null),[S,w]=C.useState(null),A=C.useCallback(G=>{G!==T.current&&(T.current=G,v(G))},[]),k=C.useCallback(G=>{G!==$.current&&($.current=G,w(G))},[]),R=o||b,D=a||S,T=C.useRef(null),$=C.useRef(null),N=C.useRef(h),F=c!=null,j=f1(c),z=f1(i),M=f1(f),q=C.useCallback(()=>{if(!T.current||!$.current)return;const G={placement:t,strategy:n,middleware:g};z.current&&(G.platform=z.current),die(T.current,$.current,G).then(W=>{const L={...W,isPositioned:M.current!==!1};V.current&&!$g(N.current,L)&&(N.current=L,tr.flushSync(()=>{p(L)}))})},[g,t,n,z,M]);Mm(()=>{f===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,p(G=>({...G,isPositioned:!1})))},[f]);const V=C.useRef(!1);Mm(()=>(V.current=!0,()=>{V.current=!1}),[]),Mm(()=>{if(R&&(T.current=R),D&&($.current=D),R&&D){if(j.current)return j.current(R,D,q);q()}},[R,D,q,j,F]);const U=C.useMemo(()=>({reference:T,floating:$,setReference:A,setFloating:k}),[A,k]),I=C.useMemo(()=>({reference:R,floating:D}),[R,D]),P=C.useMemo(()=>{const G={position:n,left:0,top:0};if(!I.floating)return G;const W=GD(I.floating,h.x),L=GD(I.floating,h.y);return u?{...G,transform:"translate("+W+"px, "+L+"px)",...YL(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:L}},[n,u,I.floating,h.x,h.y]);return C.useMemo(()=>({...h,update:q,refs:U,elements:I,floatingStyles:P}),[h,q,U,I,P])}const gie=(e,t)=>({...sie(e),options:[e,t]}),yie=(e,t)=>({...aie(e),options:[e,t]}),bie=(e,t)=>({...fie(e),options:[e,t]}),vie=(e,t)=>({...lie(e),options:[e,t]}),xie=(e,t)=>({...uie(e),options:[e,t]}),wie=(e,t)=>({...cie(e),options:[e,t]}),Sie={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 wie().fn(e)).data)==null?void 0:a.referenceHidden)||o}}}},Cie={sideX:"left",sideY:"top"};function Eie(e={}){const{nodeId:t,externalTree:n}=e,r=mL(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=Ey(n);qe(()=>{o.domReference&&(c.current=o.domReference)},[o.domReference]);const h=mie({...e,elements:{...o,...a&&{reference:a}}}),p=C.useCallback($=>{const N=rn($)?{getBoundingClientRect:()=>$.getBoundingClientRect(),getClientRects:()=>$.getClientRects(),contextElement:$}:$;u(N),h.refs.setReference(N)},[h.refs]),[g,y]=C.useState(null),[b,v]=C.useState(null);i.useSyncedValue("referenceElement",g),i.useSyncedValue("domReferenceElement",rn(g)?g:null),i.useSyncedValue("floatingElement",b);const S=C.useCallback($=>{(rn($)||$===null)&&(c.current=$,y($)),(rn(h.refs.reference.current)||h.refs.reference.current===null||$!==null&&!rn($))&&h.refs.setReference($)},[h.refs,y]),w=C.useCallback($=>{v($),h.refs.setFloating($)},[h.refs]),A=C.useMemo(()=>({...h.refs,setReference:S,setFloating:w,setPositionReference:p,domReference:c}),[h.refs,S,w,p]),k=C.useMemo(()=>({...h.elements,domReference:o.domReference}),[h.elements,o.domReference]),R=i.useState("open"),D=i.useState("floatingId"),T=C.useMemo(()=>({...h,dataRef:i.context.dataRef,open:R,onOpenChange:i.setOpen,events:i.context.events,floatingId:D,refs:A,elements:k,nodeId:t,rootStore:i}),[h,A,k,t,i,R,D]);return qe(()=>{i.context.dataRef.current.floatingContext=T;const $=f==null?void 0:f.nodesRef.current.find(N=>N.id===t);$&&($.context=T)}),C.useMemo(()=>({...h,context:T,refs:A,elements:k,rootStore:i}),[h,A,k,T,i])}function WL(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 VD(e,t,n){const{rects:r,placement:i}=e;return{side:WL(t,Wr(i),n),align:$a(i)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function kie(e){var Xe,gt;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:w,adaptiveOrigin:A,lazyFlip:k=!1,externalTree:R}=e,[D,T]=C.useState(null);!b&&D!==null&&T(null);const $=v.side||"flip",N=v.align||"flip",F=v.fallbackAxisSide||"end",j=typeof t=="function"?t:void 0,z=Ye(j),M=j?z:t,q=Ar(t),V=tre()==="rtl",U=D||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":V?"left":"right","inline-start":V?"right":"left"}[r],I=o==="center"?U:`${U}-${o}`;let P=c;const G=1,W=r==="bottom"?G:0,L=r==="top"?G:0,Y=r==="right"?G:0,Q=r==="left"?G:0;typeof P=="number"?P={top:P+W,right:P+Q,bottom:P+L,left:P+Y}:P&&(P={top:(P.top||0)+W,right:(P.right||0)+Q,bottom:(P.bottom||0)+L,left:(P.left||0)+Y});const B={boundary:u==="clipping-ancestors"?"clippingAncestors":u,padding:P},ae=C.useRef(null),te=Ar(i),me=Ar(a),Ce=[gie(De=>{const We=VD(De,r,V),ot=typeof te.current=="function"?te.current(We):te.current,Wt=typeof me.current=="function"?me.current(We):me.current;return{mainAxis:ot,crossAxis:Wt,alignmentAxis:Wt}},[typeof i!="function"?i:0,typeof a!="function"?a:0,V,r])],Re=N==="none"&&$!=="shift",pe=!Re&&(f||S||$==="shift"),Oe=$==="none"?null:vie({...B,padding:{top:P.top+G,right:P.right+G,bottom:P.bottom+G,left:P.left+G},mainAxis:!S&&$==="flip",crossAxis:N==="flip"?"alignment":!1,fallbackAxisSideDirection:F}),Pe=Re?null:yie(De=>{const We=Zt(De.elements.floating).documentElement;return{...B,rootBoundary:S?{x:0,y:0,width:We.clientWidth,height:We.clientHeight}:void 0,mainAxis:N!=="none",crossAxis:pe,limiter:f||S?void 0:bie(ot=>{if(!ae.current)return{};const{width:Wt,height:Et}=ae.current.getBoundingClientRect(),Mn=Ei(Wr(ot.placement)),gn=Mn==="y"?Wt:Et,ln=Mn==="y"?P.left+P.right:P.top+P.bottom;return{offset:gn/2+ln/2}})}},[B,f,S,P,N]);$==="shift"||N==="shift"||o==="center"?Ce.push(Pe,Oe):Ce.push(Oe,Pe),Ce.push(xie({...B,apply({elements:{floating:De},rects:{reference:We},availableWidth:ot,availableHeight:Wt}){const Et=De.style;Et.setProperty("--available-width",`${ot}px`),Et.setProperty("--available-height",`${Wt}px`),Et.setProperty("--anchor-width",`${We.width}px`),Et.setProperty("--anchor-height",`${We.height}px`)}}),Nre(()=>({element:ae.current||document.createElement("div"),padding:h,offsetParent:"floating"}),[h]),{name:"transformOrigin",fn(De){var fs,pr,sn;const{elements:We,middlewareData:ot,placement:Wt,rects:Et,y:Mn}=De,gn=Wr(Wt),ln=Ei(gn),on=ae.current,rr=((fs=ot.arrow)==null?void 0:fs.x)||0,Ui=((pr=ot.arrow)==null?void 0:pr.y)||0,_i=(on==null?void 0:on.clientWidth)||0,Ai=(on==null?void 0:on.clientHeight)||0,Pn=rr+_i/2,Ze=Ui+Ai/2,zt=Math.abs(((sn=ot.shift)==null?void 0:sn.y)||0),un=Et.reference.height/2,Xt=typeof i=="function"?i(VD(De,r,V)):i,cn=zt>Xt,po={top:`${Pn}px calc(100% + ${Xt}px)`,bottom:`${Pn}px ${-Xt}px`,left:`calc(100% + ${Xt}px) ${Ze}px`,right:`${-Xt}px ${Ze}px`}[gn],Yl=`${Pn}px ${Et.reference.y+un-Mn}px`;return We.floating.style.setProperty("--transform-origin",pe&&ln==="y"&&cn?Yl:po),{}}},Sie,A),qe(()=>{!b&&y&&y.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[b,y]);const Z=C.useMemo(()=>({elementResize:!p&&typeof ResizeObserver<"u",layoutShift:!p&&typeof IntersectionObserver<"u"}),[p]),{refs:K,elements:ee,x:Ee,y:he,middlewareData:_e,update:ue,placement:re,context:ce,isPositioned:oe,floatingStyles:Ae}=Eie({rootContext:y,placement:I,middleware:Ce,strategy:n,whileElementsMounted:g?void 0:(...De)=>qD(...De,Z),nodeId:w,externalTree:R}),{sideX:Ne,sideY:ve}=_e.adaptiveOrigin||Cie,$e=oe?n:"fixed",le=C.useMemo(()=>{const De=A?{position:$e,[Ne]:Ee,[ve]:he}:{position:$e,...Ae};return oe||(De.opacity=0),De},[A,$e,Ne,Ee,ve,he,Ae,oe]),we=C.useRef(null);qe(()=>{if(!b)return;const De=q.current,We=typeof De=="function"?De():De,ot=(YD(We)?We.current:We)||null||null;ot!==we.current&&(K.setPositionReference(ot),we.current=ot)},[b,K,M,q]),C.useEffect(()=>{if(!b)return;const De=q.current;typeof De!="function"&&YD(De)&&De.current!==we.current&&(K.setPositionReference(De.current),we.current=De.current)},[b,K,M,q]),C.useEffect(()=>{if(g&&b&&ee.domReference&&ee.floating)return qD(ee.domReference,ee.floating,ue,Z)},[g,b,ee,ue,Z]);const be=Wr(re),Te=WL(r,be,V),je=$a(re)||"center",rt=!!((Xe=_e.hide)!=null&&Xe.referenceHidden);qe(()=>{k&&b&&oe&&T(be)},[k,b,oe,be]);const Mt=C.useMemo(()=>{var De,We;return{position:"absolute",top:(De=_e.arrow)==null?void 0:De.y,left:(We=_e.arrow)==null?void 0:We.x}},[_e.arrow]),At=((gt=_e.arrow)==null?void 0:gt.centerOffset)!==0;return C.useMemo(()=>({positionerStyles:le,arrowStyles:Mt,arrowRef:ae,arrowUncentered:At,side:Te,align:je,physicalSide:be,anchorHidden:rt,refs:K,context:ce,isPositioned:oe,update:ue}),[le,Mt,ae,At,Te,je,be,rt,K,ce,oe,ue])}function YD(e){return e!=null&&"current"in e}function XL(e){return e==="starting"?nre:lr}const _ie=C.forwardRef(function(e,t){const{cutout:n,...r}=e;let i;if(n){const o=n==null?void 0:n.getBoundingClientRect();i=`polygon(
|
|
491
|
+
0% 0%,
|
|
492
|
+
100% 0%,
|
|
493
|
+
100% 100%,
|
|
494
|
+
0% 100%,
|
|
495
|
+
0% 0%,
|
|
496
|
+
${o.left}px ${o.top}px,
|
|
497
|
+
${o.left}px ${o.bottom}px,
|
|
498
|
+
${o.right}px ${o.bottom}px,
|
|
499
|
+
${o.right}px ${o.top}px,
|
|
500
|
+
${o.left}px ${o.top}px
|
|
501
|
+
)`}return _.jsx("div",{ref:t,role:"presentation","data-base-ui-inert":"",...r,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:i}})}),oc={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function WD(e){return e==="inert"?oc.inert:e==="aria-hidden"?oc["aria-hidden"]:oc.none}let em=new WeakSet,tm={},d1=0;const KL=e=>e&&(e.host||KL(e.parentNode)),Aie=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=KL(n);return e.contains(r)?r:null}).filter(n=>n!=null);function Rie(e,t,n,r){const i="data-base-ui-inert",o=r?"inert":n?"aria-hidden":null,a=Aie(t,e),u=new Set,c=new Set(a),f=[];tm[i]||(tm[i]=new WeakMap);const h=tm[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(Da(b)!=="script")if(u.has(b))g(b);else{const v=o?b.getAttribute(o):null,S=v!==null&&v!=="false",w=WD(o),A=(w.get(b)||0)+1,k=(h.get(b)||0)+1;w.set(b,A),h.set(b,k),f.push(b),A===1&&S&&em.add(b),k===1&&b.setAttribute(i,""),!S&&o&&b.setAttribute(o,o==="inert"?"":"true")}})}return d1+=1,()=>{f.forEach(y=>{const b=WD(o),v=(b.get(y)||0)-1,S=(h.get(y)||0)-1;b.set(y,v),h.set(y,S),v||(!em.has(y)&&o&&y.removeAttribute(o),em.delete(y)),S||y.removeAttribute(i)}),d1-=1,d1||(oc.inert=new WeakMap,oc["aria-hidden"]=new WeakMap,oc.none=new WeakMap,em=new WeakSet,tm={})}}function Die(e,t=!1,n=!1){const r=Zt(e[0]).body;return Rie(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}function Tie(e,t){const n=Tn(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 XD=20;let ua=[];function WS(){ua=ua.filter(e=>{var t;return(t=e.deref())==null?void 0:t.isConnected})}function $ie(e){WS(),e&&Da(e)!=="body"&&(ua.push(new WeakRef(e)),ua.length>XD&&(ua=ua.slice(-XD)))}function h1(){var e;return WS(),(e=ua[ua.length-1])==null?void 0:e.deref()}function Mie(e){if(!e)return null;const t=ah();return NL(e,t)?e:Ry(e,t)[0]||e}function Oie(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():Jr(e).display!=="none"}function KD(e,t){var o;if(!t.current.includes("floating")&&!((o=e.getAttribute("role"))!=null&&o.includes("dialog")))return;const n=ah(),r=xre(e,n).filter(a=>{const u=a.getAttribute("data-tabindex")||"";return NL(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 Nie(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"),w=b.useState("floatingElement"),{events:A,dataRef:k}=b.context,R=Ye(()=>{var K;return(K=k.current.floatingContext)==null?void 0:K.nodeId}),D=i===!1,T=Zx(S)&&D,$=C.useRef(["content"]),N=Ar(i),F=Ar(o),j=Ar(f),z=Ey(y),M=IL(),q=C.useRef(null),V=C.useRef(null),U=C.useRef(!1),I=C.useRef(!1),P=C.useRef(!1),G=C.useRef(-1),W=C.useRef(""),L=C.useRef(""),Y=C.useRef(null),Q=C.useRef(null),B=Nl(Y,g,M==null?void 0:M.beforeInsideRef),ae=Nl(Q,M==null?void 0:M.afterInsideRef),te=Dr(),me=Dr(),Ce=yy(),Re=M!=null,pe=vg(w),Oe=Ye((K=pe)=>K?Ry(K,ah()):[]),Pe=Ye(K=>{const ee=Oe(K);return $.current.map(()=>ee).filter(Boolean).flat()});C.useEffect(()=>{if(r||!u)return;function K(Ee){Ee.key==="Tab"&&Gt(pe,no(Zt(pe)))&&Oe().length===0&&!T&&Xn(Ee)}const ee=Zt(pe);return ee.addEventListener("keydown",K),()=>{ee.removeEventListener("keydown",K)}},[r,S,pe,u,$,T,Oe,Pe]),C.useEffect(()=>{if(r||!v)return;const K=Zt(pe);function ee(){P.current=!1}function Ee(_e){const ue=Li(_e),re=Gt(w,ue)||Gt(S,ue)||Gt(M==null?void 0:M.portalNode,ue);P.current=!re,L.current=_e.pointerType||"keyboard",ue!=null&&ue.closest(`[${rre}]`)&&(I.current=!0)}function he(){L.current="keyboard"}return K.addEventListener("pointerdown",Ee,!0),K.addEventListener("pointerup",ee,!0),K.addEventListener("pointercancel",ee,!0),K.addEventListener("keydown",he,!0),()=>{K.removeEventListener("pointerdown",Ee,!0),K.removeEventListener("pointerup",ee,!0),K.removeEventListener("pointercancel",ee,!0),K.removeEventListener("keydown",he,!0)}},[r,w,S,pe,v,M]),C.useEffect(()=>{if(r||!c)return;const K=Zt(pe);function ee(){I.current=!0,me.start(0,()=>{I.current=!1})}function Ee(ce){const oe=Li(ce),Ae=Oe().indexOf(oe);Ae!==-1&&(G.current=Ae)}function he(ce){const oe=ce.relatedTarget,Ae=ce.currentTarget,Ne=Li(ce);queueMicrotask(()=>{const ve=R(),$e=b.context.triggerElements,le=(oe==null?void 0:oe.hasAttribute(wg("focus-guard")))&&[Y.current,Q.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(oe),we=!(Gt(S,oe)||Gt(w,oe)||Gt(oe,w)||Gt(M==null?void 0:M.portalNode,oe)||oe!=null&&$e.hasElement(oe)||$e.hasMatchingElement(be=>Gt(be,oe))||le||z&&(rc(z.nodesRef.current,ve).find(be=>{var Te,je;return Gt((Te=be.context)==null?void 0:Te.elements.floating,oe)||Gt((je=be.context)==null?void 0:je.elements.domReference,oe)})||_D(z.nodesRef.current,ve).find(be=>{var Te,je,rt;return[(Te=be.context)==null?void 0:Te.elements.floating,vg((je=be.context)==null?void 0:je.elements.floating)].includes(oe)||((rt=be.context)==null?void 0:rt.elements.domReference)===oe})));if(Ae===S&&pe&&KD(pe,$),a&&Ae!==S&&!Oie(Ne)&&no(K)===K.body){if(pn(pe)&&(pe.focus(),a==="popup")){Ce.request(()=>{pe.focus()});return}const be=G.current,Te=Oe(),je=Te[be]||Te[Te.length-1]||pe;pn(je)&&je.focus()}if(k.current.insideReactTree){k.current.insideReactTree=!1;return}(T||!u)&&oe&&we&&!I.current&&(T||oe!==h1())&&(U.current=!0,b.setOpen(!1,en(ky,ce)))})}function _e(){P.current||(k.current.insideReactTree=!0,te.start(0,()=>{k.current.insideReactTree=!1}))}const ue=pn(S)?S:null,re=[];if(!(!w&&!ue))return ue&&(ue.addEventListener("focusout",he),ue.addEventListener("pointerdown",ee),re.push(()=>{ue.removeEventListener("focusout",he),ue.removeEventListener("pointerdown",ee)})),w&&(w.addEventListener("focusin",Ee),w.addEventListener("focusout",he),M&&(w.addEventListener("focusout",_e,!0),re.push(()=>{w.removeEventListener("focusout",_e,!0)})),re.push(()=>{w.removeEventListener("focusin",Ee),w.removeEventListener("focusout",he)})),()=>{re.forEach(ce=>{ce()})}},[r,S,w,pe,u,z,M,b,c,a,Oe,T,R,$,k,te,me,Ce,h,p]),C.useEffect(()=>{var he,_e,ue;if(r||!w||!v)return;const K=Array.from(((he=M==null?void 0:M.portalNode)==null?void 0:he.querySelectorAll(`[${wg("portal")}]`))||[]),ee=(ue=(_e=(z?_D(z.nodesRef.current,R()):[]).find(re=>{var ce;return Zx(((ce=re.context)==null?void 0:ce.elements.domReference)||null)}))==null?void 0:_e.context)==null?void 0:ue.elements.domReference,Ee=[w,ee,...K,q.current,V.current,Y.current,Q.current,M==null?void 0:M.beforeOutsideRef.current,M==null?void 0:M.afterOutsideRef.current,Io(p),Io(h),T?S:null].filter(re=>re!=null);return Die(Ee,u||T)},[v,r,S,w,u,$,M,T,z,R,h,p]),qe(()=>{if(!v||r||!pn(pe))return;const K=Zt(pe),ee=no(K);queueMicrotask(()=>{const Ee=Pe(pe),he=N.current,_e=typeof he=="function"?he(j.current||""):he;if(_e===void 0||_e===!1)return;let ue;_e===!0||_e===null?ue=Ee[0]||pe:ue=Io(_e),ue=ue||Ee[0]||pe,!Gt(pe,ee)&&ud(ue,{preventScroll:ue===pe})})},[r,v,pe,D,Pe,N,j]),qe(()=>{if(r||!pe)return;const K=Zt(pe),ee=no(K);$ie(ee);function Ee(ue){if(ue.open||(W.current=Tie(ue.nativeEvent,L.current)),ue.reason===Wte&&ue.nativeEvent.type==="mouseleave"&&(U.current=!0),ue.reason===PS)if(ue.nested)U.current=!1;else if(dL(ue.nativeEvent)||hL(ue.nativeEvent))U.current=!1;else{let re=!1;document.createElement("div").focus({get preventScroll(){return re=!0,!1}}),re?U.current=!1:U.current=!0}}A.on("openchange",Ee);const he=K.createElement("span");he.setAttribute("tabindex","-1"),he.setAttribute("aria-hidden","true"),Object.assign(he.style,gy),Re&&S&&S.insertAdjacentElement("afterend",he);function _e(){const ue=F.current;let re=typeof ue=="function"?ue(W.current):ue;if(re===void 0||re===!1)return null;if(re===null&&(re=!0),typeof re=="boolean"){const oe=S||h1();return oe&&oe.isConnected?oe:he}const ce=S||h1()||he;return Io(re)||ce}return()=>{A.off("openchange",Ee);const ue=no(K),re=Gt(w,ue)||z&&rc(z.nodesRef.current,R(),!1).some(oe=>{var Ae;return Gt((Ae=oe.context)==null?void 0:Ae.elements.floating,ue)}),ce=_e();queueMicrotask(()=>{const oe=Mie(ce),Ae=typeof F.current!="boolean";F.current&&!U.current&&pn(oe)&&(!(!Ae&&oe!==ue&&ue!==K.body)||re)&&oe.focus({preventScroll:!0}),he.remove(),U.current=!1})}},[r,w,pe,F,k,A,z,Re,S,R]),qe(()=>{if(!NS||v||!w)return;const K=no(Zt(w));!pn(K)||!zS(K)||Gt(w,K)&&K.blur()},[v,w]),qe(()=>{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]),qe(()=>{if(!(r||!pe))return KD(pe,$),()=>{queueMicrotask(WS)}},[r,pe,$]);const Z=!r&&(u?!T:!0)&&(Re||u);return _.jsxs(C.Fragment,{children:[Z&&_.jsx(_g,{"data-type":"inside",ref:B,onFocus:K=>{var ee,Ee;if(u){const he=Pe();ud(he[he.length-1])}else M!=null&&M.portalNode&&(U.current=!1,hd(K,M.portalNode)?(ee=jL(S))==null||ee.focus():(Ee=Io(p??M.beforeOutsideRef))==null||Ee.focus())}}),n,Z&&_.jsx(_g,{"data-type":"inside",ref:ae,onFocus:K=>{var ee,Ee;u?ud(Pe()[0]):M!=null&&M.portalNode&&(c&&(U.current=!0),hd(K,M.portalNode)?(ee=zL(S))==null||ee.focus():(Ee=Io(h??M.afterOutsideRef))==null||Ee.focus())}})]})}const QL=16,Lie="none",jie="_list_c57i6_3",es={list:jie,"list-group-header":"_list-group-header_c57i6_29","list-group-icon":"_list-group-icon_c57i6_33","list-group-category":"_list-group-category_c57i6_37","list-group-panel":"_list-group-panel_c57i6_42","list-item":"_list-item_c57i6_47","list-text-label":"_list-text-label_c57i6_52","list-text-description":"_list-text-description_c57i6_62"},ZL=({className:e,children:t,...n})=>_.jsx(ze,{"data-slot":"list-text-label",className:Ie(es["list-text-label"],e),size:0,...n,children:t});ZL.displayName="ListLabel";const JL=({className:e,children:t,...n})=>_.jsx(ze,{"data-slot":"list-text-description",className:Ie(es["list-text-description"],e),size:0,...n,children:t});JL.displayName="ListDescription";const e6=({label:e,description:t,...n})=>_.jsxs(Kr,{condition:!!t,render:_.jsx(Ve,{"data-slot":"list-text-block",mb:2,...n}),children:[_.jsx(ZL,{children:e}),t&&_.jsx(JL,{children:t})]});e6.displayName="ListTextBlock";const lh=({render:e,className:t,icon:n,label:r,description:i,children:o,...a})=>_.jsx(tt,{"data-slot":"list-item",render:e??_.jsx("li",{}),ay:"start",ax:"space-between",gap:8,className:Ie(es["list-item"],t),...a,children:o||_.jsxs(Kr,{condition:!!n,render:_.jsx(tt,{gap:2,ay:"start",fullwidth:!0,style:{listStyleType:"none"}}),children:[n&&_.jsx(n,{"data-slot":"list-item-icon",size:QL,style:{color:"var(--shade-foreground)"}}),_.jsx(e6,{"data-slot":"list-item-text",label:r,description:i})]})});lh.displayName="ListItem";const XS=({category:e,icon:t})=>e?_.jsxs(tt,{"data-slot":"list-group-header",className:es["list-group-header"],ay:"center",ax:"start",gap:2,py:1,fullwidth:!0,children:[t&&_.jsx(t,{className:es["list-group-icon"],size:QL}),_.jsx(ze,{"data-slot":"list-group-category",render:_.jsx("h3",{}),className:es["list-group-category"],weight:"bold",size:0,children:e})]}):null;XS.displayName="ListGroupHeader";const KS=({category:e,icon:t,items:n})=>_.jsxs(Ve,{"data-slot":"list-group",render:_.jsx("li",{}),ax:"stretch",fullwidth:!0,className:es["list-group"],children:[_.jsx(XS,{category:e,icon:t}),_.jsx("ul",{"data-slot":"list-group-panel",className:es["list-group-panel"],children:n.map((r,i)=>"items"in r?_.jsx(KS,{...r},r.category??i):_.jsx(lh,{...r},i))})]});KS.displayName="ListGroup";const zl=({marker:e=Lie,category:t,icon:n,items:r,children:i,ItemProps:o,GroupProps:a,...u})=>{const c=e==="decimal"?_.jsx("ol",{}):_.jsx("ul",{}),f=_.jsx(Ve,{"data-slot":"list","data-marker":e,ax:"stretch",className:es.list,render:c,...u,children:r?r.map((h,p)=>"items"in h?_.jsx(KS,{...h,...a},h.category??p):_.jsx(lh,{fullwidth:!0,...h,...o},p)):i});return t?_.jsxs(Ve,{"data-slot":"list-section",ax:"stretch",fullwidth:!0,children:[_.jsx(XS,{category:t,icon:n}),f]}):f};zl.displayName="List";const t6=C.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function zie(){return C.useContext(t6)}function Pie(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,o=Ye(i),a=C.useRef(0),u=Zr(Fie).current,c=Zr(Iie).current,[f,h]=C.useState(0),p=C.useRef(f),g=Ye((w,A)=>{c.set(w,A??null),p.current+=1,h(p.current)}),y=Ye(w=>{c.delete(w),p.current+=1,h(p.current)}),b=C.useMemo(()=>{const w=new Map;return Array.from(c.keys()).filter(A=>A.isConnected).sort(Bie).forEach((A,k)=>{const R=c.get(A)??{};w.set(A,{...R,index:k})}),w},[c,f]);qe(()=>{if(typeof MutationObserver!="function"||b.size===0)return;const w=new MutationObserver(A=>{const k=new Set,R=D=>k.has(D)?k.delete(D):k.add(D);A.forEach(D=>{D.removedNodes.forEach(R),D.addedNodes.forEach(R)}),k.size===0&&(p.current+=1,h(p.current))});return b.forEach((A,k)=>{k.parentElement&&w.observe(k.parentElement,{childList:!0})}),()=>{w.disconnect()}},[b]),qe(()=>{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]),qe(()=>()=>{n.current=[]},[n]),qe(()=>()=>{r&&(r.current=[])},[r]);const v=Ye(w=>(u.add(w),()=>{u.delete(w)}));qe(()=>{u.forEach(w=>w(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 _.jsx(t6.Provider,{value:S,children:t})}function Iie(){return new Map}function Fie(){return new Set}function Bie(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}let n6=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function Uie(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}=zie(),g=C.useRef(-1),[y,b]=C.useState(o??(i===n6.GuessFromOrder?()=>{if(g.current===-1){const w=p.current;p.current+=1,g.current=w}return g.current}:-1)),v=C.useRef(null),S=C.useCallback(w=>{var A;if(v.current=w,y!==-1&&w!==null&&(f.current[y]=w,h)){const k=t!==void 0;h.current[y]=k?t:((A=r==null?void 0:r.current)==null?void 0:A.textContent)??w.textContent}},[y,f,h,t,r]);return qe(()=>{if(o!=null)return;const w=v.current;if(w)return a(w,n),()=>{u(w)}},[o,a,u,n]),qe(()=>{if(o==null)return c(w=>{var k;const A=v.current?(k=w.get(v.current))==null?void 0:k.index:null;A!=null&&b(A)})},[o,c,b]),C.useMemo(()=>({ref:S,index:y}),[y,S])}const Hie=C.createContext(void 0);function qie(e=!1){const t=C.useContext(Hie);if(t===void 0&&!e)throw new Error(Bi(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 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 QS(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,o=C.useRef(null),a=qie(!0)!==void 0,u=Ye(()=>{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;Vie(g)&&a&&t&&c.disabled===void 0&&g.disabled&&(g.disabled=!1)},[t,c.disabled,a]);qe(f,[f]);const h=C.useCallback((g={})=>{const{onClick:y,onMouseDown:b,onKeyUp:v,onKeyDown:S,onPointerDown:w,...A}=g;return xa({type:i?"button":void 0,onClick(k){if(t){k.preventDefault();return}y==null||y(k)},onMouseDown(k){t||(b==null||b(k))},onKeyDown(k){if(t||(iw(k),S==null||S(k)),k.baseUIHandlerPrevented)return;const R=k.target===k.currentTarget&&!i&&!u()&&!t,D=k.key==="Enter",T=k.key===" ";R&&((T||D)&&k.preventDefault(),D&&(y==null||y(k)))},onKeyUp(k){t||(iw(k),v==null||v(k)),!k.baseUIHandlerPrevented&&k.target===k.currentTarget&&!i&&!t&&k.key===" "&&(y==null||y(k))},onPointerDown(k){if(t){k.preventDefault();return}w==null||w(k)}},i?void 0:{role:"button"},c,A)},[t,c,i,u]),p=Ye(g=>{o.current=g,f()});return{getButtonProps:h,buttonRef:p}}function Vie(e){return pn(e)&&e.tagName==="BUTTON"}const Yie="_checkbox_pxuy6_3 _disabled_1m2av_2",Vo={checkbox:Yie,"checkbox-label":"_checkbox-label_pxuy6_47","checkbox-indicator":"_checkbox-indicator_pxuy6_52","size-small":"_size-small_pxuy6_61","checkbox-icon":"_checkbox-icon_pxuy6_64","size-medium":"_size-medium_pxuy6_69","size-large":"_size-large_pxuy6_77","toggle-bordered":"_toggle-bordered_pxuy6_86","toggle-reversed":"_toggle-reversed_pxuy6_102"},r6=Mr({variants:{bordered:{true:Vo["toggle-bordered"]},reversed:{true:Vo["toggle-reversed"]},size:{small:Vo["size-small"],medium:Vo["size-medium"],large:Vo["size-large"]}}}),i6=({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 _.jsxs(Kr,{condition:p,render:_.jsx(tt,{render:_.jsx("label",{}),className:Ie(Vo["checkbox-label"],r6({reversed:r,bordered:i}),c),ay:g?"start":"center",gap:3,...h}),children:[f,!!(t||n)&&_.jsx(US,{name:e,children:_.jsxs(Kr,{condition:g,render:_.jsx(Ve,{gap:3}),children:[t&&_.jsx(HS,{weight:"normal",...o,children:t}),n&&_.jsx(qS,{...a,children:n}),_.jsx(kg,{...u})]})})]})};i6.displayName="CheckboxField";const Wie="small";let QD=(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 o6(e){return C.useMemo(()=>({checked(t){return e.indeterminate?{}:t?{[QD.checked]:""}:{[QD.unchecked]:""}},...Aa}),[e.indeterminate])}const Xie=C.createContext({disabled:!1});function Kie(){return C.useContext(Xie)}const Qie=C.createContext(void 0);function Zie(e=!0){const t=C.useContext(Qie);if(t===void 0&&!e)throw new Error(Bi(3));return t}const s6=C.createContext(void 0);function Jie(){const e=C.useContext(s6);if(e===void 0)throw new Error(Bi(14));return e}const eoe="data-parent",toe=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:w=!1,...A}=e,{clearErrors:k}=Fc(),{disabled:R,name:D,setDirty:T,setFilled:$,setFocused:N,setTouched:F,state:j,validationMode:z,validityData:M,shouldValidateOnChange:q,validation:V}=Ra(),U=Kie(),{labelId:I,controlId:P,registerControlId:G,getDescriptionProps:W}=ls(),L=Zie(),Y=L==null?void 0:L.parent,Q=Y&&L.allValues,B=R||U.disabled||(L==null?void 0:L.disabled)||o,ae=D??f,te=S??ae,me=Ll(),Ce=Ll();let Re=P;Q?Re=p?Ce:`${Y.id}-${te}`:a&&(Re=a);let pe={};Q&&(p?pe=L.parent.getParentProps():te&&(pe=L.parent.getChildProps(te)));const Oe=Ye(h),{checked:Pe=n,indeterminate:Z=u,onCheckedChange:K,...ee}=pe,Ee=L==null?void 0:L.value,he=L==null?void 0:L.setValue,_e=L==null?void 0:L.defaultValue,ue=C.useRef(null),re=Zr(()=>Symbol("checkbox-control")),ce=C.useRef(!1),{getButtonProps:oe,buttonRef:Ae}=QS({disabled:B,native:w}),Ne=(L==null?void 0:L.validation)??V,[ve,$e]=yg({controlled:te&&Ee&&!p?Ee.includes(te):Pe,default:te&&_e&&!p?_e.includes(te):i,name:"Checkbox",state:"checked"});qe(()=>{G!==Qn&&(ce.current=!0,G(re.current,Re))},[Re,L,G,p,re]),C.useEffect(()=>{const Xe=re.current;return()=>{!ce.current||G===Qn||(ce.current=!1,G(Xe,void 0))}},[G,re]),DS({enabled:!L,id:me,commit:Ne.commit,value:ve,controlRef:ue,name:ae,getValue:()=>ve});const le=C.useRef(null),we=Nl(c,le,Ne.inputRef);qe(()=>{le.current&&(le.current.indeterminate=Z,ve&&$(!0))},[ve,Z,$]),sL(ve,()=>{L&&!p||(k(ae),$(ve),T(ve!==M.initialValue),q()?Ne.commit(ve):Ne.commit(ve,!0))});const be=xa({checked:ve,disabled:B,name:p?void 0:ae,id:w?void 0:Re??void 0,required:b,ref:we,style:ae?YN:gy,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(Xe){if(Xe.nativeEvent.defaultPrevented)return;const gt=Xe.target.checked,De=en(Uc,Xe.nativeEvent);if(K==null||K(gt,De),Oe(gt,De),!De.isCanceled&&($e(gt),te&&Ee&&he&&!p)){const We=gt?[...Ee,te]:Ee.filter(ot=>ot!==te);he(We,De)}},onFocus(){var Xe;(Xe=ue.current)==null||Xe.focus()}},S!==void 0?{value:(L?ve&&S:S)||""}:lr,W,L?Ne.getValidationProps:Ne.getInputValidationProps),Te=Q?!!Pe:ve,je=Q&&Z||u;C.useEffect(()=>{if(!Y||!te)return;const Xe=Y.disabledStatesRef.current;return Xe.set(te,B),()=>{Xe.delete(te)}},[Y,B,te]);const rt=C.useMemo(()=>({...j,checked:Te,disabled:B,readOnly:g,required:b,indeterminate:je}),[j,Te,B,g,b,je]),Mt=o6(rt),At=qn("span",e,{state:rt,ref:[Ae,ue,t,L==null?void 0:L.registerControlRef],props:[{id:w?Re??void 0:me,role:"checkbox","aria-checked":Z?"mixed":ve,"aria-readonly":g||void 0,"aria-required":b||void 0,"aria-labelledby":I,[eoe]:p?"":void 0,onFocus(){N(!0)},onBlur(){const Xe=le.current;Xe&&(F(!0),N(!1),z==="onBlur"&&Ne.commit(L?Ee:Xe.checked))},onClick(Xe){var gt;g||B||(Xe.preventDefault(),(gt=le.current)==null||gt.dispatchEvent(new PointerEvent("click",{bubbles:!0,shiftKey:Xe.shiftKey,ctrlKey:Xe.ctrlKey,altKey:Xe.altKey,metaKey:Xe.metaKey})))}},W,Ne.getValidationProps,A,ee,oe],stateAttributesMapping:Mt});return _.jsxs(s6.Provider,{value:rt,children:[At,!ve&&!L&&ae&&!p&&v!==void 0&&_.jsx("input",{type:"hidden",name:ae,value:v}),_.jsx("input",{...be})]})}),a6=({size:e=Wie,hideIndicator:t,className:n,...r})=>_.jsx(toe,{"data-slot":"checkbox","aria-label":"checkbox",className:Ie(Vo.checkbox,r6({size:e}),n,{"sr-only":t}),...r});a6.displayName="CheckboxRoot";const noe=C.forwardRef(function(e,t){const{render:n,className:r,keepMounted:i=!1,...o}=e,a=Jie(),u=a.checked||a.indeterminate,{mounted:c,transitionStatus:f,setMounted:h}=oh(u),p=C.useRef(null),g={...a,transitionStatus:f};Ic({open:u,ref:p,onComplete(){u||h(!1)}});const y=o6(a),b=C.useMemo(()=>({...y,...by,...Aa}),[y]),v=i||c,S=qn("span",e,{ref:[t,p],state:g,stateAttributesMapping:b,props:o});return v?S:null}),l6=({indeterminate:e,className:t,...n})=>_.jsx(noe,{"data-slot":"checkbox-indicator",className:Ie(Vo["checkbox-indicator"],t),...n,children:_.jsx(Vw,{condition:!!e,className:Vo["checkbox-icon"],"data-slot":"checkbox-icon",render:{true:_.jsx(yH,{strokeWidth:3}),false:_.jsx(qg,{strokeWidth:3})}})});l6.displayName="CheckboxIndicator";const u6=({name:e,label:t,description:n,reversed:r,bordered:i,indeterminate:o,hideIndicator:a,FieldProps:u,IndicatorProps:c,...f})=>_.jsx(i6,{name:e,label:t,description:n,reversed:r,bordered:i,...u,children:_.jsx(a6,{name:e,hideIndicator:a,indeterminate:o,...f,children:_.jsx(l6,{indeterminate:o,...c})})});u6.displayName="Checkbox";function roe(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 i=parseFloat(n.width)||0,o=parseFloat(n.height)||0,a=parseFloat(r.width)||0,u=parseFloat(r.height)||0,c=Math.max(t.width,i,a),f=Math.max(t.height,o,u),h=c-t.width,p=f-t.height;return{left:t.left-h/2,right:t.right+h/2,top:t.top-p/2,bottom:t.bottom+p/2}}function ioe(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=Dr(),y=C.useRef(""),b=C.useRef(p??a??-1),v=C.useRef(null);qe(()=>{!i&&p!==null||(g.clear(),v.current=null,y.current!==""&&(y.current=""))},[i,p,g]),qe(()=>{i&&y.current===""&&(b.current=p??a??-1)},[i,p,a]);const S=Ye(D=>{D?r.current.typing||(r.current.typing=D,c==null||c(D)):r.current.typing&&(r.current.typing=D,c==null||c(D))}),w=Ye(D=>{function T(z,M,q){const V=M.find(U=>(U==null?void 0:U.toLocaleLowerCase().indexOf(q.toLocaleLowerCase()))===0);return V?z.indexOf(V):-1}const $=o.current;if(y.current.length>0&&y.current[0]!==" "&&(T($,$,y.current)===-1?S(!1):D.key===" "&&Xn(D)),$==null||D.key.length!==1||D.ctrlKey||D.metaKey||D.altKey)return;i&&D.key!==" "&&(Xn(D),S(!0));const N=y.current==="";N&&(b.current=p??a??-1),$.every(z=>{var M,q;return z?((M=z[0])==null?void 0:M.toLocaleLowerCase())!==((q=z[1])==null?void 0:q.toLocaleLowerCase()):!0})&&y.current===D.key&&(y.current="",b.current=v.current),y.current+=D.key,g.start(h,()=>{y.current="",b.current=v.current,S(!1)});const F=N?p??a??-1:b.current,j=T($,[...$.slice((F||0)+1),...$.slice(0,(F||0)+1)],y.current);j!==-1?(u==null||u(j),v.current=j):D.key!==" "&&(y.current="",S(!1))}),A=Ye(D=>{const T=D.relatedTarget,$=n.select("domReferenceElement"),N=n.select("floatingElement"),F=Gt($,T),j=Gt(N,T);F||j||(g.clear(),y.current="",b.current=v.current,S(!1))}),k=C.useMemo(()=>({onKeyDown:w,onBlur:A}),[w,A]),R=C.useMemo(()=>({onKeyDown:w,onKeyUp(D){D.key===" "&&S(!1)},onBlur:A}),[w,A,S]);return C.useMemo(()=>f?{reference:k,floating:R}:{},[f,k,R])}function p1(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const c6="ArrowUp",f6="ArrowDown",d6="ArrowLeft",h6="ArrowRight",p6="Home",m6="End",ooe=new Set([d6,h6]),soe=new Set([c6,f6]),aoe=new Set([...ooe,...soe]);[...aoe];const loe=new Set([c6,f6,d6,h6,p6,m6]),uoe=EL,zi={"select-trigger":"_select-trigger_1b090_1","select-slot":"_select-slot_1b090_15 _field-slot_1m2av_68","select-trigger-slots":"_select-trigger-slots_1b090_19","select-positioner":"_select-positioner_1b090_38","select-popup":"_select-popup_1b090_42 _popup_1m2av_44","select-item":"_select-item_1b090_47 _option_1m2av_97","select-item-indicator":"_select-item-indicator_1b090_66","select-icon":"_select-icon_1b090_64","select-value":"_select-value_1b090_78"},g6=C.createContext(null),y6=C.createContext(null);function us(){const e=C.useContext(g6);if(e===null)throw new Error(Bi(60));return e}function b6(){const e=C.useContext(y6);if(e===null)throw new Error(Bi(61));return e}const et={id:Dt(e=>e.id),modal:Dt(e=>e.modal),multiple:Dt(e=>e.multiple),items:Dt(e=>e.items),itemToStringLabel:Dt(e=>e.itemToStringLabel),itemToStringValue:Dt(e=>e.itemToStringValue),isItemEqualToValue:Dt(e=>e.isItemEqualToValue),value:Dt(e=>e.value),hasSelectedValue:Dt(e=>{const{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:qu(t,r)!==""}),hasNullItemLabel:Dt((e,t)=>t?Iee(e.items):!1),open:Dt(e=>e.open),mounted:Dt(e=>e.mounted),forceMount:Dt(e=>e.forceMount),transitionStatus:Dt(e=>e.transitionStatus),openMethod:Dt(e=>e.openMethod),activeIndex:Dt(e=>e.activeIndex),selectedIndex:Dt(e=>e.selectedIndex),isActive:Dt((e,t)=>e.activeIndex===t),isSelected:Dt((e,t,n)=>{const r=e.isItemEqualToValue,i=e.value;return e.multiple?Array.isArray(i)&&i.some(o=>kc(n,o,r)):e.selectedIndex===t&&e.selectedIndex!==null?!0:kc(n,i,r)}),isSelectedByFocus:Dt((e,t)=>e.selectedIndex===t),popupProps:Dt(e=>e.popupProps),triggerProps:Dt(e=>e.triggerProps),triggerElement:Dt(e=>e.triggerElement),positionerElement:Dt(e=>e.positionerElement),listElement:Dt(e=>e.listElement),scrollUpArrowVisible:Dt(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:Dt(e=>e.scrollDownArrowVisible),hasScrollArrows:Dt(e=>e.hasScrollArrows)};function coe(e){const{id:t,value:n,defaultValue:r=null,onValueChange:i,open:o,defaultOpen:a=!1,onOpenChange:u,name:c,autoComplete:f,disabled:h=!1,readOnly:p=!1,required:g=!1,modal:y=!0,actionsRef:b,inputRef:v,onOpenChangeComplete:S,items:w,multiple:A=!1,itemToStringLabel:k,itemToStringValue:R,isItemEqualToValue:D=jee,highlightItemOnHover:T=!0,children:$}=e,{clearErrors:N}=Fc(),{setDirty:F,setTouched:j,setFocused:z,shouldValidateOnChange:M,validityData:q,setFilled:V,name:U,disabled:I,validation:P,validationMode:G}=Ra(),W=OS({id:t}),L=I||h,Y=U??c,[Q,B]=yg({controlled:n,default:A?r??mD:r,name:"Select",state:"value"}),[ae,te]=yg({controlled:o,default:a,name:"Select",state:"open"}),me=C.useRef([]),Ce=C.useRef([]),Re=C.useRef(null),pe=C.useRef(null),Oe=C.useRef(0),Pe=C.useRef(null),Z=C.useRef([]),K=C.useRef(!1),ee=C.useRef(!1),Ee=C.useRef(null),he=C.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),_e=C.useRef(!1),{mounted:ue,setMounted:re,transitionStatus:ce}=oh(ae),{openMethod:oe,triggerProps:Ae,reset:Ne}=_te(ae),ve=Zr(()=>new fL({id:W,modal:y,multiple:A,itemToStringLabel:k,itemToStringValue:R,isItemEqualToValue:D,value:Q,open:ae,mounted:ue,transitionStatus:ce,items:w,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,$e=nt(ve,et.activeIndex),le=nt(ve,et.selectedIndex),we=nt(ve,et.triggerElement),be=nt(ve,et.positionerElement),Te=C.useMemo(()=>A&&Array.isArray(Q)&&Q.length===0?"":qu(Q,R),[A,Q,R]),je=C.useMemo(()=>A&&Array.isArray(Q)?Q.map(Ze=>qu(Ze,R)):qu(Q,R),[A,Q,R]),rt=Ar(ve.state.triggerElement);DS({id:W,commit:P.commit,value:Q,controlRef:rt,name:Y,getValue:()=>je});const Mt=C.useRef(Q);qe(()=>{Q!==Mt.current&&ve.set("forceMount",!0)},[ve,Q]),qe(()=>{V(A?Array.isArray(Q)&&Q.length>0:Q!=null)},[A,Q,V]),qe(function(){if(ae)return;const Ze=Z.current;if(A){const un=Array.isArray(Q)?Q:[];if(un.length===0){ve.set("selectedIndex",null);return}const Xt=un[un.length-1],cn=ld(Ze,Xt,D);ve.set("selectedIndex",cn===-1?null:cn);return}const zt=ld(Ze,Q,D);ve.set("selectedIndex",zt===-1?null:zt)},[A,ae,Q,Z,D,ve]),sL(Q,()=>{N(Y),F(Q!==q.initialValue),M()?P.commit(Q):P.commit(Q,!0)});const At=Ye((Ze,zt)=>{if(u==null||u(Ze,zt),!zt.isCanceled&&(te(Ze),!Ze&&(zt.reason===ky||zt.reason===PS)&&(j(!0),z(!1),G==="onBlur"&&P.commit(Q)),!Ze&&ve.state.activeIndex!==null)){const un=me.current[ve.state.activeIndex];queueMicrotask(()=>{un==null||un.setAttribute("tabindex","-1")})}}),Xe=Ye(()=>{re(!1),ve.set("activeIndex",null),Ne(),S==null||S(!1)});Ic({enabled:!b,open:ae,ref:Re,onComplete(){ae||Xe()}}),C.useImperativeHandle(b,()=>({unmount:Xe}),[Xe]);const gt=Ye((Ze,zt)=>{i==null||i(Ze,zt),!zt.isCanceled&&B(Ze)}),De=Ye(()=>{const Ze=ve.state.listElement||Re.current;if(!Ze)return;const zt=Ze.scrollTop,un=Ze.scrollTop+Ze.clientHeight,Xt=zt>1,cn=un<Ze.scrollHeight-1;ve.state.scrollUpArrowVisible!==Xt&&ve.set("scrollUpArrowVisible",Xt),ve.state.scrollDownArrowVisible!==cn&&ve.set("scrollDownArrowVisible",cn)}),We=mL({open:ae,onOpenChange:At,elements:{reference:we,floating:be}}),ot=Zte(We,{enabled:!p&&!L,event:"mousedown"}),Wt=tne(We,{bubbles:!1}),Et=xne(We,{enabled:!p&&!L,listRef:me,activeIndex:$e,selectedIndex:le,disabledIndices:mD,onNavigate(Ze){Ze===null&&!ae||ve.set("activeIndex",Ze)},focusItemOnHover:!1}),Mn=ioe(We,{enabled:!p&&!L&&(ae||!A),listRef:Ce,activeIndex:$e,selectedIndex:le,onMatch(Ze){ae?ve.set("activeIndex",Ze):gt(Z.current[Ze],en("none"))},onTypingChange(Ze){K.current=Ze}}),{getReferenceProps:gn,getFloatingProps:ln,getItemProps:on}=wne([ot,Wt,Et,Mn]),rr=C.useMemo(()=>xa(gn(),Ae,W?{id:W}:lr),[gn,Ae,W]);$ee(()=>{ve.update({popupProps:ln(),triggerProps:rr})}),qe(()=>{ve.update({id:W,modal:y,multiple:A,value:Q,open:ae,mounted:ue,transitionStatus:ce,popupProps:ln(),triggerProps:rr,items:w,itemToStringLabel:k,itemToStringValue:R,isItemEqualToValue:D,openMethod:oe})},[ve,W,y,A,Q,ae,ue,ce,ln,rr,w,k,R,D,oe]);const Ui=C.useMemo(()=>({store:ve,name:Y,required:g,disabled:L,readOnly:p,multiple:A,itemToStringLabel:k,itemToStringValue:R,highlightItemOnHover:T,setValue:gt,setOpen:At,listRef:me,popupRef:Re,scrollHandlerRef:pe,handleScrollArrowVisibility:De,scrollArrowsMountedCountRef:Oe,getItemProps:on,events:We.context.events,valueRef:Pe,valuesRef:Z,labelsRef:Ce,typingRef:K,selectionRef:he,selectedItemTextRef:Ee,validation:P,onOpenChangeComplete:S,keyboardActiveRef:ee,alignItemWithTriggerActiveRef:_e,initialValueRef:Mt}),[ve,Y,g,L,p,A,k,R,T,gt,At,on,We.context.events,P,S,De]),_i=Nl(v,P.inputRef),Ai=A&&Array.isArray(Q)&&Q.length>0,Pn=C.useMemo(()=>!A||!Array.isArray(Q)||!Y?null:Q.map(Ze=>{const zt=qu(Ze,R);return _.jsx("input",{type:"hidden",name:Y,value:zt},zt)}),[A,Q,Y,R]);return _.jsx(g6.Provider,{value:Ui,children:_.jsxs(y6.Provider,{value:We,children:[$,_.jsx("input",{...P.getInputValidationProps({onFocus(){var Ze;(Ze=ve.state.triggerElement)==null||Ze.focus({focusVisible:!0})},onChange(Ze){if(Ze.nativeEvent.defaultPrevented)return;const zt=Ze.target.value,un=en(Uc,Ze.nativeEvent);function Xt(){if(A)return;const cn=Z.current.find(po=>qu(po,R).toLowerCase()===zt.toLowerCase());cn!=null&&(F(cn!==q.initialValue),gt(cn,un),M()&&P.commit(cn))}ve.set("forceMount",!0),queueMicrotask(Xt)}}),name:A?void 0:Y,autoComplete:f,value:Te,disabled:L,required:g&&!Ai,readOnly:p,ref:_i,style:Y?YN:gy,tabIndex:-1,"aria-hidden":!0}),Pn]})})}const nm=2,foe=400,ZD=200,doe={...Jne,...Aa,value:()=>null},hoe=C.forwardRef(function(e,t){const{render:n,className:r,id:i,disabled:o=!1,nativeButton:a=!0,...u}=e,{setTouched:c,setFocused:f,validationMode:h,state:p,disabled:g}=Ra(),{labelId:y}=ls(),{store:b,setOpen:v,selectionRef:S,validation:w,readOnly:A,required:k,alignItemWithTriggerActiveRef:R,disabled:D,keyboardActiveRef:T}=us(),$=g||D||o,N=nt(b,et.open),F=nt(b,et.value),j=nt(b,et.triggerProps),z=nt(b,et.positionerElement),M=nt(b,et.listElement),q=nt(b,et.id),V=nt(b,et.hasSelectedValue),U=!V&&N,I=nt(b,et.hasNullItemLabel,U),P=i??q;OS({id:P});const G=Ar(z),W=C.useRef(null),{getButtonProps:L,buttonRef:Y}=QS({disabled:$,native:a}),Q=Ye(Pe=>{b.set("triggerElement",Pe)}),B=Nl(t,W,Y,Q),ae=Dr(),te=Dr(),me=Dr(),Ce=Dr();C.useEffect(()=>{if(N)return V||I?Ce.start(ZD,()=>{S.current.allowUnselectedMouseUp=!0,me.start(ZD,()=>{S.current.allowSelectedMouseUp=!0})}):me.start(foe,()=>{S.current.allowUnselectedMouseUp=!0,S.current.allowSelectedMouseUp=!0}),()=>{me.clear(),Ce.clear()};S.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},te.clear()},[N,V,I,S,te,me,Ce]);const Re=C.useMemo(()=>{var Pe;return(M==null?void 0:M.id)??((Pe=vg(z))==null?void 0:Pe.id)},[M,z]),pe=xa(j,{id:P,role:"combobox","aria-expanded":N?"true":"false","aria-haspopup":"listbox","aria-controls":N?Re:void 0,"aria-labelledby":y,"aria-readonly":A||void 0,"aria-required":k||void 0,tabIndex:$?-1:0,ref:B,onFocus(Pe){f(!0),N&&R.current&&v(!1,en(Uc,Pe.nativeEvent)),ae.start(0,()=>{b.set("forceMount",!0)})},onBlur(Pe){Gt(z,Pe.relatedTarget)||(c(!0),f(!1),h==="onBlur"&&w.commit(F))},onPointerMove(){T.current=!1},onKeyDown(){T.current=!0},onMouseDown(Pe){if(N)return;const Z=Zt(Pe.currentTarget);function K(ee){if(!W.current)return;const Ee=ee.target;if(Gt(W.current,Ee)||Gt(G.current,Ee)||Ee===W.current)return;const he=roe(W.current);ee.clientX>=he.left-nm&&ee.clientX<=he.right+nm&&ee.clientY>=he.top-nm&&ee.clientY<=he.bottom+nm||v(!1,en(Kte,ee))}te.start(0,()=>{Z.addEventListener("mouseup",K,{once:!0})})}},w.getValidationProps,u,L);pe.role="combobox";const Oe={...p,open:N,disabled:$,value:F,readOnly:A,placeholder:!V};return qn("button",e,{ref:[t,W],state:Oe,stateAttributesMapping:doe,props:pe})}),v6=({size:e,ghost:t,fullwidth:n,before:r,after:i,className:o,children:a,...u})=>{const c=!!(r||i);return _.jsxs(hoe,{"data-slot":"select-trigger",render:_.jsx("button",{}),className:Ie(zi["select-trigger"],c&&zi["select-trigger-slots"],Yr.input,Ay({size:e,ghost:t,fullwidth:n}),o),...u,children:[r&&_.jsx("span",{"data-slot":"select-before",className:zi["select-slot"],children:r}),a,i&&_.jsx("span",{"data-slot":"select-after",className:zi["select-slot"],children:i})]})};v6.displayName="SelectTrigger";const poe={value:()=>null},moe=C.forwardRef(function(e,t){const{className:n,render:r,children:i,placeholder:o,...a}=e,{store:u,valueRef:c}=us(),f=nt(u,et.value),h=nt(u,et.items),p=nt(u,et.itemToStringLabel),g=nt(u,et.hasSelectedValue),y=!g&&o!=null&&i==null,b=nt(u,et.hasNullItemLabel,y),v={value:f,placeholder:!g};let S=null;return typeof i=="function"?S=i(f):i!=null?S=i:!g&&o!=null&&!b?S=o:Array.isArray(f)?S=Bee(f,h,p):S=XN(f,h,p),qn("span",e,{state:v,ref:[t,c],props:[{children:S},a],stateAttributesMapping:poe})}),x6=({size:e,className:t,...n})=>_.jsx(moe,{"data-slot":"select-value",render:_.jsx(ze,{pl:0}),className:Ie(zi["select-value"],Yr.input,Ay({size:e}),t),...n});x6.displayName="SelectValue";const goe=C.forwardRef(function(e,t){const{className:n,render:r,...i}=e,{store:o}=us(),a={open:nt(o,et.open)};return qn("span",e,{state:a,ref:t,props:[{"aria-hidden":!0,children:"▼"},i],stateAttributesMapping:Zne})}),w6=({className:e,...t})=>_.jsx(goe,{"data-slot":"select-icon",render:_.jsx(OU,{}),className:Ie(zi["select-icon"],e),...t});w6.displayName="SelectIndicator";const yoe=C.createContext(void 0),boe=C.forwardRef(function(e,t){const{store:n}=us(),r=nt(n,et.mounted),i=nt(n,et.forceMount);return r||i?_.jsx(yoe.Provider,{value:!0,children:_.jsx(Ere,{ref:t,...e})}):null}),S6=({children:e,...t})=>_.jsx(boe,{"data-slot":"select-portal",...t,children:e});S6.displayName="SelectPortal";const C6=C.createContext(void 0);function ZS(){const e=C.useContext(C6);if(!e)throw new Error(Bi(59));return e}function Mg(e,t){e&&Object.assign(e.style,t)}const E6={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},voe={position:"fixed"},xoe=C.forwardRef(function(e,t){const{anchor:n,positionMethod:r="absolute",className:i,render:o,side:a="bottom",align:u="center",sideOffset:c=0,alignOffset:f=0,collisionBoundary:h="clipping-ancestors",collisionPadding:p,arrowPadding:g=5,sticky:y=!1,disableAnchorTracking:b,alignItemWithTrigger:v=!0,collisionAvoidance:S=ire,...w}=e,{store:A,listRef:k,labelsRef:R,alignItemWithTriggerActiveRef:D,selectedItemTextRef:T,valuesRef:$,initialValueRef:N,popupRef:F,setValue:j}=us(),z=b6(),M=nt(A,et.open),q=nt(A,et.mounted),V=nt(A,et.modal),U=nt(A,et.value),I=nt(A,et.openMethod),P=nt(A,et.positionerElement),G=nt(A,et.triggerElement),W=nt(A,et.isItemEqualToValue),L=nt(A,et.transitionStatus),Y=C.useRef(null),Q=C.useRef(null),[B,ae]=C.useState(v),te=q&&B&&I!=="touch";!q&&B!==v&&ae(v),qe(()=>{q||(et.scrollUpArrowVisible(A.state)&&A.set("scrollUpArrowVisible",!1),et.scrollDownArrowVisible(A.state)&&A.set("scrollDownArrowVisible",!1))},[A,q]),C.useImperativeHandle(D,()=>te),Mre((te||V)&&M&&I!=="touch",G);const me=kie({anchor:n,floatingRootContext:z,positionMethod:r,mounted:q,side:a,sideOffset:c,align:u,alignOffset:f,arrowPadding:g,collisionBoundary:h,collisionPadding:p,sticky:y,disableAnchorTracking:b??te,collisionAvoidance:S,keepMounted:!0}),Ce=te?"none":me.side,Re=te?voe:me.positionerStyles,pe=C.useMemo(()=>{const he={};return M||(he.pointerEvents="none"),{role:"presentation",hidden:!q,style:{...Re,...he}}},[M,q,Re]),Oe={open:M,side:Ce,align:me.align,anchorHidden:me.anchorHidden},Pe=Ye(he=>{A.set("positionerElement",he)}),Z=qn("div",e,{ref:[t,Pe],state:Oe,stateAttributesMapping:AL,props:[pe,XL(L),w]}),K=C.useRef(0),ee=Ye(he=>{if(he.size===0&&K.current===0||$.current.length===0)return;const _e=K.current;if(K.current=he.size,he.size===_e)return;const ue=en(Uc);if(_e!==0&&!A.state.multiple&&U!==null&&ld($.current,U,W)===-1){const re=N.current,ce=re!=null&&ld($.current,re,W)!==-1?re:null;j(ce,ue),ce===null&&(A.set("selectedIndex",null),T.current=null)}if(_e!==0&&A.state.multiple&&Array.isArray(U)){const re=oe=>ld($.current,oe,W)!==-1,ce=U.filter(oe=>re(oe));(ce.length!==U.length||ce.some(oe=>!zee(U,oe,W)))&&(j(ce,ue),ce.length===0&&(A.set("selectedIndex",null),T.current=null))}if(M&&te){A.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const re={height:""};Mg(P,re),Mg(F.current,re)}}),Ee=C.useMemo(()=>({...me,side:Ce,alignItemWithTriggerActive:te,setControlledAlignItemWithTrigger:ae,scrollUpArrowRef:Y,scrollDownArrowRef:Q}),[me,Ce,te,ae]);return _.jsx(Pie,{elementsRef:k,labelsRef:R,onMapChange:ee,children:_.jsxs(C6.Provider,{value:Ee,children:[q&&V&&_.jsx(_ie,{inert:kre(!M),cutout:G}),Z]})})}),k6=C.forwardRef(function(e,t){const{render:n,className:r,direction:i,keepMounted:o=!1,...a}=e,{store:u,popupRef:c,listRef:f,handleScrollArrowVisibility:h,scrollArrowsMountedCountRef:p}=us(),{side:g,scrollDownArrowRef:y,scrollUpArrowRef:b}=ZS(),v=i==="up"?et.scrollUpArrowVisible:et.scrollDownArrowVisible,S=nt(u,v),w=nt(u,et.openMethod),A=S&&w!=="touch",k=Dr(),R=i==="up"?b:y,{transitionStatus:D,setMounted:T}=oh(A);qe(()=>(p.current+=1,u.state.hasScrollArrows||u.set("hasScrollArrows",!0),()=>{p.current=Math.max(0,p.current-1),p.current===0&&u.state.hasScrollArrows&&u.set("hasScrollArrows",!1)}),[u,p]),Ic({open:A,ref:R,onComplete(){A||T(!1)}});const $=qn("div",e,{ref:[t,R],state:{direction:i,visible:A,side:g,transitionStatus:D},props:[{"aria-hidden":!0,children:i==="up"?"▲":"▼",style:{position:"absolute"},onMouseMove(N){if(N.movementX===0&&N.movementY===0||k.isStarted())return;u.set("activeIndex",null);function F(){var q;const j=u.state.listElement??c.current;if(!j)return;u.set("activeIndex",null),h();const z=j.scrollTop===0,M=Math.round(j.scrollTop+j.clientHeight)>=j.scrollHeight;if(f.current.length===0&&(i==="up"?u.set("scrollUpArrowVisible",!z):u.set("scrollDownArrowVisible",!M)),i==="up"&&z||i==="down"&&M){k.clear();return}if((u.state.listElement||c.current)&&f.current&&f.current.length>0){const V=f.current,U=((q=R.current)==null?void 0:q.offsetHeight)||0;if(i==="up"){let I=0;const P=j.scrollTop+U;for(let W=0;W<V.length;W+=1){const L=V[W];if(L&&L.offsetTop>=P){I=W;break}}const G=Math.max(0,I-1);if(G<I){const W=V[G];W&&(j.scrollTop=Math.max(0,W.offsetTop-U))}else j.scrollTop=0}else{let I=V.length-1;const P=j.scrollTop+j.clientHeight-U;for(let W=0;W<V.length;W+=1){const L=V[W];if(L&&L.offsetTop+L.offsetHeight>P){I=Math.max(0,W-1);break}}const G=Math.min(V.length-1,I+1);if(G>I){const W=V[G];W&&(j.scrollTop=W.offsetTop+W.offsetHeight-j.clientHeight+U)}else j.scrollTop=j.scrollHeight-j.clientHeight}}k.start(40,F)}k.start(40,F)},onMouseLeave(){k.clear()}},a]});return A||o?$:null}),woe=C.forwardRef(function(e,t){return _.jsx(k6,{...e,ref:t,direction:"up"})}),Soe=C.forwardRef(function(e,t){return _.jsx(k6,{...e,ref:t,direction:"down"})}),_6=({children:e,className:t,...n})=>_.jsxs(xoe,{"data-slot":"select-positioner",className:Ie(zi["select-positioner"],t),sideOffset:4,...n,children:[_.jsx(woe,{"data-slot":"select-scroll-up-arrow"}),e,_.jsx(Soe,{"data-slot":"select-scroll-down-arrow"})]});_6.displayName="SelectPositioner";function A6(e){const t=e.currentTarget.getBoundingClientRect();return t.top+1<=e.clientY&&e.clientY<=t.bottom-1&&t.left+1<=e.clientX&&e.clientX<=t.right-1}const rm="base-ui-disable-scrollbar",lw={className:rm,getElement(e){return _.jsx("style",{nonce:e,href:rm,precedence:"base-ui:low",children:`.${rm}{scrollbar-width:none}.${rm}::-webkit-scrollbar{display:none}`})}},Coe=C.createContext(void 0);function Eoe(e){return C.useContext(Coe)}const koe=C.createContext(void 0),_oe={disableStyleElements:!1};function Aoe(){return C.useContext(koe)??_oe}const tl=1,Roe={...AL,...by},Doe=C.forwardRef(function(e,t){const{render:n,className:r,finalFocus:i,...o}=e,{store:a,popupRef:u,onOpenChangeComplete:c,setOpen:f,valueRef:h,selectedItemTextRef:p,keyboardActiveRef:g,multiple:y,handleScrollArrowVisibility:b,scrollHandlerRef:v,highlightItemOnHover:S}=us(),{side:w,align:A,alignItemWithTriggerActive:k,setControlledAlignItemWithTrigger:R,scrollDownArrowRef:D,scrollUpArrowRef:T}=ZS(),$=Eoe()!=null,N=b6(),{nonce:F,disableStyleElements:j}=Aoe(),z=Dr(),M=nt(a,et.id),q=nt(a,et.open),V=nt(a,et.mounted),U=nt(a,et.popupProps),I=nt(a,et.transitionStatus),P=nt(a,et.triggerElement),G=nt(a,et.positionerElement),W=nt(a,et.listElement),L=C.useRef(0),Y=C.useRef(!1),Q=C.useRef(0),B=C.useRef(!1),ae=C.useRef({}),te=yy(),me=Ye(Oe=>{if(!G||!u.current||!B.current)return;if(Y.current||!k){b();return}const Pe=G.style.top==="0px",Z=G.style.bottom==="0px",K=G.getBoundingClientRect().height,ee=Zt(G),Ee=getComputedStyle(G),he=parseFloat(Ee.marginTop),_e=parseFloat(Ee.marginBottom),ue=JD(getComputedStyle(u.current)),re=Math.min(ee.documentElement.clientHeight-he-_e,ue),ce=Oe.scrollTop,oe=eT(Oe);let Ae=0,Ne=null,ve=!1,$e=!1;const le=be=>{G.style.height=`${be}px`},we=(be,Te)=>{const je=p1(be,0,re-K);je>0&&le(K+je),Oe.scrollTop=Te,re-(K+je)<=tl&&(Y.current=!0),b()};if(Pe){const be=oe-ce,Te=K+be,je=Math.min(Te,re);if(Ae=je,be<=tl){we(be,oe);return}re-je>tl?$e=!0:ve=!0}else if(Z){const be=ce,Te=K+be,je=Math.min(Te,re),rt=Te-re;if(Ae=je,be<=tl){we(be,0);return}re-je>tl?Ne=0:(ve=!0,ce<oe&&(Ne=ce-(be-rt)))}if(Ae=Math.ceil(Ae),Ae!==0&&le(Ae),$e||Ne!=null){const be=eT(Oe),Te=$e?be:p1(Ne,0,be);Math.abs(Oe.scrollTop-Te)>tl&&(Oe.scrollTop=Te)}(ve||Ae>=re-tl)&&(Y.current=!0),b()});C.useImperativeHandle(v,()=>me,[me]),Ic({open:q,ref:u,onComplete(){q&&(c==null||c(!0))}});const Ce={open:q,transitionStatus:I,side:w,align:A};qe(()=>{!G||!u.current||Object.keys(ae.current).length||(ae.current={top:G.style.top||"0",left:G.style.left||"0",right:G.style.right,height:G.style.height,bottom:G.style.bottom,minHeight:G.style.minHeight,maxHeight:G.style.maxHeight,marginTop:G.style.marginTop,marginBottom:G.style.marginBottom})},[u,G]),qe(()=>{q||k||(B.current=!1,Y.current=!1,L.current=0,Q.current=0,Mg(G,ae.current))},[q,k,G,u]),qe(()=>{const Oe=u.current;if(!(!q||!P||!G||!Oe||a.state.transitionStatus==="ending")){if(!k){B.current=!0,te.request(b),Oe.style.removeProperty("--transform-origin");return}queueMicrotask(()=>{var Z;const Pe=Toe(Oe);Oe.style.removeProperty("--transform-origin");try{const K=getComputedStyle(G),ee=getComputedStyle(Oe),Ee=Zt(P),he=Tn(G),_e=P.getBoundingClientRect(),ue=G.getBoundingClientRect(),re=_e.left,ce=_e.height,oe=W||Oe,Ae=oe.scrollHeight,Ne=parseFloat(ee.borderBottomWidth),ve=parseFloat(K.marginTop)||10,$e=parseFloat(K.marginBottom)||10,le=parseFloat(K.minHeight)||100,we=JD(ee),be=5,Te=5,je=20,rt=Ee.documentElement.clientHeight-ve-$e,Mt=Ee.documentElement.clientWidth,At=rt-_e.bottom+ce,Xe=p.current,gt=h.current;let De,We=0,ot=0;if(Xe&>){const Ze=gt.getBoundingClientRect();De=Xe.getBoundingClientRect();const zt=Ze.left-re,un=De.left-ue.left,Xt=Ze.top-_e.top+Ze.height/2,cn=De.top-ue.top+De.height/2;We=zt-un,ot=cn-Xt}const Wt=At+ot+$e+Ne;let Et=Math.min(rt,Wt);const Mn=rt-ve-$e,gn=Wt-Et,ln=Math.max(be,re+We),on=Mt-Te,rr=Math.max(0,ln+ue.width-on);G.style.left=`${ln-rr}px`,G.style.height=`${Et}px`,G.style.maxHeight="auto",G.style.marginTop=`${ve}px`,G.style.marginBottom=`${$e}px`,Oe.style.height="100%";const Ui=oe.scrollHeight-oe.clientHeight,_i=gn>=Ui;_i&&(Et=Math.min(rt,ue.height)-(gn-Ui));const Ai=_e.top<je||_e.bottom>rt-je||Et<Math.min(Ae,le),Pn=(((Z=he.visualViewport)==null?void 0:Z.scale)??1)!==1&&NS;if(Ai||Pn){B.current=!0,Mg(G,ae.current),tr.flushSync(()=>R(!1));return}if(_i){const Ze=Math.max(0,rt-Wt);G.style.top=ue.height>=Mn?"0":`${Ze}px`,G.style.height=`${Et}px`,oe.scrollTop=oe.scrollHeight-oe.clientHeight,L.current=Math.max(le,Et)}else G.style.bottom="0",L.current=Math.max(le,Et),oe.scrollTop=gn;if(De){const Ze=ue.top,zt=ue.height,un=De.top+De.height/2,Xt=zt>0?(un-Ze)/zt*100:50,cn=p1(Xt,0,100);Oe.style.setProperty("--transform-origin",`50% ${cn}%`)}(L.current===rt||Et>=we)&&(Y.current=!0),b(),setTimeout(()=>{B.current=!0})}finally{Pe()}})}},[a,q,G,P,h,p,u,b,k,R,te,D,T,W]),C.useEffect(()=>{if(!k||!G||!q)return;const Oe=Tn(G);function Pe(Z){f(!1,en(Qte,Z))}return Oe.addEventListener("resize",Pe),()=>{Oe.removeEventListener("resize",Pe)}},[f,k,G,q]);const Re={...W?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":y||void 0,id:`${M}-list`},onKeyDown(Oe){g.current=!0,$&&loe.has(Oe.key)&&Oe.stopPropagation()},onMouseMove(){g.current=!1},onPointerLeave(Oe){if(!S||A6(Oe)||Oe.pointerType==="touch")return;const Pe=Oe.currentTarget;z.start(0,()=>{a.set("activeIndex",null),Pe.focus({preventScroll:!0})})},onScroll(Oe){W||me(Oe.currentTarget)},...k&&{style:W?{height:"100%"}:E6}},pe=qn("div",e,{ref:[t,u],state:Ce,stateAttributesMapping:Roe,props:[U,Re,XL(I),{className:!W&&k?lw.className:void 0},o]});return _.jsxs(C.Fragment,{children:[!j&&lw.getElement(F),_.jsx(Nie,{context:N,modal:!1,disabled:!V,returnFocus:i,restoreFocus:!0,children:pe})]})});function JD(e){const t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}function eT(e){return Math.max(0,e.scrollHeight-e.clientHeight)}const tT=[["transform","none"],["scale","1"],["translate","0 0"]];function Toe(e){const{style:t}=e,n={};for(const[r,i]of tT)n[r]=t.getPropertyValue(r),t.setProperty(r,i,"important");return()=>{for(const[r]of tT){const i=n[r];i?t.setProperty(r,i):t.removeProperty(r)}}}const R6=({children:e,className:t,...n})=>_.jsx(Doe,{"data-slot":"select-popup",render:_.jsx(an,{p:2,gap:0,fullwidth:!0}),className:Ie(zi["select-popup"],t),...n,children:e});R6.displayName="SelectPopup";const $oe=C.forwardRef(function(e,t){const{className:n,render:r,...i}=e,{store:o,scrollHandlerRef:a}=us(),{alignItemWithTriggerActive:u}=ZS(),c=nt(o,et.hasScrollArrows),f=nt(o,et.openMethod),h=nt(o,et.multiple),p={id:`${nt(o,et.id)}-list`,role:"listbox","aria-multiselectable":h||void 0,onScroll(y){var b;(b=a.current)==null||b.call(a,y.currentTarget)},...u&&{style:E6},className:c&&f!=="touch"?lw.className:void 0},g=Ye(y=>{o.set("listElement",y)});return qn("div",e,{ref:[t,g],props:[p,i]})}),D6=({children:e,...t})=>_.jsx($oe,{"data-slot":"select-list",render:_.jsx(zl,{fullwidth:!0}),style:{listStyleType:"none",...t.style},...t,children:e});D6.displayName="SelectList";const T6=C.createContext(void 0);function $6(){const e=C.useContext(T6);if(!e)throw new Error(Bi(57));return e}const Moe=C.memo(C.forwardRef(function(e,t){const{render:n,className:r,value:i=null,label:o,disabled:a=!1,nativeButton:u=!1,...c}=e,f=C.useRef(null),h=Uie({label:o,textRef:f,indexGuessBehavior:n6.GuessFromOrder}),{store:p,getItemProps:g,setOpen:y,setValue:b,selectionRef:v,typingRef:S,valuesRef:w,keyboardActiveRef:A,multiple:k,highlightItemOnHover:R}=us(),D=Dr(),T=nt(p,et.isActive,h.index),$=nt(p,et.isSelected,h.index,i),N=nt(p,et.isSelectedByFocus,h.index),F=nt(p,et.isItemEqualToValue),j=h.index,z=j!==-1,M=C.useRef(null),q=Ar(j);qe(()=>{if(!z)return;const te=w.current;return te[j]=i,()=>{delete te[j]}},[z,j,i,w]),qe(()=>{if(!z)return;const te=p.state.value;let me=te;k&&Array.isArray(te)&&te.length>0&&(me=te[te.length-1]),me!==void 0&&kc(i,me,F)&&p.set("selectedIndex",j)},[z,j,k,F,p,i]);const V={disabled:a,selected:$,highlighted:T},U=g({active:T,selected:$});U.onFocus=void 0,U.id=void 0;const I=C.useRef(null),P=C.useRef("mouse"),G=C.useRef(!1),{getButtonProps:W,buttonRef:L}=QS({disabled:a,focusableWhenDisabled:!0,native:u});function Y(te){const me=p.state.value;if(k){const Ce=Array.isArray(me)?me:[],Re=$?Pee(Ce,i,F):[...Ce,i];b(Re,en(s1,te))}else b(i,en(s1,te)),y(!1,en(s1,te))}const Q={role:"option","aria-selected":$,tabIndex:T?0:-1,onFocus(){p.set("activeIndex",j)},onMouseEnter(){!A.current&&p.state.selectedIndex===null&&R&&p.set("activeIndex",j)},onMouseMove(){R&&p.set("activeIndex",j)},onMouseLeave(te){!R||A.current||A6(te)||D.start(0,()=>{p.state.activeIndex===j&&p.set("activeIndex",null)})},onTouchStart(){v.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(te){I.current=te.key,p.set("activeIndex",j)},onClick(te){G.current=!1,!(te.type==="keydown"&&I.current===null)&&(a||I.current===" "&&S.current||P.current!=="touch"&&!T||(I.current=null,Y(te.nativeEvent)))},onPointerEnter(te){P.current=te.pointerType},onPointerDown(te){P.current=te.pointerType,G.current=!0},onMouseUp(te){if(a)return;if(G.current){G.current=!1;return}const me=!v.current.allowSelectedMouseUp&&$,Ce=!v.current.allowUnselectedMouseUp&&!$;me||Ce||P.current!=="touch"&&!T||Y(te.nativeEvent)}},B=qn("div",e,{ref:[L,t,h.ref,M],state:V,props:[U,Q,c,W]}),ae=C.useMemo(()=>({selected:$,indexRef:q,textRef:f,selectedByFocus:N,hasRegistered:z}),[$,q,f,N,z]);return _.jsx(T6.Provider,{value:ae,children:B})})),Ooe=C.forwardRef(function(e,t){const n=e.keepMounted??!1,{selected:r}=$6();return n||r?_.jsx(Noe,{...e,ref:t}):null}),Noe=C.memo(C.forwardRef((e,t)=>{const{render:n,className:r,keepMounted:i,...o}=e,{selected:a}=$6(),u=C.useRef(null),{transitionStatus:c,setMounted:f}=oh(a),h=qn("span",e,{ref:[t,u],state:{selected:a,transitionStatus:c},props:[{"aria-hidden":!0,children:"✔️"},o],stateAttributesMapping:by});return Ic({open:a,ref:u,onComplete(){a||f(!1)}}),h})),M6=({value:e,label:t,description:n,icon:r,...i})=>_.jsxs(Moe,{"data-slot":"select-item",value:e,label:t,className:zi["select-item"],...i,children:[_.jsx(lh,{render:_.jsx("div",{}),fullwidth:!0,label:t,description:n,icon:r}),_.jsx(Ooe,{"data-slot":"select-item-indicator",className:zi["select-item-indicator"],render:_.jsx(qg,{})})]});M6.displayName="SelectItem";const O6=({size:e=uoe,fullwidth:t,ghost:n,disabled:r,required:i,name:o,label:a,description:u,placeholder:c,before:f,after:h,items:p,defaultValue:g=[],RootProps:y,TriggerProps:b,PortalProps:v,PositionerProps:S,PopupProps:w,ListProps:A,ValueProps:k,IndicatorProps:R,FieldProps:D,children:T,...$})=>{const N=C.useMemo(()=>{if(!p)return;const F=new Map(p.map(j=>[j.value,j.label]));return j=>F.get(j)??j},[p]);return _.jsx(Kr,{condition:!!(a||u),render:_.jsx(GS,{name:o,label:a,description:u,required:i,...D}),children:_.jsxs(coe,{"data-slot":"select-multiple-root",name:o,multiple:!0,defaultValue:g,items:p,itemToStringLabel:N,...$,...y,children:[_.jsxs(v6,{size:e,fullwidth:t,ghost:n,disabled:r,before:f,after:h,...b,children:[_.jsx(x6,{size:e,...k,children:F=>F&&F.length>0?F.map(j=>(N==null?void 0:N(j))??j).join(", "):c?_.jsx("span",{className:zi["select-placeholder"],children:c}):null}),_.jsx(w6,{...R})]}),_.jsx(S6,{...v,children:_.jsx(_6,{...S,children:_.jsx(R6,{...w,children:_.jsx(D6,{...A,children:p?p.map(({label:F,value:j,disabled:z,description:M,icon:q})=>_.jsx(M6,{label:F,value:j,disabled:z||r,description:M,icon:q},j)):T})})})})]})})};O6.displayName="SelectMultiple";function JS({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 nT={};function Rc(e,t){const n=C.useRef(nT);return n.current===nT&&(n.current=e(t)),n}const m1=wa[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Loe=m1&&m1!==C.useLayoutEffect?m1:e=>e();function Zn(e){const t=Rc(joe).current;return t.next=e,Loe(t.effect),t.trampoline}function joe(){const e={next:void 0,callback:zoe,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function zoe(){}const Poe=()=>{},ur=typeof document<"u"?C.useLayoutEffect:Poe,N6=C.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function Ioe(){return C.useContext(N6)}function L6(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,o=Zn(i),a=C.useRef(0),u=Rc(Boe).current,c=Rc(Foe).current,[f,h]=C.useState(0),p=C.useRef(f),g=Zn((w,A)=>{c.set(w,A??null),p.current+=1,h(p.current)}),y=Zn(w=>{c.delete(w),p.current+=1,h(p.current)}),b=C.useMemo(()=>{const w=new Map;return Array.from(c.keys()).filter(k=>k.isConnected).sort(Uoe).forEach((k,R)=>{const D=c.get(k)??{};w.set(k,{...D,index:R})}),w},[c,f]);ur(()=>{if(typeof MutationObserver!="function"||b.size===0)return;const w=new MutationObserver(A=>{const k=new Set,R=D=>k.has(D)?k.delete(D):k.add(D);A.forEach(D=>{D.removedNodes.forEach(R),D.addedNodes.forEach(R)}),k.size===0&&(p.current+=1,h(p.current))});return b.forEach((A,k)=>{k.parentElement&&w.observe(k.parentElement,{childList:!0})}),()=>{w.disconnect()}},[b]),ur(()=>{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]),ur(()=>()=>{n.current=[]},[n]),ur(()=>()=>{r&&(r.current=[])},[r]);const v=Zn(w=>(u.add(w),()=>{u.delete(w)}));ur(()=>{u.forEach(w=>w(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 _.jsx(N6.Provider,{value:S,children:t})}function Foe(){return new Map}function Boe(){return new Set}function Uoe(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 Hoe=C.createContext(void 0);function j6(){const e=C.useContext(Hoe);return(e==null?void 0:e.direction)??"ltr"}function uh(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 Og(e,t,n,r){const i=Rc(z6).current;return Goe(i,e,t,n,r)&&P6(i,[e,t,n,r]),i.callback}function qoe(e){const t=Rc(z6).current;return Voe(t,e)&&P6(t,e),t.callback}function z6(){return{callback:null,cleanup:null,refs:[]}}function Goe(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function Voe(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function P6(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 Yoe=parseInt(C.version,10);function I6(e){return Yoe>=e}function rT(e){if(!C.isValidElement(e))return null;const t=e,n=t.props;return(I6(19)?n==null?void 0:n.ref:t.ref)??null}function uw(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Woe(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 Xoe(e,t){return typeof e=="function"?e(t):e}function Koe(e,t){return typeof e=="function"?e(t):e}const pd={};function F6(e,t,n,r,i){let o={...cw(e,pd)};return t&&(o=Om(o,t)),n&&(o=Om(o,n)),r&&(o=Om(o,r)),o}function Qoe(e){if(e.length===0)return pd;if(e.length===1)return cw(e[0],pd);let t={...cw(e[0],pd)};for(let n=1;n<e.length;n+=1)t=Om(t,e[n]);return t}function Om(e,t){return B6(t)?t(e):Zoe(e,t)}function Zoe(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=uw(e.style,r);break}case"className":{e[n]=U6(e.className,r);break}default:Joe(n,r)?e[n]=ese(e[n],r):e[n]=r}}return e}function Joe(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 B6(e){return typeof e=="function"}function cw(e,t){return B6(e)?e(t):e??pd}function ese(e,t){return t?e?n=>{if(tse(n)){const i=n;fw(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 fw(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function U6(e,t){return t?e?t+" "+e:t:e}function tse(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}const Pd=Object.freeze([]),Yo=Object.freeze({});function Ma(e,t,n={}){const r=t.render,i=nse(t,n);if(n.enabled===!1)return null;const o=n.state??Yo;return ise(e,r,i,o)}function nse(e,t={}){const{className:n,style:r,render:i}=e,{state:o=Yo,ref:a,props:u,stateAttributesMapping:c,enabled:f=!0}=t,h=f?Xoe(n,o):void 0,p=f?Koe(r,o):void 0,g=f?Woe(o,c):Yo,y=f?uw(g,Array.isArray(u)?Qoe(u):u)??Yo:Yo;return typeof document<"u"&&(f?Array.isArray(a)?y.ref=qoe([y.ref,rT(i),...a]):y.ref=Og(y.ref,rT(i),a):Og(null,null)),f?(h!==void 0&&(y.className=U6(y.className,h)),p!==void 0&&(y.style=uw(y.style,p)),y):Yo}const rse=Symbol.for("react.lazy");function ise(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=F6(n,t.props);i.ref=n.ref;let o=t;return(o==null?void 0:o.$$typeof)===rse&&(o=C.Children.toArray(t)[0]),C.cloneElement(o,i)}if(e&&typeof e=="string")return ose(e,n);throw new Error(uh(8))}function ose(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 dw="none";function hw(e,t,n,r){let i=!1,o=!1;const a=r??Yo;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 sse={...wa};let iT=0;function ase(e,t="mui"){const[n,r]=C.useState(e),i=e||n;return C.useEffect(()=>{n==null&&(iT+=1,r(`${t}-${iT}`))},[n,t]),i}const oT=sse.useId;function lse(e,t){if(oT!==void 0){const n=oT();return e??`${t}-${n}`}return ase(e,t)}function eC(e){return lse(e,"base-ui")}const use=[];function H6(e){C.useEffect(e,use)}const im=null;class cse{constructor(){ie(this,"callbacks",[]);ie(this,"callbacksCount",0);ie(this,"nextId",1);ie(this,"startId",1);ie(this,"isScheduled",!1);ie(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 cse;class Fo{constructor(){ie(this,"currentId",im);ie(this,"cancel",()=>{this.currentId!==im&&(om.cancel(this.currentId),this.currentId=im)});ie(this,"disposeEffect",()=>this.cancel)}static create(){return new Fo}static request(t){return om.request(t)}static cancel(t){return om.cancel(t)}request(t){this.cancel(),this.currentId=om.request(()=>{this.currentId=im,t()})}}function fse(){const e=Rc(Fo.create).current;return H6(e.disposeEffect),e}function dse(e){return e==null?e:"current"in e?e.current:e}let tC=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const hse={[tC.startingStyle]:""},pse={[tC.endingStyle]:""},mse={transitionStatus(e){return e==="starting"?hse:e==="ending"?pse:null}};function gse(e,t=!1,n=!0){const r=fse();return Zn((i,o=null)=>{r.cancel();function a(){tr.flushSync(i)}const u=dse(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=tC.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 yse(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),ur(()=>{if(!e&&o&&r!=="ending"&&n){const u=Fo.request(()=>{i("ending")});return()=>{Fo.cancel(u)}}},[e,o,r,n]),ur(()=>{if(!e||t)return;const u=Fo.request(()=>{i(void 0)});return()=>{Fo.cancel(u)}},[t,e]),ur(()=>{if(!e||!t)return;e&&o&&r!=="idle"&&i("starting");const u=Fo.request(()=>{i("idle")});return()=>{Fo.cancel(u)}},[t,e,o,i,r]),C.useMemo(()=>({mounted:o,setMounted:a,transitionStatus:r}),[o,r])}let bse=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function q6(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}=Ioe(),g=C.useRef(-1),[y,b]=C.useState(o??(i===bse.GuessFromOrder?()=>{if(g.current===-1){const w=p.current;p.current+=1,g.current=w}return g.current}:-1)),v=C.useRef(null),S=C.useCallback(w=>{var A;if(v.current=w,y!==-1&&w!==null&&(f.current[y]=w,h)){const k=t!==void 0;h.current[y]=k?t:((A=r==null?void 0:r.current)==null?void 0:A.textContent)??w.textContent}},[y,f,h,t,r]);return ur(()=>{if(o!=null)return;const w=v.current;if(w)return a(w,n),()=>{u(w)}},[o,a,u,n]),ur(()=>{if(o==null)return c(w=>{var k;const A=v.current?(k=w.get(v.current))==null?void 0:k.index:null;A!=null&&b(A)})},[o,c,b]),C.useMemo(()=>({ref:S,index:y}),[y,S])}function vse(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}function G6(){return typeof window<"u"}function nC(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ty(e){return G6()?e instanceof HTMLElement||e instanceof nC(e).HTMLElement:!1}function xse(e){return!G6()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof nC(e).ShadowRoot}function wse(e){return nC(e).getComputedStyle(e)}const V6=C.createContext(void 0);function Y6(e=!1){const t=C.useContext(V6);if(t===void 0&&!e)throw new Error(uh(16));return t}function Sse(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 W6(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,o=C.useRef(null),a=Y6(!0)!==void 0,u=Zn(()=>{const g=o.current;return!!((g==null?void 0:g.tagName)==="A"&&(g!=null&&g.href))}),{props:c}=Sse({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:i}),f=C.useCallback(()=>{const g=o.current;Cse(g)&&a&&t&&c.disabled===void 0&&g.disabled&&(g.disabled=!1)},[t,c.disabled,a]);ur(f,[f]);const h=C.useCallback((g={})=>{const{onClick:y,onMouseDown:b,onKeyUp:v,onKeyDown:S,onPointerDown:w,...A}=g;return F6({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||(fw(R),S==null||S(R)),R.baseUIHandlerPrevented)return;const D=R.target===R.currentTarget&&!i&&!u()&&!t,T=R.key==="Enter",$=R.key===" ";D&&(($||T)&&R.preventDefault(),T&&(y==null||y(R)))},onKeyUp(R){t||(fw(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}w==null||w(R)}},i?void 0:{role:"button"},c,A)},[t,c,i,u]),p=Zn(g=>{o.current=g,f()});return{getButtonProps:h,buttonRef:p}}function Cse(e){return Ty(e)&&e.tagName==="BUTTON"}const g1="ArrowLeft",y1="ArrowRight",Ese="ArrowUp",kse="ArrowDown";function _se(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 Ase(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&&xse(n)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function Lu(e){e.preventDefault(),e.stopPropagation()}const sT=Math.round,aT=Math.floor;function sm(e,t,n){return Math.floor(e/t)!==n}function Nm(e,t){return t<0||t>=e.current.length}function Rse(e,t){return Ur(e,{disabledIndices:t})}function Dse(e,t){return Ur(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Ur(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&&md(e,o,r));return o}function Tse(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 w=null,A=-1;e.current.forEach((k,R)=>{if(k==null)return;const D=k.closest('[role="row"]');D&&(b=!0),(D!==w||A===-1)&&(w=D,A+=1,g[A]=[]),g[A].push(R),y[R]=A})}const v=b&&g.length>0&&g.some(w=>w.length!==o);function S(w){if(!v||f===-1)return;const A=y[f];if(A==null)return;const k=g[A].indexOf(f);let R=w==="up"?A-1:A+1;r&&(R<0?R=g.length-1:R>=g.length&&(R=0));const D=new Set;for(;R>=0&&R<g.length&&!D.has(R);){D.add(R);const T=g[R];if(T.length===0){R=w==="up"?R-1:R+1;continue}const $=Math.min(k,T.length-1);for(let N=$;N>=0;N-=1){const F=T[N];if(!md(e,F,a))return F}R=w==="up"?R-1:R+1,r&&(R<0?R=g.length-1:R>=g.length&&(R=0))}}if(t.key===Ese){const w=S("up");if(w!==void 0)h&&Lu(t),p=w;else{if(h&&Lu(t),f===-1)p=c;else if(p=Ur(e,{startingIndex:p,amount:o,decrement:!0,disabledIndices:a}),r&&(f-o<u||p<0)){const A=f%o,k=c%o,R=c-(k-A);k===A?p=c:p=k>A?R:R-o}Nm(e,p)&&(p=f)}}if(t.key===kse){const w=S("down");w!==void 0?(h&&Lu(t),p=w):(h&&Lu(t),f===-1?p=u:(p=Ur(e,{startingIndex:f,amount:o,disabledIndices:a}),r&&f+o>c&&(p=Ur(e,{startingIndex:f%o-o,amount:o,disabledIndices:a}))),Nm(e,p)&&(p=f))}if(n==="both"){const w=aT(f/o);t.key===(i?g1:y1)&&(h&&Lu(t),f%o!==o-1?(p=Ur(e,{startingIndex:f,disabledIndices:a}),r&&sm(p,o,w)&&(p=Ur(e,{startingIndex:f-f%o-1,disabledIndices:a}))):r&&(p=Ur(e,{startingIndex:f-f%o-1,disabledIndices:a})),sm(p,o,w)&&(p=f)),t.key===(i?y1:g1)&&(h&&Lu(t),f%o!==0?(p=Ur(e,{startingIndex:f,decrement:!0,disabledIndices:a}),r&&sm(p,o,w)&&(p=Ur(e,{startingIndex:f+(o-f%o),decrement:!0,disabledIndices:a}))):r&&(p=Ur(e,{startingIndex:f+(o-f%o),decrement:!0,disabledIndices:a})),sm(p,o,w)&&(p=f));const A=aT(c/o)===w;Nm(e,p)&&(r&&A?p=t.key===(i?y1:g1)?c:Ur(e,{startingIndex:f-f%o-1,disabledIndices:a}):p=f)}return p}function $se(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 Mse(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 Ose(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function md(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}function lT(e){return(e==null?void 0:e.ownerDocument)||document}const gd="ArrowUp",Xu="ArrowDown",Ng="ArrowLeft",yd="ArrowRight",$y="Home",My="End",X6=new Set([Ng,yd]),Nse=new Set([Ng,yd,$y,My]),K6=new Set([gd,Xu]),Lse=new Set([gd,Xu,$y,My]),Q6=new Set([...X6,...K6]),jse=new Set([...Q6,$y,My]),zse="Shift",Pse="Control",Ise="Alt",Fse="Meta",Bse=new Set([zse,Pse,Ise,Fse]);function Use(e){return Ty(e)&&e.tagName==="INPUT"}function uT(e){return!!(Use(e)&&e.selectionStart!=null||Ty(e)&&e.tagName==="TEXTAREA")}function cT(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=fT(e,t,"left"),f=am(e),h=am(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=fT(e,t,"top"),f=am(e),h=am(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 fT(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 am(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}}function Hse(e){const{enabled:t=!0,open:n,ref:r,onComplete:i}=e,o=Zn(i),a=gse(r,n,!1);C.useEffect(()=>{if(!t)return;const u=new AbortController;return a(o,u.signal),()=>{u.abort()}},[t,n,o,a])}function qse(){const[,e]=C.useState({});return C.useCallback(()=>{e({})},[])}const Gse=C.createContext(void 0);function Vse(e){return C.useContext(Gse)}function Yse(e){return I6(19)?e:e?"true":void 0}function Z6(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=Y6(),{ref:i,index:o}=q6(e),a=n===o,u=C.useRef(null),c=Og(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 Wse(e){const{render:t,className:n,state:r=Yo,props:i=Pd,refs:o=Pd,metadata:a,stateAttributesMapping:u,tag:c="div",...f}=e,{compositeProps:h,compositeRef:p}=Z6({metadata:a});return Ma(c,e,{state:r,ref:[...o,p],props:[h,...i,f],stateAttributesMapping:u})}const J6=C.createContext(void 0);function Id(){const e=C.useContext(J6);if(e===void 0)throw new Error(uh(64));return e}let Xse=(function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e})({});const Oy={tabActivationDirection:e=>({[Xse.activationDirection]:e})},Kse=C.forwardRef(function(t,n){const{className:r,defaultValue:i=0,onValueChange:o,orientation:a="horizontal",render:u,value:c,...f}=t,h=j6(),p=Object.hasOwn(t,"defaultValue"),g=C.useRef([]),[y,b]=C.useState(()=>new Map),[v,S]=JS({controlled:c,default:i,name:"Tabs",state:"value"}),w=c!==void 0,[A,k]=C.useState(()=>new Map),[R,D]=C.useState("none"),T=Zn((P,G)=>{o==null||o(P,G),!G.isCanceled&&(S(P),D(G.activationDirection))}),$=Zn((P,G)=>{b(W=>{if(W.get(P)===G)return W;const L=new Map(W);return L.set(P,G),L})}),N=Zn((P,G)=>{b(W=>{if(!W.has(P)||W.get(P)!==G)return W;const L=new Map(W);return L.delete(P),L})}),F=C.useCallback(P=>y.get(P),[y]),j=C.useCallback(P=>{for(const G of A.values())if(P===(G==null?void 0:G.value))return G==null?void 0:G.id},[A]),z=C.useCallback(P=>{if(P===void 0)return null;for(const[G,W]of A.entries())if(W!=null&&P===(W.value??W.index))return G;return null},[A]),M=C.useMemo(()=>({direction:h,getTabElementBySelectedValue:z,getTabIdByPanelValue:j,getTabPanelIdByValue:F,onValueChange:T,orientation:a,registerMountedTabPanel:$,setTabMap:k,unregisterMountedTabPanel:N,tabActivationDirection:R,value:v}),[h,z,j,F,T,a,$,k,N,R,v]),q=C.useMemo(()=>{for(const P of A.values())if(P!=null&&P.value===v)return P},[A,v]),V=C.useMemo(()=>{for(const P of A.values())if(P!=null&&!P.disabled)return P.value},[A]);ur(()=>{if(w||A.size===0)return;const P=q==null?void 0:q.disabled,G=q==null&&v!==null;if(p&&P&&v===i||!P&&!G)return;const L=V??null;v!==L&&(S(L),D("none"))},[i,V,p,w,q,D,S,A,v]);const I=Ma("div",t,{state:{orientation:a,tabActivationDirection:R},ref:n,props:f,stateAttributesMapping:Oy});return _.jsx(J6.Provider,{value:M,children:_.jsx(L6,{elementsRef:g,children:I})})}),ej="data-composite-item-active",tj=C.createContext(void 0);function nj(){const e=C.useContext(tj);if(e===void 0)throw new Error(uh(65));return e}const Qse=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}=Id(),{activateOnFocus:y,highlightedTabIndex:b,onTabActivation:v,setHighlightedTabIndex:S,tabsListElement:w}=nj(),A=eC(u),k=C.useMemo(()=>({disabled:i,id:A,value:a}),[i,A,a]),{compositeProps:R,compositeRef:D,index:T}=Z6({metadata:k}),$=a===h,N=C.useRef(!1);ur(()=>{if(N.current){N.current=!1;return}if(!($&&T>-1&&b!==T))return;const W=w;if(W!=null){const L=_se(lT(W));if(L&&Ase(W,L))return}i||S(T)},[$,T,b,S,i,w]);const{getButtonProps:F,buttonRef:j}=W6({disabled:i,native:c,focusableWhenDisabled:!0}),z=p(a),M=C.useRef(!1),q=C.useRef(!1);function V(W){$||i||v(a,hw(dw,W.nativeEvent,void 0,{activationDirection:"none"}))}function U(W){$||(T>-1&&!i&&S(T),!i&&y&&(!M.current||M.current&&q.current)&&v(a,hw(dw,W.nativeEvent,void 0,{activationDirection:"none"})))}function I(W){if($||i)return;M.current=!0;function L(){M.current=!1,q.current=!1}(!W.button||W.button===0)&&(q.current=!0,lT(W.currentTarget).addEventListener("pointerup",L,{once:!0}))}return Ma("button",t,{state:{disabled:i,active:$,orientation:g},ref:[n,j,D],props:[R,{role:"tab","aria-controls":z,"aria-selected":$,id:A,onClick:V,onFocus:U,onPointerDown:I,[ej]:$?"":void 0,onKeyDownCapture(){N.current=!0}},f,F]})});function dT(e){const t=wse(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Ty(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r;return(sT(n)!==o||sT(r)!==a)&&(n=o,r=a),{width:n,height:r}}const Zse='!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 ju=(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 Jse=C.createContext(void 0),eae={disableStyleElements:!1};function tae(){return C.useContext(Jse)??eae}const nae={...Oy,activeTabPosition:()=>null,activeTabSize:()=>null},rae=C.forwardRef(function(t,n){const{className:r,render:i,renderBeforeHydration:o=!1,...a}=t,{nonce:u}=tae(),{getTabElementBySelectedValue:c,orientation:f,tabActivationDirection:h,value:p}=Id(),{tabsListElement:g}=nj(),[y,b]=C.useState(!1),{value:v}=Id();H6(()=>b(!0));const S=qse();C.useEffect(()=>{if(p!=null&&g!=null&&typeof ResizeObserver<"u"){const V=new ResizeObserver(S);return V.observe(g),()=>{V.disconnect()}}},[p,g,S]);let w=0,A=0,k=0,R=0,D=0,T=0,$=!1;if(p!=null&&g!=null){const V=c(p);if($=!0,V!=null){const{width:U,height:I}=dT(V),{width:P,height:G}=dT(g),W=V.getBoundingClientRect(),L=g.getBoundingClientRect(),Y=P>0?L.width/P:1,Q=G>0?L.height/G:1;if(Math.abs(Y)>Number.EPSILON&&Math.abs(Q)>Number.EPSILON){const ae=W.left-L.left,te=W.top-L.top;w=ae/Y+g.scrollLeft-g.clientLeft,k=te/Q+g.scrollTop-g.clientTop}else w=V.offsetLeft,k=V.offsetTop;D=U,T=I,A=g.scrollWidth-w-D,R=g.scrollHeight-k-T}}const N=C.useMemo(()=>$?{left:w,right:A,top:k,bottom:R}:null,[w,A,k,R,$]),F=C.useMemo(()=>$?{width:D,height:T}:null,[D,T,$]),j=C.useMemo(()=>{if($)return{[ju.activeTabLeft]:`${w}px`,[ju.activeTabRight]:`${A}px`,[ju.activeTabTop]:`${k}px`,[ju.activeTabBottom]:`${R}px`,[ju.activeTabWidth]:`${D}px`,[ju.activeTabHeight]:`${T}px`}},[w,A,k,R,D,T,$]),z=$&&D>0&&T>0,q=Ma("span",t,{state:{orientation:f,activeTabPosition:N,activeTabSize:F,tabActivationDirection:h},ref:n,props:[{role:"presentation",style:j,hidden:!z},a,{suppressHydrationWarning:!0}],stateAttributesMapping:nae});return v==null?null:_.jsxs(C.Fragment,{children:[q,!y&&o&&_.jsx("script",{nonce:u,dangerouslySetInnerHTML:{__html:Zse},suppressHydrationWarning:!0})]})});let iae=(function(e){return e.index="data-index",e.activationDirection="data-activation-direction",e.orientation="data-orientation",e.hidden="data-hidden",e})({});const oae={...Oy,...mse},sae=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}=Id(),b=eC(),v=C.useMemo(()=>({id:b,value:i}),[b,i]),{ref:S,index:w}=q6({metadata:v}),A=i===c,{mounted:k,transitionStatus:R,setMounted:D}=yse(A),T=!k,$=f(i),N={hidden:T,orientation:h,tabActivationDirection:p,transitionStatus:R},F=C.useRef(null),j=Ma("div",t,{state:N,ref:[n,S,F],props:[{"aria-labelledby":$,hidden:T,id:b,role:"tabpanel",tabIndex:A?0:-1,inert:Yse(!A),[iae.index]:w},u],stateAttributesMapping:oae});return Hse({open:A,ref:F,onComplete(){A||D(!1)}}),ur(()=>{if(!(T&&!a)&&b!=null)return g(i,b),()=>{y(i,b)}},[T,a,i,b,g,y]),a||k?j:null}),aae=[];function lae(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=aae}=e,[b,v]=C.useState(0),S=n>1,w=C.useRef(null),A=Og(w,f),k=C.useRef([]),R=C.useRef(!1),D=u??b,T=Zn((F,j=!1)=>{if((c??v)(F),j){const z=k.current[F];cT(w.current,z,a,o)}}),$=Zn(F=>{if(F.size===0||R.current)return;R.current=!0;const j=Array.from(F.keys()),z=j.find(q=>q==null?void 0:q.hasAttribute(ej))??null,M=z?j.indexOf(z):-1;M!==-1&&T(M),cT(w.current,z,a,o)}),N=C.useMemo(()=>({"aria-orientation":o==="both"?void 0:o,ref:A,onFocus(F){!w.current||!uT(F.target)||F.target.setSelectionRange(0,F.target.value.length??0)},onKeyDown(F){const j=h?jse:Q6;if(!j.has(F.key)||uae(F,y)||!w.current)return;const M=a==="rtl",q=M?Ng:yd,V={horizontal:q,vertical:Xu,both:q}[o],U=M?yd:Ng,I={horizontal:U,vertical:gd,both:U}[o];if(uT(F.target)&&!vse(F.target)){const B=F.target.selectionStart,ae=F.target.selectionEnd,te=F.target.value??"";if(B==null||F.shiftKey||B!==ae||F.key!==I&&B<te.length||F.key!==V&&B>0)return}let P=D;const G=Rse(k,g),W=Dse(k,g);if(S){const B=t||Array.from({length:k.current.length},()=>({width:1,height:1})),ae=$se(B,n,i),te=ae.findIndex(Ce=>Ce!=null&&!md(k,Ce,g)),me=ae.reduce((Ce,Re,pe)=>Re!=null&&!md(k,Re,g)?pe:Ce,-1);P=ae[Tse({current:ae.map(Ce=>Ce?k.current[Ce]:null)},{event:F,orientation:o,loopFocus:r,cols:n,disabledIndices:Ose([...g||k.current.map((Ce,Re)=>md(k,Re)?Re:void 0),void 0],ae),minIndex:te,maxIndex:me,prevIndex:Mse(D>W?G:D,B,ae,n,F.key===Xu?"bl":F.key===yd?"tr":"tl"),rtl:M})]}const L={horizontal:[q],vertical:[Xu],both:[q,Xu]}[o],Y={horizontal:[U],vertical:[gd],both:[U,gd]}[o],Q=S?j:{horizontal:h?Nse:X6,vertical:h?Lse:K6,both:j}[o];h&&(F.key===$y?P=G:F.key===My&&(P=W)),P===D&&(L.includes(F.key)||Y.includes(F.key))&&(r&&P===W&&L.includes(F.key)?P=G:r&&P===G&&Y.includes(F.key)?P=W:P=Ur(k,{startingIndex:P,decrement:Y.includes(F.key),disabledIndices:g})),P!==D&&!Nm(k,P)&&(p&&F.stopPropagation(),Q.has(F.key)&&F.preventDefault(),T(P,!0),queueMicrotask(()=>{var B;(B=k.current[P])==null||B.focus()}))}}),[n,i,a,g,k,h,D,S,t,r,A,y,T,o,p]);return C.useMemo(()=>({props:N,highlightedIndex:D,onHighlightedIndexChange:T,elementsRef:k,disabledIndices:g,onMapChange:$,relayKeyboardEvent:N.onKeyDown}),[N,D,T,k,g,$])}function uae(e,t){for(const n of Bse.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function rj(e){const{render:t,className:n,refs:r=Pd,props:i=Pd,state:o=Yo,stateAttributesMapping:a,highlightedIndex:u,onHighlightedIndexChange:c,orientation:f,dense:h,itemSizes:p,loopFocus:g,cols:y,enableHomeAndEndKeys:b,onMapChange:v,stopEventPropagation:S=!0,rootRef:w,disabledIndices:A,modifierKeys:k,highlightItemOnHover:R=!1,tag:D="div",...T}=e,$=j6(),{props:N,highlightedIndex:F,onHighlightedIndexChange:j,elementsRef:z,onMapChange:M,relayKeyboardEvent:q}=lae({itemSizes:p,cols:y,loopFocus:g,dense:h,orientation:f,highlightedIndex:u,onHighlightedIndexChange:c,rootRef:w,stopEventPropagation:S,enableHomeAndEndKeys:b,direction:$,disabledIndices:A,modifierKeys:k}),V=Ma(D,e,{state:o,ref:r,props:[N,...i,T],stateAttributesMapping:a}),U=C.useMemo(()=>({highlightedIndex:F,onHighlightedIndexChange:j,highlightItemOnHover:R,relayKeyboardEvent:q}),[F,j,R,q]);return _.jsx(V6.Provider,{value:U,children:_.jsx(L6,{elementsRef:z,onMapChange:I=>{v==null||v(I),M(I)},children:V})})}const cae=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}=Id(),[b,v]=C.useState(0),[S,w]=C.useState(null),A=fae(p,h,S,c),k=Zn(($,N)=>{if($!==p){const F=A($);N.activationDirection=F,f($,N)}}),R={orientation:h,tabActivationDirection:y},D={"aria-orientation":h==="vertical"?"vertical":void 0,role:"tablist"},T=C.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:b,onTabActivation:k,setHighlightedTabIndex:v,tabsListElement:S,value:p}),[r,b,k,v,S,p]);return _.jsx(tj.Provider,{value:T,children:_.jsx(rj,{render:a,className:i,state:R,refs:[n,w],props:[D,u],stateAttributesMapping:Oy,highlightedIndex:b,enableHomeAndEndKeys:!0,loopFocus:o,orientation:h,onHighlightedIndexChange:v,onMapChange:g,disabledIndices:Pd})})});function hT(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 fae(e,t,n,r){const[i,o]=C.useState(null);return ur(()=>{if(e==null||n==null){o(null);return}const a=r(e);if(a==null){o(null);return}const{left:u,top:c}=hT(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}=hT(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 ij=({children:e,...t})=>_.jsx(Kse,{"data-slot":"tabs-root",render:_.jsx(Ve,{}),...t,children:e});ij.displayName="TabsRoot";const dae="_tab_4eh43_3",Ny={"tabs-list":"_tabs-list_4eh43_3",tab:dae,"tabs-indicator":"_tabs-indicator_4eh43_65","tabs-panel":"_tabs-panel_4eh43_86"},oj=({size:e="md",ghost:t,fullwidth:n,className:r,children:i,...o})=>_.jsx(cae,{"data-slot":"tabs-list","data-size":e,"data-ghost":t||void 0,render:_.jsx(tt,{gap:4,ay:"center",fullwidth:n}),className:Ie(Ny["tabs-list"],r),...o,children:i});oj.displayName="TabsList";const sj=({className:e,children:t,...n})=>_.jsx(Qse,{"data-slot":"tabs-tab",className:Ie(Ny.tab,e),...n,children:t});sj.displayName="TabsTab";const aj=({className:e,...t})=>_.jsx(rae,{"data-slot":"tabs-indicator",className:Ie(Ny["tabs-indicator"],e),...t});aj.displayName="TabsIndicator";const lj=({className:e,children:t,...n})=>_.jsx(sae,{"data-slot":"tabs-panel",render:_.jsx(Ve,{ay:"center",ax:"center",fullwidth:!0}),className:Ie(Ny["tabs-panel"],e),tabIndex:-1,...n,children:t});lj.displayName="TabsPanel";const rC=({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})=>_.jsxs(ij,{defaultValue:t||e[0].value,value:n,onValueChange:r,...c,children:[_.jsxs(oj,{size:o,ghost:a,fullwidth:u,...f,children:[e.map(b=>_.jsx(sj,{value:b.value,...h,children:b.label},b.value)),_.jsx(aj,{...p})]}),_.jsx(qw,{"data-slot":"tabs-container",...y,children:e.map(b=>_.jsx(lj,{value:b.value,keepMounted:i,...g,children:b.render},b.value))})]});rC.displayName="Tabs";const uj=C.createContext(void 0);function hae(e=!0){const t=C.useContext(uj);if(t===void 0&&!e)throw new Error(uh(7));return t}let pae=(function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e.multiple="data-multiple",e})({});const pT={multiple(e){return e?{[pae.multiple]:""}:null}},mae=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=Vse(),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,[w,A]=JS({controlled:f,default:b,name:"ToggleGroup",state:"value"}),k=Zn((N,F,j)=>{let z;if(c?(z=w.slice(),F?z.push(N):z.splice(w.indexOf(N),1)):z=F?[N]:[],Array.isArray(z)){if(a==null||a(z,j),j.isCanceled)return;A(z)}}),R={disabled:S,multiple:c,orientation:u},D=C.useMemo(()=>({disabled:S,orientation:u,setGroupValue:k,value:w,isValueInitialized:v}),[S,u,k,w,v]),T={role:"group"},$=Ma("div",t,{enabled:!!y,state:R,ref:n,props:[T,g],stateAttributesMapping:pT});return _.jsx(uj.Provider,{value:D,children:y?$:_.jsx(rj,{render:p,className:h,state:R,refs:[n],props:[T,g],stateAttributesMapping:pT,loopFocus:o,enableHomeAndEndKeys:!0})})}),gae=(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}},b1={"toggle-group-panel":"_toggle-group-panel_al39a_1","toggle-group-indicator":"_toggle-group-indicator_al39a_33","toggle-group-button":"_toggle-group-button_al39a_59"},sc=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=eC(p||void 0),v=hae(),S=(v==null?void 0:v.value)??[],w=v?void 0:i,A=(o||(v==null?void 0:v.disabled))??!1,[k,R]=JS({controlled:v?b!==void 0&&S.indexOf(b)>-1:c,default:w,name:"Toggle",state:"pressed"}),D=Zn((M,q)=>{var V;b&&((V=v==null?void 0:v.setGroupValue)==null||V.call(v,b,M,q)),u==null||u(M,q)}),{getButtonProps:T,buttonRef:$}=W6({disabled:A,native:g}),N={disabled:A,pressed:k},F=[$,n],j=[{"aria-pressed":k,onClick(M){const q=!k,V=hw(dw,M.nativeEvent);D(q,V),!V.isCanceled&&R(q)}},y,T],z=Ma("button",t,{enabled:!v,state:N,ref:F,props:j});return v?_.jsx(Wse,{tag:"button",render:f,className:r,state:N,refs:F,props:j}):z}),iC=({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}=gae(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:`${b1["toggle-group-button"]} ${S}`.trim(),ref:w=>{w&&v&&p.current.set(v,w)}})}return b});return _.jsxs(mae,{ref:h,value:r,defaultValue:i,onValueChange:g,className:b1["toggle-group-panel"],"data-size":e,"data-ghost":t||void 0,"data-orientation":n,render:n==="vertical"?_.jsx(Ve,{}):_.jsx(tt,{}),...u,children:[_.jsx("div",{"data-slot":"toggle-group-indicator",className:b1["toggle-group-indicator"]}),y]})};iC.displayName="ToggleGroup";function yae(e,t){const n=getComputedStyle(e),r=parseFloat(n.fontSize);return t*r}function bae(e,t){const n=getComputedStyle(e.ownerDocument.body),r=parseFloat(n.fontSize);return t*r}function vae(e){return e/100*window.innerHeight}function xae(e){return e/100*window.innerWidth}function wae(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 lm({groupSize:e,panelElement:t,styleProp:n}){let r;const[i,o]=wae(n);switch(o){case"%":{r=i/100*e;break}case"px":{r=i;break}case"rem":{r=bae(t,i);break}case"em":{r=yae(t,i);break}case"vh":{r=vae(i);break}case"vw":{r=xae(i);break}}return r}function Pi(e){return parseFloat(e.toFixed(3))}function Dc({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 pw(e){const{panels:t}=e,n=Dc({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=lm({groupSize:n,panelElement:i,styleProp:o.collapsedSize});a=Pi(h/n*100)}let u;if(o.defaultSize!==void 0){const h=lm({groupSize:n,panelElement:i,styleProp:o.defaultSize});u=Pi(h/n*100)}let c=0;if(o.minSize!==void 0){const h=lm({groupSize:n,panelElement:i,styleProp:o.minSize});c=Pi(h/n*100)}let f=100;if(o.maxSize!==void 0){const h=lm({groupSize:n,panelElement:i,styleProp:o.maxSize});f=Pi(h/n*100)}return{collapsedSize:a,collapsible:o.collapsible===!0,defaultSize:u,disabled:o.disabled,minSize:c,maxSize:f,panelId:r.id}})}function Ft(e,t="Assertion error"){if(!e)throw Error(t)}function mw(e,t){return Array.from(t).sort(e==="horizontal"?Sae:Cae)}function Sae(e,t){const n=e.element.offsetLeft-t.element.offsetLeft;return n!==0?n:e.element.offsetWidth-t.element.offsetWidth}function Cae(e,t){const n=e.element.offsetTop-t.element.offsetTop;return n!==0?n:e.element.offsetHeight-t.element.offsetHeight}function cj(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function fj(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 Eae({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}=fj(r,a),f=e==="horizontal"?u:c;f<o&&(o=f,i=a)}return Ft(i,"No rect found"),i}let um;function kae(){return um===void 0&&(typeof matchMedia=="function"?um=!!matchMedia("(pointer:coarse)").matches:um=!1),um}function dj(e){const{element:t,orientation:n,panels:r,separators:i}=e,o=mw(n,Array.from(t.children).filter(cj).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(w=>w.element===v);if(S){if(g){const w=g.element.getBoundingClientRect(),A=v.getBoundingClientRect();let k;if(c){const R=n==="horizontal"?new DOMRect(w.right,w.top,0,w.height):new DOMRect(w.left,w.bottom,w.width,0),D=n==="horizontal"?new DOMRect(A.left,A.top,0,A.height):new DOMRect(A.left,A.top,A.width,0);switch(y.length){case 0:{k=[R,D];break}case 1:{const T=y[0],$=Eae({orientation:n,rects:[w,A],targetRect:T.element.getBoundingClientRect()});k=[T,$===w?D:R];break}default:{k=y;break}}}else y.length?k=y:k=[n==="horizontal"?new DOMRect(w.right,A.top,A.left-w.right,A.height):new DOMRect(A.left,w.bottom,A.width,A.top-w.bottom)];for(const R of k){let D="width"in R?R:R.element.getBoundingClientRect();const T=kae()?e.resizeTargetMinimumSize.coarse:e.resizeTargetMinimumSize.fine;if(D.width<T){const N=T-D.width;D=new DOMRect(D.x-N/2,D.y,D.width+N,D.height)}if(D.height<T){const N=T-D.height;D=new DOMRect(D.x,D.y-N/2,D.width,D.height+N)}const $=b<=f||b>h;!u&&!$&&a.push({group:e,groupSize:Dc({group:e}),panels:[g,S],separator:"width"in R?void 0:R,rect:D}),u=!1}}c=!1,g=S,y=[]}}else if(v.hasAttribute("data-separator")){v.ariaDisabled!==null&&(u=!0);const S=i.find(w=>w.element===v);S?y.push(S):(g=void 0,y=[])}else c=!0}return a}var ia;class _ae{constructor(){Ue(this,ia,{})}addListener(t,n){const r=X(this,ia)[t];return r===void 0?X(this,ia)[t]=[n]:r.includes(n)||r.push(n),()=>{this.removeListener(t,n)}}emit(t,n){const r=X(this,ia)[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(){Le(this,ia,{})}removeListener(t,n){const r=X(this,ia)[t];if(r!==void 0){const i=r.indexOf(n);i>=0&&r.splice(i,1)}}}ia=new WeakMap;function ar(e,t,n=0){return Math.abs(Pi(e)-Pi(t))<=n}let hi={cursorFlags:0,interactionState:{state:"inactive"},mountedGroups:new Map};const ts=new _ae;function fr(){return hi}function dr(e){const t=typeof e=="function"?e(hi):e;if(hi===t)return hi;const n=hi;return hi={...hi,...t},t.cursorFlags!==void 0&&ts.emit("cursorFlagsChange",hi.cursorFlags),t.interactionState!==void 0&&ts.emit("interactionStateChange",hi.interactionState),t.mountedGroups!==void 0&&(hi.mountedGroups.forEach((r,i)=>{r.derivedPanelConstraints.forEach(o=>{if(o.collapsible){const{layout:a}=n.mountedGroups.get(i)??{};if(a){const u=ar(o.collapsedSize,r.layout[o.panelId]),c=ar(o.collapsedSize,a[o.panelId]);u&&!c&&(i.inMemoryLastExpandedPanelSizes[o.panelId]=a[o.panelId])}}})}),ts.emit("mountedGroupsChange",hi.mountedGroups)),hi}function Aae(e,t,n){let r,i={x:1/0,y:1/0};for(const o of t){const a=fj(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 Rae(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function Dae(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:yT(e),b:yT(t)};let r;for(;n.a.at(-1)===n.b.at(-1);)r=n.a.pop(),n.b.pop();Ft(r,"Stacking order can only be calculated for elements with a common ancestor");const i={a:gT(mT(n.a)),b:gT(mT(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 Tae=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function $ae(e){const t=getComputedStyle(hj(e)??e).display;return t==="flex"||t==="inline-flex"}function Mae(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||$ae(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"||Tae.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function mT(e){let t=e.length;for(;t--;){const n=e[t];if(Ft(n,"Missing node"),Mae(n))return n}return null}function gT(e){return e&&Number(getComputedStyle(e).zIndex)||0}function yT(e){const t=[];for(;e;)t.push(e),e=hj(e);return t}function hj(e){const{parentNode:t}=e;return Rae(t)?t.host:t}function Oae(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 Nae({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!cj(n)||n.contains(e)||e.contains(n))return!0;if(Dae(n,e)>0){let r=n;for(;r;){if(r.contains(e))return!0;if(Oae(r.getBoundingClientRect(),t))return!1;r=r.parentElement}}return!0}function oC(e,t){const n=[];return t.forEach((r,i)=>{if(i.disabled)return;const o=dj(i),a=Aae(i.orientation,o,{x:e.clientX,y:e.clientY});a&&a.distance.x<=0&&a.distance.y<=0&&Nae({groupElement:i.element,hitRegion:a.hitRegion.rect,pointerEventTarget:e.target})&&n.push(a.hitRegion)}),n}function Lae(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 Zi(e,t){return ar(e,t)?0:e>t?1:-1}function Ku({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(Zi(r,c)<0)if(o){const f=(i+c)/2;Zi(r,f)<0?r=i:r=c}else r=c;return r=Math.min(u,r),r=Pi(r),r}function Fd({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:o}){if(ar(e,0))return t;const a=o==="imperative-api",u=Object.values(t),c=Object.values(i),f=[...u],[h,p]=r;Ft(h!=null,"Invalid first pivot index"),Ft(p!=null,"Invalid second pivot index");let g=0;switch(o){case"keyboard":{{const v=e<0?p:h,S=n[v];Ft(S,`Panel constraints not found for index ${v}`);const{collapsedSize:w=0,collapsible:A,minSize:k=0}=S;if(A){const R=u[v];if(Ft(R!=null,`Previous layout not found for panel index ${v}`),ar(R,w)){const D=k-R;Zi(D,Math.abs(e))>0&&(e=e<0?0-D:D)}}}{const v=e<0?h:p,S=n[v];Ft(S,`No panel constraints found for index ${v}`);const{collapsedSize:w=0,collapsible:A,minSize:k=0}=S;if(A){const R=u[v];if(Ft(R!=null,`Previous layout not found for panel index ${v}`),ar(R,k)){const D=R-w;Zi(D,Math.abs(e))>0&&(e=e<0?0-D:D)}}}break}default:{const v=e<0?p:h,S=n[v];Ft(S,`Panel constraints not found for index ${v}`);const w=u[v],{collapsible:A,collapsedSize:k,minSize:R}=S;if(A&&Zi(w,R)<0)if(e>0){const D=R-k,T=D/2,$=w+e;Zi($,R)<0&&(e=Zi(e,T)<=0?0:D)}else{const D=R-k,T=100-D/2,$=w-e;Zi($,R)<0&&(e=Zi(100+e,T)>0?0:-D)}break}}{const v=e<0?1:-1;let S=e<0?p:h,w=0;for(;;){const k=u[S];Ft(k!=null,`Previous layout not found for panel index ${S}`);const R=Ku({overrideDisabledPanels:a,panelConstraints:n[S],prevSize:k,size:100})-k;if(w+=R,S+=v,S<0||S>=n.length)break}const A=Math.min(Math.abs(e),Math.abs(w));e=e<0?0-A:A}{let v=e<0?h:p;for(;v>=0&&v<n.length;){const S=Math.abs(e)-Math.abs(g),w=u[v];Ft(w!=null,`Previous layout not found for panel index ${v}`);const A=w-S,k=Ku({overrideDisabledPanels:a,panelConstraints:n[v],prevSize:w,size:A});if(!ar(w,k)&&(g+=w-k,f[v]=k,g.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?v--:v++}}if(Lae(c,f))return i;{const v=e<0?p:h,S=u[v];Ft(S!=null,`Previous layout not found for panel index ${v}`);const w=S+g,A=Ku({overrideDisabledPanels:a,panelConstraints:n[v],prevSize:S,size:w});if(f[v]=A,!ar(A,w)){let k=w-A,R=e<0?p:h;for(;R>=0&&R<n.length;){const D=f[R];Ft(D!=null,`Previous layout not found for panel index ${R}`);const T=D+k,$=Ku({overrideDisabledPanels:a,panelConstraints:n[R],prevSize:D,size:T});if(ar(D,$)||(k-=$-D,f[R]=$),ar(k,0))break;e>0?R--:R++}}}const y=Object.values(f).reduce((v,S)=>S+v,0);if(!ar(y,100,.1))return i;const b=Object.keys(i);return f.reduce((v,S,w)=>(v[b[w]]=S,v),{})}function Pl(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(t[n]===void 0||Zi(e[n],t[n])!==0)return!1;return!0}function Il({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(!ar(i,100)&&r.length>0)for(let u=0;u<t.length;u++){const c=r[u];Ft(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];Ft(c!=null,`No layout data found for index ${u}`);const f=r[u];Ft(f!=null,`No layout data found for index ${u}`);const h=Ku({overrideDisabledPanels:!0,panelConstraints:t[u],prevSize:c,size:f});f!=h&&(o+=f-h,r[u]=h)}if(!ar(o,0))for(let u=0;u<t.length;u++){const c=r[u];Ft(c!=null,`No layout data found for index ${u}`);const f=c+o,h=Ku({overrideDisabledPanels:!0,panelConstraints:t[u],prevSize:c,size:f});if(c!==h&&(o-=h-c,r[u]=h,ar(o,0)))break}const a=Object.keys(e);return r.reduce((u,c,f)=>(u[a[f]]=c,u),{})}function pj({groupId:e,panelId:t}){const n=()=>{const{mountedGroups:u}=fr();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(A=>A.id===t),v=b===p.panels.length-1,S=Fd({delta:v?c-u:u-c,initialLayout:g,panelConstraints:h,pivotIndices:v?[b-1,b]:[b,b+1],prevLayout:g,trigger:"imperative-api"}),w=Il({layout:S,panelConstraints:h});Pl(g,w)||dr(A=>({mountedGroups:new Map(A.mountedGroups).set(p,{defaultLayoutDeferred:f,derivedPanelConstraints:h,layout:w,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&&ar(c,f)},resize:u=>{if(o()!==u){let c;switch(typeof u){case"number":{const{group:f}=n(),h=Dc({group:f});c=Pi(u/h*100);break}case"string":{c=parseFloat(u);break}}a(c)}}}}function bT(e){if(e.defaultPrevented)return;const{mountedGroups:t}=fr();oC(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=pj({groupId:n.group.id,panelId:r.id});o&&i!==void 0&&(o.resize(i),e.preventDefault())}}})}function Lm(e){const{mountedGroups:t}=fr();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 mj({groupId:e}){const t=()=>{const{mountedGroups:n}=fr();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=Il({layout:n,panelConstraints:i});if(r)return a;if(!Pl(a,c)){dr(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 gj(e){const{mountedGroups:t}=fr(),n=t.get(e);return Ft(n,`Mounted Group ${e.id} not found`),n}function nl(e,t){const n=Lm(e),r=gj(n),i=n.separators.find(h=>h.element===e);Ft(i,"Matching separator not found");const o=r.separatorToPanels.get(i);Ft(o,"Matching panels not found");const a=o.map(h=>n.panels.indexOf(h)),u=mj({groupId:n.id}).getLayout(),c=Fd({delta:t,initialLayout:u,panelConstraints:r.derivedPanelConstraints,pivotIndices:a,prevLayout:u,trigger:"keyboard"}),f=Il({layout:c,panelConstraints:r.derivedPanelConstraints});Pl(u,f)||dr(h=>({mountedGroups:new Map(h.mountedGroups).set(n,{defaultLayoutDeferred:r.defaultLayoutDeferred,derivedPanelConstraints:r.derivedPanelConstraints,layout:f,separatorToPanels:r.separatorToPanels})}))}function vT(e){if(e.defaultPrevented)return;const t=e.currentTarget,n=Lm(t);if(!n.disabled)switch(e.key){case"ArrowDown":{e.preventDefault(),n.orientation==="vertical"&&nl(t,5);break}case"ArrowLeft":{e.preventDefault(),n.orientation==="horizontal"&&nl(t,-5);break}case"ArrowRight":{e.preventDefault(),n.orientation==="horizontal"&&nl(t,5);break}case"ArrowUp":{e.preventDefault(),n.orientation==="vertical"&&nl(t,-5);break}case"End":{e.preventDefault(),nl(t,100);break}case"Enter":{e.preventDefault();const r=Lm(t),{derivedPanelConstraints:i,layout:o,separatorToPanels:a}=gj(r),u=r.separators.find(p=>p.element===t);Ft(u,"Matching separator not found");const c=a.get(u);Ft(c,"Matching panels not found");const f=c[0],h=i.find(p=>p.panelId===f.id);if(Ft(h,"Panel metadata not found"),h.collapsible){const p=o[f.id],g=h.collapsedSize===p?r.inMemoryLastExpandedPanelSizes[f.id]??h.minSize:h.collapsedSize;nl(t,g-p)}break}case"F6":{e.preventDefault();const r=Lm(t).separators.map(a=>a.element),i=Array.from(r).findIndex(a=>a===e.currentTarget);Ft(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(),nl(t,-100);break}}}function xT(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const{mountedGroups:t}=fr(),n=oC(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)}),dr({interactionState:{hitRegions:n,initialLayoutMap:r,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:"active"}}),n.length&&e.preventDefault()}const jae=e=>e,v1=()=>{},yj=1,bj=2,vj=4,xj=8,wT=3,ST=12;let cm;function CT(){return cm===void 0&&(cm=!1,typeof window<"u"&&(window.navigator.userAgent.includes("Chrome")||window.navigator.userAgent.includes("Firefox"))&&(cm=!0)),cm}function zae({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&&CT()){const o=(e&yj)!==0,a=(e&bj)!==0,u=(e&vj)!==0,c=(e&xj)!==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 CT()?r>0&&i>0?"move":r>0?"ew-resize":"ns-resize":r>0&&i>0?"grab":r>0?"col-resize":"row-resize"}}const ET=new WeakMap;function sC(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:n}=ET.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets.push(n));const{cursorFlags:r,interactionState:i}=fr();switch(i.state){case"active":case"hover":{const o=zae({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}}ET.set(e,{prevStyle:t,styleSheet:n})}function wj({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 w=r.get(p),{defaultLayoutDeferred:A,derivedPanelConstraints:k,layout:R,separatorToPanels:D}=i.get(p)??{defaultLayoutDeferred:!1};if(k&&w&&R&&D){const T=Fd({delta:S,initialLayout:w,panelConstraints:k,pivotIndices:h.panels.map($=>v.indexOf($)),prevLayout:R,trigger:"mouse-or-touch"});if(Pl(T,R)){if(S!==0&&!y)switch(b){case"horizontal":{u|=S<0?yj:bj;break}case"vertical":{u|=S<0?vj:xj;break}}}else{c.set(h.group,{defaultLayoutDeferred:A,derivedPanelConstraints:k,layout:T,separatorToPanels:D});const $=h.group.panels.map(({id:N})=>N).join(",");h.group.inMemoryLayouts[$]=T}}});let f=0;t.movementX===0?f|=a&wT:f|=u&wT,t.movementY===0?f|=a&ST:f|=u&ST,dr({cursorFlags:f,mountedGroups:c}),sC(e)}function kT(e){const{cursorFlags:t,interactionState:n,mountedGroups:r}=fr();n.state==="active"&&wj({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:r,prevCursorFlags:t})}function _T(e){if(e.defaultPrevented)return;const{cursorFlags:t,interactionState:n,mountedGroups:r}=fr();switch(n.state){case"active":{if(e.buttons===0){dr(i=>i.interactionState.state==="inactive"?i:{cursorFlags:0,interactionState:{state:"inactive"}}),dr(i=>({mountedGroups:new Map(i.mountedGroups)}));return}wj({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:r,pointerDownAtPoint:n.pointerDownAtPoint,prevCursorFlags:t});break}default:{const i=oC(e,r);i.length===0?n.state!=="inactive"&&dr({interactionState:{state:"inactive"}}):dr({interactionState:{hitRegions:i,state:"hover"}}),sC(e.currentTarget);break}}}function AT(e){if(e.relatedTarget instanceof HTMLIFrameElement){const{interactionState:t}=fr();t.state==="hover"&&dr({interactionState:{state:"inactive"}})}}function RT(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const{interactionState:t}=fr();t.state==="active"&&(dr({cursorFlags:0,interactionState:{state:"inactive"}}),t.hitRegions.length>0&&(sC(e.currentTarget),dr(n=>({mountedGroups:new Map(n.mountedGroups)})),e.preventDefault()))}function DT(e){let t=0,n=0;const r={};for(const o of e)if(o.defaultSize!==void 0){t++;const a=Pi(o.defaultSize);n+=a,r[o.panelId]=a}else r[o.panelId]=void 0;const i=e.length-t;if(i!==0){const o=Pi((100-n)/i);for(const a of e)a.defaultSize===void 0&&(r[a.panelId]=o)}return r}function Pae(e,t,n){if(!n[0])return;const r=e.panels.find(c=>c.element===t);if(!r||!r.onResize)return;const i=Dc({group:e}),o=e.orientation==="horizontal"?r.element.offsetWidth:r.element.offsetHeight,a=r.mutableValues.prevSize,u={asPercentage:Pi(o/i*100),inPixels:o};r.mutableValues.prevSize=u,r.onResize(u,r.id,a)}function Iae(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 Fae(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 zu=new Map;function Bae(e){let t=!0;Ft(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:w}=v;if(w===e.element){if(t){if(Dc({group:e})===0)return;dr(A=>{const k=A.mountedGroups.get(e);if(k){const R=pw(e),D=k.defaultLayoutDeferred?DT(R):k.layout,T=Il({layout:D,panelConstraints:R});return!k.defaultLayoutDeferred&&Pl(D,T)&&Iae(k.derivedPanelConstraints,R)?A:{mountedGroups:new Map(A.mountedGroups).set(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:R,layout:T,separatorToPanels:k.separatorToPanels})}}return A})}}else Pae(e,w,S)}});o.observe(e.element),e.panels.forEach(b=>{Ft(!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=Dc({group:e}),u=pw(e),c=e.panels.map(({id:b})=>b).join(",");let f=e.defaultLayout;f&&(Fae(e.panels,f)||(f=void 0));const h=e.inMemoryLayouts[c]??f??DT(u),p=Il({layout:h,panelConstraints:u}),g=dj(e),y=e.element.ownerDocument;return dr(b=>{const v=new Map;return zu.set(y,(zu.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=>{Ft(!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",vT)}),zu.get(y)===1&&(y.addEventListener("dblclick",bT,!0),y.addEventListener("pointerdown",xT,!0),y.addEventListener("pointerleave",kT),y.addEventListener("pointermove",_T),y.addEventListener("pointerout",AT),y.addEventListener("pointerup",RT,!0)),function(){t=!1,zu.set(y,Math.max(0,(zu.get(y)??0)-1)),dr(b=>{const v=new Map(b.mountedGroups);return v.delete(e),{mountedGroups:v}}),e.separators.forEach(b=>{b.element.removeEventListener("keydown",vT)}),zu.get(y)||(y.removeEventListener("dblclick",bT,!0),y.removeEventListener("pointerdown",xT,!0),y.removeEventListener("pointerleave",kT),y.removeEventListener("pointermove",_T),y.removeEventListener("pointerout",AT),y.removeEventListener("pointerup",RT,!0)),o.disconnect()}}function Uae(){const[e,t]=C.useState({}),n=C.useCallback(()=>t({}),[]);return[e,n]}function aC(e){const t=C.useId();return`${e??t}`}const Gl=typeof window<"u"?C.useLayoutEffect:C.useEffect;function bd(e){const t=C.useRef(e);return Gl(()=>{t.current=e},[e]),C.useCallback((...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[t])}function lC(...e){return bd(t=>{e.forEach(n=>{if(n)switch(typeof n){case"function":{n(t);break}case"object":{n.current=t;break}}})})}function uC(e){const t=C.useRef({...e});return Gl(()=>{for(const n in e)t.current[n]=e[n]},[e]),t.current}const Sj=C.createContext(null);function Hae(e,t){const n=C.useRef({getLayout:()=>({}),setLayout:jae});C.useImperativeHandle(t,()=>n.current,[]),Gl(()=>{Object.assign(n.current,mj({groupId:e}))})}function Cj({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=bd(z=>{Pl(b.current.onLayoutChange,z)||(b.current.onLayoutChange=z,c==null||c(z))}),S=bd(z=>{Pl(b.current.onLayoutChanged,z)||(b.current.onLayoutChanged=z,f==null||f(z))}),w=aC(u),A=C.useRef(null),[k,R]=Uae(),D=C.useRef({lastExpandedPanelSizes:{},layouts:{},panels:[],resizeTargetMinimumSize:p,separators:[]}),T=lC(A,o);Hae(w,a);const $=bd((z,M)=>{const{interactionState:q,mountedGroups:V}=fr();for(const U of V.keys())if(U.id===z){const I=V.get(U);if(I){let P=!1;return q.state==="active"&&(P=q.hitRegions.some(G=>G.group===U)),{flexGrow:I.layout[M]??1,pointerEvents:P?"none":void 0}}}return{flexGrow:(n==null?void 0:n[M])??1}}),N=uC({defaultLayout:n,disableCursor:r}),F=C.useMemo(()=>({get disableCursor(){return!!N.disableCursor},getPanelStyles:$,id:w,orientation:h,registerPanel:z=>{const M=D.current;return M.panels=mw(h,[...M.panels,z]),R(),()=>{M.panels=M.panels.filter(q=>q!==z),R()}},registerSeparator:z=>{const M=D.current;return M.separators=mw(h,[...M.separators,z]),R(),()=>{M.separators=M.separators.filter(q=>q!==z),R()}},togglePanelDisabled:(z,M)=>{const q=D.current.panels.find(U=>U.id===z);q&&(q.panelConstraints.disabled=M);const{mountedGroups:V}=fr();for(const U of V.keys())if(U.id===w){const I=V.get(U);I&&(I.derivedPanelConstraints=pw(U))}},toggleSeparatorDisabled:(z,M)=>{const q=D.current.separators.find(V=>V.id===z);q&&(q.disabled=M)}}),[$,w,R,h,N]),j=C.useRef(null);return Gl(()=>{const z=A.current;if(z===null)return;const M=D.current;let q;if(N.defaultLayout!==void 0&&Object.keys(N.defaultLayout).length===M.panels.length){q={};for(const W of M.panels){const L=N.defaultLayout[W.id];L!==void 0&&(q[W.id]=L)}}const V={defaultLayout:q,disableCursor:!!N.disableCursor,disabled:!!i,element:z,id:w,inMemoryLastExpandedPanelSizes:D.current.lastExpandedPanelSizes,inMemoryLayouts:D.current.layouts,orientation:h,panels:M.panels,resizeTargetMinimumSize:M.resizeTargetMinimumSize,separators:M.separators};j.current=V;const U=Bae(V),I=fr().mountedGroups.get(V);if(I){const{defaultLayoutDeferred:W,derivedPanelConstraints:L,layout:Y}=I;!W&&L.length>0&&(v(Y),S(Y))}const P=ts.addListener("interactionStateChange",W=>{W.state}),G=ts.addListener("mountedGroupsChange",W=>{const L=W.get(V);if(L){const{defaultLayoutDeferred:Y,derivedPanelConstraints:Q,layout:B}=L;if(Y||Q.length===0)return;const{interactionState:ae}=fr(),te=ae.state!=="active";v(B),te&&S(B)}});return()=>{j.current=null,U(),P(),G()}},[i,w,S,v,h,k,N]),C.useEffect(()=>{const z=j.current;z&&(z.defaultLayout=n,z.disableCursor=!!r)}),_.jsx(Sj.Provider,{value:F,children:_.jsx("div",{...y,className:t,"data-group":!0,"data-testid":w,id:w,ref:T,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})})}Cj.displayName="Group";function cC(){const e=C.useContext(Sj);return Ft(e,"Group Context not found; did you render a Panel or Separator outside of a Group?"),e}function qae(e,t){const{id:n}=cC(),r=C.useRef({collapse:v1,expand:v1,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:v1});C.useImperativeHandle(t,()=>r.current,[]),Gl(()=>{Object.assign(r.current,pj({groupId:n,panelId:e}))})}function Ej({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=aC(u),S=uC({disabled:o}),w=C.useRef(null),A=lC(w,a),{getPanelStyles:k,id:R,orientation:D,registerPanel:T,togglePanelDisabled:$}=cC(),N=h!==null,F=bd((z,M,q)=>{h==null||h(z,u,q)});Gl(()=>{const z=w.current;if(z!==null){const M={element:z,id:v,idIsStable:b,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:N?F:void 0,panelConstraints:{collapsedSize:n,collapsible:r,defaultSize:i,disabled:S.disabled,maxSize:c,minSize:f}};return T(M)}},[n,r,i,N,v,b,c,f,F,T,S]),C.useEffect(()=>{$(v,!!o)},[o,v,$]),qae(v,p);const j=C.useSyncExternalStore(z=>(ts.addListener("mountedGroupsChange",z),()=>{ts.removeListener("mountedGroupsChange",z)}),()=>JSON.stringify(k(R,v)),()=>JSON.stringify(k(R,v)));return _.jsx("div",{...y,"aria-disabled":o||void 0,"data-panel":!0,"data-testid":v,id:v,ref:A,style:{...Gae,display:"flex",flexBasis:0,flexShrink:1,overflow:"hidden",...JSON.parse(j)},children:_.jsx("div",{className:t,style:{maxHeight:"100%",maxWidth:"100%",flexGrow:1,...g,touchAction:D==="horizontal"?"pan-y":"pan-x"},children:e})})}Ej.displayName="Panel";const Gae={minHeight:0,maxHeight:"100%",height:"auto",minWidth:0,maxWidth:"100%",width:"auto",border:"none",borderWidth:0,padding:0,margin:0};function Vae({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=Il({layout:Fd({delta:f-a,initialLayout:e,panelConstraints:t,pivotIndices:h,prevLayout:e}),panelConstraints:t})[n],i=Il({layout:Fd({delta:c-a,initialLayout:e,panelConstraints:t,pivotIndices:h,prevLayout:e}),panelConstraints:t})[n]}return{valueControls:n,valueMax:i,valueMin:o,valueNow:a}}function kj({children:e,className:t,disabled:n,elementRef:r,id:i,style:o,...a}){const u=aC(i),c=uC({disabled:n}),[f,h]=C.useState({}),[p,g]=C.useState("inactive"),y=C.useRef(null),b=lC(y,r),{disableCursor:v,id:S,orientation:w,registerSeparator:A,toggleSeparatorDisabled:k}=cC(),R=w==="horizontal"?"vertical":"horizontal";Gl(()=>{const T=y.current;if(T!==null){const $={disabled:c.disabled,element:T,id:u},N=A($),F=ts.addListener("interactionStateChange",z=>{g(z.state!=="inactive"&&z.hitRegions.some(M=>M.separator===$)?z.state:"inactive")}),j=ts.addListener("mountedGroupsChange",z=>{z.forEach(({derivedPanelConstraints:M,layout:q,separatorToPanels:V},U)=>{if(U.id===S){const I=V.get($);if(I){const P=I[0],G=U.panels.indexOf(P);h(Vae({layout:q,panelConstraints:M,panelId:P.id,panelIndex:G}))}}})});return()=>{F(),j(),N()}}},[S,u,A,c]),C.useEffect(()=>{k(u,!!n)},[n,u,k]);let D;return n&&!v&&(D="not-allowed"),_.jsx("div",{...a,"aria-controls":f.valueControls,"aria-disabled":n||void 0,"aria-orientation":R,"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:D,...o,flexGrow:0,flexShrink:0,touchAction:"none"},tabIndex:n?void 0:0})}kj.displayName="Separator";const Yae="_resizable_wu6fv_1",Lg={resizable:Yae,"resizable-panel":"_resizable-panel_wu6fv_15","resizable-handle":"_resizable-handle_wu6fv_19 _disabled_1m2av_2","resizable-handle-grip":"_resizable-handle-grip_wu6fv_45"},_j=({direction:e,className:t,children:n,...r})=>_.jsx(Cj,{"data-slot":"resizable","data-direction":e,orientation:e,className:Ie(Lg.resizable,t),...r,children:n});_j.displayName="Resizable";const Aj=({withHandle:e,className:t,children:n,disabled:r,...i})=>_.jsx(kj,{"data-slot":"resizable-handle","data-disabled":r?"":void 0,className:Ie(Lg["resizable-handle"],t),...i,children:n??(e!==!1&&_.jsx("div",{className:Lg["resizable-handle-grip"],children:_.jsx(rH,{size:10})}))});Aj.displayName="ResizableHandle";const gw=({className:e,children:t,...n})=>_.jsx(Ej,{"data-slot":"resizable-panel",className:Ie(Lg["resizable-panel"],e),...n,children:t});gw.displayName="ResizablePanel";const Rj=({children:e,...t})=>_.jsx(Qo,{render:_.jsx("nav",{}),"aria-label":"breadcrumbs","data-slot":"breadcrumbs",...t,children:e});Rj.displayName="BreadcrumbsContainer";const Wae={"breadcrumbs-list":"_breadcrumbs-list_j5s62_1"},Dj=({className:e,...t})=>_.jsx("ol",{"data-slot":"breadcrumbs-list",className:Ie(Wae["breadcrumbs-list"],e),...t});Dj.displayName="BreadcrumbsList";const Xae={"breadcrumbs-item":"_breadcrumbs-item_fl4mk_1"},Tj=({className:e,...t})=>_.jsx("li",{"data-slot":"breadcrumbs-item",className:Ie(Xae["breadcrumbs-item"],e),...t});Tj.displayName="BreadcrumbsItem";const $j=({children:e,...t})=>_.jsx("li",{"data-slot":"breadcrumbs-separator",role:"presentation","aria-hidden":"true",...t,children:e??"/"});$j.displayName="BreadcrumbsSeparator";const fC=({items:e,linkAs:t="a",...n})=>_.jsx(Rj,{"data-slot":"breadcrumbs",...n,children:_.jsx(Dj,{children:e.map((r,i)=>{const o=i===e.length-1,a=r.icon,u=_.jsxs(Kr,{condition:!!a,render:_.jsx(tt,{gap:1,ay:"center"}),children:[a&&_.jsx(a,{size:14}),r.label]});return _.jsxs(C.Fragment,{children:[_.jsx(Tj,{children:o?u:_.jsx(t,{href:r.value,children:u})}),!o&&_.jsx($j,{})]},r.value)})})});fC.displayName="Breadcrumbs";const Hc={"table-cell":"_table-cell_1essx_3","table-container":"_table-container_1essx_12","table-head":"_table-head_1essx_16","table-header":"_table-header_1essx_27","table-root":"_table-root_1essx_36","table-row":"_table-row_1essx_45"},Mj=({children:e,className:t,...n})=>_.jsx(an,{"data-slot":"table-container",className:Ie(Hc["table-container"],t),ax:"stretch",p:0,fullwidth:!0,InnerContainerProps:{my:0},...n,children:e});Mj.displayName="TableContainer";const Oj=({striped:e,bordered:t,highlightOnHover:n,className:r,children:i,...o})=>_.jsx("table",{"data-slot":"table-root","data-striped":e,"data-bordered":t,"data-hover":n,className:Ie(Hc["table-root"],r),...o,children:i});Oj.displayName="TableRoot";const Nj=({className:e,...t})=>_.jsx("thead",{"data-slot":"table-header",className:Ie(Hc["table-header"],e),...t});Nj.displayName="TableHeader";const Lj=({className:e,render:t=_.jsx("tr",{}),...n})=>_.jsx(Qo,{"data-slot":"table-row",className:Ie(Hc["table-row"],e),render:t,...n});Lj.displayName="TableRow";const jj=({className:e,collapse:t,...n})=>_.jsx("td",{"data-slot":"table-cell","data-collapse":t,className:Ie(Hc["table-cell"],e),...n});jj.displayName="TableCell";const zj=({className:e,collapse:t,...n})=>_.jsx("th",{"data-slot":"table-head","data-collapse":t,className:Ie(Hc["table-head"],e),...n});zj.displayName="TableHead";const Pj=({...e})=>_.jsx("tbody",{"data-slot":"table-body",...e});Pj.displayName="TableBody";const Kae="bertrand:apiBase";function Qae(){if(typeof window<"u")try{const e=window.localStorage.getItem(Kae);if(e)return e.replace(/\/$/,"")}catch{}return""}function Ij(e){return`${Qae()}${e}`}async function Vl(e){const t=await fetch(Ij(e));if(!t.ok)throw new Error(`${t.status} ${t.statusText}`);return t.json()}class Fj extends Error{constructor(n,r){super(n);ie(this,"reason");this.name="ArchiveError",this.reason=r}}async function Bj(e,t){const n=await fetch(Ij(`/api/sessions/${e}/${t}`),{method:"POST"});if(!n.ok){const r=await n.json().catch(()=>({}));throw new Fj(r.error??n.statusText,r.reason??"unknown")}return n.json()}const TT=e=>Bj(e,"archive"),$T=e=>Bj(e,"unarchive");function Zae(e){return e===void 0?"":`?${new URLSearchParams({projects:e.join(",")}).toString()}`}const Bd=(e={})=>({queryKey:["sessions",{includeArchived:!!e.includeArchived,projects:e.projects??null}],queryFn:()=>{const t=new URLSearchParams;e.includeArchived&&t.set("excludeArchived","false"),e.projects!==void 0&&t.set("projects",e.projects.join(","));const n=t.toString();return Vl(`/api/sessions${n?`?${n}`:""}`)},refetchInterval:2e3,placeholderData:Mc}),Jae={queryKey:["worktrees"],queryFn:()=>Vl("/api/worktrees"),refetchInterval:2e3,placeholderData:Mc};function dC(e){return e?`?${new URLSearchParams({project:e}).toString()}`:""}const ele=(e,t=!1,n)=>({queryKey:["events",e,n??null],queryFn:()=>Vl(`/api/events/${e}${dC(n)}`),enabled:!!e,refetchInterval:t?1e3:!1,placeholderData:Mc}),tle=(e,t=!1,n)=>({queryKey:["stats",e,n??null],queryFn:()=>Vl(`/api/stats/${e}${dC(n)}`),enabled:!!e,refetchInterval:t?2e3:!1,placeholderData:Mc}),nle=(e={})=>({queryKey:["stats",{projects:e.projects??null}],queryFn:()=>Vl(`/api/stats${Zae(e.projects)}`),refetchInterval:e.hasLiveSession?2e3:!1,placeholderData:Mc}),rle=(e,t=!1,n)=>({queryKey:["engagement",e,n??null],queryFn:()=>Vl(`/api/engagement/${e}${dC(n)}`),enabled:!!e,refetchInterval:t?2e3:!1,placeholderData:Mc}),Uj={queryKey:["projects"],queryFn:()=>Vl("/api/projects"),refetchInterval:5e3},hC="bertrand:selected-projects";function ile(){try{const e=localStorage.getItem(hC);if(!e)return null;const t=JSON.parse(e);if(Array.isArray(t)&&t.every(n=>typeof n=="string"))return t}catch{}return null}function ole(e){try{localStorage.setItem(hC,JSON.stringify(e))}catch{}}function MT(e){const t=e.filter(r=>r.liveCount>0).map(r=>r.slug);if(t.length>0)return t;const n=e.find(r=>r.active);return n?[n.slug]:[]}function sle(e,t){if(e.length!==t.length)return!1;const n=[...t].sort();return[...e].sort().every((r,i)=>r===n[i])}const Hj=C.createContext(null);function ale({children:e}){const{data:t=[]}=ki(Uj),[n,r]=C.useState(()=>ile());C.useEffect(()=>{n===null&&t.length>0&&r(MT(t))},[n,t]);const i=C.useCallback(u=>{r(u),ole(u)},[]),o=C.useCallback(()=>{try{localStorage.removeItem(hC)}catch{}r(null)},[]),a=C.useMemo(()=>{const u=n===null?void 0:n.filter(f=>t.some(h=>h.slug===f)),c=n===null||sle(u??[],MT(t));return{projects:t,selected:n,queryProjects:u,setSelected:i,resetToLive:o,isAtLiveDefault:c}},[t,n,i,o]);return _.jsx(Hj.Provider,{value:a,children:e})}function ch(){const e=C.useContext(Hj);if(!e)throw new Error("useSelectedProjects must be used within a SelectedProjectsProvider");return e}const qj=()=>{const{projects:e,selected:t,setSelected:n,resetToLive:r,isAtLiveDefault:i}=ch();if(e.length===0)return null;const o=e.map(c=>({value:c.slug,label:c.name})),a=t??[],u=e.length>1;return _.jsxs(tt,{ay:"center",gap:1,fullwidth:!0,children:[_.jsx(O6,{placeholder:"Select projects",items:o,value:a,onValueChange:c=>n(c),before:_.jsx(JU,{}),size:"small",disabled:!u,fullwidth:!0}),u&&_.jsx(_a,{tooltip:"Show live projects",onClick:r,disabled:i,variant:"subtle",size:"small",children:_.jsx(xU,{})})]})};qj.displayName="ProjectSelector";const lle=1440*60*1e3,ule=["active","waiting","paused","archived"],cle={active:"Active",waiting:"Waiting",paused:"Paused",archived:"Archived"},fle=["today","yesterday","thisWeek","earlier"],dle={today:"Today",yesterday:"Yesterday",thisWeek:"This week",earlier:"Earlier"};function hle(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())/lle);return o<=0?"today":o===1?"yesterday":o<7?"thisWeek":"earlier"}function ple(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 ule.filter(i=>r.has(i)).map(i=>({key:i,category:cle[i],sessions:r.get(i)}))}if(t==="recent"){const r=new Date,i=new Map;for(const o of e){const a=hle(o.session.startedAt,r),u=i.get(a);u?u.push(o):i.set(a,[o])}return fle.filter(o=>i.has(o)).map(o=>({key:o,category:dle[o],sessions:i.get(o)}))}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])=>({key:r,category:r,sessions:i}))}const mle={"claude.started":{category:"lifecycle",color:"blue",label:"session started",icon:AH},"claude.ended":{category:"lifecycle",color:"blue",label:"ended",icon:LU},"claude.discarded":{category:"lifecycle",color:"neutral",label:"discarded",icon:BU},"session.waiting":{category:"interaction",color:"green",label:"waiting",icon:IU},"session.answered":{category:"interaction",color:"green",label:"Q&A",icon:mH},"user.prompt":{category:"interaction",color:"green",label:"prompt",icon:hH},"tool.work":{category:"work",color:"yellow",label:"tool work",icon:s3},"tool.applied":{category:"work",color:"yellow",label:"applied",icon:kH},"tool.used":{category:"work",color:"yellow",label:"tool",icon:zH},"assistant.message":{category:"assistant",color:"indigo",label:"assistant",icon:$H}},gle={category:"lifecycle",color:"neutral",label:"unknown",icon:zU};function Ly(e){return mle[e]??gle}function yle(e){return Ly(e).category}function ble(e){return Ly(e).color}function Gj(e){return Ly(e).label}function vle(e){return Ly(e).icon}const xle={active:"green",waiting:"yellow",paused:"neutral",archived:"neutral"};function jy(e){return xle[e]}function x1(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 pC(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(void 0,{month:"numeric",day:"numeric",year:"2-digit"})}const Vj=ble,wle=Gj,Sle=vle;function fm(e){return e?e.split(`
|
|
502
|
+
`).length:0}function Cle(e){return e.split("/").filter(Boolean).pop()??e}function Ele(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+=fm(c.oldStr),i+=fm(c.newStr)}else(u.oldStr||u.newStr)&&(r+=1,o+=fm(u.oldStr),i+=fm(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=Cle(u);return r>1?`${r} edits to ${c}${a}`:`edited ${c}${a}`}return`edited ${n.size} files${a}`}function kle(e){const t=wle(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 Ele(n)??t;default:return t}}function _le(e){return new Date(e).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",second:"2-digit"})}const Yj=({session:e})=>_.jsx(ze,{title:e.session.slug,size:-1,style:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},children:e.session.slug});Yj.displayName="SessionLabel";const Wj=({session:e})=>{const{queryProjects:t}=ch(),{data:n=[]}=ki(Bd({projects:t})),r=n.some(p=>p.session.status==="active"||p.session.status==="waiting"),{data:i}=ki(nle({hasLiveSession:r,projects:t})),o=i==null?void 0:i[e.session.id],a=(o==null?void 0:o.linesAdded)??0,u=(o==null?void 0:o.linesRemoved)??0,c=(o==null?void 0:o.filesTouched)??0,f=a>0||u>0,h=((t==null?void 0:t.length)??0)>1&&e.project;return _.jsxs(tt,{ay:"center",gap:2,fullwidth:!0,children:[h&&_.jsx(ze,{size:-1,shade:"muted",weight:"bold",children:e.project.name}),c>0&&_.jsxs(tt,{ay:"start",gap:1,children:[_.jsx(o3,{size:12}),_.jsx(ze,{size:-1,family:"mono",shade:"muted",children:c})]}),f&&_.jsxs(tt,{ay:"center",gap:1,children:[_.jsx(ze,{size:-1,family:"mono",color:"green",children:`+${a}`}),_.jsx(ze,{size:-1,family:"mono",color:"red",children:`-${u}`})]}),e.session.rating!==null&&e.session.rating!==void 0&&_.jsx(ze,{color:"yellow","aria-label":`Rated ${e.session.rating} of 5 stars`,ml:"auto",children:[1,2,3,4,5].map(p=>p<=e.session.rating?"★":"☆").join("")})]})};Wj.displayName="SessionContent";const Xj=({session:e})=>{const t=e.session.status==="archived",n=jy(e.session.status);return _.jsx(lh,{"data-slot":"sidebar-session-list-item","data-archived":t?"":void 0,style:t?{opacity:.4}:void 0,children:_.jsxs(an,{render:_.jsx(Ul,{to:"/$",params:{_splat:`${e.categoryPath}/${e.session.slug}`}}),p:2,fullwidth:!0,style:{backgroundColor:n},children:[_.jsxs(tt,{gap:2,ay:"center",fullwidth:!0,children:[_.jsx(Yj,{session:e}),_.jsx(ze,{size:-1,shade:"muted",ml:"auto",children:pC(e.session.startedAt)})]}),_.jsx(Wj,{session:e})]})})};Xj.displayName="SessionListItem";const Kj=({group:e})=>_.jsxs(Ve,{"data-slot":"sidebar-list-section",ax:"stretch",fullwidth:!0,children:[_.jsxs(tt,{ay:"center",gap:2,py:1,fullwidth:!0,children:[_.jsx(ze,{render:_.jsx("h3",{}),weight:"bold",size:0,children:e.category}),_.jsx(ze,{size:-1,shade:"muted",children:e.sessions.length})]}),_.jsx(zl,{"data-slot":"sidebar-list",marker:"none",ax:"stretch",gap:1,fullwidth:!0,children:e.sessions.map(t=>_.jsx(Xj,{session:t},t.session.id))})]});Kj.displayName="SessionGroupSection";const mC=({children:e,...t})=>_.jsx(Ve,{"data-slot":"sidebar",render:_.jsx("nav",{}),ax:"stretch",fullwidth:!0,gap:3,p:4,...t,children:e});mC.displayName="SidebarWrapper";const Qj=({WrapperProps:e})=>{const[t,n]=C.useState(""),[r,i]=C.useState("group"),[o,a]=C.useState(!1),u=C.useRef(null),{queryProjects:c}=ch(),{data:f=[]}=ki(Bd({includeArchived:o,projects:c})),h=C.useMemo(()=>{const p=t.trim().toLowerCase(),g=p?f.filter(y=>y.session.slug.toLowerCase().includes(p)||y.session.name.toLowerCase().includes(p)||y.categoryPath.toLowerCase().includes(p)):f;return ple(g,r)},[f,t,r]);return C.useEffect(()=>{const p=g=>{var y,b;(g.metaKey||g.ctrlKey)&&g.key==="k"&&(g.preventDefault(),(y=u.current)==null||y.focus(),(b=u.current)==null||b.select())};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[]),_.jsxs(mC,{...e,children:[_.jsx(qj,{}),_.jsxs(tt,{ay:"center",gap:2,fullwidth:!0,children:[_.jsx(_L,{ref:u,placeholder:"Search for a session",before:_.jsx(DH,{}),after:_.jsx(cO,{hotkey:["meta","k"]}),size:"small",fullwidth:!0,style:{flex:1,minWidth:0},value:t,onChange:p=>n(p.target.value)}),_.jsx(sy,{size:"small",variant:"subtle",tooltip:o?"Hide archived":"Show archived",pressed:o,onPressedChange:a,icon:{unpressed:_.jsx(YU,{}),pressed:_.jsx(XU,{})}})]}),_.jsxs(iC,{render:_.jsx(tt,{evenly:!0,fullwidth:!0}),size:"sm",value:[r],onValueChange:p=>{const g=p[0];g&&i(g)},children:[_.jsx(sc,{value:"group","aria-label":"Group by group",children:_.jsx(Al,{trigger:_.jsx(oH,{}),children:"Group by group"})}),_.jsx(sc,{value:"status","aria-label":"Group by status",children:_.jsx(Al,{trigger:_.jsx(LH,{}),children:"Group by status"})}),_.jsx(sc,{value:"recent","aria-label":"Group by recent",children:_.jsx(Al,{trigger:_.jsx(n3,{}),children:"Group by recent"})})]}),h.length===0?_.jsxs(ze,{size:-1,shade:"muted",style:{padding:"0.5rem"},children:['No sessions match "',t,'".']}):_.jsx(Ve,{ax:"stretch",gap:3,fullwidth:!0,children:h.map(p=>_.jsx(Kj,{group:p},p.key))})]})};Qj.displayName="Sidebar";const Zj=({children:e,...t})=>_.jsx(tt,{"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});Zj.displayName="TopBarWrapper";const vd="uiid-theme";function Ale(){return localStorage.getItem(vd)??"system"}function Rle(e){const t=n=>{n.key===vd&&e()};return window.addEventListener("storage",t),()=>window.removeEventListener("storage",t)}function Dle(e){e==="system"?document.documentElement.removeAttribute("data-theme"):document.documentElement.setAttribute("data-theme",e)}function Tle(){const e=C.useSyncExternalStore(Rle,Ale),t=C.useCallback(n=>{n==="system"?localStorage.removeItem(vd):localStorage.setItem(vd,n),Dle(n),window.dispatchEvent(new StorageEvent("storage",{key:vd,newValue:n}))},[]);return{theme:e,setTheme:t}}const Jj=()=>{const{theme:e,setTheme:t}=Tle();return _.jsxs(iC,{value:[e],onValueChange:n=>{const r=n[0];r&&t(r)},size:"sm",children:[_.jsx(sc,{value:"light","aria-label":"Light mode",children:_.jsx(OH,{})}),_.jsx(sc,{value:"dark","aria-label":"Dark mode",children:_.jsx(wH,{})}),_.jsx(sc,{value:"system","aria-label":"System theme",children:_.jsx(vH,{})})]})};Jj.displayName="ThemeToggle";const gC=({sessionCount:e})=>_.jsxs(Zj,{children:[_.jsx(ze,{size:2,weight:"bold",children:"bertrand"}),_.jsx(C.Activity,{mode:e?"visible":"hidden",children:_.jsxs(os,{color:"blue",children:[e," session(s)"]})}),_.jsxs(tt,{gap:3,ay:"center",ml:"auto",children:[_.jsxs(tt,{gap:2,ay:"center",children:[_.jsx(dm,{to:"/",tooltip:"Session timeline",icon:_.jsx(TU,{})}),_.jsx(dm,{to:"/worktrees",tooltip:"Worktrees",icon:_.jsx(tH,{})}),_.jsx(dm,{to:"/dev/markdown",tooltip:"Markdown viewer",icon:_.jsx(RU,{})}),_.jsx(dm,{to:"/dev/diff",tooltip:"Diff viewer",icon:_.jsx(i3,{})})]}),_.jsx(Jj,{})]})]});gC.displayName="TopBar";const dm=({to:e,tooltip:t,icon:n})=>_.jsx(_a,{render:_.jsx(Ul,{to:e}),nativeButton:!1,tooltip:t,variant:"subtle",size:"small",children:n}),qc=a7({component:$le});function $le(){return C7({select:t=>t.location.pathname}).startsWith("/dev/")?_.jsxs(Ve,{fullwidth:!0,style:{position:"fixed",inset:0,height:"100dvh"},children:[_.jsx(gC,{}),_.jsx(Ve,{render:_.jsx("main",{}),fullwidth:!0,style:{flex:1,overflow:"auto"},children:_.jsx(Bw,{})})]}):_.jsx(Mle,{})}function Mle(){const{queryProjects:e}=ch(),{data:t=[]}=ki(Bd({projects:e}));return _.jsxs(Ve,{fullwidth:!0,style:{position:"fixed",height:"100dvh"},children:[_.jsx(gC,{sessionCount:t.length}),_.jsxs(_j,{direction:"horizontal",children:[_.jsx(gw,{defaultSize:360,minSize:320,maxSize:540,children:_.jsx(Qj,{})}),_.jsx(Aj,{}),_.jsx(gw,{children:_.jsx(Ve,{render:_.jsx("main",{}),fullwidth:!0,fullheight:!0,children:_.jsx(Bw,{})})})]})]})}function Ole(){const{data:e=[]}=ki(Jae);return _.jsxs(Ve,{gap:4,p:6,fullwidth:!0,style:{overflow:"auto"},children:[_.jsxs(Ve,{gap:2,children:[_.jsxs(tt,{gap:2,ay:"center",children:[_.jsx(ze,{size:3,weight:"bold",children:"Worktrees"}),e.length>0&&_.jsx(os,{color:"blue",children:e.length})]}),_.jsx(ze,{size:2,shade:"muted",children:"Sessions currently working in an isolated git worktree."})]}),e.length===0?_.jsx(ze,{size:1,shade:"muted",children:"No active worktrees. A session lands here once it enters one for git-bound work."}):_.jsx(Ve,{gap:1,fullwidth:!0,children:e.map(({session:t,categoryPath:n})=>{const r=jy(t.status);return _.jsxs(tt,{ay:"center",gap:3,py:2,px:2,bb:1,fullwidth:!0,children:[_.jsx(ay,{color:r}),_.jsxs(Ve,{gap:1,children:[_.jsx(ze,{family:"mono",weight:"bold",children:t.worktreeBranch??"(unknown branch)"}),_.jsxs(tt,{gap:2,ay:"center",children:[_.jsxs(ze,{size:-1,shade:"muted",render:_.jsx(Ul,{to:"/$",params:{_splat:`${n}/${t.slug}`}}),children:[n," / ",t.slug]}),_.jsxs(ze,{size:-1,shade:"muted",children:["· ",pC(t.updatedAt)]})]}),t.worktreePath&&_.jsx(ze,{size:-1,shade:"muted",family:"mono",children:t.worktreePath})]}),_.jsx(os,{color:r,ml:"auto",children:t.status})]},t.id)})})]})}const Nle=Qd("/worktrees")({component:Ole}),Lle={"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 w1(e){return e instanceof Fj?Lle[e.reason]??e.message:e instanceof Error?e.message:"Something went wrong"}function jle(e){const t=Nw(),n=G4(),r=()=>t.invalidateQueries({queryKey:["sessions"]}),i=f=>(f==="archive"?TT:$T)(e.id).then(r).catch(p=>{n.add({description:`Undo failed: ${w1(p)}`,priority:"high"})}),o=(f,h)=>{let p;const g=()=>{p&&n.close(p),i(h)};p=n.add({priority:"low",description:_.jsxs(tt,{ay:"center",gap:3,ax:"space-between",fullwidth:!0,children:[_.jsxs(ze,{children:[f," ",_.jsx("code",{children:e.slug})]}),_.jsx(_a,{size:"small",onClick:g,children:"Undo"})]})})},a=Y_({mutationFn:()=>TT(e.id),onSuccess:()=>{r(),o("Archived","unarchive")},onError:f=>n.add({description:`Could not archive ${e.slug}: ${w1(f)}`,priority:"high"})}),u=Y_({mutationFn:()=>$T(e.id),onSuccess:()=>{r(),o("Unarchived","archive")},onError:f=>n.add({description:`Could not unarchive ${e.slug}: ${w1(f)}`,priority:"high"})});if(e.status==="archived")return{kind:"unarchive",label:"Unarchive",tooltip:"Unarchive (returns to paused)",Icon:SU,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:EU,disabled:c,loading:a.isPending,onClick:()=>a.mutate()}}const zle=e=>e.filter(t=>Gj(t.event)!=="unknown"),Ple=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"){const a=e[i+1];if(a&&a.event==="session.answered"){const u=(r=o.meta)==null?void 0:r.question;t.push({...a,meta:{...a.meta,question:u}}),n.add(i),n.add(i+1);continue}}t.push(o)}return t};function jg(e){return e.edits&&e.edits.length>0?e.edits:e.oldStr||e.newStr?[{oldStr:e.oldStr??"",newStr:e.newStr??""}]:[]}function OT(e){const t=e.meta;return{tool:(t==null?void 0:t.tool)??"unknown",detail:(t==null?void 0:t.detail)??"",outcome:(t==null?void 0:t.outcome)??"auto"}}const e5={Bash:"ran",Edit:"edited",MultiEdit:"edited",Write:"wrote",Read:"read",Glob:"globbed",Grep:"grepped",WebFetch:"fetched",WebSearch:"searched",TodoWrite:"updated todos"},Ile={Bash:"commands",Edit:"files",MultiEdit:"files",Write:"files",Read:"files",Glob:"patterns",Grep:"patterns",WebFetch:"urls",WebSearch:"queries"},Fle=new Set(["Edit","MultiEdit","Write","Read"]);function Ble(e){return e.split("/").filter(Boolean).pop()??e}function NT(e,t){return e.length<=t?e:e.slice(0,t-1)+"…"}function Ule(e){const t=e5[e.tool]??e.tool;return e.detail?e.tool==="Bash"?`ran \`${NT(e.detail,60)}\``:Fle.has(e.tool)?`${t} ${Ble(e.detail)}`:`${t} ${NT(e.detail,60)}`:t}function Hle(e){const t=[];for(const[n,r]of e){const i=e5[n]??n;if(r===1)t.push(i);else{const o=Ile[n]??"calls";t.push(`${i} ${r} ${o}`)}}return t.join(", ")}const LT=new Set(["tool.used"]),qle=e=>{const t=[];let n=0;for(;n<e.length;){const r=e[n];if(!LT.has(r.event)){t.push(r),n++;continue}const i=[];for(;n<e.length;){const f=e[n];if(!LT.has(f.event))break;i.push(f),n++}if(i.length===0)continue;const o=i.map(OT),a=o.some(f=>f.outcome==="approved"),u=new Map;for(const f of o){const h=`${f.tool}::${f.detail}`,p=u.get(h);if(p){p.count++;const g=[...jg(p),...jg(f)];g.length>0&&(p.edits=g,p.oldStr=void 0,p.newStr=void 0)}else u.set(h,{...f,count:1})}const c=[...u.values()];if(c.length<=1){const f=c[0]??OT(i[0]),h=Ule(f);t.push({...i[i.length-1],event:"tool.work",summary:h,meta:{...i[i.length-1].meta,permissions:c,outcome:a?"approved":"auto"}})}else{const f=new Map;for(const b of c)f.set(b.tool,(f.get(b.tool)??0)+b.count);const h=[...f.entries()].sort((b,v)=>v[1]-b[1]),p=Hle(h),g=new Date(i[0].createdAt).getTime(),y=new Date(i[i.length-1].createdAt).getTime();t.push({...i[0],event:"tool.work",summary:p,meta:{permissions:c,outcome:a?"approved":"auto"},createdAt:new Date((g+y)/2).toISOString()})}}return t},Gle={Edit:"edited a file",Write:"wrote a file",MultiEdit:"edited a file"},Vle=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=[...jg(p),...jg(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},Yle=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:Gle[i]??`${i} applied`}:t}),Wle=[zle,Ple,qle,Vle,Yle];function Xle(e){return Wle.reduce((t,n)=>n(t),e)}function jT(e,t){const n=e.replace(/^\/+|\/+$/g,"");return n.includes("/")?t.find(r=>`${r.categoryPath}/${r.session.slug}`===n)??null:null}const Kle=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Qle=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Zle={};function zT(e,t){return(Zle.jsx?Qle:Kle).test(e)}var Pu={},S1,PT;function Jle(){if(PT)return S1;PT=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=`
|
|
503
|
+
`,f="/",h="*",p="",g="comment",y="declaration";function b(S,w){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];w=w||{};var A=1,k=1;function R(V){var U=V.match(t);U&&(A+=U.length);var I=V.lastIndexOf(c);k=~I?V.length-I:k+V.length}function D(){var V={line:A,column:k};return function(U){return U.position=new T(V),F(),U}}function T(V){this.start=V,this.end={line:A,column:k},this.source=w.source}T.prototype.content=S;function $(V){var U=new Error(w.source+":"+A+":"+k+": "+V);if(U.reason=V,U.filename=w.source,U.line=A,U.column=k,U.source=S,!w.silent)throw U}function N(V){var U=V.exec(S);if(U){var I=U[0];return R(I),S=S.slice(I.length),U}}function F(){N(n)}function j(V){var U;for(V=V||[];U=z();)U!==!1&&V.push(U);return V}function z(){var V=D();if(!(f!=S.charAt(0)||h!=S.charAt(1))){for(var U=2;p!=S.charAt(U)&&(h!=S.charAt(U)||f!=S.charAt(U+1));)++U;if(U+=2,p===S.charAt(U-1))return $("End of comment missing");var I=S.slice(2,U-2);return k+=2,R(I),S=S.slice(U),k+=2,V({type:g,comment:I})}}function M(){var V=D(),U=N(r);if(U){if(z(),!N(i))return $("property missing ':'");var I=N(o),P=V({type:y,property:v(U[0].replace(e,p)),value:I?v(I[0].replace(e,p)):p});return N(a),P}}function q(){var V=[];j(V);for(var U;U=M();)U!==!1&&(V.push(U),j(V));return V}return F(),q()}function v(S){return S?S.replace(u,p):p}return S1=b,S1}var IT;function eue(){if(IT)return Pu;IT=1;var e=Pu&&Pu.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Pu,"__esModule",{value:!0}),Pu.default=n;const t=e(Jle());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 Pu}var Wf={},FT;function tue(){if(FT)return Wf;FT=1,Object.defineProperty(Wf,"__esModule",{value:!0}),Wf.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 Wf.camelCase=c,Wf}var Xf,BT;function nue(){if(BT)return Xf;BT=1;var e=Xf&&Xf.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(eue()),n=tue();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,Xf=r,Xf}var rue=nue();const iue=Rw(rue),t5=n5("end"),yC=n5("start");function n5(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 oue(e){const t=yC(e),n=t5(e);if(t&&n)return{start:t,end:n}}function xd(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?UT(e.position):"start"in e||"end"in e?UT(e):"line"in e||"column"in e?yw(e):""}function yw(e){return HT(e&&e.line)+":"+HT(e&&e.column)}function UT(e){return yw(e&&e.start)+"-"+yw(e&&e.end)}function HT(e){return e&&typeof e=="number"?e:1}class nr 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=xd(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}}nr.prototype.file="";nr.prototype.name="";nr.prototype.reason="";nr.prototype.message="";nr.prototype.stack="";nr.prototype.column=void 0;nr.prototype.line=void 0;nr.prototype.ancestors=void 0;nr.prototype.cause=void 0;nr.prototype.fatal=void 0;nr.prototype.place=void 0;nr.prototype.ruleId=void 0;nr.prototype.source=void 0;const bC={}.hasOwnProperty,sue=new Map,aue=/[A-Z]/g,lue=new Set(["table","tbody","thead","tfoot","tr"]),uue=new Set(["td","th"]),r5="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function cue(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=bue(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=yue(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"?rh:XO,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=i5(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function i5(e,t,n){if(t.type==="element")return fue(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return due(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return pue(e,t,n);if(t.type==="mdxjsEsm")return hue(e,t);if(t.type==="root")return mue(e,t,n);if(t.type==="text")return gue(e,t)}function fue(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=rh,e.schema=i),e.ancestors.push(t);const o=s5(e,t.tagName,!1),a=vue(e,t);let u=xC(e,t);return lue.has(t.tagName)&&(u=u.filter(function(c){return typeof c=="string"?!uy(c):!0})),o5(e,a,o,t),vC(a,u),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function due(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)}Ud(e,t.position)}function hue(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ud(e,t.position)}function pue(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=rh,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:s5(e,t.name,!0),a=xue(e,t),u=xC(e,t);return o5(e,a,o,t),vC(a,u),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function mue(e,t,n){const r={};return vC(r,xC(e,t)),e.create(t,e.Fragment,r,n)}function gue(e,t){return t.value}function o5(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function vC(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function yue(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 bue(e,t){return n;function n(r,i,o,a){const u=Array.isArray(o.children),c=yC(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 vue(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&bC.call(t.properties,i)){const o=wue(e,i,t.properties[i]);if(o){const[a,u]=o;e.tableCellAlignToStyle&&a==="align"&&typeof u=="string"&&uue.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 xue(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 Ud(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 Ud(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function xC(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:sue;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=i5(e,o,a);u!==void 0&&n.push(u)}return n}function wue(e,t,n){const r=WO(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?QO(n):ZO(n)),r.property==="style"){let i=typeof n=="object"?n:Sue(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Cue(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?xK[r.property]||r.property:r.attribute,n]}}function Sue(e,t){try{return iue(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new nr("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=r5+"#cannot-parse-style-attribute",i}}function s5(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=zT(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=zT(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return bC.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ud(e)}function Ud(e,t){const n=new nr("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=r5+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Cue(e){const t={};let n;for(n in e)bC.call(e,n)&&(t[Eue(n)]=e[n]);return t}function Eue(e){let t=e.replace(aue,kue);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function kue(e){return"-"+e.toLowerCase()}const C1={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"]},_ue={};function wC(e,t){const n=_ue,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return a5(e,r,i)}function a5(e,t,n){if(Aue(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 qT(e.children,t,n)}return Array.isArray(e)?qT(e,t,n):""}function qT(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=a5(e[i],t,n);return r.join("")}function Aue(e){return!!(e&&typeof e=="object")}const GT=document.createElement("i");function SC(e){const t="&"+e+";";GT.innerHTML=t;const n=GT.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Xr(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 bi(e,t){return e.length>0?(Xr(e,e.length,0,t),e):t}const VT={}.hasOwnProperty;function l5(e){const t={};let n=-1;for(;++n<e.length;)Rue(t,e[n]);return t}function Rue(e,t){let n;for(n in t){const i=(VT.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let a;if(o)for(a in o){VT.call(i,a)||(i[a]=[]);const u=o[a];Due(i[a],Array.isArray(u)?u:u?[u]:[])}}}function Due(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Xr(e,0,0,r)}function u5(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 cr=Oa(/[A-Za-z]/),Jn=Oa(/[\dA-Za-z]/),Tue=Oa(/[#-'*+\--9=?A-Z^-~]/);function zg(e){return e!==null&&(e<32||e===127)}const bw=Oa(/\d/),$ue=Oa(/[\dA-Fa-f]/),Mue=Oa(/[!-/:-@[-`{-~]/);function Qe(e){return e!==null&&e<-2}function Vt(e){return e!==null&&(e<0||e===32)}function xt(e){return e===-2||e===-1||e===32}const zy=Oa(new RegExp("\\p{P}|\\p{S}","u")),Fl=Oa(/\s/);function Oa(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Gc(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let a="";if(o===37&&Jn(e.charCodeAt(n+1))&&Jn(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 Rt(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(c){return xt(c)?(e.enter(n),u(c)):t(c)}function u(c){return xt(c)&&o++<i?(e.consume(c),u):(e.exit(n),t(c))}}const Oue={tokenize:Nue};function Nue(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"),Rt(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 Qe(u)?(e.consume(u),e.exit("chunkText"),o):(e.consume(u),a)}}const Lue={tokenize:jue},YT={tokenize:zue};function jue(e){const t=this,n=[];let r=0,i,o,a;return u;function u(k){if(r<n.length){const R=n[r];return t.containerState=R[1],e.attempt(R[0].continuation,c,f)(k)}return f(k)}function c(k){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&A();const R=t.events.length;let D=R,T;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){T=t.events[D][1].end;break}w(r);let $=R;for(;$<t.events.length;)t.events[$][1].end={...T},$++;return Xr(t.events,D+1,0,t.events.slice(R)),t.events.length=$,f(k)}return u(k)}function f(k){if(r===n.length){if(!i)return g(k);if(i.currentConstruct&&i.currentConstruct.concrete)return b(k);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(YT,h,p)(k)}function h(k){return i&&A(),w(r),g(k)}function p(k){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,b(k)}function g(k){return t.containerState={},e.attempt(YT,y,b)(k)}function y(k){return r++,n.push([t.currentConstruct,t.containerState]),g(k)}function b(k){if(k===null){i&&A(),w(0),e.consume(k);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),v(k)}function v(k){if(k===null){S(e.exit("chunkFlow"),!0),w(0),e.consume(k);return}return Qe(k)?(e.consume(k),S(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(k),v)}function S(k,R){const D=t.sliceStream(k);if(R&&D.push(null),k.previous=o,o&&(o.next=k),o=k,i.defineSkip(k.start),i.write(D),t.parser.lazy[k.start.line]){let T=i.events.length;for(;T--;)if(i.events[T][1].start.offset<a&&(!i.events[T][1].end||i.events[T][1].end.offset>a))return;const $=t.events.length;let N=$,F,j;for(;N--;)if(t.events[N][0]==="exit"&&t.events[N][1].type==="chunkFlow"){if(F){j=t.events[N][1].end;break}F=!0}for(w(r),T=$;T<t.events.length;)t.events[T][1].end={...j},T++;Xr(t.events,N+1,0,t.events.slice($)),t.events.length=T}}function w(k){let R=n.length;for(;R-- >k;){const D=n[R];t.containerState=D[1],D[0].exit.call(t,e)}n.length=k}function A(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function zue(e,t,n){return Rt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Tc(e){if(e===null||Vt(e)||Fl(e))return 1;if(zy(e))return 2}function Py(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 vw={name:"attention",resolveAll:Pue,tokenize:Iue};function Pue(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};WT(p,-c),WT(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=bi(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=bi(f,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",o,t]]),f=bi(f,Py(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=bi(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=bi(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Xr(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 Iue(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Tc(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=Tc(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 WT(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Fue={name:"autolink",tokenize:Bue};function Bue(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 cr(y)?(e.consume(y),a):y===64?n(y):f(y)}function a(y){return y===43||y===45||y===46||Jn(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||Jn(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||zg(y)?n(y):(e.consume(y),c)}function f(y){return y===64?(e.consume(y),h):Tue(y)?(e.consume(y),f):n(y)}function h(y){return Jn(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||Jn(y))&&r++<63){const b=y===45?g:p;return e.consume(y),b}return n(y)}}const fh={partial:!0,tokenize:Uue};function Uue(e,t,n){return r;function r(o){return xt(o)?Rt(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||Qe(o)?t(o):n(o)}}const c5={continuation:{tokenize:que},exit:Gue,name:"blockQuote",tokenize:Hue};function Hue(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 xt(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function que(e,t,n){const r=this;return i;function i(a){return xt(a)?Rt(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return e.attempt(c5,t,n)(a)}}function Gue(e){e.exit("blockQuote")}const f5={name:"characterEscape",tokenize:Vue};function Vue(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 Mue(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const d5={name:"characterReference",tokenize:Yue};function Yue(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=Jn,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=$ue,h):(e.enter("characterReferenceValue"),o=7,a=bw,h(p))}function h(p){if(p===59&&i){const g=e.exit("characterReferenceValue");return a===Jn&&!SC(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 XT={partial:!0,tokenize:Xue},KT={concrete:!0,name:"codeFenced",tokenize:Wue};function Wue(e,t,n){const r=this,i={partial:!0,tokenize:D};let o=0,a=0,u;return c;function c(T){return f(T)}function f(T){const $=r.events[r.events.length-1];return o=$&&$[1].type==="linePrefix"?$[2].sliceSerialize($[1],!0).length:0,u=T,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(T)}function h(T){return T===u?(a++,e.consume(T),h):a<3?n(T):(e.exit("codeFencedFenceSequence"),xt(T)?Rt(e,p,"whitespace")(T):p(T))}function p(T){return T===null||Qe(T)?(e.exit("codeFencedFence"),r.interrupt?t(T):e.check(XT,v,R)(T)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),g(T))}function g(T){return T===null||Qe(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(T)):xt(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Rt(e,y,"whitespace")(T)):T===96&&T===u?n(T):(e.consume(T),g)}function y(T){return T===null||Qe(T)?p(T):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(T))}function b(T){return T===null||Qe(T)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(T)):T===96&&T===u?n(T):(e.consume(T),b)}function v(T){return e.attempt(i,R,S)(T)}function S(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),w}function w(T){return o>0&&xt(T)?Rt(e,A,"linePrefix",o+1)(T):A(T)}function A(T){return T===null||Qe(T)?e.check(XT,v,R)(T):(e.enter("codeFlowValue"),k(T))}function k(T){return T===null||Qe(T)?(e.exit("codeFlowValue"),A(T)):(e.consume(T),k)}function R(T){return e.exit("codeFenced"),t(T)}function D(T,$,N){let F=0;return j;function j(U){return T.enter("lineEnding"),T.consume(U),T.exit("lineEnding"),z}function z(U){return T.enter("codeFencedFence"),xt(U)?Rt(T,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):M(U)}function M(U){return U===u?(T.enter("codeFencedFenceSequence"),q(U)):N(U)}function q(U){return U===u?(F++,T.consume(U),q):F>=a?(T.exit("codeFencedFenceSequence"),xt(U)?Rt(T,V,"whitespace")(U):V(U)):N(U)}function V(U){return U===null||Qe(U)?(T.exit("codeFencedFence"),$(U)):N(U)}}}function Xue(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 E1={name:"codeIndented",tokenize:Que},Kue={partial:!0,tokenize:Zue};function Que(e,t,n){const r=this;return i;function i(f){return e.enter("codeIndented"),Rt(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):Qe(f)?e.attempt(Kue,a,c)(f):(e.enter("codeFlowValue"),u(f))}function u(f){return f===null||Qe(f)?(e.exit("codeFlowValue"),a(f)):(e.consume(f),u)}function c(f){return e.exit("codeIndented"),t(f)}}function Zue(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):Qe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):Rt(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):Qe(a)?i(a):n(a)}}const Jue={name:"codeText",previous:tce,resolve:ece,tokenize:nce};function ece(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 tce(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function nce(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)):Qe(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||Qe(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 rce{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&&Kf(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),Kf(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Kf(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);Kf(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Kf(this.left,n.reverse())}}}function Kf(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 h5(e){const t={};let n=-1,r,i,o,a,u,c,f;const h=new rce(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,ice(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 Xr(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!f}function ice(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 w=u.slice(S[g],S[g+1]),A=o.pop();c.push([A,A+w.length-1]),e.splice(A,2,w)}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 oce={resolve:ace,tokenize:lce},sce={partial:!0,tokenize:uce};function ace(e){return h5(e),e}function lce(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):Qe(u)?e.check(sce,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 uce(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Rt(e,o,"linePrefix")}function o(a){if(a===null||Qe(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 p5(e,t,n,r,i,o,a,u,c){const f=c||Number.POSITIVE_INFINITY;let h=0;return p;function p(w){return w===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(w),e.exit(o),g):w===null||w===32||w===41||zg(w)?n(w):(e.enter(r),e.enter(a),e.enter(u),e.enter("chunkString",{contentType:"string"}),v(w))}function g(w){return w===62?(e.enter(o),e.consume(w),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),y(w))}function y(w){return w===62?(e.exit("chunkString"),e.exit(u),g(w)):w===null||w===60||Qe(w)?n(w):(e.consume(w),w===92?b:y)}function b(w){return w===60||w===62||w===92?(e.consume(w),y):y(w)}function v(w){return!h&&(w===null||w===41||Vt(w))?(e.exit("chunkString"),e.exit(u),e.exit(a),e.exit(r),t(w)):h<f&&w===40?(e.consume(w),h++,v):w===41?(e.consume(w),h--,v):w===null||w===32||w===40||zg(w)?n(w):(e.consume(w),w===92?S:v)}function S(w){return w===40||w===41||w===92?(e.consume(w),v):v(w)}}function m5(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):Qe(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||Qe(y)||u++>999?(e.exit("chunkString"),h(y)):(e.consume(y),c||(c=!xt(y)),y===92?g:p)}function g(y){return y===91||y===92||y===93?(e.consume(y),u++,p):p(y)}}function g5(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):Qe(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),Rt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===a||g===null||Qe(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 wd(e,t){let n;return r;function r(i){return Qe(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):xt(i)?Rt(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const cce={name:"definition",tokenize:dce},fce={partial:!0,tokenize:hce};function dce(e,t,n){const r=this;let i;return o;function o(y){return e.enter("definition"),a(y)}function a(y){return m5.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 Vt(y)?wd(e,f)(y):f(y)}function f(y){return p5(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function h(y){return e.attempt(fce,p,p)(y)}function p(y){return xt(y)?Rt(e,g,"whitespace")(y):g(y)}function g(y){return y===null||Qe(y)?(e.exit("definition"),r.parser.defined.push(i),t(y)):n(y)}}function hce(e,t,n){return r;function r(u){return Vt(u)?wd(e,i)(u):n(u)}function i(u){return g5(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function o(u){return xt(u)?Rt(e,a,"whitespace")(u):a(u)}function a(u){return u===null||Qe(u)?t(u):n(u)}}const pce={name:"hardBreakEscape",tokenize:mce};function mce(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return Qe(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const gce={name:"headingAtx",resolve:yce,tokenize:bce};function yce(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"},Xr(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function bce(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||Vt(h)?(e.exit("atxHeadingSequence"),u(h)):n(h)}function u(h){return h===35?(e.enter("atxHeadingSequence"),c(h)):h===null||Qe(h)?(e.exit("atxHeading"),t(h)):xt(h)?Rt(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||Vt(h)?(e.exit("atxHeadingText"),u(h)):(e.consume(h),f)}}const vce=["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"],QT=["pre","script","style","textarea"],xce={concrete:!0,name:"htmlFlow",resolveTo:Cce,tokenize:Ece},wce={partial:!0,tokenize:_ce},Sce={partial:!0,tokenize:kce};function Cce(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 Ece(e,t,n){const r=this;let i,o,a,u,c;return f;function f(B){return h(B)}function h(B){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(B),p}function p(B){return B===33?(e.consume(B),g):B===47?(e.consume(B),o=!0,v):B===63?(e.consume(B),i=3,r.interrupt?t:L):cr(B)?(e.consume(B),a=String.fromCharCode(B),S):n(B)}function g(B){return B===45?(e.consume(B),i=2,y):B===91?(e.consume(B),i=5,u=0,b):cr(B)?(e.consume(B),i=4,r.interrupt?t:L):n(B)}function y(B){return B===45?(e.consume(B),r.interrupt?t:L):n(B)}function b(B){const ae="CDATA[";return B===ae.charCodeAt(u++)?(e.consume(B),u===ae.length?r.interrupt?t:M:b):n(B)}function v(B){return cr(B)?(e.consume(B),a=String.fromCharCode(B),S):n(B)}function S(B){if(B===null||B===47||B===62||Vt(B)){const ae=B===47,te=a.toLowerCase();return!ae&&!o&&QT.includes(te)?(i=1,r.interrupt?t(B):M(B)):vce.includes(a.toLowerCase())?(i=6,ae?(e.consume(B),w):r.interrupt?t(B):M(B)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(B):o?A(B):k(B))}return B===45||Jn(B)?(e.consume(B),a+=String.fromCharCode(B),S):n(B)}function w(B){return B===62?(e.consume(B),r.interrupt?t:M):n(B)}function A(B){return xt(B)?(e.consume(B),A):j(B)}function k(B){return B===47?(e.consume(B),j):B===58||B===95||cr(B)?(e.consume(B),R):xt(B)?(e.consume(B),k):j(B)}function R(B){return B===45||B===46||B===58||B===95||Jn(B)?(e.consume(B),R):D(B)}function D(B){return B===61?(e.consume(B),T):xt(B)?(e.consume(B),D):k(B)}function T(B){return B===null||B===60||B===61||B===62||B===96?n(B):B===34||B===39?(e.consume(B),c=B,$):xt(B)?(e.consume(B),T):N(B)}function $(B){return B===c?(e.consume(B),c=null,F):B===null||Qe(B)?n(B):(e.consume(B),$)}function N(B){return B===null||B===34||B===39||B===47||B===60||B===61||B===62||B===96||Vt(B)?D(B):(e.consume(B),N)}function F(B){return B===47||B===62||xt(B)?k(B):n(B)}function j(B){return B===62?(e.consume(B),z):n(B)}function z(B){return B===null||Qe(B)?M(B):xt(B)?(e.consume(B),z):n(B)}function M(B){return B===45&&i===2?(e.consume(B),I):B===60&&i===1?(e.consume(B),P):B===62&&i===4?(e.consume(B),Y):B===63&&i===3?(e.consume(B),L):B===93&&i===5?(e.consume(B),W):Qe(B)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(wce,Q,q)(B)):B===null||Qe(B)?(e.exit("htmlFlowData"),q(B)):(e.consume(B),M)}function q(B){return e.check(Sce,V,Q)(B)}function V(B){return e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),U}function U(B){return B===null||Qe(B)?q(B):(e.enter("htmlFlowData"),M(B))}function I(B){return B===45?(e.consume(B),L):M(B)}function P(B){return B===47?(e.consume(B),a="",G):M(B)}function G(B){if(B===62){const ae=a.toLowerCase();return QT.includes(ae)?(e.consume(B),Y):M(B)}return cr(B)&&a.length<8?(e.consume(B),a+=String.fromCharCode(B),G):M(B)}function W(B){return B===93?(e.consume(B),L):M(B)}function L(B){return B===62?(e.consume(B),Y):B===45&&i===2?(e.consume(B),L):M(B)}function Y(B){return B===null||Qe(B)?(e.exit("htmlFlowData"),Q(B)):(e.consume(B),Y)}function Q(B){return e.exit("htmlFlow"),t(B)}}function kce(e,t,n){const r=this;return i;function i(a){return Qe(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 _ce(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(fh,t,n)}}const Ace={name:"htmlText",tokenize:Rce};function Rce(e,t,n){const r=this;let i,o,a;return u;function u(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),c}function c(L){return L===33?(e.consume(L),f):L===47?(e.consume(L),D):L===63?(e.consume(L),k):cr(L)?(e.consume(L),N):n(L)}function f(L){return L===45?(e.consume(L),h):L===91?(e.consume(L),o=0,b):cr(L)?(e.consume(L),A):n(L)}function h(L){return L===45?(e.consume(L),y):n(L)}function p(L){return L===null?n(L):L===45?(e.consume(L),g):Qe(L)?(a=p,P(L)):(e.consume(L),p)}function g(L){return L===45?(e.consume(L),y):p(L)}function y(L){return L===62?I(L):L===45?g(L):p(L)}function b(L){const Y="CDATA[";return L===Y.charCodeAt(o++)?(e.consume(L),o===Y.length?v:b):n(L)}function v(L){return L===null?n(L):L===93?(e.consume(L),S):Qe(L)?(a=v,P(L)):(e.consume(L),v)}function S(L){return L===93?(e.consume(L),w):v(L)}function w(L){return L===62?I(L):L===93?(e.consume(L),w):v(L)}function A(L){return L===null||L===62?I(L):Qe(L)?(a=A,P(L)):(e.consume(L),A)}function k(L){return L===null?n(L):L===63?(e.consume(L),R):Qe(L)?(a=k,P(L)):(e.consume(L),k)}function R(L){return L===62?I(L):k(L)}function D(L){return cr(L)?(e.consume(L),T):n(L)}function T(L){return L===45||Jn(L)?(e.consume(L),T):$(L)}function $(L){return Qe(L)?(a=$,P(L)):xt(L)?(e.consume(L),$):I(L)}function N(L){return L===45||Jn(L)?(e.consume(L),N):L===47||L===62||Vt(L)?F(L):n(L)}function F(L){return L===47?(e.consume(L),I):L===58||L===95||cr(L)?(e.consume(L),j):Qe(L)?(a=F,P(L)):xt(L)?(e.consume(L),F):I(L)}function j(L){return L===45||L===46||L===58||L===95||Jn(L)?(e.consume(L),j):z(L)}function z(L){return L===61?(e.consume(L),M):Qe(L)?(a=z,P(L)):xt(L)?(e.consume(L),z):F(L)}function M(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(e.consume(L),i=L,q):Qe(L)?(a=M,P(L)):xt(L)?(e.consume(L),M):(e.consume(L),V)}function q(L){return L===i?(e.consume(L),i=void 0,U):L===null?n(L):Qe(L)?(a=q,P(L)):(e.consume(L),q)}function V(L){return L===null||L===34||L===39||L===60||L===61||L===96?n(L):L===47||L===62||Vt(L)?F(L):(e.consume(L),V)}function U(L){return L===47||L===62||Vt(L)?F(L):n(L)}function I(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),t):n(L)}function P(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),G}function G(L){return xt(L)?Rt(e,W,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):W(L)}function W(L){return e.enter("htmlTextData"),a(L)}}const CC={name:"labelEnd",resolveAll:Mce,resolveTo:Oce,tokenize:Nce},Dce={tokenize:Lce},Tce={tokenize:jce},$ce={tokenize:zce};function Mce(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&&Xr(e,0,e.length,n),e}function Oce(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=bi(u,e.slice(o+1,o+r+3)),u=bi(u,[["enter",h,t]]),u=bi(u,Py(t.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),t)),u=bi(u,[["exit",h,t],e[a-2],e[a-1],["exit",f,t]]),u=bi(u,e.slice(a+1)),u=bi(u,[["exit",c,t]]),Xr(e,o,e.length,u),e}function Nce(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(Dce,h,a?h:p)(g):g===91?e.attempt(Tce,h,a?f:p)(g):a?h(g):p(g)}function f(g){return e.attempt($ce,h,p)(g)}function h(g){return t(g)}function p(g){return o._balanced=!0,n(g)}}function Lce(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 Vt(p)?wd(e,o)(p):o(p)}function o(p){return p===41?h(p):p5(e,a,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function a(p){return Vt(p)?wd(e,c)(p):h(p)}function u(p){return n(p)}function c(p){return p===34||p===39||p===40?g5(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):h(p)}function f(p){return Vt(p)?wd(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 jce(e,t,n){const r=this;return i;function i(u){return m5.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 zce(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 Pce={name:"labelStartImage",resolveAll:CC.resolveAll,tokenize:Ice};function Ice(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 Fce={name:"labelStartLink",resolveAll:CC.resolveAll,tokenize:Bce};function Bce(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 k1={name:"lineEnding",tokenize:Uce};function Uce(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Rt(e,t,"linePrefix")}}const jm={name:"thematicBreak",tokenize:Hce};function Hce(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||Qe(f))?(e.exit("thematicBreak"),t(f)):n(f)}function c(f){return f===i?(e.consume(f),r++,c):(e.exit("thematicBreakSequence"),xt(f)?Rt(e,u,"whitespace")(f):u(f))}}const Sr={continuation:{tokenize:Yce},exit:Xce,name:"list",tokenize:Vce},qce={partial:!0,tokenize:Kce},Gce={partial:!0,tokenize:Wce};function Vce(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:bw(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(jm,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 bw(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(fh,r.interrupt?n:h,e.attempt(qce,g,p))}function h(y){return r.containerState.initialBlankLine=!0,o++,g(y)}function p(y){return xt(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 Yce(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(fh,i,o);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Rt(e,t,"listItemIndent",r.containerState.size+1)(u)}function o(u){return r.containerState.furtherBlankLines||!xt(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(Gce,t,a)(u))}function a(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,Rt(e,e.attempt(Sr,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function Wce(e,t,n){const r=this;return Rt(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 Xce(e){e.exit(this.containerState.type)}function Kce(e,t,n){const r=this;return Rt(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!xt(o)&&a&&a[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const ZT={name:"setextUnderline",resolveTo:Qce,tokenize:Zce};function Qce(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 Zce(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"),xt(f)?Rt(e,c,"lineSuffix")(f):c(f))}function c(f){return f===null||Qe(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const Jce={tokenize:efe};function efe(e){const t=this,n=e.attempt(fh,r,e.attempt(this.parser.constructs.flowInitial,i,Rt(e,e.attempt(this.parser.constructs.flow,i,e.attempt(oce,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 tfe={resolveAll:b5()},nfe=y5("string"),rfe=y5("text");function y5(e){return{resolveAll:b5(e==="text"?ife: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 b5(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 ife(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 ofe={42:Sr,43:Sr,45:Sr,48:Sr,49:Sr,50:Sr,51:Sr,52:Sr,53:Sr,54:Sr,55:Sr,56:Sr,57:Sr,62:c5},sfe={91:cce},afe={[-2]:E1,[-1]:E1,32:E1},lfe={35:gce,42:jm,45:[ZT,jm],60:xce,61:ZT,95:jm,96:KT,126:KT},ufe={38:d5,92:f5},cfe={[-5]:k1,[-4]:k1,[-3]:k1,33:Pce,38:d5,42:vw,60:[Fue,Ace],91:Fce,92:[pce,f5],93:CC,95:vw,96:Jue},ffe={null:[vw,tfe]},dfe={null:[42,95]},hfe={null:[]},pfe=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:dfe,contentInitial:sfe,disable:hfe,document:ofe,flow:lfe,flowInitial:afe,insideSpan:ffe,string:ufe,text:cfe},Symbol.toStringTag,{value:"Module"}));function mfe(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:$(D),check:$(T),consume:A,enter:k,exit:R,interrupt:$(T,{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(z){return a=bi(a,z),S(),a[a.length-1]!==null?[]:(N(t,0),f.events=Py(o,f.events,f),f.events)}function g(z,M){return yfe(y(z),M)}function y(z){return gfe(a,z)}function b(){const{_bufferIndex:z,_index:M,line:q,column:V,offset:U}=r;return{_bufferIndex:z,_index:M,line:q,column:V,offset:U}}function v(z){i[z.line]=z.column,j()}function S(){let z;for(;r._index<a.length;){const M=a[r._index];if(typeof M=="string")for(z=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===z&&r._bufferIndex<M.length;)w(M.charCodeAt(r._bufferIndex));else w(M)}}function w(z){h=h(z)}function A(z){Qe(z)?(r.line++,r.column=1,r.offset+=z===-3?2:1,j()):z!==-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=z}function k(z,M){const q=M||{};return q.type=z,q.start=b(),f.events.push(["enter",q,f]),u.push(q),q}function R(z){const M=u.pop();return M.end=b(),f.events.push(["exit",M,f]),M}function D(z,M){N(z,M.from)}function T(z,M){M.restore()}function $(z,M){return q;function q(V,U,I){let P,G,W,L;return Array.isArray(V)?Q(V):"tokenize"in V?Q([V]):Y(V);function Y(me){return Ce;function Ce(Re){const pe=Re!==null&&me[Re],Oe=Re!==null&&me.null,Pe=[...Array.isArray(pe)?pe:pe?[pe]:[],...Array.isArray(Oe)?Oe:Oe?[Oe]:[]];return Q(Pe)(Re)}}function Q(me){return P=me,G=0,me.length===0?I:B(me[G])}function B(me){return Ce;function Ce(Re){return L=F(),W=me,me.partial||(f.currentConstruct=me),me.name&&f.parser.constructs.disable.null.includes(me.name)?te():me.tokenize.call(M?Object.assign(Object.create(f),M):f,c,ae,te)(Re)}}function ae(me){return z(W,L),U}function te(me){return L.restore(),++G<P.length?B(P[G]):I}}}function N(z,M){z.resolveAll&&!o.includes(z)&&o.push(z),z.resolve&&Xr(f.events,M,f.events.length-M,z.resolve(f.events.slice(M),f)),z.resolveTo&&(f.events=z.resolveTo(f.events,f))}function F(){const z=b(),M=f.previous,q=f.currentConstruct,V=f.events.length,U=Array.from(u);return{from:V,restore:I};function I(){r=z,f.previous=M,f.currentConstruct=q,f.events.length=V,u=U,j()}}function j(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function gfe(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 yfe(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=`
|
|
504
|
+
`;break}case-3:{a=`\r
|
|
505
|
+
`;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 bfe(e){const r={constructs:l5([pfe,...(e||{}).extensions||[]]),content:i(Oue),defined:[],document:i(Lue),flow:i(Jce),lazy:{},string:i(nfe),text:i(rfe)};return r;function i(o){return a;function a(u){return mfe(r,o,u)}}}function vfe(e){for(;!h5(e););return e}const JT=/[\0\t\n\r]/g;function xfe(){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(JT.lastIndex=p,f=JT.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 wfe=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Sfe(e){return e.replace(wfe,Cfe)}function Cfe(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return u5(n.slice(o?2:1),o?16:10)}return SC(n)||e}const v5={}.hasOwnProperty;function Efe(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),kfe(n)(vfe(bfe(n).document().write(xfe()(e,t,!0))))}function kfe(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(re),autolinkProtocol:F,autolinkEmail:F,atxHeading:o(Ee),blockQuote:o(Oe),characterEscape:F,characterReference:F,codeFenced:o(Pe),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(Pe,a),codeText:o(Z,a),codeTextData:F,data:F,codeFlowValue:F,definition:o(K),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(ee),hardBreakEscape:o(he),hardBreakTrailing:o(he),htmlFlow:o(_e,a),htmlFlowData:F,htmlText:o(_e,a),htmlTextData:F,image:o(ue),label:a,link:o(re),listItem:o(oe),listItemValue:g,listOrdered:o(ce,p),listUnordered:o(ce),paragraph:o(Ae),reference:B,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(Ee),strong:o(Ne),thematicBreak:o($e)},exit:{atxHeading:c(),atxHeadingSequence:D,autolink:c(),autolinkEmail:pe,autolinkProtocol:Re,blockQuote:c(),characterEscapeValue:j,characterReferenceMarkerHexadecimal:te,characterReferenceMarkerNumeric:te,characterReferenceValue:me,characterReference:Ce,codeFenced:c(S),codeFencedFence:v,codeFencedFenceInfo:y,codeFencedFenceMeta:b,codeFlowValue:j,codeIndented:c(w),codeText:c(U),codeTextData:j,data:j,definition:c(),definitionDestinationString:R,definitionLabelString:A,definitionTitleString:k,emphasis:c(),hardBreakEscape:c(M),hardBreakTrailing:c(M),htmlFlow:c(q),htmlFlowData:j,htmlText:c(V),htmlTextData:j,image:c(P),label:W,labelText:G,lineEnding:z,link:c(I),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ae,resourceDestinationString:L,resourceTitleString:Y,resource:Q,setextHeading:c(N),setextHeadingLineSequence:$,setextHeadingText:T,strong:c(),thematicBreak:c()}};x5(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(le){let we={type:"root",children:[]};const be={stack:[we],tokenStack:[],config:t,enter:u,exit:f,buffer:a,resume:h,data:n},Te=[];let je=-1;for(;++je<le.length;)if(le[je][1].type==="listOrdered"||le[je][1].type==="listUnordered")if(le[je][0]==="enter")Te.push(je);else{const rt=Te.pop();je=i(le,rt,je)}for(je=-1;++je<le.length;){const rt=t[le[je][0]];v5.call(rt,le[je][1].type)&&rt[le[je][1].type].call(Object.assign({sliceSerialize:le[je][2].sliceSerialize},be),le[je][1])}if(be.tokenStack.length>0){const rt=be.tokenStack[be.tokenStack.length-1];(rt[1]||e$).call(be,void 0,rt[0])}for(we.position={start:Ps(le.length>0?le[0][1].start:{line:1,column:1,offset:0}),end:Ps(le.length>0?le[le.length-2][1].end:{line:1,column:1,offset:0})},je=-1;++je<t.transforms.length;)we=t.transforms[je](we)||we;return we}function i(le,we,be){let Te=we-1,je=-1,rt=!1,Mt,At,Xe,gt;for(;++Te<=be;){const De=le[Te];switch(De[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{De[0]==="enter"?je++:je--,gt=void 0;break}case"lineEndingBlank":{De[0]==="enter"&&(Mt&&!gt&&!je&&!Xe&&(Xe=Te),gt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:gt=void 0}if(!je&&De[0]==="enter"&&De[1].type==="listItemPrefix"||je===-1&&De[0]==="exit"&&(De[1].type==="listUnordered"||De[1].type==="listOrdered")){if(Mt){let We=Te;for(At=void 0;We--;){const ot=le[We];if(ot[1].type==="lineEnding"||ot[1].type==="lineEndingBlank"){if(ot[0]==="exit")continue;At&&(le[At][1].type="lineEndingBlank",rt=!0),ot[1].type="lineEnding",At=We}else if(!(ot[1].type==="linePrefix"||ot[1].type==="blockQuotePrefix"||ot[1].type==="blockQuotePrefixWhitespace"||ot[1].type==="blockQuoteMarker"||ot[1].type==="listItemIndent"))break}Xe&&(!At||Xe<At)&&(Mt._spread=!0),Mt.end=Object.assign({},At?le[At][1].start:De[1].end),le.splice(At||Te,0,["exit",Mt,De[2]]),Te++,be++}if(De[1].type==="listItemPrefix"){const We={type:"listItem",_spread:!1,start:Object.assign({},De[1].start),end:void 0};Mt=We,le.splice(Te,0,["enter",We,De[2]]),Te++,be++,Xe=void 0,gt=!0}}}return le[we][1]._spread=rt,be}function o(le,we){return be;function be(Te){u.call(this,le(Te),Te),we&&we.call(this,Te)}}function a(){this.stack.push({type:"fragment",children:[]})}function u(le,we,be){this.stack[this.stack.length-1].children.push(le),this.stack.push(le),this.tokenStack.push([we,be||void 0]),le.position={start:Ps(we.start),end:void 0}}function c(le){return we;function we(be){le&&le.call(this,be),f.call(this,be)}}function f(le,we){const be=this.stack.pop(),Te=this.tokenStack.pop();if(Te)Te[0].type!==le.type&&(we?we.call(this,le,Te[0]):(Te[1]||e$).call(this,le,Te[0]));else throw new Error("Cannot close `"+le.type+"` ("+xd({start:le.start,end:le.end})+"): it’s not open");be.position.end=Ps(le.end)}function h(){return wC(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function g(le){if(this.data.expectingFirstListItemValue){const we=this.stack[this.stack.length-2];we.start=Number.parseInt(this.sliceSerialize(le),10),this.data.expectingFirstListItemValue=void 0}}function y(){const le=this.resume(),we=this.stack[this.stack.length-1];we.lang=le}function b(){const le=this.resume(),we=this.stack[this.stack.length-1];we.meta=le}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const le=this.resume(),we=this.stack[this.stack.length-1];we.value=le.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function w(){const le=this.resume(),we=this.stack[this.stack.length-1];we.value=le.replace(/(\r?\n|\r)$/g,"")}function A(le){const we=this.resume(),be=this.stack[this.stack.length-1];be.label=we,be.identifier=Fi(this.sliceSerialize(le)).toLowerCase()}function k(){const le=this.resume(),we=this.stack[this.stack.length-1];we.title=le}function R(){const le=this.resume(),we=this.stack[this.stack.length-1];we.url=le}function D(le){const we=this.stack[this.stack.length-1];if(!we.depth){const be=this.sliceSerialize(le).length;we.depth=be}}function T(){this.data.setextHeadingSlurpLineEnding=!0}function $(le){const we=this.stack[this.stack.length-1];we.depth=this.sliceSerialize(le).codePointAt(0)===61?1:2}function N(){this.data.setextHeadingSlurpLineEnding=void 0}function F(le){const be=this.stack[this.stack.length-1].children;let Te=be[be.length-1];(!Te||Te.type!=="text")&&(Te=ve(),Te.position={start:Ps(le.start),end:void 0},be.push(Te)),this.stack.push(Te)}function j(le){const we=this.stack.pop();we.value+=this.sliceSerialize(le),we.position.end=Ps(le.end)}function z(le){const we=this.stack[this.stack.length-1];if(this.data.atHardBreak){const be=we.children[we.children.length-1];be.position.end=Ps(le.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(we.type)&&(F.call(this,le),j.call(this,le))}function M(){this.data.atHardBreak=!0}function q(){const le=this.resume(),we=this.stack[this.stack.length-1];we.value=le}function V(){const le=this.resume(),we=this.stack[this.stack.length-1];we.value=le}function U(){const le=this.resume(),we=this.stack[this.stack.length-1];we.value=le}function I(){const le=this.stack[this.stack.length-1];if(this.data.inReference){const we=this.data.referenceType||"shortcut";le.type+="Reference",le.referenceType=we,delete le.url,delete le.title}else delete le.identifier,delete le.label;this.data.referenceType=void 0}function P(){const le=this.stack[this.stack.length-1];if(this.data.inReference){const we=this.data.referenceType||"shortcut";le.type+="Reference",le.referenceType=we,delete le.url,delete le.title}else delete le.identifier,delete le.label;this.data.referenceType=void 0}function G(le){const we=this.sliceSerialize(le),be=this.stack[this.stack.length-2];be.label=Sfe(we),be.identifier=Fi(we).toLowerCase()}function W(){const le=this.stack[this.stack.length-1],we=this.resume(),be=this.stack[this.stack.length-1];if(this.data.inReference=!0,be.type==="link"){const Te=le.children;be.children=Te}else be.alt=we}function L(){const le=this.resume(),we=this.stack[this.stack.length-1];we.url=le}function Y(){const le=this.resume(),we=this.stack[this.stack.length-1];we.title=le}function Q(){this.data.inReference=void 0}function B(){this.data.referenceType="collapsed"}function ae(le){const we=this.resume(),be=this.stack[this.stack.length-1];be.label=we,be.identifier=Fi(this.sliceSerialize(le)).toLowerCase(),this.data.referenceType="full"}function te(le){this.data.characterReferenceType=le.type}function me(le){const we=this.sliceSerialize(le),be=this.data.characterReferenceType;let Te;be?(Te=u5(we,be==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Te=SC(we);const je=this.stack[this.stack.length-1];je.value+=Te}function Ce(le){const we=this.stack.pop();we.position.end=Ps(le.end)}function Re(le){j.call(this,le);const we=this.stack[this.stack.length-1];we.url=this.sliceSerialize(le)}function pe(le){j.call(this,le);const we=this.stack[this.stack.length-1];we.url="mailto:"+this.sliceSerialize(le)}function Oe(){return{type:"blockquote",children:[]}}function Pe(){return{type:"code",lang:null,meta:null,value:""}}function Z(){return{type:"inlineCode",value:""}}function K(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ee(){return{type:"emphasis",children:[]}}function Ee(){return{type:"heading",depth:0,children:[]}}function he(){return{type:"break"}}function _e(){return{type:"html",value:""}}function ue(){return{type:"image",title:null,url:"",alt:null}}function re(){return{type:"link",title:null,url:"",children:[]}}function ce(le){return{type:"list",ordered:le.type==="listOrdered",start:null,spread:le._spread,children:[]}}function oe(le){return{type:"listItem",spread:le._spread,checked:null,children:[]}}function Ae(){return{type:"paragraph",children:[]}}function Ne(){return{type:"strong",children:[]}}function ve(){return{type:"text",value:""}}function $e(){return{type:"thematicBreak"}}}function Ps(e){return{line:e.line,column:e.column,offset:e.offset}}function x5(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?x5(e,r):_fe(e,r)}}function _fe(e,t){let n;for(n in t)if(v5.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 e$(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+xd({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+xd({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+xd({start:t.start,end:t.end})+") is still open")}function Afe(e){const t=this;t.parser=n;function n(r){return Efe(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Rfe(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 Dfe(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
506
|
+
`}]}function Tfe(e,t){const n=t.value?t.value+`
|
|
507
|
+
`:"",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 $fe(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Mfe(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ofe(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Gc(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 Nfe(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 Lfe(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function w5(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 jfe(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return w5(e,t);const i={src:Gc(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 zfe(e,t){const n={src:Gc(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 Pfe(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 Ife(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return w5(e,t);const i={href:Gc(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 Ffe(e,t){const n={href:Gc(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 Bfe(e,t,n){const r=e.all(t),i=n?Ufe(n):S5(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:`
|
|
508
|
+
`}),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:`
|
|
509
|
+
`});const f={type:"element",tagName:"li",properties:o,children:a};return e.patch(t,f),e.applyData(t,f)}function Ufe(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=S5(n[r])}return t}function S5(e){const t=e.spread;return t??e.children.length>1}function Hfe(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 qfe(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Gfe(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Vfe(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Yfe(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=yC(t.children[1]),c=t5(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 Wfe(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 Xfe(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const t$=9,n$=32;function Kfe(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(r$(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(r$(t.slice(i),i>0,!1)),o.join("")}function r$(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===t$||o===n$;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===t$||o===n$;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Qfe(e,t){const n={type:"text",value:Kfe(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Zfe(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Jfe={blockquote:Rfe,break:Dfe,code:Tfe,delete:$fe,emphasis:Mfe,footnoteReference:Ofe,heading:Nfe,html:Lfe,imageReference:jfe,image:zfe,inlineCode:Pfe,linkReference:Ife,link:Ffe,listItem:Bfe,list:Hfe,paragraph:qfe,root:Gfe,strong:Vfe,table:Yfe,tableCell:Xfe,tableRow:Wfe,text:Qfe,thematicBreak:Zfe,toml:hm,yaml:hm,definition:hm,footnoteDefinition:hm};function hm(){}const C5=-1,Iy=0,Sd=1,Pg=2,EC=3,kC=4,_C=5,AC=6,E5=7,k5=8,i$=typeof self=="object"?self:globalThis,ede=(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 Iy:case C5:return n(a,i);case Sd:{const u=n([],i);for(const c of a)u.push(r(c));return u}case Pg:{const u=n({},i);for(const[c,f]of a)u[r(c)]=r(f);return u}case EC:return n(new Date(a),i);case kC:{const{source:u,flags:c}=a;return n(new RegExp(u,c),i)}case _C:{const u=n(new Map,i);for(const[c,f]of a)u.set(r(c),r(f));return u}case AC:{const u=n(new Set,i);for(const c of a)u.add(r(c));return u}case E5:{const{name:u,message:c}=a;return n(new i$[u](c),i)}case k5: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 i$[o](a),i)};return r},o$=e=>ede(new Map,e)(0),Iu="",{toString:tde}={},{keys:nde}=Object,Qf=e=>{const t=typeof e;if(t!=="object"||!e)return[Iy,t];const n=tde.call(e).slice(8,-1);switch(n){case"Array":return[Sd,Iu];case"Object":return[Pg,Iu];case"Date":return[EC,Iu];case"RegExp":return[kC,Iu];case"Map":return[_C,Iu];case"Set":return[AC,Iu];case"DataView":return[Sd,n]}return n.includes("Array")?[Sd,n]:n.includes("Error")?[E5,n]:[Pg,n]},pm=([e,t])=>e===Iy&&(t==="function"||t==="symbol"),rde=(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]=Qf(a);switch(u){case Iy:{let h=a;switch(c){case"bigint":u=k5,h=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);h=null;break;case"undefined":return i([C5],a)}return i([u,h],a)}case Sd:{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 Pg:{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 nde(a))(e||!pm(Qf(a[g])))&&h.push([o(g),o(a[g])]);return p}case EC:return i([u,a.toISOString()],a);case kC:{const{source:h,flags:p}=a;return i([u,{source:h,flags:p}],a)}case _C:{const h=[],p=i([u,h],a);for(const[g,y]of a)(e||!(pm(Qf(g))||pm(Qf(y))))&&h.push([o(g),o(y)]);return p}case AC:{const h=[],p=i([u,h],a);for(const g of a)(e||!pm(Qf(g)))&&h.push(o(g));return p}}const{message:f}=a;return i([u,{name:c,message:f}],a)};return o},s$=(e,{json:t,lossy:n}={})=>{const r=[];return rde(!(t||n),!!t,new Map,r)(e),r},Ig=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?o$(s$(e,t)):structuredClone(e):(e,t)=>o$(s$(e,t));function ide(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 ode(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function sde(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||ide,r=e.options.footnoteBackLabel||ode,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=Gc(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 A=typeof n=="string"?n:n(c,y);typeof A=="string"&&(A={type:"text",value:A}),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(A)?A:[A]})}const S=h[h.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const A=S.children[S.children.length-1];A&&A.type==="text"?A.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...b)}else h.push(...b);const w={type:"element",tagName:"li",properties:{id:t+"fn-"+g},children:e.wrap(h,!0)};e.patch(f,w),u.push(w)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Ig(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
510
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
|
|
511
|
+
`}]}}const Fy=(function(e){if(e==null)return cde;if(typeof e=="function")return By(e);if(typeof e=="object")return Array.isArray(e)?ade(e):lde(e);if(typeof e=="string")return ude(e);throw new Error("Expected function, string, or object as test")});function ade(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Fy(e[n]);return By(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function lde(e){const t=e;return By(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function ude(e){return By(t);function t(n){return n&&n.type===e}}function By(e){return t;function t(n,r,i){return!!(fde(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function cde(){return!0}function fde(e){return e!==null&&typeof e=="object"&&"type"in e}const _5=[],dde=!0,xw=!1,hde="skip";function A5(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=Fy(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=_5,b,v,S;if((!t||o(c,f,h[h.length-1]||void 0))&&(y=pde(n(c,h)),y[0]===xw))return y;if("children"in c&&c.children){const w=c;if(w.children&&y[0]!==hde)for(v=(r?w.children.length:-1)+a,S=h.concat(w);v>-1&&v<w.children.length;){const A=w.children[v];if(b=u(A,v,S)(),b[0]===xw)return b;v=typeof b[1]=="number"?b[1]:v+a}}return y}}}function pde(e){return Array.isArray(e)?e:typeof e=="number"?[dde,e]:e==null?_5:[e]}function Uy(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),A5(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 ww={}.hasOwnProperty,mde={};function gde(e,t){const n=t||mde,r=new Map,i=new Map,o=new Map,a={...Jfe,...n.handlers},u={all:f,applyData:bde,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:a,one:c,options:n,patch:yde,wrap:xde};return Uy(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(ww.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,w=Ig(S);return w.children=u.all(h),w}return Ig(h)}return(u.options.unknownHandler||vde)(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=a$(b.value)),!Array.isArray(b)&&b.type==="element")){const v=b.children[0];v&&v.type==="text"&&(v.value=a$(v.value))}Array.isArray(b)?p.push(...b):p.push(b)}}}return p}}function yde(e,t){e.position&&(t.position=oue(e))}function bde(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,Ig(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function vde(e,t){const n=t.data||{},r="value"in t&&!(ww.call(n,"hProperties")||ww.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 xde(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
512
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
513
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
514
|
+
`}),n}function a$(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function l$(e,t){const n=gde(e,t),r=n.one(e,void 0),i=sde(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
|
|
515
|
+
`},i),o}function wde(e,t){return e&&"run"in e?async function(n,r){const i=l$(n,{file:r,...t});await e.run(i,r)}:function(n,r){return l$(n,{file:r,...e||t})}}function u$(e){if(e)throw e}var _1,c$;function Sde(){if(c$)return _1;c$=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 _1=function c(){var f,h,p,g,y,b,v=arguments[0],S=1,w=arguments.length,A=!1;for(typeof v=="boolean"&&(A=v,v=arguments[1]||{},S=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});S<w;++S)if(f=arguments[S],f!=null)for(h in f)p=u(v,h),g=u(f,h),v!==g&&(A&&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(A,b,g)})):typeof g<"u"&&a(v,{name:h,newValue:g}));return v},_1}var Cde=Sde();const A1=Rw(Cde);function Sw(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 Ede(){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?kde(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 kde(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:_de,dirname:Ade,extname:Rde,join:Dde,sep:"/"};function _de(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');dh(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 Ade(e){if(dh(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 Rde(e){dh(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 Dde(...e){let t=-1,n;for(;++t<e.length;)dh(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Tde(n)}function Tde(e){dh(e);const t=e.codePointAt(0)===47;let n=$de(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function $de(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 dh(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Mde={cwd:Ode};function Ode(){return"/"}function Cw(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Nde(e){if(typeof e=="string")e=new URL(e);else if(!Cw(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 Lde(e)}function Lde(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 R1=["history","path","basename","stem","extname","dirname"];class R5{constructor(t){let n;t?Cw(t)?n={path:t}:typeof t=="string"||jde(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Mde.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<R1.length;){const o=R1[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)R1.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Ki.basename(this.path):void 0}set basename(t){T1(t,"basename"),D1(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){f$(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(D1(t,"extname"),f$(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){Cw(t)&&(t=Nde(t)),T1(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){T1(t,"stem"),D1(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 nr(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 D1(e,t){if(e&&e.includes(Ki.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ki.sep+"`")}function T1(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function f$(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function jde(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const zde=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),Pde={}.hasOwnProperty;class RC extends zde{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=Ede()}copy(){const t=new RC;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(A1(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(O1("data",this.frozen),this.namespace[t]=n,this):Pde.call(this.namespace,t)&&this.namespace[t]||void 0:t?(O1("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=mm(t),r=this.parser||this.Parser;return $1("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),$1("process",this.parser||this.Parser),M1("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,a){const u=mm(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);Bde(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(),$1("processSync",this.parser||this.Parser),M1("processSync",this.compiler||this.Compiler),this.process(t,i),h$("processSync","process",n),r;function i(o,a){n=!0,u$(o),r=a}}run(t,n,r){d$(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=mm(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),h$("runSync","run",r),i;function o(a,u){u$(a),i=u,r=!0}}stringify(t,n){this.freeze();const r=mm(n),i=this.compiler||this.Compiler;return M1("stringify",i),d$(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(O1("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=A1(!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];Sw(v)&&Sw(y)&&(y=A1(!0,v,y)),r[g]=[f,y,...b]}}}}const Ide=new RC().freeze();function $1(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function M1(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function O1(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 d$(e){if(!Sw(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function h$(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function mm(e){return Fde(e)?e:new R5(e)}function Fde(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Bde(e){return typeof e=="string"||Ude(e)}function Ude(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Hde="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",p$=[],m$={allowDangerousHtml:!0},qde=/^(https?|ircs?|mailto|xmpp)$/i,Gde=[{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 Vde(e){const t=Yde(e),n=Wde(e);return Xde(t.runSync(t.parse(n),n),e)}function Yde(e){const t=e.rehypePlugins||p$,n=e.remarkPlugins||p$,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...m$}:m$;return Ide().use(Afe).use(n).use(wde,r).use(t)}function Wde(e){const t=e.children||"",n=new R5;return typeof t=="string"&&(n.value=t),n}function Xde(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,a=t.skipHtml,u=t.unwrapDisallowed,c=t.urlTransform||Kde;for(const h of Gde)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+Hde+h.id,void 0);return Uy(e,f),cue(e,{Fragment:_.Fragment,components:i,ignoreInvalidStyle:!0,jsx:_.jsx,jsxs:_.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 C1)if(Object.hasOwn(C1,y)&&Object.hasOwn(h.properties,y)){const b=h.properties[y],v=C1[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 Kde(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||qde.test(e.slice(0,t))?e:""}const Qde=/[\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,Zde=Object.hasOwnProperty;class Jde{constructor(){this.occurrences,this.reset()}slug(t,n){const r=this;let i=ehe(t,n===!0);const o=i;for(;Zde.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 ehe(e,t){return typeof e!="string"?"":(t||(e=e.toLowerCase()),e.replace(Qde,"").replace(/ /g,"-"))}function the(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 nhe(e){return"children"in e?D5(e):"value"in e?e.value:""}function rhe(e){return e.type==="text"?e.value:"children"in e?D5(e):""}function D5(e){let t=-1;const n=[];for(;++t<e.children.length;)n[t]=rhe(e.children[t]);return n.join("")}const ihe={},g$=new Jde;function ohe(e){const n=(e||ihe).prefix||"";return function(r){g$.reset(),Uy(r,"element",function(i){the(i)&&!i.properties.id&&(i.properties.id=n+g$.slug(nhe(i)))})}}function she(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function ahe(e,t,n){const i=Fy((n||{}).ignore||[]),o=lhe(t);let a=-1;for(;++a<o.length;)A5(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 w=!1,A=[];g.lastIndex=0;let k=g.exec(f.value);for(;k;){const R=k.index,D={index:k.index,input:k.input,stack:[...h,f]};let T=y(...k,D);if(typeof T=="string"&&(T=T.length>0?{type:"text",value:T}:void 0),T===!1?g.lastIndex=R+1:(b!==R&&A.push({type:"text",value:f.value.slice(b,R)}),Array.isArray(T)?A.push(...T):T&&A.push(T),b=R+k[0].length,w=!0),!g.global)break;k=g.exec(f.value)}return w?(b<f.value.length&&A.push({type:"text",value:f.value.slice(b)}),p.children.splice(S,1,...A)):A=[f],S+A.length}}function lhe(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([uhe(i[0]),che(i[1])])}return t}function uhe(e){return typeof e=="string"?new RegExp(she(e),"g"):e}function che(e){return typeof e=="function"?e:function(){return e}}const N1="phrasing",L1=["autolink","link","image","label"];function fhe(){return{transforms:[bhe],enter:{literalAutolink:hhe,literalAutolinkEmail:j1,literalAutolinkHttp:j1,literalAutolinkWww:j1},exit:{literalAutolink:yhe,literalAutolinkEmail:ghe,literalAutolinkHttp:phe,literalAutolinkWww:mhe}}}function dhe(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:N1,notInConstruct:L1},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:N1,notInConstruct:L1},{character:":",before:"[ps]",after:"\\/",inConstruct:N1,notInConstruct:L1}]}}function hhe(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function j1(e){this.config.enter.autolinkProtocol.call(this,e)}function phe(e){this.config.exit.autolinkProtocol.call(this,e)}function mhe(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 ghe(e){this.config.exit.autolinkEmail.call(this,e)}function yhe(e){this.exit(e)}function bhe(e){ahe(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,vhe],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),xhe]],{ignore:["link","linkReference"]})}function vhe(e,t,n,r,i){let o="";if(!T5(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!whe(n)))return!1;const a=She(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 xhe(e,t,n,r){return!T5(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function whe(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 She(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=cg(e,"(");let o=cg(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 T5(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Fl(n)||zy(n))&&(!t||n!==47)}$5.peek=$he;function Che(){this.buffer()}function Ehe(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function khe(){this.buffer()}function _he(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Ahe(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 Rhe(e){this.exit(e)}function Dhe(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 The(e){this.exit(e)}function $he(){return"["}function $5(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 Mhe(){return{enter:{gfmFootnoteCallString:Che,gfmFootnoteCall:Ehe,gfmFootnoteDefinitionLabelString:khe,gfmFootnoteDefinition:_he},exit:{gfmFootnoteCallString:Ahe,gfmFootnoteCall:Rhe,gfmFootnoteDefinitionLabelString:Dhe,gfmFootnoteDefinition:The}}}function Ohe(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:$5},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?`
|
|
516
|
+
`:" ")+o.indentLines(o.containerFlow(r,u.current()),t?M5:Nhe))),f(),c}}function Nhe(e,t,n){return t===0?e:M5(e,t,n)}function M5(e,t,n){return(n?"":" ")+e}const Lhe=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];O5.peek=Fhe;function jhe(){return{canContainEols:["delete"],enter:{strikethrough:Phe},exit:{strikethrough:Ihe}}}function zhe(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Lhe}],handlers:{delete:O5}}}function Phe(e){this.enter({type:"delete",children:[]},e)}function Ihe(e){this.exit(e)}function O5(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 Fhe(){return"~"}function Bhe(e){return e.length}function Uhe(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Bhe,o=[],a=[],u=[],c=[];let f=0,h=-1;for(;++h<e.length;){const v=[],S=[];let w=-1;for(e[h].length>f&&(f=e[h].length);++w<e[h].length;){const A=Hhe(e[h][w]);if(n.alignDelimiters!==!1){const k=i(A);S[w]=k,(c[w]===void 0||k>c[w])&&(c[w]=k)}v.push(A)}a[h]=v,u[h]=S}let p=-1;if(typeof r=="object"&&"length"in r)for(;++p<f;)o[p]=y$(r[p]);else{const v=y$(r);for(;++p<f;)o[p]=v}p=-1;const g=[],y=[];for(;++p<f;){const v=o[p];let S="",w="";v===99?(S=":",w=":"):v===108?S=":":v===114&&(w=":");let A=n.alignDelimiters===!1?1:Math.max(1,c[p]-S.length-w.length);const k=S+"-".repeat(A)+w;n.alignDelimiters!==!1&&(A=S.length+A+w.length,A>c[p]&&(c[p]=A),y[p]=A),g[p]=k}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 w=[];for(;++p<f;){const A=v[p]||"";let k="",R="";if(n.alignDelimiters!==!1){const D=c[p]-(S[p]||0),T=o[p];T===114?k=" ".repeat(D):T===99?D%2?(k=" ".repeat(D/2+.5),R=" ".repeat(D/2-.5)):(k=" ".repeat(D/2),R=k):R=" ".repeat(D)}n.delimiterStart!==!1&&!p&&w.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&A==="")&&(n.delimiterStart!==!1||p)&&w.push(" "),n.alignDelimiters!==!1&&w.push(k),w.push(A),n.alignDelimiters!==!1&&w.push(R),n.padding!==!1&&w.push(" "),(n.delimiterEnd!==!1||p!==f-1)&&w.push("|")}b.push(n.delimiterEnd===!1?w.join("").replace(/ +$/,""):w.join(""))}return b.join(`
|
|
517
|
+
`)}function Hhe(e){return e==null?"":String(e)}function y$(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 qhe(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()),Ghe);return i(),a}function Ghe(e,t,n){return">"+(n?"":" ")+e}function Vhe(e,t){return b$(e,t.inConstruct,!0)&&!b$(e,t.notInConstruct,!1)}function b$(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 v$(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
518
|
+
`&&Vhe(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
519
|
+
`}function Yhe(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 Whe(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 Xhe(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 Khe(e,t,n,r){const i=Xhe(n),o=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(Whe(e,n)){const p=n.enter("codeIndented"),g=n.indentLines(o,Qhe);return p(),g}const u=n.createTracker(r),c=i.repeat(Math.max(Yhe(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:`
|
|
520
|
+
`,encode:["`"],...u.current()})),p()}return h+=u.move(`
|
|
521
|
+
`),o&&(h+=u.move(o+`
|
|
522
|
+
`)),h+=u.move(c),f(),h}function Qhe(e,t,n){return(n?"":" ")+e}function DC(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 Zhe(e,t,n,r){const i=DC(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?" ":`
|
|
523
|
+
`,...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 Jhe(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 Hd(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Fg(e,t,n){const r=Tc(e),i=Tc(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}}N5.peek=epe;function N5(e,t,n,r){const i=Jhe(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=Fg(r.before.charCodeAt(r.before.length-1),f,i);h.inside&&(c=Hd(f)+c.slice(1));const p=c.charCodeAt(c.length-1),g=Fg(r.after.charCodeAt(0),p,i);g.inside&&(c=c.slice(0,-1)+Hd(p));const y=a.move(i);return o(),n.attentionEncodeSurroundingInfo={after:g.outside,before:h.outside},u+c+y}function epe(e,t,n){return n.options.emphasis||"*"}function tpe(e,t){let n=!1;return Uy(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,xw}),!!((!e.depth||e.depth<3)&&wC(e)&&(t.options.setext||n))}function npe(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(tpe(e,n)){const h=n.enter("headingSetext"),p=n.enter("phrasing"),g=n.containerPhrasing(e,{...o.current(),before:`
|
|
524
|
+
`,after:`
|
|
525
|
+
`});return p(),h(),g+`
|
|
526
|
+
`+(i===1?"=":"-").repeat(g.length-(Math.max(g.lastIndexOf("\r"),g.lastIndexOf(`
|
|
527
|
+
`))+1))}const a="#".repeat(i),u=n.enter("headingAtx"),c=n.enter("phrasing");o.move(a+" ");let f=n.containerPhrasing(e,{before:"# ",after:`
|
|
528
|
+
`,...o.current()});return/^[\t ]/.test(f)&&(f=Hd(f.charCodeAt(0))+f.slice(1)),f=f?a+" "+f:a,n.options.closeAtx&&(f+=" "+a),c(),u(),f}L5.peek=rpe;function L5(e){return e.value||""}function rpe(){return"<"}j5.peek=ipe;function j5(e,t,n,r){const i=DC(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 ipe(){return"!"}z5.peek=ope;function z5(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 ope(){return"!"}P5.peek=spe;function P5(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 spe(){return"`"}function I5(e,t){const n=wC(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))}F5.peek=ape;function F5(e,t,n,r){const i=DC(n),o=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let u,c;if(I5(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 ape(e,t,n){return I5(e,n)?"<":"["}B5.peek=lpe;function B5(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 lpe(){return"["}function TC(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 upe(e){const t=TC(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 cpe(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 U5(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 fpe(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let a=e.ordered?cpe(n):TC(n);const u=e.ordered?a==="."?")":".":upe(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),U5(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 dpe(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 hpe(e,t,n,r){const i=dpe(n);let o=n.bulletCurrent||TC(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 ppe(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),a=n.containerPhrasing(e,r);return o(),i(),a}const mpe=Fy(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function gpe(e,t,n,r){return(e.children.some(function(a){return mpe(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function ype(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}H5.peek=bpe;function H5(e,t,n,r){const i=ype(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=Fg(r.before.charCodeAt(r.before.length-1),f,i);h.inside&&(c=Hd(f)+c.slice(1));const p=c.charCodeAt(c.length-1),g=Fg(r.after.charCodeAt(0),p,i);g.inside&&(c=c.slice(0,-1)+Hd(p));const y=a.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:g.outside,before:h.outside},u+c+y}function bpe(e,t,n){return n.options.strong||"*"}function vpe(e,t,n,r){return n.safe(e.value,r)}function xpe(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 wpe(e,t,n){const r=(U5(n)+(n.options.ruleSpaces?" ":"")).repeat(xpe(n));return n.options.ruleSpaces?r.slice(0,-1):r}const q5={blockquote:qhe,break:v$,code:Khe,definition:Zhe,emphasis:N5,hardBreak:v$,heading:npe,html:L5,image:j5,imageReference:z5,inlineCode:P5,link:F5,linkReference:B5,list:fpe,listItem:hpe,paragraph:ppe,root:gpe,strong:H5,text:vpe,thematicBreak:wpe};function Spe(){return{enter:{table:Cpe,tableData:x$,tableHeader:x$,tableRow:kpe},exit:{codeText:_pe,table:Epe,tableData:z1,tableHeader:z1,tableRow:z1}}}function Cpe(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 Epe(e){this.exit(e),this.data.inTable=void 0}function kpe(e){this.enter({type:"tableRow",children:[]},e)}function z1(e){this.exit(e)}function x$(e){this.enter({type:"tableCell",children:[]},e)}function _pe(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Ape));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Ape(e,t){return t==="|"?t:e}function Rpe(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
529
|
+
`,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 w=p(y,v,S),A=f([w]);return A.slice(0,A.indexOf(`
|
|
530
|
+
`))}function c(y,b,v,S){const w=v.enter("tableCell"),A=v.enter("phrasing"),k=v.containerPhrasing(y,{...S,before:o,after:o});return A(),w(),k}function f(y,b){return Uhe(y,{align:b,alignDelimiters:r,padding:n,stringLength:i})}function h(y,b,v){const S=y.children;let w=-1;const A=[],k=b.enter("table");for(;++w<S.length;)A[w]=p(S[w],b,v);return k(),A}function p(y,b,v){const S=y.children;let w=-1;const A=[],k=b.enter("tableRow");for(;++w<S.length;)A[w]=c(S[w],y,b,v);return k(),A}function g(y,b,v){let S=q5.inlineCode(y,b,v);return v.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function Dpe(){return{exit:{taskListCheckValueChecked:w$,taskListCheckValueUnchecked:w$,paragraph:$pe}}}function Tpe(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Mpe}}}function w$(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function $pe(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 Mpe(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=q5.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 Ope(){return[fhe(),Mhe(),jhe(),Spe(),Dpe()]}function Npe(e){return{extensions:[dhe(),Ohe(e),zhe(),Rpe(e),Tpe()]}}const Lpe={tokenize:Bpe,partial:!0},G5={tokenize:Upe,partial:!0},V5={tokenize:Hpe,partial:!0},Y5={tokenize:qpe,partial:!0},jpe={tokenize:Gpe,partial:!0},W5={name:"wwwAutolink",tokenize:Ipe,previous:K5},X5={name:"protocolAutolink",tokenize:Fpe,previous:Q5},cs={name:"emailAutolink",tokenize:Ppe,previous:Z5},ho={};function zpe(){return{text:ho}}let rl=48;for(;rl<123;)ho[rl]=cs,rl++,rl===58?rl=65:rl===91&&(rl=97);ho[43]=cs;ho[45]=cs;ho[46]=cs;ho[95]=cs;ho[72]=[cs,X5];ho[104]=[cs,X5];ho[87]=[cs,W5];ho[119]=[cs,W5];function Ppe(e,t,n){const r=this;let i,o;return a;function a(p){return!Ew(p)||!Z5.call(r,r.previous)||$C(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(p))}function u(p){return Ew(p)?(e.consume(p),u):p===64?(e.consume(p),c):n(p)}function c(p){return p===46?e.check(jpe,h,f)(p):p===45||p===95||Jn(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&&cr(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function Ipe(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!K5.call(r,r.previous)||$C(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Lpe,e.attempt(G5,e.attempt(V5,o),n),n)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function Fpe(e,t,n){const r=this;let i="",o=!1;return a;function a(p){return(p===72||p===104)&&Q5.call(r,r.previous)&&!$C(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(p),e.consume(p),u):n(p)}function u(p){if(cr(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||zg(p)||Vt(p)||Fl(p)||zy(p)?n(p):e.attempt(G5,e.attempt(V5,h),n)(p)}function h(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function Bpe(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 Upe(e,t,n){let r,i,o;return a;function a(f){return f===46||f===95?e.check(Y5,c,u)(f):f===null||Vt(f)||Fl(f)||f!==45&&zy(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 Hpe(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(Y5,t,o)(a):a===null||Vt(a)||Fl(a)?t(a):(e.consume(a),i)}function o(a){return a===41&&r++,e.consume(a),i}}function qpe(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||Vt(u)||Fl(u)?t(u):n(u)}function i(u){return u===null||u===40||u===91||Vt(u)||Fl(u)?t(u):r(u)}function o(u){return cr(u)?a(u):n(u)}function a(u){return u===59?(e.consume(u),r):cr(u)?(e.consume(u),a):n(u)}}function Gpe(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return Jn(o)?n(o):t(o)}}function K5(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Vt(e)}function Q5(e){return!cr(e)}function Z5(e){return!(e===47||Ew(e))}function Ew(e){return e===43||e===45||e===46||e===95||Jn(e)}function $C(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 Vpe={tokenize:eme,partial:!0};function Ype(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Qpe,continuation:{tokenize:Zpe},exit:Jpe}},text:{91:{name:"gfmFootnoteCall",tokenize:Kpe},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Wpe,resolveTo:Xpe}}}}function Wpe(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 Xpe(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 Kpe(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||Vt(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 Vt(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 Qpe(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||Vt(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 Vt(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),Rt(e,y,"gfmFootnoteDefinitionWhitespace")):n(b)}function y(b){return t(b)}}function Zpe(e,t,n){return e.check(fh,t,e.attempt(Vpe,t,n))}function Jpe(e){e.exit("gfmFootnoteDefinition")}function eme(e,t,n){const r=this;return Rt(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 tme(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&&Xr(g,g.length,0,Py(y,a.slice(f+1,c),u)),Xr(g,g.length,0,[["exit",p,u],["enter",a[c][1],u],["exit",a[c][1],u],["exit",h,u]]),Xr(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=Tc(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"),w=Tc(b);return S._open=!w||w===2&&!!v,S._close=!v||v===2&&!!w,u(b)}}}class nme{constructor(){this.map=[]}add(t,n,r){rme(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 rme(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 ime(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 ome(){return{flow:{null:{name:"table",tokenize:sme,resolveAll:ame}}}}function sme(e,t,n){const r=this;let i=0,o=0,a;return u;function u(j){let z=r.events.length-1;for(;z>-1;){const V=r.events[z][1].type;if(V==="lineEnding"||V==="linePrefix")z--;else break}const M=z>-1?r.events[z][1].type:null,q=M==="tableHead"||M==="tableRow"?T:c;return q===T&&r.parser.lazy[r.now().line]?n(j):q(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):Qe(j)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),y):n(j):xt(j)?Rt(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||Vt(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,xt(j)?Rt(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):D(j)}function v(j){return xt(j)?Rt(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"),w):j===45?(o+=1,w(j)):j===null||Qe(j)?R(j):D(j)}function w(j){return j===45?(e.enter("tableDelimiterFiller"),A(j)):D(j)}function A(j){return j===45?(e.consume(j),A):j===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),k):(e.exit("tableDelimiterFiller"),k(j))}function k(j){return xt(j)?Rt(e,R,"whitespace")(j):R(j)}function R(j){return j===124?b(j):j===null||Qe(j)?!a||i!==o?D(j):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(j)):D(j)}function D(j){return n(j)}function T(j){return e.enter("tableRow"),$(j)}function $(j){return j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),$):j===null||Qe(j)?(e.exit("tableRow"),t(j)):xt(j)?Rt(e,$,"whitespace")(j):(e.enter("data"),N(j))}function N(j){return j===null||j===124||Vt(j)?(e.exit("data"),$(j)):(e.consume(j),j===92?F:N)}function F(j){return j===92||j===124?(e.consume(j),N):N(j)}}function ame(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 nme;for(;++n<e.length;){const y=e[n],b=y[1];y[0]==="enter"?b.type==="tableHead"?(u=!1,c!==0&&(S$(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=gm(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=gm(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=gm(g,t,o,i,n,p)):a[1]!==0&&(p=gm(g,t,a,i,n,p)),i=0):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(a[3]=n)}for(c!==0&&S$(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=ime(t.events,n))}return e}function gm(e,t,n,r,i,o){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(o.end=Object.assign({},Gu(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const c=Gu(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=Gu(t.events,n[2]),h=Gu(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({},Gu(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function S$(e,t,n,r,i){const o=[],a=Gu(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 Gu(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const lme={name:"tasklistCheck",tokenize:cme};function ume(){return{text:{91:lme}}}function cme(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 Vt(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 Qe(c)?t(c):xt(c)?e.check({tokenize:fme},t,n)(c):n(c)}}function fme(e,t,n){return Rt(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function dme(e){return l5([zpe(),Ype(),tme(e),ome(),ume()])}const hme={};function pme(e){const t=this,n=e||hme,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(dme(n)),o.push(Ope()),a.push(Npe(n))}const mme=new Set(Object.keys(kO)),C$={js:"javascript",ts:"typescript",py:"python",sh:"bash",shell:"bash",md:"markdown"};function gme(e){const t=/language-([\w-]+)/.exec(e??"");if(!t)return;const n=t[1].toLowerCase();if(C$[n])return C$[n];if(mme.has(n))return n}function J5(e){var t;return C.isValidElement(e)&&((t=e.props)==null?void 0:t.type)==="checkbox"}function yme(e){return C.isValidElement(e)&&e.type===zl}function bme(e){return C.Children.toArray(e).some(t=>{if(!C.isValidElement(t))return!1;const n=C.Children.toArray(t.props.children);return J5(n[0])})}function kw(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(kw).join("");if(C.isValidElement(e)){const t=e.props.children;return kw(t)}return""}function E$(e){return C.Children.toArray(e).filter(t=>C.isValidElement(t)).map(t=>{const n=C.Children.toArray(t.props.children),r=n[0];if(J5(r)){const o=!!r.props.checked,a=n.slice(1);return{label:_.jsxs(tt,{ay:"center",gap:2,children:[_.jsx(u6,{checked:o,disabled:!0}),_.jsx(ze,{size:1,children:a})]})}}const i=n.findIndex(yme);if(i>=0){const o=n[i],a=[...n.slice(0,i),...n.slice(i+1)];return{category:kw(a).trim(),items:o.props.items??[]}}return{label:_.jsx(ze,{size:1,children:n})}})}const vme={p:({children:e})=>_.jsx(ze,{my:1,size:1,render:_.jsx("p",{}),children:e}),h1:({children:e,id:t})=>_.jsx(ze,{weight:"bold",size:4,my:2,render:_.jsx("h1",{id:t}),children:e}),h2:({children:e,id:t})=>_.jsx(ze,{weight:"bold",size:3,mt:2,render:_.jsx("h2",{id:t}),children:e}),h3:({children:e,id:t})=>_.jsx(ze,{weight:"bold",size:1,my:1,render:_.jsx("h3",{id:t}),children:e}),h4:({children:e,id:t})=>_.jsx(ze,{weight:"bold",size:1,render:_.jsx("h4",{id:t}),children:e}),h5:({children:e,id:t})=>_.jsx(ze,{weight:"bold",size:0,render:_.jsx("h5",{id:t}),children:e}),h6:({children:e,id:t})=>_.jsx(ze,{weight:"bold",size:-1,render:_.jsx("h6",{id:t}),children:e}),strong:({children:e})=>_.jsx(ze,{weight:"bold",children:e}),em:({children:e})=>_.jsx(ze,{render:_.jsx("em",{}),children:e}),del:({children:e})=>_.jsx(ze,{strikethrough:!0,render:_.jsx("del",{}),children:e}),a:({children:e,href:t})=>_.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:e}),ul:({children:e})=>_.jsx(zl,{marker:bme(e)?"none":"disc",items:E$(e),style:{display:"block"},my:2}),ol:({children:e})=>_.jsx(zl,{marker:"decimal",items:E$(e),style:{display:"block"},my:2}),blockquote:({children:e})=>_.jsx("blockquote",{children:e}),hr:()=>_.jsx(Yw,{}),table:({children:e})=>_.jsx(Mj,{children:_.jsx(Oj,{bordered:!0,children:e})}),thead:({children:e})=>_.jsx(Nj,{children:e}),tbody:({children:e})=>_.jsx(Pj,{children:e}),tr:({children:e})=>_.jsx(Lj,{children:e}),th:({children:e})=>_.jsx(zj,{children:e}),td:({children:e})=>_.jsx(jj,{children:e}),pre:({children:e})=>_.jsx(_.Fragment,{children:e}),code:({className:e,children:t,...n})=>{const r=String(t??"");return r.includes(`
|
|
531
|
+
`)?_.jsx(RS,{code:r.replace(/\n$/,""),language:gme(e),rows:5,defaultExpanded:!1,HeaderProps:{copyable:!0},style:{width:"100%",marginBlockEnd:"0.5rem"}}):_.jsx(HN,{...n,children:t})}},xme=[pme],wme=[ohe];function Sme({children:e,components:t}){return _.jsx(Ve,{gap:4,fullwidth:!0,children:_.jsx(Vde,{remarkPlugins:xme,rehypePlugins:wme,components:{...vme,...t},children:e})})}const Cd=C.memo(Sme);function Cme(e){return e<1500?"●○○":e<5e3?"●●○":"●●●"}function ez({event:e}){const t=e.meta,n=((t==null?void 0:t.text)??"").trim(),r=(t==null?void 0:t.thinkingBlocks)??0,i=(t==null?void 0:t.thinkingBytes)??0;return!n&&r===0?null:_.jsxs(Ve,{"data-slot":"assistant-content",gap:2,children:[r>0&&_.jsx(os,{color:"indigo",children:`Thought ${Cme(i)}`}),n&&_.jsx(Cd,{children:n})]})}ez.displayName="AssistantContent";function k$(e,t){return e==null?void 0:e.find(n=>n.question===t)}function Eme(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 tz({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=k$(r,u),h=(f==null?void 0:f.multiSelect)??!1,p=(f==null?void 0:f.options)??[],{selectedLabels:g,note:y}=Eme(c,p,h),b=g.length>0,v=b?void 0:y??c,S=b?y:void 0;return _.jsxs(Ve,{gap:4,fullwidth:!0,children:[v&&_.jsxs(Ve,{"data-slot":"interaction-content-note",gap:4,m:2,fullwidth:!0,children:[_.jsx(ze,{color:"yellow",weight:"bold",size:1,children:"Answered manually:"}),_.jsx(Cd,{children:v})]}),!b&&!v&&_.jsx(ze,{color:"red",weight:"bold",size:1,m:2,children:"Didn't answer."}),p.length>0&&_.jsx(zl,{marker:"decimal",items:p.map(w=>{const A=g.includes(w.label);return{label:_.jsx(ze,{weight:"bold",color:A?"green":void 0,shade:A?void 0:"muted",children:w.label}),description:w.description}})}),S&&_.jsxs(Ve,{"data-slot":"interaction-content-note",gap:4,m:2,fullwidth:!0,children:[_.jsx(ze,{color:"green",weight:"bold",size:1,children:"Additional notes:"}),_.jsx(Cd,{children:S})]})]})};if(i.length===1){const[u,c]=i[0];return _.jsx(Ve,{"data-slot":"interaction-content",gap:2,py:4,fullwidth:!0,children:_.jsx(an,{gap:4,fullwidth:!0,children:o(u,c)})})}const a=i.map(([u,c],f)=>{const h=k$(r,u);return{label:(h==null?void 0:h.header)??`Question ${f+1}`,value:u,render:o(u,c)}});return _.jsx(Ve,{"data-slot":"interaction-content",gap:2,py:4,fullwidth:!0,children:_.jsx(an,{gap:4,fullwidth:!0,children:_.jsx(rC,{items:a,ContainerProps:{fullwidth:!0,mt:6}})})})}if(e.event==="user.prompt"){const n=t==null?void 0:t.prompt;return n?_.jsx(nz,{children:_.jsx(Cd,{children:n})}):null}return null}tz.displayName="InteractionContent";const nz=({children:e})=>_.jsx(Ve,{"data-slot":"interaction-content",py:4,fullwidth:!0,children:_.jsx(an,{gap:4,fullwidth:!0,children:e})});nz.displayName="CardContainer";function kme(e){if(e)return e.slice(0,8)}function rz({event:e}){const t=e.meta,n=(t==null?void 0:t.claude_id)??e.conversationId??void 0,r=kme(n??void 0),i=e.event==="claude.ended"?t==null?void 0:t.exit_code:void 0,o=typeof i=="number"&&i!==0;return!r&&!o?null:_.jsxs(tt,{gap:2,ay:"center",children:[r&&_.jsx(os,{color:"neutral",size:"small",children:r}),o&&_.jsx(os,{color:"red",size:"small",children:`exit ${i}`})]})}rz.displayName="LifecycleContent";class iz{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=A=>{if(A=this.postProcess(A,r),i){setTimeout(function(){i(A)},0);return}else return A},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 w=()=>{for(let A=Math.max(v,-f);A<=Math.min(S,f);A+=2){let k;const R=y[A-1],D=y[A+1];R&&(y[A-1]=void 0);let T=!1;if(D){const N=D.oldPos-A;T=D&&0<=N&&N<u}const $=R&&R.oldPos+1<c;if(!T&&!$){y[A]=void 0;continue}if(!$||T&&R.oldPos<D.oldPos?k=this.addToPath(D,!0,!1,0,r):k=this.addToPath(R,!1,!0,1,r),b=this.extractCommon(k,n,t,A,r),k.oldPos+1>=c&&b+1>=u)return a(this.buildValues(k.lastComponent,n,t))||!0;y[A]=k,k.oldPos+1>=c&&(S=Math.min(S,A-1)),b+1>=u&&(v=Math.max(v,A+1))}f++};if(i)(function A(){setTimeout(function(){if(f>h||Date.now()>g)return i(void 0);w()||A()},0)})();else for(;f<=h&&Date.now()<=g;){const A=w();if(A)return A}}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 _$="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 _me extends iz{tokenize(t){const n=new RegExp(`(\\r?\\n)|[${_$}]+|[^\\S\\n\\r]+|[^${_$}]`,"ug");return t.match(n)||[]}}const Ame=new _me;function Rme(e,t,n){return Ame.diff(e,t,n)}class Dme extends iz{constructor(){super(...arguments),this.tokenize=Mme}equals(t,n,r){return r.ignoreWhitespace?((!r.newlineIsToken||!t.includes(`
|
|
532
|
+
`))&&(t=t.trim()),(!r.newlineIsToken||!n.includes(`
|
|
533
|
+
`))&&(n=n.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(t.endsWith(`
|
|
534
|
+
`)&&(t=t.slice(0,-1)),n.endsWith(`
|
|
535
|
+
`)&&(n=n.slice(0,-1))),super.equals(t,n,r)}}const Tme=new Dme;function $me(e,t,n){return Tme.diff(e,t,n)}function Mme(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
536
|
+
`));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 Ome(e,t){const n=[...e.split(`
|
|
537
|
+
`),...t.split(`
|
|
538
|
+
`)];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(`
|
|
539
|
+
`).map(a=>a.length>=r?a.slice(r):a).join(`
|
|
540
|
+
`);return[i(e),i(t)]}function Nme(e,t){const n=[],r=[],i=[];function o(h,p){const g=n.length,b=(h.endsWith(`
|
|
541
|
+
`)?h.slice(0,-1):h).split(`
|
|
542
|
+
`);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]=Ome(p,g),v=$me(y,b);let S=0;for(;S<v.length;){const w=v[S];if(w.removed&&S+1<v.length&&v[S+1].added){const A=o(w.value,"remove"),k=o(v[S+1].value,"add"),R=t?Math.min(A.lns.length,k.lns.length):0;for(let D=0;D<R;D++){const T=Rme(A.lns[D],k.lns[D]);let $=0,N=0;for(const F of T){const j=F.value.length;F.added?(j>0&&i.push({start:{line:k.startIdx+D,character:N},end:{line:k.startIdx+D,character:N+j},properties:{class:"diff-word add"}}),N+=j):F.removed?(j>0&&i.push({start:{line:A.startIdx+D,character:$},end:{line:A.startIdx+D,character:$+j},properties:{class:"diff-word remove"}}),$+=j):($+=j,N+=j)}}S+=2}else w.removed?(o(w.value,"remove"),S+=1):w.added?(o(w.value,"add"),S+=1):(o(w.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(`
|
|
543
|
+
`),lineKinds:r,lineNums:a,decorations:i,maxLineNum:f}}function P1(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 I1(e,t){return{type:"element",tagName:"span",properties:{class:e},children:[{type:"text",value:t}]}}const Lme={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 jme(e,t){if(!e)return t;const n=e.split("/").pop()??e,r=n.includes(".")?n.split(".").pop().toLowerCase():"";return Lme[r]??t}function MC({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??jme(i,"tsx"),[h,p]=C.useState(""),[g,y]=C.useState(1);C.useEffect(()=>{let S=!1;return(async()=>{const{code:w,lineKinds:A,lineNums:k,decorations:R,maxLineNum:D}=Nme(c,o);await jN(f);const $=(await AS()).codeToHtml(w,{lang:f,themes:{light:"vitesse-light",dark:"vitesse-black"},defaultColor:!1,decorations:R,transformers:[{name:"diff-block:line-marks",pre(N){P1(N,"has-diff")},line(N,F){const j=F-1,z=A[j],M=k[j];if(z==="add"||z==="remove")P1(N,`diff ${z}`);else if(z==="separator")return P1(N,"diff-separator"),N;const q=z==="add"?"diff-marker add":z==="remove"?"diff-marker remove":"diff-marker",V=z==="add"?"+":z==="remove"?"-":" ",U="diff-num diff-num-old"+(M.old==null?" diff-num-blank":""),I="diff-num diff-num-new"+(M.new==null?" diff-num-blank":""),P=[I1(U,M.old!=null?String(M.old):" "),I1(I,M.new!=null?String(M.new):" "),I1(q,V)];return N.children.unshift(...P),N}}]});S||(p($),y(String(D).length))})(),()=>{S=!0}},[c,f,o]);const b=((v=c[c.length-1])==null?void 0:v.newStr)??"";return _.jsx("div",{className:"bertrand-diff-block",style:{"--diff-num-width":`${g+2}ch`,width:"100%"},children:_.jsx(RS,{code:b,language:f,filename:i,showLineNumbers:!1,rows:a,defaultExpanded:u,HeaderProps:{copyable:!1},html:h,style:{width:"100%"}})})}MC.displayName="DiffBlock";const zme=5;function _w(e){return!!(e.oldStr||e.newStr||e.edits&&e.edits.length>0)}function oz({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 _.jsx(MC,{edits:t,filename:e.detail,rows:zme,defaultExpanded:!1})}function Pme(e){const t=e.count>1?`${e.count}× `:"";return e.detail?`${t}${e.detail}`:`${t}${e.tool}`}function sz({permission:e}){return _.jsx(ze,{size:-1,family:"mono",shade:"muted",children:Pme(e)})}function az({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?_w(r)?_.jsx(oz,{permission:r}):_.jsx(sz,{permission:r}):null}return _.jsx(Ime,{permissions:n})}function Ime({permissions:e}){const t=e.filter(_w),n=e.filter(r=>!_w(r));return _.jsxs(Ve,{"data-slot":"work-content",gap:2,fullwidth:!0,children:[t.length>0&&_.jsx(Ve,{gap:2,fullwidth:!0,children:t.map((r,i)=>_.jsx(oz,{permission:r},`diff-${i}`))}),n.length>0&&_.jsx(Ve,{gap:1,fullwidth:!0,children:n.map((r,i)=>_.jsx(sz,{permission:r},`info-${i}`))})]})}az.displayName="WorkContent";function lz({event:e}){switch(yle(e.event)){case"interaction":return _.jsx(tz,{event:e});case"work":return _.jsx(az,{event:e});case"assistant":return _.jsx(ez,{event:e});case"lifecycle":return _.jsx(rz,{event:e});default:return null}}lz.displayName="EventContent";const uz=({sessionId:e,isLive:t,projectSlug:n,...r})=>{const{data:i}=ki({...tle(e,t,n),enabled:!!e}),{data:o}=ki({...rle(e,t,n),enabled:!!e});return _.jsx(mC,{"data-slot":"secondary-sidebar",...r,p:0,minw:540,children:i&&_.jsx(cz,{stats:i,engagement:o})})};uz.displayName="SecondarySidebar";function Fme(e){return Object.entries(e).sort(([,t],[,n])=>n-t).slice(0,3).map(([t,n])=>`${t} ${n}`).join(" · ")}const cz=({stats:e,engagement:t})=>{const n=e.linesAdded>0||e.linesRemoved>0,r=e.filesTouched>0,i=n||r,o=t?Object.values(t.toolUsage).reduce((f,h)=>f+h,0):0,a=(t==null?void 0:t.discardRate.total)??0,u=!!t&&(o>0||a>0),c=[{label:"Activity",value:"activity",render:_.jsxs(zm,{children:[_.jsx(an,{title:"Conversations",description:"Distinct conversation threads",icon:fH,action:_.jsx(Xi,{value:e.conversationCount})}),_.jsx(an,{title:"Interactions",description:"User-Claude exchanges",icon:aH,action:_.jsx(Xi,{value:e.interactionCount})}),_.jsx(an,{title:"Events",description:"Total events emitted",icon:_U,action:_.jsx(Xi,{value:e.eventCount})}),_.jsx(an,{title:"Duration",description:"Total session time",icon:n3,action:_.jsx(Xi,{label:x1(e.durationS)})}),_.jsx(an,{title:"Claude work",description:"Time Claude spent active",icon:GU,action:_.jsx(Xi,{label:x1(e.claudeWorkS)})}),_.jsx(an,{title:"User wait",description:"Time user spent waiting",icon:uH,action:_.jsx(Xi,{label:x1(e.userWaitS)})})]})}];return i&&c.push({label:"Code",value:"code",render:_.jsxs(zm,{children:[n&&_.jsx(an,{title:"Lines changed",description:"Across all edits",icon:i3,action:_.jsx(fz,{added:e.linesAdded,removed:e.linesRemoved})}),r&&_.jsx(an,{title:"Files touched",description:"Distinct files edited",icon:o3,action:_.jsx(Xi,{value:e.filesTouched})})]})}),u&&c.push({label:"Engagement",value:"engagement",render:_.jsxs(zm,{children:[o>0&&_.jsx(an,{title:"Tracked tool calls",description:Fme(t.toolUsage),icon:s3,action:_.jsx(Xi,{value:o})}),a>0&&_.jsx(an,{title:"Discarded conversations",description:`${t.discardRate.discarded} of ${a}`,icon:FH,action:_.jsx(Xi,{value:t.discardRate.discarded})})]})}),_.jsx(rC,{items:c,fullwidth:!0,ContainerProps:{fullwidth:!0}})};cz.displayName="SessionStats";const zm=({children:e})=>_.jsx(Ve,{"data-slot":"section-stack",ax:"stretch",pt:4,fullwidth:!0,gap:2,children:e});zm.displayName="SectionStack";const Xi=e=>_.jsx(ze,{"data-slot":"stat",size:3,family:"mono",weight:"bold",children:"label"in e?e.label:e.value});Xi.displayName="Stat";const fz=({added:e,removed:t})=>_.jsxs(ze,{"data-slot":"diff-stat",size:3,family:"mono",weight:"bold",children:[_.jsx(ze,{color:"green",family:"mono",weight:"bold",children:`+${e}`})," / ",_.jsx(ze,{color:"red",family:"mono",weight:"bold",children:`-${t}`})]});fz.displayName="DiffStat";const OC=({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 _.jsx(sy,{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:_.jsx(r3,{}),pressed:_.jsx(qg,{color:"green"})},onClick:f=>{f.preventDefault(),f.stopPropagation()},...o})};OC.displayName="CopyResumeButton";const dz=({session:e,...t})=>{const{categoryPath:n,session:r}=e,i=jy(r.status);return _.jsxs(tt,{"data-slot":"session-item",ay:"center",gap:2,ml:2,...t,children:[_.jsxs(tt,{gap:2,ay:"center",children:[_.jsx(ay,{"data-slot":"session-status",color:i}),_.jsx(Ve,{gap:2,children:_.jsxs(ze,{"data-slot":"session-link",render:_.jsx(Ul,{to:"/$",params:{_splat:`${n}/${r.slug}`}}),weight:"bold",children:[n," / ",r.slug]})}),_.jsx(ze,{"data-slot":"session-time",size:-1,shade:"muted",children:pC(r.startedAt)})]}),_.jsx(os,{"data-slot":"session-badge",color:i,ml:"auto",children:r.status}),_.jsx(OC,{session:r,categoryPath:n})]})};dz.displayName="SessionItem";const hz=Qd("/$")({component:Bme}),pz=({href:e,children:t})=>_.jsx(Ul,{to:e,children:t});function mz(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 Bme(){const{_splat:e=""}=hz.useParams(),{projects:t,queryProjects:n}=ch(),{data:r=[]}=ki(Bd({projects:n})),{data:i=[]}=ki(Bd({includeArchived:!0,projects:t.map(a=>a.slug)})),o=jT(e,r)??jT(e,i);return o?_.jsx(bz,{match:o}):_.jsx(yz,{categoryPath:e,sessions:r})}function gz(){var t;const{data:e=[]}=ki(Uj);return((t=e.find(n=>n.active))==null?void 0:t.name)??"bertrand"}function yz({categoryPath:e,sessions:t}){const n=gz(),r=t.filter(o=>o.categoryPath===e),i=mz(n,e);return _.jsxs(Ve,{gap:4,ax:"stretch",fullwidth:!0,children:[_.jsx(Ve,{bb:1,p:4,style:{position:"sticky",top:0,backgroundColor:"var(--shade-background)",zIndex:1},children:_.jsx(fC,{items:i,linkAs:pz})}),_.jsx(Ve,{px:8,gap:2,style:{overflow:"auto"},children:r.length>0?r.map(o=>_.jsx(dz,{session:o},o.session.id)):_.jsx(ze,{shade:"muted",children:"No sessions in this category."})})]})}yz.displayName="CategoryDetail";function bz({match:e}){var h,p;const t=gz(),n=(h=e.project)==null?void 0:h.slug,r=((p=e.project)==null?void 0:p.name)??t,i=e.session.id,o=e.session.status==="active"||e.session.status==="waiting",{data:a=[]}=ki(ele(i,o,n)),u=C.useMemo(()=>Xle(a),[a]),c=C.useMemo(()=>{var g;if(e.session.status!=="waiting")return null;for(let y=a.length-1;y>=0;y--)if(a[y].event==="session.waiting"){const b=(g=a[y].meta)==null?void 0:g.question;return typeof b=="string"?b:null}return null},[a,e.session.status]),f=mz(r,e.categoryPath,e.session.name);return _.jsxs(Ve,{ax:"stretch",fullwidth:!0,style:{overflow:"hidden"},children:[_.jsxs(tt,{bb:1,px:4,py:2,ay:"center",ax:"space-between",fullwidth:!0,children:[_.jsx(fC,{items:f,linkAs:pz}),_.jsxs(tt,{ay:"center",gap:2,children:[_.jsx(OC,{session:e.session,categoryPath:e.categoryPath}),_.jsx(xz,{session:e.session}),_.jsx(U4,{side:"right",title:"Session stats",trigger:_.jsx(_a,{tooltip:"Session stats",variant:"subtle",size:"small",children:_.jsx(CH,{})}),children:_.jsx(uz,{sessionId:i,isLive:o,projectSlug:n})})]})]}),_.jsx(Ve,{p:8,ax:"stretch",fullwidth:!0,style:{overflowY:"auto"},children:u.length>0&&_.jsx(wO,{activeIndex:u.length,items:u.map(g=>({title:kle(g),time:_le(g.createdAt),color:Vj(g.event),media:_.jsx(vz,{event:g}),content:_.jsx(lz,{event:g})})),ItemProps:{style:{width:"100%"},ContentProps:{fullwidth:!0,maxw:860}}})}),_.jsx(wz,{session:e.session,pendingQuestion:c})]})}bz.displayName="SessionDetail";function vz({event:e}){const t=Sle(e.event);return _.jsx(ze,{color:Vj(e.event),render:_.jsx("span",{}),children:_.jsx(t,{size:16})})}vz.displayName="EventMedia";function xz({session:e}){const t=jle(e),{Icon:n}=t;return _.jsx(_a,{tooltip:t.tooltip,variant:"subtle",size:"small",disabled:t.disabled,loading:t.loading,onClick:t.onClick,"aria-label":t.label,children:_.jsx(n,{})})}xz.displayName="ArchiveToggle";function wz({session:e,pendingQuestion:t}){const n=jy(e.status),r=e.status==="active"||e.status==="waiting";return _.jsx(Ve,{bt:1,p:4,gap:3,fullwidth:!0,children:_.jsxs(tt,{ay:"center",gap:2,fullwidth:!0,children:[_.jsx(ay,{color:n,pulse:r}),_.jsx(os,{color:n,children:e.status}),t&&_.jsx(ze,{size:1,shade:"muted",children:t})]})})}wz.displayName="SessionFooter";const Ume=Qd("/")({component:()=>_.jsx("div",{style:{opacity:.5,fontSize:13},children:"Select a session"})}),Hme=`# Heading 1 — anchored
|
|
544
|
+
|
|
545
|
+
## Heading 2 — anchored
|
|
546
|
+
|
|
547
|
+
### Heading 3
|
|
548
|
+
|
|
549
|
+
#### Heading 4
|
|
550
|
+
|
|
551
|
+
##### Heading 5
|
|
552
|
+
|
|
553
|
+
###### Heading 6
|
|
554
|
+
|
|
555
|
+
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.
|
|
556
|
+
|
|
557
|
+
> A blockquote can sit between paragraphs. It should look distinct enough to read as a quotation, not just indented prose.
|
|
558
|
+
|
|
559
|
+
---
|
|
560
|
+
|
|
561
|
+
## Lists
|
|
562
|
+
|
|
563
|
+
- Unordered list item one
|
|
564
|
+
- Unordered list item two with **emphasis** and \`code\`
|
|
565
|
+
- Nested item
|
|
566
|
+
- Another nested item
|
|
567
|
+
- Three levels deep
|
|
568
|
+
|
|
569
|
+
1. Ordered list item one
|
|
570
|
+
2. Ordered list item two
|
|
571
|
+
3. Ordered list item three
|
|
572
|
+
|
|
573
|
+
### Task list
|
|
574
|
+
|
|
575
|
+
- [x] Done item
|
|
576
|
+
- [x] Another done item
|
|
577
|
+
- [ ] Open item
|
|
578
|
+
- [ ] Open item with [a link](https://example.com)
|
|
579
|
+
|
|
580
|
+
---
|
|
581
|
+
|
|
582
|
+
## Tables
|
|
583
|
+
|
|
584
|
+
| Feature | Status | Notes |
|
|
585
|
+
|---|---|---|
|
|
586
|
+
| Headings | ✓ | rehype-slug |
|
|
587
|
+
| Tables | ✓ | mapped to TableRoot/Header/Body/Row/Head/Cell |
|
|
588
|
+
| Code blocks | ✓ | shiki via CodeBlock |
|
|
589
|
+
| Task lists | ✓ | disabled checkbox render |
|
|
590
|
+
|
|
591
|
+
| Left | Center | Right |
|
|
592
|
+
|:---|:---:|---:|
|
|
593
|
+
| 1 | 2 | 3 |
|
|
594
|
+
| left-aligned | center-aligned | right-aligned |
|
|
595
|
+
|
|
596
|
+
---
|
|
597
|
+
|
|
598
|
+
## Code
|
|
599
|
+
|
|
600
|
+
Inline: use \`bun run typecheck\` or \`tsc --noEmit\` to validate.
|
|
601
|
+
|
|
602
|
+
\`\`\`ts
|
|
603
|
+
// known language — should syntax-highlight
|
|
604
|
+
import { Markdown } from "../components/markdown";
|
|
605
|
+
|
|
606
|
+
export function Demo() {
|
|
607
|
+
return <Markdown>{"# hi"}</Markdown>;
|
|
608
|
+
}
|
|
609
|
+
\`\`\`
|
|
610
|
+
|
|
611
|
+
\`\`\`tsx
|
|
612
|
+
const App = () => <div>{"jsx works too"}</div>;
|
|
613
|
+
\`\`\`
|
|
614
|
+
|
|
615
|
+
\`\`\`js
|
|
616
|
+
// alias — js → javascript
|
|
617
|
+
function add(a, b) { return a + b; }
|
|
618
|
+
\`\`\`
|
|
619
|
+
|
|
620
|
+
\`\`\`sh
|
|
621
|
+
# alias — sh → bash
|
|
622
|
+
bun run dev
|
|
623
|
+
\`\`\`
|
|
624
|
+
|
|
625
|
+
\`\`\`json
|
|
626
|
+
{
|
|
627
|
+
"language": "json",
|
|
628
|
+
"ok": true
|
|
629
|
+
}
|
|
630
|
+
\`\`\`
|
|
631
|
+
|
|
632
|
+
\`\`\`unknownlanguage
|
|
633
|
+
// unknown language — should render plaintext, not throw
|
|
634
|
+
some content here
|
|
635
|
+
\`\`\`
|
|
636
|
+
|
|
637
|
+
\`\`\`
|
|
638
|
+
no language tag — also plaintext
|
|
639
|
+
multiple lines
|
|
640
|
+
\`\`\`
|
|
641
|
+
|
|
642
|
+
---
|
|
643
|
+
|
|
644
|
+
## Edge cases
|
|
645
|
+
|
|
646
|
+
A paragraph immediately followed by a fenced block:
|
|
647
|
+
\`\`\`ts
|
|
648
|
+
const ok = true;
|
|
649
|
+
\`\`\`
|
|
650
|
+
|
|
651
|
+
Paragraph after the fence — should render with normal spacing.
|
|
652
|
+
|
|
653
|
+
A line with **bold at the very end**
|
|
654
|
+
|
|
655
|
+
A line ending with \`inline code\`
|
|
656
|
+
|
|
657
|
+
An empty heading below this line:
|
|
658
|
+
|
|
659
|
+
##
|
|
660
|
+
|
|
661
|
+
End of fixture.
|
|
662
|
+
`;function qme(){const[e,t]=C.useState(Hme);return _.jsxs(Ve,{gap:4,p:6,fullwidth:!0,style:{overflow:"auto"},children:[_.jsxs(Ve,{gap:2,children:[_.jsx(ze,{size:3,weight:"bold",children:"Markdown kitchen sink"}),_.jsx(ze,{size:2,shade:"muted",children:"Edit the source on the left, see it rendered on the right. Reset by reloading the page."})]}),_.jsxs(tt,{gap:4,fullwidth:!0,ay:"stretch",evenly:!0,children:[_.jsxs(Ve,{gap:2,ax:"stretch",children:[_.jsx(ze,{size:0,shade:"muted",children:"source"}),_.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"}})]}),_.jsxs(Ve,{gap:2,children:[_.jsx(ze,{size:0,shade:"muted",children:"rendered"}),_.jsx(an,{children:_.jsx(Cd,{children:e})})]})]})]})}const Gme=Qd("/dev/markdown")({component:qme}),Vme=`import { useState } from "react";
|
|
663
|
+
|
|
664
|
+
export function Counter() {
|
|
665
|
+
const [count, setCount] = useState(0);
|
|
666
|
+
|
|
667
|
+
function increment() {
|
|
668
|
+
setCount(count + 1);
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
return (
|
|
672
|
+
<button onClick={increment}>
|
|
673
|
+
{count}
|
|
674
|
+
</button>
|
|
675
|
+
);
|
|
676
|
+
}
|
|
677
|
+
`,Yme=`import { useCallback, useState } from "react";
|
|
678
|
+
|
|
679
|
+
type CounterProps = {
|
|
680
|
+
step?: number;
|
|
681
|
+
};
|
|
682
|
+
|
|
683
|
+
export function Counter({ step = 1 }: CounterProps) {
|
|
684
|
+
const [count, setCount] = useState(0);
|
|
685
|
+
|
|
686
|
+
const increment = useCallback(() => {
|
|
687
|
+
setCount((c) => c + step);
|
|
688
|
+
}, [step]);
|
|
689
|
+
|
|
690
|
+
return (
|
|
691
|
+
<button type="button" onClick={increment}>
|
|
692
|
+
count: {count}
|
|
693
|
+
</button>
|
|
694
|
+
);
|
|
695
|
+
}
|
|
696
|
+
`,A$={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"},Wme=Object.entries(kO);function Xme(){const[e,t]=C.useState(Vme),[n,r]=C.useState(Yme),[i,o]=C.useState("tsx"),[a,u]=C.useState(!1);return _.jsxs(Ve,{gap:4,p:6,fullwidth:!0,style:{overflow:"auto"},children:[_.jsxs(Ve,{gap:2,children:[_.jsx(ze,{size:3,weight:"bold",children:"Diff kitchen sink"}),_.jsx(ze,{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."})]}),_.jsxs(tt,{ay:"center",gap:4,children:[_.jsxs(tt,{ay:"center",gap:2,children:[_.jsx(ze,{size:0,shade:"muted",children:"language"}),_.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:Wme.map(([c,f])=>_.jsx("option",{value:c,children:f},c))})]}),_.jsxs(tt,{ay:"center",gap:2,children:[_.jsx("input",{id:"word-diff",type:"checkbox",checked:a,onChange:c=>u(c.target.checked)}),_.jsx(ze,{size:0,shade:"muted",render:_.jsx("label",{htmlFor:"word-diff"}),children:"word diff"})]})]}),_.jsxs(tt,{gap:4,fullwidth:!0,ay:"stretch",evenly:!0,children:[_.jsxs(Ve,{gap:3,ax:"stretch",children:[_.jsxs(Ve,{gap:2,ax:"stretch",children:[_.jsx(ze,{size:0,shade:"muted",children:"old"}),_.jsx(an,{ax:"stretch",children:_.jsx("textarea",{value:e,onChange:c=>t(c.target.value),spellCheck:!1,style:A$})})]}),_.jsxs(Ve,{gap:2,ax:"stretch",children:[_.jsx(ze,{size:0,shade:"muted",children:"new"}),_.jsx(an,{ax:"stretch",children:_.jsx("textarea",{value:n,onChange:c=>r(c.target.value),spellCheck:!1,style:A$})})]})]}),_.jsxs(Ve,{gap:2,ax:"stretch",children:[_.jsx(ze,{size:0,shade:"muted",children:"diff"}),_.jsx(MC,{oldStr:e,newStr:n,language:i,wordDiff:a})]})]})]})}const Kme=Qd("/dev/diff")({component:Xme}),Qme=Nle.update({id:"/worktrees",path:"/worktrees",getParentRoute:()=>qc}),Zme=hz.update({id:"/$",path:"/$",getParentRoute:()=>qc}),Jme=Ume.update({id:"/",path:"/",getParentRoute:()=>qc}),ege=Gme.update({id:"/dev/markdown",path:"/dev/markdown",getParentRoute:()=>qc}),tge=Kme.update({id:"/dev/diff",path:"/dev/diff",getParentRoute:()=>qc}),nge={IndexRoute:Jme,SplatRoute:Zme,WorktreesRoute:Qme,DevDiffRoute:tge,DevMarkdownRoute:ege},rge=qc._addFileChildren(nge)._addFileTypes();typeof navigator<"u"&&"serviceWorker"in navigator&&navigator.serviceWorker.getRegistrations().then(e=>{for(const t of e)t.unregister()});const ige=new yF({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!0}}}),oge=v7({routeTree:rge});VI.createRoot(document.getElementById("root")).render(_.jsx(C.StrictMode,{children:_.jsx(bF,{client:ige,children:_.jsx(ale,{children:_.jsxs(cW,{children:[_.jsx(S7,{router:oge}),_.jsx(X4,{position:"bottom"})]})})})}));
|