bertrand 0.25.0 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bertrand.js +7 -7
- package/dist/dashboard/assets/index-DyWg1D46.js +696 -0
- package/dist/dashboard/assets/index-fpXRi6i0.css +1 -0
- package/dist/dashboard/index.html +2 -2
- package/dist/run-screen.js +5 -5
- package/package.json +1 -1
- package/dist/dashboard/assets/index-BDGI5s-V.js +0 -710
- package/dist/dashboard/assets/index-BXNZ0sJ0.css +0 -1
|
@@ -1,710 +0,0 @@
|
|
|
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 B7=Object.defineProperty;var H7=Object.getPrototypeOf;var U7=Reflect.get;var XT=e=>{throw TypeError(e)};var q7=(e,t,n)=>t in e?B7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ce=(e,t,n)=>q7(e,typeof t!="symbol"?t+"":t,n),P1=(e,t,n)=>t.has(e)||XT("Cannot "+n);var ne=(e,t,n)=>(P1(e,t,"read from private field"),n?n.call(e):t.get(e)),Ve=(e,t,n)=>t.has(e)?XT("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),je=(e,t,n,r)=>(P1(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),ht=(e,t,n)=>(P1(e,t,"access private method"),n);var Nm=(e,t,n,r)=>({set _(i){je(e,t,i,n)},get _(){return ne(e,t,r)}}),QT=(e,t,n)=>U7(H7(e),n,t);function V7(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 DE(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var I1={exports:{}},Fd={};/**
|
|
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 ZT;function G7(){if(ZT)return Fd;ZT=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 l in i)l!=="key"&&(o[l]=i[l])}else o=i;return i=o.ref,{$$typeof:e,type:r,key:a,ref:i!==void 0?i:null,props:o}}return Fd.Fragment=t,Fd.jsx=n,Fd.jsxs=n,Fd}var JT;function Y7(){return JT||(JT=1,I1.exports=G7()),I1.exports}var T=Y7(),L1={exports:{}},dt={};/**
|
|
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 e_;function W7(){if(e_)return dt;e_=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"),l=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"),m=Symbol.iterator;function g(K){return K===null||typeof K!="object"?null:(K=m&&K[m]||K["@@iterator"],typeof K=="function"?K:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,w={};function x(K,ee,q){this.props=K,this.context=ee,this.refs=w,this.updater=q||b}x.prototype.isReactComponent={},x.prototype.setState=function(K,ee){if(typeof K!="object"&&typeof K!="function"&&K!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,K,ee,"setState")},x.prototype.forceUpdate=function(K){this.updater.enqueueForceUpdate(this,K,"forceUpdate")};function k(){}k.prototype=x.prototype;function C(K,ee,q){this.props=K,this.context=ee,this.refs=w,this.updater=q||b}var R=C.prototype=new k;R.constructor=C,v(R,x.prototype),R.isPureReactComponent=!0;var _=Array.isArray;function D(){}var M={H:null,A:null,T:null,S:null},O=Object.prototype.hasOwnProperty;function U(K,ee,q){var ae=q.ref;return{$$typeof:e,type:K,key:ee,ref:ae!==void 0?ae:null,props:q}}function L(K,ee){return U(K.type,ee,K.props)}function I(K){return typeof K=="object"&&K!==null&&K.$$typeof===e}function $(K){var ee={"=":"=0",":":"=2"};return"$"+K.replace(/[=:]/g,function(q){return ee[q]})}var B=/\/+/g;function V(K,ee){return typeof K=="object"&&K!==null&&K.key!=null?$(""+K.key):ee.toString(36)}function F(K){switch(K.status){case"fulfilled":return K.value;case"rejected":throw K.reason;default:switch(typeof K.status=="string"?K.then(D,D):(K.status="pending",K.then(function(ee){K.status==="pending"&&(K.status="fulfilled",K.value=ee)},function(ee){K.status==="pending"&&(K.status="rejected",K.reason=ee)})),K.status){case"fulfilled":return K.value;case"rejected":throw K.reason}}throw K}function z(K,ee,q,ae,re){var fe=typeof K;(fe==="undefined"||fe==="boolean")&&(K=null);var ve=!1;if(K===null)ve=!0;else switch(fe){case"bigint":case"string":case"number":ve=!0;break;case"object":switch(K.$$typeof){case e:case t:ve=!0;break;case h:return ve=K._init,z(ve(K._payload),ee,q,ae,re)}}if(ve)return re=re(K),ve=ae===""?"."+V(K,0):ae,_(re)?(q="",ve!=null&&(q=ve.replace(B,"$&/")+"/"),z(re,ee,q,"",function(Ae){return Ae})):re!=null&&(I(re)&&(re=L(re,q+(re.key==null||K&&K.key===re.key?"":(""+re.key).replace(B,"$&/")+"/")+ve)),ee.push(re)),1;ve=0;var Re=ae===""?".":ae+":";if(_(K))for(var le=0;le<K.length;le++)ae=K[le],fe=Re+V(ae,le),ve+=z(ae,ee,q,fe,re);else if(le=g(K),typeof le=="function")for(K=le.call(K),le=0;!(ae=K.next()).done;)ae=ae.value,fe=Re+V(ae,le++),ve+=z(ae,ee,q,fe,re);else if(fe==="object"){if(typeof K.then=="function")return z(F(K),ee,q,ae,re);throw ee=String(K),Error("Objects are not valid as a React child (found: "+(ee==="[object Object]"?"object with keys {"+Object.keys(K).join(", ")+"}":ee)+"). If you meant to render a collection of children, use an array instead.")}return ve}function j(K,ee,q){if(K==null)return K;var ae=[],re=0;return z(K,ae,"","",function(fe){return ee.call(q,fe,re++)}),ae}function H(K){if(K._status===-1){var ee=K._result;ee=ee(),ee.then(function(q){(K._status===0||K._status===-1)&&(K._status=1,K._result=q)},function(q){(K._status===0||K._status===-1)&&(K._status=2,K._result=q)}),K._status===-1&&(K._status=0,K._result=ee)}if(K._status===1)return K._result.default;throw K._result}var X=typeof reportError=="function"?reportError:function(K){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var ee=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof K=="object"&&K!==null&&typeof K.message=="string"?String(K.message):String(K),error:K});if(!window.dispatchEvent(ee))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",K);return}console.error(K)},P={map:j,forEach:function(K,ee,q){j(K,function(){ee.apply(this,arguments)},q)},count:function(K){var ee=0;return j(K,function(){ee++}),ee},toArray:function(K){return j(K,function(ee){return ee})||[]},only:function(K){if(!I(K))throw Error("React.Children.only expected to receive a single React element child.");return K}};return dt.Activity=p,dt.Children=P,dt.Component=x,dt.Fragment=n,dt.Profiler=i,dt.PureComponent=C,dt.StrictMode=r,dt.Suspense=c,dt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,dt.__COMPILER_RUNTIME={__proto__:null,c:function(K){return M.H.useMemoCache(K)}},dt.cache=function(K){return function(){return K.apply(null,arguments)}},dt.cacheSignal=function(){return null},dt.cloneElement=function(K,ee,q){if(K==null)throw Error("The argument must be a React element, but you passed "+K+".");var ae=v({},K.props),re=K.key;if(ee!=null)for(fe in ee.key!==void 0&&(re=""+ee.key),ee)!O.call(ee,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&ee.ref===void 0||(ae[fe]=ee[fe]);var fe=arguments.length-2;if(fe===1)ae.children=q;else if(1<fe){for(var ve=Array(fe),Re=0;Re<fe;Re++)ve[Re]=arguments[Re+2];ae.children=ve}return U(K.type,re,ae)},dt.createContext=function(K){return K={$$typeof:a,_currentValue:K,_currentValue2:K,_threadCount:0,Provider:null,Consumer:null},K.Provider=K,K.Consumer={$$typeof:o,_context:K},K},dt.createElement=function(K,ee,q){var ae,re={},fe=null;if(ee!=null)for(ae in ee.key!==void 0&&(fe=""+ee.key),ee)O.call(ee,ae)&&ae!=="key"&&ae!=="__self"&&ae!=="__source"&&(re[ae]=ee[ae]);var ve=arguments.length-2;if(ve===1)re.children=q;else if(1<ve){for(var Re=Array(ve),le=0;le<ve;le++)Re[le]=arguments[le+2];re.children=Re}if(K&&K.defaultProps)for(ae in ve=K.defaultProps,ve)re[ae]===void 0&&(re[ae]=ve[ae]);return U(K,fe,re)},dt.createRef=function(){return{current:null}},dt.forwardRef=function(K){return{$$typeof:l,render:K}},dt.isValidElement=I,dt.lazy=function(K){return{$$typeof:h,_payload:{_status:-1,_result:K},_init:H}},dt.memo=function(K,ee){return{$$typeof:f,type:K,compare:ee===void 0?null:ee}},dt.startTransition=function(K){var ee=M.T,q={};M.T=q;try{var ae=K(),re=M.S;re!==null&&re(q,ae),typeof ae=="object"&&ae!==null&&typeof ae.then=="function"&&ae.then(D,X)}catch(fe){X(fe)}finally{ee!==null&&q.types!==null&&(ee.types=q.types),M.T=ee}},dt.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},dt.use=function(K){return M.H.use(K)},dt.useActionState=function(K,ee,q){return M.H.useActionState(K,ee,q)},dt.useCallback=function(K,ee){return M.H.useCallback(K,ee)},dt.useContext=function(K){return M.H.useContext(K)},dt.useDebugValue=function(){},dt.useDeferredValue=function(K,ee){return M.H.useDeferredValue(K,ee)},dt.useEffect=function(K,ee){return M.H.useEffect(K,ee)},dt.useEffectEvent=function(K){return M.H.useEffectEvent(K)},dt.useId=function(){return M.H.useId()},dt.useImperativeHandle=function(K,ee,q){return M.H.useImperativeHandle(K,ee,q)},dt.useInsertionEffect=function(K,ee){return M.H.useInsertionEffect(K,ee)},dt.useLayoutEffect=function(K,ee){return M.H.useLayoutEffect(K,ee)},dt.useMemo=function(K,ee){return M.H.useMemo(K,ee)},dt.useOptimistic=function(K,ee){return M.H.useOptimistic(K,ee)},dt.useReducer=function(K,ee,q){return M.H.useReducer(K,ee,q)},dt.useRef=function(K){return M.H.useRef(K)},dt.useState=function(K){return M.H.useState(K)},dt.useSyncExternalStore=function(K,ee,q){return M.H.useSyncExternalStore(K,ee,q)},dt.useTransition=function(){return M.H.useTransition()},dt.version="19.2.5",dt}var t_;function np(){return t_||(t_=1,L1.exports=W7()),L1.exports}var S=np();const Po=DE(S),rl=V7({__proto__:null,default:Po},[S]);var N1={exports:{}},zd={},j1={exports:{}},F1={};/**
|
|
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 n_;function K7(){return n_||(n_=1,(function(e){function t(z,j){var H=z.length;z.push(j);e:for(;0<H;){var X=H-1>>>1,P=z[X];if(0<i(P,j))z[X]=j,z[H]=P,H=X;else break e}}function n(z){return z.length===0?null:z[0]}function r(z){if(z.length===0)return null;var j=z[0],H=z.pop();if(H!==j){z[0]=H;e:for(var X=0,P=z.length,K=P>>>1;X<K;){var ee=2*(X+1)-1,q=z[ee],ae=ee+1,re=z[ae];if(0>i(q,H))ae<P&&0>i(re,q)?(z[X]=re,z[ae]=H,X=ae):(z[X]=q,z[ee]=H,X=ee);else if(ae<P&&0>i(re,H))z[X]=re,z[ae]=H,X=ae;else break e}}return j}function i(z,j){var H=z.sortIndex-j.sortIndex;return H!==0?H:z.id-j.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,l=a.now();e.unstable_now=function(){return a.now()-l}}var c=[],f=[],h=1,p=null,m=3,g=!1,b=!1,v=!1,w=!1,x=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function R(z){for(var j=n(f);j!==null;){if(j.callback===null)r(f);else if(j.startTime<=z)r(f),j.sortIndex=j.expirationTime,t(c,j);else break;j=n(f)}}function _(z){if(v=!1,R(z),!b)if(n(c)!==null)b=!0,D||(D=!0,$());else{var j=n(f);j!==null&&F(_,j.startTime-z)}}var D=!1,M=-1,O=5,U=-1;function L(){return w?!0:!(e.unstable_now()-U<O)}function I(){if(w=!1,D){var z=e.unstable_now();U=z;var j=!0;try{e:{b=!1,v&&(v=!1,k(M),M=-1),g=!0;var H=m;try{t:{for(R(z),p=n(c);p!==null&&!(p.expirationTime>z&&L());){var X=p.callback;if(typeof X=="function"){p.callback=null,m=p.priorityLevel;var P=X(p.expirationTime<=z);if(z=e.unstable_now(),typeof P=="function"){p.callback=P,R(z),j=!0;break t}p===n(c)&&r(c),R(z)}else r(c);p=n(c)}if(p!==null)j=!0;else{var K=n(f);K!==null&&F(_,K.startTime-z),j=!1}}break e}finally{p=null,m=H,g=!1}j=void 0}}finally{j?$():D=!1}}}var $;if(typeof C=="function")$=function(){C(I)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,V=B.port2;B.port1.onmessage=I,$=function(){V.postMessage(null)}}else $=function(){x(I,0)};function F(z,j){M=x(function(){z(e.unstable_now())},j)}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(z){z.callback=null},e.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<z?Math.floor(1e3/z):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_next=function(z){switch(m){case 1:case 2:case 3:var j=3;break;default:j=m}var H=m;m=j;try{return z()}finally{m=H}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function(z,j){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var H=m;m=z;try{return j()}finally{m=H}},e.unstable_scheduleCallback=function(z,j,H){var X=e.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?X+H:X):H=X,z){case 1:var P=-1;break;case 2:P=250;break;case 5:P=1073741823;break;case 4:P=1e4;break;default:P=5e3}return P=H+P,z={id:h++,callback:j,priorityLevel:z,startTime:H,expirationTime:P,sortIndex:-1},H>X?(z.sortIndex=H,t(f,z),n(c)===null&&z===n(f)&&(v?(k(M),M=-1):v=!0,F(_,H-X))):(z.sortIndex=P,t(c,z),b||g||(b=!0,D||(D=!0,$()))),z},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(z){var j=m;return function(){var H=m;m=j;try{return z.apply(this,arguments)}finally{m=H}}}})(F1)),F1}var r_;function X7(){return r_||(r_=1,j1.exports=K7()),j1.exports}var z1={exports:{}},sr={};/**
|
|
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 i_;function Q7(){if(i_)return sr;i_=1;var e=np();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 l(c,f){if(c==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return sr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,sr.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)},sr.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()}},sr.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))},sr.prefetchDNS=function(c){typeof c=="string"&&r.d.D(c)},sr.preinit=function(c,f){if(typeof c=="string"&&f&&typeof f.as=="string"){var h=f.as,p=l(h,f.crossOrigin),m=typeof f.integrity=="string"?f.integrity:void 0,g=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:m,fetchPriority:g}):h==="script"&&r.d.X(c,{crossOrigin:p,integrity:m,fetchPriority:g,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},sr.preinitModule=function(c,f){if(typeof c=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var h=l(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)},sr.preload=function(c,f){if(typeof c=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var h=f.as,p=l(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})}},sr.preloadModule=function(c,f){if(typeof c=="string")if(f){var h=l(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)},sr.requestFormReset=function(c){r.d.r(c)},sr.unstable_batchedUpdates=function(c,f){return c(f)},sr.useFormState=function(c,f,h){return a.H.useFormState(c,f,h)},sr.useFormStatus=function(){return a.H.useHostTransitionStatus()},sr.version="19.2.5",sr}var o_;function L3(){if(o_)return z1.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(),z1.exports=Q7(),z1.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 s_;function Z7(){if(s_)return zd;s_=1;var e=X7(),t=np(),n=L3();function r(s){var u="https://react.dev/errors/"+s;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)u+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+s+"; visit "+u+" 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 u=s,d=s;if(s.alternate)for(;u.return;)u=u.return;else{s=u;do u=s,(u.flags&4098)!==0&&(d=u.return),s=u.return;while(s)}return u.tag===3?d:null}function a(s){if(s.tag===13){var u=s.memoizedState;if(u===null&&(s=s.alternate,s!==null&&(u=s.memoizedState)),u!==null)return u.dehydrated}return null}function l(s){if(s.tag===31){var u=s.memoizedState;if(u===null&&(s=s.alternate,s!==null&&(u=s.memoizedState)),u!==null)return u.dehydrated}return null}function c(s){if(o(s)!==s)throw Error(r(188))}function f(s){var u=s.alternate;if(!u){if(u=o(s),u===null)throw Error(r(188));return u!==s?null:s}for(var d=s,y=u;;){var E=d.return;if(E===null)break;var A=E.alternate;if(A===null){if(y=E.return,y!==null){d=y;continue}break}if(E.child===A.child){for(A=E.child;A;){if(A===d)return c(E),s;if(A===y)return c(E),u;A=A.sibling}throw Error(r(188))}if(d.return!==y.return)d=E,y=A;else{for(var N=!1,G=E.child;G;){if(G===d){N=!0,d=E,y=A;break}if(G===y){N=!0,y=E,d=A;break}G=G.sibling}if(!N){for(G=A.child;G;){if(G===d){N=!0,d=A,y=E;break}if(G===y){N=!0,y=A,d=E;break}G=G.sibling}if(!N)throw Error(r(189))}}if(d.alternate!==y)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?s:u}function h(s){var u=s.tag;if(u===5||u===26||u===27||u===6)return s;for(s=s.child;s!==null;){if(u=h(s),u!==null)return u;s=s.sibling}return null}var p=Object.assign,m=Symbol.for("react.element"),g=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),C=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),U=Symbol.for("react.activity"),L=Symbol.for("react.memo_cache_sentinel"),I=Symbol.iterator;function $(s){return s===null||typeof s!="object"?null:(s=I&&s[I]||s["@@iterator"],typeof s=="function"?s:null)}var B=Symbol.for("react.client.reference");function V(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===B?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case v:return"Fragment";case x:return"Profiler";case w:return"StrictMode";case _:return"Suspense";case D:return"SuspenseList";case U:return"Activity"}if(typeof s=="object")switch(s.$$typeof){case b:return"Portal";case C:return s.displayName||"Context";case k:return(s._context.displayName||"Context")+".Consumer";case R:var u=s.render;return s=s.displayName,s||(s=u.displayName||u.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case M:return u=s.displayName||null,u!==null?u:V(s.type)||"Memo";case O:u=s._payload,s=s._init;try{return V(s(u))}catch{}}return null}var F=Array.isArray,z=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H={pending:!1,data:null,method:null,action:null},X=[],P=-1;function K(s){return{current:s}}function ee(s){0>P||(s.current=X[P],X[P]=null,P--)}function q(s,u){P++,X[P]=s.current,s.current=u}var ae=K(null),re=K(null),fe=K(null),ve=K(null);function Re(s,u){switch(q(fe,u),q(re,s),q(ae,null),u.nodeType){case 9:case 11:s=(s=u.documentElement)&&(s=s.namespaceURI)?vT(s):0;break;default:if(s=u.tagName,u=u.namespaceURI)u=vT(u),s=xT(u,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}ee(ae),q(ae,s)}function le(){ee(ae),ee(re),ee(fe)}function Ae(s){s.memoizedState!==null&&q(ve,s);var u=ae.current,d=xT(u,s.type);u!==d&&(q(re,s),q(ae,d))}function Ie(s){re.current===s&&(ee(ae),ee(re)),ve.current===s&&(ee(ve),Id._currentValue=H)}var Y,W;function Q(s){if(Y===void 0)try{throw Error()}catch(d){var u=d.stack.trim().match(/\n( *(at )?)/);Y=u&&u[1]||"",W=-1<d.stack.indexOf(`
|
|
43
|
-
at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
44
|
-
`+Y+s+W}var pe=!1;function oe(s,u){if(!s||pe)return"";pe=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var y={DetermineComponentFrameRoot:function(){try{if(u){var Oe=function(){throw Error()};if(Object.defineProperty(Oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Oe,[])}catch(Ee){var we=Ee}Reflect.construct(s,[],Oe)}else{try{Oe.call()}catch(Ee){we=Ee}s.call(Oe.prototype)}}else{try{throw Error()}catch(Ee){we=Ee}(Oe=s())&&typeof Oe.catch=="function"&&Oe.catch(function(){})}}catch(Ee){if(Ee&&we&&typeof Ee.stack=="string")return[Ee.stack,we.stack]}return[null,null]}};y.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var E=Object.getOwnPropertyDescriptor(y.DetermineComponentFrameRoot,"name");E&&E.configurable&&Object.defineProperty(y.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var A=y.DetermineComponentFrameRoot(),N=A[0],G=A[1];if(N&&G){var se=N.split(`
|
|
45
|
-
`),xe=G.split(`
|
|
46
|
-
`);for(E=y=0;y<se.length&&!se[y].includes("DetermineComponentFrameRoot");)y++;for(;E<xe.length&&!xe[E].includes("DetermineComponentFrameRoot");)E++;if(y===se.length||E===xe.length)for(y=se.length-1,E=xe.length-1;1<=y&&0<=E&&se[y]!==xe[E];)E--;for(;1<=y&&0<=E;y--,E--)if(se[y]!==xe[E]){if(y!==1||E!==1)do if(y--,E--,0>E||se[y]!==xe[E]){var Te=`
|
|
47
|
-
`+se[y].replace(" at new "," at ");return s.displayName&&Te.includes("<anonymous>")&&(Te=Te.replace("<anonymous>",s.displayName)),Te}while(1<=y&&0<=E);break}}}finally{pe=!1,Error.prepareStackTrace=d}return(d=s?s.displayName||s.name:"")?Q(d):""}function me(s,u){switch(s.tag){case 26:case 27:case 5:return Q(s.type);case 16:return Q("Lazy");case 13:return s.child!==u&&u!==null?Q("Suspense Fallback"):Q("Suspense");case 19:return Q("SuspenseList");case 0:case 15:return oe(s.type,!1);case 11:return oe(s.type.render,!1);case 1:return oe(s.type,!0);case 31:return Q("Activity");default:return""}}function te(s){try{var u="",d=null;do u+=me(s,d),d=s,s=s.return;while(s);return u}catch(y){return`
|
|
48
|
-
Error generating stack: `+y.message+`
|
|
49
|
-
`+y.stack}}var Z=Object.prototype.hasOwnProperty,ie=e.unstable_scheduleCallback,J=e.unstable_cancelCallback,Se=e.unstable_shouldYield,ke=e.unstable_requestPaint,ge=e.unstable_now,_e=e.unstable_getCurrentPriorityLevel,de=e.unstable_ImmediatePriority,Ce=e.unstable_UserBlockingPriority,ye=e.unstable_NormalPriority,Me=e.unstable_LowPriority,Pe=e.unstable_IdlePriority,Ke=e.log,Et=e.unstable_setDisableYieldValue,vt=null,Le=null;function Be(s){if(typeof Ke=="function"&&Et(s),Le&&typeof Le.setStrictMode=="function")try{Le.setStrictMode(vt,s)}catch{}}var $e=Math.clz32?Math.clz32:et,Ye=Math.log,Je=Math.LN2;function et(s){return s>>>=0,s===0?32:31-(Ye(s)/Je|0)|0}var tt=256,jt=262144,kt=4194304;function Ot(s){var u=s&42;if(u!==0)return u;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 zt(s,u,d){var y=s.pendingLanes;if(y===0)return 0;var E=0,A=s.suspendedLanes,N=s.pingedLanes;s=s.warmLanes;var G=y&134217727;return G!==0?(y=G&~A,y!==0?E=Ot(y):(N&=G,N!==0?E=Ot(N):d||(d=G&~s,d!==0&&(E=Ot(d))))):(G=y&~A,G!==0?E=Ot(G):N!==0?E=Ot(N):d||(d=y&~s,d!==0&&(E=Ot(d)))),E===0?0:u!==0&&u!==E&&(u&A)===0&&(A=E&-E,d=u&-u,A>=d||A===32&&(d&4194048)!==0)?u:E}function Dn(s,u){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&u)===0}function Tr(s,u){switch(s){case 1:case 2:case 4:case 8:case 64:return u+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 u+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 Vn(){var s=kt;return kt<<=1,(kt&62914560)===0&&(kt=4194304),s}function Kr(s){for(var u=[],d=0;31>d;d++)u.push(s);return u}function Nn(s,u){s.pendingLanes|=u,u!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function rt(s,u,d,y,E,A){var N=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 G=s.entanglements,se=s.expirationTimes,xe=s.hiddenUpdates;for(d=N&~d;0<d;){var Te=31-$e(d),Oe=1<<Te;G[Te]=0,se[Te]=-1;var we=xe[Te];if(we!==null)for(xe[Te]=null,Te=0;Te<we.length;Te++){var Ee=we[Te];Ee!==null&&(Ee.lane&=-536870913)}d&=~Oe}y!==0&&Ut(s,y,0),A!==0&&E===0&&s.tag!==0&&(s.suspendedLanes|=A&~(N&~u))}function Ut(s,u,d){s.pendingLanes|=u,s.suspendedLanes&=~u;var y=31-$e(u);s.entangledLanes|=u,s.entanglements[y]=s.entanglements[y]|1073741824|d&261930}function an(s,u){var d=s.entangledLanes|=u;for(s=s.entanglements;d;){var y=31-$e(d),E=1<<y;E&u|s[y]&u&&(s[y]|=u),d&=~E}}function Jt(s,u){var d=u&-u;return d=(d&42)!==0?1:gn(d),(d&(s.suspendedLanes|u))!==0?0:d}function gn(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 Ki(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function Si(){var s=j.p;return s!==0?s:(s=window.event,s===void 0?32:UT(s.type))}function fo(s,u){var d=j.p;try{return j.p=s,u()}finally{j.p=d}}var or=Math.random().toString(36).slice(2),un="__reactFiber$"+or,Zn="__reactProps$"+or,Uo="__reactContainer$"+or,ju="__reactEvents$"+or,D8="__reactListeners$"+or,M8="__reactHandles$"+or,sR="__reactResources$"+or,Xf="__reactMarker$"+or;function Rv(s){delete s[un],delete s[Zn],delete s[ju],delete s[D8],delete s[M8]}function Fu(s){var u=s[un];if(u)return u;for(var d=s.parentNode;d;){if(u=d[Uo]||d[un]){if(d=u.alternate,u.child!==null||d!==null&&d.child!==null)for(s=AT(s);s!==null;){if(d=s[un])return d;s=AT(s)}return u}s=d,d=s.parentNode}return null}function zu(s){if(s=s[un]||s[Uo]){var u=s.tag;if(u===5||u===6||u===13||u===31||u===26||u===27||u===3)return s}return null}function Qf(s){var u=s.tag;if(u===5||u===26||u===27||u===6)return s.stateNode;throw Error(r(33))}function Bu(s){var u=s[sR];return u||(u=s[sR]={hoistableStyles:new Map,hoistableScripts:new Map}),u}function Gn(s){s[Xf]=!0}var aR=new Set,lR={};function bl(s,u){Hu(s,u),Hu(s+"Capture",u)}function Hu(s,u){for(lR[s]=u,s=0;s<u.length;s++)aR.add(u[s])}var $8=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]*$"),uR={},cR={};function O8(s){return Z.call(cR,s)?!0:Z.call(uR,s)?!1:$8.test(s)?cR[s]=!0:(uR[s]=!0,!1)}function kp(s,u,d){if(O8(u))if(d===null)s.removeAttribute(u);else{switch(typeof d){case"undefined":case"function":case"symbol":s.removeAttribute(u);return;case"boolean":var y=u.toLowerCase().slice(0,5);if(y!=="data-"&&y!=="aria-"){s.removeAttribute(u);return}}s.setAttribute(u,""+d)}}function Rp(s,u,d){if(d===null)s.removeAttribute(u);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(u);return}s.setAttribute(u,""+d)}}function qo(s,u,d,y){if(y===null)s.removeAttribute(d);else{switch(typeof y){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(d);return}s.setAttributeNS(u,d,""+y)}}function Ei(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function fR(s){var u=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function P8(s,u,d){var y=Object.getOwnPropertyDescriptor(s.constructor.prototype,u);if(!s.hasOwnProperty(u)&&typeof y<"u"&&typeof y.get=="function"&&typeof y.set=="function"){var E=y.get,A=y.set;return Object.defineProperty(s,u,{configurable:!0,get:function(){return E.call(this)},set:function(N){d=""+N,A.call(this,N)}}),Object.defineProperty(s,u,{enumerable:y.enumerable}),{getValue:function(){return d},setValue:function(N){d=""+N},stopTracking:function(){s._valueTracker=null,delete s[u]}}}}function Av(s){if(!s._valueTracker){var u=fR(s)?"checked":"value";s._valueTracker=P8(s,u,""+s[u])}}function dR(s){if(!s)return!1;var u=s._valueTracker;if(!u)return!0;var d=u.getValue(),y="";return s&&(y=fR(s)?s.checked?"true":"false":s.value),s=y,s!==d?(u.setValue(s),!0):!1}function Ap(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 I8=/[\n"\\]/g;function Ci(s){return s.replace(I8,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function Tv(s,u,d,y,E,A,N,G){s.name="",N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?s.type=N:s.removeAttribute("type"),u!=null?N==="number"?(u===0&&s.value===""||s.value!=u)&&(s.value=""+Ei(u)):s.value!==""+Ei(u)&&(s.value=""+Ei(u)):N!=="submit"&&N!=="reset"||s.removeAttribute("value"),u!=null?_v(s,N,Ei(u)):d!=null?_v(s,N,Ei(d)):y!=null&&s.removeAttribute("value"),E==null&&A!=null&&(s.defaultChecked=!!A),E!=null&&(s.checked=E&&typeof E!="function"&&typeof E!="symbol"),G!=null&&typeof G!="function"&&typeof G!="symbol"&&typeof G!="boolean"?s.name=""+Ei(G):s.removeAttribute("name")}function hR(s,u,d,y,E,A,N,G){if(A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(s.type=A),u!=null||d!=null){if(!(A!=="submit"&&A!=="reset"||u!=null)){Av(s);return}d=d!=null?""+Ei(d):"",u=u!=null?""+Ei(u):d,G||u===s.value||(s.value=u),s.defaultValue=u}y=y??E,y=typeof y!="function"&&typeof y!="symbol"&&!!y,s.checked=G?s.checked:!!y,s.defaultChecked=!!y,N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"&&(s.name=N),Av(s)}function _v(s,u,d){u==="number"&&Ap(s.ownerDocument)===s||s.defaultValue===""+d||(s.defaultValue=""+d)}function Uu(s,u,d,y){if(s=s.options,u){u={};for(var E=0;E<d.length;E++)u["$"+d[E]]=!0;for(d=0;d<s.length;d++)E=u.hasOwnProperty("$"+s[d].value),s[d].selected!==E&&(s[d].selected=E),E&&y&&(s[d].defaultSelected=!0)}else{for(d=""+Ei(d),u=null,E=0;E<s.length;E++){if(s[E].value===d){s[E].selected=!0,y&&(s[E].defaultSelected=!0);return}u!==null||s[E].disabled||(u=s[E])}u!==null&&(u.selected=!0)}}function pR(s,u,d){if(u!=null&&(u=""+Ei(u),u!==s.value&&(s.value=u),d==null)){s.defaultValue!==u&&(s.defaultValue=u);return}s.defaultValue=d!=null?""+Ei(d):""}function mR(s,u,d,y){if(u==null){if(y!=null){if(d!=null)throw Error(r(92));if(F(y)){if(1<y.length)throw Error(r(93));y=y[0]}d=y}d==null&&(d=""),u=d}d=Ei(u),s.defaultValue=d,y=s.textContent,y===d&&y!==""&&y!==null&&(s.value=y),Av(s)}function qu(s,u){if(u){var d=s.firstChild;if(d&&d===s.lastChild&&d.nodeType===3){d.nodeValue=u;return}}s.textContent=u}var L8=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 gR(s,u,d){var y=u.indexOf("--")===0;d==null||typeof d=="boolean"||d===""?y?s.setProperty(u,""):u==="float"?s.cssFloat="":s[u]="":y?s.setProperty(u,d):typeof d!="number"||d===0||L8.has(u)?u==="float"?s.cssFloat=d:s[u]=(""+d).trim():s[u]=d+"px"}function yR(s,u,d){if(u!=null&&typeof u!="object")throw Error(r(62));if(s=s.style,d!=null){for(var y in d)!d.hasOwnProperty(y)||u!=null&&u.hasOwnProperty(y)||(y.indexOf("--")===0?s.setProperty(y,""):y==="float"?s.cssFloat="":s[y]="");for(var E in u)y=u[E],u.hasOwnProperty(E)&&d[E]!==y&&gR(s,E,y)}else for(var A in u)u.hasOwnProperty(A)&&gR(s,A,u[A])}function Dv(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 N8=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"]]),j8=/^[\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 Tp(s){return j8.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}function Vo(){}var Mv=null;function $v(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var Vu=null,Gu=null;function bR(s){var u=zu(s);if(u&&(s=u.stateNode)){var d=s[Zn]||null;e:switch(s=u.stateNode,u.type){case"input":if(Tv(s,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name),u=d.name,d.type==="radio"&&u!=null){for(d=s;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll('input[name="'+Ci(""+u)+'"][type="radio"]'),u=0;u<d.length;u++){var y=d[u];if(y!==s&&y.form===s.form){var E=y[Zn]||null;if(!E)throw Error(r(90));Tv(y,E.value,E.defaultValue,E.defaultValue,E.checked,E.defaultChecked,E.type,E.name)}}for(u=0;u<d.length;u++)y=d[u],y.form===s.form&&dR(y)}break e;case"textarea":pR(s,d.value,d.defaultValue);break e;case"select":u=d.value,u!=null&&Uu(s,!!d.multiple,u,!1)}}}var Ov=!1;function vR(s,u,d){if(Ov)return s(u,d);Ov=!0;try{var y=s(u);return y}finally{if(Ov=!1,(Vu!==null||Gu!==null)&&(mm(),Vu&&(u=Vu,s=Gu,Gu=Vu=null,bR(u),s)))for(u=0;u<s.length;u++)bR(s[u])}}function Zf(s,u){var d=s.stateNode;if(d===null)return null;var y=d[Zn]||null;if(y===null)return null;d=y[u];e:switch(u){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(y=!y.disabled)||(s=s.type,y=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!y;break e;default:s=!1}if(s)return null;if(d&&typeof d!="function")throw Error(r(231,u,typeof d));return d}var Go=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Pv=!1;if(Go)try{var Jf={};Object.defineProperty(Jf,"passive",{get:function(){Pv=!0}}),window.addEventListener("test",Jf,Jf),window.removeEventListener("test",Jf,Jf)}catch{Pv=!1}var Us=null,Iv=null,_p=null;function xR(){if(_p)return _p;var s,u=Iv,d=u.length,y,E="value"in Us?Us.value:Us.textContent,A=E.length;for(s=0;s<d&&u[s]===E[s];s++);var N=d-s;for(y=1;y<=N&&u[d-y]===E[A-y];y++);return _p=E.slice(s,1<y?1-y:void 0)}function Dp(s){var u=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&u===13&&(s=13)):s=u,s===10&&(s=13),32<=s||s===13?s:0}function Mp(){return!0}function wR(){return!1}function _r(s){function u(d,y,E,A,N){this._reactName=d,this._targetInst=E,this.type=y,this.nativeEvent=A,this.target=N,this.currentTarget=null;for(var G in s)s.hasOwnProperty(G)&&(d=s[G],this[G]=d?d(A):A[G]);return this.isDefaultPrevented=(A.defaultPrevented!=null?A.defaultPrevented:A.returnValue===!1)?Mp:wR,this.isPropagationStopped=wR,this}return p(u.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=Mp)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=Mp)},persist:function(){},isPersistent:Mp}),u}var vl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},$p=_r(vl),ed=p({},vl,{view:0,detail:0}),F8=_r(ed),Lv,Nv,td,Op=p({},ed,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fv,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!==td&&(td&&s.type==="mousemove"?(Lv=s.screenX-td.screenX,Nv=s.screenY-td.screenY):Nv=Lv=0,td=s),Lv)},movementY:function(s){return"movementY"in s?s.movementY:Nv}}),SR=_r(Op),z8=p({},Op,{dataTransfer:0}),B8=_r(z8),H8=p({},ed,{relatedTarget:0}),jv=_r(H8),U8=p({},vl,{animationName:0,elapsedTime:0,pseudoElement:0}),q8=_r(U8),V8=p({},vl,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),G8=_r(V8),Y8=p({},vl,{data:0}),ER=_r(Y8),W8={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},K8={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"},X8={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Q8(s){var u=this.nativeEvent;return u.getModifierState?u.getModifierState(s):(s=X8[s])?!!u[s]:!1}function Fv(){return Q8}var Z8=p({},ed,{key:function(s){if(s.key){var u=W8[s.key]||s.key;if(u!=="Unidentified")return u}return s.type==="keypress"?(s=Dp(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?K8[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fv,charCode:function(s){return s.type==="keypress"?Dp(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?Dp(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),J8=_r(Z8),eB=p({},Op,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),CR=_r(eB),tB=p({},ed,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fv}),nB=_r(tB),rB=p({},vl,{propertyName:0,elapsedTime:0,pseudoElement:0}),iB=_r(rB),oB=p({},Op,{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}),sB=_r(oB),aB=p({},vl,{newState:0,oldState:0}),lB=_r(aB),uB=[9,13,27,32],zv=Go&&"CompositionEvent"in window,nd=null;Go&&"documentMode"in document&&(nd=document.documentMode);var cB=Go&&"TextEvent"in window&&!nd,kR=Go&&(!zv||nd&&8<nd&&11>=nd),RR=" ",AR=!1;function TR(s,u){switch(s){case"keyup":return uB.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _R(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Yu=!1;function fB(s,u){switch(s){case"compositionend":return _R(u);case"keypress":return u.which!==32?null:(AR=!0,RR);case"textInput":return s=u.data,s===RR&&AR?null:s;default:return null}}function dB(s,u){if(Yu)return s==="compositionend"||!zv&&TR(s,u)?(s=xR(),_p=Iv=Us=null,Yu=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1<u.char.length)return u.char;if(u.which)return String.fromCharCode(u.which)}return null;case"compositionend":return kR&&u.locale!=="ko"?null:u.data;default:return null}}var hB={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 DR(s){var u=s&&s.nodeName&&s.nodeName.toLowerCase();return u==="input"?!!hB[s.type]:u==="textarea"}function MR(s,u,d,y){Vu?Gu?Gu.push(y):Gu=[y]:Vu=y,u=Sm(u,"onChange"),0<u.length&&(d=new $p("onChange","change",null,d,y),s.push({event:d,listeners:u}))}var rd=null,id=null;function pB(s){hT(s,0)}function Pp(s){var u=Qf(s);if(dR(u))return s}function $R(s,u){if(s==="change")return u}var OR=!1;if(Go){var Bv;if(Go){var Hv="oninput"in document;if(!Hv){var PR=document.createElement("div");PR.setAttribute("oninput","return;"),Hv=typeof PR.oninput=="function"}Bv=Hv}else Bv=!1;OR=Bv&&(!document.documentMode||9<document.documentMode)}function IR(){rd&&(rd.detachEvent("onpropertychange",LR),id=rd=null)}function LR(s){if(s.propertyName==="value"&&Pp(id)){var u=[];MR(u,id,s,$v(s)),vR(pB,u)}}function mB(s,u,d){s==="focusin"?(IR(),rd=u,id=d,rd.attachEvent("onpropertychange",LR)):s==="focusout"&&IR()}function gB(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return Pp(id)}function yB(s,u){if(s==="click")return Pp(u)}function bB(s,u){if(s==="input"||s==="change")return Pp(u)}function vB(s,u){return s===u&&(s!==0||1/s===1/u)||s!==s&&u!==u}var Xr=typeof Object.is=="function"?Object.is:vB;function od(s,u){if(Xr(s,u))return!0;if(typeof s!="object"||s===null||typeof u!="object"||u===null)return!1;var d=Object.keys(s),y=Object.keys(u);if(d.length!==y.length)return!1;for(y=0;y<d.length;y++){var E=d[y];if(!Z.call(u,E)||!Xr(s[E],u[E]))return!1}return!0}function NR(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function jR(s,u){var d=NR(s);s=0;for(var y;d;){if(d.nodeType===3){if(y=s+d.textContent.length,s<=u&&y>=u)return{node:d,offset:u-s};s=y}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=NR(d)}}function FR(s,u){return s&&u?s===u?!0:s&&s.nodeType===3?!1:u&&u.nodeType===3?FR(s,u.parentNode):"contains"in s?s.contains(u):s.compareDocumentPosition?!!(s.compareDocumentPosition(u)&16):!1:!1}function zR(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var u=Ap(s.document);u instanceof s.HTMLIFrameElement;){try{var d=typeof u.contentWindow.location.href=="string"}catch{d=!1}if(d)s=u.contentWindow;else break;u=Ap(s.document)}return u}function Uv(s){var u=s&&s.nodeName&&s.nodeName.toLowerCase();return u&&(u==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||u==="textarea"||s.contentEditable==="true")}var xB=Go&&"documentMode"in document&&11>=document.documentMode,Wu=null,qv=null,sd=null,Vv=!1;function BR(s,u,d){var y=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;Vv||Wu==null||Wu!==Ap(y)||(y=Wu,"selectionStart"in y&&Uv(y)?y={start:y.selectionStart,end:y.selectionEnd}:(y=(y.ownerDocument&&y.ownerDocument.defaultView||window).getSelection(),y={anchorNode:y.anchorNode,anchorOffset:y.anchorOffset,focusNode:y.focusNode,focusOffset:y.focusOffset}),sd&&od(sd,y)||(sd=y,y=Sm(qv,"onSelect"),0<y.length&&(u=new $p("onSelect","select",null,u,d),s.push({event:u,listeners:y}),u.target=Wu)))}function xl(s,u){var d={};return d[s.toLowerCase()]=u.toLowerCase(),d["Webkit"+s]="webkit"+u,d["Moz"+s]="moz"+u,d}var Ku={animationend:xl("Animation","AnimationEnd"),animationiteration:xl("Animation","AnimationIteration"),animationstart:xl("Animation","AnimationStart"),transitionrun:xl("Transition","TransitionRun"),transitionstart:xl("Transition","TransitionStart"),transitioncancel:xl("Transition","TransitionCancel"),transitionend:xl("Transition","TransitionEnd")},Gv={},HR={};Go&&(HR=document.createElement("div").style,"AnimationEvent"in window||(delete Ku.animationend.animation,delete Ku.animationiteration.animation,delete Ku.animationstart.animation),"TransitionEvent"in window||delete Ku.transitionend.transition);function wl(s){if(Gv[s])return Gv[s];if(!Ku[s])return s;var u=Ku[s],d;for(d in u)if(u.hasOwnProperty(d)&&d in HR)return Gv[s]=u[d];return s}var UR=wl("animationend"),qR=wl("animationiteration"),VR=wl("animationstart"),wB=wl("transitionrun"),SB=wl("transitionstart"),EB=wl("transitioncancel"),GR=wl("transitionend"),YR=new Map,Yv="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(" ");Yv.push("scrollEnd");function Xi(s,u){YR.set(s,u),bl(u,[s])}var Ip=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var u=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(u))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},ki=[],Xu=0,Wv=0;function Lp(){for(var s=Xu,u=Wv=Xu=0;u<s;){var d=ki[u];ki[u++]=null;var y=ki[u];ki[u++]=null;var E=ki[u];ki[u++]=null;var A=ki[u];if(ki[u++]=null,y!==null&&E!==null){var N=y.pending;N===null?E.next=E:(E.next=N.next,N.next=E),y.pending=E}A!==0&&WR(d,E,A)}}function Np(s,u,d,y){ki[Xu++]=s,ki[Xu++]=u,ki[Xu++]=d,ki[Xu++]=y,Wv|=y,s.lanes|=y,s=s.alternate,s!==null&&(s.lanes|=y)}function Kv(s,u,d,y){return Np(s,u,d,y),jp(s)}function Sl(s,u){return Np(s,null,null,u),jp(s)}function WR(s,u,d){s.lanes|=d;var y=s.alternate;y!==null&&(y.lanes|=d);for(var E=!1,A=s.return;A!==null;)A.childLanes|=d,y=A.alternate,y!==null&&(y.childLanes|=d),A.tag===22&&(s=A.stateNode,s===null||s._visibility&1||(E=!0)),s=A,A=A.return;return s.tag===3?(A=s.stateNode,E&&u!==null&&(E=31-$e(d),s=A.hiddenUpdates,y=s[E],y===null?s[E]=[u]:y.push(u),u.lane=d|536870912),A):null}function jp(s){if(50<Td)throw Td=0,i1=null,Error(r(185));for(var u=s.return;u!==null;)s=u,u=s.return;return s.tag===3?s.stateNode:null}var Qu={};function CB(s,u,d,y){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=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=y,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qr(s,u,d,y){return new CB(s,u,d,y)}function Xv(s){return s=s.prototype,!(!s||!s.isReactComponent)}function Yo(s,u){var d=s.alternate;return d===null?(d=Qr(s.tag,u,s.key,s.mode),d.elementType=s.elementType,d.type=s.type,d.stateNode=s.stateNode,d.alternate=s,s.alternate=d):(d.pendingProps=u,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,u=s.dependencies,d.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},d.sibling=s.sibling,d.index=s.index,d.ref=s.ref,d.refCleanup=s.refCleanup,d}function KR(s,u){s.flags&=65011714;var d=s.alternate;return d===null?(s.childLanes=0,s.lanes=u,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,u=d.dependencies,s.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext}),s}function Fp(s,u,d,y,E,A){var N=0;if(y=s,typeof s=="function")Xv(s)&&(N=1);else if(typeof s=="string")N=_7(s,d,ae.current)?26:s==="html"||s==="head"||s==="body"?27:5;else e:switch(s){case U:return s=Qr(31,d,u,E),s.elementType=U,s.lanes=A,s;case v:return El(d.children,E,A,u);case w:N=8,E|=24;break;case x:return s=Qr(12,d,u,E|2),s.elementType=x,s.lanes=A,s;case _:return s=Qr(13,d,u,E),s.elementType=_,s.lanes=A,s;case D:return s=Qr(19,d,u,E),s.elementType=D,s.lanes=A,s;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case C:N=10;break e;case k:N=9;break e;case R:N=11;break e;case M:N=14;break e;case O:N=16,y=null;break e}N=29,d=Error(r(130,s===null?"null":typeof s,"")),y=null}return u=Qr(N,d,u,E),u.elementType=s,u.type=y,u.lanes=A,u}function El(s,u,d,y){return s=Qr(7,s,y,u),s.lanes=d,s}function Qv(s,u,d){return s=Qr(6,s,null,u),s.lanes=d,s}function XR(s){var u=Qr(18,null,null,0);return u.stateNode=s,u}function Zv(s,u,d){return u=Qr(4,s.children!==null?s.children:[],s.key,u),u.lanes=d,u.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},u}var QR=new WeakMap;function Ri(s,u){if(typeof s=="object"&&s!==null){var d=QR.get(s);return d!==void 0?d:(u={value:s,source:u,stack:te(u)},QR.set(s,u),u)}return{value:s,source:u,stack:te(u)}}var Zu=[],Ju=0,zp=null,ad=0,Ai=[],Ti=0,qs=null,ho=1,po="";function Wo(s,u){Zu[Ju++]=ad,Zu[Ju++]=zp,zp=s,ad=u}function ZR(s,u,d){Ai[Ti++]=ho,Ai[Ti++]=po,Ai[Ti++]=qs,qs=s;var y=ho;s=po;var E=32-$e(y)-1;y&=~(1<<E),d+=1;var A=32-$e(u)+E;if(30<A){var N=E-E%5;A=(y&(1<<N)-1).toString(32),y>>=N,E-=N,ho=1<<32-$e(u)+E|d<<E|y,po=A+s}else ho=1<<A|d<<E|y,po=s}function Jv(s){s.return!==null&&(Wo(s,1),ZR(s,1,0))}function e0(s){for(;s===zp;)zp=Zu[--Ju],Zu[Ju]=null,ad=Zu[--Ju],Zu[Ju]=null;for(;s===qs;)qs=Ai[--Ti],Ai[Ti]=null,po=Ai[--Ti],Ai[Ti]=null,ho=Ai[--Ti],Ai[Ti]=null}function JR(s,u){Ai[Ti++]=ho,Ai[Ti++]=po,Ai[Ti++]=qs,ho=u.id,po=u.overflow,qs=s}var Jn=null,cn=null,Pt=!1,Vs=null,_i=!1,t0=Error(r(519));function Gs(s){var u=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ld(Ri(u,s)),t0}function e2(s){var u=s.stateNode,d=s.type,y=s.memoizedProps;switch(u[un]=s,u[Zn]=y,d){case"dialog":At("cancel",u),At("close",u);break;case"iframe":case"object":case"embed":At("load",u);break;case"video":case"audio":for(d=0;d<Dd.length;d++)At(Dd[d],u);break;case"source":At("error",u);break;case"img":case"image":case"link":At("error",u),At("load",u);break;case"details":At("toggle",u);break;case"input":At("invalid",u),hR(u,y.value,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name,!0);break;case"select":At("invalid",u);break;case"textarea":At("invalid",u),mR(u,y.value,y.defaultValue,y.children)}d=y.children,typeof d!="string"&&typeof d!="number"&&typeof d!="bigint"||u.textContent===""+d||y.suppressHydrationWarning===!0||yT(u.textContent,d)?(y.popover!=null&&(At("beforetoggle",u),At("toggle",u)),y.onScroll!=null&&At("scroll",u),y.onScrollEnd!=null&&At("scrollend",u),y.onClick!=null&&(u.onclick=Vo),u=!0):u=!1,u||Gs(s,!0)}function t2(s){for(Jn=s.return;Jn;)switch(Jn.tag){case 5:case 31:case 13:_i=!1;return;case 27:case 3:_i=!0;return;default:Jn=Jn.return}}function ec(s){if(s!==Jn)return!1;if(!Pt)return t2(s),Pt=!0,!1;var u=s.tag,d;if((d=u!==3&&u!==27)&&((d=u===5)&&(d=s.type,d=!(d!=="form"&&d!=="button")||v1(s.type,s.memoizedProps)),d=!d),d&&cn&&Gs(s),t2(s),u===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));cn=RT(s)}else if(u===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));cn=RT(s)}else u===27?(u=cn,sa(s.type)?(s=C1,C1=null,cn=s):cn=u):cn=Jn?Mi(s.stateNode.nextSibling):null;return!0}function Cl(){cn=Jn=null,Pt=!1}function n0(){var s=Vs;return s!==null&&(Or===null?Or=s:Or.push.apply(Or,s),Vs=null),s}function ld(s){Vs===null?Vs=[s]:Vs.push(s)}var r0=K(null),kl=null,Ko=null;function Ys(s,u,d){q(r0,u._currentValue),u._currentValue=d}function Xo(s){s._currentValue=r0.current,ee(r0)}function i0(s,u,d){for(;s!==null;){var y=s.alternate;if((s.childLanes&u)!==u?(s.childLanes|=u,y!==null&&(y.childLanes|=u)):y!==null&&(y.childLanes&u)!==u&&(y.childLanes|=u),s===d)break;s=s.return}}function o0(s,u,d,y){var E=s.child;for(E!==null&&(E.return=s);E!==null;){var A=E.dependencies;if(A!==null){var N=E.child;A=A.firstContext;e:for(;A!==null;){var G=A;A=E;for(var se=0;se<u.length;se++)if(G.context===u[se]){A.lanes|=d,G=A.alternate,G!==null&&(G.lanes|=d),i0(A.return,d,s),y||(N=null);break e}A=G.next}}else if(E.tag===18){if(N=E.return,N===null)throw Error(r(341));N.lanes|=d,A=N.alternate,A!==null&&(A.lanes|=d),i0(N,d,s),N=null}else N=E.child;if(N!==null)N.return=E;else for(N=E;N!==null;){if(N===s){N=null;break}if(E=N.sibling,E!==null){E.return=N.return,N=E;break}N=N.return}E=N}}function tc(s,u,d,y){s=null;for(var E=u,A=!1;E!==null;){if(!A){if((E.flags&524288)!==0)A=!0;else if((E.flags&262144)!==0)break}if(E.tag===10){var N=E.alternate;if(N===null)throw Error(r(387));if(N=N.memoizedProps,N!==null){var G=E.type;Xr(E.pendingProps.value,N.value)||(s!==null?s.push(G):s=[G])}}else if(E===ve.current){if(N=E.alternate,N===null)throw Error(r(387));N.memoizedState.memoizedState!==E.memoizedState.memoizedState&&(s!==null?s.push(Id):s=[Id])}E=E.return}s!==null&&o0(u,s,d,y),u.flags|=262144}function Bp(s){for(s=s.firstContext;s!==null;){if(!Xr(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function Rl(s){kl=s,Ko=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function er(s){return n2(kl,s)}function Hp(s,u){return kl===null&&Rl(s),n2(s,u)}function n2(s,u){var d=u._currentValue;if(u={context:u,memoizedValue:d,next:null},Ko===null){if(s===null)throw Error(r(308));Ko=u,s.dependencies={lanes:0,firstContext:u},s.flags|=524288}else Ko=Ko.next=u;return d}var kB=typeof AbortController<"u"?AbortController:function(){var s=[],u=this.signal={aborted:!1,addEventListener:function(d,y){s.push(y)}};this.abort=function(){u.aborted=!0,s.forEach(function(d){return d()})}},RB=e.unstable_scheduleCallback,AB=e.unstable_NormalPriority,Mn={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function s0(){return{controller:new kB,data:new Map,refCount:0}}function ud(s){s.refCount--,s.refCount===0&&RB(AB,function(){s.controller.abort()})}var cd=null,a0=0,nc=0,rc=null;function TB(s,u){if(cd===null){var d=cd=[];a0=0,nc=c1(),rc={status:"pending",value:void 0,then:function(y){d.push(y)}}}return a0++,u.then(r2,r2),u}function r2(){if(--a0===0&&cd!==null){rc!==null&&(rc.status="fulfilled");var s=cd;cd=null,nc=0,rc=null;for(var u=0;u<s.length;u++)(0,s[u])()}}function _B(s,u){var d=[],y={status:"pending",value:null,reason:null,then:function(E){d.push(E)}};return s.then(function(){y.status="fulfilled",y.value=u;for(var E=0;E<d.length;E++)(0,d[E])(u)},function(E){for(y.status="rejected",y.reason=E,E=0;E<d.length;E++)(0,d[E])(void 0)}),y}var i2=z.S;z.S=function(s,u){BA=ge(),typeof u=="object"&&u!==null&&typeof u.then=="function"&&TB(s,u),i2!==null&&i2(s,u)};var Al=K(null);function l0(){var s=Al.current;return s!==null?s:rn.pooledCache}function Up(s,u){u===null?q(Al,Al.current):q(Al,u.pool)}function o2(){var s=l0();return s===null?null:{parent:Mn._currentValue,pool:s}}var ic=Error(r(460)),u0=Error(r(474)),qp=Error(r(542)),Vp={then:function(){}};function s2(s){return s=s.status,s==="fulfilled"||s==="rejected"}function a2(s,u,d){switch(d=s[d],d===void 0?s.push(u):d!==u&&(u.then(Vo,Vo),u=d),u.status){case"fulfilled":return u.value;case"rejected":throw s=u.reason,u2(s),s;default:if(typeof u.status=="string")u.then(Vo,Vo);else{if(s=rn,s!==null&&100<s.shellSuspendCounter)throw Error(r(482));s=u,s.status="pending",s.then(function(y){if(u.status==="pending"){var E=u;E.status="fulfilled",E.value=y}},function(y){if(u.status==="pending"){var E=u;E.status="rejected",E.reason=y}})}switch(u.status){case"fulfilled":return u.value;case"rejected":throw s=u.reason,u2(s),s}throw _l=u,ic}}function Tl(s){try{var u=s._init;return u(s._payload)}catch(d){throw d!==null&&typeof d=="object"&&typeof d.then=="function"?(_l=d,ic):d}}var _l=null;function l2(){if(_l===null)throw Error(r(459));var s=_l;return _l=null,s}function u2(s){if(s===ic||s===qp)throw Error(r(483))}var oc=null,fd=0;function Gp(s){var u=fd;return fd+=1,oc===null&&(oc=[]),a2(oc,s,u)}function dd(s,u){u=u.props.ref,s.ref=u!==void 0?u:null}function Yp(s,u){throw u.$$typeof===m?Error(r(525)):(s=Object.prototype.toString.call(u),Error(r(31,s==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":s)))}function c2(s){function u(he,ue){if(s){var be=he.deletions;be===null?(he.deletions=[ue],he.flags|=16):be.push(ue)}}function d(he,ue){if(!s)return null;for(;ue!==null;)u(he,ue),ue=ue.sibling;return null}function y(he){for(var ue=new Map;he!==null;)he.key!==null?ue.set(he.key,he):ue.set(he.index,he),he=he.sibling;return ue}function E(he,ue){return he=Yo(he,ue),he.index=0,he.sibling=null,he}function A(he,ue,be){return he.index=be,s?(be=he.alternate,be!==null?(be=be.index,be<ue?(he.flags|=67108866,ue):be):(he.flags|=67108866,ue)):(he.flags|=1048576,ue)}function N(he){return s&&he.alternate===null&&(he.flags|=67108866),he}function G(he,ue,be,De){return ue===null||ue.tag!==6?(ue=Qv(be,he.mode,De),ue.return=he,ue):(ue=E(ue,be),ue.return=he,ue)}function se(he,ue,be,De){var nt=be.type;return nt===v?Te(he,ue,be.props.children,De,be.key):ue!==null&&(ue.elementType===nt||typeof nt=="object"&&nt!==null&&nt.$$typeof===O&&Tl(nt)===ue.type)?(ue=E(ue,be.props),dd(ue,be),ue.return=he,ue):(ue=Fp(be.type,be.key,be.props,null,he.mode,De),dd(ue,be),ue.return=he,ue)}function xe(he,ue,be,De){return ue===null||ue.tag!==4||ue.stateNode.containerInfo!==be.containerInfo||ue.stateNode.implementation!==be.implementation?(ue=Zv(be,he.mode,De),ue.return=he,ue):(ue=E(ue,be.children||[]),ue.return=he,ue)}function Te(he,ue,be,De,nt){return ue===null||ue.tag!==7?(ue=El(be,he.mode,De,nt),ue.return=he,ue):(ue=E(ue,be),ue.return=he,ue)}function Oe(he,ue,be){if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return ue=Qv(""+ue,he.mode,be),ue.return=he,ue;if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case g:return be=Fp(ue.type,ue.key,ue.props,null,he.mode,be),dd(be,ue),be.return=he,be;case b:return ue=Zv(ue,he.mode,be),ue.return=he,ue;case O:return ue=Tl(ue),Oe(he,ue,be)}if(F(ue)||$(ue))return ue=El(ue,he.mode,be,null),ue.return=he,ue;if(typeof ue.then=="function")return Oe(he,Gp(ue),be);if(ue.$$typeof===C)return Oe(he,Hp(he,ue),be);Yp(he,ue)}return null}function we(he,ue,be,De){var nt=ue!==null?ue.key:null;if(typeof be=="string"&&be!==""||typeof be=="number"||typeof be=="bigint")return nt!==null?null:G(he,ue,""+be,De);if(typeof be=="object"&&be!==null){switch(be.$$typeof){case g:return be.key===nt?se(he,ue,be,De):null;case b:return be.key===nt?xe(he,ue,be,De):null;case O:return be=Tl(be),we(he,ue,be,De)}if(F(be)||$(be))return nt!==null?null:Te(he,ue,be,De,null);if(typeof be.then=="function")return we(he,ue,Gp(be),De);if(be.$$typeof===C)return we(he,ue,Hp(he,be),De);Yp(he,be)}return null}function Ee(he,ue,be,De,nt){if(typeof De=="string"&&De!==""||typeof De=="number"||typeof De=="bigint")return he=he.get(be)||null,G(ue,he,""+De,nt);if(typeof De=="object"&&De!==null){switch(De.$$typeof){case g:return he=he.get(De.key===null?be:De.key)||null,se(ue,he,De,nt);case b:return he=he.get(De.key===null?be:De.key)||null,xe(ue,he,De,nt);case O:return De=Tl(De),Ee(he,ue,be,De,nt)}if(F(De)||$(De))return he=he.get(be)||null,Te(ue,he,De,nt,null);if(typeof De.then=="function")return Ee(he,ue,be,Gp(De),nt);if(De.$$typeof===C)return Ee(he,ue,be,Hp(ue,De),nt);Yp(ue,De)}return null}function He(he,ue,be,De){for(var nt=null,Bt=null,Xe=ue,yt=ue=0,Mt=null;Xe!==null&&yt<be.length;yt++){Xe.index>yt?(Mt=Xe,Xe=null):Mt=Xe.sibling;var Ht=we(he,Xe,be[yt],De);if(Ht===null){Xe===null&&(Xe=Mt);break}s&&Xe&&Ht.alternate===null&&u(he,Xe),ue=A(Ht,ue,yt),Bt===null?nt=Ht:Bt.sibling=Ht,Bt=Ht,Xe=Mt}if(yt===be.length)return d(he,Xe),Pt&&Wo(he,yt),nt;if(Xe===null){for(;yt<be.length;yt++)Xe=Oe(he,be[yt],De),Xe!==null&&(ue=A(Xe,ue,yt),Bt===null?nt=Xe:Bt.sibling=Xe,Bt=Xe);return Pt&&Wo(he,yt),nt}for(Xe=y(Xe);yt<be.length;yt++)Mt=Ee(Xe,he,yt,be[yt],De),Mt!==null&&(s&&Mt.alternate!==null&&Xe.delete(Mt.key===null?yt:Mt.key),ue=A(Mt,ue,yt),Bt===null?nt=Mt:Bt.sibling=Mt,Bt=Mt);return s&&Xe.forEach(function(fa){return u(he,fa)}),Pt&&Wo(he,yt),nt}function st(he,ue,be,De){if(be==null)throw Error(r(151));for(var nt=null,Bt=null,Xe=ue,yt=ue=0,Mt=null,Ht=be.next();Xe!==null&&!Ht.done;yt++,Ht=be.next()){Xe.index>yt?(Mt=Xe,Xe=null):Mt=Xe.sibling;var fa=we(he,Xe,Ht.value,De);if(fa===null){Xe===null&&(Xe=Mt);break}s&&Xe&&fa.alternate===null&&u(he,Xe),ue=A(fa,ue,yt),Bt===null?nt=fa:Bt.sibling=fa,Bt=fa,Xe=Mt}if(Ht.done)return d(he,Xe),Pt&&Wo(he,yt),nt;if(Xe===null){for(;!Ht.done;yt++,Ht=be.next())Ht=Oe(he,Ht.value,De),Ht!==null&&(ue=A(Ht,ue,yt),Bt===null?nt=Ht:Bt.sibling=Ht,Bt=Ht);return Pt&&Wo(he,yt),nt}for(Xe=y(Xe);!Ht.done;yt++,Ht=be.next())Ht=Ee(Xe,he,yt,Ht.value,De),Ht!==null&&(s&&Ht.alternate!==null&&Xe.delete(Ht.key===null?yt:Ht.key),ue=A(Ht,ue,yt),Bt===null?nt=Ht:Bt.sibling=Ht,Bt=Ht);return s&&Xe.forEach(function(z7){return u(he,z7)}),Pt&&Wo(he,yt),nt}function nn(he,ue,be,De){if(typeof be=="object"&&be!==null&&be.type===v&&be.key===null&&(be=be.props.children),typeof be=="object"&&be!==null){switch(be.$$typeof){case g:e:{for(var nt=be.key;ue!==null;){if(ue.key===nt){if(nt=be.type,nt===v){if(ue.tag===7){d(he,ue.sibling),De=E(ue,be.props.children),De.return=he,he=De;break e}}else if(ue.elementType===nt||typeof nt=="object"&&nt!==null&&nt.$$typeof===O&&Tl(nt)===ue.type){d(he,ue.sibling),De=E(ue,be.props),dd(De,be),De.return=he,he=De;break e}d(he,ue);break}else u(he,ue);ue=ue.sibling}be.type===v?(De=El(be.props.children,he.mode,De,be.key),De.return=he,he=De):(De=Fp(be.type,be.key,be.props,null,he.mode,De),dd(De,be),De.return=he,he=De)}return N(he);case b:e:{for(nt=be.key;ue!==null;){if(ue.key===nt)if(ue.tag===4&&ue.stateNode.containerInfo===be.containerInfo&&ue.stateNode.implementation===be.implementation){d(he,ue.sibling),De=E(ue,be.children||[]),De.return=he,he=De;break e}else{d(he,ue);break}else u(he,ue);ue=ue.sibling}De=Zv(be,he.mode,De),De.return=he,he=De}return N(he);case O:return be=Tl(be),nn(he,ue,be,De)}if(F(be))return He(he,ue,be,De);if($(be)){if(nt=$(be),typeof nt!="function")throw Error(r(150));return be=nt.call(be),st(he,ue,be,De)}if(typeof be.then=="function")return nn(he,ue,Gp(be),De);if(be.$$typeof===C)return nn(he,ue,Hp(he,be),De);Yp(he,be)}return typeof be=="string"&&be!==""||typeof be=="number"||typeof be=="bigint"?(be=""+be,ue!==null&&ue.tag===6?(d(he,ue.sibling),De=E(ue,be),De.return=he,he=De):(d(he,ue),De=Qv(be,he.mode,De),De.return=he,he=De),N(he)):d(he,ue)}return function(he,ue,be,De){try{fd=0;var nt=nn(he,ue,be,De);return oc=null,nt}catch(Xe){if(Xe===ic||Xe===qp)throw Xe;var Bt=Qr(29,Xe,null,he.mode);return Bt.lanes=De,Bt.return=he,Bt}finally{}}}var Dl=c2(!0),f2=c2(!1),Ws=!1;function c0(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function f0(s,u){s=s.updateQueue,u.updateQueue===s&&(u.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function Ks(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function Xs(s,u,d){var y=s.updateQueue;if(y===null)return null;if(y=y.shared,(qt&2)!==0){var E=y.pending;return E===null?u.next=u:(u.next=E.next,E.next=u),y.pending=u,u=jp(s),WR(s,null,d),u}return Np(s,y,u,d),jp(s)}function hd(s,u,d){if(u=u.updateQueue,u!==null&&(u=u.shared,(d&4194048)!==0)){var y=u.lanes;y&=s.pendingLanes,d|=y,u.lanes=d,an(s,d)}}function d0(s,u){var d=s.updateQueue,y=s.alternate;if(y!==null&&(y=y.updateQueue,d===y)){var E=null,A=null;if(d=d.firstBaseUpdate,d!==null){do{var N={lane:d.lane,tag:d.tag,payload:d.payload,callback:null,next:null};A===null?E=A=N:A=A.next=N,d=d.next}while(d!==null);A===null?E=A=u:A=A.next=u}else E=A=u;d={baseState:y.baseState,firstBaseUpdate:E,lastBaseUpdate:A,shared:y.shared,callbacks:y.callbacks},s.updateQueue=d;return}s=d.lastBaseUpdate,s===null?d.firstBaseUpdate=u:s.next=u,d.lastBaseUpdate=u}var h0=!1;function pd(){if(h0){var s=rc;if(s!==null)throw s}}function md(s,u,d,y){h0=!1;var E=s.updateQueue;Ws=!1;var A=E.firstBaseUpdate,N=E.lastBaseUpdate,G=E.shared.pending;if(G!==null){E.shared.pending=null;var se=G,xe=se.next;se.next=null,N===null?A=xe:N.next=xe,N=se;var Te=s.alternate;Te!==null&&(Te=Te.updateQueue,G=Te.lastBaseUpdate,G!==N&&(G===null?Te.firstBaseUpdate=xe:G.next=xe,Te.lastBaseUpdate=se))}if(A!==null){var Oe=E.baseState;N=0,Te=xe=se=null,G=A;do{var we=G.lane&-536870913,Ee=we!==G.lane;if(Ee?(Dt&we)===we:(y&we)===we){we!==0&&we===nc&&(h0=!0),Te!==null&&(Te=Te.next={lane:0,tag:G.tag,payload:G.payload,callback:null,next:null});e:{var He=s,st=G;we=u;var nn=d;switch(st.tag){case 1:if(He=st.payload,typeof He=="function"){Oe=He.call(nn,Oe,we);break e}Oe=He;break e;case 3:He.flags=He.flags&-65537|128;case 0:if(He=st.payload,we=typeof He=="function"?He.call(nn,Oe,we):He,we==null)break e;Oe=p({},Oe,we);break e;case 2:Ws=!0}}we=G.callback,we!==null&&(s.flags|=64,Ee&&(s.flags|=8192),Ee=E.callbacks,Ee===null?E.callbacks=[we]:Ee.push(we))}else Ee={lane:we,tag:G.tag,payload:G.payload,callback:G.callback,next:null},Te===null?(xe=Te=Ee,se=Oe):Te=Te.next=Ee,N|=we;if(G=G.next,G===null){if(G=E.shared.pending,G===null)break;Ee=G,G=Ee.next,Ee.next=null,E.lastBaseUpdate=Ee,E.shared.pending=null}}while(!0);Te===null&&(se=Oe),E.baseState=se,E.firstBaseUpdate=xe,E.lastBaseUpdate=Te,A===null&&(E.shared.lanes=0),ta|=N,s.lanes=N,s.memoizedState=Oe}}function d2(s,u){if(typeof s!="function")throw Error(r(191,s));s.call(u)}function h2(s,u){var d=s.callbacks;if(d!==null)for(s.callbacks=null,s=0;s<d.length;s++)d2(d[s],u)}var sc=K(null),Wp=K(0);function p2(s,u){s=os,q(Wp,s),q(sc,u),os=s|u.baseLanes}function p0(){q(Wp,os),q(sc,sc.current)}function m0(){os=Wp.current,ee(sc),ee(Wp)}var Zr=K(null),Di=null;function Qs(s){var u=s.alternate;q(An,An.current&1),q(Zr,s),Di===null&&(u===null||sc.current!==null||u.memoizedState!==null)&&(Di=s)}function g0(s){q(An,An.current),q(Zr,s),Di===null&&(Di=s)}function m2(s){s.tag===22?(q(An,An.current),q(Zr,s),Di===null&&(Di=s)):Zs()}function Zs(){q(An,An.current),q(Zr,Zr.current)}function Jr(s){ee(Zr),Di===s&&(Di=null),ee(An)}var An=K(0);function Kp(s){for(var u=s;u!==null;){if(u.tag===13){var d=u.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||S1(d)||E1(d)))return u}else if(u.tag===19&&(u.memoizedProps.revealOrder==="forwards"||u.memoizedProps.revealOrder==="backwards"||u.memoizedProps.revealOrder==="unstable_legacy-backwards"||u.memoizedProps.revealOrder==="together")){if((u.flags&128)!==0)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===s)break;for(;u.sibling===null;){if(u.return===null||u.return===s)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var Qo=0,gt=null,en=null,$n=null,Xp=!1,ac=!1,Ml=!1,Qp=0,gd=0,lc=null,DB=0;function xn(){throw Error(r(321))}function y0(s,u){if(u===null)return!1;for(var d=0;d<u.length&&d<s.length;d++)if(!Xr(s[d],u[d]))return!1;return!0}function b0(s,u,d,y,E,A){return Qo=A,gt=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,z.H=s===null||s.memoizedState===null?Z2:O0,Ml=!1,A=d(y,E),Ml=!1,ac&&(A=y2(u,d,y,E)),g2(s),A}function g2(s){z.H=vd;var u=en!==null&&en.next!==null;if(Qo=0,$n=en=gt=null,Xp=!1,gd=0,lc=null,u)throw Error(r(300));s===null||On||(s=s.dependencies,s!==null&&Bp(s)&&(On=!0))}function y2(s,u,d,y){gt=s;var E=0;do{if(ac&&(lc=null),gd=0,ac=!1,25<=E)throw Error(r(301));if(E+=1,$n=en=null,s.updateQueue!=null){var A=s.updateQueue;A.lastEffect=null,A.events=null,A.stores=null,A.memoCache!=null&&(A.memoCache.index=0)}z.H=J2,A=u(d,y)}while(ac);return A}function MB(){var s=z.H,u=s.useState()[0];return u=typeof u.then=="function"?yd(u):u,s=s.useState()[0],(en!==null?en.memoizedState:null)!==s&&(gt.flags|=1024),u}function v0(){var s=Qp!==0;return Qp=0,s}function x0(s,u,d){u.updateQueue=s.updateQueue,u.flags&=-2053,s.lanes&=~d}function w0(s){if(Xp){for(s=s.memoizedState;s!==null;){var u=s.queue;u!==null&&(u.pending=null),s=s.next}Xp=!1}Qo=0,$n=en=gt=null,ac=!1,gd=Qp=0,lc=null}function br(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $n===null?gt.memoizedState=$n=s:$n=$n.next=s,$n}function Tn(){if(en===null){var s=gt.alternate;s=s!==null?s.memoizedState:null}else s=en.next;var u=$n===null?gt.memoizedState:$n.next;if(u!==null)$n=u,en=s;else{if(s===null)throw gt.alternate===null?Error(r(467)):Error(r(310));en=s,s={memoizedState:en.memoizedState,baseState:en.baseState,baseQueue:en.baseQueue,queue:en.queue,next:null},$n===null?gt.memoizedState=$n=s:$n=$n.next=s}return $n}function Zp(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function yd(s){var u=gd;return gd+=1,lc===null&&(lc=[]),s=a2(lc,s,u),u=gt,($n===null?u.memoizedState:$n.next)===null&&(u=u.alternate,z.H=u===null||u.memoizedState===null?Z2:O0),s}function Jp(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return yd(s);if(s.$$typeof===C)return er(s)}throw Error(r(438,String(s)))}function S0(s){var u=null,d=gt.updateQueue;if(d!==null&&(u=d.memoCache),u==null){var y=gt.alternate;y!==null&&(y=y.updateQueue,y!==null&&(y=y.memoCache,y!=null&&(u={data:y.data.map(function(E){return E.slice()}),index:0})))}if(u==null&&(u={data:[],index:0}),d===null&&(d=Zp(),gt.updateQueue=d),d.memoCache=u,d=u.data[u.index],d===void 0)for(d=u.data[u.index]=Array(s),y=0;y<s;y++)d[y]=L;return u.index++,d}function Zo(s,u){return typeof u=="function"?u(s):u}function em(s){var u=Tn();return E0(u,en,s)}function E0(s,u,d){var y=s.queue;if(y===null)throw Error(r(311));y.lastRenderedReducer=d;var E=s.baseQueue,A=y.pending;if(A!==null){if(E!==null){var N=E.next;E.next=A.next,A.next=N}u.baseQueue=E=A,y.pending=null}if(A=s.baseState,E===null)s.memoizedState=A;else{u=E.next;var G=N=null,se=null,xe=u,Te=!1;do{var Oe=xe.lane&-536870913;if(Oe!==xe.lane?(Dt&Oe)===Oe:(Qo&Oe)===Oe){var we=xe.revertLane;if(we===0)se!==null&&(se=se.next={lane:0,revertLane:0,gesture:null,action:xe.action,hasEagerState:xe.hasEagerState,eagerState:xe.eagerState,next:null}),Oe===nc&&(Te=!0);else if((Qo&we)===we){xe=xe.next,we===nc&&(Te=!0);continue}else Oe={lane:0,revertLane:xe.revertLane,gesture:null,action:xe.action,hasEagerState:xe.hasEagerState,eagerState:xe.eagerState,next:null},se===null?(G=se=Oe,N=A):se=se.next=Oe,gt.lanes|=we,ta|=we;Oe=xe.action,Ml&&d(A,Oe),A=xe.hasEagerState?xe.eagerState:d(A,Oe)}else we={lane:Oe,revertLane:xe.revertLane,gesture:xe.gesture,action:xe.action,hasEagerState:xe.hasEagerState,eagerState:xe.eagerState,next:null},se===null?(G=se=we,N=A):se=se.next=we,gt.lanes|=Oe,ta|=Oe;xe=xe.next}while(xe!==null&&xe!==u);if(se===null?N=A:se.next=G,!Xr(A,s.memoizedState)&&(On=!0,Te&&(d=rc,d!==null)))throw d;s.memoizedState=A,s.baseState=N,s.baseQueue=se,y.lastRenderedState=A}return E===null&&(y.lanes=0),[s.memoizedState,y.dispatch]}function C0(s){var u=Tn(),d=u.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=s;var y=d.dispatch,E=d.pending,A=u.memoizedState;if(E!==null){d.pending=null;var N=E=E.next;do A=s(A,N.action),N=N.next;while(N!==E);Xr(A,u.memoizedState)||(On=!0),u.memoizedState=A,u.baseQueue===null&&(u.baseState=A),d.lastRenderedState=A}return[A,y]}function b2(s,u,d){var y=gt,E=Tn(),A=Pt;if(A){if(d===void 0)throw Error(r(407));d=d()}else d=u();var N=!Xr((en||E).memoizedState,d);if(N&&(E.memoizedState=d,On=!0),E=E.queue,A0(w2.bind(null,y,E,s),[s]),E.getSnapshot!==u||N||$n!==null&&$n.memoizedState.tag&1){if(y.flags|=2048,uc(9,{destroy:void 0},x2.bind(null,y,E,d,u),null),rn===null)throw Error(r(349));A||(Qo&127)!==0||v2(y,u,d)}return d}function v2(s,u,d){s.flags|=16384,s={getSnapshot:u,value:d},u=gt.updateQueue,u===null?(u=Zp(),gt.updateQueue=u,u.stores=[s]):(d=u.stores,d===null?u.stores=[s]:d.push(s))}function x2(s,u,d,y){u.value=d,u.getSnapshot=y,S2(u)&&E2(s)}function w2(s,u,d){return d(function(){S2(u)&&E2(s)})}function S2(s){var u=s.getSnapshot;s=s.value;try{var d=u();return!Xr(s,d)}catch{return!0}}function E2(s){var u=Sl(s,2);u!==null&&Pr(u,s,2)}function k0(s){var u=br();if(typeof s=="function"){var d=s;if(s=d(),Ml){Be(!0);try{d()}finally{Be(!1)}}}return u.memoizedState=u.baseState=s,u.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zo,lastRenderedState:s},u}function C2(s,u,d,y){return s.baseState=d,E0(s,en,typeof y=="function"?y:Zo)}function $B(s,u,d,y,E){if(rm(s))throw Error(r(485));if(s=u.action,s!==null){var A={payload:E,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(N){A.listeners.push(N)}};z.T!==null?d(!0):A.isTransition=!1,y(A),d=u.pending,d===null?(A.next=u.pending=A,k2(u,A)):(A.next=d.next,u.pending=d.next=A)}}function k2(s,u){var d=u.action,y=u.payload,E=s.state;if(u.isTransition){var A=z.T,N={};z.T=N;try{var G=d(E,y),se=z.S;se!==null&&se(N,G),R2(s,u,G)}catch(xe){R0(s,u,xe)}finally{A!==null&&N.types!==null&&(A.types=N.types),z.T=A}}else try{A=d(E,y),R2(s,u,A)}catch(xe){R0(s,u,xe)}}function R2(s,u,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(y){A2(s,u,y)},function(y){return R0(s,u,y)}):A2(s,u,d)}function A2(s,u,d){u.status="fulfilled",u.value=d,T2(u),s.state=d,u=s.pending,u!==null&&(d=u.next,d===u?s.pending=null:(d=d.next,u.next=d,k2(s,d)))}function R0(s,u,d){var y=s.pending;if(s.pending=null,y!==null){y=y.next;do u.status="rejected",u.reason=d,T2(u),u=u.next;while(u!==y)}s.action=null}function T2(s){s=s.listeners;for(var u=0;u<s.length;u++)(0,s[u])()}function _2(s,u){return u}function D2(s,u){if(Pt){var d=rn.formState;if(d!==null){e:{var y=gt;if(Pt){if(cn){t:{for(var E=cn,A=_i;E.nodeType!==8;){if(!A){E=null;break t}if(E=Mi(E.nextSibling),E===null){E=null;break t}}A=E.data,E=A==="F!"||A==="F"?E:null}if(E){cn=Mi(E.nextSibling),y=E.data==="F!";break e}}Gs(y)}y=!1}y&&(u=d[0])}}return d=br(),d.memoizedState=d.baseState=u,y={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_2,lastRenderedState:u},d.queue=y,d=K2.bind(null,gt,y),y.dispatch=d,y=k0(!1),A=$0.bind(null,gt,!1,y.queue),y=br(),E={state:u,dispatch:null,action:s,pending:null},y.queue=E,d=$B.bind(null,gt,E,A,d),E.dispatch=d,y.memoizedState=s,[u,d,!1]}function M2(s){var u=Tn();return $2(u,en,s)}function $2(s,u,d){if(u=E0(s,u,_2)[0],s=em(Zo)[0],typeof u=="object"&&u!==null&&typeof u.then=="function")try{var y=yd(u)}catch(N){throw N===ic?qp:N}else y=u;u=Tn();var E=u.queue,A=E.dispatch;return d!==u.memoizedState&&(gt.flags|=2048,uc(9,{destroy:void 0},OB.bind(null,E,d),null)),[y,A,s]}function OB(s,u){s.action=u}function O2(s){var u=Tn(),d=en;if(d!==null)return $2(u,d,s);Tn(),u=u.memoizedState,d=Tn();var y=d.queue.dispatch;return d.memoizedState=s,[u,y,!1]}function uc(s,u,d,y){return s={tag:s,create:d,deps:y,inst:u,next:null},u=gt.updateQueue,u===null&&(u=Zp(),gt.updateQueue=u),d=u.lastEffect,d===null?u.lastEffect=s.next=s:(y=d.next,d.next=s,s.next=y,u.lastEffect=s),s}function P2(){return Tn().memoizedState}function tm(s,u,d,y){var E=br();gt.flags|=s,E.memoizedState=uc(1|u,{destroy:void 0},d,y===void 0?null:y)}function nm(s,u,d,y){var E=Tn();y=y===void 0?null:y;var A=E.memoizedState.inst;en!==null&&y!==null&&y0(y,en.memoizedState.deps)?E.memoizedState=uc(u,A,d,y):(gt.flags|=s,E.memoizedState=uc(1|u,A,d,y))}function I2(s,u){tm(8390656,8,s,u)}function A0(s,u){nm(2048,8,s,u)}function PB(s){gt.flags|=4;var u=gt.updateQueue;if(u===null)u=Zp(),gt.updateQueue=u,u.events=[s];else{var d=u.events;d===null?u.events=[s]:d.push(s)}}function L2(s){var u=Tn().memoizedState;return PB({ref:u,nextImpl:s}),function(){if((qt&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}function N2(s,u){return nm(4,2,s,u)}function j2(s,u){return nm(4,4,s,u)}function F2(s,u){if(typeof u=="function"){s=s();var d=u(s);return function(){typeof d=="function"?d():u(null)}}if(u!=null)return s=s(),u.current=s,function(){u.current=null}}function z2(s,u,d){d=d!=null?d.concat([s]):null,nm(4,4,F2.bind(null,u,s),d)}function T0(){}function B2(s,u){var d=Tn();u=u===void 0?null:u;var y=d.memoizedState;return u!==null&&y0(u,y[1])?y[0]:(d.memoizedState=[s,u],s)}function H2(s,u){var d=Tn();u=u===void 0?null:u;var y=d.memoizedState;if(u!==null&&y0(u,y[1]))return y[0];if(y=s(),Ml){Be(!0);try{s()}finally{Be(!1)}}return d.memoizedState=[y,u],y}function _0(s,u,d){return d===void 0||(Qo&1073741824)!==0&&(Dt&261930)===0?s.memoizedState=u:(s.memoizedState=d,s=UA(),gt.lanes|=s,ta|=s,d)}function U2(s,u,d,y){return Xr(d,u)?d:sc.current!==null?(s=_0(s,d,y),Xr(s,u)||(On=!0),s):(Qo&42)===0||(Qo&1073741824)!==0&&(Dt&261930)===0?(On=!0,s.memoizedState=d):(s=UA(),gt.lanes|=s,ta|=s,u)}function q2(s,u,d,y,E){var A=j.p;j.p=A!==0&&8>A?A:8;var N=z.T,G={};z.T=G,$0(s,!1,u,d);try{var se=E(),xe=z.S;if(xe!==null&&xe(G,se),se!==null&&typeof se=="object"&&typeof se.then=="function"){var Te=_B(se,y);bd(s,u,Te,ni(s))}else bd(s,u,y,ni(s))}catch(Oe){bd(s,u,{then:function(){},status:"rejected",reason:Oe},ni())}finally{j.p=A,N!==null&&G.types!==null&&(N.types=G.types),z.T=N}}function IB(){}function D0(s,u,d,y){if(s.tag!==5)throw Error(r(476));var E=V2(s).queue;q2(s,E,u,H,d===null?IB:function(){return G2(s),d(y)})}function V2(s){var u=s.memoizedState;if(u!==null)return u;u={memoizedState:H,baseState:H,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zo,lastRenderedState:H},next:null};var d={};return u.next={memoizedState:d,baseState:d,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zo,lastRenderedState:d},next:null},s.memoizedState=u,s=s.alternate,s!==null&&(s.memoizedState=u),u}function G2(s){var u=V2(s);u.next===null&&(u=s.alternate.memoizedState),bd(s,u.next.queue,{},ni())}function M0(){return er(Id)}function Y2(){return Tn().memoizedState}function W2(){return Tn().memoizedState}function LB(s){for(var u=s.return;u!==null;){switch(u.tag){case 24:case 3:var d=ni();s=Ks(d);var y=Xs(u,s,d);y!==null&&(Pr(y,u,d),hd(y,u,d)),u={cache:s0()},s.payload=u;return}u=u.return}}function NB(s,u,d){var y=ni();d={lane:y,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},rm(s)?X2(u,d):(d=Kv(s,u,d,y),d!==null&&(Pr(d,s,y),Q2(d,u,y)))}function K2(s,u,d){var y=ni();bd(s,u,d,y)}function bd(s,u,d,y){var E={lane:y,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null};if(rm(s))X2(u,E);else{var A=s.alternate;if(s.lanes===0&&(A===null||A.lanes===0)&&(A=u.lastRenderedReducer,A!==null))try{var N=u.lastRenderedState,G=A(N,d);if(E.hasEagerState=!0,E.eagerState=G,Xr(G,N))return Np(s,u,E,0),rn===null&&Lp(),!1}catch{}finally{}if(d=Kv(s,u,E,y),d!==null)return Pr(d,s,y),Q2(d,u,y),!0}return!1}function $0(s,u,d,y){if(y={lane:2,revertLane:c1(),gesture:null,action:y,hasEagerState:!1,eagerState:null,next:null},rm(s)){if(u)throw Error(r(479))}else u=Kv(s,d,y,2),u!==null&&Pr(u,s,2)}function rm(s){var u=s.alternate;return s===gt||u!==null&&u===gt}function X2(s,u){ac=Xp=!0;var d=s.pending;d===null?u.next=u:(u.next=d.next,d.next=u),s.pending=u}function Q2(s,u,d){if((d&4194048)!==0){var y=u.lanes;y&=s.pendingLanes,d|=y,u.lanes=d,an(s,d)}}var vd={readContext:er,use:Jp,useCallback:xn,useContext:xn,useEffect:xn,useImperativeHandle:xn,useLayoutEffect:xn,useInsertionEffect:xn,useMemo:xn,useReducer:xn,useRef:xn,useState:xn,useDebugValue:xn,useDeferredValue:xn,useTransition:xn,useSyncExternalStore:xn,useId:xn,useHostTransitionStatus:xn,useFormState:xn,useActionState:xn,useOptimistic:xn,useMemoCache:xn,useCacheRefresh:xn};vd.useEffectEvent=xn;var Z2={readContext:er,use:Jp,useCallback:function(s,u){return br().memoizedState=[s,u===void 0?null:u],s},useContext:er,useEffect:I2,useImperativeHandle:function(s,u,d){d=d!=null?d.concat([s]):null,tm(4194308,4,F2.bind(null,u,s),d)},useLayoutEffect:function(s,u){return tm(4194308,4,s,u)},useInsertionEffect:function(s,u){tm(4,2,s,u)},useMemo:function(s,u){var d=br();u=u===void 0?null:u;var y=s();if(Ml){Be(!0);try{s()}finally{Be(!1)}}return d.memoizedState=[y,u],y},useReducer:function(s,u,d){var y=br();if(d!==void 0){var E=d(u);if(Ml){Be(!0);try{d(u)}finally{Be(!1)}}}else E=u;return y.memoizedState=y.baseState=E,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:E},y.queue=s,s=s.dispatch=NB.bind(null,gt,s),[y.memoizedState,s]},useRef:function(s){var u=br();return s={current:s},u.memoizedState=s},useState:function(s){s=k0(s);var u=s.queue,d=K2.bind(null,gt,u);return u.dispatch=d,[s.memoizedState,d]},useDebugValue:T0,useDeferredValue:function(s,u){var d=br();return _0(d,s,u)},useTransition:function(){var s=k0(!1);return s=q2.bind(null,gt,s.queue,!0,!1),br().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,u,d){var y=gt,E=br();if(Pt){if(d===void 0)throw Error(r(407));d=d()}else{if(d=u(),rn===null)throw Error(r(349));(Dt&127)!==0||v2(y,u,d)}E.memoizedState=d;var A={value:d,getSnapshot:u};return E.queue=A,I2(w2.bind(null,y,A,s),[s]),y.flags|=2048,uc(9,{destroy:void 0},x2.bind(null,y,A,d,u),null),d},useId:function(){var s=br(),u=rn.identifierPrefix;if(Pt){var d=po,y=ho;d=(y&~(1<<32-$e(y)-1)).toString(32)+d,u="_"+u+"R_"+d,d=Qp++,0<d&&(u+="H"+d.toString(32)),u+="_"}else d=DB++,u="_"+u+"r_"+d.toString(32)+"_";return s.memoizedState=u},useHostTransitionStatus:M0,useFormState:D2,useActionState:D2,useOptimistic:function(s){var u=br();u.memoizedState=u.baseState=s;var d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return u.queue=d,u=$0.bind(null,gt,!0,d),d.dispatch=u,[s,u]},useMemoCache:S0,useCacheRefresh:function(){return br().memoizedState=LB.bind(null,gt)},useEffectEvent:function(s){var u=br(),d={impl:s};return u.memoizedState=d,function(){if((qt&2)!==0)throw Error(r(440));return d.impl.apply(void 0,arguments)}}},O0={readContext:er,use:Jp,useCallback:B2,useContext:er,useEffect:A0,useImperativeHandle:z2,useInsertionEffect:N2,useLayoutEffect:j2,useMemo:H2,useReducer:em,useRef:P2,useState:function(){return em(Zo)},useDebugValue:T0,useDeferredValue:function(s,u){var d=Tn();return U2(d,en.memoizedState,s,u)},useTransition:function(){var s=em(Zo)[0],u=Tn().memoizedState;return[typeof s=="boolean"?s:yd(s),u]},useSyncExternalStore:b2,useId:Y2,useHostTransitionStatus:M0,useFormState:M2,useActionState:M2,useOptimistic:function(s,u){var d=Tn();return C2(d,en,s,u)},useMemoCache:S0,useCacheRefresh:W2};O0.useEffectEvent=L2;var J2={readContext:er,use:Jp,useCallback:B2,useContext:er,useEffect:A0,useImperativeHandle:z2,useInsertionEffect:N2,useLayoutEffect:j2,useMemo:H2,useReducer:C0,useRef:P2,useState:function(){return C0(Zo)},useDebugValue:T0,useDeferredValue:function(s,u){var d=Tn();return en===null?_0(d,s,u):U2(d,en.memoizedState,s,u)},useTransition:function(){var s=C0(Zo)[0],u=Tn().memoizedState;return[typeof s=="boolean"?s:yd(s),u]},useSyncExternalStore:b2,useId:Y2,useHostTransitionStatus:M0,useFormState:O2,useActionState:O2,useOptimistic:function(s,u){var d=Tn();return en!==null?C2(d,en,s,u):(d.baseState=s,[s,d.queue.dispatch])},useMemoCache:S0,useCacheRefresh:W2};J2.useEffectEvent=L2;function P0(s,u,d,y){u=s.memoizedState,d=d(y,u),d=d==null?u:p({},u,d),s.memoizedState=d,s.lanes===0&&(s.updateQueue.baseState=d)}var I0={enqueueSetState:function(s,u,d){s=s._reactInternals;var y=ni(),E=Ks(y);E.payload=u,d!=null&&(E.callback=d),u=Xs(s,E,y),u!==null&&(Pr(u,s,y),hd(u,s,y))},enqueueReplaceState:function(s,u,d){s=s._reactInternals;var y=ni(),E=Ks(y);E.tag=1,E.payload=u,d!=null&&(E.callback=d),u=Xs(s,E,y),u!==null&&(Pr(u,s,y),hd(u,s,y))},enqueueForceUpdate:function(s,u){s=s._reactInternals;var d=ni(),y=Ks(d);y.tag=2,u!=null&&(y.callback=u),u=Xs(s,y,d),u!==null&&(Pr(u,s,d),hd(u,s,d))}};function eA(s,u,d,y,E,A,N){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(y,A,N):u.prototype&&u.prototype.isPureReactComponent?!od(d,y)||!od(E,A):!0}function tA(s,u,d,y){s=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(d,y),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(d,y),u.state!==s&&I0.enqueueReplaceState(u,u.state,null)}function $l(s,u){var d=u;if("ref"in u){d={};for(var y in u)y!=="ref"&&(d[y]=u[y])}if(s=s.defaultProps){d===u&&(d=p({},d));for(var E in s)d[E]===void 0&&(d[E]=s[E])}return d}function nA(s){Ip(s)}function rA(s){console.error(s)}function iA(s){Ip(s)}function im(s,u){try{var d=s.onUncaughtError;d(u.value,{componentStack:u.stack})}catch(y){setTimeout(function(){throw y})}}function oA(s,u,d){try{var y=s.onCaughtError;y(d.value,{componentStack:d.stack,errorBoundary:u.tag===1?u.stateNode:null})}catch(E){setTimeout(function(){throw E})}}function L0(s,u,d){return d=Ks(d),d.tag=3,d.payload={element:null},d.callback=function(){im(s,u)},d}function sA(s){return s=Ks(s),s.tag=3,s}function aA(s,u,d,y){var E=d.type.getDerivedStateFromError;if(typeof E=="function"){var A=y.value;s.payload=function(){return E(A)},s.callback=function(){oA(u,d,y)}}var N=d.stateNode;N!==null&&typeof N.componentDidCatch=="function"&&(s.callback=function(){oA(u,d,y),typeof E!="function"&&(na===null?na=new Set([this]):na.add(this));var G=y.stack;this.componentDidCatch(y.value,{componentStack:G!==null?G:""})})}function jB(s,u,d,y,E){if(d.flags|=32768,y!==null&&typeof y=="object"&&typeof y.then=="function"){if(u=d.alternate,u!==null&&tc(u,d,E,!0),d=Zr.current,d!==null){switch(d.tag){case 31:case 13:return Di===null?gm():d.alternate===null&&wn===0&&(wn=3),d.flags&=-257,d.flags|=65536,d.lanes=E,y===Vp?d.flags|=16384:(u=d.updateQueue,u===null?d.updateQueue=new Set([y]):u.add(y),a1(s,y,E)),!1;case 22:return d.flags|=65536,y===Vp?d.flags|=16384:(u=d.updateQueue,u===null?(u={transitions:null,markerInstances:null,retryQueue:new Set([y])},d.updateQueue=u):(d=u.retryQueue,d===null?u.retryQueue=new Set([y]):d.add(y)),a1(s,y,E)),!1}throw Error(r(435,d.tag))}return a1(s,y,E),gm(),!1}if(Pt)return u=Zr.current,u!==null?((u.flags&65536)===0&&(u.flags|=256),u.flags|=65536,u.lanes=E,y!==t0&&(s=Error(r(422),{cause:y}),ld(Ri(s,d)))):(y!==t0&&(u=Error(r(423),{cause:y}),ld(Ri(u,d))),s=s.current.alternate,s.flags|=65536,E&=-E,s.lanes|=E,y=Ri(y,d),E=L0(s.stateNode,y,E),d0(s,E),wn!==4&&(wn=2)),!1;var A=Error(r(520),{cause:y});if(A=Ri(A,d),Ad===null?Ad=[A]:Ad.push(A),wn!==4&&(wn=2),u===null)return!0;y=Ri(y,d),d=u;do{switch(d.tag){case 3:return d.flags|=65536,s=E&-E,d.lanes|=s,s=L0(d.stateNode,y,s),d0(d,s),!1;case 1:if(u=d.type,A=d.stateNode,(d.flags&128)===0&&(typeof u.getDerivedStateFromError=="function"||A!==null&&typeof A.componentDidCatch=="function"&&(na===null||!na.has(A))))return d.flags|=65536,E&=-E,d.lanes|=E,E=sA(E),aA(E,s,d,y),d0(d,E),!1}d=d.return}while(d!==null);return!1}var N0=Error(r(461)),On=!1;function tr(s,u,d,y){u.child=s===null?f2(u,null,d,y):Dl(u,s.child,d,y)}function lA(s,u,d,y,E){d=d.render;var A=u.ref;if("ref"in y){var N={};for(var G in y)G!=="ref"&&(N[G]=y[G])}else N=y;return Rl(u),y=b0(s,u,d,N,A,E),G=v0(),s!==null&&!On?(x0(s,u,E),Jo(s,u,E)):(Pt&&G&&Jv(u),u.flags|=1,tr(s,u,y,E),u.child)}function uA(s,u,d,y,E){if(s===null){var A=d.type;return typeof A=="function"&&!Xv(A)&&A.defaultProps===void 0&&d.compare===null?(u.tag=15,u.type=A,cA(s,u,A,y,E)):(s=Fp(d.type,null,y,u,u.mode,E),s.ref=u.ref,s.return=u,u.child=s)}if(A=s.child,!V0(s,E)){var N=A.memoizedProps;if(d=d.compare,d=d!==null?d:od,d(N,y)&&s.ref===u.ref)return Jo(s,u,E)}return u.flags|=1,s=Yo(A,y),s.ref=u.ref,s.return=u,u.child=s}function cA(s,u,d,y,E){if(s!==null){var A=s.memoizedProps;if(od(A,y)&&s.ref===u.ref)if(On=!1,u.pendingProps=y=A,V0(s,E))(s.flags&131072)!==0&&(On=!0);else return u.lanes=s.lanes,Jo(s,u,E)}return j0(s,u,d,y,E)}function fA(s,u,d,y){var E=y.children,A=s!==null?s.memoizedState:null;if(s===null&&u.stateNode===null&&(u.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),y.mode==="hidden"){if((u.flags&128)!==0){if(A=A!==null?A.baseLanes|d:d,s!==null){for(y=u.child=s.child,E=0;y!==null;)E=E|y.lanes|y.childLanes,y=y.sibling;y=E&~A}else y=0,u.child=null;return dA(s,u,A,d,y)}if((d&536870912)!==0)u.memoizedState={baseLanes:0,cachePool:null},s!==null&&Up(u,A!==null?A.cachePool:null),A!==null?p2(u,A):p0(),m2(u);else return y=u.lanes=536870912,dA(s,u,A!==null?A.baseLanes|d:d,d,y)}else A!==null?(Up(u,A.cachePool),p2(u,A),Zs(),u.memoizedState=null):(s!==null&&Up(u,null),p0(),Zs());return tr(s,u,E,d),u.child}function xd(s,u){return s!==null&&s.tag===22||u.stateNode!==null||(u.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.sibling}function dA(s,u,d,y,E){var A=l0();return A=A===null?null:{parent:Mn._currentValue,pool:A},u.memoizedState={baseLanes:d,cachePool:A},s!==null&&Up(u,null),p0(),m2(u),s!==null&&tc(s,u,y,!0),u.childLanes=E,null}function om(s,u){return u=am({mode:u.mode,children:u.children},s.mode),u.ref=s.ref,s.child=u,u.return=s,u}function hA(s,u,d){return Dl(u,s.child,null,d),s=om(u,u.pendingProps),s.flags|=2,Jr(u),u.memoizedState=null,s}function FB(s,u,d){var y=u.pendingProps,E=(u.flags&128)!==0;if(u.flags&=-129,s===null){if(Pt){if(y.mode==="hidden")return s=om(u,y),u.lanes=536870912,xd(null,s);if(g0(u),(s=cn)?(s=kT(s,_i),s=s!==null&&s.data==="&"?s:null,s!==null&&(u.memoizedState={dehydrated:s,treeContext:qs!==null?{id:ho,overflow:po}:null,retryLane:536870912,hydrationErrors:null},d=XR(s),d.return=u,u.child=d,Jn=u,cn=null)):s=null,s===null)throw Gs(u);return u.lanes=536870912,null}return om(u,y)}var A=s.memoizedState;if(A!==null){var N=A.dehydrated;if(g0(u),E)if(u.flags&256)u.flags&=-257,u=hA(s,u,d);else if(u.memoizedState!==null)u.child=s.child,u.flags|=128,u=null;else throw Error(r(558));else if(On||tc(s,u,d,!1),E=(d&s.childLanes)!==0,On||E){if(y=rn,y!==null&&(N=Jt(y,d),N!==0&&N!==A.retryLane))throw A.retryLane=N,Sl(s,N),Pr(y,s,N),N0;gm(),u=hA(s,u,d)}else s=A.treeContext,cn=Mi(N.nextSibling),Jn=u,Pt=!0,Vs=null,_i=!1,s!==null&&JR(u,s),u=om(u,y),u.flags|=4096;return u}return s=Yo(s.child,{mode:y.mode,children:y.children}),s.ref=u.ref,u.child=s,s.return=u,s}function sm(s,u){var d=u.ref;if(d===null)s!==null&&s.ref!==null&&(u.flags|=4194816);else{if(typeof d!="function"&&typeof d!="object")throw Error(r(284));(s===null||s.ref!==d)&&(u.flags|=4194816)}}function j0(s,u,d,y,E){return Rl(u),d=b0(s,u,d,y,void 0,E),y=v0(),s!==null&&!On?(x0(s,u,E),Jo(s,u,E)):(Pt&&y&&Jv(u),u.flags|=1,tr(s,u,d,E),u.child)}function pA(s,u,d,y,E,A){return Rl(u),u.updateQueue=null,d=y2(u,y,d,E),g2(s),y=v0(),s!==null&&!On?(x0(s,u,A),Jo(s,u,A)):(Pt&&y&&Jv(u),u.flags|=1,tr(s,u,d,A),u.child)}function mA(s,u,d,y,E){if(Rl(u),u.stateNode===null){var A=Qu,N=d.contextType;typeof N=="object"&&N!==null&&(A=er(N)),A=new d(y,A),u.memoizedState=A.state!==null&&A.state!==void 0?A.state:null,A.updater=I0,u.stateNode=A,A._reactInternals=u,A=u.stateNode,A.props=y,A.state=u.memoizedState,A.refs={},c0(u),N=d.contextType,A.context=typeof N=="object"&&N!==null?er(N):Qu,A.state=u.memoizedState,N=d.getDerivedStateFromProps,typeof N=="function"&&(P0(u,d,N,y),A.state=u.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof A.getSnapshotBeforeUpdate=="function"||typeof A.UNSAFE_componentWillMount!="function"&&typeof A.componentWillMount!="function"||(N=A.state,typeof A.componentWillMount=="function"&&A.componentWillMount(),typeof A.UNSAFE_componentWillMount=="function"&&A.UNSAFE_componentWillMount(),N!==A.state&&I0.enqueueReplaceState(A,A.state,null),md(u,y,A,E),pd(),A.state=u.memoizedState),typeof A.componentDidMount=="function"&&(u.flags|=4194308),y=!0}else if(s===null){A=u.stateNode;var G=u.memoizedProps,se=$l(d,G);A.props=se;var xe=A.context,Te=d.contextType;N=Qu,typeof Te=="object"&&Te!==null&&(N=er(Te));var Oe=d.getDerivedStateFromProps;Te=typeof Oe=="function"||typeof A.getSnapshotBeforeUpdate=="function",G=u.pendingProps!==G,Te||typeof A.UNSAFE_componentWillReceiveProps!="function"&&typeof A.componentWillReceiveProps!="function"||(G||xe!==N)&&tA(u,A,y,N),Ws=!1;var we=u.memoizedState;A.state=we,md(u,y,A,E),pd(),xe=u.memoizedState,G||we!==xe||Ws?(typeof Oe=="function"&&(P0(u,d,Oe,y),xe=u.memoizedState),(se=Ws||eA(u,d,se,y,we,xe,N))?(Te||typeof A.UNSAFE_componentWillMount!="function"&&typeof A.componentWillMount!="function"||(typeof A.componentWillMount=="function"&&A.componentWillMount(),typeof A.UNSAFE_componentWillMount=="function"&&A.UNSAFE_componentWillMount()),typeof A.componentDidMount=="function"&&(u.flags|=4194308)):(typeof A.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=y,u.memoizedState=xe),A.props=y,A.state=xe,A.context=N,y=se):(typeof A.componentDidMount=="function"&&(u.flags|=4194308),y=!1)}else{A=u.stateNode,f0(s,u),N=u.memoizedProps,Te=$l(d,N),A.props=Te,Oe=u.pendingProps,we=A.context,xe=d.contextType,se=Qu,typeof xe=="object"&&xe!==null&&(se=er(xe)),G=d.getDerivedStateFromProps,(xe=typeof G=="function"||typeof A.getSnapshotBeforeUpdate=="function")||typeof A.UNSAFE_componentWillReceiveProps!="function"&&typeof A.componentWillReceiveProps!="function"||(N!==Oe||we!==se)&&tA(u,A,y,se),Ws=!1,we=u.memoizedState,A.state=we,md(u,y,A,E),pd();var Ee=u.memoizedState;N!==Oe||we!==Ee||Ws||s!==null&&s.dependencies!==null&&Bp(s.dependencies)?(typeof G=="function"&&(P0(u,d,G,y),Ee=u.memoizedState),(Te=Ws||eA(u,d,Te,y,we,Ee,se)||s!==null&&s.dependencies!==null&&Bp(s.dependencies))?(xe||typeof A.UNSAFE_componentWillUpdate!="function"&&typeof A.componentWillUpdate!="function"||(typeof A.componentWillUpdate=="function"&&A.componentWillUpdate(y,Ee,se),typeof A.UNSAFE_componentWillUpdate=="function"&&A.UNSAFE_componentWillUpdate(y,Ee,se)),typeof A.componentDidUpdate=="function"&&(u.flags|=4),typeof A.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof A.componentDidUpdate!="function"||N===s.memoizedProps&&we===s.memoizedState||(u.flags|=4),typeof A.getSnapshotBeforeUpdate!="function"||N===s.memoizedProps&&we===s.memoizedState||(u.flags|=1024),u.memoizedProps=y,u.memoizedState=Ee),A.props=y,A.state=Ee,A.context=se,y=Te):(typeof A.componentDidUpdate!="function"||N===s.memoizedProps&&we===s.memoizedState||(u.flags|=4),typeof A.getSnapshotBeforeUpdate!="function"||N===s.memoizedProps&&we===s.memoizedState||(u.flags|=1024),y=!1)}return A=y,sm(s,u),y=(u.flags&128)!==0,A||y?(A=u.stateNode,d=y&&typeof d.getDerivedStateFromError!="function"?null:A.render(),u.flags|=1,s!==null&&y?(u.child=Dl(u,s.child,null,E),u.child=Dl(u,null,d,E)):tr(s,u,d,E),u.memoizedState=A.state,s=u.child):s=Jo(s,u,E),s}function gA(s,u,d,y){return Cl(),u.flags|=256,tr(s,u,d,y),u.child}var F0={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function z0(s){return{baseLanes:s,cachePool:o2()}}function B0(s,u,d){return s=s!==null?s.childLanes&~d:0,u&&(s|=ti),s}function yA(s,u,d){var y=u.pendingProps,E=!1,A=(u.flags&128)!==0,N;if((N=A)||(N=s!==null&&s.memoizedState===null?!1:(An.current&2)!==0),N&&(E=!0,u.flags&=-129),N=(u.flags&32)!==0,u.flags&=-33,s===null){if(Pt){if(E?Qs(u):Zs(),(s=cn)?(s=kT(s,_i),s=s!==null&&s.data!=="&"?s:null,s!==null&&(u.memoizedState={dehydrated:s,treeContext:qs!==null?{id:ho,overflow:po}:null,retryLane:536870912,hydrationErrors:null},d=XR(s),d.return=u,u.child=d,Jn=u,cn=null)):s=null,s===null)throw Gs(u);return E1(s)?u.lanes=32:u.lanes=536870912,null}var G=y.children;return y=y.fallback,E?(Zs(),E=u.mode,G=am({mode:"hidden",children:G},E),y=El(y,E,d,null),G.return=u,y.return=u,G.sibling=y,u.child=G,y=u.child,y.memoizedState=z0(d),y.childLanes=B0(s,N,d),u.memoizedState=F0,xd(null,y)):(Qs(u),H0(u,G))}var se=s.memoizedState;if(se!==null&&(G=se.dehydrated,G!==null)){if(A)u.flags&256?(Qs(u),u.flags&=-257,u=U0(s,u,d)):u.memoizedState!==null?(Zs(),u.child=s.child,u.flags|=128,u=null):(Zs(),G=y.fallback,E=u.mode,y=am({mode:"visible",children:y.children},E),G=El(G,E,d,null),G.flags|=2,y.return=u,G.return=u,y.sibling=G,u.child=y,Dl(u,s.child,null,d),y=u.child,y.memoizedState=z0(d),y.childLanes=B0(s,N,d),u.memoizedState=F0,u=xd(null,y));else if(Qs(u),E1(G)){if(N=G.nextSibling&&G.nextSibling.dataset,N)var xe=N.dgst;N=xe,y=Error(r(419)),y.stack="",y.digest=N,ld({value:y,source:null,stack:null}),u=U0(s,u,d)}else if(On||tc(s,u,d,!1),N=(d&s.childLanes)!==0,On||N){if(N=rn,N!==null&&(y=Jt(N,d),y!==0&&y!==se.retryLane))throw se.retryLane=y,Sl(s,y),Pr(N,s,y),N0;S1(G)||gm(),u=U0(s,u,d)}else S1(G)?(u.flags|=192,u.child=s.child,u=null):(s=se.treeContext,cn=Mi(G.nextSibling),Jn=u,Pt=!0,Vs=null,_i=!1,s!==null&&JR(u,s),u=H0(u,y.children),u.flags|=4096);return u}return E?(Zs(),G=y.fallback,E=u.mode,se=s.child,xe=se.sibling,y=Yo(se,{mode:"hidden",children:y.children}),y.subtreeFlags=se.subtreeFlags&65011712,xe!==null?G=Yo(xe,G):(G=El(G,E,d,null),G.flags|=2),G.return=u,y.return=u,y.sibling=G,u.child=y,xd(null,y),y=u.child,G=s.child.memoizedState,G===null?G=z0(d):(E=G.cachePool,E!==null?(se=Mn._currentValue,E=E.parent!==se?{parent:se,pool:se}:E):E=o2(),G={baseLanes:G.baseLanes|d,cachePool:E}),y.memoizedState=G,y.childLanes=B0(s,N,d),u.memoizedState=F0,xd(s.child,y)):(Qs(u),d=s.child,s=d.sibling,d=Yo(d,{mode:"visible",children:y.children}),d.return=u,d.sibling=null,s!==null&&(N=u.deletions,N===null?(u.deletions=[s],u.flags|=16):N.push(s)),u.child=d,u.memoizedState=null,d)}function H0(s,u){return u=am({mode:"visible",children:u},s.mode),u.return=s,s.child=u}function am(s,u){return s=Qr(22,s,null,u),s.lanes=0,s}function U0(s,u,d){return Dl(u,s.child,null,d),s=H0(u,u.pendingProps.children),s.flags|=2,u.memoizedState=null,s}function bA(s,u,d){s.lanes|=u;var y=s.alternate;y!==null&&(y.lanes|=u),i0(s.return,u,d)}function q0(s,u,d,y,E,A){var N=s.memoizedState;N===null?s.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:y,tail:d,tailMode:E,treeForkCount:A}:(N.isBackwards=u,N.rendering=null,N.renderingStartTime=0,N.last=y,N.tail=d,N.tailMode=E,N.treeForkCount=A)}function vA(s,u,d){var y=u.pendingProps,E=y.revealOrder,A=y.tail;y=y.children;var N=An.current,G=(N&2)!==0;if(G?(N=N&1|2,u.flags|=128):N&=1,q(An,N),tr(s,u,y,d),y=Pt?ad:0,!G&&s!==null&&(s.flags&128)!==0)e:for(s=u.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&bA(s,d,u);else if(s.tag===19)bA(s,d,u);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===u)break e;for(;s.sibling===null;){if(s.return===null||s.return===u)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}switch(E){case"forwards":for(d=u.child,E=null;d!==null;)s=d.alternate,s!==null&&Kp(s)===null&&(E=d),d=d.sibling;d=E,d===null?(E=u.child,u.child=null):(E=d.sibling,d.sibling=null),q0(u,!1,E,d,A,y);break;case"backwards":case"unstable_legacy-backwards":for(d=null,E=u.child,u.child=null;E!==null;){if(s=E.alternate,s!==null&&Kp(s)===null){u.child=E;break}s=E.sibling,E.sibling=d,d=E,E=s}q0(u,!0,d,null,A,y);break;case"together":q0(u,!1,null,null,void 0,y);break;default:u.memoizedState=null}return u.child}function Jo(s,u,d){if(s!==null&&(u.dependencies=s.dependencies),ta|=u.lanes,(d&u.childLanes)===0)if(s!==null){if(tc(s,u,d,!1),(d&u.childLanes)===0)return null}else return null;if(s!==null&&u.child!==s.child)throw Error(r(153));if(u.child!==null){for(s=u.child,d=Yo(s,s.pendingProps),u.child=d,d.return=u;s.sibling!==null;)s=s.sibling,d=d.sibling=Yo(s,s.pendingProps),d.return=u;d.sibling=null}return u.child}function V0(s,u){return(s.lanes&u)!==0?!0:(s=s.dependencies,!!(s!==null&&Bp(s)))}function zB(s,u,d){switch(u.tag){case 3:Re(u,u.stateNode.containerInfo),Ys(u,Mn,s.memoizedState.cache),Cl();break;case 27:case 5:Ae(u);break;case 4:Re(u,u.stateNode.containerInfo);break;case 10:Ys(u,u.type,u.memoizedProps.value);break;case 31:if(u.memoizedState!==null)return u.flags|=128,g0(u),null;break;case 13:var y=u.memoizedState;if(y!==null)return y.dehydrated!==null?(Qs(u),u.flags|=128,null):(d&u.child.childLanes)!==0?yA(s,u,d):(Qs(u),s=Jo(s,u,d),s!==null?s.sibling:null);Qs(u);break;case 19:var E=(s.flags&128)!==0;if(y=(d&u.childLanes)!==0,y||(tc(s,u,d,!1),y=(d&u.childLanes)!==0),E){if(y)return vA(s,u,d);u.flags|=128}if(E=u.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),q(An,An.current),y)break;return null;case 22:return u.lanes=0,fA(s,u,d,u.pendingProps);case 24:Ys(u,Mn,s.memoizedState.cache)}return Jo(s,u,d)}function xA(s,u,d){if(s!==null)if(s.memoizedProps!==u.pendingProps)On=!0;else{if(!V0(s,d)&&(u.flags&128)===0)return On=!1,zB(s,u,d);On=(s.flags&131072)!==0}else On=!1,Pt&&(u.flags&1048576)!==0&&ZR(u,ad,u.index);switch(u.lanes=0,u.tag){case 16:e:{var y=u.pendingProps;if(s=Tl(u.elementType),u.type=s,typeof s=="function")Xv(s)?(y=$l(s,y),u.tag=1,u=mA(null,u,s,y,d)):(u.tag=0,u=j0(null,u,s,y,d));else{if(s!=null){var E=s.$$typeof;if(E===R){u.tag=11,u=lA(null,u,s,y,d);break e}else if(E===M){u.tag=14,u=uA(null,u,s,y,d);break e}}throw u=V(s)||s,Error(r(306,u,""))}}return u;case 0:return j0(s,u,u.type,u.pendingProps,d);case 1:return y=u.type,E=$l(y,u.pendingProps),mA(s,u,y,E,d);case 3:e:{if(Re(u,u.stateNode.containerInfo),s===null)throw Error(r(387));y=u.pendingProps;var A=u.memoizedState;E=A.element,f0(s,u),md(u,y,null,d);var N=u.memoizedState;if(y=N.cache,Ys(u,Mn,y),y!==A.cache&&o0(u,[Mn],d,!0),pd(),y=N.element,A.isDehydrated)if(A={element:y,isDehydrated:!1,cache:N.cache},u.updateQueue.baseState=A,u.memoizedState=A,u.flags&256){u=gA(s,u,y,d);break e}else if(y!==E){E=Ri(Error(r(424)),u),ld(E),u=gA(s,u,y,d);break e}else{switch(s=u.stateNode.containerInfo,s.nodeType){case 9:s=s.body;break;default:s=s.nodeName==="HTML"?s.ownerDocument.body:s}for(cn=Mi(s.firstChild),Jn=u,Pt=!0,Vs=null,_i=!0,d=f2(u,null,y,d),u.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling}else{if(Cl(),y===E){u=Jo(s,u,d);break e}tr(s,u,y,d)}u=u.child}return u;case 26:return sm(s,u),s===null?(d=MT(u.type,null,u.pendingProps,null))?u.memoizedState=d:Pt||(d=u.type,s=u.pendingProps,y=Em(fe.current).createElement(d),y[un]=u,y[Zn]=s,nr(y,d,s),Gn(y),u.stateNode=y):u.memoizedState=MT(u.type,s.memoizedProps,u.pendingProps,s.memoizedState),null;case 27:return Ae(u),s===null&&Pt&&(y=u.stateNode=TT(u.type,u.pendingProps,fe.current),Jn=u,_i=!0,E=cn,sa(u.type)?(C1=E,cn=Mi(y.firstChild)):cn=E),tr(s,u,u.pendingProps.children,d),sm(s,u),s===null&&(u.flags|=4194304),u.child;case 5:return s===null&&Pt&&((E=y=cn)&&(y=g7(y,u.type,u.pendingProps,_i),y!==null?(u.stateNode=y,Jn=u,cn=Mi(y.firstChild),_i=!1,E=!0):E=!1),E||Gs(u)),Ae(u),E=u.type,A=u.pendingProps,N=s!==null?s.memoizedProps:null,y=A.children,v1(E,A)?y=null:N!==null&&v1(E,N)&&(u.flags|=32),u.memoizedState!==null&&(E=b0(s,u,MB,null,null,d),Id._currentValue=E),sm(s,u),tr(s,u,y,d),u.child;case 6:return s===null&&Pt&&((s=d=cn)&&(d=y7(d,u.pendingProps,_i),d!==null?(u.stateNode=d,Jn=u,cn=null,s=!0):s=!1),s||Gs(u)),null;case 13:return yA(s,u,d);case 4:return Re(u,u.stateNode.containerInfo),y=u.pendingProps,s===null?u.child=Dl(u,null,y,d):tr(s,u,y,d),u.child;case 11:return lA(s,u,u.type,u.pendingProps,d);case 7:return tr(s,u,u.pendingProps,d),u.child;case 8:return tr(s,u,u.pendingProps.children,d),u.child;case 12:return tr(s,u,u.pendingProps.children,d),u.child;case 10:return y=u.pendingProps,Ys(u,u.type,y.value),tr(s,u,y.children,d),u.child;case 9:return E=u.type._context,y=u.pendingProps.children,Rl(u),E=er(E),y=y(E),u.flags|=1,tr(s,u,y,d),u.child;case 14:return uA(s,u,u.type,u.pendingProps,d);case 15:return cA(s,u,u.type,u.pendingProps,d);case 19:return vA(s,u,d);case 31:return FB(s,u,d);case 22:return fA(s,u,d,u.pendingProps);case 24:return Rl(u),y=er(Mn),s===null?(E=l0(),E===null&&(E=rn,A=s0(),E.pooledCache=A,A.refCount++,A!==null&&(E.pooledCacheLanes|=d),E=A),u.memoizedState={parent:y,cache:E},c0(u),Ys(u,Mn,E)):((s.lanes&d)!==0&&(f0(s,u),md(u,null,null,d),pd()),E=s.memoizedState,A=u.memoizedState,E.parent!==y?(E={parent:y,cache:y},u.memoizedState=E,u.lanes===0&&(u.memoizedState=u.updateQueue.baseState=E),Ys(u,Mn,y)):(y=A.cache,Ys(u,Mn,y),y!==E.cache&&o0(u,[Mn],d,!0))),tr(s,u,u.pendingProps.children,d),u.child;case 29:throw u.pendingProps}throw Error(r(156,u.tag))}function es(s){s.flags|=4}function G0(s,u,d,y,E){if((u=(s.mode&32)!==0)&&(u=!1),u){if(s.flags|=16777216,(E&335544128)===E)if(s.stateNode.complete)s.flags|=8192;else if(YA())s.flags|=8192;else throw _l=Vp,u0}else s.flags&=-16777217}function wA(s,u){if(u.type!=="stylesheet"||(u.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!LT(u))if(YA())s.flags|=8192;else throw _l=Vp,u0}function lm(s,u){u!==null&&(s.flags|=4),s.flags&16384&&(u=s.tag!==22?Vn():536870912,s.lanes|=u,hc|=u)}function wd(s,u){if(!Pt)switch(s.tailMode){case"hidden":u=s.tail;for(var d=null;u!==null;)u.alternate!==null&&(d=u),u=u.sibling;d===null?s.tail=null:d.sibling=null;break;case"collapsed":d=s.tail;for(var y=null;d!==null;)d.alternate!==null&&(y=d),d=d.sibling;y===null?u||s.tail===null?s.tail=null:s.tail.sibling=null:y.sibling=null}}function fn(s){var u=s.alternate!==null&&s.alternate.child===s.child,d=0,y=0;if(u)for(var E=s.child;E!==null;)d|=E.lanes|E.childLanes,y|=E.subtreeFlags&65011712,y|=E.flags&65011712,E.return=s,E=E.sibling;else for(E=s.child;E!==null;)d|=E.lanes|E.childLanes,y|=E.subtreeFlags,y|=E.flags,E.return=s,E=E.sibling;return s.subtreeFlags|=y,s.childLanes=d,u}function BB(s,u,d){var y=u.pendingProps;switch(e0(u),u.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return fn(u),null;case 1:return fn(u),null;case 3:return d=u.stateNode,y=null,s!==null&&(y=s.memoizedState.cache),u.memoizedState.cache!==y&&(u.flags|=2048),Xo(Mn),le(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(s===null||s.child===null)&&(ec(u)?es(u):s===null||s.memoizedState.isDehydrated&&(u.flags&256)===0||(u.flags|=1024,n0())),fn(u),null;case 26:var E=u.type,A=u.memoizedState;return s===null?(es(u),A!==null?(fn(u),wA(u,A)):(fn(u),G0(u,E,null,y,d))):A?A!==s.memoizedState?(es(u),fn(u),wA(u,A)):(fn(u),u.flags&=-16777217):(s=s.memoizedProps,s!==y&&es(u),fn(u),G0(u,E,s,y,d)),null;case 27:if(Ie(u),d=fe.current,E=u.type,s!==null&&u.stateNode!=null)s.memoizedProps!==y&&es(u);else{if(!y){if(u.stateNode===null)throw Error(r(166));return fn(u),null}s=ae.current,ec(u)?e2(u):(s=TT(E,y,d),u.stateNode=s,es(u))}return fn(u),null;case 5:if(Ie(u),E=u.type,s!==null&&u.stateNode!=null)s.memoizedProps!==y&&es(u);else{if(!y){if(u.stateNode===null)throw Error(r(166));return fn(u),null}if(A=ae.current,ec(u))e2(u);else{var N=Em(fe.current);switch(A){case 1:A=N.createElementNS("http://www.w3.org/2000/svg",E);break;case 2:A=N.createElementNS("http://www.w3.org/1998/Math/MathML",E);break;default:switch(E){case"svg":A=N.createElementNS("http://www.w3.org/2000/svg",E);break;case"math":A=N.createElementNS("http://www.w3.org/1998/Math/MathML",E);break;case"script":A=N.createElement("div"),A.innerHTML="<script><\/script>",A=A.removeChild(A.firstChild);break;case"select":A=typeof y.is=="string"?N.createElement("select",{is:y.is}):N.createElement("select"),y.multiple?A.multiple=!0:y.size&&(A.size=y.size);break;default:A=typeof y.is=="string"?N.createElement(E,{is:y.is}):N.createElement(E)}}A[un]=u,A[Zn]=y;e:for(N=u.child;N!==null;){if(N.tag===5||N.tag===6)A.appendChild(N.stateNode);else if(N.tag!==4&&N.tag!==27&&N.child!==null){N.child.return=N,N=N.child;continue}if(N===u)break e;for(;N.sibling===null;){if(N.return===null||N.return===u)break e;N=N.return}N.sibling.return=N.return,N=N.sibling}u.stateNode=A;e:switch(nr(A,E,y),E){case"button":case"input":case"select":case"textarea":y=!!y.autoFocus;break e;case"img":y=!0;break e;default:y=!1}y&&es(u)}}return fn(u),G0(u,u.type,s===null?null:s.memoizedProps,u.pendingProps,d),null;case 6:if(s&&u.stateNode!=null)s.memoizedProps!==y&&es(u);else{if(typeof y!="string"&&u.stateNode===null)throw Error(r(166));if(s=fe.current,ec(u)){if(s=u.stateNode,d=u.memoizedProps,y=null,E=Jn,E!==null)switch(E.tag){case 27:case 5:y=E.memoizedProps}s[un]=u,s=!!(s.nodeValue===d||y!==null&&y.suppressHydrationWarning===!0||yT(s.nodeValue,d)),s||Gs(u,!0)}else s=Em(s).createTextNode(y),s[un]=u,u.stateNode=s}return fn(u),null;case 31:if(d=u.memoizedState,s===null||s.memoizedState!==null){if(y=ec(u),d!==null){if(s===null){if(!y)throw Error(r(318));if(s=u.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(557));s[un]=u}else Cl(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;fn(u),s=!1}else d=n0(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=d),s=!0;if(!s)return u.flags&256?(Jr(u),u):(Jr(u),null);if((u.flags&128)!==0)throw Error(r(558))}return fn(u),null;case 13:if(y=u.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(E=ec(u),y!==null&&y.dehydrated!==null){if(s===null){if(!E)throw Error(r(318));if(E=u.memoizedState,E=E!==null?E.dehydrated:null,!E)throw Error(r(317));E[un]=u}else Cl(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;fn(u),E=!1}else E=n0(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=E),E=!0;if(!E)return u.flags&256?(Jr(u),u):(Jr(u),null)}return Jr(u),(u.flags&128)!==0?(u.lanes=d,u):(d=y!==null,s=s!==null&&s.memoizedState!==null,d&&(y=u.child,E=null,y.alternate!==null&&y.alternate.memoizedState!==null&&y.alternate.memoizedState.cachePool!==null&&(E=y.alternate.memoizedState.cachePool.pool),A=null,y.memoizedState!==null&&y.memoizedState.cachePool!==null&&(A=y.memoizedState.cachePool.pool),A!==E&&(y.flags|=2048)),d!==s&&d&&(u.child.flags|=8192),lm(u,u.updateQueue),fn(u),null);case 4:return le(),s===null&&p1(u.stateNode.containerInfo),fn(u),null;case 10:return Xo(u.type),fn(u),null;case 19:if(ee(An),y=u.memoizedState,y===null)return fn(u),null;if(E=(u.flags&128)!==0,A=y.rendering,A===null)if(E)wd(y,!1);else{if(wn!==0||s!==null&&(s.flags&128)!==0)for(s=u.child;s!==null;){if(A=Kp(s),A!==null){for(u.flags|=128,wd(y,!1),s=A.updateQueue,u.updateQueue=s,lm(u,s),u.subtreeFlags=0,s=d,d=u.child;d!==null;)KR(d,s),d=d.sibling;return q(An,An.current&1|2),Pt&&Wo(u,y.treeForkCount),u.child}s=s.sibling}y.tail!==null&&ge()>hm&&(u.flags|=128,E=!0,wd(y,!1),u.lanes=4194304)}else{if(!E)if(s=Kp(A),s!==null){if(u.flags|=128,E=!0,s=s.updateQueue,u.updateQueue=s,lm(u,s),wd(y,!0),y.tail===null&&y.tailMode==="hidden"&&!A.alternate&&!Pt)return fn(u),null}else 2*ge()-y.renderingStartTime>hm&&d!==536870912&&(u.flags|=128,E=!0,wd(y,!1),u.lanes=4194304);y.isBackwards?(A.sibling=u.child,u.child=A):(s=y.last,s!==null?s.sibling=A:u.child=A,y.last=A)}return y.tail!==null?(s=y.tail,y.rendering=s,y.tail=s.sibling,y.renderingStartTime=ge(),s.sibling=null,d=An.current,q(An,E?d&1|2:d&1),Pt&&Wo(u,y.treeForkCount),s):(fn(u),null);case 22:case 23:return Jr(u),m0(),y=u.memoizedState!==null,s!==null?s.memoizedState!==null!==y&&(u.flags|=8192):y&&(u.flags|=8192),y?(d&536870912)!==0&&(u.flags&128)===0&&(fn(u),u.subtreeFlags&6&&(u.flags|=8192)):fn(u),d=u.updateQueue,d!==null&&lm(u,d.retryQueue),d=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),y=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(y=u.memoizedState.cachePool.pool),y!==d&&(u.flags|=2048),s!==null&&ee(Al),null;case 24:return d=null,s!==null&&(d=s.memoizedState.cache),u.memoizedState.cache!==d&&(u.flags|=2048),Xo(Mn),fn(u),null;case 25:return null;case 30:return null}throw Error(r(156,u.tag))}function HB(s,u){switch(e0(u),u.tag){case 1:return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 3:return Xo(Mn),le(),s=u.flags,(s&65536)!==0&&(s&128)===0?(u.flags=s&-65537|128,u):null;case 26:case 27:case 5:return Ie(u),null;case 31:if(u.memoizedState!==null){if(Jr(u),u.alternate===null)throw Error(r(340));Cl()}return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 13:if(Jr(u),s=u.memoizedState,s!==null&&s.dehydrated!==null){if(u.alternate===null)throw Error(r(340));Cl()}return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 19:return ee(An),null;case 4:return le(),null;case 10:return Xo(u.type),null;case 22:case 23:return Jr(u),m0(),s!==null&&ee(Al),s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 24:return Xo(Mn),null;case 25:return null;default:return null}}function SA(s,u){switch(e0(u),u.tag){case 3:Xo(Mn),le();break;case 26:case 27:case 5:Ie(u);break;case 4:le();break;case 31:u.memoizedState!==null&&Jr(u);break;case 13:Jr(u);break;case 19:ee(An);break;case 10:Xo(u.type);break;case 22:case 23:Jr(u),m0(),s!==null&&ee(Al);break;case 24:Xo(Mn)}}function Sd(s,u){try{var d=u.updateQueue,y=d!==null?d.lastEffect:null;if(y!==null){var E=y.next;d=E;do{if((d.tag&s)===s){y=void 0;var A=d.create,N=d.inst;y=A(),N.destroy=y}d=d.next}while(d!==E)}}catch(G){Qt(u,u.return,G)}}function Js(s,u,d){try{var y=u.updateQueue,E=y!==null?y.lastEffect:null;if(E!==null){var A=E.next;y=A;do{if((y.tag&s)===s){var N=y.inst,G=N.destroy;if(G!==void 0){N.destroy=void 0,E=u;var se=d,xe=G;try{xe()}catch(Te){Qt(E,se,Te)}}}y=y.next}while(y!==A)}}catch(Te){Qt(u,u.return,Te)}}function EA(s){var u=s.updateQueue;if(u!==null){var d=s.stateNode;try{h2(u,d)}catch(y){Qt(s,s.return,y)}}}function CA(s,u,d){d.props=$l(s.type,s.memoizedProps),d.state=s.memoizedState;try{d.componentWillUnmount()}catch(y){Qt(s,u,y)}}function Ed(s,u){try{var d=s.ref;if(d!==null){switch(s.tag){case 26:case 27:case 5:var y=s.stateNode;break;case 30:y=s.stateNode;break;default:y=s.stateNode}typeof d=="function"?s.refCleanup=d(y):d.current=y}}catch(E){Qt(s,u,E)}}function mo(s,u){var d=s.ref,y=s.refCleanup;if(d!==null)if(typeof y=="function")try{y()}catch(E){Qt(s,u,E)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof d=="function")try{d(null)}catch(E){Qt(s,u,E)}else d.current=null}function kA(s){var u=s.type,d=s.memoizedProps,y=s.stateNode;try{e:switch(u){case"button":case"input":case"select":case"textarea":d.autoFocus&&y.focus();break e;case"img":d.src?y.src=d.src:d.srcSet&&(y.srcset=d.srcSet)}}catch(E){Qt(s,s.return,E)}}function Y0(s,u,d){try{var y=s.stateNode;c7(y,s.type,d,u),y[Zn]=u}catch(E){Qt(s,s.return,E)}}function RA(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&sa(s.type)||s.tag===4}function W0(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||RA(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&&sa(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 K0(s,u,d){var y=s.tag;if(y===5||y===6)s=s.stateNode,u?(d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d).insertBefore(s,u):(u=d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d,u.appendChild(s),d=d._reactRootContainer,d!=null||u.onclick!==null||(u.onclick=Vo));else if(y!==4&&(y===27&&sa(s.type)&&(d=s.stateNode,u=null),s=s.child,s!==null))for(K0(s,u,d),s=s.sibling;s!==null;)K0(s,u,d),s=s.sibling}function um(s,u,d){var y=s.tag;if(y===5||y===6)s=s.stateNode,u?d.insertBefore(s,u):d.appendChild(s);else if(y!==4&&(y===27&&sa(s.type)&&(d=s.stateNode),s=s.child,s!==null))for(um(s,u,d),s=s.sibling;s!==null;)um(s,u,d),s=s.sibling}function AA(s){var u=s.stateNode,d=s.memoizedProps;try{for(var y=s.type,E=u.attributes;E.length;)u.removeAttributeNode(E[0]);nr(u,y,d),u[un]=s,u[Zn]=d}catch(A){Qt(s,s.return,A)}}var ts=!1,Pn=!1,X0=!1,TA=typeof WeakSet=="function"?WeakSet:Set,Yn=null;function UB(s,u){if(s=s.containerInfo,y1=Dm,s=zR(s),Uv(s)){if("selectionStart"in s)var d={start:s.selectionStart,end:s.selectionEnd};else e:{d=(d=s.ownerDocument)&&d.defaultView||window;var y=d.getSelection&&d.getSelection();if(y&&y.rangeCount!==0){d=y.anchorNode;var E=y.anchorOffset,A=y.focusNode;y=y.focusOffset;try{d.nodeType,A.nodeType}catch{d=null;break e}var N=0,G=-1,se=-1,xe=0,Te=0,Oe=s,we=null;t:for(;;){for(var Ee;Oe!==d||E!==0&&Oe.nodeType!==3||(G=N+E),Oe!==A||y!==0&&Oe.nodeType!==3||(se=N+y),Oe.nodeType===3&&(N+=Oe.nodeValue.length),(Ee=Oe.firstChild)!==null;)we=Oe,Oe=Ee;for(;;){if(Oe===s)break t;if(we===d&&++xe===E&&(G=N),we===A&&++Te===y&&(se=N),(Ee=Oe.nextSibling)!==null)break;Oe=we,we=Oe.parentNode}Oe=Ee}d=G===-1||se===-1?null:{start:G,end:se}}else d=null}d=d||{start:0,end:0}}else d=null;for(b1={focusedElem:s,selectionRange:d},Dm=!1,Yn=u;Yn!==null;)if(u=Yn,s=u.child,(u.subtreeFlags&1028)!==0&&s!==null)s.return=u,Yn=s;else for(;Yn!==null;){switch(u=Yn,A=u.alternate,s=u.flags,u.tag){case 0:if((s&4)!==0&&(s=u.updateQueue,s=s!==null?s.events:null,s!==null))for(d=0;d<s.length;d++)E=s[d],E.ref.impl=E.nextImpl;break;case 11:case 15:break;case 1:if((s&1024)!==0&&A!==null){s=void 0,d=u,E=A.memoizedProps,A=A.memoizedState,y=d.stateNode;try{var He=$l(d.type,E);s=y.getSnapshotBeforeUpdate(He,A),y.__reactInternalSnapshotBeforeUpdate=s}catch(st){Qt(d,d.return,st)}}break;case 3:if((s&1024)!==0){if(s=u.stateNode.containerInfo,d=s.nodeType,d===9)w1(s);else if(d===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":w1(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=u.sibling,s!==null){s.return=u.return,Yn=s;break}Yn=u.return}}function _A(s,u,d){var y=d.flags;switch(d.tag){case 0:case 11:case 15:rs(s,d),y&4&&Sd(5,d);break;case 1:if(rs(s,d),y&4)if(s=d.stateNode,u===null)try{s.componentDidMount()}catch(N){Qt(d,d.return,N)}else{var E=$l(d.type,u.memoizedProps);u=u.memoizedState;try{s.componentDidUpdate(E,u,s.__reactInternalSnapshotBeforeUpdate)}catch(N){Qt(d,d.return,N)}}y&64&&EA(d),y&512&&Ed(d,d.return);break;case 3:if(rs(s,d),y&64&&(s=d.updateQueue,s!==null)){if(u=null,d.child!==null)switch(d.child.tag){case 27:case 5:u=d.child.stateNode;break;case 1:u=d.child.stateNode}try{h2(s,u)}catch(N){Qt(d,d.return,N)}}break;case 27:u===null&&y&4&&AA(d);case 26:case 5:rs(s,d),u===null&&y&4&&kA(d),y&512&&Ed(d,d.return);break;case 12:rs(s,d);break;case 31:rs(s,d),y&4&&$A(s,d);break;case 13:rs(s,d),y&4&&OA(s,d),y&64&&(s=d.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(d=ZB.bind(null,d),b7(s,d))));break;case 22:if(y=d.memoizedState!==null||ts,!y){u=u!==null&&u.memoizedState!==null||Pn,E=ts;var A=Pn;ts=y,(Pn=u)&&!A?is(s,d,(d.subtreeFlags&8772)!==0):rs(s,d),ts=E,Pn=A}break;case 30:break;default:rs(s,d)}}function DA(s){var u=s.alternate;u!==null&&(s.alternate=null,DA(u)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(u=s.stateNode,u!==null&&Rv(u)),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 yn=null,Dr=!1;function ns(s,u,d){for(d=d.child;d!==null;)MA(s,u,d),d=d.sibling}function MA(s,u,d){if(Le&&typeof Le.onCommitFiberUnmount=="function")try{Le.onCommitFiberUnmount(vt,d)}catch{}switch(d.tag){case 26:Pn||mo(d,u),ns(s,u,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:Pn||mo(d,u);var y=yn,E=Dr;sa(d.type)&&(yn=d.stateNode,Dr=!1),ns(s,u,d),$d(d.stateNode),yn=y,Dr=E;break;case 5:Pn||mo(d,u);case 6:if(y=yn,E=Dr,yn=null,ns(s,u,d),yn=y,Dr=E,yn!==null)if(Dr)try{(yn.nodeType===9?yn.body:yn.nodeName==="HTML"?yn.ownerDocument.body:yn).removeChild(d.stateNode)}catch(A){Qt(d,u,A)}else try{yn.removeChild(d.stateNode)}catch(A){Qt(d,u,A)}break;case 18:yn!==null&&(Dr?(s=yn,ET(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,d.stateNode),wc(s)):ET(yn,d.stateNode));break;case 4:y=yn,E=Dr,yn=d.stateNode.containerInfo,Dr=!0,ns(s,u,d),yn=y,Dr=E;break;case 0:case 11:case 14:case 15:Js(2,d,u),Pn||Js(4,d,u),ns(s,u,d);break;case 1:Pn||(mo(d,u),y=d.stateNode,typeof y.componentWillUnmount=="function"&&CA(d,u,y)),ns(s,u,d);break;case 21:ns(s,u,d);break;case 22:Pn=(y=Pn)||d.memoizedState!==null,ns(s,u,d),Pn=y;break;default:ns(s,u,d)}}function $A(s,u){if(u.memoizedState===null&&(s=u.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{wc(s)}catch(d){Qt(u,u.return,d)}}}function OA(s,u){if(u.memoizedState===null&&(s=u.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{wc(s)}catch(d){Qt(u,u.return,d)}}function qB(s){switch(s.tag){case 31:case 13:case 19:var u=s.stateNode;return u===null&&(u=s.stateNode=new TA),u;case 22:return s=s.stateNode,u=s._retryCache,u===null&&(u=s._retryCache=new TA),u;default:throw Error(r(435,s.tag))}}function cm(s,u){var d=qB(s);u.forEach(function(y){if(!d.has(y)){d.add(y);var E=JB.bind(null,s,y);y.then(E,E)}})}function Mr(s,u){var d=u.deletions;if(d!==null)for(var y=0;y<d.length;y++){var E=d[y],A=s,N=u,G=N;e:for(;G!==null;){switch(G.tag){case 27:if(sa(G.type)){yn=G.stateNode,Dr=!1;break e}break;case 5:yn=G.stateNode,Dr=!1;break e;case 3:case 4:yn=G.stateNode.containerInfo,Dr=!0;break e}G=G.return}if(yn===null)throw Error(r(160));MA(A,N,E),yn=null,Dr=!1,A=E.alternate,A!==null&&(A.return=null),E.return=null}if(u.subtreeFlags&13886)for(u=u.child;u!==null;)PA(u,s),u=u.sibling}var Qi=null;function PA(s,u){var d=s.alternate,y=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:Mr(u,s),$r(s),y&4&&(Js(3,s,s.return),Sd(3,s),Js(5,s,s.return));break;case 1:Mr(u,s),$r(s),y&512&&(Pn||d===null||mo(d,d.return)),y&64&&ts&&(s=s.updateQueue,s!==null&&(y=s.callbacks,y!==null&&(d=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=d===null?y:d.concat(y))));break;case 26:var E=Qi;if(Mr(u,s),$r(s),y&512&&(Pn||d===null||mo(d,d.return)),y&4){var A=d!==null?d.memoizedState:null;if(y=s.memoizedState,d===null)if(y===null)if(s.stateNode===null){e:{y=s.type,d=s.memoizedProps,E=E.ownerDocument||E;t:switch(y){case"title":A=E.getElementsByTagName("title")[0],(!A||A[Xf]||A[un]||A.namespaceURI==="http://www.w3.org/2000/svg"||A.hasAttribute("itemprop"))&&(A=E.createElement(y),E.head.insertBefore(A,E.querySelector("head > title"))),nr(A,y,d),A[un]=s,Gn(A),y=A;break e;case"link":var N=PT("link","href",E).get(y+(d.href||""));if(N){for(var G=0;G<N.length;G++)if(A=N[G],A.getAttribute("href")===(d.href==null||d.href===""?null:d.href)&&A.getAttribute("rel")===(d.rel==null?null:d.rel)&&A.getAttribute("title")===(d.title==null?null:d.title)&&A.getAttribute("crossorigin")===(d.crossOrigin==null?null:d.crossOrigin)){N.splice(G,1);break t}}A=E.createElement(y),nr(A,y,d),E.head.appendChild(A);break;case"meta":if(N=PT("meta","content",E).get(y+(d.content||""))){for(G=0;G<N.length;G++)if(A=N[G],A.getAttribute("content")===(d.content==null?null:""+d.content)&&A.getAttribute("name")===(d.name==null?null:d.name)&&A.getAttribute("property")===(d.property==null?null:d.property)&&A.getAttribute("http-equiv")===(d.httpEquiv==null?null:d.httpEquiv)&&A.getAttribute("charset")===(d.charSet==null?null:d.charSet)){N.splice(G,1);break t}}A=E.createElement(y),nr(A,y,d),E.head.appendChild(A);break;default:throw Error(r(468,y))}A[un]=s,Gn(A),y=A}s.stateNode=y}else IT(E,s.type,s.stateNode);else s.stateNode=OT(E,y,s.memoizedProps);else A!==y?(A===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):A.count--,y===null?IT(E,s.type,s.stateNode):OT(E,y,s.memoizedProps)):y===null&&s.stateNode!==null&&Y0(s,s.memoizedProps,d.memoizedProps)}break;case 27:Mr(u,s),$r(s),y&512&&(Pn||d===null||mo(d,d.return)),d!==null&&y&4&&Y0(s,s.memoizedProps,d.memoizedProps);break;case 5:if(Mr(u,s),$r(s),y&512&&(Pn||d===null||mo(d,d.return)),s.flags&32){E=s.stateNode;try{qu(E,"")}catch(He){Qt(s,s.return,He)}}y&4&&s.stateNode!=null&&(E=s.memoizedProps,Y0(s,E,d!==null?d.memoizedProps:E)),y&1024&&(X0=!0);break;case 6:if(Mr(u,s),$r(s),y&4){if(s.stateNode===null)throw Error(r(162));y=s.memoizedProps,d=s.stateNode;try{d.nodeValue=y}catch(He){Qt(s,s.return,He)}}break;case 3:if(Rm=null,E=Qi,Qi=Cm(u.containerInfo),Mr(u,s),Qi=E,$r(s),y&4&&d!==null&&d.memoizedState.isDehydrated)try{wc(u.containerInfo)}catch(He){Qt(s,s.return,He)}X0&&(X0=!1,IA(s));break;case 4:y=Qi,Qi=Cm(s.stateNode.containerInfo),Mr(u,s),$r(s),Qi=y;break;case 12:Mr(u,s),$r(s);break;case 31:Mr(u,s),$r(s),y&4&&(y=s.updateQueue,y!==null&&(s.updateQueue=null,cm(s,y)));break;case 13:Mr(u,s),$r(s),s.child.flags&8192&&s.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(dm=ge()),y&4&&(y=s.updateQueue,y!==null&&(s.updateQueue=null,cm(s,y)));break;case 22:E=s.memoizedState!==null;var se=d!==null&&d.memoizedState!==null,xe=ts,Te=Pn;if(ts=xe||E,Pn=Te||se,Mr(u,s),Pn=Te,ts=xe,$r(s),y&8192)e:for(u=s.stateNode,u._visibility=E?u._visibility&-2:u._visibility|1,E&&(d===null||se||ts||Pn||Ol(s)),d=null,u=s;;){if(u.tag===5||u.tag===26){if(d===null){se=d=u;try{if(A=se.stateNode,E)N=A.style,typeof N.setProperty=="function"?N.setProperty("display","none","important"):N.display="none";else{G=se.stateNode;var Oe=se.memoizedProps.style,we=Oe!=null&&Oe.hasOwnProperty("display")?Oe.display:null;G.style.display=we==null||typeof we=="boolean"?"":(""+we).trim()}}catch(He){Qt(se,se.return,He)}}}else if(u.tag===6){if(d===null){se=u;try{se.stateNode.nodeValue=E?"":se.memoizedProps}catch(He){Qt(se,se.return,He)}}}else if(u.tag===18){if(d===null){se=u;try{var Ee=se.stateNode;E?CT(Ee,!0):CT(se.stateNode,!1)}catch(He){Qt(se,se.return,He)}}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===s)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===s)break e;for(;u.sibling===null;){if(u.return===null||u.return===s)break e;d===u&&(d=null),u=u.return}d===u&&(d=null),u.sibling.return=u.return,u=u.sibling}y&4&&(y=s.updateQueue,y!==null&&(d=y.retryQueue,d!==null&&(y.retryQueue=null,cm(s,d))));break;case 19:Mr(u,s),$r(s),y&4&&(y=s.updateQueue,y!==null&&(s.updateQueue=null,cm(s,y)));break;case 30:break;case 21:break;default:Mr(u,s),$r(s)}}function $r(s){var u=s.flags;if(u&2){try{for(var d,y=s.return;y!==null;){if(RA(y)){d=y;break}y=y.return}if(d==null)throw Error(r(160));switch(d.tag){case 27:var E=d.stateNode,A=W0(s);um(s,A,E);break;case 5:var N=d.stateNode;d.flags&32&&(qu(N,""),d.flags&=-33);var G=W0(s);um(s,G,N);break;case 3:case 4:var se=d.stateNode.containerInfo,xe=W0(s);K0(s,xe,se);break;default:throw Error(r(161))}}catch(Te){Qt(s,s.return,Te)}s.flags&=-3}u&4096&&(s.flags&=-4097)}function IA(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var u=s;IA(u),u.tag===5&&u.flags&1024&&u.stateNode.reset(),s=s.sibling}}function rs(s,u){if(u.subtreeFlags&8772)for(u=u.child;u!==null;)_A(s,u.alternate,u),u=u.sibling}function Ol(s){for(s=s.child;s!==null;){var u=s;switch(u.tag){case 0:case 11:case 14:case 15:Js(4,u,u.return),Ol(u);break;case 1:mo(u,u.return);var d=u.stateNode;typeof d.componentWillUnmount=="function"&&CA(u,u.return,d),Ol(u);break;case 27:$d(u.stateNode);case 26:case 5:mo(u,u.return),Ol(u);break;case 22:u.memoizedState===null&&Ol(u);break;case 30:Ol(u);break;default:Ol(u)}s=s.sibling}}function is(s,u,d){for(d=d&&(u.subtreeFlags&8772)!==0,u=u.child;u!==null;){var y=u.alternate,E=s,A=u,N=A.flags;switch(A.tag){case 0:case 11:case 15:is(E,A,d),Sd(4,A);break;case 1:if(is(E,A,d),y=A,E=y.stateNode,typeof E.componentDidMount=="function")try{E.componentDidMount()}catch(xe){Qt(y,y.return,xe)}if(y=A,E=y.updateQueue,E!==null){var G=y.stateNode;try{var se=E.shared.hiddenCallbacks;if(se!==null)for(E.shared.hiddenCallbacks=null,E=0;E<se.length;E++)d2(se[E],G)}catch(xe){Qt(y,y.return,xe)}}d&&N&64&&EA(A),Ed(A,A.return);break;case 27:AA(A);case 26:case 5:is(E,A,d),d&&y===null&&N&4&&kA(A),Ed(A,A.return);break;case 12:is(E,A,d);break;case 31:is(E,A,d),d&&N&4&&$A(E,A);break;case 13:is(E,A,d),d&&N&4&&OA(E,A);break;case 22:A.memoizedState===null&&is(E,A,d),Ed(A,A.return);break;case 30:break;default:is(E,A,d)}u=u.sibling}}function Q0(s,u){var d=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),s=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(s=u.memoizedState.cachePool.pool),s!==d&&(s!=null&&s.refCount++,d!=null&&ud(d))}function Z0(s,u){s=null,u.alternate!==null&&(s=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==s&&(u.refCount++,s!=null&&ud(s))}function Zi(s,u,d,y){if(u.subtreeFlags&10256)for(u=u.child;u!==null;)LA(s,u,d,y),u=u.sibling}function LA(s,u,d,y){var E=u.flags;switch(u.tag){case 0:case 11:case 15:Zi(s,u,d,y),E&2048&&Sd(9,u);break;case 1:Zi(s,u,d,y);break;case 3:Zi(s,u,d,y),E&2048&&(s=null,u.alternate!==null&&(s=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==s&&(u.refCount++,s!=null&&ud(s)));break;case 12:if(E&2048){Zi(s,u,d,y),s=u.stateNode;try{var A=u.memoizedProps,N=A.id,G=A.onPostCommit;typeof G=="function"&&G(N,u.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(se){Qt(u,u.return,se)}}else Zi(s,u,d,y);break;case 31:Zi(s,u,d,y);break;case 13:Zi(s,u,d,y);break;case 23:break;case 22:A=u.stateNode,N=u.alternate,u.memoizedState!==null?A._visibility&2?Zi(s,u,d,y):Cd(s,u):A._visibility&2?Zi(s,u,d,y):(A._visibility|=2,cc(s,u,d,y,(u.subtreeFlags&10256)!==0||!1)),E&2048&&Q0(N,u);break;case 24:Zi(s,u,d,y),E&2048&&Z0(u.alternate,u);break;default:Zi(s,u,d,y)}}function cc(s,u,d,y,E){for(E=E&&((u.subtreeFlags&10256)!==0||!1),u=u.child;u!==null;){var A=s,N=u,G=d,se=y,xe=N.flags;switch(N.tag){case 0:case 11:case 15:cc(A,N,G,se,E),Sd(8,N);break;case 23:break;case 22:var Te=N.stateNode;N.memoizedState!==null?Te._visibility&2?cc(A,N,G,se,E):Cd(A,N):(Te._visibility|=2,cc(A,N,G,se,E)),E&&xe&2048&&Q0(N.alternate,N);break;case 24:cc(A,N,G,se,E),E&&xe&2048&&Z0(N.alternate,N);break;default:cc(A,N,G,se,E)}u=u.sibling}}function Cd(s,u){if(u.subtreeFlags&10256)for(u=u.child;u!==null;){var d=s,y=u,E=y.flags;switch(y.tag){case 22:Cd(d,y),E&2048&&Q0(y.alternate,y);break;case 24:Cd(d,y),E&2048&&Z0(y.alternate,y);break;default:Cd(d,y)}u=u.sibling}}var kd=8192;function fc(s,u,d){if(s.subtreeFlags&kd)for(s=s.child;s!==null;)NA(s,u,d),s=s.sibling}function NA(s,u,d){switch(s.tag){case 26:fc(s,u,d),s.flags&kd&&s.memoizedState!==null&&D7(d,Qi,s.memoizedState,s.memoizedProps);break;case 5:fc(s,u,d);break;case 3:case 4:var y=Qi;Qi=Cm(s.stateNode.containerInfo),fc(s,u,d),Qi=y;break;case 22:s.memoizedState===null&&(y=s.alternate,y!==null&&y.memoizedState!==null?(y=kd,kd=16777216,fc(s,u,d),kd=y):fc(s,u,d));break;default:fc(s,u,d)}}function jA(s){var u=s.alternate;if(u!==null&&(s=u.child,s!==null)){u.child=null;do u=s.sibling,s.sibling=null,s=u;while(s!==null)}}function Rd(s){var u=s.deletions;if((s.flags&16)!==0){if(u!==null)for(var d=0;d<u.length;d++){var y=u[d];Yn=y,zA(y,s)}jA(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)FA(s),s=s.sibling}function FA(s){switch(s.tag){case 0:case 11:case 15:Rd(s),s.flags&2048&&Js(9,s,s.return);break;case 3:Rd(s);break;case 12:Rd(s);break;case 22:var u=s.stateNode;s.memoizedState!==null&&u._visibility&2&&(s.return===null||s.return.tag!==13)?(u._visibility&=-3,fm(s)):Rd(s);break;default:Rd(s)}}function fm(s){var u=s.deletions;if((s.flags&16)!==0){if(u!==null)for(var d=0;d<u.length;d++){var y=u[d];Yn=y,zA(y,s)}jA(s)}for(s=s.child;s!==null;){switch(u=s,u.tag){case 0:case 11:case 15:Js(8,u,u.return),fm(u);break;case 22:d=u.stateNode,d._visibility&2&&(d._visibility&=-3,fm(u));break;default:fm(u)}s=s.sibling}}function zA(s,u){for(;Yn!==null;){var d=Yn;switch(d.tag){case 0:case 11:case 15:Js(8,d,u);break;case 23:case 22:if(d.memoizedState!==null&&d.memoizedState.cachePool!==null){var y=d.memoizedState.cachePool.pool;y!=null&&y.refCount++}break;case 24:ud(d.memoizedState.cache)}if(y=d.child,y!==null)y.return=d,Yn=y;else e:for(d=s;Yn!==null;){y=Yn;var E=y.sibling,A=y.return;if(DA(y),y===d){Yn=null;break e}if(E!==null){E.return=A,Yn=E;break e}Yn=A}}}var VB={getCacheForType:function(s){var u=er(Mn),d=u.data.get(s);return d===void 0&&(d=s(),u.data.set(s,d)),d},cacheSignal:function(){return er(Mn).controller.signal}},GB=typeof WeakMap=="function"?WeakMap:Map,qt=0,rn=null,Rt=null,Dt=0,Xt=0,ei=null,ea=!1,dc=!1,J0=!1,os=0,wn=0,ta=0,Pl=0,e1=0,ti=0,hc=0,Ad=null,Or=null,t1=!1,dm=0,BA=0,hm=1/0,pm=null,na=null,jn=0,ra=null,pc=null,ss=0,n1=0,r1=null,HA=null,Td=0,i1=null;function ni(){return(qt&2)!==0&&Dt!==0?Dt&-Dt:z.T!==null?c1():Si()}function UA(){if(ti===0)if((Dt&536870912)===0||Pt){var s=jt;jt<<=1,(jt&3932160)===0&&(jt=262144),ti=s}else ti=536870912;return s=Zr.current,s!==null&&(s.flags|=32),ti}function Pr(s,u,d){(s===rn&&(Xt===2||Xt===9)||s.cancelPendingCommit!==null)&&(mc(s,0),ia(s,Dt,ti,!1)),Nn(s,d),((qt&2)===0||s!==rn)&&(s===rn&&((qt&2)===0&&(Pl|=d),wn===4&&ia(s,Dt,ti,!1)),go(s))}function qA(s,u,d){if((qt&6)!==0)throw Error(r(327));var y=!d&&(u&127)===0&&(u&s.expiredLanes)===0||Dn(s,u),E=y?KB(s,u):s1(s,u,!0),A=y;do{if(E===0){dc&&!y&&ia(s,u,0,!1);break}else{if(d=s.current.alternate,A&&!YB(d)){E=s1(s,u,!1),A=!1;continue}if(E===2){if(A=u,s.errorRecoveryDisabledLanes&A)var N=0;else N=s.pendingLanes&-536870913,N=N!==0?N:N&536870912?536870912:0;if(N!==0){u=N;e:{var G=s;E=Ad;var se=G.current.memoizedState.isDehydrated;if(se&&(mc(G,N).flags|=256),N=s1(G,N,!1),N!==2){if(J0&&!se){G.errorRecoveryDisabledLanes|=A,Pl|=A,E=4;break e}A=Or,Or=E,A!==null&&(Or===null?Or=A:Or.push.apply(Or,A))}E=N}if(A=!1,E!==2)continue}}if(E===1){mc(s,0),ia(s,u,0,!0);break}e:{switch(y=s,A=E,A){case 0:case 1:throw Error(r(345));case 4:if((u&4194048)!==u)break;case 6:ia(y,u,ti,!ea);break e;case 2:Or=null;break;case 3:case 5:break;default:throw Error(r(329))}if((u&62914560)===u&&(E=dm+300-ge(),10<E)){if(ia(y,u,ti,!ea),zt(y,0,!0)!==0)break e;ss=u,y.timeoutHandle=wT(VA.bind(null,y,d,Or,pm,t1,u,ti,Pl,hc,ea,A,"Throttled",-0,0),E);break e}VA(y,d,Or,pm,t1,u,ti,Pl,hc,ea,A,null,-0,0)}}break}while(!0);go(s)}function VA(s,u,d,y,E,A,N,G,se,xe,Te,Oe,we,Ee){if(s.timeoutHandle=-1,Oe=u.subtreeFlags,Oe&8192||(Oe&16785408)===16785408){Oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Vo},NA(u,A,Oe);var He=(A&62914560)===A?dm-ge():(A&4194048)===A?BA-ge():0;if(He=M7(Oe,He),He!==null){ss=A,s.cancelPendingCommit=He(JA.bind(null,s,u,A,d,y,E,N,G,se,Te,Oe,null,we,Ee)),ia(s,A,N,!xe);return}}JA(s,u,A,d,y,E,N,G,se)}function YB(s){for(var u=s;;){var d=u.tag;if((d===0||d===11||d===15)&&u.flags&16384&&(d=u.updateQueue,d!==null&&(d=d.stores,d!==null)))for(var y=0;y<d.length;y++){var E=d[y],A=E.getSnapshot;E=E.value;try{if(!Xr(A(),E))return!1}catch{return!1}}if(d=u.child,u.subtreeFlags&16384&&d!==null)d.return=u,u=d;else{if(u===s)break;for(;u.sibling===null;){if(u.return===null||u.return===s)return!0;u=u.return}u.sibling.return=u.return,u=u.sibling}}return!0}function ia(s,u,d,y){u&=~e1,u&=~Pl,s.suspendedLanes|=u,s.pingedLanes&=~u,y&&(s.warmLanes|=u),y=s.expirationTimes;for(var E=u;0<E;){var A=31-$e(E),N=1<<A;y[A]=-1,E&=~N}d!==0&&Ut(s,d,u)}function mm(){return(qt&6)===0?(_d(0),!1):!0}function o1(){if(Rt!==null){if(Xt===0)var s=Rt.return;else s=Rt,Ko=kl=null,w0(s),oc=null,fd=0,s=Rt;for(;s!==null;)SA(s.alternate,s),s=s.return;Rt=null}}function mc(s,u){var d=s.timeoutHandle;d!==-1&&(s.timeoutHandle=-1,h7(d)),d=s.cancelPendingCommit,d!==null&&(s.cancelPendingCommit=null,d()),ss=0,o1(),rn=s,Rt=d=Yo(s.current,null),Dt=u,Xt=0,ei=null,ea=!1,dc=Dn(s,u),J0=!1,hc=ti=e1=Pl=ta=wn=0,Or=Ad=null,t1=!1,(u&8)!==0&&(u|=u&32);var y=s.entangledLanes;if(y!==0)for(s=s.entanglements,y&=u;0<y;){var E=31-$e(y),A=1<<E;u|=s[E],y&=~A}return os=u,Lp(),d}function GA(s,u){gt=null,z.H=vd,u===ic||u===qp?(u=l2(),Xt=3):u===u0?(u=l2(),Xt=4):Xt=u===N0?8:u!==null&&typeof u=="object"&&typeof u.then=="function"?6:1,ei=u,Rt===null&&(wn=1,im(s,Ri(u,s.current)))}function YA(){var s=Zr.current;return s===null?!0:(Dt&4194048)===Dt?Di===null:(Dt&62914560)===Dt||(Dt&536870912)!==0?s===Di:!1}function WA(){var s=z.H;return z.H=vd,s===null?vd:s}function KA(){var s=z.A;return z.A=VB,s}function gm(){wn=4,ea||(Dt&4194048)!==Dt&&Zr.current!==null||(dc=!0),(ta&134217727)===0&&(Pl&134217727)===0||rn===null||ia(rn,Dt,ti,!1)}function s1(s,u,d){var y=qt;qt|=2;var E=WA(),A=KA();(rn!==s||Dt!==u)&&(pm=null,mc(s,u)),u=!1;var N=wn;e:do try{if(Xt!==0&&Rt!==null){var G=Rt,se=ei;switch(Xt){case 8:o1(),N=6;break e;case 3:case 2:case 9:case 6:Zr.current===null&&(u=!0);var xe=Xt;if(Xt=0,ei=null,gc(s,G,se,xe),d&&dc){N=0;break e}break;default:xe=Xt,Xt=0,ei=null,gc(s,G,se,xe)}}WB(),N=wn;break}catch(Te){GA(s,Te)}while(!0);return u&&s.shellSuspendCounter++,Ko=kl=null,qt=y,z.H=E,z.A=A,Rt===null&&(rn=null,Dt=0,Lp()),N}function WB(){for(;Rt!==null;)XA(Rt)}function KB(s,u){var d=qt;qt|=2;var y=WA(),E=KA();rn!==s||Dt!==u?(pm=null,hm=ge()+500,mc(s,u)):dc=Dn(s,u);e:do try{if(Xt!==0&&Rt!==null){u=Rt;var A=ei;t:switch(Xt){case 1:Xt=0,ei=null,gc(s,u,A,1);break;case 2:case 9:if(s2(A)){Xt=0,ei=null,QA(u);break}u=function(){Xt!==2&&Xt!==9||rn!==s||(Xt=7),go(s)},A.then(u,u);break e;case 3:Xt=7;break e;case 4:Xt=5;break e;case 7:s2(A)?(Xt=0,ei=null,QA(u)):(Xt=0,ei=null,gc(s,u,A,7));break;case 5:var N=null;switch(Rt.tag){case 26:N=Rt.memoizedState;case 5:case 27:var G=Rt;if(N?LT(N):G.stateNode.complete){Xt=0,ei=null;var se=G.sibling;if(se!==null)Rt=se;else{var xe=G.return;xe!==null?(Rt=xe,ym(xe)):Rt=null}break t}}Xt=0,ei=null,gc(s,u,A,5);break;case 6:Xt=0,ei=null,gc(s,u,A,6);break;case 8:o1(),wn=6;break e;default:throw Error(r(462))}}XB();break}catch(Te){GA(s,Te)}while(!0);return Ko=kl=null,z.H=y,z.A=E,qt=d,Rt!==null?0:(rn=null,Dt=0,Lp(),wn)}function XB(){for(;Rt!==null&&!Se();)XA(Rt)}function XA(s){var u=xA(s.alternate,s,os);s.memoizedProps=s.pendingProps,u===null?ym(s):Rt=u}function QA(s){var u=s,d=u.alternate;switch(u.tag){case 15:case 0:u=pA(d,u,u.pendingProps,u.type,void 0,Dt);break;case 11:u=pA(d,u,u.pendingProps,u.type.render,u.ref,Dt);break;case 5:w0(u);default:SA(d,u),u=Rt=KR(u,os),u=xA(d,u,os)}s.memoizedProps=s.pendingProps,u===null?ym(s):Rt=u}function gc(s,u,d,y){Ko=kl=null,w0(u),oc=null,fd=0;var E=u.return;try{if(jB(s,E,u,d,Dt)){wn=1,im(s,Ri(d,s.current)),Rt=null;return}}catch(A){if(E!==null)throw Rt=E,A;wn=1,im(s,Ri(d,s.current)),Rt=null;return}u.flags&32768?(Pt||y===1?s=!0:dc||(Dt&536870912)!==0?s=!1:(ea=s=!0,(y===2||y===9||y===3||y===6)&&(y=Zr.current,y!==null&&y.tag===13&&(y.flags|=16384))),ZA(u,s)):ym(u)}function ym(s){var u=s;do{if((u.flags&32768)!==0){ZA(u,ea);return}s=u.return;var d=BB(u.alternate,u,os);if(d!==null){Rt=d;return}if(u=u.sibling,u!==null){Rt=u;return}Rt=u=s}while(u!==null);wn===0&&(wn=5)}function ZA(s,u){do{var d=HB(s.alternate,s);if(d!==null){d.flags&=32767,Rt=d;return}if(d=s.return,d!==null&&(d.flags|=32768,d.subtreeFlags=0,d.deletions=null),!u&&(s=s.sibling,s!==null)){Rt=s;return}Rt=s=d}while(s!==null);wn=6,Rt=null}function JA(s,u,d,y,E,A,N,G,se){s.cancelPendingCommit=null;do bm();while(jn!==0);if((qt&6)!==0)throw Error(r(327));if(u!==null){if(u===s.current)throw Error(r(177));if(A=u.lanes|u.childLanes,A|=Wv,rt(s,d,A,N,G,se),s===rn&&(Rt=rn=null,Dt=0),pc=u,ra=s,ss=d,n1=A,r1=E,HA=y,(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,e7(ye,function(){return iT(),null})):(s.callbackNode=null,s.callbackPriority=0),y=(u.flags&13878)!==0,(u.subtreeFlags&13878)!==0||y){y=z.T,z.T=null,E=j.p,j.p=2,N=qt,qt|=4;try{UB(s,u,d)}finally{qt=N,j.p=E,z.T=y}}jn=1,eT(),tT(),nT()}}function eT(){if(jn===1){jn=0;var s=ra,u=pc,d=(u.flags&13878)!==0;if((u.subtreeFlags&13878)!==0||d){d=z.T,z.T=null;var y=j.p;j.p=2;var E=qt;qt|=4;try{PA(u,s);var A=b1,N=zR(s.containerInfo),G=A.focusedElem,se=A.selectionRange;if(N!==G&&G&&G.ownerDocument&&FR(G.ownerDocument.documentElement,G)){if(se!==null&&Uv(G)){var xe=se.start,Te=se.end;if(Te===void 0&&(Te=xe),"selectionStart"in G)G.selectionStart=xe,G.selectionEnd=Math.min(Te,G.value.length);else{var Oe=G.ownerDocument||document,we=Oe&&Oe.defaultView||window;if(we.getSelection){var Ee=we.getSelection(),He=G.textContent.length,st=Math.min(se.start,He),nn=se.end===void 0?st:Math.min(se.end,He);!Ee.extend&&st>nn&&(N=nn,nn=st,st=N);var he=jR(G,st),ue=jR(G,nn);if(he&&ue&&(Ee.rangeCount!==1||Ee.anchorNode!==he.node||Ee.anchorOffset!==he.offset||Ee.focusNode!==ue.node||Ee.focusOffset!==ue.offset)){var be=Oe.createRange();be.setStart(he.node,he.offset),Ee.removeAllRanges(),st>nn?(Ee.addRange(be),Ee.extend(ue.node,ue.offset)):(be.setEnd(ue.node,ue.offset),Ee.addRange(be))}}}}for(Oe=[],Ee=G;Ee=Ee.parentNode;)Ee.nodeType===1&&Oe.push({element:Ee,left:Ee.scrollLeft,top:Ee.scrollTop});for(typeof G.focus=="function"&&G.focus(),G=0;G<Oe.length;G++){var De=Oe[G];De.element.scrollLeft=De.left,De.element.scrollTop=De.top}}Dm=!!y1,b1=y1=null}finally{qt=E,j.p=y,z.T=d}}s.current=u,jn=2}}function tT(){if(jn===2){jn=0;var s=ra,u=pc,d=(u.flags&8772)!==0;if((u.subtreeFlags&8772)!==0||d){d=z.T,z.T=null;var y=j.p;j.p=2;var E=qt;qt|=4;try{_A(s,u.alternate,u)}finally{qt=E,j.p=y,z.T=d}}jn=3}}function nT(){if(jn===4||jn===3){jn=0,ke();var s=ra,u=pc,d=ss,y=HA;(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?jn=5:(jn=0,pc=ra=null,rT(s,s.pendingLanes));var E=s.pendingLanes;if(E===0&&(na=null),Ki(d),u=u.stateNode,Le&&typeof Le.onCommitFiberRoot=="function")try{Le.onCommitFiberRoot(vt,u,void 0,(u.current.flags&128)===128)}catch{}if(y!==null){u=z.T,E=j.p,j.p=2,z.T=null;try{for(var A=s.onRecoverableError,N=0;N<y.length;N++){var G=y[N];A(G.value,{componentStack:G.stack})}}finally{z.T=u,j.p=E}}(ss&3)!==0&&bm(),go(s),E=s.pendingLanes,(d&261930)!==0&&(E&42)!==0?s===i1?Td++:(Td=0,i1=s):Td=0,_d(0)}}function rT(s,u){(s.pooledCacheLanes&=u)===0&&(u=s.pooledCache,u!=null&&(s.pooledCache=null,ud(u)))}function bm(){return eT(),tT(),nT(),iT()}function iT(){if(jn!==5)return!1;var s=ra,u=n1;n1=0;var d=Ki(ss),y=z.T,E=j.p;try{j.p=32>d?32:d,z.T=null,d=r1,r1=null;var A=ra,N=ss;if(jn=0,pc=ra=null,ss=0,(qt&6)!==0)throw Error(r(331));var G=qt;if(qt|=4,FA(A.current),LA(A,A.current,N,d),qt=G,_d(0,!1),Le&&typeof Le.onPostCommitFiberRoot=="function")try{Le.onPostCommitFiberRoot(vt,A)}catch{}return!0}finally{j.p=E,z.T=y,rT(s,u)}}function oT(s,u,d){u=Ri(d,u),u=L0(s.stateNode,u,2),s=Xs(s,u,2),s!==null&&(Nn(s,2),go(s))}function Qt(s,u,d){if(s.tag===3)oT(s,s,d);else for(;u!==null;){if(u.tag===3){oT(u,s,d);break}else if(u.tag===1){var y=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(na===null||!na.has(y))){s=Ri(d,s),d=sA(2),y=Xs(u,d,2),y!==null&&(aA(d,y,u,s),Nn(y,2),go(y));break}}u=u.return}}function a1(s,u,d){var y=s.pingCache;if(y===null){y=s.pingCache=new GB;var E=new Set;y.set(u,E)}else E=y.get(u),E===void 0&&(E=new Set,y.set(u,E));E.has(d)||(J0=!0,E.add(d),s=QB.bind(null,s,u,d),u.then(s,s))}function QB(s,u,d){var y=s.pingCache;y!==null&&y.delete(u),s.pingedLanes|=s.suspendedLanes&d,s.warmLanes&=~d,rn===s&&(Dt&d)===d&&(wn===4||wn===3&&(Dt&62914560)===Dt&&300>ge()-dm?(qt&2)===0&&mc(s,0):e1|=d,hc===Dt&&(hc=0)),go(s)}function sT(s,u){u===0&&(u=Vn()),s=Sl(s,u),s!==null&&(Nn(s,u),go(s))}function ZB(s){var u=s.memoizedState,d=0;u!==null&&(d=u.retryLane),sT(s,d)}function JB(s,u){var d=0;switch(s.tag){case 31:case 13:var y=s.stateNode,E=s.memoizedState;E!==null&&(d=E.retryLane);break;case 19:y=s.stateNode;break;case 22:y=s.stateNode._retryCache;break;default:throw Error(r(314))}y!==null&&y.delete(u),sT(s,d)}function e7(s,u){return ie(s,u)}var vm=null,yc=null,l1=!1,xm=!1,u1=!1,oa=0;function go(s){s!==yc&&s.next===null&&(yc===null?vm=yc=s:yc=yc.next=s),xm=!0,l1||(l1=!0,n7())}function _d(s,u){if(!u1&&xm){u1=!0;do for(var d=!1,y=vm;y!==null;){if(s!==0){var E=y.pendingLanes;if(E===0)var A=0;else{var N=y.suspendedLanes,G=y.pingedLanes;A=(1<<31-$e(42|s)+1)-1,A&=E&~(N&~G),A=A&201326741?A&201326741|1:A?A|2:0}A!==0&&(d=!0,cT(y,A))}else A=Dt,A=zt(y,y===rn?A:0,y.cancelPendingCommit!==null||y.timeoutHandle!==-1),(A&3)===0||Dn(y,A)||(d=!0,cT(y,A));y=y.next}while(d);u1=!1}}function t7(){aT()}function aT(){xm=l1=!1;var s=0;oa!==0&&d7()&&(s=oa);for(var u=ge(),d=null,y=vm;y!==null;){var E=y.next,A=lT(y,u);A===0?(y.next=null,d===null?vm=E:d.next=E,E===null&&(yc=d)):(d=y,(s!==0||(A&3)!==0)&&(xm=!0)),y=E}jn!==0&&jn!==5||_d(s),oa!==0&&(oa=0)}function lT(s,u){for(var d=s.suspendedLanes,y=s.pingedLanes,E=s.expirationTimes,A=s.pendingLanes&-62914561;0<A;){var N=31-$e(A),G=1<<N,se=E[N];se===-1?((G&d)===0||(G&y)!==0)&&(E[N]=Tr(G,u)):se<=u&&(s.expiredLanes|=G),A&=~G}if(u=rn,d=Dt,d=zt(s,s===u?d:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),y=s.callbackNode,d===0||s===u&&(Xt===2||Xt===9)||s.cancelPendingCommit!==null)return y!==null&&y!==null&&J(y),s.callbackNode=null,s.callbackPriority=0;if((d&3)===0||Dn(s,d)){if(u=d&-d,u===s.callbackPriority)return u;switch(y!==null&&J(y),Ki(d)){case 2:case 8:d=Ce;break;case 32:d=ye;break;case 268435456:d=Pe;break;default:d=ye}return y=uT.bind(null,s),d=ie(d,y),s.callbackPriority=u,s.callbackNode=d,u}return y!==null&&y!==null&&J(y),s.callbackPriority=2,s.callbackNode=null,2}function uT(s,u){if(jn!==0&&jn!==5)return s.callbackNode=null,s.callbackPriority=0,null;var d=s.callbackNode;if(bm()&&s.callbackNode!==d)return null;var y=Dt;return y=zt(s,s===rn?y:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),y===0?null:(qA(s,y,u),lT(s,ge()),s.callbackNode!=null&&s.callbackNode===d?uT.bind(null,s):null)}function cT(s,u){if(bm())return null;qA(s,u,!0)}function n7(){p7(function(){(qt&6)!==0?ie(de,t7):aT()})}function c1(){if(oa===0){var s=nc;s===0&&(s=tt,tt<<=1,(tt&261888)===0&&(tt=256)),oa=s}return oa}function fT(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:Tp(""+s)}function dT(s,u){var d=u.ownerDocument.createElement("input");return d.name=u.name,d.value=u.value,s.id&&d.setAttribute("form",s.id),u.parentNode.insertBefore(d,u),s=new FormData(s),d.parentNode.removeChild(d),s}function r7(s,u,d,y,E){if(u==="submit"&&d&&d.stateNode===E){var A=fT((E[Zn]||null).action),N=y.submitter;N&&(u=(u=N[Zn]||null)?fT(u.formAction):N.getAttribute("formAction"),u!==null&&(A=u,N=null));var G=new $p("action","action",null,y,E);s.push({event:G,listeners:[{instance:null,listener:function(){if(y.defaultPrevented){if(oa!==0){var se=N?dT(E,N):new FormData(E);D0(d,{pending:!0,data:se,method:E.method,action:A},null,se)}}else typeof A=="function"&&(G.preventDefault(),se=N?dT(E,N):new FormData(E),D0(d,{pending:!0,data:se,method:E.method,action:A},A,se))},currentTarget:E}]})}}for(var f1=0;f1<Yv.length;f1++){var d1=Yv[f1],i7=d1.toLowerCase(),o7=d1[0].toUpperCase()+d1.slice(1);Xi(i7,"on"+o7)}Xi(UR,"onAnimationEnd"),Xi(qR,"onAnimationIteration"),Xi(VR,"onAnimationStart"),Xi("dblclick","onDoubleClick"),Xi("focusin","onFocus"),Xi("focusout","onBlur"),Xi(wB,"onTransitionRun"),Xi(SB,"onTransitionStart"),Xi(EB,"onTransitionCancel"),Xi(GR,"onTransitionEnd"),Hu("onMouseEnter",["mouseout","mouseover"]),Hu("onMouseLeave",["mouseout","mouseover"]),Hu("onPointerEnter",["pointerout","pointerover"]),Hu("onPointerLeave",["pointerout","pointerover"]),bl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),bl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),bl("onBeforeInput",["compositionend","keypress","textInput","paste"]),bl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),bl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),bl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Dd="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(" "),s7=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Dd));function hT(s,u){u=(u&4)!==0;for(var d=0;d<s.length;d++){var y=s[d],E=y.event;y=y.listeners;e:{var A=void 0;if(u)for(var N=y.length-1;0<=N;N--){var G=y[N],se=G.instance,xe=G.currentTarget;if(G=G.listener,se!==A&&E.isPropagationStopped())break e;A=G,E.currentTarget=xe;try{A(E)}catch(Te){Ip(Te)}E.currentTarget=null,A=se}else for(N=0;N<y.length;N++){if(G=y[N],se=G.instance,xe=G.currentTarget,G=G.listener,se!==A&&E.isPropagationStopped())break e;A=G,E.currentTarget=xe;try{A(E)}catch(Te){Ip(Te)}E.currentTarget=null,A=se}}}}function At(s,u){var d=u[ju];d===void 0&&(d=u[ju]=new Set);var y=s+"__bubble";d.has(y)||(pT(u,s,2,!1),d.add(y))}function h1(s,u,d){var y=0;u&&(y|=4),pT(d,s,y,u)}var wm="_reactListening"+Math.random().toString(36).slice(2);function p1(s){if(!s[wm]){s[wm]=!0,aR.forEach(function(d){d!=="selectionchange"&&(s7.has(d)||h1(d,!1,s),h1(d,!0,s))});var u=s.nodeType===9?s:s.ownerDocument;u===null||u[wm]||(u[wm]=!0,h1("selectionchange",!1,u))}}function pT(s,u,d,y){switch(UT(u)){case 2:var E=P7;break;case 8:E=I7;break;default:E=_1}d=E.bind(null,u,d,s),E=void 0,!Pv||u!=="touchstart"&&u!=="touchmove"&&u!=="wheel"||(E=!0),y?E!==void 0?s.addEventListener(u,d,{capture:!0,passive:E}):s.addEventListener(u,d,!0):E!==void 0?s.addEventListener(u,d,{passive:E}):s.addEventListener(u,d,!1)}function m1(s,u,d,y,E){var A=y;if((u&1)===0&&(u&2)===0&&y!==null)e:for(;;){if(y===null)return;var N=y.tag;if(N===3||N===4){var G=y.stateNode.containerInfo;if(G===E)break;if(N===4)for(N=y.return;N!==null;){var se=N.tag;if((se===3||se===4)&&N.stateNode.containerInfo===E)return;N=N.return}for(;G!==null;){if(N=Fu(G),N===null)return;if(se=N.tag,se===5||se===6||se===26||se===27){y=A=N;continue e}G=G.parentNode}}y=y.return}vR(function(){var xe=A,Te=$v(d),Oe=[];e:{var we=YR.get(s);if(we!==void 0){var Ee=$p,He=s;switch(s){case"keypress":if(Dp(d)===0)break e;case"keydown":case"keyup":Ee=J8;break;case"focusin":He="focus",Ee=jv;break;case"focusout":He="blur",Ee=jv;break;case"beforeblur":case"afterblur":Ee=jv;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":Ee=SR;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ee=B8;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ee=nB;break;case UR:case qR:case VR:Ee=q8;break;case GR:Ee=iB;break;case"scroll":case"scrollend":Ee=F8;break;case"wheel":Ee=sB;break;case"copy":case"cut":case"paste":Ee=G8;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ee=CR;break;case"toggle":case"beforetoggle":Ee=lB}var st=(u&4)!==0,nn=!st&&(s==="scroll"||s==="scrollend"),he=st?we!==null?we+"Capture":null:we;st=[];for(var ue=xe,be;ue!==null;){var De=ue;if(be=De.stateNode,De=De.tag,De!==5&&De!==26&&De!==27||be===null||he===null||(De=Zf(ue,he),De!=null&&st.push(Md(ue,De,be))),nn)break;ue=ue.return}0<st.length&&(we=new Ee(we,He,null,d,Te),Oe.push({event:we,listeners:st}))}}if((u&7)===0){e:{if(we=s==="mouseover"||s==="pointerover",Ee=s==="mouseout"||s==="pointerout",we&&d!==Mv&&(He=d.relatedTarget||d.fromElement)&&(Fu(He)||He[Uo]))break e;if((Ee||we)&&(we=Te.window===Te?Te:(we=Te.ownerDocument)?we.defaultView||we.parentWindow:window,Ee?(He=d.relatedTarget||d.toElement,Ee=xe,He=He?Fu(He):null,He!==null&&(nn=o(He),st=He.tag,He!==nn||st!==5&&st!==27&&st!==6)&&(He=null)):(Ee=null,He=xe),Ee!==He)){if(st=SR,De="onMouseLeave",he="onMouseEnter",ue="mouse",(s==="pointerout"||s==="pointerover")&&(st=CR,De="onPointerLeave",he="onPointerEnter",ue="pointer"),nn=Ee==null?we:Qf(Ee),be=He==null?we:Qf(He),we=new st(De,ue+"leave",Ee,d,Te),we.target=nn,we.relatedTarget=be,De=null,Fu(Te)===xe&&(st=new st(he,ue+"enter",He,d,Te),st.target=be,st.relatedTarget=nn,De=st),nn=De,Ee&&He)t:{for(st=a7,he=Ee,ue=He,be=0,De=he;De;De=st(De))be++;De=0;for(var nt=ue;nt;nt=st(nt))De++;for(;0<be-De;)he=st(he),be--;for(;0<De-be;)ue=st(ue),De--;for(;be--;){if(he===ue||ue!==null&&he===ue.alternate){st=he;break t}he=st(he),ue=st(ue)}st=null}else st=null;Ee!==null&&mT(Oe,we,Ee,st,!1),He!==null&&nn!==null&&mT(Oe,nn,He,st,!0)}}e:{if(we=xe?Qf(xe):window,Ee=we.nodeName&&we.nodeName.toLowerCase(),Ee==="select"||Ee==="input"&&we.type==="file")var Bt=$R;else if(DR(we))if(OR)Bt=bB;else{Bt=gB;var Xe=mB}else Ee=we.nodeName,!Ee||Ee.toLowerCase()!=="input"||we.type!=="checkbox"&&we.type!=="radio"?xe&&Dv(xe.elementType)&&(Bt=$R):Bt=yB;if(Bt&&(Bt=Bt(s,xe))){MR(Oe,Bt,d,Te);break e}Xe&&Xe(s,we,xe),s==="focusout"&&xe&&we.type==="number"&&xe.memoizedProps.value!=null&&_v(we,"number",we.value)}switch(Xe=xe?Qf(xe):window,s){case"focusin":(DR(Xe)||Xe.contentEditable==="true")&&(Wu=Xe,qv=xe,sd=null);break;case"focusout":sd=qv=Wu=null;break;case"mousedown":Vv=!0;break;case"contextmenu":case"mouseup":case"dragend":Vv=!1,BR(Oe,d,Te);break;case"selectionchange":if(xB)break;case"keydown":case"keyup":BR(Oe,d,Te)}var yt;if(zv)e:{switch(s){case"compositionstart":var Mt="onCompositionStart";break e;case"compositionend":Mt="onCompositionEnd";break e;case"compositionupdate":Mt="onCompositionUpdate";break e}Mt=void 0}else Yu?TR(s,d)&&(Mt="onCompositionEnd"):s==="keydown"&&d.keyCode===229&&(Mt="onCompositionStart");Mt&&(kR&&d.locale!=="ko"&&(Yu||Mt!=="onCompositionStart"?Mt==="onCompositionEnd"&&Yu&&(yt=xR()):(Us=Te,Iv="value"in Us?Us.value:Us.textContent,Yu=!0)),Xe=Sm(xe,Mt),0<Xe.length&&(Mt=new ER(Mt,s,null,d,Te),Oe.push({event:Mt,listeners:Xe}),yt?Mt.data=yt:(yt=_R(d),yt!==null&&(Mt.data=yt)))),(yt=cB?fB(s,d):dB(s,d))&&(Mt=Sm(xe,"onBeforeInput"),0<Mt.length&&(Xe=new ER("onBeforeInput","beforeinput",null,d,Te),Oe.push({event:Xe,listeners:Mt}),Xe.data=yt)),r7(Oe,s,xe,d,Te)}hT(Oe,u)})}function Md(s,u,d){return{instance:s,listener:u,currentTarget:d}}function Sm(s,u){for(var d=u+"Capture",y=[];s!==null;){var E=s,A=E.stateNode;if(E=E.tag,E!==5&&E!==26&&E!==27||A===null||(E=Zf(s,d),E!=null&&y.unshift(Md(s,E,A)),E=Zf(s,u),E!=null&&y.push(Md(s,E,A))),s.tag===3)return y;s=s.return}return[]}function a7(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function mT(s,u,d,y,E){for(var A=u._reactName,N=[];d!==null&&d!==y;){var G=d,se=G.alternate,xe=G.stateNode;if(G=G.tag,se!==null&&se===y)break;G!==5&&G!==26&&G!==27||xe===null||(se=xe,E?(xe=Zf(d,A),xe!=null&&N.unshift(Md(d,xe,se))):E||(xe=Zf(d,A),xe!=null&&N.push(Md(d,xe,se)))),d=d.return}N.length!==0&&s.push({event:u,listeners:N})}var l7=/\r\n?/g,u7=/\u0000|\uFFFD/g;function gT(s){return(typeof s=="string"?s:""+s).replace(l7,`
|
|
50
|
-
`).replace(u7,"")}function yT(s,u){return u=gT(u),gT(s)===u}function tn(s,u,d,y,E,A){switch(d){case"children":typeof y=="string"?u==="body"||u==="textarea"&&y===""||qu(s,y):(typeof y=="number"||typeof y=="bigint")&&u!=="body"&&qu(s,""+y);break;case"className":Rp(s,"class",y);break;case"tabIndex":Rp(s,"tabindex",y);break;case"dir":case"role":case"viewBox":case"width":case"height":Rp(s,d,y);break;case"style":yR(s,y,A);break;case"data":if(u!=="object"){Rp(s,"data",y);break}case"src":case"href":if(y===""&&(u!=="a"||d!=="href")){s.removeAttribute(d);break}if(y==null||typeof y=="function"||typeof y=="symbol"||typeof y=="boolean"){s.removeAttribute(d);break}y=Tp(""+y),s.setAttribute(d,y);break;case"action":case"formAction":if(typeof y=="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 A=="function"&&(d==="formAction"?(u!=="input"&&tn(s,u,"name",E.name,E,null),tn(s,u,"formEncType",E.formEncType,E,null),tn(s,u,"formMethod",E.formMethod,E,null),tn(s,u,"formTarget",E.formTarget,E,null)):(tn(s,u,"encType",E.encType,E,null),tn(s,u,"method",E.method,E,null),tn(s,u,"target",E.target,E,null)));if(y==null||typeof y=="symbol"||typeof y=="boolean"){s.removeAttribute(d);break}y=Tp(""+y),s.setAttribute(d,y);break;case"onClick":y!=null&&(s.onclick=Vo);break;case"onScroll":y!=null&&At("scroll",s);break;case"onScrollEnd":y!=null&&At("scrollend",s);break;case"dangerouslySetInnerHTML":if(y!=null){if(typeof y!="object"||!("__html"in y))throw Error(r(61));if(d=y.__html,d!=null){if(E.children!=null)throw Error(r(60));s.innerHTML=d}}break;case"multiple":s.multiple=y&&typeof y!="function"&&typeof y!="symbol";break;case"muted":s.muted=y&&typeof y!="function"&&typeof y!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(y==null||typeof y=="function"||typeof y=="boolean"||typeof y=="symbol"){s.removeAttribute("xlink:href");break}d=Tp(""+y),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":y!=null&&typeof y!="function"&&typeof y!="symbol"?s.setAttribute(d,""+y):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":y&&typeof y!="function"&&typeof y!="symbol"?s.setAttribute(d,""):s.removeAttribute(d);break;case"capture":case"download":y===!0?s.setAttribute(d,""):y!==!1&&y!=null&&typeof y!="function"&&typeof y!="symbol"?s.setAttribute(d,y):s.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":y!=null&&typeof y!="function"&&typeof y!="symbol"&&!isNaN(y)&&1<=y?s.setAttribute(d,y):s.removeAttribute(d);break;case"rowSpan":case"start":y==null||typeof y=="function"||typeof y=="symbol"||isNaN(y)?s.removeAttribute(d):s.setAttribute(d,y);break;case"popover":At("beforetoggle",s),At("toggle",s),kp(s,"popover",y);break;case"xlinkActuate":qo(s,"http://www.w3.org/1999/xlink","xlink:actuate",y);break;case"xlinkArcrole":qo(s,"http://www.w3.org/1999/xlink","xlink:arcrole",y);break;case"xlinkRole":qo(s,"http://www.w3.org/1999/xlink","xlink:role",y);break;case"xlinkShow":qo(s,"http://www.w3.org/1999/xlink","xlink:show",y);break;case"xlinkTitle":qo(s,"http://www.w3.org/1999/xlink","xlink:title",y);break;case"xlinkType":qo(s,"http://www.w3.org/1999/xlink","xlink:type",y);break;case"xmlBase":qo(s,"http://www.w3.org/XML/1998/namespace","xml:base",y);break;case"xmlLang":qo(s,"http://www.w3.org/XML/1998/namespace","xml:lang",y);break;case"xmlSpace":qo(s,"http://www.w3.org/XML/1998/namespace","xml:space",y);break;case"is":kp(s,"is",y);break;case"innerText":case"textContent":break;default:(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(d=N8.get(d)||d,kp(s,d,y))}}function g1(s,u,d,y,E,A){switch(d){case"style":yR(s,y,A);break;case"dangerouslySetInnerHTML":if(y!=null){if(typeof y!="object"||!("__html"in y))throw Error(r(61));if(d=y.__html,d!=null){if(E.children!=null)throw Error(r(60));s.innerHTML=d}}break;case"children":typeof y=="string"?qu(s,y):(typeof y=="number"||typeof y=="bigint")&&qu(s,""+y);break;case"onScroll":y!=null&&At("scroll",s);break;case"onScrollEnd":y!=null&&At("scrollend",s);break;case"onClick":y!=null&&(s.onclick=Vo);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!lR.hasOwnProperty(d))e:{if(d[0]==="o"&&d[1]==="n"&&(E=d.endsWith("Capture"),u=d.slice(2,E?d.length-7:void 0),A=s[Zn]||null,A=A!=null?A[d]:null,typeof A=="function"&&s.removeEventListener(u,A,E),typeof y=="function")){typeof A!="function"&&A!==null&&(d in s?s[d]=null:s.hasAttribute(d)&&s.removeAttribute(d)),s.addEventListener(u,y,E);break e}d in s?s[d]=y:y===!0?s.setAttribute(d,""):kp(s,d,y)}}}function nr(s,u,d){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":At("error",s),At("load",s);var y=!1,E=!1,A;for(A in d)if(d.hasOwnProperty(A)){var N=d[A];if(N!=null)switch(A){case"src":y=!0;break;case"srcSet":E=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,u));default:tn(s,u,A,N,d,null)}}E&&tn(s,u,"srcSet",d.srcSet,d,null),y&&tn(s,u,"src",d.src,d,null);return;case"input":At("invalid",s);var G=A=N=E=null,se=null,xe=null;for(y in d)if(d.hasOwnProperty(y)){var Te=d[y];if(Te!=null)switch(y){case"name":E=Te;break;case"type":N=Te;break;case"checked":se=Te;break;case"defaultChecked":xe=Te;break;case"value":A=Te;break;case"defaultValue":G=Te;break;case"children":case"dangerouslySetInnerHTML":if(Te!=null)throw Error(r(137,u));break;default:tn(s,u,y,Te,d,null)}}hR(s,A,G,se,xe,N,E,!1);return;case"select":At("invalid",s),y=N=A=null;for(E in d)if(d.hasOwnProperty(E)&&(G=d[E],G!=null))switch(E){case"value":A=G;break;case"defaultValue":N=G;break;case"multiple":y=G;default:tn(s,u,E,G,d,null)}u=A,d=N,s.multiple=!!y,u!=null?Uu(s,!!y,u,!1):d!=null&&Uu(s,!!y,d,!0);return;case"textarea":At("invalid",s),A=E=y=null;for(N in d)if(d.hasOwnProperty(N)&&(G=d[N],G!=null))switch(N){case"value":y=G;break;case"defaultValue":E=G;break;case"children":A=G;break;case"dangerouslySetInnerHTML":if(G!=null)throw Error(r(91));break;default:tn(s,u,N,G,d,null)}mR(s,y,E,A);return;case"option":for(se in d)if(d.hasOwnProperty(se)&&(y=d[se],y!=null))switch(se){case"selected":s.selected=y&&typeof y!="function"&&typeof y!="symbol";break;default:tn(s,u,se,y,d,null)}return;case"dialog":At("beforetoggle",s),At("toggle",s),At("cancel",s),At("close",s);break;case"iframe":case"object":At("load",s);break;case"video":case"audio":for(y=0;y<Dd.length;y++)At(Dd[y],s);break;case"image":At("error",s),At("load",s);break;case"details":At("toggle",s);break;case"embed":case"source":case"link":At("error",s),At("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(xe in d)if(d.hasOwnProperty(xe)&&(y=d[xe],y!=null))switch(xe){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,u));default:tn(s,u,xe,y,d,null)}return;default:if(Dv(u)){for(Te in d)d.hasOwnProperty(Te)&&(y=d[Te],y!==void 0&&g1(s,u,Te,y,d,void 0));return}}for(G in d)d.hasOwnProperty(G)&&(y=d[G],y!=null&&tn(s,u,G,y,d,null))}function c7(s,u,d,y){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var E=null,A=null,N=null,G=null,se=null,xe=null,Te=null;for(Ee in d){var Oe=d[Ee];if(d.hasOwnProperty(Ee)&&Oe!=null)switch(Ee){case"checked":break;case"value":break;case"defaultValue":se=Oe;default:y.hasOwnProperty(Ee)||tn(s,u,Ee,null,y,Oe)}}for(var we in y){var Ee=y[we];if(Oe=d[we],y.hasOwnProperty(we)&&(Ee!=null||Oe!=null))switch(we){case"type":A=Ee;break;case"name":E=Ee;break;case"checked":xe=Ee;break;case"defaultChecked":Te=Ee;break;case"value":N=Ee;break;case"defaultValue":G=Ee;break;case"children":case"dangerouslySetInnerHTML":if(Ee!=null)throw Error(r(137,u));break;default:Ee!==Oe&&tn(s,u,we,Ee,y,Oe)}}Tv(s,N,G,se,xe,Te,A,E);return;case"select":Ee=N=G=we=null;for(A in d)if(se=d[A],d.hasOwnProperty(A)&&se!=null)switch(A){case"value":break;case"multiple":Ee=se;default:y.hasOwnProperty(A)||tn(s,u,A,null,y,se)}for(E in y)if(A=y[E],se=d[E],y.hasOwnProperty(E)&&(A!=null||se!=null))switch(E){case"value":we=A;break;case"defaultValue":G=A;break;case"multiple":N=A;default:A!==se&&tn(s,u,E,A,y,se)}u=G,d=N,y=Ee,we!=null?Uu(s,!!d,we,!1):!!y!=!!d&&(u!=null?Uu(s,!!d,u,!0):Uu(s,!!d,d?[]:"",!1));return;case"textarea":Ee=we=null;for(G in d)if(E=d[G],d.hasOwnProperty(G)&&E!=null&&!y.hasOwnProperty(G))switch(G){case"value":break;case"children":break;default:tn(s,u,G,null,y,E)}for(N in y)if(E=y[N],A=d[N],y.hasOwnProperty(N)&&(E!=null||A!=null))switch(N){case"value":we=E;break;case"defaultValue":Ee=E;break;case"children":break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(r(91));break;default:E!==A&&tn(s,u,N,E,y,A)}pR(s,we,Ee);return;case"option":for(var He in d)if(we=d[He],d.hasOwnProperty(He)&&we!=null&&!y.hasOwnProperty(He))switch(He){case"selected":s.selected=!1;break;default:tn(s,u,He,null,y,we)}for(se in y)if(we=y[se],Ee=d[se],y.hasOwnProperty(se)&&we!==Ee&&(we!=null||Ee!=null))switch(se){case"selected":s.selected=we&&typeof we!="function"&&typeof we!="symbol";break;default:tn(s,u,se,we,y,Ee)}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 st in d)we=d[st],d.hasOwnProperty(st)&&we!=null&&!y.hasOwnProperty(st)&&tn(s,u,st,null,y,we);for(xe in y)if(we=y[xe],Ee=d[xe],y.hasOwnProperty(xe)&&we!==Ee&&(we!=null||Ee!=null))switch(xe){case"children":case"dangerouslySetInnerHTML":if(we!=null)throw Error(r(137,u));break;default:tn(s,u,xe,we,y,Ee)}return;default:if(Dv(u)){for(var nn in d)we=d[nn],d.hasOwnProperty(nn)&&we!==void 0&&!y.hasOwnProperty(nn)&&g1(s,u,nn,void 0,y,we);for(Te in y)we=y[Te],Ee=d[Te],!y.hasOwnProperty(Te)||we===Ee||we===void 0&&Ee===void 0||g1(s,u,Te,we,y,Ee);return}}for(var he in d)we=d[he],d.hasOwnProperty(he)&&we!=null&&!y.hasOwnProperty(he)&&tn(s,u,he,null,y,we);for(Oe in y)we=y[Oe],Ee=d[Oe],!y.hasOwnProperty(Oe)||we===Ee||we==null&&Ee==null||tn(s,u,Oe,we,y,Ee)}function bT(s){switch(s){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function f7(){if(typeof performance.getEntriesByType=="function"){for(var s=0,u=0,d=performance.getEntriesByType("resource"),y=0;y<d.length;y++){var E=d[y],A=E.transferSize,N=E.initiatorType,G=E.duration;if(A&&G&&bT(N)){for(N=0,G=E.responseEnd,y+=1;y<d.length;y++){var se=d[y],xe=se.startTime;if(xe>G)break;var Te=se.transferSize,Oe=se.initiatorType;Te&&bT(Oe)&&(se=se.responseEnd,N+=Te*(se<G?1:(G-xe)/(se-xe)))}if(--y,u+=8*(A+N)/(E.duration/1e3),s++,10<s)break}}if(0<s)return u/s/1e6}return navigator.connection&&(s=navigator.connection.downlink,typeof s=="number")?s:5}var y1=null,b1=null;function Em(s){return s.nodeType===9?s:s.ownerDocument}function vT(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 xT(s,u){if(s===0)switch(u){case"svg":return 1;case"math":return 2;default:return 0}return s===1&&u==="foreignObject"?0:s}function v1(s,u){return s==="textarea"||s==="noscript"||typeof u.children=="string"||typeof u.children=="number"||typeof u.children=="bigint"||typeof u.dangerouslySetInnerHTML=="object"&&u.dangerouslySetInnerHTML!==null&&u.dangerouslySetInnerHTML.__html!=null}var x1=null;function d7(){var s=window.event;return s&&s.type==="popstate"?s===x1?!1:(x1=s,!0):(x1=null,!1)}var wT=typeof setTimeout=="function"?setTimeout:void 0,h7=typeof clearTimeout=="function"?clearTimeout:void 0,ST=typeof Promise=="function"?Promise:void 0,p7=typeof queueMicrotask=="function"?queueMicrotask:typeof ST<"u"?function(s){return ST.resolve(null).then(s).catch(m7)}:wT;function m7(s){setTimeout(function(){throw s})}function sa(s){return s==="head"}function ET(s,u){var d=u,y=0;do{var E=d.nextSibling;if(s.removeChild(d),E&&E.nodeType===8)if(d=E.data,d==="/$"||d==="/&"){if(y===0){s.removeChild(E),wc(u);return}y--}else if(d==="$"||d==="$?"||d==="$~"||d==="$!"||d==="&")y++;else if(d==="html")$d(s.ownerDocument.documentElement);else if(d==="head"){d=s.ownerDocument.head,$d(d);for(var A=d.firstChild;A;){var N=A.nextSibling,G=A.nodeName;A[Xf]||G==="SCRIPT"||G==="STYLE"||G==="LINK"&&A.rel.toLowerCase()==="stylesheet"||d.removeChild(A),A=N}}else d==="body"&&$d(s.ownerDocument.body);d=E}while(d);wc(u)}function CT(s,u){var d=s;s=0;do{var y=d.nextSibling;if(d.nodeType===1?u?(d._stashedDisplay=d.style.display,d.style.display="none"):(d.style.display=d._stashedDisplay||"",d.getAttribute("style")===""&&d.removeAttribute("style")):d.nodeType===3&&(u?(d._stashedText=d.nodeValue,d.nodeValue=""):d.nodeValue=d._stashedText||""),y&&y.nodeType===8)if(d=y.data,d==="/$"){if(s===0)break;s--}else d!=="$"&&d!=="$?"&&d!=="$~"&&d!=="$!"||s++;d=y}while(d)}function w1(s){var u=s.firstChild;for(u&&u.nodeType===10&&(u=u.nextSibling);u;){var d=u;switch(u=u.nextSibling,d.nodeName){case"HTML":case"HEAD":case"BODY":w1(d),Rv(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}s.removeChild(d)}}function g7(s,u,d,y){for(;s.nodeType===1;){var E=d;if(s.nodeName.toLowerCase()!==u.toLowerCase()){if(!y&&(s.nodeName!=="INPUT"||s.type!=="hidden"))break}else if(y){if(!s[Xf])switch(u){case"meta":if(!s.hasAttribute("itemprop"))break;return s;case"link":if(A=s.getAttribute("rel"),A==="stylesheet"&&s.hasAttribute("data-precedence"))break;if(A!==E.rel||s.getAttribute("href")!==(E.href==null||E.href===""?null:E.href)||s.getAttribute("crossorigin")!==(E.crossOrigin==null?null:E.crossOrigin)||s.getAttribute("title")!==(E.title==null?null:E.title))break;return s;case"style":if(s.hasAttribute("data-precedence"))break;return s;case"script":if(A=s.getAttribute("src"),(A!==(E.src==null?null:E.src)||s.getAttribute("type")!==(E.type==null?null:E.type)||s.getAttribute("crossorigin")!==(E.crossOrigin==null?null:E.crossOrigin))&&A&&s.hasAttribute("async")&&!s.hasAttribute("itemprop"))break;return s;default:return s}}else if(u==="input"&&s.type==="hidden"){var A=E.name==null?null:""+E.name;if(E.type==="hidden"&&s.getAttribute("name")===A)return s}else return s;if(s=Mi(s.nextSibling),s===null)break}return null}function y7(s,u,d){if(u==="")return null;for(;s.nodeType!==3;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!d||(s=Mi(s.nextSibling),s===null))return null;return s}function kT(s,u){for(;s.nodeType!==8;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!u||(s=Mi(s.nextSibling),s===null))return null;return s}function S1(s){return s.data==="$?"||s.data==="$~"}function E1(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function b7(s,u){var d=s.ownerDocument;if(s.data==="$~")s._reactRetry=u;else if(s.data!=="$?"||d.readyState!=="loading")u();else{var y=function(){u(),d.removeEventListener("DOMContentLoaded",y)};d.addEventListener("DOMContentLoaded",y),s._reactRetry=y}}function Mi(s){for(;s!=null;s=s.nextSibling){var u=s.nodeType;if(u===1||u===3)break;if(u===8){if(u=s.data,u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"||u==="F!"||u==="F")break;if(u==="/$"||u==="/&")return null}}return s}var C1=null;function RT(s){s=s.nextSibling;for(var u=0;s;){if(s.nodeType===8){var d=s.data;if(d==="/$"||d==="/&"){if(u===0)return Mi(s.nextSibling);u--}else d!=="$"&&d!=="$!"&&d!=="$?"&&d!=="$~"&&d!=="&"||u++}s=s.nextSibling}return null}function AT(s){s=s.previousSibling;for(var u=0;s;){if(s.nodeType===8){var d=s.data;if(d==="$"||d==="$!"||d==="$?"||d==="$~"||d==="&"){if(u===0)return s;u--}else d!=="/$"&&d!=="/&"||u++}s=s.previousSibling}return null}function TT(s,u,d){switch(u=Em(d),s){case"html":if(s=u.documentElement,!s)throw Error(r(452));return s;case"head":if(s=u.head,!s)throw Error(r(453));return s;case"body":if(s=u.body,!s)throw Error(r(454));return s;default:throw Error(r(451))}}function $d(s){for(var u=s.attributes;u.length;)s.removeAttributeNode(u[0]);Rv(s)}var $i=new Map,_T=new Set;function Cm(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var as=j.d;j.d={f:v7,r:x7,D:w7,C:S7,L:E7,m:C7,X:R7,S:k7,M:A7};function v7(){var s=as.f(),u=mm();return s||u}function x7(s){var u=zu(s);u!==null&&u.tag===5&&u.type==="form"?G2(u):as.r(s)}var bc=typeof document>"u"?null:document;function DT(s,u,d){var y=bc;if(y&&typeof u=="string"&&u){var E=Ci(u);E='link[rel="'+s+'"][href="'+E+'"]',typeof d=="string"&&(E+='[crossorigin="'+d+'"]'),_T.has(E)||(_T.add(E),s={rel:s,crossOrigin:d,href:u},y.querySelector(E)===null&&(u=y.createElement("link"),nr(u,"link",s),Gn(u),y.head.appendChild(u)))}}function w7(s){as.D(s),DT("dns-prefetch",s,null)}function S7(s,u){as.C(s,u),DT("preconnect",s,u)}function E7(s,u,d){as.L(s,u,d);var y=bc;if(y&&s&&u){var E='link[rel="preload"][as="'+Ci(u)+'"]';u==="image"&&d&&d.imageSrcSet?(E+='[imagesrcset="'+Ci(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(E+='[imagesizes="'+Ci(d.imageSizes)+'"]')):E+='[href="'+Ci(s)+'"]';var A=E;switch(u){case"style":A=vc(s);break;case"script":A=xc(s)}$i.has(A)||(s=p({rel:"preload",href:u==="image"&&d&&d.imageSrcSet?void 0:s,as:u},d),$i.set(A,s),y.querySelector(E)!==null||u==="style"&&y.querySelector(Od(A))||u==="script"&&y.querySelector(Pd(A))||(u=y.createElement("link"),nr(u,"link",s),Gn(u),y.head.appendChild(u)))}}function C7(s,u){as.m(s,u);var d=bc;if(d&&s){var y=u&&typeof u.as=="string"?u.as:"script",E='link[rel="modulepreload"][as="'+Ci(y)+'"][href="'+Ci(s)+'"]',A=E;switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":A=xc(s)}if(!$i.has(A)&&(s=p({rel:"modulepreload",href:s},u),$i.set(A,s),d.querySelector(E)===null)){switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(Pd(A)))return}y=d.createElement("link"),nr(y,"link",s),Gn(y),d.head.appendChild(y)}}}function k7(s,u,d){as.S(s,u,d);var y=bc;if(y&&s){var E=Bu(y).hoistableStyles,A=vc(s);u=u||"default";var N=E.get(A);if(!N){var G={loading:0,preload:null};if(N=y.querySelector(Od(A)))G.loading=5;else{s=p({rel:"stylesheet",href:s,"data-precedence":u},d),(d=$i.get(A))&&k1(s,d);var se=N=y.createElement("link");Gn(se),nr(se,"link",s),se._p=new Promise(function(xe,Te){se.onload=xe,se.onerror=Te}),se.addEventListener("load",function(){G.loading|=1}),se.addEventListener("error",function(){G.loading|=2}),G.loading|=4,km(N,u,y)}N={type:"stylesheet",instance:N,count:1,state:G},E.set(A,N)}}}function R7(s,u){as.X(s,u);var d=bc;if(d&&s){var y=Bu(d).hoistableScripts,E=xc(s),A=y.get(E);A||(A=d.querySelector(Pd(E)),A||(s=p({src:s,async:!0},u),(u=$i.get(E))&&R1(s,u),A=d.createElement("script"),Gn(A),nr(A,"link",s),d.head.appendChild(A)),A={type:"script",instance:A,count:1,state:null},y.set(E,A))}}function A7(s,u){as.M(s,u);var d=bc;if(d&&s){var y=Bu(d).hoistableScripts,E=xc(s),A=y.get(E);A||(A=d.querySelector(Pd(E)),A||(s=p({src:s,async:!0,type:"module"},u),(u=$i.get(E))&&R1(s,u),A=d.createElement("script"),Gn(A),nr(A,"link",s),d.head.appendChild(A)),A={type:"script",instance:A,count:1,state:null},y.set(E,A))}}function MT(s,u,d,y){var E=(E=fe.current)?Cm(E):null;if(!E)throw Error(r(446));switch(s){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(u=vc(d.href),d=Bu(E).hoistableStyles,y=d.get(u),y||(y={type:"style",instance:null,count:0,state:null},d.set(u,y)),y):{type:"void",instance:null,count:0,state:null};case"link":if(d.rel==="stylesheet"&&typeof d.href=="string"&&typeof d.precedence=="string"){s=vc(d.href);var A=Bu(E).hoistableStyles,N=A.get(s);if(N||(E=E.ownerDocument||E,N={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},A.set(s,N),(A=E.querySelector(Od(s)))&&!A._p&&(N.instance=A,N.state.loading=5),$i.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},$i.set(s,d),A||T7(E,s,d,N.state))),u&&y===null)throw Error(r(528,""));return N}if(u&&y!==null)throw Error(r(529,""));return null;case"script":return u=d.async,d=d.src,typeof d=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=xc(d),d=Bu(E).hoistableScripts,y=d.get(u),y||(y={type:"script",instance:null,count:0,state:null},d.set(u,y)),y):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,s))}}function vc(s){return'href="'+Ci(s)+'"'}function Od(s){return'link[rel="stylesheet"]['+s+"]"}function $T(s){return p({},s,{"data-precedence":s.precedence,precedence:null})}function T7(s,u,d,y){s.querySelector('link[rel="preload"][as="style"]['+u+"]")?y.loading=1:(u=s.createElement("link"),y.preload=u,u.addEventListener("load",function(){return y.loading|=1}),u.addEventListener("error",function(){return y.loading|=2}),nr(u,"link",d),Gn(u),s.head.appendChild(u))}function xc(s){return'[src="'+Ci(s)+'"]'}function Pd(s){return"script[async]"+s}function OT(s,u,d){if(u.count++,u.instance===null)switch(u.type){case"style":var y=s.querySelector('style[data-href~="'+Ci(d.href)+'"]');if(y)return u.instance=y,Gn(y),y;var E=p({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return y=(s.ownerDocument||s).createElement("style"),Gn(y),nr(y,"style",E),km(y,d.precedence,s),u.instance=y;case"stylesheet":E=vc(d.href);var A=s.querySelector(Od(E));if(A)return u.state.loading|=4,u.instance=A,Gn(A),A;y=$T(d),(E=$i.get(E))&&k1(y,E),A=(s.ownerDocument||s).createElement("link"),Gn(A);var N=A;return N._p=new Promise(function(G,se){N.onload=G,N.onerror=se}),nr(A,"link",y),u.state.loading|=4,km(A,d.precedence,s),u.instance=A;case"script":return A=xc(d.src),(E=s.querySelector(Pd(A)))?(u.instance=E,Gn(E),E):(y=d,(E=$i.get(A))&&(y=p({},d),R1(y,E)),s=s.ownerDocument||s,E=s.createElement("script"),Gn(E),nr(E,"link",y),s.head.appendChild(E),u.instance=E);case"void":return null;default:throw Error(r(443,u.type))}else u.type==="stylesheet"&&(u.state.loading&4)===0&&(y=u.instance,u.state.loading|=4,km(y,d.precedence,s));return u.instance}function km(s,u,d){for(var y=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),E=y.length?y[y.length-1]:null,A=E,N=0;N<y.length;N++){var G=y[N];if(G.dataset.precedence===u)A=G;else if(A!==E)break}A?A.parentNode.insertBefore(s,A.nextSibling):(u=d.nodeType===9?d.head:d,u.insertBefore(s,u.firstChild))}function k1(s,u){s.crossOrigin==null&&(s.crossOrigin=u.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=u.referrerPolicy),s.title==null&&(s.title=u.title)}function R1(s,u){s.crossOrigin==null&&(s.crossOrigin=u.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=u.referrerPolicy),s.integrity==null&&(s.integrity=u.integrity)}var Rm=null;function PT(s,u,d){if(Rm===null){var y=new Map,E=Rm=new Map;E.set(d,y)}else E=Rm,y=E.get(d),y||(y=new Map,E.set(d,y));if(y.has(s))return y;for(y.set(s,null),d=d.getElementsByTagName(s),E=0;E<d.length;E++){var A=d[E];if(!(A[Xf]||A[un]||s==="link"&&A.getAttribute("rel")==="stylesheet")&&A.namespaceURI!=="http://www.w3.org/2000/svg"){var N=A.getAttribute(u)||"";N=s+N;var G=y.get(N);G?G.push(A):y.set(N,[A])}}return y}function IT(s,u,d){s=s.ownerDocument||s,s.head.insertBefore(d,u==="title"?s.querySelector("head > title"):null)}function _7(s,u,d){if(d===1||u.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;switch(u.rel){case"stylesheet":return s=u.disabled,typeof u.precedence=="string"&&s==null;default:return!0}case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function LT(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function D7(s,u,d,y){if(d.type==="stylesheet"&&(typeof y.media!="string"||matchMedia(y.media).matches!==!1)&&(d.state.loading&4)===0){if(d.instance===null){var E=vc(y.href),A=u.querySelector(Od(E));if(A){u=A._p,u!==null&&typeof u=="object"&&typeof u.then=="function"&&(s.count++,s=Am.bind(s),u.then(s,s)),d.state.loading|=4,d.instance=A,Gn(A);return}A=u.ownerDocument||u,y=$T(y),(E=$i.get(E))&&k1(y,E),A=A.createElement("link"),Gn(A);var N=A;N._p=new Promise(function(G,se){N.onload=G,N.onerror=se}),nr(A,"link",y),d.instance=A}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(d,u),(u=d.state.preload)&&(d.state.loading&3)===0&&(s.count++,d=Am.bind(s),u.addEventListener("load",d),u.addEventListener("error",d))}}var A1=0;function M7(s,u){return s.stylesheets&&s.count===0&&_m(s,s.stylesheets),0<s.count||0<s.imgCount?function(d){var y=setTimeout(function(){if(s.stylesheets&&_m(s,s.stylesheets),s.unsuspend){var A=s.unsuspend;s.unsuspend=null,A()}},6e4+u);0<s.imgBytes&&A1===0&&(A1=62500*f7());var E=setTimeout(function(){if(s.waitingForImages=!1,s.count===0&&(s.stylesheets&&_m(s,s.stylesheets),s.unsuspend)){var A=s.unsuspend;s.unsuspend=null,A()}},(s.imgBytes>A1?50:800)+u);return s.unsuspend=d,function(){s.unsuspend=null,clearTimeout(y),clearTimeout(E)}}:null}function Am(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)_m(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var Tm=null;function _m(s,u){s.stylesheets=null,s.unsuspend!==null&&(s.count++,Tm=new Map,u.forEach($7,s),Tm=null,Am.call(s))}function $7(s,u){if(!(u.state.loading&4)){var d=Tm.get(s);if(d)var y=d.get(null);else{d=new Map,Tm.set(s,d);for(var E=s.querySelectorAll("link[data-precedence],style[data-precedence]"),A=0;A<E.length;A++){var N=E[A];(N.nodeName==="LINK"||N.getAttribute("media")!=="not all")&&(d.set(N.dataset.precedence,N),y=N)}y&&d.set(null,y)}E=u.instance,N=E.getAttribute("data-precedence"),A=d.get(N)||y,A===y&&d.set(null,E),d.set(N,E),this.count++,y=Am.bind(this),E.addEventListener("load",y),E.addEventListener("error",y),A?A.parentNode.insertBefore(E,A.nextSibling):(s=s.nodeType===9?s.head:s,s.insertBefore(E,s.firstChild)),u.state.loading|=4}}var Id={$$typeof:C,Provider:null,Consumer:null,_currentValue:H,_currentValue2:H,_threadCount:0};function O7(s,u,d,y,E,A,N,G,se){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=Kr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Kr(0),this.hiddenUpdates=Kr(null),this.identifierPrefix=y,this.onUncaughtError=E,this.onCaughtError=A,this.onRecoverableError=N,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=se,this.incompleteTransitions=new Map}function NT(s,u,d,y,E,A,N,G,se,xe,Te,Oe){return s=new O7(s,u,d,N,se,xe,Te,Oe,G),u=1,A===!0&&(u|=24),A=Qr(3,null,null,u),s.current=A,A.stateNode=s,u=s0(),u.refCount++,s.pooledCache=u,u.refCount++,A.memoizedState={element:y,isDehydrated:d,cache:u},c0(A),s}function jT(s){return s?(s=Qu,s):Qu}function FT(s,u,d,y,E,A){E=jT(E),y.context===null?y.context=E:y.pendingContext=E,y=Ks(u),y.payload={element:d},A=A===void 0?null:A,A!==null&&(y.callback=A),d=Xs(s,y,u),d!==null&&(Pr(d,s,u),hd(d,s,u))}function zT(s,u){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var d=s.retryLane;s.retryLane=d!==0&&d<u?d:u}}function T1(s,u){zT(s,u),(s=s.alternate)&&zT(s,u)}function BT(s){if(s.tag===13||s.tag===31){var u=Sl(s,67108864);u!==null&&Pr(u,s,67108864),T1(s,67108864)}}function HT(s){if(s.tag===13||s.tag===31){var u=ni();u=gn(u);var d=Sl(s,u);d!==null&&Pr(d,s,u),T1(s,u)}}var Dm=!0;function P7(s,u,d,y){var E=z.T;z.T=null;var A=j.p;try{j.p=2,_1(s,u,d,y)}finally{j.p=A,z.T=E}}function I7(s,u,d,y){var E=z.T;z.T=null;var A=j.p;try{j.p=8,_1(s,u,d,y)}finally{j.p=A,z.T=E}}function _1(s,u,d,y){if(Dm){var E=D1(y);if(E===null)m1(s,u,y,Mm,d),qT(s,y);else if(N7(E,s,u,d,y))y.stopPropagation();else if(qT(s,y),u&4&&-1<L7.indexOf(s)){for(;E!==null;){var A=zu(E);if(A!==null)switch(A.tag){case 3:if(A=A.stateNode,A.current.memoizedState.isDehydrated){var N=Ot(A.pendingLanes);if(N!==0){var G=A;for(G.pendingLanes|=2,G.entangledLanes|=2;N;){var se=1<<31-$e(N);G.entanglements[1]|=se,N&=~se}go(A),(qt&6)===0&&(hm=ge()+500,_d(0))}}break;case 31:case 13:G=Sl(A,2),G!==null&&Pr(G,A,2),mm(),T1(A,2)}if(A=D1(y),A===null&&m1(s,u,y,Mm,d),A===E)break;E=A}E!==null&&y.stopPropagation()}else m1(s,u,y,null,d)}}function D1(s){return s=$v(s),M1(s)}var Mm=null;function M1(s){if(Mm=null,s=Fu(s),s!==null){var u=o(s);if(u===null)s=null;else{var d=u.tag;if(d===13){if(s=a(u),s!==null)return s;s=null}else if(d===31){if(s=l(u),s!==null)return s;s=null}else if(d===3){if(u.stateNode.current.memoizedState.isDehydrated)return u.tag===3?u.stateNode.containerInfo:null;s=null}else u!==s&&(s=null)}}return Mm=s,null}function UT(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 de:return 2;case Ce:return 8;case ye:case Me:return 32;case Pe:return 268435456;default:return 32}default:return 32}}var $1=!1,aa=null,la=null,ua=null,Ld=new Map,Nd=new Map,ca=[],L7="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 qT(s,u){switch(s){case"focusin":case"focusout":aa=null;break;case"dragenter":case"dragleave":la=null;break;case"mouseover":case"mouseout":ua=null;break;case"pointerover":case"pointerout":Ld.delete(u.pointerId);break;case"gotpointercapture":case"lostpointercapture":Nd.delete(u.pointerId)}}function jd(s,u,d,y,E,A){return s===null||s.nativeEvent!==A?(s={blockedOn:u,domEventName:d,eventSystemFlags:y,nativeEvent:A,targetContainers:[E]},u!==null&&(u=zu(u),u!==null&&BT(u)),s):(s.eventSystemFlags|=y,u=s.targetContainers,E!==null&&u.indexOf(E)===-1&&u.push(E),s)}function N7(s,u,d,y,E){switch(u){case"focusin":return aa=jd(aa,s,u,d,y,E),!0;case"dragenter":return la=jd(la,s,u,d,y,E),!0;case"mouseover":return ua=jd(ua,s,u,d,y,E),!0;case"pointerover":var A=E.pointerId;return Ld.set(A,jd(Ld.get(A)||null,s,u,d,y,E)),!0;case"gotpointercapture":return A=E.pointerId,Nd.set(A,jd(Nd.get(A)||null,s,u,d,y,E)),!0}return!1}function VT(s){var u=Fu(s.target);if(u!==null){var d=o(u);if(d!==null){if(u=d.tag,u===13){if(u=a(d),u!==null){s.blockedOn=u,fo(s.priority,function(){HT(d)});return}}else if(u===31){if(u=l(d),u!==null){s.blockedOn=u,fo(s.priority,function(){HT(d)});return}}else if(u===3&&d.stateNode.current.memoizedState.isDehydrated){s.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}s.blockedOn=null}function $m(s){if(s.blockedOn!==null)return!1;for(var u=s.targetContainers;0<u.length;){var d=D1(s.nativeEvent);if(d===null){d=s.nativeEvent;var y=new d.constructor(d.type,d);Mv=y,d.target.dispatchEvent(y),Mv=null}else return u=zu(d),u!==null&&BT(u),s.blockedOn=d,!1;u.shift()}return!0}function GT(s,u,d){$m(s)&&d.delete(u)}function j7(){$1=!1,aa!==null&&$m(aa)&&(aa=null),la!==null&&$m(la)&&(la=null),ua!==null&&$m(ua)&&(ua=null),Ld.forEach(GT),Nd.forEach(GT)}function Om(s,u){s.blockedOn===u&&(s.blockedOn=null,$1||($1=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,j7)))}var Pm=null;function YT(s){Pm!==s&&(Pm=s,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Pm===s&&(Pm=null);for(var u=0;u<s.length;u+=3){var d=s[u],y=s[u+1],E=s[u+2];if(typeof y!="function"){if(M1(y||d)===null)continue;break}var A=zu(d);A!==null&&(s.splice(u,3),u-=3,D0(A,{pending:!0,data:E,method:d.method,action:y},y,E))}}))}function wc(s){function u(se){return Om(se,s)}aa!==null&&Om(aa,s),la!==null&&Om(la,s),ua!==null&&Om(ua,s),Ld.forEach(u),Nd.forEach(u);for(var d=0;d<ca.length;d++){var y=ca[d];y.blockedOn===s&&(y.blockedOn=null)}for(;0<ca.length&&(d=ca[0],d.blockedOn===null);)VT(d),d.blockedOn===null&&ca.shift();if(d=(s.ownerDocument||s).$$reactFormReplay,d!=null)for(y=0;y<d.length;y+=3){var E=d[y],A=d[y+1],N=E[Zn]||null;if(typeof A=="function")N||YT(d);else if(N){var G=null;if(A&&A.hasAttribute("formAction")){if(E=A,N=A[Zn]||null)G=N.formAction;else if(M1(E)!==null)continue}else G=N.action;typeof G=="function"?d[y+1]=G:(d.splice(y,3),y-=3),YT(d)}}}function WT(){function s(A){A.canIntercept&&A.info==="react-transition"&&A.intercept({handler:function(){return new Promise(function(N){return E=N})},focusReset:"manual",scroll:"manual"})}function u(){E!==null&&(E(),E=null),y||setTimeout(d,20)}function d(){if(!y&&!navigation.transition){var A=navigation.currentEntry;A&&A.url!=null&&navigation.navigate(A.url,{state:A.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var y=!1,E=null;return navigation.addEventListener("navigate",s),navigation.addEventListener("navigatesuccess",u),navigation.addEventListener("navigateerror",u),setTimeout(d,100),function(){y=!0,navigation.removeEventListener("navigate",s),navigation.removeEventListener("navigatesuccess",u),navigation.removeEventListener("navigateerror",u),E!==null&&(E(),E=null)}}}function O1(s){this._internalRoot=s}Im.prototype.render=O1.prototype.render=function(s){var u=this._internalRoot;if(u===null)throw Error(r(409));var d=u.current,y=ni();FT(d,y,s,u,null,null)},Im.prototype.unmount=O1.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var u=s.containerInfo;FT(s.current,2,null,s,null,null),mm(),u[Uo]=null}};function Im(s){this._internalRoot=s}Im.prototype.unstable_scheduleHydration=function(s){if(s){var u=Si();s={blockedOn:null,target:s,priority:u};for(var d=0;d<ca.length&&u!==0&&u<ca[d].priority;d++);ca.splice(d,0,s),d===0&&VT(s)}};var KT=t.version;if(KT!=="19.2.5")throw Error(r(527,KT,"19.2.5"));j.findDOMNode=function(s){var u=s._reactInternals;if(u===void 0)throw typeof s.render=="function"?Error(r(188)):(s=Object.keys(s).join(","),Error(r(268,s)));return s=f(u),s=s!==null?h(s):null,s=s===null?null:s.stateNode,s};var F7={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Lm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Lm.isDisabled&&Lm.supportsFiber)try{vt=Lm.inject(F7),Le=Lm}catch{}}return zd.createRoot=function(s,u){if(!i(s))throw Error(r(299));var d=!1,y="",E=nA,A=rA,N=iA;return u!=null&&(u.unstable_strictMode===!0&&(d=!0),u.identifierPrefix!==void 0&&(y=u.identifierPrefix),u.onUncaughtError!==void 0&&(E=u.onUncaughtError),u.onCaughtError!==void 0&&(A=u.onCaughtError),u.onRecoverableError!==void 0&&(N=u.onRecoverableError)),u=NT(s,1,!1,null,null,d,y,null,E,A,N,WT),s[Uo]=u.current,p1(s),new O1(u)},zd.hydrateRoot=function(s,u,d){if(!i(s))throw Error(r(299));var y=!1,E="",A=nA,N=rA,G=iA,se=null;return d!=null&&(d.unstable_strictMode===!0&&(y=!0),d.identifierPrefix!==void 0&&(E=d.identifierPrefix),d.onUncaughtError!==void 0&&(A=d.onUncaughtError),d.onCaughtError!==void 0&&(N=d.onCaughtError),d.onRecoverableError!==void 0&&(G=d.onRecoverableError),d.formState!==void 0&&(se=d.formState)),u=NT(s,1,!0,u,d??null,y,E,se,A,N,G,WT),u.context=jT(null),d=u.current,y=ni(),y=gn(y),E=Ks(y),E.callback=null,Xs(d,E,y),d=y,u.current.lanes=d,Nn(u,d),go(u),s[Uo]=u.current,p1(s),new Im(u)},zd.version="19.2.5",zd}var a_;function J7(){if(a_)return N1.exports;a_=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(),N1.exports=Z7(),N1.exports}var e9=J7(),Pf=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(){}},Ql,Ca,nf,k3,t9=(k3=class extends Pf{constructor(){super();Ve(this,Ql);Ve(this,Ca);Ve(this,nf);je(this,nf,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){ne(this,Ca)||this.setEventListener(ne(this,nf))}onUnsubscribe(){var t;this.hasListeners()||((t=ne(this,Ca))==null||t.call(this),je(this,Ca,void 0))}setEventListener(t){var n;je(this,nf,t),(n=ne(this,Ca))==null||n.call(this),je(this,Ca,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){ne(this,Ql)!==t&&(je(this,Ql,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof ne(this,Ql)=="boolean"?ne(this,Ql):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ql=new WeakMap,Ca=new WeakMap,nf=new WeakMap,k3),ME=new t9,n9={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ka,_E,R3,r9=(R3=class{constructor(){Ve(this,ka,n9);Ve(this,_E,!1)}setTimeoutProvider(e){je(this,ka,e)}setTimeout(e,t){return ne(this,ka).setTimeout(e,t)}clearTimeout(e){ne(this,ka).clearTimeout(e)}setInterval(e,t){return ne(this,ka).setInterval(e,t)}clearInterval(e){ne(this,ka).clearInterval(e)}},ka=new WeakMap,_E=new WeakMap,R3),ql=new r9;function i9(e){setTimeout(e,0)}var o9=typeof window>"u"||"Deno"in globalThis;function xr(){}function s9(e,t){return typeof e=="function"?e(t):e}function Dw(e){return typeof e=="number"&&e>=0&&e!==1/0}function N3(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ha(e,t){return typeof e=="function"?e(t):e}function ji(e,t){return typeof e=="function"?e(t):e}function l_(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:a,stale:l}=e;if(a){if(r){if(t.queryHash!==$E(a,t.options))return!1}else if(!Ah(t.queryKey,a))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||i&&i!==t.state.fetchStatus||o&&!o(t))}function u_(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(gu(t.options.mutationKey)!==gu(o))return!1}else if(!Ah(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function $E(e,t){return((t==null?void 0:t.queryKeyHashFn)||gu)(e)}function gu(e){return JSON.stringify(e,(t,n)=>Mw(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Ah(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Ah(e[n],t[n])):!1}var a9=Object.prototype.hasOwnProperty;function j3(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=c_(e)&&c_(t);if(!r&&!(Mw(e)&&Mw(t)))return t;const o=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),l=a.length,c=r?new Array(l):{};let f=0;for(let h=0;h<l;h++){const p=r?h:a[h],m=e[p],g=t[p];if(m===g){c[p]=m,(r?h<o:a9.call(e,p))&&f++;continue}if(m===null||g===null||typeof m!="object"||typeof g!="object"){c[p]=g;continue}const b=j3(m,g,n+1);c[p]=b,b===m&&f++}return o===l&&f===o?e:c}function sy(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 c_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Mw(e){if(!f_(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!f_(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function f_(e){return Object.prototype.toString.call(e)==="[object Object]"}function l9(e){return new Promise(t=>{ql.setTimeout(t,e)})}function $w(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?j3(e,t):t}function If(e){return e}function u9(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function c9(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var OE=Symbol();function F3(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===OE?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function PE(e,t){return typeof e=="function"?e(...t):!!e}function f9(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 Th=(()=>{let e=()=>o9;return{isServer(){return e()},setIsServer(t){e=t}}})();function Ow(){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 d9=i9;function h9(){let e=[],t=0,n=l=>{l()},r=l=>{l()},i=d9;const o=l=>{t?e.push(l):i(()=>{n(l)})},a=()=>{const l=e;e=[],l.length&&i(()=>{r(()=>{l.forEach(c=>{n(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||a()}return c},batchCalls:l=>(...c)=>{o(()=>{l(...c)})},schedule:o,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{i=l}}}var Bn=h9(),rf,Ra,of,A3,p9=(A3=class extends Pf{constructor(){super();Ve(this,rf,!0);Ve(this,Ra);Ve(this,of);je(this,of,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(){ne(this,Ra)||this.setEventListener(ne(this,of))}onUnsubscribe(){var t;this.hasListeners()||((t=ne(this,Ra))==null||t.call(this),je(this,Ra,void 0))}setEventListener(t){var n;je(this,of,t),(n=ne(this,Ra))==null||n.call(this),je(this,Ra,t(this.setOnline.bind(this)))}setOnline(t){ne(this,rf)!==t&&(je(this,rf,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return ne(this,rf)}},rf=new WeakMap,Ra=new WeakMap,of=new WeakMap,A3),ay=new p9;function m9(e){return Math.min(1e3*2**e,3e4)}function z3(e){return(e??"online")==="online"?ay.isOnline():!0}var Pw=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function B3(e){let t=!1,n=0,r;const i=Ow(),o=()=>i.status!=="pending",a=v=>{var w;if(!o()){const x=new Pw(v);m(x),(w=e.onCancel)==null||w.call(e,x)}},l=()=>{t=!0},c=()=>{t=!1},f=()=>ME.isFocused()&&(e.networkMode==="always"||ay.isOnline())&&e.canRun(),h=()=>z3(e.networkMode)&&e.canRun(),p=v=>{o()||(r==null||r(),i.resolve(v))},m=v=>{o()||(r==null||r(),i.reject(v))},g=()=>new Promise(v=>{var w;r=x=>{(o()||f())&&v(x)},(w=e.onPause)==null||w.call(e)}).then(()=>{var v;r=void 0,o()||(v=e.onContinue)==null||v.call(e)}),b=()=>{if(o())return;let v;const w=n===0?e.initialPromise:void 0;try{v=w??e.fn()}catch(x){v=Promise.reject(x)}Promise.resolve(v).then(p).catch(x=>{var D;if(o())return;const k=e.retry??(Th.isServer()?0:3),C=e.retryDelay??m9,R=typeof C=="function"?C(n,x):C,_=k===!0||typeof k=="number"&&n<k||typeof k=="function"&&k(n,x);if(t||!_){m(x);return}n++,(D=e.onFail)==null||D.call(e,n,x),l9(R).then(()=>f()?void 0:g()).then(()=>{t?m(x):b()})})};return{promise:i,status:()=>i.status,cancel:a,continue:()=>(r==null||r(),i),cancelRetry:l,continueRetry:c,canStart:h,start:()=>(h()?b():g().then(b),i)}}var Zl,T3,H3=(T3=class{constructor(){Ve(this,Zl)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Dw(this.gcTime)&&je(this,Zl,ql.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Th.isServer()?1/0:300*1e3))}clearGcTimeout(){ne(this,Zl)!==void 0&&(ql.clearTimeout(ne(this,Zl)),je(this,Zl,void 0))}},Zl=new WeakMap,T3),Jl,sf,Li,eu,Wn,Xh,tu,ii,U3,ds,_3,g9=(_3=class extends H3{constructor(t){super();Ve(this,ii);Ve(this,Jl);Ve(this,sf);Ve(this,Li);Ve(this,eu);Ve(this,Wn);Ve(this,Xh);Ve(this,tu);je(this,tu,!1),je(this,Xh,t.defaultOptions),this.setOptions(t.options),this.observers=[],je(this,eu,t.client),je(this,Li,ne(this,eu).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,je(this,Jl,h_(this.options)),this.state=t.state??ne(this,Jl),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=ne(this,Wn))==null?void 0:t.promise}setOptions(t){if(this.options={...ne(this,Xh),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=h_(this.options);n.data!==void 0&&(this.setState(d_(n.data,n.dataUpdatedAt)),je(this,Jl,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&ne(this,Li).remove(this)}setData(t,n){const r=$w(this.state.data,t,this.options);return ht(this,ii,ds).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ht(this,ii,ds).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=ne(this,Wn))==null?void 0:r.promise;return(i=ne(this,Wn))==null||i.cancel(t),n?n.then(xr).catch(xr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return ne(this,Jl)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>ji(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===OE||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Ha(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:!N3(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=ne(this,Wn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=ne(this,Wn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),ne(this,Li).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(ne(this,Wn)&&(ne(this,tu)||ht(this,ii,U3).call(this)?ne(this,Wn).cancel({revert:!0}):ne(this,Wn).cancelRetry()),this.scheduleGc()),ne(this,Li).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ht(this,ii,ds).call(this,{type:"invalidate"})}async fetch(t,n){var c,f,h,p,m,g,b,v,w,x,k,C;if(this.state.fetchStatus!=="idle"&&((c=ne(this,Wn))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(ne(this,Wn))return ne(this,Wn).continueRetry(),ne(this,Wn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const R=this.observers.find(_=>_.options.queryFn);R&&this.setOptions(R.options)}const r=new AbortController,i=R=>{Object.defineProperty(R,"signal",{enumerable:!0,get:()=>(je(this,tu,!0),r.signal)})},o=()=>{const R=F3(this.options,n),D=(()=>{const M={client:ne(this,eu),queryKey:this.queryKey,meta:this.meta};return i(M),M})();return je(this,tu,!1),this.options.persister?this.options.persister(R,D,this):R(D)},l=(()=>{const R={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:ne(this,eu),state:this.state,fetchFn:o};return i(R),R})();(f=this.options.behavior)==null||f.onFetch(l,this),je(this,sf,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=l.fetchOptions)==null?void 0:h.meta))&&ht(this,ii,ds).call(this,{type:"fetch",meta:(p=l.fetchOptions)==null?void 0:p.meta}),je(this,Wn,B3({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,onCancel:R=>{R instanceof Pw&&R.revert&&this.setState({...ne(this,sf),fetchStatus:"idle"}),r.abort()},onFail:(R,_)=>{ht(this,ii,ds).call(this,{type:"failed",failureCount:R,error:_})},onPause:()=>{ht(this,ii,ds).call(this,{type:"pause"})},onContinue:()=>{ht(this,ii,ds).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const R=await ne(this,Wn).start();if(R===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(R),(g=(m=ne(this,Li).config).onSuccess)==null||g.call(m,R,this),(v=(b=ne(this,Li).config).onSettled)==null||v.call(b,R,this.state.error,this),R}catch(R){if(R instanceof Pw){if(R.silent)return ne(this,Wn).promise;if(R.revert){if(this.state.data===void 0)throw R;return this.state.data}}throw ht(this,ii,ds).call(this,{type:"error",error:R}),(x=(w=ne(this,Li).config).onError)==null||x.call(w,R,this),(C=(k=ne(this,Li).config).onSettled)==null||C.call(k,this.state.data,R,this),R}finally{this.scheduleGc()}}},Jl=new WeakMap,sf=new WeakMap,Li=new WeakMap,eu=new WeakMap,Wn=new WeakMap,Xh=new WeakMap,tu=new WeakMap,ii=new WeakSet,U3=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},ds=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,...q3(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,...d_(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return je(this,sf,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),Bn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),ne(this,Li).notify({query:this,type:"updated",action:t})})},_3);function q3(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:z3(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function d_(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function h_(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 Nr,It,Qh,vr,nu,af,gs,Aa,Zh,lf,uf,ru,iu,Ta,cf,Kt,nh,Iw,Lw,Nw,jw,Fw,zw,Bw,V3,D3,y9=(D3=class extends Pf{constructor(t,n){super();Ve(this,Kt);Ve(this,Nr);Ve(this,It);Ve(this,Qh);Ve(this,vr);Ve(this,nu);Ve(this,af);Ve(this,gs);Ve(this,Aa);Ve(this,Zh);Ve(this,lf);Ve(this,uf);Ve(this,ru);Ve(this,iu);Ve(this,Ta);Ve(this,cf,new Set);this.options=n,je(this,Nr,t),je(this,Aa,null),je(this,gs,Ow()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(ne(this,It).addObserver(this),p_(ne(this,It),this.options)?ht(this,Kt,nh).call(this):this.updateResult(),ht(this,Kt,jw).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Hw(ne(this,It),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Hw(ne(this,It),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ht(this,Kt,Fw).call(this),ht(this,Kt,zw).call(this),ne(this,It).removeObserver(this)}setOptions(t){const n=this.options,r=ne(this,It);if(this.options=ne(this,Nr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ji(this.options.enabled,ne(this,It))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ht(this,Kt,Bw).call(this),ne(this,It).setOptions(this.options),n._defaulted&&!sy(this.options,n)&&ne(this,Nr).getQueryCache().notify({type:"observerOptionsUpdated",query:ne(this,It),observer:this});const i=this.hasListeners();i&&m_(ne(this,It),r,this.options,n)&&ht(this,Kt,nh).call(this),this.updateResult(),i&&(ne(this,It)!==r||ji(this.options.enabled,ne(this,It))!==ji(n.enabled,ne(this,It))||Ha(this.options.staleTime,ne(this,It))!==Ha(n.staleTime,ne(this,It)))&&ht(this,Kt,Iw).call(this);const o=ht(this,Kt,Lw).call(this);i&&(ne(this,It)!==r||ji(this.options.enabled,ne(this,It))!==ji(n.enabled,ne(this,It))||o!==ne(this,Ta))&&ht(this,Kt,Nw).call(this,o)}getOptimisticResult(t){const n=ne(this,Nr).getQueryCache().build(ne(this,Nr),t),r=this.createResult(n,t);return v9(this,r)&&(je(this,vr,r),je(this,af,this.options),je(this,nu,ne(this,It).state)),r}getCurrentResult(){return ne(this,vr)}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&&ne(this,gs).status==="pending"&&ne(this,gs).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(t){ne(this,cf).add(t)}getCurrentQuery(){return ne(this,It)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=ne(this,Nr).defaultQueryOptions(t),r=ne(this,Nr).getQueryCache().build(ne(this,Nr),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return ht(this,Kt,nh).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),ne(this,vr)))}createResult(t,n){var U;const r=ne(this,It),i=this.options,o=ne(this,vr),a=ne(this,nu),l=ne(this,af),f=t!==r?t.state:ne(this,Qh),{state:h}=t;let p={...h},m=!1,g;if(n._optimisticResults){const L=this.hasListeners(),I=!L&&p_(t,n),$=L&&m_(t,r,n,i);(I||$)&&(p={...p,...q3(h.data,t.options)}),n._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:b,errorUpdatedAt:v,status:w}=p;g=p.data;let x=!1;if(n.placeholderData!==void 0&&g===void 0&&w==="pending"){let L;o!=null&&o.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData)?(L=o.data,x=!0):L=typeof n.placeholderData=="function"?n.placeholderData((U=ne(this,uf))==null?void 0:U.state.data,ne(this,uf)):n.placeholderData,L!==void 0&&(w="success",g=$w(o==null?void 0:o.data,L,n),m=!0)}if(n.select&&g!==void 0&&!x)if(o&&g===(a==null?void 0:a.data)&&n.select===ne(this,Zh))g=ne(this,lf);else try{je(this,Zh,n.select),g=n.select(g),g=$w(o==null?void 0:o.data,g,n),je(this,lf,g),je(this,Aa,null)}catch(L){je(this,Aa,L)}ne(this,Aa)&&(b=ne(this,Aa),g=ne(this,lf),v=Date.now(),w="error");const k=p.fetchStatus==="fetching",C=w==="pending",R=w==="error",_=C&&k,D=g!==void 0,O={status:w,fetchStatus:p.fetchStatus,isPending:C,isSuccess:w==="success",isError:R,isInitialLoading:_,isLoading:_,data:g,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:k,isRefetching:k&&!C,isLoadingError:R&&!D,isPaused:p.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:R&&D,isStale:IE(t,n),refetch:this.refetch,promise:ne(this,gs),isEnabled:ji(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const L=O.data!==void 0,I=O.status==="error"&&!L,$=F=>{I?F.reject(O.error):L&&F.resolve(O.data)},B=()=>{const F=je(this,gs,O.promise=Ow());$(F)},V=ne(this,gs);switch(V.status){case"pending":t.queryHash===r.queryHash&&$(V);break;case"fulfilled":(I||O.data!==V.value)&&B();break;case"rejected":(!I||O.error!==V.reason)&&B();break}}return O}updateResult(){const t=ne(this,vr),n=this.createResult(ne(this,It),this.options);if(je(this,nu,ne(this,It).state),je(this,af,this.options),ne(this,nu).data!==void 0&&je(this,uf,ne(this,It)),sy(n,t))return;je(this,vr,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,o=typeof i=="function"?i():i;if(o==="all"||!o&&!ne(this,cf).size)return!0;const a=new Set(o??ne(this,cf));return this.options.throwOnError&&a.add("error"),Object.keys(ne(this,vr)).some(l=>{const c=l;return ne(this,vr)[c]!==t[c]&&a.has(c)})};ht(this,Kt,V3).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ht(this,Kt,jw).call(this)}},Nr=new WeakMap,It=new WeakMap,Qh=new WeakMap,vr=new WeakMap,nu=new WeakMap,af=new WeakMap,gs=new WeakMap,Aa=new WeakMap,Zh=new WeakMap,lf=new WeakMap,uf=new WeakMap,ru=new WeakMap,iu=new WeakMap,Ta=new WeakMap,cf=new WeakMap,Kt=new WeakSet,nh=function(t){ht(this,Kt,Bw).call(this);let n=ne(this,It).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(xr)),n},Iw=function(){ht(this,Kt,Fw).call(this);const t=Ha(this.options.staleTime,ne(this,It));if(Th.isServer()||ne(this,vr).isStale||!Dw(t))return;const r=N3(ne(this,vr).dataUpdatedAt,t)+1;je(this,ru,ql.setTimeout(()=>{ne(this,vr).isStale||this.updateResult()},r))},Lw=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(ne(this,It)):this.options.refetchInterval)??!1},Nw=function(t){ht(this,Kt,zw).call(this),je(this,Ta,t),!(Th.isServer()||ji(this.options.enabled,ne(this,It))===!1||!Dw(ne(this,Ta))||ne(this,Ta)===0)&&je(this,iu,ql.setInterval(()=>{(this.options.refetchIntervalInBackground||ME.isFocused())&&ht(this,Kt,nh).call(this)},ne(this,Ta)))},jw=function(){ht(this,Kt,Iw).call(this),ht(this,Kt,Nw).call(this,ht(this,Kt,Lw).call(this))},Fw=function(){ne(this,ru)!==void 0&&(ql.clearTimeout(ne(this,ru)),je(this,ru,void 0))},zw=function(){ne(this,iu)!==void 0&&(ql.clearInterval(ne(this,iu)),je(this,iu,void 0))},Bw=function(){const t=ne(this,Nr).getQueryCache().build(ne(this,Nr),this.options);if(t===ne(this,It))return;const n=ne(this,It);je(this,It,t),je(this,Qh,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},V3=function(t){Bn.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(ne(this,vr))}),ne(this,Nr).getQueryCache().notify({query:ne(this,It),type:"observerResultsUpdated"})})},D3);function b9(e,t){return ji(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function p_(e,t){return b9(e,t)||e.state.data!==void 0&&Hw(e,t,t.refetchOnMount)}function Hw(e,t,n){if(ji(t.enabled,e)!==!1&&Ha(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&IE(e,t)}return!1}function m_(e,t,n,r){return(e!==t||ji(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&IE(e,n)}function IE(e,t){return ji(t.enabled,e)!==!1&&e.isStaleByTime(Ha(t.staleTime,e))}function v9(e,t){return!sy(e.getCurrentResult(),t)}function g_(e){return{onFetch:(t,n)=>{var h,p,m,g,b;const r=t.options,i=(m=(p=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:p.fetchMore)==null?void 0:m.direction,o=((g=t.state.data)==null?void 0:g.pages)||[],a=((b=t.state.data)==null?void 0:b.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const f=async()=>{let v=!1;const w=C=>{f9(C,()=>t.signal,()=>v=!0)},x=F3(t.options,t.fetchOptions),k=async(C,R,_)=>{if(v)return Promise.reject();if(R==null&&C.pages.length)return Promise.resolve(C);const M=(()=>{const I={client:t.client,queryKey:t.queryKey,pageParam:R,direction:_?"backward":"forward",meta:t.options.meta};return w(I),I})(),O=await x(M),{maxPages:U}=t.options,L=_?c9:u9;return{pages:L(C.pages,O,U),pageParams:L(C.pageParams,R,U)}};if(i&&o.length){const C=i==="backward",R=C?x9:y_,_={pages:o,pageParams:a},D=R(r,_);l=await k(_,D,C)}else{const C=e??o.length;do{const R=c===0?a[0]??r.initialPageParam:y_(r,l);if(c>0&&R==null)break;l=await k(l,R),c++}while(c<C)}return l};t.options.persister?t.fetchFn=()=>{var v,w;return(w=(v=t.options).persister)==null?void 0:w.call(v,f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=f}}}function y_(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 x9(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 Jh,Eo,lr,ou,Co,ga,M3,w9=(M3=class extends H3{constructor(t){super();Ve(this,Co);Ve(this,Jh);Ve(this,Eo);Ve(this,lr);Ve(this,ou);je(this,Jh,t.client),this.mutationId=t.mutationId,je(this,lr,t.mutationCache),je(this,Eo,[]),this.state=t.state||G3(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){ne(this,Eo).includes(t)||(ne(this,Eo).push(t),this.clearGcTimeout(),ne(this,lr).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){je(this,Eo,ne(this,Eo).filter(n=>n!==t)),this.scheduleGc(),ne(this,lr).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){ne(this,Eo).length||(this.state.status==="pending"?this.scheduleGc():ne(this,lr).remove(this))}continue(){var t;return((t=ne(this,ou))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,l,c,f,h,p,m,g,b,v,w,x,k,C,R,_,D,M;const n=()=>{ht(this,Co,ga).call(this,{type:"continue"})},r={client:ne(this,Jh),meta:this.options.meta,mutationKey:this.options.mutationKey};je(this,ou,B3({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(O,U)=>{ht(this,Co,ga).call(this,{type:"failed",failureCount:O,error:U})},onPause:()=>{ht(this,Co,ga).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>ne(this,lr).canRun(this)}));const i=this.state.status==="pending",o=!ne(this,ou).canStart();try{if(i)n();else{ht(this,Co,ga).call(this,{type:"pending",variables:t,isPaused:o}),ne(this,lr).config.onMutate&&await ne(this,lr).config.onMutate(t,this,r);const U=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t,r));U!==this.state.context&&ht(this,Co,ga).call(this,{type:"pending",context:U,variables:t,isPaused:o})}const O=await ne(this,ou).start();return await((f=(c=ne(this,lr).config).onSuccess)==null?void 0:f.call(c,O,t,this.state.context,this,r)),await((p=(h=this.options).onSuccess)==null?void 0:p.call(h,O,t,this.state.context,r)),await((g=(m=ne(this,lr).config).onSettled)==null?void 0:g.call(m,O,null,this.state.variables,this.state.context,this,r)),await((v=(b=this.options).onSettled)==null?void 0:v.call(b,O,null,t,this.state.context,r)),ht(this,Co,ga).call(this,{type:"success",data:O}),O}catch(O){try{await((x=(w=ne(this,lr).config).onError)==null?void 0:x.call(w,O,t,this.state.context,this,r))}catch(U){Promise.reject(U)}try{await((C=(k=this.options).onError)==null?void 0:C.call(k,O,t,this.state.context,r))}catch(U){Promise.reject(U)}try{await((_=(R=ne(this,lr).config).onSettled)==null?void 0:_.call(R,void 0,O,this.state.variables,this.state.context,this,r))}catch(U){Promise.reject(U)}try{await((M=(D=this.options).onSettled)==null?void 0:M.call(D,void 0,O,t,this.state.context,r))}catch(U){Promise.reject(U)}throw ht(this,Co,ga).call(this,{type:"error",error:O}),O}finally{ne(this,lr).runNext(this)}}},Jh=new WeakMap,Eo=new WeakMap,lr=new WeakMap,ou=new WeakMap,Co=new WeakSet,ga=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),Bn.batch(()=>{ne(this,Eo).forEach(r=>{r.onMutationUpdate(t)}),ne(this,lr).notify({mutation:this,type:"updated",action:t})})},M3);function G3(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ys,no,ep,$3,S9=($3=class extends Pf{constructor(t={}){super();Ve(this,ys);Ve(this,no);Ve(this,ep);this.config=t,je(this,ys,new Set),je(this,no,new Map),je(this,ep,0)}build(t,n,r){const i=new w9({client:t,mutationCache:this,mutationId:++Nm(this,ep)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){ne(this,ys).add(t);const n=jm(t);if(typeof n=="string"){const r=ne(this,no).get(n);r?r.push(t):ne(this,no).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(ne(this,ys).delete(t)){const n=jm(t);if(typeof n=="string"){const r=ne(this,no).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&ne(this,no).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=jm(t);if(typeof n=="string"){const r=ne(this,no).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=jm(t);if(typeof n=="string"){const i=(r=ne(this,no).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(){Bn.batch(()=>{ne(this,ys).forEach(t=>{this.notify({type:"removed",mutation:t})}),ne(this,ys).clear(),ne(this,no).clear()})}getAll(){return Array.from(ne(this,ys))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>u_(n,r))}findAll(t={}){return this.getAll().filter(n=>u_(t,n))}notify(t){Bn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Bn.batch(()=>Promise.all(t.map(n=>n.continue().catch(xr))))}},ys=new WeakMap,no=new WeakMap,ep=new WeakMap,$3);function jm(e){var t;return(t=e.options.scope)==null?void 0:t.id}var bs,_a,jr,vs,Ds,Lg,Uw,O3,E9=(O3=class extends Pf{constructor(n,r){super();Ve(this,Ds);Ve(this,bs);Ve(this,_a);Ve(this,jr);Ve(this,vs);je(this,bs,n),this.setOptions(r),this.bindMethods(),ht(this,Ds,Lg).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=ne(this,bs).defaultMutationOptions(n),sy(this.options,r)||ne(this,bs).getMutationCache().notify({type:"observerOptionsUpdated",mutation:ne(this,jr),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&gu(r.mutationKey)!==gu(this.options.mutationKey)?this.reset():((i=ne(this,jr))==null?void 0:i.state.status)==="pending"&&ne(this,jr).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=ne(this,jr))==null||n.removeObserver(this)}onMutationUpdate(n){ht(this,Ds,Lg).call(this),ht(this,Ds,Uw).call(this,n)}getCurrentResult(){return ne(this,_a)}reset(){var n;(n=ne(this,jr))==null||n.removeObserver(this),je(this,jr,void 0),ht(this,Ds,Lg).call(this),ht(this,Ds,Uw).call(this)}mutate(n,r){var i;return je(this,vs,r),(i=ne(this,jr))==null||i.removeObserver(this),je(this,jr,ne(this,bs).getMutationCache().build(ne(this,bs),this.options)),ne(this,jr).addObserver(this),ne(this,jr).execute(n)}},bs=new WeakMap,_a=new WeakMap,jr=new WeakMap,vs=new WeakMap,Ds=new WeakSet,Lg=function(){var r;const n=((r=ne(this,jr))==null?void 0:r.state)??G3();je(this,_a,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Uw=function(n){Bn.batch(()=>{var r,i,o,a,l,c,f,h;if(ne(this,vs)&&this.hasListeners()){const p=ne(this,_a).variables,m=ne(this,_a).context,g={client:ne(this,bs),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(i=(r=ne(this,vs)).onSuccess)==null||i.call(r,n.data,p,m,g)}catch(b){Promise.reject(b)}try{(a=(o=ne(this,vs)).onSettled)==null||a.call(o,n.data,null,p,m,g)}catch(b){Promise.reject(b)}}else if((n==null?void 0:n.type)==="error"){try{(c=(l=ne(this,vs)).onError)==null||c.call(l,n.error,p,m,g)}catch(b){Promise.reject(b)}try{(h=(f=ne(this,vs)).onSettled)==null||h.call(f,void 0,n.error,p,m,g)}catch(b){Promise.reject(b)}}}this.listeners.forEach(p=>{p(ne(this,_a))})})},O3),ko,P3,C9=(P3=class extends Pf{constructor(t={}){super();Ve(this,ko);this.config=t,je(this,ko,new Map)}build(t,n,r){const i=n.queryKey,o=n.queryHash??$E(i,n);let a=this.get(o);return a||(a=new g9({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(a)),a}add(t){ne(this,ko).has(t.queryHash)||(ne(this,ko).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=ne(this,ko).get(t.queryHash);n&&(t.destroy(),n===t&&ne(this,ko).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Bn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return ne(this,ko).get(t)}getAll(){return[...ne(this,ko).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>l_(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>l_(t,r)):n}notify(t){Bn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Bn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Bn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},ko=new WeakMap,P3),Sn,Da,Ma,ff,df,$a,hf,pf,I3,k9=(I3=class{constructor(e={}){Ve(this,Sn);Ve(this,Da);Ve(this,Ma);Ve(this,ff);Ve(this,df);Ve(this,$a);Ve(this,hf);Ve(this,pf);je(this,Sn,e.queryCache||new C9),je(this,Da,e.mutationCache||new S9),je(this,Ma,e.defaultOptions||{}),je(this,ff,new Map),je(this,df,new Map),je(this,$a,0)}mount(){Nm(this,$a)._++,ne(this,$a)===1&&(je(this,hf,ME.subscribe(async e=>{e&&(await this.resumePausedMutations(),ne(this,Sn).onFocus())})),je(this,pf,ay.subscribe(async e=>{e&&(await this.resumePausedMutations(),ne(this,Sn).onOnline())})))}unmount(){var e,t;Nm(this,$a)._--,ne(this,$a)===0&&((e=ne(this,hf))==null||e.call(this),je(this,hf,void 0),(t=ne(this,pf))==null||t.call(this),je(this,pf,void 0))}isFetching(e){return ne(this,Sn).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return ne(this,Da).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=ne(this,Sn).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=ne(this,Sn).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Ha(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return ne(this,Sn).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=ne(this,Sn).get(r.queryHash),o=i==null?void 0:i.state.data,a=s9(t,o);if(a!==void 0)return ne(this,Sn).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Bn.batch(()=>ne(this,Sn).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=ne(this,Sn).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=ne(this,Sn);Bn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=ne(this,Sn);return Bn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Bn.batch(()=>ne(this,Sn).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(xr).catch(xr)}invalidateQueries(e,t={}){return Bn.batch(()=>(ne(this,Sn).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=Bn.batch(()=>ne(this,Sn).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(xr)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(xr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=ne(this,Sn).build(this,t);return n.isStaleByTime(Ha(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(xr).catch(xr)}fetchInfiniteQuery(e){return e.behavior=g_(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(xr).catch(xr)}ensureInfiniteQueryData(e){return e.behavior=g_(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ay.isOnline()?ne(this,Da).resumePausedMutations():Promise.resolve()}getQueryCache(){return ne(this,Sn)}getMutationCache(){return ne(this,Da)}getDefaultOptions(){return ne(this,Ma)}setDefaultOptions(e){je(this,Ma,e)}setQueryDefaults(e,t){ne(this,ff).set(gu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...ne(this,ff).values()],n={};return t.forEach(r=>{Ah(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){ne(this,df).set(gu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...ne(this,df).values()],n={};return t.forEach(r=>{Ah(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...ne(this,Ma).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=$E(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===OE&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...ne(this,Ma).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){ne(this,Sn).clear(),ne(this,Da).clear()}},Sn=new WeakMap,Da=new WeakMap,Ma=new WeakMap,ff=new WeakMap,df=new WeakMap,$a=new WeakMap,hf=new WeakMap,pf=new WeakMap,I3),Y3=S.createContext(void 0),LE=e=>{const t=S.useContext(Y3);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},R9=({client:e,children:t})=>(S.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),T.jsx(Y3.Provider,{value:e,children:t})),W3=S.createContext(!1),A9=()=>S.useContext(W3);W3.Provider;function T9(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var _9=S.createContext(T9()),D9=()=>S.useContext(_9),M9=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?PE(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},$9=e=>{S.useEffect(()=>{e.clearReset()},[e])},O9=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||PE(n,[e.error,r])),P9=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))}},I9=(e,t)=>e.isLoading&&e.isFetching&&!t,L9=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,b_=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function N9(e,t,n){var m,g,b,v;const r=A9(),i=D9(),o=LE(),a=o.defaultQueryOptions(e);(g=(m=o.getDefaultOptions().queries)==null?void 0:m._experimental_beforeQuery)==null||g.call(m,a);const l=o.getQueryCache().get(a.queryHash);a._optimisticResults=r?"isRestoring":"optimistic",P9(a),M9(a,i,l),$9(i);const c=!o.getQueryCache().get(a.queryHash),[f]=S.useState(()=>new t(o,a)),h=f.getOptimisticResult(a),p=!r&&e.subscribed!==!1;if(S.useSyncExternalStore(S.useCallback(w=>{const x=p?f.subscribe(Bn.batchCalls(w)):xr;return f.updateResult(),x},[f,p]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),S.useEffect(()=>{f.setOptions(a)},[a,f]),L9(a,h))throw b_(a,f,i);if(O9({result:h,errorResetBoundary:i,throwOnError:a.throwOnError,query:l,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&&!Th.isServer()&&I9(h,r)){const w=c?b_(a,f,i):l==null?void 0:l.promise;w==null||w.catch(xr).finally(()=>{f.updateResult()})}return a.notifyOnChangeProps?h:f.trackResult(h)}function Wi(e,t){return N9(e,y9)}function v_(e,t){const n=LE(),[r]=S.useState(()=>new E9(n,e));S.useEffect(()=>{r.setOptions(e)},[r,e]);const i=S.useSyncExternalStore(S.useCallback(a=>r.subscribe(Bn.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=S.useCallback((a,l)=>{r.mutate(a,l).catch(xr)},[r]);if(i.error&&PE(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}var rh=typeof window<"u"?S.useLayoutEffect:S.useEffect;function B1(e){const t=S.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function j9(e,t,n={},r={}){S.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 F9(e){const t=S.useRef(null);return S.useImperativeHandle(e,()=>t.current,[]),t}var K3=!1;function _h(e){return e[e.length-1]}function z9(e){return typeof e=="function"}function La(e,t){return z9(e)?e(t):e}var B9=Object.prototype.hasOwnProperty,x_=Object.prototype.propertyIsEnumerable,H9=()=>Object.create(null),Il=(e,t)=>Na(e,t,H9);function Na(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;const i=t,o=E_(e)&&E_(i);if(!o&&!(mf(e)&&mf(i)))return i;const a=o?e:w_(e);if(!a)return i;const l=o?i:w_(i);if(!l)return i;const c=a.length,f=l.length,h=o?new Array(f):n();let p=0;for(let m=0;m<f;m++){const g=o?m:l[m],b=e[g],v=i[g];if(b===v){h[g]=b,(o?m<c:B9.call(e,g))&&p++;continue}if(b===null||v===null||typeof b!="object"||typeof v!="object"){h[g]=v;continue}const w=Na(b,v,n,r+1);h[g]=w,w===b&&p++}return c===f&&p===c?e:h}function w_(e){const t=Object.getOwnPropertyNames(e);for(const i of t)if(!x_.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(!x_.call(e,i))return!1;r.push(i)}return r}function mf(e){if(!S_(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!S_(n)||!n.hasOwnProperty("isPrototypeOf"))}function S_(e){return Object.prototype.toString.call(e)==="[object Object]"}function E_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function lu(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(!lu(e[r],t[r],n))return!1;return!0}if(mf(e)&&mf(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)&&!lu(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||!lu(e[a],t[a],n)))return!1;return i===o}return!1}function gf(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 Dh(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function U9(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function C_(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 U9(t)}var q9=["http:","https:","mailto:","tel:"];function ly(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function Bd(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+=C_(e.slice(n,i.index))+i[0],n=t.lastIndex;r=r+C_(n?e.slice(n):e);let o=!1;return r.startsWith("//")&&(o=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:o}}function V9(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function G9(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 Cs(){throw new Error("Invariant failed")}function Mh(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 l=t.get(o);if(l)l.value=a,i(l);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 Vl=4,X3=5;function Y9(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 NE(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 l=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=l,n[4]=l,n[5]=l,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=Y9(o);if(a){const[l,c]=a,f=o.charCodeAt(l+1);if(f===45){if(l+2<o.length&&o.charCodeAt(l+2)===36){const h=l+3,p=c;if(h<p)return n[0]=3,n[1]=t+l,n[2]=t+h,n[3]=t+p,n[4]=t+c+1,n[5]=i,n}}else if(f===36){const h=l+1,p=l+2;return p===c?(n[0]=2,n[1]=t+l,n[2]=t+h,n[3]=t+p,n[4]=t+c+1,n[5]=e.length,n):(n[0]=1,n[1]=t+l,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 bb(e,t,n,r,i,o,a){var c,f,h,p,m,g,b,v,w,x,k,C,R;a==null||a(n);let l=r;{const _=n.fullPath??n.from,D=_.length,M=((c=n.options)==null?void 0:c.caseSensitive)??e,O=!!((h=(f=n.options)==null?void 0:f.params)!=null&&h.parse&&((m=(p=n.options)==null?void 0:p.skipRouteOnParseError)!=null&&m.params));for(;l<D;){const L=NE(_,l,t);let I;const $=l,B=L[5];switch(l=B+1,o++,L[0]){case 0:{const V=_.substring(L[2],L[3]);if(M){const F=(g=i.static)==null?void 0:g.get(V);if(F)I=F;else{i.static??(i.static=new Map);const z=Gl(n.fullPath??n.from);z.parent=i,z.depth=o,I=z,i.static.set(V,z)}}else{const F=V.toLowerCase(),z=(b=i.staticInsensitive)==null?void 0:b.get(F);if(z)I=z;else{i.staticInsensitive??(i.staticInsensitive=new Map);const j=Gl(n.fullPath??n.from);j.parent=i,j.depth=o,I=j,i.staticInsensitive.set(F,j)}}break}case 1:{const V=_.substring($,L[1]),F=_.substring(L[4],B),z=M&&!!(V||F),j=V?z?V:V.toLowerCase():void 0,H=F?z?F:F.toLowerCase():void 0,X=!O&&((v=i.dynamic)==null?void 0:v.find(P=>!P.skipOnParamError&&P.caseSensitive===z&&P.prefix===j&&P.suffix===H));if(X)I=X;else{const P=U1(1,n.fullPath??n.from,z,j,H);I=P,P.depth=o,P.parent=i,i.dynamic??(i.dynamic=[]),i.dynamic.push(P)}break}case 3:{const V=_.substring($,L[1]),F=_.substring(L[4],B),z=M&&!!(V||F),j=V?z?V:V.toLowerCase():void 0,H=F?z?F:F.toLowerCase():void 0,X=!O&&((w=i.optional)==null?void 0:w.find(P=>!P.skipOnParamError&&P.caseSensitive===z&&P.prefix===j&&P.suffix===H));if(X)I=X;else{const P=U1(3,n.fullPath??n.from,z,j,H);I=P,P.parent=i,P.depth=o,i.optional??(i.optional=[]),i.optional.push(P)}break}case 2:{const V=_.substring($,L[1]),F=_.substring(L[4],B),z=M&&!!(V||F),j=V?z?V:V.toLowerCase():void 0,H=F?z?F:F.toLowerCase():void 0,X=U1(2,n.fullPath??n.from,z,j,H);I=X,X.parent=i,X.depth=o,i.wildcard??(i.wildcard=[]),i.wildcard.push(X)}}i=I}if(O&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const L=Gl(n.fullPath??n.from);L.kind=X3,L.parent=i,o++,L.depth=o,i.pathless??(i.pathless=[]),i.pathless.push(L),i=L}const U=(n.path||!n.children)&&!n.isRoot;if(U&&_.endsWith("/")){const L=Gl(n.fullPath??n.from);L.kind=Vl,L.parent=i,o++,L.depth=o,i.index=L,i=L}i.parse=((k=(x=n.options)==null?void 0:x.params)==null?void 0:k.parse)??null,i.skipOnParamError=O,i.parsingPriority=((R=(C=n.options)==null?void 0:C.skipRouteOnParseError)==null?void 0:R.priority)??0,U&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(const _ of n.children)bb(e,t,_,l,i,o,a)}function H1(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 xa(e){var t,n,r;if(e.pathless)for(const i of e.pathless)xa(i);if(e.static)for(const i of e.static.values())xa(i);if(e.staticInsensitive)for(const i of e.staticInsensitive.values())xa(i);if((t=e.dynamic)!=null&&t.length){e.dynamic.sort(H1);for(const i of e.dynamic)xa(i)}if((n=e.optional)!=null&&n.length){e.optional.sort(H1);for(const i of e.optional)xa(i)}if((r=e.wildcard)!=null&&r.length){e.wildcard.sort(H1);for(const i of e.wildcard)xa(i)}}function Gl(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 U1(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 W9(e,t){const n=Gl("/"),r=new Uint16Array(6);for(const i of e)bb(!1,r,i,1,n,0);xa(n),t.masksTree=n,t.flatCache=Mh(1e3)}function K9(e,t){e||(e="/");const n=t.flatCache.get(e);if(n)return n;const r=jE(e,t.masksTree);return t.flatCache.set(e,r),r}function X9(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=Gl("/"),bb(t,new Uint16Array(6),{from:e},1,a,0),i.singleCache.set(o,a)),jE(r,a,n)}function Q9(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=jE(e,t.segmentTree,n)}catch(a){if(a instanceof URIError)o=null;else throw a}return o&&(o.branch=eH(o.route)),t.matchCache.set(r,o),o}function Z9(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function J9(e,t=!1,n){const r=Gl(e.fullPath),i=new Uint16Array(6),o={},a={};let l=0;return bb(t,i,e,1,r,0,c=>{if(n==null||n(c,l),c.id in o&&Cs(),o[c.id]=c,l!==0&&c.path){const f=Z9(c.fullPath);(!a[f]||c.fullPath.endsWith("/"))&&(a[f]=c)}l++}),xa(r),{processedTree:{segmentTree:r,singleCache:Mh(1e3),matchCache:Mh(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:a}}function jE(e,t,n=!1){const r=e.split("/"),i=nH(e,r,t,n);if(!i)return null;const[o]=Q3(e,r,i);return{route:i.node.route,rawParams:o,parsedParams:i.parsedParams}}function Q3(e,t,n){var h,p,m,g,b,v,w,x,k,C;const r=tH(n.node);let i=null;const o=Object.create(null);let a=((h=n.extract)==null?void 0:h.part)??0,l=((p=n.extract)==null?void 0:p.node)??0,c=((m=n.extract)==null?void 0:m.path)??0,f=((g=n.extract)==null?void 0:g.segment)??0;for(;l<r.length;a++,l++,c++,f++){const R=r[l];if(R.kind===Vl)break;if(R.kind===X3){f--,a--,c--;continue}const _=t[a],D=c;if(_&&(c+=_.length),R.kind===1){i??(i=n.node.fullPath.split("/"));const M=i[f],O=((b=R.prefix)==null?void 0:b.length)??0;if(M.charCodeAt(O)===123){const U=((v=R.suffix)==null?void 0:v.length)??0,L=M.substring(O+2,M.length-U-1),I=_.substring(O,_.length-U);o[L]=decodeURIComponent(I)}else{const U=M.substring(1);o[U]=decodeURIComponent(_)}}else if(R.kind===3){if(n.skipped&1<<l){a--,c=D-1;continue}i??(i=n.node.fullPath.split("/"));const M=i[f],O=((w=R.prefix)==null?void 0:w.length)??0,U=((x=R.suffix)==null?void 0:x.length)??0,L=M.substring(O+3,M.length-U-1),I=R.suffix||R.prefix?_.substring(O,_.length-U):_;I&&(o[L]=decodeURIComponent(I))}else if(R.kind===2){const M=R,O=e.substring(D+(((k=M.prefix)==null?void 0:k.length)??0),e.length-(((C=M.suffix)==null?void 0:C.length)??0)),U=decodeURIComponent(O);o["*"]=U,o._splat=U;break}}return n.rawParams&&Object.assign(o,n.rawParams),[o,{part:a,node:l,path:c,segment:f}]}function eH(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function tH(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function nH(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const i=!_h(t),o=i&&e!=="/",a=t.length-(i?1:0),l=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let c=null,f=null,h=null;for(;l.length;){const p=l.pop(),{node:m,index:g,skipped:b,depth:v,statics:w,dynamics:x,optionals:k}=p;let{extract:C,rawParams:R,parsedParams:_}=p;if(m.skipOnParamError){if(!q1(e,t,p))continue;R=p.rawParams,C=p.extract,_=p.parsedParams}r&&m.route&&m.kind!==Vl&&Hd(f,p)&&(f=p);const D=g===a;if(D&&(m.route&&!o&&Hd(h,p)&&(h=p),!m.optional&&!m.wildcard&&!m.index&&!m.pathless))continue;const M=D?void 0:t[g];let O;if(D&&m.index){const U={node:m.index,index:g,skipped:b,depth:v+1,statics:w,dynamics:x,optionals:k,extract:C,rawParams:R,parsedParams:_};let L=!0;if(m.index.skipOnParamError&&(q1(e,t,U)||(L=!1)),L){if(w===a&&!x&&!k&&!b)return U;Hd(h,U)&&(h=U)}}if(m.wildcard&&Hd(c,p))for(const U of m.wildcard){const{prefix:L,suffix:I}=U;if(L&&(D||!(U.caseSensitive?M:O??(O=M.toLowerCase())).startsWith(L)))continue;if(I){if(D)continue;const B=t.slice(g).join("/").slice(-I.length);if((U.caseSensitive?B:B.toLowerCase())!==I)continue}const $={node:U,index:a,skipped:b,depth:v,statics:w,dynamics:x,optionals:k,extract:C,rawParams:R,parsedParams:_};if(!(U.skipOnParamError&&!q1(e,t,$))){c=$;break}}if(m.optional){const U=b|1<<v,L=v+1;for(let I=m.optional.length-1;I>=0;I--){const $=m.optional[I];l.push({node:$,index:g,skipped:U,depth:L,statics:w,dynamics:x,optionals:k,extract:C,rawParams:R,parsedParams:_})}if(!D)for(let I=m.optional.length-1;I>=0;I--){const $=m.optional[I],{prefix:B,suffix:V}=$;if(B||V){const F=$.caseSensitive?M:O??(O=M.toLowerCase());if(B&&!F.startsWith(B)||V&&!F.endsWith(V))continue}l.push({node:$,index:g+1,skipped:b,depth:L,statics:w,dynamics:x,optionals:k+1,extract:C,rawParams:R,parsedParams:_})}}if(!D&&m.dynamic&&M)for(let U=m.dynamic.length-1;U>=0;U--){const L=m.dynamic[U],{prefix:I,suffix:$}=L;if(I||$){const B=L.caseSensitive?M:O??(O=M.toLowerCase());if(I&&!B.startsWith(I)||$&&!B.endsWith($))continue}l.push({node:L,index:g+1,skipped:b,depth:v+1,statics:w,dynamics:x+1,optionals:k,extract:C,rawParams:R,parsedParams:_})}if(!D&&m.staticInsensitive){const U=m.staticInsensitive.get(O??(O=M.toLowerCase()));U&&l.push({node:U,index:g+1,skipped:b,depth:v+1,statics:w+1,dynamics:x,optionals:k,extract:C,rawParams:R,parsedParams:_})}if(!D&&m.static){const U=m.static.get(M);U&&l.push({node:U,index:g+1,skipped:b,depth:v+1,statics:w+1,dynamics:x,optionals:k,extract:C,rawParams:R,parsedParams:_})}if(m.pathless){const U=v+1;for(let L=m.pathless.length-1;L>=0;L--){const I=m.pathless[L];l.push({node:I,index:g,skipped:b,depth:U,statics:w,dynamics:x,optionals:k,extract:C,rawParams:R,parsedParams:_})}}}if(h&&c)return Hd(c,h)?h:c;if(h)return h;if(c)return c;if(r&&f){let p=f.index;for(let g=0;g<f.index;g++)p+=t[g].length;const m=p===e.length?"/":e.slice(p);return f.rawParams??(f.rawParams=Object.create(null)),f.rawParams["**"]=decodeURIComponent(m),f}return null}function q1(e,t,n){try{const[r,i]=Q3(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 Hd(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===Vl)>(e.node.kind===Vl)||t.node.kind===Vl==(e.node.kind===Vl)&&t.depth>e.depth))):!0}function Ng(e){return FE(e.filter(t=>t!==void 0).join("/"))}function FE(e){return e.replace(/\/{2,}/g,"/")}function Z3(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Ua(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function J3(e){return Ua(Z3(e))}function uy(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function rH(e,t,n){return uy(e,n)===uy(t,n)}function iH({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 l;if(o)l=e.split("/");else if(i)l=t.split("/");else{for(l=e.split("/");l.length>1&&_h(l)==="";)l.pop();const p=t.split("/");for(let m=0,g=p.length;m<g;m++){const b=p[m];b===""?m?m===g-1&&l.push(b):l=[b]:b===".."?l.pop():b==="."||l.push(b)}}l.length>1&&(_h(l)===""?n==="never"&&l.pop():n==="always"&&l.push(""));let c,f="";for(let p=0;p<l.length;p++){p>0&&(f+="/");const m=l[p];if(!m)continue;c=NE(m,0,c);const g=c[0];if(g===0){f+=m;continue}const b=c[5],v=m.substring(0,c[1]),w=m.substring(c[4],b),x=m.substring(c[2],c[3]);g===1?f+=v||w?`${v}{$${x}}${w}`:`$${x}`:g===2?f+=v||w?`${v}{$}${w}`:"$":f+=`${v}{-$${x}}${w}`}f=FE(f);const h=f||"/";return a&&r&&r.set(a,h),h}function oH(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 V1(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=>R_(i,n)).join("/"):R_(r,n)}function k_({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 l=0,c,f="";for(;l<a;){const h=l;c=NE(e,h,c);const p=c[5];if(l=p+1,h===p)continue;const m=c[0];if(m===0){f+="/"+e.substring(h,p);continue}if(m===2){const g=t._splat;o._splat=g,o["*"]=g;const b=e.substring(h,c[1]),v=e.substring(c[4],p);if(!g){i=!0,(b||v)&&(f+="/"+b+v);continue}const w=V1("_splat",t,n);f+="/"+b+w+v;continue}if(m===1){const g=e.substring(c[2],c[3]);!i&&!(g in t)&&(i=!0),o[g]=t[g];const b=e.substring(h,c[1]),v=e.substring(c[4],p),w=V1(g,t,n)??"undefined";f+="/"+b+w+v;continue}if(m===3){const g=e.substring(c[2],c[3]),b=t[g];if(b==null)continue;o[g]=b;const v=e.substring(h,c[1]),w=e.substring(c[4],p),x=V1(g,t,n)??"";f+="/"+v+x+w;continue}}return e.endsWith("/")&&(f+="/"),{usedParams:o,interpolatedPath:f||"/",isMissingParams:i}}function R_(e,t){const n=encodeURIComponent(e);return(t==null?void 0:t(n))??n}function mr(e){return(e==null?void 0:e.isNotFound)===!0}function sH(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var aH="tsr-scroll-restoration-v1_3";function lH(){const e=sH();if(!e)return null;let t={};try{const r=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");mf(r)&&(t=r)}catch{}return{get state(){return t},set:r=>{t=La(r,t)||t},persist:()=>{try{e.setItem(aH,JSON.stringify(t))}catch{}}}}var A_=lH(),uH=e=>e.state.__TSR_key||e.href;function cH(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 Fm=!1,Ud="window",T_="data-scroll-restoration-id";function fH(e,t){if(!A_)return;const n=A_;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!n)return;e.isScrollRestorationSetup=!0,Fm=!1;const r=e.options.getScrollRestorationKey||uH,i=new Map;window.history.scrollRestoration="manual";const o=l=>{if(!(Fm||!e.isScrollRestoring))if(l.target===document||l.target===window)i.set(Ud,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const c=l.target;i.set(c,{scrollX:c.scrollLeft||0,scrollY:c.scrollTop||0})}},a=l=>{var f;if(!e.isScrollRestoring||!l||i.size===0||!n)return;const c=(f=n.state)[l]||(f[l]={});for(const[h,p]of i){let m;if(h===Ud)m=Ud;else if(h.isConnected){const g=h.getAttribute(T_);m=g?`[${T_}="${g}"]`:cH(h)}m&&(c[m]=p)}};document.addEventListener("scroll",o,!0),e.subscribe("onBeforeLoad",l=>{a(l.fromLocation?r(l.fromLocation):void 0),i.clear()}),window.addEventListener("pagehide",()=>{a(r(e.stores.resolvedLocation.get()??e.stores.location.get())),n.persist()}),e.subscribe("onRendered",l=>{var p;const c=r(l.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}))){Fm=!0;try{const m=e.isScrollRestoring?n.state[c]:void 0;let g=!1;if(m)for(const b in m){const v=m[b];if(!mf(v))continue;const{scrollX:w,scrollY:x}=v;if(!(!Number.isFinite(w)||!Number.isFinite(x))){if(b===Ud)window.scrollTo({top:x,left:w,behavior:f}),g=!0;else if(b){let k;try{k=document.querySelector(b)}catch{continue}k&&(k.scrollLeft=w,k.scrollTop=x,g=!0)}}}if(!g){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 w=document.getElementById(b);w&&w.scrollIntoView(v)}}else{const v={top:0,left:0,behavior:f};if(window.scrollTo(v),h)for(const w of h){if(w===Ud)continue;const x=typeof w=="function"?w():document.querySelector(w);x&&x.scrollTo(v)}}}}finally{Fm=!1}e.isScrollRestoring&&n.set(m=>(m[c]||(m[c]={}),m))}})}function dH(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 G1(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function hH(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]=G1(i):Array.isArray(o)?o.push(G1(i)):n[r]=[o,G1(i)]}return n}var pH=gH(JSON.parse),mH=yH(JSON.stringify,JSON.parse);function gH(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=hH(t);for(const r in n){const i=n[r];if(typeof i=="string")try{n[r]=e(i)}catch{}}return n}}function yH(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=dH(i,r);return o?`?${o}`:""}}var uu="__root__";function bH(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 Br(e){return e instanceof Response&&!!e.options}function vH(e){return{input:({url:t})=>{for(const n of e)t=qw(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=e4(e[n],t);return t}}}function xH(e){const t=J3(e.basepath),n=`/${t}`,r=`${n}/`,i=e.caseSensitive?n:n.toLowerCase(),o=e.caseSensitive?r:r.toLowerCase();return{input:({url:a})=>{const l=e.caseSensitive?a.pathname:a.pathname.toLowerCase();return l===i?a.pathname="/":l.startsWith(o)&&(a.pathname=a.pathname.slice(n.length)),a},output:({url:a})=>(a.pathname=Ng(["/",t,a.pathname]),a)}}function qw(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 e4(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 wH(e,t){const{createMutableStore:n,createReadonlyStore:r,batch:i,init:o}=t,a=new Map,l=new Map,c=new Map,f=n(e.status),h=n(e.loadedAt),p=n(e.isLoading),m=n(e.isTransitioning),g=n(e.location),b=n(e.resolvedLocation),v=n(e.statusCode),w=n(e.redirect),x=n([]),k=n([]),C=n([]),R=r(()=>Y1(a,x.get())),_=r(()=>Y1(l,k.get())),D=r(()=>Y1(c,C.get())),M=r(()=>x.get()[0]),O=r(()=>x.get().some(j=>{var H;return((H=a.get(j))==null?void 0:H.get().status)==="pending"})),U=r(()=>{var j;return{locationHref:g.get().href,resolvedLocationHref:(j=b.get())==null?void 0:j.href,status:f.get()}}),L=r(()=>({status:f.get(),loadedAt:h.get(),isLoading:p.get(),isTransitioning:m.get(),matches:R.get(),location:g.get(),resolvedLocation:b.get(),statusCode:v.get(),redirect:w.get()})),I=Mh(64);function $(j){let H=I.get(j);return H||(H=r(()=>{const X=x.get();for(const P of X){const K=a.get(P);if(K&&K.routeId===j)return K.get()}}),I.set(j,H)),H}const B={status:f,loadedAt:h,isLoading:p,isTransitioning:m,location:g,resolvedLocation:b,statusCode:v,redirect:w,matchesId:x,pendingIds:k,cachedIds:C,matches:R,pendingMatches:_,cachedMatches:D,firstId:M,hasPending:O,matchRouteDeps:U,matchStores:a,pendingMatchStores:l,cachedMatchStores:c,__store:L,getRouteMatchStore:$,setMatches:V,setPending:F,setCached:z};V(e.matches),o==null||o(B);function V(j){W1(j,a,x,n,i)}function F(j){W1(j,l,k,n,i)}function z(j){W1(j,c,C,n,i)}return B}function Y1(e,t){const n=[];for(const r of t){const i=e.get(r);i&&n.push(i.get())}return n}function W1(e,t,n,r,i){const o=e.map(l=>l.id),a=new Set(o);i(()=>{for(const l of t.keys())a.has(l)||t.delete(l);for(const l of e){const c=t.get(l.id);if(!c){const f=r(l);f.routeId=l.routeId,t.set(l.id,f);continue}c.routeId=l.routeId,c.get()!==l&&c.set(l)}G9(n.get(),o)||n.set(o)})}var Vw=e=>{var t;if(!e.rendered)return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)},SH=e=>e.stores.matchesId.get().some(t=>{var n;return(n=e.stores.matchStores.get(t))==null?void 0:n.get()._forcePending}),vb=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),cu=(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 l=e.router.getMatch(a.id);l&&Object.assign(r,l.__routeContext,l.__beforeLoadContext)}return r},__=(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 l=e.matches[a];if(e.router.looseRoutesById[l.routeId].options.notFoundComponent)return a}return n?o:i},ja=(e,t,n)=>{var r,i,o;if(!(!Br(n)&&!mr(n)))throw Br(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:Br(n)?"redirected":mr(n)?"notFound":a.status==="pending"?"success":a.status,context:cu(e,t.index),isFetching:!1,error:n})),mr(n)&&!n.routeId&&(n.routeId=t.routeId),(o=t._nonReactive.loadPromise)==null||o.resolve()),Br(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n))),n},t4=(e,t)=>{const n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},D_=(e,t,n)=>{const r=cu(e,n);e.updateMatch(t,i=>({...i,context:r}))},qd=(e,t,n,r)=>{var l,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),ja(e,e.router.getMatch(i),n);try{(c=(l=a.options).onError)==null||c.call(l,n)}catch(f){n=f,ja(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&&!Br(n)&&!mr(n)&&(e.serialError??(e.serialError=n))},n4=(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&&!vb(e,t)&&(n.options.loader||n.options.beforeLoad||i4(n))&&typeof i=="number"&&i!==1/0&&(n.options.pendingComponent??((o=e.router.options)==null?void 0:o.defaultPendingComponent))){const a=setTimeout(()=>{Vw(e)},i);r._nonReactive.pendingTimeout=a}},EH=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;n4(e,t,n,r);const i=()=>{const o=e.router.getMatch(t);o.preload&&(o.status==="redirected"||o.status==="notFound")&&ja(e,o,o.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},CH=(e,t,n,r)=>{const i=e.router.getMatch(t);let o=i._nonReactive.loadPromise;i._nonReactive.loadPromise=gf(()=>{o==null||o.resolve(),o=void 0});const{paramsError:a,searchError:l}=i;a&&qd(e,n,a,"PARSE_PARAMS"),l&&qd(e,n,l,"VALIDATE_SEARCH"),n4(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,_=>({..._,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{h(),p()});return}i._nonReactive.beforeLoadPromise=gf();const m={...cu(e,n,!1),...i.__routeContext},{search:g,params:b,cause:v}=i,w=vb(e,t),x={search:g,abortController:c,params:b,preload:w,context:m,location:e.location,navigate:R=>e.router.navigate({...R,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:w?"preload":v,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},k=R=>{if(R===void 0){e.router.batch(()=>{h(),p()});return}(Br(R)||mr(R))&&(h(),qd(e,n,R,"BEFORE_LOAD")),e.router.batch(()=>{h(),e.updateMatch(t,_=>({..._,__beforeLoadContext:R})),p()})};let C;try{if(C=r.options.beforeLoad(x),Dh(C))return h(),C.catch(R=>{qd(e,n,R,"BEFORE_LOAD")}).then(k)}catch(R){h(),qd(e,n,R,"BEFORE_LOAD")}k(C)},kH=(e,t)=>{const{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],o=()=>l(),a=()=>CH(e,n,t,i),l=()=>{if(t4(e,n))return;const c=EH(e,n,i);return Dh(c)?c.then(a):a()};return o()},RH=(e,t,n)=>{var o,a,l,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=(l=n.options).scripts)==null?void 0:c.call(l,i),(h=(f=n.options).headers)==null?void 0:h.call(f,i)]).then(([p,m,g])=>({meta:p==null?void 0:p.meta,links:p==null?void 0:p.links,headScripts:p==null?void 0:p.scripts,headers:g,scripts:m,styles:p==null?void 0:p.styles}))},r4=(e,t,n,r,i)=>{const o=t[r-1],{params:a,loaderDeps:l,abortController:c,cause:f}=e.router.getMatch(n),h=cu(e,r),p=vb(e,n);return{params:a,deps:l,preload:!!p,parentMatchPromise:o,abortController:c,context:h,location:e.location,navigate:m=>e.router.navigate({...m,_fromLocation:e.location}),cause:p?"preload":f,route:i,...e.router.options.additionalContext}},M_=async(e,t,n,r,i)=>{var o,a,l,c,f;try{const h=e.router.getMatch(n);try{(!(K3??e.router.isServer)||h.ssr===!0)&&$h(i);const p=i.options.loader,m=typeof p=="function"?p:p==null?void 0:p.handler,g=m==null?void 0:m(r4(e,t,n,r,i)),b=!!m&&Dh(g);if((b||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||h._nonReactive.minPendingPromise)&&e.updateMatch(n,w=>({...w,isFetching:"loader"})),m){const w=b?await g:g;ja(e,e.router.getMatch(n),w),w!==void 0&&e.updateMatch(n,x=>({...x,loaderData:w}))}i._lazyPromise&&await i._lazyPromise;const v=h._nonReactive.minPendingPromise;v&&await v,i._componentsPromise&&await i._componentsPromise,e.updateMatch(n,w=>({...w,error:void 0,context:cu(e,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(p){let m=p;if((m==null?void 0:m.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:cu(e,r)}));return}const g=h._nonReactive.minPendingPromise;g&&await g,mr(p)&&await((l=(a=i.options.notFoundComponent)==null?void 0:a.preload)==null?void 0:l.call(a)),ja(e,e.router.getMatch(n),p);try{(f=(c=i.options).onError)==null||f.call(c,p)}catch(b){m=b,ja(e,e.router.getMatch(n),b)}!Br(m)&&!mr(m)&&await $h(i,["errorComponent"]),e.updateMatch(n,b=>({...b,error:m,context:cu(e,r),status:"error",isFetching:!1}))}}catch(h){const p=e.router.getMatch(n);p&&(p._nonReactive.loaderPromise=void 0),ja(e,p,h)}},AH=async(e,t,n)=>{var g,b,v,w;async function r(x,k,C,R,_){const D=Date.now()-k.updatedAt,M=x?_.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:_.options.staleTime??e.router.options.defaultStaleTime??0,O=_.options.shouldReload,U=typeof O=="function"?O(r4(e,t,i,n,_)):O,{status:L,invalid:I}=R,$=D>=M&&(!!e.forceStaleReload||R.cause==="enter"||C!==void 0&&C!==R.id);a=L==="success"&&(I||(U??$)),x&&_.options.preload===!1||(a&&!e.sync&&h?(l=!0,(async()=>{var B,V;try{await M_(e,t,i,n,_);const F=e.router.getMatch(i);(B=F._nonReactive.loaderPromise)==null||B.resolve(),(V=F._nonReactive.loadPromise)==null||V.resolve(),F._nonReactive.loaderPromise=void 0,F._nonReactive.loadPromise=void 0}catch(F){Br(F)&&await e.router.navigate(F.options)}})()):L!=="success"||a?await M_(e,t,i,n,_):D_(e,i,n))}const{id:i,routeId:o}=e.matches[n];let a=!1,l=!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(t4(e,i)){if(!e.router.getMatch(i))return e.matches[n];D_(e,i,n)}else{const x=e.router.getMatch(i),k=e.router.stores.matchesId.get()[n],C=((g=k&&e.router.stores.matchStores.get(k)||null)==null?void 0:g.routeId)===o?k:(b=e.router.stores.matches.get().find(_=>_.routeId===o))==null?void 0:b.id,R=vb(e,i);if(x._nonReactive.loaderPromise){if(x.status==="success"&&!e.sync&&!x.preload&&h)return x;await x._nonReactive.loaderPromise;const _=e.router.getMatch(i),D=_._nonReactive.error||_.error;D&&ja(e,_,D),_.status==="pending"&&await r(R,x,C,_,c)}else{const _=R&&!e.router.stores.matchStores.has(i),D=e.router.getMatch(i);D._nonReactive.loaderPromise=gf(),_!==D.preload&&e.updateMatch(i,M=>({...M,preload:_})),await r(R,x,C,D,c)}}const p=e.router.getMatch(i);l||((v=p._nonReactive.loaderPromise)==null||v.resolve(),(w=p._nonReactive.loadPromise)==null||w.resolve(),p._nonReactive.loadPromise=void 0),clearTimeout(p._nonReactive.pendingTimeout),p._nonReactive.pendingTimeout=void 0,l||(p._nonReactive.loaderPromise=void 0),p._nonReactive.dehydrated=void 0;const m=l?p.isFetching:!1;return m!==p.isFetching||p.invalid!==!1?(e.updateMatch(i,x=>({...x,isFetching:m,invalid:!1})),e.router.getMatch(i)):p};async function $_(e){var m,g;const t=e,n=[];SH(t.router)&&Vw(t);let r;for(let b=0;b<t.matches.length;b++){try{const v=kH(t,b);Dh(v)&&await v}catch(v){if(Br(v))throw v;if(mr(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?__(t,r):void 0,a=r&&t.preload?0:o!==void 0?Math.min(o+1,i):i;let l,c;for(let b=0;b<a;b++)n.push(AH(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 w=v.reason;if(Br(w))throw w;mr(w)?l??(l=w):c??(c=w)}if(c!==void 0)throw c}const f=l??(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=__(t,f);b===void 0&&Cs();const v=t.matches[b],w=t.router.looseRoutesById[v.routeId],x=(m=t.router.options)==null?void 0:m.defaultNotFoundComponent;!w.options.notFoundComponent&&x&&(w.options.notFoundComponent=x),f.routeId=v.routeId;const k=v.routeId===t.router.routeTree.id;t.updateMatch(v.id,C=>({...C,...k?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:f},isFetching:!1})),h=b,await $h(w,["notFoundComponent"])}else if(!t.preload){const b=t.matches[0];b.globalNotFound||(g=t.router.getMatch(b.id))!=null&&g.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 $h(b,["errorComponent"])}for(let b=0;b<=h;b++){const{id:v,routeId:w}=t.matches[b],x=t.router.looseRoutesById[w];try{const k=RH(t,v,x);if(k){const C=await k;t.updateMatch(v,R=>({...R,...C}))}}catch(k){console.error(`Error executing head for route ${w}:`,k)}}const p=Vw(t);if(Dh(p)&&await p,f)throw f;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function O_(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 $h(e,t=jg){!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===jg?(()=>{if(e._componentsPromise===void 0){const r=O_(e,jg);r?e._componentsPromise=r.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():O_(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function i4(e){var t;for(const n of jg)if((t=e.options[n])!=null&&t.preload)return!0;return!1}var jg=["component","errorComponent","pendingComponent","notFoundComponent"],qa="__TSR_index",P_="popstate",I_="beforeunload";function TH(e){let t=e.getLocation();const n=new Set,r=a=>{t=e.getLocation(),n.forEach(l=>l({location:t,action:a}))},i=a=>{e.notifyOnIndexChange??!0?r(a):t=e.getLocation()},o=async({task:a,navigateOpts:l,...c})=>{var p,m;if((l==null?void 0:l.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 g of f){const b=cy(c.path,c.state);if(await g.blockerFn({currentLocation:t,nextLocation:b,action:c.type})){(m=e.onBlocked)==null||m.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,l,c)=>{const f=t.state[qa];l=L_(f+1,l),o({task:()=>{e.pushState(a,l),r({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:a,state:l})},replace:(a,l,c)=>{const f=t.state[qa];l=L_(f,l),o({task:()=>{e.replaceState(a,l),r({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:a,state:l})},go:(a,l)=>{o({task:()=>{e.go(a),i({type:"GO",index:a})},navigateOpts:l,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[qa]!==0,createHref:a=>e.createHref(a),block:a=>{var c;if(!e.setBlockers)return()=>{};const l=((c=e.getBlockers)==null?void 0:c.call(e))??[];return e.setBlockers([...l,a]),()=>{var h,p;const f=((h=e.getBlockers)==null?void 0:h.call(e))??[];(p=e.setBlockers)==null||p.call(e,f.filter(m=>m!==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 L_(e,t){t||(t={});const n=zE();return{...t,key:n,__TSR_key:n,[qa]:e}}function _H(e){var O,U;const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let i=[];const o=()=>i,a=L=>i=L,l=(L=>L),c=(()=>cy(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!((O=t.history.state)!=null&&O.__TSR_key)&&!((U=t.history.state)!=null&&U.key)){const L=zE();t.history.replaceState({[qa]:0,key:L,__TSR_key:L},"")}let f=c(),h,p=!1,m=!1,g=!1,b=!1;const v=()=>f;let w,x;const k=()=>{w&&(M._ignoreSubscribers=!0,(w.isPush?t.history.pushState:t.history.replaceState)(w.state,"",w.href),M._ignoreSubscribers=!1,w=void 0,x=void 0,h=void 0)},C=(L,I,$)=>{const B=l(I);x||(h=f),f=cy(I,$),w={href:B,state:$,isPush:(w==null?void 0:w.isPush)||L==="push"},x||(x=Promise.resolve().then(()=>k()))},R=L=>{f=c(),M.notify({type:L})},_=async()=>{if(m){m=!1;return}const L=c(),I=L.state[qa]-f.state[qa],$=I===1,B=I===-1,V=!$&&!B||p;p=!1;const F=V?"GO":B?"BACK":"FORWARD",z=V?{type:"GO",index:I}:{type:B?"BACK":"FORWARD"};if(g)g=!1;else{const j=o();if(typeof document<"u"&&j.length){for(const H of j)if(await H.blockerFn({currentLocation:f,nextLocation:L,action:F})){m=!0,t.history.go(1),M.notify(z);return}}}f=c(),M.notify(z)},D=L=>{if(b){b=!1;return}let I=!1;const $=o();if(typeof document<"u"&&$.length)for(const B of $){const V=B.enableBeforeUnload??!0;if(V===!0){I=!0;break}if(typeof V=="function"&&V()===!0){I=!0;break}}if(I)return L.preventDefault(),L.returnValue=""},M=TH({getLocation:v,getLength:()=>t.history.length,pushState:(L,I)=>C("push",L,I),replaceState:(L,I)=>C("replace",L,I),back:L=>(L&&(g=!0),b=!0,t.history.back()),forward:L=>{L&&(g=!0),b=!0,t.history.forward()},go:L=>{p=!0,t.history.go(L)},createHref:L=>l(L),flush:k,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(I_,D,{capture:!0}),t.removeEventListener(P_,_)},onBlocked:()=>{h&&f!==h&&(f=h)},getBlockers:o,setBlockers:a,notifyOnIndexChange:!1});return t.addEventListener(I_,D,{capture:!0}),t.addEventListener(P_,_),t.history.pushState=function(...L){const I=n.apply(t.history,L);return M._ignoreSubscribers||R("PUSH"),I},t.history.replaceState=function(...L){const I=r.apply(t.history,L);return M._ignoreSubscribers||R("REPLACE"),I},M}function DH(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function cy(e,t){const n=DH(e),r=n.indexOf("#"),i=n.indexOf("?"),o=zE();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||{[qa]:0,key:o,__TSR_key:o}}}function zE(){return(Math.random()+1).toString(36).substring(7)}function zc(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 MH=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=oH(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=_H()),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=Mh(1e3),p=this.buildRouteTree(),this.setRoutes(p)}if(!this.stores&&this.latestLocation){const p=this.getStoreConfig(this);this.batch=p.batch,this.stores=wH(OH(this.latestLocation),p),fH(this)}let l=!1;const c=this.options.basepath??"/",f=this.options.rewrite;if(o||i!==c||a!==f){this.basepath=c;const p=[],m=J3(c);m&&m!=="/"&&p.push(xH({basepath:c})),f&&p.push(f),this.rewrite=p.length===0?void 0:p.length===1?p[0]:vH(p),this.history&&this.updateLatestLocation(),l=!0}l&&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=J9(this.routeTree,this.options.caseSensitive,(r,i)=>{r.init({originalIndex:i})});return this.options.routeMasks&&W9(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:m})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const x=this.options.parseSearch(f),k=this.options.stringifySearch(x);return{href:c+k+h,publicHref:c+k+h,pathname:Bd(c).path,external:!1,searchStr:k,search:Il(r==null?void 0:r.search,x),hash:Bd(h.slice(1)).path,state:Na(r==null?void 0:r.state,m)}}const g=new URL(p,this.origin),b=qw(this.rewrite,g),v=this.options.parseSearch(b.search),w=this.options.stringifySearch(v);return b.search=w,{href:b.href.replace(b.origin,""),publicHref:p,pathname:Bd(b.pathname).path,external:!!this.rewrite&&b.origin!==this.origin,searchStr:w,search:Il(r==null?void 0:r.search,v),hash:Bd(b.hash.slice(1)).path,state:Na(r==null?void 0:r.state,m)}},o=i(n),{__tempLocation:a,__tempKey:l}=o.state;if(a&&(!l||l===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)=>iH({base:n,to:FE(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=>PH({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 L,I;const a=o._fromLocation||this.pendingBuiltLocation||this.latestLocation,l=this.matchRoutesLightweight(a);o.from;const c=o.unsafeRelative==="path"?a.pathname:o.from??l.fullPath,f=this.resolvePathWithBase(c,"."),h=l.search,p=Object.assign(Object.create(null),l.params),m=o.to?this.resolvePathWithBase(f,`${o.to}`):this.resolvePathWithBase(f,"."),g=o.params===!1||o.params===null?Object.create(null):(o.params??!0)===!0?p:Object.assign(p,La(o.params,p)),b=this.getMatchedRoutes(m);let v=b.matchedRoutes;if((!b.foundRoute||b.foundRoute.path!=="/"&&b.routeParams["**"])&&this.options.notFoundRoute&&(v=[...v,this.options.notFoundRoute]),Object.keys(g).length>0)for(const $ of v){const B=((L=$.options.params)==null?void 0:L.stringify)??$.options.stringifyParams;if(B)try{Object.assign(g,B(g))}catch{}}const w=n.leaveParams?m:Bd(k_({path:m,params:g,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let x=h;if(n._includeValidateSearch&&((I=this.options.search)!=null&&I.strict)){const $={};v.forEach(B=>{if(B.options.validateSearch)try{Object.assign($,Fg(B.options.validateSearch,{...$,...x}))}catch{}}),x=$}x=IH({search:x,dest:o,destRoutes:v,_includeValidateSearch:n._includeValidateSearch}),x=Il(h,x);const k=this.options.stringifySearch(x),C=o.hash===!0?a.hash:o.hash?La(o.hash,a.hash):void 0,R=C?`#${C}`:"";let _=o.state===!0?a.state:o.state?La(o.state,a.state):{};_=Na(a.state,_);const D=`${w}${k}${R}`;let M,O,U=!1;if(this.rewrite){const $=new URL(D,this.origin),B=e4(this.rewrite,$);M=$.href.replace($.origin,""),B.origin!==this.origin?(O=B.href,U=!0):O=B.pathname+B.search+B.hash}else M=V9(D),O=M;return{publicHref:O,href:M,pathname:w,search:x,searchStr:k,state:_,hash:C??"",external:U,unmaskOnReload:o.unmaskOnReload}},i=(o={},a)=>{const l=r(o);let c=a?r(a):void 0;if(!c){const f=Object.create(null);if(this.options.routeMasks){const h=K9(l.pathname,this.processedTree);if(h){Object.assign(f,h.rawParams);const{from:p,params:m,...g}=h.route,b=m===!1||m===null?Object.create(null):(m??!0)===!0?f:Object.assign(f,La(m,f));a={from:n.from,...g,params:b},c=r(a)}}}return c&&(l.maskedLocation=c),l};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=lu(i.state,this.latestLocation.state);return c.forEach(h=>{delete i.state[h]}),f},a=Ua(this.latestLocation.href)===Ua(i.href);let l=this.commitLocationPromise;if(this.commitLocationPromise=gf(()=>{l==null||l.resolve(),l=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:l,...c}={})=>{if(l){const p=this.history.location.state.__TSR_index,m=cy(l,{__TSR_index:n?p:p+1}),g=new URL(m.pathname,this.origin);c.to=qw(this.rewrite,g).pathname,c.search=this.options.parseSearch(m.search),c.hash=m.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 l=!1;if(i)try{new URL(`${i}`),l=!0}catch{}if(l&&!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=!l&&o?o:i;if(ly(h,this.protocolAllowlist))return Promise.resolve();if(!a.ignoreBlocker){const p=((f=(c=this.history).getBlockers)==null?void 0:f.call(c))??[];for(const m of p)if(m!=null&&m.blockerFn&&await m.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=zc(h,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...p}),this.emit({type:"onBeforeLoad",...p}),await $_({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 w,x;let m=null,g=null,b=null,v=null;this.batch(()=>{const k=this.stores.pendingMatches.get(),C=k.length,R=this.stores.matches.get();m=C?R.filter(M=>!this.stores.pendingMatchStores.has(M.id)):null;const _=new Set;for(const M of this.stores.pendingMatchStores.values())M.routeId&&_.add(M.routeId);const D=new Set;for(const M of this.stores.matchStores.values())M.routeId&&D.add(M.routeId);g=C?R.filter(M=>!_.has(M.routeId)):null,b=C?k.filter(M=>!D.has(M.routeId)):null,v=C?k.filter(M=>D.has(M.routeId)):R,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),C&&(this.stores.setMatches(k),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...m.filter(M=>M.status!=="error"&&M.status!=="notFound"&&M.status!=="redirected")]),this.clearExpiredCache())});for(const[k,C]of[[g,"onLeave"],[b,"onEnter"],[v,"onStay"]])if(k)for(const R of k)(x=(w=this.looseRoutesById[R.routeId].options)[C])==null||x.call(w,R)})})}})}catch(h){Br(h)?(r=h,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):mr(h)&&(i=h);const p=r?r.status:i?404:this.stores.matches.get().some(m=>m.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 l;this.hasNotFoundMatch()?l=404:this.stores.matches.get().some(c=>c.status==="error")&&(l=500),l!==void 0&&this.stores.statusCode.set(l)},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(),l=typeof r.types=="function"?r.types(zc(o,a)):r.types;if(l===!1){n();return}i={update:n,types:l}}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 l=r(a.get());l.status==="redirected"?this.stores.cachedMatchStores.delete(n)&&this.stores.cachedIds.set(c=>c.filter(f=>f!==n)):a.set(l)}})},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&&ly(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=$h,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()]),l=i.filter(c=>!a.has(c.id));if(l.length){const c=this.stores.cachedMatches.get();this.stores.setCached([...c,...l])}try{return i=await $_({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(Br(c))return c.options.reloadDocument?void 0:await this.preloadRoute({...c.options,_fromLocation:r});mr(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(),l=X9(o.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,a.pathname,this.processedTree);return!l||n.params&&!lu(l.rawParams,n.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?lu(a.search,o.search,{partial:!0})?l.rawParams:!1:l.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??mH,parseSearch:e.parseSearch??pH,protocolAllowlist:e.protocolAllowlist??q9}),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,m;const n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:i,parsedParams:o}=n;let{matchedRoutes:a}=n,l=!1;(r?r.path!=="/"&&i["**"]:Ua(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:l=!0);const c=l?NH(this.options.notFoundMode,a):void 0,f=new Array(a.length),h=new Map;for(const g of this.stores.matchStores.values())g.routeId&&h.set(g.routeId,g.get());for(let g=0;g<a.length;g++){const b=a[g],v=f[g-1];let w,x,k;{const F=(v==null?void 0:v.search)??e.search,z=(v==null?void 0:v._strictSearch)??void 0;try{const j=Fg(b.options.validateSearch,{...F})??void 0;w={...F,...j},x={...z,...j},k=void 0}catch(j){let H=j;if(j instanceof fy||(H=new fy(j.message,{cause:j})),t!=null&&t.throwOnError)throw H;w=F,x={},k=H}}const C=((m=(p=b.options).loaderDeps)==null?void 0:m.call(p,{search:w}))??"",R=C?JSON.stringify(C):"",{interpolatedPath:_,usedParams:D}=k_({path:b.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),M=b.id+_+R,O=this.getMatch(M),U=h.get(b.id),L=(O==null?void 0:O._strictParams)??D;let I;if(!O)try{N_(b,D,o,L)}catch(F){if(mr(F)||Br(F)?I=F:I=new $H(F.message,{cause:F}),t!=null&&t.throwOnError)throw I}Object.assign(i,L);const $=U?"stay":"enter";let B;if(O)B={...O,cause:$,params:(U==null?void 0:U.params)??i,_strictParams:L,search:Il(U?U.search:O.search,w),_strictSearch:x};else{const F=b.options.loader||b.options.beforeLoad||b.lazyFn||i4(b)?"pending":"success";B={id:M,ssr:b.options.ssr,index:g,routeId:b.id,params:(U==null?void 0:U.params)??i,_strictParams:L,pathname:_,updatedAt:Date.now(),search:U?Il(U.search,w):w,_strictSearch:x,searchError:void 0,status:F,isFetching:!1,error:void 0,paramsError:I,__routeContext:void 0,_nonReactive:{loadPromise:gf()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:$,loaderDeps:U?Na(U.loaderDeps,C):C,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:b.options.staticData||{},fullPath:b.fullPath}}t!=null&&t.preload||(B.globalNotFound=c===b.id),B.searchError=k;const V=this.getParentContext(v);B.context={...V,...B.__routeContext,...B.__beforeLoadContext},f[g]=B}for(let g=0;g<f.length;g++){const b=f[g],v=this.looseRoutesById[b.routeId],w=this.getMatch(b.id),x=h.get(b.routeId);if(b.params=x?Il(x.params,i):i,!w){const k=f[g-1],C=this.getParentContext(k);if(v.options.context){const R={deps:b.loaderDeps,params:b.params,context:C??{},location:e,navigate:_=>this.navigate({..._,_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={...C,...b.__routeContext,...b.__beforeLoadContext}}}return f}matchRoutesLightweight(e){var h;const{matchedRoutes:t,routeParams:n,parsedParams:r}=this.getMatchedRoutes(e.pathname),i=_h(t),o={...e.search};for(const p of t)try{Object.assign(o,Fg(p.options.validateSearch,o))}catch{}const a=_h(this.stores.matchesId.get()),l=a&&((h=this.stores.matchStores.get(a))==null?void 0:h.get()),c=l&&l.routeId===i.id&&l.pathname===e.pathname;let f;if(c)f=l.params;else{const p=Object.assign(Object.create(null),n);for(const m of t)try{N_(m,n,r??{},p)}catch{}f=p}return{matchedRoutes:t,fullPath:i.fullPath,search:o,params:f}}},fy=class extends Error{},$H=class extends Error{};function OH(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Fg(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new fy("Async validation not supported");if(n.issues)throw new fy(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 PH({pathname:e,routesById:t,processedTree:n}){const r=Object.create(null),i=Ua(e);let o,a;const l=Q9(i,n,!0);return l&&(o=l.route,Object.assign(r,l.rawParams),a=Object.assign(Object.create(null),l.parsedParams)),{matchedRoutes:(l==null?void 0:l.branch)||[t.__root__],routeParams:r,foundRoute:o,parsedParams:a}}function IH({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return LH(n)(e,t,r??!1)}function LH(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:l,next:c})=>{let f=l;"preSearchFilters"in o.options&&o.options.preSearchFilters&&(f=o.options.preSearchFilters.reduce((p,m)=>m(p),l));const h=c(f);return"postSearchFilters"in o.options&&o.options.postSearchFilters?o.options.postSearchFilters.reduce((p,m)=>m(p),h):h};t.middlewares.push(a)}if(o.options.validateSearch){const a=({search:l,next:c})=>{const f=c(l);if(!t._includeValidateSearch)return f;try{return{...f,...Fg(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:La(a.search,o):{}};t.middlewares.push(n);const r=(o,a,l)=>{if(o>=l.length)return a;const c=l[o];return c({search:a,next:h=>r(o+1,h,l)})};return function(a,l,c){return t.dest=l,t._includeValidateSearch=c,r(0,a,t.middlewares)}}function NH(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 uu}function N_(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 jH="Error preloading route! ☝️",o4=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=uu:this.parentRoute||Cs();let i=r?uu:n==null?void 0:n.path;i&&i!=="/"&&(i=Z3(i));const o=(n==null?void 0:n.id)||i;let a=r?uu:Ng([this.parentRoute.id==="__root__"?"":this.parentRoute.id,o]);i==="__root__"&&(i="/"),a!=="__root__"&&(a=Ng(["/",a]));const l=a==="__root__"?"/":Ng([this.parentRoute.fullPath,i]);this._path=i,this._id=a,this._fullPath=l,this._to=Ua(l)},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=>bH({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.")}},FH=class extends o4{constructor(e){super(e)}};function zH(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 BE(e){const t=e.errorComponent??HE;return T.jsx(BH,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?S.createElement(t,{error:n,reset:r}):e.children})}var BH=class extends S.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 HE({error:e}){const[t,n]=S.useState(!1);return T.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[T.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[T.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),T.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"})]}),T.jsx("div",{style:{height:".25rem"}}),t?T.jsx("div",{children:T.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?T.jsx("code",{children:e.message}):null})}):null]})}function HH({children:e,fallback:t=null}){return s4()?T.jsx(Po.Fragment,{children:e}):T.jsx(Po.Fragment,{children:t})}function s4(){return Po.useSyncExternalStore(UH,()=>!0,()=>!1)}function UH(){return()=>{}}var a4=S.createContext(null);function vi(e){return S.useContext(a4)}var xb=S.createContext(void 0),qH=S.createContext(void 0),bn=(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))(bn||{});function VH({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:o,checkDirty:a,shallowPropagate:l};function r(f,h,p){const m=h.depsTail;if(m!==void 0&&m.dep===f)return;const g=m!==void 0?m.nextDep:h.deps;if(g!==void 0&&g.dep===f){g.version=p,h.depsTail=g;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:m,nextDep:g,prevSub:b,nextSub:void 0};g!==void 0&&(g.prevDep=v),m!==void 0?m.nextDep=v:h.deps=v,b!==void 0?b.nextSub=v:f.subs=v}function i(f,h=f.sub){const p=f.dep,m=f.prevDep,g=f.nextDep,b=f.nextSub,v=f.prevSub;return g!==void 0?g.prevDep=m:h.depsTail=m,m!==void 0?m.nextDep=g:h.deps=g,b!==void 0?b.prevSub=v:p.subsTail=v,v!==void 0?v.nextSub=b:(p.subs=b)===void 0&&n(p),g}function o(f){let h=f.nextSub,p;e:do{const m=f.sub;let g=m.flags;if(g&60?g&12?g&4?!(g&48)&&c(f,m)?(m.flags=g|40,g&=1):g=0:m.flags=g&-9|32:g=0:m.flags=g|32,g&2&&t(m),g&1){const b=m.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,m=0,g=!1;e:do{const b=f.dep,v=b.flags;if(h.flags&16)g=!0;else if((v&17)===17){if(e(b)){const w=b.subs;w.nextSub!==void 0&&l(w),g=!0}}else if((v&33)===33){(f.nextSub!==void 0||f.prevSub!==void 0)&&(p={value:f,prev:p}),f=b.deps,h=b,++m;continue}if(!g){const w=f.nextDep;if(w!==void 0){f=w;continue}}for(;m--;){const w=h.subs,x=w.nextSub!==void 0;if(x?(f=p.value,p=p.prev):f=w,g){if(e(h)){x&&l(w),h=f.sub;continue}g=!1}else h.flags&=-33;h=f.sub;const k=f.nextDep;if(k!==void 0){f=k;continue e}}return g}while(!0)}function l(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 GH(e,t,n){var o,a,l;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:(l=r?e.complete:n)==null?void 0:l.bind(i)}}const Gw=[];let zg=0;const{link:j_,unlink:YH,propagate:WH,checkDirty:l4,shallowPropagate:F_}=VH({update(e){return e._update()},notify(e){Gw[Yw++]=e,e.flags&=~bn.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=bn.Mutable|bn.Dirty,dy(e))}});let zm=0,Yw=0,wo,Ww=0;function u4(e){try{++Ww,e()}finally{--Ww||c4()}}function dy(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=YH(n,e)}function c4(){if(!(Ww>0)){for(;zm<Yw;){const e=Gw[zm];Gw[zm++]=void 0,e.notify()}zm=0,Yw=0}}function z_(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?bn.None:bn.Mutable,get(){return wo!==void 0&&j_(i,wo,zg),i._snapshot},subscribe(o){const a=GH(o),l={current:!1},c=KH(()=>{var f;i.get(),l.current?(f=a.next)==null||f.call(a,i._snapshot):l.current=!0});return{unsubscribe:()=>{c.stop()}}},_update(o){const a=wo,l=(t==null?void 0:t.compare)??Object.is;if(n)wo=i,++zg,i.depsTail=void 0;else if(o===void 0)return!1;n&&(i.flags=bn.Mutable|bn.RecursedCheck);try{const c=i._snapshot,f=typeof o=="function"?o(c):o===void 0&&n?r(c):o;return c===void 0||!l(c,f)?(i._snapshot=f,!0):!1}finally{wo=a,n&&(i.flags&=~bn.RecursedCheck),dy(i)}}};return n?(i.flags=bn.Mutable|bn.Dirty,i.get=function(){const o=i.flags;if(o&bn.Dirty||o&bn.Pending&&l4(i.deps,i)){if(i._update()){const a=i.subs;a!==void 0&&F_(a)}}else o&bn.Pending&&(i.flags=o&~bn.Pending);return wo!==void 0&&j_(i,wo,zg),i._snapshot}):i.set=function(o){if(i._update(o)){const a=i.subs;a!==void 0&&(WH(a),F_(a),c4())}},i}function KH(e){const t=()=>{const r=wo;wo=n,++zg,n.depsTail=void 0,n.flags=bn.Watching|bn.RecursedCheck;try{return e()}finally{wo=r,n.flags&=~bn.RecursedCheck,dy(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:bn.Watching|bn.RecursedCheck,notify(){const r=this.flags;r&bn.Dirty||r&bn.Pending&&l4(this.deps,this)?t():this.flags=bn.Watching},stop(){this.flags=bn.None,this.depsTail=void 0,dy(this)}};return t(),n}var K1={exports:{}},X1={},Q1={exports:{}},Z1={};/**
|
|
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 B_;function XH(){if(B_)return Z1;B_=1;var e=np();function t(p,m){return p===m&&(p!==0||1/p===1/m)||p!==p&&m!==m}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function l(p,m){var g=m(),b=r({inst:{value:g,getSnapshot:m}}),v=b[0].inst,w=b[1];return o(function(){v.value=g,v.getSnapshot=m,c(v)&&w({inst:v})},[p,g,m]),i(function(){return c(v)&&w({inst:v}),p(function(){c(v)&&w({inst:v})})},[p]),a(g),g}function c(p){var m=p.getSnapshot;p=p.value;try{var g=m();return!n(p,g)}catch{return!0}}function f(p,m){return m()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:l;return Z1.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,Z1}var H_;function f4(){return H_||(H_=1,Q1.exports=XH()),Q1.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 U_;function QH(){if(U_)return X1;U_=1;var e=np(),t=f4();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,l=e.useMemo,c=e.useDebugValue;return X1.useSyncExternalStoreWithSelector=function(f,h,p,m,g){var b=o(null);if(b.current===null){var v={hasValue:!1,value:null};b.current=v}else v=b.current;b=l(function(){function x(D){if(!k){if(k=!0,C=D,D=m(D),g!==void 0&&v.hasValue){var M=v.value;if(g(M,D))return R=M}return R=D}if(M=R,r(C,D))return M;var O=m(D);return g!==void 0&&g(M,O)?(C=D,M):(C=D,R=O)}var k=!1,C,R,_=p===void 0?null:p;return[function(){return x(h())},_===null?void 0:function(){return x(_())}]},[h,p,m,g]);var w=i(f,b[0],b[1]);return a(function(){v.hasValue=!0,v.value=w},[w]),c(w),w},X1}var q_;function ZH(){return q_||(q_=1,K1.exports=QH()),K1.exports}var d4=ZH();function JH(e,t){return e===t}function qr(e,t,n=JH){const r=S.useCallback(a=>{if(!e)return()=>{};const{unsubscribe:l}=e.subscribe(a);return l},[e]),i=S.useCallback(()=>e==null?void 0:e.get(),[e]);return d4.useSyncExternalStoreWithSelector(r,i,i,t,n)}var eU={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function _u(e){const t=vi(),n=S.useContext(e.from?qH:xb),r=e.from??n,i=r?e.from?t.stores.getRouteMatchStore(r):t.stores.matchStores.get(r):void 0,o=S.useRef(void 0);return qr(i??eU,a=>{if((e.shouldThrow??!0)&&!a&&Cs(),a===void 0)return;const l=e.select?e.select(a):a;if(e.structuralSharing??t.options.defaultStructuralSharing){const c=Na(o.current,l);return o.current=c,c}return l})}function h4(e){return _u({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function p4(e){const{select:t,...n}=e;return _u({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function m4(e){return _u({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 g4(e){return _u({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function y4(e){const t=vi();return S.useCallback(n=>t.navigate({...n,from:n.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,t])}function b4(e){return _u({...e,select:t=>e.select?e.select(t.context):t.context})}var Rn=L3();function tU(e,t){const n=vi(),r=F9(t),{activeProps:i,inactiveProps:o,activeOptions:a,to:l,preload:c,preloadDelay:f,preloadIntentProximity:h,hashScrollIntoView:p,replace:m,startTransition:g,resetScroll:b,viewTransition:v,children:w,target:x,disabled:k,style:C,className:R,onClick:_,onBlur:D,onFocus:M,onMouseEnter:O,onMouseLeave:U,onTouchStart:L,ignoreBlocker:I,params:$,search:B,hash:V,state:F,mask:z,reloadDocument:j,unsafeRelative:H,from:X,_fromLocation:P,...K}=e,ee=s4(),q=S.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),ae=qr(n.stores.location,_e=>_e,(_e,de)=>_e.href===de.href),re=S.useMemo(()=>{const _e={_fromLocation:ae,...q};return n.buildLocation(_e)},[n,ae,q]),fe=re.maskedLocation?re.maskedLocation.publicHref:re.publicHref,ve=re.maskedLocation?re.maskedLocation.external:re.external,Re=S.useMemo(()=>aU(fe,ve,n.history,k),[k,ve,fe,n.history]),le=S.useMemo(()=>{if(Re!=null&&Re.external)return ly(Re.href,n.protocolAllowlist)?void 0:Re.href;if(!lU(l)&&!(typeof l!="string"||l.indexOf(":")===-1))try{return new URL(l),ly(l,n.protocolAllowlist)?void 0:l}catch{}},[l,Re,n.protocolAllowlist]),Ae=S.useMemo(()=>{if(le)return!1;if(a!=null&&a.exact){if(!rH(ae.pathname,re.pathname,n.basepath))return!1}else{const _e=uy(ae.pathname,n.basepath),de=uy(re.pathname,n.basepath);if(!(_e.startsWith(de)&&(_e.length===de.length||_e[de.length]==="/")))return!1}return((a==null?void 0:a.includeSearch)??!0)&&!lu(ae.search,re.search,{partial:!(a!=null&&a.exact),ignoreUndefined:!(a!=null&&a.explicitUndefined)})?!1:a!=null&&a.includeHash?ee&&ae.hash===re.hash:!0},[a==null?void 0:a.exact,a==null?void 0:a.explicitUndefined,a==null?void 0:a.includeHash,a==null?void 0:a.includeSearch,ae,le,ee,re.hash,re.pathname,re.search,n.basepath]),Ie=Ae?La(i,{})??nU:J1,Y=Ae?J1:La(o,{})??J1,W=[R,Ie.className,Y.className].filter(Boolean).join(" "),Q=(C||Ie.style||Y.style)&&{...C,...Ie.style,...Y.style},[pe,oe]=S.useState(!1),me=S.useRef(!1),te=e.reloadDocument||le?!1:c??n.options.defaultPreload,Z=f??n.options.defaultPreloadDelay??0,ie=S.useCallback(()=>{n.preloadRoute({...q,_builtLocation:re}).catch(_e=>{console.warn(_e),console.warn(jH)})},[n,q,re]);j9(r,S.useCallback(_e=>{_e!=null&&_e.isIntersecting&&ie()},[ie]),sU,{disabled:!!k||te!=="viewport"}),S.useEffect(()=>{me.current||!k&&te==="render"&&(ie(),me.current=!0)},[k,ie,te]);const J=_e=>{const de=_e.currentTarget.getAttribute("target"),Ce=x!==void 0?x:de;if(!k&&!uU(_e)&&!_e.defaultPrevented&&(!Ce||Ce==="_self")&&_e.button===0){_e.preventDefault(),Rn.flushSync(()=>{oe(!0)});const ye=n.subscribe("onResolved",()=>{ye(),oe(!1)});n.navigate({...q,replace:m,resetScroll:b,hashScrollIntoView:p,startTransition:g,viewTransition:v,ignoreBlocker:I})}};if(le)return{...K,ref:r,href:le,...w&&{children:w},...x&&{target:x},...k&&{disabled:k},...C&&{style:C},...R&&{className:R},..._&&{onClick:_},...D&&{onBlur:D},...M&&{onFocus:M},...O&&{onMouseEnter:O},...U&&{onMouseLeave:U},...L&&{onTouchStart:L}};const Se=_e=>{if(k||te!=="intent")return;if(!Z){ie();return}const de=_e.currentTarget;if(Vd.has(de))return;const Ce=setTimeout(()=>{Vd.delete(de),ie()},Z);Vd.set(de,Ce)},ke=_e=>{k||te!=="intent"||ie()},ge=_e=>{if(k||!te||!Z)return;const de=_e.currentTarget,Ce=Vd.get(de);Ce&&(clearTimeout(Ce),Vd.delete(de))};return{...K,...Ie,...Y,href:Re==null?void 0:Re.href,ref:r,onClick:Sc([_,J]),onBlur:Sc([D,ge]),onFocus:Sc([M,Se]),onMouseEnter:Sc([O,Se]),onMouseLeave:Sc([U,ge]),onTouchStart:Sc([L,ke]),disabled:!!k,target:x,...Q&&{style:Q},...W&&{className:W},...k&&rU,...Ae&&iU,...ee&&pe&&oU}}var J1={},nU={className:"active"},rU={role:"link","aria-disabled":!0},iU={"data-status":"active","aria-current":"page"},oU={"data-transitioning":"transitioning"},Vd=new WeakMap,sU={rootMargin:"100px"},Sc=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function aU(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function lU(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var Du=S.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:i,...o}=tU(r,t),a=typeof r.children=="function"?r.children({isActive:o["data-status"]==="active"}):r.children;if(!n){const{disabled:l,...c}=o;return S.createElement("a",c,a)}return S.createElement(n,o,a)});function uU(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var cU=class extends o4{constructor(t){super(t),this.useMatch=n=>_u({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>b4({...n,from:this.id}),this.useSearch=n=>g4({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>m4({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>p4({...n,from:this.id}),this.useLoaderData=n=>h4({...n,from:this.id}),this.useNavigate=()=>y4({from:this.fullPath}),this.Link=Po.forwardRef((n,r)=>T.jsx(Du,{ref:r,from:this.fullPath,...n}))}};function fU(e){return new cU(e)}var dU=class extends FH{constructor(e){super(e),this.useMatch=t=>_u({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>b4({...t,from:this.id}),this.useSearch=t=>g4({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>m4({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>p4({...t,from:this.id}),this.useLoaderData=t=>h4({...t,from:this.id}),this.useNavigate=()=>y4({from:this.fullPath}),this.Link=Po.forwardRef((t,n)=>T.jsx(Du,{ref:n,from:this.fullPath,...t}))}};function hU(e){return new dU(e)}function rp(e){return new pU(e,{silent:!0}).createRoute}var pU=class{constructor(e,t){this.path=e,this.createRoute=n=>{const r=fU(n);return r.isRoot=!1,r},this.silent=t==null?void 0:t.silent}};function mU(e){const t=vi(),n=`not-found-${qr(t.stores.location,r=>r.pathname)}-${qr(t.stores.status,r=>r)}`;return T.jsx(BE,{getResetKey:()=>n,onCatch:(r,i)=>{var o;if(mr(r))(o=e.onCatch)==null||o.call(e,r,i);else throw r},errorComponent:({error:r})=>{var i;if(mr(r))return(i=e.fallback)==null?void 0:i.call(e,r);throw r},children:e.children})}function gU(){return T.jsx("p",{children:"Not Found"})}function _c(e){return T.jsx(T.Fragment,{children:e.children})}function v4(e,t,n){return t.options.notFoundComponent?T.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?T.jsx(e.options.defaultNotFoundComponent,{...n}):T.jsx(gU,{})}function yU(e){return null}function bU(){return yU(vi()),null}var x4=S.memo(function({matchId:t}){const n=vi(),r=n.stores.matchStores.get(t);r||Cs();const i=qr(n.stores.loadedAt,a=>a),o=qr(r,a=>a);return T.jsx(vU,{router:n,matchId:t,resetKey:i,matchState:S.useMemo(()=>{var c;const a=o.routeId,l=(c=n.routesById[a].parentRoute)==null?void 0:c.id;return{routeId:a,ssr:o.ssr,_displayPending:o._displayPending,parentRouteId:l}},[o._displayPending,o.routeId,o.ssr,n.routesById])})});function vU({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?T.jsx(o,{}):null,l=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))?S.Suspense:_c,m=l?BE:_c,g=f?mU:_c;return T.jsxs(i.isRoot?i.options.shellComponent??_c:_c,{children:[T.jsx(xb.Provider,{value:t,children:T.jsx(p,{fallback:a,children:T.jsx(m,{getResetKey:()=>n,errorComponent:l||HE,onCatch:(w,x)=>{if(mr(w))throw w.routeId??(w.routeId=r.routeId),w;c==null||c(w,x)},children:T.jsx(g,{fallback:w=>{if(w.routeId??(w.routeId=r.routeId),!f||w.routeId&&w.routeId!==r.routeId||!w.routeId&&!i.isRoot)throw w;return S.createElement(f,w)},children:h||r._displayPending?T.jsx(HH,{fallback:a,children:T.jsx(V_,{matchId:t})}):T.jsx(V_,{matchId:t})})})})}),r.parentRouteId===uu?T.jsxs(T.Fragment,{children:[T.jsx(xU,{resetKey:n}),e.options.scrollRestoration&&K3?T.jsx(bU,{}):null]}):null]})}function xU({resetKey:e}){const t=vi(),n=S.useRef(void 0);return rh(()=>{const r=t.latestLocation.href;(n.current===void 0||n.current!==r)&&(t.emit({type:"onRendered",...zc(t.stores.location.get(),t.stores.resolvedLocation.get())}),n.current=r)},[t.latestLocation.state.__TSR_key,e,t]),null}var V_=S.memo(function({matchId:t}){const n=vi(),r=(h,p)=>{var m;return((m=n.getMatch(h.id))==null?void 0:m._nonReactive[p])??h._nonReactive[p]},i=n.stores.matchStores.get(t);i||Cs();const o=qr(i,h=>h),a=o.routeId,l=n.routesById[a],c=S.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=S.useMemo(()=>{const h=l.options.component??n.options.defaultComponent;return h?T.jsx(h,{},c):T.jsx(UE,{})},[c,l.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=l.options.pendingMinMs??n.options.defaultPendingMinMs;if(h){const p=n.getMatch(o.id);if(p&&!p._nonReactive.minPendingPromise){const m=gf();p._nonReactive.minPendingPromise=m,setTimeout(()=>{m.resolve(),p._nonReactive.minPendingPromise=void 0},h)}}throw r(o,"loadPromise")}if(o.status==="notFound")return mr(o.error)||Cs(),v4(n,l,o.error);if(o.status==="redirected")throw Br(o.error)||Cs(),r(o,"loadPromise");if(o.status==="error")throw o.error;return f}),UE=S.memo(function(){const t=vi(),n=S.useContext(xb);let r,i=!1,o;{const f=n?t.stores.matchStores.get(n):void 0;[r,i]=qr(f,h=>[h==null?void 0:h.routeId,(h==null?void 0:h.globalNotFound)??!1]),o=qr(t.stores.matchesId,h=>h[h.findIndex(p=>p===n)+1])}const a=r?t.routesById[r]:void 0,l=t.options.defaultPendingComponent?T.jsx(t.options.defaultPendingComponent,{}):null;if(i)return a||Cs(),v4(t,a,void 0);if(!o)return null;const c=T.jsx(x4,{matchId:o});return r===uu?T.jsx(S.Suspense,{fallback:l,children:c}):c});function wU(){const e=vi(),t=S.useRef({router:e,mounted:!1}),[n,r]=S.useState(!1),i=qr(e.stores.isLoading,p=>p),o=qr(e.stores.hasPending,p=>p),a=B1(i),l=i||n||o,c=B1(l),f=i||o,h=B1(f);return e.startTransition=p=>{r(!0),S.startTransition(()=>{p(),r(!1)})},S.useEffect(()=>{const p=e.history.subscribe(e.load),m=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Ua(e.latestLocation.publicHref)!==Ua(m.publicHref)&&e.commitLocation({...m,replace:!0}),()=>{p()}},[e,e.history]),rh(()=>{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(m){console.error(m)}})()},[e]),rh(()=>{a&&!i&&e.emit({type:"onLoad",...zc(e.stores.location.get(),e.stores.resolvedLocation.get())})},[a,e,i]),rh(()=>{h&&!f&&e.emit({type:"onBeforeRouteMount",...zc(e.stores.location.get(),e.stores.resolvedLocation.get())})},[f,h,e]),rh(()=>{if(c&&!l){const p=zc(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...p}),u4(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),p.hrefChanged&&zH(e)}},[l,c,e]),null}function SU(){const e=vi(),t=e.routesById[uu].options.pendingComponent??e.options.defaultPendingComponent,n=t?T.jsx(t,{}):null,r=T.jsxs(typeof document<"u"&&e.ssr?_c:S.Suspense,{fallback:n,children:[T.jsx(wU,{}),T.jsx(EU,{})]});return e.options.InnerWrap?T.jsx(e.options.InnerWrap,{children:r}):r}function EU(){const e=vi(),t=qr(e.stores.firstId,i=>i),n=qr(e.stores.loadedAt,i=>i),r=t?T.jsx(x4,{matchId:t}):null;return T.jsx(xb.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:T.jsx(BE,{getResetKey:()=>n,errorComponent:HE,onCatch:void 0,children:r})})}var CU=e=>({createMutableStore:z_,createReadonlyStore:z_,batch:u4}),kU=e=>new RU(e),RU=class extends MH{constructor(e){super(e,CU)}};function AU({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=T.jsx(a4.Provider,{value:e,children:t});return e.options.Wrap?T.jsx(e.options.Wrap,{children:r}):r}function TU({router:e,...t}){return T.jsx(AU,{router:e,...t,children:T.jsx(SU,{})})}function _U(e){const t=vi({warn:(e==null?void 0:e.router)===void 0}),n=(e==null?void 0:e.router)||t,r=S.useRef(void 0);return qr(n.stores.__store,i=>{if(e!=null&&e.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const o=Na(r.current,e.select(i));return r.current=o,o}return e.select(i)}return i})}function w4(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=w4(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ex(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=w4(e))&&(r&&(r+=" "),r+=t);return r}const G_=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,DU=e=>{const t=function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var l,c;return typeof(e==null||(l=e.hooks)===null||l===void 0?void 0:l["cx:done"])<"u"?e==null?void 0:e.hooks["cx:done"](ex(o)):typeof(e==null||(c=e.hooks)===null||c===void 0?void 0:c.onComplete)<"u"?e==null?void 0:e.hooks.onComplete(ex(o)):ex(o)};return{compose:function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return l=>{const c=Object.fromEntries(Object.entries(l||{}).filter(f=>{let[h]=f;return!["class","className"].includes(h)}));return t(o.map(f=>f(c)),l==null?void 0:l.class,l==null?void 0:l.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:l,defaultVariants:c}=i,f=Object.keys(l).map(m=>{const g=o==null?void 0:o[m],b=c==null?void 0:c[m],v=G_(g)||G_(b);return l[m][v]}),h={...c,...o&&Object.entries(o).reduce((m,g)=>{let[b,v]=g;return typeof v>"u"?m:{...m,[b]:v}},{})},p=i==null||(a=i.compoundVariants)===null||a===void 0?void 0:a.reduce((m,g)=>{let{class:b,className:v,...w}=g;return Object.entries(w).every(x=>{let[k,C]=x;const R=h[k];return Array.isArray(C)?C.includes(R):R===C})?[...m,b,v]:m},[]);return t(i==null?void 0:i.base,f,p,o==null?void 0:o.class,o==null?void 0:o.className)},cx:t}},MU=(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},$U=(e,t)=>({classGroupId:e,validator:t}),S4=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),hy="-",Y_=[],OU="arbitrary..",PU=e=>{const t=LU(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return IU(a);const l=a.split(hy),c=l[0]===""&&l.length>1?1:0;return E4(l,c,t)},getConflictingClassGroupIds:(a,l)=>{if(l){const c=r[a],f=n[a];return c?f?MU(f,c):c:f||Y_}return n[a]||Y_}}},E4=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],o=n.nextPart.get(i);if(o){const f=E4(e,t+1,o);if(f)return f}const a=n.validators;if(a===null)return;const l=t===0?e.join(hy):e.slice(t).join(hy),c=a.length;for(let f=0;f<c;f++){const h=a[f];if(h.validator(l))return h.classGroupId}},IU=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?OU+r:void 0})(),LU=e=>{const{theme:t,classGroups:n}=e;return NU(n,t)},NU=(e,t)=>{const n=S4();for(const r in e){const i=e[r];qE(i,n,r,t)}return n},qE=(e,t,n,r)=>{const i=e.length;for(let o=0;o<i;o++){const a=e[o];jU(a,t,n,r)}},jU=(e,t,n,r)=>{if(typeof e=="string"){FU(e,t,n);return}if(typeof e=="function"){zU(e,t,n,r);return}BU(e,t,n,r)},FU=(e,t,n)=>{const r=e===""?t:C4(t,e);r.classGroupId=n},zU=(e,t,n,r)=>{if(HU(e)){qE(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push($U(n,e))},BU=(e,t,n,r)=>{const i=Object.entries(e),o=i.length;for(let a=0;a<o;a++){const[l,c]=i[a];qE(c,C4(t,l),n,r)}},C4=(e,t)=>{let n=e;const r=t.split(hy),i=r.length;for(let o=0;o<i;o++){const a=r[o];let l=n.nextPart.get(a);l||(l=S4(),n.nextPart.set(a,l)),n=l}return n},HU=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,UU=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)}}},Kw="!",W_=":",qU=[],K_=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),VU=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const o=[];let a=0,l=0,c=0,f;const h=i.length;for(let v=0;v<h;v++){const w=i[v];if(a===0&&l===0){if(w===W_){o.push(i.slice(c,v)),c=v+1;continue}if(w==="/"){f=v;continue}}w==="["?a++:w==="]"?a--:w==="("?l++:w===")"&&l--}const p=o.length===0?i:i.slice(c);let m=p,g=!1;p.endsWith(Kw)?(m=p.slice(0,-1),g=!0):p.startsWith(Kw)&&(m=p.slice(1),g=!0);const b=f&&f>c?f-c:void 0;return K_(o,g,m,b)};if(t){const i=t+W_,o=r;r=a=>a.startsWith(i)?o(a.slice(i.length)):K_(qU,!1,a,void 0,!0)}if(n){const i=r;r=o=>n({className:o,parseClassName:i})}return r},GU=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],l=a[0]==="[",c=t.has(a);l||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}},YU=e=>({cache:UU(e.cacheSize),parseClassName:VU(e),sortModifiers:GU(e),...PU(e)}),WU=/\s+/,KU=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:o}=t,a=[],l=e.trim().split(WU);let c="";for(let f=l.length-1;f>=0;f-=1){const h=l[f],{isExternal:p,modifiers:m,hasImportantModifier:g,baseClassName:b,maybePostfixModifierPosition:v}=n(h);if(p){c=h+(c.length>0?" "+c:c);continue}let w=!!v,x=r(w?b.substring(0,v):b);if(!x){if(!w){c=h+(c.length>0?" "+c:c);continue}if(x=r(b),!x){c=h+(c.length>0?" "+c:c);continue}w=!1}const k=m.length===0?"":m.length===1?m[0]:o(m).join(":"),C=g?k+Kw:k,R=C+x;if(a.indexOf(R)>-1)continue;a.push(R);const _=i(x,w);for(let D=0;D<_.length;++D){const M=_[D];a.push(C+M)}c=h+(c.length>0?" "+c:c)}return c},XU=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=k4(n))&&(i&&(i+=" "),i+=r);return i},k4=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=k4(e[r]))&&(n&&(n+=" "),n+=t);return n},QU=(e,...t)=>{let n,r,i,o;const a=c=>{const f=t.reduce((h,p)=>p(h),e());return n=YU(f),r=n.cache.get,i=n.cache.set,o=l,l(c)},l=c=>{const f=r(c);if(f)return f;const h=KU(c,n);return i(c,h),h};return o=a,(...c)=>o(XU(...c))},ZU=[],Fn=e=>{const t=n=>n[e]||ZU;return t.isThemeGetter=!0,t},R4=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,A4=/^\((?:(\w[\w-]*):)?(.+)\)$/i,JU=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,eq=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,tq=/\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$/,nq=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,rq=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,iq=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,da=e=>JU.test(e),xt=e=>!!e&&!Number.isNaN(Number(e)),ha=e=>!!e&&Number.isInteger(Number(e)),tx=e=>e.endsWith("%")&&xt(e.slice(0,-1)),ls=e=>eq.test(e),T4=()=>!0,oq=e=>tq.test(e)&&!nq.test(e),VE=()=>!1,sq=e=>rq.test(e),aq=e=>iq.test(e),lq=e=>!Ue(e)&&!Ge(e),uq=e=>il(e,M4,VE),Ue=e=>R4.test(e),Ll=e=>il(e,$4,oq),X_=e=>il(e,yq,xt),cq=e=>il(e,P4,T4),fq=e=>il(e,O4,VE),Q_=e=>il(e,_4,VE),dq=e=>il(e,D4,aq),Bm=e=>il(e,I4,sq),Ge=e=>A4.test(e),Gd=e=>Mu(e,$4),hq=e=>Mu(e,O4),Z_=e=>Mu(e,_4),pq=e=>Mu(e,M4),mq=e=>Mu(e,D4),Hm=e=>Mu(e,I4,!0),gq=e=>Mu(e,P4,!0),il=(e,t,n)=>{const r=R4.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Mu=(e,t,n=!1)=>{const r=A4.exec(e);return r?r[1]?t(r[1]):n:!1},_4=e=>e==="position"||e==="percentage",D4=e=>e==="image"||e==="url",M4=e=>e==="length"||e==="size"||e==="bg-size",$4=e=>e==="length",yq=e=>e==="number",O4=e=>e==="family-name",P4=e=>e==="number"||e==="weight",I4=e=>e==="shadow",bq=()=>{const e=Fn("color"),t=Fn("font"),n=Fn("text"),r=Fn("font-weight"),i=Fn("tracking"),o=Fn("leading"),a=Fn("breakpoint"),l=Fn("container"),c=Fn("spacing"),f=Fn("radius"),h=Fn("shadow"),p=Fn("inset-shadow"),m=Fn("text-shadow"),g=Fn("drop-shadow"),b=Fn("blur"),v=Fn("perspective"),w=Fn("aspect"),x=Fn("ease"),k=Fn("animate"),C=()=>["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"],_=()=>[...R(),Ge,Ue],D=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto","contain","none"],O=()=>[Ge,Ue,c],U=()=>[da,"full","auto",...O()],L=()=>[ha,"none","subgrid",Ge,Ue],I=()=>["auto",{span:["full",ha,Ge,Ue]},ha,Ge,Ue],$=()=>[ha,"auto",Ge,Ue],B=()=>["auto","min","max","fr",Ge,Ue],V=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],F=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...O()],j=()=>[da,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...O()],H=()=>[da,"screen","full","dvw","lvw","svw","min","max","fit",...O()],X=()=>[da,"screen","full","lh","dvh","lvh","svh","min","max","fit",...O()],P=()=>[e,Ge,Ue],K=()=>[...R(),Z_,Q_,{position:[Ge,Ue]}],ee=()=>["no-repeat",{repeat:["","x","y","space","round"]}],q=()=>["auto","cover","contain",pq,uq,{size:[Ge,Ue]}],ae=()=>[tx,Gd,Ll],re=()=>["","none","full",f,Ge,Ue],fe=()=>["",xt,Gd,Ll],ve=()=>["solid","dashed","dotted","double"],Re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],le=()=>[xt,tx,Z_,Q_],Ae=()=>["","none",b,Ge,Ue],Ie=()=>["none",xt,Ge,Ue],Y=()=>["none",xt,Ge,Ue],W=()=>[xt,Ge,Ue],Q=()=>[da,"full",...O()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ls],breakpoint:[ls],color:[T4],container:[ls],"drop-shadow":[ls],ease:["in","out","in-out"],font:[lq],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ls],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ls],shadow:[ls],spacing:["px",xt],text:[ls],"text-shadow":[ls],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",da,Ue,Ge,w]}],container:["container"],columns:[{columns:[xt,Ue,Ge,l]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"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:_()}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:U()}],"inset-x":[{"inset-x":U()}],"inset-y":[{"inset-y":U()}],start:[{"inset-s":U(),start:U()}],end:[{"inset-e":U(),end:U()}],"inset-bs":[{"inset-bs":U()}],"inset-be":[{"inset-be":U()}],top:[{top:U()}],right:[{right:U()}],bottom:[{bottom:U()}],left:[{left:U()}],visibility:["visible","invisible","collapse"],z:[{z:[ha,"auto",Ge,Ue]}],basis:[{basis:[da,"full","auto",l,...O()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[xt,da,"auto","initial","none",Ue]}],grow:[{grow:["",xt,Ge,Ue]}],shrink:[{shrink:["",xt,Ge,Ue]}],order:[{order:[ha,"first","last","none",Ge,Ue]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":B()}],"auto-rows":[{"auto-rows":B()}],gap:[{gap:O()}],"gap-x":[{"gap-x":O()}],"gap-y":[{"gap-y":O()}],"justify-content":[{justify:[...V(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",...V()]}],"align-items":[{items:[...F(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...F(),{baseline:["","last"]}]}],"place-content":[{"place-content":V()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],p:[{p:O()}],px:[{px:O()}],py:[{py:O()}],ps:[{ps:O()}],pe:[{pe:O()}],pbs:[{pbs:O()}],pbe:[{pbe:O()}],pt:[{pt:O()}],pr:[{pr:O()}],pb:[{pb:O()}],pl:[{pl:O()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mbs:[{mbs:z()}],mbe:[{mbe:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":O()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":O()}],"space-y-reverse":["space-y-reverse"],size:[{size:j()}],"inline-size":[{inline:["auto",...H()]}],"min-inline-size":[{"min-inline":["auto",...H()]}],"max-inline-size":[{"max-inline":["none",...H()]}],"block-size":[{block:["auto",...X()]}],"min-block-size":[{"min-block":["auto",...X()]}],"max-block-size":[{"max-block":["none",...X()]}],w:[{w:[l,"screen",...j()]}],"min-w":[{"min-w":[l,"screen","none",...j()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[a]},...j()]}],h:[{h:["screen","lh",...j()]}],"min-h":[{"min-h":["screen","lh","none",...j()]}],"max-h":[{"max-h":["screen","lh",...j()]}],"font-size":[{text:["base",n,Gd,Ll]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,gq,cq]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",tx,Ue]}],"font-family":[{font:[hq,fq,t]}],"font-features":[{"font-features":[Ue]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Ge,Ue]}],"line-clamp":[{"line-clamp":[xt,"none",Ge,X_]}],leading:[{leading:[o,...O()]}],"list-image":[{"list-image":["none",Ge,Ue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ge,Ue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[xt,"from-font","auto",Ge,Ll]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[xt,"auto",Ge,Ue]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ge,Ue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ge,Ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:K()}],"bg-repeat":[{bg:ee()}],"bg-size":[{bg:q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ha,Ge,Ue],radial:["",Ge,Ue],conic:[ha,Ge,Ue]},mq,dq]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:ae()}],"gradient-via-pos":[{via:ae()}],"gradient-to-pos":[{to:ae()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:re()}],"rounded-s":[{"rounded-s":re()}],"rounded-e":[{"rounded-e":re()}],"rounded-t":[{"rounded-t":re()}],"rounded-r":[{"rounded-r":re()}],"rounded-b":[{"rounded-b":re()}],"rounded-l":[{"rounded-l":re()}],"rounded-ss":[{"rounded-ss":re()}],"rounded-se":[{"rounded-se":re()}],"rounded-ee":[{"rounded-ee":re()}],"rounded-es":[{"rounded-es":re()}],"rounded-tl":[{"rounded-tl":re()}],"rounded-tr":[{"rounded-tr":re()}],"rounded-br":[{"rounded-br":re()}],"rounded-bl":[{"rounded-bl":re()}],"border-w":[{border:fe()}],"border-w-x":[{"border-x":fe()}],"border-w-y":[{"border-y":fe()}],"border-w-s":[{"border-s":fe()}],"border-w-e":[{"border-e":fe()}],"border-w-bs":[{"border-bs":fe()}],"border-w-be":[{"border-be":fe()}],"border-w-t":[{"border-t":fe()}],"border-w-r":[{"border-r":fe()}],"border-w-b":[{"border-b":fe()}],"border-w-l":[{"border-l":fe()}],"divide-x":[{"divide-x":fe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":fe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ve(),"hidden","none"]}],"divide-style":[{divide:[...ve(),"hidden","none"]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-bs":[{"border-bs":P()}],"border-color-be":[{"border-be":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[xt,Ge,Ue]}],"outline-w":[{outline:["",xt,Gd,Ll]}],"outline-color":[{outline:P()}],shadow:[{shadow:["","none",h,Hm,Bm]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":["none",p,Hm,Bm]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:fe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[xt,Ll]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":fe()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":["none",m,Hm,Bm]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[xt,Ge,Ue]}],"mix-blend":[{"mix-blend":[...Re(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Re()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[xt]}],"mask-image-linear-from-pos":[{"mask-linear-from":le()}],"mask-image-linear-to-pos":[{"mask-linear-to":le()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":le()}],"mask-image-t-to-pos":[{"mask-t-to":le()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":le()}],"mask-image-r-to-pos":[{"mask-r-to":le()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":le()}],"mask-image-b-to-pos":[{"mask-b-to":le()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":le()}],"mask-image-l-to-pos":[{"mask-l-to":le()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":le()}],"mask-image-x-to-pos":[{"mask-x-to":le()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":le()}],"mask-image-y-to-pos":[{"mask-y-to":le()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[Ge,Ue]}],"mask-image-radial-from-pos":[{"mask-radial-from":le()}],"mask-image-radial-to-pos":[{"mask-radial-to":le()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"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":[xt]}],"mask-image-conic-from-pos":[{"mask-conic-from":le()}],"mask-image-conic-to-pos":[{"mask-conic-to":le()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:K()}],"mask-repeat":[{mask:ee()}],"mask-size":[{mask:q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ge,Ue]}],filter:[{filter:["","none",Ge,Ue]}],blur:[{blur:Ae()}],brightness:[{brightness:[xt,Ge,Ue]}],contrast:[{contrast:[xt,Ge,Ue]}],"drop-shadow":[{"drop-shadow":["","none",g,Hm,Bm]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:["",xt,Ge,Ue]}],"hue-rotate":[{"hue-rotate":[xt,Ge,Ue]}],invert:[{invert:["",xt,Ge,Ue]}],saturate:[{saturate:[xt,Ge,Ue]}],sepia:[{sepia:["",xt,Ge,Ue]}],"backdrop-filter":[{"backdrop-filter":["","none",Ge,Ue]}],"backdrop-blur":[{"backdrop-blur":Ae()}],"backdrop-brightness":[{"backdrop-brightness":[xt,Ge,Ue]}],"backdrop-contrast":[{"backdrop-contrast":[xt,Ge,Ue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",xt,Ge,Ue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[xt,Ge,Ue]}],"backdrop-invert":[{"backdrop-invert":["",xt,Ge,Ue]}],"backdrop-opacity":[{"backdrop-opacity":[xt,Ge,Ue]}],"backdrop-saturate":[{"backdrop-saturate":[xt,Ge,Ue]}],"backdrop-sepia":[{"backdrop-sepia":["",xt,Ge,Ue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":O()}],"border-spacing-x":[{"border-spacing-x":O()}],"border-spacing-y":[{"border-spacing-y":O()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ge,Ue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[xt,"initial",Ge,Ue]}],ease:[{ease:["linear","initial",x,Ge,Ue]}],delay:[{delay:[xt,Ge,Ue]}],animate:[{animate:["none",k,Ge,Ue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,Ge,Ue]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:Ie()}],"rotate-x":[{"rotate-x":Ie()}],"rotate-y":[{"rotate-y":Ie()}],"rotate-z":[{"rotate-z":Ie()}],scale:[{scale:Y()}],"scale-x":[{"scale-x":Y()}],"scale-y":[{"scale-y":Y()}],"scale-z":[{"scale-z":Y()}],"scale-3d":["scale-3d"],skew:[{skew:W()}],"skew-x":[{"skew-x":W()}],"skew-y":[{"skew-y":W()}],transform:[{transform:[Ge,Ue,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Q()}],"translate-x":[{"translate-x":Q()}],"translate-y":[{"translate-y":Q()}],"translate-z":[{"translate-z":Q()}],"translate-none":["translate-none"],accent:[{accent:P()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:P()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ge,Ue]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mbs":[{"scroll-mbs":O()}],"scroll-mbe":[{"scroll-mbe":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pbs":[{"scroll-pbs":O()}],"scroll-pbe":[{"scroll-pbe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ge,Ue]}],fill:[{fill:["none",...P()]}],"stroke-w":[{stroke:[xt,Gd,Ll,X_]}],stroke:[{stroke:["none",...P()]}],"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"]}},vq=QU(bq),L4=DU({hooks:{onComplete:e=>vq(e)}}),Yr=L4.cva;function ze(...e){const t=L4.cx(...e);return t.trim()?t:void 0}const N4=({render:e,children:t,props:n,fallbackElement:r="div"})=>S.isValidElement(e)?S.cloneElement(e,{...n,children:t??e.props.children,className:ze(e.props.className,n.className),style:{...e.props.style,...n.style}}):S.createElement(r,n,t),xq=["evenly","fullwidth","fullheight","fullscreen"],wq=["ax","ay","direction"],Sq={property:"justifyContent",values:["space-around","baseline","space-between","center","end","evenly","normal","start","stretch"]},Eq={property:"alignItems",values:["baseline","center","end","start","stretch"]},Cq={property:"flexDirection",values:["column","row"]},kq=["b","bx","bl","br","by","bt","bb"],Rq={property:"borderWidth"},Aq={property:"borderInlineWidth"},Tq={property:"borderInlineStartWidth"},_q={property:"borderInlineEndWidth"},Dq={property:"borderBlockWidth"},Mq={property:"borderBlockStartWidth"},$q={property:"borderBlockEndWidth"},Oq=["gap","m","mx","ml","mr","my","mt","mb","p","px","pl","pr","py","pt","pb"],Pq={property:"gap",unit:{variable:"--spacing-unit"}},Iq={property:"margin",unit:{variable:"--spacing-unit"}},Lq={property:"marginInline",unit:{variable:"--spacing-inline"}},Nq={property:"marginInlineStart",unit:{variable:"--spacing-inline"}},jq={property:"marginInlineEnd",unit:{variable:"--spacing-inline"}},Fq={property:"marginBlock",unit:{variable:"--spacing-block"}},zq={property:"marginBlockStart",unit:{variable:"--spacing-block"}},Bq={property:"marginBlockEnd",unit:{variable:"--spacing-block"}},Hq={property:"padding",unit:{variable:"--spacing-unit"}},Uq={property:"paddingInline",unit:{variable:"--spacing-inline"}},qq={property:"paddingInlineStart",unit:{variable:"--spacing-inline"}},Vq={property:"paddingInlineEnd",unit:{variable:"--spacing-inline"}},Gq={property:"paddingBlock",unit:{variable:"--spacing-block"}},Yq={property:"paddingBlockStart",unit:{variable:"--spacing-block"}},Wq={property:"paddingBlockEnd",unit:{variable:"--spacing-block"}},Kq=["w","minw","maxw","h","minh","maxh"],Xq={property:"width"},Qq={property:"minWidth"},Zq={property:"maxWidth"},Jq={property:"height"},eV={property:"minHeight"},tV={property:"maxHeight"},j4={b:Rq,bx:Aq,bl:Tq,br:_q,by:Dq,bt:Mq,bb:$q,ax:Sq,ay:Eq,direction:Cq,gap:Pq,m:Iq,mx:Lq,ml:Nq,mr:jq,my:Fq,mt:zq,mb:Bq,p:Hq,px:Uq,pl:qq,pr:Vq,py:Gq,pt:Yq,pb:Wq,w:Xq,minw:Qq,maxw:Zq,h:Jq,minh:eV,maxh:tV},nV=Object.keys(j4);({...Object.fromEntries(Oq.map(e=>[e,"spacing"])),...Object.fromEntries(wq.map(e=>[e,"layout"])),...Object.fromEntries(Kq.map(e=>[e,"sizing"])),...Object.fromEntries(kq.map(e=>[e,"border"])),...Object.fromEntries(xq.map(e=>[e,"toggle"]))});function F4({componentName:e,props:t,styleProps:n=[]}){const r={"data-slot":e},i={},o={};for(const[l,c]of Object.entries(t))if(n.includes(l)&&c!==void 0){const f=j4[l];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[l]=c;const a=Object.keys(o).length>0?{...o,...i.style||{}}:i.style;return{...r,...i,...a&&{style:a}}}const rV="_box_1f7bt_1",ya={box:rV,"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"},iV=Yr({variants:{bordered:{true:ya["toggle-bordered"]},evenly:{true:ya["toggle-evenly"]},rounded:{true:ya["toggle-rounded"]},square:{true:ya["toggle-square"]},fullheight:{true:ya["toggle-fullheight"]},fullwidth:{true:ya["toggle-fullwidth"]},fullscreen:{true:ya["toggle-fullscreen"]}}}),ks=({bordered:e,evenly:t,fullwidth:n,fullheight:r,fullscreen:i,rounded:o,square:a,render:l,className:c,children:f,...h})=>{const p=F4({componentName:"box",styleProps:nV,props:h});return N4({fallbackElement:"div",props:{...p,className:ze(ya.box,iV({bordered:e,evenly:t,fullwidth:n,fullheight:r,fullscreen:i,rounded:o,square:a}),c)},render:l,children:f})};ks.displayName="Box";function mi({condition:e,render:t,children:n}){if(!e||!t)return T.jsx(T.Fragment,{children:n});const r=n??t.props.children;return S.cloneElement(t,void 0,r)}mi.displayName="ConditionalRender";const oV="_group_h0evt_1",sV={group:oV},ot=({className:e,...t})=>T.jsx(ks,{"data-slot":"group",className:ze(sV.group,e),...t});ot.displayName="Group";const aV="_layer_hu2g5_1",lV={layer:aV},GE=({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 T.jsx(ks,{"data-slot":"layer",className:ze(lV.layer,t),style:o,...i,children:r})};GE.displayName="Layer";const uV="_text_opfqd_3",cV="_colored_opfqd_138",Ct={text:uV,"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:cV,"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"},YE={red:Ct["color-red"],orange:Ct["color-orange"],yellow:Ct["color-yellow"],green:Ct["color-green"],blue:Ct["color-blue"],indigo:Ct["color-indigo"],purple:Ct["color-purple"],neutral:Ct["color-neutral"]},fV=Ct.colored,dV=Object.fromEntries(Object.entries(YE).map(([e,t])=>[e,`${t} ${fV}`])),hV=Yr({variants:{strikethrough:{true:Ct["toggle-strikethrough"]},balance:{true:Ct["toggle-balance"]},truncate:{true:Ct["toggle-truncate"]},underline:{true:Ct["toggle-underline"],false:Ct["toggle-no-underline"]},family:{mono:Ct["family-mono"],serif:Ct["family-serif"],sans:Ct["family-sans"]},weight:{thin:Ct["weight-thin"],light:Ct["weight-light"],normal:Ct["weight-normal"],medium:Ct["weight-medium"],semibold:Ct["weight-semibold"],bold:Ct["weight-bold"]},shade:{background:Ct["shade-background"],surface:Ct["shade-surface"],accent:Ct["shade-accent"],halftone:Ct["shade-halftone"],muted:Ct["shade-muted"],foreground:Ct["shade-foreground"]},color:dV,size:{[-1]:Ct["text-size--1"],0:Ct["text-size-0"],1:Ct["text-size-1"],2:Ct["text-size-2"],3:Ct["text-size-3"],4:Ct["text-size-4"],5:Ct["text-size-5"],6:Ct["text-size-6"]}}}),pV=0,mV="sans",Fe=({shade:e,color:t,weight:n,underline:r,strikethrough:i,balance:o,truncate:a,size:l=pV,family:c=mV,render:f,className:h,children:p,...m})=>{const g=F4({componentName:"text",styleProps:["p","px","py","pl","pr","pt","pb","m","mx","my","ml","mr","mt","mb"],props:m});return N4({fallbackElement:"span",props:{...g,className:ze(Ct.text,hV({shade:e,color:t,size:l,weight:n,family:c,balance:o,truncate:a,underline:r,strikethrough:i}),h)},render:f,children:p})},gV="_stack_1svur_1",yV={stack:gV},Qe=({ax:e,ay:t,className:n,...r})=>T.jsx(ks,{"data-slot":"stack",ax:t,ay:e,className:ze(yV.stack,n),...r});Qe.displayName="Stack";const WE=({condition:e,render:t,children:n,...r})=>{const i=e?t.true:t.false;if(!i)return T.jsx(T.Fragment,{children:n});const o=n??i.props.children;return S.cloneElement(i,r,o)};WE.displayName="SwitchRender";const bV="_separator_1u3u3_1",vV="_line_1u3u3_34",Ni={separator:bV,"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:vV,"line-horizontal":"_line-horizontal_1u3u3_37","line-vertical":"_line-vertical_1u3u3_40"},J_=Yr({variants:{orientation:{horizontal:Ni["orientation-horizontal"],vertical:Ni["orientation-vertical"]},shade:{background:Ni["shade-background"],surface:Ni["shade-surface"],accent:Ni["shade-accent"],halftone:Ni["shade-halftone"],muted:Ni["shade-muted"],foreground:Ni["shade-foreground"]}}}),eD={};function z4(e,t){const n=S.useRef(eD);return n.current===eD&&(n.current=e(t)),n}function tD(e,t,n,r){const i=z4(B4).current;return wV(i,e,t,n,r)&&H4(i,[e,t,n,r]),i.callback}function xV(e){const t=z4(B4).current;return SV(t,e)&&H4(t,e),t.callback}function B4(){return{callback:null,cleanup:null,refs:[]}}function wV(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function SV(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function H4(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 EV=parseInt(S.version,10);function CV(e){return EV>=e}function nD(e){if(!S.isValidElement(e))return null;const t=e,n=t.props;return(CV(19)?n==null?void 0:n.ref:t.ref)??null}function Xw(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function kV(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 RV(e,t){return typeof e=="function"?e(t):e}function AV(e,t){return typeof e=="function"?e(t):e}const Dc=Object.freeze({}),sh={};function TV(e,t,n,r,i){let o={...Qw(e,sh)};return t&&(o=U4(o,t)),o}function _V(e){if(e.length===0)return sh;if(e.length===1)return Qw(e[0],sh);let t={...Qw(e[0],sh)};for(let n=1;n<e.length;n+=1)t=U4(t,e[n]);return t}function U4(e,t){return q4(t)?t(e):DV(e,t)}function DV(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=Xw(e.style,r);break}case"className":{e[n]=V4(e.className,r);break}default:MV(n,r)?e[n]=$V(e[n],r):e[n]=r}}return e}function MV(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 q4(e){return typeof e=="function"}function Qw(e,t){return q4(e)?e(t):e??sh}function $V(e,t){return t?e?n=>{if(PV(n)){const i=n;OV(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 OV(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function V4(e,t){return t?e?t+" "+e:t:e}function PV(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function IV(e,t,n={}){const r=t.render,i=LV(t,n);if(n.enabled===!1)return null;const o=n.state??Dc;return jV(e,r,i,o)}function LV(e,t={}){const{className:n,style:r,render:i}=e,{state:o=Dc,ref:a,props:l,stateAttributesMapping:c,enabled:f=!0}=t,h=f?RV(n,o):void 0,p=f?AV(r,o):void 0,m=f?kV(o,c):Dc,g=f?Xw(m,Array.isArray(l)?_V(l):l)??Dc:Dc;return typeof document<"u"&&(f?Array.isArray(a)?g.ref=xV([g.ref,nD(i),...a]):g.ref=tD(g.ref,nD(i),a):tD(null,null)),f?(h!==void 0&&(g.className=V4(g.className,h)),p!==void 0&&(g.style=Xw(g.style,p)),g):Dc}const NV=Symbol.for("react.lazy");function jV(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=TV(n,t.props);i.ref=n.ref;let o=t;return(o==null?void 0:o.$$typeof)===NV&&(o=S.Children.toArray(t)[0]),S.cloneElement(o,i)}return FV(e,n)}function FV(e,t){return S.createElement(e,t)}const zV=S.forwardRef(function(e,t){const{className:n,render:r,orientation:i="horizontal",...o}=e;return IV("div",e,{state:{orientation:i},ref:t,props:[{role:"separator","aria-orientation":i},o]})}),KE=({shade:e,orientation:t="horizontal",className:n,children:r,render:i,...o})=>{if(r){const a=ze(Ni.separator,Ni.line,Ni[`line-${t}`],J_({shade:e}));return T.jsxs(WE,{condition:t==="horizontal",render:{true:T.jsx(ot,{ay:"center",gap:2,fullwidth:!0}),false:T.jsx(Qe,{ax:"center",gap:2,fullheight:!0})},role:"separator","data-slot":"separator","data-orientation":t,className:n,...o,children:[T.jsx(ks,{className:a}),T.jsx(mi,{condition:typeof r=="string",render:T.jsx(Fe,{shade:"muted",weight:"bold"}),children:r}),T.jsx(ks,{className:a})]})}return T.jsx(zV,{"data-slot":"separator",render:i??T.jsx(ks,{}),className:ze(Ni.separator,J_({shade:e,orientation:t}),n),"data-orientation":t,...o})};KE.displayName="Separator";const BV="_button_4h2ty_3 _disabled_dkczp_2",HV="_fullwidth_4h2ty_138",Lr={button:BV,"button-content-container":"_button-content-container_4h2ty_46","button-spinner":"_button-spinner_4h2ty_58","variant-subtle":"_variant-subtle_4h2ty_72","variant-ghost":"_variant-ghost_4h2ty_81","variant-inverted":"_variant-inverted_4h2ty_91","size-xsmall":"_size-xsmall_4h2ty_101","size-small":"_size-small_4h2ty_107","size-medium":"_size-medium_4h2ty_112","size-large":"_size-large_4h2ty_117","shape-pill":"_shape-pill_4h2ty_123","shape-square":"_shape-square_4h2ty_127","shape-circle":"_shape-circle_4h2ty_132",fullwidth:HV},UV="medium",qV=Yr({variants:{shape:{pill:Lr["shape-pill"],square:Lr["shape-square"],circle:Lr["shape-circle"]},fullwidth:{true:Lr.fullwidth},variant:{subtle:Lr["variant-subtle"],ghost:Lr["variant-ghost"],inverted:Lr["variant-inverted"]},size:{xsmall:Lr["size-xsmall"],small:Lr["size-small"],medium:Lr["size-medium"],large:Lr["size-large"]}},defaultVariants:{size:UV}}),G4=({loading:e,children:t,...n})=>T.jsx(ot,{"data-slot":"button-content-container",className:Lr["button-content-container"],"data-loading":e,"aria-hidden":e,ay:"center",gap:2,...n,children:t});G4.displayName="ButtonContentContainer";function VV(){return typeof window<"u"}function GV(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function YV(e){return VV()?e instanceof HTMLElement||e instanceof GV(e).HTMLElement:!1}const rD={};function XE(e,t){const n=S.useRef(rD);return n.current===rD&&(n.current=e(t)),n}const nx=rl[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],WV=nx&&nx!==S.useLayoutEffect?nx:e=>e();function Zw(e){const t=XE(KV).current;return t.next=e,WV(t.effect),t.trampoline}function KV(){const e={next:void 0,callback:XV,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function XV(){}const QV={...rl},ZV=()=>{},Jw=typeof document<"u"?S.useLayoutEffect:ZV;function QE(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 JV=S.createContext(void 0);function Y4(e=!1){const t=S.useContext(JV);if(t===void 0&&!e)throw new Error(QE(16));return t}function eG(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:o}=e,a=r&&t!==!1,l=r&&t===!1;return{props:S.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||l)&&(c.disabled=n),c},[r,n,t,a,l,o,i])}}function eS(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const ah={};function W4(e,t,n,r,i){let o={...tS(e,ah)};return t&&(o=Bg(o,t)),n&&(o=Bg(o,n)),r&&(o=Bg(o,r)),o}function tG(e){if(e.length===0)return ah;if(e.length===1)return tS(e[0],ah);let t={...tS(e[0],ah)};for(let n=1;n<e.length;n+=1)t=Bg(t,e[n]);return t}function Bg(e,t){return K4(t)?t(e):nG(e,t)}function nG(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=eS(e.style,r);break}case"className":{e[n]=X4(e.className,r);break}default:rG(n,r)?e[n]=iG(e[n],r):e[n]=r}}return e}function rG(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 K4(e){return typeof e=="function"}function tS(e,t){return K4(e)?e(t):e??ah}function iG(e,t){return t?e?n=>{if(oG(n)){const i=n;nS(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 nS(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function X4(e,t){return t?e?t+" "+e:t:e}function oG(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Q4(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,o=S.useRef(null),a=Y4(!0)!==void 0,l=Zw(()=>{const m=o.current;return!!((m==null?void 0:m.tagName)==="A"&&(m!=null&&m.href))}),{props:c}=eG({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:i}),f=S.useCallback(()=>{const m=o.current;sG(m)&&a&&t&&c.disabled===void 0&&m.disabled&&(m.disabled=!1)},[t,c.disabled,a]);Jw(f,[f]);const h=S.useCallback((m={})=>{const{onClick:g,onMouseDown:b,onKeyUp:v,onKeyDown:w,onPointerDown:x,...k}=m;return W4({type:i?"button":void 0,onClick(C){if(t){C.preventDefault();return}g==null||g(C)},onMouseDown(C){t||(b==null||b(C))},onKeyDown(C){if(t||(nS(C),w==null||w(C)),C.baseUIHandlerPrevented)return;const R=C.target===C.currentTarget&&!i&&!l()&&!t,_=C.key==="Enter",D=C.key===" ";R&&((D||_)&&C.preventDefault(),_&&(g==null||g(C)))},onKeyUp(C){t||(nS(C),v==null||v(C)),!C.baseUIHandlerPrevented&&C.target===C.currentTarget&&!i&&!t&&C.key===" "&&(g==null||g(C))},onPointerDown(C){if(t){C.preventDefault();return}x==null||x(C)}},i?void 0:{role:"button"},c,k)},[t,c,i,l]),p=Zw(m=>{o.current=m,f()});return{getButtonProps:h,buttonRef:p}}function sG(e){return YV(e)&&e.tagName==="BUTTON"}function rS(e,t,n,r){const i=XE(Z4).current;return lG(i,e,t,n,r)&&J4(i,[e,t,n,r]),i.callback}function aG(e){const t=XE(Z4).current;return uG(t,e)&&J4(t,e),t.callback}function Z4(){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 uG(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function J4(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 cG=parseInt(S.version,10);function fG(e){return cG>=e}function iD(e){if(!S.isValidElement(e))return null;const t=e,n=t.props;return(fG(19)?n==null?void 0:n.ref:t.ref)??null}function dG(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 hG(e,t){return typeof e=="function"?e(t):e}function pG(e,t){return typeof e=="function"?e(t):e}const oD=Object.freeze([]),Ea=Object.freeze({});function ZE(e,t,n={}){const r=t.render,i=mG(t,n);if(n.enabled===!1)return null;const o=n.state??Ea;return yG(e,r,i,o)}function mG(e,t={}){const{className:n,style:r,render:i}=e,{state:o=Ea,ref:a,props:l,stateAttributesMapping:c,enabled:f=!0}=t,h=f?hG(n,o):void 0,p=f?pG(r,o):void 0,m=f?dG(o,c):Ea,g=f?eS(m,Array.isArray(l)?tG(l):l)??Ea:Ea;return typeof document<"u"&&(f?Array.isArray(a)?g.ref=aG([g.ref,iD(i),...a]):g.ref=rS(g.ref,iD(i),a):rS(null,null)),f?(h!==void 0&&(g.className=X4(g.className,h)),p!==void 0&&(g.style=eS(g.style,p)),g):Ea}const gG=Symbol.for("react.lazy");function yG(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=W4(n,t.props);i.ref=n.ref;let o=t;return(o==null?void 0:o.$$typeof)===gG&&(o=S.Children.toArray(t)[0]),S.cloneElement(o,i)}if(e&&typeof e=="string")return bG(e,n);throw new Error(QE(8))}function bG(e,t){return e==="button"?S.createElement("button",{type:"button",...t,key:t.key}):e==="img"?S.createElement("img",{alt:"",...t,key:t.key}):S.createElement(e,t)}const vG=S.forwardRef(function(e,t){const{render:n,className:r,disabled:i=!1,focusableWhenDisabled:o=!1,nativeButton:a=!0,...l}=e,{getButtonProps:c,buttonRef:f}=Q4({disabled:i,focusableWhenDisabled:o,native:a});return ZE("button",e,{state:{disabled:i},ref:[t,f],props:[l,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 eP=(...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 xG=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 wG=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 sD=e=>{const t=wG(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 SG={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 EG=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 CG=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:a,...l},c)=>S.createElement("svg",{ref:c,...SG,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:eP("lucide",i),...!o&&!EG(l)&&{"aria-hidden":"true"},...l},[...a.map(([f,h])=>S.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 mt=(e,t)=>{const n=S.forwardRef(({className:r,...i},o)=>S.createElement(CG,{ref:o,iconNode:t,className:eP(`lucide-${xG(sD(e))}`,`lucide-${e}`,r),...i}));return n.displayName=sD(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 kG=[["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"}]],RG=mt("activity",kG);/**
|
|
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 AG=[["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"}]],TG=mt("archive-restore",AG);/**
|
|
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 _G=[["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"}]],DG=mt("archive",_G);/**
|
|
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 MG=[["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"}]],$G=mt("arrow-left-right",MG);/**
|
|
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 OG=[["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"}]],PG=mt("case-sensitive",OG);/**
|
|
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 IG=[["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"}]],LG=mt("chart-gantt",IG);/**
|
|
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 NG=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],JE=mt("check",NG);/**
|
|
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 jG=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],FG=mt("chevrons-up-down",jG);/**
|
|
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 zG=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],BG=mt("circle-check",zG);/**
|
|
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 HG=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],UG=mt("circle-dot",HG);/**
|
|
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 qG=[["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"}]],VG=mt("circle-question-mark",qG);/**
|
|
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 GG=[["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"}]],YG=mt("circle-x",GG);/**
|
|
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 WG=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],tP=mt("clock",WG);/**
|
|
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 KG=[["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"}]],eC=mt("copy",KG);/**
|
|
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 XG=[["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"}]],QG=mt("cpu",XG);/**
|
|
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 ZG=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],JG=mt("ellipsis",ZG);/**
|
|
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 eY=[["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"}]],tY=mt("eye-off",eY);/**
|
|
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 nY=[["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"}]],rY=mt("eye",nY);/**
|
|
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 iY=[["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"}]],nP=mt("file-diff",iY);/**
|
|
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 oY=[["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"}]],rP=mt("files",oY);/**
|
|
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 sY=[["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"}]],aY=mt("git-branch",sY);/**
|
|
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 lY=[["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"}]],uY=mt("grip-vertical",lY);/**
|
|
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 cY=[["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"}]],fY=mt("group",cY);/**
|
|
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 dY=[["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"}]],hY=mt("handshake",dY);/**
|
|
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 pY=[["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"}]],mY=mt("hourglass",pY);/**
|
|
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 gY=[["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"}]],yY=mt("message-square-more",gY);/**
|
|
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 bY=[["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"}]],vY=mt("message-square",bY);/**
|
|
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 xY=[["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"}]],wY=mt("messages-square",xY);/**
|
|
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 SY=[["path",{d:"M5 12h14",key:"1ays0h"}]],EY=mt("minus",SY);/**
|
|
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 CY=[["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"}]],kY=mt("monitor",CY);/**
|
|
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 RY=[["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"}]],AY=mt("moon",RY);/**
|
|
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 TY=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],_Y=mt("panel-right",TY);/**
|
|
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 DY=[["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"}]],MY=mt("pencil",DY);/**
|
|
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 $Y=[["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"}]],OY=mt("play",$Y);/**
|
|
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 PY=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],IY=mt("search",PY);/**
|
|
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 LY=[["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"}]],NY=mt("sparkles",LY);/**
|
|
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 jY=[["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"}]],FY=mt("sun",jY);/**
|
|
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 zY=[["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"}]],BY=mt("tags",zY);/**
|
|
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 HY=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],UY=mt("terminal",HY);/**
|
|
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 qY=[["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"}]],aD=mt("text-wrap",qY);/**
|
|
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 VY=[["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"}]],GY=mt("trash-2",VY);/**
|
|
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 YY=[["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"}]],WY=mt("triangle-alert",YY);/**
|
|
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 KY=[["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"}]],iP=mt("wrench",KY),oP=({size:e=14,fill:t="currentColor",...n})=>T.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:t,viewBox:"0 0 24 24",width:e,height:e,...n,children:[T.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}),T.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:T.jsx("animateTransform",{attributeName:"transform",dur:"0.75s",repeatCount:"indefinite",type:"rotate",values:"0 12 12;360 12 12"})})]});oP.displayName="LoadingSpinner";const sP=({loading:e,...t})=>T.jsx(oP,{"data-slot":"button-spinner",className:Lr["button-spinner"],"data-loading":e,"aria-hidden":e,...t});sP.displayName="ButtonSpinner";const XY="_card_hf4ip_3",ip={card:XY,"card-thumbnail":"_card-thumbnail_hf4ip_39","card-header-cell":"_card-header-cell_hf4ip_51","card-icon":"_card-icon_hf4ip_55","card-action":"_card-action_hf4ip_61"},aP=({gap:e=3,className:t,children:n,...r})=>T.jsx(Qe,{"data-slot":"card-container",gap:e,className:ze(ip.card,t),...r,children:n});aP.displayName="CardContainer";const lP=({className:e,children:t,...n})=>T.jsx(Qe,{"data-slot":"card-thumbnail",className:ze(ip["card-thumbnail"],e),ax:"stretch",fullwidth:!0,...n,children:t});lP.displayName="CardThumbnail";const uP=({children:e,...t})=>T.jsx(ot,{"data-slot":"card-header",ay:"start",gap:3,fullwidth:!0,...t,children:e});uP.displayName="CardHeader";const cP=({icon:e,render:t,className:n})=>T.jsx(mi,{condition:!!t,render:t,children:e?T.jsx(e,{"data-slot":"card-icon",className:ze(ip["card-icon"],n)}):null});cP.displayName="CardIcon";const fP=({children:e,...t})=>T.jsx(Fe,{"data-slot":"card-title",render:T.jsx("h3",{}),size:1,weight:"semibold",...t,children:e});fP.displayName="CardTitle";const dP=({children:e,className:t,...n})=>T.jsx(ot,{"data-slot":"card-action",className:ze(ip["card-action"],t),gap:2,...n,children:e});dP.displayName="CardAction";const hP=({children:e,...t})=>T.jsx(Fe,{"data-slot":"card-description",render:T.jsx("p",{}),shade:"muted",balance:!0,...t,children:e});hP.displayName="CardDescription";const pP=({children:e,...t})=>T.jsxs(T.Fragment,{children:[T.jsx(KE,{}),T.jsx(ot,{"data-slot":"card-footer",gap:2,fullwidth:!0,...t,children:e})]});pP.displayName="CardFooter";const En=({title:e,description:t,thumbnail:n,icon:r,action:i,footer:o,ContainerProps:a,HeaderProps:l,TitleProps:c,DescriptionProps:f,IconProps:h,ActionProps:p,FooterProps:m,ThumbnailProps:g,InnerContainerProps:b,children:v,...w})=>{const x=(f==null?void 0:f.children)||t,k=(c==null?void 0:c.children)||e,C=(p==null?void 0:p.children)||i,R=(h==null?void 0:h.icon)||r,_=!!R,D=!!k,M=!!C,O=!!x,U=_||D||M;return T.jsxs(aP,{...w,...a,children:[n&&T.jsx(lP,{mb:2,...g,children:n}),(U||O)&&T.jsxs(mi,{condition:U&&O,render:T.jsx(Qe,{gap:2,fullwidth:!0}),children:[U&&T.jsxs(uP,{...l,children:[_&&T.jsx(rx,{children:T.jsx(cP,{icon:R,...h})}),D&&T.jsx(rx,{children:T.jsx(fP,{...c,children:k})}),M&&T.jsx(rx,{ml:"auto",children:T.jsx(dP,{...p,children:C})})]}),O&&T.jsx(hP,{...f,children:x})]}),v&&T.jsx(Qe,{"data-slot":"card-inner-container",my:2,...b,children:v}),o&&T.jsx(pP,{...m,children:o})]})};En.displayName="Card";const rx=({children:e,className:t,...n})=>T.jsx(Qe,{className:ze(ip["card-header-cell"],t),ay:"center",...n,children:e}),lD={};function xi(e,t){const n=S.useRef(lD);return n.current===lD&&(n.current=e(t)),n}function mP(e){const t=S.useRef(!0);t.current&&(t.current=!1,e())}const ix=rl[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],QY=ix&&ix!==S.useLayoutEffect?ix:e=>e();function ft(e){const t=xi(ZY).current;return t.next=e,QY(t.effect),t.trampoline}function ZY(){const e={next:void 0,callback:JY,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function JY(){}function wb(){return typeof window<"u"}function ol(e){return tC(e)?(e.nodeName||"").toLowerCase():"#document"}function kn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function No(e){var t;return(t=(tC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function tC(e){return wb()?e instanceof Node||e instanceof kn(e).Node:!1}function Yt(e){return wb()?e instanceof Element||e instanceof kn(e).Element:!1}function Ln(e){return wb()?e instanceof HTMLElement||e instanceof kn(e).HTMLElement:!1}function iS(e){return!wb()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof kn(e).ShadowRoot}const eW=new Set(["inline","contents"]);function sl(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=gi(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!eW.has(i)}const tW=new Set(["table","td","th"]);function nW(e){return tW.has(ol(e))}const rW=[":popover-open",":modal"];function Sb(e){return rW.some(t=>{try{return e.matches(t)}catch{return!1}})}const iW=["transform","translate","scale","rotate","perspective"],oW=["transform","translate","scale","rotate","perspective","filter"],sW=["paint","layout","strict","content"];function nC(e){const t=Eb(),n=Yt(e)?gi(e):e;return iW.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)||oW.some(r=>(n.willChange||"").includes(r))||sW.some(r=>(n.contain||"").includes(r))}function aW(e){let t=Ms(e);for(;Ln(t)&&!Rs(t);){if(nC(t))return t;if(Sb(t))return null;t=Ms(t)}return null}function Eb(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const lW=new Set(["html","body","#document"]);function Rs(e){return lW.has(ol(e))}function gi(e){return kn(e).getComputedStyle(e)}function Cb(e){return Yt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ms(e){if(ol(e)==="html")return e;const t=e.assignedSlot||e.parentNode||iS(e)&&e.host||No(e);return iS(t)?t.host:t}function gP(e){const t=Ms(e);return Rs(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ln(t)&&sl(t)?t:gP(t)}function Va(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=gP(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=kn(i);if(o){const l=oS(a);return t.concat(a,a.visualViewport||[],sl(i)?i:[],l&&n?Va(l):[])}return t.concat(i,Va(i,[],n))}function oS(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Lf=typeof navigator<"u",ox=cW(),yP=dW(),bP=fW(),vP=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),xP=ox.platform==="MacIntel"&&ox.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(ox.platform),wP=Lf&&/apple/i.test(navigator.vendor),sS=Lf&&/android/i.test(yP)||/android/i.test(bP),uW=Lf&&yP.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,SP=bP.includes("jsdom/");function cW(){if(!Lf)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 fW(){if(!Lf)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function dW(){if(!Lf)return"";const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform??""}function Vt(e){return(e==null?void 0:e.ownerDocument)||document}const hW=()=>{},$t=typeof document<"u"?S.useLayoutEffect:hW,pW=[];function kb(e){S.useEffect(e,pW)}const Yd=0;let Io=class EP{constructor(){ce(this,"currentId",Yd);ce(this,"clear",()=>{this.currentId!==Yd&&(clearTimeout(this.currentId),this.currentId=Yd)});ce(this,"disposeEffect",()=>this.clear)}static create(){return new EP}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Yd,n()},t)}isStarted(){return this.currentId!==Yd}};function tl(){const e=xi(Io.create).current;return kb(e.disposeEffect),e}const Um=null;let mW=class{constructor(){ce(this,"callbacks",[]);ce(this,"callbacksCount",0);ce(this,"nextId",1);ce(this,"startId",1);ce(this,"isScheduled",!1);ce(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 qm=new mW;let wa=class CP{constructor(){ce(this,"currentId",Um);ce(this,"cancel",()=>{this.currentId!==Um&&(qm.cancel(this.currentId),this.currentId=Um)});ce(this,"disposeEffect",()=>this.cancel)}static create(){return new CP}static request(t){return qm.request(t)}static cancel(t){return qm.cancel(t)}request(t){this.cancel(),this.currentId=qm.request(()=>{this.currentId=Um,t()})}};function rC(){const e=xi(wa.create).current;return kb(e.disposeEffect),e}function kP(){}const Fr=Object.freeze({});let uD={},cD={},fD="";function gW(e){if(typeof document>"u")return!1;const t=Vt(e);return kn(t).innerWidth-t.documentElement.clientWidth>0}function yW(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const t=Vt(e),n=t.documentElement,r=t.body,i=sl(n)?n:r,o=i.style.overflowY,a=n.style.scrollbarGutter;n.style.scrollbarGutter="stable",i.style.overflowY="scroll";const l=i.offsetWidth;i.style.overflowY="hidden";const c=i.offsetWidth;return i.style.overflowY=o,n.style.scrollbarGutter=a,l===c}function bW(e){const t=Vt(e),n=t.documentElement,r=t.body,i=sl(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 vW(e){var m;const t=Vt(e),n=t.documentElement,r=t.body,i=kn(n);let o=0,a=0,l=!1;const c=wa.create();if(vP&&(((m=i.visualViewport)==null?void 0:m.scale)??1)!==1)return()=>{};function f(){const g=i.getComputedStyle(n),b=i.getComputedStyle(r),v=(g.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";o=n.scrollTop,a=n.scrollLeft,uD={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},fD=n.style.scrollBehavior,cD={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 w=n.scrollHeight>n.clientHeight,x=n.scrollWidth>n.clientWidth,k=g.overflowY==="scroll"||b.overflowY==="scroll",C=g.overflowX==="scroll"||b.overflowX==="scroll",R=Math.max(0,i.innerWidth-r.clientWidth),_=Math.max(0,i.innerHeight-r.clientHeight),D=parseFloat(b.marginTop)+parseFloat(b.marginBottom),M=parseFloat(b.marginLeft)+parseFloat(b.marginRight),O=sl(n)?n:r;if(l=yW(e),l){n.style.scrollbarGutter=v,O.style.overflowY="hidden",O.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:v,overflowY:"hidden",overflowX:"hidden"}),(w||k)&&(n.style.overflowY="scroll"),(x||C)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:D||_?`calc(100dvh - ${D+_}px)`:"100dvh",width:M||R?`calc(100vw - ${M+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,uD),Object.assign(r.style,cD),l||(n.scrollTop=o,n.scrollLeft=a,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=fD)}function p(){h(),c.request(f)}return f(),i.addEventListener("resize",p),()=>{c.cancel(),h(),typeof i.removeEventListener=="function"&&i.removeEventListener("resize",p)}}let xW=class{constructor(){ce(this,"lockCount",0);ce(this,"restore",null);ce(this,"timeoutLock",Io.create());ce(this,"timeoutUnlock",Io.create());ce(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});ce(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=Vt(t).documentElement,r=kn(n).getComputedStyle(n).overflowY;if(r==="hidden"||r==="clip"){this.restore=kP;return}const i=xP||!gW(t);this.restore=i?bW(t):vW(t)}};const wW=new xW;function SW(e=!0,t=null){$t(()=>{if(e)return wW.acquire(t)},[e,t])}function EW(e){const t=S.useRef(""),n=S.useCallback(r=>{r.defaultPrevented||(t.current=r.pointerType,e(r,r.pointerType))},[e]);return{onClick:S.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 CW(e){const[t,n]=S.useState(null),r=ft((l,c)=>{e||n(c||(xP?"touch":""))}),i=S.useCallback(()=>{n(null)},[]),{onClick:o,onPointerDown:a}=EW(r);return S.useMemo(()=>({openMethod:t,reset:i,triggerProps:{onClick:o,onPointerDown:a}}),[t,i,o,a])}function hn(e,t,n,r){let i=!1,o=!1;const a=Fr;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 kW(e,t=!1,n=!1){const[r,i]=S.useState(e&&t?"idle":void 0),[o,a]=S.useState(e);return e&&!o&&(a(!0),i("starting")),!e&&o&&r!=="ending"&&!n&&i("ending"),!e&&!o&&r==="ending"&&i(void 0),$t(()=>{if(!e&&o&&r!=="ending"&&n){const l=wa.request(()=>{i("ending")});return()=>{wa.cancel(l)}}},[e,o,r,n]),$t(()=>{if(!e||t)return;const l=wa.request(()=>{i(void 0)});return()=>{wa.cancel(l)}},[t,e]),$t(()=>{if(!e||!t)return;e&&o&&r!=="idle"&&i("starting");const l=wa.request(()=>{i("idle")});return()=>{wa.cancel(l)}},[t,e,o,i,r]),S.useMemo(()=>({mounted:o,setMounted:a,transitionStatus:r}),[o,r])}function hs(e){return e==null?e:"current"in e?e.current:e}let Oh=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const RW={[Oh.startingStyle]:""},AW={[Oh.endingStyle]:""},Rb={transitionStatus(e){return e==="starting"?RW:e==="ending"?AW:null}};function TW(e,t=!1,n=!0){const r=rC();return ft((i,o=null)=>{r.cancel();function a(){Rn.flushSync(i)}const l=hs(e);if(l==null)return;const c=l;if(typeof c.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)i();else{let f=function(){const p=Oh.startingStyle;if(!c.hasAttribute(p)){r.request(h);return}const m=new MutationObserver(()=>{c.hasAttribute(p)||(m.disconnect(),h())});m.observe(c,{attributes:!0,attributeFilter:[p]}),o==null||o.addEventListener("abort",()=>m.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(m=>m.pending||m.playState!=="finished")&&h()})};if(t){f();return}r.request(h)}})}function Ab(e){const{enabled:t=!0,open:n,ref:r,onComplete:i}=e,o=ft(i),a=TW(r,n,!1);S.useEffect(()=>{if(!t)return;const l=new AbortController;return a(o,l.signal),()=>{l.abort()}},[t,n,o,a])}function _W(e,t){const n=S.useRef(null),r=S.useRef(null);return S.useCallback(i=>{if(e!==void 0){if(n.current!==null){const o=n.current,a=r.current,l=t.context.triggerElements.getById(o);a&&l===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 RP(e,t,n,r){const i=n.useState("isMountedByTrigger",e),o=_W(e,n),a=ft(l=>{if(o(l),!l||!n.select("open"))return;const c=n.select("activeTriggerId");if(c===e){n.update({activeTriggerElement:l,...r});return}c==null&&n.update({activeTriggerId:e,activeTriggerElement:l,...r})});return $t(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:a,isMountedByThisTrigger:i}}function AP(e){const t=e.useState("open");$t(()=>{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 TP(e,t,n){const{mounted:r,setMounted:i,transitionStatus:o}=kW(e);t.useSyncedValues({mounted:r,transitionStatus:o});const a=ft(()=>{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)}),l=t.useState("preventUnmountingOnClose");return Ab({enabled:!l,open:e,ref:t.context.popupRef,onComplete(){e||a()}}),{forceUnmount:a,transitionStatus:o}}const DW={...rl};let dD=0;function MW(e,t="mui"){const[n,r]=S.useState(e),i=e||n;return S.useEffect(()=>{n==null&&(dD+=1,r(`${t}-${dD}`))},[n,t]),i}const hD=DW.useId;function Nf(e,t){if(hD!==void 0){const n=hD();return e??(t?`${t}-${n}`:n)}return MW(e,t)}function $W(){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 OW=S.createContext(null),PW=S.createContext(null),Tb=()=>{var e;return((e=S.useContext(OW))==null?void 0:e.id)||null},op=e=>{const t=S.useContext(PW);return e??t};var sx={exports:{}},ax={},pD;function IW(){if(pD)return ax;pD=1;var e=Po;function t(p,m){return p===m&&(p!==0||1/p===1/m)||p!==p&&m!==m}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function l(p,m){var g=m(),b=r({inst:{value:g,getSnapshot:m}}),v=b[0].inst,w=b[1];return o(function(){v.value=g,v.getSnapshot=m,c(v)&&w({inst:v})},[p,g,m]),i(function(){return c(v)&&w({inst:v}),p(function(){c(v)&&w({inst:v})})},[p]),a(g),g}function c(p){var m=p.getSnapshot;p=p.value;try{var g=m();return!n(p,g)}catch{return!0}}function f(p,m){return m()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:l;return ax.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,ax}var mD;function _P(){return mD||(mD=1,sx.exports=IW()),sx.exports}var DP=_P(),lx={exports:{}},ux={},gD;function LW(){if(gD)return ux;gD=1;var e=Po,t=_P();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,l=e.useMemo,c=e.useDebugValue;return ux.useSyncExternalStoreWithSelector=function(f,h,p,m,g){var b=o(null);if(b.current===null){var v={hasValue:!1,value:null};b.current=v}else v=b.current;b=l(function(){function x(D){if(!k){if(k=!0,C=D,D=m(D),g!==void 0&&v.hasValue){var M=v.value;if(g(M,D))return R=M}return R=D}if(M=R,r(C,D))return M;var O=m(D);return g!==void 0&&g(M,O)?(C=D,M):(C=D,R=O)}var k=!1,C,R,_=p===void 0?null:p;return[function(){return x(h())},_===null?void 0:function(){return x(_())}]},[h,p,m,g]);var w=i(f,b[0],b[1]);return a(function(){v.hasValue=!0,v.value=w},[w]),c(w),w},ux}var yD;function NW(){return yD||(yD=1,lx.exports=LW()),lx.exports}var jW=NW();const FW=parseInt(S.version,10);function iC(e){return FW>=e}const aS=[];let lS;function zW(){return lS}function BW(e){aS.push(e)}function MP(e){const t=(n,r)=>{const i=xi(UW).current;let o;try{lS=i;for(const a of aS)a.before(i);o=e(n,r);for(const a of aS)a.after(i);i.didInitialize=!0}finally{lS=void 0}return o};return t.displayName=e.displayName||e.name,t}function HW(e){return S.forwardRef(MP(e))}function UW(){return{didInitialize:!1}}const qW=iC(19),VW=qW?YW:WW;function $P(e,t,n,r,i){return VW(e,t,n,r,i)}function GW(e,t,n,r,i){const o=S.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return DP.useSyncExternalStore(e.subscribe,o,o)}BW({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()}}),DP.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function YW(e,t,n,r,i){const o=zW();if(!o)return GW(e,t,n,r,i);const a=o.syncIndex;o.syncIndex+=1;let l;return o.didInitialize?(l=o.syncHooks[a],(l.store!==e||l.selector!==t||!Object.is(l.a1,n)||!Object.is(l.a2,r)||!Object.is(l.a3,i))&&(l.store!==e&&(o.didChangeStore=!0),l.store=e,l.selector=t,l.a1=n,l.a2=r,l.a3=i,l.didChange=!0)):(l={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i),didChange:!1},o.syncHooks.push(l)),l.value}function WW(e,t,n,r,i){return jW.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,o=>t(o,n,r,i))}let KW=class{constructor(t){ce(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t)}));ce(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 $P(this,t,n,r,i)}},_b=class extends KW{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){S.useDebugValue(t),$t(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;$t(()=>(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);$t(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){S.useDebugValue(t);const r=n!==void 0;$t(()=>{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 S.useDebugValue(t),$P(this,this.selectors[t],n,r,i)}useContextCallback(t,n){S.useDebugValue(t);const r=ft(n??kP);this.context[t]=r}useStateSetter(t){const n=S.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 l=i;i=a,n(a,l,this)}})}};function XW(e){e.preventDefault(),e.stopPropagation()}function QW(e){return"nativeEvent"in e}function ZW(e){return e.pointerType===""&&e.isTrusted?!0:sS&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function JW(e){return SP?!1:!sS&&e.width===0&&e.height===0||sS&&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 yu(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function OP(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}function Ar(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 py=Symbol("NOT_FOUND");function eK(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function tK(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function nK(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 bD=e=>Array.isArray(e)?e:[e];function rK(e){const t=Array.isArray(e[0])?e[0]:e;return nK(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function iK(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}function oK(e){let t;return{get(n){return t&&e(t.key,n)?t.value:py},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function sK(e,t){let n=[];function r(l){const c=n.findIndex(f=>t(l,f.key));if(c>-1){const f=n[c];return c>0&&(n.splice(c,1),n.unshift(f)),f.value}return py}function i(l,c){r(l)===py&&(n.unshift({key:l,value:c}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var aK=(e,t)=>e===t;function lK(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 uK(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=aK,maxSize:i=1,resultEqualityCheck:o}=n,a=lK(r);let l=0;const c=i<=1?oK(a):sK(i,a);function f(){let h=c.get(arguments);if(h===py){if(h=e.apply(null,arguments),l++,o){const p=c.getEntries().find(m=>o(m.value,h));p&&(h=p.value,l!==0&&l--)}c.put(arguments,h)}return h}return f.clearCache=()=>{c.clear(),f.resetResultsCount()},f.resultsCount=()=>l,f.resetResultsCount=()=>{l=0},f}var cK=class{constructor(t){this.value=t}deref(){return this.value}},fK=typeof WeakRef<"u"?WeakRef:cK,dK=0,vD=1;function Vm(){return{s:dK,v:void 0,o:null,p:null}}function PP(e,t={}){let n=Vm();const{resultEqualityCheck:r}=t;let i,o=0;function a(){var p;let l=n;const{length:c}=arguments;for(let m=0,g=c;m<g;m++){const b=arguments[m];if(typeof b=="function"||typeof b=="object"&&b!==null){let v=l.o;v===null&&(l.o=v=new WeakMap);const w=v.get(b);w===void 0?(l=Vm(),v.set(b,l)):l=w}else{let v=l.p;v===null&&(l.p=v=new Map);const w=v.get(b);w===void 0?(l=Vm(),v.set(b,l)):l=w}}const f=l;let h;if(l.s===vD)h=l.v;else if(h=e.apply(null,arguments),o++,r){const m=((p=i==null?void 0:i.deref)==null?void 0:p.call(i))??i;m!=null&&r(m,h)&&(h=m,o!==0&&o--),i=typeof h=="object"&&h!==null||typeof h=="function"?new fK(h):h}return f.s=vD,f.v=h,h}return a.clearCache=()=>{n=Vm(),a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function IP(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,a=0,l,c={},f=i.pop();typeof f=="object"&&(c=f,f=i.pop()),eK(f,`createSelector expects an output function after the inputs, but received: [${typeof f}]`);const h={...n,...c},{memoize:p,memoizeOptions:m=[],argsMemoize:g=PP,argsMemoizeOptions:b=[]}=h,v=bD(m),w=bD(b),x=rK(i),k=p(function(){return o++,f.apply(null,arguments)},...v),C=g(function(){a++;const R=iK(x,arguments);return l=k.apply(null,R),l},...w);return Object.assign(C,{resultFunc:f,memoizedResultFunc:k,dependencies:x,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>l,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:p,argsMemoize:g})};return Object.assign(r,{withTypes:()=>r}),r}var hK=IP(PP),pK=Object.assign((e,t=hK)=>{tK(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,l)=>(o[n[l]]=a,o),{}))},{withTypes:()=>pK});const mK=IP({memoize:uK,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),ct=(e,t,n,r,i,o,...a)=>{if(a.length>0)throw new Error(Ar(1));let l;if(e&&t)l=(c,f,h,p)=>{const m=e(c,f,h,p);return t(m,f,h,p)};else if(e)l=e;else throw new Error("Missing arguments");return l},gK=(...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(Ar(2));return(a,l,c,f)=>{let h=a.__cacheKey__;h||(h={id:n},a.__cacheKey__=h,n+=1);let p=t.get(h);if(!p){let m=e;const g=[void 0,void 0,void 0];switch(o){case 0:break;case 1:{m=[...e.slice(0,-1),()=>g[0],r];break}case 2:{m=[...e.slice(0,-1),()=>g[0],()=>g[1],r];break}case 3:{m=[...e.slice(0,-1),()=>g[0],()=>g[1],()=>g[2],r];break}default:throw new Error(Ar(2))}p=mK(...m),p.selectorArgs=g,t.set(h,p)}switch(p.selectorArgs[0]=l,p.selectorArgs[1]=c,p.selectorArgs[2]=f,o){case 0:return p(a);case 1:return p(a,l);case 2:return p(a,l,c);case 3:return p(a,l,c,f);default:throw new Error("unreachable")}}},yK={open:ct(e=>e.open),domReferenceElement:ct(e=>e.domReferenceElement),referenceElement:ct(e=>e.positionReference??e.referenceElement),floatingElement:ct(e=>e.floatingElement),floatingId:ct(e=>e.floatingId)};let oC=class extends _b{constructor(n){const{nested:r,noEmit:i,onOpenChange:o,triggerElements:a,...l}=n;super({...l,positionReference:l.referenceElement,domReferenceElement:l.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:$W(),nested:r,noEmit:i,triggerElements:a},yK);ce(this,"setOpen",(n,r)=>{var i,o;if((!n||!this.state.open||OP(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 LP(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:i}=e,o=Nf(),a=Tb()!=null,l=t.useState("open"),c=t.useState("activeTriggerElement"),f=t.useState(r?"popupElement":"positionerElement"),h=t.context.triggerElements,p=xi(()=>new oC({open:l,referenceElement:c,floatingElement:f,triggerElements:h,onOpenChange:i,floatingId:o,nested:a,noEmit:n})).current;return $t(()=>{const m={open:l,floatingId:o,referenceElement:c,floatingElement:f};Yt(c)&&(m.domReferenceElement=c),p.state.positionReference===p.state.referenceElement&&(m.positionReference=c),p.update(m)},[l,o,c,f,p]),p.context.onOpenChange=i,p.context.nested=a,p.context.noEmit=n,p}const uS="data-base-ui-focusable",NP="active",jP="selected",FP="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function oi(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 wt(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&&iS(n)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function my(e,t){if(!Yt(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,r]of t.entries())if(wt(r,n))return!r.hasAttribute("data-trigger-disabled");return!1}function ir(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Ji(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 bK(e){return e.matches("html,body")}function Db(e){return Ln(e)&&e.matches(FP)}function xD(e){return e?e.getAttribute("role")==="combobox"&&Db(e):!1}function gy(e){if(!e||SP)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function cS(e){return e?e.hasAttribute(uS)?e:e.querySelector(`[${uS}]`)||e:null}const vK=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function xK(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:l="dialog"}=t,c=Nf(),f=(o==null?void 0:o.id)||c,h=S.useMemo(()=>{var x;return((x=cS(a))==null?void 0:x.id)||i},[a,i]),p=vK.get(l)??l,m=Tb()!=null,g=S.useMemo(()=>p==="tooltip"||l==="label"?Fr:{"aria-haspopup":p==="alertdialog"?"dialog":p,"aria-expanded":"false",...p==="listbox"&&{role:"combobox"},...p==="menu"&&m&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[p,m,l]),b=S.useMemo(()=>p==="tooltip"||l==="label"?{[`aria-${l==="label"?"labelledby":"describedby"}`]:r?h:void 0}:{...g,"aria-expanded":r?"true":"false","aria-controls":r?h:void 0,...p==="menu"&&{id:f}},[p,h,r,f,l,g]),v=S.useMemo(()=>{const x={id:h,...p&&{role:p}};return p==="tooltip"||l==="label"?x:{...x,...p==="menu"&&{"aria-labelledby":f}}},[p,h,f,l]),w=S.useCallback(({active:x,selected:k})=>{const C={role:"option",...x&&{id:`${h}-fui-option`}};switch(l){case"select":case"combobox":return{...C,"aria-selected":k}}return{}},[h,l]);return S.useMemo(()=>({reference:b,floating:v,item:w,trigger:g}),[b,v,g,w])}function yf(e){return`data-base-ui-${e}`}function fu(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,...fu(e,r.id,n)])}function wD(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 sC="none",Ph="trigger-press",ro="trigger-hover",Hg="trigger-focus",zP="outside-press",BP="focus-out",aC="escape-key",wK="disabled",HP="imperative-action",SK={intentional:"onClick",sloppy:"onPointerDown"};function EK(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 UP(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:l,dataRef:c}=n.context,{enabled:f=!0,escapeKey:h=!0,outsidePress:p=!0,outsidePressEvent:m="sloppy",referencePress:g=!1,referencePressEvent:b="sloppy",ancestorScroll:v=!1,bubbles:w,externalTree:x}=t,k=op(x),C=ft(typeof p=="function"?p:()=>!1),R=typeof p=="function"?C:p,_=S.useRef(!1),{escapeKey:D,outsidePress:M}=EK(w),O=S.useRef(null),U=tl(),L=tl(),I=ft(()=>{L.clear(),c.current.insideReactTree=!1}),$=S.useRef(!1),B=S.useRef(""),V=ft(Y=>{B.current=Y.pointerType}),F=ft(()=>{const Y=B.current,W=Y==="pen"||!Y?"mouse":Y,Q=typeof m=="function"?m():m;return typeof Q=="string"?Q:Q[W]}),z=ft(Y=>{var me;if(!r||!f||!h||Y.key!=="Escape"||$.current)return;const W=(me=c.current.floatingContext)==null?void 0:me.nodeId,Q=k?fu(k.nodesRef.current,W):[];if(!D&&Q.length>0){let te=!0;if(Q.forEach(Z=>{var ie;(ie=Z.context)!=null&&ie.open&&!Z.context.dataRef.current.__escapeKeyBubbles&&(te=!1)}),!te)return}const pe=QW(Y)?Y.nativeEvent:Y,oe=hn(aC,pe);n.setOpen(!1,oe),!D&&!oe.isPropagationAllowed&&Y.stopPropagation()}),j=ft(Y=>{const W=F();return W==="intentional"&&Y.type!=="click"||W==="sloppy"&&Y.type==="click"}),H=ft(()=>{c.current.insideReactTree=!0,L.start(0,I)}),X=ft((Y,W=!1)=>{var Se;if(j(Y)){I();return}if(c.current.insideReactTree){I();return}if(F()==="intentional"&&W||typeof R=="function"&&!R(Y))return;const Q=ir(Y),pe=`[${yf("inert")}]`,oe=Vt(n.select("floatingElement")).querySelectorAll(pe),me=n.context.triggerElements;if(Q&&(me.hasElement(Q)||me.hasMatchingElement(ke=>wt(ke,Q))))return;let te=Yt(Q)?Q:null;for(;te&&!Rs(te);){const ke=Ms(te);if(Rs(ke)||!Yt(ke))break;te=ke}if(oe.length&&Yt(Q)&&!bK(Q)&&!wt(Q,n.select("floatingElement"))&&Array.from(oe).every(ke=>!wt(te,ke)))return;if(Ln(Q)&&!("touches"in Y)){const ke=Rs(Q),ge=gi(Q),_e=/auto|scroll/,de=ke||_e.test(ge.overflowX),Ce=ke||_e.test(ge.overflowY),ye=de&&Q.clientWidth>0&&Q.scrollWidth>Q.clientWidth,Me=Ce&&Q.clientHeight>0&&Q.scrollHeight>Q.clientHeight,Pe=ge.direction==="rtl",Ke=Me&&(Pe?Y.offsetX<=Q.offsetWidth-Q.clientWidth:Y.offsetX>Q.clientWidth),Et=ye&&Y.offsetY>Q.clientHeight;if(Ke||Et)return}const Z=(Se=c.current.floatingContext)==null?void 0:Se.nodeId,ie=k&&fu(k.nodesRef.current,Z).some(ke=>{var ge;return Ji(Y,(ge=ke.context)==null?void 0:ge.elements.floating)});if(Ji(Y,n.select("floatingElement"))||Ji(Y,n.select("domReferenceElement"))||ie)return;const J=k?fu(k.nodesRef.current,Z):[];if(J.length>0){let ke=!0;if(J.forEach(ge=>{var _e;(_e=ge.context)!=null&&_e.open&&!ge.context.dataRef.current.__outsidePressBubbles&&(ke=!1)}),!ke)return}n.setOpen(!1,hn(zP,Y)),I()}),P=ft(Y=>{F()!=="sloppy"||Y.pointerType==="touch"||!n.select("open")||!f||Ji(Y,n.select("floatingElement"))||Ji(Y,n.select("domReferenceElement"))||X(Y)}),K=ft(Y=>{if(F()!=="sloppy"||!n.select("open")||!f||Ji(Y,n.select("floatingElement"))||Ji(Y,n.select("domReferenceElement")))return;const W=Y.touches[0];W&&(O.current={startTime:Date.now(),startX:W.clientX,startY:W.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},U.start(1e3,()=>{O.current&&(O.current.dismissOnTouchEnd=!1,O.current.dismissOnMouseDown=!1)}))}),ee=ft(Y=>{const W=ir(Y);function Q(){K(Y),W==null||W.removeEventListener(Y.type,Q)}W==null||W.addEventListener(Y.type,Q)}),q=ft(Y=>{const W=_.current;if(_.current=!1,U.clear(),Y.type==="mousedown"&&O.current&&!O.current.dismissOnMouseDown)return;const Q=ir(Y);function pe(){Y.type==="pointerdown"?P(Y):X(Y,W),Q==null||Q.removeEventListener(Y.type,pe)}Q==null||Q.addEventListener(Y.type,pe)}),ae=ft(Y=>{if(F()!=="sloppy"||!O.current||Ji(Y,n.select("floatingElement"))||Ji(Y,n.select("domReferenceElement")))return;const W=Y.touches[0];if(!W)return;const Q=Math.abs(W.clientX-O.current.startX),pe=Math.abs(W.clientY-O.current.startY),oe=Math.sqrt(Q*Q+pe*pe);oe>5&&(O.current.dismissOnTouchEnd=!0),oe>10&&(X(Y),U.clear(),O.current=null)}),re=ft(Y=>{const W=ir(Y);function Q(){ae(Y),W==null||W.removeEventListener(Y.type,Q)}W==null||W.addEventListener(Y.type,Q)}),fe=ft(Y=>{F()!=="sloppy"||!O.current||Ji(Y,n.select("floatingElement"))||Ji(Y,n.select("domReferenceElement"))||(O.current.dismissOnTouchEnd&&X(Y),U.clear(),O.current=null)}),ve=ft(Y=>{const W=ir(Y);function Q(){fe(Y),W==null||W.removeEventListener(Y.type,Q)}W==null||W.addEventListener(Y.type,Q)});S.useEffect(()=>{if(!r||!f)return;c.current.__escapeKeyBubbles=D,c.current.__outsidePressBubbles=M;const Y=new Io;function W(te){n.setOpen(!1,hn(sC,te))}function Q(){Y.clear(),$.current=!0}function pe(){Y.start(Eb()?5:0,()=>{$.current=!1})}const oe=Vt(i);oe.addEventListener("pointerdown",V,!0),h&&(oe.addEventListener("keydown",z),oe.addEventListener("compositionstart",Q),oe.addEventListener("compositionend",pe)),R&&(oe.addEventListener("click",q,!0),oe.addEventListener("pointerdown",q,!0),oe.addEventListener("touchstart",ee,!0),oe.addEventListener("touchmove",re,!0),oe.addEventListener("touchend",ve,!0),oe.addEventListener("mousedown",q,!0));let me=[];return v&&(Yt(a)&&(me=Va(a)),Yt(i)&&(me=me.concat(Va(i))),!Yt(o)&&o&&o.contextElement&&(me=me.concat(Va(o.contextElement)))),me=me.filter(te=>{var Z;return te!==((Z=oe.defaultView)==null?void 0:Z.visualViewport)}),me.forEach(te=>{te.addEventListener("scroll",W,{passive:!0})}),()=>{oe.removeEventListener("pointerdown",V,!0),h&&(oe.removeEventListener("keydown",z),oe.removeEventListener("compositionstart",Q),oe.removeEventListener("compositionend",pe)),R&&(oe.removeEventListener("click",q,!0),oe.removeEventListener("pointerdown",q,!0),oe.removeEventListener("touchstart",ee,!0),oe.removeEventListener("touchmove",re,!0),oe.removeEventListener("touchend",ve,!0),oe.removeEventListener("mousedown",q,!0)),me.forEach(te=>{te.removeEventListener("scroll",W)}),Y.clear(),_.current=!1}},[c,i,o,a,h,R,r,l,v,f,D,M,z,X,q,P,ee,re,ve,V,n]),S.useEffect(I,[R,I]);const Re=S.useMemo(()=>({onKeyDown:z,...g&&{[SK[b]]:Y=>{n.setOpen(!1,hn(Ph,Y.nativeEvent))},...b!=="intentional"&&{onClick(Y){n.setOpen(!1,hn(Ph,Y.nativeEvent))}}}}),[z,n,g,b]),le=ft(Y=>{const W=ir(Y.nativeEvent);!wt(n.select("floatingElement"),W)||Y.button!==0||(_.current=!0)}),Ae=ft(Y=>{!r||!f||Y.button!==0||(_.current=!0)}),Ie=S.useMemo(()=>({onKeyDown:z,onPointerDown:le,onMouseDown:le,onMouseUp:le,onClickCapture:H,onMouseDownCapture(Y){H(),Ae(Y)},onPointerDownCapture(Y){H(),Ae(Y)},onMouseUpCapture:H,onTouchEndCapture:H,onTouchMoveCapture:H}),[z,le,H,Ae]);return S.useMemo(()=>f?{reference:Re,floating:Ie,trigger:Re}:{},[f,Re,Ie])}function lC(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=S.useCallback(f=>Gm(f,e,"reference"),t),a=S.useCallback(f=>Gm(f,e,"floating"),n),l=S.useCallback(f=>Gm(f,e,"item"),r),c=S.useCallback(f=>Gm(f,e,"trigger"),i);return S.useMemo(()=>({getReferenceProps:o,getFloatingProps:a,getItemProps:l,getTriggerProps:c}),[o,a,l,c])}function Gm(e,t,n){var a;const r=new Map,i=n==="item",o={};n==="floating"&&(o.tabIndex=-1,o[uS]="");for(const l in e)i&&e&&(l===NP||l===jP)||(o[l]=e[l]);for(let l=0;l<t.length;l+=1){let c;const f=(a=t[l])==null?void 0:a[n];typeof f=="function"?c=e?f(e):null:c=f,c&&SD(o,c,i,r)}return SD(o,e,i,r),o}function SD(e,t,n,r){var i;for(const o in t){const a=t[o];n&&(o===NP||o===jP)||(o.startsWith("on")?(r.has(o)||r.set(o,[]),typeof a=="function"&&((i=r.get(o))==null||i.push(a),e[o]=(...l)=>{var c;return(c=r.get(o))==null?void 0:c.map(f=>f(...l)).find(f=>f!==void 0)})):e[o]=a)}}function CK(e){const{store:t,parentContext:n,actionsRef:r}=e,i=t.useState("open"),o=t.useState("disablePointerDismissal"),a=t.useState("modal"),l=t.useState("popupElement"),{openMethod:c,triggerProps:f,reset:h}=CW(i);AP(t);const{forceUnmount:p}=TP(i,t,()=>{h()}),m=ft(L=>{const I=hn(L);return I.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},I}),g=S.useCallback(()=>{t.setOpen(!1,m(HP))},[t,m]);S.useImperativeHandle(r,()=>({unmount:p,close:g}),[p,g]);const b=LP({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[v,w]=S.useState(0),x=v===0,k=xK(b),C=UP(b,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:a==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(L){if(!t.context.outsidePressEnabledRef.current||"button"in L&&L.button!==0||"touches"in L&&L.touches.length!==1)return!1;const I=ir(L);if(x&&!o){const $=I;return a&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===$||t.context.backdropRef.current===$||wt($,l)&&!($!=null&&$.hasAttribute("data-base-ui-portal")):!0}return!1},escapeKey:x});SW(i&&a===!0,l);const{getReferenceProps:R,getFloatingProps:_,getTriggerProps:D}=lC([k,C]);t.useContextCallback("onNestedDialogOpen",L=>{w(L+1)}),t.useContextCallback("onNestedDialogClose",()=>{w(0)}),S.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 M=S.useMemo(()=>R(f),[R,f]),O=S.useMemo(()=>D(f),[D,f]),U=S.useMemo(()=>_(),[_]);t.useSyncedValues({openMethod:c,activeTriggerProps:M,inactiveTriggerProps:O,popupProps:U,floatingRootContext:b,nestedOpenDialogCount:v})}const qP=S.createContext(void 0);function sp(e){const t=S.useContext(qP);if(e===!1&&t===void 0)throw new Error(Ar(27));return t}let Mb=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 kK(){return new oC({open:!1,floatingElement:null,referenceElement:null,triggerElements:new Mb,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function VP(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:"idle",floatingRootContext:kK(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Fr,inactiveTriggerProps:Fr,popupProps:Fr}}const Ym=ct(e=>e.triggerIdProp??e.activeTriggerId),GP={open:ct(e=>e.openProp??e.open),mounted:ct(e=>e.mounted),transitionStatus:ct(e=>e.transitionStatus),floatingRootContext:ct(e=>e.floatingRootContext),preventUnmountingOnClose:ct(e=>e.preventUnmountingOnClose),payload:ct(e=>e.payload),activeTriggerId:Ym,activeTriggerElement:ct(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:ct((e,t)=>t!==void 0&&Ym(e)===t),isOpenedByTrigger:ct((e,t)=>t!==void 0&&Ym(e)===t&&e.open),isMountedByTrigger:ct((e,t)=>t!==void 0&&Ym(e)===t&&e.mounted),triggerProps:ct((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:ct(e=>e.popupProps),popupElement:ct(e=>e.popupElement),positionerElement:ct(e=>e.positionerElement)},RK={...GP,modal:ct(e=>e.modal),nested:ct(e=>e.nested),nestedOpenDialogCount:ct(e=>e.nestedOpenDialogCount),disablePointerDismissal:ct(e=>e.disablePointerDismissal),openMethod:ct(e=>e.openMethod),descriptionElementId:ct(e=>e.descriptionElementId),titleElementId:ct(e=>e.titleElementId),viewportElement:ct(e=>e.viewportElement),role:ct(e=>e.role)};let AK=class extends _b{constructor(n){super(TK(n),{popupRef:S.createRef(),backdropRef:S.createRef(),internalBackdropRef:S.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new Mb,onOpenChange:void 0,onOpenChangeComplete:void 0},RK);ce(this,"setOpen",(n,r)=>{var l,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=(l=this.context).onOpenChange)==null||c.call(l,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 TK(e={}){return{...VP(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}function _K(e){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:o,disablePointerDismissal:a=!1,modal:l=!0,actionsRef:c,handle:f,triggerId:h,defaultTriggerId:p=null}=e,m=sp(!0),g=!!m,b=xi(()=>(f==null?void 0:f.store)??new AK({open:r,openProp:n,activeTriggerId:p,triggerIdProp:h,modal:l,disablePointerDismissal:a,nested:g})).current;mP(()=>{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:g,modal:l}),b.useContextCallback("onOpenChange",i),b.useContextCallback("onOpenChangeComplete",o);const v=b.useState("payload");CK({store:b,actionsRef:c,parentContext:m==null?void 0:m.store.context});const w=S.useMemo(()=>({store:b}),[b]);return T.jsx(qP.Provider,{value:w,children:typeof t=="function"?t({payload:v}):t})}const DK=S.createContext(void 0);function MK(e=!1){const t=S.useContext(DK);if(t===void 0&&!e)throw new Error(Ar(16));return t}function $K(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:o}=e,a=r&&t!==!1,l=r&&t===!1;return{props:S.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||l)&&(c.disabled=n),c},[r,n,t,a,l,o,i])}}function fS(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const lh={};function YP(e,t,n,r,i){let o={...dS(e,lh)};return t&&(o=Ug(o,t)),n&&(o=Ug(o,n)),r&&(o=Ug(o,r)),o}function OK(e){if(e.length===0)return lh;if(e.length===1)return dS(e[0],lh);let t={...dS(e[0],lh)};for(let n=1;n<e.length;n+=1)t=Ug(t,e[n]);return t}function Ug(e,t){return WP(t)?t(e):PK(e,t)}function PK(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=fS(e.style,r);break}case"className":{e[n]=KP(e.className,r);break}default:IK(n,r)?e[n]=LK(e[n],r):e[n]=r}}return e}function IK(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 WP(e){return typeof e=="function"}function dS(e,t){return WP(e)?e(t):e??lh}function LK(e,t){return t?e?n=>{if(NK(n)){const i=n;hS(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 hS(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function KP(e,t){return t?e?t+" "+e:t:e}function NK(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function jK(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,o=S.useRef(null),a=MK(!0)!==void 0,l=ft(()=>{const m=o.current;return!!((m==null?void 0:m.tagName)==="A"&&(m!=null&&m.href))}),{props:c}=$K({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:i}),f=S.useCallback(()=>{const m=o.current;FK(m)&&a&&t&&c.disabled===void 0&&m.disabled&&(m.disabled=!1)},[t,c.disabled,a]);$t(f,[f]);const h=S.useCallback((m={})=>{const{onClick:g,onMouseDown:b,onKeyUp:v,onKeyDown:w,onPointerDown:x,...k}=m;return YP({type:i?"button":void 0,onClick(C){if(t){C.preventDefault();return}g==null||g(C)},onMouseDown(C){t||(b==null||b(C))},onKeyDown(C){if(t||(hS(C),w==null||w(C)),C.baseUIHandlerPrevented)return;const R=C.target===C.currentTarget&&!i&&!l()&&!t,_=C.key==="Enter",D=C.key===" ";R&&((D||_)&&C.preventDefault(),_&&(g==null||g(C)))},onKeyUp(C){t||(hS(C),v==null||v(C)),!C.baseUIHandlerPrevented&&C.target===C.currentTarget&&!i&&!t&&C.key===" "&&(g==null||g(C))},onPointerDown(C){if(t){C.preventDefault();return}x==null||x(C)}},i?void 0:{role:"button"},c,k)},[t,c,i,l]),p=ft(m=>{o.current=m,f()});return{getButtonProps:h,buttonRef:p}}function FK(e){return Ln(e)&&e.tagName==="BUTTON"}function yy(e,t,n,r){const i=xi(XP).current;return BK(i,e,t,n,r)&&QP(i,[e,t,n,r]),i.callback}function zK(e){const t=xi(XP).current;return HK(t,e)&&QP(t,e),t.callback}function XP(){return{callback:null,cleanup:null,refs:[]}}function BK(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function HK(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function QP(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 ED(e){if(!S.isValidElement(e))return null;const t=e,n=t.props;return(iC(19)?n==null?void 0:n.ref:t.ref)??null}function UK(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 qK(e,t){return typeof e=="function"?e(t):e}function VK(e,t){return typeof e=="function"?e(t):e}function jo(e,t,n={}){const r=t.render,i=GK(t,n);if(n.enabled===!1)return null;const o=n.state??Fr;return WK(e,r,i,o)}function GK(e,t={}){const{className:n,style:r,render:i}=e,{state:o=Fr,ref:a,props:l,stateAttributesMapping:c,enabled:f=!0}=t,h=f?qK(n,o):void 0,p=f?VK(r,o):void 0,m=f?UK(o,c):Fr,g=f?fS(m,Array.isArray(l)?OK(l):l)??Fr:Fr;return typeof document<"u"&&(f?Array.isArray(a)?g.ref=zK([g.ref,ED(i),...a]):g.ref=yy(g.ref,ED(i),a):yy(null,null)),f?(h!==void 0&&(g.className=KP(g.className,h)),p!==void 0&&(g.style=fS(g.style,p)),g):Fr}const YK=Symbol.for("react.lazy");function WK(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=YP(n,t.props);i.ref=n.ref;let o=t;return(o==null?void 0:o.$$typeof)===YK&&(o=S.Children.toArray(t)[0]),S.cloneElement(o,i)}if(e&&typeof e=="string")return KK(e,n);throw new Error(Ar(8))}function KK(e,t){return e==="button"?S.createElement("button",{type:"button",...t,key:t.key}):e==="img"?S.createElement("img",{alt:"",...t,key:t.key}):S.createElement(e,t)}let Yl=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Oh.startingStyle]="startingStyle",e[e.endingStyle=Oh.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),ZP=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const XK={[ZP.popupOpen]:""},QK={[Yl.open]:""},ZK={[Yl.closed]:""},JK={[Yl.anchorHidden]:""},JP={open(e){return e?XK:null}},$b={open(e){return e?QK:ZK},anchorHidden(e){return e?JK:null}},eX={style:{transition:"none"}},eI="data-base-ui-click-trigger",tX={fallbackAxisSide:"end"},nX={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function tI(e){return Nf(e,"base-ui")}function rX(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:i=!0,event:o="click",toggle:a=!0,ignoreMouse:l=!1,stickIfOpen:c=!0,touchOpenDelay:f=0,reason:h=Ph}=t,p=S.useRef(void 0),m=rC(),g=tl(),b=S.useMemo(()=>({onPointerDown(v){p.current=v.pointerType},onMouseDown(v){const w=p.current,x=v.nativeEvent,k=n.select("open");if(v.button!==0||o==="click"||yu(w,!0)&&l)return;const C=r.current.openEvent,R=C==null?void 0:C.type,_=n.select("domReferenceElement")!==v.currentTarget,D=k&&_||!(k&&a&&(!(C&&c)||R==="click"||R==="mousedown"));if(Db(x.target)){const O=hn(h,x,x.target);D&&w==="touch"&&f>0?g.start(f,()=>{n.setOpen(!0,O)}):n.setOpen(D,O);return}const M=v.currentTarget;m.request(()=>{const O=hn(h,x,M);D&&w==="touch"&&f>0?g.start(f,()=>{n.setOpen(!0,O)}):n.setOpen(D,O)})},onClick(v){if(o==="mousedown-only")return;const w=p.current;if(o==="mousedown"&&w){p.current=void 0;return}if(yu(w,!0)&&l)return;const x=n.select("open"),k=r.current.openEvent,C=n.select("domReferenceElement")!==v.currentTarget,R=x&&C||!(x&&a&&(!(k&&c)||OP(k))),_=hn(h,v.nativeEvent,v.currentTarget);R&&w==="touch"&&f>0?g.start(f,()=>{n.setOpen(!0,_)}):n.setOpen(R,_)},onKeyDown(){p.current=void 0}}),[r,o,l,n,c,a,m,g,f,h]);return S.useMemo(()=>i?{reference:b}:Fr,[i,b])}const iX=S.forwardRef(function(e,t){const{render:n,className:r,disabled:i=!1,nativeButton:o=!0,id:a,payload:l,handle:c,...f}=e,h=sp(!0),p=(c==null?void 0:c.store)??(h==null?void 0:h.store);if(!p)throw new Error(Ar(79));const m=tI(a),g=p.useState("floatingRootContext"),b=p.useState("isOpenedByTrigger",m),v=S.useRef(null),{registerTrigger:w,isMountedByThisTrigger:x}=RP(m,v,p,{payload:l}),{getButtonProps:k,buttonRef:C}=jK({disabled:i,native:o}),R=rX(g,{enabled:g!=null}),_=lC([R]),D={disabled:i,open:b},M=p.useState("triggerProps",x);return jo("button",e,{state:D,ref:[C,t,w,v],props:[_.getReferenceProps(),M,{[eI]:"",id:m},f,k],stateAttributesMapping:JP})});function nI(e){return iC(19)?e:e?"true":void 0}const rI=S.createContext(void 0);function oX(){const e=S.useContext(rI);if(e===void 0)throw new Error(Ar(26));return e}const sX=S.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 T.jsx("div",{ref:t,role:"presentation","data-base-ui-inert":"",...r,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:i}})}),aX={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},uC={...aX,position:"fixed",top:0,left:0},du=S.forwardRef(function(e,t){const[n,r]=S.useState();return $t(()=>{wP&&r("button")},[]),T.jsx("span",{...e,ref:t,style:uC,"aria-hidden":n?void 0:!0,tabIndex:0,role:n,"data-base-ui-focus-guard":""})});var lX=["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] *)"],by=lX.join(","),iI=typeof Element>"u",bf=iI?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,vy=!iI&&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},xy=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]"):xy(e.parentNode));return o},uX=function(e){var t,n=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return n===""||n==="true"},oI=function(e,t,n){if(xy(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(by));return t&&bf.call(e,by)&&r.unshift(e),r=r.filter(n),r},wy=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var o=i.shift();if(!xy(o,!1))if(o.tagName==="SLOT"){var a=o.assignedElements(),l=a.length?a:o.children,c=wy(l,!0,n);n.flatten?r.push.apply(r,c):r.push({scopeParent:o,candidates:c})}else{var f=bf.call(o,by);f&&n.filter(o)&&(t||!e.includes(o))&&r.push(o);var h=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),p=!xy(h,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(h&&p){var m=wy(h===!0?o.children:h.children,!0,n);n.flatten?r.push.apply(r,m):r.push({scopeParent:o,candidates:m})}else i.unshift.apply(i,o.children)}}return r},sI=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},aI=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||uX(e))&&!sI(e)?0:e.tabIndex},cX=function(e,t){var n=aI(e);return n<0&&t&&!sI(e)?0:n},fX=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},lI=function(e){return e.tagName==="INPUT"},dX=function(e){return lI(e)&&e.type==="hidden"},hX=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return t},pX=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},mX=function(e){if(!e.name)return!0;var t=e.form||vy(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=pX(r,e.form);return!i||i===e},gX=function(e){return lI(e)&&e.type==="radio"},yX=function(e){return gX(e)&&!mX(e)},bX=function(e){var t,n=e&&vy(e),r=(t=n)===null||t===void 0?void 0:t.host,i=!1;if(n&&n!==e){var o,a,l;for(i=!!((o=r)!==null&&o!==void 0&&(a=o.ownerDocument)!==null&&a!==void 0&&a.contains(r)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!i&&r;){var c,f,h;n=vy(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},CD=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},vX=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=bf.call(e,"details>summary:first-of-type"),a=o?e.parentElement:e;if(bf.call(a,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof r=="function"){for(var l=e;e;){var c=e.parentElement,f=vy(e);if(c&&!c.shadowRoot&&r(c)===!0)return CD(e);e.assignedSlot?e=e.assignedSlot:!c&&f!==e.ownerDocument?e=f.host:e=c}e=l}if(bX(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return CD(e);return!1},xX=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 bf.call(t,"fieldset[disabled] *")?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},pS=function(e,t){return!(t.disabled||dX(t)||vX(t,e)||hX(t)||xX(t))},mS=function(e,t){return!(yX(t)||aI(t)<0||!pS(e,t))},wX=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},uI=function(e){var t=[],n=[];return e.forEach(function(r,i){var o=!!r.scopeParent,a=o?r.scopeParent:r,l=cX(a,o),c=o?uI(r.candidates):a;l===0?o?t.push.apply(t,c):t.push(a):n.push({documentOrder:i,tabIndex:l,item:r,isScope:o,content:c})}),n.sort(fX).reduce(function(r,i){return i.isScope?r.push.apply(r,i.content):r.push(i.content),r},[]).concat(t)},Ob=function(e,t){t=t||{};var n;return t.getShadowRoot?n=wy([e],t.includeContainer,{filter:mS.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:wX}):n=oI(e,t.includeContainer,mS.bind(null,t)),uI(n)},SX=function(e,t){t=t||{};var n;return t.getShadowRoot?n=wy([e],t.includeContainer,{filter:pS.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):n=oI(e,t.includeContainer,pS.bind(null,t)),n},cI=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return bf.call(e,by)===!1?!1:mS(t,e)};const ap=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function fI(e,t){const n=Ob(e,ap()),r=n.length;if(r===0)return;const i=oi(Vt(e)),o=n.indexOf(i),a=o===-1?t===1?0:r-1:o+t;return n[a]}function dI(e){return fI(Vt(e).body,1)||e}function hI(e){return fI(Vt(e).body,-1)||e}function uh(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!wt(n,r)}function EX(e){Ob(e,ap()).forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")})}function kD(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 pI=S.createContext(null),mI=()=>S.useContext(pI),CX=yf("portal");function gI(e={}){var b;const{ref:t,container:n,componentProps:r=Fr,elementProps:i}=e,o=Nf(),a=(b=mI())==null?void 0:b.portalNode,[l,c]=S.useState(null),[f,h]=S.useState(null),p=ft(v=>{v!==null&&h(v)}),m=S.useRef(null);$t(()=>{if(n===null){m.current&&(m.current=null,h(null),c(null));return}if(o==null)return;const v=(n&&(tC(n)?n:n.current))??a??document.body;if(v==null){m.current&&(m.current=null,h(null),c(null));return}m.current!==v&&(m.current=v,h(null),c(v))},[n,a,o]);const g=jo("div",r,{ref:[t,p],props:[{id:o,[CX]:""},i]});return{portalNode:f,portalSubtree:l&&g?Rn.createPortal(g,l):null}}const kX=S.forwardRef(function(e,t){const{children:n,container:r,className:i,render:o,renderGuards:a,...l}=e,{portalNode:c,portalSubtree:f}=gI({container:r,ref:t,componentProps:e,elementProps:l}),h=S.useRef(null),p=S.useRef(null),m=S.useRef(null),g=S.useRef(null),[b,v]=S.useState(null),w=b==null?void 0:b.modal,x=b==null?void 0:b.open,k=typeof a=="boolean"?a:!!b&&!b.modal&&b.open&&!!c;S.useEffect(()=>{if(!c||w)return;function R(_){c&&_.relatedTarget&&uh(_)&&(_.type==="focusin"?kD:EX)(c)}return c.addEventListener("focusin",R,!0),c.addEventListener("focusout",R,!0),()=>{c.removeEventListener("focusin",R,!0),c.removeEventListener("focusout",R,!0)}},[c,w]),S.useEffect(()=>{!c||x||kD(c)},[x,c]);const C=S.useMemo(()=>({beforeOutsideRef:h,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:g,portalNode:c,setFocusManagerState:v}),[c]);return T.jsxs(S.Fragment,{children:[f,T.jsxs(pI.Provider,{value:C,children:[k&&c&&T.jsx(du,{"data-type":"outside",ref:h,onFocus:R=>{var _,D;if(uh(R,c))(_=m.current)==null||_.focus();else{const M=b?b.domReference:null;(D=hI(M))==null||D.focus()}}}),k&&c&&T.jsx("span",{"aria-owns":c.id,style:nX}),c&&Rn.createPortal(n,c),k&&c&&T.jsx(du,{"data-type":"outside",ref:p,onFocus:R=>{var _,D;if(uh(R,c))(_=g.current)==null||_.focus();else{const M=b?b.domReference:null;(D=dI(M))==null||D.focus(),b!=null&&b.closeOnFocusOut&&(b==null||b.onOpenChange(!1,hn(BP,R.nativeEvent)))}}})]})]})}),RX=S.forwardRef(function(e,t){const{keepMounted:n=!1,...r}=e,{store:i}=sp(),o=i.useState("mounted"),a=i.useState("modal"),l=i.useState("open");return o||n?T.jsx(rI.Provider,{value:n,children:T.jsxs(kX,{ref:t,...r,children:[o&&a===!0&&T.jsx(sX,{ref:i.context.internalBackdropRef,inert:nI(!l)}),e.children]})}):null}),AX={...$b,...Rb},TX=S.forwardRef(function(e,t){const{render:n,className:r,forceRender:i=!1,...o}=e,{store:a}=sp(),l=a.useState("open"),c=a.useState("nested"),f=a.useState("mounted"),h=a.useState("transitionStatus");return jo("div",e,{state:{open:l,transitionStatus:h},ref:[a.context.backdropRef,t],stateAttributesMapping:AX,props:[{role:"presentation",hidden:!f,style:{userSelect:"none",WebkitUserSelect:"none"}},o],enabled:i||!c})});let _X=(function(e){return e.nestedDialogs="--nested-dialogs",e})({}),DX=(function(e){return e[e.open=Yl.open]="open",e[e.closed=Yl.closed]="closed",e[e.startingStyle=Yl.startingStyle]="startingStyle",e[e.endingStyle=Yl.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const yI="ArrowUp",bI="ArrowDown",vI="ArrowLeft",xI="ArrowRight",MX="Home",$X=new Set([vI,xI]),OX=new Set([yI,bI]),PX=new Set([...$X,...OX]);[...PX];const IX=new Set([yI,bI,vI,xI,MX,"End"]);function To(e){const t=xi(LX,e).current;return t.next=e,$t(t.effect),t}function LX(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}let RD=0;function cx(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(RD);const o=()=>e==null?void 0:e.focus({preventScroll:n});i?o():RD=requestAnimationFrame(o)}const Bc={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function AD(e){return e==="inert"?Bc.inert:e==="aria-hidden"?Bc["aria-hidden"]:Bc.none}let Wm=new WeakSet,Km={},fx=0;const wI=e=>e&&(e.host||wI(e.parentNode)),NX=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=wI(n);return e.contains(r)?r:null}).filter(n=>n!=null);function jX(e,t,n,r){const i="data-base-ui-inert",o=r?"inert":n?"aria-hidden":null,a=NX(t,e),l=new Set,c=new Set(a),f=[];Km[i]||(Km[i]=new WeakMap);const h=Km[i];a.forEach(p),m(t),l.clear();function p(g){!g||l.has(g)||(l.add(g),g.parentNode&&p(g.parentNode))}function m(g){!g||c.has(g)||[].forEach.call(g.children,b=>{if(ol(b)!=="script")if(l.has(b))m(b);else{const v=o?b.getAttribute(o):null,w=v!==null&&v!=="false",x=AD(o),k=(x.get(b)||0)+1,C=(h.get(b)||0)+1;x.set(b,k),h.set(b,C),f.push(b),k===1&&w&&Wm.add(b),C===1&&b.setAttribute(i,""),!w&&o&&b.setAttribute(o,o==="inert"?"":"true")}})}return fx+=1,()=>{f.forEach(g=>{const b=AD(o),v=(b.get(g)||0)-1,w=(h.get(g)||0)-1;b.set(g,v),h.set(g,w),v||(!Wm.has(g)&&o&&g.removeAttribute(o),Wm.delete(g)),w||g.removeAttribute(i)}),fx-=1,fx||(Bc.inert=new WeakMap,Bc["aria-hidden"]=new WeakMap,Bc.none=new WeakMap,Wm=new WeakSet,Km={})}}function FX(e,t=!1,n=!1){const r=Vt(e[0]).body;return jX(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}function zX(e,t){const n=kn(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 TD=20;let Fa=[];function cC(){Fa=Fa.filter(e=>{var t;return(t=e.deref())==null?void 0:t.isConnected})}function BX(e){cC(),e&&ol(e)!=="body"&&(Fa.push(new WeakRef(e)),Fa.length>TD&&(Fa=Fa.slice(-TD)))}function dx(){var e;return cC(),(e=Fa[Fa.length-1])==null?void 0:e.deref()}function HX(e){if(!e)return null;const t=ap();return cI(e,t)?e:Ob(e,t)[0]||e}function UX(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():gi(e).display!=="none"}function _D(e,t){var o;if(!t.current.includes("floating")&&!((o=e.getAttribute("role"))!=null&&o.includes("dialog")))return;const n=ap(),r=SX(e,n).filter(a=>{const l=a.getAttribute("data-tabindex")||"";return cI(a,n)||a.hasAttribute("data-tabindex")&&!l.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 qX(e){const{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:o=!0,restoreFocus:a=!1,modal:l=!0,closeOnFocusOut:c=!0,openInteractionType:f="",nextFocusableElement:h,previousFocusableElement:p,beforeContentFocusGuardRef:m,externalTree:g}=e,b="rootStore"in t?t.rootStore:t,v=b.useState("open"),w=b.useState("domReferenceElement"),x=b.useState("floatingElement"),{events:k,dataRef:C}=b.context,R=ft(()=>{var W;return(W=C.current.floatingContext)==null?void 0:W.nodeId}),_=i===!1,D=xD(w)&&_,M=S.useRef(["content"]),O=To(i),U=To(o),L=To(f),I=op(g),$=mI(),B=S.useRef(null),V=S.useRef(null),F=S.useRef(!1),z=S.useRef(!1),j=S.useRef(!1),H=S.useRef(-1),X=S.useRef(""),P=S.useRef(""),K=S.useRef(null),ee=S.useRef(null),q=yy(K,m,$==null?void 0:$.beforeInsideRef),ae=yy(ee,$==null?void 0:$.afterInsideRef),re=tl(),fe=tl(),ve=rC(),Re=$!=null,le=cS(x),Ae=ft((W=le)=>W?Ob(W,ap()):[]),Ie=ft(W=>{const Q=Ae(W);return M.current.map(()=>Q).filter(Boolean).flat()});S.useEffect(()=>{if(r||!l)return;function W(pe){pe.key==="Tab"&&wt(le,oi(Vt(le)))&&Ae().length===0&&!D&&XW(pe)}const Q=Vt(le);return Q.addEventListener("keydown",W),()=>{Q.removeEventListener("keydown",W)}},[r,w,le,l,M,D,Ae,Ie]),S.useEffect(()=>{if(r||!v)return;const W=Vt(le);function Q(){j.current=!1}function pe(me){const te=ir(me),Z=wt(x,te)||wt(w,te)||wt($==null?void 0:$.portalNode,te);j.current=!Z,P.current=me.pointerType||"keyboard",te!=null&&te.closest(`[${eI}]`)&&(z.current=!0)}function oe(){P.current="keyboard"}return W.addEventListener("pointerdown",pe,!0),W.addEventListener("pointerup",Q,!0),W.addEventListener("pointercancel",Q,!0),W.addEventListener("keydown",oe,!0),()=>{W.removeEventListener("pointerdown",pe,!0),W.removeEventListener("pointerup",Q,!0),W.removeEventListener("pointercancel",Q,!0),W.removeEventListener("keydown",oe,!0)}},[r,x,w,le,v,$]),S.useEffect(()=>{if(r||!c)return;const W=Vt(le);function Q(){z.current=!0,fe.start(0,()=>{z.current=!1})}function pe(ie){const J=ir(ie),Se=Ae().indexOf(J);Se!==-1&&(H.current=Se)}function oe(ie){const J=ie.relatedTarget,Se=ie.currentTarget,ke=ir(ie);queueMicrotask(()=>{const ge=R(),_e=b.context.triggerElements,de=(J==null?void 0:J.hasAttribute(yf("focus-guard")))&&[K.current,ee.current,$==null?void 0:$.beforeInsideRef.current,$==null?void 0:$.afterInsideRef.current,$==null?void 0:$.beforeOutsideRef.current,$==null?void 0:$.afterOutsideRef.current,hs(p),hs(h)].includes(J),Ce=!(wt(w,J)||wt(x,J)||wt(J,x)||wt($==null?void 0:$.portalNode,J)||J!=null&&_e.hasElement(J)||_e.hasMatchingElement(ye=>wt(ye,J))||de||I&&(fu(I.nodesRef.current,ge).find(ye=>{var Me,Pe;return wt((Me=ye.context)==null?void 0:Me.elements.floating,J)||wt((Pe=ye.context)==null?void 0:Pe.elements.domReference,J)})||wD(I.nodesRef.current,ge).find(ye=>{var Me,Pe,Ke;return[(Me=ye.context)==null?void 0:Me.elements.floating,cS((Pe=ye.context)==null?void 0:Pe.elements.floating)].includes(J)||((Ke=ye.context)==null?void 0:Ke.elements.domReference)===J})));if(Se===w&&le&&_D(le,M),a&&Se!==w&&!UX(ke)&&oi(W)===W.body){if(Ln(le)&&(le.focus(),a==="popup")){ve.request(()=>{le.focus()});return}const ye=H.current,Me=Ae(),Pe=Me[ye]||Me[Me.length-1]||le;Ln(Pe)&&Pe.focus()}if(C.current.insideReactTree){C.current.insideReactTree=!1;return}(D||!l)&&J&&Ce&&!z.current&&(D||J!==dx())&&(F.current=!0,b.setOpen(!1,hn(BP,ie)))})}function me(){j.current||(C.current.insideReactTree=!0,re.start(0,()=>{C.current.insideReactTree=!1}))}const te=Ln(w)?w:null,Z=[];if(!(!x&&!te))return te&&(te.addEventListener("focusout",oe),te.addEventListener("pointerdown",Q),Z.push(()=>{te.removeEventListener("focusout",oe),te.removeEventListener("pointerdown",Q)})),x&&(x.addEventListener("focusin",pe),x.addEventListener("focusout",oe),$&&(x.addEventListener("focusout",me,!0),Z.push(()=>{x.removeEventListener("focusout",me,!0)})),Z.push(()=>{x.removeEventListener("focusin",pe),x.removeEventListener("focusout",oe)})),()=>{Z.forEach(ie=>{ie()})}},[r,w,x,le,l,I,$,b,c,a,Ae,D,R,M,C,re,fe,ve,h,p]),S.useEffect(()=>{var oe,me,te;if(r||!x||!v)return;const W=Array.from(((oe=$==null?void 0:$.portalNode)==null?void 0:oe.querySelectorAll(`[${yf("portal")}]`))||[]),Q=(te=(me=(I?wD(I.nodesRef.current,R()):[]).find(Z=>{var ie;return xD(((ie=Z.context)==null?void 0:ie.elements.domReference)||null)}))==null?void 0:me.context)==null?void 0:te.elements.domReference,pe=[x,Q,...W,B.current,V.current,K.current,ee.current,$==null?void 0:$.beforeOutsideRef.current,$==null?void 0:$.afterOutsideRef.current,hs(p),hs(h),D?w:null].filter(Z=>Z!=null);return FX(pe,l||D)},[v,r,w,x,l,M,$,D,I,R,h,p]),$t(()=>{if(!v||r||!Ln(le))return;const W=Vt(le),Q=oi(W);queueMicrotask(()=>{const pe=Ie(le),oe=O.current,me=typeof oe=="function"?oe(L.current||""):oe;if(me===void 0||me===!1)return;let te;me===!0||me===null?te=pe[0]||le:te=hs(me),te=te||pe[0]||le,!wt(le,Q)&&cx(te,{preventScroll:te===le})})},[r,v,le,_,Ie,O,L]),$t(()=>{if(r||!le)return;const W=Vt(le),Q=oi(W);BX(Q);function pe(te){if(te.open||(X.current=zX(te.nativeEvent,P.current)),te.reason===ro&&te.nativeEvent.type==="mouseleave"&&(F.current=!0),te.reason===zP)if(te.nested)F.current=!1;else if(ZW(te.nativeEvent)||JW(te.nativeEvent))F.current=!1;else{let Z=!1;document.createElement("div").focus({get preventScroll(){return Z=!0,!1}}),Z?F.current=!1:F.current=!0}}k.on("openchange",pe);const oe=W.createElement("span");oe.setAttribute("tabindex","-1"),oe.setAttribute("aria-hidden","true"),Object.assign(oe.style,uC),Re&&w&&w.insertAdjacentElement("afterend",oe);function me(){const te=U.current;let Z=typeof te=="function"?te(X.current):te;if(Z===void 0||Z===!1)return null;if(Z===null&&(Z=!0),typeof Z=="boolean"){const J=w||dx();return J&&J.isConnected?J:oe}const ie=w||dx()||oe;return hs(Z)||ie}return()=>{k.off("openchange",pe);const te=oi(W),Z=wt(x,te)||I&&fu(I.nodesRef.current,R(),!1).some(J=>{var Se;return wt((Se=J.context)==null?void 0:Se.elements.floating,te)}),ie=me();queueMicrotask(()=>{const J=HX(ie),Se=typeof U.current!="boolean";U.current&&!F.current&&Ln(J)&&(!(!Se&&J!==te&&te!==W.body)||Z)&&J.focus({preventScroll:!0}),oe.remove(),F.current=!1})}},[r,x,le,U,C,k,I,Re,w,R]),$t(()=>{if(!vP||v||!x)return;const W=oi(Vt(x));!Ln(W)||!Db(W)||wt(x,W)&&W.blur()},[v,x]),$t(()=>{if(!(r||!$))return $.setFocusManagerState({modal:l,closeOnFocusOut:c,open:v,onOpenChange:b.setOpen,domReference:w}),()=>{$.setFocusManagerState(null)}},[r,$,l,v,b,c,w]),$t(()=>{if(!(r||!le))return _D(le,M),()=>{queueMicrotask(cC)}},[r,le,M]);const Y=!r&&(l?!D:!0)&&(Re||l);return T.jsxs(S.Fragment,{children:[Y&&T.jsx(du,{"data-type":"inside",ref:q,onFocus:W=>{var Q,pe;if(l){const oe=Ie();cx(oe[oe.length-1])}else $!=null&&$.portalNode&&(F.current=!1,uh(W,$.portalNode)?(Q=dI(w))==null||Q.focus():(pe=hs(p??$.beforeOutsideRef))==null||pe.focus())}}),n,Y&&T.jsx(du,{"data-type":"inside",ref:ae,onFocus:W=>{var Q,pe;l?cx(Ie()[0]):$!=null&&$.portalNode&&(c&&(F.current=!0),uh(W,$.portalNode)?(Q=hI(w))==null||Q.focus():(pe=hs(h??$.afterOutsideRef))==null||pe.focus())}})]})}const VX={...$b,...Rb,nestedDialogOpen(e){return e?{[DX.nestedDialogOpen]:""}:null}},GX=S.forwardRef(function(e,t){const{className:n,finalFocus:r,initialFocus:i,render:o,...a}=e,{store:l}=sp(),c=l.useState("descriptionElementId"),f=l.useState("disablePointerDismissal"),h=l.useState("floatingRootContext"),p=l.useState("popupProps"),m=l.useState("modal"),g=l.useState("mounted"),b=l.useState("nested"),v=l.useState("nestedOpenDialogCount"),w=l.useState("open"),x=l.useState("openMethod"),k=l.useState("titleElementId"),C=l.useState("transitionStatus"),R=l.useState("role");oX(),Ab({open:w,ref:l.context.popupRef,onComplete(){var U,L;w&&((L=(U=l.context).onOpenChangeComplete)==null||L.call(U,!0))}});function _(U){return U==="touch"?l.context.popupRef.current:!0}const D=i===void 0?_:i,M=v>0,O=jo("div",e,{state:{open:w,nested:b,transitionStatus:C,nestedDialogOpen:M},props:[p,{"aria-labelledby":k??void 0,"aria-describedby":c??void 0,role:R,tabIndex:-1,hidden:!g,onKeyDown(U){IX.has(U.key)&&U.stopPropagation()},style:{[_X.nestedDialogs]:v}},a],ref:[t,l.context.popupRef,l.useStateSetter("popupElement")],stateAttributesMapping:VX});return T.jsx(qX,{context:h,openInteractionType:x,disabled:!g,closeOnFocusOut:!f,initialFocus:D,returnFocus:r,modal:m!==!1,restoreFocus:"popup",children:O})});function qg(e,t,n){if(n&&!yu(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 gS=yf("safe-polygon"),YX=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${FP}`;function WX(e){return e?!!e.closest(YX):!1}let KX=class SI{constructor(){ce(this,"dispose",()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()});ce(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 Io,this.restTimeout=new Io,this.handleCloseOptions=void 0}static create(){return new SI}};function EI(e){const t=xi(KX.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||(n.hoverInteractionState=t),kb(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}function hx(e){return typeof e=="function"?e():e}const XX={current:null};function QX(e,t={}){var L;const n="rootStore"in e?e.rootStore:e,{dataRef:r,events:i}=n.context,{enabled:o=!0,delay:a=0,handleClose:l=null,mouseOnly:c=!1,restMs:f=0,move:h=!0,triggerElementRef:p=XX,externalTree:m,isActiveTrigger:g=!0}=t,b=op(m),v=EI(n),w=To(l),x=To(a),k=To(f),C=To(o);g&&(v.handleCloseOptions=(L=w.current)==null?void 0:L.__options);const R=ft(()=>v.interactedInside?!0:r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1),_=ft(I=>my(I,n.context.triggerElements)),D=S.useCallback((I,$=!0)=>{const B=qg(x.current,"close",v.pointerType);B&&!v.handler?v.openChangeTimeout.start(B,()=>n.setOpen(!1,hn(ro,I))):$&&(v.openChangeTimeout.clear(),n.setOpen(!1,hn(ro,I)))},[x,n,v]),M=ft(()=>{v.unbindMouseMove(),v.handler=void 0}),O=ft(()=>{if(v.performedPointerEventsMutation){const I=Vt(n.select("domReferenceElement")).body;I.style.pointerEvents="",I.removeAttribute(gS),v.performedPointerEventsMutation=!1}});S.useEffect(()=>{if(!o)return;function I($){$.open||(v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return i.on("openchange",I),()=>{i.off("openchange",I)}},[o,i,v]);const U=ft(I=>{var B;if(R()||!r.current.floatingContext||_(I.relatedTarget))return;const $=p.current;(B=w.current)==null||B.call(w,{...r.current.floatingContext,tree:b,x:I.clientX,y:I.clientY,onClose(){O(),M(),!R()&&$===n.select("domReferenceElement")&&D(I)}})(I)});return S.useEffect(()=>{if(!o)return;const I=p.current??(g?n.select("domReferenceElement"):null);if(!Yt(I))return;function $(F){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,c&&!yu(v.pointerType)||hx(k.current)>0&&!qg(x.current,"open"))return;const z=qg(x.current,"open",v.pointerType),j=n.select("domReferenceElement"),H=n.context.triggerElements,X=(H.hasElement(F.target)||H.hasMatchingElement(q=>wt(q,F.target)))&&(!j||!wt(j,F.target)),P=F.currentTarget??null,K=n.select("open"),ee=!K||X;X&&K?n.setOpen(!0,hn(ro,F,P)):z?v.openChangeTimeout.start(z,()=>{ee&&n.setOpen(!0,hn(ro,F,P))}):ee&&n.setOpen(!0,hn(ro,F,P))}function B(F){if(R()){O();return}v.unbindMouseMove();const z=n.select("domReferenceElement"),j=Vt(z);if(v.restTimeout.clear(),v.restTimeoutPending=!1,!_(F.relatedTarget)){if(w.current&&r.current.floatingContext){n.select("open")||v.openChangeTimeout.clear();const H=p.current;v.handler=w.current({...r.current.floatingContext,tree:b,x:F.clientX,y:F.clientY,onClose(){O(),M(),C.current&&!R()&&H===n.select("domReferenceElement")&&D(F,!0)}});const X=v.handler;X(F),j.addEventListener("mousemove",X),v.unbindMouseMove=()=>{j.removeEventListener("mousemove",X)};return}(v.pointerType!=="touch"||!wt(n.select("floatingElement"),F.relatedTarget))&&D(F)}}function V(F){U(F)}return n.select("open")&&I.addEventListener("mouseleave",V),h&&I.addEventListener("mousemove",$,{once:!0}),I.addEventListener("mouseenter",$),I.addEventListener("mouseleave",B),()=>{I.removeEventListener("mouseleave",V),h&&I.removeEventListener("mousemove",$),I.removeEventListener("mouseenter",$),I.removeEventListener("mouseleave",B)}},[M,O,r,x,D,n,o,w,U,v,g,R,_,c,h,k,p,b,C]),S.useMemo(()=>{if(!o)return;function I($){v.pointerType=$.pointerType}return{onPointerDown:I,onPointerEnter:I,onMouseMove($){const{nativeEvent:B}=$,V=$.currentTarget,F=n.select("domReferenceElement"),z=n.context.triggerElements,j=n.select("open"),H=(z.hasElement($.target)||z.hasMatchingElement(P=>wt(P,$.target)))&&(!F||!wt(F,$.target));if(c&&!yu(v.pointerType)||j&&!H||hx(k.current)===0||!H&&v.restTimeoutPending&&$.movementX**2+$.movementY**2<2)return;v.restTimeout.clear();function X(){if(v.restTimeoutPending=!1,R())return;const P=n.select("open");!v.blockMouseMove&&(!P||H)&&n.setOpen(!0,hn(ro,B,V))}v.pointerType==="touch"?Rn.flushSync(()=>{X()}):H&&j?X():(v.restTimeoutPending=!0,v.restTimeout.start(hx(k.current),X))}}},[o,v,R,c,n,k])}function DD(e,t){const[n,r]=e;let i=!1;const o=t.length;for(let a=0,l=o-1;a<o;l=a++){const[c,f]=t[a]||[0,0],[h,p]=t[l]||[0,0];f>=r!=p>=r&&n<=(h-c)*(r-f)/(p-f)+c&&(i=!i)}return i}function ZX(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function JX(e={}){const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i=new Io;let o=!1,a=null,l=null,c=typeof performance<"u"?performance.now():0;function f(p,m){const g=performance.now(),b=g-c;if(a===null||l===null||b===0)return a=p,l=m,c=g,null;const v=p-a,w=m-l,x=Math.sqrt(v*v+w*w)/b;return a=p,l=m,c=g,x}const h=({x:p,y:m,placement:g,elements:b,onClose:v,nodeId:w,tree:x})=>function(k){function C(){i.clear(),v()}if(i.clear(),!b.domReference||!b.floating||g==null||p==null||m==null)return;const{clientX:R,clientY:_}=k,D=[R,_],M=ir(k),O=k.type==="mouseleave",U=wt(b.floating,M),L=wt(b.domReference,M),I=b.domReference.getBoundingClientRect(),$=b.floating.getBoundingClientRect(),B=g.split("-")[0],V=p>$.right-$.width/2,F=m>$.bottom-$.height/2,z=ZX(D,I),j=$.width>I.width,H=$.height>I.height,X=(j?I:$).left,P=(j?I:$).right,K=(H?I:$).top,ee=(H?I:$).bottom;if(U&&(o=!0,!O))return;if(L&&(o=!1),L&&!O){o=!0;return}if(O&&Yt(k.relatedTarget)&&wt(b.floating,k.relatedTarget)||x&&fu(x.nodesRef.current,w).some(({context:re})=>re==null?void 0:re.open))return;if(B==="top"&&m>=I.bottom-1||B==="bottom"&&m<=I.top+1||B==="left"&&p>=I.right-1||B==="right"&&p<=I.left+1)return C();let q=[];switch(B){case"top":q=[[X,I.top+1],[X,$.bottom-1],[P,$.bottom-1],[P,I.top+1]];break;case"bottom":q=[[X,$.top+1],[X,I.bottom-1],[P,I.bottom-1],[P,$.top+1]];break;case"left":q=[[$.right-1,ee],[$.right-1,K],[I.left+1,K],[I.left+1,ee]];break;case"right":q=[[I.right-1,ee],[I.right-1,K],[$.left+1,K],[$.left+1,ee]];break}function ae([re,fe]){switch(B){case"top":{const ve=[j?re+t/2:V?re+t*4:re-t*4,fe+t+1],Re=[j?re-t/2:V?re+t*4:re-t*4,fe+t+1],le=[[$.left,V||j?$.bottom-t:$.top],[$.right,V?j?$.bottom-t:$.top:$.bottom-t]];return[ve,Re,...le]}case"bottom":{const ve=[j?re+t/2:V?re+t*4:re-t*4,fe-t],Re=[j?re-t/2:V?re+t*4:re-t*4,fe-t],le=[[$.left,V||j?$.top+t:$.bottom],[$.right,V?j?$.top+t:$.bottom:$.top+t]];return[ve,Re,...le]}case"left":{const ve=[re+t+1,H?fe+t/2:F?fe+t*4:fe-t*4],Re=[re+t+1,H?fe-t/2:F?fe+t*4:fe-t*4];return[[F||H?$.right-t:$.left,$.top],[F?H?$.right-t:$.left:$.right-t,$.bottom],ve,Re]}case"right":{const ve=[re-t,H?fe+t/2:F?fe+t*4:fe-t*4],Re=[re-t,H?fe-t/2:F?fe+t*4:fe-t*4],le=[[F||H?$.left+t:$.right,$.top],[F?H?$.left+t:$.right:$.left+t,$.bottom]];return[ve,Re,...le]}default:return[]}}if(!DD([R,_],q)){if(o&&!z)return C();if(!O&&r){const re=f(k.clientX,k.clientY);if(re!==null&&re<.1)return C()}DD([R,_],ae([p,m]))?!o&&r&&i.start(40,C):C()}};return h.__options={blockPointerEvents:n},h}const eQ=["top","right","bottom","left"],vf=Math.min,si=Math.max,Sy=Math.round,Xm=Math.floor,Do=e=>({x:e,y:e}),tQ={left:"right",right:"left",bottom:"top",top:"bottom"},nQ={start:"end",end:"start"};function yS(e,t,n){return si(e,vf(t,n))}function $s(e,t){return typeof e=="function"?e(t):e}function Ur(e){return e.split("-")[0]}function al(e){return e.split("-")[1]}function fC(e){return e==="x"?"y":"x"}function dC(e){return e==="y"?"height":"width"}const rQ=new Set(["top","bottom"]);function Ui(e){return rQ.has(Ur(e))?"y":"x"}function hC(e){return fC(Ui(e))}function iQ(e,t,n){n===void 0&&(n=!1);const r=al(e),i=hC(e),o=dC(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Ey(a)),[a,Ey(a)]}function oQ(e){const t=Ey(e);return[bS(e),t,bS(t)]}function bS(e){return e.replace(/start|end/g,t=>nQ[t])}const MD=["left","right"],$D=["right","left"],sQ=["top","bottom"],aQ=["bottom","top"];function lQ(e,t,n){switch(e){case"top":case"bottom":return n?t?$D:MD:t?MD:$D;case"left":case"right":return t?sQ:aQ;default:return[]}}function uQ(e,t,n,r){const i=al(e);let o=lQ(Ur(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(bS)))),o}function Ey(e){return e.replace(/left|right|bottom|top/g,t=>tQ[t])}function cQ(e){return{top:0,right:0,bottom:0,left:0,...e}}function CI(e){return typeof e!="number"?cQ(e):{top:e,right:e,bottom:e,left:e}}function Cy(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 fQ=S.createContext(void 0);function dQ(){var e;return((e=S.useContext(fQ))==null?void 0:e.direction)??"ltr"}const hQ=e=>({name:"arrow",options:e,async fn(t){var X,P;const{x:n,y:r,placement:i,rects:o,platform:a,elements:l,middlewareData:c}=t,{element:f,padding:h=0,offsetParent:p="real"}=$s(e,t)||{};if(f==null)return{};const m=CI(h),g={x:n,y:r},b=hC(i),v=dC(b),w=await a.getDimensions(f),x=b==="y",k=x?"top":"left",C=x?"bottom":"right",R=x?"clientHeight":"clientWidth",_=o.reference[v]+o.reference[b]-g[b]-o.floating[v],D=g[b]-o.reference[b],M=p==="real"?await((X=a.getOffsetParent)==null?void 0:X.call(a,f)):l.floating;let O=l.floating[R]||o.floating[v];(!O||!await((P=a.isElement)==null?void 0:P.call(a,M)))&&(O=l.floating[R]||o.floating[v]);const U=_/2-D/2,L=O/2-w[v]/2-1,I=Math.min(m[k],L),$=Math.min(m[C],L),B=I,V=O-w[v]-$,F=O/2-w[v]/2+U,z=yS(B,F,V),j=!c.arrow&&al(i)!=null&&F!==z&&o.reference[v]/2-(F<B?I:$)-w[v]/2<0,H=j?F<B?F-B:F-V:0;return{[b]:g[b]+H,data:{[b]:z,centerOffset:F-z-H,...j&&{alignmentOffset:H}},reset:j}}}),pQ=(e,t)=>({...hQ(e),options:[e,t]});function OD(e,t,n){let{reference:r,floating:i}=e;const o=Ui(t),a=hC(t),l=dC(a),c=Ur(t),f=o==="y",h=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,m=r[l]/2-i[l]/2;let g;switch(c){case"top":g={x:h,y:r.y-i.height};break;case"bottom":g={x:h,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:p};break;case"left":g={x:r.x-i.width,y:p};break;default:g={x:r.x,y:r.y}}switch(al(t)){case"start":g[a]-=m*(n&&f?-1:1);break;case"end":g[a]+=m*(n&&f?-1:1);break}return g}async function mQ(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:l,strategy:c}=e,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:m=!1,padding:g=0}=$s(t,e),b=CI(g),v=l[m?p==="floating"?"reference":"floating":p],w=Cy(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(l.floating)),boundary:f,rootBoundary:h,strategy:c})),x=p==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l.floating)),C=await(o.isElement==null?void 0:o.isElement(k))?await(o.getScale==null?void 0:o.getScale(k))||{x:1,y:1}:{x:1,y:1},R=Cy(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:x,offsetParent:k,strategy:c}):x);return{top:(w.top-R.top+b.top)/C.y,bottom:(R.bottom-w.bottom+b.bottom)/C.y,left:(w.left-R.left+b.left)/C.x,right:(R.right-w.right+b.right)/C.x}}const gQ=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,l=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}=OD(f,r,c),m=r,g={},b=0;for(let w=0;w<l.length;w++){var v;const{name:x,fn:k}=l[w],{x:C,y:R,data:_,reset:D}=await k({x:h,y:p,initialPlacement:r,placement:m,strategy:i,middlewareData:g,rects:f,platform:{...a,detectOverflow:(v=a.detectOverflow)!=null?v:mQ},elements:{reference:e,floating:t}});h=C??h,p=R??p,g={...g,[x]:{...g[x],..._}},D&&b<=50&&(b++,typeof D=="object"&&(D.placement&&(m=D.placement),D.rects&&(f=D.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):D.rects),{x:h,y:p}=OD(f,m,c)),w=-1)}return{x:h,y:p,placement:m,strategy:i,middlewareData:g}},yQ=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:l,platform:c,elements:f}=t,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0,...w}=$s(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const x=Ur(i),k=Ui(l),C=Ur(l)===l,R=await(c.isRTL==null?void 0:c.isRTL(f.floating)),_=m||(C||!v?[Ey(l)]:oQ(l)),D=b!=="none";!m&&D&&_.push(...uQ(l,v,b,R));const M=[l,..._],O=await c.detectOverflow(t,w),U=[];let L=((r=o.flip)==null?void 0:r.overflows)||[];if(h&&U.push(O[x]),p){const V=iQ(i,a,R);U.push(O[V[0]],O[V[1]])}if(L=[...L,{placement:i,overflows:U}],!U.every(V=>V<=0)){var I,$;const V=(((I=o.flip)==null?void 0:I.index)||0)+1,F=M[V];if(F&&(!(p==="alignment"&&k!==Ui(F))||L.every(j=>Ui(j.placement)===k?j.overflows[0]>0:!0)))return{data:{index:V,overflows:L},reset:{placement:F}};let z=($=L.filter(j=>j.overflows[0]<=0).sort((j,H)=>j.overflows[1]-H.overflows[1])[0])==null?void 0:$.placement;if(!z)switch(g){case"bestFit":{var B;const j=(B=L.filter(H=>{if(D){const X=Ui(H.placement);return X===k||X==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(X=>X>0).reduce((X,P)=>X+P,0)]).sort((H,X)=>H[1]-X[1])[0])==null?void 0:B[0];j&&(z=j);break}case"initialPlacement":z=l;break}if(i!==z)return{reset:{placement:z}}}return{}}}};function PD(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ID(e){return eQ.some(t=>e[t]>=0)}const bQ=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...o}=$s(e,t);switch(i){case"referenceHidden":{const a=await r.detectOverflow(t,{...o,elementContext:"reference"}),l=PD(a,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:ID(l)}}}case"escaped":{const a=await r.detectOverflow(t,{...o,altBoundary:!0}),l=PD(a,n.floating);return{data:{escapedOffsets:l,escaped:ID(l)}}}default:return{}}}}},kI=new Set(["left","top"]);async function vQ(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=Ur(n),l=al(n),c=Ui(n)==="y",f=kI.has(a)?-1:1,h=o&&c?-1:1,p=$s(t,e);let{mainAxis:m,crossAxis:g,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof b=="number"&&(g=l==="end"?b*-1:b),c?{x:g*h,y:m*f}:{x:m*f,y:g*h}}const xQ=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:l}=t,c=await vQ(t,e);return a===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:o+c.y,data:{...c,placement:a}}}}},wQ=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:l=!1,limiter:c={fn:x=>{let{x:k,y:C}=x;return{x:k,y:C}}},...f}=$s(e,t),h={x:n,y:r},p=await o.detectOverflow(t,f),m=Ui(Ur(i)),g=fC(m);let b=h[g],v=h[m];if(a){const x=g==="y"?"top":"left",k=g==="y"?"bottom":"right",C=b+p[x],R=b-p[k];b=yS(C,b,R)}if(l){const x=m==="y"?"top":"left",k=m==="y"?"bottom":"right",C=v+p[x],R=v-p[k];v=yS(C,v,R)}const w=c.fn({...t,[g]:b,[m]:v});return{...w,data:{x:w.x-n,y:w.y-r,enabled:{[g]:a,[m]:l}}}}}},SQ=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:l=0,mainAxis:c=!0,crossAxis:f=!0}=$s(e,t),h={x:n,y:r},p=Ui(i),m=fC(p);let g=h[m],b=h[p];const v=$s(l,t),w=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const C=m==="y"?"height":"width",R=o.reference[m]-o.floating[C]+w.mainAxis,_=o.reference[m]+o.reference[C]-w.mainAxis;g<R?g=R:g>_&&(g=_)}if(f){var x,k;const C=m==="y"?"width":"height",R=kI.has(Ur(i)),_=o.reference[p]-o.floating[C]+(R&&((x=a.offset)==null?void 0:x[p])||0)+(R?0:w.crossAxis),D=o.reference[p]+o.reference[C]+(R?0:((k=a.offset)==null?void 0:k[p])||0)-(R?w.crossAxis:0);b<_?b=_:b>D&&(b=D)}return{[m]:g,[p]:b}}}},EQ=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:l}=t,{apply:c=()=>{},...f}=$s(e,t),h=await a.detectOverflow(t,f),p=Ur(i),m=al(i),g=Ui(i)==="y",{width:b,height:v}=o.floating;let w,x;p==="top"||p==="bottom"?(w=p,x=m===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(x=p,w=m==="end"?"top":"bottom");const k=v-h.top-h.bottom,C=b-h.left-h.right,R=vf(v-h[w],k),_=vf(b-h[x],C),D=!t.middlewareData.shift;let M=R,O=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(O=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(M=k),D&&!m){const L=si(h.left,0),I=si(h.right,0),$=si(h.top,0),B=si(h.bottom,0);g?O=b-2*(L!==0||I!==0?L+I:si(h.left,h.right)):M=v-2*($!==0||B!==0?$+B:si(h.top,h.bottom))}await c({...t,availableWidth:O,availableHeight:M});const U=await a.getDimensions(l.floating);return b!==U.width||v!==U.height?{reset:{rects:!0}}:{}}}};function RI(e){const t=gi(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Ln(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,l=Sy(n)!==o||Sy(r)!==a;return l&&(n=o,r=a),{width:n,height:r,$:l}}function pC(e){return Yt(e)?e:e.contextElement}function Hc(e){const t=pC(e);if(!Ln(t))return Do(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=RI(t);let a=(o?Sy(n.width):n.width)/r,l=(o?Sy(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const CQ=Do(0);function AI(e){const t=kn(e);return!Eb()||!t.visualViewport?CQ:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function kQ(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==kn(e)?!1:t}function bu(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=pC(e);let a=Do(1);t&&(r?Yt(r)&&(a=Hc(r)):a=Hc(e));const l=kQ(o,n,r)?AI(o):Do(0);let c=(i.left+l.x)/a.x,f=(i.top+l.y)/a.y,h=i.width/a.x,p=i.height/a.y;if(o){const m=kn(o),g=r&&Yt(r)?kn(r):r;let b=m,v=oS(b);for(;v&&r&&g!==b;){const w=Hc(v),x=v.getBoundingClientRect(),k=gi(v),C=x.left+(v.clientLeft+parseFloat(k.paddingLeft))*w.x,R=x.top+(v.clientTop+parseFloat(k.paddingTop))*w.y;c*=w.x,f*=w.y,h*=w.x,p*=w.y,c+=C,f+=R,b=kn(v),v=oS(b)}}return Cy({width:h,height:p,x:c,y:f})}function Pb(e,t){const n=Cb(e).scrollLeft;return t?t.left+n:bu(No(e)).left+n}function TI(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Pb(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function RQ(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=No(r),l=t?Sb(t.floating):!1;if(r===a||l&&o)return n;let c={scrollLeft:0,scrollTop:0},f=Do(1);const h=Do(0),p=Ln(r);if((p||!p&&!o)&&((ol(r)!=="body"||sl(a))&&(c=Cb(r)),Ln(r))){const g=bu(r);f=Hc(r),h.x=g.x+r.clientLeft,h.y=g.y+r.clientTop}const m=a&&!p&&!o?TI(a,c):Do(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-c.scrollLeft*f.x+h.x+m.x,y:n.y*f.y-c.scrollTop*f.y+h.y+m.y}}function AQ(e){return Array.from(e.getClientRects())}function TQ(e){const t=No(e),n=Cb(e),r=e.ownerDocument.body,i=si(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=si(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Pb(e);const l=-n.scrollTop;return gi(r).direction==="rtl"&&(a+=si(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:l}}const LD=25;function _Q(e,t){const n=kn(e),r=No(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,l=0,c=0;if(i){o=i.width,a=i.height;const h=Eb();(!h||h&&t==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}const f=Pb(r);if(f<=0){const h=r.ownerDocument,p=h.body,m=getComputedStyle(p),g=h.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,b=Math.abs(r.clientWidth-p.clientWidth-g);b<=LD&&(o-=b)}else f<=LD&&(o+=f);return{width:o,height:a,x:l,y:c}}const DQ=new Set(["absolute","fixed"]);function MQ(e,t){const n=bu(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Ln(e)?Hc(e):Do(1),a=e.clientWidth*o.x,l=e.clientHeight*o.y,c=i*o.x,f=r*o.y;return{width:a,height:l,x:c,y:f}}function ND(e,t,n){let r;if(t==="viewport")r=_Q(e,n);else if(t==="document")r=TQ(No(e));else if(Yt(t))r=MQ(t,n);else{const i=AI(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Cy(r)}function _I(e,t){const n=Ms(e);return n===t||!Yt(n)||Rs(n)?!1:gi(n).position==="fixed"||_I(n,t)}function $Q(e,t){const n=t.get(e);if(n)return n;let r=Va(e,[],!1).filter(l=>Yt(l)&&ol(l)!=="body"),i=null;const o=gi(e).position==="fixed";let a=o?Ms(e):e;for(;Yt(a)&&!Rs(a);){const l=gi(a),c=nC(a);!c&&l.position==="fixed"&&(i=null),(o?!c&&!i:!c&&l.position==="static"&&i&&DQ.has(i.position)||sl(a)&&!c&&_I(e,a))?r=r.filter(f=>f!==a):i=l,a=Ms(a)}return t.set(e,r),r}function OQ(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?Sb(t)?[]:$Q(t,this._c):[].concat(n),r],a=o[0],l=o.reduce((c,f)=>{const h=ND(t,f,i);return c.top=si(h.top,c.top),c.right=vf(h.right,c.right),c.bottom=vf(h.bottom,c.bottom),c.left=si(h.left,c.left),c},ND(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function PQ(e){const{width:t,height:n}=RI(e);return{width:t,height:n}}function IQ(e,t,n){const r=Ln(t),i=No(t),o=n==="fixed",a=bu(e,!0,o,t);let l={scrollLeft:0,scrollTop:0};const c=Do(0);function f(){c.x=Pb(i)}if(r||!r&&!o)if((ol(t)!=="body"||sl(i))&&(l=Cb(t)),r){const g=bu(t,!0,o,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop}else i&&f();o&&!r&&i&&f();const h=i&&!r&&!o?TI(i,l):Do(0),p=a.left+l.scrollLeft-c.x-h.x,m=a.top+l.scrollTop-c.y-h.y;return{x:p,y:m,width:a.width,height:a.height}}function px(e){return gi(e).position==="static"}function jD(e,t){if(!Ln(e)||gi(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return No(e)===n&&(n=n.ownerDocument.body),n}function DI(e,t){const n=kn(e);if(Sb(e))return n;if(!Ln(e)){let i=Ms(e);for(;i&&!Rs(i);){if(Yt(i)&&!px(i))return i;i=Ms(i)}return n}let r=jD(e,t);for(;r&&nW(r)&&px(r);)r=jD(r,t);return r&&Rs(r)&&px(r)&&!nC(r)?n:r||aW(e)||n}const LQ=async function(e){const t=this.getOffsetParent||DI,n=this.getDimensions,r=await n(e.floating);return{reference:IQ(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function NQ(e){return gi(e).direction==="rtl"}const jQ={convertOffsetParentRelativeRectToViewportRelativeRect:RQ,getDocumentElement:No,getClippingRect:OQ,getOffsetParent:DI,getElementRects:LQ,getClientRects:AQ,getDimensions:PQ,getScale:Hc,isElement:Yt,isRTL:NQ};function MI(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function FQ(e,t){let n=null,r;const i=No(e);function o(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),o();const f=e.getBoundingClientRect(),{left:h,top:p,width:m,height:g}=f;if(l||t(),!m||!g)return;const b=Xm(p),v=Xm(i.clientWidth-(h+m)),w=Xm(i.clientHeight-(p+g)),x=Xm(h),k={rootMargin:-b+"px "+-v+"px "+-w+"px "+-x+"px",threshold:si(0,vf(1,c))||1};let C=!0;function R(_){const D=_[0].intersectionRatio;if(D!==c){if(!C)return a();D?a(!1,D):r=setTimeout(()=>{a(!1,1e-7)},1e3)}D===1&&!MI(f,e.getBoundingClientRect())&&a(),C=!1}try{n=new IntersectionObserver(R,{...k,root:i.ownerDocument})}catch{n=new IntersectionObserver(R,k)}n.observe(e)}return a(!0),o}function FD(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,f=pC(e),h=i||o?[...f?Va(f):[],...Va(t)]:[];h.forEach(x=>{i&&x.addEventListener("scroll",n,{passive:!0}),o&&x.addEventListener("resize",n)});const p=f&&l?FQ(f,n):null;let m=-1,g=null;a&&(g=new ResizeObserver(x=>{let[k]=x;k&&k.target===f&&g&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var C;(C=g)==null||C.observe(t)})),n()}),f&&!c&&g.observe(f),g.observe(t));let b,v=c?bu(e):null;c&&w();function w(){const x=bu(e);v&&!MI(v,x)&&n(),v=x,b=requestAnimationFrame(w)}return n(),()=>{var x;h.forEach(k=>{i&&k.removeEventListener("scroll",n),o&&k.removeEventListener("resize",n)}),p==null||p(),(x=g)==null||x.disconnect(),g=null,c&&cancelAnimationFrame(b)}}const zQ=xQ,BQ=wQ,HQ=yQ,UQ=EQ,qQ=bQ,VQ=SQ,GQ=(e,t,n)=>{const r=new Map,i={platform:jQ,...n},o={...i.platform,_c:r};return gQ(e,t,{...i,platform:o})};var YQ=typeof document<"u",WQ=function(){},Vg=YQ?S.useLayoutEffect:WQ;function ky(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(!ky(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)&&!ky(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function $I(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function zD(e,t){const n=$I(e);return Math.round(t*n)/n}function mx(e){const t=S.useRef(e);return Vg(()=>{t.current=e}),t}function KQ(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:l=!0,whileElementsMounted:c,open:f}=e,[h,p]=S.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,g]=S.useState(r);ky(m,r)||g(r);const[b,v]=S.useState(null),[w,x]=S.useState(null),k=S.useCallback(H=>{H!==D.current&&(D.current=H,v(H))},[]),C=S.useCallback(H=>{H!==M.current&&(M.current=H,x(H))},[]),R=o||b,_=a||w,D=S.useRef(null),M=S.useRef(null),O=S.useRef(h),U=c!=null,L=mx(c),I=mx(i),$=mx(f),B=S.useCallback(()=>{if(!D.current||!M.current)return;const H={placement:t,strategy:n,middleware:m};I.current&&(H.platform=I.current),GQ(D.current,M.current,H).then(X=>{const P={...X,isPositioned:$.current!==!1};V.current&&!ky(O.current,P)&&(O.current=P,Rn.flushSync(()=>{p(P)}))})},[m,t,n,I,$]);Vg(()=>{f===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,p(H=>({...H,isPositioned:!1})))},[f]);const V=S.useRef(!1);Vg(()=>(V.current=!0,()=>{V.current=!1}),[]),Vg(()=>{if(R&&(D.current=R),_&&(M.current=_),R&&_){if(L.current)return L.current(R,_,B);B()}},[R,_,B,L,U]);const F=S.useMemo(()=>({reference:D,floating:M,setReference:k,setFloating:C}),[k,C]),z=S.useMemo(()=>({reference:R,floating:_}),[R,_]),j=S.useMemo(()=>{const H={position:n,left:0,top:0};if(!z.floating)return H;const X=zD(z.floating,h.x),P=zD(z.floating,h.y);return l?{...H,transform:"translate("+X+"px, "+P+"px)",...$I(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:X,top:P}},[n,l,z.floating,h.x,h.y]);return S.useMemo(()=>({...h,update:B,refs:F,elements:z,floatingStyles:j}),[h,B,F,z,j])}const XQ=(e,t)=>({...zQ(e),options:[e,t]}),QQ=(e,t)=>({...BQ(e),options:[e,t]}),ZQ=(e,t)=>({...VQ(e),options:[e,t]}),JQ=(e,t)=>({...HQ(e),options:[e,t]}),eZ=(e,t)=>({...UQ(e),options:[e,t]}),tZ=(e,t)=>({...qQ(e),options:[e,t]}),nZ={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 tZ().fn(e)).data)==null?void 0:a.referenceHidden)||o}}}},Gg={sideX:"left",sideY:"top"},rZ={name:"adaptiveOrigin",async fn(e){var x,k;const{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:o,strategy:a,placement:l}=e,c=kn(i),f=c.getComputedStyle(i);if(!(f.transitionDuration!=="0s"&&f.transitionDuration!==""))return{x:t,y:n,data:Gg};const h=await((x=o.getOffsetParent)==null?void 0:x.call(o,i));let p={width:0,height:0};if(a==="fixed"&&(c!=null&&c.visualViewport))p={width:c.visualViewport.width,height:c.visualViewport.height};else if(h===c){const C=Vt(i);p={width:C.documentElement.clientWidth,height:C.documentElement.clientHeight}}else await((k=o.isElement)==null?void 0:k.call(o,h))&&(p=await o.getDimensions(h));const m=Ur(l);let g=t,b=n;m==="left"&&(g=p.width-(t+r.width)),m==="top"&&(b=p.height-(n+r.height));const v=m==="left"?"right":Gg.sideX,w=m==="top"?"bottom":Gg.sideY;return{x:g,y:b,data:{sideX:v,sideY:w}}}};function iZ(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,i=Nf(),o=Tb()!=null,a=xi(()=>new oC({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Mb,floatingId:i,nested:o,noEmit:!1})).current;return $t(()=>{const l={open:t,floatingId:i};r.reference!==void 0&&(l.referenceElement=r.reference,l.domReferenceElement=Yt(r.reference)?r.reference:null),r.floating!==void 0&&(l.floatingElement=r.floating),a.update(l)},[t,i,r.reference,r.floating,a]),a.context.onOpenChange=n,a.context.nested=o,a.context.noEmit=!1,a}function oZ(e={}){const{nodeId:t,externalTree:n}=e,r=iZ(e),i=e.rootContext||r,o={reference:i.useState("referenceElement"),floating:i.useState("floatingElement"),domReference:i.useState("domReferenceElement")},[a,l]=S.useState(null),c=S.useRef(null),f=op(n);$t(()=>{o.domReference&&(c.current=o.domReference)},[o.domReference]);const h=KQ({...e,elements:{...o,...a&&{reference:a}}}),p=S.useCallback(M=>{const O=Yt(M)?{getBoundingClientRect:()=>M.getBoundingClientRect(),getClientRects:()=>M.getClientRects(),contextElement:M}:M;l(O),h.refs.setReference(O)},[h.refs]),[m,g]=S.useState(null),[b,v]=S.useState(null);i.useSyncedValue("referenceElement",m),i.useSyncedValue("domReferenceElement",Yt(m)?m:null),i.useSyncedValue("floatingElement",b);const w=S.useCallback(M=>{(Yt(M)||M===null)&&(c.current=M,g(M)),(Yt(h.refs.reference.current)||h.refs.reference.current===null||M!==null&&!Yt(M))&&h.refs.setReference(M)},[h.refs,g]),x=S.useCallback(M=>{v(M),h.refs.setFloating(M)},[h.refs]),k=S.useMemo(()=>({...h.refs,setReference:w,setFloating:x,setPositionReference:p,domReference:c}),[h.refs,w,x,p]),C=S.useMemo(()=>({...h.elements,domReference:o.domReference}),[h.elements,o.domReference]),R=i.useState("open"),_=i.useState("floatingId"),D=S.useMemo(()=>({...h,dataRef:i.context.dataRef,open:R,onOpenChange:i.setOpen,events:i.context.events,floatingId:_,refs:k,elements:C,nodeId:t,rootStore:i}),[h,k,C,t,i,R,_]);return $t(()=>{i.context.dataRef.current.floatingContext=D;const M=f==null?void 0:f.nodesRef.current.find(O=>O.id===t);M&&(M.context=D)}),S.useMemo(()=>({...h,context:D,refs:k,elements:C,rootStore:i}),[h,k,C,D,i])}function OI(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 BD(e,t,n){const{rects:r,placement:i}=e;return{side:OI(t,Ur(i),n),align:al(i)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function sZ(e){var Le,Be;const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:a=0,collisionBoundary:l,collisionPadding:c=5,sticky:f=!1,arrowPadding:h=5,disableAnchorTracking:p=!1,keepMounted:m=!1,floatingRootContext:g,mounted:b,collisionAvoidance:v,shiftCrossAxis:w=!1,nodeId:x,adaptiveOrigin:k,lazyFlip:C=!1,externalTree:R}=e,[_,D]=S.useState(null);!b&&_!==null&&D(null);const M=v.side||"flip",O=v.align||"flip",U=v.fallbackAxisSide||"end",L=typeof t=="function"?t:void 0,I=ft(L),$=L?I:t,B=To(t),V=dQ()==="rtl",F=_||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":V?"left":"right","inline-start":V?"right":"left"}[r],z=o==="center"?F:`${F}-${o}`;let j=c;const H=1,X=r==="bottom"?H:0,P=r==="top"?H:0,K=r==="right"?H:0,ee=r==="left"?H:0;typeof j=="number"?j={top:j+X,right:j+ee,bottom:j+P,left:j+K}:j&&(j={top:(j.top||0)+X,right:(j.right||0)+ee,bottom:(j.bottom||0)+P,left:(j.left||0)+K});const q={boundary:l==="clipping-ancestors"?"clippingAncestors":l,padding:j},ae=S.useRef(null),re=To(i),fe=To(a),ve=[XQ($e=>{const Ye=BD($e,r,V),Je=typeof re.current=="function"?re.current(Ye):re.current,et=typeof fe.current=="function"?fe.current(Ye):fe.current;return{mainAxis:Je,crossAxis:et,alignmentAxis:et}},[typeof i!="function"?i:0,typeof a!="function"?a:0,V,r])],Re=O==="none"&&M!=="shift",le=!Re&&(f||w||M==="shift"),Ae=M==="none"?null:JQ({...q,padding:{top:j.top+H,right:j.right+H,bottom:j.bottom+H,left:j.left+H},mainAxis:!w&&M==="flip",crossAxis:O==="flip"?"alignment":!1,fallbackAxisSideDirection:U}),Ie=Re?null:QQ($e=>{const Ye=Vt($e.elements.floating).documentElement;return{...q,rootBoundary:w?{x:0,y:0,width:Ye.clientWidth,height:Ye.clientHeight}:void 0,mainAxis:O!=="none",crossAxis:le,limiter:f||w?void 0:ZQ(Je=>{if(!ae.current)return{};const{width:et,height:tt}=ae.current.getBoundingClientRect(),jt=Ui(Ur(Je.placement)),kt=jt==="y"?et:tt,Ot=jt==="y"?j.left+j.right:j.top+j.bottom;return{offset:kt/2+Ot/2}})}},[q,f,w,j,O]);M==="shift"||O==="shift"||o==="center"?ve.push(Ie,Ae):ve.push(Ae,Ie),ve.push(eZ({...q,apply({elements:{floating:$e},rects:{reference:Ye},availableWidth:Je,availableHeight:et}){const tt=$e.style;tt.setProperty("--available-width",`${Je}px`),tt.setProperty("--available-height",`${et}px`),tt.setProperty("--anchor-width",`${Ye.width}px`),tt.setProperty("--anchor-height",`${Ye.height}px`)}}),pQ(()=>({element:ae.current||document.createElement("div"),padding:h,offsetParent:"floating"}),[h]),{name:"transformOrigin",fn($e){var fo,or,un;const{elements:Ye,middlewareData:Je,placement:et,rects:tt,y:jt}=$e,kt=Ur(et),Ot=Ui(kt),zt=ae.current,Dn=((fo=Je.arrow)==null?void 0:fo.x)||0,Tr=((or=Je.arrow)==null?void 0:or.y)||0,Vn=(zt==null?void 0:zt.clientWidth)||0,Kr=(zt==null?void 0:zt.clientHeight)||0,Nn=Dn+Vn/2,rt=Tr+Kr/2,Ut=Math.abs(((un=Je.shift)==null?void 0:un.y)||0),an=tt.reference.height/2,Jt=typeof i=="function"?i(BD($e,r,V)):i,gn=Ut>Jt,Ki={top:`${Nn}px calc(100% + ${Jt}px)`,bottom:`${Nn}px ${-Jt}px`,left:`calc(100% + ${Jt}px) ${rt}px`,right:`${-Jt}px ${rt}px`}[kt],Si=`${Nn}px ${tt.reference.y+an-jt}px`;return Ye.floating.style.setProperty("--transform-origin",le&&Ot==="y"&&gn?Si:Ki),{}}},nZ,k),$t(()=>{!b&&g&&g.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[b,g]);const Y=S.useMemo(()=>({elementResize:!p&&typeof ResizeObserver<"u",layoutShift:!p&&typeof IntersectionObserver<"u"}),[p]),{refs:W,elements:Q,x:pe,y:oe,middlewareData:me,update:te,placement:Z,context:ie,isPositioned:J,floatingStyles:Se}=oZ({rootContext:g,placement:z,middleware:ve,strategy:n,whileElementsMounted:m?void 0:(...$e)=>FD(...$e,Y),nodeId:x,externalTree:R}),{sideX:ke,sideY:ge}=me.adaptiveOrigin||Gg,_e=J?n:"fixed",de=S.useMemo(()=>{const $e=k?{position:_e,[ke]:pe,[ge]:oe}:{position:_e,...Se};return J||($e.opacity=0),$e},[k,_e,ke,pe,ge,oe,Se,J]),Ce=S.useRef(null);$t(()=>{if(!b)return;const $e=B.current,Ye=typeof $e=="function"?$e():$e,Je=(HD(Ye)?Ye.current:Ye)||null||null;Je!==Ce.current&&(W.setPositionReference(Je),Ce.current=Je)},[b,W,$,B]),S.useEffect(()=>{if(!b)return;const $e=B.current;typeof $e!="function"&&HD($e)&&$e.current!==Ce.current&&(W.setPositionReference($e.current),Ce.current=$e.current)},[b,W,$,B]),S.useEffect(()=>{if(m&&b&&Q.domReference&&Q.floating)return FD(Q.domReference,Q.floating,te,Y)},[m,b,Q,te,Y]);const ye=Ur(Z),Me=OI(r,ye,V),Pe=al(Z)||"center",Ke=!!((Le=me.hide)!=null&&Le.referenceHidden);$t(()=>{C&&b&&J&&D(ye)},[C,b,J,ye]);const Et=S.useMemo(()=>{var $e,Ye;return{position:"absolute",top:($e=me.arrow)==null?void 0:$e.y,left:(Ye=me.arrow)==null?void 0:Ye.x}},[me.arrow]),vt=((Be=me.arrow)==null?void 0:Be.centerOffset)!==0;return S.useMemo(()=>({positionerStyles:de,arrowStyles:Et,arrowRef:ae,arrowUncentered:vt,side:Me,align:Pe,physicalSide:ye,anchorHidden:Ke,refs:W,context:ie,isPositioned:J,update:te}),[de,Et,ae,vt,Me,Pe,ye,Ke,W,ie,J,te])}function HD(e){return e!=null&&"current"in e}function PI(e){return e==="starting"?eX:Fr}const aZ=new Set(["click","mousedown"]);function lZ(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:l=!0,closeDelay:c=0}=t,f=EI(n),h=op(),p=Tb(),m=ft(()=>f.interactedInside?!0:a.current.openEvent?aZ.has(a.current.openEvent.type):!1),g=ft(()=>{var R;const C=(R=a.current.openEvent)==null?void 0:R.type;return(C==null?void 0:C.includes("mouse"))&&C!=="mousedown"}),b=ft(C=>my(C,n.context.triggerElements)),v=S.useCallback((C,R=!0)=>{const _=uZ(c,f.pointerType);_&&!f.handler?f.openChangeTimeout.start(_,()=>n.setOpen(!1,hn(ro,C))):R&&(f.openChangeTimeout.clear(),n.setOpen(!1,hn(ro,C)))},[c,n,f]),w=ft(()=>{f.unbindMouseMove(),f.handler=void 0}),x=ft(()=>{if(f.performedPointerEventsMutation){const C=Vt(i).body;C.style.pointerEvents="",C.removeAttribute(gS),f.performedPointerEventsMutation=!1}}),k=ft(C=>{const R=ir(C);if(!WX(R)){f.interactedInside=!1;return}f.interactedInside=!0});$t(()=>{r||(f.pointerType=void 0,f.restTimeoutPending=!1,f.interactedInside=!1,w(),x())},[r,f,w,x]),S.useEffect(()=>()=>{w()},[w]),S.useEffect(()=>x,[x]),$t(()=>{var C,R,_;if(l&&r&&((C=f.handleCloseOptions)!=null&&C.blockPointerEvents)&&g()&&Yt(o)&&i){f.performedPointerEventsMutation=!0;const D=Vt(i).body;D.setAttribute(gS,"");const M=o,O=i,U=(_=(R=h==null?void 0:h.nodesRef.current.find(L=>L.id===p))==null?void 0:R.context)==null?void 0:_.elements.floating;return U&&(U.style.pointerEvents=""),D.style.pointerEvents="none",M.style.pointerEvents="auto",O.style.pointerEvents="auto",()=>{D.style.pointerEvents="",M.style.pointerEvents="",O.style.pointerEvents=""}}},[l,r,o,i,f,g,h,p]),S.useEffect(()=>{if(!l)return;function C(M){m()||!a.current.floatingContext||!n.select("open")||b(M.relatedTarget)||(x(),w(),m()||v(M))}function R(M){var O;f.openChangeTimeout.clear(),x(),(O=f.handler)==null||O.call(f,M),w()}function _(M){m()||v(M,!1)}const D=i;return D&&(D.addEventListener("mouseleave",C),D.addEventListener("mouseenter",R),D.addEventListener("mouseleave",_),D.addEventListener("pointerdown",k,!0)),()=>{D&&(D.removeEventListener("mouseleave",C),D.removeEventListener("mouseenter",R),D.removeEventListener("mouseleave",_),D.removeEventListener("pointerdown",k,!0))}},[l,i,n,a,m,b,v,x,w,k,f])}function uZ(e,t){return t&&!yu(t)?0:typeof e=="function"?e():e}const II=({children:e,...t})=>T.jsx(_K,{"data-slot":"sheet-root",...t,children:e});II.displayName="SheetRoot";const LI=({children:e,...t})=>{const n=S.isValidElement(e);return T.jsx(iX,{"data-slot":"sheet-trigger",nativeButton:n,render:n?e:T.jsx("span",{role:"button",tabIndex:0,children:e}),...t,children:e})};LI.displayName="SheetTrigger";const NI=({children:e,...t})=>T.jsx(RX,{"data-slot":"sheet-portal",...t,children:e});NI.displayName="SheetPortal";const Ic={"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"},jI=({className:e,...t})=>T.jsx(TX,{"data-slot":"sheet-backdrop",className:ze(Ic["sheet-backdrop"],e),...t});jI.displayName="SheetBackdrop";const cZ=Yr({variants:{side:{top:Ic["side-top"],right:Ic["side-right"],bottom:Ic["side-bottom"],left:Ic["side-left"]}}}),FI=({side:e,title:t,description:n,icon:r,action:i,footer:o,className:a,children:l,...c})=>T.jsx(GX,{render:T.jsx(En,{gap:4,title:t,description:n,icon:r,action:i,footer:o,FooterProps:{style:{marginTop:"auto"}}}),className:ze(Ic["sheet-popup"],cZ({side:e}),a),...c,children:l});FI.displayName="SheetPopup";const zI=({side:e="right",title:t,description:n,icon:r,action:i,footer:o,RootProps:a,TriggerProps:l,PortalProps:c,BackdropProps:f,PopupProps:h,trigger:p,open:m,onOpenChange:g,children:b})=>T.jsxs(II,{open:m,onOpenChange:g,...a,children:[T.jsx(LI,{...l,children:p??(l==null?void 0:l.children)}),T.jsxs(NI,{...c,children:[T.jsx(jI,{...f}),T.jsx(FI,{side:e,title:t,description:n,icon:r,action:i,footer:o,...h,children:b??(h==null?void 0:h.children)})]})]});zI.displayName="Sheet";const fZ="_toast_ornow_1",BI={"toast-viewport":"_toast-viewport_ornow_1",toast:fZ},mC=S.createContext(void 0);function HI(){const e=S.useContext(mC);if(!e)throw new Error(Ar(73));return e}let UD=0;function dZ(e){return UD+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${UD}`}function gx(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 Qm=gK(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}),us={toasts:ct(e=>e.toasts),isEmpty:ct(e=>e.toasts.length===0),toast:ct(Qm,(e,t)=>{var n;return(n=e.get(t))==null?void 0:n.value}),toastIndex:ct(Qm,(e,t)=>{var n;return((n=e.get(t))==null?void 0:n.domIndex)??-1}),toastOffsetY:ct(Qm,(e,t)=>{var n;return((n=e.get(t))==null?void 0:n.offsetY)??0}),toastVisibleIndex:ct(Qm,(e,t)=>{var n;return((n=e.get(t))==null?void 0:n.visibleIndex)??-1}),hovering:ct(e=>e.hovering),focused:ct(e=>e.focused),expanded:ct(e=>e.hovering||e.focused),expandedOrOutOfFocus:ct(e=>e.hovering||e.focused||!e.isWindowFocused),prevFocusElement:ct(e=>e.prevFocusElement)};let hZ=class extends _b{constructor(n){super(n,{},us);ce(this,"timers",new Map);ce(this,"areTimersPaused",!1);ce(this,"setViewport",n=>{this.set("viewport",n)});ce(this,"disposeEffect",()=>()=>{this.timers.forEach(n=>{var r;(r=n.timeout)==null||r.clear()}),this.timers.clear()});ce(this,"addToast",n=>{const{toasts:r,timeout:i,limit:o}=this.state,a=n.id||dZ("toast"),l={...n,id:a,transitionStatus:"starting"},c=[l,...r],f=c.filter(p=>p.transitionStatus!=="ending");if(f.length>o){const p=f.length-o,m=f.slice(-p),g=new Set(m.map(b=>b.id));this.setToasts(c.map(b=>{const v=g.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=l.timeout??i;return l.type!=="loading"&&h>0&&this.scheduleTimer(a,h,()=>this.closeToast(a)),us.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),a});ce(this,"updateToast",(n,r)=>{this.updateToastInternal(n,r)});ce(this,"updateToastInternal",(n,r)=>{var v,w,x;const{timeout:i,toasts:o}=this.state,a=us.toast(this.state,n)??null;if(!a||a.transitionStatus==="ending")return;const l={...a,...r};this.setToasts(o.map(k=>k.id===n?{...k,...r}:k));const c=l.timeout??i,f=(a==null?void 0:a.timeout)??i,h=Object.hasOwn(r,"timeout"),p=l.transitionStatus!=="ending"&&l.type!=="loading"&&c>0,m=this.timers.has(n),g=f!==c,b=(a==null?void 0:a.type)==="loading";if(!p&&m){(w=(v=this.timers.get(n))==null?void 0:v.timeout)==null||w.clear(),this.timers.delete(n);return}if(p&&(!m||g||h||b)){const k=this.timers.get(n);k&&((x=k.timeout)==null||x.clear(),this.timers.delete(n)),this.scheduleTimer(n,c,()=>this.closeToast(n)),us.expandedOrOutOfFocus(this.state)&&this.pauseTimers()}});ce(this,"closeToast",n=>{var c,f;(f=(c=us.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}),l=this.timers.get(n);l&&l.timeout&&(l.timeout.clear(),this.timers.delete(n)),this.handleFocusManagement(n),this.setToasts(a)});ce(this,"promiseToast",(n,r)=>{const i=gx(r.loading),o=this.addToast({...i,type:"loading"}),a=n.then(l=>{const c=gx(r.success,l);return this.updateToast(o,{...c,type:"success",timeout:c.timeout}),l}).catch(l=>{const c=gx(r.error,l);return this.updateToast(o,{...c,type:"error",timeout:c.timeout}),Promise.reject(l)});return{}.hasOwnProperty.call(r,"setPromise")&&r.setPromise(a),a});ce(this,"handleDocumentPointerDown",n=>{if(n.pointerType!=="touch")return;const r=ir(n);wt(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=us.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=Io.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=!us.expandedOrOutOfFocus(this.state),l=a?Io.create():void 0;l==null||l.start(r,()=>{this.timers.delete(n),i()}),this.timers.set(n,{timeout:l,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=oi(Vt(this.state.viewport));if(!this.state.viewport||!wt(this.state.viewport,r)||!gy(r))return;const i=us.toasts(this.state),o=us.toastIndex(this.state,n);let a=null,l=o+1;for(;l<i.length;){if(i[l].transitionStatus!=="ending"){a=i[l];break}l+=1}if(!a)for(l=o-1;l>=0;){if(i[l].transitionStatus!=="ending"){a=i[l];break}l-=1}a?(f=(c=a.ref)==null?void 0:c.current)==null||f.focus():this.restoreFocusToPrevElement()}};const pZ=function(e){const{children:t,timeout:n=5e3,limit:r=3,toastManager:i}=e,o=xi(()=>new hZ({timeout:n,limit:r,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return kb(o.disposeEffect),S.useEffect(function(){return i?i[" subscribe"](({action:a,options:l})=>{const c=l.id;a==="promise"&&l.promise?o.promiseToast(l.promise,l):a==="update"&&c?o.updateToast(c,l):a==="close"&&c?o.closeToast(c):o.addToast(l)}):void 0},[o,n,i]),o.useSyncedValues({timeout:n,limit:r}),T.jsx(mC.Provider,{value:o,children:t})};function mZ(){const e=S.useContext(mC);if(!e)throw new Error(Ar(73));const t=e.useState("toasts");return S.useMemo(()=>({toasts:t,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[t,e])}const gZ=pZ,UI=mZ,qI=S.forwardRef(function(e,t){const{children:n,container:r,className:i,render:o,...a}=e,{portalNode:l,portalSubtree:c}=gI({container:r,ref:t,componentProps:e,elementProps:a});return!c&&!l?null:T.jsxs(S.Fragment,{children:[c,l&&Rn.createPortal(n,l)]})}),yZ=qI;let bZ=(function(e){return e.frontmostHeight="--toast-frontmost-height",e})({});const vZ=S.forwardRef(function(e,t){var I;const{render:n,className:r,children:i,...o}=e,a=HI(),l=tl(),c=S.useRef(!1),f=S.useRef(!1),h=a.useState("isEmpty"),p=a.useState("toasts"),m=a.useState("focused"),g=a.useState("expanded"),b=a.useState("prevFocusElement"),v=((I=p[0])==null?void 0:I.height)??0,w=S.useMemo(()=>p.some($=>$.transitionStatus==="ending"),[p]);S.useEffect(()=>{const $=a.state.viewport;if(!$)return;function B(F){h||F.key==="F6"&&F.target!==$&&(F.preventDefault(),a.setPrevFocusElement(oi(Vt($))),$==null||$.focus({preventScroll:!0}),a.pauseTimers(),a.setFocused(!0))}const V=kn($);return V.addEventListener("keydown",B),()=>{V.removeEventListener("keydown",B)}},[a,h]),S.useEffect(()=>{const $=a.state.viewport;if(!$||h)return;const B=kn($);function V(z){z.target===B&&(a.setIsWindowFocused(!1),a.pauseTimers())}function F(z){if(z.relatedTarget||z.target===B)return;const j=ir(z),H=oi(Vt($));(!wt($,j)||!gy(H))&&a.resumeTimers(),l.start(0,()=>a.setIsWindowFocused(!0))}return B.addEventListener("blur",V,!0),B.addEventListener("focus",F,!0),()=>{B.removeEventListener("blur",V,!0),B.removeEventListener("focus",F,!0)}},[a,l,h]),S.useEffect(()=>{const $=a.state.viewport;if(!$||h)return;const B=Vt($);return B.addEventListener("pointerdown",a.handleDocumentPointerDown,!0),()=>{B.removeEventListener("pointerdown",a.handleDocumentPointerDown,!0)}},[h,a]);function x($){var V,F,z;const B=a.state.viewport;B&&(c.current=!0,$.relatedTarget===B?(z=(F=(V=p[0])==null?void 0:V.ref)==null?void 0:F.current)==null||z.focus():a.restoreFocusToPrevElement())}function k($){$.key==="Tab"&&$.shiftKey&&$.target===a.state.viewport&&($.preventDefault(),a.restoreFocusToPrevElement(),a.resumeTimers())}S.useEffect(()=>{!a.state.isWindowFocused||w||!f.current||(a.resumeTimers(),a.setHovering(!1),f.current=!1)},[w,a]);function C(){a.pauseTimers(),a.setHovering(!0),f.current=!1}function R(){w?f.current=!0:(a.resumeTimers(),a.setHovering(!1))}function _(){if(c.current){c.current=!1;return}m||gy(Vt(a.state.viewport).activeElement)&&(a.setFocused(!0),a.pauseTimers())}function D($){!m||wt(a.state.viewport,$.relatedTarget)||(a.setFocused(!1),a.resumeTimers())}const M={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:C,onMouseMove:C,onMouseLeave:R,onFocus:_,onBlur:D,onKeyDown:k,onClick:_},O={expanded:g},U=jo("div",e,{ref:[t,a.setViewport],state:O,props:[M,{style:{[bZ.frontmostHeight]:v?`${v}px`:void 0}},o,{children:T.jsxs(S.Fragment,{children:[!h&&b&&T.jsx(du,{onFocus:x}),i,!h&&b&&T.jsx(du,{onFocus:x})]})}]}),L=S.useMemo(()=>p.filter($=>$.priority==="high"),[p]);return T.jsxs(S.Fragment,{children:[!h&&b&&T.jsx(du,{onFocus:x}),U,!m&&L.length>0&&T.jsx("div",{style:uC,children:L.map($=>T.jsxs("div",{role:"alert","aria-atomic":!0,children:[T.jsx("div",{children:$.title}),T.jsx("div",{children:$.description})]},$.id))})]})}),VI=S.createContext(void 0);function xZ(){const e=S.useContext(VI);if(!e)throw new Error(Ar(66));return e}let Nl=(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 wZ={...Rb,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},Wd=40,SZ=10,pa=.5,EZ=1;function qD(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 CZ(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 kZ=S.forwardRef(function(e,t){var te;const{toast:n,render:r,className:i,swipeDirection:o=["down","right"],...a}=e,l=((te=n.positionerProps)==null?void 0:te.anchor)!==void 0;let c=[];l||(c=Array.isArray(o)?o:[o]);const f=c.length>0,h=HI(),[p,m]=S.useState(void 0),[g,b]=S.useState(!1),[v,w]=S.useState(!1),[x,k]=S.useState(!1),[C,R]=S.useState({x:0,y:0}),[_,D]=S.useState({x:0,y:0,scale:1}),[M,O]=S.useState(),[U,L]=S.useState(),[I,$]=S.useState(null),B=S.useRef(null),V=S.useRef({x:0,y:0}),F=S.useRef({x:0,y:0,scale:1}),z=S.useRef(void 0),j=S.useRef(0),H=S.useRef(!1),X=S.useRef({x:0,y:0}),P=S.useRef(!1),K=h.useState("toastIndex",n.id),ee=h.useState("toastVisibleIndex",n.id),q=h.useState("toastOffsetY",n.id),ae=h.useState("focused"),re=h.useState("expanded");Ab({open:n.transitionStatus!=="ending",ref:B,onComplete(){n.transitionStatus==="ending"&&h.removeToast(n.id)}});const fe=ft((Z=!1)=>{const ie=B.current;if(!ie)return;const J=ie.style.height;ie.style.height="auto";const Se=ie.offsetHeight;ie.style.height=J;function ke(){h.updateToastInternal(n.id,{ref:B,height:Se,...n.transitionStatus==="starting"?{transitionStatus:void 0}:{}})}Z?Rn.flushSync(ke):ke()});$t(fe,[fe]);function ve(Z,ie){let J=Z,Se=ie;return!c.includes("left")&&!c.includes("right")?J=Z>0?Z**pa:-(Math.abs(Z)**pa):(!c.includes("right")&&Z>0&&(J=Z**pa),!c.includes("left")&&Z<0&&(J=-(Math.abs(Z)**pa))),!c.includes("up")&&!c.includes("down")?Se=ie>0?ie**pa:-(Math.abs(ie)**pa):(!c.includes("down")&&ie>0&&(Se=ie**pa),!c.includes("up")&&ie<0&&(Se=-(Math.abs(ie)**pa))),{x:J,y:Se}}function Re(Z){var J;if(Z.button!==0)return;Z.pointerType==="touch"&&h.pauseTimers();const ie=ir(Z.nativeEvent);if(!(ie&&ie.closest('button,a,input,textarea,[role="button"],[data-swipe-ignore]'))){if(H.current=!1,z.current=void 0,j.current=0,V.current={x:Z.clientX,y:Z.clientY},X.current=V.current,B.current){const Se=CZ(B.current);F.current=Se,D(Se),R({x:Se.x,y:Se.y})}h.setHovering(!0),b(!0),w(!1),$(null),P.current=!0,(J=B.current)==null||J.setPointerCapture(Z.pointerId)}}function le(Z){if(!g)return;Z.preventDefault(),P.current&&(V.current={x:Z.clientX,y:Z.clientY},P.current=!1);const{clientY:ie,clientX:J,movementX:Se,movementY:ke}=Z;(ke<0&&ie>X.current.y||ke>0&&ie<X.current.y)&&(X.current={x:X.current.x,y:ie}),(Se<0&&J>X.current.x||Se>0&&J<X.current.x)&&(X.current={x:J,y:X.current.y});const ge=J-V.current.x,_e=ie-V.current.y,de=ie-X.current.y,Ce=J-X.current.x;if(!v&&Math.sqrt(ge*ge+_e*_e)>=EZ&&(w(!0),I===null)){const Et=c.includes("left")||c.includes("right"),vt=c.includes("up")||c.includes("down");if(Et&&vt){const Le=Math.abs(ge),Be=Math.abs(_e);$(Le>Be?"horizontal":"vertical")}}let ye;if(!z.current)I==="vertical"?_e>0?ye="down":_e<0&&(ye="up"):I==="horizontal"?ge>0?ye="right":ge<0&&(ye="left"):Math.abs(ge)>=Math.abs(_e)?ye=ge>0?"right":"left":ye=_e>0?"down":"up",ye&&c.includes(ye)&&(z.current=ye,j.current=qD(ye,ge,_e),m(ye));else{const Et=z.current,vt=qD(Et,Ce,de);vt>Wd?(H.current=!1,m(Et)):!(c.includes("left")&&c.includes("right"))&&!(c.includes("up")&&c.includes("down"))&&j.current-vt>=SZ&&(H.current=!0)}const Me=ve(ge,_e);let Pe=F.current.x,Ke=F.current.y;I==="horizontal"?(c.includes("left")||c.includes("right"))&&(Pe+=Me.x):(I==="vertical"||(c.includes("left")||c.includes("right"))&&(Pe+=Me.x),(c.includes("up")||c.includes("down"))&&(Ke+=Me.y)),R({x:Pe,y:Ke})}function Ae(Z){var ge;if(!g)return;if(b(!1),w(!1),$(null),(ge=B.current)==null||ge.releasePointerCapture(Z.pointerId),H.current){R({x:_.x,y:_.y}),m(void 0);return}let ie=!1;const J=C.x-_.x,Se=C.y-_.y;let ke;for(const _e of c){switch(_e){case"right":J>Wd&&(ie=!0,ke="right");break;case"left":J<-Wd&&(ie=!0,ke="left");break;case"down":Se>Wd&&(ie=!0,ke="down");break;case"up":Se<-Wd&&(ie=!0,ke="up");break}if(ie)break}ie?(m(ke),k(!0),h.closeToast(n.id)):(R({x:_.x,y:_.y}),m(void 0))}function Ie(Z){if(Z.key==="Escape"){if(!B.current||!wt(B.current,oi(Vt(B.current))))return;h.closeToast(n.id)}}S.useEffect(()=>{if(!f)return;const Z=B.current;if(!Z)return;function ie(J){wt(Z,J.target)&&J.preventDefault()}return Z.addEventListener("touchmove",ie,{passive:!1}),()=>{Z.removeEventListener("touchmove",ie)}},[f]);function Y(){if(!g&&C.x===_.x&&C.y===_.y&&!x)return{[Nl.swipeMovementX]:"0px",[Nl.swipeMovementY]:"0px"};const Z=C.x-_.x,ie=C.y-_.y;return{transition:g?"none":void 0,transform:g?`translateX(${C.x}px) translateY(${C.y}px) scale(${_.scale})`:void 0,[Nl.swipeMovementX]:`${Z}px`,[Nl.swipeMovementY]:`${ie}px`}}const W=n.priority==="high",Q={role:W?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":M,"aria-describedby":U,"aria-hidden":W&&!ae?!0:void 0,onPointerDown:f?Re:void 0,onPointerMove:f?le:void 0,onPointerUp:f?Ae:void 0,onKeyDown:Ie,inert:nI(n.limited),style:{...Y(),[Nl.index]:n.transitionStatus==="ending"?K:ee,[Nl.offsetY]:`${q}px`,[Nl.height]:n.height?`${n.height}px`:void 0}},pe=S.useMemo(()=>({rootRef:B,toast:n,titleId:M,setTitleId:O,descriptionId:U,setDescriptionId:L,swiping:g,swipeDirection:p,recalculateHeight:fe,index:K,visibleIndex:ee,expanded:re}),[n,M,U,g,p,fe,K,ee,re]),oe={transitionStatus:n.transitionStatus,expanded:re,limited:n.limited||!1,type:n.type,swiping:pe.swiping,swipeDirection:pe.swipeDirection},me=jo("div",e,{ref:[t,pe.rootRef],state:oe,stateAttributesMapping:wZ,props:[Q,a]});return T.jsx(VI.Provider,{value:pe,children:me})}),RZ=S.forwardRef(function(e,t){const{render:n,className:r,id:i,children:o,...a}=e,{toast:l,setDescriptionId:c}=xZ(),f=o??l.description,h=!!f,p=Nf(i);$t(()=>{if(h)return c(p),()=>{c(void 0)}},[h,p,c]);const m={type:l.type},g=jo("p",e,{ref:t,state:m,props:{...a,id:p,children:f}});return h?g:null}),GI=()=>{const{toasts:e}=UI();return e.map(t=>T.jsx(kZ,{toast:t,className:BI.toast,render:T.jsx(En,{"data-slot":"toast",children:T.jsx(Fe,{size:0,shade:"muted",render:T.jsx(RZ,{})})})},t.id))};GI.displayName="ToastList";const YI=({position:e="bottom"})=>T.jsx(yZ,{children:T.jsx(vZ,{className:BI["toast-viewport"],"data-position":e,children:T.jsx(GI,{})})});YI.displayName="Toaster";const WI=S.createContext(void 0);function AZ(){return S.useContext(WI)}const KI=S.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Io,currentIdRef:{current:null},currentContextRef:{current:null}});function TZ(e){const{children:t,delay:n,timeoutMs:r=0}=e,i=S.useRef(n),o=S.useRef(n),a=S.useRef(null),l=S.useRef(null),c=tl();return T.jsx(KI.Provider,{value:S.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:o,currentIdRef:a,timeoutMs:r,currentContextRef:l,timeout:c}),[r,c]),children:t})}function _Z(e,t={open:!1}){const n="rootStore"in e?e.rootStore:e,r=n.useState("floatingId"),{open:i}=t,o=S.useContext(KI),{currentIdRef:a,delayRef:l,timeoutMs:c,initialDelayRef:f,currentContextRef:h,hasProvider:p,timeout:m}=o,[g,b]=S.useState(!1);return $t(()=>{function v(){var w;b(!1),(w=h.current)==null||w.setIsInstantPhase(!1),a.current=null,h.current=null,l.current=f.current}if(a.current&&!i&&a.current===r){if(b(!1),c){const w=r;return m.start(c,()=>{n.select("open")||a.current&&a.current!==w||v()}),()=>{m.clear()}}v()}},[i,r,a,l,c,f,h,m,n]),$t(()=>{if(!i)return;const v=h.current,w=a.current;m.clear(),h.current={onOpenChange:n.setOpen,setIsInstantPhase:b},a.current=r,l.current={open:0,close:qg(f.current,"close")},w!==null&&w!==r?(b(!0),v==null||v.setIsInstantPhase(!0),v==null||v.onOpenChange(!1,hn(sC))):(b(!1),v==null||v.setIsInstantPhase(!1))},[i,r,n,a,l,c,f,h,m]),$t(()=>()=>{h.current=null},[h]),S.useMemo(()=>({hasProvider:p,delayRef:l,isInstantPhase:g}),[p,l,g])}const DZ=function(e){const{delay:t,closeDelay:n,timeout:r=400}=e,i=S.useMemo(()=>({delay:t,closeDelay:n}),[t,n]),o=S.useMemo(()=>({open:t,close:n}),[t,n]);return T.jsx(WI.Provider,{value:i,children:T.jsx(TZ,{delay:o,timeoutMs:r,children:e.children})})},XI=({children:e,...t})=>T.jsx(DZ,{"data-slot":"tooltip-provider",...t,children:e});XI.displayName="TooltipProvider";const QI=S.createContext(void 0);function Ib(e){const t=S.useContext(QI);if(t===void 0&&!e)throw new Error(Ar(72));return t}const MZ={...GP,disabled:ct(e=>e.disabled),instantType:ct(e=>e.instantType),isInstantPhase:ct(e=>e.isInstantPhase),trackCursorAxis:ct(e=>e.trackCursorAxis),disableHoverablePopup:ct(e=>e.disableHoverablePopup),lastOpenChangeReason:ct(e=>e.openChangeReason),closeDelay:ct(e=>e.closeDelay),hasViewport:ct(e=>e.hasViewport)};let $Z=class ZI extends _b{constructor(n){super({...OZ(),...n},{popupRef:S.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new Mb},MZ);ce(this,"setOpen",(n,r)=>{var f,h;const i=r.reason,o=i===ro,a=n&&i===Hg,l=!n&&(i===Ph||i===aC);if(r.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},(h=(f=this.context).onOpenChange)==null||h.call(f,n,r),r.isCanceled)return;const c=()=>{var g;const p={open:n,openChangeReason:i};a?p.instantType="focus":l?p.instantType="dismiss":i===ro&&(p.instantType=void 0);const m=((g=r.trigger)==null?void 0:g.id)??null;(m||n)&&(p.activeTriggerId=m,p.activeTriggerElement=r.trigger??null),this.update(p)};o?Rn.flushSync(c):c()})}static useStore(n,r){const i=xi(()=>new ZI(r)).current,o=n??i,a=LP({popupStore:o,onOpenChange:o.setOpen});return o.state.floatingRootContext=a,o}};function OZ(){return{...VP(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeDelay:0,hasViewport:!1}}function PZ(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){var g;const o=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},a=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((g=t.dataRef.current.openEvent)==null?void 0:g.type)||"")&&t.pointerType!=="touch";let f=o.width,h=o.height,p=o.x,m=o.y;return n==null&&t.x&&a&&(n=o.x-t.x),r==null&&t.y&&l&&(r=o.y-t.y),p-=n||0,m-=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,m=l&&t.y!=null?t.y:m):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:m,top:m,right:p+f,bottom:m+h,left:p}}}}function VD(e){return e!=null&&e.clientX!=null}function IZ(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:l=!0,axis:c="both"}=t,f=S.useRef(!1),h=S.useRef(null),[p,m]=S.useState(),[g,b]=S.useState([]),v=ft((R,_,D)=>{f.current||a.current.openEvent&&!VD(a.current.openEvent)||n.set("positionReference",PZ(D??o,{x:R,y:_,axis:c,dataRef:a,pointerType:p}))}),w=ft(R=>{r?h.current||b([]):v(R.clientX,R.clientY,R.currentTarget)}),x=yu(p)?i:r,k=S.useCallback(()=>{if(!x||!l)return;const R=kn(i);function _(D){const M=ir(D);wt(i,M)?(R.removeEventListener("mousemove",_),h.current=null):v(D.clientX,D.clientY)}if(!a.current.openEvent||VD(a.current.openEvent)){R.addEventListener("mousemove",_);const D=()=>{R.removeEventListener("mousemove",_),h.current=null};return h.current=D,D}n.set("positionReference",o)},[x,l,i,a,o,n,v]);S.useEffect(()=>k(),[k,g]),S.useEffect(()=>{l&&!i&&(f.current=!1)},[l,i]),S.useEffect(()=>{!l&&r&&(f.current=!0)},[l,r]);const C=S.useMemo(()=>{function R(_){m(_.pointerType)}return{onPointerDown:R,onPointerEnter:R,onMouseMove:w,onMouseEnter:w}},[w]);return S.useMemo(()=>l?{reference:C,trigger:C}:{},[l,C])}const LZ=MP(function(e){const{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:o="none",actionsRef:a,onOpenChange:l,onOpenChangeComplete:c,handle:f,triggerId:h,defaultTriggerId:p=null,children:m}=e,g=$Z.useStore(f==null?void 0:f.store,{open:n,openProp:r,activeTriggerId:p,triggerIdProp:h});mP(()=>{r===void 0&&g.state.open===!1&&n===!0&&g.update({open:!0,activeTriggerId:p})}),g.useControlledProp("openProp",r),g.useControlledProp("triggerIdProp",h),g.useContextCallback("onOpenChange",l),g.useContextCallback("onOpenChangeComplete",c);const b=g.useState("open"),v=!t&&b,w=g.useState("activeTriggerId"),x=g.useState("payload");g.useSyncedValues({trackCursorAxis:o,disableHoverablePopup:i}),$t(()=>{b&&t&&g.setOpen(!1,hn(wK))},[b,t,g]),g.useSyncedValue("disabled",t),AP(g);const{forceUnmount:k,transitionStatus:C}=TP(v,g),R=g.useState("isInstantPhase"),_=g.useState("instantType"),D=g.useState("lastOpenChangeReason"),M=S.useRef(null);$t(()=>{C==="ending"&&D===sC||C!=="ending"&&R?(_!=="delay"&&(M.current=_),g.set("instantType","delay")):M.current!==null&&(g.set("instantType",M.current),M.current=null)},[C,R,D,_,g]),$t(()=>{v&&w==null&&g.set("payload",void 0)},[g,w,v]);const O=S.useCallback(()=>{g.setOpen(!1,NZ(g,HP))},[g]);S.useImperativeHandle(a,()=>({unmount:k,close:O}),[k,O]);const U=g.useState("floatingRootContext"),L=UP(U,{enabled:!t,referencePress:!0}),I=IZ(U,{enabled:!t&&o!=="none",axis:o==="none"?void 0:o}),{getReferenceProps:$,getFloatingProps:B,getTriggerProps:V}=lC([L,I]),F=S.useMemo(()=>$(),[$]),z=S.useMemo(()=>V(),[V]),j=S.useMemo(()=>B(),[B]);return g.useSyncedValues({activeTriggerProps:F,inactiveTriggerProps:z,popupProps:j}),T.jsx(QI.Provider,{value:g,children:typeof m=="function"?m({payload:x}):m})});function NZ(e,t){const n=hn(t);return n.preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},n}const JI=({children:e,...t})=>T.jsx(LZ,{"data-slot":"tooltip-root",...t,children:e});JI.displayName="TooltipRoot";let jZ=(function(e){return e[e.popupOpen=ZP.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});const FZ=600,yx=uW&&wP;function zZ(e,t={}){const n="rootStore"in e?e.rootStore:e,{events:r,dataRef:i}=n.context,{enabled:o=!0,delay:a}=t,l=S.useRef(!1),c=S.useRef(null),f=tl(),h=S.useRef(!0);S.useEffect(()=>{const m=n.select("domReferenceElement");if(!o)return;const g=kn(m);function b(){const x=n.select("domReferenceElement");!n.select("open")&&Ln(x)&&x===oi(Vt(x))&&(l.current=!0)}function v(){h.current=!0}function w(){h.current=!1}return g.addEventListener("blur",b),yx&&(g.addEventListener("keydown",v,!0),g.addEventListener("pointerdown",w,!0)),()=>{g.removeEventListener("blur",b),yx&&(g.removeEventListener("keydown",v,!0),g.removeEventListener("pointerdown",w,!0))}},[n,o]),S.useEffect(()=>{if(!o)return;function m(g){if(g.reason===Ph||g.reason===aC){const b=n.select("domReferenceElement");Yt(b)&&(c.current=b,l.current=!0)}}return r.on("openchange",m),()=>{r.off("openchange",m)}},[r,o,n]);const p=S.useMemo(()=>({onMouseLeave(){l.current=!1,c.current=null},onFocus(m){const g=m.currentTarget;if(l.current){if(c.current===g)return;l.current=!1,c.current=null}const b=ir(m.nativeEvent);if(Yt(b)){if(yx&&!m.relatedTarget){if(!h.current&&!Db(b))return}else if(!gy(b))return}const v=my(m.relatedTarget,n.context.triggerElements),{nativeEvent:w,currentTarget:x}=m,k=typeof a=="function"?a():a;if(n.select("open")&&v||k===0||k===void 0){n.setOpen(!0,hn(Hg,w,x));return}f.start(k,()=>{l.current||n.setOpen(!0,hn(Hg,w,x))})},onBlur(m){l.current=!1,c.current=null;const g=m.relatedTarget,b=m.nativeEvent,v=Yt(g)&&g.hasAttribute(yf("focus-guard"))&&g.getAttribute("data-type")==="outside";f.start(0,()=>{var k;const w=n.select("domReferenceElement"),x=oi(w?w.ownerDocument:document);!g&&x===w||wt((k=i.current.floatingContext)==null?void 0:k.refs.floating.current,x)||wt(w,x)||v||my(g??x,n.context.triggerElements)||n.setOpen(!1,hn(Hg,b))})}}),[i,n,f,a]);return S.useMemo(()=>o?{reference:p,trigger:p}:{},[o,p])}const BZ=HW(function(e,t){const{className:n,render:r,handle:i,payload:o,disabled:a,delay:l,closeDelay:c,id:f,...h}=e,p=Ib(!0),m=(i==null?void 0:i.store)??p;if(!m)throw new Error(Ar(82));const g=tI(f),b=m.useState("isTriggerActive",g),v=m.useState("isOpenedByTrigger",g),w=m.useState("floatingRootContext"),x=S.useRef(null),k=l??FZ,C=c??0,{registerTrigger:R,isMountedByThisTrigger:_}=RP(g,x,m,{payload:o,closeDelay:C}),D=AZ(),{delayRef:M,isInstantPhase:O,hasProvider:U}=_Z(w,{open:v});m.useSyncedValue("isInstantPhase",O);const L=m.useState("disabled"),I=a??L,$=m.useState("trackCursorAxis"),B=m.useState("disableHoverablePopup"),V=QX(w,{enabled:!I,mouseOnly:!0,move:!1,handleClose:!B&&$!=="both"?JX():null,restMs(){const H=D==null?void 0:D.delay,X=typeof M.current=="object"?M.current.open:void 0;let P=k;return U&&(X!==0?P=l??H??k:P=0),P},delay(){const H=typeof M.current=="object"?M.current.close:void 0;let X=C;return c==null&&U&&(X=H),{close:X}},triggerElementRef:x,isActiveTrigger:b}),F=zZ(w,{enabled:!I}).reference,z={open:v},j=m.useState("triggerProps",_);return jo("button",e,{state:z,ref:[t,R,x],props:[V,F,j,{id:g,[jZ.triggerDisabled]:I?"":void 0},h],stateAttributesMapping:JP})}),eL=({children:e,...t})=>{const n=S.isValidElement(e);return T.jsx(BZ,{"data-slot":"tooltip-trigger",render:n?e:T.jsx("span",{role:"button",tabIndex:0,children:e}),...t,children:e})};eL.displayName="TooltipTrigger";const tL=S.createContext(void 0);function HZ(){const e=S.useContext(tL);if(e===void 0)throw new Error(Ar(70));return e}const UZ=S.forwardRef(function(e,t){const{keepMounted:n=!1,...r}=e;return Ib().useState("mounted")||n?T.jsx(tL.Provider,{value:n,children:T.jsx(qI,{ref:t,...r})}):null}),nL=({children:e,...t})=>T.jsx(UZ,{"data-slot":"tooltip-portal",...t,children:e});nL.displayName="TooltipPortal";const rL=S.createContext(void 0);function qZ(){const e=S.useContext(rL);if(e===void 0)throw new Error(Ar(71));return e}const VZ=S.forwardRef(function(e,t){const{render:n,className:r,anchor:i,positionMethod:o="absolute",side:a="top",align:l="center",sideOffset:c=0,alignOffset:f=0,collisionBoundary:h="clipping-ancestors",collisionPadding:p=5,arrowPadding:m=5,sticky:g=!1,disableAnchorTracking:b=!1,collisionAvoidance:v=tX,...w}=e,x=Ib(),k=HZ(),C=x.useState("open"),R=x.useState("mounted"),_=x.useState("trackCursorAxis"),D=x.useState("disableHoverablePopup"),M=x.useState("floatingRootContext"),O=x.useState("instantType"),U=x.useState("transitionStatus"),L=x.useState("hasViewport"),I=sZ({anchor:i,positionMethod:o,floatingRootContext:M,mounted:R,side:a,sideOffset:c,align:l,alignOffset:f,collisionBoundary:h,collisionPadding:p,sticky:g,arrowPadding:m,disableAnchorTracking:b,keepMounted:k,collisionAvoidance:v,adaptiveOrigin:L?rZ:void 0}),$=S.useMemo(()=>{const z={};return(!C||_==="both"||D)&&(z.pointerEvents="none"),{role:"presentation",hidden:!R,style:{...I.positionerStyles,...z}}},[C,_,D,R,I.positionerStyles]),B=S.useMemo(()=>({open:C,side:I.side,align:I.align,anchorHidden:I.anchorHidden,instant:_!=="none"?"tracking-cursor":O}),[C,I.side,I.align,I.anchorHidden,_,O]),V=S.useMemo(()=>({...B,arrowRef:I.arrowRef,arrowStyles:I.arrowStyles,arrowUncentered:I.arrowUncentered}),[B,I.arrowRef,I.arrowStyles,I.arrowUncentered]),F=jo("div",e,{state:B,props:[$,PI(U),w],ref:[t,x.useStateSetter("positionerElement")],stateAttributesMapping:$b});return T.jsx(rL.Provider,{value:V,children:F})}),iL=({children:e,...t})=>T.jsx(VZ,{"data-slot":"tooltip-positioner",style:{zIndex:1e3},...t,children:e});iL.displayName="TooltipPositioner";const GZ={...$b,...Rb},YZ=S.forwardRef(function(e,t){const{className:n,render:r,...i}=e,o=Ib(),{side:a,align:l}=qZ(),c=o.useState("open"),f=o.useState("instantType"),h=o.useState("transitionStatus"),p=o.useState("popupProps"),m=o.useState("floatingRootContext");Ab({open:c,ref:o.context.popupRef,onComplete(){var v,w;c&&((w=(v=o.context).onOpenChangeComplete)==null||w.call(v,!0))}});const g=o.useState("disabled"),b=o.useState("closeDelay");return lZ(m,{enabled:!g,closeDelay:b}),jo("div",e,{state:{open:c,side:a,align:l,instant:f,transitionStatus:h},ref:[t,o.context.popupRef,o.useStateSetter("popupElement")],props:[p,PI(h),i],stateAttributesMapping:GZ})}),oL=({children:e,...t})=>T.jsx(YZ,{"data-slot":"tooltip-popup",render:T.jsx(En,{py:2,px:2,style:{backgroundColor:"var(--shade-foreground)",color:"var(--shade-background)"}}),"data-is-popup":!0,...t,children:T.jsx(Fe,{size:-1,children:e})});oL.displayName="TooltipPopup";const hu=({trigger:e,delay:t,open:n,onOpenChange:r,ProviderProps:i,RootProps:o,TriggerProps:a,PortalProps:l,PositionerProps:c={sideOffset:8,collisionPadding:16},PopupProps:f,children:h})=>T.jsx(XI,{delay:t,...i,children:T.jsxs(JI,{open:n,onOpenChange:r,...o,children:[T.jsx(eL,{...a,children:e}),T.jsx(nL,{...l,children:T.jsx(iL,{...c,children:T.jsx(oL,{...f,children:h})})})]})});hu.displayName="Tooltip";const sL=({tooltip:e,children:t})=>T.jsx(hu,{"data-slot":"button-tooltip-wrapper",trigger:t,TriggerProps:{render:T.jsx("div",{})},delay:300,children:e});sL.displayName="ButtonTooltipWrapper";const js=({tooltip:e,shape:t,fullwidth:n,size:r,variant:i,loading:o,className:a,children:l,...c})=>T.jsx(mi,{condition:!!e,render:T.jsx(sL,{tooltip:e}),children:T.jsx(vG,{nativeButton:!c.render,"data-slot":"button",className:ze(Lr.button,qV({shape:t,size:r,variant:i,fullwidth:n}),a),...c,children:T.jsxs(GE,{ay:"center",ax:"center",children:[T.jsx(G4,{loading:o,children:l}),T.jsx(sP,{loading:o})]})})});js.displayName="Button";function WZ({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=S.useRef(e!==void 0),[o,a]=S.useState(t),l=i?e:o,c=S.useCallback(f=>{i||a(f)},[]);return[l,c]}let GD=0;function KZ(e,t="mui"){const[n,r]=S.useState(e),i=e||n;return S.useEffect(()=>{n==null&&(GD+=1,r(`${t}-${GD}`))},[n,t]),i}const YD=QV.useId;function XZ(e,t){if(YD!==void 0){const n=YD();return e??`${t}-${n}`}return KZ(e,t)}function QZ(e){return XZ(e,"base-ui")}const ZZ=S.createContext(void 0);function JZ(e=!0){const t=S.useContext(ZZ);if(t===void 0&&!e)throw new Error(QE(7));return t}const eJ=S.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function tJ(){return S.useContext(eJ)}let nJ=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function rJ(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:o}=e,{register:a,unregister:l,subscribeMapChange:c,elementsRef:f,labelsRef:h,nextIndexRef:p}=tJ(),m=S.useRef(-1),[g,b]=S.useState(o??(i===nJ.GuessFromOrder?()=>{if(m.current===-1){const x=p.current;p.current+=1,m.current=x}return m.current}:-1)),v=S.useRef(null),w=S.useCallback(x=>{var k;if(v.current=x,g!==-1&&x!==null&&(f.current[g]=x,h)){const C=t!==void 0;h.current[g]=C?t:((k=r==null?void 0:r.current)==null?void 0:k.textContent)??x.textContent}},[g,f,h,t,r]);return Jw(()=>{if(o!=null)return;const x=v.current;if(x)return a(x,n),()=>{l(x)}},[o,a,l,n]),Jw(()=>{if(o==null)return c(x=>{var C;const k=v.current?(C=x.get(v.current))==null?void 0:C.index:null;k!=null&&b(k)})},[o,c,b]),S.useMemo(()=>({ref:w,index:g}),[g,w])}function iJ(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=Y4(),{ref:i,index:o}=rJ(e),a=n===o,l=S.useRef(null),c=rS(i,l);return{compositeProps:S.useMemo(()=>({tabIndex:a?0:-1,onFocus(){r(o)},onMouseMove(){const f=l.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 oJ(e){const{render:t,className:n,state:r=Ea,props:i=oD,refs:o=oD,metadata:a,stateAttributesMapping:l,tag:c="div",...f}=e,{compositeProps:h,compositeRef:p}=iJ({metadata:a});return ZE(c,e,{state:r,ref:[...o,p],props:[h,...i,f],stateAttributesMapping:l})}function sJ(e,t,n,r){let i=!1,o=!1;const a=Ea;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 aJ="none",lJ=S.forwardRef(function(e,t){const{className:n,defaultPressed:r=!1,disabled:i=!1,form:o,onPressedChange:a,pressed:l,render:c,type:f,value:h,nativeButton:p=!0,...m}=e,g=QZ(h||void 0),b=JZ(),v=(b==null?void 0:b.value)??[],w=b?void 0:r,x=(i||(b==null?void 0:b.disabled))??!1,[k,C]=WZ({controlled:b?g!==void 0&&v.indexOf(g)>-1:l,default:w,name:"Toggle",state:"pressed"}),R=Zw((I,$)=>{var B;g&&((B=b==null?void 0:b.setGroupValue)==null||B.call(b,g,I,$)),a==null||a(I,$)}),{getButtonProps:_,buttonRef:D}=Q4({disabled:x,native:p}),M={disabled:x,pressed:k},O=[D,t],U=[{"aria-pressed":k,onClick(I){const $=!k,B=sJ(aJ,I.nativeEvent);R($,B),!B.isCanceled&&C($)}},m,_],L=ZE("button",e,{enabled:!b,state:M,ref:O,props:U});return b?T.jsx(oJ,{tag:"button",render:c,className:n,state:M,refs:O,props:U}):L}),Lb=({text:e,icon:t,children:n,...r})=>T.jsx(lJ,{...r,render:(i,o)=>{const a=o.pressed?e==null?void 0:e.pressed:e==null?void 0:e.unpressed,l=o.pressed?t==null?void 0:t.pressed:t==null?void 0:t.unpressed;return T.jsxs(js,{...i,children:[l,a??n]})}});Lb.displayName="ToggleButton";const uJ="_badge_1nwto_3",cJ="_colored_1nwto_37",Uc={badge:uJ,"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:cJ},fJ=Uc.colored,aL=Object.fromEntries(Object.entries(YE).map(([e,t])=>[e,`${t} ${fJ}`])),dJ=Yr({variants:{size:{small:Uc["size-small"],medium:Uc["size-medium"],large:Uc["size-large"]},color:aL},defaultVariants:{size:"medium"}}),Os=({size:e,color:t,className:n,children:r,...i})=>T.jsx(ot,{"data-slot":"badge",className:ze(Uc.badge,dJ({size:e,color:t}),n),ay:"center",gap:1,...i,children:T.jsx(Fe,{"data-slot":"badge-text",className:Uc["badge-text"],size:-1,weight:"bold",children:r})});Os.displayName="Badge";const hJ="_status_iof57_1",Ry={status:hJ,"status-dot":"_status-dot_iof57_5","toggle-inverted":"_toggle-inverted_iof57_26","toggle-pulse":"_toggle-pulse_iof57_31"},pJ=Yr({variants:{inverted:{true:Ry["toggle-inverted"]},pulse:{true:Ry["toggle-pulse"]},color:YE}}),lp=({pulse:e,inverted:t,color:n,className:r,children:i,...o})=>T.jsxs(mi,{condition:!!i,render:T.jsx(ot,{"data-slot":"status",className:ze(Ry.status,r),ay:"center",gap:2,...o}),children:[T.jsx("span",{"data-slot":"status-dot","data-colored":n?"":void 0,className:ze(Ry["status-dot"],pJ({pulse:e,inverted:t,color:n}))}),i&&T.jsx(Fe,{"data-slot":"status-text",size:0,children:i})]});lp.displayName="Status";const WD={meta:"Meta",ctrl:"Control",alt:"Alt",shift:"Shift"},mJ={meta:"⌘",ctrl:"⌃",alt:"⌥",shift:"⇧",enter:"↵",backspace:"⌫",delete:"⌦",escape:"⎋",tab:"⇥",space:"␣",arrowup:"↑",arrowdown:"↓",arrowleft:"←",arrowright:"→"};function gJ(e){const t=new Set;let n="";for(const r of e){const i=r.toLowerCase();WD[i]?t.add(WD[i]):n=i}return{modifiers:t,key:n}}function yJ(e,t){const{modifiers:n,key:r}=gJ(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 bJ(e){return e.map(t=>mJ[t.toLowerCase()]??t.toUpperCase()).join(" + ")}const vJ="_kbd_19d6z_1",xJ={kbd:vJ},lL=({className:e,active:t,hotkey:n,...r})=>{const[i,o]=S.useState(!1);return S.useEffect(()=>{if(!n||t!==void 0)return;const a=f=>{yJ(f,n)&&o(!0)},l=()=>o(!1),c=()=>o(!1);return window.addEventListener("keydown",a),window.addEventListener("keyup",l),window.addEventListener("blur",c),()=>{window.removeEventListener("keydown",a),window.removeEventListener("keyup",l),window.removeEventListener("blur",c)}},[n,t]),T.jsx("kbd",{"data-slot":"kbd","data-active":(t??i)||void 0,className:ze(xJ.kbd,e),...r,children:n?bJ(n):null})};lL.displayName="Kbd";const uL="TimelineItem",wJ="TimelineMarker",SJ="TimelineConnector",EJ="TimelineContent",cL=S.createContext(null);function Nb(e){const t=S.useContext(cL);if(!t)throw new Error(`\`${e}\` must be used within \`${uL}\``);return t}function CJ(e,t){return t===void 0?"pending":e<t?"completed":e===t?"active":"pending"}function kJ(e,t){return t!==void 0&&e<t}const RJ="_timeline_jo8nv_1",qi={timeline:RJ,"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"},gC=Yr({variants:{color:aL}}),AJ=Yr({base:qi["timeline-item"]}),TJ=Yr({base:qi["timeline-marker"],variants:{status:{completed:qi["status-completed"],active:qi["status-active"],pending:qi["status-pending"]}},defaultVariants:{status:"pending"}}),_J=Yr({base:qi["timeline-connector"],variants:{active:{true:qi["connector-active"]}},defaultVariants:{active:!1}}),fL=({className:e,children:t,...n})=>T.jsx("div",{"data-slot":"timeline-media",className:ze(qi["timeline-media"],e),...n,children:t});fL.displayName="TimelineMedia";const dL=({color:e,className:t,children:n,...r})=>{const{status:i}=Nb(wJ),o=n!=null?"content":"dot";return T.jsx("div",{"data-slot":"timeline-marker","data-variant":o,"data-status":i,className:ze(TJ({status:i}),gC({color:e}),t),...r,children:n})};dL.displayName="TimelineMarker";const hL=({forceMount:e,className:t,...n})=>{const{isLast:r,connectorActive:i}=Nb(SJ);return r&&!e?null:T.jsx("div",{"aria-hidden":"true","data-slot":"timeline-connector","data-active":i?"":void 0,className:ze(_J({active:i}),t),...n})};hL.displayName="TimelineConnector";const pL=({className:e,children:t,...n})=>{const{status:r}=Nb(EJ);return T.jsx(Qe,{"data-slot":"timeline-content","data-status":r,className:ze(qi["timeline-content"],e),gap:1,fullwidth:!0,ax:"stretch",...n,children:t})};pL.displayName="TimelineContent";const mL=({children:e,...t})=>T.jsx(Fe,{"data-slot":"timeline-title",size:1,weight:"bold",...t,children:e});mL.displayName="TimelineTitle";const gL=({children:e,...t})=>T.jsx(Fe,{"data-slot":"timeline-time",render:T.jsx("time",{}),shade:"muted",size:-1,...t,children:e});gL.displayName="TimelineTime";const yL=({children:e,...t})=>T.jsx(Fe,{"data-slot":"timeline-description",shade:"muted",size:0,...t,children:e});yL.displayName="TimelineDescription";const bL=({title:e,time:t,description:n,color:r,media:i,content:o,className:a,children:l,MediaProps:c,MarkerProps:f,ConnectorProps:h,ContentProps:p,TitleProps:m,TimeProps:g,DescriptionProps:b,...v})=>{const{status:w}=Nb(uL),x=e!=null||t!=null;return T.jsxs("li",{"data-slot":"timeline-item","data-status":w,"aria-current":w==="active"?"step":void 0,className:ze(AJ(),a),...v,children:[i!=null&&T.jsx(fL,{...c,children:i}),T.jsxs("div",{"data-slot":"timeline-rail",className:ze(qi["timeline-rail"],gC({color:r})),children:[T.jsx("div",{className:qi["timeline-marker-box"],children:T.jsx(dL,{...f})}),T.jsx(hL,{...h})]}),T.jsxs(pL,{...p,children:[x&&T.jsxs(ot,{gap:2,ay:"baseline","data-slot":"timeline-heading",children:[e!=null&&T.jsx(mL,{...m,children:e}),t!=null&&T.jsx(gL,{...g,children:t})]}),n!=null&&T.jsx(yL,{...b,children:n}),o,l]})]})};bL.displayName="TimelineItem";function vL({items:e,activeIndex:t,color:n,dir:r,className:i,children:o,ItemProps:a,...l}){const c=e?e.map((g,b)=>T.jsx(bL,{...a,...g},b)):o,f=S.Children.toArray(c),h=f.length,p=f.some(g=>S.isValidElement(g)&&g.props.media!=null),m=S.useMemo(()=>Array.from({length:h},(g,b)=>({index:b,status:CJ(b,t),isLast:b===h-1,connectorActive:kJ(b,t)})),[h,t]);return T.jsx("ol",{"data-slot":"timeline","data-has-media":p?"":void 0,className:ze(qi.timeline,gC({color:n}),i),dir:r,...l,children:f.map((g,b)=>T.jsx(cL.Provider,{value:m[b],children:g},b))})}vL.displayName="Timeline";const DJ="typescript",xL=!1,MJ=!0,wL="",SL=!1,EL={javascript:"JavaScript",typescript:"TypeScript",jsx:"JSX",tsx:"TSX",json:"JSON",css:"CSS",html:"HTML",bash:"Bash",markdown:"Markdown",python:"Python"},Zm={"code-typography":"_code-typography_hkdop_4","shiki-theme":"_shiki-theme_hkdop_14","shiki-reset":"_shiki-reset_hkdop_24","line-numbers":"_line-numbers_hkdop_47"},$J=Yr({base:[Zm["code-typography"],Zm["shiki-theme"],Zm["shiki-reset"]],variants:{showLineNumbers:{true:Zm["line-numbers"]}},defaultVariants:{showLineNumbers:xL}}),OJ="modulepreload",PJ=function(e){return"/"+e},KD={},Ii=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 l=document.querySelector("meta[property=csp-nonce]"),c=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));i=a(n.map(f=>{if(f=PJ(f),f in KD)return;KD[f]=!0;const h=f.endsWith(".css"),p=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${p}`))return;const m=document.createElement("link");if(m.rel=h?"stylesheet":OJ,h||(m.as="script"),m.crossOrigin="",m.href=f,c&&m.setAttribute("nonce",c),document.head.appendChild(m),h)return new Promise((g,b)=>{m.addEventListener("load",g),m.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(a){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=a,window.dispatchEvent(l),!l.defaultPrevented)throw a}return i.then(a=>{for(const l of a||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})};let Kn=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function IJ(e){return yC(e)}function yC(e){return Array.isArray(e)?LJ(e):e instanceof RegExp?e:typeof e=="object"?NJ(e):e}function LJ(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=yC(e[n]);return t}function NJ(e){let t={};for(let n in e)t[n]=yC(e[n]);return t}function CL(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function kL(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?kL(e.substring(0,e.length-1)):e.substr(~t+1)}var bx=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Jm=class{static hasCaptures(e){return e===null?!1:(bx.lastIndex=0,bx.test(e))}static replaceCaptures(e,t,n){return e.replace(bx,(r,i,o,a)=>{let l=n[parseInt(i||o,10)];if(l){let c=t.substring(l.start,l.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 RL(e,t){return e<t?-1:e>t?1:0}function AL(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=RL(e[i],t[i]);if(o!==0)return o}return 0}return n-r}function XD(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 TL(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var _L=class{constructor(e){ce(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}},Ay=class{constructor(e,t,n){ce(this,"_cachedMatchRoot",new _L(e=>this._root.match(e)));this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(zJ(e),t)}static createFromParsedTheme(e,t){return HJ(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=>jJ(e.parent,i.parentScopes));return r?new DL(r.fontStyle,r.foreground,r.background):null}},vx=class Yg{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new Yg(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new Yg(n,t[r]);return n}push(t){return new Yg(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 jJ(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&&!FJ(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function FJ(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var DL=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function zJ(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 l;if(typeof a.scope=="string"){let p=a.scope;p=p.replace(/^[,]+/,""),p=p.replace(/[,]+$/,""),l=p.split(",")}else Array.isArray(a.scope)?l=a.scope:l=[""];let c=-1;if(typeof a.settings.fontStyle=="string"){c=0;let p=a.settings.fontStyle.split(" ");for(let m=0,g=p.length;m<g;m++)switch(p[m]){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"&&XD(a.settings.foreground)&&(f=a.settings.foreground);let h=null;typeof a.settings.background=="string"&&XD(a.settings.background)&&(h=a.settings.background);for(let p=0,m=l.length;p<m;p++){let b=l[p].trim().split(" "),v=b[b.length-1],w=null;b.length>1&&(w=b.slice(0,b.length-1),w.reverse()),n[r++]=new BJ(v,w,i,c,f,h)}}return n}var BJ=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}},dr=(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))(dr||{});function HJ(e,t){e.sort((c,f)=>{let h=RL(c.scope,f.scope);return h!==0||(h=AL(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 UJ(t),a=new DL(n,o.getId(r),o.getId(i)),l=new VJ(new vS(0,null,-1,0,0),[]);for(let c=0,f=e.length;c<f;c++){let h=e[c];l.insert(0,h.scope,h.parentScopes,h.fontStyle,o.getId(h.foreground),o.getId(h.background))}return new Ay(o,a,l)}var UJ=class{constructor(e){ce(this,"_isFrozen");ce(this,"_lastColorId");ce(this,"_id2color");ce(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)}},qJ=Object.freeze([]),vS=class ML{constructor(t,n,r,i,o){ce(this,"scopeDepth");ce(this,"parentScopes");ce(this,"fontStyle");ce(this,"foreground");ce(this,"background");this.scopeDepth=t,this.parentScopes=n||qJ,this.fontStyle=r,this.foreground=i,this.background=o}clone(){return new ML(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)}},VJ=class xS{constructor(t,n=[],r={}){ce(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(xS._cmpBySpecificity),n}insert(t,n,r,i,o,a){if(n===""){this._doInsertHere(t,r,i,o,a);return}let l=n.indexOf("."),c,f;l===-1?(c=n,f=""):(c=n.substring(0,l),f=n.substring(l+1));let h;this._children.hasOwnProperty(c)?h=this._children[c]:(h=new xS(this._mainRule.clone(),vS.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,l=this._rulesWithParentScopes.length;a<l;a++){let c=this._rulesWithParentScopes[a];if(AL(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 vS(t,n,r,i,o))}},xf=class Oi{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=Oi.getLanguageId(t),r=Oi.getTokenType(t),i=Oi.getFontStyle(t),o=Oi.getForeground(t),a=Oi.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,l){let c=Oi.getLanguageId(t),f=Oi.getTokenType(t),h=Oi.containsBalancedBrackets(t)?1:0,p=Oi.getFontStyle(t),m=Oi.getForeground(t),g=Oi.getBackground(t);return n!==0&&(c=n),r!==8&&(f=r),i!==null&&(h=i?1:0),o!==-1&&(p=o),a!==0&&(m=a),l!==0&&(g=l),(c<<0|f<<8|h<<10|p<<11|m<<15|g<<24)>>>0}};function Ty(e,t){const n=[],r=GJ(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=l();return i===")"&&(i=r.next()),c}if(QD(i)){const c=[];do c.push(i),i=r.next();while(QD(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 l(){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 QD(e){return!!e&&!!e.match(/[\w\.:]+/)}function GJ(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 $L(e){typeof e.dispose=="function"&&e.dispose()}var Ih=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},YJ=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},WJ=class{constructor(){ce(this,"_references",[]);ce(this,"_seenReferenceKeys",new Set);ce(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))}},KJ=class{constructor(e,t){ce(this,"seenFullScopeRequests",new Set);ce(this,"seenPartialScopeRequests",new Set);ce(this,"Q");this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Ih(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new WJ;for(const n of e)XJ(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Ih){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 XJ(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 Ih?Wg({baseGrammar:o,selfGrammar:i},r):wS(e.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},r);const a=n.injections(e.scopeName);if(a)for(const l of a)r.add(new Ih(l))}function wS(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];_y([r],t,n)}}function Wg(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&_y(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&_y(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function _y(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?CL({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&_y(r.patterns,{...t,repository:i},n);const o=r.include;if(!o)continue;const a=OL(o);switch(a.kind){case 0:Wg({...t,selfGrammar:t.baseGrammar},n);break;case 1:Wg(t,n);break;case 2:wS(a.ruleName,{...t,repository:i},n);break;case 3:case 4:const l=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(l){const c={baseGrammar:t.baseGrammar,selfGrammar:l,repository:i};a.kind===4?wS(a.ruleName,c,n):Wg(c,n)}else a.kind===4?n.add(new YJ(a.scopeName,a.ruleName)):n.add(new Ih(a.scopeName));break}}}var QJ=class{constructor(){ce(this,"kind",0)}},ZJ=class{constructor(){ce(this,"kind",1)}},JJ=class{constructor(e){ce(this,"kind",2);this.ruleName=e}},eee=class{constructor(e){ce(this,"kind",3);this.scopeName=e}},tee=class{constructor(e,t){ce(this,"kind",4);this.scopeName=e,this.ruleName=t}};function OL(e){if(e==="$base")return new QJ;if(e==="$self")return new ZJ;const t=e.indexOf("#");if(t===-1)return new eee(e);if(t===0)return new JJ(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new tee(n,r)}}var nee=/\\(\d+)/,ZD=/\\(\d+)/g,ree=-1,PL=-2;var up=class{constructor(e,t,n,r){ce(this,"$location");ce(this,"id");ce(this,"_nameIsCapturing");ce(this,"_name");ce(this,"_contentNameIsCapturing");ce(this,"_contentName");this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Jm.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Jm.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${kL(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:Jm.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Jm.replaceCaptures(this._contentName,e,t)}},iee=class extends up{constructor(t,n,r,i,o){super(t,n,r,i);ce(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!")}},oee=class extends up{constructor(t,n,r,i,o){super(t,n,r,null);ce(this,"_match");ce(this,"captures");ce(this,"_cachedCompiledPatterns");this._match=new Lh(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 Nh,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},JD=class extends up{constructor(t,n,r,i,o){super(t,n,r,i);ce(this,"hasMissingPatterns");ce(this,"patterns");ce(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 Nh,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},SS=class extends up{constructor(t,n,r,i,o,a,l,c,f,h){super(t,n,r,i);ce(this,"_begin");ce(this,"beginCaptures");ce(this,"_end");ce(this,"endHasBackReferences");ce(this,"endCaptures");ce(this,"applyEndPatternLast");ce(this,"hasMissingPatterns");ce(this,"patterns");ce(this,"_cachedCompiledPatterns");this._begin=new Lh(o,this.id),this.beginCaptures=a,this._end=new Lh(l||"",-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 Nh;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}},Dy=class extends up{constructor(t,n,r,i,o,a,l,c,f){super(t,n,r,i);ce(this,"_begin");ce(this,"beginCaptures");ce(this,"whileCaptures");ce(this,"_while");ce(this,"whileHasBackReferences");ce(this,"hasMissingPatterns");ce(this,"patterns");ce(this,"_cachedCompiledPatterns");ce(this,"_cachedCompiledWhilePatterns");this._begin=new Lh(o,this.id),this.beginCaptures=a,this.whileCaptures=c,this._while=new Lh(l,PL),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 Nh;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 Nh,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||""),this._cachedCompiledWhilePatterns}},IL=class ar{static createCaptureRule(t,n,r,i,o){return t.registerRule(a=>new iee(n,a,r,i,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new oee(t.$vscodeTextmateLocation,t.id,t.name,t.match,ar._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=CL({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new JD(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,ar._compilePatterns(o,n,r))}return t.while?new Dy(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,ar._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,ar._compileCaptures(t.whileCaptures||t.captures,n,r),ar._compilePatterns(t.patterns,n,r)):new SS(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,ar._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,ar._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,ar._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 l=parseInt(a,10);l>o&&(o=l)}for(let a=0;a<=o;a++)i[a]=null;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const l=parseInt(a,10);let c=0;t[a].patterns&&(c=ar.getCompiledRuleId(t[a],n,r)),i[l]=ar.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 l=t[o];let c=-1;if(l.include){const f=OL(l.include);switch(f.kind){case 0:case 1:c=ar.getCompiledRuleId(r[l.include],n,r);break;case 2:let h=r[f.ruleName];h&&(c=ar.getCompiledRuleId(h,n,r));break;case 3:case 4:const p=f.scopeName,m=f.kind===4?f.ruleName:null,g=n.getExternalGrammar(p,r);if(g)if(m){let b=g.repository[m];b&&(c=ar.getCompiledRuleId(b,n,g.repository))}else c=ar.getCompiledRuleId(g.repository.$self,n,g.repository);break}}else c=ar.getCompiledRuleId(l,n,r);if(c!==-1){const f=n.getRule(c);let h=!1;if((f instanceof JD||f instanceof SS||f instanceof Dy)&&f.hasMissingPatterns&&f.patterns.length===0&&(h=!0),h)continue;i.push(c)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Lh=class LL{constructor(t,n){ce(this,"source");ce(this,"ruleId");ce(this,"hasAnchor");ce(this,"hasBackReferences");ce(this,"_anchorCache");if(t&&typeof t=="string"){const r=t.length;let i=0,o=[],a=!1;for(let l=0;l<r;l++)if(t.charAt(l)==="\\"&&l+1<r){const f=t.charAt(l+1);f==="z"?(o.push(t.substring(i,l)),o.push("$(?!\\n)(?<!\\n)"),i=l+2):(f==="A"||f==="G")&&(a=!0),l++}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=nee.test(this.source):this.hasBackReferences=!1}clone(){return new LL(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 ZD.lastIndex=0,this.source.replace(ZD,(i,o)=>TL(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,l,c;for(o=0,a=this.source.length;o<a;o++)l=this.source.charAt(o),t[o]=l,n[o]=l,r[o]=l,i[o]=l,l==="\\"&&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}},Nh=class{constructor(){ce(this,"_items");ce(this,"_hasAnchors");ce(this,"_cached");ce(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 eM(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 eM(e,r,this._items.map(i=>i.ruleId))}},eM=class{constructor(e,t,n){ce(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}},xx=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Ss,see=(Ss=class{constructor(t,n){ce(this,"_defaultAttributes");ce(this,"_embeddedLanguagesMatcher");ce(this,"_getBasicScopeAttributes",new _L(t=>{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new xx(n,r)}));this._defaultAttributes=new xx(t,8),this._embeddedLanguagesMatcher=new aee(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?Ss._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(Ss.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!")}},ce(Ss,"_NULL_SCOPE_METADATA",new xx(0,0)),ce(Ss,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),Ss),aee=class{constructor(e){ce(this,"values");ce(this,"scopesRegExp");if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>TL(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])}},tM=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function NL(e,t,n,r,i,o,a,l){const c=t.content.length;let f=!1,h=-1;if(a){const g=lee(e,t,n,r,i,o);i=g.stack,r=g.linePos,n=g.isFirstLine,h=g.anchorPosition}const p=Date.now();for(;!f;){if(l!==0&&Date.now()-p>l)return new tM(i,!0);m()}return new tM(i,!1);function m(){const g=uee(e,t,n,r,i,h);if(!g){o.produce(i,c),f=!0;return}const b=g.captureIndices,v=g.matchedRuleId,w=b&&b.length>0?b[0].end>r:!1;if(v===ree){const x=i.getRule(e);o.produce(i,b[0].start),i=i.withContentNameScopesList(i.nameScopesList),ih(e,t,n,i,o,x.endCaptures,b),o.produce(i,b[0].end);const k=i;if(i=i.parent,h=k.getAnchorPos(),!w&&k.getEnterPos()===r){i=k,o.produce(i,c),f=!0;return}}else{const x=e.getRule(v);o.produce(i,b[0].start);const k=i,C=x.getName(t.content,b),R=i.contentNameScopesList.pushAttributed(C,e);if(i=i.push(v,r,h,b[0].end===c,null,R,R),x instanceof SS){const _=x;ih(e,t,n,i,o,_.beginCaptures,b),o.produce(i,b[0].end),h=b[0].end;const D=_.getContentName(t.content,b),M=R.pushAttributed(D,e);if(i=i.withContentNameScopesList(M),_.endHasBackReferences&&(i=i.withEndRule(_.getEndWithResolvedBackReferences(t.content,b))),!w&&k.hasSameRuleAs(i)){i=i.pop(),o.produce(i,c),f=!0;return}}else if(x instanceof Dy){const _=x;ih(e,t,n,i,o,_.beginCaptures,b),o.produce(i,b[0].end),h=b[0].end;const D=_.getContentName(t.content,b),M=R.pushAttributed(D,e);if(i=i.withContentNameScopesList(M),_.whileHasBackReferences&&(i=i.withEndRule(_.getWhileWithResolvedBackReferences(t.content,b))),!w&&k.hasSameRuleAs(i)){i=i.pop(),o.produce(i,c),f=!0;return}}else if(ih(e,t,n,i,o,x.captures,b),o.produce(i,b[0].end),i=i.pop(),!w){i=i.safePop(),o.produce(i,c),f=!0;return}}b[0].end>r&&(r=b[0].end,n=!1)}}function lee(e,t,n,r,i,o){let a=i.beginRuleCapturedEOL?0:-1;const l=[];for(let c=i;c;c=c.pop()){const f=c.getRule(e);f instanceof Dy&&l.push({rule:f,stack:c})}for(let c=l.pop();c;c=l.pop()){const{ruleScanner:f,findOptions:h}=dee(c.rule,e,c.stack.endRule,n,r===a),p=f.findNextMatchSync(t,r,h);if(p){if(p.ruleId!==PL){i=c.stack.pop();break}p.captureIndices&&p.captureIndices.length&&(o.produce(c.stack,p.captureIndices[0].start),ih(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 uee(e,t,n,r,i,o){const a=cee(e,t,n,r,i,o),l=e.getInjections();if(l.length===0)return a;const c=fee(l,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 cee(e,t,n,r,i,o){const a=i.getRule(e),{ruleScanner:l,findOptions:c}=jL(a,e,i.endRule,n,r===o),f=l.findNextMatchSync(t,r,c);return f?{captureIndices:f.captureIndices,matchedRuleId:f.ruleId}:null}function fee(e,t,n,r,i,o,a){let l=Number.MAX_VALUE,c=null,f,h=0;const p=o.contentNameScopesList.getScopeNames();for(let m=0,g=e.length;m<g;m++){const b=e[m];if(!b.matcher(p))continue;const v=t.getRule(b.ruleId),{ruleScanner:w,findOptions:x}=jL(v,t,null,r,i===a),k=w.findNextMatchSync(n,i,x);if(!k)continue;const C=k.captureIndices[0].start;if(!(C>=l)&&(l=C,c=k.captureIndices,f=k.ruleId,h=b.priority,l===i))break}return c?{priorityMatch:h===-1,captureIndices:c,matchedRuleId:f}:null}function jL(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function dee(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function ih(e,t,n,r,i,o,a){if(o.length===0)return;const l=t.content,c=Math.min(o.length,a.length),f=[],h=a[0].end;for(let p=0;p<c;p++){const m=o[p];if(m===null)continue;const g=a[p];if(g.length===0)continue;if(g.start>h)break;for(;f.length>0&&f[f.length-1].endPos<=g.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,g.start):i.produce(r,g.start),m.retokenizeCapturedWithRuleId){const v=m.getName(l,a),w=r.contentNameScopesList.pushAttributed(v,e),x=m.getContentName(l,a),k=w.pushAttributed(x,e),C=r.push(m.retokenizeCapturedWithRuleId,g.start,-1,!1,null,w,k),R=e.createOnigString(l.substring(0,g.end));NL(e,R,n&&g.start===0,g.start,C,i,!1,0),$L(R);continue}const b=m.getName(l,a);if(b!==null){const w=(f.length>0?f[f.length-1].scopes:r.contentNameScopesList).pushAttributed(b,e);f.push(new hee(w,g.end))}}for(;f.length>0;)i.produceFromScopes(f[f.length-1].scopes,f[f.length-1].endPos),f.pop()}var hee=class{constructor(e,t){ce(this,"scopes");ce(this,"endPos");this.scopes=e,this.endPos=t}};function pee(e,t,n,r,i,o,a,l){return new gee(e,t,n,r,i,o,a,l)}function nM(e,t,n,r,i){const o=Ty(t,My),a=IL.getCompiledRuleId(n,r,i.repository);for(const l of o)e.push({debugSelector:t,matcher:l.matcher,ruleId:a,grammar:i,priority:l.priority})}function My(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(mee(t[i],r))return n=i+1,!0;return!1})}function mee(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 gee=class{constructor(e,t,n,r,i,o,a,l){ce(this,"_rootId");ce(this,"_lastRuleId");ce(this,"_ruleId2desc");ce(this,"_includedGrammars");ce(this,"_grammarRepository");ce(this,"_grammar");ce(this,"_injections");ce(this,"_basicScopeAttributesProvider");ce(this,"_tokenTypeMatchers");if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=l,this._basicScopeAttributesProvider=new see(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=a,this._grammar=rM(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const c of Object.keys(i)){const f=Ty(c,My);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)nM(t,a,i[a],this,r);const o=this._grammarRepository.injections(n);o&&o.forEach(a=>{const l=this.getExternalGrammar(a);if(l){const c=l.injectionSelector;c&&nM(t,c,l,this,l)}})}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]=rM(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=IL.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===ES.NULL){i=!0;const f=this._basicScopeAttributesProvider.getDefaultAttributes(),h=this.themeProvider.getDefaults(),p=xf.set(0,f.languageId,f.tokenType,null,h.fontStyle,h.foregroundId,h.backgroundId),m=this.getRule(this._rootId).getName(null,null);let g;m?g=ch.createRootAndLookUpScopeName(m,p,this):g=ch.createRoot("unknown",p),t=new ES(null,this._rootId,-1,-1,!1,null,g,g)}else i=!1,t.reset();e=e+`
|
|
334
|
-
`;const o=this.createOnigString(e),a=o.content.length,l=new bee(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=NL(this,o,i,0,t,l,!0,r);return $L(o),{lineLength:a,lineTokens:l,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function rM(e,t){return e=IJ(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 ch=class bo{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=vx.push(i,o.scopeNames),r=new bo(r,i,o.encodedTokenAttributes);return r}static createRoot(t,n){return new bo(null,new vx(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const i=r.getMetadataForScope(t),o=new vx(null,t),a=r.themeProvider.themeMatch(o),l=bo.mergeAttributes(n,i,a);return new bo(null,o,l)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return bo.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),xf.set(t,n.languageId,n.tokenType,null,i,o,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return bo._pushAttributed(this,t,n);const r=t.split(/ /g);let i=this;for(const o of r)i=bo._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),l=bo.mergeAttributes(t.tokenAttributes,i,a);return new bo(t,o,l)}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}},Bi,ES=(Bi=class{constructor(t,n,r,i,o,a,l,c){ce(this,"_stackElementBrand");ce(this,"_enterPos");ce(this,"_anchorPos");ce(this,"depth");this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=a,this.nameScopesList=l,this.contentNameScopesList=c,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=i}equals(t){return t===null?!1:Bi._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?ch.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(){Bi._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,o,a,l){return new Bi(this,t,n,r,i,o,a,l)}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 Bi(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=ch.fromExtension((t==null?void 0:t.nameScopesList)??null,n.nameScopesList);return new Bi(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,ch.fromExtension(r,n.contentNameScopesList))}},ce(Bi,"NULL",new Bi(null,0,0,0,!1,null,null,null)),Bi),yee=class{constructor(e,t){ce(this,"balancedBracketScopes");ce(this,"unbalancedBracketScopes");ce(this,"allowAny",!1);this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Ty(n,My).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>Ty(n,My).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}},bee=class{constructor(e,t,n,r){ce(this,"_emitBinaryTokens");ce(this,"_lineText");ce(this,"_tokens");ce(this,"_binaryTokens");ce(this,"_lastTokenEndIndex");ce(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 l of this._tokenTypeOverrides)l.matcher(a)&&(i=xf.set(i,0,l.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(a))}if(o&&(i=xf.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}},vee=class{constructor(e,t){ce(this,"_grammars",new Map);ce(this,"_rawGrammars",new Map);ce(this,"_injectionGrammars",new Map);ce(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,pee(e,o,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},xee=class{constructor(t){ce(this,"_options");ce(this,"_syncRegistry");ce(this,"_ensureGrammarCache");this._options=t,this._syncRegistry=new vee(Ay.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(Ay.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 yee(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,i,o){const a=new KJ(this._syncRegistry,t);for(;a.Q.length>0;)a.Q.map(l=>this._loadSingleGrammar(l.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)}},CS=ES.NULL;const wee=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class cp{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}cp.prototype.normal={};cp.prototype.property={};cp.prototype.space=void 0;function FL(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new cp(n,r,t)}function kS(e){return e.toLowerCase()}class Wr{constructor(t,n){this.attribute=n,this.property=t}}Wr.prototype.attribute="";Wr.prototype.booleanish=!1;Wr.prototype.boolean=!1;Wr.prototype.commaOrSpaceSeparated=!1;Wr.prototype.commaSeparated=!1;Wr.prototype.defined=!1;Wr.prototype.mustUseProperty=!1;Wr.prototype.number=!1;Wr.prototype.overloadedBoolean=!1;Wr.prototype.property="";Wr.prototype.spaceSeparated=!1;Wr.prototype.space=void 0;let See=0;const bt=$u(),In=$u(),RS=$u(),Ne=$u(),ln=$u(),qc=$u(),ri=$u();function $u(){return 2**++See}const AS=Object.freeze(Object.defineProperty({__proto__:null,boolean:bt,booleanish:In,commaOrSpaceSeparated:ri,commaSeparated:qc,number:Ne,overloadedBoolean:RS,spaceSeparated:ln},Symbol.toStringTag,{value:"Module"})),wx=Object.keys(AS);class bC extends Wr{constructor(t,n,r,i){let o=-1;if(super(t,n),iM(this,"space",i),typeof r=="number")for(;++o<wx.length;){const a=wx[o];iM(this,wx[o],(r&AS[a])===AS[a])}}}bC.prototype.defined=!0;function iM(e,t,n){n&&(e[t]=n)}function jf(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new bC(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[kS(r)]=r,n[kS(o.attribute)]=r}return new cp(t,n,e.space)}const zL=jf({properties:{ariaActiveDescendant:null,ariaAtomic:In,ariaAutoComplete:null,ariaBusy:In,ariaChecked:In,ariaColCount:Ne,ariaColIndex:Ne,ariaColSpan:Ne,ariaControls:ln,ariaCurrent:null,ariaDescribedBy:ln,ariaDetails:null,ariaDisabled:In,ariaDropEffect:ln,ariaErrorMessage:null,ariaExpanded:In,ariaFlowTo:ln,ariaGrabbed:In,ariaHasPopup:null,ariaHidden:In,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ln,ariaLevel:Ne,ariaLive:null,ariaModal:In,ariaMultiLine:In,ariaMultiSelectable:In,ariaOrientation:null,ariaOwns:ln,ariaPlaceholder:null,ariaPosInSet:Ne,ariaPressed:In,ariaReadOnly:In,ariaRelevant:null,ariaRequired:In,ariaRoleDescription:ln,ariaRowCount:Ne,ariaRowIndex:Ne,ariaRowSpan:Ne,ariaSelected:In,ariaSetSize:Ne,ariaSort:null,ariaValueMax:Ne,ariaValueMin:Ne,ariaValueNow:Ne,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function BL(e,t){return t in e?e[t]:t}function HL(e,t){return BL(e,t.toLowerCase())}const Eee=jf({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:qc,acceptCharset:ln,accessKey:ln,action:null,allow:null,allowFullScreen:bt,allowPaymentRequest:bt,allowUserMedia:bt,alt:null,as:null,async:bt,autoCapitalize:null,autoComplete:ln,autoFocus:bt,autoPlay:bt,blocking:ln,capture:null,charSet:null,checked:bt,cite:null,className:ln,cols:Ne,colSpan:null,content:null,contentEditable:In,controls:bt,controlsList:ln,coords:Ne|qc,crossOrigin:null,data:null,dateTime:null,decoding:null,default:bt,defer:bt,dir:null,dirName:null,disabled:bt,download:RS,draggable:In,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:bt,formTarget:null,headers:ln,height:Ne,hidden:RS,high:Ne,href:null,hrefLang:null,htmlFor:ln,httpEquiv:ln,id:null,imageSizes:null,imageSrcSet:null,inert:bt,inputMode:null,integrity:null,is:null,isMap:bt,itemId:null,itemProp:ln,itemRef:ln,itemScope:bt,itemType:ln,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:bt,low:Ne,manifest:null,max:null,maxLength:Ne,media:null,method:null,min:null,minLength:Ne,multiple:bt,muted:bt,name:null,nonce:null,noModule:bt,noValidate:bt,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:bt,optimum:Ne,pattern:null,ping:ln,placeholder:null,playsInline:bt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:bt,referrerPolicy:null,rel:ln,required:bt,reversed:bt,rows:Ne,rowSpan:Ne,sandbox:ln,scope:null,scoped:bt,seamless:bt,selected:bt,shadowRootClonable:bt,shadowRootDelegatesFocus:bt,shadowRootMode:null,shape:null,size:Ne,sizes:null,slot:null,span:Ne,spellCheck:In,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ne,step:null,style:null,tabIndex:Ne,target:null,title:null,translate:null,type:null,typeMustMatch:bt,useMap:null,value:In,width:Ne,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ln,axis:null,background:null,bgColor:null,border:Ne,borderColor:null,bottomMargin:Ne,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:bt,declare:bt,event:null,face:null,frame:null,frameBorder:null,hSpace:Ne,leftMargin:Ne,link:null,longDesc:null,lowSrc:null,marginHeight:Ne,marginWidth:Ne,noResize:bt,noHref:bt,noShade:bt,noWrap:bt,object:null,profile:null,prompt:null,rev:null,rightMargin:Ne,rules:null,scheme:null,scrolling:In,standby:null,summary:null,text:null,topMargin:Ne,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ne,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:bt,disableRemotePlayback:bt,prefix:null,property:null,results:Ne,security:null,unselectable:null},space:"html",transform:HL}),Cee=jf({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:ri,accentHeight:Ne,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ne,amplitude:Ne,arabicForm:null,ascent:Ne,attributeName:null,attributeType:null,azimuth:Ne,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ne,by:null,calcMode:null,capHeight:Ne,className:ln,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:Ne,diffuseConstant:Ne,direction:null,display:null,dur:null,divisor:Ne,dominantBaseline:null,download:bt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ne,enableBackground:null,end:null,event:null,exponent:Ne,externalResourcesRequired:null,fill:null,fillOpacity:Ne,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:qc,g2:qc,glyphName:qc,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ne,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ne,horizOriginX:Ne,horizOriginY:Ne,id:null,ideographic:Ne,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ne,k:Ne,k1:Ne,k2:Ne,k3:Ne,k4:Ne,kernelMatrix:ri,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ne,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:Ne,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:Ne,overlineThickness:Ne,paintOrder:null,panose1:null,path:null,pathLength:Ne,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ln,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ne,pointsAtY:Ne,pointsAtZ:Ne,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ri,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ri,rev:ri,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ri,requiredFeatures:ri,requiredFonts:ri,requiredFormats:ri,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:Ne,specularExponent:Ne,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ne,strikethroughThickness:Ne,string:null,stroke:null,strokeDashArray:ri,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ne,strokeOpacity:Ne,strokeWidth:null,style:null,surfaceScale:Ne,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ri,tabIndex:Ne,tableValues:null,target:null,targetX:Ne,targetY:Ne,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ri,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ne,underlineThickness:Ne,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ne,values:null,vAlphabetic:Ne,vMathematical:Ne,vectorEffect:null,vHanging:Ne,vIdeographic:Ne,version:null,vertAdvY:Ne,vertOriginX:Ne,vertOriginY:Ne,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ne,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:BL}),UL=jf({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()}}),qL=jf({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:HL}),VL=jf({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),kee={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"},Ree=/[A-Z]/g,oM=/-[a-z]/g,Aee=/^data[-\w.:]+$/i;function GL(e,t){const n=kS(t);let r=t,i=Wr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Aee.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(oM,_ee);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!oM.test(o)){let a=o.replace(Ree,Tee);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=bC}return new i(r,t)}function Tee(e){return"-"+e.toLowerCase()}function _ee(e){return e.charAt(1).toUpperCase()}const YL=FL([zL,Eee,UL,qL,VL],"html"),fp=FL([zL,Cee,UL,qL,VL],"svg"),sM={}.hasOwnProperty;function Dee(e,t){const n=t||{};function r(i,...o){let a=r.invalid;const l=r.handlers;if(i&&sM.call(i,e)){const c=String(i[e]);a=sM.call(l,c)?l[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 Mee=/["&'<>`]/g,$ee=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Oee=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Pee=/[|\\{}()[\]^$+*?.]/g,aM=new WeakMap;function Iee(e,t){if(e=e.replace(t.subset?Lee(t.subset):Mee,r),t.subset||t.escapeOnly)return e;return e.replace($ee,n).replace(Oee,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 Lee(e){let t=aM.get(e);return t||(t=Nee(e),aM.set(e,t)),t}function Nee(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(Pee,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const jee=/[\dA-Fa-f]/;function Fee(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!jee.test(String.fromCharCode(t))?r:r+";"}const zee=/\d/;function Bee(e,t,n){const r="&#"+String(e);return n&&t&&!zee.test(String.fromCharCode(t))?r:r+";"}const Hee=["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"],Sx={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:"€"},Uee=["cent","copy","divide","gt","lt","not","para","times"],WL={}.hasOwnProperty,TS={};let eg;for(eg in Sx)WL.call(Sx,eg)&&(TS[Sx[eg]]=eg);const qee=/[^\dA-Za-z]/;function Vee(e,t,n,r){const i=String.fromCharCode(e);if(WL.call(TS,i)){const o=TS[i],a="&"+o;return n&&Hee.includes(o)&&!Uee.includes(o)&&(!r||t&&t!==61&&qee.test(String.fromCharCode(t)))?a:a+";"}return""}function Gee(e,t,n){let r=Fee(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=Vee(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const o=Bee(e,t,n.omitOptionalSemicolons);o.length<r.length&&(r=o)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function Vc(e,t){return Iee(e,Object.assign({format:Gee},t))}const Yee=/^>|^->|<!--|-->|--!>|<!-$/g,Wee=[">"],Kee=["<",">"];function Xee(e,t,n,r){return r.settings.bogusComments?"<?"+Vc(e.value,Object.assign({},r.settings.characterReferences,{subset:Wee}))+">":"<!--"+e.value.replace(Yee,i)+"-->";function i(o){return Vc(o,Object.assign({},r.settings.characterReferences,{subset:Kee}))}}function Qee(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function $y(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 KL(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function XL(e){return e.join(" ").trim()}const Zee=/[ \t\n\f\r]/g;function jb(e){return typeof e=="object"?e.type==="text"?lM(e.value):!1:lM(e)}function lM(e){return e.replace(Zee,"")===""}const qn=ZL(1),QL=ZL(-1),Jee=[];function ZL(e){return t;function t(n,r,i){const o=n?n.children:Jee;let a=(r||0)+e,l=o[a];if(!i)for(;l&&jb(l);)a+=e,l=o[a];return l}}const ete={}.hasOwnProperty;function JL(e){return t;function t(n,r,i){return ete.call(e,n.tagName)&&e[n.tagName](n,r,i)}}const vC=JL({body:nte,caption:Ex,colgroup:Ex,dd:ste,dt:ote,head:Ex,html:tte,li:ite,optgroup:ate,option:lte,p:rte,rp:uM,rt:uM,tbody:cte,td:cM,tfoot:fte,th:cM,thead:ute,tr:dte});function Ex(e,t,n){const r=qn(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&jb(r.value.charAt(0)))}function tte(e,t,n){const r=qn(n,t);return!r||r.type!=="comment"}function nte(e,t,n){const r=qn(n,t);return!r||r.type!=="comment"}function rte(e,t,n){const r=qn(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 ite(e,t,n){const r=qn(n,t);return!r||r.type==="element"&&r.tagName==="li"}function ote(e,t,n){const r=qn(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function ste(e,t,n){const r=qn(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function uM(e,t,n){const r=qn(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function ate(e,t,n){const r=qn(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function lte(e,t,n){const r=qn(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function ute(e,t,n){const r=qn(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function cte(e,t,n){const r=qn(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function fte(e,t,n){return!qn(n,t)}function dte(e,t,n){const r=qn(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function cM(e,t,n){const r=qn(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const hte=JL({body:gte,colgroup:yte,head:mte,html:pte,tbody:bte});function pte(e){const t=qn(e,-1);return!t||t.type!=="comment"}function mte(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 gte(e){const t=qn(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&jb(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function yte(e,t,n){const r=QL(n,t),i=qn(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&vC(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function bte(e,t,n){const r=QL(n,t),i=qn(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&vC(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const tg={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 vte(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 l=[];let c;i.space==="html"&&e.tagName==="svg"&&(r.schema=fp);const f=xte(r,e.properties),h=r.all(i.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=i,h&&(a=!1),(f||!o||!hte(e,t,n))&&(l.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!=="'")&&l.push(" "),l.push("/")),l.push(">")),l.push(h),!a&&(!o||!vC(e,t,n))&&l.push("</"+e.tagName+">"),l.join("")}function xte(e,t){const n=[];let r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){const o=wte(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 wte(e,t,n){const r=GL(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,o=e.settings.allowDangerousCharacters?0:1;let a=e.quote,l;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=Vc(r.attribute,Object.assign({},e.settings.characterReferences,{subset:tg.name[i][o]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?KL:XL)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(l=Vc(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:tg.unquoted[i][o]}))),l!==n&&(e.settings.quoteSmart&&$y(n,a)>$y(n,e.alternative)&&(a=e.alternative),l=a+Vc(n,Object.assign({},e.settings.characterReferences,{subset:(a==="'"?tg.single:tg.double)[i][o],attribute:!0}))+a),c+(l&&"="+l))}const Ste=["<","&"];function eN(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:Vc(e.value,Object.assign({},r.settings.characterReferences,{subset:Ste}))}function Ete(e,t,n,r){return r.settings.allowDangerousHtml?e.value:eN(e,t,n,r)}function Cte(e,t,n,r){return r.all(e)}const kte=Dee("type",{invalid:Rte,unknown:Ate,handlers:{comment:Xee,doctype:Qee,element:vte,raw:Ete,root:Cte,text:eN}});function Rte(e){throw new Error("Expected node, not `"+e+"`")}function Ate(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const Tte={},_te={},Dte=[];function Mte(e,t){const n=t||Tte,r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:$te,all:Ote,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||wee,characterReferences:n.characterReferences||_te,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?fp:YL,quote:r,alternative:i}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function $te(e,t,n){return kte(e,t,n,this)}function Ote(e){const t=[],n=e&&e.children||Dte;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function Oy(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 Ga(e,t){return e&&((t==null?void 0:t[e==null?void 0:e.toLowerCase()])||e)}function Pte(e){return Array.isArray(e)?e:[e]}async function tN(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function xC(e){return!e||["plaintext","txt","text","plain"].includes(e)}function Ite(e){return e==="ansi"||xC(e)}function wC(e){return e==="none"}function Lte(e){return wC(e)}function nN(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 Fb(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 l=t?n[a]+(n[a+1]||""):n[a];i.push([l,r]),r+=n[a].length,r+=((o=n[a+1])==null?void 0:o.length)||0}return i}function Nte(e){const t=Fb(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 l of t){if(o<l.length)break;o-=l.length,a++}return{line:a,character:o}}function r(i,o){let a=0;for(let l=0;l<i;l++)a+=t[l].length;return a+=o,a}return{lines:t,indexToPos:n,posToIndex:r}}const SC="light-dark()",jte=["color","background-color"];function Fte(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 zte(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,l)=>a-l);return o.length?Fte(i,o):i})):e}function Bte(e,t,n,r,i="css-vars"){const o={content:e.content,explanation:e.explanation,offset:e.offset},a=t.map(h=>Py(e.variants[h])),l=new Set(a.flatMap(h=>Object.keys(h))),c={},f=(h,p)=>{const m=p==="color"?"":p==="background-color"?"-bg":`-${p}`;return n+t[h]+(p==="color"?"":m)};return a.forEach((h,p)=>{for(const m of l){const g=h[m]||"inherit";if(p===0&&r&&jte.includes(m))if(r===SC&&a.length>1){const b=t.findIndex(k=>k==="light"),v=t.findIndex(k=>k==="dark");if(b===-1||v===-1)throw new Kn('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const w=a[b][m]||"inherit",x=a[v][m]||"inherit";c[m]=`light-dark(${w}, ${x})`,i==="css-vars"&&(c[f(p,m)]=g)}else c[m]=g;else i==="css-vars"&&(c[f(p,m)]=g)}}),o.htmlStyle=c,o}function Py(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&dr.Italic&&(t["font-style"]="italic"),e.fontStyle&dr.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&dr.Underline&&n.push("underline"),e.fontStyle&dr.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function _S(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}const rN=new WeakMap;function zb(e,t){rN.set(e,t)}function jh(e){return rN.get(e)}class Ff{constructor(...t){ce(this,"_stacks",{});ce(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 Ff(Object.fromEntries(Pte(n).map(r=>[r,CS])),t)}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return Hte(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function Hte(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 Ute(e,t){if(!(e instanceof Ff))throw new Kn("Invalid grammar state");return e.getInternalStack(t)}function qte(){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 Kn(`Invalid decoration offset: ${a}. Code length: ${n.source.length}`);return{...i.indexToPos(a),offset:a}}else{const l=i.lines[a.line];if(l===void 0)throw new Kn(`Invalid decoration position ${JSON.stringify(a)}. Lines length: ${i.lines.length}`);let c=a.character;if(c<0&&(c=l.length+c),c<0||c>l.length)throw new Kn(`Invalid decoration position ${JSON.stringify(a)}. Line ${a.line} length: ${l.length}`);return{...a,character:c,offset:i.posToIndex(a.line,c)}}};const i=Nte(n.source),o=(n.options.decorations||[]).map(a=>({...a,start:r(a.start),end:r(a.end)}));Vte(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(l=>[l.start.offset,l.end.offset]);return zte(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 Kn(`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,m,g,b){const v=i[p];let w="",x=-1,k=-1;if(m===0&&(x=0),g===0&&(k=0),g===Number.POSITIVE_INFINITY&&(k=v.children.length),x===-1||k===-1)for(let R=0;R<v.children.length;R++)w+=iN(v.children[R]),x===-1&&w.length===m&&(x=R+1),k===-1&&w.length===g&&(k=R+1);if(x===-1)throw new Kn(`Failed to find start index for decoration ${JSON.stringify(b.start)}`);if(k===-1)throw new Kn(`Failed to find end index for decoration ${JSON.stringify(b.end)}`);const C=v.children.slice(x,k);if(!b.alwaysWrap&&C.length===v.children.length)l(v,b,"line");else if(!b.alwaysWrap&&C.length===1&&C[0].type==="element")l(C[0],b,"token");else{const R={type:"element",tagName:"span",properties:{},children:C};l(R,b,"wrapper"),v.children.splice(x,C.length,R)}}function a(p,m){i[p]=l(i[p],m,"line")}function l(p,m,g){var w;const b=m.properties||{},v=m.transform||(x=>x);return p.tagName=m.tagName||"span",p.properties={...p.properties,...b,class:p.properties.class},(w=m.properties)!=null&&w.class&&nN(p,m.properties.class),p=v(p,g)||p,p}const c=[],f=r.decorations.sort((p,m)=>m.start.offset-p.start.offset||p.end.offset-m.end.offset);for(const p of f){const{start:m,end:g}=p;if(m.line===g.line)o(m.line,m.character,g.character,p);else if(m.line<g.line){o(m.line,m.character,Number.POSITIVE_INFINITY,p);for(let b=m.line+1;b<g.line;b++)c.unshift(()=>a(b,p));o(g.line,0,g.character,p)}}c.forEach(p=>p())}}}function Vte(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new Kn(`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,l=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||l||c){if(o&&a||l&&c||l&&n.start.offset===n.end.offset||a&&i.start.offset===i.end.offset)continue;throw new Kn(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(i.start)} intersect.`)}}}}function iN(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(iN).join(""):""}const Gte=[qte()];function Iy(e){const t=Yte(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...Gte]}function Yte(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 Wl=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Cx={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function Wte(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 fM(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 Kte(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)Cx[r]&&t.push({type:"setDecoration",value:Cx[r]});else if(r<=29){const i=Cx[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:Wl[r-30]}});else if(r===38){const i=fM(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:Wl[r-40]}});else if(r===48){const i=fM(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:Wl[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Wl[r-100+8]}})}return t}function Xte(){let e=null,t=null,n=new Set;return{parse(r){const i=[];let o=0;do{const a=Wte(r,o),l=a.sequence?r.substring(o,a.startPosition):r.substring(o);if(l.length>0&&i.push({value:l,foreground:e,background:t,decorations:new Set(n)}),a.sequence){const c=Kte(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 Qte={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 Zte(e=Qte){function t(l){return e[l]}function n(l){return`#${l.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<Wl.length;f++)r.push(t(Wl[f]));let l=[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([l[f],l[h],l[p]]));let c=8;for(let f=0;f<24;f++,c+=10)r.push(n([c,c,c]));return r}function o(l){return i()[l]}function a(l){switch(l.type){case"named":return t(l.name);case"rgb":return n(l.rgb);case"table":return o(l.index)}}return{value:a}}const Jte={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 ene(e,t,n){const r=Oy(e,n),i=Fb(t),o=Object.fromEntries(Wl.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||Jte[c]]})),a=Zte(o),l=Xte();return i.map(c=>l.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=Ga(h,r),p=Ga(p,r),f.decorations.has("dim")&&(h=tne(h));let m=dr.None;return f.decorations.has("bold")&&(m|=dr.Bold),f.decorations.has("italic")&&(m|=dr.Italic),f.decorations.has("underline")&&(m|=dr.Underline),f.decorations.has("strikethrough")&&(m|=dr.Strikethrough),{content:f.value,offset:c[1],color:h,bgColor:p,fontStyle:m}}))}function tne(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],l=r[3],c=Math.round(Number.parseInt(`${l}${l}`,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 EC(e,t,n={}){const{theme:r=e.getLoadedThemes()[0]}=n,i=e.resolveLangAlias(n.lang||"text");if(xC(i)||wC(r))return Fb(t).map(c=>[{content:c[0],offset:c[1]}]);const{theme:o,colorMap:a}=e.setTheme(r);if(i==="ansi")return ene(o,t,n);const l=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==l.name)throw new Kn(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${l.name}"`);if(!n.grammarState.themes.includes(o.name))throw new Kn(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${o.name}"`)}return rne(t,l,o,a,n)}function nne(...e){if(e.length===2)return jh(e[1]);const[t,n,r={}]=e,{lang:i="text",theme:o=t.getLoadedThemes()[0]}=r;if(xC(i)||wC(o))throw new Kn("Plain language does not have grammar state");if(i==="ansi")throw new Kn("ANSI language does not have grammar state");const{theme:a,colorMap:l}=t.setTheme(o),c=t.getLanguage(i);return new Ff(CC(n,c,a,l,r).stateStack,c.name,a.name)}function rne(e,t,n,r,i){const o=CC(e,t,n,r,i),a=new Ff(o.stateStack,t.name,n.name);return zb(o.tokens,a),o.tokens}function CC(e,t,n,r,i){const o=Oy(n,i),{tokenizeMaxLineLength:a=0,tokenizeTimeLimit:l=500}=i,c=Fb(e);let f=i.grammarState?Ute(i.grammarState,n.name)??CS:i.grammarContextCode!=null?CC(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:CS,h=[];const p=[];for(let m=0,g=c.length;m<g;m++){const[b,v]=c[m];if(b===""){h=[],p.push([]);continue}if(a>0&&b.length>=a){h=[],p.push([{content:b,offset:v,color:"",fontStyle:0}]);continue}let w,x,k;i.includeExplanation&&(w=t.tokenizeLine(b,f,l),x=w.tokens,k=0);const C=t.tokenizeLine2(b,f,l),R=C.tokens.length/2;for(let _=0;_<R;_++){const D=C.tokens[2*_],M=_+1<R?C.tokens[2*_+2]:b.length;if(D===M)continue;const O=C.tokens[2*_+1],U=Ga(r[xf.getForeground(O)],o),L=xf.getFontStyle(O),I={content:b.substring(D,M),offset:v+D,color:U,fontStyle:L};if(i.includeExplanation){const $=[];if(i.includeExplanation!=="scopeName")for(const V of n.settings){let F;switch(typeof V.scope){case"string":F=V.scope.split(/,/).map(z=>z.trim());break;case"object":F=V.scope;break;default:continue}$.push({settings:V,selectors:F.map(z=>z.split(/ /))})}I.explanation=[];let B=0;for(;D+B<M;){const V=x[k],F=b.substring(V.startIndex,V.endIndex);B+=F.length,I.explanation.push({content:F,scopes:i.includeExplanation==="scopeName"?ine(V.scopes):one($,V.scopes)}),k+=1}}h.push(I)}p.push(h),h=[],f=C.ruleStack}return{tokens:p,stateStack:f}}function ine(e){return e.map(t=>({scopeName:t}))}function one(e,t){const n=[];for(let r=0,i=t.length;r<i;r++){const o=t[r];n[r]={scopeName:o,themeMatches:ane(e,o,t.slice(0,r))}}return n}function dM(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function sne(e,t,n){if(!dM(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)dM(e[r],n[i])&&(r-=1),i-=1;return r===-1}function ane(e,t,n){const r=[];for(const{selectors:i,settings:o}of e)for(const a of i)if(sne(a,t,n)){r.push(o);break}return r}function oN(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=EC(e,t,{...n,theme:c.theme}),h=jh(f),p=typeof c.theme=="string"?c.theme:c.theme.name;return{tokens:f,state:h,theme:p}}),o=lne(...i.map(c=>c.tokens)),a=o[0].map((c,f)=>c.map((h,p)=>{const m={content:h.content,variants:{},offset:h.offset};return"includeExplanation"in n&&n.includeExplanation&&(m.explanation=h.explanation),o.forEach((g,b)=>{const{content:v,explanation:w,offset:x,...k}=g[f][p];m.variants[r[b].color]=k}),m})),l=i[0].state?new Ff(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 l&&zb(a,l),a}function lne(...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),l=i.map(c=>c[0]);for(;l.every(c=>c);){const c=Math.min(...l.map(f=>f.content.length));for(let f=0;f<n;f++){const h=l[f];h.content.length===c?(o[f].push(h),a[f]+=1,l[f]=i[f][a[f]]):(o[f].push({...h,content:h.content.slice(0,c)}),l[f]={...h,content:h.content.slice(c),offset:h.offset+c})}}}return t}function Ly(e,t,n){let r,i,o,a,l,c;if("themes"in n){const{defaultColor:f="light",cssVariablePrefix:h="--shiki-",colorsRendering:p="css-vars"}=n,m=Object.entries(n.themes).filter(x=>x[1]).map(x=>({color:x[0],theme:x[1]})).sort((x,k)=>x.color===f?-1:k.color===f?1:0);if(m.length===0)throw new Kn("`themes` option must not be empty");const g=oN(e,t,n);if(c=jh(g),f&&SC!==f&&!m.find(x=>x.color===f))throw new Kn(`\`themes\` option must contain the defaultColor key \`${f}\``);const b=m.map(x=>e.getTheme(x.theme)),v=m.map(x=>x.color);o=g.map(x=>x.map(k=>Bte(k,v,h,f,p))),c&&zb(o,c);const w=m.map(x=>Oy(x.theme,n));i=hM(m,b,w,h,f,"fg",p),r=hM(m,b,w,h,f,"bg",p),a=`shiki-themes ${b.map(x=>x.name).join(" ")}`,l=f?void 0:[i,r].join(";")}else if("theme"in n){const f=Oy(n.theme,n);o=EC(e,t,n);const h=e.getTheme(n.theme);r=Ga(h.bg,f),i=Ga(h.fg,f),a=h.name,c=jh(o)}else throw new Kn("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:i,bg:r,themeName:a,rootStyle:l,grammarState:c}}function hM(e,t,n,r,i,o,a){return e.map((l,c)=>{const f=Ga(t[c][o],n[c])||"inherit",h=`${r+l.color}${o==="bg"?"-bg":""}:${f}`;if(c===0&&i){if(i===SC&&e.length>1){const p=e.findIndex(v=>v.color==="light"),m=e.findIndex(v=>v.color==="dark");if(p===-1||m===-1)throw new Kn('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const g=Ga(t[p][o],n[p])||"inherit",b=Ga(t[m][o],n[m])||"inherit";return`light-dark(${g}, ${b});${h}`}return f}return a==="css-vars"?h:null}).filter(l=>!!l).join(";")}function Ny(e,t,n,r={meta:{},options:n,codeToHast:(i,o)=>Ny(e,i,o),codeToTokens:(i,o)=>Ly(e,i,o)}){var b,v;let i=t;for(const w of Iy(n))i=((b=w.preprocess)==null?void 0:b.call(r,i,n))||i;let{tokens:o,fg:a,bg:l,themeName:c,rootStyle:f,grammarState:h}=Ly(e,i,n);const{mergeWhitespaces:p=!0,mergeSameStyleTokens:m=!1}=n;p===!0?o=cne(o):p==="never"&&(o=fne(o)),m&&(o=dne(o));const g={...r,get source(){return i}};for(const w of Iy(n))o=((v=w.tokens)==null?void 0:v.call(g,o))||o;return une(o,{...n,fg:a,bg:l,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??f},g,h)}function une(e,t,n,r=jh(e)){var v,w,x,k;const i=Iy(t),o=[],a={type:"root",children:[]},{structure:l="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[C,R]of Object.entries(t.meta||{}))C.startsWith("_")||(f[C]=R);let h={type:"element",tagName:"pre",properties:f,children:[],data:t.data},p={type:"element",tagName:"code",properties:{},children:o};const m=[],g={...n,structure:l,addClassToHast:nN,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 m}};if(e.forEach((C,R)=>{var M,O;R&&(l==="inline"?a.children.push({type:"element",tagName:"br",properties:{},children:[]}):l==="classic"&&o.push({type:"text",value:`
|
|
343
|
-
`}));let _={type:"element",tagName:"span",properties:{class:"line"},children:[]},D=0;for(const U of C){let L={type:"element",tagName:"span",properties:{...U.htmlAttrs},children:[{type:"text",value:U.content}]};const I=_S(U.htmlStyle||Py(U));I&&(L.properties.style=I);for(const $ of i)L=((M=$==null?void 0:$.span)==null?void 0:M.call(g,L,R+1,D,_,U))||L;l==="inline"?a.children.push(L):l==="classic"&&_.children.push(L),D+=U.content.length}if(l==="classic"){for(const U of i)_=((O=U==null?void 0:U.line)==null?void 0:O.call(g,_,R+1))||_;m.push(_),o.push(_)}else l==="inline"&&m.push(_)}),l==="classic"){for(const C of i)p=((v=C==null?void 0:C.code)==null?void 0:v.call(g,p))||p;h.children.push(p);for(const C of i)h=((w=C==null?void 0:C.pre)==null?void 0:w.call(g,h))||h;a.children.push(h)}else if(l==="inline"){const C=[];let R={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const M of a.children)M.type==="element"&&M.tagName==="br"?(C.push(R),R={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(M.type==="element"||M.type==="text")&&R.children.push(M);C.push(R);let D={type:"element",tagName:"code",properties:{},children:C};for(const M of i)D=((x=M==null?void 0:M.code)==null?void 0:x.call(g,D))||D;a.children=[];for(let M=0;M<D.children.length;M++){M>0&&a.children.push({type:"element",tagName:"br",properties:{},children:[]});const O=D.children[M];O.type==="element"&&a.children.push(...O.children)}}let b=a;for(const C of i)b=((k=C==null?void 0:C.root)==null?void 0:k.call(g,b))||b;return r&&zb(b,r),b}function cne(e){return e.map(t=>{const n=[];let r="",i;return t.forEach((o,a)=>{const c=!(o.fontStyle&&(o.fontStyle&dr.Underline||o.fontStyle&dr.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 fne(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 l=[{...n,offset:n.offset+i.length,content:o}];return i&&l.unshift({content:i,offset:n.offset}),a&&l.push({content:a,offset:n.offset+i.length+o.length}),l}))}function dne(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=_S(i.htmlStyle||Py(i)),a=_S(r.htmlStyle||Py(r)),l=i.fontStyle&&(i.fontStyle&dr.Underline||i.fontStyle&dr.Strikethrough),c=r.fontStyle&&(r.fontStyle&dr.Underline||r.fontStyle&dr.Strikethrough);!l&&!c&&o===a?i.content+=r.content:n.push({...r})}return n})}const hne=Mte;function pne(e,t,n){var o;const r={meta:{},options:n,codeToHast:(a,l)=>Ny(e,a,l),codeToTokens:(a,l)=>Ly(e,a,l)};let i=hne(Ny(e,t,n,r));for(const a of Iy(n))i=((o=a.postprocess)==null?void 0:o.call(r,i,n))||i;return i}const pM={light:"#333333",dark:"#bbbbbb"},mM={light:"#fffffe",dark:"#1e1e1e"},gM="__shiki_resolved";function kC(e){var l,c,f,h,p;if(e!=null&&e[gM])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 m=t.settings?t.settings.find(g=>!g.name&&!g.scope):void 0;(l=m==null?void 0:m.settings)!=null&&l.foreground&&(r=m.settings.foreground),(c=m==null?void 0:m.settings)!=null&&c.background&&(n=m.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"?pM.light:pM.dark),n||(n=t.type==="light"?mM.light:mM.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(m){var b;if(o.has(m))return o.get(m);i+=1;const g=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return(b=t.colorReplacements)!=null&&b[`#${g}`]?a(m):(o.set(m,g),g)}t.settings=t.settings.map(m=>{var w,x;const g=((w=m.settings)==null?void 0:w.foreground)&&!m.settings.foreground.startsWith("#"),b=((x=m.settings)==null?void 0:x.background)&&!m.settings.background.startsWith("#");if(!g&&!b)return m;const v={...m,settings:{...m.settings}};if(g){const k=a(m.settings.foreground);t.colorReplacements[k]=m.settings.foreground,v.settings.foreground=k}if(b){const k=a(m.settings.background);t.colorReplacements[k]=m.settings.background,v.settings.background=k}return v});for(const m of Object.keys(t.colors||{}))if((m==="editor.foreground"||m==="editor.background"||m.startsWith("terminal.ansi"))&&!((p=t.colors[m])!=null&&p.startsWith("#"))){const g=a(t.colors[m]);t.colorReplacements[g]=t.colors[m],t.colors[m]=g}return Object.defineProperty(t,gM,{enumerable:!1,writable:!1,value:!0}),t}async function sN(e){return Array.from(new Set((await Promise.all(e.filter(t=>!Ite(t)).map(async t=>await tN(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function aN(e){return(await Promise.all(e.map(async n=>Lte(n)?null:kC(await tN(n))))).filter(n=>!!n)}let mne=3;function gne(e,t=3){t>mne||console.trace(`[SHIKI DEPRECATE]: ${e}`)}class Lc extends Error{constructor(t){super(t),this.name="ShikiError"}}function lN(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 Lc(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}class yne extends xee{constructor(n,r,i,o={}){super(n);ce(this,"_resolvedThemes",new Map);ce(this,"_resolvedGrammars",new Map);ce(this,"_langMap",new Map);ce(this,"_langGraph",new Map);ce(this,"_textmateThemeCache",new WeakMap);ce(this,"_loadedThemesCache",null);ce(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=kC(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=Ay.createFromRawTheme(n),this._textmateThemeCache.set(n,r)),this._syncRegistry.setTheme(r)}getGrammar(n){return n=lN(n,this._alias),this._resolvedGrammars.get(n)}loadLanguage(n){var a,l,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,(l=(a=this._syncRegistry)==null?void 0:a._injectionGrammars)==null||l.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,l])=>{if(!l)return!1;const c=l.embeddedLanguages||l.embeddedLangs;return c==null?void 0:c.some(f=>i.map(([h])=>h).includes(f))}).filter(a=>!i.includes(a));throw new Lc(`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 bne{constructor(t,n){ce(this,"_langs",new Map);ce(this,"_scopeToLang",new Map);ce(this,"_injections",new Map);ce(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 Kd=0;function vne(e){Kd+=1,e.warnings!==!1&&Kd>=10&&Kd%10===0&&console.warn(`[Shiki] ${Kd} 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 Lc("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(kC),i=new bne(e.engine,n),o=new yne(i,r,n,e.langAlias);let a;function l(C){return lN(C,e.langAlias)}function c(C){x();const R=o.getGrammar(typeof C=="string"?C:C.name);if(!R)throw new Lc(`Language \`${C}\` not found, you may need to load it first`);return R}function f(C){if(C==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};x();const R=o.getTheme(C);if(!R)throw new Lc(`Theme \`${C}\` not found, you may need to load it first`);return R}function h(C){x();const R=f(C);a!==C&&(o.setTheme(R),a=C);const _=o.getColorMap();return{theme:R,colorMap:_}}function p(){return x(),o.getLoadedThemes()}function m(){return x(),o.getLoadedLanguages()}function g(...C){x(),o.loadLanguages(C.flat(1))}async function b(...C){return g(await sN(C))}function v(...C){x();for(const R of C.flat(1))o.loadTheme(R)}async function w(...C){return x(),v(await aN(C))}function x(){if(t)throw new Lc("Shiki instance has been disposed")}function k(){t||(t=!0,o.dispose(),Kd-=1)}return{setTheme:h,getTheme:f,getLanguage:c,getLoadedThemes:p,getLoadedLanguages:m,resolveLangAlias:l,loadLanguage:b,loadLanguageSync:g,loadTheme:w,loadThemeSync:v,dispose:k,[Symbol.dispose]:k}}async function xne(e){e.engine||gne("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([aN(e.themes||[]),sN(e.langs||[]),e.engine]);return vne({...e,themes:t,langs:n,engine:r})}async function wne(e){const t=await xne(e);return{getLastGrammarState:(...n)=>nne(t,...n),codeToTokensBase:(n,r)=>EC(t,n,r),codeToTokensWithThemes:(n,r)=>oN(t,n,r),codeToTokens:(n,r)=>Ly(t,n,r),codeToHast:(n,r)=>Ny(t,n,r),codeToHtml:(n,r)=>pne(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function zf(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function Sne(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}const RC=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),Xn=String.raw;function Bf(e,t){if(e==null)throw new Error(t??"Value expected");return e}const uN=Xn`\[\^?`,cN=`c.? | C(?:-.?)?|${Xn`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${Xn`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${Xn`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${Xn`o\{[^\}]*\}?`}|${Xn`\d{1,3}`}`,AC=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,ng=new RegExp(Xn`
|
|
344
|
-
\\ (?:
|
|
345
|
-
${cN}
|
|
346
|
-
| [gk]<[^>]*>?
|
|
347
|
-
| [gk]'[^']*'?
|
|
348
|
-
| .
|
|
349
|
-
)
|
|
350
|
-
| \( (?:
|
|
351
|
-
\? (?:
|
|
352
|
-
[:=!>({]
|
|
353
|
-
| <[=!]
|
|
354
|
-
| <[^>]*>
|
|
355
|
-
| '[^']*'
|
|
356
|
-
| ~\|?
|
|
357
|
-
| #(?:[^)\\]|\\.?)*
|
|
358
|
-
| [^:)]*[:)]
|
|
359
|
-
)?
|
|
360
|
-
| \*[^\)]*\)?
|
|
361
|
-
)?
|
|
362
|
-
| (?:${AC.source})+
|
|
363
|
-
| ${uN}
|
|
364
|
-
| .
|
|
365
|
-
`.replace(/\s+/g,""),"gsu"),kx=new RegExp(Xn`
|
|
366
|
-
\\ (?:
|
|
367
|
-
${cN}
|
|
368
|
-
| .
|
|
369
|
-
)
|
|
370
|
-
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
371
|
-
| ${uN}
|
|
372
|
-
| &&
|
|
373
|
-
| .
|
|
374
|
-
`.replace(/\s+/g,""),"gsu");function Ene(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=Hne(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=[],l;for(ng.lastIndex=0;l=ng.exec(e);){const p=Cne(o,e,l[0],ng.lastIndex);p.tokens?a.push(...p.tokens):p.token&&a.push(p.token),p.lastIndex!==void 0&&(ng.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,m)=>{p.kind="capturing",p.number=m+1});const h=f||c.length;return{tokens:a.map(p=>p.type==="EscapedNumber"?qne(p,h):p).flat(),flags:r}}function Cne(e,t,n,r){const[i,o]=n;if(n==="["||n==="[^"){const a=kne(t,n,r);return{tokens:a.tokens,lastIndex:a.lastIndex}}if(i==="\\"){if("AbBGyYzZ".includes(o))return{token:yM(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:Ine(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:dN(n)}}if(o==="K")return{token:hN("keep",n)};if(o==="N"||o==="R")return{token:Kl("newline",n,{negate:o==="N"})};if(o==="O")return{token:Kl("any",n)};if(o==="X")return{token:Kl("text_segment",n)};const a=fN(n,{inCharClass:!1});return Array.isArray(a)?{tokens:a}:{token:a}}if(i==="("){if(o==="*")return{token:Fne(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:jne(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n==="("&&!e.captureGroup||n==="(?:")return{token:Mc("group",n)};if(n==="(?>")return{token:Mc("atomic",n)};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?<!")return{token:Mc(n[2]==="<"?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if(n==="("&&e.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:Mc("capturing",n,{...n!=="("&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if(n==="(?~|")throw new Error(`Unsupported absence function kind "${n}"`);return{token:Mc("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:$ne(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:Kl("dot",n)};if(n==="^"||n==="$"){const a=e.singleline?{"^":Xn`\A`,$:Xn`\Z`}[n]:n;return{token:yM(a,n)}}return n==="|"?{token:Ane(n)}:AC.test(n)?{tokens:Vne(n)}:{token:Es(zf(n),n)}}function kne(e,t,n){const r=[bM(t[1]==="^",t)];let i=1,o;for(kx.lastIndex=n;o=kx.exec(e);){const a=o[0];if(a[0]==="["&&a[1]!==":")i++,r.push(bM(a[1]==="^",a));else if(a==="]"){if(r.at(-1).type==="CharacterClassOpen")r.push(Es(93,a));else if(i--,r.push(Tne(a)),!i)break}else{const l=Rne(a);Array.isArray(l)?r.push(...l):r.push(l)}}return{tokens:r,lastIndex:kx.lastIndex||e.length}}function Rne(e){if(e[0]==="\\")return fN(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!RC.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return Kl("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?_ne(e):e==="&&"?Dne(e):Es(zf(e),e)}function fN(e,{inCharClass:t}){const n=e[1];if(n==="c"||n==="C")return Nne(e);if("dDhHsSwW".includes(n))return zne(e);if(e.startsWith(Xn`\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 Bne(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 l=[...o.encode(a)].map(c=>`\\x${c.toString(16)}`).join("");return Es(zf(a),l)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return Es(Une(e),e);if(vM.has(n))return Es(vM.get(n),e);if(/\d/.test(n))return Mne(t,e);if(e==="\\")throw new Error(Xn`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return Es(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function Ane(e){return{type:"Alternator",raw:e}}function yM(e,t){return{type:"Assertion",kind:e,raw:t}}function dN(e){return{type:"Backreference",raw:e}}function Es(e,t){return{type:"Character",value:e,raw:t}}function Tne(e){return{type:"CharacterClassClose",raw:e}}function _ne(e){return{type:"CharacterClassHyphen",raw:e}}function Dne(e){return{type:"CharacterClassIntersector",raw:e}}function bM(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function Kl(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function hN(e,t,n={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:Bf(n.flags),raw:t}}function Mne(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function $ne(e){return{type:"GroupClose",raw:e}}function Mc(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}function One(e,t,n,r){return{type:"NamedCallout",kind:e,tag:t,arguments:n,raw:r}}function Pne(e,t,n,r){return{type:"Quantifier",kind:e,min:t,max:n,raw:r}}function Ine(e){return{type:"Subroutine",raw:e}}const Lne=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),vM=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function Nne(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 Es(zf(t.toUpperCase())-64,e)}function jne(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=wM(n),a=wM(r),l={};if(o&&(l.enable=o),a&&(l.disable=a),e.endsWith(")"))return t.replaceCurrentModX(i),hN("flags",e,{flags:l});if(e.endsWith(":"))return t.pushModX(i),t.numOpenGroups++,Mc("group",e,{...(o||a)&&{flags:l}});throw new Error(`Unexpected flag modifier "${e}"`)}function Fne(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,l,c]=o,f=Lne.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 l=="number"||!/^[<>X]$/.test(l)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${l}"`);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 l=="number"||!/^(?:[<>!=]=|[<>])$/.test(l))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${l}"`);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 One(f,r??null,(i==null?void 0:i.split(","))??null,e)}function xM(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 Pne(t,n,r,e)}function zne(e){const t=e[1].toLowerCase();return Kl({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function Bne(e){const{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return Kl("property",e,{value:r,negate:t==="P"&&!n||t==="p"&&!!n})}function wM(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 Hne(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 Une(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 qne(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[dN(n)];const o=[],a=i.match(/^[0-7]+|\d/g);for(let l=0;l<a.length;l++){const c=a[l];let f;if(l===0&&c!=="8"&&c!=="9"){if(f=parseInt(c,8),f>127)throw new Error(Xn`Octal encoded byte above 177 unsupported "${n}"`)}else f=zf(c);o.push(Es(f,(l===0?"\\":"")+c))}return o}function Vne(e){const t=[],n=new RegExp(AC,"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:l}=o.groups;if(+a>+l&&i.endsWith("?")){n.lastIndex--,t.push(xM(i.slice(0,-1)));continue}}}t.push(xM(i))}return t}function pN(e,t){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const n=e.body[0];return!t||Object.keys(t).every(r=>t[r]===n[r])}function Gne(e){return Yne.has(e.type)}const Yne=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function mN(e,t={}){const n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=Ene(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),i=(m,g)=>{const b=r.tokens[o.nextIndex];switch(o.parent=m,o.nextIndex++,b.type){case"Alternator":return vu();case"Assertion":return Wne(b);case"Backreference":return Kne(b,o);case"Character":return Bb(b.value,{useLastValid:!!g.isCheckingRangeEnd});case"CharacterClassHyphen":return Xne(b,o,g);case"CharacterClassOpen":return Qne(b,o,g);case"CharacterSet":return Zne(b,o);case"Directive":return ire(b.kind,{flags:b.flags});case"GroupOpen":return Jne(b,o,g);case"NamedCallout":return sre(b.kind,b.tag,b.arguments);case"Quantifier":return ere(b,o);case"Subroutine":return tre(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=lre(ore(r.flags));let l=a.body[0];for(;o.nextIndex<r.tokens.length;){const m=i(l,{});m.type==="Alternative"?(a.body.push(m),l=m):l.body.push(m)}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:m}of p)if(typeof m=="number"){if(m>c.length)throw new Error("Subroutine uses a group number that's not defined");m&&(c[m-1].isSubroutined=!0)}else if(h.has(m)){if(h.get(m).length>1)throw new Error(Xn`Subroutine uses a duplicate group name "\g<${m}>"`);h.get(m)[0].isSubroutined=!0}else throw new Error(Xn`Subroutine uses a group name that's not defined "\g<${m}>"`);return a}function Wne({kind:e}){return DS(Bf({"^":"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===Xn`\B`||e===Xn`\Y`})}function Kne({raw:e},t){const n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),i=(o,a=!1)=>{const l=t.capturingGroups.length;let c=!1;if(o>l)if(t.skipBackrefValidation)c=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,MS(a?l+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 MS(r)}return i(+r)}function Xne(e,t,n){const{tokens:r,walk:i}=t,o=t.parent,a=o.body.at(-1),l=r[t.nextIndex];if(!n.isCheckingRangeEnd&&a&&a.type!=="CharacterClass"&&a.type!=="CharacterClassRange"&&l&&l.type!=="CharacterClassOpen"&&l.type!=="CharacterClassClose"&&l.type!=="CharacterClassIntersector"){const c=i(o,{...n,isCheckingRangeEnd:!0});if(a.type==="Character"&&c.type==="Character")return o.body.pop(),rre(a,c);throw new Error("Invalid character class range")}return Bb(zf("-"))}function Qne({negate:e},t,n){const{tokens:r,walk:i}=t,o=[Kg()],a=r[t.nextIndex];let l=CM(a);for(;l.type!=="CharacterClassClose";){if(l.type==="CharacterClassIntersector")o.push(Kg()),t.nextIndex++;else{const f=o.at(-1);f.body.push(i(f,n))}l=CM(r[t.nextIndex],a)}const c=Kg({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 Zne({kind:e,negate:t,value:n},r){const{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:o,unicodePropertyMap:a}=r;if(e==="property"){const l=Hb(n);if(RC.has(l)&&!(a!=null&&a.has(l)))e="posix",n=l;else return $c(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:o,unicodePropertyMap:a})}return e==="posix"?are(n,{negate:t}):$S(e,{negate:t})}function Jne(e,t,n){const{tokens:r,capturingGroups:i,namedGroupsByName:o,skipLookbehindValidation:a,walk:l}=t,c=ure(e),f=c.type==="AbsenceFunction",h=EM(c),p=h&&c.negate;if(c.type==="CapturingGroup"&&(i.push(c),c.name&&Sne(o,c.name,[]).push(c)),f&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let m=kM(r[t.nextIndex]);for(;m.type!=="GroupClose";){if(m.type==="Alternator")c.body.push(vu()),t.nextIndex++;else{const g=c.body.at(-1),b=l(g,{...n,isInAbsenceFunction:n.isInAbsenceFunction||f,isInLookbehind:n.isInLookbehind||h,isInNegLookbehind:n.isInNegLookbehind||p});if(g.body.push(b),(h||n.isInLookbehind)&&!a){const v="Lookbehind includes a pattern not allowed by Oniguruma";if(p||n.isInNegLookbehind){if(SM(b)||b.type==="CapturingGroup")throw new Error(v)}else if(SM(b)||EM(b)&&b.negate)throw new Error(v)}}m=kM(r[t.nextIndex])}return t.nextIndex++,c}function ere({kind:e,min:t,max:n},r){const i=r.parent,o=i.body.at(-1);if(!o||!Gne(o))throw new Error("Quantifier requires a repeatable token");const a=yN(e,t,n,o);return i.body.pop(),a}function tre({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 l=+o.groups.num,c=n.length;if(t.hasNumberedRef=!0,i={"":l,"+":c+l,"-":c+1-l}[o.groups.sign],i<1)throw new Error("Invalid subroutine number")}else i==="0"&&(i=0);const a=bN(i);return r.push(a),a}function nre(e,t){return{type:"AbsenceFunction",kind:e,body:dp(t==null?void 0:t.body)}}function vu(e){return{type:"Alternative",body:vN(e==null?void 0:e.body)}}function DS(e,t){const n={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(n.negate=!!(t!=null&&t.negate)),n}function MS(e,t){const n=!!(t!=null&&t.orphan);return{type:"Backreference",ref:e,...n&&{orphan:n}}}function gN(e,t){const n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!cre(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:dp(t==null?void 0:t.body)}}function Bb(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 Kg(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:vN(e==null?void 0:e.body)}}function rre(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function $S(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 ire(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:Bf(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function ore(e){return{type:"Flags",...e}}function oo(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:dp(e==null?void 0:e.body)}}function Ul(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:dp(e==null?void 0:e.body)}}function sre(e,t,n){return{type:"NamedCallout",kind:e,tag:t,arguments:n}}function are(e,t){const n=!!(t!=null&&t.negate);if(!RC.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}function yN(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 lre(e,t){return{type:"Regex",body:dp(t==null?void 0:t.body),flags:e}}function bN(e){return{type:"Subroutine",ref:e}}function $c(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(Hb(e));if(!r){if(n.normalizeUnknownPropertyNames)r=fre(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error(Xn`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:r??e,negate:n.negate}}function ure({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case"absence_repeater":return nre("repeater");case"atomic":return oo({atomic:!0});case"capturing":return gN(i,{name:n});case"group":return oo({flags:e});case"lookahead":case"lookbehind":return Ul({behind:t==="lookbehind",negate:r});default:throw new Error(`Unexpected group kind "${t}"`)}}function dp(e){if(e===void 0)e=[vu()];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 vN(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 SM(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function EM(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function cre(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function fre(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 Hb(e){return e.replace(/[- _]+/g,"").toLowerCase()}function CM(e,t){const n=t;return Bf(e,`Unclosed character class${(n==null?void 0:n.type)==="Character"&&n.value===93&&n.raw==="]"?' (started with "]")':""}`)}function kM(e){return Bf(e,"Unclosed group")}function fh(e,t,n=null){function r(o,a){for(let l=0;l<o.length;l++){const c=i(o[l],a,l,o);l=Math.max(-1,l+c)}}function i(o,a=null,l=null,c=null){var x,k;let f=0,h=!1;const p={node:o,parent:a,key:l,container:c,root:e,remove(){rg(c).splice(Math.max(0,Ec(l)+f),1),f--,h=!0},removeAllNextSiblings(){return rg(c).splice(Ec(l)+1)},removeAllPrevSiblings(){const C=Ec(l)+f;return f-=C,rg(c).splice(0,Math.max(0,C))},replaceWith(C,R={}){const _=!!R.traverse;c?c[Math.max(0,Ec(l)+f)]=C:Bf(a,"Can't replace root node")[l]=C,_&&i(C,a,l,c),h=!0},replaceWithMultiple(C,R={}){const _=!!R.traverse;if(rg(c).splice(Math.max(0,Ec(l)+f),1,...C),f+=C.length-1,_){let D=0;for(let M=0;M<C.length;M++)D+=i(C[M],a,Ec(l)+M+D,c)}h=!0},skip(){h=!0}},{type:m}=o,g=t["*"],b=t[m],v=typeof g=="function"?g:g==null?void 0:g.enter,w=typeof b=="function"?b:b==null?void 0:b.enter;if(v==null||v(p,n),w==null||w(p,n),!h)switch(m){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 "${m}"`)}return(x=b==null?void 0:b.exit)==null||x.call(b,p,n),(k=g==null?void 0:g.exit)==null||k.call(g,p,n),f}return i(e),e}function rg(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function Ec(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const dre=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function hre(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function pre(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}const Vi=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function TC(e,t,n,r){const i=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),o=[!1];let a=0,l="";for(const c of e.matchAll(i)){const{0:f,groups:{$skip:h}}=c;if(!h&&(!r||r===Vi.DEFAULT==!a)){n instanceof Function?l+=n(c,{context:a?Vi.CHAR_CLASS:Vi.DEFAULT,negated:o[o.length-1]}):l+=n;continue}f[0]==="["?(a++,o.push(f[1]==="^")):f==="]"&&a&&(a--,o.pop()),l+=f}return l}function xN(e,t,n,r){TC(e,t,n,r)}function mre(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:l,groups:{$skip:c}}=a;if(!c&&(!r||r===Vi.DEFAULT==!o))return a;l==="["?o++:l==="]"&&o&&o--,i.lastIndex==a.index&&i.lastIndex++}return null}function ig(e,t,n){return!!mre(e,t,0,n)}function gre(e,t){const n=/\\?./gsu;n.lastIndex=t;let r=e.length,i=0,o=1,a;for(;a=n.exec(e);){const[l]=a;if(l==="[")i++;else if(i)l==="]"&&i--;else if(l==="(")o++;else if(l===")"&&(o--,!o)){r=a.index;break}}return e.slice(t,r)}const RM=new RegExp(String.raw`(?<noncapturingStart>${dre})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function yre(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],l=[];let c=0,f=0,h=NaN,p;do{p=!1;let m=0,g=0,b=!1,v;for(RM.lastIndex=Number.isNaN(h)?0:h+o.length;v=RM.exec(e);){const{0:w,index:x,groups:{capturingStart:k,noncapturingStart:C}}=v;if(w==="[")m++;else if(m)w==="]"&&m--;else if(w===i&&!b)h=x,b=!0;else if(b&&C)g++;else if(k)b?g++:(c++,a.push(c+f));else if(w===")"&&b){if(!g){f++;const R=c+f;if(e=`${e.slice(0,h)}${o}${e.slice(h+i.length,x)}))<$$${R}>)${e.slice(x+1)}`,p=!0,l.push(R),hre(n,R),r.size){const _=new Map;r.forEach((D,M)=>{_.set(M>=R?M+1:M,D.map(O=>O>=R?O+1:O))}),r=_}break}g--}}}while(p);return n.push(...l),e=TC(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:m,groups:{backrefNum:g,wrappedBackrefNum:b}})=>{if(g){const v=+g;if(v>a.length-1)throw new Error(`Backref "${m}" greater than number of captures`);return`\\${a[v]}`}return`\\${b}`},Vi.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}const wN=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,Rx=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>${wN})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
389
|
-
| \\?.
|
|
390
|
-
`.replace(/\s+/g,""),"gsu");function bre(e){if(!new RegExp(`${wN}\\+`).test(e))return{pattern:e};const t=[];let n=null,r=null,i="",o=0,a;for(Rx.lastIndex=0;a=Rx.exec(e);){const{0:l,index:c,groups:{qBase:f,qMod:h,invalidQ:p}}=a;if(l==="[")o||(r=c),o++;else if(l==="]")o?o--:r=null;else if(!o)if(h==="+"&&i&&!i.startsWith("(")){if(p)throw new Error(`Invalid quantifier "${l}"`);let m=-1;if(/^\{\d+\}$/.test(f))e=pre(e,c+f.length,h,"");else{if(i===")"||i==="]"){const g=i===")"?n:r;if(g===null)throw new Error(`Invalid unmatched "${i}"`);e=`${e.slice(0,g)}(?>${e.slice(g,c)}${f})${e.slice(c+l.length)}`}else e=`${e.slice(0,c-i.length)}(?>${i}${f})${e.slice(c+l.length)}`;m+=4}Rx.lastIndex+=m}else l[0]==="("?t.push(c):l===")"&&(n=t.length?t.pop():null);i=l}return{pattern:e}}const Hi=String.raw,vre=Hi`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,OS=Hi`\(\?R=(?<rDepth>[^\)]+)\)|${vre}`,Ub=Hi`\(\?<(?![=!])(?<captureName>[^>]+)>`,SN=Hi`${Ub}|(?<unnamed>\()(?!\?)`,jl=new RegExp(Hi`${Ub}|${OS}|\(\?|\\?.`,"gsu"),Ax="Cannot use multiple overlapping recursions";function xre(e,t){const{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:"plugin",...t};let i=(t==null?void 0:t.captureTransfers)??new Map;if(!new RegExp(OS,"su").test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if(r==="plugin"&&ig(e,Hi`\(\?\(DEFINE\)`,Vi.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const o=[],a=ig(e,Hi`\\[1-9]`,Vi.DEFAULT),l=new Map,c=[];let f=!1,h=0,p=0,m;for(jl.lastIndex=0;m=jl.exec(e);){const{0:g,groups:{captureName:b,rDepth:v,gRNameOrNum:w,gRDepth:x}}=m;if(g==="[")h++;else if(h)g==="]"&&h--;else if(v){if(AM(v),f)throw new Error(Ax);if(a)throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const k=e.slice(0,m.index),C=e.slice(jl.lastIndex);if(ig(C,OS,Vi.DEFAULT))throw new Error(Ax);const R=+v-1;e=TM(k,C,R,!1,n,o,p),i=DM(i,k,R,o.length,0,p);break}else if(w){AM(x);let k=!1;for(const $ of c)if($.name===w||$.num===+w){if(k=!0,$.hasRecursedWithin)throw new Error(Ax);break}if(!k)throw new Error(Hi`Recursive \g cannot be used outside the referenced group "${r==="external"?w:Hi`\g<${w}&R=${x}>`}"`);const C=l.get(w),R=gre(e,C);if(a&&ig(R,Hi`${Ub}|\((?!\?)`,Vi.DEFAULT))throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const _=e.slice(C,m.index),D=R.slice(_.length+g.length),M=o.length,O=+x-1,U=TM(_,D,O,!0,n,o,p);i=DM(i,_,O,o.length-M,M,p);const L=e.slice(0,C),I=e.slice(C+R.length);e=`${L}${U}${I}`,jl.lastIndex+=U.length-g.length-_.length-D.length,c.forEach($=>$.hasRecursedWithin=!0),f=!0}else if(b)p++,l.set(String(p),jl.lastIndex),l.set(b,jl.lastIndex),c.push({num:p,name:b});else if(g[0]==="("){const k=g==="(";k&&(p++,l.set(String(p),jl.lastIndex)),c.push(k?{num:p}:{})}else g===")"&&c.pop()}return n.push(...o),{pattern:e,captureTransfers:i,hiddenCaptures:n}}function AM(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 TM(e,t,n,r,i,o,a){const l=new Set;r&&xN(e+t,Ub,({groups:{captureName:f}})=>{l.add(f)},Vi.DEFAULT);const c=[n,r?l:null,i,o,a];return`${e}${_M(`(?:${e}`,"forward",...c)}(?:)${_M(`${t})`,"backward",...c)}${t}`}function _M(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+=TC(e,Hi`${SN}|\\k<(?<backref>[^>]+)>`,({0:m,groups:{captureName:g,unnamed:b,backref:v}})=>{if(v&&r&&!r.has(v))return m;const w=`_$${p}`;if(b||g){const x=a+o.length+1;return o.push(x),wre(i,x),b?m:`(?<${g}${w}>`}return Hi`\k<${v}${w}>`},Vi.DEFAULT)}return f}function wre(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function DM(e,t,n,r,i,o){if(e.size&&r){let a=0;xN(t,SN,()=>a++,Vi.DEFAULT);const l=o-a+i,c=new Map;return e.forEach((f,h)=>{const p=(r-a*n)/n,m=a*n,g=h>l+a?h+r:h,b=[];for(const v of f)if(v<=l)b.push(v);else if(v>l+a+p)b.push(v+r);else if(v<=l+a)for(let w=0;w<=n;w++)b.push(v+a*w);else for(let w=0;w<=n;w++)b.push(v+m+p*w);c.set(g,b)}),c}return e}var zn=String.fromCodePoint,pt=String.raw,ao={},qb=globalThis.RegExp;ao.flagGroups=(()=>{try{new qb("(?i:)")}catch{return!1}return!0})();ao.unicodeSets=(()=>{try{new qb("[[]]","v")}catch{return!1}return!0})();ao.bugFlagVLiteralHyphenIsRange=ao.unicodeSets?(()=>{try{new qb(pt`[\d\-a]`,"v")}catch{return!0}return!1})():!1;ao.bugNestedClassIgnoresNegation=ao.unicodeSets&&new qb("[[^a]]","v").test("a");function jy(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 Fh(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function PS(e,t){return MM[e]>=MM[t]}function Sre(e,t){if(e==null)throw new Error(t??"Value expected");return e}var MM={ES2025:2025,ES2024:2024,ES2018:2018},Ere={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function EN(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!Ere[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=ao.flagGroups?"ES2025":ao.unicodeSets?"ES2024":"ES2018"),t}var Cre="[ -\r ]",kre=new Set([zn(304),zn(305)]),cs=pt`[\p{L}\p{M}\p{N}\p{Pc}]`;function CN(e){if(kre.has(e))return[e];const t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),i=Tre.get(n),o=Rre.get(n),a=Are.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 _C=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=>[Hb(e),e])),Rre=new Map([["s",zn(383)],[zn(383),"s"]]),Are=new Map([[zn(223),zn(7838)],[zn(107),zn(8490)],[zn(229),zn(8491)],[zn(969),zn(8486)]]),Tre=new Map([ba(453),ba(456),ba(459),ba(498),...Tx(8072,8079),...Tx(8088,8095),...Tx(8104,8111),ba(8124),ba(8140),ba(8188)]),_re=new Map([["alnum",pt`[\p{Alpha}\p{Nd}]`],["alpha",pt`\p{Alpha}`],["ascii",pt`\p{ASCII}`],["blank",pt`[\p{Zs}\t]`],["cntrl",pt`\p{Cc}`],["digit",pt`\p{Nd}`],["graph",pt`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",pt`\p{Lower}`],["print",pt`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",pt`[\p{P}\p{S}]`],["space",pt`\p{space}`],["upper",pt`\p{Upper}`],["word",pt`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",pt`\p{AHex}`]]);function Dre(e,t){const n=[];for(let r=e;r<=t;r++)n.push(r);return n}function ba(e){const t=zn(e);return[t.toLowerCase(),t]}function Tx(e,t){return Dre(e,t).map(n=>ba(n))}var kN=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function Mre(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:PS(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};fh(e,$re,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};fh(e,Ore,o);const a={groupsByName:o.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:o.reffedNodesByReferencer};return fh(e,Pre,a),e._originMap=o.groupOriginByCopy,e._strategy=r.strategy,e}var $re={AbsenceFunction({node:e,parent:t,replaceWith:n}){const{body:r,kind:i}=e;if(i==="repeater"){const o=oo();o.body[0].body.push(Ul({negate:!0,body:r}),$c("Any"));const a=oo();a.body[0].body.push(yN("greedy",0,1/0,o)),n(_n(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];Fh(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=oo({flags:r});i.body[0].body=e.body,e.body=[_n(i,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:i,remove:o,replaceWith:a},l){const{kind:c,negate:f}=e,{asciiWordBoundaries:h,avoidSubclass:p,supportedGNodes:m,wordIsAscii:g}=l;if(c==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${f?"Y":"y"}"`);if(c==="line_end")a(_n(Ul({body:[vu({body:[DS("string_end")]}),vu({body:[Bb(10)]})]}),t));else if(c==="line_start")a(_n(fs(pt`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(c==="search_start")if(m.has(e))i.flags.sticky=!0,o();else{const b=r[n-1];if(b&&zre(b))a(_n(Ul({negate:!0}),t));else{if(p)throw new Error(pt`Uses "\G" in a way that requires a subclass`);a(va(DS("string_start"),t)),l.strategy="clip_search"}}else if(!(c==="string_end"||c==="string_start"))if(c==="string_end_newline")a(_n(fs(pt`(?=\n?\z)`),t));else if(c==="word_boundary"){if(!g&&!h){const b=`(?:(?<=${cs})(?!${cs})|(?<!${cs})(?=${cs}))`,v=`(?:(?<=${cs})(?=${cs})|(?<!${cs})(?!${cs}))`;a(_n(fs(f?v:b),t))}}else throw new Error(`Unexpected assertion kind "${c}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!Dx(n)&&(n=_x(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!Dx(r)&&(r=_x(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=Kg({body:[e]});n(_n(r,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:i,digitIsAscii:o,spaceIsAscii:a,wordIsAscii:l}){const{kind:c,negate:f,value:h}=e;if(o&&(c==="digit"||h==="digit")){n(va($S("digit",{negate:f}),t));return}if(a&&(c==="space"||h==="space")){n(_n(Mx(fs(Cre),f),t));return}if(l&&(c==="word"||h==="word")){n(va($S("word",{negate:f}),t));return}if(c==="any")n(va($c("Any"),t));else if(c==="digit")n(va($c("Nd",{negate:f}),t));else if(c!=="dot")if(c==="text_segment"){if(r==="strict")throw new Error(pt`Use of "\X" requires non-strict accuracy`);const p="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",m=pt`\p{RI}{2}|${p}(?:\u200D${p})*`;n(_n(fs(pt`(?>\r\n|${i?pt`\p{RGI_Emoji}`:m}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(c==="hex")n(va($c("AHex",{negate:f}),t));else if(c==="newline")n(_n(fs(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-${zn(p.codePointAt(0)-1)}${zn(p.codePointAt(2)+1)}-`),n(_n(fs(`[${p}]`),t))}else n(_n(Mx(fs(_re.get(h)),f),t));else if(c==="property")_C.has(Hb(h))||(e.key="sc");else if(c==="space")n(va($c("space",{negate:f}),t));else if(c==="word")n(_n(Mx(fs(cs),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:l,flags:c}=e;if(l==="flags")if(!c.enable&&!c.disable)r();else{const f=oo({flags:c});f.body[0].body=a(),i(_n(f,t),{traverse:!0})}else if(l==="keep"){const f=n.body[0],p=n.body.length===1&&pN(f,{type:"Group"})&&f.body[0].body.length===1?f.body[0]:n;if(t.parent!==p||p.body.length>1)throw new Error(pt`Uses "\K" in a way that's unsupported`);const m=Ul({behind:!0});m.body[0].body=o(),i(_n(m,t))}else throw new Error(`Unexpected directive kind "${l}"`)},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(_n(Ul({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=oo();t.body[0].body.push(e.body),e.body=_n(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=DN(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(pt`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!Dx(n)&&(n=_x(n,t),e.ref=n)}},Ore={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:l,reffedNodesByReferencer:c}){const f=i.get(e);if(f&&l.has(e.number)){const p=va($M(e.number),t);c.set(p,l.get(e.number)),n(p);return}l.set(e.number,e),a.set(e.number,[]),e.name&&Fh(a,e.name,[]);const h=a.get(e.name??e.number);for(let p=0;p<h.length;p++){const m=h[p];if(f===m.node||f&&f===m.origin||e===m.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=Fh(o,e.name,new Map);let m=!1;if(f)m=!0;else for(const g of p.values())if(!g.hasDuplicateNameToRemove){m=!0;break}o.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:m})}},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=jy(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),l=o===0,c=l?$M(0):AN(a,r.groupOriginByCopy,null);let f=c;if(!l){const h=TN(Nre(a,m=>m.type==="Group"&&!!m.flags)),p=h?jy(r.globalFlags,h):r.globalFlags;Ire(p,r.currentFlags)||(f=oo({flags:jre(p)}),f.body[0].body.push(c))}n(_n(f,t),{traverse:!l})}},Pre={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=>Lre(a,e));if(!o.length)n(_n(Ul({negate:!0}),t));else if(o.length>1){const a=oo({atomic:!0,body:o.reverse().map(l=>vu({body:[MS(l.number)]}))});n(_n(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=gN();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){fh(e,{"*"({node:t,parent:n}){t.parent=n}})}function Ire(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function Lre(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||MN(i,e))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function AN(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]=AN(a,t,i,n):(o==="type"&&a==="CapturingGroup"&&t.set(i,t.get(e)??e),i[o]=a);return i}function $M(e){const t=bN(e);return t.isRecursive=!0,t}function Nre(e,t){const n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function _x(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 jre({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 DN(e){const t=e.find(n=>n.kind==="search_start"||Bre(n,{negate:!1})||!Fre(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=DN(r.body);if(!i)return null;Array.isArray(i)?n.push(...i):n.push(i)}return n}return null}function MN(e,t){const n=_N(e)??[];for(const r of n)if(r===t||MN(r,t))return!0;return!1}function Fre({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function zre(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function Bre(e,t){const n={negate:null,...t};return e.type==="LookaroundAssertion"&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&pN(e.body[0],{type:"Assertion",kind:"search_start"})}function Dx(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function fs(e,t){const r=mN(e,{...t,unicodePropertyMap:_C}).body;return r.length>1||r[0].body.length>1?oo({body:r}):r[0].body[0]}function Mx(e,t){return e.negate=t,e}function va(e,t){return e.parent=t,e}function _n(e,t){return RN(e),e.parent=t,e}function Hre(e,t){const n=EN(t),r=PS(n.target,"ES2024"),i=PS(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,l=null;if(!i){const g=[e.flags.ignoreCase];fh(e,Ure,{getCurrentModI:()=>g.at(-1),popModI(){g.pop()},pushModI(b){g.push(b)},setHasCasedChar(){g.at(-1)?a=!0:l=!0}})}const c={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||a)&&!l)};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&&l),useFlagMods:i,useFlagV:r,verbose:n.verbose};function p(g){return h.lastNode=f,f=g,Sre(qre[g.type],`Unexpected node type "${g.type}"`)(g,h,p)}const m={pattern:e.body.map(p).join("|"),flags:p(e.flags),options:{...e.options}};return r||(delete m.options.force.v,m.options.disable.v=!0,m.options.unicodeSetsPlugin=null),m._captureTransfers=new Map,m._hiddenCaptures=[],h.captureMap.forEach((g,b)=>{g.hidden&&m._hiddenCaptures.push(b),g.transferTo&&Fh(m._captureTransfers,g.transferTo,[]).push(b)}),m}var Ure={"*":{enter({node:e},t){if(PM(e)){const n=t.getCurrentModI();t.pushModI(e.flags?jy({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){PM(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){DC(zn(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),$N(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&kN.has(e.value)&&t.setHasCasedChar()}},qre={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?pt`\B`:pt`\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},l=t.originMap.get(e);return l&&(a.hidden=!0,o>l.number&&(a.transferTo=l.number)),t.captureMap.set(o,a),`(${i?`?<${i}>`:""}${r.map(n).join("|")})`},Character({value:e},t){const n=zn(e),r=Cc(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&DC(n)){const i=CN(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");ao.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&a.some(IM)&&(a=[Bb(45),...a.filter(f=>!IM(f))]);const l=()=>`[${i?"^":""}${a.map(n).join(r==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||ao.bugNestedClassIgnoresNegation)&&!i){const h=a.filter(p=>p.type==="CharacterClass"&&p.kind==="union"&&p.negate);if(h.length){const p=oo(),m=p.body[0];return p.parent=o,m.parent=p,a=a.filter(g=>!h.includes(g)),e.body=a,a.length?(e.parent=m,m.body.push(e)):p.body.pop(),h.forEach(g=>{const b=vu({body:[g]});g.parent=b,b.parent=p,p.body.push(b)}),n(p)}}t.inCharClass=!0;const f=l();return t.inCharClass=!1,f}const c=a[0];if(r==="union"&&!i&&c&&((!t.useFlagV||!t.verbose)&&o.kind==="union"&&!(ao.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 l()},CharacterClassRange(e,t){const n=e.min.value,r=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},o=Cc(n,i),a=Cc(r,i),l=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const c=$N(e);Kre(c).forEach(h=>{l.add(Array.isArray(h)?`${Cc(h[0],i)}-${Cc(h[1],i)}`:Cc(h,i))})}return`${o}-${a}${[...l].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:r},i){if(e==="dot")return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?".":"[^]":pt`[^\n]`;if(e==="digit")return t?pt`\D`:pt`\d`;if(e==="property"){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&kN.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?pt`\P`:pt`\p`}{${r?`${r}=`:""}${n}}`}if(e==="word")return t?pt`\W`:pt`\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=jy(a,n));const l=t.map(o).join("|"),c=!i.verbose&&t.length===1&&r.type!=="Quantifier"&&!e&&(!i.useFlagMods||!n)?l:`(?${Xre(e,n,i.useFlagMods)}${l})`;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)+Qre(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})`:pt`\g<${t}&R=${r}>`}},Vre=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),Gre=new Set(["-","\\","]","^","["]),Yre=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),OM=new Map([[9,pt`\t`],[10,pt`\n`],[11,pt`\v`],[12,pt`\f`],[13,pt`\r`],[8232,pt`\u2028`],[8233,pt`\u2029`],[65279,pt`\uFEFF`]]),Wre=new RegExp("^\\p{Cased}$","u");function DC(e){return Wre.test(e)}function $N(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 l=zn(a);if(!DC(l))continue;const c=CN(l).filter(f=>{const h=f.codePointAt(0);return h<r||h>i});if(c.length&&(o.push(...c),n))break}return o}function Cc(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(OM.has(e))return OM.get(e);if(e<32||e>126&&e<160||e>262143||t&&Zre(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const i=n?r?Yre:Gre:Vre,o=zn(e);return(i.has(o)?"\\":"")+o}function Kre(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 Xre(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 Qre({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 PM({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function Zre(e){return e>47&&e<58}function IM({type:e,value:t}){return e==="Character"&&t===45}var Oa,xs,su,Pa,au,tp,IS,el,Jre=(el=class extends RegExp{constructor(n,r,i){var t=(...KSe)=>(super(...KSe),Ve(this,tp),Ve(this,Oa,new Map),Ve(this,xs,null),Ve(this,su),Ve(this,Pa,null),Ve(this,au,null),ce(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),je(this,su,a.source),a instanceof el&&(je(this,Oa,ne(a,Oa)),je(this,Pa,ne(a,Pa)),je(this,au,ne(a,au)),this.rawOptions=a.rawOptions)}else{const a={hiddenCaptures:[],strategy:null,transfers:[],...i};t(o?"":n,r),je(this,su,n),je(this,Oa,tie(a.hiddenCaptures,a.transfers)),je(this,au,a.strategy),this.rawOptions=i??{}}o||je(this,xs,this)}get source(){return ne(this,su)||"(?:)"}exec(n){if(!ne(this,xs)){const{lazyCompile:o,...a}=this.rawOptions;je(this,xs,new el(ne(this,su),this.flags,a))}const r=this.global||this.sticky,i=this.lastIndex;if(ne(this,au)==="clip_search"&&r&&i){this.lastIndex=0;const o=ht(this,tp,IS).call(this,n.slice(i));return o&&(eie(o,i,n,this.hasIndices),this.lastIndex+=i),o}return ht(this,tp,IS).call(this,n)}},Oa=new WeakMap,xs=new WeakMap,su=new WeakMap,Pa=new WeakMap,au=new WeakMap,tp=new WeakSet,IS=function(n){ne(this,xs).lastIndex=this.lastIndex;const r=QT(el.prototype,this,"exec").call(ne(this,xs),n);if(this.lastIndex=ne(this,xs).lastIndex,!r||!ne(this,Oa).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 l=1;l<i.length;l++){const{hidden:c,transferTo:f}=ne(this,Oa).get(l)??{};if(c?a.push(null):(a.push(r.length),r.push(i[l]),this.hasIndices&&r.indices.push(o[l])),f&&i[l]!==void 0){const h=a[f];if(!h)throw new Error(`Invalid capture transfer to "${h}"`);if(r[h]=i[l],this.hasIndices&&(r.indices[h]=o[l]),r.groups){ne(this,Pa)||je(this,Pa,nie(this.source));const p=ne(this,Pa).get(f);p&&(r.groups[p]=i[l],this.hasIndices&&(r.indices.groups[p]=o[l]))}}}return r},el);function eie(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 l=i[a];l&&(i[a]=[l[0]+t,l[1]+t])}const o=i.groups;o&&Object.keys(o).forEach(a=>{const l=o[a];l&&(o[a]=[l[0]+t,l[1]+t])})}}function tie(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)Fh(n,o,{}).transferTo=r;return n}function nie(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:l,name:c}}=o;a==="["?r++:r?a==="]"&&r--:l&&(i++,c&&n.set(i,c))}return n}function rie(e,t){const n=iie(e,t);return n.options?new Jre(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function iie(e,t){const n=EN(t),r=mN(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:_C}),i=Mre(r,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),o=Hre(i,n),a=xre(o.pattern,{captureTransfers:o._captureTransfers,hiddenCaptures:o._hiddenCaptures,mode:"external"}),l=bre(a.pattern),c=yre(l.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),m=i._strategy,g=f.pattern.length>=n.lazyCompileLength;(h.length||p.length||m||g)&&(f.options={...h.length&&{hiddenCaptures:h},...p.length&&{transfers:p},...m&&{strategy:m},...g&&{lazyCompile:g}})}return f}const LM=4294967295;class oie{constructor(t,n={}){ce(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 l=i==null?void 0:i.get(a);if(l){if(l instanceof RegExp)return l;if(r)return null;throw l}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(l,c,f=0){return{index:l,captureIndices:c.indices.map(h=>h==null?{start:LM,end:LM,length:0}:{start:h[0]+f,end:h[1]+f,length:h[1]-h[0]})}}for(let l=0;l<this.regexps.length;l++){const c=this.regexps[l];if(c)try{c.lastIndex=n;const f=c.exec(i);if(!f)continue;if(f.index===n)return a(l,f,0);o.push([l,f,0])}catch(f){if(this.options.forgiving)continue;throw f}}if(o.length){const l=Math.min(...o.map(c=>c[1].index));for(const[c,f,h]of o)if(f.index===l)return a(c,f,h)}return null}}function sie(e,t){return rie(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function aie(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||(t.regexConstructor=n=>sie(n,{target:t.target})),{createScanner(n){return new oie(n,t)},createString(n){return{content:n}}}}const lie=[[/^(<!--)(.+)(-->)$/,!1],[/^(\/\*)(.+)(\*\/)$/,!1],[/^(\/\/|["'#]|;{1,2}|%{1,2}|--)(.*)$/,!0],[/^(\*)(.+)$/,!0]];function uie(e,t,n){const r=[];for(const i of e){if(n==="v3"){const l=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(!$x(h.value,p))return c;const g=h.value.split(/(\s+\/\/)/);if(g.length<=1)return c;let b=[g[0]];for(let v=1;v<g.length;v+=2)b.push(g[v]+(g[v+1]||""));return b=b.filter(Boolean),b.length<=1?c:b.map(v=>({...c,children:[{type:"text",value:v}]}))});l.length!==i.children.length&&(i.children=l)}const o=i.children;let a=o.length-1;n==="v1"?a=0:t&&(a=o.length-2);for(let l=Math.max(a,0);l<o.length;l++){const c=o[l];if(c.type!=="element")continue;const f=c.children.at(0);if((f==null?void 0:f.type)!=="text")continue;const h=l===o.length-1;let p=$x(f.value,h),m;if(!p&&l>0&&f.value.trim().startsWith("[!code")){const g=o[l-1];if((g==null?void 0:g.type)==="element"){const b=g.children.at(0);if((b==null?void 0:b.type)==="text"&&b.value.includes("//")){const v=b.value+f.value,w=$x(v,h);if(w){p=w,r.push({info:w,line:i,token:g,isLineCommentOnly:o.length===2&&g.children.length===1&&c.children.length===1,isJsxStyle:!1,additionalTokens:[c]});continue}}}}if(p)if(t&&!h&&l!==0){const g=NM(o[l-1],"{")&&NM(o[l+1],"}");r.push({info:p,line:i,token:c,isLineCommentOnly:o.length===3&&c.children.length===1,isJsxStyle:g,additionalTokens:m})}else r.push({info:p,line:i,token:c,isLineCommentOnly:o.length===1&&c.children.length===1,isJsxStyle:!1,additionalTokens:m})}}return r}function NM(e,t){if(e.type!=="element")return!1;const n=e.children[0];return n.type!=="text"?!1:n.value.trim()===t}function $x(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 lie){if(a&&!t)continue;const l=o.exec(n);if(l)return[" ".repeat(r)+l[1],l[2],l[3]?l[3]+" ".repeat(i):void 0]}}function cie(e){const t=e.match(/(?:\/\/|["'#]|;{1,2}|%{1,2}|--)(\s*)$/);return t&&t[1].trim().length===0?e.slice(0,t.index):e}function fie(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 l=i.data;l._shiki_notation??(l._shiki_notation=uie(o,["jsx","tsx"].includes(this.options.lang),r));const c=l._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,(...g)=>n.call(this,g,f.line,f.token,o,h)?(p=!0,""):g[0]),!p)continue;r==="v1"&&(f.info[1]=cie(f.info[1]));const m=f.info[1].trim().length===0;if(m&&(f.info[1]=""),m&&f.isLineCommentOnly)a.push(f.line);else if(m&&f.isJsxStyle)f.line.children.splice(f.line.children.indexOf(f.token)-1,3);else if(m){if(f.additionalTokens)for(let g=f.additionalTokens.length-1;g>=0;g--){const b=f.additionalTokens[g],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 g=f.token.children[0];if(g.type==="text"&&(g.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 m=1;(p==null?void 0:p.type)==="text"&&(p==null?void 0:p.value)===`
|
|
484
|
-
`&&(m=2),i.children.splice(h,m)}}}}function die(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 og=Symbol("highlighted-lines");function hie(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[og]??(o[og]=die(this.options.meta.__raw));const a=o[og]??[],l=n?i-1:i;return a.includes(l)&&this.addClassToHast(r,t),r}}}function pie(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ON(e={},t="@shikijs/transformers:notation-map"){const{classMap:n={},classActivePre:r=void 0,classActiveCode:i=void 0}=e;return fie(t,new RegExp(`#?\\s*\\[!code (${Object.keys(n).map(pie).join("|")})(:\\d+)?\\]`,"gi"),function([o,a,l=":1"],c,f,h,p){const m=Number.parseInt(l.slice(1),10);for(let g=p;g<Math.min(p+m,h.length);g++)this.addClassToHast(h[g],n[a]);return r&&this.addClassToHast(this.pre,r),i&&this.addClassToHast(this.code,i),!0},e.matchAlgorithm)}function mie(e={}){const{classLineAdd:t="diff add",classLineRemove:n="diff remove",classActivePre:r="has-diff",classActiveCode:i}=e;return ON({classMap:{"++":t,"--":n},classActivePre:r,classActiveCode:i,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-diff")}function gie(e={}){const{classActiveLine:t="highlighted",classActivePre:n="has-highlighted",classActiveCode:r}=e;return ON({classMap:{highlight:t,hl:t},classActivePre:n,classActiveCode:r,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-highlight")}const yie="vitesse-black",bie="vitesse-light",vie={javascript:()=>Ii(()=>import("./javascript-wDzz0qaB.js"),[]),typescript:()=>Ii(()=>import("./typescript-BPQ3VLAy.js"),[]),jsx:()=>Ii(()=>import("./jsx-g9-lgVsj.js"),[]),tsx:()=>Ii(()=>import("./tsx-COt5Ahok.js"),[]),json:()=>Ii(()=>import("./json-Cp-IABpG.js"),[]),css:()=>Ii(()=>import("./css-DPfMkruS.js"),[]),html:()=>Ii(()=>import("./html-GMplVEZG.js"),__vite__mapDeps([0,1,2])),bash:()=>Ii(()=>import("./bash-Yzrsuije.js"),[]),markdown:()=>Ii(()=>import("./markdown-Cvjx9yec.js"),[]),python:()=>Ii(()=>import("./python-B6aJPvgy.js"),[])},xie=()=>Ii(()=>import("./vitesse-black-Bkuqu6BP.js"),[]),wie=()=>Ii(()=>import("./vitesse-light-CVO1_9PV.js"),[]);let Ox=null,Px=null;const jM=new Set;async function MC(){return Ox||Px||(Px=wne({themes:[xie,wie],langs:[],engine:aie()}),Ox=await Px,Ox)}async function PN(e){if(jM.has(e))return;const t=vie[e];if(!t)throw new Error(`Unknown language: ${e}`);const n=await MC(),r=await t();await n.loadLanguage(r),jM.add(e)}async function Sie(e,t="typescript",n={}){await PN(t);const r=await MC(),{highlightLines:i}=n,o=i!=null&&i.length?{__raw:`{${i.join(",")}}`}:void 0;return r.codeToHtml(e,{lang:t,themes:{light:bie,dark:yie},defaultColor:!1,...o&&{meta:o},transformers:[mie(),gie(),hie()]})}function IN(e,t="typescript",n={}){var p;const[r,i]=S.useState(""),[o,a]=S.useState(!0),[l,c]=S.useState(null),f=S.useRef(0),h=((p=n.highlightLines)==null?void 0:p.join(","))??"";return S.useEffect(()=>{const m=++f.current;Sie(e,t,{highlightLines:n.highlightLines}).then(g=>{f.current===m&&(i(g),a(!1),c(null))}).catch(g=>{f.current===m&&(c(g),a(!1))})},[e,t,h]),{html:r,loading:o,error:l}}const _o={"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"},LN=({code:e=wL,onCopy:t,className:n,...r})=>{const[i,o]=S.useState(!1),a=S.useCallback(async()=>{try{await navigator.clipboard.writeText(e),o(!0),t==null||t(e),setTimeout(()=>o(!1),2e3)}catch(l){console.error("Failed to copy code:",l)}},[e,t]);return T.jsx(js,{type:"button","data-slot":"code-block-copy-button","data-copied":i,"aria-label":i?"Copied":"Copy code",tooltip:i?"Copied":"Copy",className:ze(_o["code-block-icon-button"],n),onClick:a,size:"xsmall",variant:"inverted",...r,children:i?T.jsx(JE,{}):T.jsx(eC,{})})};LN.displayName="CodeBlockCopyButton";const NN=({pressed:e,defaultPressed:t,onPressedChange:n,className:r,...i})=>T.jsx(Lb,{"data-slot":"code-block-wrap-button","aria-label":"Toggle line wrap",tooltip:"Toggle line wrap",className:ze(_o["code-block-icon-button"],r),size:"xsmall",variant:"inverted",pressed:e,defaultPressed:t,onPressedChange:n,icon:{pressed:T.jsx(aD,{}),unpressed:T.jsx(aD,{})},...i});NN.displayName="CodeBlockWrapButton";const Eie='<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>',Cie='<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>',FM='<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>',kie=`<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
|
-
`,Rie='<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>',Aie='<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>',Tie=`<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
|
-
`,_ie=`<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
|
-
`,Die=`<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 yo(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 Mie={typescript:yo(Eie),tsx:yo(FM),javascript:yo(Cie),jsx:yo(FM),python:yo(kie),html:yo(Rie),css:yo(Aie),json:yo(Tie),bash:yo(_ie),markdown:yo(Die)},jN=({language:e,size:t=16,...n})=>{const r=Mie[e];return r?T.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};jN.displayName="LanguageIcon";const FN=({filename:e,language:t,copyable:n=MJ,code:r=wL,wrappable:i=!1,wrap:o,defaultWrap:a,onWrapChange:l,className:c,LanguageIconProps:f,WrapButtonProps:h,CopyButtonProps:p,children:m,...g})=>T.jsxs(ot,{"data-slot":"code-block-header",className:ze(_o["code-block-header"],c),ay:"center",ax:"space-between",gap:3,py:2,px:4,fullwidth:!0,...g,children:[T.jsxs(ot,{ay:"center",gap:2,children:[t&&T.jsx(jN,{language:t,className:_o["code-block-language-icon"],...f}),e&&T.jsx(Fe,{size:-1,family:"mono",shade:"muted",children:e})]}),m,(i||n)&&T.jsxs(ot,{ay:"center",gap:1,children:[i&&T.jsx(NN,{pressed:o,defaultPressed:a,onPressedChange:l,...h}),n&&T.jsx(LN,{code:r,disabled:!r,...p})]})]});FN.displayName="CodeBlockHeader";const zN=({html:e,code:t,showLineNumbers:n=xL,wrap:r=SL,className:i,...o})=>{const a=ze(_o["code-block-content"],r&&_o["code-block-content-wrap"],$J({showLineNumbers:n}),i),l={"data-slot":"code-block-content","data-line-numbers":n||void 0,"data-wrap":r||void 0,ax:"stretch",fullwidth:!0};if(e)return T.jsx(Qe,{...l,className:a,dangerouslySetInnerHTML:{__html:e},...o});const c=(t??"").split(`
|
|
489
|
-
`);return T.jsx(Qe,{...l,className:a,...o,children:T.jsx("pre",{children:T.jsx("code",{children:c.map((f,h)=>T.jsx("span",{className:"line",children:f||" "},h))})})})};zN.displayName="CodeBlockContent";const $C=({code:e,language:t,filename:n,showLineNumbers:r,highlightLines:i,rows:o,defaultExpanded:a=!1,defaultWrap:l=SL,onWrapChange:c,onCopy:f,html:h,className:p,HeaderProps:m,LanguageIconProps:g,WrapButtonProps:b,CopyButtonProps:v,...w})=>{const x=t??DJ,[k,C]=S.useState(l),R=S.useCallback(j=>{C(j),c==null||c(j)},[c]),{html:_,error:D}=IN(e,x,{highlightLines:i}),M=h||_||void 0,[O,U]=S.useState(a),[L,I]=S.useState(!1),$=S.useRef(null),B=o?`calc(${o} * var(--code-font-size) * var(--code-line-height) + 2 * var(--code-padding))`:void 0,V=o!=null&&!O,F=B?{maxHeight:V?B:void 0,overflowY:"auto"}:void 0;S.useEffect(()=>{if(!o||!$.current||!M)return;const j=$.current;I(j.scrollHeight>j.clientHeight+1)},[M,o,k,O]);const z=o!=null&&(L||O);return T.jsxs("div",{"data-slot":"code-block","data-expanded":o!=null&&O||void 0,"data-wrap":k||void 0,className:ze(_o["code-block"],p),...w,children:[T.jsx(FN,{filename:n,language:t,copyable:!0,code:e,wrappable:!0,wrap:k,onWrapChange:R,LanguageIconProps:g,WrapButtonProps:b,CopyButtonProps:{onCopy:f,...v},...m}),T.jsx("div",{ref:$,"data-slot":"code-block-scroll",className:_o["code-block-scroll"],style:F,children:T.jsx(zN,{html:M,code:e,showLineNumbers:r,wrap:k})}),D&&!h&&T.jsxs("div",{"data-slot":"code-block-error",className:_o["code-block-error"],children:["[Error: ",D.message,"]"]}),z&&T.jsx("button",{type:"button","data-slot":"code-block-expand-toggle",className:_o["code-block-expand-toggle"],onClick:()=>U(j=>!j),"aria-expanded":O,children:O?"Show less":"Show more"})]})};$C.displayName="CodeBlock";const Ix={"code-inline":"_code-inline_h7rdt_1"},BN=({language:e,html:t,className:n,children:r,...i})=>{const o=typeof r=="string"?r:"",{html:a}=IN(o,e||"typescript");if(!e)return T.jsx("code",{"data-slot":"code-inline",className:ze(Ix["code-inline"],n),...i,children:r});const l=t||a;if(l){const c=l.replace(/<pre[^>]*><code[^>]*>/,"").replace(/<\/code><\/pre>/,"");return T.jsx("code",{"data-slot":"code-inline",className:ze(Ix["code-inline"],n),dangerouslySetInnerHTML:{__html:c},...i})}return T.jsx("code",{"data-slot":"code-inline",className:ze(Ix["code-inline"],n),...i,children:r})};BN.displayName="CodeInline";const zM={};function yi(e,t){const n=S.useRef(zM);return n.current===zM&&(n.current=e(t)),n}const Lx=rl[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],$ie=Lx&&Lx!==S.useLayoutEffect?Lx:e=>e();function Ze(e){const t=yi(Oie).current;return t.next=e,$ie(t.effect),t.trampoline}function Oie(){const e={next:void 0,callback:Pie,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function Pie(){}function Fy({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=S.useRef(e!==void 0),[o,a]=S.useState(t),l=i?e:o,c=S.useCallback(f=>{i||a(f)},[]);return[l,c]}const Iie=()=>{},We=typeof document<"u"?S.useLayoutEffect:Iie;function Lie(e){const t=S.useRef(!0);t.current&&(t.current=!1,e())}function xu(e,t,n,r){const i=yi(HN).current;return jie(i,e,t,n,r)&&UN(i,[e,t,n,r]),i.callback}function Nie(e){const t=yi(HN).current;return Fie(t,e)&&UN(t,e),t.callback}function HN(){return{callback:null,cleanup:null,refs:[]}}function jie(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function Fie(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function UN(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 qN={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},Vb={...qN,position:"fixed",top:0,left:0},VN={...qN,position:"absolute"};function zr(e){const t=yi(zie,e).current;return t.next=e,We(t.effect),t}function zie(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function hr(){}const BM=Object.freeze([]),Sr=Object.freeze({});function mn(e,t,n,r){let i=!1,o=!1;const a=Sr;return{reason:e,event:t??new Event("base-ui"),cancel(){i=!0},allowPropagation(){o=!0},get isCanceled(){return i},get isPropagationAllowed(){return o},trigger:n,...a}}function Fo(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 Bie=(e,t)=>Object.is(e,t);function wf(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function Hie(e,t,n){return!e||e.length===0?!1:e.some(r=>r===void 0?!1:wf(t,r,n))}function dh(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:wf(r,t,n))}function Uie(e,t,n){return e.filter(r=>!wf(t,r,n))}function LS(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function GN(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function qie(e){if(!Array.isArray(e))return e!=null&&!("null"in e);if(GN(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 Vie(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 LS(e)}function Oc(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?LS(e.value):LS(e)}function YN(e,t,n){function r(){return Vie(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=GN(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 Gie(e,t,n){return e.reduce((r,i,o)=>(o>0&&r.push(", "),r.push(T.jsx(S.Fragment,{children:YN(i,t,n)},o)),r),[])}var zy=Symbol("NOT_FOUND");function Yie(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Wie(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Kie(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 HM=e=>Array.isArray(e)?e:[e];function Xie(e){const t=Array.isArray(e[0])?e[0]:e;return Kie(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Qie(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}function Zie(e){let t;return{get(n){return t&&e(t.key,n)?t.value:zy},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function Jie(e,t){let n=[];function r(l){const c=n.findIndex(f=>t(l,f.key));if(c>-1){const f=n[c];return c>0&&(n.splice(c,1),n.unshift(f)),f.value}return zy}function i(l,c){r(l)===zy&&(n.unshift({key:l,value:c}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var eoe=(e,t)=>e===t;function toe(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 noe(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=eoe,maxSize:i=1,resultEqualityCheck:o}=n,a=toe(r);let l=0;const c=i<=1?Zie(a):Jie(i,a);function f(){let h=c.get(arguments);if(h===zy){if(h=e.apply(null,arguments),l++,o){const p=c.getEntries().find(m=>o(m.value,h));p&&(h=p.value,l!==0&&l--)}c.put(arguments,h)}return h}return f.clearCache=()=>{c.clear(),f.resetResultsCount()},f.resultsCount=()=>l,f.resetResultsCount=()=>{l=0},f}var roe=class{constructor(t){this.value=t}deref(){return this.value}},ioe=typeof WeakRef<"u"?WeakRef:roe,ooe=0,UM=1;function sg(){return{s:ooe,v:void 0,o:null,p:null}}function WN(e,t={}){let n=sg();const{resultEqualityCheck:r}=t;let i,o=0;function a(){var p;let l=n;const{length:c}=arguments;for(let m=0,g=c;m<g;m++){const b=arguments[m];if(typeof b=="function"||typeof b=="object"&&b!==null){let v=l.o;v===null&&(l.o=v=new WeakMap);const w=v.get(b);w===void 0?(l=sg(),v.set(b,l)):l=w}else{let v=l.p;v===null&&(l.p=v=new Map);const w=v.get(b);w===void 0?(l=sg(),v.set(b,l)):l=w}}const f=l;let h;if(l.s===UM)h=l.v;else if(h=e.apply(null,arguments),o++,r){const m=((p=i==null?void 0:i.deref)==null?void 0:p.call(i))??i;m!=null&&r(m,h)&&(h=m,o!==0&&o--),i=typeof h=="object"&&h!==null||typeof h=="function"?new ioe(h):h}return f.s=UM,f.v=h,h}return a.clearCache=()=>{n=sg(),a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function KN(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,a=0,l,c={},f=i.pop();typeof f=="object"&&(c=f,f=i.pop()),Yie(f,`createSelector expects an output function after the inputs, but received: [${typeof f}]`);const h={...n,...c},{memoize:p,memoizeOptions:m=[],argsMemoize:g=WN,argsMemoizeOptions:b=[]}=h,v=HM(m),w=HM(b),x=Xie(i),k=p(function(){return o++,f.apply(null,arguments)},...v),C=g(function(){a++;const R=Qie(x,arguments);return l=k.apply(null,R),l},...w);return Object.assign(C,{resultFunc:f,memoizedResultFunc:k,dependencies:x,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>l,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:p,argsMemoize:g})};return Object.assign(r,{withTypes:()=>r}),r}var soe=KN(WN),aoe=Object.assign((e,t=soe)=>{Wie(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,l)=>(o[n[l]]=a,o),{}))},{withTypes:()=>aoe});KN({memoize:noe,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const Ft=(e,t,n,r,i,o,...a)=>{if(a.length>0)throw new Error(Fo(1));let l;if(e)l=e;else throw new Error("Missing arguments");return l},loe=[];function XN(e){S.useEffect(e,loe)}const ag=null;let uoe=class{constructor(){ce(this,"callbacks",[]);ce(this,"callbacksCount",0);ce(this,"nextId",1);ce(this,"startId",1);ce(this,"isScheduled",!1);ce(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 lg=new uoe;let Sa=class QN{constructor(){ce(this,"currentId",ag);ce(this,"cancel",()=>{this.currentId!==ag&&(lg.cancel(this.currentId),this.currentId=ag)});ce(this,"disposeEffect",()=>this.cancel)}static create(){return new QN}static request(t){return lg.request(t)}static cancel(t){return lg.cancel(t)}request(t){this.cancel(),this.currentId=lg.request(()=>{this.currentId=ag,t()})}};function Gb(){const e=yi(Sa.create).current;return XN(e.disposeEffect),e}function ps(e){return e==null?e:"current"in e?e.current:e}let zh=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const coe={[zh.startingStyle]:""},foe={[zh.endingStyle]:""},OC={transitionStatus(e){return e==="starting"?coe:e==="ending"?foe:null}};function doe(e,t=!1,n=!0){const r=Gb();return Ze((i,o=null)=>{r.cancel();function a(){Rn.flushSync(i)}const l=ps(e);if(l==null)return;const c=l;if(typeof c.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)i();else{let f=function(){const p=zh.startingStyle;if(!c.hasAttribute(p)){r.request(h);return}const m=new MutationObserver(()=>{c.hasAttribute(p)||(m.disconnect(),h())});m.observe(c,{attributes:!0,attributeFilter:[p]}),o==null||o.addEventListener("abort",()=>m.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(m=>m.pending||m.playState!=="finished")&&h()})};if(t){f();return}r.request(h)}})}function hp(e){const{enabled:t=!0,open:n,ref:r,onComplete:i}=e,o=Ze(i),a=doe(r,n,!1);S.useEffect(()=>{if(!t)return;const l=new AbortController;return a(o,l.signal),()=>{l.abort()}},[t,n,o,a])}let qM=(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 Yb={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},ll={valid(e){return e===null?null:e?{[qM.valid]:""}:{[qM.invalid]:""}}},ZN=S.createContext({invalid:void 0,name:void 0,validityData:{state:Yb,errors:[],error:"",value:"",initialValue:null},setValidityData:hr,disabled:void 0,touched:!1,setTouched:hr,dirty:!1,setDirty:hr,filled:!1,setFilled:hr,focused:!1,setFocused:hr,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=Sr)=>e,getInputValidationProps:(e=Sr)=>e,inputRef:{current:null},commit:async()=>{}}});function ul(e=!0){const t=S.useContext(ZN);if(t.setValidityData===hr&&!e)throw new Error(Fo(28));return t}function NS(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const hoe=S.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:hr,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function Hf(){return S.useContext(hoe)}function PC(e){const{enabled:t=!0,value:n,id:r,name:i,controlRef:o,commit:a}=e,{formRef:l}=Hf(),{invalid:c,markedDirtyRef:f,validityData:h,setValidityData:p}=ul(),m=Ze(e.getValue);We(()=>{if(!t)return;let g=n;g===void 0&&(g=m()),h.initialValue===null&&g!==null&&p(b=>({...b,initialValue:g}))},[t,p,n,h.initialValue,m]),We(()=>{!t||!r||l.current.fields.set(r,{getValue:m,name:i,controlRef:o,validityData:NS(h,c),validate(g=!0){let b=n;b===void 0&&(b=m()),f.current=!0,g?Rn.flushSync(()=>a(b)):a(b)}})},[a,o,t,l,m,r,c,f,i,h,n]),We(()=>{const g=l.current.fields;return()=>{r&&g.delete(r)}},[l,r])}function Wb(){return typeof window<"u"}function cl(e){return IC(e)?(e.nodeName||"").toLowerCase():"#document"}function Un(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function zo(e){var t;return(t=(IC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function IC(e){return Wb()?e instanceof Node||e instanceof Un(e).Node:!1}function vn(e){return Wb()?e instanceof Element||e instanceof Un(e).Element:!1}function Cn(e){return Wb()?e instanceof HTMLElement||e instanceof Un(e).HTMLElement:!1}function jS(e){return!Wb()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Un(e).ShadowRoot}const poe=new Set(["inline","contents"]);function fl(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=bi(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!poe.has(i)}const moe=new Set(["table","td","th"]);function goe(e){return moe.has(cl(e))}const yoe=[":popover-open",":modal"];function Kb(e){return yoe.some(t=>{try{return e.matches(t)}catch{return!1}})}const boe=["transform","translate","scale","rotate","perspective"],voe=["transform","translate","scale","rotate","perspective","filter"],xoe=["paint","layout","strict","content"];function LC(e){const t=Xb(),n=vn(e)?bi(e):e;return boe.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)||voe.some(r=>(n.willChange||"").includes(r))||xoe.some(r=>(n.contain||"").includes(r))}function woe(e){let t=Ps(e);for(;Cn(t)&&!As(t);){if(LC(t))return t;if(Kb(t))return null;t=Ps(t)}return null}function Xb(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Soe=new Set(["html","body","#document"]);function As(e){return Soe.has(cl(e))}function bi(e){return Un(e).getComputedStyle(e)}function Qb(e){return vn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ps(e){if(cl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||jS(e)&&e.host||zo(e);return jS(t)?t.host:t}function JN(e){const t=Ps(e);return As(t)?e.ownerDocument?e.ownerDocument.body:e.body:Cn(t)&&fl(t)?t:JN(t)}function Ya(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=JN(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Un(i);if(o){const l=FS(a);return t.concat(a,a.visualViewport||[],fl(i)?i:[],l&&n?Ya(l):[])}return t.concat(i,Ya(i,[],n))}function FS(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Eoe={...rl};let VM=0;function Coe(e,t="mui"){const[n,r]=S.useState(e),i=e||n;return S.useEffect(()=>{n==null&&(VM+=1,r(`${t}-${VM}`))},[n,t]),i}const GM=Eoe.useId;function NC(e,t){if(GM!==void 0){const n=GM();return e??(t?`${t}-${n}`:n)}return Coe(e,t)}function wu(e){return NC(e,"base-ui")}const ej=S.createContext({controlId:void 0,registerControlId:hr,labelId:void 0,setLabelId:hr,messageIds:[],setMessageIds:hr,getDescriptionProps:e=>e});function Fs(){return S.useContext(ej)}function jC(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:o}=Fs(),a=wu(t),l=n?i:void 0,c=yi(()=>Symbol("labelable-control")),f=S.useRef(!1),h=S.useRef(t!=null),p=Ze(()=>{!f.current||o===hr||(f.current=!1,o(c.current,void 0))});return We(()=>{if(o===hr)return;let m;if(n){const g=r==null?void 0:r.current;vn(g)&&g.closest("label")!=null?m=t??null:m=l??a}else if(t!=null)h.current=!0,m=t;else if(h.current)m=a;else{p();return}if(m===void 0){p();return}f.current=!0,o(c.current,m)},[t,r,l,o,n,a,c,p]),S.useEffect(()=>p,[p]),i??a}function Zb(e,t=!1,n=!1){const[r,i]=S.useState(e&&t?"idle":void 0),[o,a]=S.useState(e);return e&&!o&&(a(!0),i("starting")),!e&&o&&r!=="ending"&&!n&&i("ending"),!e&&!o&&r==="ending"&&i(void 0),We(()=>{if(!e&&o&&r!=="ending"&&n){const l=Sa.request(()=>{i("ending")});return()=>{Sa.cancel(l)}}},[e,o,r,n]),We(()=>{if(!e||t)return;const l=Sa.request(()=>{i(void 0)});return()=>{Sa.cancel(l)}},[t,e]),We(()=>{if(!e||!t)return;e&&o&&r!=="idle"&&i("starting");const l=Sa.request(()=>{i("idle")});return()=>{Sa.cancel(l)}},[t,e,o,i,r]),S.useMemo(()=>({mounted:o,setMounted:a,transitionStatus:r}),[o,r])}function koe(e){const t=S.useRef(""),n=S.useCallback(r=>{r.defaultPrevented||(t.current=r.pointerType,e(r,r.pointerType))},[e]);return{onClick:S.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 Uf=typeof navigator<"u",Nx=Toe(),tj=Doe(),nj=_oe(),FC=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),rj=Nx.platform==="MacIntel"&&Nx.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(Nx.platform),Roe=Uf&&/apple/i.test(navigator.vendor),zS=Uf&&/android/i.test(tj)||/android/i.test(nj);Uf&&tj.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const Aoe=nj.includes("jsdom/");function Toe(){if(!Uf)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 _oe(){if(!Uf)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function Doe(){if(!Uf)return"";const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform??""}function Moe(e){const[t,n]=S.useState(null),r=Ze((l,c)=>{e||n(c||(rj?"touch":""))}),i=S.useCallback(()=>{n(null)},[]),{onClick:o,onPointerDown:a}=koe(r);return S.useMemo(()=>({openMethod:t,reset:i,triggerProps:{onClick:o,onPointerDown:a}}),[t,i,o,a])}function ij(e,t){const n=S.useRef(e),r=Ze(t);We(()=>{n.current!==e&&r(n.current)},[e,r]),We(()=>{n.current=e},[e])}var jx={exports:{}},Fx={},YM;function $oe(){if(YM)return Fx;YM=1;var e=Po;function t(p,m){return p===m&&(p!==0||1/p===1/m)||p!==p&&m!==m}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function l(p,m){var g=m(),b=r({inst:{value:g,getSnapshot:m}}),v=b[0].inst,w=b[1];return o(function(){v.value=g,v.getSnapshot=m,c(v)&&w({inst:v})},[p,g,m]),i(function(){return c(v)&&w({inst:v}),p(function(){c(v)&&w({inst:v})})},[p]),a(g),g}function c(p){var m=p.getSnapshot;p=p.value;try{var g=m();return!n(p,g)}catch{return!0}}function f(p,m){return m()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:l;return Fx.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,Fx}var WM;function oj(){return WM||(WM=1,jx.exports=$oe()),jx.exports}var Ooe=oj(),zx={exports:{}},Bx={},KM;function Poe(){if(KM)return Bx;KM=1;var e=Po,t=oj();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,l=e.useMemo,c=e.useDebugValue;return Bx.useSyncExternalStoreWithSelector=function(f,h,p,m,g){var b=o(null);if(b.current===null){var v={hasValue:!1,value:null};b.current=v}else v=b.current;b=l(function(){function x(D){if(!k){if(k=!0,C=D,D=m(D),g!==void 0&&v.hasValue){var M=v.value;if(g(M,D))return R=M}return R=D}if(M=R,r(C,D))return M;var O=m(D);return g!==void 0&&g(M,O)?(C=D,M):(C=D,R=O)}var k=!1,C,R,_=p===void 0?null:p;return[function(){return x(h())},_===null?void 0:function(){return x(_())}]},[h,p,m,g]);var w=i(f,b[0],b[1]);return a(function(){v.hasValue=!0,v.value=w},[w]),c(w),w},Bx}var XM;function Ioe(){return XM||(XM=1,zx.exports=Poe()),zx.exports}var Loe=Ioe();const Noe=parseInt(S.version,10);function zC(e){return Noe>=e}const joe=zC(19),Foe=joe?Boe:Hoe;function ut(e,t,n,r,i){return Foe(e,t,n,r,i)}function zoe(e,t,n,r,i){const o=S.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return Ooe.useSyncExternalStore(e.subscribe,o,o)}function Boe(e,t,n,r,i){return zoe(e,t,n,r,i)}function Hoe(e,t,n,r,i){return Loe.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,o=>t(o,n,r,i))}const BS="data-base-ui-focusable",sj="active",aj="selected",Uoe="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Wa="ArrowLeft",Ka="ArrowRight",BC="ArrowUp",pp="ArrowDown";function Ro(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 on(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&&jS(n)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function io(e){return"composedPath"in e?e.composedPath()[0]:e.target}function eo(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 qoe(e){return e.matches("html,body")}function HC(e){return Cn(e)&&e.matches(Uoe)}function HS(e){return e?e.getAttribute("role")==="combobox"&&HC(e):!1}function By(e){return e?e.hasAttribute(BS)?e:e.querySelector(`[${BS}]`)||e:null}const Voe=S.createContext(null),Goe=S.createContext(null),lj=()=>{var e;return((e=S.useContext(Voe))==null?void 0:e.id)||null},Jb=e=>{const t=S.useContext(Goe);return e??t};function Yoe(){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 uj=class{constructor(t){ce(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t)}));ce(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 ut(this,t,n,r,i)}},Woe=class extends uj{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){S.useDebugValue(t),We(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;We(()=>(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);We(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){S.useDebugValue(t);const r=n!==void 0;We(()=>{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 S.useDebugValue(t),ut(this,this.selectors[t],n,r,i)}useContextCallback(t,n){S.useDebugValue(t);const r=Ze(n??hr);this.context[t]=r}useStateSetter(t){const n=S.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 l=i;i=a,n(a,l,this)}})}};function cr(e){e.preventDefault(),e.stopPropagation()}function Koe(e){return"nativeEvent"in e}function cj(e){return e.pointerType===""&&e.isTrusted?!0:zS&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function fj(e){return Aoe?!1:!zS&&e.width===0&&e.height===0||zS&&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 QM(e,t){return["mouse","pen"].includes(e)}function dj(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const Xoe={open:Ft(e=>e.open),domReferenceElement:Ft(e=>e.domReferenceElement),referenceElement:Ft(e=>e.positionReference??e.referenceElement),floatingElement:Ft(e=>e.floatingElement),floatingId:Ft(e=>e.floatingId)};let Qoe=class extends Woe{constructor(n){const{nested:r,noEmit:i,onOpenChange:o,triggerElements:a,...l}=n;super({...l,positionReference:l.referenceElement,domReferenceElement:l.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:Yoe(),nested:r,noEmit:i,triggerElements:a},Xoe);ce(this,"setOpen",(n,r)=>{var i,o;if((!n||!this.state.open||dj(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)})}},Zoe=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 hj(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,i=NC(),o=lj()!=null,a=yi(()=>new Qoe({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Zoe,floatingId:i,nested:o,noEmit:!1})).current;return We(()=>{const l={open:t,floatingId:i};r.reference!==void 0&&(l.referenceElement=r.reference,l.domReferenceElement=vn(r.reference)?r.reference:null),r.floating!==void 0&&(l.floatingElement=r.floating),a.update(l)},[t,i,r.reference,r.floating,a]),a.context.onOpenChange=n,a.context.nested=o,a.context.noEmit=!1,a}const Xd=0;let Hy=class pj{constructor(){ce(this,"currentId",Xd);ce(this,"clear",()=>{this.currentId!==Xd&&(clearTimeout(this.currentId),this.currentId=Xd)});ce(this,"disposeEffect",()=>this.clear)}static create(){return new pj}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Xd,n()},t)}isStarted(){return this.currentId!==Xd}};function Hr(){const e=yi(Hy.create).current;return XN(e.disposeEffect),e}const qf="none",US="trigger-press",Joe="trigger-hover",UC="outside-press",Hx="item-press",ev="focus-out",ese="escape-key",Ux="list-navigation",tse="cancel-open",nse="window-resize";function rse(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:i=!0,event:o="click",toggle:a=!0,ignoreMouse:l=!1,stickIfOpen:c=!0,touchOpenDelay:f=0,reason:h=US}=t,p=S.useRef(void 0),m=Gb(),g=Hr(),b=S.useMemo(()=>({onPointerDown(v){p.current=v.pointerType},onMouseDown(v){const w=p.current,x=v.nativeEvent,k=n.select("open");if(v.button!==0||o==="click"||QM(w)&&l)return;const C=r.current.openEvent,R=C==null?void 0:C.type,_=n.select("domReferenceElement")!==v.currentTarget,D=k&&_||!(k&&a&&(!(C&&c)||R==="click"||R==="mousedown"));if(HC(x.target)){const O=mn(h,x,x.target);D&&w==="touch"&&f>0?g.start(f,()=>{n.setOpen(!0,O)}):n.setOpen(D,O);return}const M=v.currentTarget;m.request(()=>{const O=mn(h,x,M);D&&w==="touch"&&f>0?g.start(f,()=>{n.setOpen(!0,O)}):n.setOpen(D,O)})},onClick(v){if(o==="mousedown-only")return;const w=p.current;if(o==="mousedown"&&w){p.current=void 0;return}if(QM(w)&&l)return;const x=n.select("open"),k=r.current.openEvent,C=n.select("domReferenceElement")!==v.currentTarget,R=x&&C||!(x&&a&&(!(k&&c)||dj(k))),_=mn(h,v.nativeEvent,v.currentTarget);R&&w==="touch"&&f>0?g.start(f,()=>{n.setOpen(!0,_)}):n.setOpen(R,_)},onKeyDown(){p.current=void 0}}),[r,o,l,n,c,a,m,g,f,h]);return S.useMemo(()=>i?{reference:b}:Sr,[i,b])}function dn(e){return(e==null?void 0:e.ownerDocument)||document}function Uy(e){return`data-base-ui-${e}`}function Gc(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,...Gc(e,r.id,n)])}function ZM(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 ise={intentional:"onClick",sloppy:"onPointerDown"};function ose(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 sse(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:l,dataRef:c}=n.context,{enabled:f=!0,escapeKey:h=!0,outsidePress:p=!0,outsidePressEvent:m="sloppy",referencePress:g=!1,referencePressEvent:b="sloppy",ancestorScroll:v=!1,bubbles:w,externalTree:x}=t,k=Jb(x),C=Ze(typeof p=="function"?p:()=>!1),R=typeof p=="function"?C:p,_=S.useRef(!1),{escapeKey:D,outsidePress:M}=ose(w),O=S.useRef(null),U=Hr(),L=Hr(),I=Ze(()=>{L.clear(),c.current.insideReactTree=!1}),$=S.useRef(!1),B=S.useRef(""),V=Ze(Y=>{B.current=Y.pointerType}),F=Ze(()=>{const Y=B.current,W=Y==="pen"||!Y?"mouse":Y,Q=typeof m=="function"?m():m;return typeof Q=="string"?Q:Q[W]}),z=Ze(Y=>{var me;if(!r||!f||!h||Y.key!=="Escape"||$.current)return;const W=(me=c.current.floatingContext)==null?void 0:me.nodeId,Q=k?Gc(k.nodesRef.current,W):[];if(!D&&Q.length>0){let te=!0;if(Q.forEach(Z=>{var ie;(ie=Z.context)!=null&&ie.open&&!Z.context.dataRef.current.__escapeKeyBubbles&&(te=!1)}),!te)return}const pe=Koe(Y)?Y.nativeEvent:Y,oe=mn(ese,pe);n.setOpen(!1,oe),!D&&!oe.isPropagationAllowed&&Y.stopPropagation()}),j=Ze(Y=>{const W=F();return W==="intentional"&&Y.type!=="click"||W==="sloppy"&&Y.type==="click"}),H=Ze(()=>{c.current.insideReactTree=!0,L.start(0,I)}),X=Ze((Y,W=!1)=>{var Se;if(j(Y)){I();return}if(c.current.insideReactTree){I();return}if(F()==="intentional"&&W||typeof R=="function"&&!R(Y))return;const Q=io(Y),pe=`[${Uy("inert")}]`,oe=dn(n.select("floatingElement")).querySelectorAll(pe),me=n.context.triggerElements;if(Q&&(me.hasElement(Q)||me.hasMatchingElement(ke=>on(ke,Q))))return;let te=vn(Q)?Q:null;for(;te&&!As(te);){const ke=Ps(te);if(As(ke)||!vn(ke))break;te=ke}if(oe.length&&vn(Q)&&!qoe(Q)&&!on(Q,n.select("floatingElement"))&&Array.from(oe).every(ke=>!on(te,ke)))return;if(Cn(Q)&&!("touches"in Y)){const ke=As(Q),ge=bi(Q),_e=/auto|scroll/,de=ke||_e.test(ge.overflowX),Ce=ke||_e.test(ge.overflowY),ye=de&&Q.clientWidth>0&&Q.scrollWidth>Q.clientWidth,Me=Ce&&Q.clientHeight>0&&Q.scrollHeight>Q.clientHeight,Pe=ge.direction==="rtl",Ke=Me&&(Pe?Y.offsetX<=Q.offsetWidth-Q.clientWidth:Y.offsetX>Q.clientWidth),Et=ye&&Y.offsetY>Q.clientHeight;if(Ke||Et)return}const Z=(Se=c.current.floatingContext)==null?void 0:Se.nodeId,ie=k&&Gc(k.nodesRef.current,Z).some(ke=>{var ge;return eo(Y,(ge=ke.context)==null?void 0:ge.elements.floating)});if(eo(Y,n.select("floatingElement"))||eo(Y,n.select("domReferenceElement"))||ie)return;const J=k?Gc(k.nodesRef.current,Z):[];if(J.length>0){let ke=!0;if(J.forEach(ge=>{var _e;(_e=ge.context)!=null&&_e.open&&!ge.context.dataRef.current.__outsidePressBubbles&&(ke=!1)}),!ke)return}n.setOpen(!1,mn(UC,Y)),I()}),P=Ze(Y=>{F()!=="sloppy"||Y.pointerType==="touch"||!n.select("open")||!f||eo(Y,n.select("floatingElement"))||eo(Y,n.select("domReferenceElement"))||X(Y)}),K=Ze(Y=>{if(F()!=="sloppy"||!n.select("open")||!f||eo(Y,n.select("floatingElement"))||eo(Y,n.select("domReferenceElement")))return;const W=Y.touches[0];W&&(O.current={startTime:Date.now(),startX:W.clientX,startY:W.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},U.start(1e3,()=>{O.current&&(O.current.dismissOnTouchEnd=!1,O.current.dismissOnMouseDown=!1)}))}),ee=Ze(Y=>{const W=io(Y);function Q(){K(Y),W==null||W.removeEventListener(Y.type,Q)}W==null||W.addEventListener(Y.type,Q)}),q=Ze(Y=>{const W=_.current;if(_.current=!1,U.clear(),Y.type==="mousedown"&&O.current&&!O.current.dismissOnMouseDown)return;const Q=io(Y);function pe(){Y.type==="pointerdown"?P(Y):X(Y,W),Q==null||Q.removeEventListener(Y.type,pe)}Q==null||Q.addEventListener(Y.type,pe)}),ae=Ze(Y=>{if(F()!=="sloppy"||!O.current||eo(Y,n.select("floatingElement"))||eo(Y,n.select("domReferenceElement")))return;const W=Y.touches[0];if(!W)return;const Q=Math.abs(W.clientX-O.current.startX),pe=Math.abs(W.clientY-O.current.startY),oe=Math.sqrt(Q*Q+pe*pe);oe>5&&(O.current.dismissOnTouchEnd=!0),oe>10&&(X(Y),U.clear(),O.current=null)}),re=Ze(Y=>{const W=io(Y);function Q(){ae(Y),W==null||W.removeEventListener(Y.type,Q)}W==null||W.addEventListener(Y.type,Q)}),fe=Ze(Y=>{F()!=="sloppy"||!O.current||eo(Y,n.select("floatingElement"))||eo(Y,n.select("domReferenceElement"))||(O.current.dismissOnTouchEnd&&X(Y),U.clear(),O.current=null)}),ve=Ze(Y=>{const W=io(Y);function Q(){fe(Y),W==null||W.removeEventListener(Y.type,Q)}W==null||W.addEventListener(Y.type,Q)});S.useEffect(()=>{if(!r||!f)return;c.current.__escapeKeyBubbles=D,c.current.__outsidePressBubbles=M;const Y=new Hy;function W(te){n.setOpen(!1,mn(qf,te))}function Q(){Y.clear(),$.current=!0}function pe(){Y.start(Xb()?5:0,()=>{$.current=!1})}const oe=dn(i);oe.addEventListener("pointerdown",V,!0),h&&(oe.addEventListener("keydown",z),oe.addEventListener("compositionstart",Q),oe.addEventListener("compositionend",pe)),R&&(oe.addEventListener("click",q,!0),oe.addEventListener("pointerdown",q,!0),oe.addEventListener("touchstart",ee,!0),oe.addEventListener("touchmove",re,!0),oe.addEventListener("touchend",ve,!0),oe.addEventListener("mousedown",q,!0));let me=[];return v&&(vn(a)&&(me=Ya(a)),vn(i)&&(me=me.concat(Ya(i))),!vn(o)&&o&&o.contextElement&&(me=me.concat(Ya(o.contextElement)))),me=me.filter(te=>{var Z;return te!==((Z=oe.defaultView)==null?void 0:Z.visualViewport)}),me.forEach(te=>{te.addEventListener("scroll",W,{passive:!0})}),()=>{oe.removeEventListener("pointerdown",V,!0),h&&(oe.removeEventListener("keydown",z),oe.removeEventListener("compositionstart",Q),oe.removeEventListener("compositionend",pe)),R&&(oe.removeEventListener("click",q,!0),oe.removeEventListener("pointerdown",q,!0),oe.removeEventListener("touchstart",ee,!0),oe.removeEventListener("touchmove",re,!0),oe.removeEventListener("touchend",ve,!0),oe.removeEventListener("mousedown",q,!0)),me.forEach(te=>{te.removeEventListener("scroll",W)}),Y.clear(),_.current=!1}},[c,i,o,a,h,R,r,l,v,f,D,M,z,X,q,P,ee,re,ve,V,n]),S.useEffect(I,[R,I]);const Re=S.useMemo(()=>({onKeyDown:z,...g&&{[ise[b]]:Y=>{n.setOpen(!1,mn(US,Y.nativeEvent))},...b!=="intentional"&&{onClick(Y){n.setOpen(!1,mn(US,Y.nativeEvent))}}}}),[z,n,g,b]),le=Ze(Y=>{const W=io(Y.nativeEvent);!on(n.select("floatingElement"),W)||Y.button!==0||(_.current=!0)}),Ae=Ze(Y=>{!r||!f||Y.button!==0||(_.current=!0)}),Ie=S.useMemo(()=>({onKeyDown:z,onPointerDown:le,onMouseDown:le,onMouseUp:le,onClickCapture:H,onMouseDownCapture(Y){H(),Ae(Y)},onPointerDownCapture(Y){H(),Ae(Y)},onMouseUpCapture:H,onTouchEndCapture:H,onTouchMoveCapture:H}),[z,le,H,Ae]);return S.useMemo(()=>f?{reference:Re,floating:Ie,trigger:Re}:{},[f,Re,Ie])}let JM=0;function hh(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(JM);const o=()=>e==null?void 0:e.focus({preventScroll:n});i?o():JM=requestAnimationFrame(o)}const ase=["top","right","bottom","left"],Sf=Math.min,ai=Math.max,qy=Math.round,Nc=Math.floor,Mo=e=>({x:e,y:e}),lse={left:"right",right:"left",bottom:"top",top:"bottom"},use={start:"end",end:"start"};function qS(e,t,n){return ai(e,Sf(t,n))}function Is(e,t){return typeof e=="function"?e(t):e}function di(e){return e.split("-")[0]}function dl(e){return e.split("-")[1]}function qC(e){return e==="x"?"y":"x"}function VC(e){return e==="y"?"height":"width"}const cse=new Set(["top","bottom"]);function Gi(e){return cse.has(di(e))?"y":"x"}function GC(e){return qC(Gi(e))}function fse(e,t,n){n===void 0&&(n=!1);const r=dl(e),i=GC(e),o=VC(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Vy(a)),[a,Vy(a)]}function dse(e){const t=Vy(e);return[VS(e),t,VS(t)]}function VS(e){return e.replace(/start|end/g,t=>use[t])}const e$=["left","right"],t$=["right","left"],hse=["top","bottom"],pse=["bottom","top"];function mse(e,t,n){switch(e){case"top":case"bottom":return n?t?t$:e$:t?e$:t$;case"left":case"right":return t?hse:pse;default:return[]}}function gse(e,t,n,r){const i=dl(e);let o=mse(di(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(VS)))),o}function Vy(e){return e.replace(/left|right|bottom|top/g,t=>lse[t])}function yse(e){return{top:0,right:0,bottom:0,left:0,...e}}function mj(e){return typeof e!="number"?yse(e):{top:e,right:e,bottom:e,left:e}}function Gy(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 ug(e,t,n){return Math.floor(e/t)!==n}function ph(e,t){return t<0||t>=e.current.length}function qx(e,t){return ur(e,{disabledIndices:t})}function n$(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&&mh(e,o,r));return o}function bse(e,{event:t,orientation:n,loopFocus:r,rtl:i,cols:o,disabledIndices:a,minIndex:l,maxIndex:c,prevIndex:f,stopEvent:h=!1}){let p=f;const m=[],g={};let b=!1;{let x=null,k=-1;e.current.forEach((C,R)=>{if(C==null)return;const _=C.closest('[role="row"]');_&&(b=!0),(_!==x||k===-1)&&(x=_,k+=1,m[k]=[]),m[k].push(R),g[R]=k})}const v=b&&m.length>0&&m.some(x=>x.length!==o);function w(x){if(!v||f===-1)return;const k=g[f];if(k==null)return;const C=m[k].indexOf(f);let R=x==="up"?k-1:k+1;r&&(R<0?R=m.length-1:R>=m.length&&(R=0));const _=new Set;for(;R>=0&&R<m.length&&!_.has(R);){_.add(R);const D=m[R];if(D.length===0){R=x==="up"?R-1:R+1;continue}const M=Math.min(C,D.length-1);for(let O=M;O>=0;O-=1){const U=D[O];if(!mh(e,U,a))return U}R=x==="up"?R-1:R+1,r&&(R<0?R=m.length-1:R>=m.length&&(R=0))}}if(t.key===BC){const x=w("up");if(x!==void 0)h&&cr(t),p=x;else{if(h&&cr(t),f===-1)p=c;else if(p=ur(e,{startingIndex:p,amount:o,decrement:!0,disabledIndices:a}),r&&(f-o<l||p<0)){const k=f%o,C=c%o,R=c-(C-k);C===k?p=c:p=C>k?R:R-o}ph(e,p)&&(p=f)}}if(t.key===pp){const x=w("down");x!==void 0?(h&&cr(t),p=x):(h&&cr(t),f===-1?p=l:(p=ur(e,{startingIndex:f,amount:o,disabledIndices:a}),r&&f+o>c&&(p=ur(e,{startingIndex:f%o-o,amount:o,disabledIndices:a}))),ph(e,p)&&(p=f))}if(n==="both"){const x=Nc(f/o);t.key===(i?Wa:Ka)&&(h&&cr(t),f%o!==o-1?(p=ur(e,{startingIndex:f,disabledIndices:a}),r&&ug(p,o,x)&&(p=ur(e,{startingIndex:f-f%o-1,disabledIndices:a}))):r&&(p=ur(e,{startingIndex:f-f%o-1,disabledIndices:a})),ug(p,o,x)&&(p=f)),t.key===(i?Ka:Wa)&&(h&&cr(t),f%o!==0?(p=ur(e,{startingIndex:f,decrement:!0,disabledIndices:a}),r&&ug(p,o,x)&&(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})),ug(p,o,x)&&(p=f));const k=Nc(c/o)===x;ph(e,p)&&(r&&k?p=t.key===(i?Ka:Wa)?c:ur(e,{startingIndex:f-f%o-1,disabledIndices:a}):p=f)}return p}function vse(e,t,n){const r=[];let i=0;return e.forEach(({width:o,height:a},l)=>{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]=l}),c=!0):i+=1}}),[...r]}function xse(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 wse(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function mh(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 Sse="Escape";function tv(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function cg(e,t){return tv(t,e===BC||e===pp,e===Wa||e===Ka)}function Vx(e,t,n){return tv(t,e===pp,n?e===Wa:e===Ka)||e==="Enter"||e===" "||e===""}function Ese(e,t,n){return tv(t,n?e===Wa:e===Ka,e===pp)}function Cse(e,t,n,r){const i=n?e===Ka:e===Wa,o=e===BC;return t==="both"||t==="horizontal"&&r&&r>1?e===Sse:tv(t,i,o)}function kse(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:l,activeIndex:c,onNavigate:f=()=>{},enabled:h=!0,selectedIndex:p=null,allowEscape:m=!1,loopFocus:g=!1,nested:b=!1,rtl:v=!1,virtual:w=!1,focusItemOnOpen:x="auto",focusItemOnHover:k=!0,openOnArrowKeyDown:C=!0,disabledIndices:R=void 0,orientation:_="vertical",parentOrientation:D,cols:M=1,id:O,resetOnPointerLeave:U=!0,externalTree:L}=t,I=By(i),$=zr(I),B=lj(),V=Jb(L);We(()=>{a.current.orientation=_},[a,_]);const F=HS(o),z=S.useRef(x),j=S.useRef(p??-1),H=S.useRef(null),X=S.useRef(!0),P=Ze(Z=>{f(j.current===-1?null:j.current,Z)}),K=S.useRef(P),ee=S.useRef(!!i),q=S.useRef(r),ae=S.useRef(!1),re=S.useRef(!1),fe=zr(R),ve=zr(r),Re=zr(p),le=zr(U),Ae=Ze(()=>{function Z(Se){w?V==null||V.events.emit("virtualfocus",Se):hh(Se,{sync:ae.current,preventScroll:!0})}const ie=l.current[j.current],J=re.current;ie&&Z(ie),(ae.current?Se=>Se():requestAnimationFrame)(()=>{var ke;const Se=l.current[j.current]||ie;Se&&(ie||Z(Se),Y&&(J||!X.current)&&((ke=Se.scrollIntoView)==null||ke.call(Se,{block:"nearest",inline:"nearest"})))})});We(()=>{h&&(r&&i?(j.current=p??-1,z.current&&p!=null&&(re.current=!0,P())):ee.current&&(j.current=-1,K.current()))},[h,r,i,p,P]),We(()=>{if(h){if(!r){ae.current=!1;return}if(i)if(c==null){if(ae.current=!1,Re.current!=null)return;if(ee.current&&(j.current=-1,Ae()),(!q.current||!ee.current)&&z.current&&(H.current!=null||z.current===!0&&H.current==null)){let Z=0;const ie=()=>{l.current[0]==null?(Z<2&&(Z?requestAnimationFrame:queueMicrotask)(ie),Z+=1):(j.current=H.current==null||Vx(H.current,_,v)||b?qx(l):n$(l),H.current=null,P())};ie()}}else ph(l,c)||(j.current=c,Ae(),re.current=!1)}},[h,r,i,c,Re,b,l,_,v,P,Ae,fe]),We(()=>{var ke,ge;if(!h||i||!V||w||!ee.current)return;const Z=V.nodesRef.current,ie=(ge=(ke=Z.find(_e=>_e.id===B))==null?void 0:ke.context)==null?void 0:ge.elements.floating,J=Ro(dn(i)),Se=Z.some(_e=>_e.context&&on(_e.context.elements.floating,J));ie&&!Se&&X.current&&ie.focus({preventScroll:!0})},[h,i,V,B,w]),We(()=>{K.current=P,q.current=r,ee.current=!!i}),We(()=>{r||(H.current=null,z.current=x)},[r,x]);const Ie=c!=null,Y=S.useMemo(()=>{function Z(ie){if(!ve.current)return;const J=l.current.indexOf(ie.currentTarget);J!==-1&&j.current!==J&&(j.current=J,P(ie))}return{onFocus(ie){ae.current=!0,Z(ie)},onClick:({currentTarget:ie})=>ie.focus({preventScroll:!0}),onMouseMove(ie){ae.current=!0,re.current=!1,k&&Z(ie)},onPointerLeave(ie){var Se;if(!ve.current||!X.current||ie.pointerType==="touch")return;ae.current=!0;const J=ie.relatedTarget;!k||l.current.includes(J)||le.current&&(hh(null,{sync:!0}),j.current=-1,P(ie),w||((Se=$.current)==null||Se.focus({preventScroll:!0})))}}},[ve,$,k,l,P,le,w]),W=S.useCallback(()=>{var Z,ie,J;return D??((J=(ie=(Z=V==null?void 0:V.nodesRef.current.find(Se=>Se.id===B))==null?void 0:Z.context)==null?void 0:ie.dataRef)==null?void 0:J.current.orientation)},[B,V,D]),Q=Ze(Z=>{if(X.current=!1,ae.current=!0,Z.which===229||!ve.current&&Z.currentTarget===$.current)return;if(b&&Cse(Z.key,_,v,M)){cg(Z.key,W())||cr(Z),n.setOpen(!1,mn(Ux,Z.nativeEvent)),Cn(o)&&(w?V==null||V.events.emit("virtualfocus",o):o.focus());return}const ie=j.current,J=qx(l,R),Se=n$(l,R);if(F||(Z.key==="Home"&&(cr(Z),j.current=J,P(Z)),Z.key==="End"&&(cr(Z),j.current=Se,P(Z))),M>1){const ke=Array.from({length:l.current.length},()=>({width:1,height:1})),ge=vse(ke,M,!1),_e=ge.findIndex(ye=>ye!=null&&!mh(l,ye,R)),de=ge.reduce((ye,Me,Pe)=>Me!=null&&!mh(l,Me,R)?Pe:ye,-1),Ce=ge[bse({current:ge.map(ye=>ye!=null?l.current[ye]:null)},{event:Z,orientation:_,loopFocus:g,rtl:v,cols:M,disabledIndices:wse([...(typeof R!="function"?R:null)||l.current.map((ye,Me)=>mh(l,Me,R)?Me:void 0),void 0],ge),minIndex:_e,maxIndex:de,prevIndex:xse(j.current>Se?J:j.current,ke,ge,M,Z.key===pp?"bl":Z.key===(v?Wa:Ka)?"tr":"tl"),stopEvent:!0})];if(Ce!=null&&(j.current=Ce,P(Z)),_==="both")return}if(cg(Z.key,_)){if(cr(Z),r&&!w&&Ro(Z.currentTarget.ownerDocument)===Z.currentTarget){j.current=Vx(Z.key,_,v)?J:Se,P(Z);return}Vx(Z.key,_,v)?g?ie>=Se?m&&ie!==l.current.length?j.current=-1:(ae.current=!1,j.current=J):j.current=ur(l,{startingIndex:ie,disabledIndices:R}):j.current=Math.min(Se,ur(l,{startingIndex:ie,disabledIndices:R})):g?ie<=J?m&&ie!==-1?j.current=l.current.length:(ae.current=!1,j.current=Se):j.current=ur(l,{startingIndex:ie,decrement:!0,disabledIndices:R}):j.current=Math.max(J,ur(l,{startingIndex:ie,decrement:!0,disabledIndices:R})),ph(l,j.current)&&(j.current=-1),P(Z)}}),pe=S.useMemo(()=>w&&r&&Ie&&{"aria-activedescendant":`${O}-${c}`},[w,r,Ie,O,c]),oe=S.useMemo(()=>({"aria-orientation":_==="both"?void 0:_,...F?{}:pe,onKeyDown(Z){if(Z.key==="Tab"&&Z.shiftKey&&r&&!w){const ie=io(Z.nativeEvent);if(ie&&!on($.current,ie))return;cr(Z),n.setOpen(!1,mn(ev,Z.nativeEvent)),Cn(o)&&o.focus();return}Q(Z)},onPointerMove(){X.current=!0}}),[pe,Q,$,_,F,n,r,w,o]),me=S.useMemo(()=>{function Z(J){x==="auto"&&cj(J.nativeEvent)&&(z.current=!w)}function ie(J){z.current=x,x==="auto"&&fj(J.nativeEvent)&&(z.current=!0)}return{onKeyDown(J){const Se=n.select("open");X.current=!1;const ke=J.key.startsWith("Arrow"),ge=Ese(J.key,W(),v),_e=cg(J.key,_),de=(b?ge:_e)||J.key==="Enter"||J.key.trim()==="";if(w&&Se)return Q(J);if(!(!Se&&!C&&ke)){if(de){const Ce=cg(J.key,W());H.current=b&&Ce?null:J.key}if(b){ge&&(cr(J),Se?(j.current=qx(l,fe.current),P(J)):n.setOpen(!0,mn(Ux,J.nativeEvent,J.currentTarget)));return}_e&&(Re.current!=null&&(j.current=Re.current),cr(J),!Se&&C?n.setOpen(!0,mn(Ux,J.nativeEvent,J.currentTarget)):Q(J),Se&&P(J))}},onFocus(J){n.select("open")&&!w&&(j.current=-1,P(J))},onPointerDown:ie,onPointerEnter:ie,onMouseDown:Z,onClick:Z}},[Q,fe,x,l,b,P,n,C,_,W,v,Re,w]),te=S.useMemo(()=>({...pe,...me}),[pe,me]);return S.useMemo(()=>h?{reference:te,floating:oe,item:Y,trigger:me}:{},[h,te,oe,me,Y])}function Rse(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=S.useCallback(f=>fg(f,e,"reference"),t),a=S.useCallback(f=>fg(f,e,"floating"),n),l=S.useCallback(f=>fg(f,e,"item"),r),c=S.useCallback(f=>fg(f,e,"trigger"),i);return S.useMemo(()=>({getReferenceProps:o,getFloatingProps:a,getItemProps:l,getTriggerProps:c}),[o,a,l,c])}function fg(e,t,n){var a;const r=new Map,i=n==="item",o={};n==="floating"&&(o.tabIndex=-1,o[BS]="");for(const l in e)i&&e&&(l===sj||l===aj)||(o[l]=e[l]);for(let l=0;l<t.length;l+=1){let c;const f=(a=t[l])==null?void 0:a[n];typeof f=="function"?c=e?f(e):null:c=f,c&&r$(o,c,i,r)}return r$(o,e,i,r),o}function r$(e,t,n,r){var i;for(const o in t){const a=t[o];n&&(o===sj||o===aj)||(o.startsWith("on")?(r.has(o)||r.set(o,[]),typeof a=="function"&&((i=r.get(o))==null||i.push(a),e[o]=(...l)=>{var c;return(c=r.get(o))==null?void 0:c.map(f=>f(...l)).find(f=>f!==void 0)})):e[o]=a)}}const pu={"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"},gj=50,yj=({icon:e,text:t,tooltip:n,className:r,...i})=>n&&e?T.jsxs("span",{"data-slot":"field-hint",className:ze(pu["field-hint"],r),...i,children:[T.jsx(hu,{trigger:T.jsx(e,{}),delay:gj,TriggerProps:{render:T.jsx("span",{})},PositionerProps:{align:"end"},children:n}),t&&T.jsx(Fe,{size:-1,children:t})]}):T.jsxs("span",{"data-slot":"field-hint",className:ze(pu["field-hint"],r),...i,children:[e&&T.jsx(e,{}),t&&T.jsx(Fe,{size:-1,children:t})]});yj.displayName="FieldHint";const Ase=S.createContext({legendId:void 0,setLegendId:()=>{},disabled:void 0});function Tse(e=!1){const t=S.useContext(Ase);if(!t&&!e)throw new Error(Fo(86));return t}function i$(e){if(!S.isValidElement(e))return null;const t=e,n=t.props;return(zC(19)?n==null?void 0:n.ref:t.ref)??null}function GS(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function _se(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 Dse(e,t){return typeof e=="function"?e(t):e}function Mse(e,t){return typeof e=="function"?e(t):e}const gh={};function nl(e,t,n,r,i){let o={...YS(e,gh)};return t&&(o=oh(o,t)),n&&(o=oh(o,n)),r&&(o=oh(o,r)),i&&(o=oh(o,i)),o}function $se(e){if(e.length===0)return gh;if(e.length===1)return YS(e[0],gh);let t={...YS(e[0],gh)};for(let n=1;n<e.length;n+=1)t=oh(t,e[n]);return t}function oh(e,t){return bj(t)?t(e):Ose(e,t)}function Ose(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=GS(e.style,r);break}case"className":{e[n]=vj(e.className,r);break}default:Pse(n,r)?e[n]=Ise(e[n],r):e[n]=r}}return e}function Pse(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 bj(e){return typeof e=="function"}function YS(e,t){return bj(e)?e(t):e??gh}function Ise(e,t){return t?e?n=>{if(Lse(n)){const i=n;WS(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 WS(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function vj(e,t){return t?e?t+" "+e:t:e}function Lse(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function gr(e,t,n={}){const r=t.render,i=Nse(t,n);if(n.enabled===!1)return null;const o=n.state??Sr;return Fse(e,r,i,o)}function Nse(e,t={}){const{className:n,style:r,render:i}=e,{state:o=Sr,ref:a,props:l,stateAttributesMapping:c,enabled:f=!0}=t,h=f?Dse(n,o):void 0,p=f?Mse(r,o):void 0,m=f?_se(o,c):Sr,g=f?GS(m,Array.isArray(l)?$se(l):l)??Sr:Sr;return typeof document<"u"&&(f?Array.isArray(a)?g.ref=Nie([g.ref,i$(i),...a]):g.ref=xu(g.ref,i$(i),a):xu(null,null)),f?(h!==void 0&&(g.className=vj(g.className,h)),p!==void 0&&(g.style=GS(g.style,p)),g):Sr}const jse=Symbol.for("react.lazy");function Fse(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=nl(n,t.props);i.ref=n.ref;let o=t;return(o==null?void 0:o.$$typeof)===jse&&(o=S.Children.toArray(t)[0]),S.cloneElement(o,i)}if(e&&typeof e=="string")return zse(e,n);throw new Error(Fo(8))}function zse(e,t){return e==="button"?S.createElement("button",{type:"button",...t,key:t.key}):e==="img"?S.createElement("img",{alt:"",...t,key:t.key}):S.createElement(e,t)}const Xg=Object.keys(Yb);function Bse(e){if(!e||e.valid||!e.valueMissing)return!1;let t=!1;for(const n of Xg)n!=="valid"&&(n==="valueMissing"&&(t=e[n]),e[n]&&(t=!1));return t}function Hse(e){const{formRef:t,clearErrors:n}=Hf(),{setValidityData:r,validate:i,validityData:o,validationDebounceTime:a,invalid:l,markedDirtyRef:c,state:f,name:h,shouldValidateOnChange:p}=e,{controlId:m,getDescriptionProps:g}=Fs(),b=Hr(),v=S.useRef(null),w=Ze(async(C,R=!1)=>{const _=v.current;if(!_)return;if(R){if(f.valid!==!1)return;const B=_.validity;if(!B.valueMissing){const F={value:C,state:{...Yb,valid:!0},error:"",errors:[],initialValue:o.initialValue};if(_.setCustomValidity(""),m){const z=t.current.fields.get(m);z&&t.current.fields.set(m,{...z,...NS(F,!1)})}r(F);return}const V=Xg.reduce((F,z)=>(F[z]=B[z],F),{});if(!V.valid&&!Bse(V))return}function D(B){const V=Xg.reduce((z,j)=>(z[j]=B.validity[j],z),{});let F=!1;for(const z of Xg)if(z!=="valid"){if(z==="valueMissing"&&V[z])F=!0;else if(V[z])return V}return F&&!c.current&&(V.valid=!0,V.valueMissing=!1),V}b.clear();let M=null,O=[];const U=D(_);let L;const I=p();if(_.validationMessage&&!I)L=_.validationMessage,O=[_.validationMessage];else{const B=Array.from(t.current.fields.values()).reduce((F,z)=>(z.name&&(F[z.name]=z.getValue()),F),{}),V=i(C,B);typeof V=="object"&&V!==null&&"then"in V?M=await V:M=V,M!==null?(U.valid=!1,U.customError=!0,Array.isArray(M)?(O=M,_.setCustomValidity(M.join(`
|
|
490
|
-
`))):M&&(O=[M],_.setCustomValidity(M))):I&&(_.setCustomValidity(""),U.customError=!1,_.validationMessage?(L=_.validationMessage,O=[_.validationMessage]):_.validity.valid&&!U.valid&&(U.valid=!0))}const $={value:C,state:U,error:L??(Array.isArray(M)?M[0]:M??""),errors:O,initialValue:o.initialValue};if(m){const B=t.current.fields.get(m);B&&t.current.fields.set(m,{...B,...NS($,l)})}r($)}),x=S.useCallback((C={})=>nl(g,f.valid===!1?{"aria-invalid":!0}:Sr,C),[g,f.valid]),k=S.useCallback((C={})=>nl({onChange(R){if(R.nativeEvent.defaultPrevented)return;if(n(h),!p()){w(R.currentTarget.value,!0);return}if(l)return;const _=R.currentTarget;if(_.value===""){w(_.value);return}b.clear(),a?b.start(a,()=>{w(_.value)}):w(_.value)}},x(C)),[x,n,h,b,w,l,a,p]);return S.useMemo(()=>({getValidationProps:x,getInputValidationProps:k,inputRef:v,commit:w}),[x,k,w])}const Use=function(e){const t=wu(),[n,r]=S.useState(e.initialControlId===void 0?t:e.initialControlId),[i,o]=S.useState(void 0),[a,l]=S.useState([]),c=yi(()=>new Map),{messageIds:f}=Fs(),h=Ze((g,b)=>{const v=c.current;if(b===void 0){v.delete(g);return}v.set(g,b),r(w=>{if(v.size===0)return;let x;for(const k of v.values()){if(w!==void 0&&k===w)return w;x===void 0&&(x=k)}return x})}),p=S.useCallback(g=>nl({"aria-describedby":f.concat(a).join(" ")||void 0},g),[f,a]),m=S.useMemo(()=>({controlId:n,registerControlId:h,labelId:i,setLabelId:o,messageIds:a,setMessageIds:l,getDescriptionProps:p}),[n,h,i,o,a,l,p]);return T.jsx(ej.Provider,{value:m,children:e.children})},qse=S.forwardRef(function(e,t){const{errors:n,validationMode:r,submitAttemptedRef:i}=Hf(),{render:o,className:a,validate:l,validationDebounceTime:c=0,validationMode:f=r,name:h,disabled:p=!1,invalid:m,dirty:g,touched:b,actionsRef:v,...w}=e,{disabled:x}=Tse(),k=Ze(l||(()=>null)),C=x||p,[R,_]=S.useState(!1),[D,M]=S.useState(!1),[O,U]=S.useState(!1),[L,I]=S.useState(!1),$=g??D,B=b??R,V=S.useRef(!1),F=Ze(ve=>{g===void 0&&(ve&&(V.current=!0),M(ve))}),z=Ze(ve=>{b===void 0&&_(ve)}),j=Ze(()=>f==="onChange"||f==="onSubmit"&&i.current),H=!!(m||h&&{}.hasOwnProperty.call(n,h)&&n[h]!==void 0),[X,P]=S.useState({state:Yb,error:"",errors:[],value:null,initialValue:null}),K=!H&&X.state.valid,ee=S.useMemo(()=>({disabled:C,touched:B,dirty:$,valid:K,filled:O,focused:L}),[C,B,$,K,O,L]),q=Hse({setValidityData:P,validate:k,validityData:X,validationDebounceTime:c,invalid:H,markedDirtyRef:V,state:ee,name:h,shouldValidateOnChange:j}),ae=S.useCallback(()=>{V.current=!0,q.commit(X.value)},[q,X]);S.useImperativeHandle(v,()=>({validate:ae}),[ae]);const re=S.useMemo(()=>({invalid:H,name:h,validityData:X,setValidityData:P,disabled:C,touched:B,setTouched:z,dirty:$,setDirty:F,filled:O,setFilled:U,focused:L,setFocused:I,validate:k,validationMode:f,validationDebounceTime:c,shouldValidateOnChange:j,state:ee,markedDirtyRef:V,validation:q}),[H,h,X,C,B,z,$,F,O,U,L,I,k,f,c,j,ee,q]),fe=gr("div",e,{ref:t,state:ee,props:w,stateAttributesMapping:ll});return T.jsx(ZN.Provider,{value:re,children:fe})}),Vse=S.forwardRef(function(e,t){return T.jsx(Use,{children:T.jsx(qse,{...e,ref:t})})}),YC=({children:e,fullwidth:t,...n})=>T.jsx(Vse,{"data-slot":"field-root",render:T.jsx(Qe,{gap:3,ax:"stretch",fullwidth:t}),...n,children:e});YC.displayName="FieldRoot";const Gse=S.forwardRef(function(e,t){const{render:n,className:r,id:i,nativeLabel:o=!0,...a}=e,l=ul(!1),{controlId:c,setLabelId:f,labelId:h}=Fs(),p=wu(i),m=S.useRef(null),g=Ze(b=>{var w;if((w=io(b.nativeEvent))!=null&&w.closest("button,input,select,textarea")||(!b.defaultPrevented&&b.detail>1&&b.preventDefault(),o||!c))return;const v=dn(b.currentTarget).getElementById(c);Cn(v)&&v.focus({focusVisible:!0})});return We(()=>(p&&f(p),()=>{f(void 0)}),[p,f]),gr("label",e,{ref:[t,m],state:l.state,props:[{id:h},o?{htmlFor:c??void 0,onMouseDown:g}:{onClick:g,onPointerDown(b){b.preventDefault()}},a],stateAttributesMapping:ll})}),WC=({required:e,weight:t="bold",className:n,children:r,...i})=>T.jsx(Gse,{"data-slot":"field-label","data-required":e??void 0,render:T.jsx(Fe,{render:T.jsx("label",{}),weight:t}),className:ze(pu["field-label"],n),...i,children:r});WC.displayName="FieldLabel";const Yse={...ll,...OC},xj=S.forwardRef(function(e,t){const{render:n,id:r,className:i,match:o,...a}=e,l=wu(r),{validityData:c,state:f,name:h}=ul(!1),{setMessageIds:p}=Fs(),{errors:m}=Hf(),g=h?m[h]:null;let b=!1;g||o===!0?b=!0:o?b=!!c.state[o]:b=c.state.valid===!1;const{mounted:v,transitionStatus:w,setMounted:x}=Zb(b);We(()=>{if(!(!b||!l))return p(I=>I.concat(l)),()=>{p(I=>I.filter($=>$!==l))}},[b,l,p]);const k=S.useRef(null),[C,R]=S.useState(null),[_,D]=S.useState(null),M=g||(c.errors.length>1?T.jsx("ul",{children:c.errors.map(I=>T.jsx("li",{children:I},I))}):c.error);let O=c.error;g!=null?O=Array.isArray(g)?JSON.stringify(g):g:c.errors.length>1&&(O=JSON.stringify(c.errors)),b&&O!==_&&(D(O),R(M)),hp({open:b,ref:k,onComplete(){b||x(!1)}});const U={...f,transitionStatus:w},L=gr("div",e,{ref:[t,k],state:U,props:[{id:l,children:b?M:C},a],stateAttributesMapping:Yse,enabled:v});return v?L:null}),wj=e=>T.jsx(xj,{"data-slot":"field-error-tooltip",render:T.jsx(hu,{delay:gj,PositionerProps:{align:"end"},PopupProps:{style:{backgroundColor:"var(--shade-foreground)"}},trigger:T.jsx("span",{className:pu["field-error-tooltip"],children:T.jsx(WY,{color:"var(--shade-foreground)"})})}),...e});wj.displayName="FieldErrorTooltip";const Yy=e=>T.jsx(xj,{"data-slot":"field-error",render:T.jsx(Fe,{shade:"foreground"}),...e});Yy.displayName="FieldError";const Wse=S.forwardRef(function(e,t){const{render:n,id:r,className:i,...o}=e,a=wu(r),l=ul(!1),{setMessageIds:c}=Fs();return We(()=>{if(a)return c(f=>f.concat(a)),()=>{c(f=>f.filter(h=>h!==a))}},[a,c]),gr("p",e,{ref:t,state:l.state,props:[{id:a},o],stateAttributesMapping:ll})}),KC=({children:e,...t})=>T.jsx(Wse,{"data-slot":"field-description",render:T.jsx(Fe,{shade:"muted"}),...t,children:e});KC.displayName="FieldDescription";const XC=({label:e,hint:t,errorType:n="inline",description:r,required:i,RootProps:o,LabelProps:a,ErrorProps:l,HintProps:c,DescriptionProps:f,children:h,...p})=>T.jsxs(YC,{...p,...o,className:ze(n==="absolute"&&pu["field-root-floating"],o==null?void 0:o.className),children:[(e||t||n==="tooltip")&&T.jsxs(ot,{className:pu["field-label-group"],ax:"space-between",ay:"center",children:[e&&T.jsx(WC,{required:i,...a,children:e}),T.jsxs(ot,{ay:"center",children:[n==="tooltip"&&T.jsx(wj,{...l}),t&&T.jsx(yj,{...t,...c})]})]}),h,n==="absolute"&&T.jsx(Yy,{className:pu["field-error-absolute"],...l}),n==="inline"&&T.jsx(Yy,{...l}),r&&T.jsx(KC,{...f,children:r})]});XC.displayName="Field";const Kse="_input_1dqa6_3 _disabled_dkczp_2",fi={input:Kse,"size-small":"_size-small_1dqa6_47","size-medium":"_size-medium_1dqa6_52","size-large":"_size-large_1dqa6_57","toggle-fullwidth":"_toggle-fullwidth_1dqa6_63","toggle-ghost":"_toggle-ghost_1dqa6_68","input-wrapper":"_input-wrapper_1dqa6_87","input-inner":"_input-inner_1dqa6_110","input-slot":"_input-slot_1dqa6_129"},Sj="medium",nv=Yr({variants:{fullwidth:{true:fi["toggle-fullwidth"]},ghost:{true:fi["toggle-ghost"]},size:{small:fi["size-small"],medium:fi["size-medium"],large:fi["size-large"]}},defaultVariants:{size:Sj}}),Ej=({before:e,after:t,size:n,fullwidth:r,ghost:i,className:o,children:a})=>!e&&!t?T.jsx(T.Fragment,{children:a}):T.jsxs(ot,{"data-slot":"input-wrapper",ay:"center",className:ze(fi.input,fi["input-wrapper"],nv({size:n,fullwidth:r,ghost:i}),o),children:[e&&T.jsx("span",{"data-slot":"input-before",className:fi["input-slot"],children:e}),a,t&&T.jsx("span",{"data-slot":"input-after",className:fi["input-slot"],children:t})]});Ej.displayName="InputWrapper";const Xse=S.forwardRef(function(e,t){const{render:n,className:r,id:i,name:o,value:a,disabled:l=!1,onValueChange:c,defaultValue:f,autoFocus:h=!1,...p}=e,{state:m,name:g,disabled:b,setTouched:v,setDirty:w,validityData:x,setFocused:k,setFilled:C,validationMode:R,validation:_}=ul(),D=b||l,M=g??o,O={...m,disabled:D},{labelId:U}=Fs(),L=jC({id:i});We(()=>{var z;const F=a!=null;(z=_.inputRef.current)!=null&&z.value||F&&a!==""?C(!0):F&&a===""&&C(!1)},[_.inputRef,C,a]);const I=S.useRef(null);We(()=>{h&&I.current===Ro(dn(I.current))&&k(!0)},[h,k]);const[$]=Fy({controlled:a,default:f,name:"FieldControl",state:"value"}),B=a!==void 0,V=B?$:void 0;return PC({id:L,name:M,commit:_.commit,value:V,getValue:()=>{var F;return(F=_.inputRef.current)==null?void 0:F.value},controlRef:_.inputRef}),gr("input",e,{ref:[t,I],state:O,props:[{id:L,disabled:D,name:M,ref:_.inputRef,"aria-labelledby":U,autoFocus:h,...B?{value:V}:{defaultValue:f},onChange(F){const z=F.currentTarget.value;c==null||c(z,mn(qf,F.nativeEvent)),w(z!==x.initialValue),C(z!=="")},onFocus(){k(!0)},onBlur(F){v(!0),k(!1),R==="onBlur"&&_.commit(F.currentTarget.value)},onKeyDown(F){F.currentTarget.tagName==="INPUT"&&F.key==="Enter"&&(v(!0),_.commit(F.currentTarget.value))}},_.getInputValidationProps(),p],stateAttributesMapping:ll})}),Qse=S.forwardRef(function(e,t){return T.jsx(Xse,{ref:t,...e})}),Cj=({label:e,description:t,required:n,name:r,size:i,fullwidth:o,ghost:a,before:l,after:c,FieldProps:f,className:h,ref:p,...m})=>{const g=!!(l||c);return T.jsx(mi,{condition:!!(e||t),render:T.jsx(XC,{name:r,label:e,description:t,required:n,...f}),children:T.jsx(Ej,{before:l,after:c,size:i,fullwidth:o,ghost:a,children:T.jsx(Qse,{"data-slot":"input",ref:p,name:r,className:ze(fi.input,g?fi["input-inner"]:nv({size:i,fullwidth:o,ghost:a}),h),...m})})})};Cj.displayName="Input";let QC=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=zh.startingStyle]="startingStyle",e[e.endingStyle=zh.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),KS=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const Zse={[KS.popupOpen]:""},Jse={[KS.popupOpen]:"",[KS.pressed]:""},eae={[QC.open]:""},tae={[QC.closed]:""},nae={[QC.anchorHidden]:""},rae={open(e){return e?Zse:null}},iae={open(e){return e?Jse:null}},kj={open(e){return e?eae:tae},anchorHidden(e){return e?nae:null}},oae=S.createContext(void 0);function sae(){var e;return((e=S.useContext(oae))==null?void 0:e.direction)??"ltr"}const Wy=S.forwardRef(function(e,t){const[n,r]=S.useState();return We(()=>{Roe&&r("button")},[]),T.jsx("span",{...e,ref:t,style:Vb,"aria-hidden":n?void 0:!0,tabIndex:0,role:n,"data-base-ui-focus-guard":""})}),aae={style:{transition:"none"}},lae="data-base-ui-click-trigger",uae={fallbackAxisSide:"none"},cae={clipPath:"inset(50%)",position:"fixed",top:0,left:0};var fae=["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] *)"],Ky=fae.join(","),Rj=typeof Element>"u",Ef=Rj?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Xy=!Rj&&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},Qy=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]"):Qy(e.parentNode));return o},dae=function(e){var t,n=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return n===""||n==="true"},Aj=function(e,t,n){if(Qy(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Ky));return t&&Ef.call(e,Ky)&&r.unshift(e),r=r.filter(n),r},Zy=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var o=i.shift();if(!Qy(o,!1))if(o.tagName==="SLOT"){var a=o.assignedElements(),l=a.length?a:o.children,c=Zy(l,!0,n);n.flatten?r.push.apply(r,c):r.push({scopeParent:o,candidates:c})}else{var f=Ef.call(o,Ky);f&&n.filter(o)&&(t||!e.includes(o))&&r.push(o);var h=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),p=!Qy(h,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(h&&p){var m=Zy(h===!0?o.children:h.children,!0,n);n.flatten?r.push.apply(r,m):r.push({scopeParent:o,candidates:m})}else i.unshift.apply(i,o.children)}}return r},Tj=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},_j=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||dae(e))&&!Tj(e)?0:e.tabIndex},hae=function(e,t){var n=_j(e);return n<0&&t&&!Tj(e)?0:n},pae=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Dj=function(e){return e.tagName==="INPUT"},mae=function(e){return Dj(e)&&e.type==="hidden"},gae=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return t},yae=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},bae=function(e){if(!e.name)return!0;var t=e.form||Xy(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=yae(r,e.form);return!i||i===e},vae=function(e){return Dj(e)&&e.type==="radio"},xae=function(e){return vae(e)&&!bae(e)},wae=function(e){var t,n=e&&Xy(e),r=(t=n)===null||t===void 0?void 0:t.host,i=!1;if(n&&n!==e){var o,a,l;for(i=!!((o=r)!==null&&o!==void 0&&(a=o.ownerDocument)!==null&&a!==void 0&&a.contains(r)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!i&&r;){var c,f,h;n=Xy(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},o$=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},Sae=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=Ef.call(e,"details>summary:first-of-type"),a=o?e.parentElement:e;if(Ef.call(a,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof r=="function"){for(var l=e;e;){var c=e.parentElement,f=Xy(e);if(c&&!c.shadowRoot&&r(c)===!0)return o$(e);e.assignedSlot?e=e.assignedSlot:!c&&f!==e.ownerDocument?e=f.host:e=c}e=l}if(wae(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return o$(e);return!1},Eae=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 Ef.call(t,"fieldset[disabled] *")?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},XS=function(e,t){return!(t.disabled||mae(t)||Sae(t,e)||gae(t)||Eae(t))},QS=function(e,t){return!(xae(t)||_j(t)<0||!XS(e,t))},Cae=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Mj=function(e){var t=[],n=[];return e.forEach(function(r,i){var o=!!r.scopeParent,a=o?r.scopeParent:r,l=hae(a,o),c=o?Mj(r.candidates):a;l===0?o?t.push.apply(t,c):t.push(a):n.push({documentOrder:i,tabIndex:l,item:r,isScope:o,content:c})}),n.sort(pae).reduce(function(r,i){return i.isScope?r.push.apply(r,i.content):r.push(i.content),r},[]).concat(t)},rv=function(e,t){t=t||{};var n;return t.getShadowRoot?n=Zy([e],t.includeContainer,{filter:QS.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Cae}):n=Aj(e,t.includeContainer,QS.bind(null,t)),Mj(n)},kae=function(e,t){t=t||{};var n;return t.getShadowRoot?n=Zy([e],t.includeContainer,{filter:XS.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):n=Aj(e,t.includeContainer,XS.bind(null,t)),n},$j=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return Ef.call(e,Ky)===!1?!1:QS(t,e)};const mp=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Oj(e,t){const n=rv(e,mp()),r=n.length;if(r===0)return;const i=Ro(dn(e)),o=n.indexOf(i),a=o===-1?t===1?0:r-1:o+t;return n[a]}function Pj(e){return Oj(dn(e).body,1)||e}function Ij(e){return Oj(dn(e).body,-1)||e}function yh(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!on(n,r)}function Rae(e){rv(e,mp()).forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")})}function s$(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 Lj=S.createContext(null),Nj=()=>S.useContext(Lj),Aae=Uy("portal");function Tae(e={}){var b;const{ref:t,container:n,componentProps:r=Sr,elementProps:i}=e,o=NC(),a=(b=Nj())==null?void 0:b.portalNode,[l,c]=S.useState(null),[f,h]=S.useState(null),p=Ze(v=>{v!==null&&h(v)}),m=S.useRef(null);We(()=>{if(n===null){m.current&&(m.current=null,h(null),c(null));return}if(o==null)return;const v=(n&&(IC(n)?n:n.current))??a??document.body;if(v==null){m.current&&(m.current=null,h(null),c(null));return}m.current!==v&&(m.current=v,h(null),c(v))},[n,a,o]);const g=gr("div",r,{ref:[t,p],props:[{id:o,[Aae]:""},i]});return{portalNode:f,portalSubtree:l&&g?Rn.createPortal(g,l):null}}const _ae=S.forwardRef(function(e,t){const{children:n,container:r,className:i,render:o,renderGuards:a,...l}=e,{portalNode:c,portalSubtree:f}=Tae({container:r,ref:t,componentProps:e,elementProps:l}),h=S.useRef(null),p=S.useRef(null),m=S.useRef(null),g=S.useRef(null),[b,v]=S.useState(null),w=b==null?void 0:b.modal,x=b==null?void 0:b.open,k=typeof a=="boolean"?a:!!b&&!b.modal&&b.open&&!!c;S.useEffect(()=>{if(!c||w)return;function R(_){c&&_.relatedTarget&&yh(_)&&(_.type==="focusin"?s$:Rae)(c)}return c.addEventListener("focusin",R,!0),c.addEventListener("focusout",R,!0),()=>{c.removeEventListener("focusin",R,!0),c.removeEventListener("focusout",R,!0)}},[c,w]),S.useEffect(()=>{!c||x||s$(c)},[x,c]);const C=S.useMemo(()=>({beforeOutsideRef:h,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:g,portalNode:c,setFocusManagerState:v}),[c]);return T.jsxs(S.Fragment,{children:[f,T.jsxs(Lj.Provider,{value:C,children:[k&&c&&T.jsx(Wy,{"data-type":"outside",ref:h,onFocus:R=>{var _,D;if(yh(R,c))(_=m.current)==null||_.focus();else{const M=b?b.domReference:null;(D=Ij(M))==null||D.focus()}}}),k&&c&&T.jsx("span",{"aria-owns":c.id,style:cae}),c&&Rn.createPortal(n,c),k&&c&&T.jsx(Wy,{"data-type":"outside",ref:p,onFocus:R=>{var _,D;if(yh(R,c))(_=g.current)==null||_.focus();else{const M=b?b.domReference:null;(D=Pj(M))==null||D.focus(),b!=null&&b.closeOnFocusOut&&(b==null||b.onOpenChange(!1,mn(ev,R.nativeEvent)))}}})]})]})});function Dae(e){return zC(19)?e:e?"true":void 0}let a$={},l$={},u$="";function Mae(e){if(typeof document>"u")return!1;const t=dn(e);return Un(t).innerWidth-t.documentElement.clientWidth>0}function $ae(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const t=dn(e),n=t.documentElement,r=t.body,i=fl(n)?n:r,o=i.style.overflowY,a=n.style.scrollbarGutter;n.style.scrollbarGutter="stable",i.style.overflowY="scroll";const l=i.offsetWidth;i.style.overflowY="hidden";const c=i.offsetWidth;return i.style.overflowY=o,n.style.scrollbarGutter=a,l===c}function Oae(e){const t=dn(e),n=t.documentElement,r=t.body,i=fl(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 Pae(e){var m;const t=dn(e),n=t.documentElement,r=t.body,i=Un(n);let o=0,a=0,l=!1;const c=Sa.create();if(FC&&(((m=i.visualViewport)==null?void 0:m.scale)??1)!==1)return()=>{};function f(){const g=i.getComputedStyle(n),b=i.getComputedStyle(r),v=(g.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";o=n.scrollTop,a=n.scrollLeft,a$={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},u$=n.style.scrollBehavior,l$={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 w=n.scrollHeight>n.clientHeight,x=n.scrollWidth>n.clientWidth,k=g.overflowY==="scroll"||b.overflowY==="scroll",C=g.overflowX==="scroll"||b.overflowX==="scroll",R=Math.max(0,i.innerWidth-r.clientWidth),_=Math.max(0,i.innerHeight-r.clientHeight),D=parseFloat(b.marginTop)+parseFloat(b.marginBottom),M=parseFloat(b.marginLeft)+parseFloat(b.marginRight),O=fl(n)?n:r;if(l=$ae(e),l){n.style.scrollbarGutter=v,O.style.overflowY="hidden",O.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:v,overflowY:"hidden",overflowX:"hidden"}),(w||k)&&(n.style.overflowY="scroll"),(x||C)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:D||_?`calc(100dvh - ${D+_}px)`:"100dvh",width:M||R?`calc(100vw - ${M+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,a$),Object.assign(r.style,l$),l||(n.scrollTop=o,n.scrollLeft=a,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=u$)}function p(){h(),c.request(f)}return f(),i.addEventListener("resize",p),()=>{c.cancel(),h(),typeof i.removeEventListener=="function"&&i.removeEventListener("resize",p)}}class Iae{constructor(){ce(this,"lockCount",0);ce(this,"restore",null);ce(this,"timeoutLock",Hy.create());ce(this,"timeoutUnlock",Hy.create());ce(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});ce(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=dn(t).documentElement,r=Un(n).getComputedStyle(n).overflowY;if(r==="hidden"||r==="clip"){this.restore=hr;return}const i=rj||!Mae(t);this.restore=i?Oae(t):Pae(t)}}const Lae=new Iae;function Nae(e=!0,t=null){We(()=>{if(e)return Lae.acquire(t)},[e,t])}const jae=e=>({name:"arrow",options:e,async fn(t){var X,P;const{x:n,y:r,placement:i,rects:o,platform:a,elements:l,middlewareData:c}=t,{element:f,padding:h=0,offsetParent:p="real"}=Is(e,t)||{};if(f==null)return{};const m=mj(h),g={x:n,y:r},b=GC(i),v=VC(b),w=await a.getDimensions(f),x=b==="y",k=x?"top":"left",C=x?"bottom":"right",R=x?"clientHeight":"clientWidth",_=o.reference[v]+o.reference[b]-g[b]-o.floating[v],D=g[b]-o.reference[b],M=p==="real"?await((X=a.getOffsetParent)==null?void 0:X.call(a,f)):l.floating;let O=l.floating[R]||o.floating[v];(!O||!await((P=a.isElement)==null?void 0:P.call(a,M)))&&(O=l.floating[R]||o.floating[v]);const U=_/2-D/2,L=O/2-w[v]/2-1,I=Math.min(m[k],L),$=Math.min(m[C],L),B=I,V=O-w[v]-$,F=O/2-w[v]/2+U,z=qS(B,F,V),j=!c.arrow&&dl(i)!=null&&F!==z&&o.reference[v]/2-(F<B?I:$)-w[v]/2<0,H=j?F<B?F-B:F-V:0;return{[b]:g[b]+H,data:{[b]:z,centerOffset:F-z-H,...j&&{alignmentOffset:H}},reset:j}}}),Fae=(e,t)=>({...jae(e),options:[e,t]});function c$(e,t,n){let{reference:r,floating:i}=e;const o=Gi(t),a=GC(t),l=VC(a),c=di(t),f=o==="y",h=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,m=r[l]/2-i[l]/2;let g;switch(c){case"top":g={x:h,y:r.y-i.height};break;case"bottom":g={x:h,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:p};break;case"left":g={x:r.x-i.width,y:p};break;default:g={x:r.x,y:r.y}}switch(dl(t)){case"start":g[a]-=m*(n&&f?-1:1);break;case"end":g[a]+=m*(n&&f?-1:1);break}return g}async function zae(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:l,strategy:c}=e,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:m=!1,padding:g=0}=Is(t,e),b=mj(g),v=l[m?p==="floating"?"reference":"floating":p],w=Gy(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(l.floating)),boundary:f,rootBoundary:h,strategy:c})),x=p==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l.floating)),C=await(o.isElement==null?void 0:o.isElement(k))?await(o.getScale==null?void 0:o.getScale(k))||{x:1,y:1}:{x:1,y:1},R=Gy(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:x,offsetParent:k,strategy:c}):x);return{top:(w.top-R.top+b.top)/C.y,bottom:(R.bottom-w.bottom+b.bottom)/C.y,left:(w.left-R.left+b.left)/C.x,right:(R.right-w.right+b.right)/C.x}}const Bae=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,l=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}=c$(f,r,c),m=r,g={},b=0;for(let w=0;w<l.length;w++){var v;const{name:x,fn:k}=l[w],{x:C,y:R,data:_,reset:D}=await k({x:h,y:p,initialPlacement:r,placement:m,strategy:i,middlewareData:g,rects:f,platform:{...a,detectOverflow:(v=a.detectOverflow)!=null?v:zae},elements:{reference:e,floating:t}});h=C??h,p=R??p,g={...g,[x]:{...g[x],..._}},D&&b<=50&&(b++,typeof D=="object"&&(D.placement&&(m=D.placement),D.rects&&(f=D.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):D.rects),{x:h,y:p}=c$(f,m,c)),w=-1)}return{x:h,y:p,placement:m,strategy:i,middlewareData:g}},Hae=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:l,platform:c,elements:f}=t,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0,...w}=Is(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const x=di(i),k=Gi(l),C=di(l)===l,R=await(c.isRTL==null?void 0:c.isRTL(f.floating)),_=m||(C||!v?[Vy(l)]:dse(l)),D=b!=="none";!m&&D&&_.push(...gse(l,v,b,R));const M=[l,..._],O=await c.detectOverflow(t,w),U=[];let L=((r=o.flip)==null?void 0:r.overflows)||[];if(h&&U.push(O[x]),p){const V=fse(i,a,R);U.push(O[V[0]],O[V[1]])}if(L=[...L,{placement:i,overflows:U}],!U.every(V=>V<=0)){var I,$;const V=(((I=o.flip)==null?void 0:I.index)||0)+1,F=M[V];if(F&&(!(p==="alignment"&&k!==Gi(F))||L.every(j=>Gi(j.placement)===k?j.overflows[0]>0:!0)))return{data:{index:V,overflows:L},reset:{placement:F}};let z=($=L.filter(j=>j.overflows[0]<=0).sort((j,H)=>j.overflows[1]-H.overflows[1])[0])==null?void 0:$.placement;if(!z)switch(g){case"bestFit":{var B;const j=(B=L.filter(H=>{if(D){const X=Gi(H.placement);return X===k||X==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(X=>X>0).reduce((X,P)=>X+P,0)]).sort((H,X)=>H[1]-X[1])[0])==null?void 0:B[0];j&&(z=j);break}case"initialPlacement":z=l;break}if(i!==z)return{reset:{placement:z}}}return{}}}};function f$(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function d$(e){return ase.some(t=>e[t]>=0)}const Uae=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"}),l=f$(a,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:d$(l)}}}case"escaped":{const a=await r.detectOverflow(t,{...o,altBoundary:!0}),l=f$(a,n.floating);return{data:{escapedOffsets:l,escaped:d$(l)}}}default:return{}}}}},jj=new Set(["left","top"]);async function qae(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=di(n),l=dl(n),c=Gi(n)==="y",f=jj.has(a)?-1:1,h=o&&c?-1:1,p=Is(t,e);let{mainAxis:m,crossAxis:g,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof b=="number"&&(g=l==="end"?b*-1:b),c?{x:g*h,y:m*f}:{x:m*f,y:g*h}}const Vae=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:l}=t,c=await qae(t,e);return a===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:o+c.y,data:{...c,placement:a}}}}},Gae=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:l=!1,limiter:c={fn:x=>{let{x:k,y:C}=x;return{x:k,y:C}}},...f}=Is(e,t),h={x:n,y:r},p=await o.detectOverflow(t,f),m=Gi(di(i)),g=qC(m);let b=h[g],v=h[m];if(a){const x=g==="y"?"top":"left",k=g==="y"?"bottom":"right",C=b+p[x],R=b-p[k];b=qS(C,b,R)}if(l){const x=m==="y"?"top":"left",k=m==="y"?"bottom":"right",C=v+p[x],R=v-p[k];v=qS(C,v,R)}const w=c.fn({...t,[g]:b,[m]:v});return{...w,data:{x:w.x-n,y:w.y-r,enabled:{[g]:a,[m]:l}}}}}},Yae=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:l=0,mainAxis:c=!0,crossAxis:f=!0}=Is(e,t),h={x:n,y:r},p=Gi(i),m=qC(p);let g=h[m],b=h[p];const v=Is(l,t),w=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const C=m==="y"?"height":"width",R=o.reference[m]-o.floating[C]+w.mainAxis,_=o.reference[m]+o.reference[C]-w.mainAxis;g<R?g=R:g>_&&(g=_)}if(f){var x,k;const C=m==="y"?"width":"height",R=jj.has(di(i)),_=o.reference[p]-o.floating[C]+(R&&((x=a.offset)==null?void 0:x[p])||0)+(R?0:w.crossAxis),D=o.reference[p]+o.reference[C]+(R?0:((k=a.offset)==null?void 0:k[p])||0)-(R?w.crossAxis:0);b<_?b=_:b>D&&(b=D)}return{[m]:g,[p]:b}}}},Wae=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:l}=t,{apply:c=()=>{},...f}=Is(e,t),h=await a.detectOverflow(t,f),p=di(i),m=dl(i),g=Gi(i)==="y",{width:b,height:v}=o.floating;let w,x;p==="top"||p==="bottom"?(w=p,x=m===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(x=p,w=m==="end"?"top":"bottom");const k=v-h.top-h.bottom,C=b-h.left-h.right,R=Sf(v-h[w],k),_=Sf(b-h[x],C),D=!t.middlewareData.shift;let M=R,O=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(O=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(M=k),D&&!m){const L=ai(h.left,0),I=ai(h.right,0),$=ai(h.top,0),B=ai(h.bottom,0);g?O=b-2*(L!==0||I!==0?L+I:ai(h.left,h.right)):M=v-2*($!==0||B!==0?$+B:ai(h.top,h.bottom))}await c({...t,availableWidth:O,availableHeight:M});const U=await a.getDimensions(l.floating);return b!==U.width||v!==U.height?{reset:{rects:!0}}:{}}}};function Fj(e){const t=bi(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Cn(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,l=qy(n)!==o||qy(r)!==a;return l&&(n=o,r=a),{width:n,height:r,$:l}}function ZC(e){return vn(e)?e:e.contextElement}function Yc(e){const t=ZC(e);if(!Cn(t))return Mo(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=Fj(t);let a=(o?qy(n.width):n.width)/r,l=(o?qy(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const Kae=Mo(0);function zj(e){const t=Un(e);return!Xb()||!t.visualViewport?Kae:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Xae(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Un(e)?!1:t}function Su(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=ZC(e);let a=Mo(1);t&&(r?vn(r)&&(a=Yc(r)):a=Yc(e));const l=Xae(o,n,r)?zj(o):Mo(0);let c=(i.left+l.x)/a.x,f=(i.top+l.y)/a.y,h=i.width/a.x,p=i.height/a.y;if(o){const m=Un(o),g=r&&vn(r)?Un(r):r;let b=m,v=FS(b);for(;v&&r&&g!==b;){const w=Yc(v),x=v.getBoundingClientRect(),k=bi(v),C=x.left+(v.clientLeft+parseFloat(k.paddingLeft))*w.x,R=x.top+(v.clientTop+parseFloat(k.paddingTop))*w.y;c*=w.x,f*=w.y,h*=w.x,p*=w.y,c+=C,f+=R,b=Un(v),v=FS(b)}}return Gy({width:h,height:p,x:c,y:f})}function iv(e,t){const n=Qb(e).scrollLeft;return t?t.left+n:Su(zo(e)).left+n}function Bj(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-iv(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function Qae(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=zo(r),l=t?Kb(t.floating):!1;if(r===a||l&&o)return n;let c={scrollLeft:0,scrollTop:0},f=Mo(1);const h=Mo(0),p=Cn(r);if((p||!p&&!o)&&((cl(r)!=="body"||fl(a))&&(c=Qb(r)),Cn(r))){const g=Su(r);f=Yc(r),h.x=g.x+r.clientLeft,h.y=g.y+r.clientTop}const m=a&&!p&&!o?Bj(a,c):Mo(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-c.scrollLeft*f.x+h.x+m.x,y:n.y*f.y-c.scrollTop*f.y+h.y+m.y}}function Zae(e){return Array.from(e.getClientRects())}function Jae(e){const t=zo(e),n=Qb(e),r=e.ownerDocument.body,i=ai(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=ai(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+iv(e);const l=-n.scrollTop;return bi(r).direction==="rtl"&&(a+=ai(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:l}}const h$=25;function ele(e,t){const n=Un(e),r=zo(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,l=0,c=0;if(i){o=i.width,a=i.height;const h=Xb();(!h||h&&t==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}const f=iv(r);if(f<=0){const h=r.ownerDocument,p=h.body,m=getComputedStyle(p),g=h.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,b=Math.abs(r.clientWidth-p.clientWidth-g);b<=h$&&(o-=b)}else f<=h$&&(o+=f);return{width:o,height:a,x:l,y:c}}const tle=new Set(["absolute","fixed"]);function nle(e,t){const n=Su(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Cn(e)?Yc(e):Mo(1),a=e.clientWidth*o.x,l=e.clientHeight*o.y,c=i*o.x,f=r*o.y;return{width:a,height:l,x:c,y:f}}function p$(e,t,n){let r;if(t==="viewport")r=ele(e,n);else if(t==="document")r=Jae(zo(e));else if(vn(t))r=nle(t,n);else{const i=zj(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Gy(r)}function Hj(e,t){const n=Ps(e);return n===t||!vn(n)||As(n)?!1:bi(n).position==="fixed"||Hj(n,t)}function rle(e,t){const n=t.get(e);if(n)return n;let r=Ya(e,[],!1).filter(l=>vn(l)&&cl(l)!=="body"),i=null;const o=bi(e).position==="fixed";let a=o?Ps(e):e;for(;vn(a)&&!As(a);){const l=bi(a),c=LC(a);!c&&l.position==="fixed"&&(i=null),(o?!c&&!i:!c&&l.position==="static"&&i&&tle.has(i.position)||fl(a)&&!c&&Hj(e,a))?r=r.filter(f=>f!==a):i=l,a=Ps(a)}return t.set(e,r),r}function ile(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?Kb(t)?[]:rle(t,this._c):[].concat(n),r],a=o[0],l=o.reduce((c,f)=>{const h=p$(t,f,i);return c.top=ai(h.top,c.top),c.right=Sf(h.right,c.right),c.bottom=Sf(h.bottom,c.bottom),c.left=ai(h.left,c.left),c},p$(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function ole(e){const{width:t,height:n}=Fj(e);return{width:t,height:n}}function sle(e,t,n){const r=Cn(t),i=zo(t),o=n==="fixed",a=Su(e,!0,o,t);let l={scrollLeft:0,scrollTop:0};const c=Mo(0);function f(){c.x=iv(i)}if(r||!r&&!o)if((cl(t)!=="body"||fl(i))&&(l=Qb(t)),r){const g=Su(t,!0,o,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop}else i&&f();o&&!r&&i&&f();const h=i&&!r&&!o?Bj(i,l):Mo(0),p=a.left+l.scrollLeft-c.x-h.x,m=a.top+l.scrollTop-c.y-h.y;return{x:p,y:m,width:a.width,height:a.height}}function Gx(e){return bi(e).position==="static"}function m$(e,t){if(!Cn(e)||bi(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return zo(e)===n&&(n=n.ownerDocument.body),n}function Uj(e,t){const n=Un(e);if(Kb(e))return n;if(!Cn(e)){let i=Ps(e);for(;i&&!As(i);){if(vn(i)&&!Gx(i))return i;i=Ps(i)}return n}let r=m$(e,t);for(;r&&goe(r)&&Gx(r);)r=m$(r,t);return r&&As(r)&&Gx(r)&&!LC(r)?n:r||woe(e)||n}const ale=async function(e){const t=this.getOffsetParent||Uj,n=this.getDimensions,r=await n(e.floating);return{reference:sle(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function lle(e){return bi(e).direction==="rtl"}const ule={convertOffsetParentRelativeRectToViewportRelativeRect:Qae,getDocumentElement:zo,getClippingRect:ile,getOffsetParent:Uj,getElementRects:ale,getClientRects:Zae,getDimensions:ole,getScale:Yc,isElement:vn,isRTL:lle};function qj(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function cle(e,t){let n=null,r;const i=zo(e);function o(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),o();const f=e.getBoundingClientRect(),{left:h,top:p,width:m,height:g}=f;if(l||t(),!m||!g)return;const b=Nc(p),v=Nc(i.clientWidth-(h+m)),w=Nc(i.clientHeight-(p+g)),x=Nc(h),k={rootMargin:-b+"px "+-v+"px "+-w+"px "+-x+"px",threshold:ai(0,Sf(1,c))||1};let C=!0;function R(_){const D=_[0].intersectionRatio;if(D!==c){if(!C)return a();D?a(!1,D):r=setTimeout(()=>{a(!1,1e-7)},1e3)}D===1&&!qj(f,e.getBoundingClientRect())&&a(),C=!1}try{n=new IntersectionObserver(R,{...k,root:i.ownerDocument})}catch{n=new IntersectionObserver(R,k)}n.observe(e)}return a(!0),o}function g$(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,f=ZC(e),h=i||o?[...f?Ya(f):[],...Ya(t)]:[];h.forEach(x=>{i&&x.addEventListener("scroll",n,{passive:!0}),o&&x.addEventListener("resize",n)});const p=f&&l?cle(f,n):null;let m=-1,g=null;a&&(g=new ResizeObserver(x=>{let[k]=x;k&&k.target===f&&g&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var C;(C=g)==null||C.observe(t)})),n()}),f&&!c&&g.observe(f),g.observe(t));let b,v=c?Su(e):null;c&&w();function w(){const x=Su(e);v&&!qj(v,x)&&n(),v=x,b=requestAnimationFrame(w)}return n(),()=>{var x;h.forEach(k=>{i&&k.removeEventListener("scroll",n),o&&k.removeEventListener("resize",n)}),p==null||p(),(x=g)==null||x.disconnect(),g=null,c&&cancelAnimationFrame(b)}}const fle=Vae,dle=Gae,hle=Hae,ple=Wae,mle=Uae,gle=Yae,yle=(e,t,n)=>{const r=new Map,i={platform:ule,...n},o={...i.platform,_c:r};return Bae(e,t,{...i,platform:o})};var ble=typeof document<"u",vle=function(){},Qg=ble?S.useLayoutEffect:vle;function Jy(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(!Jy(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)&&!Jy(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Vj(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function y$(e,t){const n=Vj(e);return Math.round(t*n)/n}function Yx(e){const t=S.useRef(e);return Qg(()=>{t.current=e}),t}function xle(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:l=!0,whileElementsMounted:c,open:f}=e,[h,p]=S.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,g]=S.useState(r);Jy(m,r)||g(r);const[b,v]=S.useState(null),[w,x]=S.useState(null),k=S.useCallback(H=>{H!==D.current&&(D.current=H,v(H))},[]),C=S.useCallback(H=>{H!==M.current&&(M.current=H,x(H))},[]),R=o||b,_=a||w,D=S.useRef(null),M=S.useRef(null),O=S.useRef(h),U=c!=null,L=Yx(c),I=Yx(i),$=Yx(f),B=S.useCallback(()=>{if(!D.current||!M.current)return;const H={placement:t,strategy:n,middleware:m};I.current&&(H.platform=I.current),yle(D.current,M.current,H).then(X=>{const P={...X,isPositioned:$.current!==!1};V.current&&!Jy(O.current,P)&&(O.current=P,Rn.flushSync(()=>{p(P)}))})},[m,t,n,I,$]);Qg(()=>{f===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,p(H=>({...H,isPositioned:!1})))},[f]);const V=S.useRef(!1);Qg(()=>(V.current=!0,()=>{V.current=!1}),[]),Qg(()=>{if(R&&(D.current=R),_&&(M.current=_),R&&_){if(L.current)return L.current(R,_,B);B()}},[R,_,B,L,U]);const F=S.useMemo(()=>({reference:D,floating:M,setReference:k,setFloating:C}),[k,C]),z=S.useMemo(()=>({reference:R,floating:_}),[R,_]),j=S.useMemo(()=>{const H={position:n,left:0,top:0};if(!z.floating)return H;const X=y$(z.floating,h.x),P=y$(z.floating,h.y);return l?{...H,transform:"translate("+X+"px, "+P+"px)",...Vj(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:X,top:P}},[n,l,z.floating,h.x,h.y]);return S.useMemo(()=>({...h,update:B,refs:F,elements:z,floatingStyles:j}),[h,B,F,z,j])}const wle=(e,t)=>({...fle(e),options:[e,t]}),Sle=(e,t)=>({...dle(e),options:[e,t]}),Ele=(e,t)=>({...gle(e),options:[e,t]}),Cle=(e,t)=>({...hle(e),options:[e,t]}),kle=(e,t)=>({...ple(e),options:[e,t]}),Rle=(e,t)=>({...mle(e),options:[e,t]}),Ale={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 Rle().fn(e)).data)==null?void 0:a.referenceHidden)||o}}}},Tle={sideX:"left",sideY:"top"};function _le(e={}){const{nodeId:t,externalTree:n}=e,r=hj(e),i=e.rootContext||r,o={reference:i.useState("referenceElement"),floating:i.useState("floatingElement"),domReference:i.useState("domReferenceElement")},[a,l]=S.useState(null),c=S.useRef(null),f=Jb(n);We(()=>{o.domReference&&(c.current=o.domReference)},[o.domReference]);const h=xle({...e,elements:{...o,...a&&{reference:a}}}),p=S.useCallback(M=>{const O=vn(M)?{getBoundingClientRect:()=>M.getBoundingClientRect(),getClientRects:()=>M.getClientRects(),contextElement:M}:M;l(O),h.refs.setReference(O)},[h.refs]),[m,g]=S.useState(null),[b,v]=S.useState(null);i.useSyncedValue("referenceElement",m),i.useSyncedValue("domReferenceElement",vn(m)?m:null),i.useSyncedValue("floatingElement",b);const w=S.useCallback(M=>{(vn(M)||M===null)&&(c.current=M,g(M)),(vn(h.refs.reference.current)||h.refs.reference.current===null||M!==null&&!vn(M))&&h.refs.setReference(M)},[h.refs,g]),x=S.useCallback(M=>{v(M),h.refs.setFloating(M)},[h.refs]),k=S.useMemo(()=>({...h.refs,setReference:w,setFloating:x,setPositionReference:p,domReference:c}),[h.refs,w,x,p]),C=S.useMemo(()=>({...h.elements,domReference:o.domReference}),[h.elements,o.domReference]),R=i.useState("open"),_=i.useState("floatingId"),D=S.useMemo(()=>({...h,dataRef:i.context.dataRef,open:R,onOpenChange:i.setOpen,events:i.context.events,floatingId:_,refs:k,elements:C,nodeId:t,rootStore:i}),[h,k,C,t,i,R,_]);return We(()=>{i.context.dataRef.current.floatingContext=D;const M=f==null?void 0:f.nodesRef.current.find(O=>O.id===t);M&&(M.context=D)}),S.useMemo(()=>({...h,context:D,refs:k,elements:C,rootStore:i}),[h,k,C,D,i])}function Gj(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 b$(e,t,n){const{rects:r,placement:i}=e;return{side:Gj(t,di(i),n),align:dl(i)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Dle(e){var Le,Be;const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:a=0,collisionBoundary:l,collisionPadding:c=5,sticky:f=!1,arrowPadding:h=5,disableAnchorTracking:p=!1,keepMounted:m=!1,floatingRootContext:g,mounted:b,collisionAvoidance:v,shiftCrossAxis:w=!1,nodeId:x,adaptiveOrigin:k,lazyFlip:C=!1,externalTree:R}=e,[_,D]=S.useState(null);!b&&_!==null&&D(null);const M=v.side||"flip",O=v.align||"flip",U=v.fallbackAxisSide||"end",L=typeof t=="function"?t:void 0,I=Ze(L),$=L?I:t,B=zr(t),V=sae()==="rtl",F=_||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":V?"left":"right","inline-start":V?"right":"left"}[r],z=o==="center"?F:`${F}-${o}`;let j=c;const H=1,X=r==="bottom"?H:0,P=r==="top"?H:0,K=r==="right"?H:0,ee=r==="left"?H:0;typeof j=="number"?j={top:j+X,right:j+ee,bottom:j+P,left:j+K}:j&&(j={top:(j.top||0)+X,right:(j.right||0)+ee,bottom:(j.bottom||0)+P,left:(j.left||0)+K});const q={boundary:l==="clipping-ancestors"?"clippingAncestors":l,padding:j},ae=S.useRef(null),re=zr(i),fe=zr(a),ve=[wle($e=>{const Ye=b$($e,r,V),Je=typeof re.current=="function"?re.current(Ye):re.current,et=typeof fe.current=="function"?fe.current(Ye):fe.current;return{mainAxis:Je,crossAxis:et,alignmentAxis:et}},[typeof i!="function"?i:0,typeof a!="function"?a:0,V,r])],Re=O==="none"&&M!=="shift",le=!Re&&(f||w||M==="shift"),Ae=M==="none"?null:Cle({...q,padding:{top:j.top+H,right:j.right+H,bottom:j.bottom+H,left:j.left+H},mainAxis:!w&&M==="flip",crossAxis:O==="flip"?"alignment":!1,fallbackAxisSideDirection:U}),Ie=Re?null:Sle($e=>{const Ye=dn($e.elements.floating).documentElement;return{...q,rootBoundary:w?{x:0,y:0,width:Ye.clientWidth,height:Ye.clientHeight}:void 0,mainAxis:O!=="none",crossAxis:le,limiter:f||w?void 0:Ele(Je=>{if(!ae.current)return{};const{width:et,height:tt}=ae.current.getBoundingClientRect(),jt=Gi(di(Je.placement)),kt=jt==="y"?et:tt,Ot=jt==="y"?j.left+j.right:j.top+j.bottom;return{offset:kt/2+Ot/2}})}},[q,f,w,j,O]);M==="shift"||O==="shift"||o==="center"?ve.push(Ie,Ae):ve.push(Ae,Ie),ve.push(kle({...q,apply({elements:{floating:$e},rects:{reference:Ye},availableWidth:Je,availableHeight:et}){const tt=$e.style;tt.setProperty("--available-width",`${Je}px`),tt.setProperty("--available-height",`${et}px`),tt.setProperty("--anchor-width",`${Ye.width}px`),tt.setProperty("--anchor-height",`${Ye.height}px`)}}),Fae(()=>({element:ae.current||document.createElement("div"),padding:h,offsetParent:"floating"}),[h]),{name:"transformOrigin",fn($e){var fo,or,un;const{elements:Ye,middlewareData:Je,placement:et,rects:tt,y:jt}=$e,kt=di(et),Ot=Gi(kt),zt=ae.current,Dn=((fo=Je.arrow)==null?void 0:fo.x)||0,Tr=((or=Je.arrow)==null?void 0:or.y)||0,Vn=(zt==null?void 0:zt.clientWidth)||0,Kr=(zt==null?void 0:zt.clientHeight)||0,Nn=Dn+Vn/2,rt=Tr+Kr/2,Ut=Math.abs(((un=Je.shift)==null?void 0:un.y)||0),an=tt.reference.height/2,Jt=typeof i=="function"?i(b$($e,r,V)):i,gn=Ut>Jt,Ki={top:`${Nn}px calc(100% + ${Jt}px)`,bottom:`${Nn}px ${-Jt}px`,left:`calc(100% + ${Jt}px) ${rt}px`,right:`${-Jt}px ${rt}px`}[kt],Si=`${Nn}px ${tt.reference.y+an-jt}px`;return Ye.floating.style.setProperty("--transform-origin",le&&Ot==="y"&&gn?Si:Ki),{}}},Ale,k),We(()=>{!b&&g&&g.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[b,g]);const Y=S.useMemo(()=>({elementResize:!p&&typeof ResizeObserver<"u",layoutShift:!p&&typeof IntersectionObserver<"u"}),[p]),{refs:W,elements:Q,x:pe,y:oe,middlewareData:me,update:te,placement:Z,context:ie,isPositioned:J,floatingStyles:Se}=_le({rootContext:g,placement:z,middleware:ve,strategy:n,whileElementsMounted:m?void 0:(...$e)=>g$(...$e,Y),nodeId:x,externalTree:R}),{sideX:ke,sideY:ge}=me.adaptiveOrigin||Tle,_e=J?n:"fixed",de=S.useMemo(()=>{const $e=k?{position:_e,[ke]:pe,[ge]:oe}:{position:_e,...Se};return J||($e.opacity=0),$e},[k,_e,ke,pe,ge,oe,Se,J]),Ce=S.useRef(null);We(()=>{if(!b)return;const $e=B.current,Ye=typeof $e=="function"?$e():$e,Je=(v$(Ye)?Ye.current:Ye)||null||null;Je!==Ce.current&&(W.setPositionReference(Je),Ce.current=Je)},[b,W,$,B]),S.useEffect(()=>{if(!b)return;const $e=B.current;typeof $e!="function"&&v$($e)&&$e.current!==Ce.current&&(W.setPositionReference($e.current),Ce.current=$e.current)},[b,W,$,B]),S.useEffect(()=>{if(m&&b&&Q.domReference&&Q.floating)return g$(Q.domReference,Q.floating,te,Y)},[m,b,Q,te,Y]);const ye=di(Z),Me=Gj(r,ye,V),Pe=dl(Z)||"center",Ke=!!((Le=me.hide)!=null&&Le.referenceHidden);We(()=>{C&&b&&J&&D(ye)},[C,b,J,ye]);const Et=S.useMemo(()=>{var $e,Ye;return{position:"absolute",top:($e=me.arrow)==null?void 0:$e.y,left:(Ye=me.arrow)==null?void 0:Ye.x}},[me.arrow]),vt=((Be=me.arrow)==null?void 0:Be.centerOffset)!==0;return S.useMemo(()=>({positionerStyles:de,arrowStyles:Et,arrowRef:ae,arrowUncentered:vt,side:Me,align:Pe,physicalSide:ye,anchorHidden:Ke,refs:W,context:ie,isPositioned:J,update:te}),[de,Et,ae,vt,Me,Pe,ye,Ke,W,ie,J,te])}function v$(e){return e!=null&&"current"in e}function Yj(e){return e==="starting"?aae:Sr}const Mle=S.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 T.jsx("div",{ref:t,role:"presentation","data-base-ui-inert":"",...r,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:i}})}),Wc={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function x$(e){return e==="inert"?Wc.inert:e==="aria-hidden"?Wc["aria-hidden"]:Wc.none}let dg=new WeakSet,hg={},Wx=0;const Wj=e=>e&&(e.host||Wj(e.parentNode)),$le=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Wj(n);return e.contains(r)?r:null}).filter(n=>n!=null);function Ole(e,t,n,r){const i="data-base-ui-inert",o=r?"inert":n?"aria-hidden":null,a=$le(t,e),l=new Set,c=new Set(a),f=[];hg[i]||(hg[i]=new WeakMap);const h=hg[i];a.forEach(p),m(t),l.clear();function p(g){!g||l.has(g)||(l.add(g),g.parentNode&&p(g.parentNode))}function m(g){!g||c.has(g)||[].forEach.call(g.children,b=>{if(cl(b)!=="script")if(l.has(b))m(b);else{const v=o?b.getAttribute(o):null,w=v!==null&&v!=="false",x=x$(o),k=(x.get(b)||0)+1,C=(h.get(b)||0)+1;x.set(b,k),h.set(b,C),f.push(b),k===1&&w&&dg.add(b),C===1&&b.setAttribute(i,""),!w&&o&&b.setAttribute(o,o==="inert"?"":"true")}})}return Wx+=1,()=>{f.forEach(g=>{const b=x$(o),v=(b.get(g)||0)-1,w=(h.get(g)||0)-1;b.set(g,v),h.set(g,w),v||(!dg.has(g)&&o&&g.removeAttribute(o),dg.delete(g)),w||g.removeAttribute(i)}),Wx-=1,Wx||(Wc.inert=new WeakMap,Wc["aria-hidden"]=new WeakMap,Wc.none=new WeakMap,dg=new WeakSet,hg={})}}function Ple(e,t=!1,n=!1){const r=dn(e[0]).body;return Ole(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}function Ile(e,t){const n=Un(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 w$=20;let za=[];function JC(){za=za.filter(e=>{var t;return(t=e.deref())==null?void 0:t.isConnected})}function Lle(e){JC(),e&&cl(e)!=="body"&&(za.push(new WeakRef(e)),za.length>w$&&(za=za.slice(-w$)))}function Kx(){var e;return JC(),(e=za[za.length-1])==null?void 0:e.deref()}function Nle(e){if(!e)return null;const t=mp();return $j(e,t)?e:rv(e,t)[0]||e}function jle(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():bi(e).display!=="none"}function S$(e,t){var o;if(!t.current.includes("floating")&&!((o=e.getAttribute("role"))!=null&&o.includes("dialog")))return;const n=mp(),r=kae(e,n).filter(a=>{const l=a.getAttribute("data-tabindex")||"";return $j(a,n)||a.hasAttribute("data-tabindex")&&!l.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 Fle(e){const{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:o=!0,restoreFocus:a=!1,modal:l=!0,closeOnFocusOut:c=!0,openInteractionType:f="",nextFocusableElement:h,previousFocusableElement:p,beforeContentFocusGuardRef:m,externalTree:g}=e,b="rootStore"in t?t.rootStore:t,v=b.useState("open"),w=b.useState("domReferenceElement"),x=b.useState("floatingElement"),{events:k,dataRef:C}=b.context,R=Ze(()=>{var W;return(W=C.current.floatingContext)==null?void 0:W.nodeId}),_=i===!1,D=HS(w)&&_,M=S.useRef(["content"]),O=zr(i),U=zr(o),L=zr(f),I=Jb(g),$=Nj(),B=S.useRef(null),V=S.useRef(null),F=S.useRef(!1),z=S.useRef(!1),j=S.useRef(!1),H=S.useRef(-1),X=S.useRef(""),P=S.useRef(""),K=S.useRef(null),ee=S.useRef(null),q=xu(K,m,$==null?void 0:$.beforeInsideRef),ae=xu(ee,$==null?void 0:$.afterInsideRef),re=Hr(),fe=Hr(),ve=Gb(),Re=$!=null,le=By(x),Ae=Ze((W=le)=>W?rv(W,mp()):[]),Ie=Ze(W=>{const Q=Ae(W);return M.current.map(()=>Q).filter(Boolean).flat()});S.useEffect(()=>{if(r||!l)return;function W(pe){pe.key==="Tab"&&on(le,Ro(dn(le)))&&Ae().length===0&&!D&&cr(pe)}const Q=dn(le);return Q.addEventListener("keydown",W),()=>{Q.removeEventListener("keydown",W)}},[r,w,le,l,M,D,Ae,Ie]),S.useEffect(()=>{if(r||!v)return;const W=dn(le);function Q(){j.current=!1}function pe(me){const te=io(me),Z=on(x,te)||on(w,te)||on($==null?void 0:$.portalNode,te);j.current=!Z,P.current=me.pointerType||"keyboard",te!=null&&te.closest(`[${lae}]`)&&(z.current=!0)}function oe(){P.current="keyboard"}return W.addEventListener("pointerdown",pe,!0),W.addEventListener("pointerup",Q,!0),W.addEventListener("pointercancel",Q,!0),W.addEventListener("keydown",oe,!0),()=>{W.removeEventListener("pointerdown",pe,!0),W.removeEventListener("pointerup",Q,!0),W.removeEventListener("pointercancel",Q,!0),W.removeEventListener("keydown",oe,!0)}},[r,x,w,le,v,$]),S.useEffect(()=>{if(r||!c)return;const W=dn(le);function Q(){z.current=!0,fe.start(0,()=>{z.current=!1})}function pe(ie){const J=io(ie),Se=Ae().indexOf(J);Se!==-1&&(H.current=Se)}function oe(ie){const J=ie.relatedTarget,Se=ie.currentTarget,ke=io(ie);queueMicrotask(()=>{const ge=R(),_e=b.context.triggerElements,de=(J==null?void 0:J.hasAttribute(Uy("focus-guard")))&&[K.current,ee.current,$==null?void 0:$.beforeInsideRef.current,$==null?void 0:$.afterInsideRef.current,$==null?void 0:$.beforeOutsideRef.current,$==null?void 0:$.afterOutsideRef.current,ps(p),ps(h)].includes(J),Ce=!(on(w,J)||on(x,J)||on(J,x)||on($==null?void 0:$.portalNode,J)||J!=null&&_e.hasElement(J)||_e.hasMatchingElement(ye=>on(ye,J))||de||I&&(Gc(I.nodesRef.current,ge).find(ye=>{var Me,Pe;return on((Me=ye.context)==null?void 0:Me.elements.floating,J)||on((Pe=ye.context)==null?void 0:Pe.elements.domReference,J)})||ZM(I.nodesRef.current,ge).find(ye=>{var Me,Pe,Ke;return[(Me=ye.context)==null?void 0:Me.elements.floating,By((Pe=ye.context)==null?void 0:Pe.elements.floating)].includes(J)||((Ke=ye.context)==null?void 0:Ke.elements.domReference)===J})));if(Se===w&&le&&S$(le,M),a&&Se!==w&&!jle(ke)&&Ro(W)===W.body){if(Cn(le)&&(le.focus(),a==="popup")){ve.request(()=>{le.focus()});return}const ye=H.current,Me=Ae(),Pe=Me[ye]||Me[Me.length-1]||le;Cn(Pe)&&Pe.focus()}if(C.current.insideReactTree){C.current.insideReactTree=!1;return}(D||!l)&&J&&Ce&&!z.current&&(D||J!==Kx())&&(F.current=!0,b.setOpen(!1,mn(ev,ie)))})}function me(){j.current||(C.current.insideReactTree=!0,re.start(0,()=>{C.current.insideReactTree=!1}))}const te=Cn(w)?w:null,Z=[];if(!(!x&&!te))return te&&(te.addEventListener("focusout",oe),te.addEventListener("pointerdown",Q),Z.push(()=>{te.removeEventListener("focusout",oe),te.removeEventListener("pointerdown",Q)})),x&&(x.addEventListener("focusin",pe),x.addEventListener("focusout",oe),$&&(x.addEventListener("focusout",me,!0),Z.push(()=>{x.removeEventListener("focusout",me,!0)})),Z.push(()=>{x.removeEventListener("focusin",pe),x.removeEventListener("focusout",oe)})),()=>{Z.forEach(ie=>{ie()})}},[r,w,x,le,l,I,$,b,c,a,Ae,D,R,M,C,re,fe,ve,h,p]),S.useEffect(()=>{var oe,me,te;if(r||!x||!v)return;const W=Array.from(((oe=$==null?void 0:$.portalNode)==null?void 0:oe.querySelectorAll(`[${Uy("portal")}]`))||[]),Q=(te=(me=(I?ZM(I.nodesRef.current,R()):[]).find(Z=>{var ie;return HS(((ie=Z.context)==null?void 0:ie.elements.domReference)||null)}))==null?void 0:me.context)==null?void 0:te.elements.domReference,pe=[x,Q,...W,B.current,V.current,K.current,ee.current,$==null?void 0:$.beforeOutsideRef.current,$==null?void 0:$.afterOutsideRef.current,ps(p),ps(h),D?w:null].filter(Z=>Z!=null);return Ple(pe,l||D)},[v,r,w,x,l,M,$,D,I,R,h,p]),We(()=>{if(!v||r||!Cn(le))return;const W=dn(le),Q=Ro(W);queueMicrotask(()=>{const pe=Ie(le),oe=O.current,me=typeof oe=="function"?oe(L.current||""):oe;if(me===void 0||me===!1)return;let te;me===!0||me===null?te=pe[0]||le:te=ps(me),te=te||pe[0]||le,!on(le,Q)&&hh(te,{preventScroll:te===le})})},[r,v,le,_,Ie,O,L]),We(()=>{if(r||!le)return;const W=dn(le),Q=Ro(W);Lle(Q);function pe(te){if(te.open||(X.current=Ile(te.nativeEvent,P.current)),te.reason===Joe&&te.nativeEvent.type==="mouseleave"&&(F.current=!0),te.reason===UC)if(te.nested)F.current=!1;else if(cj(te.nativeEvent)||fj(te.nativeEvent))F.current=!1;else{let Z=!1;document.createElement("div").focus({get preventScroll(){return Z=!0,!1}}),Z?F.current=!1:F.current=!0}}k.on("openchange",pe);const oe=W.createElement("span");oe.setAttribute("tabindex","-1"),oe.setAttribute("aria-hidden","true"),Object.assign(oe.style,Vb),Re&&w&&w.insertAdjacentElement("afterend",oe);function me(){const te=U.current;let Z=typeof te=="function"?te(X.current):te;if(Z===void 0||Z===!1)return null;if(Z===null&&(Z=!0),typeof Z=="boolean"){const J=w||Kx();return J&&J.isConnected?J:oe}const ie=w||Kx()||oe;return ps(Z)||ie}return()=>{k.off("openchange",pe);const te=Ro(W),Z=on(x,te)||I&&Gc(I.nodesRef.current,R(),!1).some(J=>{var Se;return on((Se=J.context)==null?void 0:Se.elements.floating,te)}),ie=me();queueMicrotask(()=>{const J=Nle(ie),Se=typeof U.current!="boolean";U.current&&!F.current&&Cn(J)&&(!(!Se&&J!==te&&te!==W.body)||Z)&&J.focus({preventScroll:!0}),oe.remove(),F.current=!1})}},[r,x,le,U,C,k,I,Re,w,R]),We(()=>{if(!FC||v||!x)return;const W=Ro(dn(x));!Cn(W)||!HC(W)||on(x,W)&&W.blur()},[v,x]),We(()=>{if(!(r||!$))return $.setFocusManagerState({modal:l,closeOnFocusOut:c,open:v,onOpenChange:b.setOpen,domReference:w}),()=>{$.setFocusManagerState(null)}},[r,$,l,v,b,c,w]),We(()=>{if(!(r||!le))return S$(le,M),()=>{queueMicrotask(JC)}},[r,le,M]);const Y=!r&&(l?!D:!0)&&(Re||l);return T.jsxs(S.Fragment,{children:[Y&&T.jsx(Wy,{"data-type":"inside",ref:q,onFocus:W=>{var Q,pe;if(l){const oe=Ie();hh(oe[oe.length-1])}else $!=null&&$.portalNode&&(F.current=!1,yh(W,$.portalNode)?(Q=Pj(w))==null||Q.focus():(pe=ps(p??$.beforeOutsideRef))==null||pe.focus())}}),n,Y&&T.jsx(Wy,{"data-type":"inside",ref:ae,onFocus:W=>{var Q,pe;l?hh(Ie()[0]):$!=null&&$.portalNode&&(c&&(F.current=!0),yh(W,$.portalNode)?(Q=Ij(w))==null||Q.focus():(pe=ps(h??$.afterOutsideRef))==null||pe.focus())}})]})}const Kj=16,zle="none",Ble="_list_c57i6_3",Ts={list:Ble,"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"},Xj=({className:e,children:t,...n})=>T.jsx(Fe,{"data-slot":"list-text-label",className:ze(Ts["list-text-label"],e),size:0,...n,children:t});Xj.displayName="ListLabel";const Qj=({className:e,children:t,...n})=>T.jsx(Fe,{"data-slot":"list-text-description",className:ze(Ts["list-text-description"],e),size:0,...n,children:t});Qj.displayName="ListDescription";const Zj=({label:e,description:t,...n})=>T.jsxs(mi,{condition:!!t,render:T.jsx(Qe,{"data-slot":"list-text-block",mb:2,...n}),children:[T.jsx(Xj,{children:e}),t&&T.jsx(Qj,{children:t})]});Zj.displayName="ListTextBlock";const gp=({render:e,className:t,icon:n,label:r,description:i,children:o,...a})=>T.jsx(ot,{"data-slot":"list-item",render:e??T.jsx("li",{}),ay:"start",ax:"space-between",gap:8,className:ze(Ts["list-item"],t),...a,children:o||T.jsxs(mi,{condition:!!n,render:T.jsx(ot,{gap:2,ay:"start",fullwidth:!0,style:{listStyleType:"none"}}),children:[n&&T.jsx(n,{"data-slot":"list-item-icon",size:Kj,style:{color:"var(--shade-foreground)"}}),T.jsx(Zj,{"data-slot":"list-item-text",label:r,description:i})]})});gp.displayName="ListItem";const ek=({category:e,icon:t})=>e?T.jsxs(ot,{"data-slot":"list-group-header",className:Ts["list-group-header"],ay:"center",ax:"start",gap:2,py:1,fullwidth:!0,children:[t&&T.jsx(t,{className:Ts["list-group-icon"],size:Kj}),T.jsx(Fe,{"data-slot":"list-group-category",render:T.jsx("h3",{}),className:Ts["list-group-category"],weight:"bold",size:0,children:e})]}):null;ek.displayName="ListGroupHeader";const tk=({category:e,icon:t,items:n})=>T.jsxs(Qe,{"data-slot":"list-group",render:T.jsx("li",{}),ax:"stretch",fullwidth:!0,className:Ts["list-group"],children:[T.jsx(ek,{category:e,icon:t}),T.jsx("ul",{"data-slot":"list-group-panel",className:Ts["list-group-panel"],children:n.map((r,i)=>"items"in r?T.jsx(tk,{...r},r.category??i):T.jsx(gp,{...r},i))})]});tk.displayName="ListGroup";const Eu=({marker:e=zle,category:t,icon:n,items:r,children:i,ItemProps:o,GroupProps:a,...l})=>{const c=e==="decimal"?T.jsx("ol",{}):T.jsx("ul",{}),f=T.jsx(Qe,{"data-slot":"list","data-marker":e,ax:"stretch",className:Ts.list,render:c,...l,children:r?r.map((h,p)=>"items"in h?T.jsx(tk,{...h,...a},h.category??p):T.jsx(gp,{fullwidth:!0,...h,...o},p)):i});return t?T.jsxs(Qe,{"data-slot":"list-section",ax:"stretch",fullwidth:!0,children:[T.jsx(ek,{category:t,icon:n}),f]}):f};Eu.displayName="List";const Jj=S.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function Hle(){return S.useContext(Jj)}function Ule(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,o=Ze(i),a=S.useRef(0),l=yi(Vle).current,c=yi(qle).current,[f,h]=S.useState(0),p=S.useRef(f),m=Ze((x,k)=>{c.set(x,k??null),p.current+=1,h(p.current)}),g=Ze(x=>{c.delete(x),p.current+=1,h(p.current)}),b=S.useMemo(()=>{const x=new Map;return Array.from(c.keys()).filter(k=>k.isConnected).sort(Gle).forEach((k,C)=>{const R=c.get(k)??{};x.set(k,{...R,index:C})}),x},[c,f]);We(()=>{if(typeof MutationObserver!="function"||b.size===0)return;const x=new MutationObserver(k=>{const C=new Set,R=_=>C.has(_)?C.delete(_):C.add(_);k.forEach(_=>{_.removedNodes.forEach(R),_.addedNodes.forEach(R)}),C.size===0&&(p.current+=1,h(p.current))});return b.forEach((k,C)=>{C.parentElement&&x.observe(C.parentElement,{childList:!0})}),()=>{x.disconnect()}},[b]),We(()=>{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]),We(()=>()=>{n.current=[]},[n]),We(()=>()=>{r&&(r.current=[])},[r]);const v=Ze(x=>(l.add(x),()=>{l.delete(x)}));We(()=>{l.forEach(x=>x(b))},[l,b]);const w=S.useMemo(()=>({register:m,unregister:g,subscribeMapChange:v,elementsRef:n,labelsRef:r,nextIndexRef:a}),[m,g,v,n,r,a]);return T.jsx(Jj.Provider,{value:w,children:t})}function qle(){return new Map}function Vle(){return new Set}function Gle(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 eF=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function Yle(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:o}=e,{register:a,unregister:l,subscribeMapChange:c,elementsRef:f,labelsRef:h,nextIndexRef:p}=Hle(),m=S.useRef(-1),[g,b]=S.useState(o??(i===eF.GuessFromOrder?()=>{if(m.current===-1){const x=p.current;p.current+=1,m.current=x}return m.current}:-1)),v=S.useRef(null),w=S.useCallback(x=>{var k;if(v.current=x,g!==-1&&x!==null&&(f.current[g]=x,h)){const C=t!==void 0;h.current[g]=C?t:((k=r==null?void 0:r.current)==null?void 0:k.textContent)??x.textContent}},[g,f,h,t,r]);return We(()=>{if(o!=null)return;const x=v.current;if(x)return a(x,n),()=>{l(x)}},[o,a,l,n]),We(()=>{if(o==null)return c(x=>{var C;const k=v.current?(C=x.get(v.current))==null?void 0:C.index:null;k!=null&&b(k)})},[o,c,b]),S.useMemo(()=>({ref:w,index:g}),[g,w])}const Wle=S.createContext(void 0);function Kle(e=!1){const t=S.useContext(Wle);if(t===void 0&&!e)throw new Error(Fo(16));return t}function Xle(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:o}=e,a=r&&t!==!1,l=r&&t===!1;return{props:S.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||l)&&(c.disabled=n),c},[r,n,t,a,l,o,i])}}function nk(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,o=S.useRef(null),a=Kle(!0)!==void 0,l=Ze(()=>{const m=o.current;return!!((m==null?void 0:m.tagName)==="A"&&(m!=null&&m.href))}),{props:c}=Xle({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:i}),f=S.useCallback(()=>{const m=o.current;Qle(m)&&a&&t&&c.disabled===void 0&&m.disabled&&(m.disabled=!1)},[t,c.disabled,a]);We(f,[f]);const h=S.useCallback((m={})=>{const{onClick:g,onMouseDown:b,onKeyUp:v,onKeyDown:w,onPointerDown:x,...k}=m;return nl({type:i?"button":void 0,onClick(C){if(t){C.preventDefault();return}g==null||g(C)},onMouseDown(C){t||(b==null||b(C))},onKeyDown(C){if(t||(WS(C),w==null||w(C)),C.baseUIHandlerPrevented)return;const R=C.target===C.currentTarget&&!i&&!l()&&!t,_=C.key==="Enter",D=C.key===" ";R&&((D||_)&&C.preventDefault(),_&&(g==null||g(C)))},onKeyUp(C){t||(WS(C),v==null||v(C)),!C.baseUIHandlerPrevented&&C.target===C.currentTarget&&!i&&!t&&C.key===" "&&(g==null||g(C))},onPointerDown(C){if(t){C.preventDefault();return}x==null||x(C)}},i?void 0:{role:"button"},c,k)},[t,c,i,l]),p=Ze(m=>{o.current=m,f()});return{getButtonProps:h,buttonRef:p}}function Qle(e){return Cn(e)&&e.tagName==="BUTTON"}const Zle="_checkbox_pxuy6_3 _disabled_dkczp_2",ws={checkbox:Zle,"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"},tF=Yr({variants:{bordered:{true:ws["toggle-bordered"]},reversed:{true:ws["toggle-reversed"]},size:{small:ws["size-small"],medium:ws["size-medium"],large:ws["size-large"]}}}),nF=({name:e,label:t,description:n,reversed:r,bordered:i,LabelProps:o,DescriptionProps:a,ErrorProps:l,className:c,children:f,...h})=>{const p=!!t,m=p&&!!n;return T.jsxs(mi,{condition:p,render:T.jsx(ot,{render:T.jsx("label",{}),className:ze(ws["checkbox-label"],tF({reversed:r,bordered:i}),c),ay:m?"start":"center",gap:3,...h}),children:[f,!!(t||n)&&T.jsx(YC,{name:e,children:T.jsxs(mi,{condition:m,render:T.jsx(Qe,{gap:3}),children:[t&&T.jsx(WC,{weight:"normal",...o,children:t}),n&&T.jsx(KC,{...a,children:n}),T.jsx(Yy,{...l})]})})]})};nF.displayName="CheckboxField";const Jle="small";let E$=(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 rF(e){return S.useMemo(()=>({checked(t){return e.indeterminate?{}:t?{[E$.checked]:""}:{[E$.unchecked]:""}},...ll}),[e.indeterminate])}const eue=S.createContext({disabled:!1});function tue(){return S.useContext(eue)}const nue=S.createContext(void 0);function rue(e=!0){const t=S.useContext(nue);if(t===void 0&&!e)throw new Error(Fo(3));return t}const iF=S.createContext(void 0);function iue(){const e=S.useContext(iF);if(e===void 0)throw new Error(Fo(14));return e}const oue="data-parent",sue=S.forwardRef(function(e,t){const{checked:n,className:r,defaultChecked:i=!1,disabled:o=!1,id:a,indeterminate:l=!1,inputRef:c,name:f,onCheckedChange:h,parent:p=!1,readOnly:m=!1,render:g,required:b=!1,uncheckedValue:v,value:w,nativeButton:x=!1,...k}=e,{clearErrors:C}=Hf(),{disabled:R,name:_,setDirty:D,setFilled:M,setFocused:O,setTouched:U,state:L,validationMode:I,validityData:$,shouldValidateOnChange:B,validation:V}=ul(),F=tue(),{labelId:z,controlId:j,registerControlId:H,getDescriptionProps:X}=Fs(),P=rue(),K=P==null?void 0:P.parent,ee=K&&P.allValues,q=R||F.disabled||(P==null?void 0:P.disabled)||o,ae=_??f,re=w??ae,fe=wu(),ve=wu();let Re=j;ee?Re=p?ve:`${K.id}-${re}`:a&&(Re=a);let le={};ee&&(p?le=P.parent.getParentProps():re&&(le=P.parent.getChildProps(re)));const Ae=Ze(h),{checked:Ie=n,indeterminate:Y=l,onCheckedChange:W,...Q}=le,pe=P==null?void 0:P.value,oe=P==null?void 0:P.setValue,me=P==null?void 0:P.defaultValue,te=S.useRef(null),Z=yi(()=>Symbol("checkbox-control")),ie=S.useRef(!1),{getButtonProps:J,buttonRef:Se}=nk({disabled:q,native:x}),ke=(P==null?void 0:P.validation)??V,[ge,_e]=Fy({controlled:re&&pe&&!p?pe.includes(re):Ie,default:re&&me&&!p?me.includes(re):i,name:"Checkbox",state:"checked"});We(()=>{H!==hr&&(ie.current=!0,H(Z.current,Re))},[Re,P,H,p,Z]),S.useEffect(()=>{const Le=Z.current;return()=>{!ie.current||H===hr||(ie.current=!1,H(Le,void 0))}},[H,Z]),PC({enabled:!P,id:fe,commit:ke.commit,value:ge,controlRef:te,name:ae,getValue:()=>ge});const de=S.useRef(null),Ce=xu(c,de,ke.inputRef);We(()=>{de.current&&(de.current.indeterminate=Y,ge&&M(!0))},[ge,Y,M]),ij(ge,()=>{P&&!p||(C(ae),M(ge),D(ge!==$.initialValue),B()?ke.commit(ge):ke.commit(ge,!0))});const ye=nl({checked:ge,disabled:q,name:p?void 0:ae,id:x?void 0:Re??void 0,required:b,ref:Ce,style:ae?VN:Vb,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(Le){if(Le.nativeEvent.defaultPrevented)return;const Be=Le.target.checked,$e=mn(qf,Le.nativeEvent);if(W==null||W(Be,$e),Ae(Be,$e),!$e.isCanceled&&(_e(Be),re&&pe&&oe&&!p)){const Ye=Be?[...pe,re]:pe.filter(Je=>Je!==re);oe(Ye,$e)}},onFocus(){var Le;(Le=te.current)==null||Le.focus()}},w!==void 0?{value:(P?ge&&w:w)||""}:Sr,X,P?ke.getValidationProps:ke.getInputValidationProps),Me=ee?!!Ie:ge,Pe=ee&&Y||l;S.useEffect(()=>{if(!K||!re)return;const Le=K.disabledStatesRef.current;return Le.set(re,q),()=>{Le.delete(re)}},[K,q,re]);const Ke=S.useMemo(()=>({...L,checked:Me,disabled:q,readOnly:m,required:b,indeterminate:Pe}),[L,Me,q,m,b,Pe]),Et=rF(Ke),vt=gr("span",e,{state:Ke,ref:[Se,te,t,P==null?void 0:P.registerControlRef],props:[{id:x?Re??void 0:fe,role:"checkbox","aria-checked":Y?"mixed":ge,"aria-readonly":m||void 0,"aria-required":b||void 0,"aria-labelledby":z,[oue]:p?"":void 0,onFocus(){O(!0)},onBlur(){const Le=de.current;Le&&(U(!0),O(!1),I==="onBlur"&&ke.commit(P?pe:Le.checked))},onClick(Le){var Be;m||q||(Le.preventDefault(),(Be=de.current)==null||Be.dispatchEvent(new PointerEvent("click",{bubbles:!0,shiftKey:Le.shiftKey,ctrlKey:Le.ctrlKey,altKey:Le.altKey,metaKey:Le.metaKey})))}},X,ke.getValidationProps,k,Q,J],stateAttributesMapping:Et});return T.jsxs(iF.Provider,{value:Ke,children:[vt,!ge&&!P&&ae&&!p&&v!==void 0&&T.jsx("input",{type:"hidden",name:ae,value:v}),T.jsx("input",{...ye})]})}),oF=({size:e=Jle,hideIndicator:t,className:n,...r})=>T.jsx(sue,{"data-slot":"checkbox","aria-label":"checkbox",className:ze(ws.checkbox,tF({size:e}),n,{"sr-only":t}),...r});oF.displayName="CheckboxRoot";const aue=S.forwardRef(function(e,t){const{render:n,className:r,keepMounted:i=!1,...o}=e,a=iue(),l=a.checked||a.indeterminate,{mounted:c,transitionStatus:f,setMounted:h}=Zb(l),p=S.useRef(null),m={...a,transitionStatus:f};hp({open:l,ref:p,onComplete(){l||h(!1)}});const g=rF(a),b=S.useMemo(()=>({...g,...OC,...ll}),[g]),v=i||c,w=gr("span",e,{ref:[t,p],state:m,stateAttributesMapping:b,props:o});return v?w:null}),sF=({indeterminate:e,className:t,...n})=>T.jsx(aue,{"data-slot":"checkbox-indicator",className:ze(ws["checkbox-indicator"],t),...n,children:T.jsx(WE,{condition:!!e,className:ws["checkbox-icon"],"data-slot":"checkbox-icon",render:{true:T.jsx(EY,{strokeWidth:3}),false:T.jsx(JE,{strokeWidth:3})}})});sF.displayName="CheckboxIndicator";const aF=({name:e,label:t,description:n,reversed:r,bordered:i,indeterminate:o,hideIndicator:a,FieldProps:l,IndicatorProps:c,...f})=>T.jsx(nF,{name:e,label:t,description:n,reversed:r,bordered:i,...l,children:T.jsx(oF,{name:e,hideIndicator:a,indeterminate:o,...f,children:T.jsx(sF,{indeterminate:o,...c})})});aF.displayName="Checkbox";function lue(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,l=parseFloat(r.height)||0,c=Math.max(t.width,i,a),f=Math.max(t.height,o,l),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 uue(e,t){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,i=n.useState("open"),{listRef:o,activeIndex:a,onMatch:l,onTypingChange:c,enabled:f=!0,resetMs:h=750,selectedIndex:p=null}=t,m=Hr(),g=S.useRef(""),b=S.useRef(p??a??-1),v=S.useRef(null);We(()=>{!i&&p!==null||(m.clear(),v.current=null,g.current!==""&&(g.current=""))},[i,p,m]),We(()=>{i&&g.current===""&&(b.current=p??a??-1)},[i,p,a]);const w=Ze(_=>{_?r.current.typing||(r.current.typing=_,c==null||c(_)):r.current.typing&&(r.current.typing=_,c==null||c(_))}),x=Ze(_=>{function D(I,$,B){const V=$.find(F=>(F==null?void 0:F.toLocaleLowerCase().indexOf(B.toLocaleLowerCase()))===0);return V?I.indexOf(V):-1}const M=o.current;if(g.current.length>0&&g.current[0]!==" "&&(D(M,M,g.current)===-1?w(!1):_.key===" "&&cr(_)),M==null||_.key.length!==1||_.ctrlKey||_.metaKey||_.altKey)return;i&&_.key!==" "&&(cr(_),w(!0));const O=g.current==="";O&&(b.current=p??a??-1),M.every(I=>{var $,B;return I?(($=I[0])==null?void 0:$.toLocaleLowerCase())!==((B=I[1])==null?void 0:B.toLocaleLowerCase()):!0})&&g.current===_.key&&(g.current="",b.current=v.current),g.current+=_.key,m.start(h,()=>{g.current="",b.current=v.current,w(!1)});const U=O?p??a??-1:b.current,L=D(M,[...M.slice((U||0)+1),...M.slice(0,(U||0)+1)],g.current);L!==-1?(l==null||l(L),v.current=L):_.key!==" "&&(g.current="",w(!1))}),k=Ze(_=>{const D=_.relatedTarget,M=n.select("domReferenceElement"),O=n.select("floatingElement"),U=on(M,D),L=on(O,D);U||L||(m.clear(),g.current="",b.current=v.current,w(!1))}),C=S.useMemo(()=>({onKeyDown:x,onBlur:k}),[x,k]),R=S.useMemo(()=>({onKeyDown:x,onKeyUp(_){_.key===" "&&w(!1)},onBlur:k}),[x,k,w]);return S.useMemo(()=>f?{reference:C,floating:R}:{},[f,C,R])}function Xx(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const lF="ArrowUp",uF="ArrowDown",cF="ArrowLeft",fF="ArrowRight",dF="Home",hF="End",cue=new Set([cF,fF]),fue=new Set([lF,uF]),due=new Set([...cue,...fue]);[...due];const hue=new Set([lF,uF,cF,fF,dF,hF]),pue=Sj,Ou={"select-trigger":"_select-trigger_qrzcp_1","select-positioner":"_select-positioner_qrzcp_8","select-popup":"_select-popup_qrzcp_12","select-item":"_select-item_qrzcp_16","select-icon":"_select-icon_qrzcp_24","select-value":"_select-value_qrzcp_30"},pF=S.createContext(null),mF=S.createContext(null);function zs(){const e=S.useContext(pF);if(e===null)throw new Error(Fo(60));return e}function gF(){const e=S.useContext(mF);if(e===null)throw new Error(Fo(61));return e}const lt={id:Ft(e=>e.id),modal:Ft(e=>e.modal),multiple:Ft(e=>e.multiple),items:Ft(e=>e.items),itemToStringLabel:Ft(e=>e.itemToStringLabel),itemToStringValue:Ft(e=>e.itemToStringValue),isItemEqualToValue:Ft(e=>e.isItemEqualToValue),value:Ft(e=>e.value),hasSelectedValue:Ft(e=>{const{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:Oc(t,r)!==""}),hasNullItemLabel:Ft((e,t)=>t?qie(e.items):!1),open:Ft(e=>e.open),mounted:Ft(e=>e.mounted),forceMount:Ft(e=>e.forceMount),transitionStatus:Ft(e=>e.transitionStatus),openMethod:Ft(e=>e.openMethod),activeIndex:Ft(e=>e.activeIndex),selectedIndex:Ft(e=>e.selectedIndex),isActive:Ft((e,t)=>e.activeIndex===t),isSelected:Ft((e,t,n)=>{const r=e.isItemEqualToValue,i=e.value;return e.multiple?Array.isArray(i)&&i.some(o=>wf(n,o,r)):e.selectedIndex===t&&e.selectedIndex!==null?!0:wf(n,i,r)}),isSelectedByFocus:Ft((e,t)=>e.selectedIndex===t),popupProps:Ft(e=>e.popupProps),triggerProps:Ft(e=>e.triggerProps),triggerElement:Ft(e=>e.triggerElement),positionerElement:Ft(e=>e.positionerElement),listElement:Ft(e=>e.listElement),scrollUpArrowVisible:Ft(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:Ft(e=>e.scrollDownArrowVisible),hasScrollArrows:Ft(e=>e.hasScrollArrows)};function mue(e){const{id:t,value:n,defaultValue:r=null,onValueChange:i,open:o,defaultOpen:a=!1,onOpenChange:l,name:c,autoComplete:f,disabled:h=!1,readOnly:p=!1,required:m=!1,modal:g=!0,actionsRef:b,inputRef:v,onOpenChangeComplete:w,items:x,multiple:k=!1,itemToStringLabel:C,itemToStringValue:R,isItemEqualToValue:_=Bie,highlightItemOnHover:D=!0,children:M}=e,{clearErrors:O}=Hf(),{setDirty:U,setTouched:L,setFocused:I,shouldValidateOnChange:$,validityData:B,setFilled:V,name:F,disabled:z,validation:j,validationMode:H}=ul(),X=jC({id:t}),P=z||h,K=F??c,[ee,q]=Fy({controlled:n,default:k?r??BM:r,name:"Select",state:"value"}),[ae,re]=Fy({controlled:o,default:a,name:"Select",state:"open"}),fe=S.useRef([]),ve=S.useRef([]),Re=S.useRef(null),le=S.useRef(null),Ae=S.useRef(0),Ie=S.useRef(null),Y=S.useRef([]),W=S.useRef(!1),Q=S.useRef(!1),pe=S.useRef(null),oe=S.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),me=S.useRef(!1),{mounted:te,setMounted:Z,transitionStatus:ie}=Zb(ae),{openMethod:J,triggerProps:Se,reset:ke}=Moe(ae),ge=yi(()=>new uj({id:X,modal:g,multiple:k,itemToStringLabel:C,itemToStringValue:R,isItemEqualToValue:_,value:ee,open:ae,mounted:te,transitionStatus:ie,items:x,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,_e=ut(ge,lt.activeIndex),de=ut(ge,lt.selectedIndex),Ce=ut(ge,lt.triggerElement),ye=ut(ge,lt.positionerElement),Me=S.useMemo(()=>k&&Array.isArray(ee)&&ee.length===0?"":Oc(ee,R),[k,ee,R]),Pe=S.useMemo(()=>k&&Array.isArray(ee)?ee.map(rt=>Oc(rt,R)):Oc(ee,R),[k,ee,R]),Ke=zr(ge.state.triggerElement);PC({id:X,commit:j.commit,value:ee,controlRef:Ke,name:K,getValue:()=>Pe});const Et=S.useRef(ee);We(()=>{ee!==Et.current&&ge.set("forceMount",!0)},[ge,ee]),We(()=>{V(k?Array.isArray(ee)&&ee.length>0:ee!=null)},[k,ee,V]),We(function(){if(ae)return;const rt=Y.current;if(k){const an=Array.isArray(ee)?ee:[];if(an.length===0){ge.set("selectedIndex",null);return}const Jt=an[an.length-1],gn=dh(rt,Jt,_);ge.set("selectedIndex",gn===-1?null:gn);return}const Ut=dh(rt,ee,_);ge.set("selectedIndex",Ut===-1?null:Ut)},[k,ae,ee,Y,_,ge]),ij(ee,()=>{O(K),U(ee!==B.initialValue),$()?j.commit(ee):j.commit(ee,!0)});const vt=Ze((rt,Ut)=>{if(l==null||l(rt,Ut),!Ut.isCanceled&&(re(rt),!rt&&(Ut.reason===ev||Ut.reason===UC)&&(L(!0),I(!1),H==="onBlur"&&j.commit(ee)),!rt&&ge.state.activeIndex!==null)){const an=fe.current[ge.state.activeIndex];queueMicrotask(()=>{an==null||an.setAttribute("tabindex","-1")})}}),Le=Ze(()=>{Z(!1),ge.set("activeIndex",null),ke(),w==null||w(!1)});hp({enabled:!b,open:ae,ref:Re,onComplete(){ae||Le()}}),S.useImperativeHandle(b,()=>({unmount:Le}),[Le]);const Be=Ze((rt,Ut)=>{i==null||i(rt,Ut),!Ut.isCanceled&&q(rt)}),$e=Ze(()=>{const rt=ge.state.listElement||Re.current;if(!rt)return;const Ut=rt.scrollTop,an=rt.scrollTop+rt.clientHeight,Jt=Ut>1,gn=an<rt.scrollHeight-1;ge.state.scrollUpArrowVisible!==Jt&&ge.set("scrollUpArrowVisible",Jt),ge.state.scrollDownArrowVisible!==gn&&ge.set("scrollDownArrowVisible",gn)}),Ye=hj({open:ae,onOpenChange:vt,elements:{reference:Ce,floating:ye}}),Je=rse(Ye,{enabled:!p&&!P,event:"mousedown"}),et=sse(Ye,{bubbles:!1}),tt=kse(Ye,{enabled:!p&&!P,listRef:fe,activeIndex:_e,selectedIndex:de,disabledIndices:BM,onNavigate(rt){rt===null&&!ae||ge.set("activeIndex",rt)},focusItemOnHover:!1}),jt=uue(Ye,{enabled:!p&&!P&&(ae||!k),listRef:ve,activeIndex:_e,selectedIndex:de,onMatch(rt){ae?ge.set("activeIndex",rt):Be(Y.current[rt],mn("none"))},onTypingChange(rt){W.current=rt}}),{getReferenceProps:kt,getFloatingProps:Ot,getItemProps:zt}=Rse([Je,et,tt,jt]),Dn=S.useMemo(()=>nl(kt(),Se,X?{id:X}:Sr),[kt,Se,X]);Lie(()=>{ge.update({popupProps:Ot(),triggerProps:Dn})}),We(()=>{ge.update({id:X,modal:g,multiple:k,value:ee,open:ae,mounted:te,transitionStatus:ie,popupProps:Ot(),triggerProps:Dn,items:x,itemToStringLabel:C,itemToStringValue:R,isItemEqualToValue:_,openMethod:J})},[ge,X,g,k,ee,ae,te,ie,Ot,Dn,x,C,R,_,J]);const Tr=S.useMemo(()=>({store:ge,name:K,required:m,disabled:P,readOnly:p,multiple:k,itemToStringLabel:C,itemToStringValue:R,highlightItemOnHover:D,setValue:Be,setOpen:vt,listRef:fe,popupRef:Re,scrollHandlerRef:le,handleScrollArrowVisibility:$e,scrollArrowsMountedCountRef:Ae,getItemProps:zt,events:Ye.context.events,valueRef:Ie,valuesRef:Y,labelsRef:ve,typingRef:W,selectionRef:oe,selectedItemTextRef:pe,validation:j,onOpenChangeComplete:w,keyboardActiveRef:Q,alignItemWithTriggerActiveRef:me,initialValueRef:Et}),[ge,K,m,P,p,k,C,R,D,Be,vt,zt,Ye.context.events,j,w,$e]),Vn=xu(v,j.inputRef),Kr=k&&Array.isArray(ee)&&ee.length>0,Nn=S.useMemo(()=>!k||!Array.isArray(ee)||!K?null:ee.map(rt=>{const Ut=Oc(rt,R);return T.jsx("input",{type:"hidden",name:K,value:Ut},Ut)}),[k,ee,K,R]);return T.jsx(pF.Provider,{value:Tr,children:T.jsxs(mF.Provider,{value:Ye,children:[M,T.jsx("input",{...j.getInputValidationProps({onFocus(){var rt;(rt=ge.state.triggerElement)==null||rt.focus({focusVisible:!0})},onChange(rt){if(rt.nativeEvent.defaultPrevented)return;const Ut=rt.target.value,an=mn(qf,rt.nativeEvent);function Jt(){if(k)return;const gn=Y.current.find(Ki=>Oc(Ki,R).toLowerCase()===Ut.toLowerCase());gn!=null&&(U(gn!==B.initialValue),Be(gn,an),$()&&j.commit(gn))}ge.set("forceMount",!0),queueMicrotask(Jt)}}),name:k?void 0:K,autoComplete:f,value:Me,disabled:P,required:m&&!Kr,readOnly:p,ref:Vn,style:K?VN:Vb,tabIndex:-1,"aria-hidden":!0}),Nn]})})}const pg=2,gue=400,C$=200,yue={...iae,...ll,value:()=>null},bue=S.forwardRef(function(e,t){const{render:n,className:r,id:i,disabled:o=!1,nativeButton:a=!0,...l}=e,{setTouched:c,setFocused:f,validationMode:h,state:p,disabled:m}=ul(),{labelId:g}=Fs(),{store:b,setOpen:v,selectionRef:w,validation:x,readOnly:k,required:C,alignItemWithTriggerActiveRef:R,disabled:_,keyboardActiveRef:D}=zs(),M=m||_||o,O=ut(b,lt.open),U=ut(b,lt.value),L=ut(b,lt.triggerProps),I=ut(b,lt.positionerElement),$=ut(b,lt.listElement),B=ut(b,lt.id),V=ut(b,lt.hasSelectedValue),F=!V&&O,z=ut(b,lt.hasNullItemLabel,F),j=i??B;jC({id:j});const H=zr(I),X=S.useRef(null),{getButtonProps:P,buttonRef:K}=nk({disabled:M,native:a}),ee=Ze(Ie=>{b.set("triggerElement",Ie)}),q=xu(t,X,K,ee),ae=Hr(),re=Hr(),fe=Hr(),ve=Hr();S.useEffect(()=>{if(O)return V||z?ve.start(C$,()=>{w.current.allowUnselectedMouseUp=!0,fe.start(C$,()=>{w.current.allowSelectedMouseUp=!0})}):fe.start(gue,()=>{w.current.allowUnselectedMouseUp=!0,w.current.allowSelectedMouseUp=!0}),()=>{fe.clear(),ve.clear()};w.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},re.clear()},[O,V,z,w,re,fe,ve]);const Re=S.useMemo(()=>{var Ie;return($==null?void 0:$.id)??((Ie=By(I))==null?void 0:Ie.id)},[$,I]),le=nl(L,{id:j,role:"combobox","aria-expanded":O?"true":"false","aria-haspopup":"listbox","aria-controls":O?Re:void 0,"aria-labelledby":g,"aria-readonly":k||void 0,"aria-required":C||void 0,tabIndex:M?-1:0,ref:q,onFocus(Ie){f(!0),O&&R.current&&v(!1,mn(qf,Ie.nativeEvent)),ae.start(0,()=>{b.set("forceMount",!0)})},onBlur(Ie){on(I,Ie.relatedTarget)||(c(!0),f(!1),h==="onBlur"&&x.commit(U))},onPointerMove(){D.current=!1},onKeyDown(){D.current=!0},onMouseDown(Ie){if(O)return;const Y=dn(Ie.currentTarget);function W(Q){if(!X.current)return;const pe=Q.target;if(on(X.current,pe)||on(H.current,pe)||pe===X.current)return;const oe=lue(X.current);Q.clientX>=oe.left-pg&&Q.clientX<=oe.right+pg&&Q.clientY>=oe.top-pg&&Q.clientY<=oe.bottom+pg||v(!1,mn(tse,Q))}re.start(0,()=>{Y.addEventListener("mouseup",W,{once:!0})})}},x.getValidationProps,l,P);le.role="combobox";const Ae={...p,open:O,disabled:M,value:U,readOnly:k,placeholder:!V};return gr("button",e,{ref:[t,X],state:Ae,stateAttributesMapping:yue,props:le})}),yF=({size:e,ghost:t,fullwidth:n,className:r,children:i,...o})=>T.jsx(bue,{"data-slot":"select-trigger",render:T.jsx("button",{}),className:ze(Ou["select-trigger"],fi.input,nv({size:e,ghost:t,fullwidth:n}),r),...o,children:i});yF.displayName="SelectTrigger";const vue={value:()=>null},xue=S.forwardRef(function(e,t){const{className:n,render:r,children:i,placeholder:o,...a}=e,{store:l,valueRef:c}=zs(),f=ut(l,lt.value),h=ut(l,lt.items),p=ut(l,lt.itemToStringLabel),m=ut(l,lt.hasSelectedValue),g=!m&&o!=null&&i==null,b=ut(l,lt.hasNullItemLabel,g),v={value:f,placeholder:!m};let w=null;return typeof i=="function"?w=i(f):i!=null?w=i:!m&&o!=null&&!b?w=o:Array.isArray(f)?w=Gie(f,h,p):w=YN(f,h,p),gr("span",e,{state:v,ref:[t,c],props:[{children:w},a],stateAttributesMapping:vue})}),bF=({size:e,className:t,...n})=>T.jsx(xue,{"data-slot":"select-value",render:T.jsx(Fe,{pl:0}),className:ze(Ou["select-value"],fi.input,nv({size:e}),t),...n});bF.displayName="SelectValue";const wue=S.forwardRef(function(e,t){const{className:n,render:r,...i}=e,{store:o}=zs(),a={open:ut(o,lt.open)};return gr("span",e,{state:a,ref:t,props:[{"aria-hidden":!0,children:"▼"},i],stateAttributesMapping:rae})}),vF=({className:e,...t})=>T.jsx(wue,{"data-slot":"select-icon",render:T.jsx(FG,{}),className:ze(Ou["select-icon"],e),...t});vF.displayName="SelectIndicator";const Sue=S.createContext(void 0),Eue=S.forwardRef(function(e,t){const{store:n}=zs(),r=ut(n,lt.mounted),i=ut(n,lt.forceMount);return r||i?T.jsx(Sue.Provider,{value:!0,children:T.jsx(_ae,{ref:t,...e})}):null}),xF=({children:e,...t})=>T.jsx(Eue,{"data-slot":"select-portal",...t,children:e});xF.displayName="SelectPortal";const wF=S.createContext(void 0);function rk(){const e=S.useContext(wF);if(!e)throw new Error(Fo(59));return e}function eb(e,t){e&&Object.assign(e.style,t)}const SF={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},Cue={position:"fixed"},kue=S.forwardRef(function(e,t){const{anchor:n,positionMethod:r="absolute",className:i,render:o,side:a="bottom",align:l="center",sideOffset:c=0,alignOffset:f=0,collisionBoundary:h="clipping-ancestors",collisionPadding:p,arrowPadding:m=5,sticky:g=!1,disableAnchorTracking:b,alignItemWithTrigger:v=!0,collisionAvoidance:w=uae,...x}=e,{store:k,listRef:C,labelsRef:R,alignItemWithTriggerActiveRef:_,selectedItemTextRef:D,valuesRef:M,initialValueRef:O,popupRef:U,setValue:L}=zs(),I=gF(),$=ut(k,lt.open),B=ut(k,lt.mounted),V=ut(k,lt.modal),F=ut(k,lt.value),z=ut(k,lt.openMethod),j=ut(k,lt.positionerElement),H=ut(k,lt.triggerElement),X=ut(k,lt.isItemEqualToValue),P=ut(k,lt.transitionStatus),K=S.useRef(null),ee=S.useRef(null),[q,ae]=S.useState(v),re=B&&q&&z!=="touch";!B&&q!==v&&ae(v),We(()=>{B||(lt.scrollUpArrowVisible(k.state)&&k.set("scrollUpArrowVisible",!1),lt.scrollDownArrowVisible(k.state)&&k.set("scrollDownArrowVisible",!1))},[k,B]),S.useImperativeHandle(_,()=>re),Nae((re||V)&&$&&z!=="touch",H);const fe=Dle({anchor:n,floatingRootContext:I,positionMethod:r,mounted:B,side:a,sideOffset:c,align:l,alignOffset:f,arrowPadding:m,collisionBoundary:h,collisionPadding:p,sticky:g,disableAnchorTracking:b??re,collisionAvoidance:w,keepMounted:!0}),ve=re?"none":fe.side,Re=re?Cue:fe.positionerStyles,le=S.useMemo(()=>{const oe={};return $||(oe.pointerEvents="none"),{role:"presentation",hidden:!B,style:{...Re,...oe}}},[$,B,Re]),Ae={open:$,side:ve,align:fe.align,anchorHidden:fe.anchorHidden},Ie=Ze(oe=>{k.set("positionerElement",oe)}),Y=gr("div",e,{ref:[t,Ie],state:Ae,stateAttributesMapping:kj,props:[le,Yj(P),x]}),W=S.useRef(0),Q=Ze(oe=>{if(oe.size===0&&W.current===0||M.current.length===0)return;const me=W.current;if(W.current=oe.size,oe.size===me)return;const te=mn(qf);if(me!==0&&!k.state.multiple&&F!==null&&dh(M.current,F,X)===-1){const Z=O.current,ie=Z!=null&&dh(M.current,Z,X)!==-1?Z:null;L(ie,te),ie===null&&(k.set("selectedIndex",null),D.current=null)}if(me!==0&&k.state.multiple&&Array.isArray(F)){const Z=J=>dh(M.current,J,X)!==-1,ie=F.filter(J=>Z(J));(ie.length!==F.length||ie.some(J=>!Hie(F,J,X)))&&(L(ie,te),ie.length===0&&(k.set("selectedIndex",null),D.current=null))}if($&&re){k.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const Z={height:""};eb(j,Z),eb(U.current,Z)}}),pe=S.useMemo(()=>({...fe,side:ve,alignItemWithTriggerActive:re,setControlledAlignItemWithTrigger:ae,scrollUpArrowRef:K,scrollDownArrowRef:ee}),[fe,ve,re,ae]);return T.jsx(Ule,{elementsRef:C,labelsRef:R,onMapChange:Q,children:T.jsxs(wF.Provider,{value:pe,children:[B&&V&&T.jsx(Mle,{inert:Dae(!$),cutout:H}),Y]})})}),EF=S.forwardRef(function(e,t){const{render:n,className:r,direction:i,keepMounted:o=!1,...a}=e,{store:l,popupRef:c,listRef:f,handleScrollArrowVisibility:h,scrollArrowsMountedCountRef:p}=zs(),{side:m,scrollDownArrowRef:g,scrollUpArrowRef:b}=rk(),v=i==="up"?lt.scrollUpArrowVisible:lt.scrollDownArrowVisible,w=ut(l,v),x=ut(l,lt.openMethod),k=w&&x!=="touch",C=Hr(),R=i==="up"?b:g,{transitionStatus:_,setMounted:D}=Zb(k);We(()=>(p.current+=1,l.state.hasScrollArrows||l.set("hasScrollArrows",!0),()=>{p.current=Math.max(0,p.current-1),p.current===0&&l.state.hasScrollArrows&&l.set("hasScrollArrows",!1)}),[l,p]),hp({open:k,ref:R,onComplete(){k||D(!1)}});const M=gr("div",e,{ref:[t,R],state:{direction:i,visible:k,side:m,transitionStatus:_},props:[{"aria-hidden":!0,children:i==="up"?"▲":"▼",style:{position:"absolute"},onMouseMove(O){if(O.movementX===0&&O.movementY===0||C.isStarted())return;l.set("activeIndex",null);function U(){var B;const L=l.state.listElement??c.current;if(!L)return;l.set("activeIndex",null),h();const I=L.scrollTop===0,$=Math.round(L.scrollTop+L.clientHeight)>=L.scrollHeight;if(f.current.length===0&&(i==="up"?l.set("scrollUpArrowVisible",!I):l.set("scrollDownArrowVisible",!$)),i==="up"&&I||i==="down"&&$){C.clear();return}if((l.state.listElement||c.current)&&f.current&&f.current.length>0){const V=f.current,F=((B=R.current)==null?void 0:B.offsetHeight)||0;if(i==="up"){let z=0;const j=L.scrollTop+F;for(let X=0;X<V.length;X+=1){const P=V[X];if(P&&P.offsetTop>=j){z=X;break}}const H=Math.max(0,z-1);if(H<z){const X=V[H];X&&(L.scrollTop=Math.max(0,X.offsetTop-F))}else L.scrollTop=0}else{let z=V.length-1;const j=L.scrollTop+L.clientHeight-F;for(let X=0;X<V.length;X+=1){const P=V[X];if(P&&P.offsetTop+P.offsetHeight>j){z=Math.max(0,X-1);break}}const H=Math.min(V.length-1,z+1);if(H>z){const X=V[H];X&&(L.scrollTop=X.offsetTop+X.offsetHeight-L.clientHeight+F)}else L.scrollTop=L.scrollHeight-L.clientHeight}}C.start(40,U)}C.start(40,U)},onMouseLeave(){C.clear()}},a]});return k||o?M:null}),Rue=S.forwardRef(function(e,t){return T.jsx(EF,{...e,ref:t,direction:"up"})}),Aue=S.forwardRef(function(e,t){return T.jsx(EF,{...e,ref:t,direction:"down"})}),CF=({children:e,className:t,...n})=>T.jsxs(kue,{"data-slot":"select-positioner",className:ze(Ou["select-positioner"],t),sideOffset:4,...n,children:[T.jsx(Rue,{"data-slot":"select-scroll-up-arrow"}),e,T.jsx(Aue,{"data-slot":"select-scroll-down-arrow"})]});CF.displayName="SelectPositioner";function kF(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 mg="base-ui-disable-scrollbar",ZS={className:mg,getElement(e){return T.jsx("style",{nonce:e,href:mg,precedence:"base-ui:low",children:`.${mg}{scrollbar-width:none}.${mg}::-webkit-scrollbar{display:none}`})}},Tue=S.createContext(void 0);function _ue(e){return S.useContext(Tue)}const Due=S.createContext(void 0),Mue={disableStyleElements:!1};function $ue(){return S.useContext(Due)??Mue}const Fl=1,Oue={...kj,...OC},Pue=S.forwardRef(function(e,t){const{render:n,className:r,finalFocus:i,...o}=e,{store:a,popupRef:l,onOpenChangeComplete:c,setOpen:f,valueRef:h,selectedItemTextRef:p,keyboardActiveRef:m,multiple:g,handleScrollArrowVisibility:b,scrollHandlerRef:v,highlightItemOnHover:w}=zs(),{side:x,align:k,alignItemWithTriggerActive:C,setControlledAlignItemWithTrigger:R,scrollDownArrowRef:_,scrollUpArrowRef:D}=rk(),M=_ue()!=null,O=gF(),{nonce:U,disableStyleElements:L}=$ue(),I=Hr(),$=ut(a,lt.id),B=ut(a,lt.open),V=ut(a,lt.mounted),F=ut(a,lt.popupProps),z=ut(a,lt.transitionStatus),j=ut(a,lt.triggerElement),H=ut(a,lt.positionerElement),X=ut(a,lt.listElement),P=S.useRef(0),K=S.useRef(!1),ee=S.useRef(0),q=S.useRef(!1),ae=S.useRef({}),re=Gb(),fe=Ze(Ae=>{if(!H||!l.current||!q.current)return;if(K.current||!C){b();return}const Ie=H.style.top==="0px",Y=H.style.bottom==="0px",W=H.getBoundingClientRect().height,Q=dn(H),pe=getComputedStyle(H),oe=parseFloat(pe.marginTop),me=parseFloat(pe.marginBottom),te=k$(getComputedStyle(l.current)),Z=Math.min(Q.documentElement.clientHeight-oe-me,te),ie=Ae.scrollTop,J=R$(Ae);let Se=0,ke=null,ge=!1,_e=!1;const de=ye=>{H.style.height=`${ye}px`},Ce=(ye,Me)=>{const Pe=Xx(ye,0,Z-W);Pe>0&&de(W+Pe),Ae.scrollTop=Me,Z-(W+Pe)<=Fl&&(K.current=!0),b()};if(Ie){const ye=J-ie,Me=W+ye,Pe=Math.min(Me,Z);if(Se=Pe,ye<=Fl){Ce(ye,J);return}Z-Pe>Fl?_e=!0:ge=!0}else if(Y){const ye=ie,Me=W+ye,Pe=Math.min(Me,Z),Ke=Me-Z;if(Se=Pe,ye<=Fl){Ce(ye,0);return}Z-Pe>Fl?ke=0:(ge=!0,ie<J&&(ke=ie-(ye-Ke)))}if(Se=Math.ceil(Se),Se!==0&&de(Se),_e||ke!=null){const ye=R$(Ae),Me=_e?ye:Xx(ke,0,ye);Math.abs(Ae.scrollTop-Me)>Fl&&(Ae.scrollTop=Me)}(ge||Se>=Z-Fl)&&(K.current=!0),b()});S.useImperativeHandle(v,()=>fe,[fe]),hp({open:B,ref:l,onComplete(){B&&(c==null||c(!0))}});const ve={open:B,transitionStatus:z,side:x,align:k};We(()=>{!H||!l.current||Object.keys(ae.current).length||(ae.current={top:H.style.top||"0",left:H.style.left||"0",right:H.style.right,height:H.style.height,bottom:H.style.bottom,minHeight:H.style.minHeight,maxHeight:H.style.maxHeight,marginTop:H.style.marginTop,marginBottom:H.style.marginBottom})},[l,H]),We(()=>{B||C||(q.current=!1,K.current=!1,P.current=0,ee.current=0,eb(H,ae.current))},[B,C,H,l]),We(()=>{const Ae=l.current;if(!(!B||!j||!H||!Ae||a.state.transitionStatus==="ending")){if(!C){q.current=!0,re.request(b),Ae.style.removeProperty("--transform-origin");return}queueMicrotask(()=>{var Y;const Ie=Iue(Ae);Ae.style.removeProperty("--transform-origin");try{const W=getComputedStyle(H),Q=getComputedStyle(Ae),pe=dn(j),oe=Un(H),me=j.getBoundingClientRect(),te=H.getBoundingClientRect(),Z=me.left,ie=me.height,J=X||Ae,Se=J.scrollHeight,ke=parseFloat(Q.borderBottomWidth),ge=parseFloat(W.marginTop)||10,_e=parseFloat(W.marginBottom)||10,de=parseFloat(W.minHeight)||100,Ce=k$(Q),ye=5,Me=5,Pe=20,Ke=pe.documentElement.clientHeight-ge-_e,Et=pe.documentElement.clientWidth,vt=Ke-me.bottom+ie,Le=p.current,Be=h.current;let $e,Ye=0,Je=0;if(Le&&Be){const rt=Be.getBoundingClientRect();$e=Le.getBoundingClientRect();const Ut=rt.left-Z,an=$e.left-te.left,Jt=rt.top-me.top+rt.height/2,gn=$e.top-te.top+$e.height/2;Ye=Ut-an,Je=gn-Jt}const et=vt+Je+_e+ke;let tt=Math.min(Ke,et);const jt=Ke-ge-_e,kt=et-tt,Ot=Math.max(ye,Z+Ye),zt=Et-Me,Dn=Math.max(0,Ot+te.width-zt);H.style.left=`${Ot-Dn}px`,H.style.height=`${tt}px`,H.style.maxHeight="auto",H.style.marginTop=`${ge}px`,H.style.marginBottom=`${_e}px`,Ae.style.height="100%";const Tr=J.scrollHeight-J.clientHeight,Vn=kt>=Tr;Vn&&(tt=Math.min(Ke,te.height)-(kt-Tr));const Kr=me.top<Pe||me.bottom>Ke-Pe||tt<Math.min(Se,de),Nn=(((Y=oe.visualViewport)==null?void 0:Y.scale)??1)!==1&&FC;if(Kr||Nn){q.current=!0,eb(H,ae.current),Rn.flushSync(()=>R(!1));return}if(Vn){const rt=Math.max(0,Ke-et);H.style.top=te.height>=jt?"0":`${rt}px`,H.style.height=`${tt}px`,J.scrollTop=J.scrollHeight-J.clientHeight,P.current=Math.max(de,tt)}else H.style.bottom="0",P.current=Math.max(de,tt),J.scrollTop=kt;if($e){const rt=te.top,Ut=te.height,an=$e.top+$e.height/2,Jt=Ut>0?(an-rt)/Ut*100:50,gn=Xx(Jt,0,100);Ae.style.setProperty("--transform-origin",`50% ${gn}%`)}(P.current===Ke||tt>=Ce)&&(K.current=!0),b(),setTimeout(()=>{q.current=!0})}finally{Ie()}})}},[a,B,H,j,h,p,l,b,C,R,re,_,D,X]),S.useEffect(()=>{if(!C||!H||!B)return;const Ae=Un(H);function Ie(Y){f(!1,mn(nse,Y))}return Ae.addEventListener("resize",Ie),()=>{Ae.removeEventListener("resize",Ie)}},[f,C,H,B]);const Re={...X?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":g||void 0,id:`${$}-list`},onKeyDown(Ae){m.current=!0,M&&hue.has(Ae.key)&&Ae.stopPropagation()},onMouseMove(){m.current=!1},onPointerLeave(Ae){if(!w||kF(Ae)||Ae.pointerType==="touch")return;const Ie=Ae.currentTarget;I.start(0,()=>{a.set("activeIndex",null),Ie.focus({preventScroll:!0})})},onScroll(Ae){X||fe(Ae.currentTarget)},...C&&{style:X?{height:"100%"}:SF}},le=gr("div",e,{ref:[t,l],state:ve,stateAttributesMapping:Oue,props:[F,Re,Yj(z),{className:!X&&C?ZS.className:void 0},o]});return T.jsxs(S.Fragment,{children:[!L&&ZS.getElement(U),T.jsx(Fle,{context:O,modal:!1,disabled:!V,returnFocus:i,restoreFocus:!0,children:le})]})});function k$(e){const t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}function R$(e){return Math.max(0,e.scrollHeight-e.clientHeight)}const A$=[["transform","none"],["scale","1"],["translate","0 0"]];function Iue(e){const{style:t}=e,n={};for(const[r,i]of A$)n[r]=t.getPropertyValue(r),t.setProperty(r,i,"important");return()=>{for(const[r]of A$){const i=n[r];i?t.setProperty(r,i):t.removeProperty(r)}}}const RF=({children:e,className:t,...n})=>T.jsx(Pue,{"data-slot":"select-popup",render:T.jsx(En,{p:2,gap:0,fullwidth:!0,"data-is-popup":!0}),className:ze(Ou["select-popup"],t),...n,children:e});RF.displayName="SelectPopup";const Lue=S.forwardRef(function(e,t){const{className:n,render:r,...i}=e,{store:o,scrollHandlerRef:a}=zs(),{alignItemWithTriggerActive:l}=rk(),c=ut(o,lt.hasScrollArrows),f=ut(o,lt.openMethod),h=ut(o,lt.multiple),p={id:`${ut(o,lt.id)}-list`,role:"listbox","aria-multiselectable":h||void 0,onScroll(g){var b;(b=a.current)==null||b.call(a,g.currentTarget)},...l&&{style:SF},className:c&&f!=="touch"?ZS.className:void 0},m=Ze(g=>{o.set("listElement",g)});return gr("div",e,{ref:[t,m],props:[p,i]})}),AF=({children:e,...t})=>T.jsx(Lue,{"data-slot":"select-list",render:T.jsx(Eu,{fullwidth:!0}),style:{listStyleType:"none",...t.style},...t,children:e});AF.displayName="SelectList";const Nue=S.createContext(void 0),jue=S.memo(S.forwardRef(function(e,t){const{render:n,className:r,value:i=null,label:o,disabled:a=!1,nativeButton:l=!1,...c}=e,f=S.useRef(null),h=Yle({label:o,textRef:f,indexGuessBehavior:eF.GuessFromOrder}),{store:p,getItemProps:m,setOpen:g,setValue:b,selectionRef:v,typingRef:w,valuesRef:x,keyboardActiveRef:k,multiple:C,highlightItemOnHover:R}=zs(),_=Hr(),D=ut(p,lt.isActive,h.index),M=ut(p,lt.isSelected,h.index,i),O=ut(p,lt.isSelectedByFocus,h.index),U=ut(p,lt.isItemEqualToValue),L=h.index,I=L!==-1,$=S.useRef(null),B=zr(L);We(()=>{if(!I)return;const re=x.current;return re[L]=i,()=>{delete re[L]}},[I,L,i,x]),We(()=>{if(!I)return;const re=p.state.value;let fe=re;C&&Array.isArray(re)&&re.length>0&&(fe=re[re.length-1]),fe!==void 0&&wf(i,fe,U)&&p.set("selectedIndex",L)},[I,L,C,U,p,i]);const V={disabled:a,selected:M,highlighted:D},F=m({active:D,selected:M});F.onFocus=void 0,F.id=void 0;const z=S.useRef(null),j=S.useRef("mouse"),H=S.useRef(!1),{getButtonProps:X,buttonRef:P}=nk({disabled:a,focusableWhenDisabled:!0,native:l});function K(re){const fe=p.state.value;if(C){const ve=Array.isArray(fe)?fe:[],Re=M?Uie(ve,i,U):[...ve,i];b(Re,mn(Hx,re))}else b(i,mn(Hx,re)),g(!1,mn(Hx,re))}const ee={role:"option","aria-selected":M,tabIndex:D?0:-1,onFocus(){p.set("activeIndex",L)},onMouseEnter(){!k.current&&p.state.selectedIndex===null&&R&&p.set("activeIndex",L)},onMouseMove(){R&&p.set("activeIndex",L)},onMouseLeave(re){!R||k.current||kF(re)||_.start(0,()=>{p.state.activeIndex===L&&p.set("activeIndex",null)})},onTouchStart(){v.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(re){z.current=re.key,p.set("activeIndex",L)},onClick(re){H.current=!1,!(re.type==="keydown"&&z.current===null)&&(a||z.current===" "&&w.current||j.current!=="touch"&&!D||(z.current=null,K(re.nativeEvent)))},onPointerEnter(re){j.current=re.pointerType},onPointerDown(re){j.current=re.pointerType,H.current=!0},onMouseUp(re){if(a)return;if(H.current){H.current=!1;return}const fe=!v.current.allowSelectedMouseUp&&M,ve=!v.current.allowUnselectedMouseUp&&!M;fe||ve||j.current!=="touch"&&!D||K(re.nativeEvent)}},q=gr("div",e,{ref:[P,t,h.ref,$],state:V,props:[F,ee,c,X]}),ae=S.useMemo(()=>({selected:M,indexRef:B,textRef:f,selectedByFocus:O,hasRegistered:I}),[M,B,f,O,I]);return T.jsx(Nue.Provider,{value:ae,children:q})})),TF=({value:e,label:t,description:n,icon:r,...i})=>T.jsx(jue,{"data-slot":"select-item",value:e,label:t,className:Ou["select-item"],...i,render:o=>T.jsx(gp,{render:T.jsx("div",{}),fullwidth:!0,label:t,description:n,icon:r,...o})});TF.displayName="SelectItem";const _F=({size:e=pue,fullwidth:t,ghost:n,disabled:r,required:i,name:o,label:a,description:l,placeholder:c,items:f,defaultValue:h=[],RootProps:p,TriggerProps:m,PortalProps:g,PositionerProps:b,PopupProps:v,ListProps:w,ValueProps:x,IndicatorProps:k,FieldProps:C,children:R,..._})=>{const D=S.useMemo(()=>{if(!f)return;const M=new Map(f.map(O=>[O.value,O.label]));return O=>M.get(O)??O},[f]);return T.jsx(mi,{condition:!!(a||l),render:T.jsx(XC,{name:o,label:a,description:l,required:i,...C}),children:T.jsxs(mue,{"data-slot":"select-multiple-root",name:o,multiple:!0,defaultValue:h,items:f,itemToStringLabel:D,..._,...p,children:[T.jsxs(yF,{fullwidth:t,ghost:n,disabled:r,...m,children:[T.jsx(bF,{size:e,...x,children:M=>M&&M.length>0?M.map(O=>(D==null?void 0:D(O))??O).join(", "):c?T.jsx("span",{className:Ou["select-placeholder"],children:c}):null}),T.jsx(vF,{...k})]}),T.jsx(xF,{...g,children:T.jsx(CF,{...b,children:T.jsx(RF,{...v,children:T.jsx(AF,{...w,children:f?f.map(({label:M,value:O,disabled:U,description:L,icon:I})=>T.jsx(TF,{label:M,value:O,disabled:U||r,description:L,icon:I},O)):R})})})})]})})};_F.displayName="SelectMultiple";function ik({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=S.useRef(e!==void 0),[o,a]=S.useState(t),l=i?e:o,c=S.useCallback(f=>{i||a(f)},[]);return[l,c]}const T$={};function Vr(e,t){const n=S.useRef(T$);return n.current===T$&&(n.current=e(t)),n}const Qx=rl[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Fue=Qx&&Qx!==S.useLayoutEffect?Qx:e=>e();function qe(e){const t=Vr(zue).current;return t.next=e,Fue(t.effect),t.trampoline}function zue(){const e={next:void 0,callback:Bue,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function Bue(){}const Hue=()=>{},at=typeof document<"u"?S.useLayoutEffect:Hue,DF=S.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function Uue(){return S.useContext(DF)}function ok(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,o=qe(i),a=S.useRef(0),l=Vr(Vue).current,c=Vr(que).current,[f,h]=S.useState(0),p=S.useRef(f),m=qe((x,k)=>{c.set(x,k??null),p.current+=1,h(p.current)}),g=qe(x=>{c.delete(x),p.current+=1,h(p.current)}),b=S.useMemo(()=>{const x=new Map;return Array.from(c.keys()).filter(C=>C.isConnected).sort(Gue).forEach((C,R)=>{const _=c.get(C)??{};x.set(C,{..._,index:R})}),x},[c,f]);at(()=>{if(typeof MutationObserver!="function"||b.size===0)return;const x=new MutationObserver(k=>{const C=new Set,R=_=>C.has(_)?C.delete(_):C.add(_);k.forEach(_=>{_.removedNodes.forEach(R),_.addedNodes.forEach(R)}),C.size===0&&(p.current+=1,h(p.current))});return b.forEach((k,C)=>{C.parentElement&&x.observe(C.parentElement,{childList:!0})}),()=>{x.disconnect()}},[b]),at(()=>{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]),at(()=>()=>{n.current=[]},[n]),at(()=>()=>{r&&(r.current=[])},[r]);const v=qe(x=>(l.add(x),()=>{l.delete(x)}));at(()=>{l.forEach(x=>x(b))},[l,b]);const w=S.useMemo(()=>({register:m,unregister:g,subscribeMapChange:v,elementsRef:n,labelsRef:r,nextIndexRef:a}),[m,g,v,n,r,a]);return T.jsx(DF.Provider,{value:w,children:t})}function que(){return new Map}function Vue(){return new Set}function Gue(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 Yue=S.createContext(void 0);function ov(){const e=S.useContext(Yue);return(e==null?void 0:e.direction)??"ltr"}function co(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 Cu(e,t,n,r){const i=Vr(MF).current;return Kue(i,e,t,n,r)&&$F(i,[e,t,n,r]),i.callback}function Wue(e){const t=Vr(MF).current;return Xue(t,e)&&$F(t,e),t.callback}function MF(){return{callback:null,cleanup:null,refs:[]}}function Kue(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function Xue(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function $F(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 Que=parseInt(S.version,10);function sk(e){return Que>=e}function _$(e){if(!S.isValidElement(e))return null;const t=e,n=t.props;return(sk(19)?n==null?void 0:n.ref:t.ref)??null}function JS(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Zue(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 Jue(e,t){return typeof e=="function"?e(t):e}function ece(e,t){return typeof e=="function"?e(t):e}const bh={};function Bh(e,t,n,r,i){let o={...eE(e,bh)};return t&&(o=Zg(o,t)),n&&(o=Zg(o,n)),r&&(o=Zg(o,r)),o}function tce(e){if(e.length===0)return bh;if(e.length===1)return eE(e[0],bh);let t={...eE(e[0],bh)};for(let n=1;n<e.length;n+=1)t=Zg(t,e[n]);return t}function Zg(e,t){return OF(t)?t(e):nce(e,t)}function nce(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=JS(e.style,r);break}case"className":{e[n]=PF(e.className,r);break}default:rce(n,r)?e[n]=ice(e[n],r):e[n]=r}}return e}function rce(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 OF(e){return typeof e=="function"}function eE(e,t){return OF(e)?e(t):e??bh}function ice(e,t){return t?e?n=>{if(oce(n)){const i=n;tE(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 tE(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function PF(e,t){return t?e?t+" "+e:t:e}function oce(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function IF(){}const Cf=Object.freeze([]),Hn=Object.freeze({}),sce=500,ace=500,lce={style:{transition:"none"}},uce="data-base-ui-click-trigger",cce={fallbackAxisSide:"none"},fce={fallbackAxisSide:"end"},dce={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function wi(e,t,n={}){const r=t.render,i=hce(t,n);if(n.enabled===!1)return null;const o=n.state??Hn;return mce(e,r,i,o)}function hce(e,t={}){const{className:n,style:r,render:i}=e,{state:o=Hn,ref:a,props:l,stateAttributesMapping:c,enabled:f=!0}=t,h=f?Jue(n,o):void 0,p=f?ece(r,o):void 0,m=f?Zue(o,c):Hn,g=f?JS(m,Array.isArray(l)?tce(l):l)??Hn:Hn;return typeof document<"u"&&(f?Array.isArray(a)?g.ref=Wue([g.ref,_$(i),...a]):g.ref=Cu(g.ref,_$(i),a):Cu(null,null)),f?(h!==void 0&&(g.className=PF(g.className,h)),p!==void 0&&(g.style=JS(g.style,p)),g):Hn}const pce=Symbol.for("react.lazy");function mce(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=Bh(n,t.props);i.ref=n.ref;let o=t;return(o==null?void 0:o.$$typeof)===pce&&(o=S.Children.toArray(t)[0]),S.cloneElement(o,i)}if(e&&typeof e=="string")return gce(e,n);throw new Error(co(8))}function gce(e,t){return e==="button"?S.createElement("button",{type:"button",...t,key:t.key}):e==="img"?S.createElement("img",{alt:"",...t,key:t.key}):S.createElement(e,t)}const tb="none",Hh="trigger-press",li="trigger-hover",vh="trigger-focus",ak="outside-press",LF="item-press",kf="focus-out",lk="escape-key",Jg="list-navigation",yce="cancel-open",ey="sibling-open",bce="imperative-action";function Lt(e,t,n,r){let i=!1,o=!1;const a=r??Hn;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 vce={...rl};let D$=0;function xce(e,t="mui"){const[n,r]=S.useState(e),i=e||n;return S.useEffect(()=>{n==null&&(D$+=1,r(`${t}-${D$}`))},[n,t]),i}const M$=vce.useId;function Pu(e,t){if(M$!==void 0){const n=M$();return e??(t?`${t}-${n}`:n)}return xce(e,t)}function yp(e){return Pu(e,"base-ui")}const wce=[];function sv(e){S.useEffect(e,wce)}const gg=null;class Sce{constructor(){ce(this,"callbacks",[]);ce(this,"callbacksCount",0);ce(this,"nextId",1);ce(this,"startId",1);ce(this,"isScheduled",!1);ce(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 yg=new Sce;class Ao{constructor(){ce(this,"currentId",gg);ce(this,"cancel",()=>{this.currentId!==gg&&(yg.cancel(this.currentId),this.currentId=gg)});ce(this,"disposeEffect",()=>this.cancel)}static create(){return new Ao}static request(t){return yg.request(t)}static cancel(t){return yg.cancel(t)}request(t){this.cancel(),this.currentId=yg.request(()=>{this.currentId=gg,t()})}}function uk(){const e=Vr(Ao.create).current;return sv(e.disposeEffect),e}function ms(e){return e==null?e:"current"in e?e.current:e}let Uh=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const Ece={[Uh.startingStyle]:""},Cce={[Uh.endingStyle]:""},NF={transitionStatus(e){return e==="starting"?Ece:e==="ending"?Cce:null}};function kce(e,t=!1,n=!0){const r=uk();return qe((i,o=null)=>{r.cancel();function a(){Rn.flushSync(i)}const l=ms(e);if(l==null)return;const c=l;if(typeof c.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)i();else{let p=function(){const g=Uh.startingStyle;if(!c.hasAttribute(g)){r.request(m);return}const b=new MutationObserver(()=>{c.hasAttribute(g)||(b.disconnect(),m())});b.observe(c,{attributes:!0,attributeFilter:[g]}),o==null||o.addEventListener("abort",()=>b.disconnect(),{once:!0})},m=function(){Promise.all(c.getAnimations().map(g=>g.finished)).then(()=>{o!=null&&o.aborted||a()}).catch(()=>{const g=c.getAnimations();if(n){if(o!=null&&o.aborted)return;a()}else g.length>0&&g.some(b=>b.pending||b.playState!=="finished")&&m()})};var f=p,h=m;if(t){p();return}r.request(m)}})}function jF(e,t=!1,n=!1){const[r,i]=S.useState(e&&t?"idle":void 0),[o,a]=S.useState(e);return e&&!o&&(a(!0),i("starting")),!e&&o&&r!=="ending"&&!n&&i("ending"),!e&&!o&&r==="ending"&&i(void 0),at(()=>{if(!e&&o&&r!=="ending"&&n){const l=Ao.request(()=>{i("ending")});return()=>{Ao.cancel(l)}}},[e,o,r,n]),at(()=>{if(!e||t)return;const l=Ao.request(()=>{i(void 0)});return()=>{Ao.cancel(l)}},[t,e]),at(()=>{if(!e||!t)return;e&&o&&r!=="idle"&&i("starting");const l=Ao.request(()=>{i("idle")});return()=>{Ao.cancel(l)}},[t,e,o,i,r]),S.useMemo(()=>({mounted:o,setMounted:a,transitionStatus:r}),[o,r])}let Rce=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function ck(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:o}=e,{register:a,unregister:l,subscribeMapChange:c,elementsRef:f,labelsRef:h,nextIndexRef:p}=Uue(),m=S.useRef(-1),[g,b]=S.useState(o??(i===Rce.GuessFromOrder?()=>{if(m.current===-1){const x=p.current;p.current+=1,m.current=x}return m.current}:-1)),v=S.useRef(null),w=S.useCallback(x=>{var k;if(v.current=x,g!==-1&&x!==null&&(f.current[g]=x,h)){const C=t!==void 0;h.current[g]=C?t:((k=r==null?void 0:r.current)==null?void 0:k.textContent)??x.textContent}},[g,f,h,t,r]);return at(()=>{if(o!=null)return;const x=v.current;if(x)return a(x,n),()=>{l(x)}},[o,a,l,n]),at(()=>{if(o==null)return c(x=>{var C;const k=v.current?(C=x.get(v.current))==null?void 0:C.index:null;k!=null&&b(k)})},[o,c,b]),S.useMemo(()=>({ref:w,index:g}),[g,w])}function Ace(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}function av(){return typeof window<"u"}function hl(e){return fk(e)?(e.nodeName||"").toLowerCase():"#document"}function Qn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Bo(e){var t;return(t=(fk(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function fk(e){return av()?e instanceof Node||e instanceof Qn(e).Node:!1}function Wt(e){return av()?e instanceof Element||e instanceof Qn(e).Element:!1}function pn(e){return av()?e instanceof HTMLElement||e instanceof Qn(e).HTMLElement:!1}function nE(e){return!av()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Qn(e).ShadowRoot}function pl(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Gr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!=="inline"&&i!=="contents"}function Tce(e){return/^(table|td|th)$/.test(hl(e))}function lv(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const _ce=/transform|translate|scale|rotate|perspective|filter/,Dce=/paint|layout|strict|content/,zl=e=>!!e&&e!=="none";let Zx;function dk(e){const t=Wt(e)?Gr(e):e;return zl(t.transform)||zl(t.translate)||zl(t.scale)||zl(t.rotate)||zl(t.perspective)||!uv()&&(zl(t.backdropFilter)||zl(t.filter))||_ce.test(t.willChange||"")||Dce.test(t.contain||"")}function Mce(e){let t=Lo(e);for(;pn(t)&&!$o(t);){if(dk(t))return t;if(lv(t))return null;t=Lo(t)}return null}function uv(){return Zx==null&&(Zx=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Zx}function $o(e){return/^(html|body|#document)$/.test(hl(e))}function Gr(e){return Qn(e).getComputedStyle(e)}function cv(e){return Wt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Lo(e){if(hl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||nE(e)&&e.host||Bo(e);return nE(t)?t.host:t}function FF(e){const t=Lo(e);return $o(t)?e.ownerDocument?e.ownerDocument.body:e.body:pn(t)&&pl(t)?t:FF(t)}function Xa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=FF(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Qn(i);if(o){const l=rE(a);return t.concat(a,a.visualViewport||[],pl(i)?i:[],l&&n?Xa(l):[])}else return t.concat(i,Xa(i,[],n))}function rE(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const zF=S.createContext(void 0);function hk(e=!1){const t=S.useContext(zF);if(t===void 0&&!e)throw new Error(co(16));return t}function $ce(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:o}=e,a=r&&t!==!1,l=r&&t===!1;return{props:S.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||l)&&(f.disabled=n),f},[r,n,t,a,l,o,i])}}function fv(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,o=S.useRef(null),a=hk(!0)!==void 0,l=qe(()=>{const m=o.current;return!!((m==null?void 0:m.tagName)==="A"&&(m!=null&&m.href))}),{props:c}=$ce({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:i}),f=S.useCallback(()=>{const m=o.current;Oce(m)&&a&&t&&c.disabled===void 0&&m.disabled&&(m.disabled=!1)},[t,c.disabled,a]);at(f,[f]);const h=S.useCallback((m={})=>{const{onClick:g,onMouseDown:b,onKeyUp:v,onKeyDown:w,onPointerDown:x,...k}=m;return Bh({type:i?"button":void 0,onClick(R){if(t){R.preventDefault();return}g==null||g(R)},onMouseDown(R){t||b==null||b(R)},onKeyDown(R){if(t||(tE(R),w==null||w(R)),R.baseUIHandlerPrevented)return;const _=R.target===R.currentTarget&&!i&&!l()&&!t,D=R.key==="Enter",M=R.key===" ";_&&((M||D)&&R.preventDefault(),D&&(g==null||g(R)))},onKeyUp(R){t||(tE(R),v==null||v(R)),!R.baseUIHandlerPrevented&&R.target===R.currentTarget&&!i&&!t&&R.key===" "&&(g==null||g(R))},onPointerDown(R){if(t){R.preventDefault();return}x==null||x(R)}},i?void 0:{role:"button"},c,k)},[t,c,i,l]),p=qe(m=>{o.current=m,f()});return{getButtonProps:h,buttonRef:p}}function Oce(e){return pn(e)&&e.tagName==="BUTTON"}const Vf=typeof navigator<"u",Jx=Ice(),BF=Nce(),HF=Lce(),UF=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),qF=Jx.platform==="MacIntel"&&Jx.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(Jx.platform),VF=Vf&&/apple/i.test(navigator.vendor),iE=Vf&&/android/i.test(BF)||/android/i.test(HF),Pce=Vf&&BF.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,GF=HF.includes("jsdom/");function Ice(){if(!Vf)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 Lce(){if(!Vf)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function Nce(){if(!Vf)return"";const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform??""}const oE="data-base-ui-focusable",YF="active",WF="selected",KF="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Qa="ArrowLeft",Za="ArrowRight",pk="ArrowUp",bp="ArrowDown";function Fi(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 St(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&&nE(n)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function nb(e,t){if(!Wt(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,r]of t.entries())if(St(r,n))return!r.hasAttribute("data-trigger-disabled");return!1}function ui(e){return"composedPath"in e?e.composedPath()[0]:e.target}function to(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 jce(e){return e.matches("html,body")}function dv(e){return pn(e)&&e.matches(KF)}function sE(e){return e?e.getAttribute("role")==="combobox"&&dv(e):!1}function Fce(e){if(!e||GF)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function rb(e){return e?e.hasAttribute(oE)?e:e.querySelector(`[${oE}]`)||e:null}function mu(e,t,n=!0){return e.filter(i=>{var o;return i.parentId===t&&(!n||((o=i.context)==null?void 0:o.open))}).flatMap(i=>[i,...mu(e,i.id,n)])}function $$(e,t){var i;let n=[],r=(i=e.find(o=>o.id===t))==null?void 0:i.parentId;for(;r;){const o=e.find(a=>a.id===r);r=o==null?void 0:o.parentId,o&&(n=n.concat(o))}return n}function fr(e){e.preventDefault(),e.stopPropagation()}function zce(e){return"nativeEvent"in e}function XF(e){return e.pointerType===""&&e.isTrusted?!0:iE&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function QF(e){return GF?!1:!iE&&e.width===0&&e.height===0||iE&&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 Rf(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function ZF(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const Bce=["top","right","bottom","left"],Af=Math.min,ci=Math.max,Tf=Math.round,jc=Math.floor,Oo=e=>({x:e,y:e}),Hce={left:"right",right:"left",bottom:"top",top:"bottom"};function aE(e,t,n){return ci(e,Af(t,n))}function Ls(e,t){return typeof e=="function"?e(t):e}function hi(e){return e.split("-")[0]}function ml(e){return e.split("-")[1]}function mk(e){return e==="x"?"y":"x"}function gk(e){return e==="y"?"height":"width"}function Yi(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function yk(e){return mk(Yi(e))}function Uce(e,t,n){n===void 0&&(n=!1);const r=ml(e),i=yk(e),o=gk(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=ib(a)),[a,ib(a)]}function qce(e){const t=ib(e);return[lE(e),t,lE(t)]}function lE(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const O$=["left","right"],P$=["right","left"],Vce=["top","bottom"],Gce=["bottom","top"];function Yce(e,t,n){switch(e){case"top":case"bottom":return n?t?P$:O$:t?O$:P$;case"left":case"right":return t?Vce:Gce;default:return[]}}function Wce(e,t,n,r){const i=ml(e);let o=Yce(hi(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(lE)))),o}function ib(e){const t=hi(e);return Hce[t]+e.slice(t.length)}function Kce(e){return{top:0,right:0,bottom:0,left:0,...e}}function JF(e){return typeof e!="number"?Kce(e):{top:e,right:e,bottom:e,left:e}}function ob(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 bg(e,t,n){return Math.floor(e/t)!==n}function Kc(e,t){return t<0||t>=e.current.length}function ty(e,t){return rr(e,{disabledIndices:t})}function uE(e,t){return rr(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function rr(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&&Ja(e,o,r));return o}function e6(e,{event:t,orientation:n,loopFocus:r,rtl:i,cols:o,disabledIndices:a,minIndex:l,maxIndex:c,prevIndex:f,stopEvent:h=!1}){let p=f;const m=[],g={};let b=!1;{let x=null,k=-1;e.current.forEach((C,R)=>{if(C==null)return;const _=C.closest('[role="row"]');_&&(b=!0),(_!==x||k===-1)&&(x=_,k+=1,m[k]=[]),m[k].push(R),g[R]=k})}const v=b&&m.length>0&&m.some(x=>x.length!==o);function w(x){if(!v||f===-1)return;const k=g[f];if(k==null)return;const C=m[k].indexOf(f);let R=x==="up"?k-1:k+1;r&&(R<0?R=m.length-1:R>=m.length&&(R=0));const _=new Set;for(;R>=0&&R<m.length&&!_.has(R);){_.add(R);const D=m[R];if(D.length===0){R=x==="up"?R-1:R+1;continue}const M=Math.min(C,D.length-1);for(let O=M;O>=0;O-=1){const U=D[O];if(!Ja(e,U,a))return U}R=x==="up"?R-1:R+1,r&&(R<0?R=m.length-1:R>=m.length&&(R=0))}}if(t.key===pk){const x=w("up");if(x!==void 0)h&&fr(t),p=x;else{if(h&&fr(t),f===-1)p=c;else if(p=rr(e,{startingIndex:p,amount:o,decrement:!0,disabledIndices:a}),r&&(f-o<l||p<0)){const k=f%o,C=c%o,R=c-(C-k);C===k?p=c:p=C>k?R:R-o}Kc(e,p)&&(p=f)}}if(t.key===bp){const x=w("down");x!==void 0?(h&&fr(t),p=x):(h&&fr(t),f===-1?p=l:(p=rr(e,{startingIndex:f,amount:o,disabledIndices:a}),r&&f+o>c&&(p=rr(e,{startingIndex:f%o-o,amount:o,disabledIndices:a}))),Kc(e,p)&&(p=f))}if(n==="both"){const x=jc(f/o);t.key===(i?Qa:Za)&&(h&&fr(t),f%o!==o-1?(p=rr(e,{startingIndex:f,disabledIndices:a}),r&&bg(p,o,x)&&(p=rr(e,{startingIndex:f-f%o-1,disabledIndices:a}))):r&&(p=rr(e,{startingIndex:f-f%o-1,disabledIndices:a})),bg(p,o,x)&&(p=f)),t.key===(i?Za:Qa)&&(h&&fr(t),f%o!==0?(p=rr(e,{startingIndex:f,decrement:!0,disabledIndices:a}),r&&bg(p,o,x)&&(p=rr(e,{startingIndex:f+(o-f%o),decrement:!0,disabledIndices:a}))):r&&(p=rr(e,{startingIndex:f+(o-f%o),decrement:!0,disabledIndices:a})),bg(p,o,x)&&(p=f));const k=jc(c/o)===x;Kc(e,p)&&(r&&k?p=t.key===(i?Za:Qa)?c:rr(e,{startingIndex:f-f%o-1,disabledIndices:a}):p=f)}return p}function t6(e,t,n){const r=[];let i=0;return e.forEach(({width:o,height:a},l)=>{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]=l}),c=!0):i+=1}}),[...r]}function n6(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 r6(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Ja(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}/*!
|
|
502
|
-
* tabbable 6.4.0
|
|
503
|
-
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
504
|
-
*/var Xce=["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] *)"],sb=Xce.join(","),i6=typeof Element>"u",_f=i6?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ab=!i6&&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},lb=function(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),o=i===""||i==="true",a=o||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):lb(t.parentNode));return a},Qce=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},o6=function(t,n,r){if(lb(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(sb));return n&&_f.call(t,sb)&&i.unshift(t),i=i.filter(r),i},ub=function(t,n,r){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!lb(a,!1))if(a.tagName==="SLOT"){var l=a.assignedElements(),c=l.length?l:a.children,f=ub(c,!0,r);r.flatten?i.push.apply(i,f):i.push({scopeParent:a,candidates:f})}else{var h=_f.call(a,sb);h&&r.filter(a)&&(n||!t.includes(a))&&i.push(a);var p=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),m=!lb(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(p&&m){var g=ub(p===!0?a.children:p.children,!0,r);r.flatten?i.push.apply(i,g):i.push({scopeParent:a,candidates:g})}else o.unshift.apply(o,a.children)}}return i},s6=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},a6=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Qce(t))&&!s6(t)?0:t.tabIndex},Zce=function(t,n){var r=a6(t);return r<0&&n&&!s6(t)?0:r},Jce=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},l6=function(t){return t.tagName==="INPUT"},efe=function(t){return l6(t)&&t.type==="hidden"},tfe=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},nfe=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},rfe=function(t){if(!t.name)return!0;var n=t.form||ab(t),r=function(l){return n.querySelectorAll('input[type="radio"][name="'+l+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var o=nfe(i,t.form);return!o||o===t},ife=function(t){return l6(t)&&t.type==="radio"},ofe=function(t){return ife(t)&&!rfe(t)},sfe=function(t){var n,r=t&&ab(t),i=(n=r)===null||n===void 0?void 0:n.host,o=!1;if(r&&r!==t){var a,l,c;for(o=!!((a=i)!==null&&a!==void 0&&(l=a.ownerDocument)!==null&&l!==void 0&&l.contains(i)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!o&&i;){var f,h,p;r=ab(i),i=(f=r)===null||f===void 0?void 0:f.host,o=!!((h=i)!==null&&h!==void 0&&(p=h.ownerDocument)!==null&&p!==void 0&&p.contains(i))}}return o},I$=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},afe=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var o=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!o}if(getComputedStyle(t).visibility==="hidden")return!0;var a=_f.call(t,"details>summary:first-of-type"),l=a?t.parentElement:t;if(_f.call(l,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof i=="function"){for(var c=t;t;){var f=t.parentElement,h=ab(t);if(f&&!f.shadowRoot&&i(f)===!0)return I$(t);t.assignedSlot?t=t.assignedSlot:!f&&h!==t.ownerDocument?t=h.host:t=f}t=c}if(sfe(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return I$(t);return!1},lfe=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return _f.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},cE=function(t,n){return!(n.disabled||efe(n)||afe(n,t)||tfe(n)||lfe(n))},fE=function(t,n){return!(ofe(n)||a6(n)<0||!cE(t,n))},ufe=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},u6=function(t){var n=[],r=[];return t.forEach(function(i,o){var a=!!i.scopeParent,l=a?i.scopeParent:i,c=Zce(l,a),f=a?u6(i.candidates):l;c===0?a?n.push.apply(n,f):n.push(l):r.push({documentOrder:o,tabIndex:c,item:i,isScope:a,content:f})}),r.sort(Jce).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},vp=function(t,n){n=n||{};var r;return n.getShadowRoot?r=ub([t],n.includeContainer,{filter:fE.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:ufe}):r=o6(t,n.includeContainer,fE.bind(null,n)),u6(r)},cfe=function(t,n){n=n||{};var r;return n.getShadowRoot?r=ub([t],n.includeContainer,{filter:cE.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=o6(t,n.includeContainer,cE.bind(null,n)),r},c6=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return _f.call(t,sb)===!1?!1:fE(n,t)};function Gt(e){return(e==null?void 0:e.ownerDocument)||document}const Gf=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function f6(e,t){const n=vp(e,Gf()),r=n.length;if(r===0)return;const i=Fi(Gt(e)),o=n.indexOf(i),a=o===-1?t===1?0:r-1:o+t;return n[a]}function bk(e){return f6(Gt(e).body,1)||e}function d6(e){return f6(Gt(e).body,-1)||e}function h6(e,t){if(!e)return null;const n=vp(Gt(e).body,Gf()),r=n.length;if(r===0)return null;const i=n.indexOf(e);if(i===-1)return null;const o=(i+t+r)%r;return n[o]}function ffe(e){return h6(e,1)}function dfe(e){return h6(e,-1)}function Xc(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!St(n,r)}function hfe(e){vp(e,Gf()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function L$(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const Qc="ArrowUp",Xl="ArrowDown",qh="ArrowLeft",Zc="ArrowRight",xp="Home",wp="End",p6=new Set([qh,Zc]),pfe=new Set([qh,Zc,xp,wp]),m6=new Set([Qc,Xl]),mfe=new Set([Qc,Xl,xp,wp]),g6=new Set([...p6,...m6]),gfe=new Set([...g6,xp,wp]),yfe=new Set([Qc,Xl,qh,Zc,xp,wp]),bfe="Shift",vfe="Control",xfe="Alt",wfe="Meta",Sfe=new Set([bfe,vfe,xfe,wfe]);function Efe(e){return pn(e)&&e.tagName==="INPUT"}function N$(e){return!!(Efe(e)&&e.selectionStart!=null||pn(e)&&e.tagName==="TEXTAREA")}function j$(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,o=e.scrollTop;const a=e.clientWidth<e.scrollWidth,l=e.clientHeight<e.scrollHeight;if(a&&r!=="vertical"){const c=F$(e,t,"left"),f=vg(e),h=vg(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(l&&r!=="horizontal"){const c=F$(e,t,"top"),f=vg(e),h=vg(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 F$(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 vg(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 vk(e){const{enabled:t=!0,open:n,ref:r,onComplete:i}=e,o=qe(i),a=kce(r,n,!1);S.useEffect(()=>{if(!t)return;const l=new AbortController;return a(o,l.signal),()=>{l.abort()}},[t,n,o,a])}const y6=S.createContext(void 0);function b6(e){const t=S.useContext(y6);if(t===void 0&&!e)throw new Error(co(33));return t}const v6=S.createContext(void 0);function Iu(e){const t=S.useContext(v6);if(t===void 0&&!e)throw new Error(co(36));return t}let xk=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Uh.startingStyle]="startingStyle",e[e.endingStyle=Uh.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),z$=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const Cfe={[z$.popupOpen]:"",[z$.pressed]:""},kfe={[xk.open]:""},Rfe={[xk.closed]:""},Afe={[xk.anchorHidden]:""},B$={open(e){return e?Cfe:null}},x6={open(e){return e?kfe:Rfe},anchorHidden(e){return e?Afe:null}},Tfe=S.createContext(void 0);function hv(e=!0){const t=S.useContext(Tfe);if(t===void 0&&!e)throw new Error(co(25));return t}function _fe(e){const{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:o,itemRef:a,itemMetadata:l}=e,{events:c}=o.useState("floatingTreeRoot"),f=hv(!0),h=f!==void 0;return S.useMemo(()=>({id:r,role:"menuitem",tabIndex:n?0:-1,onMouseMove(p){i&&c.emit("itemhover",{nodeId:i,target:p.currentTarget})},onClick(p){t&&c.emit("close",{domEvent:p,reason:LF})},onMouseUp(p){if(f){const m=f.initialCursorPointRef.current;if(f.initialCursorPointRef.current=null,h&&m&&Math.abs(p.clientX-m.x)<=1&&Math.abs(p.clientY-m.y)<=1)return}a.current&&o.context.allowMouseUpTriggerRef.current&&(!h||p.button===2)&&(!l||l.type==="regular-item")&&a.current.click()}}),[t,n,r,c,i,o,a,f,h,l])}const Dfe={type:"regular-item"};function Mfe(e){const{closeOnClick:t,disabled:n=!1,highlighted:r,id:i,store:o,nativeButton:a,itemMetadata:l,nodeId:c}=e,f=S.useRef(null),{getButtonProps:h,buttonRef:p}=fv({disabled:n,focusableWhenDisabled:!0,native:a}),m=_fe({closeOnClick:t,highlighted:r,id:i,nodeId:c,store:o,itemRef:f,itemMetadata:l}),g=S.useCallback(v=>Bh(m,{onMouseEnter(){l.type==="submenu-trigger"&&l.setActive()},onKeyUp(w){w.key===" "&&o.context.typingRef.current&&w.preventBaseUIHandler()}},v,h),[m,h,o,l]),b=Cu(f,p);return S.useMemo(()=>({getItemProps:g,itemRef:b}),[g,b])}const $fe=S.forwardRef(function(t,n){const{render:r,className:i,id:o,label:a,nativeButton:l=!1,disabled:c=!1,closeOnClick:f=!0,...h}=t,p=ck({label:a}),m=b6(!0),g=yp(o),{store:b}=Iu(),v=b.useState("isActive",p.index),w=b.useState("itemProps"),{getItemProps:x,itemRef:k}=Mfe({closeOnClick:f,disabled:c,highlighted:v,id:g,store:b,nativeButton:l,nodeId:m==null?void 0:m.nodeId,itemMetadata:Dfe});return wi("div",t,{state:{disabled:c,highlighted:v},props:[w,h,x],ref:[k,n,p.ref]})}),Qd=0;class Ns{constructor(){ce(this,"currentId",Qd);ce(this,"clear",()=>{this.currentId!==Qd&&(clearTimeout(this.currentId),this.currentId=Qd)});ce(this,"disposeEffect",()=>this.clear)}static create(){return new Ns}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Qd,n()},t)}isStarted(){return this.currentId!==Qd}}function uo(){const e=Vr(Ns.create).current;return sv(e.disposeEffect),e}function Er(e){const t=Vr(Ofe,e).current;return t.next=e,at(t.effect),t}function Ofe(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function w6(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}class wk{constructor(){ce(this,"nodesRef",{current:[]});ce(this,"events",w6())}addNode(t){this.nodesRef.current.push(t)}removeNode(t){const n=this.nodesRef.current.findIndex(r=>r===t);n!==-1&&this.nodesRef.current.splice(n,1)}}const S6=S.createContext(null),E6=S.createContext(null),Bs=()=>{var e;return((e=S.useContext(S6))==null?void 0:e.id)||null},gl=e=>{const t=S.useContext(E6);return e??t};function C6(e){const t=Pu(),n=gl(e),r=Bs();return at(()=>{if(!t)return;const i={id:t,parentId:r};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,r]),t}function Pfe(e){const{children:t,id:n}=e,r=Bs();return T.jsx(S6.Provider,{value:S.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function Ife(e){const{children:t,externalTree:n}=e,r=Vr(()=>n??new wk).current;return T.jsx(E6.Provider,{value:r,children:t})}function Df(e){return`data-base-ui-${e}`}function ew(e,t,n){if(n&&!Rf(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 Lfe={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},k6={...Lfe,position:"fixed",top:0,left:0},Mf=S.forwardRef(function(t,n){const[r,i]=S.useState();at(()=>{VF&&i("button")},[]);const o={tabIndex:0,role:r};return T.jsx("span",{...t,ref:n,style:k6,"aria-hidden":r?void 0:!0,...o,"data-base-ui-focus-guard":""})});let H$=0;function xh(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(H$);const o=()=>e==null?void 0:e.focus({preventScroll:n});i?o():H$=requestAnimationFrame(o)}const Jc={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function U$(e){return e==="inert"?Jc.inert:e==="aria-hidden"?Jc["aria-hidden"]:Jc.none}let xg=new WeakSet,wg={},tw=0;const R6=e=>e&&(e.host||R6(e.parentNode)),Nfe=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=R6(n);return e.contains(r)?r:null}).filter(n=>n!=null);function jfe(e,t,n,r){const i="data-base-ui-inert",o=r?"inert":n?"aria-hidden":null,a=Nfe(t,e),l=new Set,c=new Set(a),f=[];wg[i]||(wg[i]=new WeakMap);const h=wg[i];a.forEach(p),m(t),l.clear();function p(g){!g||l.has(g)||(l.add(g),g.parentNode&&p(g.parentNode))}function m(g){!g||c.has(g)||[].forEach.call(g.children,b=>{if(hl(b)!=="script")if(l.has(b))m(b);else{const v=o?b.getAttribute(o):null,w=v!==null&&v!=="false",x=U$(o),k=(x.get(b)||0)+1,C=(h.get(b)||0)+1;x.set(b,k),h.set(b,C),f.push(b),k===1&&w&&xg.add(b),C===1&&b.setAttribute(i,""),!w&&o&&b.setAttribute(o,o==="inert"?"":"true")}})}return tw+=1,()=>{f.forEach(g=>{const b=U$(o),w=(b.get(g)||0)-1,x=(h.get(g)||0)-1;b.set(g,w),h.set(g,x),w||(!xg.has(g)&&o&&g.removeAttribute(o),xg.delete(g)),x||g.removeAttribute(i)}),tw-=1,tw||(Jc.inert=new WeakMap,Jc["aria-hidden"]=new WeakMap,Jc.none=new WeakMap,xg=new WeakSet,wg={})}}function Ffe(e,t=!1,n=!1){const r=Gt(e[0]).body;return jfe(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const A6=S.createContext(null),T6=()=>S.useContext(A6),zfe=Df("portal");function Bfe(e={}){const{ref:t,container:n,componentProps:r=Hn,elementProps:i}=e,o=Pu(),a=T6(),l=a==null?void 0:a.portalNode,[c,f]=S.useState(null),[h,p]=S.useState(null),m=qe(w=>{w!==null&&p(w)}),g=S.useRef(null);at(()=>{if(n===null){g.current&&(g.current=null,p(null),f(null));return}if(o==null)return;const w=(n&&(fk(n)?n:n.current))??l??document.body;if(w==null){g.current&&(g.current=null,p(null),f(null));return}g.current!==w&&(g.current=w,p(null),f(w))},[n,l,o]);const b=wi("div",r,{ref:[t,m],props:[{id:o,[zfe]:""},i]});return{portalNode:h,portalSubtree:c&&b?Rn.createPortal(b,c):null}}const Hfe=S.forwardRef(function(t,n){const{children:r,container:i,className:o,render:a,renderGuards:l,...c}=t,{portalNode:f,portalSubtree:h}=Bfe({container:i,ref:n,componentProps:t,elementProps:c}),p=S.useRef(null),m=S.useRef(null),g=S.useRef(null),b=S.useRef(null),[v,w]=S.useState(null),x=v==null?void 0:v.modal,k=v==null?void 0:v.open,C=typeof l=="boolean"?l:!!v&&!v.modal&&v.open&&!!f;S.useEffect(()=>{if(!f||x)return;function _(D){f&&D.relatedTarget&&Xc(D)&&(D.type==="focusin"?L$:hfe)(f)}return f.addEventListener("focusin",_,!0),f.addEventListener("focusout",_,!0),()=>{f.removeEventListener("focusin",_,!0),f.removeEventListener("focusout",_,!0)}},[f,x]),S.useEffect(()=>{!f||k||L$(f)},[k,f]);const R=S.useMemo(()=>({beforeOutsideRef:p,afterOutsideRef:m,beforeInsideRef:g,afterInsideRef:b,portalNode:f,setFocusManagerState:w}),[f]);return T.jsxs(S.Fragment,{children:[h,T.jsxs(A6.Provider,{value:R,children:[C&&f&&T.jsx(Mf,{"data-type":"outside",ref:p,onFocus:_=>{var D;if(Xc(_,f))(D=g.current)==null||D.focus();else{const M=v?v.domReference:null,O=d6(M);O==null||O.focus()}}}),C&&f&&T.jsx("span",{"aria-owns":f.id,style:dce}),f&&Rn.createPortal(r,f),C&&f&&T.jsx(Mf,{"data-type":"outside",ref:m,onFocus:_=>{var D;if(Xc(_,f))(D=b.current)==null||D.focus();else{const M=v?v.domReference:null,O=bk(M);O==null||O.focus(),v!=null&&v.closeOnFocusOut&&(v==null||v.onOpenChange(!1,Lt(kf,_.nativeEvent)))}}})]})]})});function Ufe(e,t){const n=Qn(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 q$=20;let Ba=[];function Sk(){Ba=Ba.filter(e=>{var t;return(t=e.deref())==null?void 0:t.isConnected})}function qfe(e){Sk(),e&&hl(e)!=="body"&&(Ba.push(new WeakRef(e)),Ba.length>q$&&(Ba=Ba.slice(-q$)))}function nw(){var e;return Sk(),(e=Ba[Ba.length-1])==null?void 0:e.deref()}function Vfe(e){if(!e)return null;const t=Gf();return c6(e,t)?e:vp(e,t)[0]||e}function Gfe(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():Gr(e).display!=="none"}function V$(e,t){var a;if(!t.current.includes("floating")&&!((a=e.getAttribute("role"))!=null&&a.includes("dialog")))return;const n=Gf(),i=cfe(e,n).filter(l=>{const c=l.getAttribute("data-tabindex")||"";return c6(l,n)||l.hasAttribute("data-tabindex")&&!c.startsWith("-")}),o=e.getAttribute("tabindex");t.current.includes("floating")||i.length===0?o!=="0"&&e.setAttribute("tabindex","0"):(o!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function Yfe(e){const{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:o=!0,restoreFocus:a=!1,modal:l=!0,closeOnFocusOut:c=!0,openInteractionType:f="",nextFocusableElement:h,previousFocusableElement:p,beforeContentFocusGuardRef:m,externalTree:g}=e,b="rootStore"in t?t.rootStore:t,v=b.useState("open"),w=b.useState("domReferenceElement"),x=b.useState("floatingElement"),{events:k,dataRef:C}=b.context,R=qe(()=>{var W;return(W=C.current.floatingContext)==null?void 0:W.nodeId}),_=i===!1,D=sE(w)&&_,M=S.useRef(["content"]),O=Er(i),U=Er(o),L=Er(f),I=gl(g),$=T6(),B=S.useRef(null),V=S.useRef(null),F=S.useRef(!1),z=S.useRef(!1),j=S.useRef(!1),H=S.useRef(-1),X=S.useRef(""),P=S.useRef(""),K=S.useRef(null),ee=S.useRef(null),q=Cu(K,m,$==null?void 0:$.beforeInsideRef),ae=Cu(ee,$==null?void 0:$.afterInsideRef),re=uo(),fe=uo(),ve=uk(),Re=$!=null,le=rb(x),Ae=qe((W=le)=>W?vp(W,Gf()):[]),Ie=qe(W=>{const Q=Ae(W);return M.current.map(()=>Q).filter(Boolean).flat()});S.useEffect(()=>{if(r||!l)return;function W(pe){pe.key==="Tab"&&St(le,Fi(Gt(le)))&&Ae().length===0&&!D&&fr(pe)}const Q=Gt(le);return Q.addEventListener("keydown",W),()=>{Q.removeEventListener("keydown",W)}},[r,w,le,l,M,D,Ae,Ie]),S.useEffect(()=>{if(r||!v)return;const W=Gt(le);function Q(){j.current=!1}function pe(me){const te=ui(me),Z=St(x,te)||St(w,te)||St($==null?void 0:$.portalNode,te);j.current=!Z,P.current=me.pointerType||"keyboard",te!=null&&te.closest(`[${uce}]`)&&(z.current=!0)}function oe(){P.current="keyboard"}return W.addEventListener("pointerdown",pe,!0),W.addEventListener("pointerup",Q,!0),W.addEventListener("pointercancel",Q,!0),W.addEventListener("keydown",oe,!0),()=>{W.removeEventListener("pointerdown",pe,!0),W.removeEventListener("pointerup",Q,!0),W.removeEventListener("pointercancel",Q,!0),W.removeEventListener("keydown",oe,!0)}},[r,x,w,le,v,$]),S.useEffect(()=>{if(r||!c)return;const W=Gt(le);function Q(){z.current=!0,fe.start(0,()=>{z.current=!1})}function pe(ie){const J=ui(ie),ke=Ae().indexOf(J);ke!==-1&&(H.current=ke)}function oe(ie){const J=ie.relatedTarget,Se=ie.currentTarget,ke=ui(ie);queueMicrotask(()=>{const ge=R(),_e=b.context.triggerElements,de=(J==null?void 0:J.hasAttribute(Df("focus-guard")))&&[K.current,ee.current,$==null?void 0:$.beforeInsideRef.current,$==null?void 0:$.afterInsideRef.current,$==null?void 0:$.beforeOutsideRef.current,$==null?void 0:$.afterOutsideRef.current,ms(p),ms(h)].includes(J),Ce=!(St(w,J)||St(x,J)||St(J,x)||St($==null?void 0:$.portalNode,J)||J!=null&&_e.hasElement(J)||_e.hasMatchingElement(ye=>St(ye,J))||de||I&&(mu(I.nodesRef.current,ge).find(ye=>{var Me,Pe;return St((Me=ye.context)==null?void 0:Me.elements.floating,J)||St((Pe=ye.context)==null?void 0:Pe.elements.domReference,J)})||$$(I.nodesRef.current,ge).find(ye=>{var Me,Pe,Ke;return[(Me=ye.context)==null?void 0:Me.elements.floating,rb((Pe=ye.context)==null?void 0:Pe.elements.floating)].includes(J)||((Ke=ye.context)==null?void 0:Ke.elements.domReference)===J})));if(Se===w&&le&&V$(le,M),a&&Se!==w&&!Gfe(ke)&&Fi(W)===W.body){if(pn(le)&&(le.focus(),a==="popup")){ve.request(()=>{le.focus()});return}const ye=H.current,Me=Ae(),Pe=Me[ye]||Me[Me.length-1]||le;pn(Pe)&&Pe.focus()}if(C.current.insideReactTree){C.current.insideReactTree=!1;return}(D||!l)&&J&&Ce&&!z.current&&(D||J!==nw())&&(F.current=!0,b.setOpen(!1,Lt(kf,ie)))})}function me(){j.current||(C.current.insideReactTree=!0,re.start(0,()=>{C.current.insideReactTree=!1}))}const te=pn(w)?w:null,Z=[];if(!(!x&&!te))return te&&(te.addEventListener("focusout",oe),te.addEventListener("pointerdown",Q),Z.push(()=>{te.removeEventListener("focusout",oe),te.removeEventListener("pointerdown",Q)})),x&&(x.addEventListener("focusin",pe),x.addEventListener("focusout",oe),$&&(x.addEventListener("focusout",me,!0),Z.push(()=>{x.removeEventListener("focusout",me,!0)})),Z.push(()=>{x.removeEventListener("focusin",pe),x.removeEventListener("focusout",oe)})),()=>{Z.forEach(ie=>{ie()})}},[r,w,x,le,l,I,$,b,c,a,Ae,D,R,M,C,re,fe,ve,h,p]),S.useEffect(()=>{var me,te,Z;if(r||!x||!v)return;const W=Array.from(((me=$==null?void 0:$.portalNode)==null?void 0:me.querySelectorAll(`[${Df("portal")}]`))||[]),pe=(Z=(te=(I?$$(I.nodesRef.current,R()):[]).find(ie=>{var J;return sE(((J=ie.context)==null?void 0:J.elements.domReference)||null)}))==null?void 0:te.context)==null?void 0:Z.elements.domReference,oe=[x,pe,...W,B.current,V.current,K.current,ee.current,$==null?void 0:$.beforeOutsideRef.current,$==null?void 0:$.afterOutsideRef.current,ms(p),ms(h),D?w:null].filter(ie=>ie!=null);return Ffe(oe,l||D)},[v,r,w,x,l,M,$,D,I,R,h,p]),at(()=>{if(!v||r||!pn(le))return;const W=Gt(le),Q=Fi(W);queueMicrotask(()=>{const pe=Ie(le),oe=O.current,me=typeof oe=="function"?oe(L.current||""):oe;if(me===void 0||me===!1)return;let te;me===!0||me===null?te=pe[0]||le:te=ms(me),te=te||pe[0]||le,!St(le,Q)&&xh(te,{preventScroll:te===le})})},[r,v,le,_,Ie,O,L]),at(()=>{if(r||!le)return;const W=Gt(le),Q=Fi(W);qfe(Q);function pe(te){if(te.open||(X.current=Ufe(te.nativeEvent,P.current)),te.reason===li&&te.nativeEvent.type==="mouseleave"&&(F.current=!0),te.reason===ak)if(te.nested)F.current=!1;else if(XF(te.nativeEvent)||QF(te.nativeEvent))F.current=!1;else{let Z=!1;document.createElement("div").focus({get preventScroll(){return Z=!0,!1}}),Z?F.current=!1:F.current=!0}}k.on("openchange",pe);const oe=W.createElement("span");oe.setAttribute("tabindex","-1"),oe.setAttribute("aria-hidden","true"),Object.assign(oe.style,k6),Re&&w&&w.insertAdjacentElement("afterend",oe);function me(){const te=U.current;let Z=typeof te=="function"?te(X.current):te;if(Z===void 0||Z===!1)return null;if(Z===null&&(Z=!0),typeof Z=="boolean"){const J=w||nw();return J&&J.isConnected?J:oe}const ie=w||nw()||oe;return ms(Z)||ie}return()=>{k.off("openchange",pe);const te=Fi(W),Z=St(x,te)||I&&mu(I.nodesRef.current,R(),!1).some(J=>{var Se;return St((Se=J.context)==null?void 0:Se.elements.floating,te)}),ie=me();queueMicrotask(()=>{const J=Vfe(ie),Se=typeof U.current!="boolean";U.current&&!F.current&&pn(J)&&(!(!Se&&J!==te&&te!==W.body)||Z)&&J.focus({preventScroll:!0}),oe.remove(),F.current=!1})}},[r,x,le,U,C,k,I,Re,w,R]),at(()=>{if(!UF||v||!x)return;const W=Fi(Gt(x));!pn(W)||!dv(W)||St(x,W)&&W.blur()},[v,x]),at(()=>{if(!(r||!$))return $.setFocusManagerState({modal:l,closeOnFocusOut:c,open:v,onOpenChange:b.setOpen,domReference:w}),()=>{$.setFocusManagerState(null)}},[r,$,l,v,b,c,w]),at(()=>{if(!(r||!le))return V$(le,M),()=>{queueMicrotask(Sk)}},[r,le,M]);const Y=!r&&(l?!D:!0)&&(Re||l);return T.jsxs(S.Fragment,{children:[Y&&T.jsx(Mf,{"data-type":"inside",ref:q,onFocus:W=>{var Q;if(l){const pe=Ie();xh(pe[pe.length-1])}else if($!=null&&$.portalNode)if(F.current=!1,Xc(W,$.portalNode)){const pe=bk(w);pe==null||pe.focus()}else(Q=ms(p??$.beforeOutsideRef))==null||Q.focus()}}),n,Y&&T.jsx(Mf,{"data-type":"inside",ref:ae,onFocus:W=>{var Q;if(l)xh(Ie()[0]);else if($!=null&&$.portalNode)if(c&&(F.current=!0),Xc(W,$.portalNode)){const pe=d6(w);pe==null||pe.focus()}else(Q=ms(h??$.afterOutsideRef))==null||Q.focus()}})]})}function Wfe(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:i=!0,event:o="click",toggle:a=!0,ignoreMouse:l=!1,stickIfOpen:c=!0,touchOpenDelay:f=0,reason:h=Hh}=t,p=S.useRef(void 0),m=uk(),g=uo(),b=S.useMemo(()=>({onPointerDown(v){p.current=v.pointerType},onMouseDown(v){const w=p.current,x=v.nativeEvent,k=n.select("open");if(v.button!==0||o==="click"||Rf(w,!0)&&l)return;const C=r.current.openEvent,R=C==null?void 0:C.type,_=n.select("domReferenceElement")!==v.currentTarget,D=k&&_||!(k&&a&&(!(C&&c)||R==="click"||R==="mousedown"));if(dv(x.target)){const O=Lt(h,x,x.target);D&&w==="touch"&&f>0?g.start(f,()=>{n.setOpen(!0,O)}):n.setOpen(D,O);return}const M=v.currentTarget;m.request(()=>{const O=Lt(h,x,M);D&&w==="touch"&&f>0?g.start(f,()=>{n.setOpen(!0,O)}):n.setOpen(D,O)})},onClick(v){if(o==="mousedown-only")return;const w=p.current;if(o==="mousedown"&&w){p.current=void 0;return}if(Rf(w,!0)&&l)return;const x=n.select("open"),k=r.current.openEvent,C=n.select("domReferenceElement")!==v.currentTarget,R=x&&C||!(x&&a&&(!(k&&c)||ZF(k))),_=Lt(h,v.nativeEvent,v.currentTarget);R&&w==="touch"&&f>0?g.start(f,()=>{n.setOpen(!0,_)}):n.setOpen(R,_)},onKeyDown(){p.current=void 0}}),[r,o,l,n,c,a,m,g,f,h]);return S.useMemo(()=>i?{reference:b}:Hn,[i,b])}function G$(e,t,n){let{reference:r,floating:i}=e;const o=Yi(t),a=yk(t),l=gk(a),c=hi(t),f=o==="y",h=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,m=r[l]/2-i[l]/2;let g;switch(c){case"top":g={x:h,y:r.y-i.height};break;case"bottom":g={x:h,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:p};break;case"left":g={x:r.x-i.width,y:p};break;default:g={x:r.x,y:r.y}}switch(ml(t)){case"start":g[a]-=m*(n&&f?-1:1);break;case"end":g[a]+=m*(n&&f?-1:1);break}return g}async function Kfe(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:l,strategy:c}=e,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:m=!1,padding:g=0}=Ls(t,e),b=JF(g),w=l[m?p==="floating"?"reference":"floating":p],x=ob(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(w)))==null||n?w:w.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(l.floating)),boundary:f,rootBoundary:h,strategy:c})),k=p==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l.floating)),R=await(o.isElement==null?void 0:o.isElement(C))?await(o.getScale==null?void 0:o.getScale(C))||{x:1,y:1}:{x:1,y:1},_=ob(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:k,offsetParent:C,strategy:c}):k);return{top:(x.top-_.top+b.top)/R.y,bottom:(_.bottom-x.bottom+b.bottom)/R.y,left:(x.left-_.left+b.left)/R.x,right:(_.right-x.right+b.right)/R.x}}const Xfe=50,Qfe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,l=a.detectOverflow?a:{...a,detectOverflow:Kfe},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}=G$(f,r,c),m=r,g=0;const b={};for(let v=0;v<o.length;v++){const w=o[v];if(!w)continue;const{name:x,fn:k}=w,{x:C,y:R,data:_,reset:D}=await k({x:h,y:p,initialPlacement:r,placement:m,strategy:i,middlewareData:b,rects:f,platform:l,elements:{reference:e,floating:t}});h=C??h,p=R??p,b[x]={...b[x],..._},D&&g<Xfe&&(g++,typeof D=="object"&&(D.placement&&(m=D.placement),D.rects&&(f=D.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):D.rects),{x:h,y:p}=G$(f,m,c)),v=-1)}return{x:h,y:p,placement:m,strategy:i,middlewareData:b}},Zfe=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:l,platform:c,elements:f}=t,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0,...w}=Ls(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const x=hi(i),k=Yi(l),C=hi(l)===l,R=await(c.isRTL==null?void 0:c.isRTL(f.floating)),_=m||(C||!v?[ib(l)]:qce(l)),D=b!=="none";!m&&D&&_.push(...Wce(l,v,b,R));const M=[l,..._],O=await c.detectOverflow(t,w),U=[];let L=((r=o.flip)==null?void 0:r.overflows)||[];if(h&&U.push(O[x]),p){const V=Uce(i,a,R);U.push(O[V[0]],O[V[1]])}if(L=[...L,{placement:i,overflows:U}],!U.every(V=>V<=0)){var I,$;const V=(((I=o.flip)==null?void 0:I.index)||0)+1,F=M[V];if(F&&(!(p==="alignment"?k!==Yi(F):!1)||L.every(H=>Yi(H.placement)===k?H.overflows[0]>0:!0)))return{data:{index:V,overflows:L},reset:{placement:F}};let z=($=L.filter(j=>j.overflows[0]<=0).sort((j,H)=>j.overflows[1]-H.overflows[1])[0])==null?void 0:$.placement;if(!z)switch(g){case"bestFit":{var B;const j=(B=L.filter(H=>{if(D){const X=Yi(H.placement);return X===k||X==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(X=>X>0).reduce((X,P)=>X+P,0)]).sort((H,X)=>H[1]-X[1])[0])==null?void 0:B[0];j&&(z=j);break}case"initialPlacement":z=l;break}if(i!==z)return{reset:{placement:z}}}return{}}}};function Y$(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function W$(e){return Bce.some(t=>e[t]>=0)}const Jfe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...o}=Ls(e,t);switch(i){case"referenceHidden":{const a=await r.detectOverflow(t,{...o,elementContext:"reference"}),l=Y$(a,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:W$(l)}}}case"escaped":{const a=await r.detectOverflow(t,{...o,altBoundary:!0}),l=Y$(a,n.floating);return{data:{escapedOffsets:l,escaped:W$(l)}}}default:return{}}}}},_6=new Set(["left","top"]);async function ede(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=hi(n),l=ml(n),c=Yi(n)==="y",f=_6.has(a)?-1:1,h=o&&c?-1:1,p=Ls(t,e);let{mainAxis:m,crossAxis:g,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof b=="number"&&(g=l==="end"?b*-1:b),c?{x:g*h,y:m*f}:{x:m*f,y:g*h}}const tde=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:l}=t,c=await ede(t,e);return a===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:o+c.y,data:{...c,placement:a}}}}},nde=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:l=!1,limiter:c={fn:x=>{let{x:k,y:C}=x;return{x:k,y:C}}},...f}=Ls(e,t),h={x:n,y:r},p=await o.detectOverflow(t,f),m=Yi(hi(i)),g=mk(m);let b=h[g],v=h[m];if(a){const x=g==="y"?"top":"left",k=g==="y"?"bottom":"right",C=b+p[x],R=b-p[k];b=aE(C,b,R)}if(l){const x=m==="y"?"top":"left",k=m==="y"?"bottom":"right",C=v+p[x],R=v-p[k];v=aE(C,v,R)}const w=c.fn({...t,[g]:b,[m]:v});return{...w,data:{x:w.x-n,y:w.y-r,enabled:{[g]:a,[m]:l}}}}}},rde=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:l=0,mainAxis:c=!0,crossAxis:f=!0}=Ls(e,t),h={x:n,y:r},p=Yi(i),m=mk(p);let g=h[m],b=h[p];const v=Ls(l,t),w=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const C=m==="y"?"height":"width",R=o.reference[m]-o.floating[C]+w.mainAxis,_=o.reference[m]+o.reference[C]-w.mainAxis;g<R?g=R:g>_&&(g=_)}if(f){var x,k;const C=m==="y"?"width":"height",R=_6.has(hi(i)),_=o.reference[p]-o.floating[C]+(R&&((x=a.offset)==null?void 0:x[p])||0)+(R?0:w.crossAxis),D=o.reference[p]+o.reference[C]+(R?0:((k=a.offset)==null?void 0:k[p])||0)-(R?w.crossAxis:0);b<_?b=_:b>D&&(b=D)}return{[m]:g,[p]:b}}}},ide=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:l}=t,{apply:c=()=>{},...f}=Ls(e,t),h=await a.detectOverflow(t,f),p=hi(i),m=ml(i),g=Yi(i)==="y",{width:b,height:v}=o.floating;let w,x;p==="top"||p==="bottom"?(w=p,x=m===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(x=p,w=m==="end"?"top":"bottom");const k=v-h.top-h.bottom,C=b-h.left-h.right,R=Af(v-h[w],k),_=Af(b-h[x],C),D=!t.middlewareData.shift;let M=R,O=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(O=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(M=k),D&&!m){const L=ci(h.left,0),I=ci(h.right,0),$=ci(h.top,0),B=ci(h.bottom,0);g?O=b-2*(L!==0||I!==0?L+I:ci(h.left,h.right)):M=v-2*($!==0||B!==0?$+B:ci(h.top,h.bottom))}await c({...t,availableWidth:O,availableHeight:M});const U=await a.getDimensions(l.floating);return b!==U.width||v!==U.height?{reset:{rects:!0}}:{}}}};function D6(e){const t=Gr(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,l=Tf(n)!==o||Tf(r)!==a;return l&&(n=o,r=a),{width:n,height:r,$:l}}function Ek(e){return Wt(e)?e:e.contextElement}function ef(e){const t=Ek(e);if(!pn(t))return Oo(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=D6(t);let a=(o?Tf(n.width):n.width)/r,l=(o?Tf(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const ode=Oo(0);function M6(e){const t=Qn(e);return!uv()||!t.visualViewport?ode:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function sde(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Qn(e)?!1:t}function ku(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=Ek(e);let a=Oo(1);t&&(r?Wt(r)&&(a=ef(r)):a=ef(e));const l=sde(o,n,r)?M6(o):Oo(0);let c=(i.left+l.x)/a.x,f=(i.top+l.y)/a.y,h=i.width/a.x,p=i.height/a.y;if(o){const m=Qn(o),g=r&&Wt(r)?Qn(r):r;let b=m,v=rE(b);for(;v&&r&&g!==b;){const w=ef(v),x=v.getBoundingClientRect(),k=Gr(v),C=x.left+(v.clientLeft+parseFloat(k.paddingLeft))*w.x,R=x.top+(v.clientTop+parseFloat(k.paddingTop))*w.y;c*=w.x,f*=w.y,h*=w.x,p*=w.y,c+=C,f+=R,b=Qn(v),v=rE(b)}}return ob({width:h,height:p,x:c,y:f})}function pv(e,t){const n=cv(e).scrollLeft;return t?t.left+n:ku(Bo(e)).left+n}function $6(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-pv(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function ade(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=Bo(r),l=t?lv(t.floating):!1;if(r===a||l&&o)return n;let c={scrollLeft:0,scrollTop:0},f=Oo(1);const h=Oo(0),p=pn(r);if((p||!p&&!o)&&((hl(r)!=="body"||pl(a))&&(c=cv(r)),p)){const g=ku(r);f=ef(r),h.x=g.x+r.clientLeft,h.y=g.y+r.clientTop}const m=a&&!p&&!o?$6(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+m.x,y:n.y*f.y-c.scrollTop*f.y+h.y+m.y}}function lde(e){return Array.from(e.getClientRects())}function ude(e){const t=Bo(e),n=cv(e),r=e.ownerDocument.body,i=ci(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=ci(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+pv(e);const l=-n.scrollTop;return Gr(r).direction==="rtl"&&(a+=ci(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:l}}const K$=25;function cde(e,t){const n=Qn(e),r=Bo(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,l=0,c=0;if(i){o=i.width,a=i.height;const h=uv();(!h||h&&t==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}const f=pv(r);if(f<=0){const h=r.ownerDocument,p=h.body,m=getComputedStyle(p),g=h.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,b=Math.abs(r.clientWidth-p.clientWidth-g);b<=K$&&(o-=b)}else f<=K$&&(o+=f);return{width:o,height:a,x:l,y:c}}function fde(e,t){const n=ku(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=pn(e)?ef(e):Oo(1),a=e.clientWidth*o.x,l=e.clientHeight*o.y,c=i*o.x,f=r*o.y;return{width:a,height:l,x:c,y:f}}function X$(e,t,n){let r;if(t==="viewport")r=cde(e,n);else if(t==="document")r=ude(Bo(e));else if(Wt(t))r=fde(t,n);else{const i=M6(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return ob(r)}function O6(e,t){const n=Lo(e);return n===t||!Wt(n)||$o(n)?!1:Gr(n).position==="fixed"||O6(n,t)}function dde(e,t){const n=t.get(e);if(n)return n;let r=Xa(e,[],!1).filter(l=>Wt(l)&&hl(l)!=="body"),i=null;const o=Gr(e).position==="fixed";let a=o?Lo(e):e;for(;Wt(a)&&!$o(a);){const l=Gr(a),c=dk(a);!c&&l.position==="fixed"&&(i=null),(o?!c&&!i:!c&&l.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||pl(a)&&!c&&O6(e,a))?r=r.filter(h=>h!==a):i=l,a=Lo(a)}return t.set(e,r),r}function hde(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?lv(t)?[]:dde(t,this._c):[].concat(n),r],l=X$(t,a[0],i);let c=l.top,f=l.right,h=l.bottom,p=l.left;for(let m=1;m<a.length;m++){const g=X$(t,a[m],i);c=ci(g.top,c),f=Af(g.right,f),h=Af(g.bottom,h),p=ci(g.left,p)}return{width:f-p,height:h-c,x:p,y:c}}function pde(e){const{width:t,height:n}=D6(e);return{width:t,height:n}}function mde(e,t,n){const r=pn(t),i=Bo(t),o=n==="fixed",a=ku(e,!0,o,t);let l={scrollLeft:0,scrollTop:0};const c=Oo(0);function f(){c.x=pv(i)}if(r||!r&&!o)if((hl(t)!=="body"||pl(i))&&(l=cv(t)),r){const g=ku(t,!0,o,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop}else i&&f();o&&!r&&i&&f();const h=i&&!r&&!o?$6(i,l):Oo(0),p=a.left+l.scrollLeft-c.x-h.x,m=a.top+l.scrollTop-c.y-h.y;return{x:p,y:m,width:a.width,height:a.height}}function rw(e){return Gr(e).position==="static"}function Q$(e,t){if(!pn(e)||Gr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Bo(e)===n&&(n=n.ownerDocument.body),n}function P6(e,t){const n=Qn(e);if(lv(e))return n;if(!pn(e)){let i=Lo(e);for(;i&&!$o(i);){if(Wt(i)&&!rw(i))return i;i=Lo(i)}return n}let r=Q$(e,t);for(;r&&Tce(r)&&rw(r);)r=Q$(r,t);return r&&$o(r)&&rw(r)&&!dk(r)?n:r||Mce(e)||n}const gde=async function(e){const t=this.getOffsetParent||P6,n=this.getDimensions,r=await n(e.floating);return{reference:mde(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function yde(e){return Gr(e).direction==="rtl"}const bde={convertOffsetParentRelativeRectToViewportRelativeRect:ade,getDocumentElement:Bo,getClippingRect:hde,getOffsetParent:P6,getElementRects:gde,getClientRects:lde,getDimensions:pde,getScale:ef,isElement:Wt,isRTL:yde};function I6(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function vde(e,t){let n=null,r;const i=Bo(e);function o(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),o();const f=e.getBoundingClientRect(),{left:h,top:p,width:m,height:g}=f;if(l||t(),!m||!g)return;const b=jc(p),v=jc(i.clientWidth-(h+m)),w=jc(i.clientHeight-(p+g)),x=jc(h),C={rootMargin:-b+"px "+-v+"px "+-w+"px "+-x+"px",threshold:ci(0,Af(1,c))||1};let R=!0;function _(D){const M=D[0].intersectionRatio;if(M!==c){if(!R)return a();M?a(!1,M):r=setTimeout(()=>{a(!1,1e-7)},1e3)}M===1&&!I6(f,e.getBoundingClientRect())&&a(),R=!1}try{n=new IntersectionObserver(_,{...C,root:i.ownerDocument})}catch{n=new IntersectionObserver(_,C)}n.observe(e)}return a(!0),o}function Z$(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,f=Ek(e),h=i||o?[...f?Xa(f):[],...t?Xa(t):[]]:[];h.forEach(x=>{i&&x.addEventListener("scroll",n,{passive:!0}),o&&x.addEventListener("resize",n)});const p=f&&l?vde(f,n):null;let m=-1,g=null;a&&(g=new ResizeObserver(x=>{let[k]=x;k&&k.target===f&&g&&t&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var C;(C=g)==null||C.observe(t)})),n()}),f&&!c&&g.observe(f),t&&g.observe(t));let b,v=c?ku(e):null;c&&w();function w(){const x=ku(e);v&&!I6(v,x)&&n(),v=x,b=requestAnimationFrame(w)}return n(),()=>{var x;h.forEach(k=>{i&&k.removeEventListener("scroll",n),o&&k.removeEventListener("resize",n)}),p==null||p(),(x=g)==null||x.disconnect(),g=null,c&&cancelAnimationFrame(b)}}const xde=tde,wde=nde,Sde=Zfe,Ede=ide,Cde=Jfe,kde=rde,Rde=(e,t,n)=>{const r=new Map,i={platform:bde,...n},o={...i.platform,_c:r};return Qfe(e,t,{...i,platform:o})};var Ade=typeof document<"u",Tde=function(){},ny=Ade?S.useLayoutEffect:Tde;function cb(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(!cb(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)&&!cb(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function L6(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function J$(e,t){const n=L6(e);return Math.round(t*n)/n}function iw(e){const t=S.useRef(e);return ny(()=>{t.current=e}),t}function _de(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:l=!0,whileElementsMounted:c,open:f}=e,[h,p]=S.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,g]=S.useState(r);cb(m,r)||g(r);const[b,v]=S.useState(null),[w,x]=S.useState(null),k=S.useCallback(H=>{H!==D.current&&(D.current=H,v(H))},[]),C=S.useCallback(H=>{H!==M.current&&(M.current=H,x(H))},[]),R=o||b,_=a||w,D=S.useRef(null),M=S.useRef(null),O=S.useRef(h),U=c!=null,L=iw(c),I=iw(i),$=iw(f),B=S.useCallback(()=>{if(!D.current||!M.current)return;const H={placement:t,strategy:n,middleware:m};I.current&&(H.platform=I.current),Rde(D.current,M.current,H).then(X=>{const P={...X,isPositioned:$.current!==!1};V.current&&!cb(O.current,P)&&(O.current=P,Rn.flushSync(()=>{p(P)}))})},[m,t,n,I,$]);ny(()=>{f===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,p(H=>({...H,isPositioned:!1})))},[f]);const V=S.useRef(!1);ny(()=>(V.current=!0,()=>{V.current=!1}),[]),ny(()=>{if(R&&(D.current=R),_&&(M.current=_),R&&_){if(L.current)return L.current(R,_,B);B()}},[R,_,B,L,U]);const F=S.useMemo(()=>({reference:D,floating:M,setReference:k,setFloating:C}),[k,C]),z=S.useMemo(()=>({reference:R,floating:_}),[R,_]),j=S.useMemo(()=>{const H={position:n,left:0,top:0};if(!z.floating)return H;const X=J$(z.floating,h.x),P=J$(z.floating,h.y);return l?{...H,transform:"translate("+X+"px, "+P+"px)",...L6(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:X,top:P}},[n,l,z.floating,h.x,h.y]);return S.useMemo(()=>({...h,update:B,refs:F,elements:z,floatingStyles:j}),[h,B,F,z,j])}const Dde=(e,t)=>{const n=xde(e);return{name:n.name,fn:n.fn,options:[e,t]}},Mde=(e,t)=>{const n=wde(e);return{name:n.name,fn:n.fn,options:[e,t]}},$de=(e,t)=>({fn:kde(e).fn,options:[e,t]}),Ode=(e,t)=>{const n=Sde(e);return{name:n.name,fn:n.fn,options:[e,t]}},Pde=(e,t)=>{const n=Ede(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ide=(e,t)=>{const n=Cde(e);return{name:n.name,fn:n.fn,options:[e,t]}},Lde={intentional:"onClick",sloppy:"onPointerDown"};function Nde(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 jde(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:l,dataRef:c}=n.context,{enabled:f=!0,escapeKey:h=!0,outsidePress:p=!0,outsidePressEvent:m="sloppy",referencePress:g=!1,referencePressEvent:b="sloppy",ancestorScroll:v=!1,bubbles:w,externalTree:x}=t,k=gl(x),C=qe(typeof p=="function"?p:()=>!1),R=typeof p=="function"?C:p,_=S.useRef(!1),{escapeKey:D,outsidePress:M}=Nde(w),O=S.useRef(null),U=uo(),L=uo(),I=qe(()=>{L.clear(),c.current.insideReactTree=!1}),$=S.useRef(!1),B=S.useRef(""),V=qe(Y=>{B.current=Y.pointerType}),F=qe(()=>{const Y=B.current,W=Y==="pen"||!Y?"mouse":Y,Q=typeof m=="function"?m():m;return typeof Q=="string"?Q:Q[W]}),z=qe(Y=>{var me;if(!r||!f||!h||Y.key!=="Escape"||$.current)return;const W=(me=c.current.floatingContext)==null?void 0:me.nodeId,Q=k?mu(k.nodesRef.current,W):[];if(!D&&Q.length>0){let te=!0;if(Q.forEach(Z=>{var ie;(ie=Z.context)!=null&&ie.open&&!Z.context.dataRef.current.__escapeKeyBubbles&&(te=!1)}),!te)return}const pe=zce(Y)?Y.nativeEvent:Y,oe=Lt(lk,pe);n.setOpen(!1,oe),!D&&!oe.isPropagationAllowed&&Y.stopPropagation()}),j=qe(Y=>{const W=F();return W==="intentional"&&Y.type!=="click"||W==="sloppy"&&Y.type==="click"}),H=qe(()=>{c.current.insideReactTree=!0,L.start(0,I)}),X=qe((Y,W=!1)=>{var Se;if(j(Y)){I();return}if(c.current.insideReactTree){I();return}if(F()==="intentional"&&W||typeof R=="function"&&!R(Y))return;const Q=ui(Y),pe=`[${Df("inert")}]`,oe=Gt(n.select("floatingElement")).querySelectorAll(pe),me=n.context.triggerElements;if(Q&&(me.hasElement(Q)||me.hasMatchingElement(ke=>St(ke,Q))))return;let te=Wt(Q)?Q:null;for(;te&&!$o(te);){const ke=Lo(te);if($o(ke)||!Wt(ke))break;te=ke}if(oe.length&&Wt(Q)&&!jce(Q)&&!St(Q,n.select("floatingElement"))&&Array.from(oe).every(ke=>!St(te,ke)))return;if(pn(Q)&&!("touches"in Y)){const ke=$o(Q),ge=Gr(Q),_e=/auto|scroll/,de=ke||_e.test(ge.overflowX),Ce=ke||_e.test(ge.overflowY),ye=de&&Q.clientWidth>0&&Q.scrollWidth>Q.clientWidth,Me=Ce&&Q.clientHeight>0&&Q.scrollHeight>Q.clientHeight,Pe=ge.direction==="rtl",Ke=Me&&(Pe?Y.offsetX<=Q.offsetWidth-Q.clientWidth:Y.offsetX>Q.clientWidth),Et=ye&&Y.offsetY>Q.clientHeight;if(Ke||Et)return}const Z=(Se=c.current.floatingContext)==null?void 0:Se.nodeId,ie=k&&mu(k.nodesRef.current,Z).some(ke=>{var ge;return to(Y,(ge=ke.context)==null?void 0:ge.elements.floating)});if(to(Y,n.select("floatingElement"))||to(Y,n.select("domReferenceElement"))||ie)return;const J=k?mu(k.nodesRef.current,Z):[];if(J.length>0){let ke=!0;if(J.forEach(ge=>{var _e;(_e=ge.context)!=null&&_e.open&&!ge.context.dataRef.current.__outsidePressBubbles&&(ke=!1)}),!ke)return}n.setOpen(!1,Lt(ak,Y)),I()}),P=qe(Y=>{F()!=="sloppy"||Y.pointerType==="touch"||!n.select("open")||!f||to(Y,n.select("floatingElement"))||to(Y,n.select("domReferenceElement"))||X(Y)}),K=qe(Y=>{if(F()!=="sloppy"||!n.select("open")||!f||to(Y,n.select("floatingElement"))||to(Y,n.select("domReferenceElement")))return;const W=Y.touches[0];W&&(O.current={startTime:Date.now(),startX:W.clientX,startY:W.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},U.start(1e3,()=>{O.current&&(O.current.dismissOnTouchEnd=!1,O.current.dismissOnMouseDown=!1)}))}),ee=qe(Y=>{const W=ui(Y);function Q(){K(Y),W==null||W.removeEventListener(Y.type,Q)}W==null||W.addEventListener(Y.type,Q)}),q=qe(Y=>{const W=_.current;if(_.current=!1,U.clear(),Y.type==="mousedown"&&O.current&&!O.current.dismissOnMouseDown)return;const Q=ui(Y);function pe(){Y.type==="pointerdown"?P(Y):X(Y,W),Q==null||Q.removeEventListener(Y.type,pe)}Q==null||Q.addEventListener(Y.type,pe)}),ae=qe(Y=>{if(F()!=="sloppy"||!O.current||to(Y,n.select("floatingElement"))||to(Y,n.select("domReferenceElement")))return;const W=Y.touches[0];if(!W)return;const Q=Math.abs(W.clientX-O.current.startX),pe=Math.abs(W.clientY-O.current.startY),oe=Math.sqrt(Q*Q+pe*pe);oe>5&&(O.current.dismissOnTouchEnd=!0),oe>10&&(X(Y),U.clear(),O.current=null)}),re=qe(Y=>{const W=ui(Y);function Q(){ae(Y),W==null||W.removeEventListener(Y.type,Q)}W==null||W.addEventListener(Y.type,Q)}),fe=qe(Y=>{F()!=="sloppy"||!O.current||to(Y,n.select("floatingElement"))||to(Y,n.select("domReferenceElement"))||(O.current.dismissOnTouchEnd&&X(Y),U.clear(),O.current=null)}),ve=qe(Y=>{const W=ui(Y);function Q(){fe(Y),W==null||W.removeEventListener(Y.type,Q)}W==null||W.addEventListener(Y.type,Q)});S.useEffect(()=>{if(!r||!f)return;c.current.__escapeKeyBubbles=D,c.current.__outsidePressBubbles=M;const Y=new Ns;function W(te){n.setOpen(!1,Lt(tb,te))}function Q(){Y.clear(),$.current=!0}function pe(){Y.start(uv()?5:0,()=>{$.current=!1})}const oe=Gt(i);oe.addEventListener("pointerdown",V,!0),h&&(oe.addEventListener("keydown",z),oe.addEventListener("compositionstart",Q),oe.addEventListener("compositionend",pe)),R&&(oe.addEventListener("click",q,!0),oe.addEventListener("pointerdown",q,!0),oe.addEventListener("touchstart",ee,!0),oe.addEventListener("touchmove",re,!0),oe.addEventListener("touchend",ve,!0),oe.addEventListener("mousedown",q,!0));let me=[];return v&&(Wt(a)&&(me=Xa(a)),Wt(i)&&(me=me.concat(Xa(i))),!Wt(o)&&o&&o.contextElement&&(me=me.concat(Xa(o.contextElement)))),me=me.filter(te=>{var Z;return te!==((Z=oe.defaultView)==null?void 0:Z.visualViewport)}),me.forEach(te=>{te.addEventListener("scroll",W,{passive:!0})}),()=>{oe.removeEventListener("pointerdown",V,!0),h&&(oe.removeEventListener("keydown",z),oe.removeEventListener("compositionstart",Q),oe.removeEventListener("compositionend",pe)),R&&(oe.removeEventListener("click",q,!0),oe.removeEventListener("pointerdown",q,!0),oe.removeEventListener("touchstart",ee,!0),oe.removeEventListener("touchmove",re,!0),oe.removeEventListener("touchend",ve,!0),oe.removeEventListener("mousedown",q,!0)),me.forEach(te=>{te.removeEventListener("scroll",W)}),Y.clear(),_.current=!1}},[c,i,o,a,h,R,r,l,v,f,D,M,z,X,q,P,ee,re,ve,V,n]),S.useEffect(I,[R,I]);const Re=S.useMemo(()=>({onKeyDown:z,...g&&{[Lde[b]]:Y=>{n.setOpen(!1,Lt(Hh,Y.nativeEvent))},...b!=="intentional"&&{onClick(Y){n.setOpen(!1,Lt(Hh,Y.nativeEvent))}}}}),[z,n,g,b]),le=qe(Y=>{const W=ui(Y.nativeEvent);!St(n.select("floatingElement"),W)||Y.button!==0||(_.current=!0)}),Ae=qe(Y=>{!r||!f||Y.button!==0||(_.current=!0)}),Ie=S.useMemo(()=>({onKeyDown:z,onPointerDown:le,onMouseDown:le,onMouseUp:le,onClickCapture:H,onMouseDownCapture(Y){H(),Ae(Y)},onPointerDownCapture(Y){H(),Ae(Y)},onMouseUpCapture:H,onTouchEndCapture:H,onTouchMoveCapture:H}),[z,le,H,Ae]);return S.useMemo(()=>f?{reference:Re,floating:Ie,trigger:Re}:{},[f,Re,Ie])}var fb=Symbol("NOT_FOUND");function Fde(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function zde(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Bde(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 eO=e=>Array.isArray(e)?e:[e];function Hde(e){const t=Array.isArray(e[0])?e[0]:e;return Bde(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Ude(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}function qde(e){let t;return{get(n){return t&&e(t.key,n)?t.value:fb},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function Vde(e,t){let n=[];function r(l){const c=n.findIndex(f=>t(l,f.key));if(c>-1){const f=n[c];return c>0&&(n.splice(c,1),n.unshift(f)),f.value}return fb}function i(l,c){r(l)===fb&&(n.unshift({key:l,value:c}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var Gde=(e,t)=>e===t;function Yde(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:i}=n;for(let o=0;o<i;o++)if(!e(n[o],r[o]))return!1;return!0}}function Wde(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=Gde,maxSize:i=1,resultEqualityCheck:o}=n,a=Yde(r);let l=0;const c=i<=1?qde(a):Vde(i,a);function f(){let h=c.get(arguments);if(h===fb){if(h=e.apply(null,arguments),l++,o){const m=c.getEntries().find(g=>o(g.value,h));m&&(h=m.value,l!==0&&l--)}c.put(arguments,h)}return h}return f.clearCache=()=>{c.clear(),f.resetResultsCount()},f.resultsCount=()=>l,f.resetResultsCount=()=>{l=0},f}var Kde=class{constructor(e){this.value=e}deref(){return this.value}},Xde=typeof WeakRef<"u"?WeakRef:Kde,Qde=0,tO=1;function Sg(){return{s:Qde,v:void 0,o:null,p:null}}function N6(e,t={}){let n=Sg();const{resultEqualityCheck:r}=t;let i,o=0;function a(){var p;let l=n;const{length:c}=arguments;for(let m=0,g=c;m<g;m++){const b=arguments[m];if(typeof b=="function"||typeof b=="object"&&b!==null){let v=l.o;v===null&&(l.o=v=new WeakMap);const w=v.get(b);w===void 0?(l=Sg(),v.set(b,l)):l=w}else{let v=l.p;v===null&&(l.p=v=new Map);const w=v.get(b);w===void 0?(l=Sg(),v.set(b,l)):l=w}}const f=l;let h;if(l.s===tO)h=l.v;else if(h=e.apply(null,arguments),o++,r){const m=((p=i==null?void 0:i.deref)==null?void 0:p.call(i))??i;m!=null&&r(m,h)&&(h=m,o!==0&&o--),i=typeof h=="object"&&h!==null||typeof h=="function"?new Xde(h):h}return f.s=tO,f.v=h,h}return a.clearCache=()=>{n=Sg(),a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function j6(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,a=0,l,c={},f=i.pop();typeof f=="object"&&(c=f,f=i.pop()),Fde(f,`createSelector expects an output function after the inputs, but received: [${typeof f}]`);const h={...n,...c},{memoize:p,memoizeOptions:m=[],argsMemoize:g=N6,argsMemoizeOptions:b=[]}=h,v=eO(m),w=eO(b),x=Hde(i),k=p(function(){return o++,f.apply(null,arguments)},...v),C=g(function(){a++;const _=Ude(x,arguments);return l=k.apply(null,_),l},...w);return Object.assign(C,{resultFunc:f,memoizedResultFunc:k,dependencies:x,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>l,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:p,argsMemoize:g})};return Object.assign(r,{withTypes:()=>r}),r}var Zde=j6(N6),Jde=Object.assign((e,t=Zde)=>{zde(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(o=>e[o]);return t(r,(...o)=>o.reduce((a,l,c)=>(a[n[c]]=l,a),{}))},{withTypes:()=>Jde});j6({memoize:Wde,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const Tt=(e,t,n,r,i,o,...a)=>{if(a.length>0)throw new Error(co(1));let l;if(e)l=e;else throw new Error("Missing arguments");return l};var F6=f4();const dE=[];let hE;function ehe(){return hE}function the(e){dE.push(e)}function z6(e){const t=(n,r)=>{const i=Vr(rhe).current;let o;try{hE=i;for(const a of dE)a.before(i);o=e(n,r);for(const a of dE)a.after(i);i.didInitialize=!0}finally{hE=void 0}return o};return t.displayName=e.displayName||e.name,t}function nhe(e){return S.forwardRef(z6(e))}function rhe(){return{didInitialize:!1}}const ihe=sk(19),ohe=ihe?ahe:lhe;function B6(e,t,n,r,i){return ohe(e,t,n,r,i)}function she(e,t,n,r,i){const o=S.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return F6.useSyncExternalStore(e.subscribe,o,o)}the({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()}}),F6.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function ahe(e,t,n,r,i){const o=ehe();if(!o)return she(e,t,n,r,i);const a=o.syncIndex;o.syncIndex+=1;let l;return o.didInitialize?(l=o.syncHooks[a],(l.store!==e||l.selector!==t||!Object.is(l.a1,n)||!Object.is(l.a2,r)||!Object.is(l.a3,i))&&(l.store!==e&&(o.didChangeStore=!0),l.store=e,l.selector=t,l.a1=n,l.a2=r,l.a3=i,l.didChange=!0)):(l={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i),didChange:!1},o.syncHooks.push(l)),l.value}function lhe(e,t,n,r,i){return d4.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,o=>t(o,n,r,i))}class uhe{constructor(t){ce(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t)}));ce(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 B6(this,t,n,r,i)}}class H6 extends uhe{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){S.useDebugValue(t),at(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;at(()=>(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);at(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){S.useDebugValue(t);const r=n!==void 0;at(()=>{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 S.useDebugValue(t),B6(this,this.selectors[t],n,r,i)}useContextCallback(t,n){S.useDebugValue(t);const r=qe(n??IF);this.context[t]=r}useStateSetter(t){const n=S.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 l=i;i=a,n(a,l,this)}})}}function che(){const[,e]=S.useState({});return S.useCallback(()=>{e({})},[])}const fhe={open:Tt(e=>e.open),domReferenceElement:Tt(e=>e.domReferenceElement),referenceElement:Tt(e=>e.positionReference??e.referenceElement),floatingElement:Tt(e=>e.floatingElement),floatingId:Tt(e=>e.floatingId)};class Ck extends H6{constructor(n){const{nested:r,noEmit:i,onOpenChange:o,triggerElements:a,...l}=n;super({...l,positionReference:l.referenceElement,domReferenceElement:l.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:w6(),nested:r,noEmit:i,triggerElements:a},fhe);ce(this,"setOpen",(n,r)=>{var i,o;if((!n||!this.state.open||ZF(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 dhe(e,t){const n=S.useRef(null),r=S.useRef(null);return S.useCallback(i=>{if(e!==void 0){if(n.current!==null){const o=n.current,a=r.current,l=t.context.triggerElements.getById(o);a&&l===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 hhe(e,t,n,r){const i=n.useState("isMountedByTrigger",e),o=dhe(e,n),a=qe(l=>{if(o(l),!l||!n.select("open"))return;const c=n.select("activeTriggerId");if(c===e){n.update({activeTriggerElement:l,...r});return}c==null&&n.update({activeTriggerId:e,activeTriggerElement:l,...r})});return at(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:a,isMountedByThisTrigger:i}}function phe(e){const t=e.useState("open");at(()=>{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 mhe(e,t,n){const{mounted:r,setMounted:i,transitionStatus:o}=jF(e);t.useSyncedValues({mounted:r,transitionStatus:o});const a=qe(()=>{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)}),l=t.useState("preventUnmountingOnClose");return vk({enabled:!l,open:e,ref:t.context.popupRef,onComplete(){e||a()}}),{forceUnmount:a,transitionStatus:o}}class kk{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 ghe(){return new Ck({open:!1,floatingElement:null,referenceElement:null,triggerElements:new kk,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function yhe(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:"idle",floatingRootContext:ghe(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Hn,inactiveTriggerProps:Hn,popupProps:Hn}}const Eg=Tt(e=>e.triggerIdProp??e.activeTriggerId),bhe={open:Tt(e=>e.openProp??e.open),mounted:Tt(e=>e.mounted),transitionStatus:Tt(e=>e.transitionStatus),floatingRootContext:Tt(e=>e.floatingRootContext),preventUnmountingOnClose:Tt(e=>e.preventUnmountingOnClose),payload:Tt(e=>e.payload),activeTriggerId:Eg,activeTriggerElement:Tt(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:Tt((e,t)=>t!==void 0&&Eg(e)===t),isOpenedByTrigger:Tt((e,t)=>t!==void 0&&Eg(e)===t&&e.open),isMountedByTrigger:Tt((e,t)=>t!==void 0&&Eg(e)===t&&e.mounted),triggerProps:Tt((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:Tt(e=>e.popupProps),popupElement:Tt(e=>e.popupElement),positionerElement:Tt(e=>e.positionerElement)};function vhe(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,i=Pu(),o=Bs()!=null,a=Vr(()=>new Ck({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new kk,floatingId:i,nested:o,noEmit:!1})).current;return at(()=>{const l={open:t,floatingId:i};r.reference!==void 0&&(l.referenceElement=r.reference,l.domReferenceElement=Wt(r.reference)?r.reference:null),r.floating!==void 0&&(l.floatingElement=r.floating),a.update(l)},[t,i,r.reference,r.floating,a]),a.context.onOpenChange=n,a.context.nested=o,a.context.noEmit=!1,a}function xhe(e={}){const{nodeId:t,externalTree:n}=e,r=vhe(e),i=e.rootContext||r,o={reference:i.useState("referenceElement"),floating:i.useState("floatingElement"),domReference:i.useState("domReferenceElement")},[a,l]=S.useState(null),c=S.useRef(null),f=gl(n);at(()=>{o.domReference&&(c.current=o.domReference)},[o.domReference]);const h=_de({...e,elements:{...o,...a&&{reference:a}}}),p=S.useCallback(M=>{const O=Wt(M)?{getBoundingClientRect:()=>M.getBoundingClientRect(),getClientRects:()=>M.getClientRects(),contextElement:M}:M;l(O),h.refs.setReference(O)},[h.refs]),[m,g]=S.useState(null),[b,v]=S.useState(null);i.useSyncedValue("referenceElement",m),i.useSyncedValue("domReferenceElement",Wt(m)?m:null),i.useSyncedValue("floatingElement",b);const w=S.useCallback(M=>{(Wt(M)||M===null)&&(c.current=M,g(M)),(Wt(h.refs.reference.current)||h.refs.reference.current===null||M!==null&&!Wt(M))&&h.refs.setReference(M)},[h.refs,g]),x=S.useCallback(M=>{v(M),h.refs.setFloating(M)},[h.refs]),k=S.useMemo(()=>({...h.refs,setReference:w,setFloating:x,setPositionReference:p,domReference:c}),[h.refs,w,x,p]),C=S.useMemo(()=>({...h.elements,domReference:o.domReference}),[h.elements,o.domReference]),R=i.useState("open"),_=i.useState("floatingId"),D=S.useMemo(()=>({...h,dataRef:i.context.dataRef,open:R,onOpenChange:i.setOpen,events:i.context.events,floatingId:_,refs:k,elements:C,nodeId:t,rootStore:i}),[h,k,C,t,i,R,_]);return at(()=>{i.context.dataRef.current.floatingContext=D;const M=f==null?void 0:f.nodesRef.current.find(O=>O.id===t);M&&(M.context=D)}),S.useMemo(()=>({...h,context:D,refs:k,elements:C,rootStore:i}),[h,k,C,D,i])}function whe(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:i}=e,o=Pu(),a=Bs()!=null,l=t.useState("open"),c=t.useState("activeTriggerElement"),f=t.useState(r?"popupElement":"positionerElement"),h=t.context.triggerElements,p=Vr(()=>new Ck({open:l,referenceElement:c,floatingElement:f,triggerElements:h,onOpenChange:i,floatingId:o,nested:a,noEmit:n})).current;return at(()=>{const m={open:l,floatingId:o,referenceElement:c,floatingElement:f};Wt(c)&&(m.domReferenceElement=c),p.state.positionReference===p.state.referenceElement&&(m.positionReference=c),p.update(m)},[l,o,c,f,p]),p.context.onOpenChange=i,p.context.nested=a,p.context.noEmit=n,p}const ow=Pce&&VF;function She(e,t={}){const n="rootStore"in e?e.rootStore:e,{events:r,dataRef:i}=n.context,{enabled:o=!0,delay:a}=t,l=S.useRef(!1),c=S.useRef(null),f=uo(),h=S.useRef(!0);S.useEffect(()=>{const m=n.select("domReferenceElement");if(!o)return;const g=Qn(m);function b(){const x=n.select("domReferenceElement");!n.select("open")&&pn(x)&&x===Fi(Gt(x))&&(l.current=!0)}function v(){h.current=!0}function w(){h.current=!1}return g.addEventListener("blur",b),ow&&(g.addEventListener("keydown",v,!0),g.addEventListener("pointerdown",w,!0)),()=>{g.removeEventListener("blur",b),ow&&(g.removeEventListener("keydown",v,!0),g.removeEventListener("pointerdown",w,!0))}},[n,o]),S.useEffect(()=>{if(!o)return;function m(g){if(g.reason===Hh||g.reason===lk){const b=n.select("domReferenceElement");Wt(b)&&(c.current=b,l.current=!0)}}return r.on("openchange",m),()=>{r.off("openchange",m)}},[r,o,n]);const p=S.useMemo(()=>({onMouseLeave(){l.current=!1,c.current=null},onFocus(m){const g=m.currentTarget;if(l.current){if(c.current===g)return;l.current=!1,c.current=null}const b=ui(m.nativeEvent);if(Wt(b)){if(ow&&!m.relatedTarget){if(!h.current&&!dv(b))return}else if(!Fce(b))return}const v=nb(m.relatedTarget,n.context.triggerElements),{nativeEvent:w,currentTarget:x}=m,k=typeof a=="function"?a():a;if(n.select("open")&&v||k===0||k===void 0){n.setOpen(!0,Lt(vh,w,x));return}f.start(k,()=>{l.current||n.setOpen(!0,Lt(vh,w,x))})},onBlur(m){l.current=!1,c.current=null;const g=m.relatedTarget,b=m.nativeEvent,v=Wt(g)&&g.hasAttribute(Df("focus-guard"))&&g.getAttribute("data-type")==="outside";f.start(0,()=>{var C;const w=n.select("domReferenceElement"),x=Fi(w?w.ownerDocument:document);!g&&x===w||St((C=i.current.floatingContext)==null?void 0:C.refs.floating.current,x)||St(w,x)||v||nb(g??x,n.context.triggerElements)||n.setOpen(!1,Lt(vh,b))})}}),[i,n,f,a]);return S.useMemo(()=>o?{reference:p,trigger:p}:{},[o,p])}const pE=Df("safe-polygon"),Ehe=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${KF}`;function Che(e){return e?!!e.closest(Ehe):!1}class Rk{constructor(){ce(this,"dispose",()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()});ce(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 Ns,this.restTimeout=new Ns,this.handleCloseOptions=void 0}static create(){return new Rk}}function U6(e){const t=Vr(Rk.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||(n.hoverInteractionState=t),sv(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}const khe=new Set(["click","mousedown"]);function Rhe(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:l=!0,closeDelay:c=0}=t,f=U6(n),h=gl(),p=Bs(),m=qe(()=>f.interactedInside?!0:a.current.openEvent?khe.has(a.current.openEvent.type):!1),g=qe(()=>{var R;const C=(R=a.current.openEvent)==null?void 0:R.type;return(C==null?void 0:C.includes("mouse"))&&C!=="mousedown"}),b=qe(C=>nb(C,n.context.triggerElements)),v=S.useCallback((C,R=!0)=>{const _=Ahe(c,f.pointerType);_&&!f.handler?f.openChangeTimeout.start(_,()=>n.setOpen(!1,Lt(li,C))):R&&(f.openChangeTimeout.clear(),n.setOpen(!1,Lt(li,C)))},[c,n,f]),w=qe(()=>{f.unbindMouseMove(),f.handler=void 0}),x=qe(()=>{if(f.performedPointerEventsMutation){const C=Gt(i).body;C.style.pointerEvents="",C.removeAttribute(pE),f.performedPointerEventsMutation=!1}}),k=qe(C=>{const R=ui(C);if(!Che(R)){f.interactedInside=!1;return}f.interactedInside=!0});at(()=>{r||(f.pointerType=void 0,f.restTimeoutPending=!1,f.interactedInside=!1,w(),x())},[r,f,w,x]),S.useEffect(()=>()=>{w()},[w]),S.useEffect(()=>x,[x]),at(()=>{var C,R,_;if(l&&r&&(C=f.handleCloseOptions)!=null&&C.blockPointerEvents&&g()&&Wt(o)&&i){f.performedPointerEventsMutation=!0;const D=Gt(i).body;D.setAttribute(pE,"");const M=o,O=i,U=(_=(R=h==null?void 0:h.nodesRef.current.find(L=>L.id===p))==null?void 0:R.context)==null?void 0:_.elements.floating;return U&&(U.style.pointerEvents=""),D.style.pointerEvents="none",M.style.pointerEvents="auto",O.style.pointerEvents="auto",()=>{D.style.pointerEvents="",M.style.pointerEvents="",O.style.pointerEvents=""}}},[l,r,o,i,f,g,h,p]),S.useEffect(()=>{if(!l)return;function C(M){m()||!a.current.floatingContext||!n.select("open")||b(M.relatedTarget)||(x(),w(),m()||v(M))}function R(M){var O;f.openChangeTimeout.clear(),x(),(O=f.handler)==null||O.call(f,M),w()}function _(M){m()||v(M,!1)}const D=i;return D&&(D.addEventListener("mouseleave",C),D.addEventListener("mouseenter",R),D.addEventListener("mouseleave",_),D.addEventListener("pointerdown",k,!0)),()=>{D&&(D.removeEventListener("mouseleave",C),D.removeEventListener("mouseenter",R),D.removeEventListener("mouseleave",_),D.removeEventListener("pointerdown",k,!0))}},[l,i,n,a,m,b,v,x,w,k,f])}function Ahe(e,t){return t&&!Rf(t)?0:typeof e=="function"?e():e}function sw(e){return typeof e=="function"?e():e}const The={current:null};function _he(e,t={}){var L;const n="rootStore"in e?e.rootStore:e,{dataRef:r,events:i}=n.context,{enabled:o=!0,delay:a=0,handleClose:l=null,mouseOnly:c=!1,restMs:f=0,move:h=!0,triggerElementRef:p=The,externalTree:m,isActiveTrigger:g=!0}=t,b=gl(m),v=U6(n),w=Er(l),x=Er(a),k=Er(f),C=Er(o);g&&(v.handleCloseOptions=(L=w.current)==null?void 0:L.__options);const R=qe(()=>v.interactedInside?!0:r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1),_=qe(I=>nb(I,n.context.triggerElements)),D=S.useCallback((I,$=!0)=>{const B=ew(x.current,"close",v.pointerType);B&&!v.handler?v.openChangeTimeout.start(B,()=>n.setOpen(!1,Lt(li,I))):$&&(v.openChangeTimeout.clear(),n.setOpen(!1,Lt(li,I)))},[x,n,v]),M=qe(()=>{v.unbindMouseMove(),v.handler=void 0}),O=qe(()=>{if(v.performedPointerEventsMutation){const I=Gt(n.select("domReferenceElement")).body;I.style.pointerEvents="",I.removeAttribute(pE),v.performedPointerEventsMutation=!1}});S.useEffect(()=>{if(!o)return;function I($){$.open||(v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return i.on("openchange",I),()=>{i.off("openchange",I)}},[o,i,v]);const U=qe(I=>{var B;if(R()||!r.current.floatingContext||_(I.relatedTarget))return;const $=p.current;(B=w.current)==null||B.call(w,{...r.current.floatingContext,tree:b,x:I.clientX,y:I.clientY,onClose(){O(),M(),!R()&&$===n.select("domReferenceElement")&&D(I)}})(I)});return S.useEffect(()=>{if(!o)return;const I=p.current??(g?n.select("domReferenceElement"):null);if(!Wt(I))return;function $(F){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,c&&!Rf(v.pointerType)||sw(k.current)>0&&!ew(x.current,"open"))return;const z=ew(x.current,"open",v.pointerType),j=n.select("domReferenceElement"),H=n.context.triggerElements,X=(H.hasElement(F.target)||H.hasMatchingElement(q=>St(q,F.target)))&&(!j||!St(j,F.target)),P=F.currentTarget??null,K=n.select("open"),ee=!K||X;X&&K?n.setOpen(!0,Lt(li,F,P)):z?v.openChangeTimeout.start(z,()=>{ee&&n.setOpen(!0,Lt(li,F,P))}):ee&&n.setOpen(!0,Lt(li,F,P))}function B(F){if(R()){O();return}v.unbindMouseMove();const z=n.select("domReferenceElement"),j=Gt(z);if(v.restTimeout.clear(),v.restTimeoutPending=!1,_(F.relatedTarget))return;if(w.current&&r.current.floatingContext){n.select("open")||v.openChangeTimeout.clear();const X=p.current;v.handler=w.current({...r.current.floatingContext,tree:b,x:F.clientX,y:F.clientY,onClose(){O(),M(),C.current&&!R()&&X===n.select("domReferenceElement")&&D(F,!0)}});const P=v.handler;P(F),j.addEventListener("mousemove",P),v.unbindMouseMove=()=>{j.removeEventListener("mousemove",P)};return}(v.pointerType==="touch"?!St(n.select("floatingElement"),F.relatedTarget):!0)&&D(F)}function V(F){U(F)}return n.select("open")&&I.addEventListener("mouseleave",V),h&&I.addEventListener("mousemove",$,{once:!0}),I.addEventListener("mouseenter",$),I.addEventListener("mouseleave",B),()=>{I.removeEventListener("mouseleave",V),h&&I.removeEventListener("mousemove",$),I.removeEventListener("mouseenter",$),I.removeEventListener("mouseleave",B)}},[M,O,r,x,D,n,o,w,U,v,g,R,_,c,h,k,p,b,C]),S.useMemo(()=>{if(!o)return;function I($){v.pointerType=$.pointerType}return{onPointerDown:I,onPointerEnter:I,onMouseMove($){const{nativeEvent:B}=$,V=$.currentTarget,F=n.select("domReferenceElement"),z=n.context.triggerElements,j=n.select("open"),H=(z.hasElement($.target)||z.hasMatchingElement(P=>St(P,$.target)))&&(!F||!St(F,$.target));if(c&&!Rf(v.pointerType)||j&&!H||sw(k.current)===0||!H&&v.restTimeoutPending&&$.movementX**2+$.movementY**2<2)return;v.restTimeout.clear();function X(){if(v.restTimeoutPending=!1,R())return;const P=n.select("open");!v.blockMouseMove&&(!P||H)&&n.setOpen(!0,Lt(li,B,V))}v.pointerType==="touch"?Rn.flushSync(()=>{X()}):H&&j?X():(v.restTimeoutPending=!0,v.restTimeout.start(sw(k.current),X))}}},[o,v,R,c,n,k])}function q6(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=S.useCallback(f=>Cg(f,e,"reference"),t),a=S.useCallback(f=>Cg(f,e,"floating"),n),l=S.useCallback(f=>Cg(f,e,"item"),r),c=S.useCallback(f=>Cg(f,e,"trigger"),i);return S.useMemo(()=>({getReferenceProps:o,getFloatingProps:a,getItemProps:l,getTriggerProps:c}),[o,a,l,c])}function Cg(e,t,n){var a;const r=new Map,i=n==="item",o={};n==="floating"&&(o.tabIndex=-1,o[oE]="");for(const l in e)i&&e&&(l===YF||l===WF)||(o[l]=e[l]);for(let l=0;l<t.length;l+=1){let c;const f=(a=t[l])==null?void 0:a[n];typeof f=="function"?c=e?f(e):null:c=f,c&&nO(o,c,i,r)}return nO(o,e,i,r),o}function nO(e,t,n,r){var i;for(const o in t){const a=t[o];n&&(o===YF||o===WF)||(o.startsWith("on")?(r.has(o)||r.set(o,[]),typeof a=="function"&&((i=r.get(o))==null||i.push(a),e[o]=(...l)=>{var c;return(c=r.get(o))==null?void 0:c.map(f=>f(...l)).find(f=>f!==void 0)})):e[o]=a)}}const Dhe="Escape";function mv(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function kg(e,t){return mv(t,e===pk||e===bp,e===Qa||e===Za)}function aw(e,t,n){return mv(t,e===bp,n?e===Qa:e===Za)||e==="Enter"||e===" "||e===""}function Mhe(e,t,n){return mv(t,n?e===Qa:e===Za,e===bp)}function $he(e,t,n,r){const i=n?e===Za:e===Qa,o=e===pk;return t==="both"||t==="horizontal"&&r&&r>1?e===Dhe:mv(t,i,o)}function Ohe(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:l,activeIndex:c,onNavigate:f=()=>{},enabled:h=!0,selectedIndex:p=null,allowEscape:m=!1,loopFocus:g=!1,nested:b=!1,rtl:v=!1,virtual:w=!1,focusItemOnOpen:x="auto",focusItemOnHover:k=!0,openOnArrowKeyDown:C=!0,disabledIndices:R=void 0,orientation:_="vertical",parentOrientation:D,cols:M=1,id:O,resetOnPointerLeave:U=!0,externalTree:L}=t,I=rb(i),$=Er(I),B=Bs(),V=gl(L);at(()=>{a.current.orientation=_},[a,_]);const F=sE(o),z=S.useRef(x),j=S.useRef(p??-1),H=S.useRef(null),X=S.useRef(!0),P=qe(Z=>{f(j.current===-1?null:j.current,Z)}),K=S.useRef(P),ee=S.useRef(!!i),q=S.useRef(r),ae=S.useRef(!1),re=S.useRef(!1),fe=Er(R),ve=Er(r),Re=Er(p),le=Er(U),Ae=qe(()=>{function Z(ke){w?V==null||V.events.emit("virtualfocus",ke):xh(ke,{sync:ae.current,preventScroll:!0})}const ie=l.current[j.current],J=re.current;ie&&Z(ie),(ae.current?ke=>ke():requestAnimationFrame)(()=>{var _e;const ke=l.current[j.current]||ie;if(!ke)return;ie||Z(ke),Y&&(J||!X.current)&&((_e=ke.scrollIntoView)==null||_e.call(ke,{block:"nearest",inline:"nearest"}))})});at(()=>{h&&(r&&i?(j.current=p??-1,z.current&&p!=null&&(re.current=!0,P())):ee.current&&(j.current=-1,K.current()))},[h,r,i,p,P]),at(()=>{if(h){if(!r){ae.current=!1;return}if(i)if(c==null){if(ae.current=!1,Re.current!=null)return;if(ee.current&&(j.current=-1,Ae()),(!q.current||!ee.current)&&z.current&&(H.current!=null||z.current===!0&&H.current==null)){let Z=0;const ie=()=>{l.current[0]==null?(Z<2&&(Z?requestAnimationFrame:queueMicrotask)(ie),Z+=1):(j.current=H.current==null||aw(H.current,_,v)||b?ty(l):uE(l),H.current=null,P())};ie()}}else Kc(l,c)||(j.current=c,Ae(),re.current=!1)}},[h,r,i,c,Re,b,l,_,v,P,Ae,fe]),at(()=>{var ke,ge;if(!h||i||!V||w||!ee.current)return;const Z=V.nodesRef.current,ie=(ge=(ke=Z.find(_e=>_e.id===B))==null?void 0:ke.context)==null?void 0:ge.elements.floating,J=Fi(Gt(i)),Se=Z.some(_e=>_e.context&&St(_e.context.elements.floating,J));ie&&!Se&&X.current&&ie.focus({preventScroll:!0})},[h,i,V,B,w]),at(()=>{K.current=P,q.current=r,ee.current=!!i}),at(()=>{r||(H.current=null,z.current=x)},[r,x]);const Ie=c!=null,Y=S.useMemo(()=>{function Z(J){if(!ve.current)return;const Se=l.current.indexOf(J.currentTarget);Se!==-1&&j.current!==Se&&(j.current=Se,P(J))}return{onFocus(J){ae.current=!0,Z(J)},onClick:({currentTarget:J})=>J.focus({preventScroll:!0}),onMouseMove(J){ae.current=!0,re.current=!1,k&&Z(J)},onPointerLeave(J){var ke;if(!ve.current||!X.current||J.pointerType==="touch")return;ae.current=!0;const Se=J.relatedTarget;!k||l.current.includes(Se)||le.current&&(xh(null,{sync:!0}),j.current=-1,P(J),w||(ke=$.current)==null||ke.focus({preventScroll:!0}))}}},[ve,$,k,l,P,le,w]),W=S.useCallback(()=>{var Z,ie,J;return D??((J=(ie=(Z=V==null?void 0:V.nodesRef.current.find(Se=>Se.id===B))==null?void 0:Z.context)==null?void 0:ie.dataRef)==null?void 0:J.current.orientation)},[B,V,D]),Q=qe(Z=>{if(X.current=!1,ae.current=!0,Z.which===229||!ve.current&&Z.currentTarget===$.current)return;if(b&&$he(Z.key,_,v,M)){kg(Z.key,W())||fr(Z),n.setOpen(!1,Lt(Jg,Z.nativeEvent)),pn(o)&&(w?V==null||V.events.emit("virtualfocus",o):o.focus());return}const ie=j.current,J=ty(l,R),Se=uE(l,R);if(F||(Z.key==="Home"&&(fr(Z),j.current=J,P(Z)),Z.key==="End"&&(fr(Z),j.current=Se,P(Z))),M>1){const ke=Array.from({length:l.current.length},()=>({width:1,height:1})),ge=t6(ke,M,!1),_e=ge.findIndex(ye=>ye!=null&&!Ja(l,ye,R)),de=ge.reduce((ye,Me,Pe)=>Me!=null&&!Ja(l,Me,R)?Pe:ye,-1),Ce=ge[e6({current:ge.map(ye=>ye!=null?l.current[ye]:null)},{event:Z,orientation:_,loopFocus:g,rtl:v,cols:M,disabledIndices:r6([...(typeof R!="function"?R:null)||l.current.map((ye,Me)=>Ja(l,Me,R)?Me:void 0),void 0],ge),minIndex:_e,maxIndex:de,prevIndex:n6(j.current>Se?J:j.current,ke,ge,M,Z.key===bp?"bl":Z.key===(v?Qa:Za)?"tr":"tl"),stopEvent:!0})];if(Ce!=null&&(j.current=Ce,P(Z)),_==="both")return}if(kg(Z.key,_)){if(fr(Z),r&&!w&&Fi(Z.currentTarget.ownerDocument)===Z.currentTarget){j.current=aw(Z.key,_,v)?J:Se,P(Z);return}aw(Z.key,_,v)?g?ie>=Se?m&&ie!==l.current.length?j.current=-1:(ae.current=!1,j.current=J):j.current=rr(l,{startingIndex:ie,disabledIndices:R}):j.current=Math.min(Se,rr(l,{startingIndex:ie,disabledIndices:R})):g?ie<=J?m&&ie!==-1?j.current=l.current.length:(ae.current=!1,j.current=Se):j.current=rr(l,{startingIndex:ie,decrement:!0,disabledIndices:R}):j.current=Math.max(J,rr(l,{startingIndex:ie,decrement:!0,disabledIndices:R})),Kc(l,j.current)&&(j.current=-1),P(Z)}}),pe=S.useMemo(()=>w&&r&&Ie&&{"aria-activedescendant":`${O}-${c}`},[w,r,Ie,O,c]),oe=S.useMemo(()=>({"aria-orientation":_==="both"?void 0:_,...F?{}:pe,onKeyDown(Z){if(Z.key==="Tab"&&Z.shiftKey&&r&&!w){const ie=ui(Z.nativeEvent);if(ie&&!St($.current,ie))return;fr(Z),n.setOpen(!1,Lt(kf,Z.nativeEvent)),pn(o)&&o.focus();return}Q(Z)},onPointerMove(){X.current=!0}}),[pe,Q,$,_,F,n,r,w,o]),me=S.useMemo(()=>{function Z(J){x==="auto"&&XF(J.nativeEvent)&&(z.current=!w)}function ie(J){z.current=x,x==="auto"&&QF(J.nativeEvent)&&(z.current=!0)}return{onKeyDown(J){const Se=n.select("open");X.current=!1;const ke=J.key.startsWith("Arrow"),ge=Mhe(J.key,W(),v),_e=kg(J.key,_),de=(b?ge:_e)||J.key==="Enter"||J.key.trim()==="";if(w&&Se)return Q(J);if(!(!Se&&!C&&ke)){if(de){const Ce=kg(J.key,W());H.current=b&&Ce?null:J.key}if(b){ge&&(fr(J),Se?(j.current=ty(l,fe.current),P(J)):n.setOpen(!0,Lt(Jg,J.nativeEvent,J.currentTarget)));return}_e&&(Re.current!=null&&(j.current=Re.current),fr(J),!Se&&C?n.setOpen(!0,Lt(Jg,J.nativeEvent,J.currentTarget)):Q(J),Se&&P(J))}},onFocus(J){n.select("open")&&!w&&(j.current=-1,P(J))},onPointerDown:ie,onPointerEnter:ie,onMouseDown:Z,onClick:Z}},[Q,fe,x,l,b,P,n,C,_,W,v,Re,w]),te=S.useMemo(()=>({...pe,...me}),[pe,me]);return S.useMemo(()=>h?{reference:te,floating:oe,item:Y,trigger:me}:{},[h,te,oe,me,Y])}const Phe=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Ihe(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:l="dialog"}=t,c=Pu(),f=(o==null?void 0:o.id)||c,h=S.useMemo(()=>{var k;return((k=rb(a))==null?void 0:k.id)||i},[a,i]),p=Phe.get(l)??l,g=Bs()!=null,b=S.useMemo(()=>p==="tooltip"||l==="label"?Hn:{"aria-haspopup":p==="alertdialog"?"dialog":p,"aria-expanded":"false",...p==="listbox"&&{role:"combobox"},...p==="menu"&&g&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[p,g,l]),v=S.useMemo(()=>p==="tooltip"||l==="label"?{[`aria-${l==="label"?"labelledby":"describedby"}`]:r?h:void 0}:{...b,"aria-expanded":r?"true":"false","aria-controls":r?h:void 0,...p==="menu"&&{id:f}},[p,h,r,f,l,b]),w=S.useMemo(()=>{const k={id:h,...p&&{role:p}};return p==="tooltip"||l==="label"?k:{...k,...p==="menu"&&{"aria-labelledby":f}}},[p,h,f,l]),x=S.useCallback(({active:k,selected:C})=>{const R={role:"option",...k&&{id:`${h}-fui-option`}};switch(l){case"select":case"combobox":return{...R,"aria-selected":C}}return{}},[h,l]);return S.useMemo(()=>({reference:v,floating:w,item:x,trigger:b}),[v,w,b,x])}function Lhe(e,t){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,i=n.useState("open"),{listRef:o,activeIndex:a,onMatch:l,onTypingChange:c,enabled:f=!0,resetMs:h=750,selectedIndex:p=null}=t,m=uo(),g=S.useRef(""),b=S.useRef(p??a??-1),v=S.useRef(null);at(()=>{!i&&p!==null||(m.clear(),v.current=null,g.current!==""&&(g.current=""))},[i,p,m]),at(()=>{i&&g.current===""&&(b.current=p??a??-1)},[i,p,a]);const w=qe(_=>{_?r.current.typing||(r.current.typing=_,c==null||c(_)):r.current.typing&&(r.current.typing=_,c==null||c(_))}),x=qe(_=>{function D($,B,V){const F=B.find(z=>(z==null?void 0:z.toLocaleLowerCase().indexOf(V.toLocaleLowerCase()))===0);return F?$.indexOf(F):-1}const M=o.current;if(g.current.length>0&&g.current[0]!==" "&&(D(M,M,g.current)===-1?w(!1):_.key===" "&&fr(_)),M==null||_.key.length!==1||_.ctrlKey||_.metaKey||_.altKey)return;i&&_.key!==" "&&(fr(_),w(!0));const O=g.current==="";O&&(b.current=p??a??-1),M.every($=>{var B,V;return $?((B=$[0])==null?void 0:B.toLocaleLowerCase())!==((V=$[1])==null?void 0:V.toLocaleLowerCase()):!0})&&g.current===_.key&&(g.current="",b.current=v.current),g.current+=_.key,m.start(h,()=>{g.current="",b.current=v.current,w(!1)});const L=O?p??a??-1:b.current,I=D(M,[...M.slice((L||0)+1),...M.slice(0,(L||0)+1)],g.current);I!==-1?(l==null||l(I),v.current=I):_.key!==" "&&(g.current="",w(!1))}),k=qe(_=>{const D=_.relatedTarget,M=n.select("domReferenceElement"),O=n.select("floatingElement"),U=St(M,D),L=St(O,D);U||L||(m.clear(),g.current="",b.current=v.current,w(!1))}),C=S.useMemo(()=>({onKeyDown:x,onBlur:k}),[x,k]),R=S.useMemo(()=>({onKeyDown:x,onKeyUp(_){_.key===" "&&w(!1)},onBlur:k}),[x,k,w]);return S.useMemo(()=>f?{reference:C,floating:R}:{},[f,C,R])}function rO(e,t){const[n,r]=e;let i=!1;const o=t.length;for(let a=0,l=o-1;a<o;l=a++){const[c,f]=t[a]||[0,0],[h,p]=t[l]||[0,0];f>=r!=p>=r&&n<=(h-c)*(r-f)/(p-f)+c&&(i=!i)}return i}function Nhe(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function jhe(e={}){const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i=new Ns;let o=!1,a=null,l=null,c=typeof performance<"u"?performance.now():0;function f(p,m){const g=performance.now(),b=g-c;if(a===null||l===null||b===0)return a=p,l=m,c=g,null;const v=p-a,w=m-l,k=Math.sqrt(v*v+w*w)/b;return a=p,l=m,c=g,k}const h=({x:p,y:m,placement:g,elements:b,onClose:v,nodeId:w,tree:x})=>function(C){function R(){i.clear(),v()}if(i.clear(),!b.domReference||!b.floating||g==null||p==null||m==null)return;const{clientX:_,clientY:D}=C,M=[_,D],O=ui(C),U=C.type==="mouseleave",L=St(b.floating,O),I=St(b.domReference,O),$=b.domReference.getBoundingClientRect(),B=b.floating.getBoundingClientRect(),V=g.split("-")[0],F=p>B.right-B.width/2,z=m>B.bottom-B.height/2,j=Nhe(M,$),H=B.width>$.width,X=B.height>$.height,P=(H?$:B).left,K=(H?$:B).right,ee=(X?$:B).top,q=(X?$:B).bottom;if(L&&(o=!0,!U))return;if(I&&(o=!1),I&&!U){o=!0;return}if(U&&Wt(C.relatedTarget)&&St(b.floating,C.relatedTarget)||x&&mu(x.nodesRef.current,w).some(({context:fe})=>fe==null?void 0:fe.open))return;if(V==="top"&&m>=$.bottom-1||V==="bottom"&&m<=$.top+1||V==="left"&&p>=$.right-1||V==="right"&&p<=$.left+1)return R();let ae=[];switch(V){case"top":ae=[[P,$.top+1],[P,B.bottom-1],[K,B.bottom-1],[K,$.top+1]];break;case"bottom":ae=[[P,B.top+1],[P,$.bottom-1],[K,$.bottom-1],[K,B.top+1]];break;case"left":ae=[[B.right-1,q],[B.right-1,ee],[$.left+1,ee],[$.left+1,q]];break;case"right":ae=[[$.right-1,q],[$.right-1,ee],[B.left+1,ee],[B.left+1,q]];break}function re([fe,ve]){switch(V){case"top":{const Re=[H?fe+t/2:F?fe+t*4:fe-t*4,ve+t+1],le=[H?fe-t/2:F?fe+t*4:fe-t*4,ve+t+1],Ae=[[B.left,F||H?B.bottom-t:B.top],[B.right,F?H?B.bottom-t:B.top:B.bottom-t]];return[Re,le,...Ae]}case"bottom":{const Re=[H?fe+t/2:F?fe+t*4:fe-t*4,ve-t],le=[H?fe-t/2:F?fe+t*4:fe-t*4,ve-t],Ae=[[B.left,F||H?B.top+t:B.bottom],[B.right,F?H?B.top+t:B.bottom:B.top+t]];return[Re,le,...Ae]}case"left":{const Re=[fe+t+1,X?ve+t/2:z?ve+t*4:ve-t*4],le=[fe+t+1,X?ve-t/2:z?ve+t*4:ve-t*4];return[...[[z||X?B.right-t:B.left,B.top],[z?X?B.right-t:B.left:B.right-t,B.bottom]],Re,le]}case"right":{const Re=[fe-t,X?ve+t/2:z?ve+t*4:ve-t*4],le=[fe-t,X?ve-t/2:z?ve+t*4:ve-t*4],Ae=[[z||X?B.left+t:B.right,B.top],[z?X?B.left+t:B.right:B.left+t,B.bottom]];return[Re,le,...Ae]}default:return[]}}if(!rO([_,D],ae)){if(o&&!j)return R();if(!U&&r){const fe=f(C.clientX,C.clientY);if(fe!==null&&fe<.1)return R()}rO([_,D],re([p,m]))?!o&&r&&i.start(40,R):R()}};return h.__options={blockPointerEvents:n},h}const Fhe=S.createContext(void 0);function V6(e){return S.useContext(Fhe)}function G6(e){return e==="starting"?lce:Hn}const zhe={...x6,...NF},Bhe=S.forwardRef(function(t,n){const{render:r,className:i,finalFocus:o,...a}=t,{store:l}=Iu(),{side:c,align:f}=b6(),h=V6()!=null,p=l.useState("open"),m=l.useState("transitionStatus"),g=l.useState("popupProps"),b=l.useState("mounted"),v=l.useState("instantType"),w=l.useState("activeTriggerElement"),x=l.useState("parent"),k=l.useState("lastOpenChangeReason"),C=l.useState("rootId"),R=l.useState("floatingRootContext"),_=l.useState("floatingTreeRoot"),D=l.useState("closeDelay"),M=l.useState("activeTriggerElement"),O=x.type==="context-menu";vk({open:p,ref:l.context.popupRef,onComplete(){var V,F;p&&((F=(V=l.context).onOpenChangeComplete)==null||F.call(V,!0))}}),S.useEffect(()=>{function V(F){l.setOpen(!1,Lt(F.reason,F.domEvent))}return _.events.on("close",V),()=>{_.events.off("close",V)}},[_.events,l]);const U=l.useState("hoverEnabled"),L=l.useState("disabled");Rhe(R,{enabled:U&&!L&&!O&&x.type!=="menubar",closeDelay:D});const I={transitionStatus:m,side:c,align:f,open:p,nested:x.type==="menu",instant:v},$=wi("div",t,{state:I,ref:[n,l.context.popupRef],stateAttributesMapping:zhe,props:[g,{onKeyDown(V){h&&yfe.has(V.key)&&V.stopPropagation()}},G6(m),a,{"data-rootownerid":C}]});let B=x.type===void 0||O;return(w||x.type==="menubar"&&k!==ak)&&(B=!0),T.jsx(Yfe,{context:R,modal:O,disabled:!b,returnFocus:o===void 0?B:o,initialFocus:x.type!=="menu",restoreFocus:!0,externalTree:x.type!=="menubar"?_:void 0,previousFocusableElement:M,nextFocusableElement:x.type===void 0?l.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:x.type===void 0?l.context.beforeContentFocusGuardRef:void 0,children:$})}),Y6=S.createContext(void 0);function Hhe(){const e=S.useContext(Y6);if(e===void 0)throw new Error(co(32));return e}const Uhe=S.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t,{store:o}=Iu();return o.useState("mounted")||r?T.jsx(Y6.Provider,{value:r,children:T.jsx(Hfe,{ref:n,...i})}):null});function W6(e){return sk(19)?e:e?"true":void 0}const qhe=e=>({name:"arrow",options:e,async fn(t){var X,P;const{x:n,y:r,placement:i,rects:o,platform:a,elements:l,middlewareData:c}=t,{element:f,padding:h=0,offsetParent:p="real"}=Ls(e,t)||{};if(f==null)return{};const m=JF(h),g={x:n,y:r},b=yk(i),v=gk(b),w=await a.getDimensions(f),x=b==="y",k=x?"top":"left",C=x?"bottom":"right",R=x?"clientHeight":"clientWidth",_=o.reference[v]+o.reference[b]-g[b]-o.floating[v],D=g[b]-o.reference[b],M=p==="real"?await((X=a.getOffsetParent)==null?void 0:X.call(a,f)):l.floating;let O=l.floating[R]||o.floating[v];(!O||!await((P=a.isElement)==null?void 0:P.call(a,M)))&&(O=l.floating[R]||o.floating[v]);const U=_/2-D/2,L=O/2-w[v]/2-1,I=Math.min(m[k],L),$=Math.min(m[C],L),B=I,V=O-w[v]-$,F=O/2-w[v]/2+U,z=aE(B,F,V),j=!c.arrow&&ml(i)!=null&&F!==z&&o.reference[v]/2-(F<B?I:$)-w[v]/2<0,H=j?F<B?F-B:F-V:0;return{[b]:g[b]+H,data:{[b]:z,centerOffset:F-z-H,...j&&{alignmentOffset:H}},reset:j}}}),Vhe=(e,t)=>({...qhe(e),options:[e,t]}),Ghe={name:"hide",async fn(e){var l;const{width:t,height:n,x:r,y:i}=e.rects.reference,o=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:((l=(await Ide().fn(e)).data)==null?void 0:l.referenceHidden)||o}}}},Yhe={sideX:"left",sideY:"top"};function K6(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 iO(e,t,n){const{rects:r,placement:i}=e;return{side:K6(t,hi(i),n),align:ml(i)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Whe(e){var Ye,Je;const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:a=0,collisionBoundary:l,collisionPadding:c=5,sticky:f=!1,arrowPadding:h=5,disableAnchorTracking:p=!1,keepMounted:m=!1,floatingRootContext:g,mounted:b,collisionAvoidance:v,shiftCrossAxis:w=!1,nodeId:x,adaptiveOrigin:k,lazyFlip:C=!1,externalTree:R}=e,[_,D]=S.useState(null);!b&&_!==null&&D(null);const M=v.side||"flip",O=v.align||"flip",U=v.fallbackAxisSide||"end",L=typeof t=="function"?t:void 0,I=qe(L),$=L?I:t,B=Er(t),F=ov()==="rtl",z=_||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":F?"left":"right","inline-start":F?"right":"left"}[r],j=o==="center"?z:`${z}-${o}`;let H=c;const X=1,P=r==="bottom"?X:0,K=r==="top"?X:0,ee=r==="right"?X:0,q=r==="left"?X:0;typeof H=="number"?H={top:H+P,right:H+q,bottom:H+K,left:H+ee}:H&&(H={top:(H.top||0)+P,right:(H.right||0)+q,bottom:(H.bottom||0)+K,left:(H.left||0)+ee});const ae={boundary:l==="clipping-ancestors"?"clippingAncestors":l,padding:H},re=S.useRef(null),fe=Er(i),ve=Er(a),Ae=[Dde(et=>{const tt=iO(et,r,F),jt=typeof fe.current=="function"?fe.current(tt):fe.current,kt=typeof ve.current=="function"?ve.current(tt):ve.current;return{mainAxis:jt,crossAxis:kt,alignmentAxis:kt}},[typeof i!="function"?i:0,typeof a!="function"?a:0,F,r])],Ie=O==="none"&&M!=="shift",Y=!Ie&&(f||w||M==="shift"),W=M==="none"?null:Ode({...ae,padding:{top:H.top+X,right:H.right+X,bottom:H.bottom+X,left:H.left+X},mainAxis:!w&&M==="flip",crossAxis:O==="flip"?"alignment":!1,fallbackAxisSideDirection:U}),Q=Ie?null:Mde(et=>{const tt=Gt(et.elements.floating).documentElement;return{...ae,rootBoundary:w?{x:0,y:0,width:tt.clientWidth,height:tt.clientHeight}:void 0,mainAxis:O!=="none",crossAxis:Y,limiter:f||w?void 0:$de(jt=>{if(!re.current)return{};const{width:kt,height:Ot}=re.current.getBoundingClientRect(),zt=Yi(hi(jt.placement)),Dn=zt==="y"?kt:Ot,Tr=zt==="y"?H.left+H.right:H.top+H.bottom;return{offset:Dn/2+Tr/2}})}},[ae,f,w,H,O]);M==="shift"||O==="shift"||o==="center"?Ae.push(Q,W):Ae.push(W,Q),Ae.push(Pde({...ae,apply({elements:{floating:et},rects:{reference:tt},availableWidth:jt,availableHeight:kt}){const Ot=et.style;Ot.setProperty("--available-width",`${jt}px`),Ot.setProperty("--available-height",`${kt}px`),Ot.setProperty("--anchor-width",`${tt.width}px`),Ot.setProperty("--anchor-height",`${tt.height}px`)}}),Vhe(()=>({element:re.current||document.createElement("div"),padding:h,offsetParent:"floating"}),[h]),{name:"transformOrigin",fn(et){var Zn,Uo,ju;const{elements:tt,middlewareData:jt,placement:kt,rects:Ot,y:zt}=et,Dn=hi(kt),Tr=Yi(Dn),Vn=re.current,Kr=((Zn=jt.arrow)==null?void 0:Zn.x)||0,Nn=((Uo=jt.arrow)==null?void 0:Uo.y)||0,rt=(Vn==null?void 0:Vn.clientWidth)||0,Ut=(Vn==null?void 0:Vn.clientHeight)||0,an=Kr+rt/2,Jt=Nn+Ut/2,gn=Math.abs(((ju=jt.shift)==null?void 0:ju.y)||0),Ki=Ot.reference.height/2,Si=typeof i=="function"?i(iO(et,r,F)):i,fo=gn>Si,or={top:`${an}px calc(100% + ${Si}px)`,bottom:`${an}px ${-Si}px`,left:`calc(100% + ${Si}px) ${Jt}px`,right:`${-Si}px ${Jt}px`}[Dn],un=`${an}px ${Ot.reference.y+Ki-zt}px`;return tt.floating.style.setProperty("--transform-origin",Y&&Tr==="y"&&fo?un:or),{}}},Ghe,k),at(()=>{!b&&g&&g.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[b,g]);const pe=S.useMemo(()=>({elementResize:!p&&typeof ResizeObserver<"u",layoutShift:!p&&typeof IntersectionObserver<"u"}),[p]),{refs:oe,elements:me,x:te,y:Z,middlewareData:ie,update:J,placement:Se,context:ke,isPositioned:ge,floatingStyles:_e}=xhe({rootContext:g,placement:j,middleware:Ae,strategy:n,whileElementsMounted:m?void 0:(...et)=>Z$(...et,pe),nodeId:x,externalTree:R}),{sideX:de,sideY:Ce}=ie.adaptiveOrigin||Yhe,ye=ge?n:"fixed",Me=S.useMemo(()=>{const et=k?{position:ye,[de]:te,[Ce]:Z}:{position:ye,..._e};return ge||(et.opacity=0),et},[k,ye,de,te,Ce,Z,_e,ge]),Pe=S.useRef(null);at(()=>{if(!b)return;const et=B.current,tt=typeof et=="function"?et():et,kt=(oO(tt)?tt.current:tt)||null||null;kt!==Pe.current&&(oe.setPositionReference(kt),Pe.current=kt)},[b,oe,$,B]),S.useEffect(()=>{if(!b)return;const et=B.current;typeof et!="function"&&oO(et)&&et.current!==Pe.current&&(oe.setPositionReference(et.current),Pe.current=et.current)},[b,oe,$,B]),S.useEffect(()=>{if(m&&b&&me.domReference&&me.floating)return Z$(me.domReference,me.floating,J,pe)},[m,b,me,J,pe]);const Ke=hi(Se),Et=K6(r,Ke,F),vt=ml(Se)||"center",Le=!!((Ye=ie.hide)!=null&&Ye.referenceHidden);at(()=>{C&&b&&ge&&D(Ke)},[C,b,ge,Ke]);const Be=S.useMemo(()=>{var et,tt;return{position:"absolute",top:(et=ie.arrow)==null?void 0:et.y,left:(tt=ie.arrow)==null?void 0:tt.x}},[ie.arrow]),$e=((Je=ie.arrow)==null?void 0:Je.centerOffset)!==0;return S.useMemo(()=>({positionerStyles:Me,arrowStyles:Be,arrowRef:re,arrowUncentered:$e,side:Et,align:vt,physicalSide:Ke,anchorHidden:Le,refs:oe,context:ke,isPositioned:ge,update:J}),[Me,Be,re,$e,Et,vt,Ke,Le,oe,ke,ge,J])}function oO(e){return e!=null&&"current"in e}const Khe=S.forwardRef(function(t,n){const{cutout:r,...i}=t;let o;if(r){const a=r==null?void 0:r.getBoundingClientRect();o=`polygon(
|
|
505
|
-
0% 0%,
|
|
506
|
-
100% 0%,
|
|
507
|
-
100% 100%,
|
|
508
|
-
0% 100%,
|
|
509
|
-
0% 0%,
|
|
510
|
-
${a.left}px ${a.top}px,
|
|
511
|
-
${a.left}px ${a.bottom}px,
|
|
512
|
-
${a.right}px ${a.bottom}px,
|
|
513
|
-
${a.right}px ${a.top}px,
|
|
514
|
-
${a.left}px ${a.top}px
|
|
515
|
-
)`}return T.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...i,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:o}})}),Xhe=S.forwardRef(function(t,n){var Ie;const{anchor:r,positionMethod:i="absolute",className:o,render:a,side:l,align:c,sideOffset:f=0,alignOffset:h=0,collisionBoundary:p="clipping-ancestors",collisionPadding:m=5,arrowPadding:g=5,sticky:b=!1,disableAnchorTracking:v=!1,collisionAvoidance:w=cce,...x}=t,{store:k}=Iu(),C=Hhe(),R=hv(!0),_=k.useState("parent"),D=k.useState("floatingRootContext"),M=k.useState("floatingTreeRoot"),O=k.useState("mounted"),U=k.useState("open"),L=k.useState("modal"),I=k.useState("activeTriggerElement"),$=k.useState("transitionStatus"),B=k.useState("lastOpenChangeReason"),V=k.useState("floatingNodeId"),F=k.useState("floatingParentNodeId");let z=r,j=f,H=h,X=c,P=w;_.type==="context-menu"&&(z=r??((Ie=_.context)==null?void 0:Ie.anchor),X=X??"start",!l&&X!=="center"&&(H=t.alignOffset??2,j=t.sideOffset??-5));let K=l,ee=X;_.type==="menu"?(K=K??"inline-end",ee=ee??"start",P=t.collisionAvoidance??fce):_.type==="menubar"&&(K=K??"bottom",ee=ee??"start");const q=_.type==="context-menu",ae=Whe({anchor:z,floatingRootContext:D,positionMethod:R?"fixed":i,mounted:O,side:K,sideOffset:j,align:ee,alignOffset:H,arrowPadding:q?0:g,collisionBoundary:p,collisionPadding:m,sticky:b,nodeId:V,keepMounted:C,disableAnchorTracking:v,collisionAvoidance:P,shiftCrossAxis:q&&!("side"in P&&P.side==="flip"),externalTree:M}),re=S.useMemo(()=>{const Y={};return U||(Y.pointerEvents="none"),{role:"presentation",hidden:!O,style:{...ae.positionerStyles,...Y}}},[U,O,ae.positionerStyles]);S.useEffect(()=>{function Y(W){W.open&&(W.parentNodeId===V&&k.set("hoverEnabled",!1),W.nodeId!==V&&W.parentNodeId===k.select("floatingParentNodeId")&&k.setOpen(!1,Lt(ey)))}return M.events.on("menuopenchange",Y),()=>{M.events.off("menuopenchange",Y)}},[k,M.events,V]),S.useEffect(()=>{if(k.select("floatingParentNodeId")==null)return;function Y(W){if(W.open||W.nodeId!==k.select("floatingParentNodeId"))return;const Q=W.reason??ey;k.setOpen(!1,Lt(Q))}return M.events.on("menuopenchange",Y),()=>{M.events.off("menuopenchange",Y)}},[M.events,k]),S.useEffect(()=>{function Y(W){!U||W.nodeId!==k.select("floatingParentNodeId")||W.target&&I&&I!==W.target&&k.setOpen(!1,Lt(ey))}return M.events.on("itemhover",Y),()=>{M.events.off("itemhover",Y)}},[M.events,U,I,k]),S.useEffect(()=>{const Y={open:U,nodeId:V,parentNodeId:F,reason:k.select("lastOpenChangeReason")};M.events.emit("menuopenchange",Y)},[M.events,U,k,V,F]);const fe={open:U,side:ae.side,align:ae.align,anchorHidden:ae.anchorHidden,nested:_.type==="menu"},ve=S.useMemo(()=>({side:ae.side,align:ae.align,arrowRef:ae.arrowRef,arrowUncentered:ae.arrowUncentered,arrowStyles:ae.arrowStyles,nodeId:ae.context.nodeId}),[ae.side,ae.align,ae.arrowRef,ae.arrowUncentered,ae.arrowStyles,ae.context.nodeId]),Re=wi("div",t,{state:fe,stateAttributesMapping:x6,ref:[n,k.useStateSetter("positionerElement")],props:[re,G6($),x]}),le=O&&_.type!=="menu"&&(_.type!=="menubar"&&L&&B!==li||_.type==="menubar"&&_.context.modal);let Ae=null;return _.type==="menubar"?Ae=_.context.contentElement:_.type===void 0&&(Ae=I),T.jsxs(y6.Provider,{value:ve,children:[le&&T.jsx(Khe,{ref:_.type==="context-menu"||_.type==="nested-context-menu"?_.context.internalBackdropRef:null,inert:W6(!U),cutout:Ae}),T.jsx(Pfe,{id:V,children:T.jsx(ok,{elementsRef:k.context.itemDomElements,labelsRef:k.context.itemLabels,children:Re})})]})});function Qhe(e){const t=S.useRef(!0);t.current&&(t.current=!1,e())}let sO={},aO={},lO="";function Zhe(e){if(typeof document>"u")return!1;const t=Gt(e);return Qn(t).innerWidth-t.documentElement.clientWidth>0}function Jhe(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=Gt(e),r=n.documentElement,i=n.body,o=pl(r)?r:i,a=o.style.overflowY,l=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",o.style.overflowY="scroll";const c=o.offsetWidth;o.style.overflowY="hidden";const f=o.offsetWidth;return o.style.overflowY=a,r.style.scrollbarGutter=l,c===f}function epe(e){const t=Gt(e),n=t.documentElement,r=t.body,i=pl(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 tpe(e){var m;const t=Gt(e),n=t.documentElement,r=t.body,i=Qn(n);let o=0,a=0,l=!1;const c=Ao.create();if(UF&&(((m=i.visualViewport)==null?void 0:m.scale)??1)!==1)return()=>{};function f(){const g=i.getComputedStyle(n),b=i.getComputedStyle(r),x=(g.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";o=n.scrollTop,a=n.scrollLeft,sO={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},lO=n.style.scrollBehavior,aO={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 k=n.scrollHeight>n.clientHeight,C=n.scrollWidth>n.clientWidth,R=g.overflowY==="scroll"||b.overflowY==="scroll",_=g.overflowX==="scroll"||b.overflowX==="scroll",D=Math.max(0,i.innerWidth-r.clientWidth),M=Math.max(0,i.innerHeight-r.clientHeight),O=parseFloat(b.marginTop)+parseFloat(b.marginBottom),U=parseFloat(b.marginLeft)+parseFloat(b.marginRight),L=pl(n)?n:r;if(l=Jhe(e),l){n.style.scrollbarGutter=x,L.style.overflowY="hidden",L.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:x,overflowY:"hidden",overflowX:"hidden"}),(k||R)&&(n.style.overflowY="scroll"),(C||_)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:O||M?`calc(100dvh - ${O+M}px)`:"100dvh",width:U||D?`calc(100vw - ${U+D}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=o,r.scrollLeft=a,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function h(){Object.assign(n.style,sO),Object.assign(r.style,aO),l||(n.scrollTop=o,n.scrollLeft=a,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=lO)}function p(){h(),c.request(f)}return f(),i.addEventListener("resize",p),()=>{c.cancel(),h(),typeof i.removeEventListener=="function"&&i.removeEventListener("resize",p)}}class npe{constructor(){ce(this,"lockCount",0);ce(this,"restore",null);ce(this,"timeoutLock",Ns.create());ce(this,"timeoutUnlock",Ns.create());ce(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});ce(this,"unlock",()=>{var t;this.lockCount===0&&this.restore&&((t=this.restore)==null||t.call(this),this.restore=null)})}acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}lock(t){if(this.lockCount===0||this.restore!==null)return;const r=Gt(t).documentElement,i=Qn(r).getComputedStyle(r).overflowY;if(i==="hidden"||i==="clip"){this.restore=IF;return}const o=qF||!Zhe(t);this.restore=o?epe(t):tpe(t)}}const rpe=new npe;function ipe(e=!0,t=null){at(()=>{if(e)return rpe.acquire(t)},[e,t])}const ope=S.createContext(null);function X6(e){return S.useContext(ope)}function spe(e){const t=S.useRef(""),n=S.useCallback(i=>{i.defaultPrevented||(t.current=i.pointerType,e(i,i.pointerType))},[e]);return{onClick:S.useCallback(i=>{if(i.detail===0){e(i,"keyboard");return}"pointerType"in i?e(i,i.pointerType):e(i,t.current),t.current=""},[e]),onPointerDown:n}}function ape(e){const[t,n]=S.useState(null),r=qe((l,c)=>{e||n(c||(qF?"touch":""))}),i=S.useCallback(()=>{n(null)},[]),{onClick:o,onPointerDown:a}=spe(r);return S.useMemo(()=>({openMethod:t,reset:i,triggerProps:{onClick:o,onPointerDown:a}}),[t,i,o,a])}const lpe={...bhe,disabled:Tt(e=>e.parent.type==="menubar"&&e.parent.context.disabled||e.disabled),modal:Tt(e=>(e.parent.type===void 0||e.parent.type==="context-menu")&&(e.modal??!0)),allowMouseEnter:Tt(e=>e.allowMouseEnter),stickIfOpen:Tt(e=>e.stickIfOpen),parent:Tt(e=>e.parent),rootId:Tt(e=>e.parent.type==="menu"?e.parent.store.select("rootId"):e.parent.type!==void 0?e.parent.context.rootId:e.rootId),activeIndex:Tt(e=>e.activeIndex),isActive:Tt((e,t)=>e.activeIndex===t),hoverEnabled:Tt(e=>e.hoverEnabled),instantType:Tt(e=>e.instantType),lastOpenChangeReason:Tt(e=>e.openChangeReason),floatingTreeRoot:Tt(e=>e.parent.type==="menu"?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot),floatingNodeId:Tt(e=>e.floatingNodeId),floatingParentNodeId:Tt(e=>e.floatingParentNodeId),itemProps:Tt(e=>e.itemProps),closeDelay:Tt(e=>e.closeDelay),keyboardEventRelay:Tt(e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type==="menu")return e.parent.store.select("keyboardEventRelay")})};class Ak extends H6{constructor(n){super({...upe(),...n},{positionerRef:S.createRef(),popupRef:S.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:S.createRef(),beforeContentFocusGuardRef:S.createRef(),onOpenChangeComplete:void 0,triggerElements:new kk},lpe);ce(this,"unsubscribeParentListener",null);this.unsubscribeParentListener=this.observe("parent",r=>{var i;if((i=this.unsubscribeParentListener)==null||i.call(this),r.type==="menu"){this.unsubscribeParentListener=r.store.subscribe(()=>{this.notifyAll()}),this.context.allowMouseUpTriggerRef=r.store.context.allowMouseUpTriggerRef;return}r.type!==void 0&&(this.context.allowMouseUpTriggerRef=r.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(n,r){this.state.floatingRootContext.context.events.emit("setOpen",{open:n,eventDetails:r})}static useStore(n,r){const i=Vr(()=>new Ak(r)).current;return n??i}}function upe(){return{...yhe(),disabled:!1,modal:!0,allowMouseEnter:!1,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new wk,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Hn,keyboardEventRelay:void 0,closeDelay:0}}const cpe=S.createContext(void 0);function fpe(){return S.useContext(cpe)}const dpe=z6(function(t){const{children:n,open:r,onOpenChange:i,onOpenChangeComplete:o,defaultOpen:a=!1,disabled:l=!1,modal:c,loopFocus:f=!0,orientation:h="vertical",actionsRef:p,closeParentOnEsc:m=!1,handle:g,triggerId:b,defaultTriggerId:v=null,highlightItemOnHover:w=!0}=t,x=hv(!0),k=Iu(!0),C=X6(!0),R=fpe(),_=S.useMemo(()=>R&&k?{type:"menu",store:k.store}:C?{type:"menubar",context:C}:x&&!k?{type:"context-menu",context:x}:{type:void 0},[x,k,C,R]),D=Ak.useStore(g==null?void 0:g.store,{open:a,openProp:r,activeTriggerId:v,triggerIdProp:b,parent:_});Qhe(()=>{r===void 0&&D.state.open===!1&&a===!0&&D.update({open:!0,activeTriggerId:v})}),D.useControlledProp("openProp",r),D.useControlledProp("triggerIdProp",b),D.useContextCallback("onOpenChangeComplete",o);const M=D.useState("floatingTreeRoot"),O=C6(M),U=Bs();at(()=>{x&&!k?D.update({parent:{type:"context-menu",context:x},floatingNodeId:O,floatingParentNodeId:U}):k&&D.update({floatingNodeId:O,floatingParentNodeId:U})},[x,k,O,U,D]);const L=D.useState("open"),I=D.useState("activeTriggerElement"),$=D.useState("positionerElement"),B=D.useState("hoverEnabled"),V=D.useState("modal"),F=D.useState("disabled"),z=D.useState("lastOpenChangeReason"),j=D.useState("parent"),H=D.useState("activeIndex"),X=D.useState("payload"),P=D.useState("floatingParentNodeId"),K=S.useRef(null),ee=P!=null;let q;D.useSyncedValues({disabled:l,modal:j.type===void 0?c:void 0,rootId:Pu()});const{openMethod:ae,triggerProps:re,reset:fe}=ape(L);phe(D);const{forceUnmount:ve}=mhe(L,D,()=>{D.update({allowMouseEnter:!1,stickIfOpen:!0}),fe()}),Re=S.useRef(j.type!=="context-menu"),le=uo();S.useEffect(()=>{if(L||(K.current=null),j.type==="context-menu"){if(!L){le.clear(),Re.current=!1;return}le.start(500,()=>{Re.current=!0})}},[le,L,j.type]),ipe(L&&V&&z!==li&&ae!=="touch",$),at(()=>{!L&&!B&&D.set("hoverEnabled",!0)},[L,B,D]);const Ae=S.useRef(!0),Ie=uo(),Y=qe((Le,Be)=>{var Ot;const $e=Be.reason;if(L===Le&&Be.trigger===I&&z===$e||(Be.preventUnmountOnClose=()=>{D.set("preventUnmountingOnClose",!0)},!Le&&Be.trigger==null&&(Be.trigger=I??void 0),i==null||i(Le,Be),Be.isCanceled))return;const Ye={open:Le,nativeEvent:Be.event,reason:Be.reason,nested:ee};q==null||q.emit("openchange",Ye);const Je=Be.event;if(Le===!1&&(Je==null?void 0:Je.type)==="click"&&Je.pointerType==="touch"&&!Ae.current)return;if(!Le&&H!==null){const zt=D.context.itemDomElements.current[H];queueMicrotask(()=>{zt==null||zt.setAttribute("tabindex","-1")})}Le&&$e===vh?(Ae.current=!1,Ie.start(300,()=>{Ae.current=!0})):(Ae.current=!0,Ie.clear());const et=($e===Hh||$e===LF)&&Je.detail===0&&(Je==null?void 0:Je.isTrusted),tt=!Le&&($e===lk||$e==null),jt={open:Le,openChangeReason:$e};K.current=Be.event??null;const kt=((Ot=Be.trigger)==null?void 0:Ot.id)??null;(kt||Le)&&(jt.activeTriggerId=kt,jt.activeTriggerElement=Be.trigger??null),D.update(jt),j.type==="menubar"&&($e===vh||$e===kf||$e===li||$e===Jg||$e===ey)?D.set("instantType","group"):et||tt?D.set("instantType",et?"click":"dismiss"):D.set("instantType",void 0)}),W=S.useCallback(Le=>{const Be=Lt(Le);return Be.preventUnmountOnClose=()=>{D.set("preventUnmountingOnClose",!0)},Be},[D]),Q=S.useCallback(()=>{D.setOpen(!1,W(bce))},[D,W]);S.useImperativeHandle(p,()=>({unmount:ve,close:Q}),[ve,Q]);let pe;j.type==="context-menu"&&(pe=j.context),S.useImperativeHandle(pe==null?void 0:pe.positionerRef,()=>$,[$]),S.useImperativeHandle(pe==null?void 0:pe.actionsRef,()=>({setOpen:Y}),[Y]);const oe=whe({popupStore:D,onOpenChange:Y});q=oe.context.events,S.useEffect(()=>{const Le=({open:Be,eventDetails:$e})=>Y(Be,$e);return q.on("setOpen",Le),()=>{q==null||q.off("setOpen",Le)}},[q,Y]);const me=jde(oe,{enabled:!F,bubbles:{escapeKey:m&&j.type==="menu"},outsidePress(){var Le;return j.type!=="context-menu"||((Le=K.current)==null?void 0:Le.type)==="contextmenu"?!0:Re.current},externalTree:ee?M:void 0}),te=Ihe(oe,{role:"menu"}),Z=ov(),ie=S.useCallback(Le=>{D.select("activeIndex")!==Le&&D.set("activeIndex",Le)},[D]),J=Ohe(oe,{enabled:!F,listRef:D.context.itemDomElements,activeIndex:H,nested:j.type!==void 0,loopFocus:f,orientation:h,parentOrientation:j.type==="menubar"?j.context.orientation:void 0,rtl:Z==="rtl",disabledIndices:Cf,onNavigate:ie,openOnArrowKeyDown:j.type!=="context-menu",externalTree:ee?M:void 0,focusItemOnHover:w}),Se=S.useCallback(Le=>{D.context.typingRef.current=Le},[D]),ke=Lhe(oe,{listRef:D.context.itemLabels,activeIndex:H,resetMs:sce,onMatch:Le=>{L&&Le!==H&&D.set("activeIndex",Le)},onTypingChange:Se}),{getReferenceProps:ge,getFloatingProps:_e,getItemProps:de,getTriggerProps:Ce}=q6([me,te,J,ke]),ye=S.useMemo(()=>{const Le=Bh(ge(),{onMouseMove(){D.set("allowMouseEnter",!0)}},re);return delete Le.role,Le},[ge,D,re]),Me=S.useMemo(()=>{const Le=Ce();if(!Le)return Le;const Be=Bh(Le,re);return delete Be.role,delete Be["aria-controls"],Be},[Ce,re]),Pe=S.useMemo(()=>_e({onMouseMove(){D.set("allowMouseEnter",!0),j.type==="menu"&&D.set("hoverEnabled",!1)},onClick(){D.select("hoverEnabled")&&D.set("hoverEnabled",!1)},onKeyDown(Le){const Be=D.select("keyboardEventRelay");Be&&!Le.isPropagationStopped()&&Be(Le)}}),[_e,j.type,D]),Ke=S.useMemo(()=>de(),[de]);D.useSyncedValues({floatingRootContext:oe,activeTriggerProps:ye,inactiveTriggerProps:Me,popupProps:Pe,itemProps:Ke});const Et=S.useMemo(()=>({store:D,parent:_}),[D,_]),vt=T.jsx(v6.Provider,{value:Et,children:typeof n=="function"?n({payload:X}):n});return j.type===void 0||j.type==="context-menu"?T.jsx(Ife,{externalTree:M,children:vt}):vt});function hpe(e){const t=e.getBoundingClientRect(),n=window.getComputedStyle(e,"::before"),r=window.getComputedStyle(e,"::after");if(!(n.content!=="none"||r.content!=="none"))return t;const o=parseFloat(n.width)||0,a=parseFloat(n.height)||0,l=parseFloat(r.width)||0,c=parseFloat(r.height)||0,f=Math.max(t.width,o,l),h=Math.max(t.height,a,c),p=f-t.width,m=h-t.height;return{left:t.left-p/2,right:t.right+p/2,top:t.top-m/2,bottom:t.bottom+m/2}}function Q6(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=hk(),{ref:i,index:o}=ck(e),a=n===o,l=S.useRef(null),c=Cu(i,l);return{compositeProps:S.useMemo(()=>({tabIndex:a?0:-1,onFocus(){r(o)},onMouseMove(){const h=l.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 Z6(e){const{render:t,className:n,state:r=Hn,props:i=Cf,refs:o=Cf,metadata:a,stateAttributesMapping:l,tag:c="div",...f}=e,{compositeProps:h,compositeRef:p}=Q6({metadata:a});return wi(c,e,{state:r,ref:[...o,p],props:[h,...i,f],stateAttributesMapping:l})}function J6(e){if(pn(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid")??void 0;if(!$o(e))return J6(Lo(e))}function ppe(e){const{enabled:t=!0,mouseDownAction:n,open:r}=e,i=S.useRef(!1);return S.useMemo(()=>t?{onMouseDown:o=>{(n==="open"&&!r||n==="close"&&r)&&(i.current=!0,Gt(o.currentTarget).addEventListener("click",()=>{i.current=!1},{once:!0}))},onClick:o=>{i.current&&(i.current=!1,o.preventBaseUIHandler())}}:Hn,[t,n,r])}const Rg=2,mpe=nhe(function(t,n){const{render:r,className:i,disabled:o=!1,nativeButton:a=!0,id:l,openOnHover:c,delay:f=100,closeDelay:h=0,handle:p,payload:m,...g}=t,b=Iu(!0),v=(p==null?void 0:p.store)??(b==null?void 0:b.store);if(!v)throw new Error(co(85));const w=yp(l),x=v.useState("isTriggerActive",w),k=v.useState("floatingRootContext"),C=v.useState("isOpenedByTrigger",w),R=S.useRef(null),_=ype(),D=hk(!0),M=gl(),O=S.useMemo(()=>M??new wk,[M]),U=C6(O),L=Bs(),{registerTrigger:I,isMountedByThisTrigger:$}=hhe(w,R,v,{payload:m,closeDelay:h,parent:_,floatingTreeRoot:O,floatingNodeId:U,floatingParentNodeId:L,keyboardEventRelay:D==null?void 0:D.relayKeyboardEvent}),B=_.type==="menubar",V=v.useState("disabled"),F=o||V||B&&_.context.disabled,{getButtonProps:z,buttonRef:j}=fv({disabled:F,native:a});S.useEffect(()=>{!C&&_.type===void 0&&(v.context.allowMouseUpTriggerRef.current=!1)},[v,C,_.type]);const H=S.useRef(null),X=uo(),P=qe(me=>{if(!H.current)return;X.clear(),v.context.allowMouseUpTriggerRef.current=!1;const te=me.target;if(St(H.current,te)||St(v.select("positionerElement"),te)||te===H.current||te!=null&&J6(te)===v.select("rootId"))return;const Z=hpe(H.current);me.clientX>=Z.left-Rg&&me.clientX<=Z.right+Rg&&me.clientY>=Z.top-Rg&&me.clientY<=Z.bottom+Rg||O.events.emit("close",{domEvent:me,reason:yce})});S.useEffect(()=>{C&&v.select("lastOpenChangeReason")===li&&Gt(H.current).addEventListener("mouseup",P,{once:!0})},[C,P,v]);const K=B&&_.context.hasSubmenuOpen,q=_he(k,{enabled:(c??K)&&!F&&_.type!=="context-menu"&&(!B||K&&!$),handleClose:jhe({blockPointerEvents:!B}),mouseOnly:!0,move:!1,restMs:_.type===void 0?f:void 0,delay:{close:h},triggerElementRef:R,externalTree:O,isActiveTrigger:x}),ae=gpe(C,v.select("lastOpenChangeReason")),re=Wfe(k,{enabled:!F&&_.type!=="context-menu",event:C&&B?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:_.type===void 0?ae:!1}),fe=She(k,{enabled:!F&&K}),ve=ppe({open:C,enabled:B,mouseDownAction:"open"}),Re=q6([re,fe]),le={disabled:F,open:C},Ae=v.useState("triggerProps",$),Ie=[H,n,j,I,R],Y=[Re.getReferenceProps(),q??Hn,Ae,{"aria-haspopup":"menu",id:w,onMouseDown:me=>{if(v.select("open"))return;X.start(200,()=>{v.context.allowMouseUpTriggerRef.current=!0}),Gt(me.currentTarget).addEventListener("mouseup",P,{once:!0})}},B?{role:"menuitem"}:{},ve,g,z],W=S.useRef(null),Q=qe(me=>{Rn.flushSync(()=>{v.setOpen(!1,Lt(kf,me.nativeEvent,me.currentTarget))});const te=dfe(W.current);te==null||te.focus()}),pe=qe(me=>{var Z;const te=v.select("positionerElement");if(te&&Xc(me,te))(Z=v.context.beforeContentFocusGuardRef.current)==null||Z.focus();else{Rn.flushSync(()=>{v.setOpen(!1,Lt(kf,me.nativeEvent,me.currentTarget))});let ie=ffe(v.context.triggerFocusTargetRef.current||R.current);for(;ie!==null&&St(te,ie);){const J=ie;if(ie=bk(ie),ie===J)break}ie==null||ie.focus()}}),oe=wi("button",t,{enabled:!B,stateAttributesMapping:B$,state:le,ref:Ie,props:Y});return B?T.jsx(Z6,{tag:"button",render:r,className:i,state:le,refs:Ie,props:Y,stateAttributesMapping:B$}):C?T.jsxs(S.Fragment,{children:[T.jsx(Mf,{ref:W,onFocus:Q},`${w}-pre-focus-guard`),T.jsx(S.Fragment,{children:oe},w),T.jsx(Mf,{ref:v.context.triggerFocusTargetRef,onFocus:pe},`${w}-post-focus-guard`)]}):T.jsx(S.Fragment,{children:oe},w)});function gpe(e,t){const n=uo(),[r,i]=S.useState(!1);return at(()=>{e&&t==="trigger-hover"?(i(!0),n.start(ace,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function ype(){const e=hv(!0),t=Iu(!0),n=X6();return S.useMemo(()=>n?{type:"menubar",context:n}:e&&!t?{type:"context-menu",context:e}:{type:void 0},[e,t,n])}const ez=({children:e,...t})=>T.jsx(dpe,{...t,children:e});ez.displayName="MenuRoot";const tz=({children:e,...t})=>{const n=S.isValidElement(e),r=!!t.render;return T.jsx(mpe,{"data-slot":"menu-trigger",...!r&&{render:T.jsx("div",{tabIndex:n?-1:0}),nativeButton:!1},...t,children:e})};tz.displayName="MenuTrigger";const nz=({children:e,...t})=>T.jsx(Uhe,{"data-slot":"menu-portal",...t,children:e});nz.displayName="MenuPortal";const bpe="_positioner_12j95_1",vpe="_popup_12j95_5",xpe="_item_12j95_23",Tk={positioner:bpe,popup:vpe,item:xpe},rz=({className:e,children:t,...n})=>T.jsx(Xhe,{"data-slot":"menu-positioner",className:ze(Tk.positioner,e),sideOffset:4,collisionPadding:16,...n,children:t});rz.displayName="MenuPositioner";const iz=({className:e,children:t,...n})=>T.jsx(Bhe,{"data-slot":"menu-popup",className:ze(Tk.popup,e),...n,children:t});iz.displayName="MenuPopup";const mE=({className:e,children:t,...n})=>T.jsx($fe,{"data-slot":"menu-item",className:ze(Tk.item,e),...n,children:t});mE.displayName="MenuItem";const oz=S.createContext(void 0);function Vh(){const e=S.useContext(oz);if(e===void 0)throw new Error(co(64));return e}let wpe=(function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e})({});const gv={tabActivationDirection:e=>({[wpe.activationDirection]:e})},Spe=S.forwardRef(function(t,n){const{className:r,defaultValue:i=0,onValueChange:o,orientation:a="horizontal",render:l,value:c,...f}=t,h=ov(),p=Object.hasOwn(t,"defaultValue"),m=S.useRef([]),[g,b]=S.useState(()=>new Map),[v,w]=ik({controlled:c,default:i,name:"Tabs",state:"value"}),x=c!==void 0,[k,C]=S.useState(()=>new Map),[R,_]=S.useState("none"),D=qe((j,H)=>{o==null||o(j,H),!H.isCanceled&&(w(j),_(H.activationDirection))}),M=qe((j,H)=>{b(X=>{if(X.get(j)===H)return X;const P=new Map(X);return P.set(j,H),P})}),O=qe((j,H)=>{b(X=>{if(!X.has(j)||X.get(j)!==H)return X;const P=new Map(X);return P.delete(j),P})}),U=S.useCallback(j=>g.get(j),[g]),L=S.useCallback(j=>{for(const H of k.values())if(j===(H==null?void 0:H.value))return H==null?void 0:H.id},[k]),I=S.useCallback(j=>{if(j===void 0)return null;for(const[H,X]of k.entries())if(X!=null&&j===(X.value??X.index))return H;return null},[k]),$=S.useMemo(()=>({direction:h,getTabElementBySelectedValue:I,getTabIdByPanelValue:L,getTabPanelIdByValue:U,onValueChange:D,orientation:a,registerMountedTabPanel:M,setTabMap:C,unregisterMountedTabPanel:O,tabActivationDirection:R,value:v}),[h,I,L,U,D,a,M,C,O,R,v]),B=S.useMemo(()=>{for(const j of k.values())if(j!=null&&j.value===v)return j},[k,v]),V=S.useMemo(()=>{for(const j of k.values())if(j!=null&&!j.disabled)return j.value},[k]);at(()=>{if(x||k.size===0)return;const j=B==null?void 0:B.disabled,H=B==null&&v!==null;if(p&&j&&v===i||!j&&!H)return;const P=V??null;v!==P&&(w(P),_("none"))},[i,V,p,x,B,_,w,k,v]);const z=wi("div",t,{state:{orientation:a,tabActivationDirection:R},ref:n,props:f,stateAttributesMapping:gv});return T.jsx(oz.Provider,{value:$,children:T.jsx(ok,{elementsRef:m,children:z})})}),sz="data-composite-item-active",az=S.createContext(void 0);function lz(){const e=S.useContext(az);if(e===void 0)throw new Error(co(65));return e}const Epe=S.forwardRef(function(t,n){const{className:r,disabled:i=!1,render:o,value:a,id:l,nativeButton:c=!0,...f}=t,{value:h,getTabPanelIdByValue:p,orientation:m}=Vh(),{activateOnFocus:g,highlightedTabIndex:b,onTabActivation:v,setHighlightedTabIndex:w,tabsListElement:x}=lz(),k=yp(l),C=S.useMemo(()=>({disabled:i,id:k,value:a}),[i,k,a]),{compositeProps:R,compositeRef:_,index:D}=Q6({metadata:C}),M=a===h,O=S.useRef(!1);at(()=>{if(O.current){O.current=!1;return}if(!(M&&D>-1&&b!==D))return;const X=x;if(X!=null){const P=Fi(Gt(X));if(P&&St(X,P))return}i||w(D)},[M,D,b,w,i,x]);const{getButtonProps:U,buttonRef:L}=fv({disabled:i,native:c,focusableWhenDisabled:!0}),I=p(a),$=S.useRef(!1),B=S.useRef(!1);function V(X){M||i||v(a,Lt(tb,X.nativeEvent,void 0,{activationDirection:"none"}))}function F(X){M||(D>-1&&!i&&w(D),!i&&g&&(!$.current||$.current&&B.current)&&v(a,Lt(tb,X.nativeEvent,void 0,{activationDirection:"none"})))}function z(X){if(M||i)return;$.current=!0;function P(){$.current=!1,B.current=!1}(!X.button||X.button===0)&&(B.current=!0,Gt(X.currentTarget).addEventListener("pointerup",P,{once:!0}))}return wi("button",t,{state:{disabled:i,active:M,orientation:m},ref:[n,L,_],props:[R,{role:"tab","aria-controls":I,"aria-selected":M,id:k,onClick:V,onFocus:F,onPointerDown:z,[sz]:M?"":void 0,onKeyDownCapture(){O.current=!0}},f,U]})});function uO(e){const t=Gr(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;return(Tf(n)!==o||Tf(r)!==a)&&(n=o,r=a),{width:n,height:r}}const Cpe='!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 kc=(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 kpe=S.createContext(void 0),Rpe={disableStyleElements:!1};function Ape(){return S.useContext(kpe)??Rpe}const Tpe={...gv,activeTabPosition:()=>null,activeTabSize:()=>null},_pe=S.forwardRef(function(t,n){const{className:r,render:i,renderBeforeHydration:o=!1,...a}=t,{nonce:l}=Ape(),{getTabElementBySelectedValue:c,orientation:f,tabActivationDirection:h,value:p}=Vh(),{tabsListElement:m}=lz(),[g,b]=S.useState(!1),{value:v}=Vh();sv(()=>b(!0));const w=che();S.useEffect(()=>{if(p!=null&&m!=null&&typeof ResizeObserver<"u"){const V=new ResizeObserver(w);return V.observe(m),()=>{V.disconnect()}}},[p,m,w]);let x=0,k=0,C=0,R=0,_=0,D=0,M=!1;if(p!=null&&m!=null){const V=c(p);if(M=!0,V!=null){const{width:F,height:z}=uO(V),{width:j,height:H}=uO(m),X=V.getBoundingClientRect(),P=m.getBoundingClientRect(),K=j>0?P.width/j:1,ee=H>0?P.height/H:1;if(Math.abs(K)>Number.EPSILON&&Math.abs(ee)>Number.EPSILON){const ae=X.left-P.left,re=X.top-P.top;x=ae/K+m.scrollLeft-m.clientLeft,C=re/ee+m.scrollTop-m.clientTop}else x=V.offsetLeft,C=V.offsetTop;_=F,D=z,k=m.scrollWidth-x-_,R=m.scrollHeight-C-D}}const O=S.useMemo(()=>M?{left:x,right:k,top:C,bottom:R}:null,[x,k,C,R,M]),U=S.useMemo(()=>M?{width:_,height:D}:null,[_,D,M]),L=S.useMemo(()=>{if(M)return{[kc.activeTabLeft]:`${x}px`,[kc.activeTabRight]:`${k}px`,[kc.activeTabTop]:`${C}px`,[kc.activeTabBottom]:`${R}px`,[kc.activeTabWidth]:`${_}px`,[kc.activeTabHeight]:`${D}px`}},[x,k,C,R,_,D,M]),I=M&&_>0&&D>0,B=wi("span",t,{state:{orientation:f,activeTabPosition:O,activeTabSize:U,tabActivationDirection:h},ref:n,props:[{role:"presentation",style:L,hidden:!I},a,{suppressHydrationWarning:!0}],stateAttributesMapping:Tpe});return v==null?null:T.jsxs(S.Fragment,{children:[B,!g&&o&&T.jsx("script",{nonce:l,dangerouslySetInnerHTML:{__html:Cpe},suppressHydrationWarning:!0})]})});let Dpe=(function(e){return e.index="data-index",e.activationDirection="data-activation-direction",e.orientation="data-orientation",e.hidden="data-hidden",e})({});const Mpe={...gv,...NF},$pe=S.forwardRef(function(t,n){const{className:r,value:i,render:o,keepMounted:a=!1,...l}=t,{value:c,getTabIdByPanelValue:f,orientation:h,tabActivationDirection:p,registerMountedTabPanel:m,unregisterMountedTabPanel:g}=Vh(),b=yp(),v=S.useMemo(()=>({id:b,value:i}),[b,i]),{ref:w,index:x}=ck({metadata:v}),k=i===c,{mounted:C,transitionStatus:R,setMounted:_}=jF(k),D=!C,M=f(i),O={hidden:D,orientation:h,tabActivationDirection:p,transitionStatus:R},U=S.useRef(null),L=wi("div",t,{state:O,ref:[n,w,U],props:[{"aria-labelledby":M,hidden:D,id:b,role:"tabpanel",tabIndex:k?0:-1,inert:W6(!k),[Dpe.index]:x},l],stateAttributesMapping:Mpe});return vk({open:k,ref:U,onComplete(){k||_(!1)}}),at(()=>{if(!(D&&!a)&&b!=null)return m(i,b),()=>{g(i,b)}},[D,a,i,b,m,g]),a||C?L:null}),Ope=[];function Ppe(e){const{itemSizes:t,cols:n=1,loopFocus:r=!0,dense:i=!1,orientation:o="both",direction:a,highlightedIndex:l,onHighlightedIndexChange:c,rootRef:f,enableHomeAndEndKeys:h=!1,stopEventPropagation:p=!1,disabledIndices:m,modifierKeys:g=Ope}=e,[b,v]=S.useState(0),w=n>1,x=S.useRef(null),k=Cu(x,f),C=S.useRef([]),R=S.useRef(!1),_=l??b,D=qe((U,L=!1)=>{if((c??v)(U),L){const I=C.current[U];j$(x.current,I,a,o)}}),M=qe(U=>{if(U.size===0||R.current)return;R.current=!0;const L=Array.from(U.keys()),I=L.find(B=>B==null?void 0:B.hasAttribute(sz))??null,$=I?L.indexOf(I):-1;$!==-1&&D($),j$(x.current,I,a,o)}),O=S.useMemo(()=>({"aria-orientation":o==="both"?void 0:o,ref:k,onFocus(U){!x.current||!N$(U.target)||U.target.setSelectionRange(0,U.target.value.length??0)},onKeyDown(U){const L=h?gfe:g6;if(!L.has(U.key)||Ipe(U,g)||!x.current)return;const $=a==="rtl",B=$?qh:Zc,V={horizontal:B,vertical:Xl,both:B}[o],F=$?Zc:qh,z={horizontal:F,vertical:Qc,both:F}[o];if(N$(U.target)&&!Ace(U.target)){const q=U.target.selectionStart,ae=U.target.selectionEnd,re=U.target.value??"";if(q==null||U.shiftKey||q!==ae||U.key!==z&&q<re.length||U.key!==V&&q>0)return}let j=_;const H=ty(C,m),X=uE(C,m);if(w){const q=t||Array.from({length:C.current.length},()=>({width:1,height:1})),ae=t6(q,n,i),re=ae.findIndex(ve=>ve!=null&&!Ja(C,ve,m)),fe=ae.reduce((ve,Re,le)=>Re!=null&&!Ja(C,Re,m)?le:ve,-1);j=ae[e6({current:ae.map(ve=>ve?C.current[ve]:null)},{event:U,orientation:o,loopFocus:r,cols:n,disabledIndices:r6([...m||C.current.map((ve,Re)=>Ja(C,Re)?Re:void 0),void 0],ae),minIndex:re,maxIndex:fe,prevIndex:n6(_>X?H:_,q,ae,n,U.key===Xl?"bl":U.key===Zc?"tr":"tl"),rtl:$})]}const P={horizontal:[B],vertical:[Xl],both:[B,Xl]}[o],K={horizontal:[F],vertical:[Qc],both:[F,Qc]}[o],ee=w?L:{horizontal:h?pfe:p6,vertical:h?mfe:m6,both:L}[o];h&&(U.key===xp?j=H:U.key===wp&&(j=X)),j===_&&(P.includes(U.key)||K.includes(U.key))&&(r&&j===X&&P.includes(U.key)?j=H:r&&j===H&&K.includes(U.key)?j=X:j=rr(C,{startingIndex:j,decrement:K.includes(U.key),disabledIndices:m})),j!==_&&!Kc(C,j)&&(p&&U.stopPropagation(),ee.has(U.key)&&U.preventDefault(),D(j,!0),queueMicrotask(()=>{var q;(q=C.current[j])==null||q.focus()}))}}),[n,i,a,m,C,h,_,w,t,r,k,g,D,o,p]);return S.useMemo(()=>({props:O,highlightedIndex:_,onHighlightedIndexChange:D,elementsRef:C,disabledIndices:m,onMapChange:M,relayKeyboardEvent:O.onKeyDown}),[O,_,D,C,m,M])}function Ipe(e,t){for(const n of Sfe.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function uz(e){const{render:t,className:n,refs:r=Cf,props:i=Cf,state:o=Hn,stateAttributesMapping:a,highlightedIndex:l,onHighlightedIndexChange:c,orientation:f,dense:h,itemSizes:p,loopFocus:m,cols:g,enableHomeAndEndKeys:b,onMapChange:v,stopEventPropagation:w=!0,rootRef:x,disabledIndices:k,modifierKeys:C,highlightItemOnHover:R=!1,tag:_="div",...D}=e,M=ov(),{props:O,highlightedIndex:U,onHighlightedIndexChange:L,elementsRef:I,onMapChange:$,relayKeyboardEvent:B}=Ppe({itemSizes:p,cols:g,loopFocus:m,dense:h,orientation:f,highlightedIndex:l,onHighlightedIndexChange:c,rootRef:x,stopEventPropagation:w,enableHomeAndEndKeys:b,direction:M,disabledIndices:k,modifierKeys:C}),V=wi(_,e,{state:o,ref:r,props:[O,...i,D],stateAttributesMapping:a}),F=S.useMemo(()=>({highlightedIndex:U,onHighlightedIndexChange:L,highlightItemOnHover:R,relayKeyboardEvent:B}),[U,L,R,B]);return T.jsx(zF.Provider,{value:F,children:T.jsx(ok,{elementsRef:I,onMapChange:z=>{v==null||v(z),$(z)},children:V})})}const Lpe=S.forwardRef(function(t,n){const{activateOnFocus:r=!1,className:i,loopFocus:o=!0,render:a,...l}=t,{getTabElementBySelectedValue:c,onValueChange:f,orientation:h,value:p,setTabMap:m,tabActivationDirection:g}=Vh(),[b,v]=S.useState(0),[w,x]=S.useState(null),k=Npe(p,h,w,c),C=qe((M,O)=>{if(M!==p){const U=k(M);O.activationDirection=U,f(M,O)}}),R={orientation:h,tabActivationDirection:g},_={"aria-orientation":h==="vertical"?"vertical":void 0,role:"tablist"},D=S.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:b,onTabActivation:C,setHighlightedTabIndex:v,tabsListElement:w,value:p}),[r,b,C,v,w,p]);return T.jsx(az.Provider,{value:D,children:T.jsx(uz,{render:a,className:i,state:R,refs:[n,x],props:[_,l],stateAttributesMapping:gv,highlightedIndex:b,enableHomeAndEndKeys:!0,loopFocus:o,orientation:h,onHighlightedIndexChange:v,onMapChange:m,disabledIndices:Cf})})});function cO(e,t){const{left:n,top:r}=e.getBoundingClientRect(),{left:i,top:o}=t.getBoundingClientRect(),a=n-i,l=r-o;return{left:a,top:l}}function Npe(e,t,n,r){const[i,o]=S.useState(null);return at(()=>{if(e==null||n==null){o(null);return}const a=r(e);if(a==null){o(null);return}const{left:l,top:c}=cO(a,n);o(t==="horizontal"?l:c)},[t,r,n,e]),S.useCallback(a=>{if(a===e)return"none";if(a==null)return o(null),"none";if(a!=null&&n!=null){const l=r(a);if(l!=null){const{left:c,top:f}=cO(l,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 cz=({children:e,...t})=>T.jsx(Spe,{"data-slot":"tabs-root",render:T.jsx(Qe,{}),...t,children:e});cz.displayName="TabsRoot";const jpe="_tab_4eh43_3",yv={"tabs-list":"_tabs-list_4eh43_3",tab:jpe,"tabs-indicator":"_tabs-indicator_4eh43_65","tabs-panel":"_tabs-panel_4eh43_86"},fz=({size:e="md",ghost:t,fullwidth:n,className:r,children:i,...o})=>T.jsx(Lpe,{"data-slot":"tabs-list","data-size":e,"data-ghost":t||void 0,render:T.jsx(ot,{gap:4,ay:"center",fullwidth:n}),className:ze(yv["tabs-list"],r),...o,children:i});fz.displayName="TabsList";const dz=({className:e,children:t,...n})=>T.jsx(Epe,{"data-slot":"tabs-tab",className:ze(yv.tab,e),...n,children:t});dz.displayName="TabsTab";const hz=({className:e,...t})=>T.jsx(_pe,{"data-slot":"tabs-indicator",className:ze(yv["tabs-indicator"],e),...t});hz.displayName="TabsIndicator";const pz=({className:e,children:t,...n})=>T.jsx($pe,{"data-slot":"tabs-panel",render:T.jsx(Qe,{ay:"center",ax:"center",fullwidth:!0}),className:ze(yv["tabs-panel"],e),tabIndex:-1,...n,children:t});pz.displayName="TabsPanel";const _k=({items:e,defaultValue:t,value:n,onValueChange:r,keepMounted:i,size:o,ghost:a,fullwidth:l,RootProps:c,ListProps:f,TabProps:h,IndicatorProps:p,PanelProps:m,ContainerProps:g})=>T.jsxs(cz,{defaultValue:t||e[0].value,value:n,onValueChange:r,...c,children:[T.jsxs(fz,{size:o,ghost:a,fullwidth:l,...f,children:[e.map(b=>T.jsx(dz,{value:b.value,...h,children:b.label},b.value)),T.jsx(hz,{...p})]}),T.jsx(GE,{"data-slot":"tabs-container",...g,children:e.map(b=>T.jsx(pz,{value:b.value,keepMounted:i,...m,children:b.render},b.value))})]});_k.displayName="Tabs";const mz=S.createContext(void 0);function Fpe(e=!0){const t=S.useContext(mz);if(t===void 0&&!e)throw new Error(co(7));return t}let zpe=(function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e.multiple="data-multiple",e})({});const fO={multiple(e){return e?{[zpe.multiple]:""}:null}},Bpe=S.forwardRef(function(t,n){const{defaultValue:r,disabled:i=!1,loopFocus:o=!0,onValueChange:a,orientation:l="horizontal",multiple:c=!1,value:f,className:h,render:p,...m}=t,g=V6(),b=S.useMemo(()=>{if(f===void 0)return r??[]},[f,r]),v=S.useMemo(()=>f!==void 0||r!==void 0,[f,r]),w=((g==null?void 0:g.disabled)??!1)||i,[x,k]=ik({controlled:f,default:b,name:"ToggleGroup",state:"value"}),C=qe((O,U,L)=>{let I;if(c?(I=x.slice(),U?I.push(O):I.splice(x.indexOf(O),1)):I=U?[O]:[],Array.isArray(I)){if(a==null||a(I,L),L.isCanceled)return;k(I)}}),R={disabled:w,multiple:c,orientation:l},_=S.useMemo(()=>({disabled:w,orientation:l,setGroupValue:C,value:x,isValueInitialized:v}),[w,l,C,x,v]),D={role:"group"},M=wi("div",t,{enabled:!!g,state:R,ref:n,props:[D,m],stateAttributesMapping:fO});return T.jsx(mz.Provider,{value:_,children:g?M:T.jsx(uz,{render:p,className:h,state:R,refs:[n],props:[D,m],stateAttributesMapping:fO,loopFocus:o,enableHomeAndEndKeys:!0})})}),Hpe=(e,t,n)=>{const r=S.useRef(null),i=S.useRef(new Map),o=S.useCallback(()=>{const a=(e??t)[0],l=a?i.current.get(String(a)):null,c=r.current;if(l&&c){const f=n==="vertical",h=l.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 S.useEffect(()=>{o();const a=r.current,l=(e??t)[0],c=l?i.current.get(String(l)):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}},lw={"toggle-group-panel":"_toggle-group-panel_al39a_1","toggle-group-indicator":"_toggle-group-indicator_al39a_33","toggle-group-button":"_toggle-group-button_al39a_59"},tf=S.forwardRef(function(t,n){const{className:r,defaultPressed:i=!1,disabled:o=!1,form:a,onPressedChange:l,pressed:c,render:f,type:h,value:p,nativeButton:m=!0,...g}=t,b=yp(p||void 0),v=Fpe(),w=(v==null?void 0:v.value)??[],x=v?void 0:i,k=(o||(v==null?void 0:v.disabled))??!1,[C,R]=ik({controlled:v?b!==void 0&&w.indexOf(b)>-1:c,default:x,name:"Toggle",state:"pressed"}),_=qe(($,B)=>{var V;b&&((V=v==null?void 0:v.setGroupValue)==null||V.call(v,b,$,B)),l==null||l($,B)}),{getButtonProps:D,buttonRef:M}=fv({disabled:k,native:m}),O={disabled:k,pressed:C},U=[M,n],L=[{"aria-pressed":C,onClick($){const B=!C,V=Lt(tb,$.nativeEvent);_(B,V),!V.isCanceled&&R(B)}},g,D],I=wi("button",t,{enabled:!v,state:O,ref:U,props:L});return v?T.jsx(Z6,{tag:"button",render:f,className:r,state:O,refs:U,props:L}):I}),Dk=({size:e="md",ghost:t,orientation:n,value:r,defaultValue:i,onValueChange:o,children:a,...l})=>{const[c,f]=S.useState(i?[...i]:[]),{panelRef:h,buttonsRef:p}=Hpe(r,c,n),m=b=>{f(b),o==null||o(b)},g=S.Children.map(a,b=>{if(S.isValidElement(b)){const v=b.props.value,w=b.props.className||"";return S.cloneElement(b,{className:`${lw["toggle-group-button"]} ${w}`.trim(),ref:x=>{x&&v&&p.current.set(v,x)}})}return b});return T.jsxs(Bpe,{ref:h,value:r,defaultValue:i,onValueChange:m,className:lw["toggle-group-panel"],"data-size":e,"data-ghost":t||void 0,"data-orientation":n,render:n==="vertical"?T.jsx(Qe,{}):T.jsx(ot,{}),...l,children:[T.jsx("div",{"data-slot":"toggle-group-indicator",className:lw["toggle-group-indicator"]}),g]})};Dk.displayName="ToggleGroup";function Upe(e,t){const n=getComputedStyle(e),r=parseFloat(n.fontSize);return t*r}function qpe(e,t){const n=getComputedStyle(e.ownerDocument.body),r=parseFloat(n.fontSize);return t*r}function Vpe(e){return e/100*window.innerHeight}function Gpe(e){return e/100*window.innerWidth}function Ype(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 Ag({groupSize:e,panelElement:t,styleProp:n}){let r;const[i,o]=Ype(n);switch(o){case"%":{r=i/100*e;break}case"px":{r=i;break}case"rem":{r=qpe(t,i);break}case"em":{r=Upe(t,i);break}case"vh":{r=Vpe(i);break}case"vw":{r=Gpe(i);break}}return r}function so(e){return parseFloat(e.toFixed(3))}function $f({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 gE(e){const{panels:t}=e,n=$f({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=Ag({groupSize:n,panelElement:i,styleProp:o.collapsedSize});a=so(h/n*100)}let l;if(o.defaultSize!==void 0){const h=Ag({groupSize:n,panelElement:i,styleProp:o.defaultSize});l=so(h/n*100)}let c=0;if(o.minSize!==void 0){const h=Ag({groupSize:n,panelElement:i,styleProp:o.minSize});c=so(h/n*100)}let f=100;if(o.maxSize!==void 0){const h=Ag({groupSize:n,panelElement:i,styleProp:o.maxSize});f=so(h/n*100)}return{collapsedSize:a,collapsible:o.collapsible===!0,defaultSize:l,disabled:o.disabled,minSize:c,maxSize:f,panelId:r.id}})}function Zt(e,t="Assertion error"){if(!e)throw Error(t)}function yE(e,t){return Array.from(t).sort(e==="horizontal"?Wpe:Kpe)}function Wpe(e,t){const n=e.element.offsetLeft-t.element.offsetLeft;return n!==0?n:e.element.offsetWidth-t.element.offsetWidth}function Kpe(e,t){const n=e.element.offsetTop-t.element.offsetTop;return n!==0?n:e.element.offsetHeight-t.element.offsetHeight}function gz(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function yz(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 Xpe({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:l,y:c}=yz(r,a),f=e==="horizontal"?l:c;f<o&&(o=f,i=a)}return Zt(i,"No rect found"),i}let Tg;function Qpe(){return Tg===void 0&&(typeof matchMedia=="function"?Tg=!!matchMedia("(pointer:coarse)").matches:Tg=!1),Tg}function bz(e){const{element:t,orientation:n,panels:r,separators:i}=e,o=yE(n,Array.from(t.children).filter(gz).map(b=>({element:b}))).map(({element:b})=>b),a=[];let l=!1,c=!1,f=-1,h=-1,p=0,m,g=[];{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 w=r.find(x=>x.element===v);if(w){if(m){const x=m.element.getBoundingClientRect(),k=v.getBoundingClientRect();let C;if(c){const R=n==="horizontal"?new DOMRect(x.right,x.top,0,x.height):new DOMRect(x.left,x.bottom,x.width,0),_=n==="horizontal"?new DOMRect(k.left,k.top,0,k.height):new DOMRect(k.left,k.top,k.width,0);switch(g.length){case 0:{C=[R,_];break}case 1:{const D=g[0],M=Xpe({orientation:n,rects:[x,k],targetRect:D.element.getBoundingClientRect()});C=[D,M===x?_:R];break}default:{C=g;break}}}else g.length?C=g:C=[n==="horizontal"?new DOMRect(x.right,k.top,k.left-x.right,k.height):new DOMRect(k.left,x.bottom,k.width,k.top-x.bottom)];for(const R of C){let _="width"in R?R:R.element.getBoundingClientRect();const D=Qpe()?e.resizeTargetMinimumSize.coarse:e.resizeTargetMinimumSize.fine;if(_.width<D){const O=D-_.width;_=new DOMRect(_.x-O/2,_.y,_.width+O,_.height)}if(_.height<D){const O=D-_.height;_=new DOMRect(_.x,_.y-O/2,_.width,_.height+O)}const M=b<=f||b>h;!l&&!M&&a.push({group:e,groupSize:$f({group:e}),panels:[m,w],separator:"width"in R?void 0:R,rect:_}),l=!1}}c=!1,m=w,g=[]}}else if(v.hasAttribute("data-separator")){v.ariaDisabled!==null&&(l=!0);const w=i.find(x=>x.element===v);w?g.push(w):(m=void 0,g=[])}else c=!0}return a}var Ia;class Zpe{constructor(){Ve(this,Ia,{})}addListener(t,n){const r=ne(this,Ia)[t];return r===void 0?ne(this,Ia)[t]=[n]:r.includes(n)||r.push(n),()=>{this.removeListener(t,n)}}emit(t,n){const r=ne(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 l=0;l<a.length;l++){const c=a[l];try{c.call(null,n)}catch(f){o===null&&(i=!0,o=f)}}if(i)throw o}}removeAllListeners(){je(this,Ia,{})}removeListener(t,n){const r=ne(this,Ia)[t];if(r!==void 0){const i=r.indexOf(n);i>=0&&r.splice(i,1)}}}Ia=new WeakMap;function wr(e,t,n=0){return Math.abs(so(e)-so(t))<=n}let Pi={cursorFlags:0,interactionState:{state:"inactive"},mountedGroups:new Map};const _s=new Zpe;function kr(){return Pi}function Rr(e){const t=typeof e=="function"?e(Pi):e;if(Pi===t)return Pi;const n=Pi;return Pi={...Pi,...t},t.cursorFlags!==void 0&&_s.emit("cursorFlagsChange",Pi.cursorFlags),t.interactionState!==void 0&&_s.emit("interactionStateChange",Pi.interactionState),t.mountedGroups!==void 0&&(Pi.mountedGroups.forEach((r,i)=>{r.derivedPanelConstraints.forEach(o=>{if(o.collapsible){const{layout:a}=n.mountedGroups.get(i)??{};if(a){const l=wr(o.collapsedSize,r.layout[o.panelId]),c=wr(o.collapsedSize,a[o.panelId]);l&&!c&&(i.inMemoryLastExpandedPanelSizes[o.panelId]=a[o.panelId])}}})}),_s.emit("mountedGroupsChange",Pi.mountedGroups)),Pi}function Jpe(e,t,n){let r,i={x:1/0,y:1/0};for(const o of t){const a=yz(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 eme(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function tme(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:pO(e),b:pO(t)};let r;for(;n.a.at(-1)===n.b.at(-1);)r=n.a.pop(),n.b.pop();Zt(r,"Stacking order can only be calculated for elements with a common ancestor");const i={a:hO(dO(n.a)),b:hO(dO(n.b))};if(i.a===i.b){const o=r.childNodes,a={a:n.a.at(-1),b:n.b.at(-1)};let l=o.length;for(;l--;){const c=o[l];if(c===a.a)return 1;if(c===a.b)return-1}}return Math.sign(i.a-i.b)}const nme=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function rme(e){const t=getComputedStyle(vz(e)??e).display;return t==="flex"||t==="inline-flex"}function ime(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||rme(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"||nme.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function dO(e){let t=e.length;for(;t--;){const n=e[t];if(Zt(n,"Missing node"),ime(n))return n}return null}function hO(e){return e&&Number(getComputedStyle(e).zIndex)||0}function pO(e){const t=[];for(;e;)t.push(e),e=vz(e);return t}function vz(e){const{parentNode:t}=e;return eme(t)?t.host:t}function ome(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 sme({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!gz(n)||n.contains(e)||e.contains(n))return!0;if(tme(n,e)>0){let r=n;for(;r;){if(r.contains(e))return!0;if(ome(r.getBoundingClientRect(),t))return!1;r=r.parentElement}}return!0}function Mk(e,t){const n=[];return t.forEach((r,i)=>{if(i.disabled)return;const o=bz(i),a=Jpe(i.orientation,o,{x:e.clientX,y:e.clientY});a&&a.distance.x<=0&&a.distance.y<=0&&sme({groupElement:i.element,hitRegion:a.hitRegion.rect,pointerEventTarget:e.target})&&n.push(a.hitRegion)}),n}function ame(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 So(e,t){return wr(e,t)?0:e>t?1:-1}function Fc({overrideDisabledPanels:e,panelConstraints:t,prevSize:n,size:r}){const{collapsedSize:i=0,collapsible:o,disabled:a,maxSize:l=100,minSize:c=0}=t;if(a&&!e)return n;if(So(r,c)<0)if(o){const f=(i+c)/2;So(r,f)<0?r=i:r=c}else r=c;return r=Math.min(l,r),r=so(r),r}function Gh({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:o}){if(wr(e,0))return t;const a=o==="imperative-api",l=Object.values(t),c=Object.values(i),f=[...l],[h,p]=r;Zt(h!=null,"Invalid first pivot index"),Zt(p!=null,"Invalid second pivot index");let m=0;switch(o){case"keyboard":{{const v=e<0?p:h,w=n[v];Zt(w,`Panel constraints not found for index ${v}`);const{collapsedSize:x=0,collapsible:k,minSize:C=0}=w;if(k){const R=l[v];if(Zt(R!=null,`Previous layout not found for panel index ${v}`),wr(R,x)){const _=C-R;So(_,Math.abs(e))>0&&(e=e<0?0-_:_)}}}{const v=e<0?h:p,w=n[v];Zt(w,`No panel constraints found for index ${v}`);const{collapsedSize:x=0,collapsible:k,minSize:C=0}=w;if(k){const R=l[v];if(Zt(R!=null,`Previous layout not found for panel index ${v}`),wr(R,C)){const _=R-x;So(_,Math.abs(e))>0&&(e=e<0?0-_:_)}}}break}default:{const v=e<0?p:h,w=n[v];Zt(w,`Panel constraints not found for index ${v}`);const x=l[v],{collapsible:k,collapsedSize:C,minSize:R}=w;if(k&&So(x,R)<0)if(e>0){const _=R-C,D=_/2,M=x+e;So(M,R)<0&&(e=So(e,D)<=0?0:_)}else{const _=R-C,D=100-_/2,M=x-e;So(M,R)<0&&(e=So(100+e,D)>0?0:-_)}break}}{const v=e<0?1:-1;let w=e<0?p:h,x=0;for(;;){const C=l[w];Zt(C!=null,`Previous layout not found for panel index ${w}`);const R=Fc({overrideDisabledPanels:a,panelConstraints:n[w],prevSize:C,size:100})-C;if(x+=R,w+=v,w<0||w>=n.length)break}const k=Math.min(Math.abs(e),Math.abs(x));e=e<0?0-k:k}{let v=e<0?h:p;for(;v>=0&&v<n.length;){const w=Math.abs(e)-Math.abs(m),x=l[v];Zt(x!=null,`Previous layout not found for panel index ${v}`);const k=x-w,C=Fc({overrideDisabledPanels:a,panelConstraints:n[v],prevSize:x,size:k});if(!wr(x,C)&&(m+=x-C,f[v]=C,m.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?v--:v++}}if(ame(c,f))return i;{const v=e<0?p:h,w=l[v];Zt(w!=null,`Previous layout not found for panel index ${v}`);const x=w+m,k=Fc({overrideDisabledPanels:a,panelConstraints:n[v],prevSize:w,size:x});if(f[v]=k,!wr(k,x)){let C=x-k,R=e<0?p:h;for(;R>=0&&R<n.length;){const _=f[R];Zt(_!=null,`Previous layout not found for panel index ${R}`);const D=_+C,M=Fc({overrideDisabledPanels:a,panelConstraints:n[R],prevSize:_,size:D});if(wr(_,M)||(C-=M-_,f[R]=M),wr(C,0))break;e>0?R--:R++}}}const g=Object.values(f).reduce((v,w)=>w+v,0);if(!wr(g,100,.1))return i;const b=Object.keys(i);return f.reduce((v,w,x)=>(v[b[x]]=w,v),{})}function Ru(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(t[n]===void 0||So(e[n],t[n])!==0)return!1;return!0}function Au({layout:e,panelConstraints:t}){const n=Object.values(e),r=[...n],i=r.reduce((l,c)=>l+c,0);if(r.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${r.map(l=>`${l}%`).join(", ")}`);if(!wr(i,100)&&r.length>0)for(let l=0;l<t.length;l++){const c=r[l];Zt(c!=null,`No layout data found for index ${l}`);const f=100/i*c;r[l]=f}let o=0;for(let l=0;l<t.length;l++){const c=n[l];Zt(c!=null,`No layout data found for index ${l}`);const f=r[l];Zt(f!=null,`No layout data found for index ${l}`);const h=Fc({overrideDisabledPanels:!0,panelConstraints:t[l],prevSize:c,size:f});f!=h&&(o+=f-h,r[l]=h)}if(!wr(o,0))for(let l=0;l<t.length;l++){const c=r[l];Zt(c!=null,`No layout data found for index ${l}`);const f=c+o,h=Fc({overrideDisabledPanels:!0,panelConstraints:t[l],prevSize:c,size:f});if(c!==h&&(o-=h-c,r[l]=h,wr(o,0)))break}const a=Object.keys(e);return r.reduce((l,c,f)=>(l[a[f]]=c,l),{})}function xz({groupId:e,panelId:t}){const n=()=>{const{mountedGroups:l}=kr();for(const[c,{defaultLayoutDeferred:f,derivedPanelConstraints:h,layout:p,separatorToPanels:m}]of l)if(c.id===e)return{defaultLayoutDeferred:f,derivedPanelConstraints:h,group:c,layout:p,separatorToPanels:m};throw Error(`Group ${e} not found`)},r=()=>{const l=n().derivedPanelConstraints.find(c=>c.panelId===t);if(l!==void 0)return l;throw Error(`Panel constraints not found for Panel ${t}`)},i=()=>{const l=n().group.panels.find(c=>c.id===t);if(l!==void 0)return l;throw Error(`Layout not found for Panel ${t}`)},o=()=>{const l=n().layout[t];if(l!==void 0)return l;throw Error(`Layout not found for Panel ${t}`)},a=l=>{const c=o();if(l===c)return;const{defaultLayoutDeferred:f,derivedPanelConstraints:h,group:p,layout:m,separatorToPanels:g}=n(),b=p.panels.findIndex(k=>k.id===t),v=b===p.panels.length-1,w=Gh({delta:v?c-l:l-c,initialLayout:m,panelConstraints:h,pivotIndices:v?[b-1,b]:[b,b+1],prevLayout:m,trigger:"imperative-api"}),x=Au({layout:w,panelConstraints:h});Ru(m,x)||Rr(k=>({mountedGroups:new Map(k.mountedGroups).set(p,{defaultLayoutDeferred:f,derivedPanelConstraints:h,layout:x,separatorToPanels:g})}))};return{collapse:()=>{const{collapsible:l,collapsedSize:c}=r(),{mutableValues:f}=i(),h=o();l&&h!==c&&(f.expandToSize=h,a(c))},expand:()=>{const{collapsible:l,collapsedSize:c,minSize:f}=r(),{mutableValues:h}=i(),p=o();if(l&&p===c){let m=h.expandToSize??f;m===0&&(m=1),a(m)}},getSize:()=>{const{group:l}=n(),c=o(),{element:f}=i(),h=l.orientation==="horizontal"?f.offsetWidth:f.offsetHeight;return{asPercentage:c,inPixels:h}},isCollapsed:()=>{const{collapsible:l,collapsedSize:c}=r(),f=o();return l&&wr(c,f)},resize:l=>{if(o()!==l){let c;switch(typeof l){case"number":{const{group:f}=n(),h=$f({group:f});c=so(l/h*100);break}case"string":{c=parseFloat(l);break}}a(c)}}}}function mO(e){if(e.defaultPrevented)return;const{mountedGroups:t}=kr();Mk(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=xz({groupId:n.group.id,panelId:r.id});o&&i!==void 0&&(o.resize(i),e.preventDefault())}}})}function ry(e){const{mountedGroups:t}=kr();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 wz({groupId:e}){const t=()=>{const{mountedGroups:n}=kr();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:l}=t(),c=Au({layout:n,panelConstraints:i});if(r)return a;if(!Ru(a,c)){Rr(h=>({mountedGroups:new Map(h.mountedGroups).set(o,{defaultLayoutDeferred:r,derivedPanelConstraints:i,layout:c,separatorToPanels:l})}));const f=o.panels.map(({id:h})=>h).join(",");o.inMemoryLayouts[f]=c}return c}}}function Sz(e){const{mountedGroups:t}=kr(),n=t.get(e);return Zt(n,`Mounted Group ${e.id} not found`),n}function Bl(e,t){const n=ry(e),r=Sz(n),i=n.separators.find(h=>h.element===e);Zt(i,"Matching separator not found");const o=r.separatorToPanels.get(i);Zt(o,"Matching panels not found");const a=o.map(h=>n.panels.indexOf(h)),l=wz({groupId:n.id}).getLayout(),c=Gh({delta:t,initialLayout:l,panelConstraints:r.derivedPanelConstraints,pivotIndices:a,prevLayout:l,trigger:"keyboard"}),f=Au({layout:c,panelConstraints:r.derivedPanelConstraints});Ru(l,f)||Rr(h=>({mountedGroups:new Map(h.mountedGroups).set(n,{defaultLayoutDeferred:r.defaultLayoutDeferred,derivedPanelConstraints:r.derivedPanelConstraints,layout:f,separatorToPanels:r.separatorToPanels})}))}function gO(e){if(e.defaultPrevented)return;const t=e.currentTarget,n=ry(t);if(!n.disabled)switch(e.key){case"ArrowDown":{e.preventDefault(),n.orientation==="vertical"&&Bl(t,5);break}case"ArrowLeft":{e.preventDefault(),n.orientation==="horizontal"&&Bl(t,-5);break}case"ArrowRight":{e.preventDefault(),n.orientation==="horizontal"&&Bl(t,5);break}case"ArrowUp":{e.preventDefault(),n.orientation==="vertical"&&Bl(t,-5);break}case"End":{e.preventDefault(),Bl(t,100);break}case"Enter":{e.preventDefault();const r=ry(t),{derivedPanelConstraints:i,layout:o,separatorToPanels:a}=Sz(r),l=r.separators.find(p=>p.element===t);Zt(l,"Matching separator not found");const c=a.get(l);Zt(c,"Matching panels not found");const f=c[0],h=i.find(p=>p.panelId===f.id);if(Zt(h,"Panel metadata not found"),h.collapsible){const p=o[f.id],m=h.collapsedSize===p?r.inMemoryLastExpandedPanelSizes[f.id]??h.minSize:h.collapsedSize;Bl(t,m-p)}break}case"F6":{e.preventDefault();const r=ry(t).separators.map(a=>a.element),i=Array.from(r).findIndex(a=>a===e.currentTarget);Zt(i!==null,"Index not found");const o=e.shiftKey?i>0?i-1:r.length-1:i+1<r.length?i+1:0;r[o].focus();break}case"Home":{e.preventDefault(),Bl(t,-100);break}}}function yO(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const{mountedGroups:t}=kr(),n=Mk(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)}),Rr({interactionState:{hitRegions:n,initialLayoutMap:r,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:"active"}}),n.length&&e.preventDefault()}const lme=e=>e,uw=()=>{},Ez=1,Cz=2,kz=4,Rz=8,bO=3,vO=12;let _g;function xO(){return _g===void 0&&(_g=!1,typeof window<"u"&&(window.navigator.userAgent.includes("Chrome")||window.navigator.userAgent.includes("Firefox"))&&(_g=!0)),_g}function ume({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&&xO()){const o=(e&Ez)!==0,a=(e&Cz)!==0,l=(e&kz)!==0,c=(e&Rz)!==0;if(o)return l?"se-resize":c?"ne-resize":"e-resize";if(a)return l?"sw-resize":c?"nw-resize":"w-resize";if(l)return"s-resize";if(c)return"n-resize"}break}}return xO()?r>0&&i>0?"move":r>0?"ew-resize":"ns-resize":r>0&&i>0?"grab":r>0?"col-resize":"row-resize"}}const wO=new WeakMap;function $k(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:n}=wO.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets.push(n));const{cursorFlags:r,interactionState:i}=kr();switch(i.state){case"active":case"hover":{const o=ume({cursorFlags:r,groups:i.hitRegions.map(l=>l.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}}wO.set(e,{prevStyle:t,styleSheet:n})}function Az({document:e,event:t,hitRegions:n,initialLayoutMap:r,mountedGroups:i,pointerDownAtPoint:o,prevCursorFlags:a}){let l=0;const c=new Map(i);n.forEach(h=>{const{group:p,groupSize:m}=h,{disableCursor:g,orientation:b,panels:v}=p;let w=0;o?b==="horizontal"?w=(t.clientX-o.x)/m*100:w=(t.clientY-o.y)/m*100:b==="horizontal"?w=t.clientX<0?-100:100:w=t.clientY<0?-100:100;const x=r.get(p),{defaultLayoutDeferred:k,derivedPanelConstraints:C,layout:R,separatorToPanels:_}=i.get(p)??{defaultLayoutDeferred:!1};if(C&&x&&R&&_){const D=Gh({delta:w,initialLayout:x,panelConstraints:C,pivotIndices:h.panels.map(M=>v.indexOf(M)),prevLayout:R,trigger:"mouse-or-touch"});if(Ru(D,R)){if(w!==0&&!g)switch(b){case"horizontal":{l|=w<0?Ez:Cz;break}case"vertical":{l|=w<0?kz:Rz;break}}}else{c.set(h.group,{defaultLayoutDeferred:k,derivedPanelConstraints:C,layout:D,separatorToPanels:_});const M=h.group.panels.map(({id:O})=>O).join(",");h.group.inMemoryLayouts[M]=D}}});let f=0;t.movementX===0?f|=a&bO:f|=l&bO,t.movementY===0?f|=a&vO:f|=l&vO,Rr({cursorFlags:f,mountedGroups:c}),$k(e)}function SO(e){const{cursorFlags:t,interactionState:n,mountedGroups:r}=kr();n.state==="active"&&Az({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:r,prevCursorFlags:t})}function EO(e){if(e.defaultPrevented)return;const{cursorFlags:t,interactionState:n,mountedGroups:r}=kr();switch(n.state){case"active":{if(e.buttons===0){Rr(i=>i.interactionState.state==="inactive"?i:{cursorFlags:0,interactionState:{state:"inactive"}}),Rr(i=>({mountedGroups:new Map(i.mountedGroups)}));return}Az({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:r,pointerDownAtPoint:n.pointerDownAtPoint,prevCursorFlags:t});break}default:{const i=Mk(e,r);i.length===0?n.state!=="inactive"&&Rr({interactionState:{state:"inactive"}}):Rr({interactionState:{hitRegions:i,state:"hover"}}),$k(e.currentTarget);break}}}function CO(e){if(e.relatedTarget instanceof HTMLIFrameElement){const{interactionState:t}=kr();t.state==="hover"&&Rr({interactionState:{state:"inactive"}})}}function kO(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const{interactionState:t}=kr();t.state==="active"&&(Rr({cursorFlags:0,interactionState:{state:"inactive"}}),t.hitRegions.length>0&&($k(e.currentTarget),Rr(n=>({mountedGroups:new Map(n.mountedGroups)})),e.preventDefault()))}function RO(e){let t=0,n=0;const r={};for(const o of e)if(o.defaultSize!==void 0){t++;const a=so(o.defaultSize);n+=a,r[o.panelId]=a}else r[o.panelId]=void 0;const i=e.length-t;if(i!==0){const o=so((100-n)/i);for(const a of e)a.defaultSize===void 0&&(r[a.panelId]=o)}return r}function cme(e,t,n){if(!n[0])return;const r=e.panels.find(c=>c.element===t);if(!r||!r.onResize)return;const i=$f({group:e}),o=e.orientation==="horizontal"?r.element.offsetWidth:r.element.offsetHeight,a=r.mutableValues.prevSize,l={asPercentage:so(o/i*100),inPixels:o};r.mutableValues.prevSize=l,r.onResize(l,r.id,a)}function fme(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 dme(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 Rc=new Map;function hme(e){let t=!0;Zt(e.element.ownerDocument.defaultView,"Cannot register an unmounted Group");const n=e.element.ownerDocument.defaultView.ResizeObserver,r=new Set,i=new Set,o=new n(b=>{for(const v of b){const{borderBoxSize:w,target:x}=v;if(x===e.element){if(t){if($f({group:e})===0)return;Rr(k=>{const C=k.mountedGroups.get(e);if(C){const R=gE(e),_=C.defaultLayoutDeferred?RO(R):C.layout,D=Au({layout:_,panelConstraints:R});return!C.defaultLayoutDeferred&&Ru(_,D)&&fme(C.derivedPanelConstraints,R)?k:{mountedGroups:new Map(k.mountedGroups).set(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:R,layout:D,separatorToPanels:C.separatorToPanels})}}return k})}}else cme(e,x,w)}});o.observe(e.element),e.panels.forEach(b=>{Zt(!r.has(b.id),`Panel ids must be unique; id "${b.id}" was used more than once`),r.add(b.id),b.onResize&&o.observe(b.element)});const a=$f({group:e}),l=gE(e),c=e.panels.map(({id:b})=>b).join(",");let f=e.defaultLayout;f&&(dme(e.panels,f)||(f=void 0));const h=e.inMemoryLayouts[c]??f??RO(l),p=Au({layout:h,panelConstraints:l}),m=bz(e),g=e.element.ownerDocument;return Rr(b=>{const v=new Map;return Rc.set(g,(Rc.get(g)??0)+1),m.forEach(w=>{w.separator&&v.set(w.separator,w.panels)}),{mountedGroups:new Map(b.mountedGroups).set(e,{defaultLayoutDeferred:a===0,derivedPanelConstraints:l,layout:p,separatorToPanels:v})}}),e.separators.forEach(b=>{Zt(!i.has(b.id),`Separator ids must be unique; id "${b.id}" was used more than once`),i.add(b.id),b.element.addEventListener("keydown",gO)}),Rc.get(g)===1&&(g.addEventListener("dblclick",mO,!0),g.addEventListener("pointerdown",yO,!0),g.addEventListener("pointerleave",SO),g.addEventListener("pointermove",EO),g.addEventListener("pointerout",CO),g.addEventListener("pointerup",kO,!0)),function(){t=!1,Rc.set(g,Math.max(0,(Rc.get(g)??0)-1)),Rr(b=>{const v=new Map(b.mountedGroups);return v.delete(e),{mountedGroups:v}}),e.separators.forEach(b=>{b.element.removeEventListener("keydown",gO)}),Rc.get(g)||(g.removeEventListener("dblclick",mO,!0),g.removeEventListener("pointerdown",yO,!0),g.removeEventListener("pointerleave",SO),g.removeEventListener("pointermove",EO),g.removeEventListener("pointerout",CO),g.removeEventListener("pointerup",kO,!0)),o.disconnect()}}function pme(){const[e,t]=S.useState({}),n=S.useCallback(()=>t({}),[]);return[e,n]}function Ok(e){const t=S.useId();return`${e??t}`}const Lu=typeof window<"u"?S.useLayoutEffect:S.useEffect;function wh(e){const t=S.useRef(e);return Lu(()=>{t.current=e},[e]),S.useCallback((...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[t])}function Pk(...e){return wh(t=>{e.forEach(n=>{if(n)switch(typeof n){case"function":{n(t);break}case"object":{n.current=t;break}}})})}function Ik(e){const t=S.useRef({...e});return Lu(()=>{for(const n in e)t.current[n]=e[n]},[e]),t.current}const Tz=S.createContext(null);function mme(e,t){const n=S.useRef({getLayout:()=>({}),setLayout:lme});S.useImperativeHandle(t,()=>n.current,[]),Lu(()=>{Object.assign(n.current,wz({groupId:e}))})}function _z({children:e,className:t,defaultLayout:n,disableCursor:r,disabled:i,elementRef:o,groupRef:a,id:l,onLayoutChange:c,onLayoutChanged:f,orientation:h="horizontal",resizeTargetMinimumSize:p={coarse:20,fine:10},style:m,...g}){const b=S.useRef({onLayoutChange:{},onLayoutChanged:{}}),v=wh(I=>{Ru(b.current.onLayoutChange,I)||(b.current.onLayoutChange=I,c==null||c(I))}),w=wh(I=>{Ru(b.current.onLayoutChanged,I)||(b.current.onLayoutChanged=I,f==null||f(I))}),x=Ok(l),k=S.useRef(null),[C,R]=pme(),_=S.useRef({lastExpandedPanelSizes:{},layouts:{},panels:[],resizeTargetMinimumSize:p,separators:[]}),D=Pk(k,o);mme(x,a);const M=wh((I,$)=>{const{interactionState:B,mountedGroups:V}=kr();for(const F of V.keys())if(F.id===I){const z=V.get(F);if(z){let j=!1;return B.state==="active"&&(j=B.hitRegions.some(H=>H.group===F)),{flexGrow:z.layout[$]??1,pointerEvents:j?"none":void 0}}}return{flexGrow:(n==null?void 0:n[$])??1}}),O=Ik({defaultLayout:n,disableCursor:r}),U=S.useMemo(()=>({get disableCursor(){return!!O.disableCursor},getPanelStyles:M,id:x,orientation:h,registerPanel:I=>{const $=_.current;return $.panels=yE(h,[...$.panels,I]),R(),()=>{$.panels=$.panels.filter(B=>B!==I),R()}},registerSeparator:I=>{const $=_.current;return $.separators=yE(h,[...$.separators,I]),R(),()=>{$.separators=$.separators.filter(B=>B!==I),R()}},togglePanelDisabled:(I,$)=>{const B=_.current.panels.find(F=>F.id===I);B&&(B.panelConstraints.disabled=$);const{mountedGroups:V}=kr();for(const F of V.keys())if(F.id===x){const z=V.get(F);z&&(z.derivedPanelConstraints=gE(F))}},toggleSeparatorDisabled:(I,$)=>{const B=_.current.separators.find(V=>V.id===I);B&&(B.disabled=$)}}),[M,x,R,h,O]),L=S.useRef(null);return Lu(()=>{const I=k.current;if(I===null)return;const $=_.current;let B;if(O.defaultLayout!==void 0&&Object.keys(O.defaultLayout).length===$.panels.length){B={};for(const X of $.panels){const P=O.defaultLayout[X.id];P!==void 0&&(B[X.id]=P)}}const V={defaultLayout:B,disableCursor:!!O.disableCursor,disabled:!!i,element:I,id:x,inMemoryLastExpandedPanelSizes:_.current.lastExpandedPanelSizes,inMemoryLayouts:_.current.layouts,orientation:h,panels:$.panels,resizeTargetMinimumSize:$.resizeTargetMinimumSize,separators:$.separators};L.current=V;const F=hme(V),z=kr().mountedGroups.get(V);if(z){const{defaultLayoutDeferred:X,derivedPanelConstraints:P,layout:K}=z;!X&&P.length>0&&(v(K),w(K))}const j=_s.addListener("interactionStateChange",X=>{X.state}),H=_s.addListener("mountedGroupsChange",X=>{const P=X.get(V);if(P){const{defaultLayoutDeferred:K,derivedPanelConstraints:ee,layout:q}=P;if(K||ee.length===0)return;const{interactionState:ae}=kr(),re=ae.state!=="active";v(q),re&&w(q)}});return()=>{L.current=null,F(),j(),H()}},[i,x,w,v,h,C,O]),S.useEffect(()=>{const I=L.current;I&&(I.defaultLayout=n,I.disableCursor=!!r)}),T.jsx(Tz.Provider,{value:U,children:T.jsx("div",{...g,className:t,"data-group":!0,"data-testid":x,id:x,ref:D,style:{height:"100%",width:"100%",overflow:"hidden",...m,display:"flex",flexDirection:h==="horizontal"?"row":"column",flexWrap:"nowrap",touchAction:h==="horizontal"?"pan-y":"pan-x"},children:e})})}_z.displayName="Group";function Lk(){const e=S.useContext(Tz);return Zt(e,"Group Context not found; did you render a Panel or Separator outside of a Group?"),e}function gme(e,t){const{id:n}=Lk(),r=S.useRef({collapse:uw,expand:uw,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:uw});S.useImperativeHandle(t,()=>r.current,[]),Lu(()=>{Object.assign(r.current,xz({groupId:n,panelId:e}))})}function Dz({children:e,className:t,collapsedSize:n="0%",collapsible:r=!1,defaultSize:i,disabled:o,elementRef:a,id:l,maxSize:c="100%",minSize:f="0%",onResize:h,panelRef:p,style:m,...g}){const b=!!l,v=Ok(l),w=Ik({disabled:o}),x=S.useRef(null),k=Pk(x,a),{getPanelStyles:C,id:R,orientation:_,registerPanel:D,togglePanelDisabled:M}=Lk(),O=h!==null,U=wh((I,$,B)=>{h==null||h(I,l,B)});Lu(()=>{const I=x.current;if(I!==null){const $={element:I,id:v,idIsStable:b,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:O?U:void 0,panelConstraints:{collapsedSize:n,collapsible:r,defaultSize:i,disabled:w.disabled,maxSize:c,minSize:f}};return D($)}},[n,r,i,O,v,b,c,f,U,D,w]),S.useEffect(()=>{M(v,!!o)},[o,v,M]),gme(v,p);const L=S.useSyncExternalStore(I=>(_s.addListener("mountedGroupsChange",I),()=>{_s.removeListener("mountedGroupsChange",I)}),()=>JSON.stringify(C(R,v)),()=>JSON.stringify(C(R,v)));return T.jsx("div",{...g,"aria-disabled":o||void 0,"data-panel":!0,"data-testid":v,id:v,ref:k,style:{...yme,display:"flex",flexBasis:0,flexShrink:1,overflow:"hidden",...JSON.parse(L)},children:T.jsx("div",{className:t,style:{maxHeight:"100%",maxWidth:"100%",flexGrow:1,...m,touchAction:_==="horizontal"?"pan-y":"pan-x"},children:e})})}Dz.displayName="Panel";const yme={minHeight:0,maxHeight:"100%",height:"auto",minWidth:0,maxWidth:"100%",width:"auto",border:"none",borderWidth:0,padding:0,margin:0};function bme({layout:e,panelConstraints:t,panelId:n,panelIndex:r}){let i,o;const a=e[n],l=t.find(c=>c.panelId===n);if(l){const c=l.maxSize,f=l.collapsible?l.collapsedSize:l.minSize,h=[r,r+1];o=Au({layout:Gh({delta:f-a,initialLayout:e,panelConstraints:t,pivotIndices:h,prevLayout:e}),panelConstraints:t})[n],i=Au({layout:Gh({delta:c-a,initialLayout:e,panelConstraints:t,pivotIndices:h,prevLayout:e}),panelConstraints:t})[n]}return{valueControls:n,valueMax:i,valueMin:o,valueNow:a}}function Mz({children:e,className:t,disabled:n,elementRef:r,id:i,style:o,...a}){const l=Ok(i),c=Ik({disabled:n}),[f,h]=S.useState({}),[p,m]=S.useState("inactive"),g=S.useRef(null),b=Pk(g,r),{disableCursor:v,id:w,orientation:x,registerSeparator:k,toggleSeparatorDisabled:C}=Lk(),R=x==="horizontal"?"vertical":"horizontal";Lu(()=>{const D=g.current;if(D!==null){const M={disabled:c.disabled,element:D,id:l},O=k(M),U=_s.addListener("interactionStateChange",I=>{m(I.state!=="inactive"&&I.hitRegions.some($=>$.separator===M)?I.state:"inactive")}),L=_s.addListener("mountedGroupsChange",I=>{I.forEach(({derivedPanelConstraints:$,layout:B,separatorToPanels:V},F)=>{if(F.id===w){const z=V.get(M);if(z){const j=z[0],H=F.panels.indexOf(j);h(bme({layout:B,panelConstraints:$,panelId:j.id,panelIndex:H}))}}})});return()=>{U(),L(),O()}}},[w,l,k,c]),S.useEffect(()=>{C(l,!!n)},[n,l,C]);let _;return n&&!v&&(_="not-allowed"),T.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":l,id:l,ref:b,role:"separator",style:{flexBasis:"auto",cursor:_,...o,flexGrow:0,flexShrink:0,touchAction:"none"},tabIndex:n?void 0:0})}Mz.displayName="Separator";const vme="_resizable_wu6fv_1",db={resizable:vme,"resizable-panel":"_resizable-panel_wu6fv_15","resizable-handle":"_resizable-handle_wu6fv_19 _disabled_dkczp_2","resizable-handle-grip":"_resizable-handle-grip_wu6fv_45"},$z=({direction:e,className:t,children:n,...r})=>T.jsx(_z,{"data-slot":"resizable","data-direction":e,orientation:e,className:ze(db.resizable,t),...r,children:n});$z.displayName="Resizable";const Oz=({withHandle:e,className:t,children:n,disabled:r,...i})=>T.jsx(Mz,{"data-slot":"resizable-handle","data-disabled":r?"":void 0,className:ze(db["resizable-handle"],t),...i,children:n??(e!==!1&&T.jsx("div",{className:db["resizable-handle-grip"],children:T.jsx(uY,{size:10})}))});Oz.displayName="ResizableHandle";const bE=({className:e,children:t,...n})=>T.jsx(Dz,{"data-slot":"resizable-panel",className:ze(db["resizable-panel"],e),...n,children:t});bE.displayName="ResizablePanel";const Pz=({children:e,...t})=>T.jsx(ks,{render:T.jsx("nav",{}),"aria-label":"breadcrumbs","data-slot":"breadcrumbs",...t,children:e});Pz.displayName="BreadcrumbsContainer";const xme={"breadcrumbs-list":"_breadcrumbs-list_j5s62_1"},Iz=({className:e,...t})=>T.jsx("ol",{"data-slot":"breadcrumbs-list",className:ze(xme["breadcrumbs-list"],e),...t});Iz.displayName="BreadcrumbsList";const wme={"breadcrumbs-item":"_breadcrumbs-item_fl4mk_1"},Lz=({className:e,...t})=>T.jsx("li",{"data-slot":"breadcrumbs-item",className:ze(wme["breadcrumbs-item"],e),...t});Lz.displayName="BreadcrumbsItem";const Nz=({children:e,...t})=>T.jsx("li",{"data-slot":"breadcrumbs-separator",role:"presentation","aria-hidden":"true",...t,children:e??"/"});Nz.displayName="BreadcrumbsSeparator";const Nk=({items:e,linkAs:t="a",...n})=>T.jsx(Pz,{"data-slot":"breadcrumbs",...n,children:T.jsx(Iz,{children:e.map((r,i)=>{const o=i===e.length-1,a=r.icon,l=T.jsxs(mi,{condition:!!a,render:T.jsx(ot,{gap:1,ay:"center"}),children:[a&&T.jsx(a,{size:14}),r.label]});return T.jsxs(S.Fragment,{children:[T.jsx(Lz,{children:o?l:T.jsx(t,{href:r.value,children:l})}),!o&&T.jsx(Nz,{})]},r.value)})})});Nk.displayName="Breadcrumbs";const Yf={"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"},jz=({children:e,className:t,...n})=>T.jsx(En,{"data-slot":"table-container",className:ze(Yf["table-container"],t),ax:"stretch",p:0,fullwidth:!0,InnerContainerProps:{my:0},...n,children:e});jz.displayName="TableContainer";const Fz=({striped:e,bordered:t,highlightOnHover:n,className:r,children:i,...o})=>T.jsx("table",{"data-slot":"table-root","data-striped":e,"data-bordered":t,"data-hover":n,className:ze(Yf["table-root"],r),...o,children:i});Fz.displayName="TableRoot";const zz=({className:e,...t})=>T.jsx("thead",{"data-slot":"table-header",className:ze(Yf["table-header"],e),...t});zz.displayName="TableHeader";const Bz=({className:e,render:t=T.jsx("tr",{}),...n})=>T.jsx(ks,{"data-slot":"table-row",className:ze(Yf["table-row"],e),render:t,...n});Bz.displayName="TableRow";const Hz=({className:e,collapse:t,...n})=>T.jsx("td",{"data-slot":"table-cell","data-collapse":t,className:ze(Yf["table-cell"],e),...n});Hz.displayName="TableCell";const Uz=({className:e,collapse:t,...n})=>T.jsx("th",{"data-slot":"table-head","data-collapse":t,className:ze(Yf["table-head"],e),...n});Uz.displayName="TableHead";const qz=({...e})=>T.jsx("tbody",{"data-slot":"table-body",...e});qz.displayName="TableBody";const Sme="bertrand:apiBase";function Eme(){if(typeof window<"u")try{const e=window.localStorage.getItem(Sme);if(e)return e.replace(/\/$/,"")}catch{}return""}function Vz(e){return`${Eme()}${e}`}async function Nu(e){const t=await fetch(Vz(e));if(!t.ok)throw new Error(`${t.status} ${t.statusText}`);return t.json()}class Gz extends Error{constructor(n,r){super(n);ce(this,"reason");this.name="ArchiveError",this.reason=r}}async function Yz(e,t){const n=await fetch(Vz(`/api/sessions/${e}/${t}`),{method:"POST"});if(!n.ok){const r=await n.json().catch(()=>({}));throw new Gz(r.error??n.statusText,r.reason??"unknown")}return n.json()}const AO=e=>Yz(e,"archive"),TO=e=>Yz(e,"unarchive");function Cme(e){return e===void 0?"":`?${new URLSearchParams({projects:e.join(",")}).toString()}`}const Yh=(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 Nu(`/api/sessions${n?`?${n}`:""}`)},refetchInterval:2e3,placeholderData:If}),kme={queryKey:["worktrees"],queryFn:()=>Nu("/api/worktrees"),refetchInterval:2e3,placeholderData:If};function jk(e){return e?`?${new URLSearchParams({project:e}).toString()}`:""}const Rme=(e,t=!1,n)=>({queryKey:["events",e,n??null],queryFn:()=>Nu(`/api/events/${e}${jk(n)}`),enabled:!!e,refetchInterval:t?1e3:!1,placeholderData:If}),Ame=(e,t=!1,n)=>({queryKey:["stats",e,n??null],queryFn:()=>Nu(`/api/stats/${e}${jk(n)}`),enabled:!!e,refetchInterval:t?2e3:!1,placeholderData:If}),Tme=(e={})=>({queryKey:["stats",{projects:e.projects??null}],queryFn:()=>Nu(`/api/stats${Cme(e.projects)}`),refetchInterval:e.hasLiveSession?2e3:!1,placeholderData:If}),_me=(e,t=!1,n)=>({queryKey:["engagement",e,n??null],queryFn:()=>Nu(`/api/engagement/${e}${jk(n)}`),enabled:!!e,refetchInterval:t?2e3:!1,placeholderData:If}),Wz={queryKey:["projects"],queryFn:()=>Nu("/api/projects"),refetchInterval:5e3},Fk="bertrand:selected-projects";function Dme(){try{const e=localStorage.getItem(Fk);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 Mme(e){try{localStorage.setItem(Fk,JSON.stringify(e))}catch{}}function _O(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 $me(e,t){if(e.length!==t.length)return!1;const n=[...t].sort();return[...e].sort().every((r,i)=>r===n[i])}const Kz=S.createContext(null);function Ome({children:e}){const{data:t=[]}=Wi(Wz),[n,r]=S.useState(()=>Dme());S.useEffect(()=>{n===null&&t.length>0&&r(_O(t))},[n,t]);const i=S.useCallback(l=>{r(l),Mme(l)},[]),o=S.useCallback(()=>{try{localStorage.removeItem(Fk)}catch{}r(null)},[]),a=S.useMemo(()=>{const l=n===null?void 0:n.filter(f=>t.some(h=>h.slug===f)),c=n===null||$me(l??[],_O(t));return{projects:t,selected:n,queryProjects:l,setSelected:i,resetToLive:o,isAtLiveDefault:c}},[t,n,i,o]);return T.jsx(Kz.Provider,{value:a,children:e})}function Sp(){const e=S.useContext(Kz);if(!e)throw new Error("useSelectedProjects must be used within a SelectedProjectsProvider");return e}const Xz=()=>{const{projects:e,selected:t,setSelected:n,resetToLive:r,isAtLiveDefault:i}=Sp();if(e.length===0)return null;const o=e.map(c=>({value:c.slug,label:c.name})),a=t??[],l=e.length>1;return T.jsxs(ot,{ay:"center",gap:1,fullwidth:!0,children:[T.jsx("div",{style:{flex:1,minWidth:0},children:T.jsx(_F,{size:"small",fullwidth:!0,items:o,value:a,onValueChange:c=>n(c),disabled:!l,placeholder:"Select projects"})}),l&&T.jsx(js,{tooltip:"Show live projects","aria-label":"Show live projects",variant:"subtle",size:"small",shape:"square",disabled:i,onClick:r,children:T.jsx(RG,{})})]})};Xz.displayName="ProjectSelector";const Pme=1440*60*1e3,Ime=["active","waiting","paused","archived"],Lme={active:"Active",waiting:"Waiting",paused:"Paused",archived:"Archived"},Nme=["today","yesterday","thisWeek","earlier"],jme={today:"Today",yesterday:"Yesterday",thisWeek:"This week",earlier:"Earlier"};function Fme(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())/Pme);return o<=0?"today":o===1?"yesterday":o<7?"thisWeek":"earlier"}function zme(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 Ime.filter(i=>r.has(i)).map(i=>({key:i,category:Lme[i],sessions:r.get(i)}))}if(t==="recent"){const r=new Date,i=new Map;for(const o of e){const a=Fme(o.session.startedAt,r),l=i.get(a);l?l.push(o):i.set(a,[o])}return Nme.filter(o=>i.has(o)).map(o=>({key:o,category:jme[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 Bme={"claude.started":{category:"lifecycle",color:"blue",label:"session started",icon:OY},"claude.ended":{category:"lifecycle",color:"blue",label:"ended",icon:BG},"claude.discarded":{category:"lifecycle",color:"neutral",label:"discarded",icon:YG},"session.waiting":{category:"interaction",color:"green",label:"waiting",icon:VG},"session.answered":{category:"interaction",color:"green",label:"Q&A",icon:wY},"user.prompt":{category:"interaction",color:"green",label:"prompt",icon:vY},"tool.work":{category:"work",color:"yellow",label:"tool work",icon:iP},"tool.applied":{category:"work",color:"yellow",label:"applied",icon:MY},"tool.used":{category:"work",color:"yellow",label:"tool",icon:UY},"assistant.message":{category:"assistant",color:"indigo",label:"assistant",icon:NY}},Hme={category:"lifecycle",color:"neutral",label:"unknown",icon:UG};function bv(e){return Bme[e]??Hme}function Ume(e){return bv(e).category}function qme(e){return bv(e).color}function Qz(e){return bv(e).label}function Vme(e){return bv(e).icon}const Gme={active:"green",waiting:"yellow",paused:"neutral",archived:"neutral"};function vv(e){return Gme[e]}function cw(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 zk(e){const t=(Date.now()-new Date(e).getTime())/1e3;return t<60?"just now":t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:t<604800?`${Math.floor(t/86400)}d ago`:new Date(e).toLocaleDateString()}const Zz=qme,Yme=Qz,Wme=Vme;function Dg(e){return e?e.split(`
|
|
516
|
-
`).length:0}function Kme(e){return e.split("/").filter(Boolean).pop()??e}function Xme(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 l of t)if(l.detail&&n.add(l.detail),l.edits&&l.edits.length>0){r+=l.edits.length;for(const c of l.edits)o+=Dg(c.oldStr),i+=Dg(c.newStr)}else(l.oldStr||l.newStr)&&(r+=1,o+=Dg(l.oldStr),i+=Dg(l.newStr));if(n.size===0)return null;const a=i||o?` (+${i} -${o})`:"";if(n.size===1){const l=n.values().next().value,c=Kme(l);return r>1?`${r} edits to ${c}${a}`:`edited ${c}${a}`}return`edited ${n.size} files${a}`}function Qme(e){const t=Yme(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 Xme(n)??t;default:return t}}function Zme(e){return new Date(e).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",second:"2-digit"})}const Jz=({session:e})=>T.jsx(Fe,{style:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},render:T.jsx(Du,{to:"/$",params:{_splat:`${e.categoryPath}/${e.session.slug}`}}),size:-1,children:e.session.slug});Jz.displayName="SessionLabel";const Jme={"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 fw(e){return e instanceof Gz?Jme[e.reason]??e.message:e instanceof Error?e.message:"Something went wrong"}function e5(e){const t=LE(),n=UI(),r=()=>t.invalidateQueries({queryKey:["sessions"]}),i=f=>(f==="archive"?AO:TO)(e.id).then(r).catch(p=>{n.add({description:`Undo failed: ${fw(p)}`,priority:"high"})}),o=(f,h)=>{let p;const m=()=>{p&&n.close(p),i(h)};p=n.add({priority:"low",description:T.jsxs(ot,{ay:"center",gap:3,ax:"space-between",fullwidth:!0,children:[T.jsxs(Fe,{children:[f," ",T.jsx("code",{children:e.slug})]}),T.jsx(js,{size:"small",onClick:m,children:"Undo"})]})})},a=v_({mutationFn:()=>AO(e.id),onSuccess:()=>{r(),o("Archived","unarchive")},onError:f=>n.add({description:`Could not archive ${e.slug}: ${fw(f)}`,priority:"high"})}),l=v_({mutationFn:()=>TO(e.id),onSuccess:()=>{r(),o("Unarchived","archive")},onError:f=>n.add({description:`Could not unarchive ${e.slug}: ${fw(f)}`,priority:"high"})});if(e.status==="archived")return{kind:"unarchive",label:"Unarchive",tooltip:"Unarchive (returns to paused)",Icon:TG,disabled:!1,loading:l.isPending,onClick:()=>l.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:DG,disabled:c,loading:a.isPending,onClick:()=>a.mutate()}}const t5=({session:e,categoryPath:t})=>{const n=e5(e),{Icon:r}=n,i=e.status==="paused",o=`${t}/${e.slug}`;return T.jsxs(ez,{children:[T.jsx(tz,{render:T.jsx(js,{variant:"ghost",size:"xsmall",shape:"square","aria-label":"Session actions",style:{marginLeft:"auto"},children:T.jsx(JG,{})})}),T.jsx(nz,{children:T.jsx(rz,{side:"right",align:"start",children:T.jsxs(iz,{children:[T.jsxs(mE,{disabled:n.disabled,onClick:n.onClick,render:T.jsx(ot,{ay:"center",gap:2}),children:[T.jsx(r,{size:14}),n.label]}),T.jsxs(mE,{disabled:!i,onClick:()=>{navigator.clipboard.writeText(o)},render:T.jsx(ot,{ay:"center",gap:2}),children:[T.jsx(eC,{size:14}),"Copy session path"]})]})})})]})};t5.displayName="SessionRowActions";const n5=({session:e})=>{const{queryProjects:t}=Sp(),{data:n=[]}=Wi(Yh({projects:t})),r=n.some(p=>p.session.status==="active"||p.session.status==="waiting"),{data:i}=Wi(Tme({hasLiveSession:r,projects:t})),o=i==null?void 0:i[e.session.id],a=(o==null?void 0:o.linesAdded)??0,l=(o==null?void 0:o.linesRemoved)??0,c=(o==null?void 0:o.filesTouched)??0,f=a>0||l>0,h=((t==null?void 0:t.length)??0)>1&&e.project;return T.jsxs(ot,{ay:"center",gap:2,children:[h&&T.jsx(Fe,{size:-1,shade:"muted",weight:"bold",children:e.project.name}),T.jsx(Fe,{size:-1,shade:"muted",children:zk(e.session.startedAt)}),f&&T.jsxs(ot,{ay:"center",gap:1,children:[T.jsx(Fe,{size:-1,family:"mono",color:"green",children:`+${a}`}),T.jsx(Fe,{size:-1,family:"mono",color:"red",children:`-${l}`})]}),c>0&&T.jsxs(ot,{ay:"start",gap:1,children:[T.jsx(rP,{size:12}),T.jsx(Fe,{size:-1,family:"mono",shade:"muted",children:c})]}),e.session.rating!==null&&e.session.rating!==void 0&&T.jsx(Fe,{"aria-label":`Rated ${e.session.rating} of 5 stars`,children:[1,2,3,4,5].map(p=>p<=e.session.rating?"★":"☆").join("")})]})};n5.displayName="SessionContent";const r5=({session:e})=>{const t=vv(e.session.status),n=e.session.status==="archived";return T.jsx(gp,{"data-archived":n?"":void 0,style:n?{opacity:.4}:void 0,children:T.jsxs(Qe,{fullwidth:!0,children:[T.jsxs(ot,{ay:"center",gap:2,fullwidth:!0,children:[T.jsx(lp,{color:t}),T.jsx(Jz,{session:e}),T.jsx(t5,{session:e.session,categoryPath:e.categoryPath})]}),T.jsx(n5,{session:e})]})})};r5.displayName="SessionListItem";const i5=({group:e})=>T.jsxs(Qe,{"data-slot":"sidebar-list-section",ax:"stretch",fullwidth:!0,children:[T.jsxs(ot,{ay:"center",gap:2,py:1,fullwidth:!0,children:[T.jsx(Fe,{render:T.jsx("h3",{}),weight:"bold",size:0,children:e.category}),T.jsx(Fe,{size:-1,shade:"muted",children:e.sessions.length})]}),T.jsx(Eu,{"data-slot":"sidebar-list",marker:"none",ax:"stretch",gap:1,fullwidth:!0,children:e.sessions.map(t=>T.jsx(r5,{session:t},t.session.id))})]});i5.displayName="SessionGroupSection";const Bk=({children:e,...t})=>T.jsx(Qe,{"data-slot":"sidebar",render:T.jsx("nav",{}),ax:"stretch",fullwidth:!0,gap:3,p:4,...t,children:e});Bk.displayName="SidebarWrapper";const o5=({WrapperProps:e})=>{const[t,n]=S.useState(""),[r,i]=S.useState("group"),[o,a]=S.useState(!1),l=S.useRef(null),{queryProjects:c}=Sp(),{data:f=[]}=Wi(Yh({includeArchived:o,projects:c})),h=S.useMemo(()=>{const p=t.trim().toLowerCase(),m=p?f.filter(g=>g.session.slug.toLowerCase().includes(p)||g.session.name.toLowerCase().includes(p)||g.categoryPath.toLowerCase().includes(p)):f;return zme(m,r)},[f,t,r]);return S.useEffect(()=>{const p=m=>{var g,b;(m.metaKey||m.ctrlKey)&&m.key==="k"&&(m.preventDefault(),(g=l.current)==null||g.focus(),(b=l.current)==null||b.select())};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[]),T.jsxs(Bk,{...e,children:[T.jsx(Xz,{}),T.jsx(ot,{ay:"center",gap:2,fullwidth:!0,children:T.jsx(Cj,{ref:l,placeholder:"Search for a session",before:T.jsx(IY,{}),after:T.jsx(lL,{hotkey:["meta","k"]}),size:"small",fullwidth:!0,style:{flex:1,minWidth:0},value:t,onChange:p=>n(p.target.value)})}),T.jsxs(ot,{ay:"center",ax:"space-between",gap:2,children:[T.jsxs(Dk,{size:"sm",value:[r],onValueChange:p=>{const m=p[0];m&&i(m)},children:[T.jsx(tf,{value:"group","aria-label":"Group by group",children:T.jsx(hu,{trigger:T.jsx(fY,{}),children:"Group by group"})}),T.jsx(tf,{value:"status","aria-label":"Group by status",children:T.jsx(hu,{trigger:T.jsx(BY,{}),children:"Group by status"})}),T.jsx(tf,{value:"recent","aria-label":"Group by recent",children:T.jsx(hu,{trigger:T.jsx(tP,{}),children:"Group by recent"})})]}),T.jsx(ot,{ay:"center",gap:1,children:T.jsx(Lb,{size:"small",shape:"square",variant:"subtle",tooltip:o?"Hide archived":"Show archived",pressed:o,onPressedChange:a,icon:{unpressed:T.jsx(tY,{}),pressed:T.jsx(rY,{})}})})]}),h.length===0?T.jsxs(Fe,{size:-1,shade:"muted",style:{padding:"0.5rem"},children:['No sessions match "',t,'".']}):T.jsx(Qe,{ax:"stretch",gap:3,fullwidth:!0,children:h.map(p=>T.jsx(i5,{group:p},p.key))})]})};o5.displayName="Sidebar";const s5=({children:e,...t})=>T.jsx(ot,{"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});s5.displayName="TopBarWrapper";const Sh="uiid-theme";function ege(){return localStorage.getItem(Sh)??"system"}function tge(e){const t=n=>{n.key===Sh&&e()};return window.addEventListener("storage",t),()=>window.removeEventListener("storage",t)}function nge(e){e==="system"?document.documentElement.removeAttribute("data-theme"):document.documentElement.setAttribute("data-theme",e)}function rge(){const e=S.useSyncExternalStore(tge,ege),t=S.useCallback(n=>{n==="system"?localStorage.removeItem(Sh):localStorage.setItem(Sh,n),nge(n),window.dispatchEvent(new StorageEvent("storage",{key:Sh,newValue:n}))},[]);return{theme:e,setTheme:t}}const a5=()=>{const{theme:e,setTheme:t}=rge();return T.jsxs(Dk,{value:[e],onValueChange:n=>{const r=n[0];r&&t(r)},size:"sm",children:[T.jsx(tf,{value:"light","aria-label":"Light mode",children:T.jsx(FY,{})}),T.jsx(tf,{value:"dark","aria-label":"Dark mode",children:T.jsx(AY,{})}),T.jsx(tf,{value:"system","aria-label":"System theme",children:T.jsx(kY,{})})]})};a5.displayName="ThemeToggle";const Hk=({sessionCount:e})=>T.jsxs(s5,{children:[T.jsx(Fe,{size:2,weight:"bold",children:"bertrand"}),T.jsx(S.Activity,{mode:e?"visible":"hidden",children:T.jsxs(Os,{color:"blue",children:[e," session(s)"]})}),T.jsxs(ot,{gap:3,ay:"center",ml:"auto",children:[T.jsxs(ot,{gap:2,ay:"center",children:[T.jsx(Mg,{to:"/",tooltip:"Session timeline",icon:T.jsx(LG,{})}),T.jsx(Mg,{to:"/worktrees",tooltip:"Worktrees",icon:T.jsx(aY,{})}),T.jsx(Mg,{to:"/dev/markdown",tooltip:"Markdown viewer",icon:T.jsx(PG,{})}),T.jsx(Mg,{to:"/dev/diff",tooltip:"Diff viewer",icon:T.jsx(nP,{})})]}),T.jsx(a5,{})]})]});Hk.displayName="TopBar";const Mg=({to:e,tooltip:t,icon:n})=>T.jsx(js,{render:T.jsx(Du,{to:e}),nativeButton:!1,tooltip:t,variant:"subtle",size:"small",shape:"square",children:n}),Wf=hU({component:ige});function ige(){return _U({select:t=>t.location.pathname}).startsWith("/dev/")?T.jsxs(Qe,{fullwidth:!0,style:{position:"fixed",inset:0,height:"100dvh"},children:[T.jsx(Hk,{}),T.jsx(Qe,{render:T.jsx("main",{}),fullwidth:!0,style:{flex:1,overflow:"auto"},children:T.jsx(UE,{})})]}):T.jsx(oge,{})}function oge(){const{queryProjects:e}=Sp(),{data:t=[]}=Wi(Yh({projects:e}));return T.jsxs(Qe,{fullwidth:!0,style:{position:"fixed",height:"100dvh"},children:[T.jsx(Hk,{sessionCount:t.length}),T.jsxs($z,{direction:"horizontal",children:[T.jsx(bE,{defaultSize:360,minSize:320,maxSize:540,children:T.jsx(o5,{})}),T.jsx(Oz,{}),T.jsx(bE,{children:T.jsx(Qe,{render:T.jsx("main",{}),fullwidth:!0,fullheight:!0,children:T.jsx(UE,{})})})]})]})}function sge(){const{data:e=[]}=Wi(kme);return T.jsxs(Qe,{gap:4,p:6,fullwidth:!0,style:{overflow:"auto"},children:[T.jsxs(Qe,{gap:2,children:[T.jsxs(ot,{gap:2,ay:"center",children:[T.jsx(Fe,{size:3,weight:"bold",children:"Worktrees"}),e.length>0&&T.jsx(Os,{color:"blue",children:e.length})]}),T.jsx(Fe,{size:2,shade:"muted",children:"Sessions currently working in an isolated git worktree."})]}),e.length===0?T.jsx(Fe,{size:1,shade:"muted",children:"No active worktrees. A session lands here once it enters one for git-bound work."}):T.jsx(Qe,{gap:1,fullwidth:!0,children:e.map(({session:t,categoryPath:n})=>{const r=vv(t.status);return T.jsxs(ot,{ay:"center",gap:3,py:2,px:2,bb:1,fullwidth:!0,children:[T.jsx(lp,{color:r}),T.jsxs(Qe,{gap:1,children:[T.jsx(Fe,{family:"mono",weight:"bold",children:t.worktreeBranch??"(unknown branch)"}),T.jsxs(ot,{gap:2,ay:"center",children:[T.jsxs(Fe,{size:-1,shade:"muted",render:T.jsx(Du,{to:"/$",params:{_splat:`${n}/${t.slug}`}}),children:[n," / ",t.slug]}),T.jsxs(Fe,{size:-1,shade:"muted",children:["· ",zk(t.updatedAt)]})]}),t.worktreePath&&T.jsx(Fe,{size:-1,shade:"muted",family:"mono",children:t.worktreePath})]}),T.jsx(Os,{color:r,ml:"auto",children:t.status})]},t.id)})})]})}const age=rp("/worktrees")({component:sge}),lge=e=>e.filter(t=>Qz(t.event)!=="unknown"),uge=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 l=(r=o.meta)==null?void 0:r.question;t.push({...a,meta:{...a.meta,question:l}}),n.add(i),n.add(i+1);continue}}t.push(o)}return t};function hb(e){return e.edits&&e.edits.length>0?e.edits:e.oldStr||e.newStr?[{oldStr:e.oldStr??"",newStr:e.newStr??""}]:[]}function DO(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 l5={Bash:"ran",Edit:"edited",MultiEdit:"edited",Write:"wrote",Read:"read",Glob:"globbed",Grep:"grepped",WebFetch:"fetched",WebSearch:"searched",TodoWrite:"updated todos"},cge={Bash:"commands",Edit:"files",MultiEdit:"files",Write:"files",Read:"files",Glob:"patterns",Grep:"patterns",WebFetch:"urls",WebSearch:"queries"},fge=new Set(["Edit","MultiEdit","Write","Read"]);function dge(e){return e.split("/").filter(Boolean).pop()??e}function MO(e,t){return e.length<=t?e:e.slice(0,t-1)+"…"}function hge(e){const t=l5[e.tool]??e.tool;return e.detail?e.tool==="Bash"?`ran \`${MO(e.detail,60)}\``:fge.has(e.tool)?`${t} ${dge(e.detail)}`:`${t} ${MO(e.detail,60)}`:t}function pge(e){const t=[];for(const[n,r]of e){const i=l5[n]??n;if(r===1)t.push(i);else{const o=cge[n]??"calls";t.push(`${i} ${r} ${o}`)}}return t.join(", ")}const $O=new Set(["tool.used"]),mge=e=>{const t=[];let n=0;for(;n<e.length;){const r=e[n];if(!$O.has(r.event)){t.push(r),n++;continue}const i=[];for(;n<e.length;){const f=e[n];if(!$O.has(f.event))break;i.push(f),n++}if(i.length===0)continue;const o=i.map(DO),a=o.some(f=>f.outcome==="approved"),l=new Map;for(const f of o){const h=`${f.tool}::${f.detail}`,p=l.get(h);if(p){p.count++;const m=[...hb(p),...hb(f)];m.length>0&&(p.edits=m,p.oldStr=void 0,p.newStr=void 0)}else l.set(h,{...f,count:1})}const c=[...l.values()];if(c.length<=1){const f=c[0]??DO(i[0]),h=hge(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=pge(h),m=new Date(i[0].createdAt).getTime(),g=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((m+g)/2).toISOString()})}}return t},gge={Edit:"edited a file",Write:"wrote a file",MultiEdit:"edited a file"},yge=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 m of p)o.push(m)}const a=new Map;for(const f of o){const h=`${f.tool}::${f.detail}`,p=a.get(h),m=f.count??1;if(p){p.count+=m;const g=[...hb(p),...hb(f)];g.length>0&&(p.edits=g,p.oldStr=void 0,p.newStr=void 0)}else a.set(h,{...f,count:m})}const l=[...a.values()],c=i[i.length-1];t.push({...c,meta:{...c.meta,permissions:l}})}return t},bge=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:gge[i]??`${i} applied`}:t}),vge=[lge,uge,mge,yge,bge];function xge(e){return vge.reduce((t,n)=>n(t),e)}function OO(e,t){const n=e.replace(/^\/+|\/+$/g,"");return n.includes("/")?t.find(r=>`${r.categoryPath}/${r.session.slug}`===n)??null:null}const wge=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Sge=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ege={};function PO(e,t){return(Ege.jsx?Sge:wge).test(e)}var Ac={},dw,IO;function Cge(){if(IO)return dw;IO=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,l=/^\s+|\s+$/g,c=`
|
|
517
|
-
`,f="/",h="*",p="",m="comment",g="declaration";function b(w,x){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];x=x||{};var k=1,C=1;function R(V){var F=V.match(t);F&&(k+=F.length);var z=V.lastIndexOf(c);C=~z?V.length-z:C+V.length}function _(){var V={line:k,column:C};return function(F){return F.position=new D(V),U(),F}}function D(V){this.start=V,this.end={line:k,column:C},this.source=x.source}D.prototype.content=w;function M(V){var F=new Error(x.source+":"+k+":"+C+": "+V);if(F.reason=V,F.filename=x.source,F.line=k,F.column=C,F.source=w,!x.silent)throw F}function O(V){var F=V.exec(w);if(F){var z=F[0];return R(z),w=w.slice(z.length),F}}function U(){O(n)}function L(V){var F;for(V=V||[];F=I();)F!==!1&&V.push(F);return V}function I(){var V=_();if(!(f!=w.charAt(0)||h!=w.charAt(1))){for(var F=2;p!=w.charAt(F)&&(h!=w.charAt(F)||f!=w.charAt(F+1));)++F;if(F+=2,p===w.charAt(F-1))return M("End of comment missing");var z=w.slice(2,F-2);return C+=2,R(z),w=w.slice(F),C+=2,V({type:m,comment:z})}}function $(){var V=_(),F=O(r);if(F){if(I(),!O(i))return M("property missing ':'");var z=O(o),j=V({type:g,property:v(F[0].replace(e,p)),value:z?v(z[0].replace(e,p)):p});return O(a),j}}function B(){var V=[];L(V);for(var F;F=$();)F!==!1&&(V.push(F),L(V));return V}return U(),B()}function v(w){return w?w.replace(l,p):p}return dw=b,dw}var LO;function kge(){if(LO)return Ac;LO=1;var e=Ac&&Ac.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ac,"__esModule",{value:!0}),Ac.default=n;const t=e(Cge());function n(r,i){let o=null;if(!r||typeof r!="string")return o;const a=(0,t.default)(r),l=typeof i=="function";return a.forEach(c=>{if(c.type!=="declaration")return;const{property:f,value:h}=c;l?i(f,h,c):h&&(o=o||{},o[f]=h)}),o}return Ac}var Zd={},NO;function Rge(){if(NO)return Zd;NO=1,Object.defineProperty(Zd,"__esModule",{value:!0}),Zd.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()},l=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,l):f=f.replace(r,l),f.replace(t,a))};return Zd.camelCase=c,Zd}var Jd,jO;function Age(){if(jO)return Jd;jO=1;var e=Jd&&Jd.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(kge()),n=Rge();function r(i,o){var a={};return!i||typeof i!="string"||(0,t.default)(i,function(l,c){l&&c&&(a[(0,n.camelCase)(l,o)]=c)}),a}return r.default=r,Jd=r,Jd}var Tge=Age();const _ge=DE(Tge),u5=c5("end"),Uk=c5("start");function c5(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 Dge(e){const t=Uk(e),n=u5(e);if(t&&n)return{start:t,end:n}}function Eh(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?FO(e.position):"start"in e||"end"in e?FO(e):"line"in e||"column"in e?vE(e):""}function vE(e){return zO(e&&e.line)+":"+zO(e&&e.column)}function FO(e){return vE(e&&e.start)+"-"+vE(e&&e.end)}function zO(e){return e&&typeof e=="number"?e:1}class yr 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 l=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=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=l?l.line:void 0,this.name=Eh(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}}yr.prototype.file="";yr.prototype.name="";yr.prototype.reason="";yr.prototype.message="";yr.prototype.stack="";yr.prototype.column=void 0;yr.prototype.line=void 0;yr.prototype.ancestors=void 0;yr.prototype.cause=void 0;yr.prototype.fatal=void 0;yr.prototype.place=void 0;yr.prototype.ruleId=void 0;yr.prototype.source=void 0;const qk={}.hasOwnProperty,Mge=new Map,$ge=/[A-Z]/g,Oge=new Set(["table","tbody","thead","tfoot","tr"]),Pge=new Set(["td","th"]),f5="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Ige(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=Uge(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=Hge(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"?fp:YL,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=d5(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function d5(e,t,n){if(t.type==="element")return Lge(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Nge(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Fge(e,t,n);if(t.type==="mdxjsEsm")return jge(e,t);if(t.type==="root")return zge(e,t,n);if(t.type==="text")return Bge(e,t)}function Lge(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=fp,e.schema=i),e.ancestors.push(t);const o=p5(e,t.tagName,!1),a=qge(e,t);let l=Gk(e,t);return Oge.has(t.tagName)&&(l=l.filter(function(c){return typeof c=="string"?!jb(c):!0})),h5(e,a,o,t),Vk(a,l),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function Nge(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)}Wh(e,t.position)}function jge(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Wh(e,t.position)}function Fge(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=fp,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:p5(e,t.name,!0),a=Vge(e,t),l=Gk(e,t);return h5(e,a,o,t),Vk(a,l),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function zge(e,t,n){const r={};return Vk(r,Gk(e,t)),e.create(t,e.Fragment,r,n)}function Bge(e,t){return t.value}function h5(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Vk(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Hge(e,t,n){return r;function r(i,o,a,l){const f=Array.isArray(a.children)?n:t;return l?f(o,a,l):f(o,a)}}function Uge(e,t){return n;function n(r,i,o,a){const l=Array.isArray(o.children),c=Uk(r);return t(i,o,a,l,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function qge(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&qk.call(t.properties,i)){const o=Gge(e,i,t.properties[i]);if(o){const[a,l]=o;e.tableCellAlignToStyle&&a==="align"&&typeof l=="string"&&Pge.has(t.tagName)?r=l:n[a]=l}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Vge(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 l=a.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else Wh(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 l=r.value.data.estree.body[0];l.type,o=e.evaluater.evaluateExpression(l.expression)}else Wh(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function Gk(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Mge;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 l=d5(e,o,a);l!==void 0&&n.push(l)}return n}function Gge(e,t,n){const r=GL(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?KL(n):XL(n)),r.property==="style"){let i=typeof n=="object"?n:Yge(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Wge(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?kee[r.property]||r.property:r.attribute,n]}}function Yge(e,t){try{return _ge(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new yr("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=f5+"#cannot-parse-style-attribute",i}}function p5(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 l=PO(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};a=a?{type:"MemberExpression",object:a,property:l,computed:!!(o&&l.type==="Literal"),optional:!1}:l}r=a}else r=PO(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return qk.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Wh(e)}function Wh(e,t){const n=new yr("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=f5+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Wge(e){const t={};let n;for(n in e)qk.call(e,n)&&(t[Kge(n)]=e[n]);return t}function Kge(e){let t=e.replace($ge,Xge);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Xge(e){return"-"+e.toLowerCase()}const hw={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"]},Qge={};function Yk(e,t){const n=Qge,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return m5(e,r,i)}function m5(e,t,n){if(Zge(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 BO(e.children,t,n)}return Array.isArray(e)?BO(e,t,n):""}function BO(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=m5(e[i],t,n);return r.join("")}function Zge(e){return!!(e&&typeof e=="object")}const HO=document.createElement("i");function Wk(e){const t="&"+e+";";HO.innerHTML=t;const n=HO.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function pi(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 zi(e,t){return e.length>0?(pi(e,e.length,0,t),e):t}const UO={}.hasOwnProperty;function g5(e){const t={};let n=-1;for(;++n<e.length;)Jge(t,e[n]);return t}function Jge(e,t){let n;for(n in t){const i=(UO.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let a;if(o)for(a in o){UO.call(i,a)||(i[a]=[]);const l=o[a];eye(i[a],Array.isArray(l)?l:l?[l]:[])}}}function eye(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);pi(e,0,0,r)}function y5(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 lo(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Cr=yl(/[A-Za-z]/),pr=yl(/[\dA-Za-z]/),tye=yl(/[#-'*+\--9=?A-Z^-~]/);function pb(e){return e!==null&&(e<32||e===127)}const xE=yl(/\d/),nye=yl(/[\dA-Fa-f]/),rye=yl(/[!-/:-@[-`{-~]/);function it(e){return e!==null&&e<-2}function sn(e){return e!==null&&(e<0||e===32)}function _t(e){return e===-2||e===-1||e===32}const xv=yl(new RegExp("\\p{P}|\\p{S}","u")),Tu=yl(/\s/);function yl(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Kf(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let a="";if(o===37&&pr(e.charCodeAt(n+1))&&pr(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 l=e.charCodeAt(n+1);o<56320&&l>56319&&l<57344?(a=String.fromCharCode(o,l),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 Nt(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(c){return _t(c)?(e.enter(n),l(c)):t(c)}function l(c){return _t(c)&&o++<i?(e.consume(c),l):(e.exit(n),t(c))}}const iye={tokenize:oye};function oye(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Nt(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),o(l)}function o(l){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,a(l)}function a(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return it(l)?(e.consume(l),e.exit("chunkText"),o):(e.consume(l),a)}}const sye={tokenize:aye},qO={tokenize:lye};function aye(e){const t=this,n=[];let r=0,i,o,a;return l;function l(C){if(r<n.length){const R=n[r];return t.containerState=R[1],e.attempt(R[0].continuation,c,f)(C)}return f(C)}function c(C){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&k();const R=t.events.length;let _=R,D;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){D=t.events[_][1].end;break}x(r);let M=R;for(;M<t.events.length;)t.events[M][1].end={...D},M++;return pi(t.events,_+1,0,t.events.slice(R)),t.events.length=M,f(C)}return l(C)}function f(C){if(r===n.length){if(!i)return m(C);if(i.currentConstruct&&i.currentConstruct.concrete)return b(C);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(qO,h,p)(C)}function h(C){return i&&k(),x(r),m(C)}function p(C){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,b(C)}function m(C){return t.containerState={},e.attempt(qO,g,b)(C)}function g(C){return r++,n.push([t.currentConstruct,t.containerState]),m(C)}function b(C){if(C===null){i&&k(),x(0),e.consume(C);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),v(C)}function v(C){if(C===null){w(e.exit("chunkFlow"),!0),x(0),e.consume(C);return}return it(C)?(e.consume(C),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(C),v)}function w(C,R){const _=t.sliceStream(C);if(R&&_.push(null),C.previous=o,o&&(o.next=C),o=C,i.defineSkip(C.start),i.write(_),t.parser.lazy[C.start.line]){let D=i.events.length;for(;D--;)if(i.events[D][1].start.offset<a&&(!i.events[D][1].end||i.events[D][1].end.offset>a))return;const M=t.events.length;let O=M,U,L;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){if(U){L=t.events[O][1].end;break}U=!0}for(x(r),D=M;D<t.events.length;)t.events[D][1].end={...L},D++;pi(t.events,O+1,0,t.events.slice(M)),t.events.length=D}}function x(C){let R=n.length;for(;R-- >C;){const _=n[R];t.containerState=_[1],_[0].exit.call(t,e)}n.length=C}function k(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function lye(e,t,n){return Nt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Of(e){if(e===null||sn(e)||Tu(e))return 1;if(xv(e))return 2}function wv(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 wE={name:"attention",resolveAll:uye,tokenize:cye};function uye(e,t){let n=-1,r,i,o,a,l,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},m={...e[n][1].start};VO(p,-c),VO(m,c),a={type:c>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:m},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:{...l.end}},e[r][1].end={...a.start},e[n][1].start={...l.end},f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=zi(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=zi(f,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",o,t]]),f=zi(f,wv(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=zi(f,[["exit",o,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,f=zi(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,pi(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 cye(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Of(r);let o;return a;function a(c){return o=c,e.enter("attentionSequence"),l(c)}function l(c){if(c===o)return e.consume(c),l;const f=e.exit("attentionSequence"),h=Of(c),p=!h||h===2&&i||n.includes(c),m=!i||i===2&&h||n.includes(r);return f._open=!!(o===42?p:p&&(i||!m)),f._close=!!(o===42?m:m&&(h||!p)),t(c)}}function VO(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const fye={name:"autolink",tokenize:dye};function dye(e,t,n){let r=0;return i;function i(g){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(g){return Cr(g)?(e.consume(g),a):g===64?n(g):f(g)}function a(g){return g===43||g===45||g===46||pr(g)?(r=1,l(g)):f(g)}function l(g){return g===58?(e.consume(g),r=0,c):(g===43||g===45||g===46||pr(g))&&r++<32?(e.consume(g),l):(r=0,f(g))}function c(g){return g===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),t):g===null||g===32||g===60||pb(g)?n(g):(e.consume(g),c)}function f(g){return g===64?(e.consume(g),h):tye(g)?(e.consume(g),f):n(g)}function h(g){return pr(g)?p(g):n(g)}function p(g){return g===46?(e.consume(g),r=0,h):g===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),t):m(g)}function m(g){if((g===45||pr(g))&&r++<63){const b=g===45?m:p;return e.consume(g),b}return n(g)}}const Ep={partial:!0,tokenize:hye};function hye(e,t,n){return r;function r(o){return _t(o)?Nt(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||it(o)?t(o):n(o)}}const b5={continuation:{tokenize:mye},exit:gye,name:"blockQuote",tokenize:pye};function pye(e,t,n){const r=this;return i;function i(a){if(a===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),o}return n(a)}function o(a){return _t(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function mye(e,t,n){const r=this;return i;function i(a){return _t(a)?Nt(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return e.attempt(b5,t,n)(a)}}function gye(e){e.exit("blockQuote")}const v5={name:"characterEscape",tokenize:yye};function yye(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 rye(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const x5={name:"characterReference",tokenize:bye};function bye(e,t,n){const r=this;let i=0,o,a;return l;function l(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=pr,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=nye,h):(e.enter("characterReferenceValue"),o=7,a=xE,h(p))}function h(p){if(p===59&&i){const m=e.exit("characterReferenceValue");return a===pr&&!Wk(r.sliceSerialize(m))?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 GO={partial:!0,tokenize:xye},YO={concrete:!0,name:"codeFenced",tokenize:vye};function vye(e,t,n){const r=this,i={partial:!0,tokenize:_};let o=0,a=0,l;return c;function c(D){return f(D)}function f(D){const M=r.events[r.events.length-1];return o=M&&M[1].type==="linePrefix"?M[2].sliceSerialize(M[1],!0).length:0,l=D,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(D)}function h(D){return D===l?(a++,e.consume(D),h):a<3?n(D):(e.exit("codeFencedFenceSequence"),_t(D)?Nt(e,p,"whitespace")(D):p(D))}function p(D){return D===null||it(D)?(e.exit("codeFencedFence"),r.interrupt?t(D):e.check(GO,v,R)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(D))}function m(D){return D===null||it(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(D)):_t(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Nt(e,g,"whitespace")(D)):D===96&&D===l?n(D):(e.consume(D),m)}function g(D){return D===null||it(D)?p(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(D))}function b(D){return D===null||it(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(D)):D===96&&D===l?n(D):(e.consume(D),b)}function v(D){return e.attempt(i,R,w)(D)}function w(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),x}function x(D){return o>0&&_t(D)?Nt(e,k,"linePrefix",o+1)(D):k(D)}function k(D){return D===null||it(D)?e.check(GO,v,R)(D):(e.enter("codeFlowValue"),C(D))}function C(D){return D===null||it(D)?(e.exit("codeFlowValue"),k(D)):(e.consume(D),C)}function R(D){return e.exit("codeFenced"),t(D)}function _(D,M,O){let U=0;return L;function L(F){return D.enter("lineEnding"),D.consume(F),D.exit("lineEnding"),I}function I(F){return D.enter("codeFencedFence"),_t(F)?Nt(D,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):$(F)}function $(F){return F===l?(D.enter("codeFencedFenceSequence"),B(F)):O(F)}function B(F){return F===l?(U++,D.consume(F),B):U>=a?(D.exit("codeFencedFenceSequence"),_t(F)?Nt(D,V,"whitespace")(F):V(F)):O(F)}function V(F){return F===null||it(F)?(D.exit("codeFencedFence"),M(F)):O(F)}}}function xye(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 pw={name:"codeIndented",tokenize:Sye},wye={partial:!0,tokenize:Eye};function Sye(e,t,n){const r=this;return i;function i(f){return e.enter("codeIndented"),Nt(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):it(f)?e.attempt(wye,a,c)(f):(e.enter("codeFlowValue"),l(f))}function l(f){return f===null||it(f)?(e.exit("codeFlowValue"),a(f)):(e.consume(f),l)}function c(f){return e.exit("codeIndented"),t(f)}}function Eye(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):it(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):Nt(e,o,"linePrefix",5)(a)}function o(a){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(a):it(a)?i(a):n(a)}}const Cye={name:"codeText",previous:Rye,resolve:kye,tokenize:Aye};function kye(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 Rye(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Aye(e,t,n){let r=0,i,o;return a;function a(p){return e.enter("codeText"),e.enter("codeTextSequence"),l(p)}function l(p){return p===96?(e.consume(p),r++,l):(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)):it(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||it(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 Tye{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&&eh(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),eh(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),eh(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);eh(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);eh(this.left,n.reverse())}}}function eh(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 w5(e){const t={};let n=-1,r,i,o,a,l,c,f;const h=new Tye(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,_ye(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},l=h.slice(i,n),l.unshift(r),h.splice(i,n-i+1,l))}}return pi(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!f}function _ye(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 l=a.events,c=[],f={};let h,p,m=-1,g=n,b=0,v=0;const w=[v];for(;g;){for(;e.get(++i)[1]!==g;);o.push(i),g._tokenizer||(h=r.sliceStream(g),g.next||h.push(null),p&&a.defineSkip(g.start),g._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(h),g._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),p=g,g=g.next}for(g=n;++m<l.length;)l[m][0]==="exit"&&l[m-1][0]==="enter"&&l[m][1].type===l[m-1][1].type&&l[m][1].start.line!==l[m][1].end.line&&(v=m+1,w.push(v),g._tokenizer=void 0,g.previous=void 0,g=g.next);for(a.events=[],g?(g._tokenizer=void 0,g.previous=void 0):w.pop(),m=w.length;m--;){const x=l.slice(w[m],w[m+1]),k=o.pop();c.push([k,k+x.length-1]),e.splice(k,2,x)}for(c.reverse(),m=-1;++m<c.length;)f[b+c[m][0]]=b+c[m][1],b+=c[m][1]-c[m][0]-1;return f}const Dye={resolve:$ye,tokenize:Oye},Mye={partial:!0,tokenize:Pye};function $ye(e){return w5(e),e}function Oye(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?o(l):it(l)?e.check(Mye,a,o)(l):(e.consume(l),i)}function o(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function a(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Pye(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Nt(e,o,"linePrefix")}function o(a){if(a===null||it(a))return n(a);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function S5(e,t,n,r,i,o,a,l,c){const f=c||Number.POSITIVE_INFINITY;let h=0;return p;function p(x){return x===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(x),e.exit(o),m):x===null||x===32||x===41||pb(x)?n(x):(e.enter(r),e.enter(a),e.enter(l),e.enter("chunkString",{contentType:"string"}),v(x))}function m(x){return x===62?(e.enter(o),e.consume(x),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),g(x))}function g(x){return x===62?(e.exit("chunkString"),e.exit(l),m(x)):x===null||x===60||it(x)?n(x):(e.consume(x),x===92?b:g)}function b(x){return x===60||x===62||x===92?(e.consume(x),g):g(x)}function v(x){return!h&&(x===null||x===41||sn(x))?(e.exit("chunkString"),e.exit(l),e.exit(a),e.exit(r),t(x)):h<f&&x===40?(e.consume(x),h++,v):x===41?(e.consume(x),h--,v):x===null||x===32||x===40||pb(x)?n(x):(e.consume(x),x===92?w:v)}function w(x){return x===40||x===41||x===92?(e.consume(x),v):v(x)}}function E5(e,t,n,r,i,o){const a=this;let l=0,c;return f;function f(g){return e.enter(r),e.enter(i),e.consume(g),e.exit(i),e.enter(o),h}function h(g){return l>999||g===null||g===91||g===93&&!c||g===94&&!l&&"_hiddenFootnoteSupport"in a.parser.constructs?n(g):g===93?(e.exit(o),e.enter(i),e.consume(g),e.exit(i),e.exit(r),t):it(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===null||g===91||g===93||it(g)||l++>999?(e.exit("chunkString"),h(g)):(e.consume(g),c||(c=!_t(g)),g===92?m:p)}function m(g){return g===91||g===92||g===93?(e.consume(g),l++,p):p(g)}}function C5(e,t,n,r,i,o){let a;return l;function l(m){return m===34||m===39||m===40?(e.enter(r),e.enter(i),e.consume(m),e.exit(i),a=m===40?41:m,c):n(m)}function c(m){return m===a?(e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):(e.enter(o),f(m))}function f(m){return m===a?(e.exit(o),c(a)):m===null?n(m):it(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),Nt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(m))}function h(m){return m===a||m===null||it(m)?(e.exit("chunkString"),f(m)):(e.consume(m),m===92?p:h)}function p(m){return m===a||m===92?(e.consume(m),h):h(m)}}function Ch(e,t){let n;return r;function r(i){return it(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):_t(i)?Nt(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Iye={name:"definition",tokenize:Nye},Lye={partial:!0,tokenize:jye};function Nye(e,t,n){const r=this;let i;return o;function o(g){return e.enter("definition"),a(g)}function a(g){return E5.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function l(g){return i=lo(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),c):n(g)}function c(g){return sn(g)?Ch(e,f)(g):f(g)}function f(g){return S5(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function h(g){return e.attempt(Lye,p,p)(g)}function p(g){return _t(g)?Nt(e,m,"whitespace")(g):m(g)}function m(g){return g===null||it(g)?(e.exit("definition"),r.parser.defined.push(i),t(g)):n(g)}}function jye(e,t,n){return r;function r(l){return sn(l)?Ch(e,i)(l):n(l)}function i(l){return C5(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function o(l){return _t(l)?Nt(e,a,"whitespace")(l):a(l)}function a(l){return l===null||it(l)?t(l):n(l)}}const Fye={name:"hardBreakEscape",tokenize:zye};function zye(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return it(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Bye={name:"headingAtx",resolve:Hye,tokenize:Uye};function Hye(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"},pi(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Uye(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||sn(h)?(e.exit("atxHeadingSequence"),l(h)):n(h)}function l(h){return h===35?(e.enter("atxHeadingSequence"),c(h)):h===null||it(h)?(e.exit("atxHeading"),t(h)):_t(h)?Nt(e,l,"whitespace")(h):(e.enter("atxHeadingText"),f(h))}function c(h){return h===35?(e.consume(h),c):(e.exit("atxHeadingSequence"),l(h))}function f(h){return h===null||h===35||sn(h)?(e.exit("atxHeadingText"),l(h)):(e.consume(h),f)}}const qye=["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"],WO=["pre","script","style","textarea"],Vye={concrete:!0,name:"htmlFlow",resolveTo:Wye,tokenize:Kye},Gye={partial:!0,tokenize:Qye},Yye={partial:!0,tokenize:Xye};function Wye(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 Kye(e,t,n){const r=this;let i,o,a,l,c;return f;function f(q){return h(q)}function h(q){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(q),p}function p(q){return q===33?(e.consume(q),m):q===47?(e.consume(q),o=!0,v):q===63?(e.consume(q),i=3,r.interrupt?t:P):Cr(q)?(e.consume(q),a=String.fromCharCode(q),w):n(q)}function m(q){return q===45?(e.consume(q),i=2,g):q===91?(e.consume(q),i=5,l=0,b):Cr(q)?(e.consume(q),i=4,r.interrupt?t:P):n(q)}function g(q){return q===45?(e.consume(q),r.interrupt?t:P):n(q)}function b(q){const ae="CDATA[";return q===ae.charCodeAt(l++)?(e.consume(q),l===ae.length?r.interrupt?t:$:b):n(q)}function v(q){return Cr(q)?(e.consume(q),a=String.fromCharCode(q),w):n(q)}function w(q){if(q===null||q===47||q===62||sn(q)){const ae=q===47,re=a.toLowerCase();return!ae&&!o&&WO.includes(re)?(i=1,r.interrupt?t(q):$(q)):qye.includes(a.toLowerCase())?(i=6,ae?(e.consume(q),x):r.interrupt?t(q):$(q)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(q):o?k(q):C(q))}return q===45||pr(q)?(e.consume(q),a+=String.fromCharCode(q),w):n(q)}function x(q){return q===62?(e.consume(q),r.interrupt?t:$):n(q)}function k(q){return _t(q)?(e.consume(q),k):L(q)}function C(q){return q===47?(e.consume(q),L):q===58||q===95||Cr(q)?(e.consume(q),R):_t(q)?(e.consume(q),C):L(q)}function R(q){return q===45||q===46||q===58||q===95||pr(q)?(e.consume(q),R):_(q)}function _(q){return q===61?(e.consume(q),D):_t(q)?(e.consume(q),_):C(q)}function D(q){return q===null||q===60||q===61||q===62||q===96?n(q):q===34||q===39?(e.consume(q),c=q,M):_t(q)?(e.consume(q),D):O(q)}function M(q){return q===c?(e.consume(q),c=null,U):q===null||it(q)?n(q):(e.consume(q),M)}function O(q){return q===null||q===34||q===39||q===47||q===60||q===61||q===62||q===96||sn(q)?_(q):(e.consume(q),O)}function U(q){return q===47||q===62||_t(q)?C(q):n(q)}function L(q){return q===62?(e.consume(q),I):n(q)}function I(q){return q===null||it(q)?$(q):_t(q)?(e.consume(q),I):n(q)}function $(q){return q===45&&i===2?(e.consume(q),z):q===60&&i===1?(e.consume(q),j):q===62&&i===4?(e.consume(q),K):q===63&&i===3?(e.consume(q),P):q===93&&i===5?(e.consume(q),X):it(q)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Gye,ee,B)(q)):q===null||it(q)?(e.exit("htmlFlowData"),B(q)):(e.consume(q),$)}function B(q){return e.check(Yye,V,ee)(q)}function V(q){return e.enter("lineEnding"),e.consume(q),e.exit("lineEnding"),F}function F(q){return q===null||it(q)?B(q):(e.enter("htmlFlowData"),$(q))}function z(q){return q===45?(e.consume(q),P):$(q)}function j(q){return q===47?(e.consume(q),a="",H):$(q)}function H(q){if(q===62){const ae=a.toLowerCase();return WO.includes(ae)?(e.consume(q),K):$(q)}return Cr(q)&&a.length<8?(e.consume(q),a+=String.fromCharCode(q),H):$(q)}function X(q){return q===93?(e.consume(q),P):$(q)}function P(q){return q===62?(e.consume(q),K):q===45&&i===2?(e.consume(q),P):$(q)}function K(q){return q===null||it(q)?(e.exit("htmlFlowData"),ee(q)):(e.consume(q),K)}function ee(q){return e.exit("htmlFlow"),t(q)}}function Xye(e,t,n){const r=this;return i;function i(a){return it(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 Qye(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ep,t,n)}}const Zye={name:"htmlText",tokenize:Jye};function Jye(e,t,n){const r=this;let i,o,a;return l;function l(P){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(P),c}function c(P){return P===33?(e.consume(P),f):P===47?(e.consume(P),_):P===63?(e.consume(P),C):Cr(P)?(e.consume(P),O):n(P)}function f(P){return P===45?(e.consume(P),h):P===91?(e.consume(P),o=0,b):Cr(P)?(e.consume(P),k):n(P)}function h(P){return P===45?(e.consume(P),g):n(P)}function p(P){return P===null?n(P):P===45?(e.consume(P),m):it(P)?(a=p,j(P)):(e.consume(P),p)}function m(P){return P===45?(e.consume(P),g):p(P)}function g(P){return P===62?z(P):P===45?m(P):p(P)}function b(P){const K="CDATA[";return P===K.charCodeAt(o++)?(e.consume(P),o===K.length?v:b):n(P)}function v(P){return P===null?n(P):P===93?(e.consume(P),w):it(P)?(a=v,j(P)):(e.consume(P),v)}function w(P){return P===93?(e.consume(P),x):v(P)}function x(P){return P===62?z(P):P===93?(e.consume(P),x):v(P)}function k(P){return P===null||P===62?z(P):it(P)?(a=k,j(P)):(e.consume(P),k)}function C(P){return P===null?n(P):P===63?(e.consume(P),R):it(P)?(a=C,j(P)):(e.consume(P),C)}function R(P){return P===62?z(P):C(P)}function _(P){return Cr(P)?(e.consume(P),D):n(P)}function D(P){return P===45||pr(P)?(e.consume(P),D):M(P)}function M(P){return it(P)?(a=M,j(P)):_t(P)?(e.consume(P),M):z(P)}function O(P){return P===45||pr(P)?(e.consume(P),O):P===47||P===62||sn(P)?U(P):n(P)}function U(P){return P===47?(e.consume(P),z):P===58||P===95||Cr(P)?(e.consume(P),L):it(P)?(a=U,j(P)):_t(P)?(e.consume(P),U):z(P)}function L(P){return P===45||P===46||P===58||P===95||pr(P)?(e.consume(P),L):I(P)}function I(P){return P===61?(e.consume(P),$):it(P)?(a=I,j(P)):_t(P)?(e.consume(P),I):U(P)}function $(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),i=P,B):it(P)?(a=$,j(P)):_t(P)?(e.consume(P),$):(e.consume(P),V)}function B(P){return P===i?(e.consume(P),i=void 0,F):P===null?n(P):it(P)?(a=B,j(P)):(e.consume(P),B)}function V(P){return P===null||P===34||P===39||P===60||P===61||P===96?n(P):P===47||P===62||sn(P)?U(P):(e.consume(P),V)}function F(P){return P===47||P===62||sn(P)?U(P):n(P)}function z(P){return P===62?(e.consume(P),e.exit("htmlTextData"),e.exit("htmlText"),t):n(P)}function j(P){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),H}function H(P){return _t(P)?Nt(e,X,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):X(P)}function X(P){return e.enter("htmlTextData"),a(P)}}const Kk={name:"labelEnd",resolveAll:rbe,resolveTo:ibe,tokenize:obe},ebe={tokenize:sbe},tbe={tokenize:abe},nbe={tokenize:lbe};function rbe(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&&pi(e,0,e.length,n),e}function ibe(e,t){let n=e.length,r=0,i,o,a,l;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 l=[["enter",c,t],["enter",f,t]],l=zi(l,e.slice(o+1,o+r+3)),l=zi(l,[["enter",h,t]]),l=zi(l,wv(t.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),t)),l=zi(l,[["exit",h,t],e[a-2],e[a-1],["exit",f,t]]),l=zi(l,e.slice(a+1)),l=zi(l,[["exit",c,t]]),pi(e,o,e.length,l),e}function obe(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 l;function l(m){return o?o._inactive?p(m):(a=r.parser.defined.includes(lo(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),c):n(m)}function c(m){return m===40?e.attempt(ebe,h,a?h:p)(m):m===91?e.attempt(tbe,h,a?f:p)(m):a?h(m):p(m)}function f(m){return e.attempt(nbe,h,p)(m)}function h(m){return t(m)}function p(m){return o._balanced=!0,n(m)}}function sbe(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 sn(p)?Ch(e,o)(p):o(p)}function o(p){return p===41?h(p):S5(e,a,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function a(p){return sn(p)?Ch(e,c)(p):h(p)}function l(p){return n(p)}function c(p){return p===34||p===39||p===40?C5(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):h(p)}function f(p){return sn(p)?Ch(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 abe(e,t,n){const r=this;return i;function i(l){return E5.call(r,e,o,a,"reference","referenceMarker","referenceString")(l)}function o(l){return r.parser.defined.includes(lo(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function a(l){return n(l)}}function lbe(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 ube={name:"labelStartImage",resolveAll:Kk.resolveAll,tokenize:cbe};function cbe(e,t,n){const r=this;return i;function i(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),o}function o(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),a):n(l)}function a(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const fbe={name:"labelStartLink",resolveAll:Kk.resolveAll,tokenize:dbe};function dbe(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 mw={name:"lineEnding",tokenize:hbe};function hbe(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Nt(e,t,"linePrefix")}}const iy={name:"thematicBreak",tokenize:pbe};function pbe(e,t,n){let r=0,i;return o;function o(f){return e.enter("thematicBreak"),a(f)}function a(f){return i=f,l(f)}function l(f){return f===i?(e.enter("thematicBreakSequence"),c(f)):r>=3&&(f===null||it(f))?(e.exit("thematicBreak"),t(f)):n(f)}function c(f){return f===i?(e.consume(f),r++,c):(e.exit("thematicBreakSequence"),_t(f)?Nt(e,l,"whitespace")(f):l(f))}}const Ir={continuation:{tokenize:bbe},exit:xbe,name:"list",tokenize:ybe},mbe={partial:!0,tokenize:wbe},gbe={partial:!0,tokenize:vbe};function ybe(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 l;function l(g){const b=r.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||g===r.containerState.marker:xE(g)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(iy,n,f)(g):f(g);if(!r.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(g)}return n(g)}function c(g){return xE(g)&&++a<10?(e.consume(g),c):(!r.interrupt||a<2)&&(r.containerState.marker?g===r.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),f(g)):n(g)}function f(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||g,e.check(Ep,r.interrupt?n:h,e.attempt(mbe,m,p))}function h(g){return r.containerState.initialBlankLine=!0,o++,m(g)}function p(g){return _t(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),m):n(g)}function m(g){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(g)}}function bbe(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ep,i,o);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Nt(e,t,"listItemIndent",r.containerState.size+1)(l)}function o(l){return r.containerState.furtherBlankLines||!_t(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(gbe,t,a)(l))}function a(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,Nt(e,e.attempt(Ir,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function vbe(e,t,n){const r=this;return Nt(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 xbe(e){e.exit(this.containerState.type)}function wbe(e,t,n){const r=this;return Nt(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!_t(o)&&a&&a[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const KO={name:"setextUnderline",resolveTo:Sbe,tokenize:Ebe};function Sbe(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 Ebe(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"),l(f)}function l(f){return f===i?(e.consume(f),l):(e.exit("setextHeadingLineSequence"),_t(f)?Nt(e,c,"lineSuffix")(f):c(f))}function c(f){return f===null||it(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const Cbe={tokenize:kbe};function kbe(e){const t=this,n=e.attempt(Ep,r,e.attempt(this.parser.constructs.flowInitial,i,Nt(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Dye,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 Rbe={resolveAll:R5()},Abe=k5("string"),Tbe=k5("text");function k5(e){return{resolveAll:R5(e==="text"?_be:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,a,l);return a;function a(h){return f(h)?o(h):l(h)}function l(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 m=-1;if(p)for(;++m<p.length;){const g=p[m];if(!g.previous||g.previous.call(r,r.previous))return!0}return!1}}}function R5(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 _be(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,l=0,c;for(;o--;){const f=i[o];if(typeof f=="string"){for(a=f.length;f.charCodeAt(a-1)===32;)l++,a--;if(a)break;a=-1}else if(f===-2)c=!0,l++;else if(f!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const f={type:n===e.length||c||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?a:r.start._bufferIndex+a,_index:r.start._index+o,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},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 Dbe={42:Ir,43:Ir,45:Ir,48:Ir,49:Ir,50:Ir,51:Ir,52:Ir,53:Ir,54:Ir,55:Ir,56:Ir,57:Ir,62:b5},Mbe={91:Iye},$be={[-2]:pw,[-1]:pw,32:pw},Obe={35:Bye,42:iy,45:[KO,iy],60:Vye,61:KO,95:iy,96:YO,126:YO},Pbe={38:x5,92:v5},Ibe={[-5]:mw,[-4]:mw,[-3]:mw,33:ube,38:x5,42:wE,60:[fye,Zye],91:fbe,92:[Fye,v5],93:Kk,95:wE,96:Cye},Lbe={null:[wE,Rbe]},Nbe={null:[42,95]},jbe={null:[]},Fbe=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Nbe,contentInitial:Mbe,disable:jbe,document:Dbe,flow:Obe,flowInitial:$be,insideSpan:Lbe,string:Pbe,text:Ibe},Symbol.toStringTag,{value:"Module"}));function zbe(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=[],l=[];const c={attempt:M(_),check:M(D),consume:k,enter:C,exit:R,interrupt:M(D,{interrupt:!0})},f={code:null,containerState:{},defineSkip:v,events:[],now:b,parser:e,previous:null,sliceSerialize:m,sliceStream:g,write:p};let h=t.tokenize.call(f,c);return t.resolveAll&&o.push(t),f;function p(I){return a=zi(a,I),w(),a[a.length-1]!==null?[]:(O(t,0),f.events=wv(o,f.events,f),f.events)}function m(I,$){return Hbe(g(I),$)}function g(I){return Bbe(a,I)}function b(){const{_bufferIndex:I,_index:$,line:B,column:V,offset:F}=r;return{_bufferIndex:I,_index:$,line:B,column:V,offset:F}}function v(I){i[I.line]=I.column,L()}function w(){let I;for(;r._index<a.length;){const $=a[r._index];if(typeof $=="string")for(I=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===I&&r._bufferIndex<$.length;)x($.charCodeAt(r._bufferIndex));else x($)}}function x(I){h=h(I)}function k(I){it(I)?(r.line++,r.column=1,r.offset+=I===-3?2:1,L()):I!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=I}function C(I,$){const B=$||{};return B.type=I,B.start=b(),f.events.push(["enter",B,f]),l.push(B),B}function R(I){const $=l.pop();return $.end=b(),f.events.push(["exit",$,f]),$}function _(I,$){O(I,$.from)}function D(I,$){$.restore()}function M(I,$){return B;function B(V,F,z){let j,H,X,P;return Array.isArray(V)?ee(V):"tokenize"in V?ee([V]):K(V);function K(fe){return ve;function ve(Re){const le=Re!==null&&fe[Re],Ae=Re!==null&&fe.null,Ie=[...Array.isArray(le)?le:le?[le]:[],...Array.isArray(Ae)?Ae:Ae?[Ae]:[]];return ee(Ie)(Re)}}function ee(fe){return j=fe,H=0,fe.length===0?z:q(fe[H])}function q(fe){return ve;function ve(Re){return P=U(),X=fe,fe.partial||(f.currentConstruct=fe),fe.name&&f.parser.constructs.disable.null.includes(fe.name)?re():fe.tokenize.call($?Object.assign(Object.create(f),$):f,c,ae,re)(Re)}}function ae(fe){return I(X,P),F}function re(fe){return P.restore(),++H<j.length?q(j[H]):z}}}function O(I,$){I.resolveAll&&!o.includes(I)&&o.push(I),I.resolve&&pi(f.events,$,f.events.length-$,I.resolve(f.events.slice($),f)),I.resolveTo&&(f.events=I.resolveTo(f.events,f))}function U(){const I=b(),$=f.previous,B=f.currentConstruct,V=f.events.length,F=Array.from(l);return{from:V,restore:z};function z(){r=I,f.previous=$,f.currentConstruct=B,f.events.length=V,l=F,L()}}function L(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Bbe(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 l=a[0];typeof l=="string"?a[0]=l.slice(r):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}function Hbe(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=`
|
|
518
|
-
`;break}case-3:{a=`\r
|
|
519
|
-
`;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 Ube(e){const r={constructs:g5([Fbe,...(e||{}).extensions||[]]),content:i(iye),defined:[],document:i(sye),flow:i(Cbe),lazy:{},string:i(Abe),text:i(Tbe)};return r;function i(o){return a;function a(l){return zbe(r,o,l)}}}function qbe(e){for(;!w5(e););return e}const XO=/[\0\t\n\r]/g;function Vbe(){let e=1,t="",n=!0,r;return i;function i(o,a,l){const c=[];let f,h,p,m,g;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(XO.lastIndex=p,f=XO.exec(o),m=f&&f.index!==void 0?f.index:o.length,g=o.charCodeAt(m),!f){t=o.slice(p);break}if(g===10&&p===m&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),p<m&&(c.push(o.slice(p,m)),e+=m-p),g){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=m+1}return l&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const Gbe=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ybe(e){return e.replace(Gbe,Wbe)}function Wbe(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return y5(n.slice(o?2:1),o?16:10)}return Wk(n)||e}const A5={}.hasOwnProperty;function Kbe(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Xbe(n)(qbe(Ube(n).document().write(Vbe()(e,t,!0))))}function Xbe(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Z),autolinkProtocol:U,autolinkEmail:U,atxHeading:o(pe),blockQuote:o(Ae),characterEscape:U,characterReference:U,codeFenced:o(Ie),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(Ie,a),codeText:o(Y,a),codeTextData:U,data:U,codeFlowValue:U,definition:o(W),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(Q),hardBreakEscape:o(oe),hardBreakTrailing:o(oe),htmlFlow:o(me,a),htmlFlowData:U,htmlText:o(me,a),htmlTextData:U,image:o(te),label:a,link:o(Z),listItem:o(J),listItemValue:m,listOrdered:o(ie,p),listUnordered:o(ie),paragraph:o(Se),reference:q,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(pe),strong:o(ke),thematicBreak:o(_e)},exit:{atxHeading:c(),atxHeadingSequence:_,autolink:c(),autolinkEmail:le,autolinkProtocol:Re,blockQuote:c(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:re,characterReferenceMarkerNumeric:re,characterReferenceValue:fe,characterReference:ve,codeFenced:c(w),codeFencedFence:v,codeFencedFenceInfo:g,codeFencedFenceMeta:b,codeFlowValue:L,codeIndented:c(x),codeText:c(F),codeTextData:L,data:L,definition:c(),definitionDestinationString:R,definitionLabelString:k,definitionTitleString:C,emphasis:c(),hardBreakEscape:c($),hardBreakTrailing:c($),htmlFlow:c(B),htmlFlowData:L,htmlText:c(V),htmlTextData:L,image:c(j),label:X,labelText:H,lineEnding:I,link:c(z),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ae,resourceDestinationString:P,resourceTitleString:K,resource:ee,setextHeading:c(O),setextHeadingLineSequence:M,setextHeadingText:D,strong:c(),thematicBreak:c()}};T5(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(de){let Ce={type:"root",children:[]};const ye={stack:[Ce],tokenStack:[],config:t,enter:l,exit:f,buffer:a,resume:h,data:n},Me=[];let Pe=-1;for(;++Pe<de.length;)if(de[Pe][1].type==="listOrdered"||de[Pe][1].type==="listUnordered")if(de[Pe][0]==="enter")Me.push(Pe);else{const Ke=Me.pop();Pe=i(de,Ke,Pe)}for(Pe=-1;++Pe<de.length;){const Ke=t[de[Pe][0]];A5.call(Ke,de[Pe][1].type)&&Ke[de[Pe][1].type].call(Object.assign({sliceSerialize:de[Pe][2].sliceSerialize},ye),de[Pe][1])}if(ye.tokenStack.length>0){const Ke=ye.tokenStack[ye.tokenStack.length-1];(Ke[1]||QO).call(ye,void 0,Ke[0])}for(Ce.position={start:ma(de.length>0?de[0][1].start:{line:1,column:1,offset:0}),end:ma(de.length>0?de[de.length-2][1].end:{line:1,column:1,offset:0})},Pe=-1;++Pe<t.transforms.length;)Ce=t.transforms[Pe](Ce)||Ce;return Ce}function i(de,Ce,ye){let Me=Ce-1,Pe=-1,Ke=!1,Et,vt,Le,Be;for(;++Me<=ye;){const $e=de[Me];switch($e[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{$e[0]==="enter"?Pe++:Pe--,Be=void 0;break}case"lineEndingBlank":{$e[0]==="enter"&&(Et&&!Be&&!Pe&&!Le&&(Le=Me),Be=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Be=void 0}if(!Pe&&$e[0]==="enter"&&$e[1].type==="listItemPrefix"||Pe===-1&&$e[0]==="exit"&&($e[1].type==="listUnordered"||$e[1].type==="listOrdered")){if(Et){let Ye=Me;for(vt=void 0;Ye--;){const Je=de[Ye];if(Je[1].type==="lineEnding"||Je[1].type==="lineEndingBlank"){if(Je[0]==="exit")continue;vt&&(de[vt][1].type="lineEndingBlank",Ke=!0),Je[1].type="lineEnding",vt=Ye}else if(!(Je[1].type==="linePrefix"||Je[1].type==="blockQuotePrefix"||Je[1].type==="blockQuotePrefixWhitespace"||Je[1].type==="blockQuoteMarker"||Je[1].type==="listItemIndent"))break}Le&&(!vt||Le<vt)&&(Et._spread=!0),Et.end=Object.assign({},vt?de[vt][1].start:$e[1].end),de.splice(vt||Me,0,["exit",Et,$e[2]]),Me++,ye++}if($e[1].type==="listItemPrefix"){const Ye={type:"listItem",_spread:!1,start:Object.assign({},$e[1].start),end:void 0};Et=Ye,de.splice(Me,0,["enter",Ye,$e[2]]),Me++,ye++,Le=void 0,Be=!0}}}return de[Ce][1]._spread=Ke,ye}function o(de,Ce){return ye;function ye(Me){l.call(this,de(Me),Me),Ce&&Ce.call(this,Me)}}function a(){this.stack.push({type:"fragment",children:[]})}function l(de,Ce,ye){this.stack[this.stack.length-1].children.push(de),this.stack.push(de),this.tokenStack.push([Ce,ye||void 0]),de.position={start:ma(Ce.start),end:void 0}}function c(de){return Ce;function Ce(ye){de&&de.call(this,ye),f.call(this,ye)}}function f(de,Ce){const ye=this.stack.pop(),Me=this.tokenStack.pop();if(Me)Me[0].type!==de.type&&(Ce?Ce.call(this,de,Me[0]):(Me[1]||QO).call(this,de,Me[0]));else throw new Error("Cannot close `"+de.type+"` ("+Eh({start:de.start,end:de.end})+"): it’s not open");ye.position.end=ma(de.end)}function h(){return Yk(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function m(de){if(this.data.expectingFirstListItemValue){const Ce=this.stack[this.stack.length-2];Ce.start=Number.parseInt(this.sliceSerialize(de),10),this.data.expectingFirstListItemValue=void 0}}function g(){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.lang=de}function b(){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.meta=de}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=de.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=de.replace(/(\r?\n|\r)$/g,"")}function k(de){const Ce=this.resume(),ye=this.stack[this.stack.length-1];ye.label=Ce,ye.identifier=lo(this.sliceSerialize(de)).toLowerCase()}function C(){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.title=de}function R(){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.url=de}function _(de){const Ce=this.stack[this.stack.length-1];if(!Ce.depth){const ye=this.sliceSerialize(de).length;Ce.depth=ye}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function M(de){const Ce=this.stack[this.stack.length-1];Ce.depth=this.sliceSerialize(de).codePointAt(0)===61?1:2}function O(){this.data.setextHeadingSlurpLineEnding=void 0}function U(de){const ye=this.stack[this.stack.length-1].children;let Me=ye[ye.length-1];(!Me||Me.type!=="text")&&(Me=ge(),Me.position={start:ma(de.start),end:void 0},ye.push(Me)),this.stack.push(Me)}function L(de){const Ce=this.stack.pop();Ce.value+=this.sliceSerialize(de),Ce.position.end=ma(de.end)}function I(de){const Ce=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ye=Ce.children[Ce.children.length-1];ye.position.end=ma(de.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Ce.type)&&(U.call(this,de),L.call(this,de))}function $(){this.data.atHardBreak=!0}function B(){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=de}function V(){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=de}function F(){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=de}function z(){const de=this.stack[this.stack.length-1];if(this.data.inReference){const Ce=this.data.referenceType||"shortcut";de.type+="Reference",de.referenceType=Ce,delete de.url,delete de.title}else delete de.identifier,delete de.label;this.data.referenceType=void 0}function j(){const de=this.stack[this.stack.length-1];if(this.data.inReference){const Ce=this.data.referenceType||"shortcut";de.type+="Reference",de.referenceType=Ce,delete de.url,delete de.title}else delete de.identifier,delete de.label;this.data.referenceType=void 0}function H(de){const Ce=this.sliceSerialize(de),ye=this.stack[this.stack.length-2];ye.label=Ybe(Ce),ye.identifier=lo(Ce).toLowerCase()}function X(){const de=this.stack[this.stack.length-1],Ce=this.resume(),ye=this.stack[this.stack.length-1];if(this.data.inReference=!0,ye.type==="link"){const Me=de.children;ye.children=Me}else ye.alt=Ce}function P(){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.url=de}function K(){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.title=de}function ee(){this.data.inReference=void 0}function q(){this.data.referenceType="collapsed"}function ae(de){const Ce=this.resume(),ye=this.stack[this.stack.length-1];ye.label=Ce,ye.identifier=lo(this.sliceSerialize(de)).toLowerCase(),this.data.referenceType="full"}function re(de){this.data.characterReferenceType=de.type}function fe(de){const Ce=this.sliceSerialize(de),ye=this.data.characterReferenceType;let Me;ye?(Me=y5(Ce,ye==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Me=Wk(Ce);const Pe=this.stack[this.stack.length-1];Pe.value+=Me}function ve(de){const Ce=this.stack.pop();Ce.position.end=ma(de.end)}function Re(de){L.call(this,de);const Ce=this.stack[this.stack.length-1];Ce.url=this.sliceSerialize(de)}function le(de){L.call(this,de);const Ce=this.stack[this.stack.length-1];Ce.url="mailto:"+this.sliceSerialize(de)}function Ae(){return{type:"blockquote",children:[]}}function Ie(){return{type:"code",lang:null,meta:null,value:""}}function Y(){return{type:"inlineCode",value:""}}function W(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Q(){return{type:"emphasis",children:[]}}function pe(){return{type:"heading",depth:0,children:[]}}function oe(){return{type:"break"}}function me(){return{type:"html",value:""}}function te(){return{type:"image",title:null,url:"",alt:null}}function Z(){return{type:"link",title:null,url:"",children:[]}}function ie(de){return{type:"list",ordered:de.type==="listOrdered",start:null,spread:de._spread,children:[]}}function J(de){return{type:"listItem",spread:de._spread,checked:null,children:[]}}function Se(){return{type:"paragraph",children:[]}}function ke(){return{type:"strong",children:[]}}function ge(){return{type:"text",value:""}}function _e(){return{type:"thematicBreak"}}}function ma(e){return{line:e.line,column:e.column,offset:e.offset}}function T5(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?T5(e,r):Qbe(e,r)}}function Qbe(e,t){let n;for(n in t)if(A5.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 QO(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Eh({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Eh({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Eh({start:t.start,end:t.end})+") is still open")}function Zbe(e){const t=this;t.parser=n;function n(r){return Kbe(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Jbe(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 eve(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
520
|
-
`}]}function tve(e,t){const n=t.value?t.value+`
|
|
521
|
-
`:"",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 nve(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function rve(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ive(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Kf(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let a,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=o+1,l+=1,e.footnoteCounts.set(r,l);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(l>1?"-"+l:""),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 ove(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 sve(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function _5(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 ave(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return _5(e,t);const i={src:Kf(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 lve(e,t){const n={src:Kf(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 uve(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 cve(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return _5(e,t);const i={href:Kf(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 fve(e,t){const n={href:Kf(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 dve(e,t,n){const r=e.all(t),i=n?hve(n):D5(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 l=-1;for(;++l<r.length;){const h=r[l];(i||l!==0||h.type!=="element"||h.tagName!=="p")&&a.push({type:"text",value:`
|
|
522
|
-
`}),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:`
|
|
523
|
-
`});const f={type:"element",tagName:"li",properties:o,children:a};return e.patch(t,f),e.applyData(t,f)}function hve(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=D5(n[r])}return t}function D5(e){const t=e.spread;return t??e.children.length>1}function pve(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 mve(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function gve(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function yve(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function bve(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)},l=Uk(t.children[1]),c=u5(t.children[t.children.length-1]);l&&c&&(a.position={start:l,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 vve(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,l=a?a.length:t.children.length;let c=-1;const f=[];for(;++c<l;){const p=t.children[c],m={},g=a?a[c]:void 0;g&&(m.align=g);let b={type:"element",tagName:o,properties:m,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 xve(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const ZO=9,JO=32;function wve(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(e3(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(e3(t.slice(i),i>0,!1)),o.join("")}function e3(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===ZO||o===JO;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===ZO||o===JO;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Sve(e,t){const n={type:"text",value:wve(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Eve(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Cve={blockquote:Jbe,break:eve,code:tve,delete:nve,emphasis:rve,footnoteReference:ive,heading:ove,html:sve,imageReference:ave,image:lve,inlineCode:uve,linkReference:cve,link:fve,listItem:dve,list:pve,paragraph:mve,root:gve,strong:yve,table:bve,tableCell:xve,tableRow:vve,text:Sve,thematicBreak:Eve,toml:$g,yaml:$g,definition:$g,footnoteDefinition:$g};function $g(){}const M5=-1,Sv=0,kh=1,mb=2,Xk=3,Qk=4,Zk=5,Jk=6,$5=7,O5=8,t3=typeof self=="object"?self:globalThis,kve=(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 Sv:case M5:return n(a,i);case kh:{const l=n([],i);for(const c of a)l.push(r(c));return l}case mb:{const l=n({},i);for(const[c,f]of a)l[r(c)]=r(f);return l}case Xk:return n(new Date(a),i);case Qk:{const{source:l,flags:c}=a;return n(new RegExp(l,c),i)}case Zk:{const l=n(new Map,i);for(const[c,f]of a)l.set(r(c),r(f));return l}case Jk:{const l=n(new Set,i);for(const c of a)l.add(r(c));return l}case $5:{const{name:l,message:c}=a;return n(new t3[l](c),i)}case O5: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:l}=new Uint8Array(a);return n(new DataView(l),a)}}return n(new t3[o](a),i)};return r},n3=e=>kve(new Map,e)(0),Tc="",{toString:Rve}={},{keys:Ave}=Object,th=e=>{const t=typeof e;if(t!=="object"||!e)return[Sv,t];const n=Rve.call(e).slice(8,-1);switch(n){case"Array":return[kh,Tc];case"Object":return[mb,Tc];case"Date":return[Xk,Tc];case"RegExp":return[Qk,Tc];case"Map":return[Zk,Tc];case"Set":return[Jk,Tc];case"DataView":return[kh,n]}return n.includes("Array")?[kh,n]:n.includes("Error")?[$5,n]:[mb,n]},Og=([e,t])=>e===Sv&&(t==="function"||t==="symbol"),Tve=(e,t,n,r)=>{const i=(a,l)=>{const c=r.push(a)-1;return n.set(l,c),c},o=a=>{if(n.has(a))return n.get(a);let[l,c]=th(a);switch(l){case Sv:{let h=a;switch(c){case"bigint":l=O5,h=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);h=null;break;case"undefined":return i([M5],a)}return i([l,h],a)}case kh:{if(c){let m=a;return c==="DataView"?m=new Uint8Array(a.buffer):c==="ArrayBuffer"&&(m=new Uint8Array(a)),i([c,[...m]],a)}const h=[],p=i([l,h],a);for(const m of a)h.push(o(m));return p}case mb:{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([l,h],a);for(const m of Ave(a))(e||!Og(th(a[m])))&&h.push([o(m),o(a[m])]);return p}case Xk:return i([l,a.toISOString()],a);case Qk:{const{source:h,flags:p}=a;return i([l,{source:h,flags:p}],a)}case Zk:{const h=[],p=i([l,h],a);for(const[m,g]of a)(e||!(Og(th(m))||Og(th(g))))&&h.push([o(m),o(g)]);return p}case Jk:{const h=[],p=i([l,h],a);for(const m of a)(e||!Og(th(m)))&&h.push(o(m));return p}}const{message:f}=a;return i([l,{name:c,message:f}],a)};return o},r3=(e,{json:t,lossy:n}={})=>{const r=[];return Tve(!(t||n),!!t,new Map,r)(e),r},gb=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?n3(r3(e,t)):structuredClone(e):(e,t)=>n3(r3(e,t));function _ve(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 Dve(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Mve(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||_ve,r=e.options.footnoteBackLabel||Dve,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];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(),m=Kf(p.toLowerCase());let g=0;const b=[],v=e.footnoteCounts.get(p);for(;v!==void 0&&++g<=v;){b.length>0&&b.push({type:"text",value:" "});let k=typeof n=="string"?n:n(c,g);typeof k=="string"&&(k={type:"text",value:k}),b.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+m+(g>1?"-"+g:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,g),className:["data-footnote-backref"]},children:Array.isArray(k)?k:[k]})}const w=h[h.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const k=w.children[w.children.length-1];k&&k.type==="text"?k.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...b)}else h.push(...b);const x={type:"element",tagName:"li",properties:{id:t+"fn-"+m},children:e.wrap(h,!0)};e.patch(f,x),l.push(x)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...gb(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
524
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
|
|
525
|
-
`}]}}const Ev=(function(e){if(e==null)return Ive;if(typeof e=="function")return Cv(e);if(typeof e=="object")return Array.isArray(e)?$ve(e):Ove(e);if(typeof e=="string")return Pve(e);throw new Error("Expected function, string, or object as test")});function $ve(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ev(e[n]);return Cv(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function Ove(e){const t=e;return Cv(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function Pve(e){return Cv(t);function t(n){return n&&n.type===e}}function Cv(e){return t;function t(n,r,i){return!!(Lve(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Ive(){return!0}function Lve(e){return e!==null&&typeof e=="object"&&"type"in e}const P5=[],Nve=!0,SE=!1,jve="skip";function I5(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=Ev(i),a=r?-1:1;l(e,void 0,[])();function l(c,f,h){const p=c&&typeof c=="object"?c:{};if(typeof p.type=="string"){const g=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(c.type+(g?"<"+g+">":""))+")"})}return m;function m(){let g=P5,b,v,w;if((!t||o(c,f,h[h.length-1]||void 0))&&(g=Fve(n(c,h)),g[0]===SE))return g;if("children"in c&&c.children){const x=c;if(x.children&&g[0]!==jve)for(v=(r?x.children.length:-1)+a,w=h.concat(x);v>-1&&v<x.children.length;){const k=x.children[v];if(b=l(k,v,w)(),b[0]===SE)return b;v=typeof b[1]=="number"?b[1]:v+a}}return g}}}function Fve(e){return Array.isArray(e)?e:typeof e=="number"?[Nve,e]:e==null?P5:[e]}function kv(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),I5(e,o,l,i);function l(c,f){const h=f[f.length-1],p=h?h.children.indexOf(c):void 0;return a(c,p,h)}}const EE={}.hasOwnProperty,zve={};function Bve(e,t){const n=t||zve,r=new Map,i=new Map,o=new Map,a={...Cve,...n.handlers},l={all:f,applyData:Uve,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:a,one:c,options:n,patch:Hve,wrap:Vve};return kv(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const p=h.type==="definition"?r:i,m=String(h.identifier).toUpperCase();p.has(m)||p.set(m,h)}}),l;function c(h,p){const m=h.type,g=l.handlers[m];if(EE.call(l.handlers,m)&&g)return g(l,h,p);if(l.options.passThrough&&l.options.passThrough.includes(m)){if("children"in h){const{children:v,...w}=h,x=gb(w);return x.children=l.all(h),x}return gb(h)}return(l.options.unknownHandler||qve)(l,h,p)}function f(h){const p=[];if("children"in h){const m=h.children;let g=-1;for(;++g<m.length;){const b=l.one(m[g],h);if(b){if(g&&m[g-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=i3(b.value)),!Array.isArray(b)&&b.type==="element")){const v=b.children[0];v&&v.type==="text"&&(v.value=i3(v.value))}Array.isArray(b)?p.push(...b):p.push(b)}}}return p}}function Hve(e,t){e.position&&(t.position=Dge(e))}function Uve(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,gb(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function qve(e,t){const n=t.data||{},r="value"in t&&!(EE.call(n,"hProperties")||EE.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 Vve(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
526
|
-
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
527
|
-
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
528
|
-
`}),n}function i3(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function o3(e,t){const n=Bve(e,t),r=n.one(e,void 0),i=Mve(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
|
|
529
|
-
`},i),o}function Gve(e,t){return e&&"run"in e?async function(n,r){const i=o3(n,{file:r,...t});await e.run(i,r)}:function(n,r){return o3(n,{file:r,...e||t})}}function s3(e){if(e)throw e}var gw,a3;function Yve(){if(a3)return gw;a3=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 m;for(m in f);return typeof m>"u"||e.call(f,m)},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},l=function(f,h){if(h==="__proto__")if(e.call(f,h)){if(r)return r(f,h).value}else return;return f[h]};return gw=function c(){var f,h,p,m,g,b,v=arguments[0],w=1,x=arguments.length,k=!1;for(typeof v=="boolean"&&(k=v,v=arguments[1]||{},w=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});w<x;++w)if(f=arguments[w],f!=null)for(h in f)p=l(v,h),m=l(f,h),v!==m&&(k&&m&&(o(m)||(g=i(m)))?(g?(g=!1,b=p&&i(p)?p:[]):b=p&&o(p)?p:{},a(v,{name:h,newValue:c(k,b,m)})):typeof m<"u"&&a(v,{name:h,newValue:m}));return v},gw}var Wve=Yve();const yw=DE(Wve);function CE(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 Kve(){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);l(null,...i);function l(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?Xve(h,l)(...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 Xve(e,t){let n;return r;function r(...a){const l=e.length>a.length;let c;l&&a.push(i);try{c=e.apply(this,a)}catch(f){const h=f;if(l&&n)throw h;return i(h)}l||(c&&c.then&&typeof c.then=="function"?c.then(o,i):c instanceof Error?i(c):o(c))}function i(a,...l){n||(n=!0,t(a,...l))}function o(a){i(null,a)}}const xo={basename:Qve,dirname:Zve,extname:Jve,join:e0e,sep:"/"};function Qve(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Cp(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,l=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else a<0&&(o=!0,a=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(r=i):(l=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function Zve(e){if(Cp(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 Jve(e){Cp(e);let t=e.length,n=-1,r=0,i=-1,o=0,a;for(;t--;){const l=e.codePointAt(t);if(l===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),l===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 e0e(...e){let t=-1,n;for(;++t<e.length;)Cp(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":t0e(n)}function t0e(e){Cp(e);const t=e.codePointAt(0)===47;let n=n0e(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function n0e(e,t){let n="",r=0,i=-1,o=0,a=-1,l,c;for(;++a<=e.length;){if(a<e.length)l=e.codePointAt(a);else{if(l===47)break;l=47}if(l===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 l===46&&o>-1?o++:o=-1}return n}function Cp(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const r0e={cwd:i0e};function i0e(){return"/"}function kE(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function o0e(e){if(typeof e=="string")e=new URL(e);else if(!kE(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 s0e(e)}function s0e(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 bw=["history","path","basename","stem","extname","dirname"];class L5{constructor(t){let n;t?kE(t)?n={path:t}:typeof t=="string"||a0e(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":r0e.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<bw.length;){const o=bw[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)bw.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?xo.basename(this.path):void 0}set basename(t){xw(t,"basename"),vw(t,"basename"),this.path=xo.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?xo.dirname(this.path):void 0}set dirname(t){l3(this.basename,"dirname"),this.path=xo.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?xo.extname(this.path):void 0}set extname(t){if(vw(t,"extname"),l3(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=xo.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){kE(t)&&(t=o0e(t)),xw(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?xo.basename(this.path,this.extname):void 0}set stem(t){xw(t,"stem"),vw(t,"stem"),this.path=xo.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 yr(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 vw(e,t){if(e&&e.includes(xo.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+xo.sep+"`")}function xw(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function l3(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function a0e(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const l0e=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),u0e={}.hasOwnProperty;class eR extends l0e{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=Kve()}copy(){const t=new eR;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(yw(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Ew("data",this.frozen),this.namespace[t]=n,this):u0e.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ew("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=Pg(t),r=this.parser||this.Parser;return ww("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),ww("process",this.parser||this.Parser),Sw("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,a){const l=Pg(t),c=r.parse(l);r.run(c,l,function(h,p,m){if(h||!p||!m)return f(h);const g=p,b=r.stringify(g,m);d0e(b)?m.value=b:m.result=b,f(h,m)});function f(h,p){h||!p?a(h):o?o(p):n(void 0,p)}}}processSync(t){let n=!1,r;return this.freeze(),ww("processSync",this.parser||this.Parser),Sw("processSync",this.compiler||this.Compiler),this.process(t,i),c3("processSync","process",n),r;function i(o,a){n=!0,s3(o),r=a}}run(t,n,r){u3(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,l){const c=Pg(n);i.run(t,c,f);function f(h,p,m){const g=p||t;h?l(h):a?a(g):r(void 0,g,m)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),c3("runSync","run",r),i;function o(a,l){s3(a),i=l,r=!0}}stringify(t,n){this.freeze();const r=Pg(n),i=this.compiler||this.Compiler;return Sw("stringify",i),u3(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Ew("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?l(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");l(f.plugins),f.settings&&(i.settings=yw(!0,i.settings,f.settings))}function l(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,m=-1;for(;++p<r.length;)if(r[p][0]===f){m=p;break}if(m===-1)r.push([f,...h]);else if(h.length>0){let[g,...b]=h;const v=r[m][1];CE(v)&&CE(g)&&(g=yw(!0,v,g)),r[m]=[f,g,...b]}}}}const c0e=new eR().freeze();function ww(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Sw(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ew(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 u3(e){if(!CE(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function c3(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Pg(e){return f0e(e)?e:new L5(e)}function f0e(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function d0e(e){return typeof e=="string"||h0e(e)}function h0e(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const p0e="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",f3=[],d3={allowDangerousHtml:!0},m0e=/^(https?|ircs?|mailto|xmpp)$/i,g0e=[{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 y0e(e){const t=b0e(e),n=v0e(e);return x0e(t.runSync(t.parse(n),n),e)}function b0e(e){const t=e.rehypePlugins||f3,n=e.remarkPlugins||f3,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...d3}:d3;return c0e().use(Zbe).use(n).use(Gve,r).use(t)}function v0e(e){const t=e.children||"",n=new L5;return typeof t=="string"&&(n.value=t),n}function x0e(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,a=t.skipHtml,l=t.unwrapDisallowed,c=t.urlTransform||w0e;for(const h of g0e)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+p0e+h.id,void 0);return kv(e,f),Ige(e,{Fragment:T.Fragment,components:i,ignoreInvalidStyle:!0,jsx:T.jsx,jsxs:T.jsxs,passKeys:!0,passNode:!0});function f(h,p,m){if(h.type==="raw"&&m&&typeof p=="number")return a?m.children.splice(p,1):m.children[p]={type:"text",value:h.value},p;if(h.type==="element"){let g;for(g in hw)if(Object.hasOwn(hw,g)&&Object.hasOwn(h.properties,g)){const b=h.properties[g],v=hw[g];(v===null||v.includes(h.tagName))&&(h.properties[g]=c(String(b||""),g,h))}}if(h.type==="element"){let g=n?!n.includes(h.tagName):o?o.includes(h.tagName):!1;if(!g&&r&&typeof p=="number"&&(g=!r(h,p,m)),g&&m&&typeof p=="number")return l&&h.children?m.children.splice(p,1,...h.children):m.children.splice(p,1),p}}}function w0e(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||m0e.test(e.slice(0,t))?e:""}const S0e=/[\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,E0e=Object.hasOwnProperty;class C0e{constructor(){this.occurrences,this.reset()}slug(t,n){const r=this;let i=k0e(t,n===!0);const o=i;for(;E0e.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 k0e(e,t){return typeof e!="string"?"":(t||(e=e.toLowerCase()),e.replace(S0e,"").replace(/ /g,"-"))}function R0e(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 A0e(e){return"children"in e?N5(e):"value"in e?e.value:""}function T0e(e){return e.type==="text"?e.value:"children"in e?N5(e):""}function N5(e){let t=-1;const n=[];for(;++t<e.children.length;)n[t]=T0e(e.children[t]);return n.join("")}const _0e={},h3=new C0e;function D0e(e){const n=(e||_0e).prefix||"";return function(r){h3.reset(),kv(r,"element",function(i){R0e(i)&&!i.properties.id&&(i.properties.id=n+h3.slug(A0e(i)))})}}function M0e(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function $0e(e,t,n){const i=Ev((n||{}).ignore||[]),o=O0e(t);let a=-1;for(;++a<o.length;)I5(e,"text",l);function l(f,h){let p=-1,m;for(;++p<h.length;){const g=h[p],b=m?m.children:void 0;if(i(g,b?b.indexOf(g):void 0,m))return;m=g}if(m)return c(f,h)}function c(f,h){const p=h[h.length-1],m=o[a][0],g=o[a][1];let b=0;const w=p.children.indexOf(f);let x=!1,k=[];m.lastIndex=0;let C=m.exec(f.value);for(;C;){const R=C.index,_={index:C.index,input:C.input,stack:[...h,f]};let D=g(...C,_);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?m.lastIndex=R+1:(b!==R&&k.push({type:"text",value:f.value.slice(b,R)}),Array.isArray(D)?k.push(...D):D&&k.push(D),b=R+C[0].length,x=!0),!m.global)break;C=m.exec(f.value)}return x?(b<f.value.length&&k.push({type:"text",value:f.value.slice(b)}),p.children.splice(w,1,...k)):k=[f],w+k.length}}function O0e(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([P0e(i[0]),I0e(i[1])])}return t}function P0e(e){return typeof e=="string"?new RegExp(M0e(e),"g"):e}function I0e(e){return typeof e=="function"?e:function(){return e}}const Cw="phrasing",kw=["autolink","link","image","label"];function L0e(){return{transforms:[U0e],enter:{literalAutolink:j0e,literalAutolinkEmail:Rw,literalAutolinkHttp:Rw,literalAutolinkWww:Rw},exit:{literalAutolink:H0e,literalAutolinkEmail:B0e,literalAutolinkHttp:F0e,literalAutolinkWww:z0e}}}function N0e(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Cw,notInConstruct:kw},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Cw,notInConstruct:kw},{character:":",before:"[ps]",after:"\\/",inConstruct:Cw,notInConstruct:kw}]}}function j0e(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Rw(e){this.config.enter.autolinkProtocol.call(this,e)}function F0e(e){this.config.exit.autolinkProtocol.call(this,e)}function z0e(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 B0e(e){this.config.exit.autolinkEmail.call(this,e)}function H0e(e){this.exit(e)}function U0e(e){$0e(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,q0e],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),V0e]],{ignore:["link","linkReference"]})}function q0e(e,t,n,r,i){let o="";if(!j5(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!G0e(n)))return!1;const a=Y0e(n+r);if(!a[0])return!1;const l={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[l,{type:"text",value:a[1]}]:l}function V0e(e,t,n,r){return!j5(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function G0e(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 Y0e(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=$y(e,"(");let o=$y(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 j5(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Tu(n)||xv(n))&&(!t||n!==47)}F5.peek=n1e;function W0e(){this.buffer()}function K0e(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function X0e(){this.buffer()}function Q0e(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Z0e(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=lo(this.sliceSerialize(e)).toLowerCase(),n.label=t}function J0e(e){this.exit(e)}function e1e(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=lo(this.sliceSerialize(e)).toLowerCase(),n.label=t}function t1e(e){this.exit(e)}function n1e(){return"["}function F5(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const a=n.enter("footnoteReference"),l=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),l(),a(),o+=i.move("]"),o}function r1e(){return{enter:{gfmFootnoteCallString:W0e,gfmFootnoteCall:K0e,gfmFootnoteDefinitionLabelString:X0e,gfmFootnoteDefinition:Q0e},exit:{gfmFootnoteCallString:Z0e,gfmFootnoteCall:J0e,gfmFootnoteDefinitionLabelString:e1e,gfmFootnoteDefinition:t1e}}}function i1e(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:F5},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,a){const l=o.createTracker(a);let c=l.move("[^");const f=o.enter("footnoteDefinition"),h=o.enter("label");return c+=l.move(o.safe(o.associationId(r),{before:c,after:"]"})),h(),c+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),c+=l.move((t?`
|
|
530
|
-
`:" ")+o.indentLines(o.containerFlow(r,l.current()),t?z5:o1e))),f(),c}}function o1e(e,t,n){return t===0?e:z5(e,t,n)}function z5(e,t,n){return(n?"":" ")+e}const s1e=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];B5.peek=f1e;function a1e(){return{canContainEols:["delete"],enter:{strikethrough:u1e},exit:{strikethrough:c1e}}}function l1e(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:s1e}],handlers:{delete:B5}}}function u1e(e){this.enter({type:"delete",children:[]},e)}function c1e(e){this.exit(e)}function B5(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 f1e(){return"~"}function d1e(e){return e.length}function h1e(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||d1e,o=[],a=[],l=[],c=[];let f=0,h=-1;for(;++h<e.length;){const v=[],w=[];let x=-1;for(e[h].length>f&&(f=e[h].length);++x<e[h].length;){const k=p1e(e[h][x]);if(n.alignDelimiters!==!1){const C=i(k);w[x]=C,(c[x]===void 0||C>c[x])&&(c[x]=C)}v.push(k)}a[h]=v,l[h]=w}let p=-1;if(typeof r=="object"&&"length"in r)for(;++p<f;)o[p]=p3(r[p]);else{const v=p3(r);for(;++p<f;)o[p]=v}p=-1;const m=[],g=[];for(;++p<f;){const v=o[p];let w="",x="";v===99?(w=":",x=":"):v===108?w=":":v===114&&(x=":");let k=n.alignDelimiters===!1?1:Math.max(1,c[p]-w.length-x.length);const C=w+"-".repeat(k)+x;n.alignDelimiters!==!1&&(k=w.length+k+x.length,k>c[p]&&(c[p]=k),g[p]=k),m[p]=C}a.splice(1,0,m),l.splice(1,0,g),h=-1;const b=[];for(;++h<a.length;){const v=a[h],w=l[h];p=-1;const x=[];for(;++p<f;){const k=v[p]||"";let C="",R="";if(n.alignDelimiters!==!1){const _=c[p]-(w[p]||0),D=o[p];D===114?C=" ".repeat(_):D===99?_%2?(C=" ".repeat(_/2+.5),R=" ".repeat(_/2-.5)):(C=" ".repeat(_/2),R=C):R=" ".repeat(_)}n.delimiterStart!==!1&&!p&&x.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&k==="")&&(n.delimiterStart!==!1||p)&&x.push(" "),n.alignDelimiters!==!1&&x.push(C),x.push(k),n.alignDelimiters!==!1&&x.push(R),n.padding!==!1&&x.push(" "),(n.delimiterEnd!==!1||p!==f-1)&&x.push("|")}b.push(n.delimiterEnd===!1?x.join("").replace(/ +$/,""):x.join(""))}return b.join(`
|
|
531
|
-
`)}function p1e(e){return e==null?"":String(e)}function p3(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 m1e(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()),g1e);return i(),a}function g1e(e,t,n){return">"+(n?"":" ")+e}function y1e(e,t){return m3(e,t.inConstruct,!0)&&!m3(e,t.notInConstruct,!1)}function m3(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 g3(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
532
|
-
`&&y1e(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
533
|
-
`}function b1e(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 v1e(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 x1e(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 w1e(e,t,n,r){const i=x1e(n),o=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(v1e(e,n)){const p=n.enter("codeIndented"),m=n.indentLines(o,S1e);return p(),m}const l=n.createTracker(r),c=i.repeat(Math.max(b1e(o,i)+1,3)),f=n.enter("codeFenced");let h=l.move(c);if(e.lang){const p=n.enter(`codeFencedLang${a}`);h+=l.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...l.current()})),p()}if(e.lang&&e.meta){const p=n.enter(`codeFencedMeta${a}`);h+=l.move(" "),h+=l.move(n.safe(e.meta,{before:h,after:`
|
|
534
|
-
`,encode:["`"],...l.current()})),p()}return h+=l.move(`
|
|
535
|
-
`),o&&(h+=l.move(o+`
|
|
536
|
-
`)),h+=l.move(c),f(),h}function S1e(e,t,n){return(n?"":" ")+e}function tR(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 E1e(e,t,n,r){const i=tR(n),o=i==='"'?"Quote":"Apostrophe",a=n.enter("definition");let l=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("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),f+=c.move("<"),f+=c.move(n.safe(e.url,{before:f,after:">",...c.current()})),f+=c.move(">")):(l=n.enter("destinationRaw"),f+=c.move(n.safe(e.url,{before:f,after:e.title?" ":`
|
|
537
|
-
`,...c.current()}))),l(),e.title&&(l=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),l()),a(),f}function C1e(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 Kh(e){return"&#x"+e.toString(16).toUpperCase()+";"}function yb(e,t,n){const r=Of(e),i=Of(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}}H5.peek=k1e;function H5(e,t,n,r){const i=C1e(n),o=n.enter("emphasis"),a=n.createTracker(r),l=a.move(i);let c=a.move(n.containerPhrasing(e,{after:i,before:l,...a.current()}));const f=c.charCodeAt(0),h=yb(r.before.charCodeAt(r.before.length-1),f,i);h.inside&&(c=Kh(f)+c.slice(1));const p=c.charCodeAt(c.length-1),m=yb(r.after.charCodeAt(0),p,i);m.inside&&(c=c.slice(0,-1)+Kh(p));const g=a.move(i);return o(),n.attentionEncodeSurroundingInfo={after:m.outside,before:h.outside},l+c+g}function k1e(e,t,n){return n.options.emphasis||"*"}function R1e(e,t){let n=!1;return kv(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,SE}),!!((!e.depth||e.depth<3)&&Yk(e)&&(t.options.setext||n))}function A1e(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(R1e(e,n)){const h=n.enter("headingSetext"),p=n.enter("phrasing"),m=n.containerPhrasing(e,{...o.current(),before:`
|
|
538
|
-
`,after:`
|
|
539
|
-
`});return p(),h(),m+`
|
|
540
|
-
`+(i===1?"=":"-").repeat(m.length-(Math.max(m.lastIndexOf("\r"),m.lastIndexOf(`
|
|
541
|
-
`))+1))}const a="#".repeat(i),l=n.enter("headingAtx"),c=n.enter("phrasing");o.move(a+" ");let f=n.containerPhrasing(e,{before:"# ",after:`
|
|
542
|
-
`,...o.current()});return/^[\t ]/.test(f)&&(f=Kh(f.charCodeAt(0))+f.slice(1)),f=f?a+" "+f:a,n.options.closeAtx&&(f+=" "+a),c(),l(),f}U5.peek=T1e;function U5(e){return e.value||""}function T1e(){return"<"}q5.peek=_1e;function q5(e,t,n,r){const i=tR(n),o=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let l=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("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),f+=c.move("<"),f+=c.move(n.safe(e.url,{before:f,after:">",...c.current()})),f+=c.move(">")):(l=n.enter("destinationRaw"),f+=c.move(n.safe(e.url,{before:f,after:e.title?" ":")",...c.current()}))),l(),e.title&&(l=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),l()),f+=c.move(")"),a(),f}function _1e(){return"!"}V5.peek=D1e;function V5(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let a=n.enter("label");const l=n.createTracker(r);let c=l.move("![");const f=n.safe(e.alt,{before:c,after:"]",...l.current()});c+=l.move(f+"]["),a();const h=n.stack;n.stack=[],a=n.enter("reference");const p=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return a(),n.stack=h,o(),i==="full"||!f||f!==p?c+=l.move(p+"]"):i==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function D1e(){return"!"}G5.peek=M1e;function G5(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],l=n.compilePattern(a);let c;if(a.atBreak)for(;c=l.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 M1e(){return"`"}function Y5(e,t){const n=Yk(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))}W5.peek=$1e;function W5(e,t,n,r){const i=tR(n),o=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let l,c;if(Y5(e,n)){const h=n.stack;n.stack=[],l=n.enter("autolink");let p=a.move("<");return p+=a.move(n.containerPhrasing(e,{before:p,after:">",...a.current()})),p+=a.move(">"),l(),n.stack=h,p}l=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(")"),l(),f}function $1e(e,t,n){return Y5(e,n)?"<":"["}K5.peek=O1e;function K5(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let a=n.enter("label");const l=n.createTracker(r);let c=l.move("[");const f=n.containerPhrasing(e,{before:c,after:"]",...l.current()});c+=l.move(f+"]["),a();const h=n.stack;n.stack=[],a=n.enter("reference");const p=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return a(),n.stack=h,o(),i==="full"||!f||f!==p?c+=l.move(p+"]"):i==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function O1e(){return"["}function nR(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 P1e(e){const t=nR(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 I1e(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 X5(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 L1e(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let a=e.ordered?I1e(n):nR(n);const l=e.ordered?a==="."?")":".":P1e(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),X5(n)===a&&h){let p=-1;for(;++p<e.children.length;){const m=e.children[p];if(m&&m.type==="listItem"&&m.children&&m.children[0]&&m.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(a=l),n.bulletCurrent=a;const f=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=o,i(),f}function N1e(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 j1e(e,t,n,r){const i=N1e(n);let o=n.bulletCurrent||nR(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 l=n.createTracker(r);l.move(o+" ".repeat(a-o.length)),l.shift(a);const c=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,l.current()),h);return c(),f;function h(p,m,g){return m?(g?"":" ".repeat(a))+p:(g?o:o+" ".repeat(a-o.length))+p}}function F1e(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),a=n.containerPhrasing(e,r);return o(),i(),a}const z1e=Ev(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function B1e(e,t,n,r){return(e.children.some(function(a){return z1e(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function H1e(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Q5.peek=U1e;function Q5(e,t,n,r){const i=H1e(n),o=n.enter("strong"),a=n.createTracker(r),l=a.move(i+i);let c=a.move(n.containerPhrasing(e,{after:i,before:l,...a.current()}));const f=c.charCodeAt(0),h=yb(r.before.charCodeAt(r.before.length-1),f,i);h.inside&&(c=Kh(f)+c.slice(1));const p=c.charCodeAt(c.length-1),m=yb(r.after.charCodeAt(0),p,i);m.inside&&(c=c.slice(0,-1)+Kh(p));const g=a.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:m.outside,before:h.outside},l+c+g}function U1e(e,t,n){return n.options.strong||"*"}function q1e(e,t,n,r){return n.safe(e.value,r)}function V1e(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 G1e(e,t,n){const r=(X5(n)+(n.options.ruleSpaces?" ":"")).repeat(V1e(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Z5={blockquote:m1e,break:g3,code:w1e,definition:E1e,emphasis:H5,hardBreak:g3,heading:A1e,html:U5,image:q5,imageReference:V5,inlineCode:G5,link:W5,linkReference:K5,list:L1e,listItem:j1e,paragraph:F1e,root:B1e,strong:Q5,text:q1e,thematicBreak:G1e};function Y1e(){return{enter:{table:W1e,tableData:y3,tableHeader:y3,tableRow:X1e},exit:{codeText:Q1e,table:K1e,tableData:Aw,tableHeader:Aw,tableRow:Aw}}}function W1e(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 K1e(e){this.exit(e),this.data.inTable=void 0}function X1e(e){this.enter({type:"tableRow",children:[]},e)}function Aw(e){this.exit(e)}function y3(e){this.enter({type:"tableCell",children:[]},e)}function Q1e(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Z1e));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Z1e(e,t){return t==="|"?t:e}function J1e(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
543
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:m,table:a,tableCell:c,tableRow:l}};function a(g,b,v,w){return f(h(g,v,w),g.align)}function l(g,b,v,w){const x=p(g,v,w),k=f([x]);return k.slice(0,k.indexOf(`
|
|
544
|
-
`))}function c(g,b,v,w){const x=v.enter("tableCell"),k=v.enter("phrasing"),C=v.containerPhrasing(g,{...w,before:o,after:o});return k(),x(),C}function f(g,b){return h1e(g,{align:b,alignDelimiters:r,padding:n,stringLength:i})}function h(g,b,v){const w=g.children;let x=-1;const k=[],C=b.enter("table");for(;++x<w.length;)k[x]=p(w[x],b,v);return C(),k}function p(g,b,v){const w=g.children;let x=-1;const k=[],C=b.enter("tableRow");for(;++x<w.length;)k[x]=c(w[x],g,b,v);return C(),k}function m(g,b,v){let w=Z5.inlineCode(g,b,v);return v.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function exe(){return{exit:{taskListCheckValueChecked:b3,taskListCheckValueUnchecked:b3,paragraph:nxe}}}function txe(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:rxe}}}function b3(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function nxe(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 l=i[o];if(l.type==="paragraph"){a=l;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 rxe(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);o&&l.move(a);let c=Z5.listItem(e,t,n,{...r,...l.current()});return o&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),c;function f(h){return h+a}}function ixe(){return[L0e(),r1e(),a1e(),Y1e(),exe()]}function oxe(e){return{extensions:[N0e(),i1e(e),l1e(),J1e(e),txe()]}}const sxe={tokenize:dxe,partial:!0},J5={tokenize:hxe,partial:!0},e8={tokenize:pxe,partial:!0},t8={tokenize:mxe,partial:!0},axe={tokenize:gxe,partial:!0},n8={name:"wwwAutolink",tokenize:cxe,previous:i8},r8={name:"protocolAutolink",tokenize:fxe,previous:o8},Hs={name:"emailAutolink",tokenize:uxe,previous:s8},Ho={};function lxe(){return{text:Ho}}let Hl=48;for(;Hl<123;)Ho[Hl]=Hs,Hl++,Hl===58?Hl=65:Hl===91&&(Hl=97);Ho[43]=Hs;Ho[45]=Hs;Ho[46]=Hs;Ho[95]=Hs;Ho[72]=[Hs,r8];Ho[104]=[Hs,r8];Ho[87]=[Hs,n8];Ho[119]=[Hs,n8];function uxe(e,t,n){const r=this;let i,o;return a;function a(p){return!RE(p)||!s8.call(r,r.previous)||rR(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(p))}function l(p){return RE(p)?(e.consume(p),l):p===64?(e.consume(p),c):n(p)}function c(p){return p===46?e.check(axe,h,f)(p):p===45||p===95||pr(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 cxe(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!i8.call(r,r.previous)||rR(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(sxe,e.attempt(J5,e.attempt(e8,o),n),n)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function fxe(e,t,n){const r=this;let i="",o=!1;return a;function a(p){return(p===72||p===104)&&o8.call(r,r.previous)&&!rR(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(p),e.consume(p),l):n(p)}function l(p){if(Cr(p)&&i.length<5)return i+=String.fromCodePoint(p),e.consume(p),l;if(p===58){const m=i.toLowerCase();if(m==="http"||m==="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||pb(p)||sn(p)||Tu(p)||xv(p)?n(p):e.attempt(J5,e.attempt(e8,h),n)(p)}function h(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function dxe(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 hxe(e,t,n){let r,i,o;return a;function a(f){return f===46||f===95?e.check(t8,c,l)(f):f===null||sn(f)||Tu(f)||f!==45&&xv(f)?c(f):(o=!0,e.consume(f),a)}function l(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 pxe(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(t8,t,o)(a):a===null||sn(a)||Tu(a)?t(a):(e.consume(a),i)}function o(a){return a===41&&r++,e.consume(a),i}}function mxe(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),o):l===93?(e.consume(l),i):l===60||l===null||sn(l)||Tu(l)?t(l):n(l)}function i(l){return l===null||l===40||l===91||sn(l)||Tu(l)?t(l):r(l)}function o(l){return Cr(l)?a(l):n(l)}function a(l){return l===59?(e.consume(l),r):Cr(l)?(e.consume(l),a):n(l)}}function gxe(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return pr(o)?n(o):t(o)}}function i8(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||sn(e)}function o8(e){return!Cr(e)}function s8(e){return!(e===47||RE(e))}function RE(e){return e===43||e===45||e===46||e===95||pr(e)}function rR(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 yxe={tokenize:kxe,partial:!0};function bxe(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Sxe,continuation:{tokenize:Exe},exit:Cxe}},text:{91:{name:"gfmFootnoteCall",tokenize:wxe},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:vxe,resolveTo:xxe}}}}function vxe(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 l;function l(c){if(!a||!a._balanced)return n(c);const f=lo(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 xxe(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)},l=[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,...l),e}function wxe(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,a;return l;function l(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||sn(p))return n(p);if(p===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return i.includes(lo(r.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return sn(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 Sxe(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,a=0,l;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&&!l||b===null||b===91||sn(b))return n(b);if(b===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return o=lo(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return sn(b)||(l=!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 m(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),i.includes(o)||i.push(o),Nt(e,g,"gfmFootnoteDefinitionWhitespace")):n(b)}function g(b){return t(b)}}function Exe(e,t,n){return e.check(Ep,t,e.attempt(yxe,t,n))}function Cxe(e){e.exit("gfmFootnoteDefinition")}function kxe(e,t,n){const r=this;return Nt(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 Rxe(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,l){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)},m=[["enter",h,l],["enter",a[f][1],l],["exit",a[f][1],l],["enter",p,l]],g=l.parser.constructs.insideSpan.null;g&&pi(m,m.length,0,wv(g,a.slice(f+1,c),l)),pi(m,m.length,0,[["exit",p,l],["enter",a[c][1],l],["exit",a[c][1],l],["exit",h,l]]),pi(a,f-1,c-f+3,m),c=f+m.length-2;break}}for(c=-1;++c<a.length;)a[c][1].type==="strikethroughSequenceTemporary"&&(a[c][1].type="data");return a}function o(a,l,c){const f=this.previous,h=this.events;let p=0;return m;function m(b){return f===126&&h[h.length-1][1].type!=="characterEscape"?c(b):(a.enter("strikethroughSequenceTemporary"),g(b))}function g(b){const v=Of(f);if(b===126)return p>1?c(b):(a.consume(b),p++,g);if(p<2&&!n)return c(b);const w=a.exit("strikethroughSequenceTemporary"),x=Of(b);return w._open=!x||x===2&&!!v,w._close=!v||v===2&&!!x,l(b)}}}class Axe{constructor(){this.map=[]}add(t,n,r){Txe(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 Txe(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 _xe(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 Dxe(){return{flow:{null:{name:"table",tokenize:Mxe,resolveAll:$xe}}}}function Mxe(e,t,n){const r=this;let i=0,o=0,a;return l;function l(L){let I=r.events.length-1;for(;I>-1;){const V=r.events[I][1].type;if(V==="lineEnding"||V==="linePrefix")I--;else break}const $=I>-1?r.events[I][1].type:null,B=$==="tableHead"||$==="tableRow"?D:c;return B===D&&r.parser.lazy[r.now().line]?n(L):B(L)}function c(L){return e.enter("tableHead"),e.enter("tableRow"),f(L)}function f(L){return L===124||(a=!0,o+=1),h(L)}function h(L){return L===null?n(L):it(L)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),g):n(L):_t(L)?Nt(e,h,"whitespace")(L):(o+=1,a&&(a=!1,i+=1),L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),a=!0,h):(e.enter("data"),p(L)))}function p(L){return L===null||L===124||sn(L)?(e.exit("data"),h(L)):(e.consume(L),L===92?m:p)}function m(L){return L===92||L===124?(e.consume(L),p):p(L)}function g(L){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(L):(e.enter("tableDelimiterRow"),a=!1,_t(L)?Nt(e,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):b(L))}function b(L){return L===45||L===58?w(L):L===124?(a=!0,e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),v):_(L)}function v(L){return _t(L)?Nt(e,w,"whitespace")(L):w(L)}function w(L){return L===58?(o+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),x):L===45?(o+=1,x(L)):L===null||it(L)?R(L):_(L)}function x(L){return L===45?(e.enter("tableDelimiterFiller"),k(L)):_(L)}function k(L){return L===45?(e.consume(L),k):L===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(L))}function C(L){return _t(L)?Nt(e,R,"whitespace")(L):R(L)}function R(L){return L===124?b(L):L===null||it(L)?!a||i!==o?_(L):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(L)):_(L)}function _(L){return n(L)}function D(L){return e.enter("tableRow"),M(L)}function M(L){return L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),M):L===null||it(L)?(e.exit("tableRow"),t(L)):_t(L)?Nt(e,M,"whitespace")(L):(e.enter("data"),O(L))}function O(L){return L===null||L===124||sn(L)?(e.exit("data"),M(L)):(e.consume(L),L===92?U:O)}function U(L){return L===92||L===124?(e.consume(L),O):O(L)}}function $xe(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],a=[0,0,0,0],l=!1,c=0,f,h,p;const m=new Axe;for(;++n<e.length;){const g=e[n],b=g[1];g[0]==="enter"?b.type==="tableHead"?(l=!1,c!==0&&(v3(m,t,c,f,h),h=void 0,c=0),f={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},m.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],l&&(l=!1,h={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},m.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=Ig(m,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=Ig(m,t,o,i,void 0,p)),o=a,a=[o[1],n,0,0])):b.type==="tableHead"?(l=!0,c=n):b.type==="tableRow"||b.type==="tableDelimiterRow"?(c=n,o[1]!==0?(a[0]=a[1],p=Ig(m,t,o,i,n,p)):a[1]!==0&&(p=Ig(m,t,a,i,n,p)),i=0):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(a[3]=n)}for(c!==0&&v3(m,t,c,f,h),m.consume(t.events),n=-1;++n<t.events.length;){const g=t.events[n];g[0]==="enter"&&g[1].type==="table"&&(g[1]._align=_xe(t.events,n))}return e}function Ig(e,t,n,r,i,o){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(o.end=Object.assign({},Pc(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const c=Pc(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=Pc(t.events,n[2]),h=Pc(t.events,n[3]),p={type:l,start:Object.assign({},f),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",p,t]]),r!==2){const m=t.events[n[2]],g=t.events[n[3]];if(m[1].end=Object.assign({},g[1].end),m[1].type="chunkText",m[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({},Pc(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function v3(e,t,n,r,i){const o=[],a=Pc(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 Pc(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Oxe={name:"tasklistCheck",tokenize:Ixe};function Pxe(){return{text:{91:Oxe}}}function Ixe(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 sn(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"),l):n(c)}function l(c){return it(c)?t(c):_t(c)?e.check({tokenize:Lxe},t,n)(c):n(c)}}function Lxe(e,t,n){return Nt(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Nxe(e){return g5([lxe(),bxe(),Rxe(e),Dxe(),Pxe()])}const jxe={};function Fxe(e){const t=this,n=e||jxe,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Nxe(n)),o.push(ixe()),a.push(oxe(n))}const zxe=new Set(Object.keys(EL)),x3={js:"javascript",ts:"typescript",py:"python",sh:"bash",shell:"bash",md:"markdown"};function Bxe(e){const t=/language-([\w-]+)/.exec(e??"");if(!t)return;const n=t[1].toLowerCase();if(x3[n])return x3[n];if(zxe.has(n))return n}function a8(e){var t;return S.isValidElement(e)&&((t=e.props)==null?void 0:t.type)==="checkbox"}function Hxe(e){return S.isValidElement(e)&&e.type===Eu}function Uxe(e){return S.Children.toArray(e).some(t=>{if(!S.isValidElement(t))return!1;const n=S.Children.toArray(t.props.children);return a8(n[0])})}function AE(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(AE).join("");if(S.isValidElement(e)){const t=e.props.children;return AE(t)}return""}function w3(e){return S.Children.toArray(e).filter(t=>S.isValidElement(t)).map(t=>{const n=S.Children.toArray(t.props.children),r=n[0];if(a8(r)){const o=!!r.props.checked,a=n.slice(1);return{label:T.jsxs(ot,{ay:"center",gap:2,children:[T.jsx(aF,{checked:o,disabled:!0}),T.jsx(Fe,{size:1,children:a})]})}}const i=n.findIndex(Hxe);if(i>=0){const o=n[i],a=[...n.slice(0,i),...n.slice(i+1)];return{category:AE(a).trim(),items:o.props.items??[]}}return{label:T.jsx(Fe,{size:1,children:n})}})}const qxe={p:({children:e})=>T.jsx(Fe,{my:1,size:1,render:T.jsx("p",{}),children:e}),h1:({children:e,id:t})=>T.jsx(Fe,{weight:"bold",size:4,my:2,render:T.jsx("h1",{id:t}),children:e}),h2:({children:e,id:t})=>T.jsx(Fe,{weight:"bold",size:3,mt:2,render:T.jsx("h2",{id:t}),children:e}),h3:({children:e,id:t})=>T.jsx(Fe,{weight:"bold",size:1,my:1,render:T.jsx("h3",{id:t}),children:e}),h4:({children:e,id:t})=>T.jsx(Fe,{weight:"bold",size:1,render:T.jsx("h4",{id:t}),children:e}),h5:({children:e,id:t})=>T.jsx(Fe,{weight:"bold",size:0,render:T.jsx("h5",{id:t}),children:e}),h6:({children:e,id:t})=>T.jsx(Fe,{weight:"bold",size:-1,render:T.jsx("h6",{id:t}),children:e}),strong:({children:e})=>T.jsx(Fe,{weight:"bold",children:e}),em:({children:e})=>T.jsx(Fe,{render:T.jsx("em",{}),children:e}),del:({children:e})=>T.jsx(Fe,{strikethrough:!0,render:T.jsx("del",{}),children:e}),a:({children:e,href:t})=>T.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:e}),ul:({children:e})=>T.jsx(Eu,{marker:Uxe(e)?"none":"disc",items:w3(e),style:{display:"block"},my:2}),ol:({children:e})=>T.jsx(Eu,{marker:"decimal",items:w3(e),style:{display:"block"},my:2}),blockquote:({children:e})=>T.jsx("blockquote",{children:e}),hr:()=>T.jsx(KE,{}),table:({children:e})=>T.jsx(jz,{children:T.jsx(Fz,{bordered:!0,children:e})}),thead:({children:e})=>T.jsx(zz,{children:e}),tbody:({children:e})=>T.jsx(qz,{children:e}),tr:({children:e})=>T.jsx(Bz,{children:e}),th:({children:e})=>T.jsx(Uz,{children:e}),td:({children:e})=>T.jsx(Hz,{children:e}),pre:({children:e})=>T.jsx(T.Fragment,{children:e}),code:({className:e,children:t,...n})=>{const r=String(t??"");return r.includes(`
|
|
545
|
-
`)?T.jsx($C,{code:r.replace(/\n$/,""),language:Bxe(e),rows:5,defaultExpanded:!1,HeaderProps:{copyable:!0},style:{width:"100%",marginBlockEnd:"0.5rem"}}):T.jsx(BN,{...n,children:t})}},Vxe=[Fxe],Gxe=[D0e];function Yxe({children:e,components:t}){return T.jsx(Qe,{gap:4,fullwidth:!0,children:T.jsx(y0e,{remarkPlugins:Vxe,rehypePlugins:Gxe,components:{...qxe,...t},children:e})})}const Rh=S.memo(Yxe);function Wxe(e){return e<1500?"●○○":e<5e3?"●●○":"●●●"}function l8({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:T.jsxs(Qe,{"data-slot":"assistant-content",gap:2,children:[r>0&&T.jsx(Os,{color:"indigo",children:`Thought ${Wxe(i)}`}),n&&T.jsx(Rh,{children:n})]})}l8.displayName="AssistantContent";function S3(e,t){return e==null?void 0:e.find(n=>n.question===t)}function Kxe(e,t,n){const r=[...t].sort((a,l)=>l.label.length-a.label.length),i=[];let o=e;for(;o;){const a=r.find(l=>o===l.label||o.startsWith(l.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 u8({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=(l,c)=>{const f=S3(r,l),h=(f==null?void 0:f.multiSelect)??!1,p=(f==null?void 0:f.options)??[],{selectedLabels:m,note:g}=Kxe(c,p,h),b=m.length>0,v=b?void 0:g??c,w=b?g:void 0;return T.jsxs(Qe,{gap:4,fullwidth:!0,children:[v&&T.jsxs(Qe,{"data-slot":"interaction-content-note",gap:4,m:2,fullwidth:!0,children:[T.jsx(Fe,{color:"yellow",weight:"bold",size:1,children:"Answered manually:"}),T.jsx(Rh,{children:v})]}),!b&&!v&&T.jsx(Fe,{color:"red",weight:"bold",size:1,m:2,children:"Didn't answer."}),p.length>0&&T.jsx(Eu,{marker:"decimal",items:p.map(x=>{const k=m.includes(x.label);return{label:T.jsx(Fe,{weight:"bold",color:k?"green":void 0,shade:k?void 0:"muted",children:x.label}),description:x.description}})}),w&&T.jsxs(Qe,{"data-slot":"interaction-content-note",gap:4,m:2,fullwidth:!0,children:[T.jsx(Fe,{color:"green",weight:"bold",size:1,children:"Additional notes:"}),T.jsx(Rh,{children:w})]})]})};if(i.length===1){const[l,c]=i[0];return T.jsx(Qe,{"data-slot":"interaction-content",gap:2,py:4,fullwidth:!0,children:T.jsx(En,{gap:4,fullwidth:!0,children:o(l,c)})})}const a=i.map(([l,c],f)=>{const h=S3(r,l);return{label:(h==null?void 0:h.header)??`Question ${f+1}`,value:l,render:o(l,c)}});return T.jsx(Qe,{"data-slot":"interaction-content",gap:2,py:4,fullwidth:!0,children:T.jsx(En,{gap:4,fullwidth:!0,children:T.jsx(_k,{items:a,ContainerProps:{fullwidth:!0,mt:6}})})})}if(e.event==="user.prompt"){const n=t==null?void 0:t.prompt;return n?T.jsx(c8,{children:T.jsx(Rh,{children:n})}):null}return null}u8.displayName="InteractionContent";const c8=({children:e})=>T.jsx(Qe,{"data-slot":"interaction-content",py:4,fullwidth:!0,children:T.jsx(En,{gap:4,fullwidth:!0,children:e})});c8.displayName="CardContainer";function Xxe(e){if(e)return e.slice(0,8)}function f8({event:e}){const t=e.meta,n=(t==null?void 0:t.claude_id)??e.conversationId??void 0,r=Xxe(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:T.jsxs(ot,{gap:2,ay:"center",children:[r&&T.jsx(Os,{color:"neutral",size:"small",children:r}),o&&T.jsx(Os,{color:"red",size:"small",children:`exit ${i}`})]})}f8.displayName="LifecycleContent";class d8{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),l=this.removeEmpty(this.tokenize(o,r)),c=this.removeEmpty(this.tokenize(a,r));return this.diffWithOptionsObj(l,c,r,i)}diffWithOptionsObj(t,n,r,i){var o;const a=k=>{if(k=this.postProcess(k,r),i){setTimeout(function(){i(k)},0);return}else return k},l=n.length,c=t.length;let f=1,h=l+c;r.maxEditLength!=null&&(h=Math.min(h,r.maxEditLength));const p=(o=r.timeout)!==null&&o!==void 0?o:1/0,m=Date.now()+p,g=[{oldPos:-1,lastComponent:void 0}];let b=this.extractCommon(g[0],n,t,0,r);if(g[0].oldPos+1>=c&&b+1>=l)return a(this.buildValues(g[0].lastComponent,n,t));let v=-1/0,w=1/0;const x=()=>{for(let k=Math.max(v,-f);k<=Math.min(w,f);k+=2){let C;const R=g[k-1],_=g[k+1];R&&(g[k-1]=void 0);let D=!1;if(_){const O=_.oldPos-k;D=_&&0<=O&&O<l}const M=R&&R.oldPos+1<c;if(!D&&!M){g[k]=void 0;continue}if(!M||D&&R.oldPos<_.oldPos?C=this.addToPath(_,!0,!1,0,r):C=this.addToPath(R,!1,!0,1,r),b=this.extractCommon(C,n,t,k,r),C.oldPos+1>=c&&b+1>=l)return a(this.buildValues(C.lastComponent,n,t))||!0;g[k]=C,C.oldPos+1>=c&&(w=Math.min(w,k-1)),b+1>=l&&(v=Math.max(v,k+1))}f++};if(i)(function k(){setTimeout(function(){if(f>h||Date.now()>m)return i(void 0);x()||k()},0)})();else for(;f<=h&&Date.now()<=m;){const k=x();if(k)return k}}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,l=r.length;let c=t.oldPos,f=c-i,h=0;for(;f+1<a&&c+1<l&&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 l=0,c=0,f=0;for(;l<a;l++){const h=i[l];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(m,g){const b=r[f+g];return b.length>m.length?b:m}),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 E3="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 Qxe extends d8{tokenize(t){const n=new RegExp(`(\\r?\\n)|[${E3}]+|[^\\S\\n\\r]+|[^${E3}]`,"ug");return t.match(n)||[]}}const Zxe=new Qxe;function Jxe(e,t,n){return Zxe.diff(e,t,n)}class ewe extends d8{constructor(){super(...arguments),this.tokenize=rwe}equals(t,n,r){return r.ignoreWhitespace?((!r.newlineIsToken||!t.includes(`
|
|
546
|
-
`))&&(t=t.trim()),(!r.newlineIsToken||!n.includes(`
|
|
547
|
-
`))&&(n=n.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(t.endsWith(`
|
|
548
|
-
`)&&(t=t.slice(0,-1)),n.endsWith(`
|
|
549
|
-
`)&&(n=n.slice(0,-1))),super.equals(t,n,r)}}const twe=new ewe;function nwe(e,t,n){return twe.diff(e,t,n)}function rwe(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
550
|
-
`));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 iwe(e,t){const n=[...e.split(`
|
|
551
|
-
`),...t.split(`
|
|
552
|
-
`)];let r=1/0;for(const o of n){if(o.trim()==="")continue;const a=o.match(/^[ \t]*/),l=a?a[0].length:0;l<r&&(r=l)}if(r===1/0||r===0)return[e,t];const i=o=>o.split(`
|
|
553
|
-
`).map(a=>a.length>=r?a.slice(r):a).join(`
|
|
554
|
-
`);return[i(e),i(t)]}function owe(e,t){const n=[],r=[],i=[];function o(h,p){const m=n.length,b=(h.endsWith(`
|
|
555
|
-
`)?h.slice(0,-1):h).split(`
|
|
556
|
-
`);for(const v of b)n.push(v),r.push(p);return{startIdx:m,lns:b}}for(let h=0;h<e.length;h++){h>0&&(n.push("…"),r.push("separator"));const{oldStr:p,newStr:m}=e[h],[g,b]=iwe(p,m),v=nwe(g,b);let w=0;for(;w<v.length;){const x=v[w];if(x.removed&&w+1<v.length&&v[w+1].added){const k=o(x.value,"remove"),C=o(v[w+1].value,"add"),R=t?Math.min(k.lns.length,C.lns.length):0;for(let _=0;_<R;_++){const D=Jxe(k.lns[_],C.lns[_]);let M=0,O=0;for(const U of D){const L=U.value.length;U.added?(L>0&&i.push({start:{line:C.startIdx+_,character:O},end:{line:C.startIdx+_,character:O+L},properties:{class:"diff-word add"}}),O+=L):U.removed?(L>0&&i.push({start:{line:k.startIdx+_,character:M},end:{line:k.startIdx+_,character:M+L},properties:{class:"diff-word remove"}}),M+=L):(M+=L,O+=L)}}w+=2}else x.removed?(o(x.value,"remove"),w+=1):x.added?(o(x.value,"add"),w+=1):(o(x.value,"context"),w+=1)}}const a=[];let l=1,c=1;for(const h of r)h==="separator"?a.push({old:null,new:null}):h==="remove"?a.push({old:l++,new:null}):h==="add"?a.push({old:null,new:c++}):a.push({old:l++,new:c++});const f=Math.max(l-1,c-1,1);return{code:n.join(`
|
|
557
|
-
`),lineKinds:r,lineNums:a,decorations:i,maxLineNum:f}}function Tw(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 _w(e,t){return{type:"element",tagName:"span",properties:{class:e},children:[{type:"text",value:t}]}}const swe={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 awe(e,t){if(!e)return t;const n=e.split("/").pop()??e,r=n.includes(".")?n.split(".").pop().toLowerCase():"";return swe[r]??t}function iR({edits:e,oldStr:t,newStr:n,language:r,filename:i,wordDiff:o=!1,rows:a,defaultExpanded:l}){var v;const c=e&&e.length>0?e:[{oldStr:t??"",newStr:n??""}],f=r??awe(i,"tsx"),[h,p]=S.useState(""),[m,g]=S.useState(1);S.useEffect(()=>{let w=!1;return(async()=>{const{code:x,lineKinds:k,lineNums:C,decorations:R,maxLineNum:_}=owe(c,o);await PN(f);const M=(await MC()).codeToHtml(x,{lang:f,themes:{light:"vitesse-light",dark:"vitesse-black"},defaultColor:!1,decorations:R,transformers:[{name:"diff-block:line-marks",pre(O){Tw(O,"has-diff")},line(O,U){const L=U-1,I=k[L],$=C[L];if(I==="add"||I==="remove")Tw(O,`diff ${I}`);else if(I==="separator")return Tw(O,"diff-separator"),O;const B=I==="add"?"diff-marker add":I==="remove"?"diff-marker remove":"diff-marker",V=I==="add"?"+":I==="remove"?"-":" ",F="diff-num diff-num-old"+($.old==null?" diff-num-blank":""),z="diff-num diff-num-new"+($.new==null?" diff-num-blank":""),j=[_w(F,$.old!=null?String($.old):" "),_w(z,$.new!=null?String($.new):" "),_w(B,V)];return O.children.unshift(...j),O}}]});w||(p(M),g(String(_).length))})(),()=>{w=!0}},[c,f,o]);const b=((v=c[c.length-1])==null?void 0:v.newStr)??"";return T.jsx("div",{className:"bertrand-diff-block",style:{"--diff-num-width":`${m+2}ch`,width:"100%"},children:T.jsx($C,{code:b,language:f,filename:i,showLineNumbers:!1,rows:a,defaultExpanded:l,HeaderProps:{copyable:!1},html:h,style:{width:"100%"}})})}iR.displayName="DiffBlock";const lwe=5;function TE(e){return!!(e.oldStr||e.newStr||e.edits&&e.edits.length>0)}function h8({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 T.jsx(iR,{edits:t,filename:e.detail,rows:lwe,defaultExpanded:!1})}function uwe(e){const t=e.count>1?`${e.count}× `:"";return e.detail?`${t}${e.detail}`:`${t}${e.tool}`}function p8({permission:e}){return T.jsx(Fe,{size:-1,family:"mono",shade:"muted",children:uwe(e)})}function m8({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?TE(r)?T.jsx(h8,{permission:r}):T.jsx(p8,{permission:r}):null}return T.jsx(cwe,{permissions:n})}function cwe({permissions:e}){const t=e.filter(TE),n=e.filter(r=>!TE(r));return T.jsxs(Qe,{"data-slot":"work-content",gap:2,fullwidth:!0,children:[t.length>0&&T.jsx(Qe,{gap:2,fullwidth:!0,children:t.map((r,i)=>T.jsx(h8,{permission:r},`diff-${i}`))}),n.length>0&&T.jsx(Qe,{gap:1,fullwidth:!0,children:n.map((r,i)=>T.jsx(p8,{permission:r},`info-${i}`))})]})}m8.displayName="WorkContent";function g8({event:e}){switch(Ume(e.event)){case"interaction":return T.jsx(u8,{event:e});case"work":return T.jsx(m8,{event:e});case"assistant":return T.jsx(l8,{event:e});case"lifecycle":return T.jsx(f8,{event:e});default:return null}}g8.displayName="EventContent";const y8=({sessionId:e,isLive:t,projectSlug:n,...r})=>{const{data:i}=Wi({...Ame(e,t,n),enabled:!!e}),{data:o}=Wi({..._me(e,t,n),enabled:!!e});return T.jsx(Bk,{"data-slot":"secondary-sidebar",...r,p:0,minw:540,children:i&&T.jsx(b8,{stats:i,engagement:o})})};y8.displayName="SecondarySidebar";function fwe(e){return Object.entries(e).sort(([,t],[,n])=>n-t).slice(0,3).map(([t,n])=>`${t} ${n}`).join(" · ")}const b8=({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,l=!!t&&(o>0||a>0),c=[{label:"Activity",value:"activity",render:T.jsxs(oy,{children:[T.jsx(En,{title:"Conversations",description:"Distinct conversation threads",icon:yY,action:T.jsx(vo,{value:e.conversationCount})}),T.jsx(En,{title:"Interactions",description:"User-Claude exchanges",icon:hY,action:T.jsx(vo,{value:e.interactionCount})}),T.jsx(En,{title:"Events",description:"Total events emitted",icon:$G,action:T.jsx(vo,{value:e.eventCount})}),T.jsx(En,{title:"Duration",description:"Total session time",icon:tP,action:T.jsx(vo,{label:cw(e.durationS)})}),T.jsx(En,{title:"Claude work",description:"Time Claude spent active",icon:QG,action:T.jsx(vo,{label:cw(e.claudeWorkS)})}),T.jsx(En,{title:"User wait",description:"Time user spent waiting",icon:mY,action:T.jsx(vo,{label:cw(e.userWaitS)})})]})}];return i&&c.push({label:"Code",value:"code",render:T.jsxs(oy,{children:[n&&T.jsx(En,{title:"Lines changed",description:"Across all edits",icon:nP,action:T.jsx(v8,{added:e.linesAdded,removed:e.linesRemoved})}),r&&T.jsx(En,{title:"Files touched",description:"Distinct files edited",icon:rP,action:T.jsx(vo,{value:e.filesTouched})})]})}),l&&c.push({label:"Engagement",value:"engagement",render:T.jsxs(oy,{children:[o>0&&T.jsx(En,{title:"Tracked tool calls",description:fwe(t.toolUsage),icon:iP,action:T.jsx(vo,{value:o})}),a>0&&T.jsx(En,{title:"Discarded conversations",description:`${t.discardRate.discarded} of ${a}`,icon:GY,action:T.jsx(vo,{value:t.discardRate.discarded})})]})}),T.jsx(_k,{items:c,fullwidth:!0,ContainerProps:{fullwidth:!0}})};b8.displayName="SessionStats";const oy=({children:e})=>T.jsx(Qe,{"data-slot":"section-stack",ax:"stretch",pt:4,fullwidth:!0,gap:2,children:e});oy.displayName="SectionStack";const vo=e=>T.jsx(Fe,{"data-slot":"stat",size:3,family:"mono",weight:"bold",children:"label"in e?e.label:e.value});vo.displayName="Stat";const v8=({added:e,removed:t})=>T.jsxs(Fe,{"data-slot":"diff-stat",size:3,family:"mono",weight:"bold",children:[T.jsx(Fe,{color:"green",family:"mono",weight:"bold",children:`+${e}`})," / ",T.jsx(Fe,{color:"red",family:"mono",weight:"bold",children:`-${t}`})]});v8.displayName="DiffStat";const oR=({session:e,categoryPath:t,size:n="small",variant:r="subtle",shape:i="square",...o})=>{const[a,l]=S.useState(!1);if(e.status!=="paused")return null;const c=`${t}/${e.slug}`;return T.jsx(Lb,{tooltip:a?"Copied!":"Copy session path",size:n,variant:r,shape:i,pressed:a,onPressedChange:f=>{f&&(navigator.clipboard.writeText(c),l(!0),setTimeout(()=>l(!1),2e3))},icon:{unpressed:T.jsx(eC,{}),pressed:T.jsx(JE,{color:"green"})},onClick:f=>{f.preventDefault(),f.stopPropagation()},...o})};oR.displayName="CopyResumeButton";const x8=({session:e,...t})=>{const{categoryPath:n,session:r}=e,i=vv(r.status);return T.jsxs(ot,{"data-slot":"session-item",ay:"center",gap:2,ml:2,...t,children:[T.jsxs(ot,{gap:2,ay:"center",children:[T.jsx(lp,{"data-slot":"session-status",color:i}),T.jsx(Qe,{gap:2,children:T.jsxs(Fe,{"data-slot":"session-link",render:T.jsx(Du,{to:"/$",params:{_splat:`${n}/${r.slug}`}}),weight:"bold",children:[n," / ",r.slug]})}),T.jsx(Fe,{"data-slot":"session-time",size:-1,shade:"muted",children:zk(r.startedAt)})]}),T.jsx(Os,{"data-slot":"session-badge",color:i,ml:"auto",children:r.status}),T.jsx(oR,{session:r,categoryPath:n})]})};x8.displayName="SessionItem";const w8=rp("/$")({component:dwe}),S8=({href:e,children:t})=>T.jsx(Du,{to:e,children:t});function E8(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 dwe(){const{_splat:e=""}=w8.useParams(),{projects:t,queryProjects:n}=Sp(),{data:r=[]}=Wi(Yh({projects:n})),{data:i=[]}=Wi(Yh({includeArchived:!0,projects:t.map(a=>a.slug)})),o=OO(e,r)??OO(e,i);return o?T.jsx(R8,{match:o}):T.jsx(k8,{categoryPath:e,sessions:r})}function C8(){var t;const{data:e=[]}=Wi(Wz);return((t=e.find(n=>n.active))==null?void 0:t.name)??"bertrand"}function k8({categoryPath:e,sessions:t}){const n=C8(),r=t.filter(o=>o.categoryPath===e),i=E8(n,e);return T.jsxs(Qe,{gap:4,ax:"stretch",fullwidth:!0,children:[T.jsx(Qe,{bb:1,p:4,style:{position:"sticky",top:0,backgroundColor:"var(--shade-background)",zIndex:1},children:T.jsx(Nk,{items:i,linkAs:S8})}),T.jsx(Qe,{px:8,gap:2,style:{overflow:"auto"},children:r.length>0?r.map(o=>T.jsx(x8,{session:o},o.session.id)):T.jsx(Fe,{shade:"muted",children:"No sessions in this category."})})]})}k8.displayName="CategoryDetail";function R8({match:e}){var h,p;const t=C8(),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=[]}=Wi(Rme(i,o,n)),l=S.useMemo(()=>xge(a),[a]),c=S.useMemo(()=>{var m;if(e.session.status!=="waiting")return null;for(let g=a.length-1;g>=0;g--)if(a[g].event==="session.waiting"){const b=(m=a[g].meta)==null?void 0:m.question;return typeof b=="string"?b:null}return null},[a,e.session.status]),f=E8(r,e.categoryPath,e.session.name);return T.jsxs(Qe,{ax:"stretch",fullwidth:!0,style:{overflow:"hidden"},children:[T.jsxs(ot,{bb:1,px:4,py:2,ay:"center",ax:"space-between",fullwidth:!0,children:[T.jsx(Nk,{items:f,linkAs:S8}),T.jsxs(ot,{ay:"center",gap:2,children:[T.jsx(oR,{session:e.session,categoryPath:e.categoryPath}),T.jsx(T8,{session:e.session}),T.jsx(zI,{side:"right",title:"Session stats",trigger:T.jsx(js,{tooltip:"Session stats",variant:"subtle",size:"small",shape:"square",children:T.jsx(_Y,{})}),children:T.jsx(y8,{sessionId:i,isLive:o,projectSlug:n})})]})]}),T.jsx(Qe,{p:8,ax:"stretch",fullwidth:!0,style:{overflowY:"auto"},children:l.length>0&&T.jsx(vL,{activeIndex:l.length,items:l.map(m=>({title:Qme(m),time:Zme(m.createdAt),color:Zz(m.event),media:T.jsx(A8,{event:m}),content:T.jsx(g8,{event:m})})),ItemProps:{style:{width:"100%"},ContentProps:{fullwidth:!0,maxw:860}}})}),T.jsx(_8,{session:e.session,pendingQuestion:c})]})}R8.displayName="SessionDetail";function A8({event:e}){const t=Wme(e.event);return T.jsx(Fe,{color:Zz(e.event),render:T.jsx("span",{}),children:T.jsx(t,{size:16})})}A8.displayName="EventMedia";function T8({session:e}){const t=e5(e),{Icon:n}=t;return T.jsx(js,{tooltip:t.tooltip,variant:"subtle",size:"small",shape:"square",disabled:t.disabled,loading:t.loading,onClick:t.onClick,"aria-label":t.label,children:T.jsx(n,{})})}T8.displayName="ArchiveToggle";function _8({session:e,pendingQuestion:t}){const n=vv(e.status),r=e.status==="active"||e.status==="waiting";return T.jsx(Qe,{bt:1,p:4,gap:3,fullwidth:!0,children:T.jsxs(ot,{ay:"center",gap:2,fullwidth:!0,children:[T.jsx(lp,{color:n,pulse:r}),T.jsx(Os,{color:n,children:e.status}),t&&T.jsx(Fe,{size:1,shade:"muted",children:t})]})})}_8.displayName="SessionFooter";const hwe=rp("/")({component:()=>T.jsx("div",{style:{opacity:.5,fontSize:13},children:"Select a session"})}),pwe=`# Heading 1 — anchored
|
|
558
|
-
|
|
559
|
-
## Heading 2 — anchored
|
|
560
|
-
|
|
561
|
-
### Heading 3
|
|
562
|
-
|
|
563
|
-
#### Heading 4
|
|
564
|
-
|
|
565
|
-
##### Heading 5
|
|
566
|
-
|
|
567
|
-
###### Heading 6
|
|
568
|
-
|
|
569
|
-
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.
|
|
570
|
-
|
|
571
|
-
> A blockquote can sit between paragraphs. It should look distinct enough to read as a quotation, not just indented prose.
|
|
572
|
-
|
|
573
|
-
---
|
|
574
|
-
|
|
575
|
-
## Lists
|
|
576
|
-
|
|
577
|
-
- Unordered list item one
|
|
578
|
-
- Unordered list item two with **emphasis** and \`code\`
|
|
579
|
-
- Nested item
|
|
580
|
-
- Another nested item
|
|
581
|
-
- Three levels deep
|
|
582
|
-
|
|
583
|
-
1. Ordered list item one
|
|
584
|
-
2. Ordered list item two
|
|
585
|
-
3. Ordered list item three
|
|
586
|
-
|
|
587
|
-
### Task list
|
|
588
|
-
|
|
589
|
-
- [x] Done item
|
|
590
|
-
- [x] Another done item
|
|
591
|
-
- [ ] Open item
|
|
592
|
-
- [ ] Open item with [a link](https://example.com)
|
|
593
|
-
|
|
594
|
-
---
|
|
595
|
-
|
|
596
|
-
## Tables
|
|
597
|
-
|
|
598
|
-
| Feature | Status | Notes |
|
|
599
|
-
|---|---|---|
|
|
600
|
-
| Headings | ✓ | rehype-slug |
|
|
601
|
-
| Tables | ✓ | mapped to TableRoot/Header/Body/Row/Head/Cell |
|
|
602
|
-
| Code blocks | ✓ | shiki via CodeBlock |
|
|
603
|
-
| Task lists | ✓ | disabled checkbox render |
|
|
604
|
-
|
|
605
|
-
| Left | Center | Right |
|
|
606
|
-
|:---|:---:|---:|
|
|
607
|
-
| 1 | 2 | 3 |
|
|
608
|
-
| left-aligned | center-aligned | right-aligned |
|
|
609
|
-
|
|
610
|
-
---
|
|
611
|
-
|
|
612
|
-
## Code
|
|
613
|
-
|
|
614
|
-
Inline: use \`bun run typecheck\` or \`tsc --noEmit\` to validate.
|
|
615
|
-
|
|
616
|
-
\`\`\`ts
|
|
617
|
-
// known language — should syntax-highlight
|
|
618
|
-
import { Markdown } from "../components/markdown";
|
|
619
|
-
|
|
620
|
-
export function Demo() {
|
|
621
|
-
return <Markdown>{"# hi"}</Markdown>;
|
|
622
|
-
}
|
|
623
|
-
\`\`\`
|
|
624
|
-
|
|
625
|
-
\`\`\`tsx
|
|
626
|
-
const App = () => <div>{"jsx works too"}</div>;
|
|
627
|
-
\`\`\`
|
|
628
|
-
|
|
629
|
-
\`\`\`js
|
|
630
|
-
// alias — js → javascript
|
|
631
|
-
function add(a, b) { return a + b; }
|
|
632
|
-
\`\`\`
|
|
633
|
-
|
|
634
|
-
\`\`\`sh
|
|
635
|
-
# alias — sh → bash
|
|
636
|
-
bun run dev
|
|
637
|
-
\`\`\`
|
|
638
|
-
|
|
639
|
-
\`\`\`json
|
|
640
|
-
{
|
|
641
|
-
"language": "json",
|
|
642
|
-
"ok": true
|
|
643
|
-
}
|
|
644
|
-
\`\`\`
|
|
645
|
-
|
|
646
|
-
\`\`\`unknownlanguage
|
|
647
|
-
// unknown language — should render plaintext, not throw
|
|
648
|
-
some content here
|
|
649
|
-
\`\`\`
|
|
650
|
-
|
|
651
|
-
\`\`\`
|
|
652
|
-
no language tag — also plaintext
|
|
653
|
-
multiple lines
|
|
654
|
-
\`\`\`
|
|
655
|
-
|
|
656
|
-
---
|
|
657
|
-
|
|
658
|
-
## Edge cases
|
|
659
|
-
|
|
660
|
-
A paragraph immediately followed by a fenced block:
|
|
661
|
-
\`\`\`ts
|
|
662
|
-
const ok = true;
|
|
663
|
-
\`\`\`
|
|
664
|
-
|
|
665
|
-
Paragraph after the fence — should render with normal spacing.
|
|
666
|
-
|
|
667
|
-
A line with **bold at the very end**
|
|
668
|
-
|
|
669
|
-
A line ending with \`inline code\`
|
|
670
|
-
|
|
671
|
-
An empty heading below this line:
|
|
672
|
-
|
|
673
|
-
##
|
|
674
|
-
|
|
675
|
-
End of fixture.
|
|
676
|
-
`;function mwe(){const[e,t]=S.useState(pwe);return T.jsxs(Qe,{gap:4,p:6,fullwidth:!0,style:{overflow:"auto"},children:[T.jsxs(Qe,{gap:2,children:[T.jsx(Fe,{size:3,weight:"bold",children:"Markdown kitchen sink"}),T.jsx(Fe,{size:2,shade:"muted",children:"Edit the source on the left, see it rendered on the right. Reset by reloading the page."})]}),T.jsxs(ot,{gap:4,fullwidth:!0,ay:"stretch",evenly:!0,children:[T.jsxs(Qe,{gap:2,ax:"stretch",children:[T.jsx(Fe,{size:0,shade:"muted",children:"source"}),T.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"}})]}),T.jsxs(Qe,{gap:2,children:[T.jsx(Fe,{size:0,shade:"muted",children:"rendered"}),T.jsx(En,{children:T.jsx(Rh,{children:e})})]})]})]})}const gwe=rp("/dev/markdown")({component:mwe}),ywe=`import { useState } from "react";
|
|
677
|
-
|
|
678
|
-
export function Counter() {
|
|
679
|
-
const [count, setCount] = useState(0);
|
|
680
|
-
|
|
681
|
-
function increment() {
|
|
682
|
-
setCount(count + 1);
|
|
683
|
-
}
|
|
684
|
-
|
|
685
|
-
return (
|
|
686
|
-
<button onClick={increment}>
|
|
687
|
-
{count}
|
|
688
|
-
</button>
|
|
689
|
-
);
|
|
690
|
-
}
|
|
691
|
-
`,bwe=`import { useCallback, useState } from "react";
|
|
692
|
-
|
|
693
|
-
type CounterProps = {
|
|
694
|
-
step?: number;
|
|
695
|
-
};
|
|
696
|
-
|
|
697
|
-
export function Counter({ step = 1 }: CounterProps) {
|
|
698
|
-
const [count, setCount] = useState(0);
|
|
699
|
-
|
|
700
|
-
const increment = useCallback(() => {
|
|
701
|
-
setCount((c) => c + step);
|
|
702
|
-
}, [step]);
|
|
703
|
-
|
|
704
|
-
return (
|
|
705
|
-
<button type="button" onClick={increment}>
|
|
706
|
-
count: {count}
|
|
707
|
-
</button>
|
|
708
|
-
);
|
|
709
|
-
}
|
|
710
|
-
`,C3={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"},vwe=Object.entries(EL);function xwe(){const[e,t]=S.useState(ywe),[n,r]=S.useState(bwe),[i,o]=S.useState("tsx"),[a,l]=S.useState(!1);return T.jsxs(Qe,{gap:4,p:6,fullwidth:!0,style:{overflow:"auto"},children:[T.jsxs(Qe,{gap:2,children:[T.jsx(Fe,{size:3,weight:"bold",children:"Diff kitchen sink"}),T.jsx(Fe,{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."})]}),T.jsxs(ot,{ay:"center",gap:4,children:[T.jsxs(ot,{ay:"center",gap:2,children:[T.jsx(Fe,{size:0,shade:"muted",children:"language"}),T.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:vwe.map(([c,f])=>T.jsx("option",{value:c,children:f},c))})]}),T.jsxs(ot,{ay:"center",gap:2,children:[T.jsx("input",{id:"word-diff",type:"checkbox",checked:a,onChange:c=>l(c.target.checked)}),T.jsx(Fe,{size:0,shade:"muted",render:T.jsx("label",{htmlFor:"word-diff"}),children:"word diff"})]})]}),T.jsxs(ot,{gap:4,fullwidth:!0,ay:"stretch",evenly:!0,children:[T.jsxs(Qe,{gap:3,ax:"stretch",children:[T.jsxs(Qe,{gap:2,ax:"stretch",children:[T.jsx(Fe,{size:0,shade:"muted",children:"old"}),T.jsx(En,{ax:"stretch",children:T.jsx("textarea",{value:e,onChange:c=>t(c.target.value),spellCheck:!1,style:C3})})]}),T.jsxs(Qe,{gap:2,ax:"stretch",children:[T.jsx(Fe,{size:0,shade:"muted",children:"new"}),T.jsx(En,{ax:"stretch",children:T.jsx("textarea",{value:n,onChange:c=>r(c.target.value),spellCheck:!1,style:C3})})]})]}),T.jsxs(Qe,{gap:2,ax:"stretch",children:[T.jsx(Fe,{size:0,shade:"muted",children:"diff"}),T.jsx(iR,{oldStr:e,newStr:n,language:i,wordDiff:a})]})]})]})}const wwe=rp("/dev/diff")({component:xwe}),Swe=age.update({id:"/worktrees",path:"/worktrees",getParentRoute:()=>Wf}),Ewe=w8.update({id:"/$",path:"/$",getParentRoute:()=>Wf}),Cwe=hwe.update({id:"/",path:"/",getParentRoute:()=>Wf}),kwe=gwe.update({id:"/dev/markdown",path:"/dev/markdown",getParentRoute:()=>Wf}),Rwe=wwe.update({id:"/dev/diff",path:"/dev/diff",getParentRoute:()=>Wf}),Awe={IndexRoute:Cwe,SplatRoute:Ewe,WorktreesRoute:Swe,DevDiffRoute:Rwe,DevMarkdownRoute:kwe},Twe=Wf._addFileChildren(Awe)._addFileTypes();typeof navigator<"u"&&"serviceWorker"in navigator&&navigator.serviceWorker.getRegistrations().then(e=>{for(const t of e)t.unregister()});const _we=new k9({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!0}}}),Dwe=kU({routeTree:Twe});e9.createRoot(document.getElementById("root")).render(T.jsx(S.StrictMode,{children:T.jsx(R9,{client:_we,children:T.jsx(Ome,{children:T.jsxs(gZ,{children:[T.jsx(TU,{router:Dwe}),T.jsx(YI,{position:"bottom"})]})})})}));
|