dorkos 0.1.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.
@@ -0,0 +1,476 @@
1
+ var hL=Object.defineProperty;var S2=e=>{throw TypeError(e)};var mL=(e,t,n)=>t in e?hL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var qe=(e,t,n)=>mL(e,typeof t!="symbol"?t+"":t,n),Ag=(e,t,n)=>t.has(e)||S2("Cannot "+n);var Q=(e,t,n)=>(Ag(e,t,"read from private field"),n?n.call(e):t.get(e)),je=(e,t,n)=>t.has(e)?S2("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ae=(e,t,n,r)=>(Ag(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),at=(e,t,n)=>(Ag(e,t,"access private method"),n);var th=(e,t,n,r)=>({set _(s){Ae(e,t,s,n)},get _(){return Q(e,t,r)}});function pL(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(r,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>r[s]})}}}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 s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();const gL="modulepreload",bL=function(e){return"/"+e},w2={},Ty=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){let l=function(d){return Promise.all(d.map(m=>Promise.resolve(m).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),f=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));s=l(n.map(d=>{if(d=bL(d),d in w2)return;w2[d]=!0;const m=d.endsWith(".css"),p=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${p}`))return;const b=document.createElement("link");if(b.rel=m?"stylesheet":gL,m||(b.as="script"),b.crossOrigin="",b.href=d,f&&b.setAttribute("nonce",f),document.head.appendChild(b),m)return new Promise((x,S)=>{b.addEventListener("load",x),b.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${d}`)))})}))}function o(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return s.then(l=>{for(const c of l||[])c.status==="rejected"&&o(c.reason);return t().catch(o)})};function xf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _g={exports:{}},cc={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var C2;function yL(){if(C2)return cc;C2=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,s,o){var l=null;if(o!==void 0&&(l=""+o),s.key!==void 0&&(l=""+s.key),"key"in s){o={};for(var c in s)c!=="key"&&(o[c]=s[c])}else o=s;return s=o.ref,{$$typeof:e,type:r,key:l,ref:s!==void 0?s:null,props:o}}return cc.Fragment=t,cc.jsx=n,cc.jsxs=n,cc}var A2;function xL(){return A2||(A2=1,_g.exports=yL()),_g.exports}var g=xL(),kg={exports:{}},We={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var _2;function EL(){if(_2)return We;_2=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),b=Symbol.iterator;function x(V){return V===null||typeof V!="object"?null:(V=b&&V[b]||V["@@iterator"],typeof V=="function"?V:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,C={};function A(V,re,P){this.props=V,this.context=re,this.refs=C,this.updater=P||S}A.prototype.isReactComponent={},A.prototype.setState=function(V,re){if(typeof V!="object"&&typeof V!="function"&&V!=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,V,re,"setState")},A.prototype.forceUpdate=function(V){this.updater.enqueueForceUpdate(this,V,"forceUpdate")};function N(){}N.prototype=A.prototype;function k(V,re,P){this.props=V,this.context=re,this.refs=C,this.updater=P||S}var R=k.prototype=new N;R.constructor=k,w(R,A.prototype),R.isPureReactComponent=!0;var U=Array.isArray;function I(){}var j={H:null,A:null,T:null,S:null},M=Object.prototype.hasOwnProperty;function $(V,re,P){var he=P.ref;return{$$typeof:e,type:V,key:re,ref:he!==void 0?he:null,props:P}}function L(V,re){return $(V.type,re,V.props)}function W(V){return typeof V=="object"&&V!==null&&V.$$typeof===e}function K(V){var re={"=":"=0",":":"=2"};return"$"+V.replace(/[=:]/g,function(P){return re[P]})}var J=/\/+/g;function te(V,re){return typeof V=="object"&&V!==null&&V.key!=null?K(""+V.key):re.toString(36)}function ie(V){switch(V.status){case"fulfilled":return V.value;case"rejected":throw V.reason;default:switch(typeof V.status=="string"?V.then(I,I):(V.status="pending",V.then(function(re){V.status==="pending"&&(V.status="fulfilled",V.value=re)},function(re){V.status==="pending"&&(V.status="rejected",V.reason=re)})),V.status){case"fulfilled":return V.value;case"rejected":throw V.reason}}throw V}function O(V,re,P,he,ye){var ge=typeof V;(ge==="undefined"||ge==="boolean")&&(V=null);var fe=!1;if(V===null)fe=!0;else switch(ge){case"bigint":case"string":case"number":fe=!0;break;case"object":switch(V.$$typeof){case e:case t:fe=!0;break;case m:return fe=V._init,O(fe(V._payload),re,P,he,ye)}}if(fe)return ye=ye(V),fe=he===""?"."+te(V,0):he,U(ye)?(P="",fe!=null&&(P=fe.replace(J,"$&/")+"/"),O(ye,re,P,"",function(Ie){return Ie})):ye!=null&&(W(ye)&&(ye=L(ye,P+(ye.key==null||V&&V.key===ye.key?"":(""+ye.key).replace(J,"$&/")+"/")+fe)),re.push(ye)),1;fe=0;var Se=he===""?".":he+":";if(U(V))for(var we=0;we<V.length;we++)he=V[we],ge=Se+te(he,we),fe+=O(he,re,P,ge,ye);else if(we=x(V),typeof we=="function")for(V=we.call(V),we=0;!(he=V.next()).done;)he=he.value,ge=Se+te(he,we++),fe+=O(he,re,P,ge,ye);else if(ge==="object"){if(typeof V.then=="function")return O(ie(V),re,P,he,ye);throw re=String(V),Error("Objects are not valid as a React child (found: "+(re==="[object Object]"?"object with keys {"+Object.keys(V).join(", ")+"}":re)+"). If you meant to render a collection of children, use an array instead.")}return fe}function H(V,re,P){if(V==null)return V;var he=[],ye=0;return O(V,he,"","",function(ge){return re.call(P,ge,ye++)}),he}function q(V){if(V._status===-1){var re=V._result;re=re(),re.then(function(P){(V._status===0||V._status===-1)&&(V._status=1,V._result=P)},function(P){(V._status===0||V._status===-1)&&(V._status=2,V._result=P)}),V._status===-1&&(V._status=0,V._result=re)}if(V._status===1)return V._result.default;throw V._result}var ne=typeof reportError=="function"?reportError:function(V){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var re=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof V=="object"&&V!==null&&typeof V.message=="string"?String(V.message):String(V),error:V});if(!window.dispatchEvent(re))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",V);return}console.error(V)},B={map:H,forEach:function(V,re,P){H(V,function(){re.apply(this,arguments)},P)},count:function(V){var re=0;return H(V,function(){re++}),re},toArray:function(V){return H(V,function(re){return re})||[]},only:function(V){if(!W(V))throw Error("React.Children.only expected to receive a single React element child.");return V}};return We.Activity=p,We.Children=B,We.Component=A,We.Fragment=n,We.Profiler=s,We.PureComponent=k,We.StrictMode=r,We.Suspense=f,We.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=j,We.__COMPILER_RUNTIME={__proto__:null,c:function(V){return j.H.useMemoCache(V)}},We.cache=function(V){return function(){return V.apply(null,arguments)}},We.cacheSignal=function(){return null},We.cloneElement=function(V,re,P){if(V==null)throw Error("The argument must be a React element, but you passed "+V+".");var he=w({},V.props),ye=V.key;if(re!=null)for(ge in re.key!==void 0&&(ye=""+re.key),re)!M.call(re,ge)||ge==="key"||ge==="__self"||ge==="__source"||ge==="ref"&&re.ref===void 0||(he[ge]=re[ge]);var ge=arguments.length-2;if(ge===1)he.children=P;else if(1<ge){for(var fe=Array(ge),Se=0;Se<ge;Se++)fe[Se]=arguments[Se+2];he.children=fe}return $(V.type,ye,he)},We.createContext=function(V){return V={$$typeof:l,_currentValue:V,_currentValue2:V,_threadCount:0,Provider:null,Consumer:null},V.Provider=V,V.Consumer={$$typeof:o,_context:V},V},We.createElement=function(V,re,P){var he,ye={},ge=null;if(re!=null)for(he in re.key!==void 0&&(ge=""+re.key),re)M.call(re,he)&&he!=="key"&&he!=="__self"&&he!=="__source"&&(ye[he]=re[he]);var fe=arguments.length-2;if(fe===1)ye.children=P;else if(1<fe){for(var Se=Array(fe),we=0;we<fe;we++)Se[we]=arguments[we+2];ye.children=Se}if(V&&V.defaultProps)for(he in fe=V.defaultProps,fe)ye[he]===void 0&&(ye[he]=fe[he]);return $(V,ge,ye)},We.createRef=function(){return{current:null}},We.forwardRef=function(V){return{$$typeof:c,render:V}},We.isValidElement=W,We.lazy=function(V){return{$$typeof:m,_payload:{_status:-1,_result:V},_init:q}},We.memo=function(V,re){return{$$typeof:d,type:V,compare:re===void 0?null:re}},We.startTransition=function(V){var re=j.T,P={};j.T=P;try{var he=V(),ye=j.S;ye!==null&&ye(P,he),typeof he=="object"&&he!==null&&typeof he.then=="function"&&he.then(I,ne)}catch(ge){ne(ge)}finally{re!==null&&P.types!==null&&(re.types=P.types),j.T=re}},We.unstable_useCacheRefresh=function(){return j.H.useCacheRefresh()},We.use=function(V){return j.H.use(V)},We.useActionState=function(V,re,P){return j.H.useActionState(V,re,P)},We.useCallback=function(V,re){return j.H.useCallback(V,re)},We.useContext=function(V){return j.H.useContext(V)},We.useDebugValue=function(){},We.useDeferredValue=function(V,re){return j.H.useDeferredValue(V,re)},We.useEffect=function(V,re){return j.H.useEffect(V,re)},We.useEffectEvent=function(V){return j.H.useEffectEvent(V)},We.useId=function(){return j.H.useId()},We.useImperativeHandle=function(V,re,P){return j.H.useImperativeHandle(V,re,P)},We.useInsertionEffect=function(V,re){return j.H.useInsertionEffect(V,re)},We.useLayoutEffect=function(V,re){return j.H.useLayoutEffect(V,re)},We.useMemo=function(V,re){return j.H.useMemo(V,re)},We.useOptimistic=function(V,re){return j.H.useOptimistic(V,re)},We.useReducer=function(V,re,P){return j.H.useReducer(V,re,P)},We.useRef=function(V){return j.H.useRef(V)},We.useState=function(V){return j.H.useState(V)},We.useSyncExternalStore=function(V,re,P){return j.H.useSyncExternalStore(V,re,P)},We.useTransition=function(){return j.H.useTransition()},We.version="19.2.4",We}var k2;function Sy(){return k2||(k2=1,kg.exports=EL()),kg.exports}var E=Sy();const Ce=xf(E),wy=pL({__proto__:null,default:Ce},[E]);var Ng={exports:{}},fc={},Rg={exports:{}},Dg={};/**
18
+ * @license React
19
+ * scheduler.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var N2;function vL(){return N2||(N2=1,(function(e){function t(O,H){var q=O.length;O.push(H);e:for(;0<q;){var ne=q-1>>>1,B=O[ne];if(0<s(B,H))O[ne]=H,O[q]=B,q=ne;else break e}}function n(O){return O.length===0?null:O[0]}function r(O){if(O.length===0)return null;var H=O[0],q=O.pop();if(q!==H){O[0]=q;e:for(var ne=0,B=O.length,V=B>>>1;ne<V;){var re=2*(ne+1)-1,P=O[re],he=re+1,ye=O[he];if(0>s(P,q))he<B&&0>s(ye,P)?(O[ne]=ye,O[he]=q,ne=he):(O[ne]=P,O[re]=q,ne=re);else if(he<B&&0>s(ye,q))O[ne]=ye,O[he]=q,ne=he;else break e}}return H}function s(O,H){var q=O.sortIndex-H.sortIndex;return q!==0?q:O.id-H.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 l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var f=[],d=[],m=1,p=null,b=3,x=!1,S=!1,w=!1,C=!1,A=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function R(O){for(var H=n(d);H!==null;){if(H.callback===null)r(d);else if(H.startTime<=O)r(d),H.sortIndex=H.expirationTime,t(f,H);else break;H=n(d)}}function U(O){if(w=!1,R(O),!S)if(n(f)!==null)S=!0,I||(I=!0,K());else{var H=n(d);H!==null&&ie(U,H.startTime-O)}}var I=!1,j=-1,M=5,$=-1;function L(){return C?!0:!(e.unstable_now()-$<M)}function W(){if(C=!1,I){var O=e.unstable_now();$=O;var H=!0;try{e:{S=!1,w&&(w=!1,N(j),j=-1),x=!0;var q=b;try{t:{for(R(O),p=n(f);p!==null&&!(p.expirationTime>O&&L());){var ne=p.callback;if(typeof ne=="function"){p.callback=null,b=p.priorityLevel;var B=ne(p.expirationTime<=O);if(O=e.unstable_now(),typeof B=="function"){p.callback=B,R(O),H=!0;break t}p===n(f)&&r(f),R(O)}else r(f);p=n(f)}if(p!==null)H=!0;else{var V=n(d);V!==null&&ie(U,V.startTime-O),H=!1}}break e}finally{p=null,b=q,x=!1}H=void 0}}finally{H?K():I=!1}}}var K;if(typeof k=="function")K=function(){k(W)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,te=J.port2;J.port1.onmessage=W,K=function(){te.postMessage(null)}}else K=function(){A(W,0)};function ie(O,H){j=A(function(){O(e.unstable_now())},H)}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(O){O.callback=null},e.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<O?Math.floor(1e3/O):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(O){switch(b){case 1:case 2:case 3:var H=3;break;default:H=b}var q=b;b=H;try{return O()}finally{b=q}},e.unstable_requestPaint=function(){C=!0},e.unstable_runWithPriority=function(O,H){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var q=b;b=O;try{return H()}finally{b=q}},e.unstable_scheduleCallback=function(O,H,q){var ne=e.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?ne+q:ne):q=ne,O){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=q+B,O={id:m++,callback:H,priorityLevel:O,startTime:q,expirationTime:B,sortIndex:-1},q>ne?(O.sortIndex=q,t(d,O),n(f)===null&&O===n(d)&&(w?(N(j),j=-1):w=!0,ie(U,q-ne))):(O.sortIndex=B,t(f,O),S||x||(S=!0,I||(I=!0,K()))),O},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(O){var H=b;return function(){var q=b;b=H;try{return O.apply(this,arguments)}finally{b=q}}}})(Dg)),Dg}var R2;function TL(){return R2||(R2=1,Rg.exports=vL()),Rg.exports}var Og={exports:{}},qn={};/**
26
+ * @license React
27
+ * react-dom.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var D2;function SL(){if(D2)return qn;D2=1;var e=Sy();function t(f){var d="https://react.dev/errors/"+f;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)d+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+f+"; visit "+d+" 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},s=Symbol.for("react.portal");function o(f,d,m){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:p==null?null:""+p,children:f,containerInfo:d,implementation:m}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(f,d){if(f==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return qn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,qn.createPortal=function(f,d){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(t(299));return o(f,d,null,m)},qn.flushSync=function(f){var d=l.T,m=r.p;try{if(l.T=null,r.p=2,f)return f()}finally{l.T=d,r.p=m,r.d.f()}},qn.preconnect=function(f,d){typeof f=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,r.d.C(f,d))},qn.prefetchDNS=function(f){typeof f=="string"&&r.d.D(f)},qn.preinit=function(f,d){if(typeof f=="string"&&d&&typeof d.as=="string"){var m=d.as,p=c(m,d.crossOrigin),b=typeof d.integrity=="string"?d.integrity:void 0,x=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;m==="style"?r.d.S(f,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:p,integrity:b,fetchPriority:x}):m==="script"&&r.d.X(f,{crossOrigin:p,integrity:b,fetchPriority:x,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},qn.preinitModule=function(f,d){if(typeof f=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var m=c(d.as,d.crossOrigin);r.d.M(f,{crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&r.d.M(f)},qn.preload=function(f,d){if(typeof f=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var m=d.as,p=c(m,d.crossOrigin);r.d.L(f,m,{crossOrigin:p,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},qn.preloadModule=function(f,d){if(typeof f=="string")if(d){var m=c(d.as,d.crossOrigin);r.d.m(f,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else r.d.m(f)},qn.requestFormReset=function(f){r.d.r(f)},qn.unstable_batchedUpdates=function(f,d){return f(d)},qn.useFormState=function(f,d,m){return l.H.useFormState(f,d,m)},qn.useFormStatus=function(){return l.H.useHostTransitionStatus()},qn.version="19.2.4",qn}var O2;function c3(){if(O2)return Og.exports;O2=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(),Og.exports=SL(),Og.exports}/**
34
+ * @license React
35
+ * react-dom-client.production.js
36
+ *
37
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */var M2;function wL(){if(M2)return fc;M2=1;var e=TL(),t=Sy(),n=c3();function r(i){var a="https://react.dev/errors/"+i;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)a+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+i+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function o(i){var a=i,u=i;if(i.alternate)for(;a.return;)a=a.return;else{i=a;do a=i,(a.flags&4098)!==0&&(u=a.return),i=a.return;while(i)}return a.tag===3?u:null}function l(i){if(i.tag===13){var a=i.memoizedState;if(a===null&&(i=i.alternate,i!==null&&(a=i.memoizedState)),a!==null)return a.dehydrated}return null}function c(i){if(i.tag===31){var a=i.memoizedState;if(a===null&&(i=i.alternate,i!==null&&(a=i.memoizedState)),a!==null)return a.dehydrated}return null}function f(i){if(o(i)!==i)throw Error(r(188))}function d(i){var a=i.alternate;if(!a){if(a=o(i),a===null)throw Error(r(188));return a!==i?null:i}for(var u=i,h=a;;){var y=u.return;if(y===null)break;var v=y.alternate;if(v===null){if(h=y.return,h!==null){u=h;continue}break}if(y.child===v.child){for(v=y.child;v;){if(v===u)return f(y),i;if(v===h)return f(y),a;v=v.sibling}throw Error(r(188))}if(u.return!==h.return)u=y,h=v;else{for(var _=!1,D=y.child;D;){if(D===u){_=!0,u=y,h=v;break}if(D===h){_=!0,h=y,u=v;break}D=D.sibling}if(!_){for(D=v.child;D;){if(D===u){_=!0,u=v,h=y;break}if(D===h){_=!0,h=v,u=y;break}D=D.sibling}if(!_)throw Error(r(189))}}if(u.alternate!==h)throw Error(r(190))}if(u.tag!==3)throw Error(r(188));return u.stateNode.current===u?i:a}function m(i){var a=i.tag;if(a===5||a===26||a===27||a===6)return i;for(i=i.child;i!==null;){if(a=m(i),a!==null)return a;i=i.sibling}return null}var p=Object.assign,b=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),k=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),L=Symbol.for("react.memo_cache_sentinel"),W=Symbol.iterator;function K(i){return i===null||typeof i!="object"?null:(i=W&&i[W]||i["@@iterator"],typeof i=="function"?i:null)}var J=Symbol.for("react.client.reference");function te(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===J?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case w:return"Fragment";case A:return"Profiler";case C:return"StrictMode";case U:return"Suspense";case I:return"SuspenseList";case $:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case S:return"Portal";case k:return i.displayName||"Context";case N:return(i._context.displayName||"Context")+".Consumer";case R:var a=i.render;return i=i.displayName,i||(i=a.displayName||a.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case j:return a=i.displayName||null,a!==null?a:te(i.type)||"Memo";case M:a=i._payload,i=i._init;try{return te(i(a))}catch{}}return null}var ie=Array.isArray,O=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q={pending:!1,data:null,method:null,action:null},ne=[],B=-1;function V(i){return{current:i}}function re(i){0>B||(i.current=ne[B],ne[B]=null,B--)}function P(i,a){B++,ne[B]=i.current,i.current=a}var he=V(null),ye=V(null),ge=V(null),fe=V(null);function Se(i,a){switch(P(ge,a),P(ye,i),P(he,null),a.nodeType){case 9:case 11:i=(i=a.documentElement)&&(i=i.namespaceURI)?YS(i):0;break;default:if(i=a.tagName,a=a.namespaceURI)a=YS(a),i=GS(a,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}re(he),P(he,i)}function we(){re(he),re(ye),re(ge)}function Ie(i){i.memoizedState!==null&&P(fe,i);var a=he.current,u=GS(a,i.type);a!==u&&(P(ye,i),P(he,u))}function Fe(i){ye.current===i&&(re(he),re(ye)),fe.current===i&&(re(fe),ac._currentValue=q)}var $e,zt;function Ne(i){if($e===void 0)try{throw Error()}catch(u){var a=u.stack.trim().match(/\n( *(at )?)/);$e=a&&a[1]||"",zt=-1<u.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+$e+i+zt}var Ue=!1;function Ye(i,a){if(!i||Ue)return"";Ue=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var h={DetermineComponentFrameRoot:function(){try{if(a){var pe=function(){throw Error()};if(Object.defineProperty(pe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(pe,[])}catch(ue){var le=ue}Reflect.construct(i,[],pe)}else{try{pe.call()}catch(ue){le=ue}i.call(pe.prototype)}}else{try{throw Error()}catch(ue){le=ue}(pe=i())&&typeof pe.catch=="function"&&pe.catch(function(){})}}catch(ue){if(ue&&le&&typeof ue.stack=="string")return[ue.stack,le.stack]}return[null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var v=h.DetermineComponentFrameRoot(),_=v[0],D=v[1];if(_&&D){var G=_.split(`
44
+ `),ae=D.split(`
45
+ `);for(y=h=0;h<G.length&&!G[h].includes("DetermineComponentFrameRoot");)h++;for(;y<ae.length&&!ae[y].includes("DetermineComponentFrameRoot");)y++;if(h===G.length||y===ae.length)for(h=G.length-1,y=ae.length-1;1<=h&&0<=y&&G[h]!==ae[y];)y--;for(;1<=h&&0<=y;h--,y--)if(G[h]!==ae[y]){if(h!==1||y!==1)do if(h--,y--,0>y||G[h]!==ae[y]){var de=`
46
+ `+G[h].replace(" at new "," at ");return i.displayName&&de.includes("<anonymous>")&&(de=de.replace("<anonymous>",i.displayName)),de}while(1<=h&&0<=y);break}}}finally{Ue=!1,Error.prepareStackTrace=u}return(u=i?i.displayName||i.name:"")?Ne(u):""}function lt(i,a){switch(i.tag){case 26:case 27:case 5:return Ne(i.type);case 16:return Ne("Lazy");case 13:return i.child!==a&&a!==null?Ne("Suspense Fallback"):Ne("Suspense");case 19:return Ne("SuspenseList");case 0:case 15:return Ye(i.type,!1);case 11:return Ye(i.type.render,!1);case 1:return Ye(i.type,!0);case 31:return Ne("Activity");default:return""}}function $t(i){try{var a="",u=null;do a+=lt(i,u),u=i,i=i.return;while(i);return a}catch(h){return`
47
+ Error generating stack: `+h.message+`
48
+ `+h.stack}}var Ct=Object.prototype.hasOwnProperty,un=e.unstable_scheduleCallback,cr=e.unstable_cancelCallback,Fr=e.unstable_shouldYield,Zn=e.unstable_requestPaint,Yt=e.unstable_now,He=e.unstable_getCurrentPriorityLevel,oe=e.unstable_ImmediatePriority,Te=e.unstable_UserBlockingPriority,Pe=e.unstable_NormalPriority,Ze=e.unstable_LowPriority,bt=e.unstable_IdlePriority,vn=e.log,Tn=e.unstable_setDisableYieldValue,nn=null,Gt=null;function Sn(i){if(typeof vn=="function"&&Tn(i),Gt&&typeof Gt.setStrictMode=="function")try{Gt.setStrictMode(nn,i)}catch{}}var vt=Math.clz32?Math.clz32:ke,fr=Math.log,wn=Math.LN2;function ke(i){return i>>>=0,i===0?32:31-(fr(i)/wn|0)|0}var ut=256,Ge=262144,tt=4194304;function At(i){var a=i&42;if(a!==0)return a;switch(i&-i){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 i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function cn(i,a,u){var h=i.pendingLanes;if(h===0)return 0;var y=0,v=i.suspendedLanes,_=i.pingedLanes;i=i.warmLanes;var D=h&134217727;return D!==0?(h=D&~v,h!==0?y=At(h):(_&=D,_!==0?y=At(_):u||(u=D&~i,u!==0&&(y=At(u))))):(D=h&~v,D!==0?y=At(D):_!==0?y=At(_):u||(u=h&~i,u!==0&&(y=At(u)))),y===0?0:a!==0&&a!==y&&(a&v)===0&&(v=y&-y,u=a&-a,v>=u||v===32&&(u&4194048)!==0)?a:y}function Qt(i,a){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&a)===0}function wr(i,a){switch(i){case 1:case 2:case 4:case 8:case 64:return a+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 a+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 zn(){var i=tt;return tt<<=1,(tt&62914560)===0&&(tt=4194304),i}function Cr(i){for(var a=[],u=0;31>u;u++)a.push(i);return a}function Vn(i,a){i.pendingLanes|=a,a!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function Jn(i,a,u,h,y,v){var _=i.pendingLanes;i.pendingLanes=u,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=u,i.entangledLanes&=u,i.errorRecoveryDisabledLanes&=u,i.shellSuspendCounter=0;var D=i.entanglements,G=i.expirationTimes,ae=i.hiddenUpdates;for(u=_&~u;0<u;){var de=31-vt(u),pe=1<<de;D[de]=0,G[de]=-1;var le=ae[de];if(le!==null)for(ae[de]=null,de=0;de<le.length;de++){var ue=le[de];ue!==null&&(ue.lane&=-536870913)}u&=~pe}h!==0&&Gi(i,h,0),v!==0&&y===0&&i.tag!==0&&(i.suspendedLanes|=v&~(_&~a))}function Gi(i,a,u){i.pendingLanes|=a,i.suspendedLanes&=~a;var h=31-vt(a);i.entangledLanes|=a,i.entanglements[h]=i.entanglements[h]|1073741824|u&261930}function Ra(i,a){var u=i.entangledLanes|=a;for(i=i.entanglements;u;){var h=31-vt(u),y=1<<h;y&a|i[h]&a&&(i[h]|=a),u&=~y}}function be(i,a){var u=a&-a;return u=(u&42)!==0?1:Qe(u),(u&(i.suspendedLanes|a))!==0?0:u}function Qe(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=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:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function st(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function Bt(){var i=H.p;return i!==0?i:(i=window.event,i===void 0?32:g2(i.type))}function Ar(i,a){var u=H.p;try{return H.p=i,a()}finally{H.p=u}}var dr=Math.random().toString(36).slice(2),Ft="__reactFiber$"+dr,Kt="__reactProps$"+dr,vi="__reactContainer$"+dr,bp="__reactEvents$"+dr,n5="__reactListeners$"+dr,r5="__reactHandles$"+dr,ME="__reactResources$"+dr,vu="__reactMarker$"+dr;function yp(i){delete i[Ft],delete i[Kt],delete i[bp],delete i[n5],delete i[r5]}function Po(i){var a=i[Ft];if(a)return a;for(var u=i.parentNode;u;){if(a=u[vi]||u[Ft]){if(u=a.alternate,a.child!==null||u!==null&&u.child!==null)for(i=e2(i);i!==null;){if(u=i[Ft])return u;i=e2(i)}return a}i=u,u=i.parentNode}return null}function jo(i){if(i=i[Ft]||i[vi]){var a=i.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return i}return null}function Tu(i){var a=i.tag;if(a===5||a===26||a===27||a===6)return i.stateNode;throw Error(r(33))}function Bo(i){var a=i[ME];return a||(a=i[ME]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Dn(i){i[vu]=!0}var IE=new Set,LE={};function Da(i,a){Fo(i,a),Fo(i+"Capture",a)}function Fo(i,a){for(LE[i]=a,i=0;i<a.length;i++)IE.add(a[i])}var i5=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]*$"),PE={},jE={};function s5(i){return Ct.call(jE,i)?!0:Ct.call(PE,i)?!1:i5.test(i)?jE[i]=!0:(PE[i]=!0,!1)}function Vf(i,a,u){if(s5(a))if(u===null)i.removeAttribute(a);else{switch(typeof u){case"undefined":case"function":case"symbol":i.removeAttribute(a);return;case"boolean":var h=a.toLowerCase().slice(0,5);if(h!=="data-"&&h!=="aria-"){i.removeAttribute(a);return}}i.setAttribute(a,""+u)}}function qf(i,a,u){if(u===null)i.removeAttribute(a);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(a);return}i.setAttribute(a,""+u)}}function Qi(i,a,u,h){if(h===null)i.removeAttribute(u);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(u);return}i.setAttributeNS(a,u,""+h)}}function Ur(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function BE(i){var a=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function a5(i,a,u){var h=Object.getOwnPropertyDescriptor(i.constructor.prototype,a);if(!i.hasOwnProperty(a)&&typeof h<"u"&&typeof h.get=="function"&&typeof h.set=="function"){var y=h.get,v=h.set;return Object.defineProperty(i,a,{configurable:!0,get:function(){return y.call(this)},set:function(_){u=""+_,v.call(this,_)}}),Object.defineProperty(i,a,{enumerable:h.enumerable}),{getValue:function(){return u},setValue:function(_){u=""+_},stopTracking:function(){i._valueTracker=null,delete i[a]}}}}function xp(i){if(!i._valueTracker){var a=BE(i)?"checked":"value";i._valueTracker=a5(i,a,""+i[a])}}function FE(i){if(!i)return!1;var a=i._valueTracker;if(!a)return!0;var u=a.getValue(),h="";return i&&(h=BE(i)?i.checked?"true":"false":i.value),i=h,i!==u?(a.setValue(i),!0):!1}function $f(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var o5=/[\n"\\]/g;function Hr(i){return i.replace(o5,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Ep(i,a,u,h,y,v,_,D){i.name="",_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?i.type=_:i.removeAttribute("type"),a!=null?_==="number"?(a===0&&i.value===""||i.value!=a)&&(i.value=""+Ur(a)):i.value!==""+Ur(a)&&(i.value=""+Ur(a)):_!=="submit"&&_!=="reset"||i.removeAttribute("value"),a!=null?vp(i,_,Ur(a)):u!=null?vp(i,_,Ur(u)):h!=null&&i.removeAttribute("value"),y==null&&v!=null&&(i.defaultChecked=!!v),y!=null&&(i.checked=y&&typeof y!="function"&&typeof y!="symbol"),D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"?i.name=""+Ur(D):i.removeAttribute("name")}function UE(i,a,u,h,y,v,_,D){if(v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(i.type=v),a!=null||u!=null){if(!(v!=="submit"&&v!=="reset"||a!=null)){xp(i);return}u=u!=null?""+Ur(u):"",a=a!=null?""+Ur(a):u,D||a===i.value||(i.value=a),i.defaultValue=a}h=h??y,h=typeof h!="function"&&typeof h!="symbol"&&!!h,i.checked=D?i.checked:!!h,i.defaultChecked=!!h,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(i.name=_),xp(i)}function vp(i,a,u){a==="number"&&$f(i.ownerDocument)===i||i.defaultValue===""+u||(i.defaultValue=""+u)}function Uo(i,a,u,h){if(i=i.options,a){a={};for(var y=0;y<u.length;y++)a["$"+u[y]]=!0;for(u=0;u<i.length;u++)y=a.hasOwnProperty("$"+i[u].value),i[u].selected!==y&&(i[u].selected=y),y&&h&&(i[u].defaultSelected=!0)}else{for(u=""+Ur(u),a=null,y=0;y<i.length;y++){if(i[y].value===u){i[y].selected=!0,h&&(i[y].defaultSelected=!0);return}a!==null||i[y].disabled||(a=i[y])}a!==null&&(a.selected=!0)}}function HE(i,a,u){if(a!=null&&(a=""+Ur(a),a!==i.value&&(i.value=a),u==null)){i.defaultValue!==a&&(i.defaultValue=a);return}i.defaultValue=u!=null?""+Ur(u):""}function zE(i,a,u,h){if(a==null){if(h!=null){if(u!=null)throw Error(r(92));if(ie(h)){if(1<h.length)throw Error(r(93));h=h[0]}u=h}u==null&&(u=""),a=u}u=Ur(a),i.defaultValue=u,h=i.textContent,h===u&&h!==""&&h!==null&&(i.value=h),xp(i)}function Ho(i,a){if(a){var u=i.firstChild;if(u&&u===i.lastChild&&u.nodeType===3){u.nodeValue=a;return}}i.textContent=a}var l5=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 VE(i,a,u){var h=a.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?h?i.setProperty(a,""):a==="float"?i.cssFloat="":i[a]="":h?i.setProperty(a,u):typeof u!="number"||u===0||l5.has(a)?a==="float"?i.cssFloat=u:i[a]=(""+u).trim():i[a]=u+"px"}function qE(i,a,u){if(a!=null&&typeof a!="object")throw Error(r(62));if(i=i.style,u!=null){for(var h in u)!u.hasOwnProperty(h)||a!=null&&a.hasOwnProperty(h)||(h.indexOf("--")===0?i.setProperty(h,""):h==="float"?i.cssFloat="":i[h]="");for(var y in a)h=a[y],a.hasOwnProperty(y)&&u[y]!==h&&VE(i,y,h)}else for(var v in a)a.hasOwnProperty(v)&&VE(i,v,a[v])}function Tp(i){if(i.indexOf("-")===-1)return!1;switch(i){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 u5=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"]]),c5=/^[\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 Yf(i){return c5.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function Ki(){}var Sp=null;function wp(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var zo=null,Vo=null;function $E(i){var a=jo(i);if(a&&(i=a.stateNode)){var u=i[Kt]||null;e:switch(i=a.stateNode,a.type){case"input":if(Ep(i,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),a=u.name,u.type==="radio"&&a!=null){for(u=i;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+Hr(""+a)+'"][type="radio"]'),a=0;a<u.length;a++){var h=u[a];if(h!==i&&h.form===i.form){var y=h[Kt]||null;if(!y)throw Error(r(90));Ep(h,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name)}}for(a=0;a<u.length;a++)h=u[a],h.form===i.form&&FE(h)}break e;case"textarea":HE(i,u.value,u.defaultValue);break e;case"select":a=u.value,a!=null&&Uo(i,!!u.multiple,a,!1)}}}var Cp=!1;function YE(i,a,u){if(Cp)return i(a,u);Cp=!0;try{var h=i(a);return h}finally{if(Cp=!1,(zo!==null||Vo!==null)&&(Md(),zo&&(a=zo,i=Vo,Vo=zo=null,$E(a),i)))for(a=0;a<i.length;a++)$E(i[a])}}function Su(i,a){var u=i.stateNode;if(u===null)return null;var h=u[Kt]||null;if(h===null)return null;u=h[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(i=i.type,h=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!h;break e;default:i=!1}if(i)return null;if(u&&typeof u!="function")throw Error(r(231,a,typeof u));return u}var Xi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ap=!1;if(Xi)try{var wu={};Object.defineProperty(wu,"passive",{get:function(){Ap=!0}}),window.addEventListener("test",wu,wu),window.removeEventListener("test",wu,wu)}catch{Ap=!1}var As=null,_p=null,Gf=null;function GE(){if(Gf)return Gf;var i,a=_p,u=a.length,h,y="value"in As?As.value:As.textContent,v=y.length;for(i=0;i<u&&a[i]===y[i];i++);var _=u-i;for(h=1;h<=_&&a[u-h]===y[v-h];h++);return Gf=y.slice(i,1<h?1-h:void 0)}function Qf(i){var a=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&a===13&&(i=13)):i=a,i===10&&(i=13),32<=i||i===13?i:0}function Kf(){return!0}function QE(){return!1}function hr(i){function a(u,h,y,v,_){this._reactName=u,this._targetInst=y,this.type=h,this.nativeEvent=v,this.target=_,this.currentTarget=null;for(var D in i)i.hasOwnProperty(D)&&(u=i[D],this[D]=u?u(v):v[D]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?Kf:QE,this.isPropagationStopped=QE,this}return p(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Kf)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Kf)},persist:function(){},isPersistent:Kf}),a}var Oa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Xf=hr(Oa),Cu=p({},Oa,{view:0,detail:0}),f5=hr(Cu),kp,Np,Au,Wf=p({},Cu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Dp,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==Au&&(Au&&i.type==="mousemove"?(kp=i.screenX-Au.screenX,Np=i.screenY-Au.screenY):Np=kp=0,Au=i),kp)},movementY:function(i){return"movementY"in i?i.movementY:Np}}),KE=hr(Wf),d5=p({},Wf,{dataTransfer:0}),h5=hr(d5),m5=p({},Cu,{relatedTarget:0}),Rp=hr(m5),p5=p({},Oa,{animationName:0,elapsedTime:0,pseudoElement:0}),g5=hr(p5),b5=p({},Oa,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),y5=hr(b5),x5=p({},Oa,{data:0}),XE=hr(x5),E5={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},v5={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"},T5={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function S5(i){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(i):(i=T5[i])?!!a[i]:!1}function Dp(){return S5}var w5=p({},Cu,{key:function(i){if(i.key){var a=E5[i.key]||i.key;if(a!=="Unidentified")return a}return i.type==="keypress"?(i=Qf(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?v5[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Dp,charCode:function(i){return i.type==="keypress"?Qf(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Qf(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),C5=hr(w5),A5=p({},Wf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),WE=hr(A5),_5=p({},Cu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Dp}),k5=hr(_5),N5=p({},Oa,{propertyName:0,elapsedTime:0,pseudoElement:0}),R5=hr(N5),D5=p({},Wf,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),O5=hr(D5),M5=p({},Oa,{newState:0,oldState:0}),I5=hr(M5),L5=[9,13,27,32],Op=Xi&&"CompositionEvent"in window,_u=null;Xi&&"documentMode"in document&&(_u=document.documentMode);var P5=Xi&&"TextEvent"in window&&!_u,ZE=Xi&&(!Op||_u&&8<_u&&11>=_u),JE=" ",ev=!1;function tv(i,a){switch(i){case"keyup":return L5.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function nv(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var qo=!1;function j5(i,a){switch(i){case"compositionend":return nv(a);case"keypress":return a.which!==32?null:(ev=!0,JE);case"textInput":return i=a.data,i===JE&&ev?null:i;default:return null}}function B5(i,a){if(qo)return i==="compositionend"||!Op&&tv(i,a)?(i=GE(),Gf=_p=As=null,qo=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return ZE&&a.locale!=="ko"?null:a.data;default:return null}}var F5={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 rv(i){var a=i&&i.nodeName&&i.nodeName.toLowerCase();return a==="input"?!!F5[i.type]:a==="textarea"}function iv(i,a,u,h){zo?Vo?Vo.push(h):Vo=[h]:zo=h,a=Ud(a,"onChange"),0<a.length&&(u=new Xf("onChange","change",null,u,h),i.push({event:u,listeners:a}))}var ku=null,Nu=null;function U5(i){US(i,0)}function Zf(i){var a=Tu(i);if(FE(a))return i}function sv(i,a){if(i==="change")return a}var av=!1;if(Xi){var Mp;if(Xi){var Ip="oninput"in document;if(!Ip){var ov=document.createElement("div");ov.setAttribute("oninput","return;"),Ip=typeof ov.oninput=="function"}Mp=Ip}else Mp=!1;av=Mp&&(!document.documentMode||9<document.documentMode)}function lv(){ku&&(ku.detachEvent("onpropertychange",uv),Nu=ku=null)}function uv(i){if(i.propertyName==="value"&&Zf(Nu)){var a=[];iv(a,Nu,i,wp(i)),YE(U5,a)}}function H5(i,a,u){i==="focusin"?(lv(),ku=a,Nu=u,ku.attachEvent("onpropertychange",uv)):i==="focusout"&&lv()}function z5(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Zf(Nu)}function V5(i,a){if(i==="click")return Zf(a)}function q5(i,a){if(i==="input"||i==="change")return Zf(a)}function $5(i,a){return i===a&&(i!==0||1/i===1/a)||i!==i&&a!==a}var _r=typeof Object.is=="function"?Object.is:$5;function Ru(i,a){if(_r(i,a))return!0;if(typeof i!="object"||i===null||typeof a!="object"||a===null)return!1;var u=Object.keys(i),h=Object.keys(a);if(u.length!==h.length)return!1;for(h=0;h<u.length;h++){var y=u[h];if(!Ct.call(a,y)||!_r(i[y],a[y]))return!1}return!0}function cv(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function fv(i,a){var u=cv(i);i=0;for(var h;u;){if(u.nodeType===3){if(h=i+u.textContent.length,i<=a&&h>=a)return{node:u,offset:a-i};i=h}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=cv(u)}}function dv(i,a){return i&&a?i===a?!0:i&&i.nodeType===3?!1:a&&a.nodeType===3?dv(i,a.parentNode):"contains"in i?i.contains(a):i.compareDocumentPosition?!!(i.compareDocumentPosition(a)&16):!1:!1}function hv(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var a=$f(i.document);a instanceof i.HTMLIFrameElement;){try{var u=typeof a.contentWindow.location.href=="string"}catch{u=!1}if(u)i=a.contentWindow;else break;a=$f(i.document)}return a}function Lp(i){var a=i&&i.nodeName&&i.nodeName.toLowerCase();return a&&(a==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||a==="textarea"||i.contentEditable==="true")}var Y5=Xi&&"documentMode"in document&&11>=document.documentMode,$o=null,Pp=null,Du=null,jp=!1;function mv(i,a,u){var h=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;jp||$o==null||$o!==$f(h)||(h=$o,"selectionStart"in h&&Lp(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),Du&&Ru(Du,h)||(Du=h,h=Ud(Pp,"onSelect"),0<h.length&&(a=new Xf("onSelect","select",null,a,u),i.push({event:a,listeners:h}),a.target=$o)))}function Ma(i,a){var u={};return u[i.toLowerCase()]=a.toLowerCase(),u["Webkit"+i]="webkit"+a,u["Moz"+i]="moz"+a,u}var Yo={animationend:Ma("Animation","AnimationEnd"),animationiteration:Ma("Animation","AnimationIteration"),animationstart:Ma("Animation","AnimationStart"),transitionrun:Ma("Transition","TransitionRun"),transitionstart:Ma("Transition","TransitionStart"),transitioncancel:Ma("Transition","TransitionCancel"),transitionend:Ma("Transition","TransitionEnd")},Bp={},pv={};Xi&&(pv=document.createElement("div").style,"AnimationEvent"in window||(delete Yo.animationend.animation,delete Yo.animationiteration.animation,delete Yo.animationstart.animation),"TransitionEvent"in window||delete Yo.transitionend.transition);function Ia(i){if(Bp[i])return Bp[i];if(!Yo[i])return i;var a=Yo[i],u;for(u in a)if(a.hasOwnProperty(u)&&u in pv)return Bp[i]=a[u];return i}var gv=Ia("animationend"),bv=Ia("animationiteration"),yv=Ia("animationstart"),G5=Ia("transitionrun"),Q5=Ia("transitionstart"),K5=Ia("transitioncancel"),xv=Ia("transitionend"),Ev=new Map,Fp="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(" ");Fp.push("scrollEnd");function ai(i,a){Ev.set(i,a),Da(a,[i])}var Jf=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},zr=[],Go=0,Up=0;function ed(){for(var i=Go,a=Up=Go=0;a<i;){var u=zr[a];zr[a++]=null;var h=zr[a];zr[a++]=null;var y=zr[a];zr[a++]=null;var v=zr[a];if(zr[a++]=null,h!==null&&y!==null){var _=h.pending;_===null?y.next=y:(y.next=_.next,_.next=y),h.pending=y}v!==0&&vv(u,y,v)}}function td(i,a,u,h){zr[Go++]=i,zr[Go++]=a,zr[Go++]=u,zr[Go++]=h,Up|=h,i.lanes|=h,i=i.alternate,i!==null&&(i.lanes|=h)}function Hp(i,a,u,h){return td(i,a,u,h),nd(i)}function La(i,a){return td(i,null,null,a),nd(i)}function vv(i,a,u){i.lanes|=u;var h=i.alternate;h!==null&&(h.lanes|=u);for(var y=!1,v=i.return;v!==null;)v.childLanes|=u,h=v.alternate,h!==null&&(h.childLanes|=u),v.tag===22&&(i=v.stateNode,i===null||i._visibility&1||(y=!0)),i=v,v=v.return;return i.tag===3?(v=i.stateNode,y&&a!==null&&(y=31-vt(u),i=v.hiddenUpdates,h=i[y],h===null?i[y]=[a]:h.push(a),a.lane=u|536870912),v):null}function nd(i){if(50<Ju)throw Ju=0,X0=null,Error(r(185));for(var a=i.return;a!==null;)i=a,a=i.return;return i.tag===3?i.stateNode:null}var Qo={};function X5(i,a,u,h){this.tag=i,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function kr(i,a,u,h){return new X5(i,a,u,h)}function zp(i){return i=i.prototype,!(!i||!i.isReactComponent)}function Wi(i,a){var u=i.alternate;return u===null?(u=kr(i.tag,a,i.key,i.mode),u.elementType=i.elementType,u.type=i.type,u.stateNode=i.stateNode,u.alternate=i,i.alternate=u):(u.pendingProps=a,u.type=i.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=i.flags&65011712,u.childLanes=i.childLanes,u.lanes=i.lanes,u.child=i.child,u.memoizedProps=i.memoizedProps,u.memoizedState=i.memoizedState,u.updateQueue=i.updateQueue,a=i.dependencies,u.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},u.sibling=i.sibling,u.index=i.index,u.ref=i.ref,u.refCleanup=i.refCleanup,u}function Tv(i,a){i.flags&=65011714;var u=i.alternate;return u===null?(i.childLanes=0,i.lanes=a,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=u.childLanes,i.lanes=u.lanes,i.child=u.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=u.memoizedProps,i.memoizedState=u.memoizedState,i.updateQueue=u.updateQueue,i.type=u.type,a=u.dependencies,i.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),i}function rd(i,a,u,h,y,v){var _=0;if(h=i,typeof i=="function")zp(i)&&(_=1);else if(typeof i=="string")_=tL(i,u,he.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case $:return i=kr(31,u,a,y),i.elementType=$,i.lanes=v,i;case w:return Pa(u.children,y,v,a);case C:_=8,y|=24;break;case A:return i=kr(12,u,a,y|2),i.elementType=A,i.lanes=v,i;case U:return i=kr(13,u,a,y),i.elementType=U,i.lanes=v,i;case I:return i=kr(19,u,a,y),i.elementType=I,i.lanes=v,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case k:_=10;break e;case N:_=9;break e;case R:_=11;break e;case j:_=14;break e;case M:_=16,h=null;break e}_=29,u=Error(r(130,i===null?"null":typeof i,"")),h=null}return a=kr(_,u,a,y),a.elementType=i,a.type=h,a.lanes=v,a}function Pa(i,a,u,h){return i=kr(7,i,h,a),i.lanes=u,i}function Vp(i,a,u){return i=kr(6,i,null,a),i.lanes=u,i}function Sv(i){var a=kr(18,null,null,0);return a.stateNode=i,a}function qp(i,a,u){return a=kr(4,i.children!==null?i.children:[],i.key,a),a.lanes=u,a.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},a}var wv=new WeakMap;function Vr(i,a){if(typeof i=="object"&&i!==null){var u=wv.get(i);return u!==void 0?u:(a={value:i,source:a,stack:$t(a)},wv.set(i,a),a)}return{value:i,source:a,stack:$t(a)}}var Ko=[],Xo=0,id=null,Ou=0,qr=[],$r=0,_s=null,Ti=1,Si="";function Zi(i,a){Ko[Xo++]=Ou,Ko[Xo++]=id,id=i,Ou=a}function Cv(i,a,u){qr[$r++]=Ti,qr[$r++]=Si,qr[$r++]=_s,_s=i;var h=Ti;i=Si;var y=32-vt(h)-1;h&=~(1<<y),u+=1;var v=32-vt(a)+y;if(30<v){var _=y-y%5;v=(h&(1<<_)-1).toString(32),h>>=_,y-=_,Ti=1<<32-vt(a)+y|u<<y|h,Si=v+i}else Ti=1<<v|u<<y|h,Si=i}function $p(i){i.return!==null&&(Zi(i,1),Cv(i,1,0))}function Yp(i){for(;i===id;)id=Ko[--Xo],Ko[Xo]=null,Ou=Ko[--Xo],Ko[Xo]=null;for(;i===_s;)_s=qr[--$r],qr[$r]=null,Si=qr[--$r],qr[$r]=null,Ti=qr[--$r],qr[$r]=null}function Av(i,a){qr[$r++]=Ti,qr[$r++]=Si,qr[$r++]=_s,Ti=a.id,Si=a.overflow,_s=i}var jn=null,Vt=null,yt=!1,ks=null,Yr=!1,Gp=Error(r(519));function Ns(i){var a=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Mu(Vr(a,i)),Gp}function _v(i){var a=i.stateNode,u=i.type,h=i.memoizedProps;switch(a[Ft]=i,a[Kt]=h,u){case"dialog":dt("cancel",a),dt("close",a);break;case"iframe":case"object":case"embed":dt("load",a);break;case"video":case"audio":for(u=0;u<tc.length;u++)dt(tc[u],a);break;case"source":dt("error",a);break;case"img":case"image":case"link":dt("error",a),dt("load",a);break;case"details":dt("toggle",a);break;case"input":dt("invalid",a),UE(a,h.value,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name,!0);break;case"select":dt("invalid",a);break;case"textarea":dt("invalid",a),zE(a,h.value,h.defaultValue,h.children)}u=h.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||a.textContent===""+u||h.suppressHydrationWarning===!0||qS(a.textContent,u)?(h.popover!=null&&(dt("beforetoggle",a),dt("toggle",a)),h.onScroll!=null&&dt("scroll",a),h.onScrollEnd!=null&&dt("scrollend",a),h.onClick!=null&&(a.onclick=Ki),a=!0):a=!1,a||Ns(i,!0)}function kv(i){for(jn=i.return;jn;)switch(jn.tag){case 5:case 31:case 13:Yr=!1;return;case 27:case 3:Yr=!0;return;default:jn=jn.return}}function Wo(i){if(i!==jn)return!1;if(!yt)return kv(i),yt=!0,!1;var a=i.tag,u;if((u=a!==3&&a!==27)&&((u=a===5)&&(u=i.type,u=!(u!=="form"&&u!=="button")||fg(i.type,i.memoizedProps)),u=!u),u&&Vt&&Ns(i),kv(i),a===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Vt=JS(i)}else if(a===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Vt=JS(i)}else a===27?(a=Vt,Vs(i.type)?(i=gg,gg=null,Vt=i):Vt=a):Vt=jn?Qr(i.stateNode.nextSibling):null;return!0}function ja(){Vt=jn=null,yt=!1}function Qp(){var i=ks;return i!==null&&(br===null?br=i:br.push.apply(br,i),ks=null),i}function Mu(i){ks===null?ks=[i]:ks.push(i)}var Kp=V(null),Ba=null,Ji=null;function Rs(i,a,u){P(Kp,a._currentValue),a._currentValue=u}function es(i){i._currentValue=Kp.current,re(Kp)}function Xp(i,a,u){for(;i!==null;){var h=i.alternate;if((i.childLanes&a)!==a?(i.childLanes|=a,h!==null&&(h.childLanes|=a)):h!==null&&(h.childLanes&a)!==a&&(h.childLanes|=a),i===u)break;i=i.return}}function Wp(i,a,u,h){var y=i.child;for(y!==null&&(y.return=i);y!==null;){var v=y.dependencies;if(v!==null){var _=y.child;v=v.firstContext;e:for(;v!==null;){var D=v;v=y;for(var G=0;G<a.length;G++)if(D.context===a[G]){v.lanes|=u,D=v.alternate,D!==null&&(D.lanes|=u),Xp(v.return,u,i),h||(_=null);break e}v=D.next}}else if(y.tag===18){if(_=y.return,_===null)throw Error(r(341));_.lanes|=u,v=_.alternate,v!==null&&(v.lanes|=u),Xp(_,u,i),_=null}else _=y.child;if(_!==null)_.return=y;else for(_=y;_!==null;){if(_===i){_=null;break}if(y=_.sibling,y!==null){y.return=_.return,_=y;break}_=_.return}y=_}}function Zo(i,a,u,h){i=null;for(var y=a,v=!1;y!==null;){if(!v){if((y.flags&524288)!==0)v=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var _=y.alternate;if(_===null)throw Error(r(387));if(_=_.memoizedProps,_!==null){var D=y.type;_r(y.pendingProps.value,_.value)||(i!==null?i.push(D):i=[D])}}else if(y===fe.current){if(_=y.alternate,_===null)throw Error(r(387));_.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(i!==null?i.push(ac):i=[ac])}y=y.return}i!==null&&Wp(a,i,u,h),a.flags|=262144}function sd(i){for(i=i.firstContext;i!==null;){if(!_r(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Fa(i){Ba=i,Ji=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function Bn(i){return Nv(Ba,i)}function ad(i,a){return Ba===null&&Fa(i),Nv(i,a)}function Nv(i,a){var u=a._currentValue;if(a={context:a,memoizedValue:u,next:null},Ji===null){if(i===null)throw Error(r(308));Ji=a,i.dependencies={lanes:0,firstContext:a},i.flags|=524288}else Ji=Ji.next=a;return u}var W5=typeof AbortController<"u"?AbortController:function(){var i=[],a=this.signal={aborted:!1,addEventListener:function(u,h){i.push(h)}};this.abort=function(){a.aborted=!0,i.forEach(function(u){return u()})}},Z5=e.unstable_scheduleCallback,J5=e.unstable_NormalPriority,mn={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Zp(){return{controller:new W5,data:new Map,refCount:0}}function Iu(i){i.refCount--,i.refCount===0&&Z5(J5,function(){i.controller.abort()})}var Lu=null,Jp=0,Jo=0,el=null;function eI(i,a){if(Lu===null){var u=Lu=[];Jp=0,Jo=ng(),el={status:"pending",value:void 0,then:function(h){u.push(h)}}}return Jp++,a.then(Rv,Rv),a}function Rv(){if(--Jp===0&&Lu!==null){el!==null&&(el.status="fulfilled");var i=Lu;Lu=null,Jo=0,el=null;for(var a=0;a<i.length;a++)(0,i[a])()}}function tI(i,a){var u=[],h={status:"pending",value:null,reason:null,then:function(y){u.push(y)}};return i.then(function(){h.status="fulfilled",h.value=a;for(var y=0;y<u.length;y++)(0,u[y])(a)},function(y){for(h.status="rejected",h.reason=y,y=0;y<u.length;y++)(0,u[y])(void 0)}),h}var Dv=O.S;O.S=function(i,a){mS=Yt(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&eI(i,a),Dv!==null&&Dv(i,a)};var Ua=V(null);function e0(){var i=Ua.current;return i!==null?i:Pt.pooledCache}function od(i,a){a===null?P(Ua,Ua.current):P(Ua,a.pool)}function Ov(){var i=e0();return i===null?null:{parent:mn._currentValue,pool:i}}var tl=Error(r(460)),t0=Error(r(474)),ld=Error(r(542)),ud={then:function(){}};function Mv(i){return i=i.status,i==="fulfilled"||i==="rejected"}function Iv(i,a,u){switch(u=i[u],u===void 0?i.push(a):u!==a&&(a.then(Ki,Ki),a=u),a.status){case"fulfilled":return a.value;case"rejected":throw i=a.reason,Pv(i),i;default:if(typeof a.status=="string")a.then(Ki,Ki);else{if(i=Pt,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=a,i.status="pending",i.then(function(h){if(a.status==="pending"){var y=a;y.status="fulfilled",y.value=h}},function(h){if(a.status==="pending"){var y=a;y.status="rejected",y.reason=h}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw i=a.reason,Pv(i),i}throw za=a,tl}}function Ha(i){try{var a=i._init;return a(i._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(za=u,tl):u}}var za=null;function Lv(){if(za===null)throw Error(r(459));var i=za;return za=null,i}function Pv(i){if(i===tl||i===ld)throw Error(r(483))}var nl=null,Pu=0;function cd(i){var a=Pu;return Pu+=1,nl===null&&(nl=[]),Iv(nl,i,a)}function ju(i,a){a=a.props.ref,i.ref=a!==void 0?a:null}function fd(i,a){throw a.$$typeof===b?Error(r(525)):(i=Object.prototype.toString.call(a),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":i)))}function jv(i){function a(Z,X){if(i){var se=Z.deletions;se===null?(Z.deletions=[X],Z.flags|=16):se.push(X)}}function u(Z,X){if(!i)return null;for(;X!==null;)a(Z,X),X=X.sibling;return null}function h(Z){for(var X=new Map;Z!==null;)Z.key!==null?X.set(Z.key,Z):X.set(Z.index,Z),Z=Z.sibling;return X}function y(Z,X){return Z=Wi(Z,X),Z.index=0,Z.sibling=null,Z}function v(Z,X,se){return Z.index=se,i?(se=Z.alternate,se!==null?(se=se.index,se<X?(Z.flags|=67108866,X):se):(Z.flags|=67108866,X)):(Z.flags|=1048576,X)}function _(Z){return i&&Z.alternate===null&&(Z.flags|=67108866),Z}function D(Z,X,se,me){return X===null||X.tag!==6?(X=Vp(se,Z.mode,me),X.return=Z,X):(X=y(X,se),X.return=Z,X)}function G(Z,X,se,me){var Be=se.type;return Be===w?de(Z,X,se.props.children,me,se.key):X!==null&&(X.elementType===Be||typeof Be=="object"&&Be!==null&&Be.$$typeof===M&&Ha(Be)===X.type)?(X=y(X,se.props),ju(X,se),X.return=Z,X):(X=rd(se.type,se.key,se.props,null,Z.mode,me),ju(X,se),X.return=Z,X)}function ae(Z,X,se,me){return X===null||X.tag!==4||X.stateNode.containerInfo!==se.containerInfo||X.stateNode.implementation!==se.implementation?(X=qp(se,Z.mode,me),X.return=Z,X):(X=y(X,se.children||[]),X.return=Z,X)}function de(Z,X,se,me,Be){return X===null||X.tag!==7?(X=Pa(se,Z.mode,me,Be),X.return=Z,X):(X=y(X,se),X.return=Z,X)}function pe(Z,X,se){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return X=Vp(""+X,Z.mode,se),X.return=Z,X;if(typeof X=="object"&&X!==null){switch(X.$$typeof){case x:return se=rd(X.type,X.key,X.props,null,Z.mode,se),ju(se,X),se.return=Z,se;case S:return X=qp(X,Z.mode,se),X.return=Z,X;case M:return X=Ha(X),pe(Z,X,se)}if(ie(X)||K(X))return X=Pa(X,Z.mode,se,null),X.return=Z,X;if(typeof X.then=="function")return pe(Z,cd(X),se);if(X.$$typeof===k)return pe(Z,ad(Z,X),se);fd(Z,X)}return null}function le(Z,X,se,me){var Be=X!==null?X.key:null;if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return Be!==null?null:D(Z,X,""+se,me);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case x:return se.key===Be?G(Z,X,se,me):null;case S:return se.key===Be?ae(Z,X,se,me):null;case M:return se=Ha(se),le(Z,X,se,me)}if(ie(se)||K(se))return Be!==null?null:de(Z,X,se,me,null);if(typeof se.then=="function")return le(Z,X,cd(se),me);if(se.$$typeof===k)return le(Z,X,ad(Z,se),me);fd(Z,se)}return null}function ue(Z,X,se,me,Be){if(typeof me=="string"&&me!==""||typeof me=="number"||typeof me=="bigint")return Z=Z.get(se)||null,D(X,Z,""+me,Be);if(typeof me=="object"&&me!==null){switch(me.$$typeof){case x:return Z=Z.get(me.key===null?se:me.key)||null,G(X,Z,me,Be);case S:return Z=Z.get(me.key===null?se:me.key)||null,ae(X,Z,me,Be);case M:return me=Ha(me),ue(Z,X,se,me,Be)}if(ie(me)||K(me))return Z=Z.get(se)||null,de(X,Z,me,Be,null);if(typeof me.then=="function")return ue(Z,X,se,cd(me),Be);if(me.$$typeof===k)return ue(Z,X,se,ad(X,me),Be);fd(X,me)}return null}function Re(Z,X,se,me){for(var Be=null,Tt=null,Le=X,nt=X=0,pt=null;Le!==null&&nt<se.length;nt++){Le.index>nt?(pt=Le,Le=null):pt=Le.sibling;var St=le(Z,Le,se[nt],me);if(St===null){Le===null&&(Le=pt);break}i&&Le&&St.alternate===null&&a(Z,Le),X=v(St,X,nt),Tt===null?Be=St:Tt.sibling=St,Tt=St,Le=pt}if(nt===se.length)return u(Z,Le),yt&&Zi(Z,nt),Be;if(Le===null){for(;nt<se.length;nt++)Le=pe(Z,se[nt],me),Le!==null&&(X=v(Le,X,nt),Tt===null?Be=Le:Tt.sibling=Le,Tt=Le);return yt&&Zi(Z,nt),Be}for(Le=h(Le);nt<se.length;nt++)pt=ue(Le,Z,nt,se[nt],me),pt!==null&&(i&&pt.alternate!==null&&Le.delete(pt.key===null?nt:pt.key),X=v(pt,X,nt),Tt===null?Be=pt:Tt.sibling=pt,Tt=pt);return i&&Le.forEach(function(Qs){return a(Z,Qs)}),yt&&Zi(Z,nt),Be}function Ve(Z,X,se,me){if(se==null)throw Error(r(151));for(var Be=null,Tt=null,Le=X,nt=X=0,pt=null,St=se.next();Le!==null&&!St.done;nt++,St=se.next()){Le.index>nt?(pt=Le,Le=null):pt=Le.sibling;var Qs=le(Z,Le,St.value,me);if(Qs===null){Le===null&&(Le=pt);break}i&&Le&&Qs.alternate===null&&a(Z,Le),X=v(Qs,X,nt),Tt===null?Be=Qs:Tt.sibling=Qs,Tt=Qs,Le=pt}if(St.done)return u(Z,Le),yt&&Zi(Z,nt),Be;if(Le===null){for(;!St.done;nt++,St=se.next())St=pe(Z,St.value,me),St!==null&&(X=v(St,X,nt),Tt===null?Be=St:Tt.sibling=St,Tt=St);return yt&&Zi(Z,nt),Be}for(Le=h(Le);!St.done;nt++,St=se.next())St=ue(Le,Z,nt,St.value,me),St!==null&&(i&&St.alternate!==null&&Le.delete(St.key===null?nt:St.key),X=v(St,X,nt),Tt===null?Be=St:Tt.sibling=St,Tt=St);return i&&Le.forEach(function(dL){return a(Z,dL)}),yt&&Zi(Z,nt),Be}function It(Z,X,se,me){if(typeof se=="object"&&se!==null&&se.type===w&&se.key===null&&(se=se.props.children),typeof se=="object"&&se!==null){switch(se.$$typeof){case x:e:{for(var Be=se.key;X!==null;){if(X.key===Be){if(Be=se.type,Be===w){if(X.tag===7){u(Z,X.sibling),me=y(X,se.props.children),me.return=Z,Z=me;break e}}else if(X.elementType===Be||typeof Be=="object"&&Be!==null&&Be.$$typeof===M&&Ha(Be)===X.type){u(Z,X.sibling),me=y(X,se.props),ju(me,se),me.return=Z,Z=me;break e}u(Z,X);break}else a(Z,X);X=X.sibling}se.type===w?(me=Pa(se.props.children,Z.mode,me,se.key),me.return=Z,Z=me):(me=rd(se.type,se.key,se.props,null,Z.mode,me),ju(me,se),me.return=Z,Z=me)}return _(Z);case S:e:{for(Be=se.key;X!==null;){if(X.key===Be)if(X.tag===4&&X.stateNode.containerInfo===se.containerInfo&&X.stateNode.implementation===se.implementation){u(Z,X.sibling),me=y(X,se.children||[]),me.return=Z,Z=me;break e}else{u(Z,X);break}else a(Z,X);X=X.sibling}me=qp(se,Z.mode,me),me.return=Z,Z=me}return _(Z);case M:return se=Ha(se),It(Z,X,se,me)}if(ie(se))return Re(Z,X,se,me);if(K(se)){if(Be=K(se),typeof Be!="function")throw Error(r(150));return se=Be.call(se),Ve(Z,X,se,me)}if(typeof se.then=="function")return It(Z,X,cd(se),me);if(se.$$typeof===k)return It(Z,X,ad(Z,se),me);fd(Z,se)}return typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint"?(se=""+se,X!==null&&X.tag===6?(u(Z,X.sibling),me=y(X,se),me.return=Z,Z=me):(u(Z,X),me=Vp(se,Z.mode,me),me.return=Z,Z=me),_(Z)):u(Z,X)}return function(Z,X,se,me){try{Pu=0;var Be=It(Z,X,se,me);return nl=null,Be}catch(Le){if(Le===tl||Le===ld)throw Le;var Tt=kr(29,Le,null,Z.mode);return Tt.lanes=me,Tt.return=Z,Tt}finally{}}}var Va=jv(!0),Bv=jv(!1),Ds=!1;function n0(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function r0(i,a){i=i.updateQueue,a.updateQueue===i&&(a.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function Os(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Ms(i,a,u){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(_t&2)!==0){var y=h.pending;return y===null?a.next=a:(a.next=y.next,y.next=a),h.pending=a,a=nd(i),vv(i,null,u),a}return td(i,h,a,u),nd(i)}function Bu(i,a,u){if(a=a.updateQueue,a!==null&&(a=a.shared,(u&4194048)!==0)){var h=a.lanes;h&=i.pendingLanes,u|=h,a.lanes=u,Ra(i,u)}}function i0(i,a){var u=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,u===h)){var y=null,v=null;if(u=u.firstBaseUpdate,u!==null){do{var _={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};v===null?y=v=_:v=v.next=_,u=u.next}while(u!==null);v===null?y=v=a:v=v.next=a}else y=v=a;u={baseState:h.baseState,firstBaseUpdate:y,lastBaseUpdate:v,shared:h.shared,callbacks:h.callbacks},i.updateQueue=u;return}i=u.lastBaseUpdate,i===null?u.firstBaseUpdate=a:i.next=a,u.lastBaseUpdate=a}var s0=!1;function Fu(){if(s0){var i=el;if(i!==null)throw i}}function Uu(i,a,u,h){s0=!1;var y=i.updateQueue;Ds=!1;var v=y.firstBaseUpdate,_=y.lastBaseUpdate,D=y.shared.pending;if(D!==null){y.shared.pending=null;var G=D,ae=G.next;G.next=null,_===null?v=ae:_.next=ae,_=G;var de=i.alternate;de!==null&&(de=de.updateQueue,D=de.lastBaseUpdate,D!==_&&(D===null?de.firstBaseUpdate=ae:D.next=ae,de.lastBaseUpdate=G))}if(v!==null){var pe=y.baseState;_=0,de=ae=G=null,D=v;do{var le=D.lane&-536870913,ue=le!==D.lane;if(ue?(mt&le)===le:(h&le)===le){le!==0&&le===Jo&&(s0=!0),de!==null&&(de=de.next={lane:0,tag:D.tag,payload:D.payload,callback:null,next:null});e:{var Re=i,Ve=D;le=a;var It=u;switch(Ve.tag){case 1:if(Re=Ve.payload,typeof Re=="function"){pe=Re.call(It,pe,le);break e}pe=Re;break e;case 3:Re.flags=Re.flags&-65537|128;case 0:if(Re=Ve.payload,le=typeof Re=="function"?Re.call(It,pe,le):Re,le==null)break e;pe=p({},pe,le);break e;case 2:Ds=!0}}le=D.callback,le!==null&&(i.flags|=64,ue&&(i.flags|=8192),ue=y.callbacks,ue===null?y.callbacks=[le]:ue.push(le))}else ue={lane:le,tag:D.tag,payload:D.payload,callback:D.callback,next:null},de===null?(ae=de=ue,G=pe):de=de.next=ue,_|=le;if(D=D.next,D===null){if(D=y.shared.pending,D===null)break;ue=D,D=ue.next,ue.next=null,y.lastBaseUpdate=ue,y.shared.pending=null}}while(!0);de===null&&(G=pe),y.baseState=G,y.firstBaseUpdate=ae,y.lastBaseUpdate=de,v===null&&(y.shared.lanes=0),Bs|=_,i.lanes=_,i.memoizedState=pe}}function Fv(i,a){if(typeof i!="function")throw Error(r(191,i));i.call(a)}function Uv(i,a){var u=i.callbacks;if(u!==null)for(i.callbacks=null,i=0;i<u.length;i++)Fv(u[i],a)}var rl=V(null),dd=V(0);function Hv(i,a){i=us,P(dd,i),P(rl,a),us=i|a.baseLanes}function a0(){P(dd,us),P(rl,rl.current)}function o0(){us=dd.current,re(rl),re(dd)}var Nr=V(null),Gr=null;function Is(i){var a=i.alternate;P(fn,fn.current&1),P(Nr,i),Gr===null&&(a===null||rl.current!==null||a.memoizedState!==null)&&(Gr=i)}function l0(i){P(fn,fn.current),P(Nr,i),Gr===null&&(Gr=i)}function zv(i){i.tag===22?(P(fn,fn.current),P(Nr,i),Gr===null&&(Gr=i)):Ls()}function Ls(){P(fn,fn.current),P(Nr,Nr.current)}function Rr(i){re(Nr),Gr===i&&(Gr=null),re(fn)}var fn=V(0);function hd(i){for(var a=i;a!==null;){if(a.tag===13){var u=a.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||mg(u)||pg(u)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===i)break;for(;a.sibling===null;){if(a.return===null||a.return===i)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var ts=0,Je=null,Ot=null,pn=null,md=!1,il=!1,qa=!1,pd=0,Hu=0,sl=null,nI=0;function rn(){throw Error(r(321))}function u0(i,a){if(a===null)return!1;for(var u=0;u<a.length&&u<i.length;u++)if(!_r(i[u],a[u]))return!1;return!0}function c0(i,a,u,h,y,v){return ts=v,Je=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,O.H=i===null||i.memoizedState===null?CT:C0,qa=!1,v=u(h,y),qa=!1,il&&(v=qv(a,u,h,y)),Vv(i),v}function Vv(i){O.H=qu;var a=Ot!==null&&Ot.next!==null;if(ts=0,pn=Ot=Je=null,md=!1,Hu=0,sl=null,a)throw Error(r(300));i===null||gn||(i=i.dependencies,i!==null&&sd(i)&&(gn=!0))}function qv(i,a,u,h){Je=i;var y=0;do{if(il&&(sl=null),Hu=0,il=!1,25<=y)throw Error(r(301));if(y+=1,pn=Ot=null,i.updateQueue!=null){var v=i.updateQueue;v.lastEffect=null,v.events=null,v.stores=null,v.memoCache!=null&&(v.memoCache.index=0)}O.H=AT,v=a(u,h)}while(il);return v}function rI(){var i=O.H,a=i.useState()[0];return a=typeof a.then=="function"?zu(a):a,i=i.useState()[0],(Ot!==null?Ot.memoizedState:null)!==i&&(Je.flags|=1024),a}function f0(){var i=pd!==0;return pd=0,i}function d0(i,a,u){a.updateQueue=i.updateQueue,a.flags&=-2053,i.lanes&=~u}function h0(i){if(md){for(i=i.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}md=!1}ts=0,pn=Ot=Je=null,il=!1,Hu=pd=0,sl=null}function er(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return pn===null?Je.memoizedState=pn=i:pn=pn.next=i,pn}function dn(){if(Ot===null){var i=Je.alternate;i=i!==null?i.memoizedState:null}else i=Ot.next;var a=pn===null?Je.memoizedState:pn.next;if(a!==null)pn=a,Ot=i;else{if(i===null)throw Je.alternate===null?Error(r(467)):Error(r(310));Ot=i,i={memoizedState:Ot.memoizedState,baseState:Ot.baseState,baseQueue:Ot.baseQueue,queue:Ot.queue,next:null},pn===null?Je.memoizedState=pn=i:pn=pn.next=i}return pn}function gd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function zu(i){var a=Hu;return Hu+=1,sl===null&&(sl=[]),i=Iv(sl,i,a),a=Je,(pn===null?a.memoizedState:pn.next)===null&&(a=a.alternate,O.H=a===null||a.memoizedState===null?CT:C0),i}function bd(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return zu(i);if(i.$$typeof===k)return Bn(i)}throw Error(r(438,String(i)))}function m0(i){var a=null,u=Je.updateQueue;if(u!==null&&(a=u.memoCache),a==null){var h=Je.alternate;h!==null&&(h=h.updateQueue,h!==null&&(h=h.memoCache,h!=null&&(a={data:h.data.map(function(y){return y.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),u===null&&(u=gd(),Je.updateQueue=u),u.memoCache=a,u=a.data[a.index],u===void 0)for(u=a.data[a.index]=Array(i),h=0;h<i;h++)u[h]=L;return a.index++,u}function ns(i,a){return typeof a=="function"?a(i):a}function yd(i){var a=dn();return p0(a,Ot,i)}function p0(i,a,u){var h=i.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=u;var y=i.baseQueue,v=h.pending;if(v!==null){if(y!==null){var _=y.next;y.next=v.next,v.next=_}a.baseQueue=y=v,h.pending=null}if(v=i.baseState,y===null)i.memoizedState=v;else{a=y.next;var D=_=null,G=null,ae=a,de=!1;do{var pe=ae.lane&-536870913;if(pe!==ae.lane?(mt&pe)===pe:(ts&pe)===pe){var le=ae.revertLane;if(le===0)G!==null&&(G=G.next={lane:0,revertLane:0,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null}),pe===Jo&&(de=!0);else if((ts&le)===le){ae=ae.next,le===Jo&&(de=!0);continue}else pe={lane:0,revertLane:ae.revertLane,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},G===null?(D=G=pe,_=v):G=G.next=pe,Je.lanes|=le,Bs|=le;pe=ae.action,qa&&u(v,pe),v=ae.hasEagerState?ae.eagerState:u(v,pe)}else le={lane:pe,revertLane:ae.revertLane,gesture:ae.gesture,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},G===null?(D=G=le,_=v):G=G.next=le,Je.lanes|=pe,Bs|=pe;ae=ae.next}while(ae!==null&&ae!==a);if(G===null?_=v:G.next=D,!_r(v,i.memoizedState)&&(gn=!0,de&&(u=el,u!==null)))throw u;i.memoizedState=v,i.baseState=_,i.baseQueue=G,h.lastRenderedState=v}return y===null&&(h.lanes=0),[i.memoizedState,h.dispatch]}function g0(i){var a=dn(),u=a.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=i;var h=u.dispatch,y=u.pending,v=a.memoizedState;if(y!==null){u.pending=null;var _=y=y.next;do v=i(v,_.action),_=_.next;while(_!==y);_r(v,a.memoizedState)||(gn=!0),a.memoizedState=v,a.baseQueue===null&&(a.baseState=v),u.lastRenderedState=v}return[v,h]}function $v(i,a,u){var h=Je,y=dn(),v=yt;if(v){if(u===void 0)throw Error(r(407));u=u()}else u=a();var _=!_r((Ot||y).memoizedState,u);if(_&&(y.memoizedState=u,gn=!0),y=y.queue,x0(Qv.bind(null,h,y,i),[i]),y.getSnapshot!==a||_||pn!==null&&pn.memoizedState.tag&1){if(h.flags|=2048,al(9,{destroy:void 0},Gv.bind(null,h,y,u,a),null),Pt===null)throw Error(r(349));v||(ts&127)!==0||Yv(h,a,u)}return u}function Yv(i,a,u){i.flags|=16384,i={getSnapshot:a,value:u},a=Je.updateQueue,a===null?(a=gd(),Je.updateQueue=a,a.stores=[i]):(u=a.stores,u===null?a.stores=[i]:u.push(i))}function Gv(i,a,u,h){a.value=u,a.getSnapshot=h,Kv(a)&&Xv(i)}function Qv(i,a,u){return u(function(){Kv(a)&&Xv(i)})}function Kv(i){var a=i.getSnapshot;i=i.value;try{var u=a();return!_r(i,u)}catch{return!0}}function Xv(i){var a=La(i,2);a!==null&&yr(a,i,2)}function b0(i){var a=er();if(typeof i=="function"){var u=i;if(i=u(),qa){Sn(!0);try{u()}finally{Sn(!1)}}}return a.memoizedState=a.baseState=i,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ns,lastRenderedState:i},a}function Wv(i,a,u,h){return i.baseState=u,p0(i,Ot,typeof h=="function"?h:ns)}function iI(i,a,u,h,y){if(vd(i))throw Error(r(485));if(i=a.action,i!==null){var v={payload:y,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){v.listeners.push(_)}};O.T!==null?u(!0):v.isTransition=!1,h(v),u=a.pending,u===null?(v.next=a.pending=v,Zv(a,v)):(v.next=u.next,a.pending=u.next=v)}}function Zv(i,a){var u=a.action,h=a.payload,y=i.state;if(a.isTransition){var v=O.T,_={};O.T=_;try{var D=u(y,h),G=O.S;G!==null&&G(_,D),Jv(i,a,D)}catch(ae){y0(i,a,ae)}finally{v!==null&&_.types!==null&&(v.types=_.types),O.T=v}}else try{v=u(y,h),Jv(i,a,v)}catch(ae){y0(i,a,ae)}}function Jv(i,a,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(h){eT(i,a,h)},function(h){return y0(i,a,h)}):eT(i,a,u)}function eT(i,a,u){a.status="fulfilled",a.value=u,tT(a),i.state=u,a=i.pending,a!==null&&(u=a.next,u===a?i.pending=null:(u=u.next,a.next=u,Zv(i,u)))}function y0(i,a,u){var h=i.pending;if(i.pending=null,h!==null){h=h.next;do a.status="rejected",a.reason=u,tT(a),a=a.next;while(a!==h)}i.action=null}function tT(i){i=i.listeners;for(var a=0;a<i.length;a++)(0,i[a])()}function nT(i,a){return a}function rT(i,a){if(yt){var u=Pt.formState;if(u!==null){e:{var h=Je;if(yt){if(Vt){t:{for(var y=Vt,v=Yr;y.nodeType!==8;){if(!v){y=null;break t}if(y=Qr(y.nextSibling),y===null){y=null;break t}}v=y.data,y=v==="F!"||v==="F"?y:null}if(y){Vt=Qr(y.nextSibling),h=y.data==="F!";break e}}Ns(h)}h=!1}h&&(a=u[0])}}return u=er(),u.memoizedState=u.baseState=a,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:nT,lastRenderedState:a},u.queue=h,u=TT.bind(null,Je,h),h.dispatch=u,h=b0(!1),v=w0.bind(null,Je,!1,h.queue),h=er(),y={state:a,dispatch:null,action:i,pending:null},h.queue=y,u=iI.bind(null,Je,y,v,u),y.dispatch=u,h.memoizedState=i,[a,u,!1]}function iT(i){var a=dn();return sT(a,Ot,i)}function sT(i,a,u){if(a=p0(i,a,nT)[0],i=yd(ns)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var h=zu(a)}catch(_){throw _===tl?ld:_}else h=a;a=dn();var y=a.queue,v=y.dispatch;return u!==a.memoizedState&&(Je.flags|=2048,al(9,{destroy:void 0},sI.bind(null,y,u),null)),[h,v,i]}function sI(i,a){i.action=a}function aT(i){var a=dn(),u=Ot;if(u!==null)return sT(a,u,i);dn(),a=a.memoizedState,u=dn();var h=u.queue.dispatch;return u.memoizedState=i,[a,h,!1]}function al(i,a,u,h){return i={tag:i,create:u,deps:h,inst:a,next:null},a=Je.updateQueue,a===null&&(a=gd(),Je.updateQueue=a),u=a.lastEffect,u===null?a.lastEffect=i.next=i:(h=u.next,u.next=i,i.next=h,a.lastEffect=i),i}function oT(){return dn().memoizedState}function xd(i,a,u,h){var y=er();Je.flags|=i,y.memoizedState=al(1|a,{destroy:void 0},u,h===void 0?null:h)}function Ed(i,a,u,h){var y=dn();h=h===void 0?null:h;var v=y.memoizedState.inst;Ot!==null&&h!==null&&u0(h,Ot.memoizedState.deps)?y.memoizedState=al(a,v,u,h):(Je.flags|=i,y.memoizedState=al(1|a,v,u,h))}function lT(i,a){xd(8390656,8,i,a)}function x0(i,a){Ed(2048,8,i,a)}function aI(i){Je.flags|=4;var a=Je.updateQueue;if(a===null)a=gd(),Je.updateQueue=a,a.events=[i];else{var u=a.events;u===null?a.events=[i]:u.push(i)}}function uT(i){var a=dn().memoizedState;return aI({ref:a,nextImpl:i}),function(){if((_t&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}function cT(i,a){return Ed(4,2,i,a)}function fT(i,a){return Ed(4,4,i,a)}function dT(i,a){if(typeof a=="function"){i=i();var u=a(i);return function(){typeof u=="function"?u():a(null)}}if(a!=null)return i=i(),a.current=i,function(){a.current=null}}function hT(i,a,u){u=u!=null?u.concat([i]):null,Ed(4,4,dT.bind(null,a,i),u)}function E0(){}function mT(i,a){var u=dn();a=a===void 0?null:a;var h=u.memoizedState;return a!==null&&u0(a,h[1])?h[0]:(u.memoizedState=[i,a],i)}function pT(i,a){var u=dn();a=a===void 0?null:a;var h=u.memoizedState;if(a!==null&&u0(a,h[1]))return h[0];if(h=i(),qa){Sn(!0);try{i()}finally{Sn(!1)}}return u.memoizedState=[h,a],h}function v0(i,a,u){return u===void 0||(ts&1073741824)!==0&&(mt&261930)===0?i.memoizedState=a:(i.memoizedState=u,i=gS(),Je.lanes|=i,Bs|=i,u)}function gT(i,a,u,h){return _r(u,a)?u:rl.current!==null?(i=v0(i,u,h),_r(i,a)||(gn=!0),i):(ts&42)===0||(ts&1073741824)!==0&&(mt&261930)===0?(gn=!0,i.memoizedState=u):(i=gS(),Je.lanes|=i,Bs|=i,a)}function bT(i,a,u,h,y){var v=H.p;H.p=v!==0&&8>v?v:8;var _=O.T,D={};O.T=D,w0(i,!1,a,u);try{var G=y(),ae=O.S;if(ae!==null&&ae(D,G),G!==null&&typeof G=="object"&&typeof G.then=="function"){var de=tI(G,h);Vu(i,a,de,Mr(i))}else Vu(i,a,h,Mr(i))}catch(pe){Vu(i,a,{then:function(){},status:"rejected",reason:pe},Mr())}finally{H.p=v,_!==null&&D.types!==null&&(_.types=D.types),O.T=_}}function oI(){}function T0(i,a,u,h){if(i.tag!==5)throw Error(r(476));var y=yT(i).queue;bT(i,y,a,q,u===null?oI:function(){return xT(i),u(h)})}function yT(i){var a=i.memoizedState;if(a!==null)return a;a={memoizedState:q,baseState:q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ns,lastRenderedState:q},next:null};var u={};return a.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ns,lastRenderedState:u},next:null},i.memoizedState=a,i=i.alternate,i!==null&&(i.memoizedState=a),a}function xT(i){var a=yT(i);a.next===null&&(a=i.alternate.memoizedState),Vu(i,a.next.queue,{},Mr())}function S0(){return Bn(ac)}function ET(){return dn().memoizedState}function vT(){return dn().memoizedState}function lI(i){for(var a=i.return;a!==null;){switch(a.tag){case 24:case 3:var u=Mr();i=Os(u);var h=Ms(a,i,u);h!==null&&(yr(h,a,u),Bu(h,a,u)),a={cache:Zp()},i.payload=a;return}a=a.return}}function uI(i,a,u){var h=Mr();u={lane:h,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},vd(i)?ST(a,u):(u=Hp(i,a,u,h),u!==null&&(yr(u,i,h),wT(u,a,h)))}function TT(i,a,u){var h=Mr();Vu(i,a,u,h)}function Vu(i,a,u,h){var y={lane:h,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(vd(i))ST(a,y);else{var v=i.alternate;if(i.lanes===0&&(v===null||v.lanes===0)&&(v=a.lastRenderedReducer,v!==null))try{var _=a.lastRenderedState,D=v(_,u);if(y.hasEagerState=!0,y.eagerState=D,_r(D,_))return td(i,a,y,0),Pt===null&&ed(),!1}catch{}finally{}if(u=Hp(i,a,y,h),u!==null)return yr(u,i,h),wT(u,a,h),!0}return!1}function w0(i,a,u,h){if(h={lane:2,revertLane:ng(),gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},vd(i)){if(a)throw Error(r(479))}else a=Hp(i,u,h,2),a!==null&&yr(a,i,2)}function vd(i){var a=i.alternate;return i===Je||a!==null&&a===Je}function ST(i,a){il=md=!0;var u=i.pending;u===null?a.next=a:(a.next=u.next,u.next=a),i.pending=a}function wT(i,a,u){if((u&4194048)!==0){var h=a.lanes;h&=i.pendingLanes,u|=h,a.lanes=u,Ra(i,u)}}var qu={readContext:Bn,use:bd,useCallback:rn,useContext:rn,useEffect:rn,useImperativeHandle:rn,useLayoutEffect:rn,useInsertionEffect:rn,useMemo:rn,useReducer:rn,useRef:rn,useState:rn,useDebugValue:rn,useDeferredValue:rn,useTransition:rn,useSyncExternalStore:rn,useId:rn,useHostTransitionStatus:rn,useFormState:rn,useActionState:rn,useOptimistic:rn,useMemoCache:rn,useCacheRefresh:rn};qu.useEffectEvent=rn;var CT={readContext:Bn,use:bd,useCallback:function(i,a){return er().memoizedState=[i,a===void 0?null:a],i},useContext:Bn,useEffect:lT,useImperativeHandle:function(i,a,u){u=u!=null?u.concat([i]):null,xd(4194308,4,dT.bind(null,a,i),u)},useLayoutEffect:function(i,a){return xd(4194308,4,i,a)},useInsertionEffect:function(i,a){xd(4,2,i,a)},useMemo:function(i,a){var u=er();a=a===void 0?null:a;var h=i();if(qa){Sn(!0);try{i()}finally{Sn(!1)}}return u.memoizedState=[h,a],h},useReducer:function(i,a,u){var h=er();if(u!==void 0){var y=u(a);if(qa){Sn(!0);try{u(a)}finally{Sn(!1)}}}else y=a;return h.memoizedState=h.baseState=y,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:y},h.queue=i,i=i.dispatch=uI.bind(null,Je,i),[h.memoizedState,i]},useRef:function(i){var a=er();return i={current:i},a.memoizedState=i},useState:function(i){i=b0(i);var a=i.queue,u=TT.bind(null,Je,a);return a.dispatch=u,[i.memoizedState,u]},useDebugValue:E0,useDeferredValue:function(i,a){var u=er();return v0(u,i,a)},useTransition:function(){var i=b0(!1);return i=bT.bind(null,Je,i.queue,!0,!1),er().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,a,u){var h=Je,y=er();if(yt){if(u===void 0)throw Error(r(407));u=u()}else{if(u=a(),Pt===null)throw Error(r(349));(mt&127)!==0||Yv(h,a,u)}y.memoizedState=u;var v={value:u,getSnapshot:a};return y.queue=v,lT(Qv.bind(null,h,v,i),[i]),h.flags|=2048,al(9,{destroy:void 0},Gv.bind(null,h,v,u,a),null),u},useId:function(){var i=er(),a=Pt.identifierPrefix;if(yt){var u=Si,h=Ti;u=(h&~(1<<32-vt(h)-1)).toString(32)+u,a="_"+a+"R_"+u,u=pd++,0<u&&(a+="H"+u.toString(32)),a+="_"}else u=nI++,a="_"+a+"r_"+u.toString(32)+"_";return i.memoizedState=a},useHostTransitionStatus:S0,useFormState:rT,useActionState:rT,useOptimistic:function(i){var a=er();a.memoizedState=a.baseState=i;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=u,a=w0.bind(null,Je,!0,u),u.dispatch=a,[i,a]},useMemoCache:m0,useCacheRefresh:function(){return er().memoizedState=lI.bind(null,Je)},useEffectEvent:function(i){var a=er(),u={impl:i};return a.memoizedState=u,function(){if((_t&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}},C0={readContext:Bn,use:bd,useCallback:mT,useContext:Bn,useEffect:x0,useImperativeHandle:hT,useInsertionEffect:cT,useLayoutEffect:fT,useMemo:pT,useReducer:yd,useRef:oT,useState:function(){return yd(ns)},useDebugValue:E0,useDeferredValue:function(i,a){var u=dn();return gT(u,Ot.memoizedState,i,a)},useTransition:function(){var i=yd(ns)[0],a=dn().memoizedState;return[typeof i=="boolean"?i:zu(i),a]},useSyncExternalStore:$v,useId:ET,useHostTransitionStatus:S0,useFormState:iT,useActionState:iT,useOptimistic:function(i,a){var u=dn();return Wv(u,Ot,i,a)},useMemoCache:m0,useCacheRefresh:vT};C0.useEffectEvent=uT;var AT={readContext:Bn,use:bd,useCallback:mT,useContext:Bn,useEffect:x0,useImperativeHandle:hT,useInsertionEffect:cT,useLayoutEffect:fT,useMemo:pT,useReducer:g0,useRef:oT,useState:function(){return g0(ns)},useDebugValue:E0,useDeferredValue:function(i,a){var u=dn();return Ot===null?v0(u,i,a):gT(u,Ot.memoizedState,i,a)},useTransition:function(){var i=g0(ns)[0],a=dn().memoizedState;return[typeof i=="boolean"?i:zu(i),a]},useSyncExternalStore:$v,useId:ET,useHostTransitionStatus:S0,useFormState:aT,useActionState:aT,useOptimistic:function(i,a){var u=dn();return Ot!==null?Wv(u,Ot,i,a):(u.baseState=i,[i,u.queue.dispatch])},useMemoCache:m0,useCacheRefresh:vT};AT.useEffectEvent=uT;function A0(i,a,u,h){a=i.memoizedState,u=u(h,a),u=u==null?a:p({},a,u),i.memoizedState=u,i.lanes===0&&(i.updateQueue.baseState=u)}var _0={enqueueSetState:function(i,a,u){i=i._reactInternals;var h=Mr(),y=Os(h);y.payload=a,u!=null&&(y.callback=u),a=Ms(i,y,h),a!==null&&(yr(a,i,h),Bu(a,i,h))},enqueueReplaceState:function(i,a,u){i=i._reactInternals;var h=Mr(),y=Os(h);y.tag=1,y.payload=a,u!=null&&(y.callback=u),a=Ms(i,y,h),a!==null&&(yr(a,i,h),Bu(a,i,h))},enqueueForceUpdate:function(i,a){i=i._reactInternals;var u=Mr(),h=Os(u);h.tag=2,a!=null&&(h.callback=a),a=Ms(i,h,u),a!==null&&(yr(a,i,u),Bu(a,i,u))}};function _T(i,a,u,h,y,v,_){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,v,_):a.prototype&&a.prototype.isPureReactComponent?!Ru(u,h)||!Ru(y,v):!0}function kT(i,a,u,h){i=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(u,h),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(u,h),a.state!==i&&_0.enqueueReplaceState(a,a.state,null)}function $a(i,a){var u=a;if("ref"in a){u={};for(var h in a)h!=="ref"&&(u[h]=a[h])}if(i=i.defaultProps){u===a&&(u=p({},u));for(var y in i)u[y]===void 0&&(u[y]=i[y])}return u}function NT(i){Jf(i)}function RT(i){console.error(i)}function DT(i){Jf(i)}function Td(i,a){try{var u=i.onUncaughtError;u(a.value,{componentStack:a.stack})}catch(h){setTimeout(function(){throw h})}}function OT(i,a,u){try{var h=i.onCaughtError;h(u.value,{componentStack:u.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function k0(i,a,u){return u=Os(u),u.tag=3,u.payload={element:null},u.callback=function(){Td(i,a)},u}function MT(i){return i=Os(i),i.tag=3,i}function IT(i,a,u,h){var y=u.type.getDerivedStateFromError;if(typeof y=="function"){var v=h.value;i.payload=function(){return y(v)},i.callback=function(){OT(a,u,h)}}var _=u.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(i.callback=function(){OT(a,u,h),typeof y!="function"&&(Fs===null?Fs=new Set([this]):Fs.add(this));var D=h.stack;this.componentDidCatch(h.value,{componentStack:D!==null?D:""})})}function cI(i,a,u,h,y){if(u.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){if(a=u.alternate,a!==null&&Zo(a,u,y,!0),u=Nr.current,u!==null){switch(u.tag){case 31:case 13:return Gr===null?Id():u.alternate===null&&sn===0&&(sn=3),u.flags&=-257,u.flags|=65536,u.lanes=y,h===ud?u.flags|=16384:(a=u.updateQueue,a===null?u.updateQueue=new Set([h]):a.add(h),J0(i,h,y)),!1;case 22:return u.flags|=65536,h===ud?u.flags|=16384:(a=u.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([h])},u.updateQueue=a):(u=a.retryQueue,u===null?a.retryQueue=new Set([h]):u.add(h)),J0(i,h,y)),!1}throw Error(r(435,u.tag))}return J0(i,h,y),Id(),!1}if(yt)return a=Nr.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=y,h!==Gp&&(i=Error(r(422),{cause:h}),Mu(Vr(i,u)))):(h!==Gp&&(a=Error(r(423),{cause:h}),Mu(Vr(a,u))),i=i.current.alternate,i.flags|=65536,y&=-y,i.lanes|=y,h=Vr(h,u),y=k0(i.stateNode,h,y),i0(i,y),sn!==4&&(sn=2)),!1;var v=Error(r(520),{cause:h});if(v=Vr(v,u),Zu===null?Zu=[v]:Zu.push(v),sn!==4&&(sn=2),a===null)return!0;h=Vr(h,u),u=a;do{switch(u.tag){case 3:return u.flags|=65536,i=y&-y,u.lanes|=i,i=k0(u.stateNode,h,i),i0(u,i),!1;case 1:if(a=u.type,v=u.stateNode,(u.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Fs===null||!Fs.has(v))))return u.flags|=65536,y&=-y,u.lanes|=y,y=MT(y),IT(y,i,u,h),i0(u,y),!1}u=u.return}while(u!==null);return!1}var N0=Error(r(461)),gn=!1;function Fn(i,a,u,h){a.child=i===null?Bv(a,null,u,h):Va(a,i.child,u,h)}function LT(i,a,u,h,y){u=u.render;var v=a.ref;if("ref"in h){var _={};for(var D in h)D!=="ref"&&(_[D]=h[D])}else _=h;return Fa(a),h=c0(i,a,u,_,v,y),D=f0(),i!==null&&!gn?(d0(i,a,y),rs(i,a,y)):(yt&&D&&$p(a),a.flags|=1,Fn(i,a,h,y),a.child)}function PT(i,a,u,h,y){if(i===null){var v=u.type;return typeof v=="function"&&!zp(v)&&v.defaultProps===void 0&&u.compare===null?(a.tag=15,a.type=v,jT(i,a,v,h,y)):(i=rd(u.type,null,h,a,a.mode,y),i.ref=a.ref,i.return=a,a.child=i)}if(v=i.child,!j0(i,y)){var _=v.memoizedProps;if(u=u.compare,u=u!==null?u:Ru,u(_,h)&&i.ref===a.ref)return rs(i,a,y)}return a.flags|=1,i=Wi(v,h),i.ref=a.ref,i.return=a,a.child=i}function jT(i,a,u,h,y){if(i!==null){var v=i.memoizedProps;if(Ru(v,h)&&i.ref===a.ref)if(gn=!1,a.pendingProps=h=v,j0(i,y))(i.flags&131072)!==0&&(gn=!0);else return a.lanes=i.lanes,rs(i,a,y)}return R0(i,a,u,h,y)}function BT(i,a,u,h){var y=h.children,v=i!==null?i.memoizedState:null;if(i===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),h.mode==="hidden"){if((a.flags&128)!==0){if(v=v!==null?v.baseLanes|u:u,i!==null){for(h=a.child=i.child,y=0;h!==null;)y=y|h.lanes|h.childLanes,h=h.sibling;h=y&~v}else h=0,a.child=null;return FT(i,a,v,u,h)}if((u&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},i!==null&&od(a,v!==null?v.cachePool:null),v!==null?Hv(a,v):a0(),zv(a);else return h=a.lanes=536870912,FT(i,a,v!==null?v.baseLanes|u:u,u,h)}else v!==null?(od(a,v.cachePool),Hv(a,v),Ls(),a.memoizedState=null):(i!==null&&od(a,null),a0(),Ls());return Fn(i,a,y,u),a.child}function $u(i,a){return i!==null&&i.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function FT(i,a,u,h,y){var v=e0();return v=v===null?null:{parent:mn._currentValue,pool:v},a.memoizedState={baseLanes:u,cachePool:v},i!==null&&od(a,null),a0(),zv(a),i!==null&&Zo(i,a,h,!0),a.childLanes=y,null}function Sd(i,a){return a=Cd({mode:a.mode,children:a.children},i.mode),a.ref=i.ref,i.child=a,a.return=i,a}function UT(i,a,u){return Va(a,i.child,null,u),i=Sd(a,a.pendingProps),i.flags|=2,Rr(a),a.memoizedState=null,i}function fI(i,a,u){var h=a.pendingProps,y=(a.flags&128)!==0;if(a.flags&=-129,i===null){if(yt){if(h.mode==="hidden")return i=Sd(a,h),a.lanes=536870912,$u(null,i);if(l0(a),(i=Vt)?(i=ZS(i,Yr),i=i!==null&&i.data==="&"?i:null,i!==null&&(a.memoizedState={dehydrated:i,treeContext:_s!==null?{id:Ti,overflow:Si}:null,retryLane:536870912,hydrationErrors:null},u=Sv(i),u.return=a,a.child=u,jn=a,Vt=null)):i=null,i===null)throw Ns(a);return a.lanes=536870912,null}return Sd(a,h)}var v=i.memoizedState;if(v!==null){var _=v.dehydrated;if(l0(a),y)if(a.flags&256)a.flags&=-257,a=UT(i,a,u);else if(a.memoizedState!==null)a.child=i.child,a.flags|=128,a=null;else throw Error(r(558));else if(gn||Zo(i,a,u,!1),y=(u&i.childLanes)!==0,gn||y){if(h=Pt,h!==null&&(_=be(h,u),_!==0&&_!==v.retryLane))throw v.retryLane=_,La(i,_),yr(h,i,_),N0;Id(),a=UT(i,a,u)}else i=v.treeContext,Vt=Qr(_.nextSibling),jn=a,yt=!0,ks=null,Yr=!1,i!==null&&Av(a,i),a=Sd(a,h),a.flags|=4096;return a}return i=Wi(i.child,{mode:h.mode,children:h.children}),i.ref=a.ref,a.child=i,i.return=a,i}function wd(i,a){var u=a.ref;if(u===null)i!==null&&i.ref!==null&&(a.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(r(284));(i===null||i.ref!==u)&&(a.flags|=4194816)}}function R0(i,a,u,h,y){return Fa(a),u=c0(i,a,u,h,void 0,y),h=f0(),i!==null&&!gn?(d0(i,a,y),rs(i,a,y)):(yt&&h&&$p(a),a.flags|=1,Fn(i,a,u,y),a.child)}function HT(i,a,u,h,y,v){return Fa(a),a.updateQueue=null,u=qv(a,h,u,y),Vv(i),h=f0(),i!==null&&!gn?(d0(i,a,v),rs(i,a,v)):(yt&&h&&$p(a),a.flags|=1,Fn(i,a,u,v),a.child)}function zT(i,a,u,h,y){if(Fa(a),a.stateNode===null){var v=Qo,_=u.contextType;typeof _=="object"&&_!==null&&(v=Bn(_)),v=new u(h,v),a.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,v.updater=_0,a.stateNode=v,v._reactInternals=a,v=a.stateNode,v.props=h,v.state=a.memoizedState,v.refs={},n0(a),_=u.contextType,v.context=typeof _=="object"&&_!==null?Bn(_):Qo,v.state=a.memoizedState,_=u.getDerivedStateFromProps,typeof _=="function"&&(A0(a,u,_,h),v.state=a.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(_=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),_!==v.state&&_0.enqueueReplaceState(v,v.state,null),Uu(a,h,v,y),Fu(),v.state=a.memoizedState),typeof v.componentDidMount=="function"&&(a.flags|=4194308),h=!0}else if(i===null){v=a.stateNode;var D=a.memoizedProps,G=$a(u,D);v.props=G;var ae=v.context,de=u.contextType;_=Qo,typeof de=="object"&&de!==null&&(_=Bn(de));var pe=u.getDerivedStateFromProps;de=typeof pe=="function"||typeof v.getSnapshotBeforeUpdate=="function",D=a.pendingProps!==D,de||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(D||ae!==_)&&kT(a,v,h,_),Ds=!1;var le=a.memoizedState;v.state=le,Uu(a,h,v,y),Fu(),ae=a.memoizedState,D||le!==ae||Ds?(typeof pe=="function"&&(A0(a,u,pe,h),ae=a.memoizedState),(G=Ds||_T(a,u,G,h,le,ae,_))?(de||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(a.flags|=4194308)):(typeof v.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=h,a.memoizedState=ae),v.props=h,v.state=ae,v.context=_,h=G):(typeof v.componentDidMount=="function"&&(a.flags|=4194308),h=!1)}else{v=a.stateNode,r0(i,a),_=a.memoizedProps,de=$a(u,_),v.props=de,pe=a.pendingProps,le=v.context,ae=u.contextType,G=Qo,typeof ae=="object"&&ae!==null&&(G=Bn(ae)),D=u.getDerivedStateFromProps,(ae=typeof D=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(_!==pe||le!==G)&&kT(a,v,h,G),Ds=!1,le=a.memoizedState,v.state=le,Uu(a,h,v,y),Fu();var ue=a.memoizedState;_!==pe||le!==ue||Ds||i!==null&&i.dependencies!==null&&sd(i.dependencies)?(typeof D=="function"&&(A0(a,u,D,h),ue=a.memoizedState),(de=Ds||_T(a,u,de,h,le,ue,G)||i!==null&&i.dependencies!==null&&sd(i.dependencies))?(ae||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(h,ue,G),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(h,ue,G)),typeof v.componentDidUpdate=="function"&&(a.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof v.componentDidUpdate!="function"||_===i.memoizedProps&&le===i.memoizedState||(a.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||_===i.memoizedProps&&le===i.memoizedState||(a.flags|=1024),a.memoizedProps=h,a.memoizedState=ue),v.props=h,v.state=ue,v.context=G,h=de):(typeof v.componentDidUpdate!="function"||_===i.memoizedProps&&le===i.memoizedState||(a.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||_===i.memoizedProps&&le===i.memoizedState||(a.flags|=1024),h=!1)}return v=h,wd(i,a),h=(a.flags&128)!==0,v||h?(v=a.stateNode,u=h&&typeof u.getDerivedStateFromError!="function"?null:v.render(),a.flags|=1,i!==null&&h?(a.child=Va(a,i.child,null,y),a.child=Va(a,null,u,y)):Fn(i,a,u,y),a.memoizedState=v.state,i=a.child):i=rs(i,a,y),i}function VT(i,a,u,h){return ja(),a.flags|=256,Fn(i,a,u,h),a.child}var D0={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function O0(i){return{baseLanes:i,cachePool:Ov()}}function M0(i,a,u){return i=i!==null?i.childLanes&~u:0,a&&(i|=Or),i}function qT(i,a,u){var h=a.pendingProps,y=!1,v=(a.flags&128)!==0,_;if((_=v)||(_=i!==null&&i.memoizedState===null?!1:(fn.current&2)!==0),_&&(y=!0,a.flags&=-129),_=(a.flags&32)!==0,a.flags&=-33,i===null){if(yt){if(y?Is(a):Ls(),(i=Vt)?(i=ZS(i,Yr),i=i!==null&&i.data!=="&"?i:null,i!==null&&(a.memoizedState={dehydrated:i,treeContext:_s!==null?{id:Ti,overflow:Si}:null,retryLane:536870912,hydrationErrors:null},u=Sv(i),u.return=a,a.child=u,jn=a,Vt=null)):i=null,i===null)throw Ns(a);return pg(i)?a.lanes=32:a.lanes=536870912,null}var D=h.children;return h=h.fallback,y?(Ls(),y=a.mode,D=Cd({mode:"hidden",children:D},y),h=Pa(h,y,u,null),D.return=a,h.return=a,D.sibling=h,a.child=D,h=a.child,h.memoizedState=O0(u),h.childLanes=M0(i,_,u),a.memoizedState=D0,$u(null,h)):(Is(a),I0(a,D))}var G=i.memoizedState;if(G!==null&&(D=G.dehydrated,D!==null)){if(v)a.flags&256?(Is(a),a.flags&=-257,a=L0(i,a,u)):a.memoizedState!==null?(Ls(),a.child=i.child,a.flags|=128,a=null):(Ls(),D=h.fallback,y=a.mode,h=Cd({mode:"visible",children:h.children},y),D=Pa(D,y,u,null),D.flags|=2,h.return=a,D.return=a,h.sibling=D,a.child=h,Va(a,i.child,null,u),h=a.child,h.memoizedState=O0(u),h.childLanes=M0(i,_,u),a.memoizedState=D0,a=$u(null,h));else if(Is(a),pg(D)){if(_=D.nextSibling&&D.nextSibling.dataset,_)var ae=_.dgst;_=ae,h=Error(r(419)),h.stack="",h.digest=_,Mu({value:h,source:null,stack:null}),a=L0(i,a,u)}else if(gn||Zo(i,a,u,!1),_=(u&i.childLanes)!==0,gn||_){if(_=Pt,_!==null&&(h=be(_,u),h!==0&&h!==G.retryLane))throw G.retryLane=h,La(i,h),yr(_,i,h),N0;mg(D)||Id(),a=L0(i,a,u)}else mg(D)?(a.flags|=192,a.child=i.child,a=null):(i=G.treeContext,Vt=Qr(D.nextSibling),jn=a,yt=!0,ks=null,Yr=!1,i!==null&&Av(a,i),a=I0(a,h.children),a.flags|=4096);return a}return y?(Ls(),D=h.fallback,y=a.mode,G=i.child,ae=G.sibling,h=Wi(G,{mode:"hidden",children:h.children}),h.subtreeFlags=G.subtreeFlags&65011712,ae!==null?D=Wi(ae,D):(D=Pa(D,y,u,null),D.flags|=2),D.return=a,h.return=a,h.sibling=D,a.child=h,$u(null,h),h=a.child,D=i.child.memoizedState,D===null?D=O0(u):(y=D.cachePool,y!==null?(G=mn._currentValue,y=y.parent!==G?{parent:G,pool:G}:y):y=Ov(),D={baseLanes:D.baseLanes|u,cachePool:y}),h.memoizedState=D,h.childLanes=M0(i,_,u),a.memoizedState=D0,$u(i.child,h)):(Is(a),u=i.child,i=u.sibling,u=Wi(u,{mode:"visible",children:h.children}),u.return=a,u.sibling=null,i!==null&&(_=a.deletions,_===null?(a.deletions=[i],a.flags|=16):_.push(i)),a.child=u,a.memoizedState=null,u)}function I0(i,a){return a=Cd({mode:"visible",children:a},i.mode),a.return=i,i.child=a}function Cd(i,a){return i=kr(22,i,null,a),i.lanes=0,i}function L0(i,a,u){return Va(a,i.child,null,u),i=I0(a,a.pendingProps.children),i.flags|=2,a.memoizedState=null,i}function $T(i,a,u){i.lanes|=a;var h=i.alternate;h!==null&&(h.lanes|=a),Xp(i.return,a,u)}function P0(i,a,u,h,y,v){var _=i.memoizedState;_===null?i.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:h,tail:u,tailMode:y,treeForkCount:v}:(_.isBackwards=a,_.rendering=null,_.renderingStartTime=0,_.last=h,_.tail=u,_.tailMode=y,_.treeForkCount=v)}function YT(i,a,u){var h=a.pendingProps,y=h.revealOrder,v=h.tail;h=h.children;var _=fn.current,D=(_&2)!==0;if(D?(_=_&1|2,a.flags|=128):_&=1,P(fn,_),Fn(i,a,h,u),h=yt?Ou:0,!D&&i!==null&&(i.flags&128)!==0)e:for(i=a.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&$T(i,u,a);else if(i.tag===19)$T(i,u,a);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===a)break e;for(;i.sibling===null;){if(i.return===null||i.return===a)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(y){case"forwards":for(u=a.child,y=null;u!==null;)i=u.alternate,i!==null&&hd(i)===null&&(y=u),u=u.sibling;u=y,u===null?(y=a.child,a.child=null):(y=u.sibling,u.sibling=null),P0(a,!1,y,u,v,h);break;case"backwards":case"unstable_legacy-backwards":for(u=null,y=a.child,a.child=null;y!==null;){if(i=y.alternate,i!==null&&hd(i)===null){a.child=y;break}i=y.sibling,y.sibling=u,u=y,y=i}P0(a,!0,u,null,v,h);break;case"together":P0(a,!1,null,null,void 0,h);break;default:a.memoizedState=null}return a.child}function rs(i,a,u){if(i!==null&&(a.dependencies=i.dependencies),Bs|=a.lanes,(u&a.childLanes)===0)if(i!==null){if(Zo(i,a,u,!1),(u&a.childLanes)===0)return null}else return null;if(i!==null&&a.child!==i.child)throw Error(r(153));if(a.child!==null){for(i=a.child,u=Wi(i,i.pendingProps),a.child=u,u.return=a;i.sibling!==null;)i=i.sibling,u=u.sibling=Wi(i,i.pendingProps),u.return=a;u.sibling=null}return a.child}function j0(i,a){return(i.lanes&a)!==0?!0:(i=i.dependencies,!!(i!==null&&sd(i)))}function dI(i,a,u){switch(a.tag){case 3:Se(a,a.stateNode.containerInfo),Rs(a,mn,i.memoizedState.cache),ja();break;case 27:case 5:Ie(a);break;case 4:Se(a,a.stateNode.containerInfo);break;case 10:Rs(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,l0(a),null;break;case 13:var h=a.memoizedState;if(h!==null)return h.dehydrated!==null?(Is(a),a.flags|=128,null):(u&a.child.childLanes)!==0?qT(i,a,u):(Is(a),i=rs(i,a,u),i!==null?i.sibling:null);Is(a);break;case 19:var y=(i.flags&128)!==0;if(h=(u&a.childLanes)!==0,h||(Zo(i,a,u,!1),h=(u&a.childLanes)!==0),y){if(h)return YT(i,a,u);a.flags|=128}if(y=a.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),P(fn,fn.current),h)break;return null;case 22:return a.lanes=0,BT(i,a,u,a.pendingProps);case 24:Rs(a,mn,i.memoizedState.cache)}return rs(i,a,u)}function GT(i,a,u){if(i!==null)if(i.memoizedProps!==a.pendingProps)gn=!0;else{if(!j0(i,u)&&(a.flags&128)===0)return gn=!1,dI(i,a,u);gn=(i.flags&131072)!==0}else gn=!1,yt&&(a.flags&1048576)!==0&&Cv(a,Ou,a.index);switch(a.lanes=0,a.tag){case 16:e:{var h=a.pendingProps;if(i=Ha(a.elementType),a.type=i,typeof i=="function")zp(i)?(h=$a(i,h),a.tag=1,a=zT(null,a,i,h,u)):(a.tag=0,a=R0(null,a,i,h,u));else{if(i!=null){var y=i.$$typeof;if(y===R){a.tag=11,a=LT(null,a,i,h,u);break e}else if(y===j){a.tag=14,a=PT(null,a,i,h,u);break e}}throw a=te(i)||i,Error(r(306,a,""))}}return a;case 0:return R0(i,a,a.type,a.pendingProps,u);case 1:return h=a.type,y=$a(h,a.pendingProps),zT(i,a,h,y,u);case 3:e:{if(Se(a,a.stateNode.containerInfo),i===null)throw Error(r(387));h=a.pendingProps;var v=a.memoizedState;y=v.element,r0(i,a),Uu(a,h,null,u);var _=a.memoizedState;if(h=_.cache,Rs(a,mn,h),h!==v.cache&&Wp(a,[mn],u,!0),Fu(),h=_.element,v.isDehydrated)if(v={element:h,isDehydrated:!1,cache:_.cache},a.updateQueue.baseState=v,a.memoizedState=v,a.flags&256){a=VT(i,a,h,u);break e}else if(h!==y){y=Vr(Error(r(424)),a),Mu(y),a=VT(i,a,h,u);break e}else{switch(i=a.stateNode.containerInfo,i.nodeType){case 9:i=i.body;break;default:i=i.nodeName==="HTML"?i.ownerDocument.body:i}for(Vt=Qr(i.firstChild),jn=a,yt=!0,ks=null,Yr=!0,u=Bv(a,null,h,u),a.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling}else{if(ja(),h===y){a=rs(i,a,u);break e}Fn(i,a,h,u)}a=a.child}return a;case 26:return wd(i,a),i===null?(u=i2(a.type,null,a.pendingProps,null))?a.memoizedState=u:yt||(u=a.type,i=a.pendingProps,h=Hd(ge.current).createElement(u),h[Ft]=a,h[Kt]=i,Un(h,u,i),Dn(h),a.stateNode=h):a.memoizedState=i2(a.type,i.memoizedProps,a.pendingProps,i.memoizedState),null;case 27:return Ie(a),i===null&&yt&&(h=a.stateNode=t2(a.type,a.pendingProps,ge.current),jn=a,Yr=!0,y=Vt,Vs(a.type)?(gg=y,Vt=Qr(h.firstChild)):Vt=y),Fn(i,a,a.pendingProps.children,u),wd(i,a),i===null&&(a.flags|=4194304),a.child;case 5:return i===null&&yt&&((y=h=Vt)&&(h=zI(h,a.type,a.pendingProps,Yr),h!==null?(a.stateNode=h,jn=a,Vt=Qr(h.firstChild),Yr=!1,y=!0):y=!1),y||Ns(a)),Ie(a),y=a.type,v=a.pendingProps,_=i!==null?i.memoizedProps:null,h=v.children,fg(y,v)?h=null:_!==null&&fg(y,_)&&(a.flags|=32),a.memoizedState!==null&&(y=c0(i,a,rI,null,null,u),ac._currentValue=y),wd(i,a),Fn(i,a,h,u),a.child;case 6:return i===null&&yt&&((i=u=Vt)&&(u=VI(u,a.pendingProps,Yr),u!==null?(a.stateNode=u,jn=a,Vt=null,i=!0):i=!1),i||Ns(a)),null;case 13:return qT(i,a,u);case 4:return Se(a,a.stateNode.containerInfo),h=a.pendingProps,i===null?a.child=Va(a,null,h,u):Fn(i,a,h,u),a.child;case 11:return LT(i,a,a.type,a.pendingProps,u);case 7:return Fn(i,a,a.pendingProps,u),a.child;case 8:return Fn(i,a,a.pendingProps.children,u),a.child;case 12:return Fn(i,a,a.pendingProps.children,u),a.child;case 10:return h=a.pendingProps,Rs(a,a.type,h.value),Fn(i,a,h.children,u),a.child;case 9:return y=a.type._context,h=a.pendingProps.children,Fa(a),y=Bn(y),h=h(y),a.flags|=1,Fn(i,a,h,u),a.child;case 14:return PT(i,a,a.type,a.pendingProps,u);case 15:return jT(i,a,a.type,a.pendingProps,u);case 19:return YT(i,a,u);case 31:return fI(i,a,u);case 22:return BT(i,a,u,a.pendingProps);case 24:return Fa(a),h=Bn(mn),i===null?(y=e0(),y===null&&(y=Pt,v=Zp(),y.pooledCache=v,v.refCount++,v!==null&&(y.pooledCacheLanes|=u),y=v),a.memoizedState={parent:h,cache:y},n0(a),Rs(a,mn,y)):((i.lanes&u)!==0&&(r0(i,a),Uu(a,null,null,u),Fu()),y=i.memoizedState,v=a.memoizedState,y.parent!==h?(y={parent:h,cache:h},a.memoizedState=y,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=y),Rs(a,mn,h)):(h=v.cache,Rs(a,mn,h),h!==y.cache&&Wp(a,[mn],u,!0))),Fn(i,a,a.pendingProps.children,u),a.child;case 29:throw a.pendingProps}throw Error(r(156,a.tag))}function is(i){i.flags|=4}function B0(i,a,u,h,y){if((a=(i.mode&32)!==0)&&(a=!1),a){if(i.flags|=16777216,(y&335544128)===y)if(i.stateNode.complete)i.flags|=8192;else if(ES())i.flags|=8192;else throw za=ud,t0}else i.flags&=-16777217}function QT(i,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!u2(a))if(ES())i.flags|=8192;else throw za=ud,t0}function Ad(i,a){a!==null&&(i.flags|=4),i.flags&16384&&(a=i.tag!==22?zn():536870912,i.lanes|=a,cl|=a)}function Yu(i,a){if(!yt)switch(i.tailMode){case"hidden":a=i.tail;for(var u=null;a!==null;)a.alternate!==null&&(u=a),a=a.sibling;u===null?i.tail=null:u.sibling=null;break;case"collapsed":u=i.tail;for(var h=null;u!==null;)u.alternate!==null&&(h=u),u=u.sibling;h===null?a||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function qt(i){var a=i.alternate!==null&&i.alternate.child===i.child,u=0,h=0;if(a)for(var y=i.child;y!==null;)u|=y.lanes|y.childLanes,h|=y.subtreeFlags&65011712,h|=y.flags&65011712,y.return=i,y=y.sibling;else for(y=i.child;y!==null;)u|=y.lanes|y.childLanes,h|=y.subtreeFlags,h|=y.flags,y.return=i,y=y.sibling;return i.subtreeFlags|=h,i.childLanes=u,a}function hI(i,a,u){var h=a.pendingProps;switch(Yp(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qt(a),null;case 1:return qt(a),null;case 3:return u=a.stateNode,h=null,i!==null&&(h=i.memoizedState.cache),a.memoizedState.cache!==h&&(a.flags|=2048),es(mn),we(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(i===null||i.child===null)&&(Wo(a)?is(a):i===null||i.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Qp())),qt(a),null;case 26:var y=a.type,v=a.memoizedState;return i===null?(is(a),v!==null?(qt(a),QT(a,v)):(qt(a),B0(a,y,null,h,u))):v?v!==i.memoizedState?(is(a),qt(a),QT(a,v)):(qt(a),a.flags&=-16777217):(i=i.memoizedProps,i!==h&&is(a),qt(a),B0(a,y,i,h,u)),null;case 27:if(Fe(a),u=ge.current,y=a.type,i!==null&&a.stateNode!=null)i.memoizedProps!==h&&is(a);else{if(!h){if(a.stateNode===null)throw Error(r(166));return qt(a),null}i=he.current,Wo(a)?_v(a):(i=t2(y,h,u),a.stateNode=i,is(a))}return qt(a),null;case 5:if(Fe(a),y=a.type,i!==null&&a.stateNode!=null)i.memoizedProps!==h&&is(a);else{if(!h){if(a.stateNode===null)throw Error(r(166));return qt(a),null}if(v=he.current,Wo(a))_v(a);else{var _=Hd(ge.current);switch(v){case 1:v=_.createElementNS("http://www.w3.org/2000/svg",y);break;case 2:v=_.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;default:switch(y){case"svg":v=_.createElementNS("http://www.w3.org/2000/svg",y);break;case"math":v=_.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;case"script":v=_.createElement("div"),v.innerHTML="<script><\/script>",v=v.removeChild(v.firstChild);break;case"select":v=typeof h.is=="string"?_.createElement("select",{is:h.is}):_.createElement("select"),h.multiple?v.multiple=!0:h.size&&(v.size=h.size);break;default:v=typeof h.is=="string"?_.createElement(y,{is:h.is}):_.createElement(y)}}v[Ft]=a,v[Kt]=h;e:for(_=a.child;_!==null;){if(_.tag===5||_.tag===6)v.appendChild(_.stateNode);else if(_.tag!==4&&_.tag!==27&&_.child!==null){_.child.return=_,_=_.child;continue}if(_===a)break e;for(;_.sibling===null;){if(_.return===null||_.return===a)break e;_=_.return}_.sibling.return=_.return,_=_.sibling}a.stateNode=v;e:switch(Un(v,y,h),y){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}h&&is(a)}}return qt(a),B0(a,a.type,i===null?null:i.memoizedProps,a.pendingProps,u),null;case 6:if(i&&a.stateNode!=null)i.memoizedProps!==h&&is(a);else{if(typeof h!="string"&&a.stateNode===null)throw Error(r(166));if(i=ge.current,Wo(a)){if(i=a.stateNode,u=a.memoizedProps,h=null,y=jn,y!==null)switch(y.tag){case 27:case 5:h=y.memoizedProps}i[Ft]=a,i=!!(i.nodeValue===u||h!==null&&h.suppressHydrationWarning===!0||qS(i.nodeValue,u)),i||Ns(a,!0)}else i=Hd(i).createTextNode(h),i[Ft]=a,a.stateNode=i}return qt(a),null;case 31:if(u=a.memoizedState,i===null||i.memoizedState!==null){if(h=Wo(a),u!==null){if(i===null){if(!h)throw Error(r(318));if(i=a.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[Ft]=a}else ja(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;qt(a),i=!1}else u=Qp(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=u),i=!0;if(!i)return a.flags&256?(Rr(a),a):(Rr(a),null);if((a.flags&128)!==0)throw Error(r(558))}return qt(a),null;case 13:if(h=a.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(y=Wo(a),h!==null&&h.dehydrated!==null){if(i===null){if(!y)throw Error(r(318));if(y=a.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(r(317));y[Ft]=a}else ja(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;qt(a),y=!1}else y=Qp(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=y),y=!0;if(!y)return a.flags&256?(Rr(a),a):(Rr(a),null)}return Rr(a),(a.flags&128)!==0?(a.lanes=u,a):(u=h!==null,i=i!==null&&i.memoizedState!==null,u&&(h=a.child,y=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(y=h.alternate.memoizedState.cachePool.pool),v=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(v=h.memoizedState.cachePool.pool),v!==y&&(h.flags|=2048)),u!==i&&u&&(a.child.flags|=8192),Ad(a,a.updateQueue),qt(a),null);case 4:return we(),i===null&&ag(a.stateNode.containerInfo),qt(a),null;case 10:return es(a.type),qt(a),null;case 19:if(re(fn),h=a.memoizedState,h===null)return qt(a),null;if(y=(a.flags&128)!==0,v=h.rendering,v===null)if(y)Yu(h,!1);else{if(sn!==0||i!==null&&(i.flags&128)!==0)for(i=a.child;i!==null;){if(v=hd(i),v!==null){for(a.flags|=128,Yu(h,!1),i=v.updateQueue,a.updateQueue=i,Ad(a,i),a.subtreeFlags=0,i=u,u=a.child;u!==null;)Tv(u,i),u=u.sibling;return P(fn,fn.current&1|2),yt&&Zi(a,h.treeForkCount),a.child}i=i.sibling}h.tail!==null&&Yt()>Dd&&(a.flags|=128,y=!0,Yu(h,!1),a.lanes=4194304)}else{if(!y)if(i=hd(v),i!==null){if(a.flags|=128,y=!0,i=i.updateQueue,a.updateQueue=i,Ad(a,i),Yu(h,!0),h.tail===null&&h.tailMode==="hidden"&&!v.alternate&&!yt)return qt(a),null}else 2*Yt()-h.renderingStartTime>Dd&&u!==536870912&&(a.flags|=128,y=!0,Yu(h,!1),a.lanes=4194304);h.isBackwards?(v.sibling=a.child,a.child=v):(i=h.last,i!==null?i.sibling=v:a.child=v,h.last=v)}return h.tail!==null?(i=h.tail,h.rendering=i,h.tail=i.sibling,h.renderingStartTime=Yt(),i.sibling=null,u=fn.current,P(fn,y?u&1|2:u&1),yt&&Zi(a,h.treeForkCount),i):(qt(a),null);case 22:case 23:return Rr(a),o0(),h=a.memoizedState!==null,i!==null?i.memoizedState!==null!==h&&(a.flags|=8192):h&&(a.flags|=8192),h?(u&536870912)!==0&&(a.flags&128)===0&&(qt(a),a.subtreeFlags&6&&(a.flags|=8192)):qt(a),u=a.updateQueue,u!==null&&Ad(a,u.retryQueue),u=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),h=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(h=a.memoizedState.cachePool.pool),h!==u&&(a.flags|=2048),i!==null&&re(Ua),null;case 24:return u=null,i!==null&&(u=i.memoizedState.cache),a.memoizedState.cache!==u&&(a.flags|=2048),es(mn),qt(a),null;case 25:return null;case 30:return null}throw Error(r(156,a.tag))}function mI(i,a){switch(Yp(a),a.tag){case 1:return i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 3:return es(mn),we(),i=a.flags,(i&65536)!==0&&(i&128)===0?(a.flags=i&-65537|128,a):null;case 26:case 27:case 5:return Fe(a),null;case 31:if(a.memoizedState!==null){if(Rr(a),a.alternate===null)throw Error(r(340));ja()}return i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 13:if(Rr(a),i=a.memoizedState,i!==null&&i.dehydrated!==null){if(a.alternate===null)throw Error(r(340));ja()}return i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 19:return re(fn),null;case 4:return we(),null;case 10:return es(a.type),null;case 22:case 23:return Rr(a),o0(),i!==null&&re(Ua),i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 24:return es(mn),null;case 25:return null;default:return null}}function KT(i,a){switch(Yp(a),a.tag){case 3:es(mn),we();break;case 26:case 27:case 5:Fe(a);break;case 4:we();break;case 31:a.memoizedState!==null&&Rr(a);break;case 13:Rr(a);break;case 19:re(fn);break;case 10:es(a.type);break;case 22:case 23:Rr(a),o0(),i!==null&&re(Ua);break;case 24:es(mn)}}function Gu(i,a){try{var u=a.updateQueue,h=u!==null?u.lastEffect:null;if(h!==null){var y=h.next;u=y;do{if((u.tag&i)===i){h=void 0;var v=u.create,_=u.inst;h=v(),_.destroy=h}u=u.next}while(u!==y)}}catch(D){Dt(a,a.return,D)}}function Ps(i,a,u){try{var h=a.updateQueue,y=h!==null?h.lastEffect:null;if(y!==null){var v=y.next;h=v;do{if((h.tag&i)===i){var _=h.inst,D=_.destroy;if(D!==void 0){_.destroy=void 0,y=a;var G=u,ae=D;try{ae()}catch(de){Dt(y,G,de)}}}h=h.next}while(h!==v)}}catch(de){Dt(a,a.return,de)}}function XT(i){var a=i.updateQueue;if(a!==null){var u=i.stateNode;try{Uv(a,u)}catch(h){Dt(i,i.return,h)}}}function WT(i,a,u){u.props=$a(i.type,i.memoizedProps),u.state=i.memoizedState;try{u.componentWillUnmount()}catch(h){Dt(i,a,h)}}function Qu(i,a){try{var u=i.ref;if(u!==null){switch(i.tag){case 26:case 27:case 5:var h=i.stateNode;break;case 30:h=i.stateNode;break;default:h=i.stateNode}typeof u=="function"?i.refCleanup=u(h):u.current=h}}catch(y){Dt(i,a,y)}}function wi(i,a){var u=i.ref,h=i.refCleanup;if(u!==null)if(typeof h=="function")try{h()}catch(y){Dt(i,a,y)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(y){Dt(i,a,y)}else u.current=null}function ZT(i){var a=i.type,u=i.memoizedProps,h=i.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":u.autoFocus&&h.focus();break e;case"img":u.src?h.src=u.src:u.srcSet&&(h.srcset=u.srcSet)}}catch(y){Dt(i,i.return,y)}}function F0(i,a,u){try{var h=i.stateNode;PI(h,i.type,u,a),h[Kt]=a}catch(y){Dt(i,i.return,y)}}function JT(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&Vs(i.type)||i.tag===4}function U0(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||JT(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&Vs(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function H0(i,a,u){var h=i.tag;if(h===5||h===6)i=i.stateNode,a?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(i,a):(a=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,a.appendChild(i),u=u._reactRootContainer,u!=null||a.onclick!==null||(a.onclick=Ki));else if(h!==4&&(h===27&&Vs(i.type)&&(u=i.stateNode,a=null),i=i.child,i!==null))for(H0(i,a,u),i=i.sibling;i!==null;)H0(i,a,u),i=i.sibling}function _d(i,a,u){var h=i.tag;if(h===5||h===6)i=i.stateNode,a?u.insertBefore(i,a):u.appendChild(i);else if(h!==4&&(h===27&&Vs(i.type)&&(u=i.stateNode),i=i.child,i!==null))for(_d(i,a,u),i=i.sibling;i!==null;)_d(i,a,u),i=i.sibling}function eS(i){var a=i.stateNode,u=i.memoizedProps;try{for(var h=i.type,y=a.attributes;y.length;)a.removeAttributeNode(y[0]);Un(a,h,u),a[Ft]=i,a[Kt]=u}catch(v){Dt(i,i.return,v)}}var ss=!1,bn=!1,z0=!1,tS=typeof WeakSet=="function"?WeakSet:Set,On=null;function pI(i,a){if(i=i.containerInfo,ug=Qd,i=hv(i),Lp(i)){if("selectionStart"in i)var u={start:i.selectionStart,end:i.selectionEnd};else e:{u=(u=i.ownerDocument)&&u.defaultView||window;var h=u.getSelection&&u.getSelection();if(h&&h.rangeCount!==0){u=h.anchorNode;var y=h.anchorOffset,v=h.focusNode;h=h.focusOffset;try{u.nodeType,v.nodeType}catch{u=null;break e}var _=0,D=-1,G=-1,ae=0,de=0,pe=i,le=null;t:for(;;){for(var ue;pe!==u||y!==0&&pe.nodeType!==3||(D=_+y),pe!==v||h!==0&&pe.nodeType!==3||(G=_+h),pe.nodeType===3&&(_+=pe.nodeValue.length),(ue=pe.firstChild)!==null;)le=pe,pe=ue;for(;;){if(pe===i)break t;if(le===u&&++ae===y&&(D=_),le===v&&++de===h&&(G=_),(ue=pe.nextSibling)!==null)break;pe=le,le=pe.parentNode}pe=ue}u=D===-1||G===-1?null:{start:D,end:G}}else u=null}u=u||{start:0,end:0}}else u=null;for(cg={focusedElem:i,selectionRange:u},Qd=!1,On=a;On!==null;)if(a=On,i=a.child,(a.subtreeFlags&1028)!==0&&i!==null)i.return=a,On=i;else for(;On!==null;){switch(a=On,v=a.alternate,i=a.flags,a.tag){case 0:if((i&4)!==0&&(i=a.updateQueue,i=i!==null?i.events:null,i!==null))for(u=0;u<i.length;u++)y=i[u],y.ref.impl=y.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&v!==null){i=void 0,u=a,y=v.memoizedProps,v=v.memoizedState,h=u.stateNode;try{var Re=$a(u.type,y);i=h.getSnapshotBeforeUpdate(Re,v),h.__reactInternalSnapshotBeforeUpdate=i}catch(Ve){Dt(u,u.return,Ve)}}break;case 3:if((i&1024)!==0){if(i=a.stateNode.containerInfo,u=i.nodeType,u===9)hg(i);else if(u===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":hg(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(r(163))}if(i=a.sibling,i!==null){i.return=a.return,On=i;break}On=a.return}}function nS(i,a,u){var h=u.flags;switch(u.tag){case 0:case 11:case 15:os(i,u),h&4&&Gu(5,u);break;case 1:if(os(i,u),h&4)if(i=u.stateNode,a===null)try{i.componentDidMount()}catch(_){Dt(u,u.return,_)}else{var y=$a(u.type,a.memoizedProps);a=a.memoizedState;try{i.componentDidUpdate(y,a,i.__reactInternalSnapshotBeforeUpdate)}catch(_){Dt(u,u.return,_)}}h&64&&XT(u),h&512&&Qu(u,u.return);break;case 3:if(os(i,u),h&64&&(i=u.updateQueue,i!==null)){if(a=null,u.child!==null)switch(u.child.tag){case 27:case 5:a=u.child.stateNode;break;case 1:a=u.child.stateNode}try{Uv(i,a)}catch(_){Dt(u,u.return,_)}}break;case 27:a===null&&h&4&&eS(u);case 26:case 5:os(i,u),a===null&&h&4&&ZT(u),h&512&&Qu(u,u.return);break;case 12:os(i,u);break;case 31:os(i,u),h&4&&sS(i,u);break;case 13:os(i,u),h&4&&aS(i,u),h&64&&(i=u.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(u=wI.bind(null,u),qI(i,u))));break;case 22:if(h=u.memoizedState!==null||ss,!h){a=a!==null&&a.memoizedState!==null||bn,y=ss;var v=bn;ss=h,(bn=a)&&!v?ls(i,u,(u.subtreeFlags&8772)!==0):os(i,u),ss=y,bn=v}break;case 30:break;default:os(i,u)}}function rS(i){var a=i.alternate;a!==null&&(i.alternate=null,rS(a)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(a=i.stateNode,a!==null&&yp(a)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var Xt=null,mr=!1;function as(i,a,u){for(u=u.child;u!==null;)iS(i,a,u),u=u.sibling}function iS(i,a,u){if(Gt&&typeof Gt.onCommitFiberUnmount=="function")try{Gt.onCommitFiberUnmount(nn,u)}catch{}switch(u.tag){case 26:bn||wi(u,a),as(i,a,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:bn||wi(u,a);var h=Xt,y=mr;Vs(u.type)&&(Xt=u.stateNode,mr=!1),as(i,a,u),rc(u.stateNode),Xt=h,mr=y;break;case 5:bn||wi(u,a);case 6:if(h=Xt,y=mr,Xt=null,as(i,a,u),Xt=h,mr=y,Xt!==null)if(mr)try{(Xt.nodeType===9?Xt.body:Xt.nodeName==="HTML"?Xt.ownerDocument.body:Xt).removeChild(u.stateNode)}catch(v){Dt(u,a,v)}else try{Xt.removeChild(u.stateNode)}catch(v){Dt(u,a,v)}break;case 18:Xt!==null&&(mr?(i=Xt,XS(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,u.stateNode),yl(i)):XS(Xt,u.stateNode));break;case 4:h=Xt,y=mr,Xt=u.stateNode.containerInfo,mr=!0,as(i,a,u),Xt=h,mr=y;break;case 0:case 11:case 14:case 15:Ps(2,u,a),bn||Ps(4,u,a),as(i,a,u);break;case 1:bn||(wi(u,a),h=u.stateNode,typeof h.componentWillUnmount=="function"&&WT(u,a,h)),as(i,a,u);break;case 21:as(i,a,u);break;case 22:bn=(h=bn)||u.memoizedState!==null,as(i,a,u),bn=h;break;default:as(i,a,u)}}function sS(i,a){if(a.memoizedState===null&&(i=a.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{yl(i)}catch(u){Dt(a,a.return,u)}}}function aS(i,a){if(a.memoizedState===null&&(i=a.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{yl(i)}catch(u){Dt(a,a.return,u)}}function gI(i){switch(i.tag){case 31:case 13:case 19:var a=i.stateNode;return a===null&&(a=i.stateNode=new tS),a;case 22:return i=i.stateNode,a=i._retryCache,a===null&&(a=i._retryCache=new tS),a;default:throw Error(r(435,i.tag))}}function kd(i,a){var u=gI(i);a.forEach(function(h){if(!u.has(h)){u.add(h);var y=CI.bind(null,i,h);h.then(y,y)}})}function pr(i,a){var u=a.deletions;if(u!==null)for(var h=0;h<u.length;h++){var y=u[h],v=i,_=a,D=_;e:for(;D!==null;){switch(D.tag){case 27:if(Vs(D.type)){Xt=D.stateNode,mr=!1;break e}break;case 5:Xt=D.stateNode,mr=!1;break e;case 3:case 4:Xt=D.stateNode.containerInfo,mr=!0;break e}D=D.return}if(Xt===null)throw Error(r(160));iS(v,_,y),Xt=null,mr=!1,v=y.alternate,v!==null&&(v.return=null),y.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)oS(a,i),a=a.sibling}var oi=null;function oS(i,a){var u=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:pr(a,i),gr(i),h&4&&(Ps(3,i,i.return),Gu(3,i),Ps(5,i,i.return));break;case 1:pr(a,i),gr(i),h&512&&(bn||u===null||wi(u,u.return)),h&64&&ss&&(i=i.updateQueue,i!==null&&(h=i.callbacks,h!==null&&(u=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=u===null?h:u.concat(h))));break;case 26:var y=oi;if(pr(a,i),gr(i),h&512&&(bn||u===null||wi(u,u.return)),h&4){var v=u!==null?u.memoizedState:null;if(h=i.memoizedState,u===null)if(h===null)if(i.stateNode===null){e:{h=i.type,u=i.memoizedProps,y=y.ownerDocument||y;t:switch(h){case"title":v=y.getElementsByTagName("title")[0],(!v||v[vu]||v[Ft]||v.namespaceURI==="http://www.w3.org/2000/svg"||v.hasAttribute("itemprop"))&&(v=y.createElement(h),y.head.insertBefore(v,y.querySelector("head > title"))),Un(v,h,u),v[Ft]=i,Dn(v),h=v;break e;case"link":var _=o2("link","href",y).get(h+(u.href||""));if(_){for(var D=0;D<_.length;D++)if(v=_[D],v.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&v.getAttribute("rel")===(u.rel==null?null:u.rel)&&v.getAttribute("title")===(u.title==null?null:u.title)&&v.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){_.splice(D,1);break t}}v=y.createElement(h),Un(v,h,u),y.head.appendChild(v);break;case"meta":if(_=o2("meta","content",y).get(h+(u.content||""))){for(D=0;D<_.length;D++)if(v=_[D],v.getAttribute("content")===(u.content==null?null:""+u.content)&&v.getAttribute("name")===(u.name==null?null:u.name)&&v.getAttribute("property")===(u.property==null?null:u.property)&&v.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&v.getAttribute("charset")===(u.charSet==null?null:u.charSet)){_.splice(D,1);break t}}v=y.createElement(h),Un(v,h,u),y.head.appendChild(v);break;default:throw Error(r(468,h))}v[Ft]=i,Dn(v),h=v}i.stateNode=h}else l2(y,i.type,i.stateNode);else i.stateNode=a2(y,h,i.memoizedProps);else v!==h?(v===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):v.count--,h===null?l2(y,i.type,i.stateNode):a2(y,h,i.memoizedProps)):h===null&&i.stateNode!==null&&F0(i,i.memoizedProps,u.memoizedProps)}break;case 27:pr(a,i),gr(i),h&512&&(bn||u===null||wi(u,u.return)),u!==null&&h&4&&F0(i,i.memoizedProps,u.memoizedProps);break;case 5:if(pr(a,i),gr(i),h&512&&(bn||u===null||wi(u,u.return)),i.flags&32){y=i.stateNode;try{Ho(y,"")}catch(Re){Dt(i,i.return,Re)}}h&4&&i.stateNode!=null&&(y=i.memoizedProps,F0(i,y,u!==null?u.memoizedProps:y)),h&1024&&(z0=!0);break;case 6:if(pr(a,i),gr(i),h&4){if(i.stateNode===null)throw Error(r(162));h=i.memoizedProps,u=i.stateNode;try{u.nodeValue=h}catch(Re){Dt(i,i.return,Re)}}break;case 3:if(qd=null,y=oi,oi=zd(a.containerInfo),pr(a,i),oi=y,gr(i),h&4&&u!==null&&u.memoizedState.isDehydrated)try{yl(a.containerInfo)}catch(Re){Dt(i,i.return,Re)}z0&&(z0=!1,lS(i));break;case 4:h=oi,oi=zd(i.stateNode.containerInfo),pr(a,i),gr(i),oi=h;break;case 12:pr(a,i),gr(i);break;case 31:pr(a,i),gr(i),h&4&&(h=i.updateQueue,h!==null&&(i.updateQueue=null,kd(i,h)));break;case 13:pr(a,i),gr(i),i.child.flags&8192&&i.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(Rd=Yt()),h&4&&(h=i.updateQueue,h!==null&&(i.updateQueue=null,kd(i,h)));break;case 22:y=i.memoizedState!==null;var G=u!==null&&u.memoizedState!==null,ae=ss,de=bn;if(ss=ae||y,bn=de||G,pr(a,i),bn=de,ss=ae,gr(i),h&8192)e:for(a=i.stateNode,a._visibility=y?a._visibility&-2:a._visibility|1,y&&(u===null||G||ss||bn||Ya(i)),u=null,a=i;;){if(a.tag===5||a.tag===26){if(u===null){G=u=a;try{if(v=G.stateNode,y)_=v.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{D=G.stateNode;var pe=G.memoizedProps.style,le=pe!=null&&pe.hasOwnProperty("display")?pe.display:null;D.style.display=le==null||typeof le=="boolean"?"":(""+le).trim()}}catch(Re){Dt(G,G.return,Re)}}}else if(a.tag===6){if(u===null){G=a;try{G.stateNode.nodeValue=y?"":G.memoizedProps}catch(Re){Dt(G,G.return,Re)}}}else if(a.tag===18){if(u===null){G=a;try{var ue=G.stateNode;y?WS(ue,!0):WS(G.stateNode,!1)}catch(Re){Dt(G,G.return,Re)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===i)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===i)break e;for(;a.sibling===null;){if(a.return===null||a.return===i)break e;u===a&&(u=null),a=a.return}u===a&&(u=null),a.sibling.return=a.return,a=a.sibling}h&4&&(h=i.updateQueue,h!==null&&(u=h.retryQueue,u!==null&&(h.retryQueue=null,kd(i,u))));break;case 19:pr(a,i),gr(i),h&4&&(h=i.updateQueue,h!==null&&(i.updateQueue=null,kd(i,h)));break;case 30:break;case 21:break;default:pr(a,i),gr(i)}}function gr(i){var a=i.flags;if(a&2){try{for(var u,h=i.return;h!==null;){if(JT(h)){u=h;break}h=h.return}if(u==null)throw Error(r(160));switch(u.tag){case 27:var y=u.stateNode,v=U0(i);_d(i,v,y);break;case 5:var _=u.stateNode;u.flags&32&&(Ho(_,""),u.flags&=-33);var D=U0(i);_d(i,D,_);break;case 3:case 4:var G=u.stateNode.containerInfo,ae=U0(i);H0(i,ae,G);break;default:throw Error(r(161))}}catch(de){Dt(i,i.return,de)}i.flags&=-3}a&4096&&(i.flags&=-4097)}function lS(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var a=i;lS(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),i=i.sibling}}function os(i,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)nS(i,a.alternate,a),a=a.sibling}function Ya(i){for(i=i.child;i!==null;){var a=i;switch(a.tag){case 0:case 11:case 14:case 15:Ps(4,a,a.return),Ya(a);break;case 1:wi(a,a.return);var u=a.stateNode;typeof u.componentWillUnmount=="function"&&WT(a,a.return,u),Ya(a);break;case 27:rc(a.stateNode);case 26:case 5:wi(a,a.return),Ya(a);break;case 22:a.memoizedState===null&&Ya(a);break;case 30:Ya(a);break;default:Ya(a)}i=i.sibling}}function ls(i,a,u){for(u=u&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var h=a.alternate,y=i,v=a,_=v.flags;switch(v.tag){case 0:case 11:case 15:ls(y,v,u),Gu(4,v);break;case 1:if(ls(y,v,u),h=v,y=h.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(ae){Dt(h,h.return,ae)}if(h=v,y=h.updateQueue,y!==null){var D=h.stateNode;try{var G=y.shared.hiddenCallbacks;if(G!==null)for(y.shared.hiddenCallbacks=null,y=0;y<G.length;y++)Fv(G[y],D)}catch(ae){Dt(h,h.return,ae)}}u&&_&64&&XT(v),Qu(v,v.return);break;case 27:eS(v);case 26:case 5:ls(y,v,u),u&&h===null&&_&4&&ZT(v),Qu(v,v.return);break;case 12:ls(y,v,u);break;case 31:ls(y,v,u),u&&_&4&&sS(y,v);break;case 13:ls(y,v,u),u&&_&4&&aS(y,v);break;case 22:v.memoizedState===null&&ls(y,v,u),Qu(v,v.return);break;case 30:break;default:ls(y,v,u)}a=a.sibling}}function V0(i,a){var u=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==u&&(i!=null&&i.refCount++,u!=null&&Iu(u))}function q0(i,a){i=null,a.alternate!==null&&(i=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==i&&(a.refCount++,i!=null&&Iu(i))}function li(i,a,u,h){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)uS(i,a,u,h),a=a.sibling}function uS(i,a,u,h){var y=a.flags;switch(a.tag){case 0:case 11:case 15:li(i,a,u,h),y&2048&&Gu(9,a);break;case 1:li(i,a,u,h);break;case 3:li(i,a,u,h),y&2048&&(i=null,a.alternate!==null&&(i=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==i&&(a.refCount++,i!=null&&Iu(i)));break;case 12:if(y&2048){li(i,a,u,h),i=a.stateNode;try{var v=a.memoizedProps,_=v.id,D=v.onPostCommit;typeof D=="function"&&D(_,a.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(G){Dt(a,a.return,G)}}else li(i,a,u,h);break;case 31:li(i,a,u,h);break;case 13:li(i,a,u,h);break;case 23:break;case 22:v=a.stateNode,_=a.alternate,a.memoizedState!==null?v._visibility&2?li(i,a,u,h):Ku(i,a):v._visibility&2?li(i,a,u,h):(v._visibility|=2,ol(i,a,u,h,(a.subtreeFlags&10256)!==0||!1)),y&2048&&V0(_,a);break;case 24:li(i,a,u,h),y&2048&&q0(a.alternate,a);break;default:li(i,a,u,h)}}function ol(i,a,u,h,y){for(y=y&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var v=i,_=a,D=u,G=h,ae=_.flags;switch(_.tag){case 0:case 11:case 15:ol(v,_,D,G,y),Gu(8,_);break;case 23:break;case 22:var de=_.stateNode;_.memoizedState!==null?de._visibility&2?ol(v,_,D,G,y):Ku(v,_):(de._visibility|=2,ol(v,_,D,G,y)),y&&ae&2048&&V0(_.alternate,_);break;case 24:ol(v,_,D,G,y),y&&ae&2048&&q0(_.alternate,_);break;default:ol(v,_,D,G,y)}a=a.sibling}}function Ku(i,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var u=i,h=a,y=h.flags;switch(h.tag){case 22:Ku(u,h),y&2048&&V0(h.alternate,h);break;case 24:Ku(u,h),y&2048&&q0(h.alternate,h);break;default:Ku(u,h)}a=a.sibling}}var Xu=8192;function ll(i,a,u){if(i.subtreeFlags&Xu)for(i=i.child;i!==null;)cS(i,a,u),i=i.sibling}function cS(i,a,u){switch(i.tag){case 26:ll(i,a,u),i.flags&Xu&&i.memoizedState!==null&&nL(u,oi,i.memoizedState,i.memoizedProps);break;case 5:ll(i,a,u);break;case 3:case 4:var h=oi;oi=zd(i.stateNode.containerInfo),ll(i,a,u),oi=h;break;case 22:i.memoizedState===null&&(h=i.alternate,h!==null&&h.memoizedState!==null?(h=Xu,Xu=16777216,ll(i,a,u),Xu=h):ll(i,a,u));break;default:ll(i,a,u)}}function fS(i){var a=i.alternate;if(a!==null&&(i=a.child,i!==null)){a.child=null;do a=i.sibling,i.sibling=null,i=a;while(i!==null)}}function Wu(i){var a=i.deletions;if((i.flags&16)!==0){if(a!==null)for(var u=0;u<a.length;u++){var h=a[u];On=h,hS(h,i)}fS(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)dS(i),i=i.sibling}function dS(i){switch(i.tag){case 0:case 11:case 15:Wu(i),i.flags&2048&&Ps(9,i,i.return);break;case 3:Wu(i);break;case 12:Wu(i);break;case 22:var a=i.stateNode;i.memoizedState!==null&&a._visibility&2&&(i.return===null||i.return.tag!==13)?(a._visibility&=-3,Nd(i)):Wu(i);break;default:Wu(i)}}function Nd(i){var a=i.deletions;if((i.flags&16)!==0){if(a!==null)for(var u=0;u<a.length;u++){var h=a[u];On=h,hS(h,i)}fS(i)}for(i=i.child;i!==null;){switch(a=i,a.tag){case 0:case 11:case 15:Ps(8,a,a.return),Nd(a);break;case 22:u=a.stateNode,u._visibility&2&&(u._visibility&=-3,Nd(a));break;default:Nd(a)}i=i.sibling}}function hS(i,a){for(;On!==null;){var u=On;switch(u.tag){case 0:case 11:case 15:Ps(8,u,a);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var h=u.memoizedState.cachePool.pool;h!=null&&h.refCount++}break;case 24:Iu(u.memoizedState.cache)}if(h=u.child,h!==null)h.return=u,On=h;else e:for(u=i;On!==null;){h=On;var y=h.sibling,v=h.return;if(rS(h),h===u){On=null;break e}if(y!==null){y.return=v,On=y;break e}On=v}}}var bI={getCacheForType:function(i){var a=Bn(mn),u=a.data.get(i);return u===void 0&&(u=i(),a.data.set(i,u)),u},cacheSignal:function(){return Bn(mn).controller.signal}},yI=typeof WeakMap=="function"?WeakMap:Map,_t=0,Pt=null,ft=null,mt=0,Rt=0,Dr=null,js=!1,ul=!1,$0=!1,us=0,sn=0,Bs=0,Ga=0,Y0=0,Or=0,cl=0,Zu=null,br=null,G0=!1,Rd=0,mS=0,Dd=1/0,Od=null,Fs=null,Cn=0,Us=null,fl=null,cs=0,Q0=0,K0=null,pS=null,Ju=0,X0=null;function Mr(){return(_t&2)!==0&&mt!==0?mt&-mt:O.T!==null?ng():Bt()}function gS(){if(Or===0)if((mt&536870912)===0||yt){var i=Ge;Ge<<=1,(Ge&3932160)===0&&(Ge=262144),Or=i}else Or=536870912;return i=Nr.current,i!==null&&(i.flags|=32),Or}function yr(i,a,u){(i===Pt&&(Rt===2||Rt===9)||i.cancelPendingCommit!==null)&&(dl(i,0),Hs(i,mt,Or,!1)),Vn(i,u),((_t&2)===0||i!==Pt)&&(i===Pt&&((_t&2)===0&&(Ga|=u),sn===4&&Hs(i,mt,Or,!1)),Ci(i))}function bS(i,a,u){if((_t&6)!==0)throw Error(r(327));var h=!u&&(a&127)===0&&(a&i.expiredLanes)===0||Qt(i,a),y=h?vI(i,a):Z0(i,a,!0),v=h;do{if(y===0){ul&&!h&&Hs(i,a,0,!1);break}else{if(u=i.current.alternate,v&&!xI(u)){y=Z0(i,a,!1),v=!1;continue}if(y===2){if(v=a,i.errorRecoveryDisabledLanes&v)var _=0;else _=i.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){a=_;e:{var D=i;y=Zu;var G=D.current.memoizedState.isDehydrated;if(G&&(dl(D,_).flags|=256),_=Z0(D,_,!1),_!==2){if($0&&!G){D.errorRecoveryDisabledLanes|=v,Ga|=v,y=4;break e}v=br,br=y,v!==null&&(br===null?br=v:br.push.apply(br,v))}y=_}if(v=!1,y!==2)continue}}if(y===1){dl(i,0),Hs(i,a,0,!0);break}e:{switch(h=i,v=y,v){case 0:case 1:throw Error(r(345));case 4:if((a&4194048)!==a)break;case 6:Hs(h,a,Or,!js);break e;case 2:br=null;break;case 3:case 5:break;default:throw Error(r(329))}if((a&62914560)===a&&(y=Rd+300-Yt(),10<y)){if(Hs(h,a,Or,!js),cn(h,0,!0)!==0)break e;cs=a,h.timeoutHandle=QS(yS.bind(null,h,u,br,Od,G0,a,Or,Ga,cl,js,v,"Throttled",-0,0),y);break e}yS(h,u,br,Od,G0,a,Or,Ga,cl,js,v,null,-0,0)}}break}while(!0);Ci(i)}function yS(i,a,u,h,y,v,_,D,G,ae,de,pe,le,ue){if(i.timeoutHandle=-1,pe=a.subtreeFlags,pe&8192||(pe&16785408)===16785408){pe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ki},cS(a,v,pe);var Re=(v&62914560)===v?Rd-Yt():(v&4194048)===v?mS-Yt():0;if(Re=rL(pe,Re),Re!==null){cs=v,i.cancelPendingCommit=Re(AS.bind(null,i,a,v,u,h,y,_,D,G,de,pe,null,le,ue)),Hs(i,v,_,!ae);return}}AS(i,a,v,u,h,y,_,D,G)}function xI(i){for(var a=i;;){var u=a.tag;if((u===0||u===11||u===15)&&a.flags&16384&&(u=a.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var h=0;h<u.length;h++){var y=u[h],v=y.getSnapshot;y=y.value;try{if(!_r(v(),y))return!1}catch{return!1}}if(u=a.child,a.subtreeFlags&16384&&u!==null)u.return=a,a=u;else{if(a===i)break;for(;a.sibling===null;){if(a.return===null||a.return===i)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Hs(i,a,u,h){a&=~Y0,a&=~Ga,i.suspendedLanes|=a,i.pingedLanes&=~a,h&&(i.warmLanes|=a),h=i.expirationTimes;for(var y=a;0<y;){var v=31-vt(y),_=1<<v;h[v]=-1,y&=~_}u!==0&&Gi(i,u,a)}function Md(){return(_t&6)===0?(ec(0),!1):!0}function W0(){if(ft!==null){if(Rt===0)var i=ft.return;else i=ft,Ji=Ba=null,h0(i),nl=null,Pu=0,i=ft;for(;i!==null;)KT(i.alternate,i),i=i.return;ft=null}}function dl(i,a){var u=i.timeoutHandle;u!==-1&&(i.timeoutHandle=-1,FI(u)),u=i.cancelPendingCommit,u!==null&&(i.cancelPendingCommit=null,u()),cs=0,W0(),Pt=i,ft=u=Wi(i.current,null),mt=a,Rt=0,Dr=null,js=!1,ul=Qt(i,a),$0=!1,cl=Or=Y0=Ga=Bs=sn=0,br=Zu=null,G0=!1,(a&8)!==0&&(a|=a&32);var h=i.entangledLanes;if(h!==0)for(i=i.entanglements,h&=a;0<h;){var y=31-vt(h),v=1<<y;a|=i[y],h&=~v}return us=a,ed(),u}function xS(i,a){Je=null,O.H=qu,a===tl||a===ld?(a=Lv(),Rt=3):a===t0?(a=Lv(),Rt=4):Rt=a===N0?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,Dr=a,ft===null&&(sn=1,Td(i,Vr(a,i.current)))}function ES(){var i=Nr.current;return i===null?!0:(mt&4194048)===mt?Gr===null:(mt&62914560)===mt||(mt&536870912)!==0?i===Gr:!1}function vS(){var i=O.H;return O.H=qu,i===null?qu:i}function TS(){var i=O.A;return O.A=bI,i}function Id(){sn=4,js||(mt&4194048)!==mt&&Nr.current!==null||(ul=!0),(Bs&134217727)===0&&(Ga&134217727)===0||Pt===null||Hs(Pt,mt,Or,!1)}function Z0(i,a,u){var h=_t;_t|=2;var y=vS(),v=TS();(Pt!==i||mt!==a)&&(Od=null,dl(i,a)),a=!1;var _=sn;e:do try{if(Rt!==0&&ft!==null){var D=ft,G=Dr;switch(Rt){case 8:W0(),_=6;break e;case 3:case 2:case 9:case 6:Nr.current===null&&(a=!0);var ae=Rt;if(Rt=0,Dr=null,hl(i,D,G,ae),u&&ul){_=0;break e}break;default:ae=Rt,Rt=0,Dr=null,hl(i,D,G,ae)}}EI(),_=sn;break}catch(de){xS(i,de)}while(!0);return a&&i.shellSuspendCounter++,Ji=Ba=null,_t=h,O.H=y,O.A=v,ft===null&&(Pt=null,mt=0,ed()),_}function EI(){for(;ft!==null;)SS(ft)}function vI(i,a){var u=_t;_t|=2;var h=vS(),y=TS();Pt!==i||mt!==a?(Od=null,Dd=Yt()+500,dl(i,a)):ul=Qt(i,a);e:do try{if(Rt!==0&&ft!==null){a=ft;var v=Dr;t:switch(Rt){case 1:Rt=0,Dr=null,hl(i,a,v,1);break;case 2:case 9:if(Mv(v)){Rt=0,Dr=null,wS(a);break}a=function(){Rt!==2&&Rt!==9||Pt!==i||(Rt=7),Ci(i)},v.then(a,a);break e;case 3:Rt=7;break e;case 4:Rt=5;break e;case 7:Mv(v)?(Rt=0,Dr=null,wS(a)):(Rt=0,Dr=null,hl(i,a,v,7));break;case 5:var _=null;switch(ft.tag){case 26:_=ft.memoizedState;case 5:case 27:var D=ft;if(_?u2(_):D.stateNode.complete){Rt=0,Dr=null;var G=D.sibling;if(G!==null)ft=G;else{var ae=D.return;ae!==null?(ft=ae,Ld(ae)):ft=null}break t}}Rt=0,Dr=null,hl(i,a,v,5);break;case 6:Rt=0,Dr=null,hl(i,a,v,6);break;case 8:W0(),sn=6;break e;default:throw Error(r(462))}}TI();break}catch(de){xS(i,de)}while(!0);return Ji=Ba=null,O.H=h,O.A=y,_t=u,ft!==null?0:(Pt=null,mt=0,ed(),sn)}function TI(){for(;ft!==null&&!Fr();)SS(ft)}function SS(i){var a=GT(i.alternate,i,us);i.memoizedProps=i.pendingProps,a===null?Ld(i):ft=a}function wS(i){var a=i,u=a.alternate;switch(a.tag){case 15:case 0:a=HT(u,a,a.pendingProps,a.type,void 0,mt);break;case 11:a=HT(u,a,a.pendingProps,a.type.render,a.ref,mt);break;case 5:h0(a);default:KT(u,a),a=ft=Tv(a,us),a=GT(u,a,us)}i.memoizedProps=i.pendingProps,a===null?Ld(i):ft=a}function hl(i,a,u,h){Ji=Ba=null,h0(a),nl=null,Pu=0;var y=a.return;try{if(cI(i,y,a,u,mt)){sn=1,Td(i,Vr(u,i.current)),ft=null;return}}catch(v){if(y!==null)throw ft=y,v;sn=1,Td(i,Vr(u,i.current)),ft=null;return}a.flags&32768?(yt||h===1?i=!0:ul||(mt&536870912)!==0?i=!1:(js=i=!0,(h===2||h===9||h===3||h===6)&&(h=Nr.current,h!==null&&h.tag===13&&(h.flags|=16384))),CS(a,i)):Ld(a)}function Ld(i){var a=i;do{if((a.flags&32768)!==0){CS(a,js);return}i=a.return;var u=hI(a.alternate,a,us);if(u!==null){ft=u;return}if(a=a.sibling,a!==null){ft=a;return}ft=a=i}while(a!==null);sn===0&&(sn=5)}function CS(i,a){do{var u=mI(i.alternate,i);if(u!==null){u.flags&=32767,ft=u;return}if(u=i.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!a&&(i=i.sibling,i!==null)){ft=i;return}ft=i=u}while(i!==null);sn=6,ft=null}function AS(i,a,u,h,y,v,_,D,G){i.cancelPendingCommit=null;do Pd();while(Cn!==0);if((_t&6)!==0)throw Error(r(327));if(a!==null){if(a===i.current)throw Error(r(177));if(v=a.lanes|a.childLanes,v|=Up,Jn(i,u,v,_,D,G),i===Pt&&(ft=Pt=null,mt=0),fl=a,Us=i,cs=u,Q0=v,K0=y,pS=h,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,AI(Pe,function(){return DS(),null})):(i.callbackNode=null,i.callbackPriority=0),h=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||h){h=O.T,O.T=null,y=H.p,H.p=2,_=_t,_t|=4;try{pI(i,a,u)}finally{_t=_,H.p=y,O.T=h}}Cn=1,_S(),kS(),NS()}}function _S(){if(Cn===1){Cn=0;var i=Us,a=fl,u=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||u){u=O.T,O.T=null;var h=H.p;H.p=2;var y=_t;_t|=4;try{oS(a,i);var v=cg,_=hv(i.containerInfo),D=v.focusedElem,G=v.selectionRange;if(_!==D&&D&&D.ownerDocument&&dv(D.ownerDocument.documentElement,D)){if(G!==null&&Lp(D)){var ae=G.start,de=G.end;if(de===void 0&&(de=ae),"selectionStart"in D)D.selectionStart=ae,D.selectionEnd=Math.min(de,D.value.length);else{var pe=D.ownerDocument||document,le=pe&&pe.defaultView||window;if(le.getSelection){var ue=le.getSelection(),Re=D.textContent.length,Ve=Math.min(G.start,Re),It=G.end===void 0?Ve:Math.min(G.end,Re);!ue.extend&&Ve>It&&(_=It,It=Ve,Ve=_);var Z=fv(D,Ve),X=fv(D,It);if(Z&&X&&(ue.rangeCount!==1||ue.anchorNode!==Z.node||ue.anchorOffset!==Z.offset||ue.focusNode!==X.node||ue.focusOffset!==X.offset)){var se=pe.createRange();se.setStart(Z.node,Z.offset),ue.removeAllRanges(),Ve>It?(ue.addRange(se),ue.extend(X.node,X.offset)):(se.setEnd(X.node,X.offset),ue.addRange(se))}}}}for(pe=[],ue=D;ue=ue.parentNode;)ue.nodeType===1&&pe.push({element:ue,left:ue.scrollLeft,top:ue.scrollTop});for(typeof D.focus=="function"&&D.focus(),D=0;D<pe.length;D++){var me=pe[D];me.element.scrollLeft=me.left,me.element.scrollTop=me.top}}Qd=!!ug,cg=ug=null}finally{_t=y,H.p=h,O.T=u}}i.current=a,Cn=2}}function kS(){if(Cn===2){Cn=0;var i=Us,a=fl,u=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||u){u=O.T,O.T=null;var h=H.p;H.p=2;var y=_t;_t|=4;try{nS(i,a.alternate,a)}finally{_t=y,H.p=h,O.T=u}}Cn=3}}function NS(){if(Cn===4||Cn===3){Cn=0,Zn();var i=Us,a=fl,u=cs,h=pS;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?Cn=5:(Cn=0,fl=Us=null,RS(i,i.pendingLanes));var y=i.pendingLanes;if(y===0&&(Fs=null),st(u),a=a.stateNode,Gt&&typeof Gt.onCommitFiberRoot=="function")try{Gt.onCommitFiberRoot(nn,a,void 0,(a.current.flags&128)===128)}catch{}if(h!==null){a=O.T,y=H.p,H.p=2,O.T=null;try{for(var v=i.onRecoverableError,_=0;_<h.length;_++){var D=h[_];v(D.value,{componentStack:D.stack})}}finally{O.T=a,H.p=y}}(cs&3)!==0&&Pd(),Ci(i),y=i.pendingLanes,(u&261930)!==0&&(y&42)!==0?i===X0?Ju++:(Ju=0,X0=i):Ju=0,ec(0)}}function RS(i,a){(i.pooledCacheLanes&=a)===0&&(a=i.pooledCache,a!=null&&(i.pooledCache=null,Iu(a)))}function Pd(){return _S(),kS(),NS(),DS()}function DS(){if(Cn!==5)return!1;var i=Us,a=Q0;Q0=0;var u=st(cs),h=O.T,y=H.p;try{H.p=32>u?32:u,O.T=null,u=K0,K0=null;var v=Us,_=cs;if(Cn=0,fl=Us=null,cs=0,(_t&6)!==0)throw Error(r(331));var D=_t;if(_t|=4,dS(v.current),uS(v,v.current,_,u),_t=D,ec(0,!1),Gt&&typeof Gt.onPostCommitFiberRoot=="function")try{Gt.onPostCommitFiberRoot(nn,v)}catch{}return!0}finally{H.p=y,O.T=h,RS(i,a)}}function OS(i,a,u){a=Vr(u,a),a=k0(i.stateNode,a,2),i=Ms(i,a,2),i!==null&&(Vn(i,2),Ci(i))}function Dt(i,a,u){if(i.tag===3)OS(i,i,u);else for(;a!==null;){if(a.tag===3){OS(a,i,u);break}else if(a.tag===1){var h=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Fs===null||!Fs.has(h))){i=Vr(u,i),u=MT(2),h=Ms(a,u,2),h!==null&&(IT(u,h,a,i),Vn(h,2),Ci(h));break}}a=a.return}}function J0(i,a,u){var h=i.pingCache;if(h===null){h=i.pingCache=new yI;var y=new Set;h.set(a,y)}else y=h.get(a),y===void 0&&(y=new Set,h.set(a,y));y.has(u)||($0=!0,y.add(u),i=SI.bind(null,i,a,u),a.then(i,i))}function SI(i,a,u){var h=i.pingCache;h!==null&&h.delete(a),i.pingedLanes|=i.suspendedLanes&u,i.warmLanes&=~u,Pt===i&&(mt&u)===u&&(sn===4||sn===3&&(mt&62914560)===mt&&300>Yt()-Rd?(_t&2)===0&&dl(i,0):Y0|=u,cl===mt&&(cl=0)),Ci(i)}function MS(i,a){a===0&&(a=zn()),i=La(i,a),i!==null&&(Vn(i,a),Ci(i))}function wI(i){var a=i.memoizedState,u=0;a!==null&&(u=a.retryLane),MS(i,u)}function CI(i,a){var u=0;switch(i.tag){case 31:case 13:var h=i.stateNode,y=i.memoizedState;y!==null&&(u=y.retryLane);break;case 19:h=i.stateNode;break;case 22:h=i.stateNode._retryCache;break;default:throw Error(r(314))}h!==null&&h.delete(a),MS(i,u)}function AI(i,a){return un(i,a)}var jd=null,ml=null,eg=!1,Bd=!1,tg=!1,zs=0;function Ci(i){i!==ml&&i.next===null&&(ml===null?jd=ml=i:ml=ml.next=i),Bd=!0,eg||(eg=!0,kI())}function ec(i,a){if(!tg&&Bd){tg=!0;do for(var u=!1,h=jd;h!==null;){if(i!==0){var y=h.pendingLanes;if(y===0)var v=0;else{var _=h.suspendedLanes,D=h.pingedLanes;v=(1<<31-vt(42|i)+1)-1,v&=y&~(_&~D),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(u=!0,jS(h,v))}else v=mt,v=cn(h,h===Pt?v:0,h.cancelPendingCommit!==null||h.timeoutHandle!==-1),(v&3)===0||Qt(h,v)||(u=!0,jS(h,v));h=h.next}while(u);tg=!1}}function _I(){IS()}function IS(){Bd=eg=!1;var i=0;zs!==0&&BI()&&(i=zs);for(var a=Yt(),u=null,h=jd;h!==null;){var y=h.next,v=LS(h,a);v===0?(h.next=null,u===null?jd=y:u.next=y,y===null&&(ml=u)):(u=h,(i!==0||(v&3)!==0)&&(Bd=!0)),h=y}Cn!==0&&Cn!==5||ec(i),zs!==0&&(zs=0)}function LS(i,a){for(var u=i.suspendedLanes,h=i.pingedLanes,y=i.expirationTimes,v=i.pendingLanes&-62914561;0<v;){var _=31-vt(v),D=1<<_,G=y[_];G===-1?((D&u)===0||(D&h)!==0)&&(y[_]=wr(D,a)):G<=a&&(i.expiredLanes|=D),v&=~D}if(a=Pt,u=mt,u=cn(i,i===a?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),h=i.callbackNode,u===0||i===a&&(Rt===2||Rt===9)||i.cancelPendingCommit!==null)return h!==null&&h!==null&&cr(h),i.callbackNode=null,i.callbackPriority=0;if((u&3)===0||Qt(i,u)){if(a=u&-u,a===i.callbackPriority)return a;switch(h!==null&&cr(h),st(u)){case 2:case 8:u=Te;break;case 32:u=Pe;break;case 268435456:u=bt;break;default:u=Pe}return h=PS.bind(null,i),u=un(u,h),i.callbackPriority=a,i.callbackNode=u,a}return h!==null&&h!==null&&cr(h),i.callbackPriority=2,i.callbackNode=null,2}function PS(i,a){if(Cn!==0&&Cn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var u=i.callbackNode;if(Pd()&&i.callbackNode!==u)return null;var h=mt;return h=cn(i,i===Pt?h:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),h===0?null:(bS(i,h,a),LS(i,Yt()),i.callbackNode!=null&&i.callbackNode===u?PS.bind(null,i):null)}function jS(i,a){if(Pd())return null;bS(i,a,!0)}function kI(){UI(function(){(_t&6)!==0?un(oe,_I):IS()})}function ng(){if(zs===0){var i=Jo;i===0&&(i=ut,ut<<=1,(ut&261888)===0&&(ut=256)),zs=i}return zs}function BS(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:Yf(""+i)}function FS(i,a){var u=a.ownerDocument.createElement("input");return u.name=a.name,u.value=a.value,i.id&&u.setAttribute("form",i.id),a.parentNode.insertBefore(u,a),i=new FormData(i),u.parentNode.removeChild(u),i}function NI(i,a,u,h,y){if(a==="submit"&&u&&u.stateNode===y){var v=BS((y[Kt]||null).action),_=h.submitter;_&&(a=(a=_[Kt]||null)?BS(a.formAction):_.getAttribute("formAction"),a!==null&&(v=a,_=null));var D=new Xf("action","action",null,h,y);i.push({event:D,listeners:[{instance:null,listener:function(){if(h.defaultPrevented){if(zs!==0){var G=_?FS(y,_):new FormData(y);T0(u,{pending:!0,data:G,method:y.method,action:v},null,G)}}else typeof v=="function"&&(D.preventDefault(),G=_?FS(y,_):new FormData(y),T0(u,{pending:!0,data:G,method:y.method,action:v},v,G))},currentTarget:y}]})}}for(var rg=0;rg<Fp.length;rg++){var ig=Fp[rg],RI=ig.toLowerCase(),DI=ig[0].toUpperCase()+ig.slice(1);ai(RI,"on"+DI)}ai(gv,"onAnimationEnd"),ai(bv,"onAnimationIteration"),ai(yv,"onAnimationStart"),ai("dblclick","onDoubleClick"),ai("focusin","onFocus"),ai("focusout","onBlur"),ai(G5,"onTransitionRun"),ai(Q5,"onTransitionStart"),ai(K5,"onTransitionCancel"),ai(xv,"onTransitionEnd"),Fo("onMouseEnter",["mouseout","mouseover"]),Fo("onMouseLeave",["mouseout","mouseover"]),Fo("onPointerEnter",["pointerout","pointerover"]),Fo("onPointerLeave",["pointerout","pointerover"]),Da("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Da("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Da("onBeforeInput",["compositionend","keypress","textInput","paste"]),Da("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Da("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Da("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var tc="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(" "),OI=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(tc));function US(i,a){a=(a&4)!==0;for(var u=0;u<i.length;u++){var h=i[u],y=h.event;h=h.listeners;e:{var v=void 0;if(a)for(var _=h.length-1;0<=_;_--){var D=h[_],G=D.instance,ae=D.currentTarget;if(D=D.listener,G!==v&&y.isPropagationStopped())break e;v=D,y.currentTarget=ae;try{v(y)}catch(de){Jf(de)}y.currentTarget=null,v=G}else for(_=0;_<h.length;_++){if(D=h[_],G=D.instance,ae=D.currentTarget,D=D.listener,G!==v&&y.isPropagationStopped())break e;v=D,y.currentTarget=ae;try{v(y)}catch(de){Jf(de)}y.currentTarget=null,v=G}}}}function dt(i,a){var u=a[bp];u===void 0&&(u=a[bp]=new Set);var h=i+"__bubble";u.has(h)||(HS(a,i,2,!1),u.add(h))}function sg(i,a,u){var h=0;a&&(h|=4),HS(u,i,h,a)}var Fd="_reactListening"+Math.random().toString(36).slice(2);function ag(i){if(!i[Fd]){i[Fd]=!0,IE.forEach(function(u){u!=="selectionchange"&&(OI.has(u)||sg(u,!1,i),sg(u,!0,i))});var a=i.nodeType===9?i:i.ownerDocument;a===null||a[Fd]||(a[Fd]=!0,sg("selectionchange",!1,a))}}function HS(i,a,u,h){switch(g2(a)){case 2:var y=aL;break;case 8:y=oL;break;default:y=vg}u=y.bind(null,a,u,i),y=void 0,!Ap||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(y=!0),h?y!==void 0?i.addEventListener(a,u,{capture:!0,passive:y}):i.addEventListener(a,u,!0):y!==void 0?i.addEventListener(a,u,{passive:y}):i.addEventListener(a,u,!1)}function og(i,a,u,h,y){var v=h;if((a&1)===0&&(a&2)===0&&h!==null)e:for(;;){if(h===null)return;var _=h.tag;if(_===3||_===4){var D=h.stateNode.containerInfo;if(D===y)break;if(_===4)for(_=h.return;_!==null;){var G=_.tag;if((G===3||G===4)&&_.stateNode.containerInfo===y)return;_=_.return}for(;D!==null;){if(_=Po(D),_===null)return;if(G=_.tag,G===5||G===6||G===26||G===27){h=v=_;continue e}D=D.parentNode}}h=h.return}YE(function(){var ae=v,de=wp(u),pe=[];e:{var le=Ev.get(i);if(le!==void 0){var ue=Xf,Re=i;switch(i){case"keypress":if(Qf(u)===0)break e;case"keydown":case"keyup":ue=C5;break;case"focusin":Re="focus",ue=Rp;break;case"focusout":Re="blur",ue=Rp;break;case"beforeblur":case"afterblur":ue=Rp;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ue=KE;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ue=h5;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ue=k5;break;case gv:case bv:case yv:ue=g5;break;case xv:ue=R5;break;case"scroll":case"scrollend":ue=f5;break;case"wheel":ue=O5;break;case"copy":case"cut":case"paste":ue=y5;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ue=WE;break;case"toggle":case"beforetoggle":ue=I5}var Ve=(a&4)!==0,It=!Ve&&(i==="scroll"||i==="scrollend"),Z=Ve?le!==null?le+"Capture":null:le;Ve=[];for(var X=ae,se;X!==null;){var me=X;if(se=me.stateNode,me=me.tag,me!==5&&me!==26&&me!==27||se===null||Z===null||(me=Su(X,Z),me!=null&&Ve.push(nc(X,me,se))),It)break;X=X.return}0<Ve.length&&(le=new ue(le,Re,null,u,de),pe.push({event:le,listeners:Ve}))}}if((a&7)===0){e:{if(le=i==="mouseover"||i==="pointerover",ue=i==="mouseout"||i==="pointerout",le&&u!==Sp&&(Re=u.relatedTarget||u.fromElement)&&(Po(Re)||Re[vi]))break e;if((ue||le)&&(le=de.window===de?de:(le=de.ownerDocument)?le.defaultView||le.parentWindow:window,ue?(Re=u.relatedTarget||u.toElement,ue=ae,Re=Re?Po(Re):null,Re!==null&&(It=o(Re),Ve=Re.tag,Re!==It||Ve!==5&&Ve!==27&&Ve!==6)&&(Re=null)):(ue=null,Re=ae),ue!==Re)){if(Ve=KE,me="onMouseLeave",Z="onMouseEnter",X="mouse",(i==="pointerout"||i==="pointerover")&&(Ve=WE,me="onPointerLeave",Z="onPointerEnter",X="pointer"),It=ue==null?le:Tu(ue),se=Re==null?le:Tu(Re),le=new Ve(me,X+"leave",ue,u,de),le.target=It,le.relatedTarget=se,me=null,Po(de)===ae&&(Ve=new Ve(Z,X+"enter",Re,u,de),Ve.target=se,Ve.relatedTarget=It,me=Ve),It=me,ue&&Re)t:{for(Ve=MI,Z=ue,X=Re,se=0,me=Z;me;me=Ve(me))se++;me=0;for(var Be=X;Be;Be=Ve(Be))me++;for(;0<se-me;)Z=Ve(Z),se--;for(;0<me-se;)X=Ve(X),me--;for(;se--;){if(Z===X||X!==null&&Z===X.alternate){Ve=Z;break t}Z=Ve(Z),X=Ve(X)}Ve=null}else Ve=null;ue!==null&&zS(pe,le,ue,Ve,!1),Re!==null&&It!==null&&zS(pe,It,Re,Ve,!0)}}e:{if(le=ae?Tu(ae):window,ue=le.nodeName&&le.nodeName.toLowerCase(),ue==="select"||ue==="input"&&le.type==="file")var Tt=sv;else if(rv(le))if(av)Tt=q5;else{Tt=z5;var Le=H5}else ue=le.nodeName,!ue||ue.toLowerCase()!=="input"||le.type!=="checkbox"&&le.type!=="radio"?ae&&Tp(ae.elementType)&&(Tt=sv):Tt=V5;if(Tt&&(Tt=Tt(i,ae))){iv(pe,Tt,u,de);break e}Le&&Le(i,le,ae),i==="focusout"&&ae&&le.type==="number"&&ae.memoizedProps.value!=null&&vp(le,"number",le.value)}switch(Le=ae?Tu(ae):window,i){case"focusin":(rv(Le)||Le.contentEditable==="true")&&($o=Le,Pp=ae,Du=null);break;case"focusout":Du=Pp=$o=null;break;case"mousedown":jp=!0;break;case"contextmenu":case"mouseup":case"dragend":jp=!1,mv(pe,u,de);break;case"selectionchange":if(Y5)break;case"keydown":case"keyup":mv(pe,u,de)}var nt;if(Op)e:{switch(i){case"compositionstart":var pt="onCompositionStart";break e;case"compositionend":pt="onCompositionEnd";break e;case"compositionupdate":pt="onCompositionUpdate";break e}pt=void 0}else qo?tv(i,u)&&(pt="onCompositionEnd"):i==="keydown"&&u.keyCode===229&&(pt="onCompositionStart");pt&&(ZE&&u.locale!=="ko"&&(qo||pt!=="onCompositionStart"?pt==="onCompositionEnd"&&qo&&(nt=GE()):(As=de,_p="value"in As?As.value:As.textContent,qo=!0)),Le=Ud(ae,pt),0<Le.length&&(pt=new XE(pt,i,null,u,de),pe.push({event:pt,listeners:Le}),nt?pt.data=nt:(nt=nv(u),nt!==null&&(pt.data=nt)))),(nt=P5?j5(i,u):B5(i,u))&&(pt=Ud(ae,"onBeforeInput"),0<pt.length&&(Le=new XE("onBeforeInput","beforeinput",null,u,de),pe.push({event:Le,listeners:pt}),Le.data=nt)),NI(pe,i,ae,u,de)}US(pe,a)})}function nc(i,a,u){return{instance:i,listener:a,currentTarget:u}}function Ud(i,a){for(var u=a+"Capture",h=[];i!==null;){var y=i,v=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||v===null||(y=Su(i,u),y!=null&&h.unshift(nc(i,y,v)),y=Su(i,a),y!=null&&h.push(nc(i,y,v))),i.tag===3)return h;i=i.return}return[]}function MI(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function zS(i,a,u,h,y){for(var v=a._reactName,_=[];u!==null&&u!==h;){var D=u,G=D.alternate,ae=D.stateNode;if(D=D.tag,G!==null&&G===h)break;D!==5&&D!==26&&D!==27||ae===null||(G=ae,y?(ae=Su(u,v),ae!=null&&_.unshift(nc(u,ae,G))):y||(ae=Su(u,v),ae!=null&&_.push(nc(u,ae,G)))),u=u.return}_.length!==0&&i.push({event:a,listeners:_})}var II=/\r\n?/g,LI=/\u0000|\uFFFD/g;function VS(i){return(typeof i=="string"?i:""+i).replace(II,`
49
+ `).replace(LI,"")}function qS(i,a){return a=VS(a),VS(i)===a}function Mt(i,a,u,h,y,v){switch(u){case"children":typeof h=="string"?a==="body"||a==="textarea"&&h===""||Ho(i,h):(typeof h=="number"||typeof h=="bigint")&&a!=="body"&&Ho(i,""+h);break;case"className":qf(i,"class",h);break;case"tabIndex":qf(i,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":qf(i,u,h);break;case"style":qE(i,h,v);break;case"data":if(a!=="object"){qf(i,"data",h);break}case"src":case"href":if(h===""&&(a!=="a"||u!=="href")){i.removeAttribute(u);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){i.removeAttribute(u);break}h=Yf(""+h),i.setAttribute(u,h);break;case"action":case"formAction":if(typeof h=="function"){i.setAttribute(u,"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 v=="function"&&(u==="formAction"?(a!=="input"&&Mt(i,a,"name",y.name,y,null),Mt(i,a,"formEncType",y.formEncType,y,null),Mt(i,a,"formMethod",y.formMethod,y,null),Mt(i,a,"formTarget",y.formTarget,y,null)):(Mt(i,a,"encType",y.encType,y,null),Mt(i,a,"method",y.method,y,null),Mt(i,a,"target",y.target,y,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){i.removeAttribute(u);break}h=Yf(""+h),i.setAttribute(u,h);break;case"onClick":h!=null&&(i.onclick=Ki);break;case"onScroll":h!=null&&dt("scroll",i);break;case"onScrollEnd":h!=null&&dt("scrollend",i);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(u=h.__html,u!=null){if(y.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"multiple":i.multiple=h&&typeof h!="function"&&typeof h!="symbol";break;case"muted":i.muted=h&&typeof h!="function"&&typeof h!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(h==null||typeof h=="function"||typeof h=="boolean"||typeof h=="symbol"){i.removeAttribute("xlink:href");break}u=Yf(""+h),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":h!=null&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(u,""+h):i.removeAttribute(u);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":h&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(u,""):i.removeAttribute(u);break;case"capture":case"download":h===!0?i.setAttribute(u,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(u,h):i.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?i.setAttribute(u,h):i.removeAttribute(u);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?i.removeAttribute(u):i.setAttribute(u,h);break;case"popover":dt("beforetoggle",i),dt("toggle",i),Vf(i,"popover",h);break;case"xlinkActuate":Qi(i,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":Qi(i,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":Qi(i,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":Qi(i,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":Qi(i,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":Qi(i,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":Qi(i,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":Qi(i,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":Qi(i,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":Vf(i,"is",h);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=u5.get(u)||u,Vf(i,u,h))}}function lg(i,a,u,h,y,v){switch(u){case"style":qE(i,h,v);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(u=h.__html,u!=null){if(y.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"children":typeof h=="string"?Ho(i,h):(typeof h=="number"||typeof h=="bigint")&&Ho(i,""+h);break;case"onScroll":h!=null&&dt("scroll",i);break;case"onScrollEnd":h!=null&&dt("scrollend",i);break;case"onClick":h!=null&&(i.onclick=Ki);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!LE.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(y=u.endsWith("Capture"),a=u.slice(2,y?u.length-7:void 0),v=i[Kt]||null,v=v!=null?v[u]:null,typeof v=="function"&&i.removeEventListener(a,v,y),typeof h=="function")){typeof v!="function"&&v!==null&&(u in i?i[u]=null:i.hasAttribute(u)&&i.removeAttribute(u)),i.addEventListener(a,h,y);break e}u in i?i[u]=h:h===!0?i.setAttribute(u,""):Vf(i,u,h)}}}function Un(i,a,u){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":dt("error",i),dt("load",i);var h=!1,y=!1,v;for(v in u)if(u.hasOwnProperty(v)){var _=u[v];if(_!=null)switch(v){case"src":h=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:Mt(i,a,v,_,u,null)}}y&&Mt(i,a,"srcSet",u.srcSet,u,null),h&&Mt(i,a,"src",u.src,u,null);return;case"input":dt("invalid",i);var D=v=_=y=null,G=null,ae=null;for(h in u)if(u.hasOwnProperty(h)){var de=u[h];if(de!=null)switch(h){case"name":y=de;break;case"type":_=de;break;case"checked":G=de;break;case"defaultChecked":ae=de;break;case"value":v=de;break;case"defaultValue":D=de;break;case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(r(137,a));break;default:Mt(i,a,h,de,u,null)}}UE(i,v,D,G,ae,_,y,!1);return;case"select":dt("invalid",i),h=_=v=null;for(y in u)if(u.hasOwnProperty(y)&&(D=u[y],D!=null))switch(y){case"value":v=D;break;case"defaultValue":_=D;break;case"multiple":h=D;default:Mt(i,a,y,D,u,null)}a=v,u=_,i.multiple=!!h,a!=null?Uo(i,!!h,a,!1):u!=null&&Uo(i,!!h,u,!0);return;case"textarea":dt("invalid",i),v=y=h=null;for(_ in u)if(u.hasOwnProperty(_)&&(D=u[_],D!=null))switch(_){case"value":h=D;break;case"defaultValue":y=D;break;case"children":v=D;break;case"dangerouslySetInnerHTML":if(D!=null)throw Error(r(91));break;default:Mt(i,a,_,D,u,null)}zE(i,h,y,v);return;case"option":for(G in u)if(u.hasOwnProperty(G)&&(h=u[G],h!=null))switch(G){case"selected":i.selected=h&&typeof h!="function"&&typeof h!="symbol";break;default:Mt(i,a,G,h,u,null)}return;case"dialog":dt("beforetoggle",i),dt("toggle",i),dt("cancel",i),dt("close",i);break;case"iframe":case"object":dt("load",i);break;case"video":case"audio":for(h=0;h<tc.length;h++)dt(tc[h],i);break;case"image":dt("error",i),dt("load",i);break;case"details":dt("toggle",i);break;case"embed":case"source":case"link":dt("error",i),dt("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ae in u)if(u.hasOwnProperty(ae)&&(h=u[ae],h!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:Mt(i,a,ae,h,u,null)}return;default:if(Tp(a)){for(de in u)u.hasOwnProperty(de)&&(h=u[de],h!==void 0&&lg(i,a,de,h,u,void 0));return}}for(D in u)u.hasOwnProperty(D)&&(h=u[D],h!=null&&Mt(i,a,D,h,u,null))}function PI(i,a,u,h){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,v=null,_=null,D=null,G=null,ae=null,de=null;for(ue in u){var pe=u[ue];if(u.hasOwnProperty(ue)&&pe!=null)switch(ue){case"checked":break;case"value":break;case"defaultValue":G=pe;default:h.hasOwnProperty(ue)||Mt(i,a,ue,null,h,pe)}}for(var le in h){var ue=h[le];if(pe=u[le],h.hasOwnProperty(le)&&(ue!=null||pe!=null))switch(le){case"type":v=ue;break;case"name":y=ue;break;case"checked":ae=ue;break;case"defaultChecked":de=ue;break;case"value":_=ue;break;case"defaultValue":D=ue;break;case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(r(137,a));break;default:ue!==pe&&Mt(i,a,le,ue,h,pe)}}Ep(i,_,D,G,ae,de,v,y);return;case"select":ue=_=D=le=null;for(v in u)if(G=u[v],u.hasOwnProperty(v)&&G!=null)switch(v){case"value":break;case"multiple":ue=G;default:h.hasOwnProperty(v)||Mt(i,a,v,null,h,G)}for(y in h)if(v=h[y],G=u[y],h.hasOwnProperty(y)&&(v!=null||G!=null))switch(y){case"value":le=v;break;case"defaultValue":D=v;break;case"multiple":_=v;default:v!==G&&Mt(i,a,y,v,h,G)}a=D,u=_,h=ue,le!=null?Uo(i,!!u,le,!1):!!h!=!!u&&(a!=null?Uo(i,!!u,a,!0):Uo(i,!!u,u?[]:"",!1));return;case"textarea":ue=le=null;for(D in u)if(y=u[D],u.hasOwnProperty(D)&&y!=null&&!h.hasOwnProperty(D))switch(D){case"value":break;case"children":break;default:Mt(i,a,D,null,h,y)}for(_ in h)if(y=h[_],v=u[_],h.hasOwnProperty(_)&&(y!=null||v!=null))switch(_){case"value":le=y;break;case"defaultValue":ue=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(r(91));break;default:y!==v&&Mt(i,a,_,y,h,v)}HE(i,le,ue);return;case"option":for(var Re in u)if(le=u[Re],u.hasOwnProperty(Re)&&le!=null&&!h.hasOwnProperty(Re))switch(Re){case"selected":i.selected=!1;break;default:Mt(i,a,Re,null,h,le)}for(G in h)if(le=h[G],ue=u[G],h.hasOwnProperty(G)&&le!==ue&&(le!=null||ue!=null))switch(G){case"selected":i.selected=le&&typeof le!="function"&&typeof le!="symbol";break;default:Mt(i,a,G,le,h,ue)}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 Ve in u)le=u[Ve],u.hasOwnProperty(Ve)&&le!=null&&!h.hasOwnProperty(Ve)&&Mt(i,a,Ve,null,h,le);for(ae in h)if(le=h[ae],ue=u[ae],h.hasOwnProperty(ae)&&le!==ue&&(le!=null||ue!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(r(137,a));break;default:Mt(i,a,ae,le,h,ue)}return;default:if(Tp(a)){for(var It in u)le=u[It],u.hasOwnProperty(It)&&le!==void 0&&!h.hasOwnProperty(It)&&lg(i,a,It,void 0,h,le);for(de in h)le=h[de],ue=u[de],!h.hasOwnProperty(de)||le===ue||le===void 0&&ue===void 0||lg(i,a,de,le,h,ue);return}}for(var Z in u)le=u[Z],u.hasOwnProperty(Z)&&le!=null&&!h.hasOwnProperty(Z)&&Mt(i,a,Z,null,h,le);for(pe in h)le=h[pe],ue=u[pe],!h.hasOwnProperty(pe)||le===ue||le==null&&ue==null||Mt(i,a,pe,le,h,ue)}function $S(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function jI(){if(typeof performance.getEntriesByType=="function"){for(var i=0,a=0,u=performance.getEntriesByType("resource"),h=0;h<u.length;h++){var y=u[h],v=y.transferSize,_=y.initiatorType,D=y.duration;if(v&&D&&$S(_)){for(_=0,D=y.responseEnd,h+=1;h<u.length;h++){var G=u[h],ae=G.startTime;if(ae>D)break;var de=G.transferSize,pe=G.initiatorType;de&&$S(pe)&&(G=G.responseEnd,_+=de*(G<D?1:(D-ae)/(G-ae)))}if(--h,a+=8*(v+_)/(y.duration/1e3),i++,10<i)break}}if(0<i)return a/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var ug=null,cg=null;function Hd(i){return i.nodeType===9?i:i.ownerDocument}function YS(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function GS(i,a){if(i===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&a==="foreignObject"?0:i}function fg(i,a){return i==="textarea"||i==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var dg=null;function BI(){var i=window.event;return i&&i.type==="popstate"?i===dg?!1:(dg=i,!0):(dg=null,!1)}var QS=typeof setTimeout=="function"?setTimeout:void 0,FI=typeof clearTimeout=="function"?clearTimeout:void 0,KS=typeof Promise=="function"?Promise:void 0,UI=typeof queueMicrotask=="function"?queueMicrotask:typeof KS<"u"?function(i){return KS.resolve(null).then(i).catch(HI)}:QS;function HI(i){setTimeout(function(){throw i})}function Vs(i){return i==="head"}function XS(i,a){var u=a,h=0;do{var y=u.nextSibling;if(i.removeChild(u),y&&y.nodeType===8)if(u=y.data,u==="/$"||u==="/&"){if(h===0){i.removeChild(y),yl(a);return}h--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")h++;else if(u==="html")rc(i.ownerDocument.documentElement);else if(u==="head"){u=i.ownerDocument.head,rc(u);for(var v=u.firstChild;v;){var _=v.nextSibling,D=v.nodeName;v[vu]||D==="SCRIPT"||D==="STYLE"||D==="LINK"&&v.rel.toLowerCase()==="stylesheet"||u.removeChild(v),v=_}}else u==="body"&&rc(i.ownerDocument.body);u=y}while(u);yl(a)}function WS(i,a){var u=i;i=0;do{var h=u.nextSibling;if(u.nodeType===1?a?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(a?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),h&&h.nodeType===8)if(u=h.data,u==="/$"){if(i===0)break;i--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||i++;u=h}while(u)}function hg(i){var a=i.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var u=a;switch(a=a.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":hg(u),yp(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}i.removeChild(u)}}function zI(i,a,u,h){for(;i.nodeType===1;){var y=u;if(i.nodeName.toLowerCase()!==a.toLowerCase()){if(!h&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(h){if(!i[vu])switch(a){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(v=i.getAttribute("rel"),v==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(v!==y.rel||i.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||i.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||i.getAttribute("title")!==(y.title==null?null:y.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(v=i.getAttribute("src"),(v!==(y.src==null?null:y.src)||i.getAttribute("type")!==(y.type==null?null:y.type)||i.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&v&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(a==="input"&&i.type==="hidden"){var v=y.name==null?null:""+y.name;if(y.type==="hidden"&&i.getAttribute("name")===v)return i}else return i;if(i=Qr(i.nextSibling),i===null)break}return null}function VI(i,a,u){if(a==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!u||(i=Qr(i.nextSibling),i===null))return null;return i}function ZS(i,a){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!a||(i=Qr(i.nextSibling),i===null))return null;return i}function mg(i){return i.data==="$?"||i.data==="$~"}function pg(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function qI(i,a){var u=i.ownerDocument;if(i.data==="$~")i._reactRetry=a;else if(i.data!=="$?"||u.readyState!=="loading")a();else{var h=function(){a(),u.removeEventListener("DOMContentLoaded",h)};u.addEventListener("DOMContentLoaded",h),i._reactRetry=h}}function Qr(i){for(;i!=null;i=i.nextSibling){var a=i.nodeType;if(a===1||a===3)break;if(a===8){if(a=i.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return i}var gg=null;function JS(i){i=i.nextSibling;for(var a=0;i;){if(i.nodeType===8){var u=i.data;if(u==="/$"||u==="/&"){if(a===0)return Qr(i.nextSibling);a--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||a++}i=i.nextSibling}return null}function e2(i){i=i.previousSibling;for(var a=0;i;){if(i.nodeType===8){var u=i.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(a===0)return i;a--}else u!=="/$"&&u!=="/&"||a++}i=i.previousSibling}return null}function t2(i,a,u){switch(a=Hd(u),i){case"html":if(i=a.documentElement,!i)throw Error(r(452));return i;case"head":if(i=a.head,!i)throw Error(r(453));return i;case"body":if(i=a.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function rc(i){for(var a=i.attributes;a.length;)i.removeAttributeNode(a[0]);yp(i)}var Kr=new Map,n2=new Set;function zd(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var fs=H.d;H.d={f:$I,r:YI,D:GI,C:QI,L:KI,m:XI,X:ZI,S:WI,M:JI};function $I(){var i=fs.f(),a=Md();return i||a}function YI(i){var a=jo(i);a!==null&&a.tag===5&&a.type==="form"?xT(a):fs.r(i)}var pl=typeof document>"u"?null:document;function r2(i,a,u){var h=pl;if(h&&typeof a=="string"&&a){var y=Hr(a);y='link[rel="'+i+'"][href="'+y+'"]',typeof u=="string"&&(y+='[crossorigin="'+u+'"]'),n2.has(y)||(n2.add(y),i={rel:i,crossOrigin:u,href:a},h.querySelector(y)===null&&(a=h.createElement("link"),Un(a,"link",i),Dn(a),h.head.appendChild(a)))}}function GI(i){fs.D(i),r2("dns-prefetch",i,null)}function QI(i,a){fs.C(i,a),r2("preconnect",i,a)}function KI(i,a,u){fs.L(i,a,u);var h=pl;if(h&&i&&a){var y='link[rel="preload"][as="'+Hr(a)+'"]';a==="image"&&u&&u.imageSrcSet?(y+='[imagesrcset="'+Hr(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(y+='[imagesizes="'+Hr(u.imageSizes)+'"]')):y+='[href="'+Hr(i)+'"]';var v=y;switch(a){case"style":v=gl(i);break;case"script":v=bl(i)}Kr.has(v)||(i=p({rel:"preload",href:a==="image"&&u&&u.imageSrcSet?void 0:i,as:a},u),Kr.set(v,i),h.querySelector(y)!==null||a==="style"&&h.querySelector(ic(v))||a==="script"&&h.querySelector(sc(v))||(a=h.createElement("link"),Un(a,"link",i),Dn(a),h.head.appendChild(a)))}}function XI(i,a){fs.m(i,a);var u=pl;if(u&&i){var h=a&&typeof a.as=="string"?a.as:"script",y='link[rel="modulepreload"][as="'+Hr(h)+'"][href="'+Hr(i)+'"]',v=y;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=bl(i)}if(!Kr.has(v)&&(i=p({rel:"modulepreload",href:i},a),Kr.set(v,i),u.querySelector(y)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(sc(v)))return}h=u.createElement("link"),Un(h,"link",i),Dn(h),u.head.appendChild(h)}}}function WI(i,a,u){fs.S(i,a,u);var h=pl;if(h&&i){var y=Bo(h).hoistableStyles,v=gl(i);a=a||"default";var _=y.get(v);if(!_){var D={loading:0,preload:null};if(_=h.querySelector(ic(v)))D.loading=5;else{i=p({rel:"stylesheet",href:i,"data-precedence":a},u),(u=Kr.get(v))&&bg(i,u);var G=_=h.createElement("link");Dn(G),Un(G,"link",i),G._p=new Promise(function(ae,de){G.onload=ae,G.onerror=de}),G.addEventListener("load",function(){D.loading|=1}),G.addEventListener("error",function(){D.loading|=2}),D.loading|=4,Vd(_,a,h)}_={type:"stylesheet",instance:_,count:1,state:D},y.set(v,_)}}}function ZI(i,a){fs.X(i,a);var u=pl;if(u&&i){var h=Bo(u).hoistableScripts,y=bl(i),v=h.get(y);v||(v=u.querySelector(sc(y)),v||(i=p({src:i,async:!0},a),(a=Kr.get(y))&&yg(i,a),v=u.createElement("script"),Dn(v),Un(v,"link",i),u.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},h.set(y,v))}}function JI(i,a){fs.M(i,a);var u=pl;if(u&&i){var h=Bo(u).hoistableScripts,y=bl(i),v=h.get(y);v||(v=u.querySelector(sc(y)),v||(i=p({src:i,async:!0,type:"module"},a),(a=Kr.get(y))&&yg(i,a),v=u.createElement("script"),Dn(v),Un(v,"link",i),u.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},h.set(y,v))}}function i2(i,a,u,h){var y=(y=ge.current)?zd(y):null;if(!y)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(a=gl(u.href),u=Bo(y).hoistableStyles,h=u.get(a),h||(h={type:"style",instance:null,count:0,state:null},u.set(a,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){i=gl(u.href);var v=Bo(y).hoistableStyles,_=v.get(i);if(_||(y=y.ownerDocument||y,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},v.set(i,_),(v=y.querySelector(ic(i)))&&!v._p&&(_.instance=v,_.state.loading=5),Kr.has(i)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},Kr.set(i,u),v||eL(y,i,u,_.state))),a&&h===null)throw Error(r(528,""));return _}if(a&&h!==null)throw Error(r(529,""));return null;case"script":return a=u.async,u=u.src,typeof u=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=bl(u),u=Bo(y).hoistableScripts,h=u.get(a),h||(h={type:"script",instance:null,count:0,state:null},u.set(a,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function gl(i){return'href="'+Hr(i)+'"'}function ic(i){return'link[rel="stylesheet"]['+i+"]"}function s2(i){return p({},i,{"data-precedence":i.precedence,precedence:null})}function eL(i,a,u,h){i.querySelector('link[rel="preload"][as="style"]['+a+"]")?h.loading=1:(a=i.createElement("link"),h.preload=a,a.addEventListener("load",function(){return h.loading|=1}),a.addEventListener("error",function(){return h.loading|=2}),Un(a,"link",u),Dn(a),i.head.appendChild(a))}function bl(i){return'[src="'+Hr(i)+'"]'}function sc(i){return"script[async]"+i}function a2(i,a,u){if(a.count++,a.instance===null)switch(a.type){case"style":var h=i.querySelector('style[data-href~="'+Hr(u.href)+'"]');if(h)return a.instance=h,Dn(h),h;var y=p({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return h=(i.ownerDocument||i).createElement("style"),Dn(h),Un(h,"style",y),Vd(h,u.precedence,i),a.instance=h;case"stylesheet":y=gl(u.href);var v=i.querySelector(ic(y));if(v)return a.state.loading|=4,a.instance=v,Dn(v),v;h=s2(u),(y=Kr.get(y))&&bg(h,y),v=(i.ownerDocument||i).createElement("link"),Dn(v);var _=v;return _._p=new Promise(function(D,G){_.onload=D,_.onerror=G}),Un(v,"link",h),a.state.loading|=4,Vd(v,u.precedence,i),a.instance=v;case"script":return v=bl(u.src),(y=i.querySelector(sc(v)))?(a.instance=y,Dn(y),y):(h=u,(y=Kr.get(v))&&(h=p({},u),yg(h,y)),i=i.ownerDocument||i,y=i.createElement("script"),Dn(y),Un(y,"link",h),i.head.appendChild(y),a.instance=y);case"void":return null;default:throw Error(r(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(h=a.instance,a.state.loading|=4,Vd(h,u.precedence,i));return a.instance}function Vd(i,a,u){for(var h=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=h.length?h[h.length-1]:null,v=y,_=0;_<h.length;_++){var D=h[_];if(D.dataset.precedence===a)v=D;else if(v!==y)break}v?v.parentNode.insertBefore(i,v.nextSibling):(a=u.nodeType===9?u.head:u,a.insertBefore(i,a.firstChild))}function bg(i,a){i.crossOrigin==null&&(i.crossOrigin=a.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=a.referrerPolicy),i.title==null&&(i.title=a.title)}function yg(i,a){i.crossOrigin==null&&(i.crossOrigin=a.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=a.referrerPolicy),i.integrity==null&&(i.integrity=a.integrity)}var qd=null;function o2(i,a,u){if(qd===null){var h=new Map,y=qd=new Map;y.set(u,h)}else y=qd,h=y.get(u),h||(h=new Map,y.set(u,h));if(h.has(i))return h;for(h.set(i,null),u=u.getElementsByTagName(i),y=0;y<u.length;y++){var v=u[y];if(!(v[vu]||v[Ft]||i==="link"&&v.getAttribute("rel")==="stylesheet")&&v.namespaceURI!=="http://www.w3.org/2000/svg"){var _=v.getAttribute(a)||"";_=i+_;var D=h.get(_);D?D.push(v):h.set(_,[v])}}return h}function l2(i,a,u){i=i.ownerDocument||i,i.head.insertBefore(u,a==="title"?i.querySelector("head > title"):null)}function tL(i,a,u){if(u===1||a.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return i=a.disabled,typeof a.precedence=="string"&&i==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function u2(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function nL(i,a,u,h){if(u.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var y=gl(h.href),v=a.querySelector(ic(y));if(v){a=v._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(i.count++,i=$d.bind(i),a.then(i,i)),u.state.loading|=4,u.instance=v,Dn(v);return}v=a.ownerDocument||a,h=s2(h),(y=Kr.get(y))&&bg(h,y),v=v.createElement("link"),Dn(v);var _=v;_._p=new Promise(function(D,G){_.onload=D,_.onerror=G}),Un(v,"link",h),u.instance=v}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(u,a),(a=u.state.preload)&&(u.state.loading&3)===0&&(i.count++,u=$d.bind(i),a.addEventListener("load",u),a.addEventListener("error",u))}}var xg=0;function rL(i,a){return i.stylesheets&&i.count===0&&Gd(i,i.stylesheets),0<i.count||0<i.imgCount?function(u){var h=setTimeout(function(){if(i.stylesheets&&Gd(i,i.stylesheets),i.unsuspend){var v=i.unsuspend;i.unsuspend=null,v()}},6e4+a);0<i.imgBytes&&xg===0&&(xg=62500*jI());var y=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&Gd(i,i.stylesheets),i.unsuspend)){var v=i.unsuspend;i.unsuspend=null,v()}},(i.imgBytes>xg?50:800)+a);return i.unsuspend=u,function(){i.unsuspend=null,clearTimeout(h),clearTimeout(y)}}:null}function $d(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Gd(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var Yd=null;function Gd(i,a){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Yd=new Map,a.forEach(iL,i),Yd=null,$d.call(i))}function iL(i,a){if(!(a.state.loading&4)){var u=Yd.get(i);if(u)var h=u.get(null);else{u=new Map,Yd.set(i,u);for(var y=i.querySelectorAll("link[data-precedence],style[data-precedence]"),v=0;v<y.length;v++){var _=y[v];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(u.set(_.dataset.precedence,_),h=_)}h&&u.set(null,h)}y=a.instance,_=y.getAttribute("data-precedence"),v=u.get(_)||h,v===h&&u.set(null,y),u.set(_,y),this.count++,h=$d.bind(this),y.addEventListener("load",h),y.addEventListener("error",h),v?v.parentNode.insertBefore(y,v.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(y,i.firstChild)),a.state.loading|=4}}var ac={$$typeof:k,Provider:null,Consumer:null,_currentValue:q,_currentValue2:q,_threadCount:0};function sL(i,a,u,h,y,v,_,D,G){this.tag=1,this.containerInfo=i,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=Cr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Cr(0),this.hiddenUpdates=Cr(null),this.identifierPrefix=h,this.onUncaughtError=y,this.onCaughtError=v,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=G,this.incompleteTransitions=new Map}function c2(i,a,u,h,y,v,_,D,G,ae,de,pe){return i=new sL(i,a,u,_,G,ae,de,pe,D),a=1,v===!0&&(a|=24),v=kr(3,null,null,a),i.current=v,v.stateNode=i,a=Zp(),a.refCount++,i.pooledCache=a,a.refCount++,v.memoizedState={element:h,isDehydrated:u,cache:a},n0(v),i}function f2(i){return i?(i=Qo,i):Qo}function d2(i,a,u,h,y,v){y=f2(y),h.context===null?h.context=y:h.pendingContext=y,h=Os(a),h.payload={element:u},v=v===void 0?null:v,v!==null&&(h.callback=v),u=Ms(i,h,a),u!==null&&(yr(u,i,a),Bu(u,i,a))}function h2(i,a){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var u=i.retryLane;i.retryLane=u!==0&&u<a?u:a}}function Eg(i,a){h2(i,a),(i=i.alternate)&&h2(i,a)}function m2(i){if(i.tag===13||i.tag===31){var a=La(i,67108864);a!==null&&yr(a,i,67108864),Eg(i,67108864)}}function p2(i){if(i.tag===13||i.tag===31){var a=Mr();a=Qe(a);var u=La(i,a);u!==null&&yr(u,i,a),Eg(i,a)}}var Qd=!0;function aL(i,a,u,h){var y=O.T;O.T=null;var v=H.p;try{H.p=2,vg(i,a,u,h)}finally{H.p=v,O.T=y}}function oL(i,a,u,h){var y=O.T;O.T=null;var v=H.p;try{H.p=8,vg(i,a,u,h)}finally{H.p=v,O.T=y}}function vg(i,a,u,h){if(Qd){var y=Tg(h);if(y===null)og(i,a,h,Kd,u),b2(i,h);else if(uL(y,i,a,u,h))h.stopPropagation();else if(b2(i,h),a&4&&-1<lL.indexOf(i)){for(;y!==null;){var v=jo(y);if(v!==null)switch(v.tag){case 3:if(v=v.stateNode,v.current.memoizedState.isDehydrated){var _=At(v.pendingLanes);if(_!==0){var D=v;for(D.pendingLanes|=2,D.entangledLanes|=2;_;){var G=1<<31-vt(_);D.entanglements[1]|=G,_&=~G}Ci(v),(_t&6)===0&&(Dd=Yt()+500,ec(0))}}break;case 31:case 13:D=La(v,2),D!==null&&yr(D,v,2),Md(),Eg(v,2)}if(v=Tg(h),v===null&&og(i,a,h,Kd,u),v===y)break;y=v}y!==null&&h.stopPropagation()}else og(i,a,h,null,u)}}function Tg(i){return i=wp(i),Sg(i)}var Kd=null;function Sg(i){if(Kd=null,i=Po(i),i!==null){var a=o(i);if(a===null)i=null;else{var u=a.tag;if(u===13){if(i=l(a),i!==null)return i;i=null}else if(u===31){if(i=c(a),i!==null)return i;i=null}else if(u===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;i=null}else a!==i&&(i=null)}}return Kd=i,null}function g2(i){switch(i){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(He()){case oe:return 2;case Te:return 8;case Pe:case Ze:return 32;case bt:return 268435456;default:return 32}default:return 32}}var wg=!1,qs=null,$s=null,Ys=null,oc=new Map,lc=new Map,Gs=[],lL="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 b2(i,a){switch(i){case"focusin":case"focusout":qs=null;break;case"dragenter":case"dragleave":$s=null;break;case"mouseover":case"mouseout":Ys=null;break;case"pointerover":case"pointerout":oc.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":lc.delete(a.pointerId)}}function uc(i,a,u,h,y,v){return i===null||i.nativeEvent!==v?(i={blockedOn:a,domEventName:u,eventSystemFlags:h,nativeEvent:v,targetContainers:[y]},a!==null&&(a=jo(a),a!==null&&m2(a)),i):(i.eventSystemFlags|=h,a=i.targetContainers,y!==null&&a.indexOf(y)===-1&&a.push(y),i)}function uL(i,a,u,h,y){switch(a){case"focusin":return qs=uc(qs,i,a,u,h,y),!0;case"dragenter":return $s=uc($s,i,a,u,h,y),!0;case"mouseover":return Ys=uc(Ys,i,a,u,h,y),!0;case"pointerover":var v=y.pointerId;return oc.set(v,uc(oc.get(v)||null,i,a,u,h,y)),!0;case"gotpointercapture":return v=y.pointerId,lc.set(v,uc(lc.get(v)||null,i,a,u,h,y)),!0}return!1}function y2(i){var a=Po(i.target);if(a!==null){var u=o(a);if(u!==null){if(a=u.tag,a===13){if(a=l(u),a!==null){i.blockedOn=a,Ar(i.priority,function(){p2(u)});return}}else if(a===31){if(a=c(u),a!==null){i.blockedOn=a,Ar(i.priority,function(){p2(u)});return}}else if(a===3&&u.stateNode.current.memoizedState.isDehydrated){i.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Xd(i){if(i.blockedOn!==null)return!1;for(var a=i.targetContainers;0<a.length;){var u=Tg(i.nativeEvent);if(u===null){u=i.nativeEvent;var h=new u.constructor(u.type,u);Sp=h,u.target.dispatchEvent(h),Sp=null}else return a=jo(u),a!==null&&m2(a),i.blockedOn=u,!1;a.shift()}return!0}function x2(i,a,u){Xd(i)&&u.delete(a)}function cL(){wg=!1,qs!==null&&Xd(qs)&&(qs=null),$s!==null&&Xd($s)&&($s=null),Ys!==null&&Xd(Ys)&&(Ys=null),oc.forEach(x2),lc.forEach(x2)}function Wd(i,a){i.blockedOn===a&&(i.blockedOn=null,wg||(wg=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,cL)))}var Zd=null;function E2(i){Zd!==i&&(Zd=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Zd===i&&(Zd=null);for(var a=0;a<i.length;a+=3){var u=i[a],h=i[a+1],y=i[a+2];if(typeof h!="function"){if(Sg(h||u)===null)continue;break}var v=jo(u);v!==null&&(i.splice(a,3),a-=3,T0(v,{pending:!0,data:y,method:u.method,action:h},h,y))}}))}function yl(i){function a(G){return Wd(G,i)}qs!==null&&Wd(qs,i),$s!==null&&Wd($s,i),Ys!==null&&Wd(Ys,i),oc.forEach(a),lc.forEach(a);for(var u=0;u<Gs.length;u++){var h=Gs[u];h.blockedOn===i&&(h.blockedOn=null)}for(;0<Gs.length&&(u=Gs[0],u.blockedOn===null);)y2(u),u.blockedOn===null&&Gs.shift();if(u=(i.ownerDocument||i).$$reactFormReplay,u!=null)for(h=0;h<u.length;h+=3){var y=u[h],v=u[h+1],_=y[Kt]||null;if(typeof v=="function")_||E2(u);else if(_){var D=null;if(v&&v.hasAttribute("formAction")){if(y=v,_=v[Kt]||null)D=_.formAction;else if(Sg(y)!==null)continue}else D=_.action;typeof D=="function"?u[h+1]=D:(u.splice(h,3),h-=3),E2(u)}}}function v2(){function i(v){v.canIntercept&&v.info==="react-transition"&&v.intercept({handler:function(){return new Promise(function(_){return y=_})},focusReset:"manual",scroll:"manual"})}function a(){y!==null&&(y(),y=null),h||setTimeout(u,20)}function u(){if(!h&&!navigation.transition){var v=navigation.currentEntry;v&&v.url!=null&&navigation.navigate(v.url,{state:v.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var h=!1,y=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(u,100),function(){h=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),y!==null&&(y(),y=null)}}}function Cg(i){this._internalRoot=i}Jd.prototype.render=Cg.prototype.render=function(i){var a=this._internalRoot;if(a===null)throw Error(r(409));var u=a.current,h=Mr();d2(u,h,i,a,null,null)},Jd.prototype.unmount=Cg.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var a=i.containerInfo;d2(i.current,2,null,i,null,null),Md(),a[vi]=null}};function Jd(i){this._internalRoot=i}Jd.prototype.unstable_scheduleHydration=function(i){if(i){var a=Bt();i={blockedOn:null,target:i,priority:a};for(var u=0;u<Gs.length&&a!==0&&a<Gs[u].priority;u++);Gs.splice(u,0,i),u===0&&y2(i)}};var T2=t.version;if(T2!=="19.2.4")throw Error(r(527,T2,"19.2.4"));H.findDOMNode=function(i){var a=i._reactInternals;if(a===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=d(a),i=i!==null?m(i):null,i=i===null?null:i.stateNode,i};var fL={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:O,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var eh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!eh.isDisabled&&eh.supportsFiber)try{nn=eh.inject(fL),Gt=eh}catch{}}return fc.createRoot=function(i,a){if(!s(i))throw Error(r(299));var u=!1,h="",y=NT,v=RT,_=DT;return a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(h=a.identifierPrefix),a.onUncaughtError!==void 0&&(y=a.onUncaughtError),a.onCaughtError!==void 0&&(v=a.onCaughtError),a.onRecoverableError!==void 0&&(_=a.onRecoverableError)),a=c2(i,1,!1,null,null,u,h,null,y,v,_,v2),i[vi]=a.current,ag(i),new Cg(a)},fc.hydrateRoot=function(i,a,u){if(!s(i))throw Error(r(299));var h=!1,y="",v=NT,_=RT,D=DT,G=null;return u!=null&&(u.unstable_strictMode===!0&&(h=!0),u.identifierPrefix!==void 0&&(y=u.identifierPrefix),u.onUncaughtError!==void 0&&(v=u.onUncaughtError),u.onCaughtError!==void 0&&(_=u.onCaughtError),u.onRecoverableError!==void 0&&(D=u.onRecoverableError),u.formState!==void 0&&(G=u.formState)),a=c2(i,1,!0,a,u??null,h,y,G,v,_,D,v2),a.context=f2(null),u=a.current,h=Mr(),h=Qe(h),y=Os(h),y.callback=null,Ms(u,y,h),u=h,a.current.lanes=u,Vn(a,u),Ci(a),i[vi]=a.current,ag(i),new Jd(a)},fc.version="19.2.4",fc}var I2;function CL(){if(I2)return Ng.exports;I2=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(),Ng.exports=wL(),Ng.exports}var AL=CL();const _L=xf(AL);var au=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(){}},kL={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},aa,vy,J_,NL=(J_=class{constructor(){je(this,aa,kL);je(this,vy,!1)}setTimeoutProvider(e){Ae(this,aa,e)}setTimeout(e,t){return Q(this,aa).setTimeout(e,t)}clearTimeout(e){Q(this,aa).clearTimeout(e)}setInterval(e,t){return Q(this,aa).setInterval(e,t)}clearInterval(e){Q(this,aa).clearInterval(e)}},aa=new WeakMap,vy=new WeakMap,J_),to=new NL;function RL(e){setTimeout(e,0)}var bo=typeof window>"u"||"Deno"in globalThis;function ir(){}function DL(e,t){return typeof e=="function"?e(t):e}function X1(e){return typeof e=="number"&&e>=0&&e!==1/0}function f3(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ba(e,t){return typeof e=="function"?e(t):e}function Wr(e,t){return typeof e=="function"?e(t):e}function L2(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:o,queryKey:l,stale:c}=e;if(l){if(r){if(t.queryHash!==Cy(l,t.options))return!1}else if(!Xc(t.queryKey,l))return!1}if(n!=="all"){const f=t.isActive();if(n==="active"&&!f||n==="inactive"&&f)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||s&&s!==t.state.fetchStatus||o&&!o(t))}function P2(e,t){const{exact:n,status:r,predicate:s,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(yo(t.options.mutationKey)!==yo(o))return!1}else if(!Xc(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function Cy(e,t){return((t==null?void 0:t.queryKeyHashFn)||yo)(e)}function yo(e){return JSON.stringify(e,(t,n)=>W1(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Xc(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Xc(e[n],t[n])):!1}var OL=Object.prototype.hasOwnProperty;function d3(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=j2(e)&&j2(t);if(!r&&!(W1(e)&&W1(t)))return t;const o=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),c=l.length,f=r?new Array(c):{};let d=0;for(let m=0;m<c;m++){const p=r?m:l[m],b=e[p],x=t[p];if(b===x){f[p]=b,(r?m<o:OL.call(e,p))&&d++;continue}if(b===null||x===null||typeof b!="object"||typeof x!="object"){f[p]=x;continue}const S=d3(b,x,n+1);f[p]=S,S===b&&d++}return o===c&&d===o?e:f}function Gh(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 j2(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function W1(e){if(!B2(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!B2(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function B2(e){return Object.prototype.toString.call(e)==="[object Object]"}function ML(e){return new Promise(t=>{to.setTimeout(t,e)})}function Z1(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?d3(e,t):t}function IL(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function LL(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Ay=Symbol();function h3(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Ay?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function _y(e,t){return typeof e=="function"?e(...t):!!e}function PL(e,t,n){let r=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??(s=t()),r||(r=!0,s.aborted?n():s.addEventListener("abort",n,{once:!0})),s)}),e}var so,oa,Hl,e3,jL=(e3=class extends au{constructor(){super();je(this,so);je(this,oa);je(this,Hl);Ae(this,Hl,t=>{if(!bo&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){Q(this,oa)||this.setEventListener(Q(this,Hl))}onUnsubscribe(){var t;this.hasListeners()||((t=Q(this,oa))==null||t.call(this),Ae(this,oa,void 0))}setEventListener(t){var n;Ae(this,Hl,t),(n=Q(this,oa))==null||n.call(this),Ae(this,oa,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){Q(this,so)!==t&&(Ae(this,so,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof Q(this,so)=="boolean"?Q(this,so):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},so=new WeakMap,oa=new WeakMap,Hl=new WeakMap,e3),ky=new jL;function J1(){let e,t;const n=new Promise((s,o)=>{e=s,t=o});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}var BL=RL;function FL(){let e=[],t=0,n=c=>{c()},r=c=>{c()},s=BL;const o=c=>{t?e.push(c):s(()=>{n(c)})},l=()=>{const c=e;e=[],c.length&&s(()=>{r(()=>{c.forEach(f=>{n(f)})})})};return{batch:c=>{let f;t++;try{f=c()}finally{t--,t||l()}return f},batchCalls:c=>(...f)=>{o(()=>{c(...f)})},schedule:o,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{s=c}}}var Nn=FL(),zl,la,Vl,t3,UL=(t3=class extends au{constructor(){super();je(this,zl,!0);je(this,la);je(this,Vl);Ae(this,Vl,t=>{if(!bo&&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(){Q(this,la)||this.setEventListener(Q(this,Vl))}onUnsubscribe(){var t;this.hasListeners()||((t=Q(this,la))==null||t.call(this),Ae(this,la,void 0))}setEventListener(t){var n;Ae(this,Vl,t),(n=Q(this,la))==null||n.call(this),Ae(this,la,t(this.setOnline.bind(this)))}setOnline(t){Q(this,zl)!==t&&(Ae(this,zl,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return Q(this,zl)}},zl=new WeakMap,la=new WeakMap,Vl=new WeakMap,t3),Qh=new UL;function HL(e){return Math.min(1e3*2**e,3e4)}function m3(e){return(e??"online")==="online"?Qh.isOnline():!0}var eb=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function p3(e){let t=!1,n=0,r;const s=J1(),o=()=>s.status!=="pending",l=w=>{var C;if(!o()){const A=new eb(w);b(A),(C=e.onCancel)==null||C.call(e,A)}},c=()=>{t=!0},f=()=>{t=!1},d=()=>ky.isFocused()&&(e.networkMode==="always"||Qh.isOnline())&&e.canRun(),m=()=>m3(e.networkMode)&&e.canRun(),p=w=>{o()||(r==null||r(),s.resolve(w))},b=w=>{o()||(r==null||r(),s.reject(w))},x=()=>new Promise(w=>{var C;r=A=>{(o()||d())&&w(A)},(C=e.onPause)==null||C.call(e)}).then(()=>{var w;r=void 0,o()||(w=e.onContinue)==null||w.call(e)}),S=()=>{if(o())return;let w;const C=n===0?e.initialPromise:void 0;try{w=C??e.fn()}catch(A){w=Promise.reject(A)}Promise.resolve(w).then(p).catch(A=>{var I;if(o())return;const N=e.retry??(bo?0:3),k=e.retryDelay??HL,R=typeof k=="function"?k(n,A):k,U=N===!0||typeof N=="number"&&n<N||typeof N=="function"&&N(n,A);if(t||!U){b(A);return}n++,(I=e.onFail)==null||I.call(e,n,A),ML(R).then(()=>d()?void 0:x()).then(()=>{t?b(A):S()})})};return{promise:s,status:()=>s.status,cancel:l,continue:()=>(r==null||r(),s),cancelRetry:c,continueRetry:f,canStart:m,start:()=>(m()?S():x().then(S),s)}}var ao,n3,g3=(n3=class{constructor(){je(this,ao)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),X1(this.gcTime)&&Ae(this,ao,to.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(bo?1/0:300*1e3))}clearGcTimeout(){Q(this,ao)&&(to.clearTimeout(Q(this,ao)),Ae(this,ao,void 0))}},ao=new WeakMap,n3),oo,ql,Xr,lo,Ln,mf,uo,di,hs,r3,zL=(r3=class extends g3{constructor(t){super();je(this,di);je(this,oo);je(this,ql);je(this,Xr);je(this,lo);je(this,Ln);je(this,mf);je(this,uo);Ae(this,uo,!1),Ae(this,mf,t.defaultOptions),this.setOptions(t.options),this.observers=[],Ae(this,lo,t.client),Ae(this,Xr,Q(this,lo).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Ae(this,oo,U2(this.options)),this.state=t.state??Q(this,oo),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=Q(this,Ln))==null?void 0:t.promise}setOptions(t){if(this.options={...Q(this,mf),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=U2(this.options);n.data!==void 0&&(this.setState(F2(n.data,n.dataUpdatedAt)),Ae(this,oo,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&Q(this,Xr).remove(this)}setData(t,n){const r=Z1(this.state.data,t,this.options);return at(this,di,hs).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){at(this,di,hs).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=Q(this,Ln))==null?void 0:r.promise;return(s=Q(this,Ln))==null||s.cancel(t),n?n.then(ir).catch(ir):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(Q(this,oo))}isActive(){return this.observers.some(t=>Wr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ay||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ba(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:!f3(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=Q(this,Ln))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=Q(this,Ln))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),Q(this,Xr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(Q(this,Ln)&&(Q(this,uo)?Q(this,Ln).cancel({revert:!0}):Q(this,Ln).cancelRetry()),this.scheduleGc()),Q(this,Xr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||at(this,di,hs).call(this,{type:"invalidate"})}async fetch(t,n){var f,d,m,p,b,x,S,w,C,A,N,k;if(this.state.fetchStatus!=="idle"&&((f=Q(this,Ln))==null?void 0:f.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(Q(this,Ln))return Q(this,Ln).continueRetry(),Q(this,Ln).promise}if(t&&this.setOptions(t),!this.options.queryFn){const R=this.observers.find(U=>U.options.queryFn);R&&this.setOptions(R.options)}const r=new AbortController,s=R=>{Object.defineProperty(R,"signal",{enumerable:!0,get:()=>(Ae(this,uo,!0),r.signal)})},o=()=>{const R=h3(this.options,n),I=(()=>{const j={client:Q(this,lo),queryKey:this.queryKey,meta:this.meta};return s(j),j})();return Ae(this,uo,!1),this.options.persister?this.options.persister(R,I,this):R(I)},c=(()=>{const R={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:Q(this,lo),state:this.state,fetchFn:o};return s(R),R})();(d=this.options.behavior)==null||d.onFetch(c,this),Ae(this,ql,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m=c.fetchOptions)==null?void 0:m.meta))&&at(this,di,hs).call(this,{type:"fetch",meta:(p=c.fetchOptions)==null?void 0:p.meta}),Ae(this,Ln,p3({initialPromise:n==null?void 0:n.initialPromise,fn:c.fetchFn,onCancel:R=>{R instanceof eb&&R.revert&&this.setState({...Q(this,ql),fetchStatus:"idle"}),r.abort()},onFail:(R,U)=>{at(this,di,hs).call(this,{type:"failed",failureCount:R,error:U})},onPause:()=>{at(this,di,hs).call(this,{type:"pause"})},onContinue:()=>{at(this,di,hs).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const R=await Q(this,Ln).start();if(R===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(R),(x=(b=Q(this,Xr).config).onSuccess)==null||x.call(b,R,this),(w=(S=Q(this,Xr).config).onSettled)==null||w.call(S,R,this.state.error,this),R}catch(R){if(R instanceof eb){if(R.silent)return Q(this,Ln).promise;if(R.revert){if(this.state.data===void 0)throw R;return this.state.data}}throw at(this,di,hs).call(this,{type:"error",error:R}),(A=(C=Q(this,Xr).config).onError)==null||A.call(C,R,this),(k=(N=Q(this,Xr).config).onSettled)==null||k.call(N,this.state.data,R,this),R}finally{this.scheduleGc()}}},oo=new WeakMap,ql=new WeakMap,Xr=new WeakMap,lo=new WeakMap,Ln=new WeakMap,mf=new WeakMap,uo=new WeakMap,di=new WeakSet,hs=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,...b3(r.data,this.options),fetchMeta:t.meta??null};case"success":const s={...r,...F2(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ae(this,ql,t.manual?s:void 0),s;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),Nn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),Q(this,Xr).notify({query:this,type:"updated",action:t})})},r3);function b3(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:m3(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function F2(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function U2(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 vr,xt,pf,rr,co,$l,ps,ua,gf,Yl,Gl,fo,ho,ca,Ql,kt,Cc,tb,nb,rb,ib,sb,ab,ob,y3,i3,VL=(i3=class extends au{constructor(t,n){super();je(this,kt);je(this,vr);je(this,xt);je(this,pf);je(this,rr);je(this,co);je(this,$l);je(this,ps);je(this,ua);je(this,gf);je(this,Yl);je(this,Gl);je(this,fo);je(this,ho);je(this,ca);je(this,Ql,new Set);this.options=n,Ae(this,vr,t),Ae(this,ua,null),Ae(this,ps,J1()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(Q(this,xt).addObserver(this),H2(Q(this,xt),this.options)?at(this,kt,Cc).call(this):this.updateResult(),at(this,kt,ib).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return lb(Q(this,xt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return lb(Q(this,xt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,at(this,kt,sb).call(this),at(this,kt,ab).call(this),Q(this,xt).removeObserver(this)}setOptions(t){const n=this.options,r=Q(this,xt);if(this.options=Q(this,vr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Wr(this.options.enabled,Q(this,xt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");at(this,kt,ob).call(this),Q(this,xt).setOptions(this.options),n._defaulted&&!Gh(this.options,n)&&Q(this,vr).getQueryCache().notify({type:"observerOptionsUpdated",query:Q(this,xt),observer:this});const s=this.hasListeners();s&&z2(Q(this,xt),r,this.options,n)&&at(this,kt,Cc).call(this),this.updateResult(),s&&(Q(this,xt)!==r||Wr(this.options.enabled,Q(this,xt))!==Wr(n.enabled,Q(this,xt))||ba(this.options.staleTime,Q(this,xt))!==ba(n.staleTime,Q(this,xt)))&&at(this,kt,tb).call(this);const o=at(this,kt,nb).call(this);s&&(Q(this,xt)!==r||Wr(this.options.enabled,Q(this,xt))!==Wr(n.enabled,Q(this,xt))||o!==Q(this,ca))&&at(this,kt,rb).call(this,o)}getOptimisticResult(t){const n=Q(this,vr).getQueryCache().build(Q(this,vr),t),r=this.createResult(n,t);return $L(this,r)&&(Ae(this,rr,r),Ae(this,$l,this.options),Ae(this,co,Q(this,xt).state)),r}getCurrentResult(){return Q(this,rr)}trackResult(t,n){return new Proxy(t,{get:(r,s)=>(this.trackProp(s),n==null||n(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&Q(this,ps).status==="pending"&&Q(this,ps).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,s))})}trackProp(t){Q(this,Ql).add(t)}getCurrentQuery(){return Q(this,xt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=Q(this,vr).defaultQueryOptions(t),r=Q(this,vr).getQueryCache().build(Q(this,vr),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return at(this,kt,Cc).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),Q(this,rr)))}createResult(t,n){var $;const r=Q(this,xt),s=this.options,o=Q(this,rr),l=Q(this,co),c=Q(this,$l),d=t!==r?t.state:Q(this,pf),{state:m}=t;let p={...m},b=!1,x;if(n._optimisticResults){const L=this.hasListeners(),W=!L&&H2(t,n),K=L&&z2(t,r,n,s);(W||K)&&(p={...p,...b3(m.data,t.options)}),n._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:S,errorUpdatedAt:w,status:C}=p;x=p.data;let A=!1;if(n.placeholderData!==void 0&&x===void 0&&C==="pending"){let L;o!=null&&o.isPlaceholderData&&n.placeholderData===(c==null?void 0:c.placeholderData)?(L=o.data,A=!0):L=typeof n.placeholderData=="function"?n.placeholderData(($=Q(this,Gl))==null?void 0:$.state.data,Q(this,Gl)):n.placeholderData,L!==void 0&&(C="success",x=Z1(o==null?void 0:o.data,L,n),b=!0)}if(n.select&&x!==void 0&&!A)if(o&&x===(l==null?void 0:l.data)&&n.select===Q(this,gf))x=Q(this,Yl);else try{Ae(this,gf,n.select),x=n.select(x),x=Z1(o==null?void 0:o.data,x,n),Ae(this,Yl,x),Ae(this,ua,null)}catch(L){Ae(this,ua,L)}Q(this,ua)&&(S=Q(this,ua),x=Q(this,Yl),w=Date.now(),C="error");const N=p.fetchStatus==="fetching",k=C==="pending",R=C==="error",U=k&&N,I=x!==void 0,M={status:C,fetchStatus:p.fetchStatus,isPending:k,isSuccess:C==="success",isError:R,isInitialLoading:U,isLoading:U,data:x,dataUpdatedAt:p.dataUpdatedAt,error:S,errorUpdatedAt:w,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>d.dataUpdateCount||p.errorUpdateCount>d.errorUpdateCount,isFetching:N,isRefetching:N&&!k,isLoadingError:R&&!I,isPaused:p.fetchStatus==="paused",isPlaceholderData:b,isRefetchError:R&&I,isStale:Ny(t,n),refetch:this.refetch,promise:Q(this,ps),isEnabled:Wr(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const L=M.data!==void 0,W=M.status==="error"&&!L,K=ie=>{W?ie.reject(M.error):L&&ie.resolve(M.data)},J=()=>{const ie=Ae(this,ps,M.promise=J1());K(ie)},te=Q(this,ps);switch(te.status){case"pending":t.queryHash===r.queryHash&&K(te);break;case"fulfilled":(W||M.data!==te.value)&&J();break;case"rejected":(!W||M.error!==te.reason)&&J();break}}return M}updateResult(){const t=Q(this,rr),n=this.createResult(Q(this,xt),this.options);if(Ae(this,co,Q(this,xt).state),Ae(this,$l,this.options),Q(this,co).data!==void 0&&Ae(this,Gl,Q(this,xt)),Gh(n,t))return;Ae(this,rr,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,o=typeof s=="function"?s():s;if(o==="all"||!o&&!Q(this,Ql).size)return!0;const l=new Set(o??Q(this,Ql));return this.options.throwOnError&&l.add("error"),Object.keys(Q(this,rr)).some(c=>{const f=c;return Q(this,rr)[f]!==t[f]&&l.has(f)})};at(this,kt,y3).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&at(this,kt,ib).call(this)}},vr=new WeakMap,xt=new WeakMap,pf=new WeakMap,rr=new WeakMap,co=new WeakMap,$l=new WeakMap,ps=new WeakMap,ua=new WeakMap,gf=new WeakMap,Yl=new WeakMap,Gl=new WeakMap,fo=new WeakMap,ho=new WeakMap,ca=new WeakMap,Ql=new WeakMap,kt=new WeakSet,Cc=function(t){at(this,kt,ob).call(this);let n=Q(this,xt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(ir)),n},tb=function(){at(this,kt,sb).call(this);const t=ba(this.options.staleTime,Q(this,xt));if(bo||Q(this,rr).isStale||!X1(t))return;const r=f3(Q(this,rr).dataUpdatedAt,t)+1;Ae(this,fo,to.setTimeout(()=>{Q(this,rr).isStale||this.updateResult()},r))},nb=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(Q(this,xt)):this.options.refetchInterval)??!1},rb=function(t){at(this,kt,ab).call(this),Ae(this,ca,t),!(bo||Wr(this.options.enabled,Q(this,xt))===!1||!X1(Q(this,ca))||Q(this,ca)===0)&&Ae(this,ho,to.setInterval(()=>{(this.options.refetchIntervalInBackground||ky.isFocused())&&at(this,kt,Cc).call(this)},Q(this,ca)))},ib=function(){at(this,kt,tb).call(this),at(this,kt,rb).call(this,at(this,kt,nb).call(this))},sb=function(){Q(this,fo)&&(to.clearTimeout(Q(this,fo)),Ae(this,fo,void 0))},ab=function(){Q(this,ho)&&(to.clearInterval(Q(this,ho)),Ae(this,ho,void 0))},ob=function(){const t=Q(this,vr).getQueryCache().build(Q(this,vr),this.options);if(t===Q(this,xt))return;const n=Q(this,xt);Ae(this,xt,t),Ae(this,pf,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},y3=function(t){Nn.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(Q(this,rr))}),Q(this,vr).getQueryCache().notify({query:Q(this,xt),type:"observerResultsUpdated"})})},i3);function qL(e,t){return Wr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function H2(e,t){return qL(e,t)||e.state.data!==void 0&&lb(e,t,t.refetchOnMount)}function lb(e,t,n){if(Wr(t.enabled,e)!==!1&&ba(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Ny(e,t)}return!1}function z2(e,t,n,r){return(e!==t||Wr(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Ny(e,n)}function Ny(e,t){return Wr(t.enabled,e)!==!1&&e.isStaleByTime(ba(t.staleTime,e))}function $L(e,t){return!Gh(e.getCurrentResult(),t)}function V2(e){return{onFetch:(t,n)=>{var m,p,b,x,S;const r=t.options,s=(b=(p=(m=t.fetchOptions)==null?void 0:m.meta)==null?void 0:p.fetchMore)==null?void 0:b.direction,o=((x=t.state.data)==null?void 0:x.pages)||[],l=((S=t.state.data)==null?void 0:S.pageParams)||[];let c={pages:[],pageParams:[]},f=0;const d=async()=>{let w=!1;const C=k=>{PL(k,()=>t.signal,()=>w=!0)},A=h3(t.options,t.fetchOptions),N=async(k,R,U)=>{if(w)return Promise.reject();if(R==null&&k.pages.length)return Promise.resolve(k);const j=(()=>{const W={client:t.client,queryKey:t.queryKey,pageParam:R,direction:U?"backward":"forward",meta:t.options.meta};return C(W),W})(),M=await A(j),{maxPages:$}=t.options,L=U?LL:IL;return{pages:L(k.pages,M,$),pageParams:L(k.pageParams,R,$)}};if(s&&o.length){const k=s==="backward",R=k?YL:q2,U={pages:o,pageParams:l},I=R(r,U);c=await N(U,I,k)}else{const k=e??o.length;do{const R=f===0?l[0]??r.initialPageParam:q2(r,c);if(f>0&&R==null)break;c=await N(c,R),f++}while(f<k)}return c};t.options.persister?t.fetchFn=()=>{var w,C;return(C=(w=t.options).persister)==null?void 0:C.call(w,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=d}}}function q2(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 YL(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 bf,ki,Yn,mo,Ni,Zs,s3,GL=(s3=class extends g3{constructor(t){super();je(this,Ni);je(this,bf);je(this,ki);je(this,Yn);je(this,mo);Ae(this,bf,t.client),this.mutationId=t.mutationId,Ae(this,Yn,t.mutationCache),Ae(this,ki,[]),this.state=t.state||x3(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){Q(this,ki).includes(t)||(Q(this,ki).push(t),this.clearGcTimeout(),Q(this,Yn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Ae(this,ki,Q(this,ki).filter(n=>n!==t)),this.scheduleGc(),Q(this,Yn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){Q(this,ki).length||(this.state.status==="pending"?this.scheduleGc():Q(this,Yn).remove(this))}continue(){var t;return((t=Q(this,mo))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,c,f,d,m,p,b,x,S,w,C,A,N,k,R,U,I,j;const n=()=>{at(this,Ni,Zs).call(this,{type:"continue"})},r={client:Q(this,bf),meta:this.options.meta,mutationKey:this.options.mutationKey};Ae(this,mo,p3({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(M,$)=>{at(this,Ni,Zs).call(this,{type:"failed",failureCount:M,error:$})},onPause:()=>{at(this,Ni,Zs).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>Q(this,Yn).canRun(this)}));const s=this.state.status==="pending",o=!Q(this,mo).canStart();try{if(s)n();else{at(this,Ni,Zs).call(this,{type:"pending",variables:t,isPaused:o}),Q(this,Yn).config.onMutate&&await Q(this,Yn).config.onMutate(t,this,r);const $=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t,r));$!==this.state.context&&at(this,Ni,Zs).call(this,{type:"pending",context:$,variables:t,isPaused:o})}const M=await Q(this,mo).start();return await((d=(f=Q(this,Yn).config).onSuccess)==null?void 0:d.call(f,M,t,this.state.context,this,r)),await((p=(m=this.options).onSuccess)==null?void 0:p.call(m,M,t,this.state.context,r)),await((x=(b=Q(this,Yn).config).onSettled)==null?void 0:x.call(b,M,null,this.state.variables,this.state.context,this,r)),await((w=(S=this.options).onSettled)==null?void 0:w.call(S,M,null,t,this.state.context,r)),at(this,Ni,Zs).call(this,{type:"success",data:M}),M}catch(M){try{await((A=(C=Q(this,Yn).config).onError)==null?void 0:A.call(C,M,t,this.state.context,this,r))}catch($){Promise.reject($)}try{await((k=(N=this.options).onError)==null?void 0:k.call(N,M,t,this.state.context,r))}catch($){Promise.reject($)}try{await((U=(R=Q(this,Yn).config).onSettled)==null?void 0:U.call(R,void 0,M,this.state.variables,this.state.context,this,r))}catch($){Promise.reject($)}try{await((j=(I=this.options).onSettled)==null?void 0:j.call(I,void 0,M,t,this.state.context,r))}catch($){Promise.reject($)}throw at(this,Ni,Zs).call(this,{type:"error",error:M}),M}finally{Q(this,Yn).runNext(this)}}},bf=new WeakMap,ki=new WeakMap,Yn=new WeakMap,mo=new WeakMap,Ni=new WeakSet,Zs=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),Nn.batch(()=>{Q(this,ki).forEach(r=>{r.onMutationUpdate(t)}),Q(this,Yn).notify({mutation:this,type:"updated",action:t})})},s3);function x3(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var gs,hi,yf,a3,QL=(a3=class extends au{constructor(t={}){super();je(this,gs);je(this,hi);je(this,yf);this.config=t,Ae(this,gs,new Set),Ae(this,hi,new Map),Ae(this,yf,0)}build(t,n,r){const s=new GL({client:t,mutationCache:this,mutationId:++th(this,yf)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){Q(this,gs).add(t);const n=nh(t);if(typeof n=="string"){const r=Q(this,hi).get(n);r?r.push(t):Q(this,hi).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(Q(this,gs).delete(t)){const n=nh(t);if(typeof n=="string"){const r=Q(this,hi).get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&Q(this,hi).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=nh(t);if(typeof n=="string"){const r=Q(this,hi).get(n),s=r==null?void 0:r.find(o=>o.state.status==="pending");return!s||s===t}else return!0}runNext(t){var r;const n=nh(t);if(typeof n=="string"){const s=(r=Q(this,hi).get(n))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Nn.batch(()=>{Q(this,gs).forEach(t=>{this.notify({type:"removed",mutation:t})}),Q(this,gs).clear(),Q(this,hi).clear()})}getAll(){return Array.from(Q(this,gs))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>P2(n,r))}findAll(t={}){return this.getAll().filter(n=>P2(t,n))}notify(t){Nn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Nn.batch(()=>Promise.all(t.map(n=>n.continue().catch(ir))))}},gs=new WeakMap,hi=new WeakMap,yf=new WeakMap,a3);function nh(e){var t;return(t=e.options.scope)==null?void 0:t.id}var bs,fa,Tr,ys,Es,Dh,ub,o3,KL=(o3=class extends au{constructor(n,r){super();je(this,Es);je(this,bs);je(this,fa);je(this,Tr);je(this,ys);Ae(this,bs,n),this.setOptions(r),this.bindMethods(),at(this,Es,Dh).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const r=this.options;this.options=Q(this,bs).defaultMutationOptions(n),Gh(this.options,r)||Q(this,bs).getMutationCache().notify({type:"observerOptionsUpdated",mutation:Q(this,Tr),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&yo(r.mutationKey)!==yo(this.options.mutationKey)?this.reset():((s=Q(this,Tr))==null?void 0:s.state.status)==="pending"&&Q(this,Tr).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=Q(this,Tr))==null||n.removeObserver(this)}onMutationUpdate(n){at(this,Es,Dh).call(this),at(this,Es,ub).call(this,n)}getCurrentResult(){return Q(this,fa)}reset(){var n;(n=Q(this,Tr))==null||n.removeObserver(this),Ae(this,Tr,void 0),at(this,Es,Dh).call(this),at(this,Es,ub).call(this)}mutate(n,r){var s;return Ae(this,ys,r),(s=Q(this,Tr))==null||s.removeObserver(this),Ae(this,Tr,Q(this,bs).getMutationCache().build(Q(this,bs),this.options)),Q(this,Tr).addObserver(this),Q(this,Tr).execute(n)}},bs=new WeakMap,fa=new WeakMap,Tr=new WeakMap,ys=new WeakMap,Es=new WeakSet,Dh=function(){var r;const n=((r=Q(this,Tr))==null?void 0:r.state)??x3();Ae(this,fa,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},ub=function(n){Nn.batch(()=>{var r,s,o,l,c,f,d,m;if(Q(this,ys)&&this.hasListeners()){const p=Q(this,fa).variables,b=Q(this,fa).context,x={client:Q(this,bs),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(s=(r=Q(this,ys)).onSuccess)==null||s.call(r,n.data,p,b,x)}catch(S){Promise.reject(S)}try{(l=(o=Q(this,ys)).onSettled)==null||l.call(o,n.data,null,p,b,x)}catch(S){Promise.reject(S)}}else if((n==null?void 0:n.type)==="error"){try{(f=(c=Q(this,ys)).onError)==null||f.call(c,n.error,p,b,x)}catch(S){Promise.reject(S)}try{(m=(d=Q(this,ys)).onSettled)==null||m.call(d,void 0,n.error,p,b,x)}catch(S){Promise.reject(S)}}}this.listeners.forEach(p=>{p(Q(this,fa))})})},o3),Ri,l3,XL=(l3=class extends au{constructor(t={}){super();je(this,Ri);this.config=t,Ae(this,Ri,new Map)}build(t,n,r){const s=n.queryKey,o=n.queryHash??Cy(s,n);let l=this.get(o);return l||(l=new zL({client:t,queryKey:s,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(l)),l}add(t){Q(this,Ri).has(t.queryHash)||(Q(this,Ri).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=Q(this,Ri).get(t.queryHash);n&&(t.destroy(),n===t&&Q(this,Ri).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Nn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return Q(this,Ri).get(t)}getAll(){return[...Q(this,Ri).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>L2(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>L2(t,r)):n}notify(t){Nn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Nn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Nn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Ri=new WeakMap,l3),an,da,ha,Kl,Xl,ma,Wl,Zl,u3,WL=(u3=class{constructor(e={}){je(this,an);je(this,da);je(this,ha);je(this,Kl);je(this,Xl);je(this,ma);je(this,Wl);je(this,Zl);Ae(this,an,e.queryCache||new XL),Ae(this,da,e.mutationCache||new QL),Ae(this,ha,e.defaultOptions||{}),Ae(this,Kl,new Map),Ae(this,Xl,new Map),Ae(this,ma,0)}mount(){th(this,ma)._++,Q(this,ma)===1&&(Ae(this,Wl,ky.subscribe(async e=>{e&&(await this.resumePausedMutations(),Q(this,an).onFocus())})),Ae(this,Zl,Qh.subscribe(async e=>{e&&(await this.resumePausedMutations(),Q(this,an).onOnline())})))}unmount(){var e,t;th(this,ma)._--,Q(this,ma)===0&&((e=Q(this,Wl))==null||e.call(this),Ae(this,Wl,void 0),(t=Q(this,Zl))==null||t.call(this),Ae(this,Zl,void 0))}isFetching(e){return Q(this,an).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return Q(this,da).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=Q(this,an).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=Q(this,an).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ba(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return Q(this,an).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=Q(this,an).get(r.queryHash),o=s==null?void 0:s.state.data,l=DL(t,o);if(l!==void 0)return Q(this,an).build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return Nn.batch(()=>Q(this,an).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=Q(this,an).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=Q(this,an);Nn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=Q(this,an);return Nn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Nn.batch(()=>Q(this,an).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(ir).catch(ir)}invalidateQueries(e,t={}){return Nn.batch(()=>(Q(this,an).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=Nn.batch(()=>Q(this,an).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch(ir)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(ir)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=Q(this,an).build(this,t);return n.isStaleByTime(ba(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ir).catch(ir)}fetchInfiniteQuery(e){return e.behavior=V2(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ir).catch(ir)}ensureInfiniteQueryData(e){return e.behavior=V2(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Qh.isOnline()?Q(this,da).resumePausedMutations():Promise.resolve()}getQueryCache(){return Q(this,an)}getMutationCache(){return Q(this,da)}getDefaultOptions(){return Q(this,ha)}setDefaultOptions(e){Ae(this,ha,e)}setQueryDefaults(e,t){Q(this,Kl).set(yo(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...Q(this,Kl).values()],n={};return t.forEach(r=>{Xc(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){Q(this,Xl).set(yo(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...Q(this,Xl).values()],n={};return t.forEach(r=>{Xc(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...Q(this,ha).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Cy(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===Ay&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...Q(this,ha).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){Q(this,an).clear(),Q(this,da).clear()}},an=new WeakMap,da=new WeakMap,ha=new WeakMap,Kl=new WeakMap,Xl=new WeakMap,ma=new WeakMap,Wl=new WeakMap,Zl=new WeakMap,u3),E3=E.createContext(void 0),Ef=e=>{const t=E.useContext(E3);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ZL=({client:e,children:t})=>(E.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),g.jsx(E3.Provider,{value:e,children:t})),v3=E.createContext(!1),JL=()=>E.useContext(v3);v3.Provider;function eP(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var tP=E.createContext(eP()),nP=()=>E.useContext(tP),rP=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?_y(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},iP=e=>{E.useEffect(()=>{e.clearReset()},[e])},sP=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||_y(n,[e.error,r])),aP=e=>{if(e.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...s)=>n(r(...s)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},oP=(e,t)=>e.isLoading&&e.isFetching&&!t,lP=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,$2=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function uP(e,t,n){var b,x,S,w;const r=JL(),s=nP(),o=Ef(),l=o.defaultQueryOptions(e);(x=(b=o.getDefaultOptions().queries)==null?void 0:b._experimental_beforeQuery)==null||x.call(b,l);const c=o.getQueryCache().get(l.queryHash);l._optimisticResults=r?"isRestoring":"optimistic",aP(l),rP(l,s,c),iP(s);const f=!o.getQueryCache().get(l.queryHash),[d]=E.useState(()=>new t(o,l)),m=d.getOptimisticResult(l),p=!r&&e.subscribed!==!1;if(E.useSyncExternalStore(E.useCallback(C=>{const A=p?d.subscribe(Nn.batchCalls(C)):ir;return d.updateResult(),A},[d,p]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),E.useEffect(()=>{d.setOptions(l)},[l,d]),lP(l,m))throw $2(l,d,s);if(sP({result:m,errorResetBoundary:s,throwOnError:l.throwOnError,query:c,suspense:l.suspense}))throw m.error;if((w=(S=o.getDefaultOptions().queries)==null?void 0:S._experimental_afterQuery)==null||w.call(S,l,m),l.experimental_prefetchInRender&&!bo&&oP(m,r)){const C=f?$2(l,d,s):c==null?void 0:c.promise;C==null||C.catch(ir).finally(()=>{d.updateResult()})}return l.notifyOnChangeProps?m:d.trackResult(m)}function zi(e,t){return uP(e,VL)}function cP(e,t){const n=Ef(),[r]=E.useState(()=>new KL(n,e));E.useEffect(()=>{r.setOptions(e)},[r,e]);const s=E.useSyncExternalStore(E.useCallback(l=>r.subscribe(Nn.batchCalls(l)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=E.useCallback((l,c)=>{r.mutate(l,c).catch(ir)},[r]);if(s.error&&_y(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:o,mutateAsync:s.mutate}}const Ry=hP();function Zt(e,...t){if(!Ry)return;const n=dP(e,...t);performance.mark(n);try{console.log(e,...t)}catch{console.log(n)}}function fP(e,...t){Ry&&console.warn(e,...t)}function dP(e,...t){return e.replace(/%[sfdO]/g,n=>{const r=t.shift();return n==="%O"&&r?JSON.stringify(r).replace(/"([^"]+)":/g,"$1:"):String(r)})}function hP(){try{const e="nuqs-localStorage-test";if(typeof localStorage>"u")return!1;localStorage.setItem(e,e);const t=localStorage.getItem(e)===e;return localStorage.removeItem(e),t&&(localStorage.getItem("debug")||"").includes("nuqs")}catch{return!1}}const mP={303:"Multiple adapter contexts detected. This might happen in monorepos.",404:"nuqs requires an adapter to work with your framework.",409:"Multiple versions of the library are loaded. This may lead to unexpected behavior. Currently using `%s`, but `%s` (via the %s adapter) was about to load on top.",414:"Max safe URL length exceeded. Some browsers may not be able to accept this URL. Consider limiting the amount of state stored in the URL.",422:"Invalid options combination: `limitUrlUpdates: debounce` should be used in SSR scenarios, with `shallow: false`",429:"URL update rate-limited by the browser. Consider increasing `throttleMs` for key(s) `%s`. %O",500:"Empty search params cache. Search params can't be accessed in Layouts.",501:"Search params cache already populated. Have you called `parse` twice?"};function vf(e){return`[nuqs] ${mP[e]}
50
+ See https://nuqs.dev/NUQS-${e}`}function pP(e){if(e.size===0)return"";const t=[];for(const[r,s]of e.entries()){const o=r.replace(/#/g,"%23").replace(/&/g,"%26").replace(/\+/g,"%2B").replace(/=/g,"%3D").replace(/\?/g,"%3F");t.push(`${o}=${gP(s)}`)}return"?"+t.join("&")}function gP(e){return e.replace(/%/g,"%25").replace(/\+/g,"%2B").replace(/ /g,"+").replace(/#/g,"%23").replace(/&/g,"%26").replace(/"/g,"%22").replace(/'/g,"%27").replace(/`/g,"%60").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/[\x00-\x1F]/g,t=>encodeURIComponent(t))}const xo=E.createContext({useAdapter(){throw new Error(vf(404))}});xo.displayName="NuqsAdapterContext";Ry&&typeof window<"u"&&(window.__NuqsAdapterContext&&window.__NuqsAdapterContext!==xo&&console.error(vf(303)),window.__NuqsAdapterContext=xo);function bP(e){return({children:t,defaultOptions:n,processUrlSearchParams:r,...s})=>E.createElement(xo.Provider,{...s,value:{useAdapter:e,defaultOptions:n,processUrlSearchParams:r}},t)}function yP(e){const t=E.useContext(xo);if(!("useAdapter"in t))throw new Error(vf(404));return t.useAdapter(e)}const xP=()=>E.useContext(xo).defaultOptions,EP=()=>E.useContext(xo).processUrlSearchParams;function vP(){var e;if(typeof window>"u"||!window.GestureEvent)return 50;try{const t=(e=navigator.userAgent)==null?void 0:e.match(/version\/([\d\.]+) safari/i);return parseFloat(t[1])>=17?120:320}catch{return 320}}function TP(e){return{method:"throttle",timeMs:e}}const Mc=TP(vP());function SP(e){return e===null||Array.isArray(e)&&e.length===0}function wP(e,t,n){if(typeof e=="string")n.set(t,e);else{n.delete(t);for(const r of e)n.append(t,r);n.has(t)||n.set(t,"")}return n}function Dy(){const e=new Map;return{on(t,n){const r=e.get(t)||[];return r.push(n),e.set(t,r),()=>this.off(t,n)},off(t,n){const r=e.get(t);r&&e.set(t,r.filter(s=>s!==n))},emit(t,n){var r;(r=e.get(t))==null||r.forEach(s=>s(n))}}}function cb(e,t,n){function r(){e(),n.removeEventListener("abort",o)}const s=setTimeout(r,t);function o(){clearTimeout(s),n.removeEventListener("abort",o)}n.addEventListener("abort",o)}function fb(){const e=Promise;if(Promise.hasOwnProperty("withResolvers"))return Promise.withResolvers();let t=()=>{},n=()=>{};return{promise:new e((r,s)=>{t=r,n=s}),resolve:t,reject:n}}function CP(e,t){let n=t;for(let r=e.length-1;r>=0;r--){const s=e[r];if(!s)continue;const o=n;n=()=>s(o)}n()}function db(){return new URLSearchParams(location.search)}var T3=class{constructor(){qe(this,"updateMap",new Map);qe(this,"options",{history:"replace",scroll:!1,shallow:!0});qe(this,"timeMs",Mc.timeMs);qe(this,"transitions",new Set);qe(this,"resolvers",null);qe(this,"controller",null);qe(this,"lastFlushedAt",0);qe(this,"resetQueueOnNextPush",!1)}push({key:e,query:t,options:n},r=Mc.timeMs){this.resetQueueOnNextPush&&(this.reset(),this.resetQueueOnNextPush=!1),Zt("[nuqs gtq] Enqueueing %s=%s %O",e,t,n),this.updateMap.set(e,t),n.history==="push"&&(this.options.history="push"),n.scroll&&(this.options.scroll=!0),n.shallow===!1&&(this.options.shallow=!1),n.startTransition&&this.transitions.add(n.startTransition),(!Number.isFinite(this.timeMs)||r>this.timeMs)&&(this.timeMs=r)}getQueuedQuery(e){return this.updateMap.get(e)}getPendingPromise({getSearchParamsSnapshot:e=db}){var t;return((t=this.resolvers)==null?void 0:t.promise)??Promise.resolve(e())}flush({getSearchParamsSnapshot:e=db,rateLimitFactor:t=1,...n},r){if(this.controller??(this.controller=new AbortController),!Number.isFinite(this.timeMs))return Zt("[nuqs gtq] Skipping flush due to throttleMs=Infinity"),Promise.resolve(e());if(this.resolvers)return this.resolvers.promise;this.resolvers=fb();const s=()=>{this.lastFlushedAt=performance.now();const[l,c]=this.applyPendingUpdates({...n,autoResetQueueOnUpdate:n.autoResetQueueOnUpdate??!0,getSearchParamsSnapshot:e},r);c===null?(this.resolvers.resolve(l),this.resetQueueOnNextPush=!0):this.resolvers.reject(l),this.resolvers=null};return cb(()=>{const l=performance.now()-this.lastFlushedAt,c=this.timeMs,f=t*Math.max(0,c-l);Zt("[nuqs gtq] Scheduling flush in %f ms. Throttled at %f ms (x%f)",f,c,t),f===0?s():cb(s,f,this.controller.signal)},0,this.controller.signal),this.resolvers.promise}abort(){var e,t;return(e=this.controller)==null||e.abort(),this.controller=new AbortController,(t=this.resolvers)==null||t.resolve(new URLSearchParams),this.resolvers=null,this.reset()}reset(){const e=Array.from(this.updateMap.keys());return Zt("[nuqs gtq] Resetting queue %s",JSON.stringify(Object.fromEntries(this.updateMap))),this.updateMap.clear(),this.transitions.clear(),this.options={history:"replace",scroll:!1,shallow:!0},this.timeMs=Mc.timeMs,e}applyPendingUpdates(e,t){const{updateUrl:n,getSearchParamsSnapshot:r}=e;let s=r();if(Zt("[nuqs gtq] Applying %d pending update(s) on top of %s",this.updateMap.size,s.toString()),this.updateMap.size===0)return[s,null];const o=Array.from(this.updateMap.entries()),l={...this.options},c=Array.from(this.transitions);e.autoResetQueueOnUpdate&&this.reset(),Zt("[nuqs gtq] Flushing queue %O with options %O",o,l);for(const[f,d]of o)d===null?s.delete(f):s=wP(d,f,s);t&&(s=t(s));try{return CP(c,()=>{n(s,l)}),[s,null]}catch(f){return console.error(vf(429),o.map(([d])=>d).join(),f),[s,f]}}};const Oh=new T3;function AP(e,t,n){const r=E.useCallback(()=>{const o=Object.fromEntries(e.map(l=>[l,n(l)]));return[JSON.stringify(o),o]},[e.join(","),n]),s=E.useRef(null);return s.current===null&&(s.current=r()),E.useSyncExternalStore(E.useCallback(o=>{const l=e.map(c=>t(c,o));return()=>l.forEach(c=>c())},[e.join(","),t]),()=>{const[o,l]=r();return s.current[0]===o?s.current[1]:(s.current=[o,l],l)},()=>s.current[1])}var _P=class{constructor(e){qe(this,"callback");qe(this,"resolvers",fb());qe(this,"controller",new AbortController);qe(this,"queuedValue");this.callback=e}abort(){this.controller.abort(),this.queuedValue=void 0}push(e,t){return this.queuedValue=e,this.controller.abort(),this.controller=new AbortController,cb(()=>{const n=this.resolvers;try{Zt("[nuqs dq] Flushing debounce queue",e);const r=this.callback(e);Zt("[nuqs dq] Reset debounce queue %O",this.queuedValue),this.queuedValue=void 0,this.resolvers=fb(),r.then(s=>n.resolve(s)).catch(s=>n.reject(s))}catch(r){this.queuedValue=void 0,n.reject(r)}},t,this.controller.signal),this.resolvers.promise}},kP=class{constructor(e=new T3){qe(this,"throttleQueue");qe(this,"queues",new Map);qe(this,"queuedQuerySync",Dy());this.throttleQueue=e}useQueuedQueries(e){return AP(e,(t,n)=>this.queuedQuerySync.on(t,n),t=>this.getQueuedQuery(t))}push(e,t,n,r){if(!Number.isFinite(t)){const l=n.getSearchParamsSnapshot??db;return Promise.resolve(l())}const s=e.key;if(!this.queues.has(s)){Zt("[nuqs dqc] Creating debounce queue for `%s`",s);const l=new _P(c=>(this.throttleQueue.push(c),this.throttleQueue.flush(n,r).finally(()=>{var f;((f=this.queues.get(c.key))==null?void 0:f.queuedValue)===void 0&&(Zt("[nuqs dqc] Cleaning up empty queue for `%s`",c.key),this.queues.delete(c.key)),this.queuedQuerySync.emit(c.key)})));this.queues.set(s,l)}Zt("[nuqs dqc] Enqueueing debounce update %O",e);const o=this.queues.get(s).push(e,t);return this.queuedQuerySync.emit(s),o}abort(e){var n;const t=this.queues.get(e);return t?(Zt("[nuqs dqc] Aborting debounce queue %s=%s",e,(n=t.queuedValue)==null?void 0:n.query),this.queues.delete(e),t.abort(),this.queuedQuerySync.emit(e),r=>(r.then(t.resolvers.resolve,t.resolvers.reject),r)):r=>r}abortAll(){var e;for(const[t,n]of this.queues.entries())Zt("[nuqs dqc] Aborting debounce queue %s=%s",t,(e=n.queuedValue)==null?void 0:e.query),n.abort(),n.resolvers.resolve(new URLSearchParams),this.queuedQuerySync.emit(t);this.queues.clear()}getQueuedQuery(e){var n,r;const t=(r=(n=this.queues.get(e))==null?void 0:n.queuedValue)==null?void 0:r.query;return t!==void 0?t:this.throttleQueue.getQueuedQuery(e)}};const Mg=new kP(Oh);function S3(e,t){return e===t?!0:e===null||t===null||typeof e=="string"||typeof t=="string"||e.length!==t.length?!1:e.every((n,r)=>n===t[r])}function Y2(e,t,n){return r=>{if(!(t.length===0||t.some(o=>!S3(r.getAll(o),e.getAll(o)))))return Zt("[nuqs `%s`] no change, returning previous",t.join(","),r),r;const s=w3(e,t,n);return Zt("[nuqs `%s`] subbed search params change\n from %O\n to %O",t.join(","),r,s),s}}function w3(e,t,n){if(t.length===0)return e;const r=n?new URLSearchParams(e):e;for(const s of e.keys())t.includes(s)||r.delete(s);return r}const NP="__nuqs__",hb=Dy();function RP(e){return function(n,r){const s=new URL(location.href);s.search=pP(n),Zt("[nuqs react] Updating url: %s",s),e&&r.shallow===!1?(r.history==="push"?location.assign:location.replace).call(location,s):(r.history==="push"?history.pushState:history.replaceState).call(history,history.state,NP,s),hb.emit("update",n),r.scroll===!0&&window.scrollTo({top:0})}}const C3=E.createContext({fullPageNavigationOnShallowFalseUpdates:!1});function DP(e){const{fullPageNavigationOnShallowFalseUpdates:t}=E.useContext(C3),[n,r]=E.useState(()=>typeof location>"u"?new URLSearchParams:w3(new URLSearchParams(location.search),e,!1));return E.useEffect(()=>{const s=()=>{r(Y2(new URLSearchParams(location.search),e,!1))},o=l=>{r(Y2(l,e,!0))};return hb.on("update",o),window.addEventListener("popstate",s),()=>{hb.off("update",o),window.removeEventListener("popstate",s)}},[e.join("&")]),{searchParams:n,updateUrl:E.useMemo(()=>RP(t),[t])}}const OP=bP(DP);function MP({children:e,fullPageNavigationOnShallowFalseUpdates:t=!1,...n}){return E.createElement(C3.Provider,{value:{fullPageNavigationOnShallowFalseUpdates:t}},E.createElement(OP,{...n,children:e}))}const G2=e=>{let t;const n=new Set,r=(d,m)=>{const p=typeof d=="function"?d(t):d;if(!Object.is(p,t)){const b=t;t=m??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(x=>x(t,b))}},s=()=>t,c={setState:r,getState:s,getInitialState:()=>f,subscribe:d=>(n.add(d),()=>n.delete(d))},f=t=e(r,s,c);return c},IP=(e=>e?G2(e):G2),LP=e=>e;function PP(e,t=LP){const n=Ce.useSyncExternalStore(e.subscribe,Ce.useCallback(()=>t(e.getState()),[e,t]),Ce.useCallback(()=>t(e.getInitialState()),[e,t]));return Ce.useDebugValue(n),n}const jP=e=>{const t=IP(e),n=r=>PP(t,r);return Object.assign(n,t),n},BP=(e=>jP),Q2={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},K2=e=>!!e.dispatchFromDevtools&&typeof e.dispatch=="function",Wc=new Map,rh=e=>{const t=Wc.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,r])=>[n,r.getState()])):{}},FP=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const r=Wc.get(n.name);if(r)return{type:"tracked",store:e,...r};const s={connection:t.connect(n),stores:{}};return Wc.set(n.name,s),{type:"tracked",store:e,...s}},UP=(e,t)=>{if(t===void 0)return;const n=Wc.get(e);n&&(delete n.stores[t],Object.keys(n.stores).length===0&&Wc.delete(e))},HP=e=>{var t,n;if(!e)return;const r=e.split(`
51
+ `),s=r.findIndex(l=>l.includes("api.setState"));if(s<0)return;const o=((t=r[s+1])==null?void 0:t.trim())||"";return(n=/.+ (.+) .+/.exec(o))==null?void 0:n[1]},zP=(e,t={})=>(n,r,s)=>{const{enabled:o,anonymousActionType:l,store:c,...f}=t;let d;try{d=(o??(Q2?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!d)return e(n,r,s);const{connection:m,...p}=FP(c,d,f);let b=!0;s.setState=((w,C,A)=>{const N=n(w,C);if(!b)return N;const k=A===void 0?{type:l||HP(new Error().stack)||"anonymous"}:typeof A=="string"?{type:A}:A;return c===void 0?(m==null||m.send(k,r()),N):(m==null||m.send({...k,type:`${c}/${k.type}`},{...rh(f.name),[c]:s.getState()}),N)}),s.devtools={cleanup:()=>{m&&typeof m.unsubscribe=="function"&&m.unsubscribe(),UP(f.name,c)}};const x=(...w)=>{const C=b;b=!1,n(...w),b=C},S=e(s.setState,r,s);if(p.type==="untracked"?m==null||m.init(S):(p.stores[p.store]=s,m==null||m.init(Object.fromEntries(Object.entries(p.stores).map(([w,C])=>[w,w===p.store?S:C.getState()])))),K2(s)){let w=!1;const C=s.dispatch;s.dispatch=(...A)=>{(Q2?"production":void 0)!=="production"&&A[0].type==="__setState"&&!w&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),w=!0),C(...A)}}return m.subscribe(w=>{var C;switch(w.type){case"ACTION":if(typeof w.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Ig(w.payload,A=>{if(A.type==="__setState"){if(c===void 0){x(A.state);return}Object.keys(A.state).length!==1&&console.error(`
52
+ [zustand devtools middleware] Unsupported __setState action format.
53
+ When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
54
+ and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
55
+ `);const N=A.state[c];if(N==null)return;JSON.stringify(s.getState())!==JSON.stringify(N)&&x(N);return}K2(s)&&s.dispatch(A)});case"DISPATCH":switch(w.payload.type){case"RESET":return x(S),c===void 0?m==null?void 0:m.init(s.getState()):m==null?void 0:m.init(rh(f.name));case"COMMIT":if(c===void 0){m==null||m.init(s.getState());return}return m==null?void 0:m.init(rh(f.name));case"ROLLBACK":return Ig(w.state,A=>{if(c===void 0){x(A),m==null||m.init(s.getState());return}x(A[c]),m==null||m.init(rh(f.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Ig(w.state,A=>{if(c===void 0){x(A);return}JSON.stringify(s.getState())!==JSON.stringify(A[c])&&x(A[c])});case"IMPORT_STATE":{const{nextLiftedState:A}=w.payload,N=(C=A.computedStates.slice(-1)[0])==null?void 0:C.state;if(!N)return;x(c===void 0?N:N[c]),m==null||m.send(null,A);return}case"PAUSE_RECORDING":return b=!b}return}}),S},VP=zP,Ig=(e,t)=>{let n;try{n=JSON.parse(e)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&t(n)},Kh=[{key:"system",displayName:"System Default",description:"Native platform fonts",sans:"system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",mono:"ui-monospace, 'SF Mono', 'Cascadia Code', 'Fira Code', Menlo, Consolas, monospace",googleFontsUrl:null},{key:"inter",displayName:"Inter",description:"Inter + JetBrains Mono",sans:"'Inter', system-ui, sans-serif",mono:"'JetBrains Mono', ui-monospace, monospace",googleFontsUrl:"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono&display=swap"},{key:"geist",displayName:"Geist",description:"Geist + Geist Mono",sans:"'Geist', system-ui, sans-serif",mono:"'Geist Mono', ui-monospace, monospace",googleFontsUrl:"https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600&family=Geist+Mono&display=swap"},{key:"ibm-plex",displayName:"IBM Plex",description:"IBM Plex Sans + IBM Plex Mono",sans:"'IBM Plex Sans', system-ui, sans-serif",mono:"'IBM Plex Mono', ui-monospace, monospace",googleFontsUrl:"https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono&display=swap"},{key:"roboto",displayName:"Roboto",description:"Roboto + Roboto Mono",sans:"'Roboto', system-ui, sans-serif",mono:"'Roboto Mono', ui-monospace, monospace",googleFontsUrl:"https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Roboto+Mono&display=swap"},{key:"source",displayName:"Source",description:"Source Sans 3 + Source Code Pro",sans:"'Source Sans 3', system-ui, sans-serif",mono:"'Source Code Pro', ui-monospace, monospace",googleFontsUrl:"https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;500;600&family=Source+Code+Pro&display=swap"},{key:"fira",displayName:"Fira",description:"Fira Sans + Fira Code",sans:"'Fira Sans', system-ui, sans-serif",mono:"'Fira Code', ui-monospace, monospace",googleFontsUrl:"https://fonts.googleapis.com/css2?family=Fira+Sans:wght@400;500;600&family=Fira+Code&display=swap"},{key:"space",displayName:"Space",description:"Space Grotesk + Space Mono",sans:"'Space Grotesk', system-ui, sans-serif",mono:"'Space Mono', ui-monospace, monospace",googleFontsUrl:"https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600&family=Space+Mono&display=swap"}],Ac="inter";function Lg(e){return Kh.find(t=>t.key===e)??Kh.find(t=>t.key===Ac)}function qP(e){return Kh.some(t=>t.key===e)}const mb="google-fonts-link";function Pg(e){let t=document.getElementById(mb);t?t.href=e:(t=document.createElement("link"),t.id=mb,t.rel="stylesheet",t.href=e,document.head.appendChild(t))}function $P(){var e;(e=document.getElementById(mb))==null||e.remove()}function jg(e,t){document.documentElement.style.setProperty("--font-sans",e),document.documentElement.style.setProperty("--font-mono",t)}function YP(){document.documentElement.style.removeProperty("--font-sans"),document.documentElement.style.removeProperty("--font-mono")}const Jt=BP()(VP(e=>({sidebarOpen:!1,toggleSidebar:()=>e(t=>({sidebarOpen:!t.sidebarOpen})),setSidebarOpen:t=>e({sidebarOpen:t}),sessionId:null,setSessionId:t=>e({sessionId:t}),selectedCwd:null,setSelectedCwd:t=>e(n=>{const s=[{path:t,accessedAt:new Date().toISOString()},...n.recentCwds.filter(o=>o.path!==t)].slice(0,10);try{localStorage.setItem("gateway-recent-cwds",JSON.stringify(s))}catch{}return{selectedCwd:t,recentCwds:s}}),recentCwds:(()=>{try{return JSON.parse(localStorage.getItem("gateway-recent-cwds")||"[]").map(n=>typeof n=="string"?{path:n,accessedAt:new Date().toISOString()}:n)}catch{return[]}})(),devtoolsOpen:!1,toggleDevtools:()=>e(t=>({devtoolsOpen:!t.devtoolsOpen})),showTimestamps:(()=>{try{return localStorage.getItem("gateway-show-timestamps")==="true"}catch{return!1}})(),setShowTimestamps:t=>{try{localStorage.setItem("gateway-show-timestamps",String(t))}catch{}e({showTimestamps:t})},expandToolCalls:(()=>{try{return localStorage.getItem("gateway-expand-tool-calls")==="true"}catch{return!1}})(),setExpandToolCalls:t=>{try{localStorage.setItem("gateway-expand-tool-calls",String(t))}catch{}e({expandToolCalls:t})},autoHideToolCalls:(()=>{try{const t=localStorage.getItem("gateway-auto-hide-tool-calls");return t===null?!0:t==="true"}catch{return!0}})(),setAutoHideToolCalls:t=>{try{localStorage.setItem("gateway-auto-hide-tool-calls",String(t))}catch{}e({autoHideToolCalls:t})},showShortcutChips:(()=>{try{const t=localStorage.getItem("gateway-show-shortcut-chips");return t===null?!0:t==="true"}catch{return!0}})(),setShowShortcutChips:t=>{try{localStorage.setItem("gateway-show-shortcut-chips",String(t))}catch{}e({showShortcutChips:t})},showStatusBarCwd:(()=>{try{return localStorage.getItem("gateway-show-status-bar-cwd")!=="false"}catch{return!0}})(),setShowStatusBarCwd:t=>{try{localStorage.setItem("gateway-show-status-bar-cwd",String(t))}catch{}e({showStatusBarCwd:t})},showStatusBarPermission:(()=>{try{return localStorage.getItem("gateway-show-status-bar-permission")!=="false"}catch{return!0}})(),setShowStatusBarPermission:t=>{try{localStorage.setItem("gateway-show-status-bar-permission",String(t))}catch{}e({showStatusBarPermission:t})},showStatusBarModel:(()=>{try{return localStorage.getItem("gateway-show-status-bar-model")!=="false"}catch{return!0}})(),setShowStatusBarModel:t=>{try{localStorage.setItem("gateway-show-status-bar-model",String(t))}catch{}e({showStatusBarModel:t})},showStatusBarCost:(()=>{try{return localStorage.getItem("gateway-show-status-bar-cost")!=="false"}catch{return!0}})(),setShowStatusBarCost:t=>{try{localStorage.setItem("gateway-show-status-bar-cost",String(t))}catch{}e({showStatusBarCost:t})},showStatusBarContext:(()=>{try{return localStorage.getItem("gateway-show-status-bar-context")!=="false"}catch{return!0}})(),setShowStatusBarContext:t=>{try{localStorage.setItem("gateway-show-status-bar-context",String(t))}catch{}e({showStatusBarContext:t})},showStatusBarGit:(()=>{try{return localStorage.getItem("gateway-show-status-bar-git")!=="false"}catch{return!0}})(),setShowStatusBarGit:t=>{try{localStorage.setItem("gateway-show-status-bar-git",String(t))}catch{}e({showStatusBarGit:t})},showTaskCelebrations:(()=>{try{return localStorage.getItem("gateway-show-task-celebrations")!=="false"}catch{return!0}})(),setShowTaskCelebrations:t=>{try{localStorage.setItem("gateway-show-task-celebrations",String(t))}catch{}e({showTaskCelebrations:t})},enableNotificationSound:(()=>{try{return localStorage.getItem("gateway-enable-notification-sound")!=="false"}catch{return!0}})(),setEnableNotificationSound:t=>{try{localStorage.setItem("gateway-enable-notification-sound",String(t))}catch{}e({enableNotificationSound:t})},showStatusBarSound:(()=>{try{return localStorage.getItem("gateway-show-status-bar-sound")!=="false"}catch{return!0}})(),setShowStatusBarSound:t=>{try{localStorage.setItem("gateway-show-status-bar-sound",String(t))}catch{}e({showStatusBarSound:t})},verboseLogging:(()=>{try{return localStorage.getItem("gateway-verbose-logging")==="true"}catch{return!1}})(),setVerboseLogging:t=>{try{localStorage.setItem("gateway-verbose-logging",String(t))}catch{}e({verboseLogging:t})},fontSize:(()=>{try{const t=localStorage.getItem("gateway-font-size");if(t==="small"||t==="medium"||t==="large"){const n={small:"0.9",medium:"1",large:"1.15"};return document.documentElement.style.setProperty("--user-font-scale",n[t]),t}}catch{}return"medium"})(),setFontSize:t=>{try{localStorage.setItem("gateway-font-size",t)}catch{}const n={small:"0.9",medium:"1",large:"1.15"};document.documentElement.style.setProperty("--user-font-scale",n[t]),e({fontSize:t})},fontFamily:(()=>{try{const t=localStorage.getItem("gateway-font-family"),n=qP(t??"")?t:Ac,r=Lg(n);return r.googleFontsUrl&&Pg(r.googleFontsUrl),r.key!=="system"&&jg(r.sans,r.mono),n}catch{return Ac}})(),setFontFamily:t=>{try{localStorage.setItem("gateway-font-family",t)}catch{}const n=Lg(t);n.googleFontsUrl?Pg(n.googleFontsUrl):$P(),n.key!=="system"?jg(n.sans,n.mono):YP(),e({fontFamily:t})},resetPreferences:()=>{try{localStorage.removeItem("gateway-show-timestamps"),localStorage.removeItem("gateway-expand-tool-calls"),localStorage.removeItem("gateway-auto-hide-tool-calls"),localStorage.removeItem("gateway-show-shortcut-chips"),localStorage.removeItem("gateway-verbose-logging"),localStorage.removeItem("gateway-font-size"),localStorage.removeItem("gateway-show-status-bar-cwd"),localStorage.removeItem("gateway-show-status-bar-permission"),localStorage.removeItem("gateway-show-status-bar-model"),localStorage.removeItem("gateway-show-status-bar-cost"),localStorage.removeItem("gateway-show-status-bar-context"),localStorage.removeItem("gateway-show-status-bar-git"),localStorage.removeItem("gateway-show-task-celebrations"),localStorage.removeItem("gateway-enable-notification-sound"),localStorage.removeItem("gateway-show-status-bar-sound"),localStorage.removeItem("gateway-font-family")}catch{}document.documentElement.style.setProperty("--user-font-scale","1");const t=Lg(Ac);t.googleFontsUrl&&Pg(t.googleFontsUrl),jg(t.sans,t.mono),e({showTimestamps:!1,expandToolCalls:!1,autoHideToolCalls:!0,showShortcutChips:!0,verboseLogging:!1,devtoolsOpen:!1,fontSize:"medium",fontFamily:Ac,showStatusBarCwd:!0,showStatusBarPermission:!0,showStatusBarModel:!0,showStatusBarCost:!0,showStatusBarContext:!0,showStatusBarGit:!0,showTaskCelebrations:!0,enableNotificationSound:!0,showStatusBarSound:!0})},isStreaming:!1,setIsStreaming:t=>e({isStreaming:t}),isWaitingForUser:!1,setIsWaitingForUser:t=>e({isWaitingForUser:t}),activeForm:null,setActiveForm:t=>e({activeForm:t}),contextFiles:[],addContextFile:t=>e(n=>n.contextFiles.some(r=>r.path===t.path)?n:{contextFiles:[...n.contextFiles,{...t,id:crypto.randomUUID()}]}),removeContextFile:t=>e(n=>({contextFiles:n.contextFiles.filter(r=>r.id!==t)})),clearContextFiles:()=>e({contextFiles:[]})}),{name:"app-store"}));function A3(e,t,n){try{return e(t)}catch(r){return fP("[nuqs] Error while parsing value `%s`: %O"+(n?" (for key `%s`)":""),t,r,n),null}}function ws(e){function t(n){if(typeof n>"u")return null;let r="";if(Array.isArray(n)){if(n[0]===void 0)return null;r=n[0]}return typeof n=="string"&&(r=n),A3(e.parse,r)}return{type:"single",eq:(n,r)=>n===r,...e,parseServerSide:t,withDefault(n){return{...this,defaultValue:n,parseServerSide(r){return t(r)??n}}},withOptions(n){return{...this,...n}}}}ws({parse:e=>e,serialize:String});ws({parse:e=>{const t=parseInt(e);return t==t?t:null},serialize:e=>""+Math.round(e)});ws({parse:e=>{const t=parseInt(e);return t==t?t-1:null},serialize:e=>""+Math.round(e+1)});ws({parse:e=>{const t=parseInt(e,16);return t==t?t:null},serialize:e=>{const t=Math.round(e).toString(16);return(t.length&1?"0":"")+t}});ws({parse:e=>{const t=parseFloat(e);return t==t?t:null},serialize:String});ws({parse:e=>e.toLowerCase()==="true",serialize:String});function Oy(e,t){return e.valueOf()===t.valueOf()}ws({parse:e=>{const t=parseInt(e);return t==t?new Date(t):null},serialize:e=>""+e.valueOf(),eq:Oy});ws({parse:e=>{const t=new Date(e);return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString(),eq:Oy});ws({parse:e=>{const t=new Date(e.slice(0,10));return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString().slice(0,10),eq:Oy});const Bg=Dy(),GP={};function QP(e,t={}){const n=E.useId(),r=xP(),s=EP(),{history:o="replace",scroll:l=(r==null?void 0:r.scroll)??!1,shallow:c=(r==null?void 0:r.shallow)??!0,throttleMs:f=Mc.timeMs,limitUrlUpdates:d=r==null?void 0:r.limitUrlUpdates,clearOnDefault:m=(r==null?void 0:r.clearOnDefault)??!0,startTransition:p,urlKeys:b=GP}=t,x=Object.keys(e).join(","),S=E.useMemo(()=>Object.fromEntries(Object.keys(e).map(M=>[M,b[M]??M])),[x,JSON.stringify(b)]),w=yP(Object.values(S)),C=w.searchParams,A=E.useRef({}),N=E.useMemo(()=>Object.fromEntries(Object.keys(e).map(M=>[M,e[M].defaultValue??null])),[Object.values(e).map(({defaultValue:M})=>M).join(",")]),k=Mg.useQueuedQueries(Object.values(S)),[R,U]=E.useState(()=>Fg(e,b,C??new URLSearchParams,k).state),I=E.useRef(R);if(Zt("[nuq+ %s `%s`] render - state: %O, iSP: %s",n,x,R,C),Object.keys(A.current).join("&")!==Object.values(S).join("&")){const{state:M,hasChanged:$}=Fg(e,b,C,k,A.current,I.current);$&&(Zt("[nuq+ %s `%s`] State changed: %O",n,x,{state:M,initialSearchParams:C,queuedQueries:k,queryRef:A.current,stateRef:I.current}),I.current=M,U(M)),A.current=Object.fromEntries(Object.entries(S).map(([L,W])=>{var K;return[W,((K=e[L])==null?void 0:K.type)==="multi"?C==null?void 0:C.getAll(W):(C==null?void 0:C.get(W))??null]}))}E.useEffect(()=>{const{state:M,hasChanged:$}=Fg(e,b,C,k,A.current,I.current);$&&(Zt("[nuq+ %s `%s`] State changed: %O",n,x,{state:M,initialSearchParams:C,queuedQueries:k,queryRef:A.current,stateRef:I.current}),I.current=M,U(M))},[Object.values(S).map(M=>`${M}=${C==null?void 0:C.getAll(M)}`).join("&"),JSON.stringify(k)]),E.useEffect(()=>{const M=Object.keys(e).reduce(($,L)=>($[L]=({state:W,query:K})=>{U(J=>{const{defaultValue:te}=e[L],ie=S[L],O=W??te??null,H=J[L]??te??null;return Object.is(H,O)?(Zt("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). no change, skipping, resolved: %O",n,x,ie,W,te,I.current),J):(I.current={...I.current,[L]:O},A.current[ie]=K,Zt("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). updateInternalState, resolved: %O",n,x,ie,W,te,I.current),I.current)})},$),{});for(const $ of Object.keys(e)){const L=S[$];Zt("[nuq+ %s `%s`] Subscribing to sync for `%s`",n,L,x),Bg.on(L,M[$])}return()=>{for(const $ of Object.keys(e)){const L=S[$];Zt("[nuq+ %s `%s`] Unsubscribing to sync for `%s`",n,L,x),Bg.off(L,M[$])}}},[x,S]);const j=E.useCallback((M,$={})=>{var H,q,ne,B,V,re;const L=Object.fromEntries(Object.keys(e).map(P=>[P,null])),W=typeof M=="function"?M(X2(I.current,N))??L:M??L;Zt("[nuq+ %s `%s`] setState: %O",n,x,W);let K,J=0,te=!1;const ie=[];for(let[P,he]of Object.entries(W)){const ye=e[P],ge=S[P];if(!ye||he===void 0)continue;($.clearOnDefault??ye.clearOnDefault??m)&&he!==null&&ye.defaultValue!==void 0&&(ye.eq??((we,Ie)=>we===Ie))(he,ye.defaultValue)&&(he=null);const fe=he===null?null:(ye.serialize??String)(he);Bg.emit(ge,{state:he,query:fe});const Se={key:ge,query:fe,options:{history:$.history??ye.history??o,shallow:$.shallow??ye.shallow??c,scroll:$.scroll??ye.scroll??l,startTransition:$.startTransition??ye.startTransition??p}};if(((H=$==null?void 0:$.limitUrlUpdates)==null?void 0:H.method)==="debounce"||(d==null?void 0:d.method)==="debounce"||((q=ye.limitUrlUpdates)==null?void 0:q.method)==="debounce"){Se.options.shallow===!0&&console.warn(vf(422));const we=((ne=$==null?void 0:$.limitUrlUpdates)==null?void 0:ne.timeMs)??(d==null?void 0:d.timeMs)??((B=ye.limitUrlUpdates)==null?void 0:B.timeMs)??Mc.timeMs,Ie=Mg.push(Se,we,w,s);J<we&&(K=Ie,J=we)}else{const we=((V=$==null?void 0:$.limitUrlUpdates)==null?void 0:V.timeMs)??((re=ye==null?void 0:ye.limitUrlUpdates)==null?void 0:re.timeMs)??(d==null?void 0:d.timeMs)??$.throttleMs??ye.throttleMs??f;ie.push(Mg.abort(ge)),Oh.push(Se,we),te=!0}}const O=ie.reduce((P,he)=>he(P),te?Oh.flush(w,s):Oh.getPendingPromise(w));return K??O},[x,o,c,l,f,d==null?void 0:d.method,d==null?void 0:d.timeMs,p,S,w.updateUrl,w.getSearchParamsSnapshot,w.rateLimitFactor,s,N]);return[E.useMemo(()=>X2(R,N),[R,N]),j]}function Fg(e,t,n,r,s,o){let l=!1;const c=Object.entries(e).reduce((f,[d,m])=>{const p=(t==null?void 0:t[d])??d,b=r[p],x=m.type==="multi"?[]:null,S=b===void 0?(m.type==="multi"?n==null?void 0:n.getAll(p):n==null?void 0:n.get(p))??x:b;return s&&o&&S3(s[p]??x,S)?(f[d]=o[d]??null,f):(l=!0,f[d]=(SP(S)?null:A3(m.parse,S,p))??null,s&&(s[p]=S),f)},{});if(!l){const f=Object.keys(e),d=Object.keys(o??{});l=f.length!==d.length||f.some(m=>!d.includes(m))}return{state:c,hasChanged:l}}function X2(e,t){return Object.fromEntries(Object.keys(e).map(n=>[n,e[n]??t[n]??null]))}function _3(e,t={}){const{parse:n,type:r,serialize:s,eq:o,defaultValue:l,...c}=t,[{[e]:f},d]=QP({[e]:{parse:n??(m=>m),type:r,serialize:s,eq:o,defaultValue:l}},c);return[f,E.useCallback((m,p={})=>d(b=>({[e]:typeof m=="function"?m(b[e]):m}),p),[e,d])]}function Cm(){Jt(n=>n.sessionId),Jt(n=>n.setSessionId);const[e,t]=_3("session");return[e,t]}const W2=768;function _o(){const[e,t]=E.useState(()=>typeof window>"u"?!1:window.matchMedia(`(max-width: ${W2-1}px)`).matches);return E.useEffect(()=>{const n=window.matchMedia(`(max-width: ${W2-1}px)`),r=s=>t(s.matches);return n.addEventListener("change",r),t(n.matches),()=>n.removeEventListener("change",r)},[]),e}const k3=E.createContext(null);function KP({transport:e,children:t}){return g.jsx(k3.Provider,{value:e,children:t})}function si(){const e=E.useContext(k3);if(!e)throw new Error("useTransport must be used within a TransportProvider");return e}function XP(){const e=si(),t=Jt(s=>s.selectedCwd),n=Jt(s=>s.setSelectedCwd),{data:r}=zi({queryKey:["defaultCwd"],queryFn:()=>e.getDefaultCwd(),enabled:t===null,staleTime:1/0,refetchOnMount:!1,refetchOnReconnect:!1});E.useEffect(()=>{r!=null&&r.path&&t===null&&n(r.path)},[r,t,n])}const My=E.createContext({});function Am(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const N3=typeof window<"u",R3=N3?E.useLayoutEffect:E.useEffect,_m=E.createContext(null);function Iy(e,t){e.indexOf(t)===-1&&e.push(t)}function Ly(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Fi=(e,t,n)=>n>t?t:n<e?e:n;let Py=()=>{};const vs={},D3=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function O3(e){return typeof e=="object"&&e!==null}const M3=e=>/^0[^.\s]+$/u.test(e);function jy(e){let t;return()=>(t===void 0&&(t=e()),t)}const ni=e=>e,WP=(e,t)=>n=>t(e(n)),Tf=(...e)=>e.reduce(WP),Zc=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class By{constructor(){this.subscriptions=[]}add(t){return Iy(this.subscriptions,t),()=>Ly(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let o=0;o<s;o++){const l=this.subscriptions[o];l&&l(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Li=e=>e*1e3,ti=e=>e/1e3;function I3(e,t){return t?e*(1e3/t):0}const L3=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,ZP=1e-7,JP=12;function e8(e,t,n,r,s){let o,l,c=0;do l=t+(n-t)/2,o=L3(l,r,s)-e,o>0?n=l:t=l;while(Math.abs(o)>ZP&&++c<JP);return l}function Sf(e,t,n,r){if(e===t&&n===r)return ni;const s=o=>e8(o,0,1,e,n);return o=>o===0||o===1?o:L3(s(o),t,r)}const P3=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,j3=e=>t=>1-e(1-t),B3=Sf(.33,1.53,.69,.99),Fy=j3(B3),F3=P3(Fy),U3=e=>(e*=2)<1?.5*Fy(e):.5*(2-Math.pow(2,-10*(e-1))),Uy=e=>1-Math.sin(Math.acos(e)),H3=j3(Uy),z3=P3(Uy),t8=Sf(.42,0,1,1),n8=Sf(0,0,.58,1),V3=Sf(.42,0,.58,1),r8=e=>Array.isArray(e)&&typeof e[0]!="number",q3=e=>Array.isArray(e)&&typeof e[0]=="number",i8={linear:ni,easeIn:t8,easeInOut:V3,easeOut:n8,circIn:Uy,circInOut:z3,circOut:H3,backIn:Fy,backInOut:F3,backOut:B3,anticipate:U3},s8=e=>typeof e=="string",Z2=e=>{if(q3(e)){Py(e.length===4);const[t,n,r,s]=e;return Sf(t,n,r,s)}else if(s8(e))return i8[e];return e},ih=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function a8(e,t){let n=new Set,r=new Set,s=!1,o=!1;const l=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1};function f(m){l.has(m)&&(d.schedule(m),e()),m(c)}const d={schedule:(m,p=!1,b=!1)=>{const S=b&&s?n:r;return p&&l.add(m),S.has(m)||S.add(m),m},cancel:m=>{r.delete(m),l.delete(m)},process:m=>{if(c=m,s){o=!0;return}s=!0,[n,r]=[r,n],n.forEach(f),n.clear(),s=!1,o&&(o=!1,d.process(m))}};return d}const o8=40;function $3(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,l=ih.reduce((k,R)=>(k[R]=a8(o),k),{}),{setup:c,read:f,resolveKeyframes:d,preUpdate:m,update:p,preRender:b,render:x,postRender:S}=l,w=()=>{const k=vs.useManualTiming?s.timestamp:performance.now();n=!1,vs.useManualTiming||(s.delta=r?1e3/60:Math.max(Math.min(k-s.timestamp,o8),1)),s.timestamp=k,s.isProcessing=!0,c.process(s),f.process(s),d.process(s),m.process(s),p.process(s),b.process(s),x.process(s),S.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(w))},C=()=>{n=!0,r=!0,s.isProcessing||e(w)};return{schedule:ih.reduce((k,R)=>{const U=l[R];return k[R]=(I,j=!1,M=!1)=>(n||C(),U.schedule(I,j,M)),k},{}),cancel:k=>{for(let R=0;R<ih.length;R++)l[ih[R]].cancel(k)},state:s,steps:l}}const{schedule:Ht,cancel:ya,state:Hn,steps:Ug}=$3(typeof requestAnimationFrame<"u"?requestAnimationFrame:ni,!0);let Mh;function l8(){Mh=void 0}const ar={now:()=>(Mh===void 0&&ar.set(Hn.isProcessing||vs.useManualTiming?Hn.timestamp:performance.now()),Mh),set:e=>{Mh=e,queueMicrotask(l8)}},Y3=e=>t=>typeof t=="string"&&t.startsWith(e),G3=Y3("--"),u8=Y3("var(--"),Hy=e=>u8(e)?c8.test(e.split("/*")[0].trim()):!1,c8=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function J2(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const ou={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Jc={...ou,transform:e=>Fi(0,1,e)},sh={...ou,default:1},Ic=e=>Math.round(e*1e5)/1e5,zy=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function f8(e){return e==null}const d8=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Vy=(e,t)=>n=>!!(typeof n=="string"&&d8.test(n)&&n.startsWith(e)||t&&!f8(n)&&Object.prototype.hasOwnProperty.call(n,t)),Q3=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,o,l,c]=r.match(zy);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(l),alpha:c!==void 0?parseFloat(c):1}},h8=e=>Fi(0,255,e),Hg={...ou,transform:e=>Math.round(h8(e))},no={test:Vy("rgb","red"),parse:Q3("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Hg.transform(e)+", "+Hg.transform(t)+", "+Hg.transform(n)+", "+Ic(Jc.transform(r))+")"};function m8(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const pb={test:Vy("#"),parse:m8,transform:no.transform},wf=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Js=wf("deg"),Pi=wf("%"),Me=wf("px"),p8=wf("vh"),g8=wf("vw"),ew={...Pi,parse:e=>Pi.parse(e)/100,transform:e=>Pi.transform(e*100)},kl={test:Vy("hsl","hue"),parse:Q3("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Pi.transform(Ic(t))+", "+Pi.transform(Ic(n))+", "+Ic(Jc.transform(r))+")"},En={test:e=>no.test(e)||pb.test(e)||kl.test(e),parse:e=>no.test(e)?no.parse(e):kl.test(e)?kl.parse(e):pb.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?no.transform(e):kl.transform(e),getAnimatableNone:e=>{const t=En.parse(e);return t.alpha=0,En.transform(t)}},b8=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function y8(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(zy))==null?void 0:t.length)||0)+(((n=e.match(b8))==null?void 0:n.length)||0)>0}const K3="number",X3="color",x8="var",E8="var(",tw="${}",v8=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ef(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let o=0;const c=t.replace(v8,f=>(En.test(f)?(r.color.push(o),s.push(X3),n.push(En.parse(f))):f.startsWith(E8)?(r.var.push(o),s.push(x8),n.push(f)):(r.number.push(o),s.push(K3),n.push(parseFloat(f))),++o,tw)).split(tw);return{values:n,split:c,indexes:r,types:s}}function W3(e){return ef(e).values}function Z3(e){const{split:t,types:n}=ef(e),r=t.length;return s=>{let o="";for(let l=0;l<r;l++)if(o+=t[l],s[l]!==void 0){const c=n[l];c===K3?o+=Ic(s[l]):c===X3?o+=En.transform(s[l]):o+=s[l]}return o}}const T8=e=>typeof e=="number"?0:En.test(e)?En.getAnimatableNone(e):e;function S8(e){const t=W3(e);return Z3(e)(t.map(T8))}const xa={test:y8,parse:W3,createTransformer:Z3,getAnimatableNone:S8};function zg(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function w8({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,o=0,l=0;if(!t)s=o=l=n;else{const c=n<.5?n*(1+t):n+t-n*t,f=2*n-c;s=zg(f,c,e+1/3),o=zg(f,c,e),l=zg(f,c,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(l*255),alpha:r}}function Xh(e,t){return n=>n>0?t:e}const tn=(e,t,n)=>e+(t-e)*n,Vg=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},C8=[pb,no,kl],A8=e=>C8.find(t=>t.test(e));function nw(e){const t=A8(e);if(!t)return!1;let n=t.parse(e);return t===kl&&(n=w8(n)),n}const rw=(e,t)=>{const n=nw(e),r=nw(t);if(!n||!r)return Xh(e,t);const s={...n};return o=>(s.red=Vg(n.red,r.red,o),s.green=Vg(n.green,r.green,o),s.blue=Vg(n.blue,r.blue,o),s.alpha=tn(n.alpha,r.alpha,o),no.transform(s))},gb=new Set(["none","hidden"]);function _8(e,t){return gb.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function k8(e,t){return n=>tn(e,t,n)}function qy(e){return typeof e=="number"?k8:typeof e=="string"?Hy(e)?Xh:En.test(e)?rw:D8:Array.isArray(e)?J3:typeof e=="object"?En.test(e)?rw:N8:Xh}function J3(e,t){const n=[...e],r=n.length,s=e.map((o,l)=>qy(o)(o,t[l]));return o=>{for(let l=0;l<r;l++)n[l]=s[l](o);return n}}function N8(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=qy(e[s])(e[s],t[s]));return s=>{for(const o in r)n[o]=r[o](s);return n}}function R8(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],l=e.indexes[o][r[o]],c=e.values[l]??0;n[s]=c,r[o]++}return n}const D8=(e,t)=>{const n=xa.createTransformer(t),r=ef(e),s=ef(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?gb.has(e)&&!s.values.length||gb.has(t)&&!r.values.length?_8(e,t):Tf(J3(R8(r,s),s.values),n):Xh(e,t)};function ek(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?tn(e,t,n):qy(e)(e,t)}const O8=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Ht.update(t,n),stop:()=>ya(t),now:()=>Hn.isProcessing?Hn.timestamp:ar.now()}},tk=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)r+=Math.round(e(o/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Wh=2e4;function $y(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Wh;)t+=n,r=e.next(t);return t>=Wh?1/0:t}function M8(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min($y(r),Wh);return{type:"keyframes",ease:o=>r.next(s*o).value/t,duration:ti(s)}}const I8=5;function nk(e,t,n){const r=Math.max(t-I8,0);return I3(n-e(r),t-r)}const on={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},qg=.001;function L8({duration:e=on.duration,bounce:t=on.bounce,velocity:n=on.velocity,mass:r=on.mass}){let s,o,l=1-t;l=Fi(on.minDamping,on.maxDamping,l),e=Fi(on.minDuration,on.maxDuration,ti(e)),l<1?(s=d=>{const m=d*l,p=m*e,b=m-n,x=bb(d,l),S=Math.exp(-p);return qg-b/x*S},o=d=>{const p=d*l*e,b=p*n+n,x=Math.pow(l,2)*Math.pow(d,2)*e,S=Math.exp(-p),w=bb(Math.pow(d,2),l);return(-s(d)+qg>0?-1:1)*((b-x)*S)/w}):(s=d=>{const m=Math.exp(-d*e),p=(d-n)*e+1;return-qg+m*p},o=d=>{const m=Math.exp(-d*e),p=(n-d)*(e*e);return m*p});const c=5/e,f=j8(s,o,c);if(e=Li(e),isNaN(f))return{stiffness:on.stiffness,damping:on.damping,duration:e};{const d=Math.pow(f,2)*r;return{stiffness:d,damping:l*2*Math.sqrt(r*d),duration:e}}}const P8=12;function j8(e,t,n){let r=n;for(let s=1;s<P8;s++)r=r-e(r)/t(r);return r}function bb(e,t){return e*Math.sqrt(1-t*t)}const B8=["duration","bounce"],F8=["stiffness","damping","mass"];function iw(e,t){return t.some(n=>e[n]!==void 0)}function U8(e){let t={velocity:on.velocity,stiffness:on.stiffness,damping:on.damping,mass:on.mass,isResolvedFromDuration:!1,...e};if(!iw(e,F8)&&iw(e,B8))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,o=2*Fi(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:on.mass,stiffness:s,damping:o}}else{const n=L8(e);t={...t,...n,mass:on.mass},t.isResolvedFromDuration=!0}return t}function Zh(e=on.visualDuration,t=on.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const o=n.keyframes[0],l=n.keyframes[n.keyframes.length-1],c={done:!1,value:o},{stiffness:f,damping:d,mass:m,duration:p,velocity:b,isResolvedFromDuration:x}=U8({...n,velocity:-ti(n.velocity||0)}),S=b||0,w=d/(2*Math.sqrt(f*m)),C=l-o,A=ti(Math.sqrt(f/m)),N=Math.abs(C)<5;r||(r=N?on.restSpeed.granular:on.restSpeed.default),s||(s=N?on.restDelta.granular:on.restDelta.default);let k;if(w<1){const U=bb(A,w);k=I=>{const j=Math.exp(-w*A*I);return l-j*((S+w*A*C)/U*Math.sin(U*I)+C*Math.cos(U*I))}}else if(w===1)k=U=>l-Math.exp(-A*U)*(C+(S+A*C)*U);else{const U=A*Math.sqrt(w*w-1);k=I=>{const j=Math.exp(-w*A*I),M=Math.min(U*I,300);return l-j*((S+w*A*C)*Math.sinh(M)+U*C*Math.cosh(M))/U}}const R={calculatedDuration:x&&p||null,next:U=>{const I=k(U);if(x)c.done=U>=p;else{let j=U===0?S:0;w<1&&(j=U===0?Li(S):nk(k,U,I));const M=Math.abs(j)<=r,$=Math.abs(l-I)<=s;c.done=M&&$}return c.value=c.done?l:I,c},toString:()=>{const U=Math.min($y(R),Wh),I=tk(j=>R.next(U*j).value,U,30);return U+"ms "+I},toTransition:()=>{}};return R}Zh.applyToOptions=e=>{const t=M8(e,100,Zh);return e.ease=t.ease,e.duration=Li(t.duration),e.type="keyframes",e};function yb({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:l,min:c,max:f,restDelta:d=.5,restSpeed:m}){const p=e[0],b={done:!1,value:p},x=M=>c!==void 0&&M<c||f!==void 0&&M>f,S=M=>c===void 0?f:f===void 0||Math.abs(c-M)<Math.abs(f-M)?c:f;let w=n*t;const C=p+w,A=l===void 0?C:l(C);A!==C&&(w=A-p);const N=M=>-w*Math.exp(-M/r),k=M=>A+N(M),R=M=>{const $=N(M),L=k(M);b.done=Math.abs($)<=d,b.value=b.done?A:L};let U,I;const j=M=>{x(b.value)&&(U=M,I=Zh({keyframes:[b.value,S(b.value)],velocity:nk(k,M,b.value),damping:s,stiffness:o,restDelta:d,restSpeed:m}))};return j(0),{calculatedDuration:null,next:M=>{let $=!1;return!I&&U===void 0&&($=!0,R(M),j(M)),U!==void 0&&M>=U?I.next(M-U):(!$&&R(M),b)}}}function H8(e,t,n){const r=[],s=n||vs.mix||ek,o=e.length-1;for(let l=0;l<o;l++){let c=s(e[l],e[l+1]);if(t){const f=Array.isArray(t)?t[l]||ni:t;c=Tf(f,c)}r.push(c)}return r}function z8(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const o=e.length;if(Py(o===t.length),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const l=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const c=H8(t,r,s),f=c.length,d=m=>{if(l&&m<e[0])return t[0];let p=0;if(f>1)for(;p<e.length-2&&!(m<e[p+1]);p++);const b=Zc(e[p],e[p+1],m);return c[p](b)};return n?m=>d(Fi(e[0],e[o-1],m)):d}function V8(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=Zc(0,t,r);e.push(tn(n,1,s))}}function q8(e){const t=[0];return V8(t,e.length-1),t}function $8(e,t){return e.map(n=>n*t)}function Y8(e,t){return e.map(()=>t||V3).splice(0,e.length-1)}function Lc({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=r8(r)?r.map(Z2):Z2(r),o={done:!1,value:t[0]},l=$8(n&&n.length===t.length?n:q8(t),e),c=z8(l,t,{ease:Array.isArray(s)?s:Y8(t,s)});return{calculatedDuration:e,next:f=>(o.value=c(f),o.done=f>=e,o)}}const G8=e=>e!==null;function Yy(e,{repeat:t,repeatType:n="loop"},r,s=1){const o=e.filter(G8),c=s<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!c||r===void 0?o[c]:r}const Q8={decay:yb,inertia:yb,tween:Lc,keyframes:Lc,spring:Zh};function rk(e){typeof e.type=="string"&&(e.type=Q8[e.type])}class Gy{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const K8=e=>e/100;class Qy extends Gy{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==ar.now()&&this.tick(ar.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;rk(t);const{type:n=Lc,repeat:r=0,repeatDelay:s=0,repeatType:o,velocity:l=0}=t;let{keyframes:c}=t;const f=n||Lc;f!==Lc&&typeof c[0]!="number"&&(this.mixKeyframes=Tf(K8,ek(c[0],c[1])),c=[0,100]);const d=f({...t,keyframes:c});o==="mirror"&&(this.mirroredGenerator=f({...t,keyframes:[...c].reverse(),velocity:-l})),d.calculatedDuration===null&&(d.calculatedDuration=$y(d));const{calculatedDuration:m}=d;this.calculatedDuration=m,this.resolvedDuration=m+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=d}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:s,mixKeyframes:o,mirroredGenerator:l,resolvedDuration:c,calculatedDuration:f}=this;if(this.startTime===null)return r.next(0);const{delay:d=0,keyframes:m,repeat:p,repeatType:b,repeatDelay:x,type:S,onUpdate:w,finalKeyframe:C}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const A=this.currentTime-d*(this.playbackSpeed>=0?1:-1),N=this.playbackSpeed>=0?A<0:A>s;this.currentTime=Math.max(A,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let k=this.currentTime,R=r;if(p){const M=Math.min(this.currentTime,s)/c;let $=Math.floor(M),L=M%1;!L&&M>=1&&(L=1),L===1&&$--,$=Math.min($,p+1),!!($%2)&&(b==="reverse"?(L=1-L,x&&(L-=x/c)):b==="mirror"&&(R=l)),k=Fi(0,1,L)*c}const U=N?{done:!1,value:m[0]}:R.next(k);o&&(U.value=o(U.value));let{done:I}=U;!N&&f!==null&&(I=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const j=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return j&&S!==yb&&(U.value=Yy(m,this.options,C,this.speed)),w&&w(U.value),j&&this.finish(),U}then(t,n){return this.finished.then(t,n)}get duration(){return ti(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ti(t)}get time(){return ti(this.currentTime)}set time(t){var n;t=Li(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(ar.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ti(this.currentTime))}play(){var s,o;if(this.isStopped)return;const{driver:t=O8,startTime:n}=this.options;this.driver||(this.driver=t(l=>this.tick(l))),(o=(s=this.options).onPlay)==null||o.call(s);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ar.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function X8(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const ro=e=>e*180/Math.PI,xb=e=>{const t=ro(Math.atan2(e[1],e[0]));return Eb(t)},W8={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:xb,rotateZ:xb,skewX:e=>ro(Math.atan(e[1])),skewY:e=>ro(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Eb=e=>(e=e%360,e<0&&(e+=360),e),sw=xb,aw=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ow=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Z8={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:aw,scaleY:ow,scale:e=>(aw(e)+ow(e))/2,rotateX:e=>Eb(ro(Math.atan2(e[6],e[5]))),rotateY:e=>Eb(ro(Math.atan2(-e[2],e[0]))),rotateZ:sw,rotate:sw,skewX:e=>ro(Math.atan(e[4])),skewY:e=>ro(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function vb(e){return e.includes("scale")?1:0}function Tb(e,t){if(!e||e==="none")return vb(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=Z8,s=n;else{const c=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=W8,s=c}if(!s)return vb(t);const o=r[t],l=s[1].split(",").map(e9);return typeof o=="function"?o(l):l[o]}const J8=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Tb(n,t)};function e9(e){return parseFloat(e.trim())}const lu=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],uu=new Set(lu),lw=e=>e===ou||e===Me,t9=new Set(["x","y","z"]),n9=lu.filter(e=>!t9.has(e));function r9(e){const t=[];return n9.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const pa={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Tb(t,"x"),y:(e,{transform:t})=>Tb(t,"y")};pa.translateX=pa.x;pa.translateY=pa.y;const po=new Set;let Sb=!1,wb=!1,Cb=!1;function ik(){if(wb){const e=Array.from(po).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=r9(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([o,l])=>{var c;(c=r.getValue(o))==null||c.set(l)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}wb=!1,Sb=!1,po.forEach(e=>e.complete(Cb)),po.clear()}function sk(){po.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(wb=!0)})}function i9(){Cb=!0,sk(),ik(),Cb=!1}class Ky{constructor(t,n,r,s,o,l=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=o,this.isAsync=l}scheduleResolve(){this.state="scheduled",this.isAsync?(po.add(this),Sb||(Sb=!0,Ht.read(sk),Ht.resolveKeyframes(ik))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;if(t[0]===null){const o=s==null?void 0:s.get(),l=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const c=r.readValue(n,l);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=l),s&&o===void 0&&s.set(t[0])}X8(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),po.delete(this)}cancel(){this.state==="scheduled"&&(po.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const s9=e=>e.startsWith("--");function a9(e,t,n){s9(t)?e.style.setProperty(t,n):e.style[t]=n}const o9=jy(()=>window.ScrollTimeline!==void 0),l9={};function u9(e,t){const n=jy(e);return()=>l9[t]??n()}const ak=u9(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),_c=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,uw={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:_c([0,.65,.55,1]),circOut:_c([.55,0,1,.45]),backIn:_c([.31,.01,.66,-.59]),backOut:_c([.33,1.53,.69,.99])};function ok(e,t){if(e)return typeof e=="function"?ak()?tk(e,t):"ease-out":q3(e)?_c(e):Array.isArray(e)?e.map(n=>ok(n,t)||uw.easeOut):uw[e]}function c9(e,t,n,{delay:r=0,duration:s=300,repeat:o=0,repeatType:l="loop",ease:c="easeOut",times:f}={},d=void 0){const m={[t]:n};f&&(m.offset=f);const p=ok(c,s);Array.isArray(p)&&(m.easing=p);const b={delay:r,duration:s,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:o+1,direction:l==="reverse"?"alternate":"normal"};return d&&(b.pseudoElement=d),e.animate(m,b)}function lk(e){return typeof e=="function"&&"applyToOptions"in e}function f9({type:e,...t}){return lk(e)&&ak()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class d9 extends Gy{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:s,pseudoElement:o,allowFlatten:l=!1,finalKeyframe:c,onComplete:f}=t;this.isPseudoElement=!!o,this.allowFlatten=l,this.options=t,Py(typeof t.type!="string");const d=f9(t);this.animation=c9(n,r,s,d,o),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const m=Yy(s,this.options,c,this.speed);this.updateMotionValue?this.updateMotionValue(m):a9(n,r,m),this.animation.cancel()}f==null||f(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,s;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((s=(r=this.animation).commitStyles)==null||s.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return ti(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ti(t)}get time(){return ti(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Li(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&o9()?(this.animation.timeline=t,ni):n(this)}}const uk={anticipate:U3,backInOut:F3,circInOut:z3};function h9(e){return e in uk}function m9(e){typeof e.ease=="string"&&h9(e.ease)&&(e.ease=uk[e.ease])}const $g=10;class p9 extends d9{constructor(t){m9(t),rk(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:s,element:o,...l}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const c=new Qy({...l,autoplay:!1}),f=Math.max($g,ar.now()-this.startTime),d=Fi(0,$g,f-$g);n.setWithVelocity(c.sample(Math.max(0,f-d)).value,c.sample(f).value,d),c.stop()}}const cw=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(xa.test(e)||e==="0")&&!e.startsWith("url("));function g9(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function b9(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],l=cw(s,t),c=cw(o,t);return!l||!c?!1:g9(e)||(n==="spring"||lk(n))&&r}function Ab(e){e.duration=0,e.type="keyframes"}const y9=new Set(["opacity","clipPath","filter","transform"]),x9=jy(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function E9(e){var m;const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:o,type:l}=e;if(!(((m=t==null?void 0:t.owner)==null?void 0:m.current)instanceof HTMLElement))return!1;const{onUpdate:f,transformTemplate:d}=t.owner.getProps();return x9()&&n&&y9.has(n)&&(n!=="transform"||!d)&&!f&&!r&&s!=="mirror"&&o!==0&&l!=="inertia"}const v9=40;class T9 extends Gy{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:l="loop",keyframes:c,name:f,motionValue:d,element:m,...p}){var S;super(),this.stop=()=>{var w,C;this._animation&&(this._animation.stop(),(w=this.stopTimeline)==null||w.call(this)),(C=this.keyframeResolver)==null||C.cancel()},this.createdAt=ar.now();const b={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:o,repeatType:l,name:f,motionValue:d,element:m,...p},x=(m==null?void 0:m.KeyframeResolver)||Ky;this.keyframeResolver=new x(c,(w,C,A)=>this.onKeyframesResolved(w,C,b,!A),f,d,m),(S=this.keyframeResolver)==null||S.scheduleResolve()}onKeyframesResolved(t,n,r,s){var C,A;this.keyframeResolver=void 0;const{name:o,type:l,velocity:c,delay:f,isHandoff:d,onUpdate:m}=r;this.resolvedAt=ar.now(),b9(t,o,l,c)||((vs.instantAnimations||!f)&&(m==null||m(Yy(t,r,n))),t[0]=t[t.length-1],Ab(r),r.repeat=0);const b={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>v9?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},x=!d&&E9(b),S=(A=(C=b.motionValue)==null?void 0:C.owner)==null?void 0:A.current,w=x?new p9({...b,element:S}):new Qy(b);w.finished.then(()=>{this.notifyFinished()}).catch(ni),this.pendingTimeline&&(this.stopTimeline=w.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=w}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),i9()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function ck(e,t,n,r=0,s=1){const o=Array.from(e).sort((d,m)=>d.sortNodePosition(m)).indexOf(t),l=e.size,c=(l-1)*r;return typeof n=="function"?n(o,l):s===1?o*r:c-o*r}const S9=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function w9(e){const t=S9.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}function fk(e,t,n=1){const[r,s]=w9(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const l=o.trim();return D3(l)?parseFloat(l):l}return Hy(s)?fk(s,t,n+1):s}const C9={type:"spring",stiffness:500,damping:25,restSpeed:10},A9=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),_9={type:"keyframes",duration:.8},k9={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},N9=(e,{keyframes:t})=>t.length>2?_9:uu.has(e)?e.startsWith("scale")?A9(t[1]):C9:k9,R9=e=>e!==null;function D9(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(R9),o=t&&n!=="loop"&&t%2===1?0:s.length-1;return s[o]}function Xy(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function Wy(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?Xy(n,e):n}function O9({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:o,repeatType:l,repeatDelay:c,from:f,elapsed:d,...m}){return!!Object.keys(m).length}const Zy=(e,t,n,r={},s,o)=>l=>{const c=Wy(r,e)||{},f=c.delay||r.delay||0;let{elapsed:d=0}=r;d=d-Li(f);const m={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-d,onUpdate:b=>{t.set(b),c.onUpdate&&c.onUpdate(b)},onComplete:()=>{l(),c.onComplete&&c.onComplete()},name:e,motionValue:t,element:o?void 0:s};O9(c)||Object.assign(m,N9(e,m)),m.duration&&(m.duration=Li(m.duration)),m.repeatDelay&&(m.repeatDelay=Li(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let p=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(Ab(m),m.delay===0&&(p=!0)),(vs.instantAnimations||vs.skipAnimations||s!=null&&s.shouldSkipAnimations)&&(p=!0,Ab(m),m.delay=0),m.allowFlatten=!c.type&&!c.ease,p&&!o&&t.get()!==void 0){const b=D9(m.keyframes,c);if(b!==void 0){Ht.update(()=>{m.onUpdate(b),m.onComplete()});return}}return c.isSync?new Qy(m):new T9(m)};function fw(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Jy(e,t,n,r){if(typeof t=="function"){const[s,o]=fw(r);t=t(n!==void 0?n:e.custom,s,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,o]=fw(r);t=t(n!==void 0?n:e.custom,s,o)}return t}function Pl(e,t,n){const r=e.getProps();return Jy(r,t,n!==void 0?n:r.custom,e)}const dk=new Set(["width","height","top","left","right","bottom",...lu]),dw=30,M9=e=>!isNaN(parseFloat(e));class I9{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var o;const s=ar.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=ar.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=M9(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new By);const r=this.events[t].add(n);return t==="change"?()=>{r(),Ht.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=ar.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>dw)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,dw);return I3(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Jl(e,t){return new I9(e,t)}const _b=e=>Array.isArray(e);function L9(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Jl(n))}function P9(e){return _b(e)?e[e.length-1]||0:e}function j9(e,t){const n=Pl(e,t);let{transitionEnd:r={},transition:s={},...o}=n||{};o={...o,...r};for(const l in o){const c=P9(o[l]);L9(e,l,c)}}const Gn=e=>!!(e&&e.getVelocity);function B9(e){return!!(Gn(e)&&e.add)}function kb(e,t){const n=e.getValue("willChange");if(B9(n))return n.add(t);if(!n&&vs.WillChange){const r=new vs.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function ex(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const F9="framerAppearId",hk="data-"+ex(F9);function mk(e){return e.props[hk]}function U9({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function pk(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:o,transitionEnd:l,...c}=t;const f=e.getDefaultTransition();o=o?Xy(o,f):f;const d=o==null?void 0:o.reduceMotion;r&&(o=r);const m=[],p=s&&e.animationState&&e.animationState.getState()[s];for(const b in c){const x=e.getValue(b,e.latestValues[b]??null),S=c[b];if(S===void 0||p&&U9(p,b))continue;const w={delay:n,...Wy(o||{},b)},C=x.get();if(C!==void 0&&!x.isAnimating&&!Array.isArray(S)&&S===C&&!w.velocity)continue;let A=!1;if(window.MotionHandoffAnimation){const R=mk(e);if(R){const U=window.MotionHandoffAnimation(R,b,Ht);U!==null&&(w.startTime=U,A=!0)}}kb(e,b);const N=d??e.shouldReduceMotion;x.start(Zy(b,x,S,N&&dk.has(b)?{type:!1}:w,e,A));const k=x.animation;k&&m.push(k)}if(l){const b=()=>Ht.update(()=>{l&&j9(e,l)});m.length?Promise.all(m).then(b):b()}return m}function Nb(e,t,n={}){var f;const r=Pl(e,t,n.type==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const o=r?()=>Promise.all(pk(e,r,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:m=0,staggerChildren:p,staggerDirection:b}=s;return H9(e,t,d,m,p,b,n)}:()=>Promise.resolve(),{when:c}=s;if(c){const[d,m]=c==="beforeChildren"?[o,l]:[l,o];return d().then(()=>m())}else return Promise.all([o(),l(n.delay)])}function H9(e,t,n=0,r=0,s=0,o=1,l){const c=[];for(const f of e.variantChildren)f.notify("AnimationStart",t),c.push(Nb(f,t,{...l,delay:n+(typeof r=="function"?0:r)+ck(e.variantChildren,f,r,s,o)}).then(()=>f.notify("AnimationComplete",t)));return Promise.all(c)}function z9(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(o=>Nb(e,o,n));r=Promise.all(s)}else if(typeof t=="string")r=Nb(e,t,n);else{const s=typeof t=="function"?Pl(e,t,n.custom):t;r=Promise.all(pk(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const V9={test:e=>e==="auto",parse:e=>e},gk=e=>t=>t.test(e),bk=[ou,Me,Pi,Js,g8,p8,V9],hw=e=>bk.find(gk(e));function q9(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||M3(e):!0}const $9=new Set(["brightness","contrast","saturate","opacity"]);function Y9(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(zy)||[];if(!r)return e;const s=n.replace(r,"");let o=$9.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+s+")"}const G9=/\b([a-z-]*)\(.*?\)/gu,Rb={...xa,getAnimatableNone:e=>{const t=e.match(G9);return t?t.map(Y9).join(" "):e}},mw={...ou,transform:Math.round},Q9={rotate:Js,rotateX:Js,rotateY:Js,rotateZ:Js,scale:sh,scaleX:sh,scaleY:sh,scaleZ:sh,skew:Js,skewX:Js,skewY:Js,distance:Me,translateX:Me,translateY:Me,translateZ:Me,x:Me,y:Me,z:Me,perspective:Me,transformPerspective:Me,opacity:Jc,originX:ew,originY:ew,originZ:Me},tx={borderWidth:Me,borderTopWidth:Me,borderRightWidth:Me,borderBottomWidth:Me,borderLeftWidth:Me,borderRadius:Me,borderTopLeftRadius:Me,borderTopRightRadius:Me,borderBottomRightRadius:Me,borderBottomLeftRadius:Me,width:Me,maxWidth:Me,height:Me,maxHeight:Me,top:Me,right:Me,bottom:Me,left:Me,inset:Me,insetBlock:Me,insetBlockStart:Me,insetBlockEnd:Me,insetInline:Me,insetInlineStart:Me,insetInlineEnd:Me,padding:Me,paddingTop:Me,paddingRight:Me,paddingBottom:Me,paddingLeft:Me,paddingBlock:Me,paddingBlockStart:Me,paddingBlockEnd:Me,paddingInline:Me,paddingInlineStart:Me,paddingInlineEnd:Me,margin:Me,marginTop:Me,marginRight:Me,marginBottom:Me,marginLeft:Me,marginBlock:Me,marginBlockStart:Me,marginBlockEnd:Me,marginInline:Me,marginInlineStart:Me,marginInlineEnd:Me,fontSize:Me,backgroundPositionX:Me,backgroundPositionY:Me,...Q9,zIndex:mw,fillOpacity:Jc,strokeOpacity:Jc,numOctaves:mw},K9={...tx,color:En,backgroundColor:En,outlineColor:En,fill:En,stroke:En,borderColor:En,borderTopColor:En,borderRightColor:En,borderBottomColor:En,borderLeftColor:En,filter:Rb,WebkitFilter:Rb},yk=e=>K9[e];function xk(e,t){let n=yk(e);return n!==Rb&&(n=xa),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const X9=new Set(["auto","none","0"]);function W9(e,t,n){let r=0,s;for(;r<e.length&&!s;){const o=e[r];typeof o=="string"&&!X9.has(o)&&ef(o).values.length&&(s=e[r]),r++}if(s&&n)for(const o of t)e[o]=xk(n,s)}class Z9 extends Ky{constructor(t,n,r,s,o){super(t,n,r,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let m=0;m<t.length;m++){let p=t[m];if(typeof p=="string"&&(p=p.trim(),Hy(p))){const b=fk(p,n.current);b!==void 0&&(t[m]=b),m===t.length-1&&(this.finalKeyframe=p)}}if(this.resolveNoneKeyframes(),!dk.has(r)||t.length!==2)return;const[s,o]=t,l=hw(s),c=hw(o),f=J2(s),d=J2(o);if(f!==d&&pa[r]){this.needsMeasurement=!0;return}if(l!==c)if(lw(l)&&lw(c))for(let m=0;m<t.length;m++){const p=t[m];typeof p=="string"&&(t[m]=parseFloat(p))}else pa[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||q9(t[s]))&&r.push(s);r.length&&W9(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=pa[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var c;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=r.length-1,l=r[o];r[o]=pa[n](t.measureViewportBox(),window.getComputedStyle(t.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),(c=this.removedTransforms)!=null&&c.length&&this.removedTransforms.forEach(([f,d])=>{t.getValue(f).set(d)}),this.resolveNoneKeyframes()}}function Ek(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const s=(n==null?void 0:n[e])??r.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(r=>r!=null)}const vk=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Db(e){return O3(e)&&"offsetHeight"in e}const{schedule:nx}=$3(queueMicrotask,!1),ci={x:!1,y:!1};function Tk(){return ci.x||ci.y}function J9(e){return e==="x"||e==="y"?ci[e]?null:(ci[e]=!0,()=>{ci[e]=!1}):ci.x||ci.y?null:(ci.x=ci.y=!0,()=>{ci.x=ci.y=!1})}function Sk(e,t){const n=Ek(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function ej(e){return!(e.pointerType==="touch"||Tk())}function tj(e,t,n={}){const[r,s,o]=Sk(e,n);return r.forEach(l=>{let c=!1,f=!1,d;const m=()=>{l.removeEventListener("pointerleave",S)},p=C=>{d&&(d(C),d=void 0),m()},b=C=>{c=!1,window.removeEventListener("pointerup",b),window.removeEventListener("pointercancel",b),f&&(f=!1,p(C))},x=()=>{c=!0,window.addEventListener("pointerup",b,s),window.addEventListener("pointercancel",b,s)},S=C=>{if(C.pointerType!=="touch"){if(c){f=!0;return}p(C)}},w=C=>{if(!ej(C))return;f=!1;const A=t(l,C);typeof A=="function"&&(d=A,l.addEventListener("pointerleave",S,s))};l.addEventListener("pointerenter",w,s),l.addEventListener("pointerdown",x,s)}),o}const wk=(e,t)=>t?e===t?!0:wk(e,t.parentElement):!1,rx=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,nj=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function rj(e){return nj.has(e.tagName)||e.isContentEditable===!0}const ij=new Set(["INPUT","SELECT","TEXTAREA"]);function sj(e){return ij.has(e.tagName)||e.isContentEditable===!0}const Ih=new WeakSet;function pw(e){return t=>{t.key==="Enter"&&e(t)}}function Yg(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const aj=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=pw(()=>{if(Ih.has(n))return;Yg(n,"down");const s=pw(()=>{Yg(n,"up")}),o=()=>Yg(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function gw(e){return rx(e)&&!Tk()}const bw=new WeakSet;function oj(e,t,n={}){const[r,s,o]=Sk(e,n),l=c=>{const f=c.currentTarget;if(!gw(c)||bw.has(c))return;Ih.add(f),n.stopPropagation&&bw.add(c);const d=t(f,c),m=(x,S)=>{window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",b),Ih.has(f)&&Ih.delete(f),gw(x)&&typeof d=="function"&&d(x,{success:S})},p=x=>{m(x,f===window||f===document||n.useGlobalTarget||wk(f,x.target))},b=x=>{m(x,!1)};window.addEventListener("pointerup",p,s),window.addEventListener("pointercancel",b,s)};return r.forEach(c=>{(n.useGlobalTarget?window:c).addEventListener("pointerdown",l,s),Db(c)&&(c.addEventListener("focus",d=>aj(d,s)),!rj(c)&&!c.hasAttribute("tabindex")&&(c.tabIndex=0))}),o}function ix(e){return O3(e)&&"ownerSVGElement"in e}const Lh=new WeakMap;let ea;const Ck=(e,t,n)=>(r,s)=>s&&s[0]?s[0][e+"Size"]:ix(r)&&"getBBox"in r?r.getBBox()[t]:r[n],lj=Ck("inline","width","offsetWidth"),uj=Ck("block","height","offsetHeight");function cj({target:e,borderBoxSize:t}){var n;(n=Lh.get(e))==null||n.forEach(r=>{r(e,{get width(){return lj(e,t)},get height(){return uj(e,t)}})})}function fj(e){e.forEach(cj)}function dj(){typeof ResizeObserver>"u"||(ea=new ResizeObserver(fj))}function hj(e,t){ea||dj();const n=Ek(e);return n.forEach(r=>{let s=Lh.get(r);s||(s=new Set,Lh.set(r,s)),s.add(t),ea==null||ea.observe(r)}),()=>{n.forEach(r=>{const s=Lh.get(r);s==null||s.delete(t),s!=null&&s.size||ea==null||ea.unobserve(r)})}}const Ph=new Set;let Nl;function mj(){Nl=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Ph.forEach(t=>t(e))},window.addEventListener("resize",Nl)}function pj(e){return Ph.add(e),Nl||mj(),()=>{Ph.delete(e),!Ph.size&&typeof Nl=="function"&&(window.removeEventListener("resize",Nl),Nl=void 0)}}function yw(e,t){return typeof e=="function"?pj(e):hj(e,t)}function gj(e){return ix(e)&&e.tagName==="svg"}const bj=[...bk,En,xa],yj=e=>bj.find(gk(e)),xw=()=>({translate:0,scale:1,origin:0,originPoint:0}),Rl=()=>({x:xw(),y:xw()}),Ew=()=>({min:0,max:0}),_n=()=>({x:Ew(),y:Ew()}),Ob={current:null},Ak={current:!1},xj=typeof window<"u";function Ej(){if(Ak.current=!0,!!xj)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ob.current=e.matches;e.addEventListener("change",t),t()}else Ob.current=!1}const vj=new WeakMap;function km(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function tf(e){return typeof e=="string"||Array.isArray(e)}const sx=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ax=["initial",...sx];function Nm(e){return km(e.animate)||ax.some(t=>tf(e[t]))}function _k(e){return!!(Nm(e)||e.variants)}function Tj(e,t,n){for(const r in t){const s=t[r],o=n[r];if(Gn(s))e.addValue(r,s);else if(Gn(o))e.addValue(r,Jl(s,{owner:e}));else if(o!==s)if(e.hasValue(r)){const l=e.getValue(r);l.liveStyle===!0?l.jump(s):l.hasAnimated||l.set(s)}else{const l=e.getStaticValue(r);e.addValue(r,Jl(l!==void 0?l:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const vw=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Jh={};function kk(e){Jh=e}function Sj(){return Jh}class wj{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,skipAnimations:o,blockInitialAnimation:l,visualState:c},f={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Ky,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const x=ar.now();this.renderScheduledAt<x&&(this.renderScheduledAt=x,Ht.render(this.render,!1,!0))};const{latestValues:d,renderState:m}=c;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=m,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=o,this.options=f,this.blockInitialAnimation=!!l,this.isControllingVariants=Nm(n),this.isVariantNode=_k(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:p,...b}=this.scrapeMotionValuesFromProps(n,{},this);for(const x in b){const S=b[x];d[x]!==void 0&&Gn(S)&&S.set(d[x])}}mount(t){var n,r;if(this.hasBeenMounted)for(const s in this.initialValues)(n=this.values.get(s))==null||n.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=t,vj.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,o)=>this.bindToMotionValue(o,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Ak.current||Ej(),this.shouldReduceMotion=Ob.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),ya(this.notifyUpdate),ya(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=uu.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&Ht.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Jh){const n=Jh[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):_n()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<vw.length;r++){const s=vw[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,l=t[o];l&&(this.propEventSubscriptions[s]=this.on(s,l))}this.prevMotionValues=Tj(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Jl(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(D3(r)||M3(r))?r=parseFloat(r):!yj(r)&&xa.test(n)&&(r=xk(t,n)),this.setBaseTarget(t,Gn(r)?r.get():r)),Gn(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var o;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const l=Jy(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);l&&(r=l[t])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Gn(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new By),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){nx.render(this.render)}}class Nk extends wj{constructor(){super(...arguments),this.KeyframeResolver=Z9}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Gn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Ca{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Rk({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Cj({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Aj(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Gg(e){return e===void 0||e===1}function Mb({scale:e,scaleX:t,scaleY:n}){return!Gg(e)||!Gg(t)||!Gg(n)}function Ja(e){return Mb(e)||Dk(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Dk(e){return Tw(e.x)||Tw(e.y)}function Tw(e){return e&&e!=="0%"}function em(e,t,n){const r=e-n,s=t*r;return n+s}function Sw(e,t,n,r,s){return s!==void 0&&(e=em(e,s,r)),em(e,n,r)+t}function Ib(e,t=0,n=1,r,s){e.min=Sw(e.min,t,n,r,s),e.max=Sw(e.max,t,n,r,s)}function Ok(e,{x:t,y:n}){Ib(e.x,t.translate,t.scale,t.originPoint),Ib(e.y,n.translate,n.scale,n.originPoint)}const ww=.999999999999,Cw=1.0000000000001;function _j(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let o,l;for(let c=0;c<s;c++){o=n[c],l=o.projectionDelta;const{visualElement:f}=o.options;f&&f.props.style&&f.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Ol(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,Ok(e,l)),r&&Ja(o.latestValues)&&Ol(e,o.latestValues))}t.x<Cw&&t.x>ww&&(t.x=1),t.y<Cw&&t.y>ww&&(t.y=1)}function Dl(e,t){e.min=e.min+t,e.max=e.max+t}function Aw(e,t,n,r,s=.5){const o=tn(e.min,e.max,s);Ib(e,t,n,o,r)}function Ol(e,t){Aw(e.x,t.x,t.scaleX,t.scale,t.originX),Aw(e.y,t.y,t.scaleY,t.scale,t.originY)}function Mk(e,t){return Rk(Aj(e.getBoundingClientRect(),t))}function kj(e,t,n){const r=Mk(e,n),{scroll:s}=t;return s&&(Dl(r.x,s.offset.x),Dl(r.y,s.offset.y)),r}const Nj={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Rj=lu.length;function Dj(e,t,n){let r="",s=!0;for(let o=0;o<Rj;o++){const l=lu[o],c=e[l];if(c===void 0)continue;let f=!0;if(typeof c=="number")f=c===(l.startsWith("scale")?1:0);else{const d=parseFloat(c);f=l.startsWith("scale")?d===1:d===0}if(!f||n){const d=vk(c,tx[l]);if(!f){s=!1;const m=Nj[l]||l;r+=`${m}(${d}) `}n&&(t[l]=d)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function ox(e,t,n){const{style:r,vars:s,transformOrigin:o}=e;let l=!1,c=!1;for(const f in t){const d=t[f];if(uu.has(f)){l=!0;continue}else if(G3(f)){s[f]=d;continue}else{const m=vk(d,tx[f]);f.startsWith("origin")?(c=!0,o[f]=m):r[f]=m}}if(t.transform||(l||n?r.transform=Dj(t,e.transform,n):r.transform&&(r.transform="none")),c){const{originX:f="50%",originY:d="50%",originZ:m=0}=o;r.transformOrigin=`${f} ${d} ${m}`}}function Ik(e,{style:t,vars:n},r,s){const o=e.style;let l;for(l in t)o[l]=t[l];s==null||s.applyProjectionStyles(o,r);for(l in n)o.setProperty(l,n[l])}function _w(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const dc={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Me.test(e))e=parseFloat(e);else return e;const n=_w(e,t.target.x),r=_w(e,t.target.y);return`${n}% ${r}%`}},Oj={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=xa.parse(e);if(s.length>5)return r;const o=xa.createTransformer(e),l=typeof s[0]!="number"?1:0,c=n.x.scale*t.x,f=n.y.scale*t.y;s[0+l]/=c,s[1+l]/=f;const d=tn(c,f,.5);return typeof s[2+l]=="number"&&(s[2+l]/=d),typeof s[3+l]=="number"&&(s[3+l]/=d),o(s)}},Lb={borderRadius:{...dc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:dc,borderTopRightRadius:dc,borderBottomLeftRadius:dc,borderBottomRightRadius:dc,boxShadow:Oj};function Lk(e,{layout:t,layoutId:n}){return uu.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Lb[e]||e==="opacity")}function lx(e,t,n){var l;const r=e.style,s=t==null?void 0:t.style,o={};if(!r)return o;for(const c in r)(Gn(r[c])||s&&Gn(s[c])||Lk(c,e)||((l=n==null?void 0:n.getValue(c))==null?void 0:l.liveStyle)!==void 0)&&(o[c]=r[c]);return o}function Mj(e){return window.getComputedStyle(e)}class Ij extends Nk{constructor(){super(...arguments),this.type="html",this.renderInstance=Ik}readValueFromInstance(t,n){var r;if(uu.has(n))return(r=this.projection)!=null&&r.isProjecting?vb(n):J8(t,n);{const s=Mj(t),o=(G3(n)?s.getPropertyValue(n):s[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Mk(t,n)}build(t,n,r){ox(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return lx(t,n,r)}}const Lj={offset:"stroke-dashoffset",array:"stroke-dasharray"},Pj={offset:"strokeDashoffset",array:"strokeDasharray"};function jj(e,t,n=1,r=0,s=!0){e.pathLength=1;const o=s?Lj:Pj;e[o.offset]=`${-r}`,e[o.array]=`${t} ${n}`}const Bj=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Pk(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:o=1,pathOffset:l=0,...c},f,d,m){if(ox(e,c,d),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:b}=e;p.transform&&(b.transform=p.transform,delete p.transform),(b.transform||p.transformOrigin)&&(b.transformOrigin=p.transformOrigin??"50% 50%",delete p.transformOrigin),b.transform&&(b.transformBox=(m==null?void 0:m.transformBox)??"fill-box",delete p.transformBox);for(const x of Bj)p[x]!==void 0&&(b[x]=p[x],delete p[x]);t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),s!==void 0&&jj(p,s,o,l,!1)}const jk=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Bk=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Fj(e,t,n,r){Ik(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(jk.has(s)?s:ex(s),t.attrs[s])}function Fk(e,t,n){const r=lx(e,t,n);for(const s in e)if(Gn(e[s])||Gn(t[s])){const o=lu.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[o]=e[s]}return r}class Uj extends Nk{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=_n}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(uu.has(n)){const r=yk(n);return r&&r.default||0}return n=jk.has(n)?n:ex(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Fk(t,n,r)}build(t,n,r){Pk(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){Fj(t,n,r,s)}mount(t){this.isSVGTag=Bk(t.tagName),super.mount(t)}}const Hj=ax.length;function Uk(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Uk(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Hj;n++){const r=ax[n],s=e.props[r];(tf(s)||s===!1)&&(t[r]=s)}return t}function Hk(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const zj=[...sx].reverse(),Vj=sx.length;function qj(e){return t=>Promise.all(t.map(({animation:n,options:r})=>z9(e,n,r)))}function $j(e){let t=qj(e),n=kw(),r=!0;const s=f=>(d,m)=>{var b;const p=Pl(e,m,f==="exit"?(b=e.presenceContext)==null?void 0:b.custom:void 0);if(p){const{transition:x,transitionEnd:S,...w}=p;d={...d,...w,...S}}return d};function o(f){t=f(e)}function l(f){const{props:d}=e,m=Uk(e.parent)||{},p=[],b=new Set;let x={},S=1/0;for(let C=0;C<Vj;C++){const A=zj[C],N=n[A],k=d[A]!==void 0?d[A]:m[A],R=tf(k),U=A===f?N.isActive:null;U===!1&&(S=C);let I=k===m[A]&&k!==d[A]&&R;if(I&&r&&e.manuallyAnimateOnMount&&(I=!1),N.protectedKeys={...x},!N.isActive&&U===null||!k&&!N.prevProp||km(k)||typeof k=="boolean")continue;const j=Yj(N.prevProp,k);let M=j||A===f&&N.isActive&&!I&&R||C>S&&R,$=!1;const L=Array.isArray(k)?k:[k];let W=L.reduce(s(A),{});U===!1&&(W={});const{prevResolvedValues:K={}}=N,J={...K,...W},te=H=>{M=!0,b.has(H)&&($=!0,b.delete(H)),N.needsAnimating[H]=!0;const q=e.getValue(H);q&&(q.liveStyle=!1)};for(const H in J){const q=W[H],ne=K[H];if(x.hasOwnProperty(H))continue;let B=!1;_b(q)&&_b(ne)?B=!Hk(q,ne):B=q!==ne,B?q!=null?te(H):b.add(H):q!==void 0&&b.has(H)?te(H):N.protectedKeys[H]=!0}N.prevProp=k,N.prevResolvedValues=W,N.isActive&&(x={...x,...W}),r&&e.blockInitialAnimation&&(M=!1);const ie=I&&j;M&&(!ie||$)&&p.push(...L.map(H=>{const q={type:A};if(typeof H=="string"&&r&&!ie&&e.manuallyAnimateOnMount&&e.parent){const{parent:ne}=e,B=Pl(ne,H);if(ne.enteringChildren&&B){const{delayChildren:V}=B.transition||{};q.delay=ck(ne.enteringChildren,e,V)}}return{animation:H,options:q}}))}if(b.size){const C={};if(typeof d.initial!="boolean"){const A=Pl(e,Array.isArray(d.initial)?d.initial[0]:d.initial);A&&A.transition&&(C.transition=A.transition)}b.forEach(A=>{const N=e.getBaseTarget(A),k=e.getValue(A);k&&(k.liveStyle=!0),C[A]=N??null}),p.push({animation:C})}let w=!!p.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(w=!1),r=!1,w?t(p):Promise.resolve()}function c(f,d){var p;if(n[f].isActive===d)return Promise.resolve();(p=e.variantChildren)==null||p.forEach(b=>{var x;return(x=b.animationState)==null?void 0:x.setActive(f,d)}),n[f].isActive=d;const m=l(f);for(const b in n)n[b].protectedKeys={};return m}return{animateChanges:l,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=kw()}}}function Yj(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Hk(t,e):!1}function Qa(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function kw(){return{animate:Qa(!0),whileInView:Qa(),whileHover:Qa(),whileTap:Qa(),whileDrag:Qa(),whileFocus:Qa(),exit:Qa()}}function Nw(e,t){e.min=t.min,e.max=t.max}function ui(e,t){Nw(e.x,t.x),Nw(e.y,t.y)}function Rw(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const zk=1e-4,Gj=1-zk,Qj=1+zk,Vk=.01,Kj=0-Vk,Xj=0+Vk;function or(e){return e.max-e.min}function Wj(e,t,n){return Math.abs(e-t)<=n}function Dw(e,t,n,r=.5){e.origin=r,e.originPoint=tn(t.min,t.max,e.origin),e.scale=or(n)/or(t),e.translate=tn(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Gj&&e.scale<=Qj||isNaN(e.scale))&&(e.scale=1),(e.translate>=Kj&&e.translate<=Xj||isNaN(e.translate))&&(e.translate=0)}function Pc(e,t,n,r){Dw(e.x,t.x,n.x,r?r.originX:void 0),Dw(e.y,t.y,n.y,r?r.originY:void 0)}function Ow(e,t,n){e.min=n.min+t.min,e.max=e.min+or(t)}function Zj(e,t,n){Ow(e.x,t.x,n.x),Ow(e.y,t.y,n.y)}function Mw(e,t,n){e.min=t.min-n.min,e.max=e.min+or(t)}function tm(e,t,n){Mw(e.x,t.x,n.x),Mw(e.y,t.y,n.y)}function Iw(e,t,n,r,s){return e-=t,e=em(e,1/n,r),s!==void 0&&(e=em(e,1/s,r)),e}function Jj(e,t=0,n=1,r=.5,s,o=e,l=e){if(Pi.test(t)&&(t=parseFloat(t),t=tn(l.min,l.max,t/100)-l.min),typeof t!="number")return;let c=tn(o.min,o.max,r);e===o&&(c-=t),e.min=Iw(e.min,t,n,c,s),e.max=Iw(e.max,t,n,c,s)}function Lw(e,t,[n,r,s],o,l){Jj(e,t[n],t[r],t[s],t.scale,o,l)}const eB=["x","scaleX","originX"],tB=["y","scaleY","originY"];function Pw(e,t,n,r){Lw(e.x,t,eB,n?n.x:void 0,r?r.x:void 0),Lw(e.y,t,tB,n?n.y:void 0,r?r.y:void 0)}function jw(e){return e.translate===0&&e.scale===1}function qk(e){return jw(e.x)&&jw(e.y)}function Bw(e,t){return e.min===t.min&&e.max===t.max}function nB(e,t){return Bw(e.x,t.x)&&Bw(e.y,t.y)}function Fw(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function $k(e,t){return Fw(e.x,t.x)&&Fw(e.y,t.y)}function Uw(e){return or(e.x)/or(e.y)}function Hw(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Ai(e){return[e("x"),e("y")]}function rB(e,t,n){let r="";const s=e.x.translate/t.x,o=e.y.translate/t.y,l=(n==null?void 0:n.z)||0;if((s||o||l)&&(r=`translate3d(${s}px, ${o}px, ${l}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:d,rotate:m,rotateX:p,rotateY:b,skewX:x,skewY:S}=n;d&&(r=`perspective(${d}px) ${r}`),m&&(r+=`rotate(${m}deg) `),p&&(r+=`rotateX(${p}deg) `),b&&(r+=`rotateY(${b}deg) `),x&&(r+=`skewX(${x}deg) `),S&&(r+=`skewY(${S}deg) `)}const c=e.x.scale*t.x,f=e.y.scale*t.y;return(c!==1||f!==1)&&(r+=`scale(${c}, ${f})`),r||"none"}const Yk=["TopLeft","TopRight","BottomLeft","BottomRight"],iB=Yk.length,zw=e=>typeof e=="string"?parseFloat(e):e,Vw=e=>typeof e=="number"||Me.test(e);function sB(e,t,n,r,s,o){s?(e.opacity=tn(0,n.opacity??1,aB(r)),e.opacityExit=tn(t.opacity??1,0,oB(r))):o&&(e.opacity=tn(t.opacity??1,n.opacity??1,r));for(let l=0;l<iB;l++){const c=`border${Yk[l]}Radius`;let f=qw(t,c),d=qw(n,c);if(f===void 0&&d===void 0)continue;f||(f=0),d||(d=0),f===0||d===0||Vw(f)===Vw(d)?(e[c]=Math.max(tn(zw(f),zw(d),r),0),(Pi.test(d)||Pi.test(f))&&(e[c]+="%")):e[c]=d}(t.rotate||n.rotate)&&(e.rotate=tn(t.rotate||0,n.rotate||0,r))}function qw(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const aB=Gk(0,.5,H3),oB=Gk(.5,.95,ni);function Gk(e,t,n){return r=>r<e?0:r>t?1:n(Zc(e,t,r))}function lB(e,t,n){const r=Gn(e)?e:Jl(e);return r.start(Zy("",r,t,n)),r.animation}function nf(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const uB=(e,t)=>e.depth-t.depth;class cB{constructor(){this.children=[],this.isDirty=!1}add(t){Iy(this.children,t),this.isDirty=!0}remove(t){Ly(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(uB),this.isDirty=!1,this.children.forEach(t)}}function fB(e,t){const n=ar.now(),r=({timestamp:s})=>{const o=s-n;o>=t&&(ya(r),e(o-t))};return Ht.setup(r,!0),()=>ya(r)}function jh(e){return Gn(e)?e.get():e}class dB{constructor(){this.members=[]}add(t){Iy(this.members,t),t.scheduleRender()}remove(t){if(Ly(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const o=this.members[s];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender();const s=r.options.layoutDependency,o=t.options.layoutDependency;s!==void 0&&o!==void 0&&s===o||(t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0));const{crossfade:c}=t.options;c===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Bh={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Qg=["","X","Y","Z"],hB=1e3;let mB=0;function Kg(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Qk(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=mk(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ht,!(s||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Qk(r)}function Kk({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(l={},c=t==null?void 0:t()){this.id=mB++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(bB),this.nodes.forEach(vB),this.nodes.forEach(TB),this.nodes.forEach(yB)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let f=0;f<this.path.length;f++)this.path[f].shouldResetTransform=!0;this.root===this&&(this.nodes=new cB)}addEventListener(l,c){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new By),this.eventHandlers.get(l).add(c)}notifyListeners(l,...c){const f=this.eventHandlers.get(l);f&&f.notify(...c)}hasListeners(l){return this.eventHandlers.has(l)}mount(l){if(this.instance)return;this.isSVG=ix(l)&&!gj(l),this.instance=l;const{layoutId:c,layout:f,visualElement:d}=this.options;if(d&&!d.current&&d.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(f||c)&&(this.isLayoutDirty=!0),e){let m,p=0;const b=()=>this.root.updateBlockedByResize=!1;Ht.read(()=>{p=window.innerWidth}),e(l,()=>{const x=window.innerWidth;x!==p&&(p=x,this.root.updateBlockedByResize=!0,m&&m(),m=fB(b,250),Bh.hasAnimatedSinceResize&&(Bh.hasAnimatedSinceResize=!1,this.nodes.forEach(Gw)))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||f)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:p,hasRelativeLayoutChanged:b,layout:x})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const S=this.options.transition||d.getDefaultTransition()||_B,{onLayoutAnimationStart:w,onLayoutAnimationComplete:C}=d.getProps(),A=!this.targetLayout||!$k(this.targetLayout,x),N=!p&&b;if(this.options.layoutRoot||this.resumeFrom||N||p&&(A||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const k={...Wy(S,"layout"),onPlay:w,onComplete:C};(d.shouldReduceMotion||this.options.layoutRoot)&&(k.delay=0,k.type=!1),this.startAnimation(k),this.setAnimationOrigin(m,N)}else p||Gw(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=x})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const l=this.getStack();l&&l.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ya(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(SB),this.animationId++)}getTransformTemplate(){const{visualElement:l}=this.options;return l&&l.getProps().transformTemplate}willUpdate(l=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Qk(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let m=0;m<this.path.length;m++){const p=this.path[m];p.shouldResetTransform=!0,p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:c,layout:f}=this.options;if(c===void 0&&!f)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach($w);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Yw);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(EB),this.nodes.forEach(pB),this.nodes.forEach(gB)):this.nodes.forEach(Yw),this.clearAllSnapshots();const c=ar.now();Hn.delta=Fi(0,1e3/60,c-Hn.timestamp),Hn.timestamp=c,Hn.isProcessing=!0,Ug.update.process(Hn),Ug.preRender.process(Hn),Ug.render.process(Hn),Hn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,nx.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(xB),this.sharedNodes.forEach(wB)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ht.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ht.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!or(this.snapshot.measuredBox.x)&&!or(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let f=0;f<this.path.length;f++)this.path[f].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=_n(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:c}=this.options;c&&c.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let c=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(c=!1),c&&this.instance){const f=r(this.instance);this.scroll={animationId:this.root.animationId,phase:l,isRoot:f,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:f}}}resetTransform(){if(!s)return;const l=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,c=this.projectionDelta&&!qk(this.projectionDelta),f=this.getTransformTemplate(),d=f?f(this.latestValues,""):void 0,m=d!==this.prevTransformTemplateValue;l&&this.instance&&(c||Ja(this.latestValues)||m)&&(s(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const c=this.measurePageBox();let f=this.removeElementScroll(c);return l&&(f=this.removeTransform(f)),kB(f),{animationId:this.root.animationId,measuredBox:c,layoutBox:f,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:l}=this.options;if(!l)return _n();const c=l.measureViewportBox();if(!(((d=this.scroll)==null?void 0:d.wasRoot)||this.path.some(NB))){const{scroll:m}=this.root;m&&(Dl(c.x,m.offset.x),Dl(c.y,m.offset.y))}return c}removeElementScroll(l){var f;const c=_n();if(ui(c,l),(f=this.scroll)!=null&&f.wasRoot)return c;for(let d=0;d<this.path.length;d++){const m=this.path[d],{scroll:p,options:b}=m;m!==this.root&&p&&b.layoutScroll&&(p.wasRoot&&ui(c,l),Dl(c.x,p.offset.x),Dl(c.y,p.offset.y))}return c}applyTransform(l,c=!1){const f=_n();ui(f,l);for(let d=0;d<this.path.length;d++){const m=this.path[d];!c&&m.options.layoutScroll&&m.scroll&&m!==m.root&&Ol(f,{x:-m.scroll.offset.x,y:-m.scroll.offset.y}),Ja(m.latestValues)&&Ol(f,m.latestValues)}return Ja(this.latestValues)&&Ol(f,this.latestValues),f}removeTransform(l){const c=_n();ui(c,l);for(let f=0;f<this.path.length;f++){const d=this.path[f];if(!d.instance||!Ja(d.latestValues))continue;Mb(d.latestValues)&&d.updateSnapshot();const m=_n(),p=d.measurePageBox();ui(m,p),Pw(c,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,m)}return Ja(this.latestValues)&&Pw(c,this.latestValues),c}setTargetDelta(l){this.targetDelta=l,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(l){this.options={...this.options,...l,crossfade:l.crossfade!==void 0?l.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Hn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){var x;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const f=!!this.resumingFrom||this!==c;if(!(l||f&&this.isSharedProjectionDirty||this.isProjectionDirty||(x=this.parent)!=null&&x.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:m,layoutId:p}=this.options;if(!this.layout||!(m||p))return;this.resolvedRelativeTargetAt=Hn.timestamp;const b=this.getClosestProjectingParent();b&&this.linkedParentVersion!==b.layoutVersion&&!b.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(b&&b.layout?this.createRelativeTarget(b,this.layout.layoutBox,b.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=_n(),this.targetWithTransforms=_n()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Zj(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ui(this.target,this.layout.layoutBox),Ok(this.target,this.targetDelta)):ui(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,b&&!!b.resumingFrom==!!this.resumingFrom&&!b.options.layoutScroll&&b.target&&this.animationProgress!==1?this.createRelativeTarget(b,this.target,b.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Mb(this.parent.latestValues)||Dk(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(l,c,f){this.relativeParent=l,this.linkedParentVersion=l.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=_n(),this.relativeTargetOrigin=_n(),tm(this.relativeTargetOrigin,c,f),ui(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var S;const l=this.getLead(),c=!!this.resumingFrom||this!==l;let f=!0;if((this.isProjectionDirty||(S=this.parent)!=null&&S.isProjectionDirty)&&(f=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(f=!1),this.resolvedRelativeTargetAt===Hn.timestamp&&(f=!1),f)return;const{layout:d,layoutId:m}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||m))return;ui(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,b=this.treeScale.y;_j(this.layoutCorrected,this.treeScale,this.path,c),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=_n());const{target:x}=l;if(!x){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Rw(this.prevProjectionDelta.x,this.projectionDelta.x),Rw(this.prevProjectionDelta.y,this.projectionDelta.y)),Pc(this.projectionDelta,this.layoutCorrected,x,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==b||!Hw(this.projectionDelta.x,this.prevProjectionDelta.x)||!Hw(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",x))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){var c;if((c=this.options.visualElement)==null||c.scheduleRender(),l){const f=this.getStack();f&&f.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Rl(),this.projectionDelta=Rl(),this.projectionDeltaWithTransform=Rl()}setAnimationOrigin(l,c=!1){const f=this.snapshot,d=f?f.latestValues:{},m={...this.latestValues},p=Rl();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const b=_n(),x=f?f.source:void 0,S=this.layout?this.layout.source:void 0,w=x!==S,C=this.getStack(),A=!C||C.members.length<=1,N=!!(w&&!A&&this.options.crossfade===!0&&!this.path.some(AB));this.animationProgress=0;let k;this.mixTargetDelta=R=>{const U=R/1e3;Qw(p.x,l.x,U),Qw(p.y,l.y,U),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(tm(b,this.layout.layoutBox,this.relativeParent.layout.layoutBox),CB(this.relativeTarget,this.relativeTargetOrigin,b,U),k&&nB(this.relativeTarget,k)&&(this.isProjectionDirty=!1),k||(k=_n()),ui(k,this.relativeTarget)),w&&(this.animationValues=m,sB(m,d,this.latestValues,U,N,A)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=U},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){var c,f,d;this.notifyListeners("animationStart"),(c=this.currentAnimation)==null||c.stop(),(d=(f=this.resumingFrom)==null?void 0:f.currentAnimation)==null||d.stop(),this.pendingAnimation&&(ya(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ht.update(()=>{Bh.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Jl(0)),this.currentAnimation=lB(this.motionValue,[0,1e3],{...l,velocity:0,isSync:!0,onUpdate:m=>{this.mixTargetDelta(m),l.onUpdate&&l.onUpdate(m)},onStop:()=>{},onComplete:()=>{l.onComplete&&l.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const l=this.getStack();l&&l.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(hB),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:c,target:f,layout:d,latestValues:m}=l;if(!(!c||!f||!d)){if(this!==l&&this.layout&&d&&Xk(this.options.animationType,this.layout.layoutBox,d.layoutBox)){f=this.target||_n();const p=or(this.layout.layoutBox.x);f.x.min=l.target.x.min,f.x.max=f.x.min+p;const b=or(this.layout.layoutBox.y);f.y.min=l.target.y.min,f.y.max=f.y.min+b}ui(c,f),Ol(c,m),Pc(this.projectionDeltaWithTransform,this.layoutCorrected,c,m)}}registerSharedNode(l,c){this.sharedNodes.has(l)||this.sharedNodes.set(l,new dB),this.sharedNodes.get(l).add(c);const d=c.options.initialPromotionConfig;c.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(c):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){var c;const{layoutId:l}=this.options;return l?((c=this.getStack())==null?void 0:c.lead)||this:this}getPrevLead(){var c;const{layoutId:l}=this.options;return l?(c=this.getStack())==null?void 0:c.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:c,preserveFollowOpacity:f}={}){const d=this.getStack();d&&d.promote(this,f),l&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetSkewAndRotation(){const{visualElement:l}=this.options;if(!l)return;let c=!1;const{latestValues:f}=l;if((f.z||f.rotate||f.rotateX||f.rotateY||f.rotateZ||f.skewX||f.skewY)&&(c=!0),!c)return;const d={};f.z&&Kg("z",l,d,this.animationValues);for(let m=0;m<Qg.length;m++)Kg(`rotate${Qg[m]}`,l,d,this.animationValues),Kg(`skew${Qg[m]}`,l,d,this.animationValues);l.render();for(const m in d)l.setStaticValue(m,d[m]),this.animationValues&&(this.animationValues[m]=d[m]);l.scheduleRender()}applyProjectionStyles(l,c){if(!this.instance||this.isSVG)return;if(!this.isVisible){l.visibility="hidden";return}const f=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,l.visibility="",l.opacity="",l.pointerEvents=jh(c==null?void 0:c.pointerEvents)||"",l.transform=f?f(this.latestValues,""):"none";return}const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){this.options.layoutId&&(l.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,l.pointerEvents=jh(c==null?void 0:c.pointerEvents)||""),this.hasProjected&&!Ja(this.latestValues)&&(l.transform=f?f({},""):"none",this.hasProjected=!1);return}l.visibility="";const m=d.animationValues||d.latestValues;this.applyTransformsToTarget();let p=rB(this.projectionDeltaWithTransform,this.treeScale,m);f&&(p=f(m,p)),l.transform=p;const{x:b,y:x}=this.projectionDelta;l.transformOrigin=`${b.origin*100}% ${x.origin*100}% 0`,d.animationValues?l.opacity=d===this?m.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:l.opacity=d===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const S in Lb){if(m[S]===void 0)continue;const{correct:w,applyTo:C,isCSSVariable:A}=Lb[S],N=p==="none"?m[S]:w(m[S],d);if(C){const k=C.length;for(let R=0;R<k;R++)l[C[R]]=N}else A?this.options.visualElement.renderState.vars[S]=N:l[S]=N}this.options.layoutId&&(l.pointerEvents=d===this?jh(c==null?void 0:c.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>{var c;return(c=l.currentAnimation)==null?void 0:c.stop()}),this.root.nodes.forEach($w),this.root.sharedNodes.clear()}}}function pB(e){e.updateLayout()}function gB(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:o}=e.options,l=t.source!==e.layout.source;o==="size"?Ai(p=>{const b=l?t.measuredBox[p]:t.layoutBox[p],x=or(b);b.min=r[p].min,b.max=b.min+x}):Xk(o,t.layoutBox,r)&&Ai(p=>{const b=l?t.measuredBox[p]:t.layoutBox[p],x=or(r[p]);b.max=b.min+x,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[p].max=e.relativeTarget[p].min+x)});const c=Rl();Pc(c,r,t.layoutBox);const f=Rl();l?Pc(f,e.applyTransform(s,!0),t.measuredBox):Pc(f,r,t.layoutBox);const d=!qk(c);let m=!1;if(!e.resumeFrom){const p=e.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:b,layout:x}=p;if(b&&x){const S=_n();tm(S,t.layoutBox,b.layoutBox);const w=_n();tm(w,r,x.layoutBox),$k(S,w)||(m=!0),p.options.layoutRoot&&(e.relativeTarget=w,e.relativeTargetOrigin=S,e.relativeParent=p)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:f,layoutDelta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:m})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function bB(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function yB(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function xB(e){e.clearSnapshot()}function $w(e){e.clearMeasurements()}function Yw(e){e.isLayoutDirty=!1}function EB(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Gw(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function vB(e){e.resolveTargetDelta()}function TB(e){e.calcProjection()}function SB(e){e.resetSkewAndRotation()}function wB(e){e.removeLeadSnapshot()}function Qw(e,t,n){e.translate=tn(t.translate,0,n),e.scale=tn(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Kw(e,t,n,r){e.min=tn(t.min,n.min,r),e.max=tn(t.max,n.max,r)}function CB(e,t,n,r){Kw(e.x,t.x,n.x,r),Kw(e.y,t.y,n.y,r)}function AB(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const _B={duration:.45,ease:[.4,0,.1,1]},Xw=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ww=Xw("applewebkit/")&&!Xw("chrome/")?Math.round:ni;function Zw(e){e.min=Ww(e.min),e.max=Ww(e.max)}function kB(e){Zw(e.x),Zw(e.y)}function Xk(e,t,n){return e==="position"||e==="preserve-aspect"&&!Wj(Uw(t),Uw(n),.2)}function NB(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const RB=Kk({attachResizeListener:(e,t)=>nf(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Xg={current:void 0},Wk=Kk({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Xg.current){const e=new RB({});e.mount(window),e.setOptions({layoutScroll:!0}),Xg.current=e}return Xg.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),rf=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Jw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function DB(...e){return t=>{let n=!1;const r=e.map(s=>{const o=Jw(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<r.length;s++){const o=r[s];typeof o=="function"?o():Jw(e[s],null)}}}}function OB(...e){return E.useCallback(DB(...e),e)}class MB extends E.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,s=Db(r)&&r.offsetWidth||0,o=Db(r)&&r.offsetHeight||0,l=this.props.sizeRef.current;l.height=n.offsetHeight||0,l.width=n.offsetWidth||0,l.top=n.offsetTop,l.left=n.offsetLeft,l.right=s-l.width-l.left,l.bottom=o-l.height-l.top}return null}componentDidUpdate(){}render(){return this.props.children}}function IB({children:e,isPresent:t,anchorX:n,anchorY:r,root:s,pop:o}){var b;const l=E.useId(),c=E.useRef(null),f=E.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:d}=E.useContext(rf),m=((b=e.props)==null?void 0:b.ref)??(e==null?void 0:e.ref),p=OB(c,m);return E.useInsertionEffect(()=>{const{width:x,height:S,top:w,left:C,right:A,bottom:N}=f.current;if(t||o===!1||!c.current||!x||!S)return;const k=n==="left"?`left: ${C}`:`right: ${A}`,R=r==="bottom"?`bottom: ${N}`:`top: ${w}`;c.current.dataset.motionPopId=l;const U=document.createElement("style");d&&(U.nonce=d);const I=s??document.head;return I.appendChild(U),U.sheet&&U.sheet.insertRule(`
56
+ [data-motion-pop-id="${l}"] {
57
+ position: absolute !important;
58
+ width: ${x}px !important;
59
+ height: ${S}px !important;
60
+ ${k}px !important;
61
+ ${R}px !important;
62
+ }
63
+ `),()=>{I.contains(U)&&I.removeChild(U)}},[t]),g.jsx(MB,{isPresent:t,childRef:c,sizeRef:f,pop:o,children:o===!1?e:E.cloneElement(e,{ref:p})})}const LB=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:o,mode:l,anchorX:c,anchorY:f,root:d})=>{const m=Am(PB),p=E.useId();let b=!0,x=E.useMemo(()=>(b=!1,{id:p,initial:t,isPresent:n,custom:s,onExitComplete:S=>{m.set(S,!0);for(const w of m.values())if(!w)return;r&&r()},register:S=>(m.set(S,!1),()=>m.delete(S))}),[n,m,r]);return o&&b&&(x={...x}),E.useMemo(()=>{m.forEach((S,w)=>m.set(w,!1))},[n]),E.useEffect(()=>{!n&&!m.size&&r&&r()},[n]),e=g.jsx(IB,{pop:l==="popLayout",isPresent:n,anchorX:c,anchorY:f,root:d,children:e}),g.jsx(_m.Provider,{value:x,children:e})};function PB(){return new Map}function Zk(e=!0){const t=E.useContext(_m);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,o=E.useId();E.useEffect(()=>{if(e)return s(o)},[e]);const l=E.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,l]:[!0]}const ah=e=>e.key||"";function eC(e){const t=[];return E.Children.forEach(e,n=>{E.isValidElement(n)&&t.push(n)}),t}const Rn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:o="sync",propagate:l=!1,anchorX:c="left",anchorY:f="top",root:d})=>{const[m,p]=Zk(l),b=E.useMemo(()=>eC(e),[e]),x=l&&!m?[]:b.map(ah),S=E.useRef(!0),w=E.useRef(b),C=Am(()=>new Map),A=E.useRef(new Set),[N,k]=E.useState(b),[R,U]=E.useState(b);R3(()=>{S.current=!1,w.current=b;for(let M=0;M<R.length;M++){const $=ah(R[M]);x.includes($)?(C.delete($),A.current.delete($)):C.get($)!==!0&&C.set($,!1)}},[R,x.length,x.join("-")]);const I=[];if(b!==N){let M=[...b];for(let $=0;$<R.length;$++){const L=R[$],W=ah(L);x.includes(W)||(M.splice($,0,L),I.push(L))}return o==="wait"&&I.length&&(M=I),U(eC(M)),k(b),null}const{forceRender:j}=E.useContext(My);return g.jsx(g.Fragment,{children:R.map(M=>{const $=ah(M),L=l&&!m?!1:b===R||x.includes($),W=()=>{if(A.current.has($))return;if(A.current.add($),C.has($))C.set($,!0);else return;let K=!0;C.forEach(J=>{J||(K=!1)}),K&&(j==null||j(),U(w.current),l&&(p==null||p()),r&&r())};return g.jsx(LB,{isPresent:L,initial:!S.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:o,root:d,onExitComplete:L?void 0:W,anchorX:c,anchorY:f,children:M},$)})})},Jk=E.createContext({strict:!1}),tC={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let nC=!1;function jB(){if(nC)return;const e={};for(const t in tC)e[t]={isEnabled:n=>tC[t].some(r=>!!n[r])};kk(e),nC=!0}function eN(){return jB(),Sj()}function BB(e){const t=eN();for(const n in e)t[n]={...t[n],...e[n]};kk(t)}const FB=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function nm(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||FB.has(e)}let tN=e=>!nm(e);function nN(e){typeof e=="function"&&(tN=t=>t.startsWith("on")?!nm(t):e(t))}try{nN(require("@emotion/is-prop-valid").default)}catch{}function UB(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(tN(s)||n===!0&&nm(s)||!t&&!nm(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}function rC({children:e,isValidProp:t,...n}){t&&nN(t);const r=E.useContext(rf);n={...r,...n},n.transition=Xy(n.transition,r.transition),n.isStatic=Am(()=>n.isStatic);const s=E.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion,n.skipAnimations]);return g.jsx(rf.Provider,{value:s,children:e})}const Rm=E.createContext({});function HB(e,t){if(Nm(e)){const{initial:n,animate:r}=e;return{initial:n===!1||tf(n)?n:void 0,animate:tf(r)?r:void 0}}return e.inherit!==!1?t:{}}function zB(e){const{initial:t,animate:n}=HB(e,E.useContext(Rm));return E.useMemo(()=>({initial:t,animate:n}),[iC(t),iC(n)])}function iC(e){return Array.isArray(e)?e.join(" "):e}const ux=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function rN(e,t,n){for(const r in t)!Gn(t[r])&&!Lk(r,n)&&(e[r]=t[r])}function VB({transformTemplate:e},t){return E.useMemo(()=>{const n=ux();return ox(n,t,e),Object.assign({},n.vars,n.style)},[t])}function qB(e,t){const n=e.style||{},r={};return rN(r,n,e),Object.assign(r,VB(e,t)),r}function $B(e,t){const n={},r=qB(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const iN=()=>({...ux(),attrs:{}});function YB(e,t,n,r){const s=E.useMemo(()=>{const o=iN();return Pk(o,t,Bk(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};rN(o,e.style,e),s.style={...o,...s.style}}return s}const GB=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function cx(e){return typeof e!="string"||e.includes("-")?!1:!!(GB.indexOf(e)>-1||/[A-Z]/u.test(e))}function QB(e,t,n,{latestValues:r},s,o=!1,l){const f=(l??cx(e)?YB:$B)(t,r,s,e),d=UB(t,typeof e=="string",o),m=e!==E.Fragment?{...d,...f,ref:n}:{},{children:p}=t,b=E.useMemo(()=>Gn(p)?p.get():p,[p]);return E.createElement(e,{...m,children:b})}function KB({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:XB(n,r,s,e),renderState:t()}}function XB(e,t,n,r){const s={},o=r(e,{});for(const b in o)s[b]=jh(o[b]);let{initial:l,animate:c}=e;const f=Nm(e),d=_k(e);t&&d&&!f&&e.inherit!==!1&&(l===void 0&&(l=t.initial),c===void 0&&(c=t.animate));let m=n?n.initial===!1:!1;m=m||l===!1;const p=m?c:l;if(p&&typeof p!="boolean"&&!km(p)){const b=Array.isArray(p)?p:[p];for(let x=0;x<b.length;x++){const S=Jy(e,b[x]);if(S){const{transitionEnd:w,transition:C,...A}=S;for(const N in A){let k=A[N];if(Array.isArray(k)){const R=m?k.length-1:0;k=k[R]}k!==null&&(s[N]=k)}for(const N in w)s[N]=w[N]}}}return s}const sN=e=>(t,n)=>{const r=E.useContext(Rm),s=E.useContext(_m),o=()=>KB(e,t,r,s);return n?o():Am(o)},WB=sN({scrapeMotionValuesFromProps:lx,createRenderState:ux}),ZB=sN({scrapeMotionValuesFromProps:Fk,createRenderState:iN}),JB=Symbol.for("motionComponentSymbol");function e7(e,t,n){const r=E.useRef(n);E.useInsertionEffect(()=>{r.current=n});const s=E.useRef(null);return E.useCallback(o=>{var c;o&&((c=e.onMount)==null||c.call(e,o)),t&&(o?t.mount(o):t.unmount());const l=r.current;if(typeof l=="function")if(o){const f=l(o);typeof f=="function"&&(s.current=f)}else s.current?(s.current(),s.current=null):l(o);else l&&(l.current=o)},[t])}const aN=E.createContext({});function Al(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function t7(e,t,n,r,s,o){var k,R;const{visualElement:l}=E.useContext(Rm),c=E.useContext(Jk),f=E.useContext(_m),d=E.useContext(rf),m=d.reducedMotion,p=d.skipAnimations,b=E.useRef(null),x=E.useRef(!1);r=r||c.renderer,!b.current&&r&&(b.current=r(e,{visualState:t,parent:l,props:n,presenceContext:f,blockInitialAnimation:f?f.initial===!1:!1,reducedMotionConfig:m,skipAnimations:p,isSVG:o}),x.current&&b.current&&(b.current.manuallyAnimateOnMount=!0));const S=b.current,w=E.useContext(aN);S&&!S.projection&&s&&(S.type==="html"||S.type==="svg")&&n7(b.current,n,s,w);const C=E.useRef(!1);E.useInsertionEffect(()=>{S&&C.current&&S.update(n,f)});const A=n[hk],N=E.useRef(!!A&&!((k=window.MotionHandoffIsComplete)!=null&&k.call(window,A))&&((R=window.MotionHasOptimisedAnimation)==null?void 0:R.call(window,A)));return R3(()=>{x.current=!0,S&&(C.current=!0,window.MotionIsMounted=!0,S.updateFeatures(),S.scheduleRenderMicrotask(),N.current&&S.animationState&&S.animationState.animateChanges())}),E.useEffect(()=>{S&&(!N.current&&S.animationState&&S.animationState.animateChanges(),N.current&&(queueMicrotask(()=>{var U;(U=window.MotionHandoffMarkAsComplete)==null||U.call(window,A)}),N.current=!1),S.enteringChildren=void 0)}),S}function n7(e,t,n,r){const{layoutId:s,layout:o,drag:l,dragConstraints:c,layoutScroll:f,layoutRoot:d,layoutCrossfade:m}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:oN(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!l||c&&Al(c),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:m,layoutScroll:f,layoutRoot:d})}function oN(e){if(e)return e.options.allowProjection!==!1?e.projection:oN(e.parent)}function Wg(e,{forwardMotionProps:t=!1,type:n}={},r,s){r&&BB(r);const o=n?n==="svg":cx(e),l=o?ZB:WB;function c(d,m){let p;const b={...E.useContext(rf),...d,layoutId:r7(d)},{isStatic:x}=b,S=zB(d),w=l(d,x);if(!x&&N3){i7();const C=s7(b);p=C.MeasureLayout,S.visualElement=t7(e,w,b,s,C.ProjectionNode,o)}return g.jsxs(Rm.Provider,{value:S,children:[p&&S.visualElement?g.jsx(p,{visualElement:S.visualElement,...b}):null,QB(e,d,e7(w,S.visualElement,m),w,x,t,o)]})}c.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const f=E.forwardRef(c);return f[JB]=e,f}function r7({layoutId:e}){const t=E.useContext(My).id;return t&&e!==void 0?t+"-"+e:e}function i7(e,t){E.useContext(Jk).strict}function s7(e){const t=eN(),{drag:n,layout:r}=t;if(!n&&!r)return{};const s={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function a7(e,t){if(typeof Proxy>"u")return Wg;const n=new Map,r=(o,l)=>Wg(o,l,e,t),s=(o,l)=>r(o,l);return new Proxy(s,{get:(o,l)=>l==="create"?r:(n.has(l)||n.set(l,Wg(l,void 0,e,t)),n.get(l))})}const o7=(e,t)=>t.isSVG??cx(e)?new Uj(t):new Ij(t,{allowProjection:e!==E.Fragment});class l7 extends Ca{constructor(t){super(t),t.animationState||(t.animationState=$j(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();km(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let u7=0;class c7 extends Ca{constructor(){super(...arguments),this.id=u7++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const f7={animation:{Feature:l7},exit:{Feature:c7}};function Cf(e){return{point:{x:e.pageX,y:e.pageY}}}const d7=e=>t=>rx(t)&&e(t,Cf(t));function jc(e,t,n,r){return nf(e,t,d7(n),r)}const lN=({current:e})=>e?e.ownerDocument.defaultView:null,sC=(e,t)=>Math.abs(e-t);function h7(e,t){const n=sC(e.x,t.x),r=sC(e.y,t.y);return Math.sqrt(n**2+r**2)}const aC=new Set(["auto","scroll"]);class uN{constructor(t,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:o=!1,distanceThreshold:l=3,element:c}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=x=>{this.handleScroll(x.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Jg(this.lastMoveEventInfo,this.history),S=this.startEvent!==null,w=h7(x.offset,{x:0,y:0})>=this.distanceThreshold;if(!S&&!w)return;const{point:C}=x,{timestamp:A}=Hn;this.history.push({...C,timestamp:A});const{onStart:N,onMove:k}=this.handlers;S||(N&&N(this.lastMoveEvent,x),this.startEvent=this.lastMoveEvent),k&&k(this.lastMoveEvent,x)},this.handlePointerMove=(x,S)=>{this.lastMoveEvent=x,this.lastMoveEventInfo=Zg(S,this.transformPagePoint),Ht.update(this.updatePoint,!0)},this.handlePointerUp=(x,S)=>{this.end();const{onEnd:w,onSessionEnd:C,resumeAnimation:A}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&A&&A(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const N=Jg(x.type==="pointercancel"?this.lastMoveEventInfo:Zg(S,this.transformPagePoint),this.history);this.startEvent&&w&&w(x,N),C&&C(x,N)},!rx(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=l,this.contextWindow=s||window;const f=Cf(t),d=Zg(f,this.transformPagePoint),{point:m}=d,{timestamp:p}=Hn;this.history=[{...m,timestamp:p}];const{onSessionStart:b}=n;b&&b(t,Jg(d,this.history)),this.removeListeners=Tf(jc(this.contextWindow,"pointermove",this.handlePointerMove),jc(this.contextWindow,"pointerup",this.handlePointerUp),jc(this.contextWindow,"pointercancel",this.handlePointerUp)),c&&this.startScrollTracking(c)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(aC.has(r.overflowX)||aC.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,s=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},o={x:s.x-n.x,y:s.y-n.y};o.x===0&&o.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(t,s),Ht.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ya(this.updatePoint)}}function Zg(e,t){return t?{point:t(e.point)}:e}function oC(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Jg({point:e},t){return{point:e,delta:oC(e,cN(t)),offset:oC(e,m7(t)),velocity:p7(t,.1)}}function m7(e){return e[0]}function cN(e){return e[e.length-1]}function p7(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=cN(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>Li(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&s.timestamp-r.timestamp>Li(t)*2&&(r=e[1]);const o=ti(s.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const l={x:(s.x-r.x)/o,y:(s.y-r.y)/o};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function g7(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?tn(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?tn(n,e,r.max):Math.min(e,n)),e}function lC(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function b7(e,{top:t,left:n,bottom:r,right:s}){return{x:lC(e.x,n,s),y:lC(e.y,t,r)}}function uC(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function y7(e,t){return{x:uC(e.x,t.x),y:uC(e.y,t.y)}}function x7(e,t){let n=.5;const r=or(e),s=or(t);return s>r?n=Zc(t.min,t.max-r,e.min):r>s&&(n=Zc(e.min,e.max-s,t.min)),Fi(0,1,n)}function E7(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Pb=.35;function v7(e=Pb){return e===!1?e=0:e===!0&&(e=Pb),{x:cC(e,"left","right"),y:cC(e,"top","bottom")}}function cC(e,t,n){return{min:fC(e,t),max:fC(e,n)}}function fC(e,t){return typeof e=="number"?e:e[t]||0}const T7=new WeakMap;class S7{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=_n(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const o=p=>{n&&this.snapToCursor(Cf(p).point),this.stopAnimation()},l=(p,b)=>{const{drag:x,dragPropagation:S,onDragStart:w}=this.getProps();if(x&&!S&&(this.openDragLock&&this.openDragLock(),this.openDragLock=J9(x),!this.openDragLock))return;this.latestPointerEvent=p,this.latestPanInfo=b,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ai(A=>{let N=this.getAxisMotionValue(A).get()||0;if(Pi.test(N)){const{projection:k}=this.visualElement;if(k&&k.layout){const R=k.layout.layoutBox[A];R&&(N=or(R)*(parseFloat(N)/100))}}this.originPoint[A]=N}),w&&Ht.update(()=>w(p,b),!1,!0),kb(this.visualElement,"transform");const{animationState:C}=this.visualElement;C&&C.setActive("whileDrag",!0)},c=(p,b)=>{this.latestPointerEvent=p,this.latestPanInfo=b;const{dragPropagation:x,dragDirectionLock:S,onDirectionLock:w,onDrag:C}=this.getProps();if(!x&&!this.openDragLock)return;const{offset:A}=b;if(S&&this.currentDirection===null){this.currentDirection=C7(A),this.currentDirection!==null&&w&&w(this.currentDirection);return}this.updateAxis("x",b.point,A),this.updateAxis("y",b.point,A),this.visualElement.render(),C&&Ht.update(()=>C(p,b),!1,!0)},f=(p,b)=>{this.latestPointerEvent=p,this.latestPanInfo=b,this.stop(p,b),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>{const{dragSnapToOrigin:p}=this.getProps();(p||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:m}=this.getProps();this.panSession=new uN(t,{onSessionStart:o,onStart:l,onMove:c,onSessionEnd:f,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:r,contextWindow:lN(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,s=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!s||!r)return;const{velocity:l}=s;this.startAnimation(l);const{onDragEnd:c}=this.getProps();c&&Ht.postRender(()=>c(r,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!oh(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(l=g7(l,this.constraints[t],this.elastic[t])),o.set(l)}resolveConstraints(){var o;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,s=this.constraints;t&&Al(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=b7(r.layoutBox,t):this.constraints=!1,this.elastic=v7(n),s!==this.constraints&&!Al(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Ai(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=E7(r.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Al(t))return!1;const r=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const o=kj(r,s.root,this.visualElement.getTransformPagePoint());let l=y7(s.layout.layoutBox,o);if(n){const c=n(Cj(l));this.hasMutatedConstraints=!!c,c&&(l=Rk(c))}return l}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:o,dragSnapToOrigin:l,onDragTransitionEnd:c}=this.getProps(),f=this.constraints||{},d=Ai(m=>{if(!oh(m,n,this.currentDirection))return;let p=f&&f[m]||{};l&&(p={min:0,max:0});const b=s?200:1e6,x=s?40:1e7,S={type:"inertia",velocity:r?t[m]:0,bounceStiffness:b,bounceDamping:x,timeConstant:750,restDelta:1,restSpeed:10,...o,...p};return this.startAxisValueAnimation(m,S)});return Promise.all(d).then(c)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return kb(this.visualElement,t),r.start(Zy(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ai(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ai(n=>{const{drag:r}=this.getProps();if(!oh(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(n);if(s&&s.layout){const{min:l,max:c}=s.layout.layoutBox[n],f=o.get()||0;o.set(t[n]-tn(l,c,.5)+f)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Al(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Ai(l=>{const c=this.getAxisMotionValue(l);if(c&&this.constraints!==!1){const f=c.get();s[l]=x7({min:f,max:f},this.constraints[l])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),Ai(l=>{if(!oh(l,t,null))return;const c=this.getAxisMotionValue(l),{min:f,max:d}=this.constraints[l];c.set(tn(f,d,s[l]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;T7.set(this.visualElement,this);const t=this.visualElement.current,n=jc(t,"pointerdown",d=>{const{drag:m,dragListener:p=!0}=this.getProps(),b=d.target,x=b!==t&&sj(b);m&&p&&!x&&this.start(d)});let r;const s=()=>{const{dragConstraints:d}=this.getProps();Al(d)&&d.current&&(this.constraints=this.resolveRefConstraints(),r||(r=w7(t,d.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,l=o.addEventListener("measure",s);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Ht.read(s);const c=nf(window,"resize",()=>this.scalePositionWithinConstraints()),f=o.addEventListener("didUpdate",(({delta:d,hasLayoutChanged:m})=>{this.isDragging&&m&&(Ai(p=>{const b=this.getAxisMotionValue(p);b&&(this.originPoint[p]+=d[p].translate,b.set(b.get()+d[p].translate))}),this.visualElement.render())}));return()=>{c(),n(),l(),f&&f(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:l=Pb,dragMomentum:c=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:o,dragElastic:l,dragMomentum:c}}}function dC(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function w7(e,t,n){const r=yw(e,dC(n)),s=yw(t,dC(n));return()=>{r(),s()}}function oh(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function C7(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class A7 extends Ca{constructor(t){super(t),this.removeGroupControls=ni,this.removeListeners=ni,this.controls=new S7(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ni}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const e1=e=>(t,n)=>{e&&Ht.update(()=>e(t,n),!1,!0)};class _7 extends Ca{constructor(){super(...arguments),this.removePointerDownListener=ni}onPointerDown(t){this.session=new uN(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:lN(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:e1(t),onStart:e1(n),onMove:e1(r),onEnd:(o,l)=>{delete this.session,s&&Ht.postRender(()=>s(o,l))}}}mount(){this.removePointerDownListener=jc(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let t1=!1;class k7 extends E.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:o}=t;o&&(n.group&&n.group.add(o),r&&r.register&&s&&r.register(o),t1&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Bh.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:o}=this.props,{projection:l}=r;return l&&(l.isPresent=o,t.layoutDependency!==n&&l.setOptions({...l.options,layoutDependency:n}),t1=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==o?l.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?l.promote():l.relegate()||Ht.postRender(()=>{const c=l.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),nx.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;t1=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function fN(e){const[t,n]=Zk(),r=E.useContext(My);return g.jsx(k7,{...e,layoutGroup:r,switchLayoutGroup:E.useContext(aN),isPresent:t,safeToRemove:n})}const N7={pan:{Feature:_7},drag:{Feature:A7,ProjectionNode:Wk,MeasureLayout:fN}};function hC(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=r[s];o&&Ht.postRender(()=>o(t,Cf(t)))}class R7 extends Ca{mount(){const{current:t}=this.node;t&&(this.unmount=tj(t,(n,r)=>(hC(this.node,r,"Start"),s=>hC(this.node,s,"End"))))}unmount(){}}class D7 extends Ca{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Tf(nf(this.node.current,"focus",()=>this.onFocus()),nf(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function mC(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),o=r[s];o&&Ht.postRender(()=>o(t,Cf(t)))}class O7 extends Ca{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=oj(t,(s,o)=>(mC(this.node,o,"Start"),(l,{success:c})=>mC(this.node,l,c?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const jb=new WeakMap,n1=new WeakMap,M7=e=>{const t=jb.get(e.target);t&&t(e)},I7=e=>{e.forEach(M7)};function L7({root:e,...t}){const n=e||document;n1.has(n)||n1.set(n,{});const r=n1.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(I7,{root:e,...t})),r[s]}function P7(e,t,n){const r=L7(t);return jb.set(e,n),r.observe(e),()=>{jb.delete(e),r.unobserve(e)}}const j7={some:0,all:1};class B7 extends Ca{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:o}=t,l={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:j7[s]},c=f=>{const{isIntersecting:d}=f;if(this.isInView===d||(this.isInView=d,o&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:m,onViewportLeave:p}=this.node.getProps(),b=d?m:p;b&&b(f)};return P7(this.node.current,l,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(F7(t,n))&&this.startObserver()}unmount(){}}function F7({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const U7={inView:{Feature:B7},tap:{Feature:O7},focus:{Feature:D7},hover:{Feature:R7}},H7={layout:{ProjectionNode:Wk,MeasureLayout:fN}},z7={...f7,...U7,...N7,...H7},gt=a7(z7,o7);/**
64
+ * @license lucide-react v0.563.0 - ISC
65
+ *
66
+ * This source code is licensed under the ISC license.
67
+ * See the LICENSE file in the root directory of this source tree.
68
+ */const dN=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
69
+ * @license lucide-react v0.563.0 - ISC
70
+ *
71
+ * This source code is licensed under the ISC license.
72
+ * See the LICENSE file in the root directory of this source tree.
73
+ */const V7=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
74
+ * @license lucide-react v0.563.0 - ISC
75
+ *
76
+ * This source code is licensed under the ISC license.
77
+ * See the LICENSE file in the root directory of this source tree.
78
+ */const q7=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
79
+ * @license lucide-react v0.563.0 - ISC
80
+ *
81
+ * This source code is licensed under the ISC license.
82
+ * See the LICENSE file in the root directory of this source tree.
83
+ */const pC=e=>{const t=q7(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
84
+ * @license lucide-react v0.563.0 - ISC
85
+ *
86
+ * This source code is licensed under the ISC license.
87
+ * See the LICENSE file in the root directory of this source tree.
88
+ */var $7={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"};/**
89
+ * @license lucide-react v0.563.0 - ISC
90
+ *
91
+ * This source code is licensed under the ISC license.
92
+ * See the LICENSE file in the root directory of this source tree.
93
+ */const Y7=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
94
+ * @license lucide-react v0.563.0 - ISC
95
+ *
96
+ * This source code is licensed under the ISC license.
97
+ * See the LICENSE file in the root directory of this source tree.
98
+ */const G7=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:l,...c},f)=>E.createElement("svg",{ref:f,...$7,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:dN("lucide",s),...!o&&!Y7(c)&&{"aria-hidden":"true"},...c},[...l.map(([d,m])=>E.createElement(d,m)),...Array.isArray(o)?o:[o]]));/**
99
+ * @license lucide-react v0.563.0 - ISC
100
+ *
101
+ * This source code is licensed under the ISC license.
102
+ * See the LICENSE file in the root directory of this source tree.
103
+ */const et=(e,t)=>{const n=E.forwardRef(({className:r,...s},o)=>E.createElement(G7,{ref:o,iconNode:t,className:dN(`lucide-${V7(pC(e))}`,`lucide-${e}`,r),...s}));return n.displayName=pC(e),n};/**
104
+ * @license lucide-react v0.563.0 - ISC
105
+ *
106
+ * This source code is licensed under the ISC license.
107
+ * See the LICENSE file in the root directory of this source tree.
108
+ */const Q7=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],hN=et("arrow-down",Q7);/**
109
+ * @license lucide-react v0.563.0 - ISC
110
+ *
111
+ * This source code is licensed under the ISC license.
112
+ * See the LICENSE file in the root directory of this source tree.
113
+ */const K7=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],mN=et("arrow-up",K7);/**
114
+ * @license lucide-react v0.563.0 - ISC
115
+ *
116
+ * This source code is licensed under the ISC license.
117
+ * See the LICENSE file in the root directory of this source tree.
118
+ */const X7=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],W7=et("bot",X7);/**
119
+ * @license lucide-react v0.563.0 - ISC
120
+ *
121
+ * This source code is licensed under the ISC license.
122
+ * See the LICENSE file in the root directory of this source tree.
123
+ */const Z7=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Mi=et("check",Z7);/**
124
+ * @license lucide-react v0.563.0 - ISC
125
+ *
126
+ * This source code is licensed under the ISC license.
127
+ * See the LICENSE file in the root directory of this source tree.
128
+ */const J7=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Dm=et("chevron-down",J7);/**
129
+ * @license lucide-react v0.563.0 - ISC
130
+ *
131
+ * This source code is licensed under the ISC license.
132
+ * See the LICENSE file in the root directory of this source tree.
133
+ */const eF=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],sf=et("chevron-right",eF);/**
134
+ * @license lucide-react v0.563.0 - ISC
135
+ *
136
+ * This source code is licensed under the ISC license.
137
+ * See the LICENSE file in the root directory of this source tree.
138
+ */const tF=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],nF=et("circle-check",tF);/**
139
+ * @license lucide-react v0.563.0 - ISC
140
+ *
141
+ * This source code is licensed under the ISC license.
142
+ * See the LICENSE file in the root directory of this source tree.
143
+ */const rF=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],iF=et("circle",rF);/**
144
+ * @license lucide-react v0.563.0 - ISC
145
+ *
146
+ * This source code is licensed under the ISC license.
147
+ * See the LICENSE file in the root directory of this source tree.
148
+ */const sF=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],aF=et("clipboard-list",sF);/**
149
+ * @license lucide-react v0.563.0 - ISC
150
+ *
151
+ * This source code is licensed under the ISC license.
152
+ * See the LICENSE file in the root directory of this source tree.
153
+ */const oF=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],lF=et("clock",oF);/**
154
+ * @license lucide-react v0.563.0 - ISC
155
+ *
156
+ * This source code is licensed under the ISC license.
157
+ * See the LICENSE file in the root directory of this source tree.
158
+ */const uF=[["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"}]],pN=et("copy",uF);/**
159
+ * @license lucide-react v0.563.0 - ISC
160
+ *
161
+ * This source code is licensed under the ISC license.
162
+ * See the LICENSE file in the root directory of this source tree.
163
+ */const cF=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],fF=et("corner-down-left",cF);/**
164
+ * @license lucide-react v0.563.0 - ISC
165
+ *
166
+ * This source code is licensed under the ISC license.
167
+ * See the LICENSE file in the root directory of this source tree.
168
+ */const dF=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],hF=et("dollar-sign",dF);/**
169
+ * @license lucide-react v0.563.0 - ISC
170
+ *
171
+ * This source code is licensed under the ISC license.
172
+ * See the LICENSE file in the root directory of this source tree.
173
+ */const mF=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],gC=et("external-link",mF);/**
174
+ * @license lucide-react v0.563.0 - ISC
175
+ *
176
+ * This source code is licensed under the ISC license.
177
+ * See the LICENSE file in the root directory of this source tree.
178
+ */const pF=[["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"}]],gF=et("eye-off",pF);/**
179
+ * @license lucide-react v0.563.0 - ISC
180
+ *
181
+ * This source code is licensed under the ISC license.
182
+ * See the LICENSE file in the root directory of this source tree.
183
+ */const bF=[["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"}]],yF=et("eye",bF);/**
184
+ * @license lucide-react v0.563.0 - ISC
185
+ *
186
+ * This source code is licensed under the ISC license.
187
+ * See the LICENSE file in the root directory of this source tree.
188
+ */const xF=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],EF=et("file-text",xF);/**
189
+ * @license lucide-react v0.563.0 - ISC
190
+ *
191
+ * This source code is licensed under the ISC license.
192
+ * See the LICENSE file in the root directory of this source tree.
193
+ */const vF=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],TF=et("file",vF);/**
194
+ * @license lucide-react v0.563.0 - ISC
195
+ *
196
+ * This source code is licensed under the ISC license.
197
+ * See the LICENSE file in the root directory of this source tree.
198
+ */const SF=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],gN=et("folder-open",SF);/**
199
+ * @license lucide-react v0.563.0 - ISC
200
+ *
201
+ * This source code is licensed under the ISC license.
202
+ * See the LICENSE file in the root directory of this source tree.
203
+ */const wF=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],Bc=et("folder",wF);/**
204
+ * @license lucide-react v0.563.0 - ISC
205
+ *
206
+ * This source code is licensed under the ISC license.
207
+ * See the LICENSE file in the root directory of this source tree.
208
+ */const CF=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],bC=et("git-branch",CF);/**
209
+ * @license lucide-react v0.563.0 - ISC
210
+ *
211
+ * This source code is licensed under the ISC license.
212
+ * See the LICENSE file in the root directory of this source tree.
213
+ */const AF=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}],["path",{d:"M3.22 13H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"auskq0"}]],_F=et("heart-pulse",AF);/**
214
+ * @license lucide-react v0.563.0 - ISC
215
+ *
216
+ * This source code is licensed under the ISC license.
217
+ * See the LICENSE file in the root directory of this source tree.
218
+ */const kF=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],NF=et("layers",kF);/**
219
+ * @license lucide-react v0.563.0 - ISC
220
+ *
221
+ * This source code is licensed under the ISC license.
222
+ * See the LICENSE file in the root directory of this source tree.
223
+ */const RF=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]],DF=et("list-todo",RF);/**
224
+ * @license lucide-react v0.563.0 - ISC
225
+ *
226
+ * This source code is licensed under the ISC license.
227
+ * See the LICENSE file in the root directory of this source tree.
228
+ */const OF=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],af=et("loader-circle",OF);/**
229
+ * @license lucide-react v0.563.0 - ISC
230
+ *
231
+ * This source code is licensed under the ISC license.
232
+ * See the LICENSE file in the root directory of this source tree.
233
+ */const MF=[["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"}]],bN=et("message-square",MF);/**
234
+ * @license lucide-react v0.563.0 - ISC
235
+ *
236
+ * This source code is licensed under the ISC license.
237
+ * See the LICENSE file in the root directory of this source tree.
238
+ */const IF=[["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"}]],LF=et("monitor",IF);/**
239
+ * @license lucide-react v0.563.0 - ISC
240
+ *
241
+ * This source code is licensed under the ISC license.
242
+ * See the LICENSE file in the root directory of this source tree.
243
+ */const PF=[["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"}]],jF=et("moon",PF);/**
244
+ * @license lucide-react v0.563.0 - ISC
245
+ *
246
+ * This source code is licensed under the ISC license.
247
+ * See the LICENSE file in the root directory of this source tree.
248
+ */const BF=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],FF=et("panel-left-close",BF);/**
249
+ * @license lucide-react v0.563.0 - ISC
250
+ *
251
+ * This source code is licensed under the ISC license.
252
+ * See the LICENSE file in the root directory of this source tree.
253
+ */const UF=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],yC=et("panel-left",UF);/**
254
+ * @license lucide-react v0.563.0 - ISC
255
+ *
256
+ * This source code is licensed under the ISC license.
257
+ * See the LICENSE file in the root directory of this source tree.
258
+ */const HF=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],zF=et("plus",HF);/**
259
+ * @license lucide-react v0.563.0 - ISC
260
+ *
261
+ * This source code is licensed under the ISC license.
262
+ * See the LICENSE file in the root directory of this source tree.
263
+ */const VF=[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]],qF=et("route",VF);/**
264
+ * @license lucide-react v0.563.0 - ISC
265
+ *
266
+ * This source code is licensed under the ISC license.
267
+ * See the LICENSE file in the root directory of this source tree.
268
+ */const $F=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],YF=et("settings",$F);/**
269
+ * @license lucide-react v0.563.0 - ISC
270
+ *
271
+ * This source code is licensed under the ISC license.
272
+ * See the LICENSE file in the root directory of this source tree.
273
+ */const GF=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],QF=et("shield-check",GF);/**
274
+ * @license lucide-react v0.563.0 - ISC
275
+ *
276
+ * This source code is licensed under the ISC license.
277
+ * See the LICENSE file in the root directory of this source tree.
278
+ */const KF=[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71",key:"1jlk70"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264",key:"18rp1v"}]],yN=et("shield-off",KF);/**
279
+ * @license lucide-react v0.563.0 - ISC
280
+ *
281
+ * This source code is licensed under the ISC license.
282
+ * See the LICENSE file in the root directory of this source tree.
283
+ */const XF=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],fx=et("shield",XF);/**
284
+ * @license lucide-react v0.563.0 - ISC
285
+ *
286
+ * This source code is licensed under the ISC license.
287
+ * See the LICENSE file in the root directory of this source tree.
288
+ */const WF=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],ZF=et("square",WF);/**
289
+ * @license lucide-react v0.563.0 - ISC
290
+ *
291
+ * This source code is licensed under the ISC license.
292
+ * See the LICENSE file in the root directory of this source tree.
293
+ */const JF=[["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"}]],eU=et("sun",JF);/**
294
+ * @license lucide-react v0.563.0 - ISC
295
+ *
296
+ * This source code is licensed under the ISC license.
297
+ * See the LICENSE file in the root directory of this source tree.
298
+ */const tU=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],nU=et("terminal",tU);/**
299
+ * @license lucide-react v0.563.0 - ISC
300
+ *
301
+ * This source code is licensed under the ISC license.
302
+ * See the LICENSE file in the root directory of this source tree.
303
+ */const rU=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]],iU=et("volume-2",rU);/**
304
+ * @license lucide-react v0.563.0 - ISC
305
+ *
306
+ * This source code is licensed under the ISC license.
307
+ * See the LICENSE file in the root directory of this source tree.
308
+ */const sU=[["path",{d:"M16 9a5 5 0 0 1 .95 2.293",key:"1fgyg8"}],["path",{d:"M19.364 5.636a9 9 0 0 1 1.889 9.96",key:"l3zxae"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"m7 7-.587.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298V11",key:"1gbwow"}],["path",{d:"M9.828 4.172A.686.686 0 0 1 11 4.657v.686",key:"s2je0y"}]],aU=et("volume-off",sU);/**
309
+ * @license lucide-react v0.563.0 - ISC
310
+ *
311
+ * This source code is licensed under the ISC license.
312
+ * See the LICENSE file in the root directory of this source tree.
313
+ */const oU=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Af=et("x",oU);function xC({sessionId:e}){return null}function Om(){const e=Jt(o=>o.selectedCwd),t=Jt(o=>o.setSelectedCwd),[n,r]=_3("dir"),[,s]=Cm();return E.useEffect(()=>{n&&n!==e&&t(n)},[n]),[n??e,o=>{o?(r(o),t(o),s(null)):r(null)}]}function xN(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=xN(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function dx(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=xN(e))&&(r&&(r+=" "),r+=t);return r}const lU=(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},uU=(e,t)=>({classGroupId:e,validator:t}),EN=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),rm="-",EC=[],cU="arbitrary..",fU=e=>{const t=hU(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return dU(l);const c=l.split(rm),f=c[0]===""&&c.length>1?1:0;return vN(c,f,t)},getConflictingClassGroupIds:(l,c)=>{if(c){const f=r[l],d=n[l];return f?d?lU(d,f):f:d||EC}return n[l]||EC}}},vN=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const s=e[t],o=n.nextPart.get(s);if(o){const d=vN(e,t+1,o);if(d)return d}const l=n.validators;if(l===null)return;const c=t===0?e.join(rm):e.slice(t).join(rm),f=l.length;for(let d=0;d<f;d++){const m=l[d];if(m.validator(c))return m.classGroupId}},dU=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?cU+r:void 0})(),hU=e=>{const{theme:t,classGroups:n}=e;return mU(n,t)},mU=(e,t)=>{const n=EN();for(const r in e){const s=e[r];hx(s,n,r,t)}return n},hx=(e,t,n,r)=>{const s=e.length;for(let o=0;o<s;o++){const l=e[o];pU(l,t,n,r)}},pU=(e,t,n,r)=>{if(typeof e=="string"){gU(e,t,n);return}if(typeof e=="function"){bU(e,t,n,r);return}yU(e,t,n,r)},gU=(e,t,n)=>{const r=e===""?t:TN(t,e);r.classGroupId=n},bU=(e,t,n,r)=>{if(xU(e)){hx(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(uU(n,e))},yU=(e,t,n,r)=>{const s=Object.entries(e),o=s.length;for(let l=0;l<o;l++){const[c,f]=s[l];hx(f,TN(t,c),n,r)}},TN=(e,t)=>{let n=e;const r=t.split(rm),s=r.length;for(let o=0;o<s;o++){const l=r[o];let c=n.nextPart.get(l);c||(c=EN(),n.nextPart.set(l,c)),n=c}return n},xU=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,EU=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const s=(o,l)=>{n[o]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(o){let l=n[o];if(l!==void 0)return l;if((l=r[o])!==void 0)return s(o,l),l},set(o,l){o in n?n[o]=l:s(o,l)}}},Bb="!",vC=":",vU=[],TC=(e,t,n,r,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:s}),TU=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=s=>{const o=[];let l=0,c=0,f=0,d;const m=s.length;for(let w=0;w<m;w++){const C=s[w];if(l===0&&c===0){if(C===vC){o.push(s.slice(f,w)),f=w+1;continue}if(C==="/"){d=w;continue}}C==="["?l++:C==="]"?l--:C==="("?c++:C===")"&&c--}const p=o.length===0?s:s.slice(f);let b=p,x=!1;p.endsWith(Bb)?(b=p.slice(0,-1),x=!0):p.startsWith(Bb)&&(b=p.slice(1),x=!0);const S=d&&d>f?d-f:void 0;return TC(o,x,b,S)};if(t){const s=t+vC,o=r;r=l=>l.startsWith(s)?o(l.slice(s.length)):TC(vU,!1,l,void 0,!0)}if(n){const s=r;r=o=>n({className:o,parseClassName:s})}return r},SU=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let s=[];for(let o=0;o<n.length;o++){const l=n[o],c=l[0]==="[",f=t.has(l);c||f?(s.length>0&&(s.sort(),r.push(...s),s=[]),r.push(l)):s.push(l)}return s.length>0&&(s.sort(),r.push(...s)),r}},wU=e=>({cache:EU(e.cacheSize),parseClassName:TU(e),sortModifiers:SU(e),...fU(e)}),CU=/\s+/,AU=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:o}=t,l=[],c=e.trim().split(CU);let f="";for(let d=c.length-1;d>=0;d-=1){const m=c[d],{isExternal:p,modifiers:b,hasImportantModifier:x,baseClassName:S,maybePostfixModifierPosition:w}=n(m);if(p){f=m+(f.length>0?" "+f:f);continue}let C=!!w,A=r(C?S.substring(0,w):S);if(!A){if(!C){f=m+(f.length>0?" "+f:f);continue}if(A=r(S),!A){f=m+(f.length>0?" "+f:f);continue}C=!1}const N=b.length===0?"":b.length===1?b[0]:o(b).join(":"),k=x?N+Bb:N,R=k+A;if(l.indexOf(R)>-1)continue;l.push(R);const U=s(A,C);for(let I=0;I<U.length;++I){const j=U[I];l.push(k+j)}f=m+(f.length>0?" "+f:f)}return f},_U=(...e)=>{let t=0,n,r,s="";for(;t<e.length;)(n=e[t++])&&(r=SN(n))&&(s&&(s+=" "),s+=r);return s},SN=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=SN(e[r]))&&(n&&(n+=" "),n+=t);return n},kU=(e,...t)=>{let n,r,s,o;const l=f=>{const d=t.reduce((m,p)=>p(m),e());return n=wU(d),r=n.cache.get,s=n.cache.set,o=c,c(f)},c=f=>{const d=r(f);if(d)return d;const m=AU(f,n);return s(f,m),m};return o=l,(...f)=>o(_U(...f))},NU=[],An=e=>{const t=n=>n[e]||NU;return t.isThemeGetter=!0,t},wN=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,CN=/^\((?:(\w[\w-]*):)?(.+)\)$/i,RU=/^\d+\/\d+$/,DU=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,OU=/\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$/,MU=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,IU=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,LU=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xl=e=>RU.test(e),ot=e=>!!e&&!Number.isNaN(Number(e)),Ks=e=>!!e&&Number.isInteger(Number(e)),r1=e=>e.endsWith("%")&&ot(e.slice(0,-1)),ds=e=>DU.test(e),PU=()=>!0,jU=e=>OU.test(e)&&!MU.test(e),AN=()=>!1,BU=e=>IU.test(e),FU=e=>LU.test(e),UU=e=>!De(e)&&!Oe(e),HU=e=>cu(e,NN,AN),De=e=>wN.test(e),Ka=e=>cu(e,RN,jU),i1=e=>cu(e,YU,ot),SC=e=>cu(e,_N,AN),zU=e=>cu(e,kN,FU),lh=e=>cu(e,DN,BU),Oe=e=>CN.test(e),hc=e=>fu(e,RN),VU=e=>fu(e,GU),wC=e=>fu(e,_N),qU=e=>fu(e,NN),$U=e=>fu(e,kN),uh=e=>fu(e,DN,!0),cu=(e,t,n)=>{const r=wN.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},fu=(e,t,n=!1)=>{const r=CN.exec(e);return r?r[1]?t(r[1]):n:!1},_N=e=>e==="position"||e==="percentage",kN=e=>e==="image"||e==="url",NN=e=>e==="length"||e==="size"||e==="bg-size",RN=e=>e==="length",YU=e=>e==="number",GU=e=>e==="family-name",DN=e=>e==="shadow",QU=()=>{const e=An("color"),t=An("font"),n=An("text"),r=An("font-weight"),s=An("tracking"),o=An("leading"),l=An("breakpoint"),c=An("container"),f=An("spacing"),d=An("radius"),m=An("shadow"),p=An("inset-shadow"),b=An("text-shadow"),x=An("drop-shadow"),S=An("blur"),w=An("perspective"),C=An("aspect"),A=An("ease"),N=An("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],U=()=>[...R(),Oe,De],I=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto","contain","none"],M=()=>[Oe,De,f],$=()=>[xl,"full","auto",...M()],L=()=>[Ks,"none","subgrid",Oe,De],W=()=>["auto",{span:["full",Ks,Oe,De]},Ks,Oe,De],K=()=>[Ks,"auto",Oe,De],J=()=>["auto","min","max","fr",Oe,De],te=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ie=()=>["start","end","center","stretch","center-safe","end-safe"],O=()=>["auto",...M()],H=()=>[xl,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],q=()=>[e,Oe,De],ne=()=>[...R(),wC,SC,{position:[Oe,De]}],B=()=>["no-repeat",{repeat:["","x","y","space","round"]}],V=()=>["auto","cover","contain",qU,HU,{size:[Oe,De]}],re=()=>[r1,hc,Ka],P=()=>["","none","full",d,Oe,De],he=()=>["",ot,hc,Ka],ye=()=>["solid","dashed","dotted","double"],ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],fe=()=>[ot,r1,wC,SC],Se=()=>["","none",S,Oe,De],we=()=>["none",ot,Oe,De],Ie=()=>["none",ot,Oe,De],Fe=()=>[ot,Oe,De],$e=()=>[xl,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ds],breakpoint:[ds],color:[PU],container:[ds],"drop-shadow":[ds],ease:["in","out","in-out"],font:[UU],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ds],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ds],shadow:[ds],spacing:["px",ot],text:[ds],"text-shadow":[ds],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",xl,De,Oe,C]}],container:["container"],columns:[{columns:[ot,De,Oe,c]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:U()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:$()}],"inset-x":[{"inset-x":$()}],"inset-y":[{"inset-y":$()}],start:[{start:$()}],end:[{end:$()}],top:[{top:$()}],right:[{right:$()}],bottom:[{bottom:$()}],left:[{left:$()}],visibility:["visible","invisible","collapse"],z:[{z:[Ks,"auto",Oe,De]}],basis:[{basis:[xl,"full","auto",c,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ot,xl,"auto","initial","none",De]}],grow:[{grow:["",ot,Oe,De]}],shrink:[{shrink:["",ot,Oe,De]}],order:[{order:[Ks,"first","last","none",Oe,De]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:W()}],"col-start":[{"col-start":K()}],"col-end":[{"col-end":K()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:W()}],"row-start":[{"row-start":K()}],"row-end":[{"row-end":K()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":J()}],"auto-rows":[{"auto-rows":J()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...te(),"normal"]}],"justify-items":[{"justify-items":[...ie(),"normal"]}],"justify-self":[{"justify-self":["auto",...ie()]}],"align-content":[{content:["normal",...te()]}],"align-items":[{items:[...ie(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ie(),{baseline:["","last"]}]}],"place-content":[{"place-content":te()}],"place-items":[{"place-items":[...ie(),"baseline"]}],"place-self":[{"place-self":["auto",...ie()]}],p:[{p:M()}],px:[{px:M()}],py:[{py:M()}],ps:[{ps:M()}],pe:[{pe:M()}],pt:[{pt:M()}],pr:[{pr:M()}],pb:[{pb:M()}],pl:[{pl:M()}],m:[{m:O()}],mx:[{mx:O()}],my:[{my:O()}],ms:[{ms:O()}],me:[{me:O()}],mt:[{mt:O()}],mr:[{mr:O()}],mb:[{mb:O()}],ml:[{ml:O()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"space-y-reverse":["space-y-reverse"],size:[{size:H()}],w:[{w:[c,"screen",...H()]}],"min-w":[{"min-w":[c,"screen","none",...H()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...H()]}],h:[{h:["screen","lh",...H()]}],"min-h":[{"min-h":["screen","lh","none",...H()]}],"max-h":[{"max-h":["screen","lh",...H()]}],"font-size":[{text:["base",n,hc,Ka]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Oe,i1]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",r1,De]}],"font-family":[{font:[VU,De,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,Oe,De]}],"line-clamp":[{"line-clamp":[ot,"none",Oe,i1]}],leading:[{leading:[o,...M()]}],"list-image":[{"list-image":["none",Oe,De]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Oe,De]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:q()}],"text-color":[{text:q()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ye(),"wavy"]}],"text-decoration-thickness":[{decoration:[ot,"from-font","auto",Oe,Ka]}],"text-decoration-color":[{decoration:q()}],"underline-offset":[{"underline-offset":[ot,"auto",Oe,De]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Oe,De]}],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",Oe,De]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ne()}],"bg-repeat":[{bg:B()}],"bg-size":[{bg:V()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ks,Oe,De],radial:["",Oe,De],conic:[Ks,Oe,De]},$U,zU]}],"bg-color":[{bg:q()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:q()}],"gradient-via":[{via:q()}],"gradient-to":[{to:q()}],rounded:[{rounded:P()}],"rounded-s":[{"rounded-s":P()}],"rounded-e":[{"rounded-e":P()}],"rounded-t":[{"rounded-t":P()}],"rounded-r":[{"rounded-r":P()}],"rounded-b":[{"rounded-b":P()}],"rounded-l":[{"rounded-l":P()}],"rounded-ss":[{"rounded-ss":P()}],"rounded-se":[{"rounded-se":P()}],"rounded-ee":[{"rounded-ee":P()}],"rounded-es":[{"rounded-es":P()}],"rounded-tl":[{"rounded-tl":P()}],"rounded-tr":[{"rounded-tr":P()}],"rounded-br":[{"rounded-br":P()}],"rounded-bl":[{"rounded-bl":P()}],"border-w":[{border:he()}],"border-w-x":[{"border-x":he()}],"border-w-y":[{"border-y":he()}],"border-w-s":[{"border-s":he()}],"border-w-e":[{"border-e":he()}],"border-w-t":[{"border-t":he()}],"border-w-r":[{"border-r":he()}],"border-w-b":[{"border-b":he()}],"border-w-l":[{"border-l":he()}],"divide-x":[{"divide-x":he()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":he()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ye(),"hidden","none"]}],"divide-style":[{divide:[...ye(),"hidden","none"]}],"border-color":[{border:q()}],"border-color-x":[{"border-x":q()}],"border-color-y":[{"border-y":q()}],"border-color-s":[{"border-s":q()}],"border-color-e":[{"border-e":q()}],"border-color-t":[{"border-t":q()}],"border-color-r":[{"border-r":q()}],"border-color-b":[{"border-b":q()}],"border-color-l":[{"border-l":q()}],"divide-color":[{divide:q()}],"outline-style":[{outline:[...ye(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ot,Oe,De]}],"outline-w":[{outline:["",ot,hc,Ka]}],"outline-color":[{outline:q()}],shadow:[{shadow:["","none",m,uh,lh]}],"shadow-color":[{shadow:q()}],"inset-shadow":[{"inset-shadow":["none",p,uh,lh]}],"inset-shadow-color":[{"inset-shadow":q()}],"ring-w":[{ring:he()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:q()}],"ring-offset-w":[{"ring-offset":[ot,Ka]}],"ring-offset-color":[{"ring-offset":q()}],"inset-ring-w":[{"inset-ring":he()}],"inset-ring-color":[{"inset-ring":q()}],"text-shadow":[{"text-shadow":["none",b,uh,lh]}],"text-shadow-color":[{"text-shadow":q()}],opacity:[{opacity:[ot,Oe,De]}],"mix-blend":[{"mix-blend":[...ge(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ge()}],"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":[ot]}],"mask-image-linear-from-pos":[{"mask-linear-from":fe()}],"mask-image-linear-to-pos":[{"mask-linear-to":fe()}],"mask-image-linear-from-color":[{"mask-linear-from":q()}],"mask-image-linear-to-color":[{"mask-linear-to":q()}],"mask-image-t-from-pos":[{"mask-t-from":fe()}],"mask-image-t-to-pos":[{"mask-t-to":fe()}],"mask-image-t-from-color":[{"mask-t-from":q()}],"mask-image-t-to-color":[{"mask-t-to":q()}],"mask-image-r-from-pos":[{"mask-r-from":fe()}],"mask-image-r-to-pos":[{"mask-r-to":fe()}],"mask-image-r-from-color":[{"mask-r-from":q()}],"mask-image-r-to-color":[{"mask-r-to":q()}],"mask-image-b-from-pos":[{"mask-b-from":fe()}],"mask-image-b-to-pos":[{"mask-b-to":fe()}],"mask-image-b-from-color":[{"mask-b-from":q()}],"mask-image-b-to-color":[{"mask-b-to":q()}],"mask-image-l-from-pos":[{"mask-l-from":fe()}],"mask-image-l-to-pos":[{"mask-l-to":fe()}],"mask-image-l-from-color":[{"mask-l-from":q()}],"mask-image-l-to-color":[{"mask-l-to":q()}],"mask-image-x-from-pos":[{"mask-x-from":fe()}],"mask-image-x-to-pos":[{"mask-x-to":fe()}],"mask-image-x-from-color":[{"mask-x-from":q()}],"mask-image-x-to-color":[{"mask-x-to":q()}],"mask-image-y-from-pos":[{"mask-y-from":fe()}],"mask-image-y-to-pos":[{"mask-y-to":fe()}],"mask-image-y-from-color":[{"mask-y-from":q()}],"mask-image-y-to-color":[{"mask-y-to":q()}],"mask-image-radial":[{"mask-radial":[Oe,De]}],"mask-image-radial-from-pos":[{"mask-radial-from":fe()}],"mask-image-radial-to-pos":[{"mask-radial-to":fe()}],"mask-image-radial-from-color":[{"mask-radial-from":q()}],"mask-image-radial-to-color":[{"mask-radial-to":q()}],"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":[ot]}],"mask-image-conic-from-pos":[{"mask-conic-from":fe()}],"mask-image-conic-to-pos":[{"mask-conic-to":fe()}],"mask-image-conic-from-color":[{"mask-conic-from":q()}],"mask-image-conic-to-color":[{"mask-conic-to":q()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ne()}],"mask-repeat":[{mask:B()}],"mask-size":[{mask:V()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Oe,De]}],filter:[{filter:["","none",Oe,De]}],blur:[{blur:Se()}],brightness:[{brightness:[ot,Oe,De]}],contrast:[{contrast:[ot,Oe,De]}],"drop-shadow":[{"drop-shadow":["","none",x,uh,lh]}],"drop-shadow-color":[{"drop-shadow":q()}],grayscale:[{grayscale:["",ot,Oe,De]}],"hue-rotate":[{"hue-rotate":[ot,Oe,De]}],invert:[{invert:["",ot,Oe,De]}],saturate:[{saturate:[ot,Oe,De]}],sepia:[{sepia:["",ot,Oe,De]}],"backdrop-filter":[{"backdrop-filter":["","none",Oe,De]}],"backdrop-blur":[{"backdrop-blur":Se()}],"backdrop-brightness":[{"backdrop-brightness":[ot,Oe,De]}],"backdrop-contrast":[{"backdrop-contrast":[ot,Oe,De]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ot,Oe,De]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ot,Oe,De]}],"backdrop-invert":[{"backdrop-invert":["",ot,Oe,De]}],"backdrop-opacity":[{"backdrop-opacity":[ot,Oe,De]}],"backdrop-saturate":[{"backdrop-saturate":[ot,Oe,De]}],"backdrop-sepia":[{"backdrop-sepia":["",ot,Oe,De]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Oe,De]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ot,"initial",Oe,De]}],ease:[{ease:["linear","initial",A,Oe,De]}],delay:[{delay:[ot,Oe,De]}],animate:[{animate:["none",N,Oe,De]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,Oe,De]}],"perspective-origin":[{"perspective-origin":U()}],rotate:[{rotate:we()}],"rotate-x":[{"rotate-x":we()}],"rotate-y":[{"rotate-y":we()}],"rotate-z":[{"rotate-z":we()}],scale:[{scale:Ie()}],"scale-x":[{"scale-x":Ie()}],"scale-y":[{"scale-y":Ie()}],"scale-z":[{"scale-z":Ie()}],"scale-3d":["scale-3d"],skew:[{skew:Fe()}],"skew-x":[{"skew-x":Fe()}],"skew-y":[{"skew-y":Fe()}],transform:[{transform:[Oe,De,"","none","gpu","cpu"]}],"transform-origin":[{origin:U()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:$e()}],"translate-x":[{"translate-x":$e()}],"translate-y":[{"translate-y":$e()}],"translate-z":[{"translate-z":$e()}],"translate-none":["translate-none"],accent:[{accent:q()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:q()}],"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",Oe,De]}],"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":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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",Oe,De]}],fill:[{fill:["none",...q()]}],"stroke-w":[{stroke:[ot,hc,Ka,i1]}],stroke:[{stroke:["none",...q()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},ON=kU(QU);function Xe(...e){return ON(dx(e))}const KU=["Today","Yesterday","Previous 7 Days","Previous 30 Days","Older"];function XU(e){const t=new Date,n=new Date(t.getFullYear(),t.getMonth(),t.getDate()),r=new Date(n);r.setDate(r.getDate()-1);const s=new Date(n);s.setDate(s.getDate()-7);const o=new Date(n);o.setDate(o.getDate()-30);const l={Today:[],Yesterday:[],"Previous 7 Days":[],"Previous 30 Days":[],Older:[]};for(const c of e){const f=new Date(c.updatedAt);f>=n?l.Today.push(c):f>=r?l.Yesterday.push(c):f>=s?l["Previous 7 Days"].push(c):f>=o?l["Previous 30 Days"].push(c):l.Older.push(c)}return KU.map(c=>({label:c,sessions:l[c]})).filter(c=>c.sessions.length>0)}function WU(e){return e.replace(/^\/(?:Users|home)\/[^/]+/,"~")}function MN(e){const t=new Date,n=new Date(e),r=t.getTime()-n.getTime(),s=Math.floor(r/6e4),o=Math.floor(r/36e5),l=new Date(t.getFullYear(),t.getMonth(),t.getDate()),c=new Date(l);c.setDate(c.getDate()-1);const f=new Date(l);if(f.setDate(f.getDate()-7),n>=l)return s<1?"Just now":s<60?`${s}m ago`:`${o}h ago`;const d=n.toLocaleTimeString("en-US",{hour:"numeric",hour12:!0}).toLowerCase();return n>=c?`Yesterday, ${d}`:n>=f?`${n.toLocaleDateString("en-US",{weekday:"short"})}, ${d}`:`${n.toLocaleDateString("en-US",{month:"short",day:"numeric"})}, ${d}`}function CC(e){try{return new Date(e).toLocaleString([],{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}}function ZU({text:e,label:t}){const[n,r]=E.useState(!1),s=E.useCallback(async o=>{o.stopPropagation();try{await navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),1500)}catch{}},[e]);return g.jsx("button",{onClick:s,className:"p-0.5 max-md:p-2 rounded hover:bg-secondary/80 text-muted-foreground/60 hover:text-muted-foreground transition-colors duration-100","aria-label":`Copy ${t}`,children:n?g.jsx(Mi,{className:"size-(--size-icon-xs) text-green-500"}):g.jsx(pN,{className:"size-(--size-icon-xs)"})})}function JU({session:e,isActive:t,onClick:n,isNew:r=!1}){const[s,o]=E.useState(!1),l=_o(),c=e.permissionMode==="bypassPermissions",f=r?gt.div:"div",d=r?{initial:{opacity:0,y:-8},animate:{opacity:1,y:0},transition:{duration:.2,ease:[0,0,.2,1]}}:{};function m(p){p.stopPropagation(),o(b=>!b)}return g.jsxs(f,{...d,className:Xe("group rounded-lg transition-colors duration-150",t?"bg-secondary text-foreground border-l-2 border-primary":"hover:bg-secondary/50 border-l-2 border-transparent"),children:[g.jsxs("div",{onClick:()=>{l&&o(p=>!p),n()},className:"px-3 py-2 cursor-pointer",children:[g.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[g.jsx("span",{className:"flex-1 min-w-0",children:MN(e.updatedAt)}),g.jsxs("span",{className:"flex items-center gap-1 flex-shrink-0",children:[c&&g.jsx(yN,{className:"size-(--size-icon-xs) text-red-500","aria-label":"Permissions skipped"}),g.jsx("button",{onClick:m,className:Xe("p-0.5 max-md:p-2 max-md:hidden rounded transition-all duration-150",s?"opacity-100 text-muted-foreground":"opacity-0 group-hover:opacity-100 text-muted-foreground/60 hover:text-muted-foreground"),"aria-label":"Session details",children:g.jsx(gt.div,{animate:{rotate:s?180:0},transition:{type:"spring",stiffness:400,damping:30},children:g.jsx(Dm,{className:"size-(--size-icon-sm)"})})})]})]}),g.jsx("div",{className:"text-xs text-muted-foreground/70 truncate mt-0.5",children:e.title})]}),g.jsx(Rn,{initial:!1,children:s&&g.jsx(gt.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2,ease:[0,0,.2,1]},className:"overflow-hidden",children:g.jsxs("div",{className:"px-3 pb-2 pt-2 space-y-1.5 text-[11px] text-muted-foreground border-t border-border/30 mx-2",children:[g.jsx(ch,{label:"Session ID",value:e.id,copyable:!0}),g.jsx(ch,{label:"Created",value:CC(e.createdAt)}),g.jsx(ch,{label:"Updated",value:CC(e.updatedAt)}),g.jsx(ch,{label:"Permissions",value:c?"Skip (unsafe)":"Default"})]})})})]})}function ch({label:e,value:t,copyable:n=!1}){return g.jsxs("div",{className:"flex items-start gap-2",children:[g.jsx("span",{className:"text-muted-foreground/60 flex-shrink-0 w-16",children:e}),g.jsx("span",{className:"flex-1 min-w-0 font-mono truncate select-all",children:t}),n&&g.jsx(ZU,{text:t,label:e})]})}function IN({path:e,maxSegments:t,onSegmentClick:n,size:r="md"}){if(!e)return null;const s=e.split("/").filter(Boolean),o=t!=null&&s.length>t,l=o?s.slice(-t):s,c=s.length-l.length,f=r==="sm"?"text-2xs":"text-xs",d="size-(--size-icon-xs)",m=r==="sm"?"max-w-[80px]":"max-w-[120px]";return g.jsxs("div",{className:"flex items-center gap-0.5 min-w-0 overflow-hidden",children:[o&&g.jsxs(g.Fragment,{children:[g.jsx("span",{className:`${f} text-muted-foreground/50 flex-shrink-0`,children:"..."}),g.jsx(sf,{className:`${d} text-muted-foreground/40 flex-shrink-0`})]}),l.map((p,b)=>{const x=c+b,S="/"+s.slice(0,x+1).join("/"),w=x===s.length-1,C=`${f} truncate ${m} ${w?"font-medium text-foreground":"text-muted-foreground"}`;return g.jsxs("span",{className:`flex items-center ${w?"flex-shrink-0":"min-w-0"}`,children:[b>0&&g.jsx(sf,{className:`${d} text-muted-foreground/40 flex-shrink-0`}),n?g.jsx("button",{onClick:()=>n(S),className:`px-1 py-0.5 rounded hover:bg-accent transition-colors ${C}`,children:p}):g.jsx("span",{className:C,children:p})]},S)})]})}function _e(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function AC(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function _f(...e){return t=>{let n=!1;const r=e.map(s=>{const o=AC(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<r.length;s++){const o=r[s];typeof o=="function"?o():AC(e[s],null)}}}}function Nt(...e){return E.useCallback(_f(...e),e)}function eH(e,t){const n=E.createContext(t),r=o=>{const{children:l,...c}=o,f=E.useMemo(()=>c,Object.values(c));return g.jsx(n.Provider,{value:f,children:l})};r.displayName=e+"Provider";function s(o){const l=E.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,s]}function Vi(e,t=[]){let n=[];function r(o,l){const c=E.createContext(l),f=n.length;n=[...n,l];const d=p=>{var A;const{scope:b,children:x,...S}=p,w=((A=b==null?void 0:b[e])==null?void 0:A[f])||c,C=E.useMemo(()=>S,Object.values(S));return g.jsx(w.Provider,{value:C,children:x})};d.displayName=o+"Provider";function m(p,b){var w;const x=((w=b==null?void 0:b[e])==null?void 0:w[f])||c,S=E.useContext(x);if(S)return S;if(l!==void 0)return l;throw new Error(`\`${p}\` must be used within \`${o}\``)}return[d,m]}const s=()=>{const o=n.map(l=>E.createContext(l));return function(c){const f=(c==null?void 0:c[e])||o;return E.useMemo(()=>({[`__scope${e}`]:{...c,[e]:f}}),[c,f])}};return s.scopeName=e,[r,tH(s,...t)]}function tH(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const l=r.reduce((c,{useScope:f,scopeName:d})=>{const p=f(o)[`__scope${d}`];return{...c,...p}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var Kn=globalThis!=null&&globalThis.document?E.useLayoutEffect:()=>{},nH=wy[" useId ".trim().toString()]||(()=>{}),rH=0;function ji(e){const[t,n]=E.useState(nH());return Kn(()=>{n(r=>r??String(rH++))},[e]),t?`radix-${t}`:""}var iH=wy[" useInsertionEffect ".trim().toString()]||Kn;function Ea({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[s,o,l]=sH({defaultProp:t,onChange:n}),c=e!==void 0,f=c?e:s;{const m=E.useRef(e!==void 0);E.useEffect(()=>{const p=m.current;p!==c&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=c},[c,r])}const d=E.useCallback(m=>{var p;if(c){const b=aH(m)?m(e):m;b!==e&&((p=l.current)==null||p.call(l,b))}else o(m)},[c,e,o,l]);return[f,d]}function sH({defaultProp:e,onChange:t}){const[n,r]=E.useState(e),s=E.useRef(n),o=E.useRef(t);return iH(()=>{o.current=t},[t]),E.useEffect(()=>{var l;s.current!==n&&((l=o.current)==null||l.call(o,n),s.current=n)},[n,s]),[n,r,o]}function aH(e){return typeof e=="function"}var ko=c3();const oH=xf(ko);function eu(e){const t=lH(e),n=E.forwardRef((r,s)=>{const{children:o,...l}=r,c=E.Children.toArray(o),f=c.find(cH);if(f){const d=f.props.children,m=c.map(p=>p===f?E.Children.count(d)>1?E.Children.only(null):E.isValidElement(d)?d.props.children:null:p);return g.jsx(t,{...l,ref:s,children:E.isValidElement(d)?E.cloneElement(d,void 0,m):null})}return g.jsx(t,{...l,ref:s,children:o})});return n.displayName=`${e}.Slot`,n}function lH(e){const t=E.forwardRef((n,r)=>{const{children:s,...o}=n;if(E.isValidElement(s)){const l=dH(s),c=fH(o,s.props);return s.type!==E.Fragment&&(c.ref=r?_f(r,l):l),E.cloneElement(s,c)}return E.Children.count(s)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var uH=Symbol("radix.slottable");function cH(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===uH}function fH(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...c)=>{const f=o(...c);return s(...c),f}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function dH(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var hH=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],it=hH.reduce((e,t)=>{const n=eu(`Primitive.${t}`),r=E.forwardRef((s,o)=>{const{asChild:l,...c}=s,f=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(f,{...c,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function LN(e,t){e&&ko.flushSync(()=>e.dispatchEvent(t))}function Ui(e){const t=E.useRef(e);return E.useEffect(()=>{t.current=e}),E.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function mH(e,t=globalThis==null?void 0:globalThis.document){const n=Ui(e);E.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var pH="DismissableLayer",Fb="dismissableLayer.update",gH="dismissableLayer.pointerDownOutside",bH="dismissableLayer.focusOutside",_C,PN=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),kf=E.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:l,onDismiss:c,...f}=e,d=E.useContext(PN),[m,p]=E.useState(null),b=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=E.useState({}),S=Nt(t,j=>p(j)),w=Array.from(d.layers),[C]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),A=w.indexOf(C),N=m?w.indexOf(m):-1,k=d.layersWithOutsidePointerEventsDisabled.size>0,R=N>=A,U=EH(j=>{const M=j.target,$=[...d.branches].some(L=>L.contains(M));!R||$||(s==null||s(j),l==null||l(j),j.defaultPrevented||c==null||c())},b),I=vH(j=>{const M=j.target;[...d.branches].some(L=>L.contains(M))||(o==null||o(j),l==null||l(j),j.defaultPrevented||c==null||c())},b);return mH(j=>{N===d.layers.size-1&&(r==null||r(j),!j.defaultPrevented&&c&&(j.preventDefault(),c()))},b),E.useEffect(()=>{if(m)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(_C=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(m)),d.layers.add(m),kC(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=_C)}},[m,b,n,d]),E.useEffect(()=>()=>{m&&(d.layers.delete(m),d.layersWithOutsidePointerEventsDisabled.delete(m),kC())},[m,d]),E.useEffect(()=>{const j=()=>x({});return document.addEventListener(Fb,j),()=>document.removeEventListener(Fb,j)},[]),g.jsx(it.div,{...f,ref:S,style:{pointerEvents:k?R?"auto":"none":void 0,...e.style},onFocusCapture:_e(e.onFocusCapture,I.onFocusCapture),onBlurCapture:_e(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:_e(e.onPointerDownCapture,U.onPointerDownCapture)})});kf.displayName=pH;var yH="DismissableLayerBranch",xH=E.forwardRef((e,t)=>{const n=E.useContext(PN),r=E.useRef(null),s=Nt(t,r);return E.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),g.jsx(it.div,{...e,ref:s})});xH.displayName=yH;function EH(e,t=globalThis==null?void 0:globalThis.document){const n=Ui(e),r=E.useRef(!1),s=E.useRef(()=>{});return E.useEffect(()=>{const o=c=>{if(c.target&&!r.current){let f=function(){jN(gH,n,d,{discrete:!0})};const d={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=f,t.addEventListener("click",s.current,{once:!0})):f()}else t.removeEventListener("click",s.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function vH(e,t=globalThis==null?void 0:globalThis.document){const n=Ui(e),r=E.useRef(!1);return E.useEffect(()=>{const s=o=>{o.target&&!r.current&&jN(bH,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function kC(){const e=new CustomEvent(Fb);document.dispatchEvent(e)}function jN(e,t,n,{discrete:r}){const s=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?LN(s,o):s.dispatchEvent(o)}var s1="focusScope.autoFocusOnMount",a1="focusScope.autoFocusOnUnmount",NC={bubbles:!1,cancelable:!0},TH="FocusScope",Mm=E.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...l}=e,[c,f]=E.useState(null),d=Ui(s),m=Ui(o),p=E.useRef(null),b=Nt(t,w=>f(w)),x=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(r){let w=function(k){if(x.paused||!c)return;const R=k.target;c.contains(R)?p.current=R:ta(p.current,{select:!0})},C=function(k){if(x.paused||!c)return;const R=k.relatedTarget;R!==null&&(c.contains(R)||ta(p.current,{select:!0}))},A=function(k){if(document.activeElement===document.body)for(const U of k)U.removedNodes.length>0&&ta(c)};document.addEventListener("focusin",w),document.addEventListener("focusout",C);const N=new MutationObserver(A);return c&&N.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",C),N.disconnect()}}},[r,c,x.paused]),E.useEffect(()=>{if(c){DC.add(x);const w=document.activeElement;if(!c.contains(w)){const A=new CustomEvent(s1,NC);c.addEventListener(s1,d),c.dispatchEvent(A),A.defaultPrevented||(SH(kH(BN(c)),{select:!0}),document.activeElement===w&&ta(c))}return()=>{c.removeEventListener(s1,d),setTimeout(()=>{const A=new CustomEvent(a1,NC);c.addEventListener(a1,m),c.dispatchEvent(A),A.defaultPrevented||ta(w??document.body,{select:!0}),c.removeEventListener(a1,m),DC.remove(x)},0)}}},[c,d,m,x]);const S=E.useCallback(w=>{if(!n&&!r||x.paused)return;const C=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,A=document.activeElement;if(C&&A){const N=w.currentTarget,[k,R]=wH(N);k&&R?!w.shiftKey&&A===R?(w.preventDefault(),n&&ta(k,{select:!0})):w.shiftKey&&A===k&&(w.preventDefault(),n&&ta(R,{select:!0})):A===N&&w.preventDefault()}},[n,r,x.paused]);return g.jsx(it.div,{tabIndex:-1,...l,ref:b,onKeyDown:S})});Mm.displayName=TH;function SH(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ta(r,{select:t}),document.activeElement!==n)return}function wH(e){const t=BN(e),n=RC(t,e),r=RC(t.reverse(),e);return[n,r]}function BN(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function RC(e,t){for(const n of e)if(!CH(n,{upTo:t}))return n}function CH(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function AH(e){return e instanceof HTMLInputElement&&"select"in e}function ta(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&AH(e)&&t&&e.select()}}var DC=_H();function _H(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=OC(e,t),e.unshift(t)},remove(t){var n;e=OC(e,t),(n=e[0])==null||n.resume()}}}function OC(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function kH(e){return e.filter(t=>t.tagName!=="A")}var NH="Portal",Nf=E.forwardRef((e,t)=>{var c;const{container:n,...r}=e,[s,o]=E.useState(!1);Kn(()=>o(!0),[]);const l=n||s&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return l?oH.createPortal(g.jsx(it.div,{...r,ref:t}),l):null});Nf.displayName=NH;function RH(e,t){return E.useReducer((n,r)=>t[n][r]??n,e)}var yi=e=>{const{present:t,children:n}=e,r=DH(t),s=typeof n=="function"?n({present:r.isPresent}):E.Children.only(n),o=Nt(r.ref,OH(s));return typeof n=="function"||r.isPresent?E.cloneElement(s,{ref:o}):null};yi.displayName="Presence";function DH(e){const[t,n]=E.useState(),r=E.useRef(null),s=E.useRef(e),o=E.useRef("none"),l=e?"mounted":"unmounted",[c,f]=RH(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const d=fh(r.current);o.current=c==="mounted"?d:"none"},[c]),Kn(()=>{const d=r.current,m=s.current;if(m!==e){const b=o.current,x=fh(d);e?f("MOUNT"):x==="none"||(d==null?void 0:d.display)==="none"?f("UNMOUNT"):f(m&&b!==x?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,f]),Kn(()=>{if(t){let d;const m=t.ownerDocument.defaultView??window,p=x=>{const w=fh(r.current).includes(CSS.escape(x.animationName));if(x.target===t&&w&&(f("ANIMATION_END"),!s.current)){const C=t.style.animationFillMode;t.style.animationFillMode="forwards",d=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=C)})}},b=x=>{x.target===t&&(o.current=fh(r.current))};return t.addEventListener("animationstart",b),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{m.clearTimeout(d),t.removeEventListener("animationstart",b),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:E.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function fh(e){return(e==null?void 0:e.animationName)||"none"}function OH(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var o1=0;function mx(){E.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??MC()),document.body.insertAdjacentElement("beforeend",e[1]??MC()),o1++,()=>{o1===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),o1--}},[])}function MC(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Oi=function(){return Oi=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Oi.apply(this,arguments)};function FN(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function MH(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,o;r<s;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var Fh="right-scroll-bar-position",Uh="width-before-scroll-bar",IH="with-scroll-bars-hidden",LH="--removed-body-scroll-bar-size";function l1(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function PH(e,t){var n=E.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=t,n.facade}var jH=typeof window<"u"?E.useLayoutEffect:E.useEffect,IC=new WeakMap;function BH(e,t){var n=PH(null,function(r){return e.forEach(function(s){return l1(s,r)})});return jH(function(){var r=IC.get(n);if(r){var s=new Set(r),o=new Set(e),l=n.current;s.forEach(function(c){o.has(c)||l1(c,null)}),o.forEach(function(c){s.has(c)||l1(c,l)})}IC.set(n,e)},[e]),n}function FH(e){return e}function UH(e,t){t===void 0&&(t=FH);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var l=t(o,r);return n.push(l),function(){n=n.filter(function(c){return c!==l})}},assignSyncMedium:function(o){for(r=!0;n.length;){var l=n;n=[],l.forEach(o)}n={push:function(c){return o(c)},filter:function(){return n}}},assignMedium:function(o){r=!0;var l=[];if(n.length){var c=n;n=[],c.forEach(o),l=n}var f=function(){var m=l;l=[],m.forEach(o)},d=function(){return Promise.resolve().then(f)};d(),n={push:function(m){l.push(m),d()},filter:function(m){return l=l.filter(m),n}}}};return s}function HH(e){e===void 0&&(e={});var t=UH(null);return t.options=Oi({async:!0,ssr:!1},e),t}var UN=function(e){var t=e.sideCar,n=FN(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return E.createElement(r,Oi({},n))};UN.isSideCarExport=!0;function zH(e,t){return e.useMedium(t),UN}var HN=HH(),u1=function(){},Im=E.forwardRef(function(e,t){var n=E.useRef(null),r=E.useState({onScrollCapture:u1,onWheelCapture:u1,onTouchMoveCapture:u1}),s=r[0],o=r[1],l=e.forwardProps,c=e.children,f=e.className,d=e.removeScrollBar,m=e.enabled,p=e.shards,b=e.sideCar,x=e.noRelative,S=e.noIsolation,w=e.inert,C=e.allowPinchZoom,A=e.as,N=A===void 0?"div":A,k=e.gapMode,R=FN(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),U=b,I=BH([n,t]),j=Oi(Oi({},R),s);return E.createElement(E.Fragment,null,m&&E.createElement(U,{sideCar:HN,removeScrollBar:d,shards:p,noRelative:x,noIsolation:S,inert:w,setCallbacks:o,allowPinchZoom:!!C,lockRef:n,gapMode:k}),l?E.cloneElement(E.Children.only(c),Oi(Oi({},j),{ref:I})):E.createElement(N,Oi({},j,{className:f,ref:I}),c))});Im.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Im.classNames={fullWidth:Uh,zeroRight:Fh};var VH=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function qH(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=VH();return t&&e.setAttribute("nonce",t),e}function $H(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function YH(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var GH=function(){var e=0,t=null;return{add:function(n){e==0&&(t=qH())&&($H(t,n),YH(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},QH=function(){var e=GH();return function(t,n){E.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},zN=function(){var e=QH(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},KH={left:0,top:0,right:0,gap:0},c1=function(e){return parseInt(e||"",10)||0},XH=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[c1(n),c1(r),c1(s)]},WH=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return KH;var t=XH(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},ZH=zN(),jl="data-scroll-locked",JH=function(e,t,n,r){var s=e.left,o=e.top,l=e.right,c=e.gap;return n===void 0&&(n="margin"),`
314
+ .`.concat(IH,` {
315
+ overflow: hidden `).concat(r,`;
316
+ padding-right: `).concat(c,"px ").concat(r,`;
317
+ }
318
+ body[`).concat(jl,`] {
319
+ overflow: hidden `).concat(r,`;
320
+ overscroll-behavior: contain;
321
+ `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
322
+ padding-left: `.concat(s,`px;
323
+ padding-top: `).concat(o,`px;
324
+ padding-right: `).concat(l,`px;
325
+ margin-left:0;
326
+ margin-top:0;
327
+ margin-right: `).concat(c,"px ").concat(r,`;
328
+ `),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
329
+ }
330
+
331
+ .`).concat(Fh,` {
332
+ right: `).concat(c,"px ").concat(r,`;
333
+ }
334
+
335
+ .`).concat(Uh,` {
336
+ margin-right: `).concat(c,"px ").concat(r,`;
337
+ }
338
+
339
+ .`).concat(Fh," .").concat(Fh,` {
340
+ right: 0 `).concat(r,`;
341
+ }
342
+
343
+ .`).concat(Uh," .").concat(Uh,` {
344
+ margin-right: 0 `).concat(r,`;
345
+ }
346
+
347
+ body[`).concat(jl,`] {
348
+ `).concat(LH,": ").concat(c,`px;
349
+ }
350
+ `)},LC=function(){var e=parseInt(document.body.getAttribute(jl)||"0",10);return isFinite(e)?e:0},ez=function(){E.useEffect(function(){return document.body.setAttribute(jl,(LC()+1).toString()),function(){var e=LC()-1;e<=0?document.body.removeAttribute(jl):document.body.setAttribute(jl,e.toString())}},[])},tz=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;ez();var o=E.useMemo(function(){return WH(s)},[s]);return E.createElement(ZH,{styles:JH(o,!t,s,n?"":"!important")})},Ub=!1;if(typeof window<"u")try{var dh=Object.defineProperty({},"passive",{get:function(){return Ub=!0,!0}});window.addEventListener("test",dh,dh),window.removeEventListener("test",dh,dh)}catch{Ub=!1}var El=Ub?{passive:!1}:!1,nz=function(e){return e.tagName==="TEXTAREA"},VN=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!nz(e)&&n[t]==="visible")},rz=function(e){return VN(e,"overflowY")},iz=function(e){return VN(e,"overflowX")},PC=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=qN(e,r);if(s){var o=$N(e,r),l=o[1],c=o[2];if(l>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},sz=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},az=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},qN=function(e,t){return e==="v"?rz(t):iz(t)},$N=function(e,t){return e==="v"?sz(t):az(t)},oz=function(e,t){return e==="h"&&t==="rtl"?-1:1},lz=function(e,t,n,r,s){var o=oz(e,window.getComputedStyle(t).direction),l=o*r,c=n.target,f=t.contains(c),d=!1,m=l>0,p=0,b=0;do{if(!c)break;var x=$N(e,c),S=x[0],w=x[1],C=x[2],A=w-C-o*S;(S||A)&&qN(e,c)&&(p+=A,b+=S);var N=c.parentNode;c=N&&N.nodeType===Node.DOCUMENT_FRAGMENT_NODE?N.host:N}while(!f&&c!==document.body||f&&(t.contains(c)||t===c));return(m&&Math.abs(p)<1||!m&&Math.abs(b)<1)&&(d=!0),d},hh=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},jC=function(e){return[e.deltaX,e.deltaY]},BC=function(e){return e&&"current"in e?e.current:e},uz=function(e,t){return e[0]===t[0]&&e[1]===t[1]},cz=function(e){return`
351
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
352
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
353
+ `)},fz=0,vl=[];function dz(e){var t=E.useRef([]),n=E.useRef([0,0]),r=E.useRef(),s=E.useState(fz++)[0],o=E.useState(zN)[0],l=E.useRef(e);E.useEffect(function(){l.current=e},[e]),E.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var w=MH([e.lockRef.current],(e.shards||[]).map(BC),!0).filter(Boolean);return w.forEach(function(C){return C.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),w.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var c=E.useCallback(function(w,C){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!l.current.allowPinchZoom;var A=hh(w),N=n.current,k="deltaX"in w?w.deltaX:N[0]-A[0],R="deltaY"in w?w.deltaY:N[1]-A[1],U,I=w.target,j=Math.abs(k)>Math.abs(R)?"h":"v";if("touches"in w&&j==="h"&&I.type==="range")return!1;var M=window.getSelection(),$=M&&M.anchorNode,L=$?$===I||$.contains(I):!1;if(L)return!1;var W=PC(j,I);if(!W)return!0;if(W?U=j:(U=j==="v"?"h":"v",W=PC(j,I)),!W)return!1;if(!r.current&&"changedTouches"in w&&(k||R)&&(r.current=U),!U)return!0;var K=r.current||U;return lz(K,C,w,K==="h"?k:R)},[]),f=E.useCallback(function(w){var C=w;if(!(!vl.length||vl[vl.length-1]!==o)){var A="deltaY"in C?jC(C):hh(C),N=t.current.filter(function(U){return U.name===C.type&&(U.target===C.target||C.target===U.shadowParent)&&uz(U.delta,A)})[0];if(N&&N.should){C.cancelable&&C.preventDefault();return}if(!N){var k=(l.current.shards||[]).map(BC).filter(Boolean).filter(function(U){return U.contains(C.target)}),R=k.length>0?c(C,k[0]):!l.current.noIsolation;R&&C.cancelable&&C.preventDefault()}}},[]),d=E.useCallback(function(w,C,A,N){var k={name:w,delta:C,target:A,should:N,shadowParent:hz(A)};t.current.push(k),setTimeout(function(){t.current=t.current.filter(function(R){return R!==k})},1)},[]),m=E.useCallback(function(w){n.current=hh(w),r.current=void 0},[]),p=E.useCallback(function(w){d(w.type,jC(w),w.target,c(w,e.lockRef.current))},[]),b=E.useCallback(function(w){d(w.type,hh(w),w.target,c(w,e.lockRef.current))},[]);E.useEffect(function(){return vl.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:b}),document.addEventListener("wheel",f,El),document.addEventListener("touchmove",f,El),document.addEventListener("touchstart",m,El),function(){vl=vl.filter(function(w){return w!==o}),document.removeEventListener("wheel",f,El),document.removeEventListener("touchmove",f,El),document.removeEventListener("touchstart",m,El)}},[]);var x=e.removeScrollBar,S=e.inert;return E.createElement(E.Fragment,null,S?E.createElement(o,{styles:cz(s)}):null,x?E.createElement(tz,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function hz(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const mz=zH(HN,dz);var Lm=E.forwardRef(function(e,t){return E.createElement(Im,Oi({},e,{ref:t,sideCar:mz}))});Lm.classNames=Im.classNames;var pz=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Tl=new WeakMap,mh=new WeakMap,ph={},f1=0,YN=function(e){return e&&(e.host||YN(e.parentNode))},gz=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=YN(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},bz=function(e,t,n,r){var s=gz(t,Array.isArray(e)?e:[e]);ph[n]||(ph[n]=new WeakMap);var o=ph[n],l=[],c=new Set,f=new Set(s),d=function(p){!p||c.has(p)||(c.add(p),d(p.parentNode))};s.forEach(d);var m=function(p){!p||f.has(p)||Array.prototype.forEach.call(p.children,function(b){if(c.has(b))m(b);else try{var x=b.getAttribute(r),S=x!==null&&x!=="false",w=(Tl.get(b)||0)+1,C=(o.get(b)||0)+1;Tl.set(b,w),o.set(b,C),l.push(b),w===1&&S&&mh.set(b,!0),C===1&&b.setAttribute(n,"true"),S||b.setAttribute(r,"true")}catch(A){console.error("aria-hidden: cannot operate on ",b,A)}})};return m(t),c.clear(),f1++,function(){l.forEach(function(p){var b=Tl.get(p)-1,x=o.get(p)-1;Tl.set(p,b),o.set(p,x),b||(mh.has(p)||p.removeAttribute(r),mh.delete(p)),x||p.removeAttribute(n)}),f1--,f1||(Tl=new WeakMap,Tl=new WeakMap,mh=new WeakMap,ph={})}},px=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=pz(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live], script"))),bz(r,s,n,"aria-hidden")):function(){return null}},Pm="Dialog",[GN]=Vi(Pm),[yz,xi]=GN(Pm),QN=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:o,modal:l=!0}=e,c=E.useRef(null),f=E.useRef(null),[d,m]=Ea({prop:r,defaultProp:s??!1,onChange:o,caller:Pm});return g.jsx(yz,{scope:t,triggerRef:c,contentRef:f,contentId:ji(),titleId:ji(),descriptionId:ji(),open:d,onOpenChange:m,onOpenToggle:E.useCallback(()=>m(p=>!p),[m]),modal:l,children:n})};QN.displayName=Pm;var KN="DialogTrigger",XN=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=xi(KN,n),o=Nt(t,s.triggerRef);return g.jsx(it.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":yx(s.open),...r,ref:o,onClick:_e(e.onClick,s.onOpenToggle)})});XN.displayName=KN;var gx="DialogPortal",[xz,WN]=GN(gx,{forceMount:void 0}),ZN=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,o=xi(gx,t);return g.jsx(xz,{scope:t,forceMount:n,children:E.Children.map(r,l=>g.jsx(yi,{present:n||o.open,children:g.jsx(Nf,{asChild:!0,container:s,children:l})}))})};ZN.displayName=gx;var im="DialogOverlay",JN=E.forwardRef((e,t)=>{const n=WN(im,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=xi(im,e.__scopeDialog);return o.modal?g.jsx(yi,{present:r||o.open,children:g.jsx(vz,{...s,ref:t})}):null});JN.displayName=im;var Ez=eu("DialogOverlay.RemoveScroll"),vz=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=xi(im,n);return g.jsx(Lm,{as:Ez,allowPinchZoom:!0,shards:[s.contentRef],children:g.jsx(it.div,{"data-state":yx(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Eo="DialogContent",eR=E.forwardRef((e,t)=>{const n=WN(Eo,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=xi(Eo,e.__scopeDialog);return g.jsx(yi,{present:r||o.open,children:o.modal?g.jsx(Tz,{...s,ref:t}):g.jsx(Sz,{...s,ref:t})})});eR.displayName=Eo;var Tz=E.forwardRef((e,t)=>{const n=xi(Eo,e.__scopeDialog),r=E.useRef(null),s=Nt(t,n.contentRef,r);return E.useEffect(()=>{const o=r.current;if(o)return px(o)},[]),g.jsx(tR,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:_e(e.onCloseAutoFocus,o=>{var l;o.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:_e(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0;(l.button===2||c)&&o.preventDefault()}),onFocusOutside:_e(e.onFocusOutside,o=>o.preventDefault())})}),Sz=E.forwardRef((e,t)=>{const n=xi(Eo,e.__scopeDialog),r=E.useRef(!1),s=E.useRef(!1);return g.jsx(tR,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var l,c;(l=e.onCloseAutoFocus)==null||l.call(e,o),o.defaultPrevented||(r.current||(c=n.triggerRef.current)==null||c.focus(),o.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:o=>{var f,d;(f=e.onInteractOutside)==null||f.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const l=o.target;((d=n.triggerRef.current)==null?void 0:d.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),tR=E.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:o,...l}=e,c=xi(Eo,n),f=E.useRef(null),d=Nt(t,f);return mx(),g.jsxs(g.Fragment,{children:[g.jsx(Mm,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:o,children:g.jsx(kf,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":yx(c.open),...l,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),g.jsxs(g.Fragment,{children:[g.jsx(wz,{titleId:c.titleId}),g.jsx(Az,{contentRef:f,descriptionId:c.descriptionId})]})]})}),bx="DialogTitle",nR=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=xi(bx,n);return g.jsx(it.h2,{id:s.titleId,...r,ref:t})});nR.displayName=bx;var rR="DialogDescription",iR=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=xi(rR,n);return g.jsx(it.p,{id:s.descriptionId,...r,ref:t})});iR.displayName=rR;var sR="DialogClose",aR=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=xi(sR,n);return g.jsx(it.button,{type:"button",...r,ref:t,onClick:_e(e.onClick,()=>s.onOpenChange(!1))})});aR.displayName=sR;function yx(e){return e?"open":"closed"}var oR="DialogTitleWarning",[voe,lR]=eH(oR,{contentName:Eo,titleName:bx,docsSlug:"dialog"}),wz=({titleId:e})=>{const t=lR(oR),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
354
+
355
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
356
+
357
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return E.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Cz="DialogDescriptionWarning",Az=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${lR(Cz).contentName}}.`;return E.useEffect(()=>{var o;const s=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},uR=QN,_z=XN,cR=ZN,xx=JN,Ex=eR,vx=nR,Tx=iR,kz=aR;const Nz=uR,Rz=cR,fR=E.forwardRef(({className:e,...t},n)=>g.jsx(xx,{ref:n,className:Xe("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));fR.displayName=xx.displayName;const dR=E.forwardRef(({className:e,children:t,...n},r)=>g.jsxs(Rz,{children:[g.jsx(fR,{}),g.jsxs(Ex,{ref:r,className:Xe("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,g.jsxs(kz,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[g.jsx(Af,{className:"size-(--size-icon-md)"}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));dR.displayName=Ex.displayName;function hR({className:e,...t}){return g.jsx("div",{className:Xe("flex flex-col space-y-1.5 text-center sm:text-left",e),...t})}hR.displayName="DialogHeader";const mR=E.forwardRef(({className:e,...t},n)=>g.jsx(vx,{ref:n,className:Xe("text-lg font-semibold leading-none tracking-tight",e),...t}));mR.displayName=vx.displayName;const Dz=E.forwardRef(({className:e,...t},n)=>g.jsx(Tx,{ref:n,className:Xe("text-sm text-muted-foreground",e),...t}));Dz.displayName=Tx.displayName;function Oz(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const pR=Ce.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Rf=()=>{const e=Ce.useContext(pR);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};Oz(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
358
+ [data-state=closed]
359
+ ){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function Mz(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function Iz(){return Sx(/^Mac/)}function Lz(){return Sx(/^iPhone/)}function FC(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function Pz(){return Sx(/^iPad/)||Iz()&&navigator.maxTouchPoints>1}function gR(){return Lz()||Pz()}function Sx(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const jz=24,Bz=typeof window<"u"?E.useLayoutEffect:E.useEffect;function UC(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const d1=typeof document<"u"&&window.visualViewport;function HC(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function bR(e){for(HC(e)&&(e=e.parentElement);e&&!HC(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const Fz=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let gh=0,h1;function Uz(e={}){let{isDisabled:t}=e;Bz(()=>{if(!t)return gh++,gh===1&&gR()&&(h1=Hz()),()=>{gh--,gh===0&&(h1==null||h1())}},[t])}function Hz(){let e,t=0,n=p=>{e=bR(p.target),!(e===document.documentElement&&e===document.body)&&(t=p.changedTouches[0].pageY)},r=p=>{if(!e||e===document.documentElement||e===document.body){p.preventDefault();return}let b=p.changedTouches[0].pageY,x=e.scrollTop,S=e.scrollHeight-e.clientHeight;S!==0&&((x<=0&&b>t||x>=S&&b<t)&&p.preventDefault(),t=b)},s=p=>{let b=p.target;Hb(b)&&b!==document.activeElement&&(p.preventDefault(),b.style.transform="translateY(-2000px)",b.focus(),requestAnimationFrame(()=>{b.style.transform=""}))},o=p=>{let b=p.target;Hb(b)&&(b.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{b.style.transform="",d1&&(d1.height<window.innerHeight?requestAnimationFrame(()=>{zC(b)}):d1.addEventListener("resize",()=>zC(b),{once:!0}))}))},l=()=>{window.scrollTo(0,0)},c=window.pageXOffset,f=window.pageYOffset,d=UC(zz(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let m=UC(mc(document,"touchstart",n,{passive:!1,capture:!0}),mc(document,"touchmove",r,{passive:!1,capture:!0}),mc(document,"touchend",s,{passive:!1,capture:!0}),mc(document,"focus",o,!0),mc(window,"scroll",l));return()=>{d(),m(),window.scrollTo(c,f)}}function zz(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function mc(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function zC(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=bR(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,s=e.getBoundingClientRect().top,o=e.getBoundingClientRect().bottom;const l=n.getBoundingClientRect().bottom+jz;o>l&&(n.scrollTop+=s-r)}e=n.parentElement}}function Hb(e){return e instanceof HTMLInputElement&&!Fz.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function Vz(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function qz(...e){return t=>e.forEach(n=>Vz(n,t))}function yR(...e){return E.useCallback(qz(...e),e)}const xR=new WeakMap;function kn(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([s,o])=>{if(s.startsWith("--")){e.style.setProperty(s,o);return}r[s]=e.style[s],e.style[s]=o}),!n&&xR.set(e,r)}function $z(e,t){if(!e||!(e instanceof HTMLElement))return;let n=xR.get(e);n&&(e.style[t]=n[t])}const xn=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function bh(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let s=r.match(/^matrix3d\((.+)\)$/);return s?parseFloat(s[1].split(", ")[xn(t)?13:12]):(s=r.match(/^matrix\((.+)\)$/),s?parseFloat(s[1].split(", ")[xn(t)?5:4]):null)}function Yz(e){return 8*(Math.log(e+1)-2)}function m1(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function Gz(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const en={DURATION:.5,EASE:[.32,.72,0,1]},ER=.4,Qz=.25,Kz=100,vR=8,Xa=16,zb=26,p1="vaul-dragging";function TR(e){const t=Ce.useRef(e);return Ce.useEffect(()=>{t.current=e}),Ce.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function Xz({defaultProp:e,onChange:t}){const n=Ce.useState(e),[r]=n,s=Ce.useRef(r),o=TR(t);return Ce.useEffect(()=>{s.current!==r&&(o(r),s.current=r)},[r,s,o]),n}function SR({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,s]=Xz({defaultProp:t,onChange:n}),o=e!==void 0,l=o?e:r,c=TR(n),f=Ce.useCallback(d=>{if(o){const p=typeof d=="function"?d(e):d;p!==e&&c(p)}else s(d)},[o,e,s,c]);return[l,f]}function Wz({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:s,fadeFromIndex:o,onSnapPointChange:l,direction:c="bottom",container:f,snapToSequentialPoint:d}){const[m,p]=SR({prop:e,defaultProp:n==null?void 0:n[0],onChange:t}),[b,x]=Ce.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);Ce.useEffect(()=>{function j(){x({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",j),()=>window.removeEventListener("resize",j)},[]);const S=Ce.useMemo(()=>m===(n==null?void 0:n[n.length-1])||null,[n,m]),w=Ce.useMemo(()=>{var j;return(j=n==null?void 0:n.findIndex(M=>M===m))!=null?j:null},[n,m]),C=n&&n.length>0&&(o||o===0)&&!Number.isNaN(o)&&n[o]===m||!n,A=Ce.useMemo(()=>{const j=f?{width:f.getBoundingClientRect().width,height:f.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var M;return(M=n==null?void 0:n.map($=>{const L=typeof $=="string";let W=0;if(L&&(W=parseInt($,10)),xn(c)){const J=L?W:b?$*j.height:0;return b?c==="bottom"?j.height-J:-j.height+J:J}const K=L?W:b?$*j.width:0;return b?c==="right"?j.width-K:-j.width+K:K}))!=null?M:[]},[n,b,f]),N=Ce.useMemo(()=>w!==null?A==null?void 0:A[w]:null,[A,w]),k=Ce.useCallback(j=>{var M;const $=(M=A==null?void 0:A.findIndex(L=>L===j))!=null?M:null;l($),kn(r.current,{transition:`transform ${en.DURATION}s cubic-bezier(${en.EASE.join(",")})`,transform:xn(c)?`translate3d(0, ${j}px, 0)`:`translate3d(${j}px, 0, 0)`}),A&&$!==A.length-1&&o!==void 0&&$!==o&&$<o?kn(s.current,{transition:`opacity ${en.DURATION}s cubic-bezier(${en.EASE.join(",")})`,opacity:"0"}):kn(s.current,{transition:`opacity ${en.DURATION}s cubic-bezier(${en.EASE.join(",")})`,opacity:"1"}),p(n==null?void 0:n[Math.max($,0)])},[r.current,n,A,o,s,p]);Ce.useEffect(()=>{if(m||e){var j;const M=(j=n==null?void 0:n.findIndex($=>$===e||$===m))!=null?j:-1;A&&M!==-1&&typeof A[M]=="number"&&k(A[M])}},[m,e,n,A,k]);function R({draggedDistance:j,closeDrawer:M,velocity:$,dismissible:L}){if(o===void 0)return;const W=c==="bottom"||c==="right"?(N??0)-j:(N??0)+j,K=w===o-1,J=w===0,te=j>0;if(K&&kn(s.current,{transition:`opacity ${en.DURATION}s cubic-bezier(${en.EASE.join(",")})`}),!d&&$>2&&!te){L?M():k(A[0]);return}if(!d&&$>2&&te&&A&&n){k(A[n.length-1]);return}const ie=A==null?void 0:A.reduce((H,q)=>typeof H!="number"||typeof q!="number"?H:Math.abs(q-W)<Math.abs(H-W)?q:H),O=xn(c)?window.innerHeight:window.innerWidth;if($>ER&&Math.abs(j)<O*.4){const H=te?1:-1;if(H>0&&S&&n){k(A[n.length-1]);return}if(J&&H<0&&L&&M(),w===null)return;k(A[w+H]);return}k(ie)}function U({draggedDistance:j}){if(N===null)return;const M=c==="bottom"||c==="right"?N-j:N+j;(c==="bottom"||c==="right")&&M<A[A.length-1]||(c==="top"||c==="left")&&M>A[A.length-1]||kn(r.current,{transform:xn(c)?`translate3d(0, ${M}px, 0)`:`translate3d(${M}px, 0, 0)`})}function I(j,M){if(!n||typeof w!="number"||!A||o===void 0)return null;const $=w===o-1;if(w>=o&&M)return 0;if($&&!M)return 1;if(!C&&!$)return null;const W=$?w+1:w-1,K=$?A[W]-A[W-1]:A[W+1]-A[W],J=j/Math.abs(K);return $?1-J:J}return{isLastSnapPoint:S,activeSnapPoint:m,shouldFade:C,getPercentageDragged:I,setActiveSnapPoint:p,activeSnapPointIndex:w,onRelease:R,onDrag:U,snapPointsOffset:A}}const Zz=()=>()=>{};function Jz(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:s}=Rf(),o=Ce.useRef(null),l=E.useMemo(()=>document.body.style.backgroundColor,[]);function c(){return(window.innerWidth-zb)/window.innerWidth}Ce.useEffect(()=>{if(t&&n){o.current&&clearTimeout(o.current);const f=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!f)return;Gz(r&&!s?m1(document.body,{background:"black"}):Zz,m1(f,{transformOrigin:xn(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${en.DURATION}s`,transitionTimingFunction:`cubic-bezier(${en.EASE.join(",")})`}));const d=m1(f,{borderRadius:`${vR}px`,overflow:"hidden",...xn(e)?{transform:`scale(${c()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${c()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{d(),o.current=window.setTimeout(()=>{l?document.body.style.background=l:document.body.style.removeProperty("background")},en.DURATION*1e3)}}},[t,n,l])}let pc=null;function eV({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:s,noBodyStyles:o}){const[l,c]=Ce.useState(()=>typeof window<"u"?window.location.href:""),f=Ce.useRef(0),d=Ce.useCallback(()=>{if(FC()&&pc===null&&e&&!o){pc={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:p,innerHeight:b}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-f.current}px`,left:`${-p}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const x=b-window.innerHeight;x&&f.current>=b&&(document.body.style.top=`${-(f.current+x)}px`)}),300)}},[e]),m=Ce.useCallback(()=>{if(FC()&&pc!==null&&!o){const p=-parseInt(document.body.style.top,10),b=-parseInt(document.body.style.left,10);Object.assign(document.body.style,pc),window.requestAnimationFrame(()=>{if(s&&l!==window.location.href){c(window.location.href);return}window.scrollTo(b,p)}),pc=null}},[l]);return Ce.useEffect(()=>{function p(){f.current=window.scrollY}return p(),window.addEventListener("scroll",p),()=>{window.removeEventListener("scroll",p)}},[]),Ce.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||m()}},[t,m]),Ce.useEffect(()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&d(),t||window.setTimeout(()=>{m()},500)):m())},[e,r,l,t,n,d,m]),{restorePositionSetting:m}}function tV({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:s,snapPoints:o,shouldScaleBackground:l=!1,setBackgroundColorOnScale:c=!0,closeThreshold:f=Qz,scrollLockTimeout:d=Kz,dismissible:m=!0,handleOnly:p=!1,fadeFromIndex:b=o&&o.length-1,activeSnapPoint:x,setActiveSnapPoint:S,fixed:w,modal:C=!0,onClose:A,nested:N,noBodyStyles:k=!1,direction:R="bottom",defaultOpen:U=!1,disablePreventScroll:I=!0,snapToSequentialPoint:j=!1,preventScrollRestoration:M=!1,repositionInputs:$=!0,onAnimationEnd:L,container:W,autoFocus:K=!1}){var J,te;const[ie=!1,O]=SR({defaultProp:U,prop:e,onChange:ke=>{t==null||t(ke),!ke&&!N&&Te(),setTimeout(()=>{L==null||L(ke)},en.DURATION*1e3),ke&&!C&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),ke||(document.body.style.pointerEvents="auto")}}),[H,q]=Ce.useState(!1),[ne,B]=Ce.useState(!1),[V,re]=Ce.useState(!1),P=Ce.useRef(null),he=Ce.useRef(null),ye=Ce.useRef(null),ge=Ce.useRef(null),fe=Ce.useRef(null),Se=Ce.useRef(!1),we=Ce.useRef(null),Ie=Ce.useRef(0),Fe=Ce.useRef(!1),$e=Ce.useRef(!U),zt=Ce.useRef(0),Ne=Ce.useRef(null),Ue=Ce.useRef(((J=Ne.current)==null?void 0:J.getBoundingClientRect().height)||0),Ye=Ce.useRef(((te=Ne.current)==null?void 0:te.getBoundingClientRect().width)||0),lt=Ce.useRef(0),$t=Ce.useCallback(ke=>{o&&ke===Zn.length-1&&(he.current=new Date)},[]),{activeSnapPoint:Ct,activeSnapPointIndex:un,setActiveSnapPoint:cr,onRelease:Fr,snapPointsOffset:Zn,onDrag:Yt,shouldFade:He,getPercentageDragged:oe}=Wz({snapPoints:o,activeSnapPointProp:x,setActiveSnapPointProp:S,drawerRef:Ne,fadeFromIndex:b,overlayRef:P,onSnapPointChange:$t,direction:R,container:W,snapToSequentialPoint:j});Uz({isDisabled:!ie||ne||!C||V||!H||!$||!I});const{restorePositionSetting:Te}=eV({isOpen:ie,modal:C,nested:N??!1,hasBeenOpened:H,preventScrollRestoration:M,noBodyStyles:k});function Pe(){return(window.innerWidth-zb)/window.innerWidth}function Ze(ke){var ut,Ge;!m&&!o||Ne.current&&!Ne.current.contains(ke.target)||(Ue.current=((ut=Ne.current)==null?void 0:ut.getBoundingClientRect().height)||0,Ye.current=((Ge=Ne.current)==null?void 0:Ge.getBoundingClientRect().width)||0,B(!0),ye.current=new Date,gR()&&window.addEventListener("touchend",()=>Se.current=!1,{once:!0}),ke.target.setPointerCapture(ke.pointerId),Ie.current=xn(R)?ke.pageY:ke.pageX)}function bt(ke,ut){var Ge;let tt=ke;const At=(Ge=window.getSelection())==null?void 0:Ge.toString(),cn=Ne.current?bh(Ne.current,R):null,Qt=new Date;if(tt.tagName==="SELECT"||tt.hasAttribute("data-vaul-no-drag")||tt.closest("[data-vaul-no-drag]"))return!1;if(R==="right"||R==="left")return!0;if(he.current&&Qt.getTime()-he.current.getTime()<500)return!1;if(cn!==null&&(R==="bottom"?cn>0:cn<0))return!0;if(At&&At.length>0)return!1;if(fe.current&&Qt.getTime()-fe.current.getTime()<d&&cn===0||ut)return fe.current=Qt,!1;for(;tt;){if(tt.scrollHeight>tt.clientHeight){if(tt.scrollTop!==0)return fe.current=new Date,!1;if(tt.getAttribute("role")==="dialog")return!0}tt=tt.parentNode}return!0}function vn(ke){if(Ne.current&&ne){const ut=R==="bottom"||R==="right"?1:-1,Ge=(Ie.current-(xn(R)?ke.pageY:ke.pageX))*ut,tt=Ge>0,At=o&&!m&&!tt;if(At&&un===0)return;const cn=Math.abs(Ge),Qt=document.querySelector("[data-vaul-drawer-wrapper]"),wr=R==="bottom"||R==="top"?Ue.current:Ye.current;let zn=cn/wr;const Cr=oe(cn,tt);if(Cr!==null&&(zn=Cr),At&&zn>=1||!Se.current&&!bt(ke.target,tt))return;if(Ne.current.classList.add(p1),Se.current=!0,kn(Ne.current,{transition:"none"}),kn(P.current,{transition:"none"}),o&&Yt({draggedDistance:Ge}),tt&&!o){const Jn=Yz(Ge),Gi=Math.min(Jn*-1,0)*ut;kn(Ne.current,{transform:xn(R)?`translate3d(0, ${Gi}px, 0)`:`translate3d(${Gi}px, 0, 0)`});return}const Vn=1-zn;if((He||b&&un===b-1)&&(r==null||r(ke,zn),kn(P.current,{opacity:`${Vn}`,transition:"none"},!0)),Qt&&P.current&&l){const Jn=Math.min(Pe()+zn*(1-Pe()),1),Gi=8-zn*8,Ra=Math.max(0,14-zn*14);kn(Qt,{borderRadius:`${Gi}px`,transform:xn(R)?`scale(${Jn}) translate3d(0, ${Ra}px, 0)`:`scale(${Jn}) translate3d(${Ra}px, 0, 0)`,transition:"none"},!0)}if(!o){const Jn=cn*ut;kn(Ne.current,{transform:xn(R)?`translate3d(0, ${Jn}px, 0)`:`translate3d(${Jn}px, 0, 0)`})}}}Ce.useEffect(()=>{window.requestAnimationFrame(()=>{$e.current=!0})},[]),Ce.useEffect(()=>{var ke;function ut(){if(!Ne.current||!$)return;const Ge=document.activeElement;if(Hb(Ge)||Fe.current){var tt;const At=((tt=window.visualViewport)==null?void 0:tt.height)||0,cn=window.innerHeight;let Qt=cn-At;const wr=Ne.current.getBoundingClientRect().height||0,zn=wr>cn*.8;lt.current||(lt.current=wr);const Cr=Ne.current.getBoundingClientRect().top;if(Math.abs(zt.current-Qt)>60&&(Fe.current=!Fe.current),o&&o.length>0&&Zn&&un){const Vn=Zn[un]||0;Qt+=Vn}if(zt.current=Qt,wr>At||Fe.current){const Vn=Ne.current.getBoundingClientRect().height;let Jn=Vn;Vn>At&&(Jn=At-(zn?Cr:zb)),w?Ne.current.style.height=`${Vn-Math.max(Qt,0)}px`:Ne.current.style.height=`${Math.max(Jn,At-Cr)}px`}else Mz()||(Ne.current.style.height=`${lt.current}px`);o&&o.length>0&&!Fe.current?Ne.current.style.bottom="0px":Ne.current.style.bottom=`${Math.max(Qt,0)}px`}}return(ke=window.visualViewport)==null||ke.addEventListener("resize",ut),()=>{var Ge;return(Ge=window.visualViewport)==null?void 0:Ge.removeEventListener("resize",ut)}},[un,o,Zn]);function Tn(ke){Gt(),A==null||A(),ke||O(!1),setTimeout(()=>{o&&cr(o[0])},en.DURATION*1e3)}function nn(){if(!Ne.current)return;const ke=document.querySelector("[data-vaul-drawer-wrapper]"),ut=bh(Ne.current,R);kn(Ne.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${en.DURATION}s cubic-bezier(${en.EASE.join(",")})`}),kn(P.current,{transition:`opacity ${en.DURATION}s cubic-bezier(${en.EASE.join(",")})`,opacity:"1"}),l&&ut&&ut>0&&ie&&kn(ke,{borderRadius:`${vR}px`,overflow:"hidden",...xn(R)?{transform:`scale(${Pe()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${Pe()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${en.DURATION}s`,transitionTimingFunction:`cubic-bezier(${en.EASE.join(",")})`},!0)}function Gt(){!ne||!Ne.current||(Ne.current.classList.remove(p1),Se.current=!1,B(!1),ge.current=new Date)}function Sn(ke){if(!ne||!Ne.current)return;Ne.current.classList.remove(p1),Se.current=!1,B(!1),ge.current=new Date;const ut=bh(Ne.current,R);if(!ke||!bt(ke.target,!1)||!ut||Number.isNaN(ut)||ye.current===null)return;const Ge=ge.current.getTime()-ye.current.getTime(),tt=Ie.current-(xn(R)?ke.pageY:ke.pageX),At=Math.abs(tt)/Ge;if(At>.05&&(re(!0),setTimeout(()=>{re(!1)},200)),o){Fr({draggedDistance:tt*(R==="bottom"||R==="right"?1:-1),closeDrawer:Tn,velocity:At,dismissible:m}),s==null||s(ke,!0);return}if(R==="bottom"||R==="right"?tt>0:tt<0){nn(),s==null||s(ke,!0);return}if(At>ER){Tn(),s==null||s(ke,!1);return}var cn;const Qt=Math.min((cn=Ne.current.getBoundingClientRect().height)!=null?cn:0,window.innerHeight);var wr;const zn=Math.min((wr=Ne.current.getBoundingClientRect().width)!=null?wr:0,window.innerWidth),Cr=R==="left"||R==="right";if(Math.abs(ut)>=(Cr?zn:Qt)*f){Tn(),s==null||s(ke,!1);return}s==null||s(ke,!0),nn()}Ce.useEffect(()=>(ie&&(kn(document.documentElement,{scrollBehavior:"auto"}),he.current=new Date),()=>{$z(document.documentElement,"scrollBehavior")}),[ie]);function vt(ke){const ut=ke?(window.innerWidth-Xa)/window.innerWidth:1,Ge=ke?-Xa:0;we.current&&window.clearTimeout(we.current),kn(Ne.current,{transition:`transform ${en.DURATION}s cubic-bezier(${en.EASE.join(",")})`,transform:xn(R)?`scale(${ut}) translate3d(0, ${Ge}px, 0)`:`scale(${ut}) translate3d(${Ge}px, 0, 0)`}),!ke&&Ne.current&&(we.current=setTimeout(()=>{const tt=bh(Ne.current,R);kn(Ne.current,{transition:"none",transform:xn(R)?`translate3d(0, ${tt}px, 0)`:`translate3d(${tt}px, 0, 0)`})},500))}function fr(ke,ut){if(ut<0)return;const Ge=(window.innerWidth-Xa)/window.innerWidth,tt=Ge+ut*(1-Ge),At=-Xa+ut*Xa;kn(Ne.current,{transform:xn(R)?`scale(${tt}) translate3d(0, ${At}px, 0)`:`scale(${tt}) translate3d(${At}px, 0, 0)`,transition:"none"})}function wn(ke,ut){const Ge=xn(R)?window.innerHeight:window.innerWidth,tt=ut?(Ge-Xa)/Ge:1,At=ut?-Xa:0;ut&&kn(Ne.current,{transition:`transform ${en.DURATION}s cubic-bezier(${en.EASE.join(",")})`,transform:xn(R)?`scale(${tt}) translate3d(0, ${At}px, 0)`:`scale(${tt}) translate3d(${At}px, 0, 0)`})}return Ce.useEffect(()=>{C||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[C]),Ce.createElement(uR,{defaultOpen:U,onOpenChange:ke=>{!m&&!ke||(ke?q(!0):Tn(!0),O(ke))},open:ie},Ce.createElement(pR.Provider,{value:{activeSnapPoint:Ct,snapPoints:o,setActiveSnapPoint:cr,drawerRef:Ne,overlayRef:P,onOpenChange:t,onPress:Ze,onRelease:Sn,onDrag:vn,dismissible:m,shouldAnimate:$e,handleOnly:p,isOpen:ie,isDragging:ne,shouldFade:He,closeDrawer:Tn,onNestedDrag:fr,onNestedOpenChange:vt,onNestedRelease:wn,keyboardIsOpen:Fe,modal:C,snapPointsOffset:Zn,activeSnapPointIndex:un,direction:R,shouldScaleBackground:l,setBackgroundColorOnScale:c,noBodyStyles:k,container:W,autoFocus:K}},n))}const wR=Ce.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:s,shouldFade:o,isOpen:l,modal:c,shouldAnimate:f}=Rf(),d=yR(t,n),m=r&&r.length>0;if(!c)return null;const p=Ce.useCallback(b=>s(b),[s]);return Ce.createElement(xx,{onMouseUp:p,ref:d,"data-vaul-overlay":"","data-vaul-snap-points":l&&m?"true":"false","data-vaul-snap-points-overlay":l&&o?"true":"false","data-vaul-animate":f!=null&&f.current?"true":"false",...e})});wR.displayName="Drawer.Overlay";const CR=Ce.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},s){const{drawerRef:o,onPress:l,onRelease:c,onDrag:f,keyboardIsOpen:d,snapPointsOffset:m,activeSnapPointIndex:p,modal:b,isOpen:x,direction:S,snapPoints:w,container:C,handleOnly:A,shouldAnimate:N,autoFocus:k}=Rf(),[R,U]=Ce.useState(!1),I=yR(s,o),j=Ce.useRef(null),M=Ce.useRef(null),$=Ce.useRef(!1),L=w&&w.length>0;Jz();const W=(J,te,ie=0)=>{if($.current)return!0;const O=Math.abs(J.y),H=Math.abs(J.x),q=H>O,ne=["bottom","right"].includes(te)?1:-1;if(te==="left"||te==="right"){if(!(J.x*ne<0)&&H>=0&&H<=ie)return q}else if(!(J.y*ne<0)&&O>=0&&O<=ie)return!q;return $.current=!0,!0};Ce.useEffect(()=>{L&&window.requestAnimationFrame(()=>{U(!0)})},[]);function K(J){j.current=null,$.current=!1,c(J)}return Ce.createElement(Ex,{"data-vaul-drawer-direction":S,"data-vaul-drawer":"","data-vaul-delayed-snap-points":R?"true":"false","data-vaul-snap-points":x&&L?"true":"false","data-vaul-custom-container":C?"true":"false","data-vaul-animate":N!=null&&N.current?"true":"false",...r,ref:I,style:m&&m.length>0?{"--snap-point-height":`${m[p??0]}px`,...t}:t,onPointerDown:J=>{A||(r.onPointerDown==null||r.onPointerDown.call(r,J),j.current={x:J.pageX,y:J.pageY},l(J))},onOpenAutoFocus:J=>{n==null||n(J),k||J.preventDefault()},onPointerDownOutside:J=>{if(e==null||e(J),!b||J.defaultPrevented){J.preventDefault();return}d.current&&(d.current=!1)},onFocusOutside:J=>{if(!b){J.preventDefault();return}},onPointerMove:J=>{if(M.current=J,A||(r.onPointerMove==null||r.onPointerMove.call(r,J),!j.current))return;const te=J.pageY-j.current.y,ie=J.pageX-j.current.x,O=J.pointerType==="touch"?10:2;W({x:ie,y:te},S,O)?f(J):(Math.abs(ie)>O||Math.abs(te)>O)&&(j.current=null)},onPointerUp:J=>{r.onPointerUp==null||r.onPointerUp.call(r,J),j.current=null,$.current=!1,c(J)},onPointerOut:J=>{r.onPointerOut==null||r.onPointerOut.call(r,J),K(M.current)},onContextMenu:J=>{r.onContextMenu==null||r.onContextMenu.call(r,J),M.current&&K(M.current)}})});CR.displayName="Drawer.Content";const nV=250,rV=120,iV=Ce.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:s,isDragging:o,snapPoints:l,activeSnapPoint:c,setActiveSnapPoint:f,dismissible:d,handleOnly:m,isOpen:p,onPress:b,onDrag:x}=Rf(),S=Ce.useRef(null),w=Ce.useRef(!1);function C(){if(w.current){k();return}window.setTimeout(()=>{A()},rV)}function A(){if(o||e||w.current){k();return}if(k(),!l||l.length===0){d||s();return}if(c===l[l.length-1]&&d){s();return}const U=l.findIndex(j=>j===c);if(U===-1)return;const I=l[U+1];f(I)}function N(){S.current=window.setTimeout(()=>{w.current=!0},nV)}function k(){S.current&&window.clearTimeout(S.current),w.current=!1}return Ce.createElement("div",{onClick:C,onPointerCancel:k,onPointerDown:R=>{m&&b(R),N()},onPointerMove:R=>{m&&x(R)},ref:r,"data-vaul-drawer-visible":p?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},Ce.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});iV.displayName="Drawer.Handle";function sV(e){const t=Rf(),{container:n=t.container,...r}=e;return Ce.createElement(cR,{container:n,...r})}const No={Root:tV,Content:CR,Overlay:wR,Trigger:_z,Portal:sV,Title:vx,Description:Tx},wx=({shouldScaleBackground:e=!0,...t})=>g.jsx(No.Root,{shouldScaleBackground:e,...t});wx.displayName="Drawer";const aV=No.Trigger,oV=No.Portal,AR=E.forwardRef(({className:e,...t},n)=>g.jsx(No.Overlay,{ref:n,className:Xe("fixed inset-0 z-50 bg-black/80",e),...t}));AR.displayName="DrawerOverlay";const Cx=E.forwardRef(({className:e,children:t,...n},r)=>g.jsxs(oV,{children:[g.jsx(AR,{}),g.jsxs(No.Content,{ref:r,className:Xe("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",e),...n,children:[g.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]}));Cx.displayName="DrawerContent";function Ax({className:e,...t}){return g.jsx("div",{className:Xe("grid gap-1.5 p-4 text-center sm:text-left",e),...t})}Ax.displayName="DrawerHeader";const _x=E.forwardRef(({className:e,...t},n)=>g.jsx(No.Title,{ref:n,className:Xe("text-lg font-semibold leading-none tracking-tight",e),...t}));_x.displayName="DrawerTitle";const lV=E.forwardRef(({className:e,...t},n)=>g.jsx(No.Description,{ref:n,className:Xe("text-sm text-muted-foreground",e),...t}));lV.displayName="DrawerDescription";const jm=E.createContext({isDesktop:!0});function _R({children:e,...t}){const n=!_o(),r=n?Nz:wx;return g.jsx(jm.Provider,{value:{isDesktop:n},children:g.jsx(r,{...t,children:e})})}function kR({className:e,children:t,...n}){const{isDesktop:r}=E.useContext(jm);return r?g.jsx(dR,{className:Xe("h-[75vh] flex flex-col",e),...n,children:t}):g.jsx(Cx,{className:Xe("h-[90vh] flex flex-col",e),children:t})}function NR({className:e,...t}){const{isDesktop:n}=E.useContext(jm),r=n?hR:Ax;return g.jsx(r,{className:e,...t})}function RR({className:e,...t}){const{isDesktop:n}=E.useContext(jm),r=n?mR:_x;return g.jsx(r,{className:e,...t})}function uV(e,t){if(e.length===0||e.length===1&&e[0].path===t)return"browse";try{const n=localStorage.getItem("gateway-picker-view");if(n){const r=JSON.parse(n);if(Date.now()-new Date(r.timestamp).getTime()<480*60*1e3)return r.view}}catch{}return"recent"}function cV({open:e,onOpenChange:t}){const n=si(),[r,s]=Om(),{recentCwds:o}=Jt(),[l,c]=E.useState(r||""),[f,d]=E.useState(!1),[m,p]=E.useState(()=>uV(o,r)),b=E.useCallback(()=>t(!1),[t]),{data:x,isLoading:S}=zi({queryKey:["directory",l,f],queryFn:()=>n.browseDirectory(l||void 0,f),placeholderData:R=>R,staleTime:3e4}),w=E.useCallback(()=>{x!=null&&x.path&&(s(x.path),b())},[x==null?void 0:x.path,s,b]),C=E.useCallback(R=>{p(R);try{localStorage.setItem("gateway-picker-view",JSON.stringify({view:R,timestamp:new Date().toISOString()}))}catch{}},[]),A=E.useCallback(R=>{c(R),p("browse")},[]),N=E.useCallback(R=>{s(R),b()},[s,b]),k=(R,U)=>`p-1.5 transition-colors ${U==="left"?"rounded-l-md":"rounded-r-md"} ${R?"bg-accent text-foreground":"text-muted-foreground/40 hover:text-muted-foreground"}`;return g.jsx(_R,{open:e,onOpenChange:t,children:g.jsxs(kR,{className:"p-0 gap-0 max-w-lg overflow-hidden sm:rounded-xl",children:[g.jsx(NR,{className:"px-4 py-3 border-b space-y-0",children:g.jsx(RR,{className:"text-sm font-medium",children:"Select Working Directory"})}),g.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 border-b bg-muted/30 overflow-x-auto",children:[g.jsxs("div",{className:"flex items-center border rounded-md flex-shrink-0",children:[o.length>0&&g.jsx("button",{onClick:()=>C("recent"),className:k(m==="recent","left"),"aria-label":"Recent directories",title:"Recent",children:g.jsx(lF,{className:"size-(--size-icon-sm)"})}),g.jsx("button",{onClick:()=>{C("browse"),A("")},className:k(m==="browse",o.length>0?"right":"left"),"aria-label":"Browse directories",title:"Browse",children:g.jsx(Bc,{className:"size-(--size-icon-sm)"})})]}),m==="browse"?g.jsxs(g.Fragment,{children:[g.jsx(IN,{path:(x==null?void 0:x.path)??null,maxSegments:5,onSegmentClick:A,size:"md"}),g.jsx("div",{className:"flex-1"}),g.jsx("button",{onClick:()=>d(!f),className:"p-1 max-md:p-2 rounded hover:bg-accent transition-colors flex-shrink-0","aria-label":f?"Hide hidden folders":"Show hidden folders",title:f?"Hide hidden folders":"Show hidden folders",children:f?g.jsx(yF,{className:"size-(--size-icon-sm) text-muted-foreground"}):g.jsx(gF,{className:"size-(--size-icon-sm) text-muted-foreground"})})]}):g.jsx("span",{className:"text-xs text-muted-foreground px-1",children:"Recent"})]}),g.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:m==="browse"?g.jsx(g.Fragment,{children:S&&!x?g.jsx("div",{className:"flex items-center justify-center h-20",children:g.jsx(af,{className:"size-(--size-icon-md) animate-spin text-muted-foreground"})}):(x==null?void 0:x.entries.length)===0?g.jsx("div",{className:"flex items-center justify-center h-20",children:g.jsx("p",{className:"text-xs text-muted-foreground/60",children:"No subdirectories"})}):g.jsxs("div",{className:"py-1",children:[(x==null?void 0:x.parent)&&g.jsxs("button",{onClick:()=>A(x.parent),className:"flex items-center gap-2 w-full px-4 py-1.5 text-left hover:bg-accent transition-colors",children:[g.jsx(Bc,{className:"size-(--size-icon-md) text-muted-foreground"}),g.jsx("span",{className:"text-sm text-muted-foreground",children:".."})]}),x==null?void 0:x.entries.map(R=>g.jsxs("button",{onClick:()=>A(R.path),className:"flex items-center gap-2 w-full px-4 py-1.5 text-left hover:bg-accent transition-colors",children:[g.jsx(gN,{className:"size-(--size-icon-md) text-muted-foreground"}),g.jsx("span",{className:"text-sm truncate",children:R.name})]},R.path))]})}):g.jsx("div",{className:"py-1",children:o.slice(0,10).map(R=>g.jsxs("button",{onClick:()=>N(R.path),className:"flex items-center gap-2 w-full px-4 py-1.5 text-left hover:bg-accent transition-colors",children:[g.jsx(Bc,{className:"size-(--size-icon-md) text-muted-foreground flex-shrink-0"}),g.jsx("span",{className:"text-sm text-muted-foreground truncate",children:WU(R.path)}),g.jsx("span",{className:"ml-auto text-[11px] text-muted-foreground/50 flex-shrink-0",children:MN(R.accessedAt)})]},R.path))})}),g.jsxs("div",{className:"flex items-center justify-end gap-2 px-4 py-3 border-t bg-muted/20",children:[g.jsx("button",{onClick:b,className:"px-3 py-1.5 text-xs rounded-md hover:bg-accent transition-colors",children:"Cancel"}),g.jsx("button",{onClick:w,disabled:!(x!=null&&x.path)||m!=="browse",className:"px-3 py-1.5 text-xs rounded-md bg-primary text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",children:"Select"})]})]})})}const DR="gateway-theme",fV="(prefers-color-scheme: dark)";function dV(){const e=localStorage.getItem(DR);return e==="light"||e==="dark"||e==="system"?e:"system"}function yh(e){document.documentElement.classList.toggle("dark",e)}function OR(){const[e,t]=E.useState(dV),n=E.useCallback(r=>{localStorage.setItem(DR,r),t(r)},[]);return E.useEffect(()=>{if(e==="system"){if(typeof window.matchMedia!="function"){yh(!1);return}const r=window.matchMedia(fV);yh(r.matches);const s=o=>yh(o.matches);return r.addEventListener("change",s),()=>r.removeEventListener("change",s)}yh(e==="dark")},[e]),{theme:e,setTheme:n}}function MR(e){const t=E.useRef({value:e,previous:e});return E.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function IR(e){const[t,n]=E.useState(void 0);return Kn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let l,c;if("borderBoxSize"in o){const f=o.borderBoxSize,d=Array.isArray(f)?f[0]:f;l=d.inlineSize,c=d.blockSize}else l=e.offsetWidth,c=e.offsetHeight;n({width:l,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Bm="Switch",[hV]=Vi(Bm),[mV,pV]=hV(Bm),LR=E.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:s,defaultChecked:o,required:l,disabled:c,value:f="on",onCheckedChange:d,form:m,...p}=e,[b,x]=E.useState(null),S=Nt(t,k=>x(k)),w=E.useRef(!1),C=b?m||!!b.closest("form"):!0,[A,N]=Ea({prop:s,defaultProp:o??!1,onChange:d,caller:Bm});return g.jsxs(mV,{scope:n,checked:A,disabled:c,children:[g.jsx(it.button,{type:"button",role:"switch","aria-checked":A,"aria-required":l,"data-state":FR(A),"data-disabled":c?"":void 0,disabled:c,value:f,...p,ref:S,onClick:_e(e.onClick,k=>{N(R=>!R),C&&(w.current=k.isPropagationStopped(),w.current||k.stopPropagation())})}),C&&g.jsx(BR,{control:b,bubbles:!w.current,name:r,value:f,checked:A,required:l,disabled:c,form:m,style:{transform:"translateX(-100%)"}})]})});LR.displayName=Bm;var PR="SwitchThumb",jR=E.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,s=pV(PR,n);return g.jsx(it.span,{"data-state":FR(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t})});jR.displayName=PR;var gV="SwitchBubbleInput",BR=E.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...s},o)=>{const l=E.useRef(null),c=Nt(l,o),f=MR(n),d=IR(t);return E.useEffect(()=>{const m=l.current;if(!m)return;const p=window.HTMLInputElement.prototype,x=Object.getOwnPropertyDescriptor(p,"checked").set;if(f!==n&&x){const S=new Event("click",{bubbles:r});x.call(m,n),m.dispatchEvent(S)}},[f,n,r]),g.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:c,style:{...s.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});BR.displayName=gV;function FR(e){return e?"checked":"unchecked"}var UR=LR,bV=jR;const $n=E.forwardRef(({className:e,...t},n)=>g.jsx(UR,{className:Xe("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:g.jsx(bV,{className:Xe("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));$n.displayName=UR.displayName;var yV=Symbol.for("react.lazy"),sm=wy[" use ".trim().toString()];function xV(e){return typeof e=="object"&&e!==null&&"then"in e}function HR(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===yV&&"_payload"in e&&xV(e._payload)}function EV(e){const t=vV(e),n=E.forwardRef((r,s)=>{let{children:o,...l}=r;HR(o)&&typeof sm=="function"&&(o=sm(o._payload));const c=E.Children.toArray(o),f=c.find(SV);if(f){const d=f.props.children,m=c.map(p=>p===f?E.Children.count(d)>1?E.Children.only(null):E.isValidElement(d)?d.props.children:null:p);return g.jsx(t,{...l,ref:s,children:E.isValidElement(d)?E.cloneElement(d,void 0,m):null})}return g.jsx(t,{...l,ref:s,children:o})});return n.displayName=`${e}.Slot`,n}function vV(e){const t=E.forwardRef((n,r)=>{let{children:s,...o}=n;if(HR(s)&&typeof sm=="function"&&(s=sm(s._payload)),E.isValidElement(s)){const l=CV(s),c=wV(o,s.props);return s.type!==E.Fragment&&(c.ref=r?_f(r,l):l),E.cloneElement(s,c)}return E.Children.count(s)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var TV=Symbol("radix.slottable");function SV(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===TV}function wV(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...c)=>{const f=o(...c);return s(...c),f}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function CV(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var AV=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_V=AV.reduce((e,t)=>{const n=EV(`Primitive.${t}`),r=E.forwardRef((s,o)=>{const{asChild:l,...c}=s,f=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(f,{...c,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),kV="Label",zR=E.forwardRef((e,t)=>g.jsx(_V.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));zR.displayName=kV;var VR=zR;const qR=E.forwardRef(({className:e,...t},n)=>g.jsx(VR,{ref:n,className:Xe("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...t}));qR.displayName=VR.displayName;const VC=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,qC=dx,NV=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return qC(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:o}=t,l=Object.keys(s).map(d=>{const m=n==null?void 0:n[d],p=o==null?void 0:o[d];if(m===null)return null;const b=VC(m)||VC(p);return s[d][b]}),c=n&&Object.entries(n).reduce((d,m)=>{let[p,b]=m;return b===void 0||(d[p]=b),d},{}),f=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,m)=>{let{class:p,className:b,...x}=m;return Object.entries(x).every(S=>{let[w,C]=S;return Array.isArray(C)?C.includes({...o,...c}[w]):{...o,...c}[w]===C})?[...d,p,b]:d},[]);return qC(e,l,f,n==null?void 0:n.class,n==null?void 0:n.className)},RV=NV("inline-flex items-center rounded-md border px-2 py-0.5 text-xs font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function DV({className:e,variant:t,...n}){return g.jsx("div",{className:Xe(RV({variant:t}),e),...n})}function kx(e){const t=e+"CollectionProvider",[n,r]=Vi(t),[s,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=w=>{const{scope:C,children:A}=w,N=Ce.useRef(null),k=Ce.useRef(new Map).current;return g.jsx(s,{scope:C,itemMap:k,collectionRef:N,children:A})};l.displayName=t;const c=e+"CollectionSlot",f=eu(c),d=Ce.forwardRef((w,C)=>{const{scope:A,children:N}=w,k=o(c,A),R=Nt(C,k.collectionRef);return g.jsx(f,{ref:R,children:N})});d.displayName=c;const m=e+"CollectionItemSlot",p="data-radix-collection-item",b=eu(m),x=Ce.forwardRef((w,C)=>{const{scope:A,children:N,...k}=w,R=Ce.useRef(null),U=Nt(C,R),I=o(m,A);return Ce.useEffect(()=>(I.itemMap.set(R,{ref:R,...k}),()=>void I.itemMap.delete(R))),g.jsx(b,{[p]:"",ref:U,children:N})});x.displayName=m;function S(w){const C=o(e+"CollectionConsumer",w);return Ce.useCallback(()=>{const N=C.collectionRef.current;if(!N)return[];const k=Array.from(N.querySelectorAll(`[${p}]`));return Array.from(C.itemMap.values()).sort((I,j)=>k.indexOf(I.ref.current)-k.indexOf(j.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:l,Slot:d,ItemSlot:x},S,r]}var OV=E.createContext(void 0);function Fm(e){const t=E.useContext(OV);return e||t||"ltr"}var g1="rovingFocusGroup.onEntryFocus",MV={bubbles:!1,cancelable:!0},Df="RovingFocusGroup",[Vb,$R,IV]=kx(Df),[LV,Um]=Vi(Df,[IV]),[PV,jV]=LV(Df),YR=E.forwardRef((e,t)=>g.jsx(Vb.Provider,{scope:e.__scopeRovingFocusGroup,children:g.jsx(Vb.Slot,{scope:e.__scopeRovingFocusGroup,children:g.jsx(BV,{...e,ref:t})})}));YR.displayName=Df;var BV=E.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:o,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:f,onEntryFocus:d,preventScrollOnEntryFocus:m=!1,...p}=e,b=E.useRef(null),x=Nt(t,b),S=Fm(o),[w,C]=Ea({prop:l,defaultProp:c??null,onChange:f,caller:Df}),[A,N]=E.useState(!1),k=Ui(d),R=$R(n),U=E.useRef(!1),[I,j]=E.useState(0);return E.useEffect(()=>{const M=b.current;if(M)return M.addEventListener(g1,k),()=>M.removeEventListener(g1,k)},[k]),g.jsx(PV,{scope:n,orientation:r,dir:S,loop:s,currentTabStopId:w,onItemFocus:E.useCallback(M=>C(M),[C]),onItemShiftTab:E.useCallback(()=>N(!0),[]),onFocusableItemAdd:E.useCallback(()=>j(M=>M+1),[]),onFocusableItemRemove:E.useCallback(()=>j(M=>M-1),[]),children:g.jsx(it.div,{tabIndex:A||I===0?-1:0,"data-orientation":r,...p,ref:x,style:{outline:"none",...e.style},onMouseDown:_e(e.onMouseDown,()=>{U.current=!0}),onFocus:_e(e.onFocus,M=>{const $=!U.current;if(M.target===M.currentTarget&&$&&!A){const L=new CustomEvent(g1,MV);if(M.currentTarget.dispatchEvent(L),!L.defaultPrevented){const W=R().filter(O=>O.focusable),K=W.find(O=>O.active),J=W.find(O=>O.id===w),ie=[K,J,...W].filter(Boolean).map(O=>O.ref.current);KR(ie,m)}}U.current=!1}),onBlur:_e(e.onBlur,()=>N(!1))})})}),GR="RovingFocusGroupItem",QR=E.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:o,children:l,...c}=e,f=ji(),d=o||f,m=jV(GR,n),p=m.currentTabStopId===d,b=$R(n),{onFocusableItemAdd:x,onFocusableItemRemove:S,currentTabStopId:w}=m;return E.useEffect(()=>{if(r)return x(),()=>S()},[r,x,S]),g.jsx(Vb.ItemSlot,{scope:n,id:d,focusable:r,active:s,children:g.jsx(it.span,{tabIndex:p?0:-1,"data-orientation":m.orientation,...c,ref:t,onMouseDown:_e(e.onMouseDown,C=>{r?m.onItemFocus(d):C.preventDefault()}),onFocus:_e(e.onFocus,()=>m.onItemFocus(d)),onKeyDown:_e(e.onKeyDown,C=>{if(C.key==="Tab"&&C.shiftKey){m.onItemShiftTab();return}if(C.target!==C.currentTarget)return;const A=HV(C,m.orientation,m.dir);if(A!==void 0){if(C.metaKey||C.ctrlKey||C.altKey||C.shiftKey)return;C.preventDefault();let k=b().filter(R=>R.focusable).map(R=>R.ref.current);if(A==="last")k.reverse();else if(A==="prev"||A==="next"){A==="prev"&&k.reverse();const R=k.indexOf(C.currentTarget);k=m.loop?zV(k,R+1):k.slice(R+1)}setTimeout(()=>KR(k))}}),children:typeof l=="function"?l({isCurrentTabStop:p,hasTabStop:w!=null}):l})})});QR.displayName=GR;var FV={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function UV(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function HV(e,t,n){const r=UV(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return FV[r]}function KR(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function zV(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var XR=YR,WR=QR,Hm="Tabs",[VV]=Vi(Hm,[Um]),ZR=Um(),[qV,Nx]=VV(Hm),JR=E.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:s,defaultValue:o,orientation:l="horizontal",dir:c,activationMode:f="automatic",...d}=e,m=Fm(c),[p,b]=Ea({prop:r,onChange:s,defaultProp:o??"",caller:Hm});return g.jsx(qV,{scope:n,baseId:ji(),value:p,onValueChange:b,orientation:l,dir:m,activationMode:f,children:g.jsx(it.div,{dir:m,"data-orientation":l,...d,ref:t})})});JR.displayName=Hm;var eD="TabsList",tD=E.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...s}=e,o=Nx(eD,n),l=ZR(n);return g.jsx(XR,{asChild:!0,...l,orientation:o.orientation,dir:o.dir,loop:r,children:g.jsx(it.div,{role:"tablist","aria-orientation":o.orientation,...s,ref:t})})});tD.displayName=eD;var nD="TabsTrigger",rD=E.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:s=!1,...o}=e,l=Nx(nD,n),c=ZR(n),f=aD(l.baseId,r),d=oD(l.baseId,r),m=r===l.value;return g.jsx(WR,{asChild:!0,...c,focusable:!s,active:m,children:g.jsx(it.button,{type:"button",role:"tab","aria-selected":m,"aria-controls":d,"data-state":m?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:f,...o,ref:t,onMouseDown:_e(e.onMouseDown,p=>{!s&&p.button===0&&p.ctrlKey===!1?l.onValueChange(r):p.preventDefault()}),onKeyDown:_e(e.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&l.onValueChange(r)}),onFocus:_e(e.onFocus,()=>{const p=l.activationMode!=="manual";!m&&!s&&p&&l.onValueChange(r)})})})});rD.displayName=nD;var iD="TabsContent",sD=E.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:s,children:o,...l}=e,c=Nx(iD,n),f=aD(c.baseId,r),d=oD(c.baseId,r),m=r===c.value,p=E.useRef(m);return E.useEffect(()=>{const b=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(b)},[]),g.jsx(yi,{present:s||m,children:({present:b})=>g.jsx(it.div,{"data-state":m?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":f,hidden:!b,id:d,tabIndex:0,...l,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:b&&o})})});sD.displayName=iD;function aD(e,t){return`${e}-trigger-${t}`}function oD(e,t){return`${e}-content-${t}`}var $V=JR,lD=tD,uD=rD,cD=sD;const fD=$V,Rx=E.forwardRef(({className:e,...t},n)=>g.jsx(lD,{ref:n,className:Xe("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Rx.displayName=lD.displayName;const Ml=E.forwardRef(({className:e,...t},n)=>g.jsx(uD,{ref:n,className:Xe("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50","data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));Ml.displayName=uD.displayName;const Il=E.forwardRef(({className:e,...t},n)=>g.jsx(cD,{ref:n,className:Xe("mt-2 ring-offset-background","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Il.displayName=cD.displayName;function $C(e,[t,n]){return Math.min(n,Math.max(t,e))}const YV=["top","right","bottom","left"],va=Math.min,Pr=Math.max,am=Math.round,xh=Math.floor,Bi=e=>({x:e,y:e}),GV={left:"right",right:"left",bottom:"top",top:"bottom"},QV={start:"end",end:"start"};function qb(e,t,n){return Pr(e,va(t,n))}function Ts(e,t){return typeof e=="function"?e(t):e}function Ss(e){return e.split("-")[0]}function du(e){return e.split("-")[1]}function Dx(e){return e==="x"?"y":"x"}function Ox(e){return e==="y"?"height":"width"}const KV=new Set(["top","bottom"]);function Ii(e){return KV.has(Ss(e))?"y":"x"}function Mx(e){return Dx(Ii(e))}function XV(e,t,n){n===void 0&&(n=!1);const r=du(e),s=Mx(e),o=Ox(s);let l=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=om(l)),[l,om(l)]}function WV(e){const t=om(e);return[$b(e),t,$b(t)]}function $b(e){return e.replace(/start|end/g,t=>QV[t])}const YC=["left","right"],GC=["right","left"],ZV=["top","bottom"],JV=["bottom","top"];function eq(e,t,n){switch(e){case"top":case"bottom":return n?t?GC:YC:t?YC:GC;case"left":case"right":return t?ZV:JV;default:return[]}}function tq(e,t,n,r){const s=du(e);let o=eq(Ss(e),n==="start",r);return s&&(o=o.map(l=>l+"-"+s),t&&(o=o.concat(o.map($b)))),o}function om(e){return e.replace(/left|right|bottom|top/g,t=>GV[t])}function nq(e){return{top:0,right:0,bottom:0,left:0,...e}}function dD(e){return typeof e!="number"?nq(e):{top:e,right:e,bottom:e,left:e}}function lm(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function QC(e,t,n){let{reference:r,floating:s}=e;const o=Ii(t),l=Mx(t),c=Ox(l),f=Ss(t),d=o==="y",m=r.x+r.width/2-s.width/2,p=r.y+r.height/2-s.height/2,b=r[c]/2-s[c]/2;let x;switch(f){case"top":x={x:m,y:r.y-s.height};break;case"bottom":x={x:m,y:r.y+r.height};break;case"right":x={x:r.x+r.width,y:p};break;case"left":x={x:r.x-s.width,y:p};break;default:x={x:r.x,y:r.y}}switch(du(t)){case"start":x[l]-=b*(n&&d?-1:1);break;case"end":x[l]+=b*(n&&d?-1:1);break}return x}async function rq(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:o,rects:l,elements:c,strategy:f}=e,{boundary:d="clippingAncestors",rootBoundary:m="viewport",elementContext:p="floating",altBoundary:b=!1,padding:x=0}=Ts(t,e),S=dD(x),C=c[b?p==="floating"?"reference":"floating":p],A=lm(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(C)))==null||n?C:C.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:d,rootBoundary:m,strategy:f})),N=p==="floating"?{x:r,y:s,width:l.floating.width,height:l.floating.height}:l.reference,k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),R=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},U=lm(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:N,offsetParent:k,strategy:f}):N);return{top:(A.top-U.top+S.top)/R.y,bottom:(U.bottom-A.bottom+S.bottom)/R.y,left:(A.left-U.left+S.left)/R.x,right:(U.right-A.right+S.right)/R.x}}const iq=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:l}=n,c=o.filter(Boolean),f=await(l.isRTL==null?void 0:l.isRTL(t));let d=await l.getElementRects({reference:e,floating:t,strategy:s}),{x:m,y:p}=QC(d,r,f),b=r,x={},S=0;for(let C=0;C<c.length;C++){var w;const{name:A,fn:N}=c[C],{x:k,y:R,data:U,reset:I}=await N({x:m,y:p,initialPlacement:r,placement:b,strategy:s,middlewareData:x,rects:d,platform:{...l,detectOverflow:(w=l.detectOverflow)!=null?w:rq},elements:{reference:e,floating:t}});m=k??m,p=R??p,x={...x,[A]:{...x[A],...U}},I&&S<=50&&(S++,typeof I=="object"&&(I.placement&&(b=I.placement),I.rects&&(d=I.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:s}):I.rects),{x:m,y:p}=QC(d,b,f)),C=-1)}return{x:m,y:p,placement:b,strategy:s,middlewareData:x}},sq=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:o,platform:l,elements:c,middlewareData:f}=t,{element:d,padding:m=0}=Ts(e,t)||{};if(d==null)return{};const p=dD(m),b={x:n,y:r},x=Mx(s),S=Ox(x),w=await l.getDimensions(d),C=x==="y",A=C?"top":"left",N=C?"bottom":"right",k=C?"clientHeight":"clientWidth",R=o.reference[S]+o.reference[x]-b[x]-o.floating[S],U=b[x]-o.reference[x],I=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d));let j=I?I[k]:0;(!j||!await(l.isElement==null?void 0:l.isElement(I)))&&(j=c.floating[k]||o.floating[S]);const M=R/2-U/2,$=j/2-w[S]/2-1,L=va(p[A],$),W=va(p[N],$),K=L,J=j-w[S]-W,te=j/2-w[S]/2+M,ie=qb(K,te,J),O=!f.arrow&&du(s)!=null&&te!==ie&&o.reference[S]/2-(te<K?L:W)-w[S]/2<0,H=O?te<K?te-K:te-J:0;return{[x]:b[x]+H,data:{[x]:ie,centerOffset:te-ie-H,...O&&{alignmentOffset:H}},reset:O}}}),aq=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:o,rects:l,initialPlacement:c,platform:f,elements:d}=t,{mainAxis:m=!0,crossAxis:p=!0,fallbackPlacements:b,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:w=!0,...C}=Ts(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const A=Ss(s),N=Ii(c),k=Ss(c)===c,R=await(f.isRTL==null?void 0:f.isRTL(d.floating)),U=b||(k||!w?[om(c)]:WV(c)),I=S!=="none";!b&&I&&U.push(...tq(c,w,S,R));const j=[c,...U],M=await f.detectOverflow(t,C),$=[];let L=((r=o.flip)==null?void 0:r.overflows)||[];if(m&&$.push(M[A]),p){const te=XV(s,l,R);$.push(M[te[0]],M[te[1]])}if(L=[...L,{placement:s,overflows:$}],!$.every(te=>te<=0)){var W,K;const te=(((W=o.flip)==null?void 0:W.index)||0)+1,ie=j[te];if(ie&&(!(p==="alignment"?N!==Ii(ie):!1)||L.every(q=>Ii(q.placement)===N?q.overflows[0]>0:!0)))return{data:{index:te,overflows:L},reset:{placement:ie}};let O=(K=L.filter(H=>H.overflows[0]<=0).sort((H,q)=>H.overflows[1]-q.overflows[1])[0])==null?void 0:K.placement;if(!O)switch(x){case"bestFit":{var J;const H=(J=L.filter(q=>{if(I){const ne=Ii(q.placement);return ne===N||ne==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(ne=>ne>0).reduce((ne,B)=>ne+B,0)]).sort((q,ne)=>q[1]-ne[1])[0])==null?void 0:J[0];H&&(O=H);break}case"initialPlacement":O=c;break}if(s!==O)return{reset:{placement:O}}}return{}}}};function KC(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function XC(e){return YV.some(t=>e[t]>=0)}const oq=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:s="referenceHidden",...o}=Ts(e,t);switch(s){case"referenceHidden":{const l=await r.detectOverflow(t,{...o,elementContext:"reference"}),c=KC(l,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:XC(c)}}}case"escaped":{const l=await r.detectOverflow(t,{...o,altBoundary:!0}),c=KC(l,n.floating);return{data:{escapedOffsets:c,escaped:XC(c)}}}default:return{}}}}},hD=new Set(["left","top"]);async function lq(e,t){const{placement:n,platform:r,elements:s}=e,o=await(r.isRTL==null?void 0:r.isRTL(s.floating)),l=Ss(n),c=du(n),f=Ii(n)==="y",d=hD.has(l)?-1:1,m=o&&f?-1:1,p=Ts(t,e);let{mainAxis:b,crossAxis:x,alignmentAxis:S}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return c&&typeof S=="number"&&(x=c==="end"?S*-1:S),f?{x:x*m,y:b*d}:{x:b*d,y:x*m}}const uq=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:o,placement:l,middlewareData:c}=t,f=await lq(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:s+f.x,y:o+f.y,data:{...f,placement:l}}}}},cq=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s,platform:o}=t,{mainAxis:l=!0,crossAxis:c=!1,limiter:f={fn:A=>{let{x:N,y:k}=A;return{x:N,y:k}}},...d}=Ts(e,t),m={x:n,y:r},p=await o.detectOverflow(t,d),b=Ii(Ss(s)),x=Dx(b);let S=m[x],w=m[b];if(l){const A=x==="y"?"top":"left",N=x==="y"?"bottom":"right",k=S+p[A],R=S-p[N];S=qb(k,S,R)}if(c){const A=b==="y"?"top":"left",N=b==="y"?"bottom":"right",k=w+p[A],R=w-p[N];w=qb(k,w,R)}const C=f.fn({...t,[x]:S,[b]:w});return{...C,data:{x:C.x-n,y:C.y-r,enabled:{[x]:l,[b]:c}}}}}},fq=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:o,middlewareData:l}=t,{offset:c=0,mainAxis:f=!0,crossAxis:d=!0}=Ts(e,t),m={x:n,y:r},p=Ii(s),b=Dx(p);let x=m[b],S=m[p];const w=Ts(c,t),C=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(f){const k=b==="y"?"height":"width",R=o.reference[b]-o.floating[k]+C.mainAxis,U=o.reference[b]+o.reference[k]-C.mainAxis;x<R?x=R:x>U&&(x=U)}if(d){var A,N;const k=b==="y"?"width":"height",R=hD.has(Ss(s)),U=o.reference[p]-o.floating[k]+(R&&((A=l.offset)==null?void 0:A[p])||0)+(R?0:C.crossAxis),I=o.reference[p]+o.reference[k]+(R?0:((N=l.offset)==null?void 0:N[p])||0)-(R?C.crossAxis:0);S<U?S=U:S>I&&(S=I)}return{[b]:x,[p]:S}}}},dq=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:o,platform:l,elements:c}=t,{apply:f=()=>{},...d}=Ts(e,t),m=await l.detectOverflow(t,d),p=Ss(s),b=du(s),x=Ii(s)==="y",{width:S,height:w}=o.floating;let C,A;p==="top"||p==="bottom"?(C=p,A=b===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(A=p,C=b==="end"?"top":"bottom");const N=w-m.top-m.bottom,k=S-m.left-m.right,R=va(w-m[C],N),U=va(S-m[A],k),I=!t.middlewareData.shift;let j=R,M=U;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(j=N),I&&!b){const L=Pr(m.left,0),W=Pr(m.right,0),K=Pr(m.top,0),J=Pr(m.bottom,0);x?M=S-2*(L!==0||W!==0?L+W:Pr(m.left,m.right)):j=w-2*(K!==0||J!==0?K+J:Pr(m.top,m.bottom))}await f({...t,availableWidth:M,availableHeight:j});const $=await l.getDimensions(c.floating);return S!==$.width||w!==$.height?{reset:{rects:!0}}:{}}}};function zm(){return typeof window<"u"}function hu(e){return mD(e)?(e.nodeName||"").toLowerCase():"#document"}function jr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function qi(e){var t;return(t=(mD(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function mD(e){return zm()?e instanceof Node||e instanceof jr(e).Node:!1}function gi(e){return zm()?e instanceof Element||e instanceof jr(e).Element:!1}function Hi(e){return zm()?e instanceof HTMLElement||e instanceof jr(e).HTMLElement:!1}function WC(e){return!zm()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof jr(e).ShadowRoot}const hq=new Set(["inline","contents"]);function Of(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=bi(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!hq.has(s)}const mq=new Set(["table","td","th"]);function pq(e){return mq.has(hu(e))}const gq=[":popover-open",":modal"];function Vm(e){return gq.some(t=>{try{return e.matches(t)}catch{return!1}})}const bq=["transform","translate","scale","rotate","perspective"],yq=["transform","translate","scale","rotate","perspective","filter"],xq=["paint","layout","strict","content"];function Ix(e){const t=Lx(),n=gi(e)?bi(e):e;return bq.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)||yq.some(r=>(n.willChange||"").includes(r))||xq.some(r=>(n.contain||"").includes(r))}function Eq(e){let t=Ta(e);for(;Hi(t)&&!tu(t);){if(Ix(t))return t;if(Vm(t))return null;t=Ta(t)}return null}function Lx(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const vq=new Set(["html","body","#document"]);function tu(e){return vq.has(hu(e))}function bi(e){return jr(e).getComputedStyle(e)}function qm(e){return gi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ta(e){if(hu(e)==="html")return e;const t=e.assignedSlot||e.parentNode||WC(e)&&e.host||qi(e);return WC(t)?t.host:t}function pD(e){const t=Ta(e);return tu(t)?e.ownerDocument?e.ownerDocument.body:e.body:Hi(t)&&Of(t)?t:pD(t)}function of(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=pD(e),o=s===((r=e.ownerDocument)==null?void 0:r.body),l=jr(s);if(o){const c=Yb(l);return t.concat(l,l.visualViewport||[],Of(s)?s:[],c&&n?of(c):[])}return t.concat(s,of(s,[],n))}function Yb(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gD(e){const t=bi(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Hi(e),o=s?e.offsetWidth:n,l=s?e.offsetHeight:r,c=am(n)!==o||am(r)!==l;return c&&(n=o,r=l),{width:n,height:r,$:c}}function Px(e){return gi(e)?e:e.contextElement}function Bl(e){const t=Px(e);if(!Hi(t))return Bi(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:o}=gD(t);let l=(o?am(n.width):n.width)/r,c=(o?am(n.height):n.height)/s;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const Tq=Bi(0);function bD(e){const t=jr(e);return!Lx()||!t.visualViewport?Tq:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Sq(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==jr(e)?!1:t}function vo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),o=Px(e);let l=Bi(1);t&&(r?gi(r)&&(l=Bl(r)):l=Bl(e));const c=Sq(o,n,r)?bD(o):Bi(0);let f=(s.left+c.x)/l.x,d=(s.top+c.y)/l.y,m=s.width/l.x,p=s.height/l.y;if(o){const b=jr(o),x=r&&gi(r)?jr(r):r;let S=b,w=Yb(S);for(;w&&r&&x!==S;){const C=Bl(w),A=w.getBoundingClientRect(),N=bi(w),k=A.left+(w.clientLeft+parseFloat(N.paddingLeft))*C.x,R=A.top+(w.clientTop+parseFloat(N.paddingTop))*C.y;f*=C.x,d*=C.y,m*=C.x,p*=C.y,f+=k,d+=R,S=jr(w),w=Yb(S)}}return lm({width:m,height:p,x:f,y:d})}function $m(e,t){const n=qm(e).scrollLeft;return t?t.left+n:vo(qi(e)).left+n}function yD(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-$m(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function wq(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const o=s==="fixed",l=qi(r),c=t?Vm(t.floating):!1;if(r===l||c&&o)return n;let f={scrollLeft:0,scrollTop:0},d=Bi(1);const m=Bi(0),p=Hi(r);if((p||!p&&!o)&&((hu(r)!=="body"||Of(l))&&(f=qm(r)),Hi(r))){const x=vo(r);d=Bl(r),m.x=x.x+r.clientLeft,m.y=x.y+r.clientTop}const b=l&&!p&&!o?yD(l,f):Bi(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-f.scrollLeft*d.x+m.x+b.x,y:n.y*d.y-f.scrollTop*d.y+m.y+b.y}}function Cq(e){return Array.from(e.getClientRects())}function Aq(e){const t=qi(e),n=qm(e),r=e.ownerDocument.body,s=Pr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Pr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+$m(e);const c=-n.scrollTop;return bi(r).direction==="rtl"&&(l+=Pr(t.clientWidth,r.clientWidth)-s),{width:s,height:o,x:l,y:c}}const ZC=25;function _q(e,t){const n=jr(e),r=qi(e),s=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,c=0,f=0;if(s){o=s.width,l=s.height;const m=Lx();(!m||m&&t==="fixed")&&(c=s.offsetLeft,f=s.offsetTop)}const d=$m(r);if(d<=0){const m=r.ownerDocument,p=m.body,b=getComputedStyle(p),x=m.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,S=Math.abs(r.clientWidth-p.clientWidth-x);S<=ZC&&(o-=S)}else d<=ZC&&(o+=d);return{width:o,height:l,x:c,y:f}}const kq=new Set(["absolute","fixed"]);function Nq(e,t){const n=vo(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,o=Hi(e)?Bl(e):Bi(1),l=e.clientWidth*o.x,c=e.clientHeight*o.y,f=s*o.x,d=r*o.y;return{width:l,height:c,x:f,y:d}}function JC(e,t,n){let r;if(t==="viewport")r=_q(e,n);else if(t==="document")r=Aq(qi(e));else if(gi(t))r=Nq(t,n);else{const s=bD(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return lm(r)}function xD(e,t){const n=Ta(e);return n===t||!gi(n)||tu(n)?!1:bi(n).position==="fixed"||xD(n,t)}function Rq(e,t){const n=t.get(e);if(n)return n;let r=of(e,[],!1).filter(c=>gi(c)&&hu(c)!=="body"),s=null;const o=bi(e).position==="fixed";let l=o?Ta(e):e;for(;gi(l)&&!tu(l);){const c=bi(l),f=Ix(l);!f&&c.position==="fixed"&&(s=null),(o?!f&&!s:!f&&c.position==="static"&&!!s&&kq.has(s.position)||Of(l)&&!f&&xD(e,l))?r=r.filter(m=>m!==l):s=c,l=Ta(l)}return t.set(e,r),r}function Dq(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const l=[...n==="clippingAncestors"?Vm(t)?[]:Rq(t,this._c):[].concat(n),r],c=l[0],f=l.reduce((d,m)=>{const p=JC(t,m,s);return d.top=Pr(p.top,d.top),d.right=va(p.right,d.right),d.bottom=va(p.bottom,d.bottom),d.left=Pr(p.left,d.left),d},JC(t,c,s));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function Oq(e){const{width:t,height:n}=gD(e);return{width:t,height:n}}function Mq(e,t,n){const r=Hi(t),s=qi(t),o=n==="fixed",l=vo(e,!0,o,t);let c={scrollLeft:0,scrollTop:0};const f=Bi(0);function d(){f.x=$m(s)}if(r||!r&&!o)if((hu(t)!=="body"||Of(s))&&(c=qm(t)),r){const x=vo(t,!0,o,t);f.x=x.x+t.clientLeft,f.y=x.y+t.clientTop}else s&&d();o&&!r&&s&&d();const m=s&&!r&&!o?yD(s,c):Bi(0),p=l.left+c.scrollLeft-f.x-m.x,b=l.top+c.scrollTop-f.y-m.y;return{x:p,y:b,width:l.width,height:l.height}}function b1(e){return bi(e).position==="static"}function eA(e,t){if(!Hi(e)||bi(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return qi(e)===n&&(n=n.ownerDocument.body),n}function ED(e,t){const n=jr(e);if(Vm(e))return n;if(!Hi(e)){let s=Ta(e);for(;s&&!tu(s);){if(gi(s)&&!b1(s))return s;s=Ta(s)}return n}let r=eA(e,t);for(;r&&pq(r)&&b1(r);)r=eA(r,t);return r&&tu(r)&&b1(r)&&!Ix(r)?n:r||Eq(e)||n}const Iq=async function(e){const t=this.getOffsetParent||ED,n=this.getDimensions,r=await n(e.floating);return{reference:Mq(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Lq(e){return bi(e).direction==="rtl"}const Pq={convertOffsetParentRelativeRectToViewportRelativeRect:wq,getDocumentElement:qi,getClippingRect:Dq,getOffsetParent:ED,getElementRects:Iq,getClientRects:Cq,getDimensions:Oq,getScale:Bl,isElement:gi,isRTL:Lq};function vD(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function jq(e,t){let n=null,r;const s=qi(e);function o(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function l(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),o();const d=e.getBoundingClientRect(),{left:m,top:p,width:b,height:x}=d;if(c||t(),!b||!x)return;const S=xh(p),w=xh(s.clientWidth-(m+b)),C=xh(s.clientHeight-(p+x)),A=xh(m),k={rootMargin:-S+"px "+-w+"px "+-C+"px "+-A+"px",threshold:Pr(0,va(1,f))||1};let R=!0;function U(I){const j=I[0].intersectionRatio;if(j!==f){if(!R)return l();j?l(!1,j):r=setTimeout(()=>{l(!1,1e-7)},1e3)}j===1&&!vD(d,e.getBoundingClientRect())&&l(),R=!1}try{n=new IntersectionObserver(U,{...k,root:s.ownerDocument})}catch{n=new IntersectionObserver(U,k)}n.observe(e)}return l(!0),o}function Bq(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=r,d=Px(e),m=s||o?[...d?of(d):[],...of(t)]:[];m.forEach(A=>{s&&A.addEventListener("scroll",n,{passive:!0}),o&&A.addEventListener("resize",n)});const p=d&&c?jq(d,n):null;let b=-1,x=null;l&&(x=new ResizeObserver(A=>{let[N]=A;N&&N.target===d&&x&&(x.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var k;(k=x)==null||k.observe(t)})),n()}),d&&!f&&x.observe(d),x.observe(t));let S,w=f?vo(e):null;f&&C();function C(){const A=vo(e);w&&!vD(w,A)&&n(),w=A,S=requestAnimationFrame(C)}return n(),()=>{var A;m.forEach(N=>{s&&N.removeEventListener("scroll",n),o&&N.removeEventListener("resize",n)}),p==null||p(),(A=x)==null||A.disconnect(),x=null,f&&cancelAnimationFrame(S)}}const Fq=uq,Uq=cq,Hq=aq,zq=dq,Vq=oq,tA=sq,qq=fq,$q=(e,t,n)=>{const r=new Map,s={platform:Pq,...n},o={...s.platform,_c:r};return iq(e,t,{...s,platform:o})};var Yq=typeof document<"u",Gq=function(){},Hh=Yq?E.useLayoutEffect:Gq;function um(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,s;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(!um(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const o=s[r];if(!(o==="_owner"&&e.$$typeof)&&!um(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function TD(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function nA(e,t){const n=TD(e);return Math.round(t*n)/n}function y1(e){const t=E.useRef(e);return Hh(()=>{t.current=e}),t}function Qq(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:o,floating:l}={},transform:c=!0,whileElementsMounted:f,open:d}=e,[m,p]=E.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[b,x]=E.useState(r);um(b,r)||x(r);const[S,w]=E.useState(null),[C,A]=E.useState(null),N=E.useCallback(q=>{q!==I.current&&(I.current=q,w(q))},[]),k=E.useCallback(q=>{q!==j.current&&(j.current=q,A(q))},[]),R=o||S,U=l||C,I=E.useRef(null),j=E.useRef(null),M=E.useRef(m),$=f!=null,L=y1(f),W=y1(s),K=y1(d),J=E.useCallback(()=>{if(!I.current||!j.current)return;const q={placement:t,strategy:n,middleware:b};W.current&&(q.platform=W.current),$q(I.current,j.current,q).then(ne=>{const B={...ne,isPositioned:K.current!==!1};te.current&&!um(M.current,B)&&(M.current=B,ko.flushSync(()=>{p(B)}))})},[b,t,n,W,K]);Hh(()=>{d===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,p(q=>({...q,isPositioned:!1})))},[d]);const te=E.useRef(!1);Hh(()=>(te.current=!0,()=>{te.current=!1}),[]),Hh(()=>{if(R&&(I.current=R),U&&(j.current=U),R&&U){if(L.current)return L.current(R,U,J);J()}},[R,U,J,L,$]);const ie=E.useMemo(()=>({reference:I,floating:j,setReference:N,setFloating:k}),[N,k]),O=E.useMemo(()=>({reference:R,floating:U}),[R,U]),H=E.useMemo(()=>{const q={position:n,left:0,top:0};if(!O.floating)return q;const ne=nA(O.floating,m.x),B=nA(O.floating,m.y);return c?{...q,transform:"translate("+ne+"px, "+B+"px)",...TD(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ne,top:B}},[n,c,O.floating,m.x,m.y]);return E.useMemo(()=>({...m,update:J,refs:ie,elements:O,floatingStyles:H}),[m,J,ie,O,H])}const Kq=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?tA({element:r.current,padding:s}).fn(n):{}:r?tA({element:r,padding:s}).fn(n):{}}}},Xq=(e,t)=>({...Fq(e),options:[e,t]}),Wq=(e,t)=>({...Uq(e),options:[e,t]}),Zq=(e,t)=>({...qq(e),options:[e,t]}),Jq=(e,t)=>({...Hq(e),options:[e,t]}),e$=(e,t)=>({...zq(e),options:[e,t]}),t$=(e,t)=>({...Vq(e),options:[e,t]}),n$=(e,t)=>({...Kq(e),options:[e,t]});var r$="Arrow",SD=E.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...o}=e;return g.jsx(it.svg,{...o,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});SD.displayName=r$;var i$=SD,jx="Popper",[wD,mu]=Vi(jx),[s$,CD]=wD(jx),AD=e=>{const{__scopePopper:t,children:n}=e,[r,s]=E.useState(null);return g.jsx(s$,{scope:t,anchor:r,onAnchorChange:s,children:n})};AD.displayName=jx;var _D="PopperAnchor",kD=E.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,o=CD(_D,n),l=E.useRef(null),c=Nt(t,l),f=E.useRef(null);return E.useEffect(()=>{const d=f.current;f.current=(r==null?void 0:r.current)||l.current,d!==f.current&&o.onAnchorChange(f.current)}),r?null:g.jsx(it.div,{...s,ref:c})});kD.displayName=_D;var Bx="PopperContent",[a$,o$]=wD(Bx),ND=E.forwardRef((e,t)=>{var fe,Se,we,Ie,Fe,$e;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:o="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:f=!0,collisionBoundary:d=[],collisionPadding:m=0,sticky:p="partial",hideWhenDetached:b=!1,updatePositionStrategy:x="optimized",onPlaced:S,...w}=e,C=CD(Bx,n),[A,N]=E.useState(null),k=Nt(t,zt=>N(zt)),[R,U]=E.useState(null),I=IR(R),j=(I==null?void 0:I.width)??0,M=(I==null?void 0:I.height)??0,$=r+(o!=="center"?"-"+o:""),L=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},W=Array.isArray(d)?d:[d],K=W.length>0,J={padding:L,boundary:W.filter(u$),altBoundary:K},{refs:te,floatingStyles:ie,placement:O,isPositioned:H,middlewareData:q}=Qq({strategy:"fixed",placement:$,whileElementsMounted:(...zt)=>Bq(...zt,{animationFrame:x==="always"}),elements:{reference:C.anchor},middleware:[Xq({mainAxis:s+M,alignmentAxis:l}),f&&Wq({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Zq():void 0,...J}),f&&Jq({...J}),e$({...J,apply:({elements:zt,rects:Ne,availableWidth:Ue,availableHeight:Ye})=>{const{width:lt,height:$t}=Ne.reference,Ct=zt.floating.style;Ct.setProperty("--radix-popper-available-width",`${Ue}px`),Ct.setProperty("--radix-popper-available-height",`${Ye}px`),Ct.setProperty("--radix-popper-anchor-width",`${lt}px`),Ct.setProperty("--radix-popper-anchor-height",`${$t}px`)}}),R&&n$({element:R,padding:c}),c$({arrowWidth:j,arrowHeight:M}),b&&t$({strategy:"referenceHidden",...J})]}),[ne,B]=OD(O),V=Ui(S);Kn(()=>{H&&(V==null||V())},[H,V]);const re=(fe=q.arrow)==null?void 0:fe.x,P=(Se=q.arrow)==null?void 0:Se.y,he=((we=q.arrow)==null?void 0:we.centerOffset)!==0,[ye,ge]=E.useState();return Kn(()=>{A&&ge(window.getComputedStyle(A).zIndex)},[A]),g.jsx("div",{ref:te.setFloating,"data-radix-popper-content-wrapper":"",style:{...ie,transform:H?ie.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ye,"--radix-popper-transform-origin":[(Ie=q.transformOrigin)==null?void 0:Ie.x,(Fe=q.transformOrigin)==null?void 0:Fe.y].join(" "),...(($e=q.hide)==null?void 0:$e.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:g.jsx(a$,{scope:n,placedSide:ne,onArrowChange:U,arrowX:re,arrowY:P,shouldHideArrow:he,children:g.jsx(it.div,{"data-side":ne,"data-align":B,...w,ref:k,style:{...w.style,animation:H?void 0:"none"}})})})});ND.displayName=Bx;var RD="PopperArrow",l$={top:"bottom",right:"left",bottom:"top",left:"right"},DD=E.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,o=o$(RD,r),l=l$[o.placedSide];return g.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:g.jsx(i$,{...s,ref:n,style:{...s.style,display:"block"}})})});DD.displayName=RD;function u$(e){return e!==null}var c$=e=>({name:"transformOrigin",options:e,fn(t){var C,A,N;const{placement:n,rects:r,middlewareData:s}=t,l=((C=s.arrow)==null?void 0:C.centerOffset)!==0,c=l?0:e.arrowWidth,f=l?0:e.arrowHeight,[d,m]=OD(n),p={start:"0%",center:"50%",end:"100%"}[m],b=(((A=s.arrow)==null?void 0:A.x)??0)+c/2,x=(((N=s.arrow)==null?void 0:N.y)??0)+f/2;let S="",w="";return d==="bottom"?(S=l?p:`${b}px`,w=`${-f}px`):d==="top"?(S=l?p:`${b}px`,w=`${r.floating.height+f}px`):d==="right"?(S=`${-f}px`,w=l?p:`${x}px`):d==="left"&&(S=`${r.floating.width+f}px`,w=l?p:`${x}px`),{data:{x:S,y:w}}}});function OD(e){const[t,n="center"]=e.split("-");return[t,n]}var Fx=AD,Ux=kD,Hx=ND,zx=DD,MD=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),f$="VisuallyHidden",d$=E.forwardRef((e,t)=>g.jsx(it.span,{...e,ref:t,style:{...MD,...e.style}}));d$.displayName=f$;var h$=[" ","Enter","ArrowUp","ArrowDown"],m$=[" ","Enter"],To="Select",[Ym,Gm,p$]=kx(To),[pu]=Vi(To,[p$,mu]),Qm=mu(),[g$,Aa]=pu(To),[b$,y$]=pu(To),ID=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:s,onOpenChange:o,value:l,defaultValue:c,onValueChange:f,dir:d,name:m,autoComplete:p,disabled:b,required:x,form:S}=e,w=Qm(t),[C,A]=E.useState(null),[N,k]=E.useState(null),[R,U]=E.useState(!1),I=Fm(d),[j,M]=Ea({prop:r,defaultProp:s??!1,onChange:o,caller:To}),[$,L]=Ea({prop:l,defaultProp:c,onChange:f,caller:To}),W=E.useRef(null),K=C?S||!!C.closest("form"):!0,[J,te]=E.useState(new Set),ie=Array.from(J).map(O=>O.props.value).join(";");return g.jsx(Fx,{...w,children:g.jsxs(g$,{required:x,scope:t,trigger:C,onTriggerChange:A,valueNode:N,onValueNodeChange:k,valueNodeHasChildren:R,onValueNodeHasChildrenChange:U,contentId:ji(),value:$,onValueChange:L,open:j,onOpenChange:M,dir:I,triggerPointerDownPosRef:W,disabled:b,children:[g.jsx(Ym.Provider,{scope:t,children:g.jsx(b$,{scope:e.__scopeSelect,onNativeOptionAdd:E.useCallback(O=>{te(H=>new Set(H).add(O))},[]),onNativeOptionRemove:E.useCallback(O=>{te(H=>{const q=new Set(H);return q.delete(O),q})},[]),children:n})}),K?g.jsxs(eO,{"aria-hidden":!0,required:x,tabIndex:-1,name:m,autoComplete:p,value:$,onChange:O=>L(O.target.value),disabled:b,form:S,children:[$===void 0?g.jsx("option",{value:""}):null,Array.from(J)]},ie):null]})})};ID.displayName=To;var LD="SelectTrigger",PD=E.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...s}=e,o=Qm(n),l=Aa(LD,n),c=l.disabled||r,f=Nt(t,l.onTriggerChange),d=Gm(n),m=E.useRef("touch"),[p,b,x]=nO(w=>{const C=d().filter(k=>!k.disabled),A=C.find(k=>k.value===l.value),N=rO(C,w,A);N!==void 0&&l.onValueChange(N.value)}),S=w=>{c||(l.onOpenChange(!0),x()),w&&(l.triggerPointerDownPosRef.current={x:Math.round(w.pageX),y:Math.round(w.pageY)})};return g.jsx(Ux,{asChild:!0,...o,children:g.jsx(it.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":tO(l.value)?"":void 0,...s,ref:f,onClick:_e(s.onClick,w=>{w.currentTarget.focus(),m.current!=="mouse"&&S(w)}),onPointerDown:_e(s.onPointerDown,w=>{m.current=w.pointerType;const C=w.target;C.hasPointerCapture(w.pointerId)&&C.releasePointerCapture(w.pointerId),w.button===0&&w.ctrlKey===!1&&w.pointerType==="mouse"&&(S(w),w.preventDefault())}),onKeyDown:_e(s.onKeyDown,w=>{const C=p.current!=="";!(w.ctrlKey||w.altKey||w.metaKey)&&w.key.length===1&&b(w.key),!(C&&w.key===" ")&&h$.includes(w.key)&&(S(),w.preventDefault())})})})});PD.displayName=LD;var jD="SelectValue",BD=E.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,children:o,placeholder:l="",...c}=e,f=Aa(jD,n),{onValueNodeHasChildrenChange:d}=f,m=o!==void 0,p=Nt(t,f.onValueNodeChange);return Kn(()=>{d(m)},[d,m]),g.jsx(it.span,{...c,ref:p,style:{pointerEvents:"none"},children:tO(f.value)?g.jsx(g.Fragment,{children:l}):o})});BD.displayName=jD;var x$="SelectIcon",FD=E.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...s}=e;return g.jsx(it.span,{"aria-hidden":!0,...s,ref:t,children:r||"▼"})});FD.displayName=x$;var E$="SelectPortal",UD=e=>g.jsx(Nf,{asChild:!0,...e});UD.displayName=E$;var So="SelectContent",HD=E.forwardRef((e,t)=>{const n=Aa(So,e.__scopeSelect),[r,s]=E.useState();if(Kn(()=>{s(new DocumentFragment)},[]),!n.open){const o=r;return o?ko.createPortal(g.jsx(zD,{scope:e.__scopeSelect,children:g.jsx(Ym.Slot,{scope:e.__scopeSelect,children:g.jsx("div",{children:e.children})})}),o):null}return g.jsx(VD,{...e,ref:t})});HD.displayName=So;var fi=10,[zD,_a]=pu(So),v$="SelectContentImpl",T$=eu("SelectContent.RemoveScroll"),VD=E.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:l,side:c,sideOffset:f,align:d,alignOffset:m,arrowPadding:p,collisionBoundary:b,collisionPadding:x,sticky:S,hideWhenDetached:w,avoidCollisions:C,...A}=e,N=Aa(So,n),[k,R]=E.useState(null),[U,I]=E.useState(null),j=Nt(t,fe=>R(fe)),[M,$]=E.useState(null),[L,W]=E.useState(null),K=Gm(n),[J,te]=E.useState(!1),ie=E.useRef(!1);E.useEffect(()=>{if(k)return px(k)},[k]),mx();const O=E.useCallback(fe=>{const[Se,...we]=K().map($e=>$e.ref.current),[Ie]=we.slice(-1),Fe=document.activeElement;for(const $e of fe)if($e===Fe||($e==null||$e.scrollIntoView({block:"nearest"}),$e===Se&&U&&(U.scrollTop=0),$e===Ie&&U&&(U.scrollTop=U.scrollHeight),$e==null||$e.focus(),document.activeElement!==Fe))return},[K,U]),H=E.useCallback(()=>O([M,k]),[O,M,k]);E.useEffect(()=>{J&&H()},[J,H]);const{onOpenChange:q,triggerPointerDownPosRef:ne}=N;E.useEffect(()=>{if(k){let fe={x:0,y:0};const Se=Ie=>{var Fe,$e;fe={x:Math.abs(Math.round(Ie.pageX)-(((Fe=ne.current)==null?void 0:Fe.x)??0)),y:Math.abs(Math.round(Ie.pageY)-((($e=ne.current)==null?void 0:$e.y)??0))}},we=Ie=>{fe.x<=10&&fe.y<=10?Ie.preventDefault():k.contains(Ie.target)||q(!1),document.removeEventListener("pointermove",Se),ne.current=null};return ne.current!==null&&(document.addEventListener("pointermove",Se),document.addEventListener("pointerup",we,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Se),document.removeEventListener("pointerup",we,{capture:!0})}}},[k,q,ne]),E.useEffect(()=>{const fe=()=>q(!1);return window.addEventListener("blur",fe),window.addEventListener("resize",fe),()=>{window.removeEventListener("blur",fe),window.removeEventListener("resize",fe)}},[q]);const[B,V]=nO(fe=>{const Se=K().filter(Fe=>!Fe.disabled),we=Se.find(Fe=>Fe.ref.current===document.activeElement),Ie=rO(Se,fe,we);Ie&&setTimeout(()=>Ie.ref.current.focus())}),re=E.useCallback((fe,Se,we)=>{const Ie=!ie.current&&!we;(N.value!==void 0&&N.value===Se||Ie)&&($(fe),Ie&&(ie.current=!0))},[N.value]),P=E.useCallback(()=>k==null?void 0:k.focus(),[k]),he=E.useCallback((fe,Se,we)=>{const Ie=!ie.current&&!we;(N.value!==void 0&&N.value===Se||Ie)&&W(fe)},[N.value]),ye=r==="popper"?Gb:qD,ge=ye===Gb?{side:c,sideOffset:f,align:d,alignOffset:m,arrowPadding:p,collisionBoundary:b,collisionPadding:x,sticky:S,hideWhenDetached:w,avoidCollisions:C}:{};return g.jsx(zD,{scope:n,content:k,viewport:U,onViewportChange:I,itemRefCallback:re,selectedItem:M,onItemLeave:P,itemTextRefCallback:he,focusSelectedItem:H,selectedItemText:L,position:r,isPositioned:J,searchRef:B,children:g.jsx(Lm,{as:T$,allowPinchZoom:!0,children:g.jsx(Mm,{asChild:!0,trapped:N.open,onMountAutoFocus:fe=>{fe.preventDefault()},onUnmountAutoFocus:_e(s,fe=>{var Se;(Se=N.trigger)==null||Se.focus({preventScroll:!0}),fe.preventDefault()}),children:g.jsx(kf,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:fe=>fe.preventDefault(),onDismiss:()=>N.onOpenChange(!1),children:g.jsx(ye,{role:"listbox",id:N.contentId,"data-state":N.open?"open":"closed",dir:N.dir,onContextMenu:fe=>fe.preventDefault(),...A,...ge,onPlaced:()=>te(!0),ref:j,style:{display:"flex",flexDirection:"column",outline:"none",...A.style},onKeyDown:_e(A.onKeyDown,fe=>{const Se=fe.ctrlKey||fe.altKey||fe.metaKey;if(fe.key==="Tab"&&fe.preventDefault(),!Se&&fe.key.length===1&&V(fe.key),["ArrowUp","ArrowDown","Home","End"].includes(fe.key)){let Ie=K().filter(Fe=>!Fe.disabled).map(Fe=>Fe.ref.current);if(["ArrowUp","End"].includes(fe.key)&&(Ie=Ie.slice().reverse()),["ArrowUp","ArrowDown"].includes(fe.key)){const Fe=fe.target,$e=Ie.indexOf(Fe);Ie=Ie.slice($e+1)}setTimeout(()=>O(Ie)),fe.preventDefault()}})})})})})})});VD.displayName=v$;var S$="SelectItemAlignedPosition",qD=E.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...s}=e,o=Aa(So,n),l=_a(So,n),[c,f]=E.useState(null),[d,m]=E.useState(null),p=Nt(t,j=>m(j)),b=Gm(n),x=E.useRef(!1),S=E.useRef(!0),{viewport:w,selectedItem:C,selectedItemText:A,focusSelectedItem:N}=l,k=E.useCallback(()=>{if(o.trigger&&o.valueNode&&c&&d&&w&&C&&A){const j=o.trigger.getBoundingClientRect(),M=d.getBoundingClientRect(),$=o.valueNode.getBoundingClientRect(),L=A.getBoundingClientRect();if(o.dir!=="rtl"){const Fe=L.left-M.left,$e=$.left-Fe,zt=j.left-$e,Ne=j.width+zt,Ue=Math.max(Ne,M.width),Ye=window.innerWidth-fi,lt=$C($e,[fi,Math.max(fi,Ye-Ue)]);c.style.minWidth=Ne+"px",c.style.left=lt+"px"}else{const Fe=M.right-L.right,$e=window.innerWidth-$.right-Fe,zt=window.innerWidth-j.right-$e,Ne=j.width+zt,Ue=Math.max(Ne,M.width),Ye=window.innerWidth-fi,lt=$C($e,[fi,Math.max(fi,Ye-Ue)]);c.style.minWidth=Ne+"px",c.style.right=lt+"px"}const W=b(),K=window.innerHeight-fi*2,J=w.scrollHeight,te=window.getComputedStyle(d),ie=parseInt(te.borderTopWidth,10),O=parseInt(te.paddingTop,10),H=parseInt(te.borderBottomWidth,10),q=parseInt(te.paddingBottom,10),ne=ie+O+J+q+H,B=Math.min(C.offsetHeight*5,ne),V=window.getComputedStyle(w),re=parseInt(V.paddingTop,10),P=parseInt(V.paddingBottom,10),he=j.top+j.height/2-fi,ye=K-he,ge=C.offsetHeight/2,fe=C.offsetTop+ge,Se=ie+O+fe,we=ne-Se;if(Se<=he){const Fe=W.length>0&&C===W[W.length-1].ref.current;c.style.bottom="0px";const $e=d.clientHeight-w.offsetTop-w.offsetHeight,zt=Math.max(ye,ge+(Fe?P:0)+$e+H),Ne=Se+zt;c.style.height=Ne+"px"}else{const Fe=W.length>0&&C===W[0].ref.current;c.style.top="0px";const zt=Math.max(he,ie+w.offsetTop+(Fe?re:0)+ge)+we;c.style.height=zt+"px",w.scrollTop=Se-he+w.offsetTop}c.style.margin=`${fi}px 0`,c.style.minHeight=B+"px",c.style.maxHeight=K+"px",r==null||r(),requestAnimationFrame(()=>x.current=!0)}},[b,o.trigger,o.valueNode,c,d,w,C,A,o.dir,r]);Kn(()=>k(),[k]);const[R,U]=E.useState();Kn(()=>{d&&U(window.getComputedStyle(d).zIndex)},[d]);const I=E.useCallback(j=>{j&&S.current===!0&&(k(),N==null||N(),S.current=!1)},[k,N]);return g.jsx(C$,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:x,onScrollButtonChange:I,children:g.jsx("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:g.jsx(it.div,{...s,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});qD.displayName=S$;var w$="SelectPopperPosition",Gb=E.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=fi,...o}=e,l=Qm(n);return g.jsx(Hx,{...l,...o,ref:t,align:r,collisionPadding:s,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Gb.displayName=w$;var[C$,Vx]=pu(So,{}),Qb="SelectViewport",$D=E.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...s}=e,o=_a(Qb,n),l=Vx(Qb,n),c=Nt(t,o.onViewportChange),f=E.useRef(0);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),g.jsx(Ym.Slot,{scope:n,children:g.jsx(it.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:_e(s.onScroll,d=>{const m=d.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:b}=l;if(b!=null&&b.current&&p){const x=Math.abs(f.current-m.scrollTop);if(x>0){const S=window.innerHeight-fi*2,w=parseFloat(p.style.minHeight),C=parseFloat(p.style.height),A=Math.max(w,C);if(A<S){const N=A+x,k=Math.min(S,N),R=N-k;p.style.height=k+"px",p.style.bottom==="0px"&&(m.scrollTop=R>0?R:0,p.style.justifyContent="flex-end")}}}f.current=m.scrollTop})})})]})});$D.displayName=Qb;var YD="SelectGroup",[A$,_$]=pu(YD),k$=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=ji();return g.jsx(A$,{scope:n,id:s,children:g.jsx(it.div,{role:"group","aria-labelledby":s,...r,ref:t})})});k$.displayName=YD;var GD="SelectLabel",N$=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=_$(GD,n);return g.jsx(it.div,{id:s.id,...r,ref:t})});N$.displayName=GD;var cm="SelectItem",[R$,QD]=pu(cm),KD=E.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:o,...l}=e,c=Aa(cm,n),f=_a(cm,n),d=c.value===r,[m,p]=E.useState(o??""),[b,x]=E.useState(!1),S=Nt(t,N=>{var k;return(k=f.itemRefCallback)==null?void 0:k.call(f,N,r,s)}),w=ji(),C=E.useRef("touch"),A=()=>{s||(c.onValueChange(r),c.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return g.jsx(R$,{scope:n,value:r,disabled:s,textId:w,isSelected:d,onItemTextChange:E.useCallback(N=>{p(k=>k||((N==null?void 0:N.textContent)??"").trim())},[]),children:g.jsx(Ym.ItemSlot,{scope:n,value:r,disabled:s,textValue:m,children:g.jsx(it.div,{role:"option","aria-labelledby":w,"data-highlighted":b?"":void 0,"aria-selected":d&&b,"data-state":d?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...l,ref:S,onFocus:_e(l.onFocus,()=>x(!0)),onBlur:_e(l.onBlur,()=>x(!1)),onClick:_e(l.onClick,()=>{C.current!=="mouse"&&A()}),onPointerUp:_e(l.onPointerUp,()=>{C.current==="mouse"&&A()}),onPointerDown:_e(l.onPointerDown,N=>{C.current=N.pointerType}),onPointerMove:_e(l.onPointerMove,N=>{var k;C.current=N.pointerType,s?(k=f.onItemLeave)==null||k.call(f):C.current==="mouse"&&N.currentTarget.focus({preventScroll:!0})}),onPointerLeave:_e(l.onPointerLeave,N=>{var k;N.currentTarget===document.activeElement&&((k=f.onItemLeave)==null||k.call(f))}),onKeyDown:_e(l.onKeyDown,N=>{var R;((R=f.searchRef)==null?void 0:R.current)!==""&&N.key===" "||(m$.includes(N.key)&&A(),N.key===" "&&N.preventDefault())})})})})});KD.displayName=cm;var kc="SelectItemText",XD=E.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,...o}=e,l=Aa(kc,n),c=_a(kc,n),f=QD(kc,n),d=y$(kc,n),[m,p]=E.useState(null),b=Nt(t,A=>p(A),f.onItemTextChange,A=>{var N;return(N=c.itemTextRefCallback)==null?void 0:N.call(c,A,f.value,f.disabled)}),x=m==null?void 0:m.textContent,S=E.useMemo(()=>g.jsx("option",{value:f.value,disabled:f.disabled,children:x},f.value),[f.disabled,f.value,x]),{onNativeOptionAdd:w,onNativeOptionRemove:C}=d;return Kn(()=>(w(S),()=>C(S)),[w,C,S]),g.jsxs(g.Fragment,{children:[g.jsx(it.span,{id:f.textId,...o,ref:b}),f.isSelected&&l.valueNode&&!l.valueNodeHasChildren?ko.createPortal(o.children,l.valueNode):null]})});XD.displayName=kc;var WD="SelectItemIndicator",ZD=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return QD(WD,n).isSelected?g.jsx(it.span,{"aria-hidden":!0,...r,ref:t}):null});ZD.displayName=WD;var Kb="SelectScrollUpButton",D$=E.forwardRef((e,t)=>{const n=_a(Kb,e.__scopeSelect),r=Vx(Kb,e.__scopeSelect),[s,o]=E.useState(!1),l=Nt(t,r.onScrollButtonChange);return Kn(()=>{if(n.viewport&&n.isPositioned){let c=function(){const d=f.scrollTop>0;o(d)};const f=n.viewport;return c(),f.addEventListener("scroll",c),()=>f.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),s?g.jsx(JD,{...e,ref:l,onAutoScroll:()=>{const{viewport:c,selectedItem:f}=n;c&&f&&(c.scrollTop=c.scrollTop-f.offsetHeight)}}):null});D$.displayName=Kb;var Xb="SelectScrollDownButton",O$=E.forwardRef((e,t)=>{const n=_a(Xb,e.__scopeSelect),r=Vx(Xb,e.__scopeSelect),[s,o]=E.useState(!1),l=Nt(t,r.onScrollButtonChange);return Kn(()=>{if(n.viewport&&n.isPositioned){let c=function(){const d=f.scrollHeight-f.clientHeight,m=Math.ceil(f.scrollTop)<d;o(m)};const f=n.viewport;return c(),f.addEventListener("scroll",c),()=>f.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),s?g.jsx(JD,{...e,ref:l,onAutoScroll:()=>{const{viewport:c,selectedItem:f}=n;c&&f&&(c.scrollTop=c.scrollTop+f.offsetHeight)}}):null});O$.displayName=Xb;var JD=E.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=e,o=_a("SelectScrollButton",n),l=E.useRef(null),c=Gm(n),f=E.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return E.useEffect(()=>()=>f(),[f]),Kn(()=>{var m;const d=c().find(p=>p.ref.current===document.activeElement);(m=d==null?void 0:d.ref.current)==null||m.scrollIntoView({block:"nearest"})},[c]),g.jsx(it.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:_e(s.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:_e(s.onPointerMove,()=>{var d;(d=o.onItemLeave)==null||d.call(o),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:_e(s.onPointerLeave,()=>{f()})})}),M$="SelectSeparator",I$=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return g.jsx(it.div,{"aria-hidden":!0,...r,ref:t})});I$.displayName=M$;var Wb="SelectArrow",L$=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=Qm(n),o=Aa(Wb,n),l=_a(Wb,n);return o.open&&l.position==="popper"?g.jsx(zx,{...s,...r,ref:t}):null});L$.displayName=Wb;var P$="SelectBubbleInput",eO=E.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const s=E.useRef(null),o=Nt(r,s),l=MR(t);return E.useEffect(()=>{const c=s.current;if(!c)return;const f=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(f,"value").set;if(l!==t&&m){const p=new Event("change",{bubbles:!0});m.call(c,t),c.dispatchEvent(p)}},[l,t]),g.jsx(it.select,{...n,style:{...MD,...n.style},ref:o,defaultValue:t})});eO.displayName=P$;function tO(e){return e===""||e===void 0}function nO(e){const t=Ui(e),n=E.useRef(""),r=E.useRef(0),s=E.useCallback(l=>{const c=n.current+l;t(c),(function f(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>f(""),1e3))})(c)},[t]),o=E.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return E.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,o]}function rO(e,t,n){const s=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=j$(e,Math.max(o,0));s.length===1&&(l=l.filter(d=>d!==n));const f=l.find(d=>d.textValue.toLowerCase().startsWith(s.toLowerCase()));return f!==n?f:void 0}function j$(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var B$=ID,iO=PD,F$=BD,U$=FD,H$=UD,sO=HD,z$=$D,aO=KD,V$=XD,q$=ZD;const x1=B$,E1=F$,zh=E.forwardRef(({className:e,children:t,...n},r)=>g.jsxs(iO,{ref:r,className:Xe("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,g.jsx(U$,{asChild:!0,children:g.jsx(Dm,{className:"h-4 w-4 opacity-50"})})]}));zh.displayName=iO.displayName;const Vh=E.forwardRef(({className:e,children:t,position:n="popper",...r},s)=>g.jsx(H$,{children:g.jsx(sO,{ref:s,className:Xe("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:g.jsx(z$,{className:Xe("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));Vh.displayName=sO.displayName;const na=E.forwardRef(({className:e,children:t,...n},r)=>g.jsxs(aO,{ref:r,className:Xe("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[g.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:g.jsx(q$,{children:g.jsx(Mi,{className:"h-4 w-4"})})}),g.jsx(V$,{children:t})]}));na.displayName=aO.displayName;function $$({open:e,onOpenChange:t}){const{theme:n,setTheme:r}=OR(),[s,o]=E.useState("appearance"),{showTimestamps:l,setShowTimestamps:c,expandToolCalls:f,setExpandToolCalls:d,autoHideToolCalls:m,setAutoHideToolCalls:p,devtoolsOpen:b,toggleDevtools:x,verboseLogging:S,setVerboseLogging:w,fontSize:C,setFontSize:A,fontFamily:N,setFontFamily:k,resetPreferences:R,showStatusBarCwd:U,setShowStatusBarCwd:I,showStatusBarPermission:j,setShowStatusBarPermission:M,showStatusBarModel:$,setShowStatusBarModel:L,showStatusBarCost:W,setShowStatusBarCost:K,showStatusBarContext:J,setShowStatusBarContext:te,showStatusBarGit:ie,setShowStatusBarGit:O,showShortcutChips:H,setShowShortcutChips:q,showTaskCelebrations:ne,setShowTaskCelebrations:B,enableNotificationSound:V,setEnableNotificationSound:re,showStatusBarSound:P,setShowStatusBarSound:he}=Jt(),ye=si(),{data:ge,isLoading:fe}=zi({queryKey:["config"],queryFn:()=>ye.getConfig(),staleTime:3e4,enabled:e});return g.jsx(_R,{open:e,onOpenChange:t,children:g.jsxs(kR,{className:"max-w-lg p-0 gap-0",children:[g.jsx(NR,{className:"px-4 py-3 border-b space-y-0",children:g.jsx(RR,{className:"text-sm font-medium",children:"Settings"})}),g.jsxs(fD,{value:s,onValueChange:o,className:"flex flex-col flex-1 overflow-hidden",children:[g.jsxs(Rx,{className:"grid w-full grid-cols-4 mx-4 mt-3",style:{width:"calc(100% - 2rem)"},children:[g.jsx(Ml,{value:"appearance",children:"Appearance"}),g.jsx(Ml,{value:"preferences",children:"Preferences"}),g.jsx(Ml,{value:"statusBar",children:"Status Bar"}),g.jsx(Ml,{value:"server",children:"Server"})]}),g.jsxs("div",{className:"overflow-y-auto flex-1 p-4 min-h-[280px]",children:[g.jsx(Il,{value:"appearance",className:"mt-0 space-y-6",children:g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Appearance"}),g.jsx("button",{onClick:()=>{R(),r("system")},className:"text-xs text-muted-foreground hover:text-foreground transition-colors duration-150",children:"Reset to defaults"})]}),g.jsx(Mn,{label:"Theme",description:"Choose your preferred color scheme",children:g.jsxs(x1,{value:n,onValueChange:r,children:[g.jsx(zh,{className:"w-32",children:g.jsx(E1,{})}),g.jsxs(Vh,{children:[g.jsx(na,{value:"light",children:"Light"}),g.jsx(na,{value:"dark",children:"Dark"}),g.jsx(na,{value:"system",children:"System"})]})]})}),g.jsx(Mn,{label:"Font family",description:"Choose the typeface for the interface",children:g.jsxs(x1,{value:N,onValueChange:Se=>k(Se),children:[g.jsx(zh,{className:"w-40",children:g.jsx(E1,{})}),g.jsx(Vh,{children:Kh.map(Se=>g.jsx(na,{value:Se.key,children:g.jsxs("div",{className:"flex flex-col",children:[g.jsx("span",{children:Se.displayName}),g.jsx("span",{className:"text-xs text-muted-foreground",children:Se.description})]})},Se.key))})]})}),g.jsx(Mn,{label:"Font size",description:"Adjust the text size across the interface",children:g.jsxs(x1,{value:C,onValueChange:Se=>A(Se),children:[g.jsx(zh,{className:"w-32",children:g.jsx(E1,{})}),g.jsxs(Vh,{children:[g.jsx(na,{value:"small",children:"Small"}),g.jsx(na,{value:"medium",children:"Medium"}),g.jsx(na,{value:"large",children:"Large"})]})]})})]})}),g.jsx(Il,{value:"preferences",className:"mt-0 space-y-6",children:g.jsxs("div",{className:"space-y-4",children:[g.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Preferences"}),g.jsx(Mn,{label:"Show timestamps",description:"Display message timestamps in chat",children:g.jsx($n,{checked:l,onCheckedChange:c})}),g.jsx(Mn,{label:"Expand tool calls",description:"Auto-expand tool call details in messages",children:g.jsx($n,{checked:f,onCheckedChange:d})}),g.jsx(Mn,{label:"Auto-hide tool calls",description:"Fade out completed tool calls after a few seconds",children:g.jsx($n,{checked:m,onCheckedChange:p})}),g.jsx(Mn,{label:"Show shortcut chips",description:"Display shortcut hints below the message input",children:g.jsx($n,{checked:H,onCheckedChange:q})}),g.jsx(Mn,{label:"Task celebrations",description:"Show animations when tasks complete",children:g.jsx($n,{checked:ne,onCheckedChange:B})}),g.jsx(Mn,{label:"Notification sound",description:"Play a sound when AI finishes responding (3s+ responses)",children:g.jsx($n,{checked:V,onCheckedChange:re})}),g.jsx(Mn,{label:"Show dev tools",description:"Enable developer tools panel",children:g.jsx($n,{checked:b,onCheckedChange:()=>x()})}),g.jsx(Mn,{label:"Verbose logging",description:"Show detailed logs in the console",children:g.jsx($n,{checked:S,onCheckedChange:w})})]})}),g.jsxs(Il,{value:"statusBar",className:"mt-0 space-y-4",children:[g.jsx(Mn,{label:"Show directory",description:"Display current working directory",children:g.jsx($n,{checked:U,onCheckedChange:I})}),g.jsx(Mn,{label:"Show git status",description:"Display branch name and change count",children:g.jsx($n,{checked:ie,onCheckedChange:O})}),g.jsx(Mn,{label:"Show permission mode",description:"Display current permission setting",children:g.jsx($n,{checked:j,onCheckedChange:M})}),g.jsx(Mn,{label:"Show model",description:"Display selected AI model",children:g.jsx($n,{checked:$,onCheckedChange:L})}),g.jsx(Mn,{label:"Show cost",description:"Display session cost in USD",children:g.jsx($n,{checked:W,onCheckedChange:K})}),g.jsx(Mn,{label:"Show context usage",description:"Display context window utilization",children:g.jsx($n,{checked:J,onCheckedChange:te})}),g.jsx(Mn,{label:"Show sound toggle",description:"Display notification sound toggle",children:g.jsx($n,{checked:P,onCheckedChange:he})})]}),g.jsxs(Il,{value:"server",className:"mt-0 space-y-3",children:[g.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Server"}),fe?g.jsx("div",{className:"space-y-2",children:Array.from({length:5}).map((Se,we)=>g.jsxs("div",{className:"flex items-center justify-between py-1",children:[g.jsx("div",{className:"h-4 w-24 rounded bg-muted animate-pulse"}),g.jsx("div",{className:"h-4 w-16 rounded bg-muted animate-pulse"})]},we))}):ge?g.jsxs("div",{className:"space-y-1",children:[g.jsx(Xs,{label:"Version",value:ge.version}),g.jsx(Xs,{label:"Port",value:String(ge.port)}),g.jsx(Xs,{label:"Uptime",value:Y$(ge.uptime)}),g.jsx(Xs,{label:"Working Directory",value:ge.workingDirectory,mono:!0,truncate:!0}),g.jsx(Xs,{label:"Node.js",value:ge.nodeVersion}),g.jsx(Xs,{label:"Claude CLI",value:ge.claudeCliPath||"Not found",mono:!0,truncate:!0,muted:!ge.claudeCliPath}),g.jsx(v1,{label:"Tunnel",value:ge.tunnel.enabled?"Enabled":"Disabled",variant:ge.tunnel.enabled?"default":"secondary"}),ge.tunnel.enabled&&g.jsxs(g.Fragment,{children:[g.jsx(v1,{label:"Tunnel Status",value:ge.tunnel.connected?"Connected":"Disconnected",variant:ge.tunnel.connected?"default":"secondary"}),ge.tunnel.url&&g.jsx(Xs,{label:"Tunnel URL",value:ge.tunnel.url,mono:!0}),g.jsx(Xs,{label:"Tunnel Auth",value:ge.tunnel.authEnabled?"Enabled":"Disabled"}),g.jsx(v1,{label:"ngrok Token",value:ge.tunnel.tokenConfigured?"Configured":"Not configured",variant:ge.tunnel.tokenConfigured?"default":"secondary"})]})]}):null]})]})]})]})})}function Mn({label:e,description:t,children:n}){return g.jsxs("div",{className:"flex items-center justify-between gap-4",children:[g.jsxs("div",{className:"min-w-0",children:[g.jsx(qR,{className:"text-sm font-medium",children:e}),g.jsx("p",{className:"text-xs text-muted-foreground",children:t})]}),n]})}function oO(){const[e,t]=E.useState(!1),n=E.useCallback(r=>{navigator.clipboard.writeText(r).then(()=>{t(!0),setTimeout(()=>t(!1),1500)})},[]);return{copied:e,copy:n}}function Xs({label:e,value:t,mono:n,truncate:r,muted:s}){const{copied:o,copy:l}=oO();return g.jsxs("button",{type:"button",onClick:()=>l(t),className:"flex w-full items-center justify-between py-1 gap-4 rounded -mx-1 px-1 hover:bg-muted/50 active:bg-muted/70 transition-colors duration-100",children:[g.jsx("span",{className:"text-sm text-muted-foreground shrink-0",children:e}),o?g.jsx("span",{className:"text-xs text-muted-foreground",children:"Copied"}):g.jsx("span",{className:Xe("text-sm text-right",n&&"font-mono",r&&"min-w-0 max-w-48 truncate",s&&"text-muted-foreground"),dir:r?"rtl":void 0,title:t,children:t})]})}function v1({label:e,value:t,variant:n}){const{copied:r,copy:s}=oO();return g.jsxs("button",{type:"button",onClick:()=>s(t),className:"flex w-full items-center justify-between py-1 rounded -mx-1 px-1 hover:bg-muted/50 active:bg-muted/70 transition-colors duration-100",children:[g.jsx("span",{className:"text-sm text-muted-foreground",children:e}),r?g.jsx("span",{className:"text-xs text-muted-foreground",children:"Copied"}):g.jsx(DV,{variant:n,children:t})]})}function Y$(e){const t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.floor(e%60),s=[];return t>0&&s.push(`${t}h`),n>0&&s.push(`${n}m`),s.push(`${r}s`),s.join(" ")}var Zb=["Enter"," "],G$=["ArrowDown","PageUp","Home"],lO=["ArrowUp","PageDown","End"],Q$=[...G$,...lO],K$={ltr:[...Zb,"ArrowRight"],rtl:[...Zb,"ArrowLeft"]},X$={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Mf="Menu",[lf,W$,Z$]=kx(Mf),[Ro,uO]=Vi(Mf,[Z$,mu,Um]),Km=mu(),cO=Um(),[J$,Do]=Ro(Mf),[eY,If]=Ro(Mf),fO=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:s,onOpenChange:o,modal:l=!0}=e,c=Km(t),[f,d]=E.useState(null),m=E.useRef(!1),p=Ui(o),b=Fm(s);return E.useEffect(()=>{const x=()=>{m.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>m.current=!1;return document.addEventListener("keydown",x,{capture:!0}),()=>{document.removeEventListener("keydown",x,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),g.jsx(Fx,{...c,children:g.jsx(J$,{scope:t,open:n,onOpenChange:p,content:f,onContentChange:d,children:g.jsx(eY,{scope:t,onClose:E.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:m,dir:b,modal:l,children:r})})})};fO.displayName=Mf;var tY="MenuAnchor",qx=E.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=Km(n);return g.jsx(Ux,{...s,...r,ref:t})});qx.displayName=tY;var $x="MenuPortal",[nY,dO]=Ro($x,{forceMount:void 0}),hO=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:s}=e,o=Do($x,t);return g.jsx(nY,{scope:t,forceMount:n,children:g.jsx(yi,{present:n||o.open,children:g.jsx(Nf,{asChild:!0,container:s,children:r})})})};hO.displayName=$x;var ri="MenuContent",[rY,Yx]=Ro(ri),mO=E.forwardRef((e,t)=>{const n=dO(ri,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,o=Do(ri,e.__scopeMenu),l=If(ri,e.__scopeMenu);return g.jsx(lf.Provider,{scope:e.__scopeMenu,children:g.jsx(yi,{present:r||o.open,children:g.jsx(lf.Slot,{scope:e.__scopeMenu,children:l.modal?g.jsx(iY,{...s,ref:t}):g.jsx(sY,{...s,ref:t})})})})}),iY=E.forwardRef((e,t)=>{const n=Do(ri,e.__scopeMenu),r=E.useRef(null),s=Nt(t,r);return E.useEffect(()=>{const o=r.current;if(o)return px(o)},[]),g.jsx(Gx,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:_e(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),sY=E.forwardRef((e,t)=>{const n=Do(ri,e.__scopeMenu);return g.jsx(Gx,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),aY=eu("MenuContent.ScrollLock"),Gx=E.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:l,disableOutsidePointerEvents:c,onEntryFocus:f,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:p,onInteractOutside:b,onDismiss:x,disableOutsideScroll:S,...w}=e,C=Do(ri,n),A=If(ri,n),N=Km(n),k=cO(n),R=W$(n),[U,I]=E.useState(null),j=E.useRef(null),M=Nt(t,j,C.onContentChange),$=E.useRef(0),L=E.useRef(""),W=E.useRef(0),K=E.useRef(null),J=E.useRef("right"),te=E.useRef(0),ie=S?Lm:E.Fragment,O=S?{as:aY,allowPinchZoom:!0}:void 0,H=ne=>{var fe,Se;const B=L.current+ne,V=R().filter(we=>!we.disabled),re=document.activeElement,P=(fe=V.find(we=>we.ref.current===re))==null?void 0:fe.textValue,he=V.map(we=>we.textValue),ye=yY(he,B,P),ge=(Se=V.find(we=>we.textValue===ye))==null?void 0:Se.ref.current;(function we(Ie){L.current=Ie,window.clearTimeout($.current),Ie!==""&&($.current=window.setTimeout(()=>we(""),1e3))})(B),ge&&setTimeout(()=>ge.focus())};E.useEffect(()=>()=>window.clearTimeout($.current),[]),mx();const q=E.useCallback(ne=>{var V,re;return J.current===((V=K.current)==null?void 0:V.side)&&EY(ne,(re=K.current)==null?void 0:re.area)},[]);return g.jsx(rY,{scope:n,searchRef:L,onItemEnter:E.useCallback(ne=>{q(ne)&&ne.preventDefault()},[q]),onItemLeave:E.useCallback(ne=>{var B;q(ne)||((B=j.current)==null||B.focus(),I(null))},[q]),onTriggerLeave:E.useCallback(ne=>{q(ne)&&ne.preventDefault()},[q]),pointerGraceTimerRef:W,onPointerGraceIntentChange:E.useCallback(ne=>{K.current=ne},[]),children:g.jsx(ie,{...O,children:g.jsx(Mm,{asChild:!0,trapped:s,onMountAutoFocus:_e(o,ne=>{var B;ne.preventDefault(),(B=j.current)==null||B.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:g.jsx(kf,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:p,onInteractOutside:b,onDismiss:x,children:g.jsx(XR,{asChild:!0,...k,dir:A.dir,orientation:"vertical",loop:r,currentTabStopId:U,onCurrentTabStopIdChange:I,onEntryFocus:_e(f,ne=>{A.isUsingKeyboardRef.current||ne.preventDefault()}),preventScrollOnEntryFocus:!0,children:g.jsx(Hx,{role:"menu","aria-orientation":"vertical","data-state":RO(C.open),"data-radix-menu-content":"",dir:A.dir,...N,...w,ref:M,style:{outline:"none",...w.style},onKeyDown:_e(w.onKeyDown,ne=>{const V=ne.target.closest("[data-radix-menu-content]")===ne.currentTarget,re=ne.ctrlKey||ne.altKey||ne.metaKey,P=ne.key.length===1;V&&(ne.key==="Tab"&&ne.preventDefault(),!re&&P&&H(ne.key));const he=j.current;if(ne.target!==he||!Q$.includes(ne.key))return;ne.preventDefault();const ge=R().filter(fe=>!fe.disabled).map(fe=>fe.ref.current);lO.includes(ne.key)&&ge.reverse(),gY(ge)}),onBlur:_e(e.onBlur,ne=>{ne.currentTarget.contains(ne.target)||(window.clearTimeout($.current),L.current="")}),onPointerMove:_e(e.onPointerMove,uf(ne=>{const B=ne.target,V=te.current!==ne.clientX;if(ne.currentTarget.contains(B)&&V){const re=ne.clientX>te.current?"right":"left";J.current=re,te.current=ne.clientX}}))})})})})})})});mO.displayName=ri;var oY="MenuGroup",Qx=E.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return g.jsx(it.div,{role:"group",...r,ref:t})});Qx.displayName=oY;var lY="MenuLabel",pO=E.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return g.jsx(it.div,{...r,ref:t})});pO.displayName=lY;var fm="MenuItem",rA="menu.itemSelect",Xm=E.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...s}=e,o=E.useRef(null),l=If(fm,e.__scopeMenu),c=Yx(fm,e.__scopeMenu),f=Nt(t,o),d=E.useRef(!1),m=()=>{const p=o.current;if(!n&&p){const b=new CustomEvent(rA,{bubbles:!0,cancelable:!0});p.addEventListener(rA,x=>r==null?void 0:r(x),{once:!0}),LN(p,b),b.defaultPrevented?d.current=!1:l.onClose()}};return g.jsx(gO,{...s,ref:f,disabled:n,onClick:_e(e.onClick,m),onPointerDown:p=>{var b;(b=e.onPointerDown)==null||b.call(e,p),d.current=!0},onPointerUp:_e(e.onPointerUp,p=>{var b;d.current||(b=p.currentTarget)==null||b.click()}),onKeyDown:_e(e.onKeyDown,p=>{const b=c.searchRef.current!=="";n||b&&p.key===" "||Zb.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});Xm.displayName=fm;var gO=E.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:s,...o}=e,l=Yx(fm,n),c=cO(n),f=E.useRef(null),d=Nt(t,f),[m,p]=E.useState(!1),[b,x]=E.useState("");return E.useEffect(()=>{const S=f.current;S&&x((S.textContent??"").trim())},[o.children]),g.jsx(lf.ItemSlot,{scope:n,disabled:r,textValue:s??b,children:g.jsx(WR,{asChild:!0,...c,focusable:!r,children:g.jsx(it.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:d,onPointerMove:_e(e.onPointerMove,uf(S=>{r?l.onItemLeave(S):(l.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:_e(e.onPointerLeave,uf(S=>l.onItemLeave(S))),onFocus:_e(e.onFocus,()=>p(!0)),onBlur:_e(e.onBlur,()=>p(!1))})})})}),uY="MenuCheckboxItem",bO=E.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...s}=e;return g.jsx(TO,{scope:e.__scopeMenu,checked:n,children:g.jsx(Xm,{role:"menuitemcheckbox","aria-checked":dm(n)?"mixed":n,...s,ref:t,"data-state":Xx(n),onSelect:_e(s.onSelect,()=>r==null?void 0:r(dm(n)?!0:!n),{checkForDefaultPrevented:!1})})})});bO.displayName=uY;var yO="MenuRadioGroup",[cY,fY]=Ro(yO,{value:void 0,onValueChange:()=>{}}),xO=E.forwardRef((e,t)=>{const{value:n,onValueChange:r,...s}=e,o=Ui(r);return g.jsx(cY,{scope:e.__scopeMenu,value:n,onValueChange:o,children:g.jsx(Qx,{...s,ref:t})})});xO.displayName=yO;var EO="MenuRadioItem",vO=E.forwardRef((e,t)=>{const{value:n,...r}=e,s=fY(EO,e.__scopeMenu),o=n===s.value;return g.jsx(TO,{scope:e.__scopeMenu,checked:o,children:g.jsx(Xm,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":Xx(o),onSelect:_e(r.onSelect,()=>{var l;return(l=s.onValueChange)==null?void 0:l.call(s,n)},{checkForDefaultPrevented:!1})})})});vO.displayName=EO;var Kx="MenuItemIndicator",[TO,dY]=Ro(Kx,{checked:!1}),SO=E.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...s}=e,o=dY(Kx,n);return g.jsx(yi,{present:r||dm(o.checked)||o.checked===!0,children:g.jsx(it.span,{...s,ref:t,"data-state":Xx(o.checked)})})});SO.displayName=Kx;var hY="MenuSeparator",wO=E.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return g.jsx(it.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});wO.displayName=hY;var mY="MenuArrow",CO=E.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=Km(n);return g.jsx(zx,{...s,...r,ref:t})});CO.displayName=mY;var pY="MenuSub",[Toe,AO]=Ro(pY),Nc="MenuSubTrigger",_O=E.forwardRef((e,t)=>{const n=Do(Nc,e.__scopeMenu),r=If(Nc,e.__scopeMenu),s=AO(Nc,e.__scopeMenu),o=Yx(Nc,e.__scopeMenu),l=E.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:f}=o,d={__scopeMenu:e.__scopeMenu},m=E.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return E.useEffect(()=>m,[m]),E.useEffect(()=>{const p=c.current;return()=>{window.clearTimeout(p),f(null)}},[c,f]),g.jsx(qx,{asChild:!0,...d,children:g.jsx(gO,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":s.contentId,"data-state":RO(n.open),...e,ref:_f(t,s.onTriggerChange),onClick:p=>{var b;(b=e.onClick)==null||b.call(e,p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:_e(e.onPointerMove,uf(p=>{o.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!l.current&&(o.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:_e(e.onPointerLeave,uf(p=>{var x,S;m();const b=(x=n.content)==null?void 0:x.getBoundingClientRect();if(b){const w=(S=n.content)==null?void 0:S.dataset.side,C=w==="right",A=C?-5:5,N=b[C?"left":"right"],k=b[C?"right":"left"];o.onPointerGraceIntentChange({area:[{x:p.clientX+A,y:p.clientY},{x:N,y:b.top},{x:k,y:b.top},{x:k,y:b.bottom},{x:N,y:b.bottom}],side:w}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(p),p.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:_e(e.onKeyDown,p=>{var x;const b=o.searchRef.current!=="";e.disabled||b&&p.key===" "||K$[r.dir].includes(p.key)&&(n.onOpenChange(!0),(x=n.content)==null||x.focus(),p.preventDefault())})})})});_O.displayName=Nc;var kO="MenuSubContent",NO=E.forwardRef((e,t)=>{const n=dO(ri,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,o=Do(ri,e.__scopeMenu),l=If(ri,e.__scopeMenu),c=AO(kO,e.__scopeMenu),f=E.useRef(null),d=Nt(t,f);return g.jsx(lf.Provider,{scope:e.__scopeMenu,children:g.jsx(yi,{present:r||o.open,children:g.jsx(lf.Slot,{scope:e.__scopeMenu,children:g.jsx(Gx,{id:c.contentId,"aria-labelledby":c.triggerId,...s,ref:d,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{var p;l.isUsingKeyboardRef.current&&((p=f.current)==null||p.focus()),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:_e(e.onFocusOutside,m=>{m.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:_e(e.onEscapeKeyDown,m=>{l.onClose(),m.preventDefault()}),onKeyDown:_e(e.onKeyDown,m=>{var x;const p=m.currentTarget.contains(m.target),b=X$[l.dir].includes(m.key);p&&b&&(o.onOpenChange(!1),(x=c.trigger)==null||x.focus(),m.preventDefault())})})})})})});NO.displayName=kO;function RO(e){return e?"open":"closed"}function dm(e){return e==="indeterminate"}function Xx(e){return dm(e)?"indeterminate":e?"checked":"unchecked"}function gY(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function bY(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function yY(e,t,n){const s=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=bY(e,Math.max(o,0));s.length===1&&(l=l.filter(d=>d!==n));const f=l.find(d=>d.toLowerCase().startsWith(s.toLowerCase()));return f!==n?f:void 0}function xY(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,l=t.length-1;o<t.length;l=o++){const c=t[o],f=t[l],d=c.x,m=c.y,p=f.x,b=f.y;m>r!=b>r&&n<(p-d)*(r-m)/(b-m)+d&&(s=!s)}return s}function EY(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return xY(n,t)}function uf(e){return t=>t.pointerType==="mouse"?e(t):void 0}var vY=fO,TY=qx,SY=hO,wY=mO,CY=Qx,AY=pO,_Y=Xm,kY=bO,NY=xO,RY=vO,DY=SO,OY=wO,MY=CO,IY=_O,LY=NO,Wm="DropdownMenu",[PY]=Vi(Wm,[uO]),ur=uO(),[jY,DO]=PY(Wm),OO=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:s,defaultOpen:o,onOpenChange:l,modal:c=!0}=e,f=ur(t),d=E.useRef(null),[m,p]=Ea({prop:s,defaultProp:o??!1,onChange:l,caller:Wm});return g.jsx(jY,{scope:t,triggerId:ji(),triggerRef:d,contentId:ji(),open:m,onOpenChange:p,onOpenToggle:E.useCallback(()=>p(b=>!b),[p]),modal:c,children:g.jsx(vY,{...f,open:m,onOpenChange:p,dir:r,modal:c,children:n})})};OO.displayName=Wm;var MO="DropdownMenuTrigger",IO=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...s}=e,o=DO(MO,n),l=ur(n);return g.jsx(TY,{asChild:!0,...l,children:g.jsx(it.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...s,ref:_f(t,o.triggerRef),onPointerDown:_e(e.onPointerDown,c=>{!r&&c.button===0&&c.ctrlKey===!1&&(o.onOpenToggle(),o.open||c.preventDefault())}),onKeyDown:_e(e.onKeyDown,c=>{r||(["Enter"," "].includes(c.key)&&o.onOpenToggle(),c.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});IO.displayName=MO;var BY="DropdownMenuPortal",LO=e=>{const{__scopeDropdownMenu:t,...n}=e,r=ur(t);return g.jsx(SY,{...r,...n})};LO.displayName=BY;var PO="DropdownMenuContent",jO=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=DO(PO,n),o=ur(n),l=E.useRef(!1);return g.jsx(wY,{id:s.contentId,"aria-labelledby":s.triggerId,...o,...r,ref:t,onCloseAutoFocus:_e(e.onCloseAutoFocus,c=>{var f;l.current||(f=s.triggerRef.current)==null||f.focus(),l.current=!1,c.preventDefault()}),onInteractOutside:_e(e.onInteractOutside,c=>{const f=c.detail.originalEvent,d=f.button===0&&f.ctrlKey===!0,m=f.button===2||d;(!s.modal||m)&&(l.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});jO.displayName=PO;var FY="DropdownMenuGroup",UY=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=ur(n);return g.jsx(CY,{...s,...r,ref:t})});UY.displayName=FY;var HY="DropdownMenuLabel",BO=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=ur(n);return g.jsx(AY,{...s,...r,ref:t})});BO.displayName=HY;var zY="DropdownMenuItem",VY=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=ur(n);return g.jsx(_Y,{...s,...r,ref:t})});VY.displayName=zY;var qY="DropdownMenuCheckboxItem",$Y=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=ur(n);return g.jsx(kY,{...s,...r,ref:t})});$Y.displayName=qY;var YY="DropdownMenuRadioGroup",FO=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=ur(n);return g.jsx(NY,{...s,...r,ref:t})});FO.displayName=YY;var GY="DropdownMenuRadioItem",UO=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=ur(n);return g.jsx(RY,{...s,...r,ref:t})});UO.displayName=GY;var QY="DropdownMenuItemIndicator",HO=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=ur(n);return g.jsx(DY,{...s,...r,ref:t})});HO.displayName=QY;var KY="DropdownMenuSeparator",XY=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=ur(n);return g.jsx(OY,{...s,...r,ref:t})});XY.displayName=KY;var WY="DropdownMenuArrow",ZY=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=ur(n);return g.jsx(MY,{...s,...r,ref:t})});ZY.displayName=WY;var JY="DropdownMenuSubTrigger",eG=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=ur(n);return g.jsx(IY,{...s,...r,ref:t})});eG.displayName=JY;var tG="DropdownMenuSubContent",nG=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=ur(n);return g.jsx(LY,{...s,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});nG.displayName=tG;var rG=OO,iG=IO,sG=LO,zO=jO,VO=BO,aG=FO,qO=UO,oG=HO,T1,Zm="HoverCard",[$O]=Vi(Zm,[mu]),Jm=mu(),[lG,ep]=$O(Zm),YO=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:s,onOpenChange:o,openDelay:l=700,closeDelay:c=300}=e,f=Jm(t),d=E.useRef(0),m=E.useRef(0),p=E.useRef(!1),b=E.useRef(!1),[x,S]=Ea({prop:r,defaultProp:s??!1,onChange:o,caller:Zm}),w=E.useCallback(()=>{clearTimeout(m.current),d.current=window.setTimeout(()=>S(!0),l)},[l,S]),C=E.useCallback(()=>{clearTimeout(d.current),!p.current&&!b.current&&(m.current=window.setTimeout(()=>S(!1),c))},[c,S]),A=E.useCallback(()=>S(!1),[S]);return E.useEffect(()=>()=>{clearTimeout(d.current),clearTimeout(m.current)},[]),g.jsx(lG,{scope:t,open:x,onOpenChange:S,onOpen:w,onClose:C,onDismiss:A,hasSelectionRef:p,isPointerDownOnContentRef:b,children:g.jsx(Fx,{...f,children:n})})};YO.displayName=Zm;var GO="HoverCardTrigger",QO=E.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,s=ep(GO,n),o=Jm(n);return g.jsx(Ux,{asChild:!0,...o,children:g.jsx(it.a,{"data-state":s.open?"open":"closed",...r,ref:t,onPointerEnter:_e(e.onPointerEnter,mm(s.onOpen)),onPointerLeave:_e(e.onPointerLeave,mm(s.onClose)),onFocus:_e(e.onFocus,s.onOpen),onBlur:_e(e.onBlur,s.onClose),onTouchStart:_e(e.onTouchStart,l=>l.preventDefault())})})});QO.displayName=GO;var Wx="HoverCardPortal",[uG,cG]=$O(Wx,{forceMount:void 0}),KO=e=>{const{__scopeHoverCard:t,forceMount:n,children:r,container:s}=e,o=ep(Wx,t);return g.jsx(uG,{scope:t,forceMount:n,children:g.jsx(yi,{present:n||o.open,children:g.jsx(Nf,{asChild:!0,container:s,children:r})})})};KO.displayName=Wx;var hm="HoverCardContent",XO=E.forwardRef((e,t)=>{const n=cG(hm,e.__scopeHoverCard),{forceMount:r=n.forceMount,...s}=e,o=ep(hm,e.__scopeHoverCard);return g.jsx(yi,{present:r||o.open,children:g.jsx(fG,{"data-state":o.open?"open":"closed",...s,onPointerEnter:_e(e.onPointerEnter,mm(o.onOpen)),onPointerLeave:_e(e.onPointerLeave,mm(o.onClose)),ref:t})})});XO.displayName=hm;var fG=E.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:l,...c}=e,f=ep(hm,n),d=Jm(n),m=E.useRef(null),p=Nt(t,m),[b,x]=E.useState(!1);return E.useEffect(()=>{if(b){const S=document.body;return T1=S.style.userSelect||S.style.webkitUserSelect,S.style.userSelect="none",S.style.webkitUserSelect="none",()=>{S.style.userSelect=T1,S.style.webkitUserSelect=T1}}},[b]),E.useEffect(()=>{if(m.current){const S=()=>{x(!1),f.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var C;((C=document.getSelection())==null?void 0:C.toString())!==""&&(f.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",S),()=>{document.removeEventListener("pointerup",S),f.hasSelectionRef.current=!1,f.isPointerDownOnContentRef.current=!1}}},[f.isPointerDownOnContentRef,f.hasSelectionRef]),E.useEffect(()=>{m.current&&mG(m.current).forEach(w=>w.setAttribute("tabindex","-1"))}),g.jsx(kf,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:l,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:_e(o,S=>{S.preventDefault()}),onDismiss:f.onDismiss,children:g.jsx(Hx,{...d,...c,onPointerDown:_e(c.onPointerDown,S=>{S.currentTarget.contains(S.target)&&x(!0),f.hasSelectionRef.current=!1,f.isPointerDownOnContentRef.current=!0}),ref:p,style:{...c.style,userSelect:b?"text":void 0,WebkitUserSelect:b?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),dG="HoverCardArrow",hG=E.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,s=Jm(n);return g.jsx(zx,{...s,...r,ref:t})});hG.displayName=dG;function mm(e){return t=>t.pointerType==="touch"?void 0:e()}function mG(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var pG=YO,gG=QO,bG=KO,yG=XO;function iA({...e}){return g.jsx(pG,{"data-slot":"hover-card",...e})}function sA({...e}){return g.jsx(gG,{"data-slot":"hover-card-trigger",...e})}function aA({className:e,align:t="center",sideOffset:n=4,...r}){return g.jsx(bG,{"data-slot":"hover-card-portal",children:g.jsx(yG,{"data-slot":"hover-card-content",align:t,sideOffset:n,className:Xe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...r})})}function S1(){const e=si(),t=Ef(),[n,r]=Cm(),{setSidebarOpen:s,devtoolsOpen:o,toggleDevtools:l}=Jt(),c=_o(),[f,d]=E.useState(null),[m,p]=E.useState(!1),[b,x]=E.useState(!1),[S]=Om(),{theme:w,setTheme:C}=OR(),A=["light","dark","system"],N={light:eU,dark:jF,system:LF}[w],k=E.useCallback(()=>{const M=A.indexOf(w);C(A[(M+1)%A.length])},[w,C]),{data:R=[]}=zi({queryKey:["sessions",S],queryFn:()=>e.listSessions(S??void 0),enabled:S!==null});E.useEffect(()=>{!n&&R.length>0&&r(R[0].id)},[n,R,r]);const U=cP({mutationFn:()=>e.createSession({permissionMode:"default",cwd:S??void 0}),onSuccess:M=>{t.invalidateQueries({queryKey:["sessions",S]}),r(M.id),d(M.id),setTimeout(()=>d(null),300),c&&setTimeout(()=>s(!1),300)}}),I=E.useCallback(M=>{r(M),c&&s(!1)},[c,r,s]),j=E.useMemo(()=>XU(R),[R]);return g.jsxs("div",{className:"sidebar-container flex flex-col h-full p-3",children:[g.jsxs("div",{className:"mb-3 space-y-1.5",children:[g.jsxs("div",{className:"flex items-center gap-1.5",children:[S&&g.jsxs("button",{onClick:()=>p(!0),className:"flex items-center gap-1 flex-1 rounded-md px-2 py-1.5 hover:bg-accent transition-colors duration-150 min-w-0","aria-label":"Change working directory",title:S,children:[g.jsx(gN,{className:"size-(--size-icon-sm) text-muted-foreground flex-shrink-0"}),g.jsx(IN,{path:S,maxSegments:3,size:"sm"})]}),g.jsx("button",{onClick:()=>s(!1),className:"p-2 rounded-md hover:bg-accent transition-colors duration-150","aria-label":"Close sidebar",children:g.jsx(FF,{className:"size-(--size-icon-md) text-muted-foreground"})})]}),g.jsxs("button",{onClick:()=>U.mutate(),disabled:U.isPending,className:"flex items-center justify-center gap-1.5 w-full rounded-md border border-border px-2.5 py-1.5 text-xs font-medium text-muted-foreground hover:bg-accent hover:text-foreground active:scale-[0.98] transition-all duration-100 disabled:opacity-50",children:[g.jsx(zF,{className:"size-(--size-icon-sm)"}),"New chat"]})]}),g.jsx("div",{className:"flex-1 overflow-y-auto -mx-1 px-1",children:j.length>0?g.jsx("div",{className:"space-y-5",children:j.map(M=>{const $=j.length===1&&M.label==="Today";return g.jsxs("div",{children:[!$&&g.jsx("h3",{className:"px-3 mb-1.5 text-2xs font-medium text-muted-foreground/70 uppercase tracking-wider",children:M.label}),g.jsx("div",{className:"space-y-0.5",children:M.sessions.map(L=>g.jsx(JU,{session:L,isActive:L.id===n,isNew:L.id===f,onClick:()=>I(L.id)},L.id))})]},M.label)})}):g.jsx("div",{className:"flex items-center justify-center h-32",children:g.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No conversations yet"})})}),g.jsxs("div",{className:"flex items-center pt-2 mt-2 border-t border-border",children:[g.jsx("a",{href:"https://dorkian.com",target:"_blank",rel:"noopener noreferrer",className:"text-2xs text-muted-foreground/50 hover:text-muted-foreground transition-colors duration-150",children:"DorkOS by Dorkian"}),g.jsxs("div",{className:"ml-auto flex items-center gap-0.5",children:[g.jsx("button",{onClick:()=>x(!0),className:"p-1 max-md:p-2 rounded-md text-muted-foreground/50 hover:text-muted-foreground transition-colors duration-150","aria-label":"Settings",children:g.jsx(YF,{className:"size-(--size-icon-sm)"})}),g.jsxs(iA,{openDelay:200,closeDelay:100,children:[g.jsx(sA,{asChild:!0,children:g.jsx("button",{className:"p-1 max-md:p-2 rounded-md text-muted-foreground/50 hover:text-muted-foreground transition-colors duration-150","aria-label":"Relay status",children:g.jsx(qF,{className:"size-(--size-icon-sm)"})})}),g.jsx(aA,{side:"top",align:"center",className:"w-auto px-3 py-1.5 text-xs",children:"Relay not connected"})]}),g.jsxs(iA,{openDelay:200,closeDelay:100,children:[g.jsx(sA,{asChild:!0,children:g.jsx("button",{className:"p-1 max-md:p-2 rounded-md text-muted-foreground/50 hover:text-muted-foreground transition-colors duration-150","aria-label":"Heartbeat status",children:g.jsx(_F,{className:"size-(--size-icon-sm)"})})}),g.jsx(aA,{side:"top",align:"center",className:"w-auto px-3 py-1.5 text-xs",children:"Pulse not detected"})]}),g.jsx("button",{onClick:k,className:"p-1 max-md:p-2 rounded-md text-muted-foreground/50 hover:text-muted-foreground transition-colors duration-150",title:`Theme: ${w}`,"aria-label":`Theme: ${w}. Click to cycle.`,children:g.jsx(N,{className:"size-(--size-icon-sm)"})}),!1]})]}),g.jsx(cV,{open:m,onOpenChange:p}),g.jsx($$,{open:b,onOpenChange:x})]})}function WO(e){const t=[],n=[];for(const r of e)r.type==="text"?t.push(r.text):n.push({toolCallId:r.toolCallId,toolName:r.toolName,input:r.input||"",result:r.result,status:r.status,interactiveType:r.interactiveType,questions:r.questions,answers:r.answers});return{content:t.join(`
360
+ `),toolCalls:n}}function oA(e){const t=e.parts?[...e.parts]:[];if(t.length===0&&(e.content&&t.push({type:"text",text:e.content}),e.toolCalls))for(const r of e.toolCalls)t.push({type:"tool_call",toolCallId:r.toolCallId,toolName:r.toolName,input:r.input,result:r.result,status:r.status,...r.questions?{interactiveType:"question",questions:r.questions,answers:r.answers}:{}});const n=WO(t);return{id:e.id,role:e.role,content:n.content,toolCalls:n.toolCalls.length>0?n.toolCalls:void 0,parts:t,timestamp:e.timestamp||"",messageType:e.messageType,commandName:e.commandName,commandArgs:e.commandArgs}}function xG(e,t={}){const n=si(),r=Ef(),s=Jt(Ue=>Ue.selectedCwd),[o,l]=E.useState([]),[c,f]=E.useState(""),[d,m]=E.useState("idle"),[p,b]=E.useState(null),[x,S]=E.useState(!1),w=E.useRef(null),[C,A]=E.useState(null),N=E.useRef(null),k=E.useRef([]),R=E.useRef(""),U=E.useRef(!1),I=E.useRef(!1),j=E.useRef(null),M=E.useRef(0),[$,L]=E.useState(null),[W,K]=E.useState(0),J=E.useRef(null),te=E.useRef(!1),[ie,O]=E.useState(!1),H=E.useRef(null),q=E.useRef(s),[ne,B]=E.useState(!document.hidden),V=E.useRef(o);E.useEffect(()=>{V.current=o},[o]),E.useEffect(()=>{q.current=s},[s]),E.useEffect(()=>{const Ue=()=>{B(!document.hidden)};return document.addEventListener("visibilitychange",Ue),()=>{document.removeEventListener("visibilitychange",Ue)}},[]);const re=d==="streaming",P=zi({queryKey:["messages",e,s],queryFn:()=>n.getMessages(e,s??void 0),staleTime:0,refetchOnWindowFocus:!1,refetchInterval:()=>re?!1:ne?3e3:1e4});E.useEffect(()=>{I.current=!1,l([])},[e,s]),E.useEffect(()=>{if(!P.data)return;const Ue=P.data.messages;if(!I.current&&Ue.length>0){I.current=!0,l(Ue.map(oA));return}if(I.current&&!re){const Ye=V.current,lt=Ue.slice(Ye.length);lt.length>0&&l($t=>[...$t,...lt.map(oA)])}},[P.data,re]),E.useEffect(()=>{if(!e||re)return;const Ue=`/api/sessions/${e}/stream`,Ye=new EventSource(Ue);return Ye.addEventListener("sync_update",()=>{r.invalidateQueries({queryKey:["messages",e,q.current]}),r.invalidateQueries({queryKey:["tasks",e,q.current]})}),Ye.addEventListener("sync_connected",()=>{}),()=>{Ye.close()}},[e,re,r]),E.useEffect(()=>()=>{H.current&&clearTimeout(H.current)},[]);const he=E.useCallback(async()=>{if(!c.trim()||d==="streaming")return;const Ue=c.trim(),Ye={id:crypto.randomUUID(),role:"user",content:Ue,parts:[{type:"text",text:Ue}],timestamp:new Date().toISOString()};l(Ct=>[...Ct,Ye]),f(""),m("streaming"),b(null),k.current=[];const lt=Date.now();j.current=lt,M.current=0,L(lt),K(0),R.current=crypto.randomUUID(),U.current=!1;const $t=new AbortController;N.current=$t;try{const Ct=t.transformContent?await t.transformContent(Ye.content):Ye.content;await n.sendMessage(e,Ct,un=>ye(un.type,un.data,R.current),$t.signal,s??void 0),m("idle")}catch(Ct){Ct.name!=="AbortError"&&(Ct.code==="SESSION_LOCKED"?(S(!0),f(Ye.content),H.current&&clearTimeout(H.current),H.current=setTimeout(()=>{S(!1),H.current=null},5e3)):b(Ct.message),m("error")),J.current&&clearTimeout(J.current),te.current=!1,O(!1)}},[c,d,e]);function ye(Ue,Ye,lt){var $t,Ct,un,cr,Fr,Zn,Yt;switch(Ue){case"text_delta":{const{text:He}=Ye,oe=k.current,Te=oe[oe.length-1];Te&&Te.type==="text"?Te.text+=He:oe.push({type:"text",text:He}),M.current+=He.length/4,K(M.current),te.current||(te.current=!0,O(!0)),J.current&&clearTimeout(J.current),J.current=setTimeout(()=>{te.current=!1,O(!1)},500),Se(lt);break}case"tool_call_start":{const He=Ye;k.current.push({type:"tool_call",toolCallId:He.toolCallId,toolName:He.toolName,input:"",status:"running"}),Se(lt);break}case"tool_call_delta":{const He=Ye,oe=ge(He.toolCallId);oe&&He.input&&(oe.input=(oe.input||"")+He.input),Se(lt);break}case"tool_call_end":{const oe=ge(Ye.toolCallId);oe&&(oe.status="complete"),Se(lt);break}case"tool_result":{const He=Ye,oe=ge(He.toolCallId);oe&&(oe.result=He.result,oe.status="complete",oe.interactiveType==="question"&&!oe.answers&&(oe.answers={})),Se(lt);break}case"approval_required":{const He=Ye,oe=ge(He.toolCallId);oe?(oe.interactiveType="approval",oe.input=He.input,oe.status="pending"):k.current.push({type:"tool_call",toolCallId:He.toolCallId,toolName:He.toolName,input:He.input,status:"pending",interactiveType:"approval"}),Se(lt);break}case"question_prompt":{const He=Ye,oe=ge(He.toolCallId);oe?(oe.interactiveType="question",oe.questions=He.questions,oe.status="pending"):k.current.push({type:"tool_call",toolCallId:He.toolCallId,toolName:"AskUserQuestion",input:"",status:"pending",interactiveType:"question",questions:He.questions}),Se(lt);break}case"error":{const{message:He}=Ye;b(He),m("error");break}case"session_status":{const He=Ye,oe={...w.current,...He,model:He.model??(($t=w.current)==null?void 0:$t.model),costUsd:He.costUsd??((Ct=w.current)==null?void 0:Ct.costUsd),contextTokens:He.contextTokens??((un=w.current)==null?void 0:un.contextTokens),contextMaxTokens:He.contextMaxTokens??((cr=w.current)==null?void 0:cr.contextMaxTokens)};w.current=oe,A(oe);break}case"task_update":{const He=Ye;(Fr=t.onTaskEvent)==null||Fr.call(t,He);break}case"done":{const He=Ye;He.sessionId&&He.sessionId!==e&&((Zn=t.onSessionIdChange)==null||Zn.call(t,He.sessionId)),j.current&&Date.now()-j.current>=3e3&&((Yt=t.onStreamingDone)==null||Yt.call(t)),j.current=null,M.current=0,L(null),K(0),J.current&&clearTimeout(J.current),te.current=!1,O(!1),m("idle");break}}}function ge(Ue){for(let Ye=k.current.length-1;Ye>=0;Ye--){const lt=k.current[Ye];if(lt.type==="tool_call"&&lt.toolCallId===Ue)return lt}}function fe(Ue){U.current||(U.current=!0,l(Ye=>[...Ye,{id:Ue,role:"assistant",content:"",toolCalls:[],parts:[],timestamp:new Date().toISOString()}]))}function Se(Ue){fe(Ue);const Ye=k.current.map($t=>({...$t})),lt=WO(Ye);l($t=>$t.map(Ct=>Ct.id===Ue?{...Ct,content:lt.content,toolCalls:lt.toolCalls.length>0?lt.toolCalls:[],parts:Ye}:Ct))}const we=E.useCallback(()=>{var Ue;(Ue=N.current)==null||Ue.abort(),J.current&&clearTimeout(J.current),te.current=!1,O(!1),m("idle")},[]),Ie=P.isLoading,$e=E.useMemo(()=>o.flatMap(Ue=>Ue.toolCalls||[]).filter(Ue=>Ue.interactiveType&&Ue.status==="pending"),[o])[0]||null,zt=$e!==null,Ne=($e==null?void 0:$e.interactiveType)||null;return{messages:o,input:c,setInput:f,handleSubmit:he,status:d,error:p,sessionBusy:x,stop:we,isLoadingHistory:Ie,sessionStatus:C,streamStartTime:$,estimatedTokens:W,isTextStreaming:ie,isWaitingForUser:zt,waitingType:Ne,activeInteraction:$e}}function EG(e){const t=si();return zi({queryKey:["commands",{cwd:e??null}],queryFn:()=>t.getCommands(!1,e??void 0),staleTime:300*1e3,gcTime:1800*1e3})}const lA={in_progress:0,pending:1,completed:2};function vG(e){return[...e].sort((t,n)=>lA[t.status]-lA[n.status])}function TG(e){const t={};for(const[n,r]of Object.entries(e))r!==void 0&&r!==""&&(t[n]=r);return t}const SG=10;function wG(e){const t=si(),n=Jt(w=>w.selectedCwd),[r,s]=E.useState(new Map),[o,l]=E.useState(!1),c=E.useRef(1),{data:f}=zi({queryKey:["tasks",e,n],queryFn:()=>t.getTasks(e,n??void 0),staleTime:3e4,refetchOnWindowFocus:!1});E.useEffect(()=>{if(s(new Map),c.current=1,f&&f.tasks.length>0){const w=new Map;for(const C of f.tasks)w.set(C.id,C);s(w),c.current=f.tasks.length+1}},[f]);const d=E.useCallback(w=>{s(C=>{const A=new Map(C);if(w.action==="create"){const N=String(c.current++);A.set(N,{...w.task,id:N})}else if(w.action==="update"&&w.task.id){const N=A.get(w.task.id);N&&A.set(w.task.id,{...N,...TG(w.task)})}return A})},[]),m=E.useCallback(()=>{l(w=>!w)},[]),p=Array.from(r.values()),b=vG(p),x=p.find(w=>w.status==="in_progress"),S=(x==null?void 0:x.activeForm)??null;return{tasks:b.slice(0,SG),activeForm:S,isCollapsed:o,toggleCollapse:m,handleTaskEvent:d}}const CG="claude-sonnet-4-5-20250929",AG={"claude-opus-4":2e5,"claude-sonnet-4":2e5,"claude-haiku-4":2e5,"claude-sonnet-3":2e5,"claude-haiku-3":2e5};function _G(e){for(const[t,n]of Object.entries(AG))if(e.startsWith(t))return n;return null}function ZO(e,t,n){const r=si(),s=Ef(),o=Jt(C=>C.selectedCwd),[l,c]=E.useState(null),[f,d]=E.useState(null),{data:m}=zi({queryKey:["session",e,o],queryFn:()=>r.getSession(e,o??void 0),staleTime:3e4}),p=l??(t==null?void 0:t.model)??(m==null?void 0:m.model)??CG,b=(t==null?void 0:t.contextTokens)??(m==null?void 0:m.contextTokens)??null,x=(t==null?void 0:t.contextMaxTokens)??_G(p),S={permissionMode:f??(m==null?void 0:m.permissionMode)??"default",model:p,costUsd:(t==null?void 0:t.costUsd)??null,contextPercent:b&&x?Math.min(100,Math.round(b/x*100)):null,isStreaming:n,cwd:(m==null?void 0:m.cwd)??null},w=E.useCallback(async C=>{C.model&&c(C.model),C.permissionMode&&d(C.permissionMode);try{const A=await r.updateSession(e,C,o??void 0);return s.setQueryData(["session",e,o],A),C.model&&c(null),C.permissionMode&&d(null),A}catch{C.model&&c(null),C.permissionMode&&d(null)}},[r,e,o,s]);return{...S,updateSession:w}}function uA(e,t){if(!e)return{match:!0,score:0,indices:[]};const n=e.toLowerCase(),r=t.toLowerCase();let s=0,o=0,l=0;const c=[];for(let f=0;f<r.length&&s<n.length;f++)r[f]===n[s]?(s++,l++,o+=l,c.push(f)):l=0;return{match:s===n.length,score:o,indices:c}}function Sl(e,t,n){let r=n.initialDeps??[],s,o=!0;function l(){var c,f,d;let m;n.key&&((c=n.debug)!=null&&c.call(n))&&(m=Date.now());const p=e();if(!(p.length!==r.length||p.some((S,w)=>r[w]!==S)))return s;r=p;let x;if(n.key&&((f=n.debug)!=null&&f.call(n))&&(x=Date.now()),s=t(...p),n.key&&((d=n.debug)!=null&&d.call(n))){const S=Math.round((Date.now()-m)*100)/100,w=Math.round((Date.now()-x)*100)/100,C=w/16,A=(N,k)=>{for(N=String(N);N.length<k;)N=" "+N;return N};console.info(`%c⏱ ${A(w,5)} /${A(S,5)} ms`,`
361
+ font-size: .6rem;
362
+ font-weight: bold;
363
+ color: hsl(${Math.max(0,Math.min(120-120*C,120))}deg 100% 31%);`,n==null?void 0:n.key)}return n!=null&&n.onChange&&!(o&&n.skipInitialOnChange)&&n.onChange(s),o=!1,s}return l.updateDeps=c=>{r=c},l}function cA(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const kG=(e,t)=>Math.abs(e-t)<1.01,NG=(e,t,n)=>{let r;return function(...s){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,s),n)}},fA=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},RG=e=>e,DG=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let s=t;s<=n;s++)r.push(s);return r},OG=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const s=l=>{const{width:c,height:f}=l;t({width:Math.round(c),height:Math.round(f)})};if(s(fA(n)),!r.ResizeObserver)return()=>{};const o=new r.ResizeObserver(l=>{const c=()=>{const f=l[0];if(f!=null&&f.borderBoxSize){const d=f.borderBoxSize[0];if(d){s({width:d.inlineSize,height:d.blockSize});return}}s(fA(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(c):c()});return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},dA={passive:!0},hA=typeof window>"u"?!0:"onscrollend"in window,MG=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let s=0;const o=e.options.useScrollendEvent&&hA?()=>{}:NG(r,()=>{t(s,!1)},e.options.isScrollingResetDelay),l=m=>()=>{const{horizontal:p,isRtl:b}=e.options;s=p?n.scrollLeft*(b&&-1||1):n.scrollTop,o(),t(s,m)},c=l(!0),f=l(!1);n.addEventListener("scroll",c,dA);const d=e.options.useScrollendEvent&&hA;return d&&n.addEventListener("scrollend",f,dA),()=>{n.removeEventListener("scroll",c),d&&n.removeEventListener("scrollend",f)}},IG=(e,t,n)=>{if(t!=null&&t.borderBoxSize){const r=t.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},LG=(e,{adjustments:t=0,behavior:n},r)=>{var s,o;const l=e+t;(o=(s=r.scrollElement)==null?void 0:s.scrollTo)==null||o.call(s,{[r.options.horizontal?"left":"top"]:l,behavior:n})};class PG{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.currentScrollToIndex=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(s=>{s.forEach(o=>{const l=()=>{this._measureElement(o.target,o)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()})}));return{disconnect:()=>{var s;(s=r())==null||s.disconnect(),n=null},observe:s=>{var o;return(o=r())==null?void 0:o.observe(s,{box:"border-box"})},unobserve:s=>{var o;return(o=r())==null?void 0:o.unobserve(s)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,s])=>{typeof s>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:RG,rangeExtractor:DG,onChange:()=>{},measureElement:IG,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var r,s;(s=(r=this.options).onChange)==null||s.call(r,this,n)},this.maybeNotify=Sl(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(s=>{this.observer.observe(s)}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(s,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s,this.isScrolling=o,this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,r)=>{const s=new Map,o=new Map;for(let l=r-1;l>=0;l--){const c=n[l];if(s.has(c.lane))continue;const f=o.get(c.lane);if(f==null||c.end>f.end?o.set(c.lane,c):c.end<f.end&&s.set(c.lane,!0),s.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((l,c)=>l.end===c.end?l.index-c.index:l.end-c.end)[0]:void 0},this.getMeasurementOptions=Sl(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(n,r,s,o,l,c)=>(this.prevLanes!==void 0&&this.prevLanes!==c&&(this.lanesChangedFlag=!0),this.prevLanes=c,this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:s,getItemKey:o,enabled:l,lanes:c}),{key:!1}),this.getMeasurements=Sl(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:s,getItemKey:o,enabled:l,lanes:c},f)=>{if(!l)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const b of this.laneAssignments.keys())b>=n&&this.laneAssignments.delete(b);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(b=>{this.itemSizeCache.set(b.key,b.size)}));const d=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1);const m=this.measurementsCache.slice(0,d),p=new Array(c).fill(void 0);for(let b=0;b<d;b++){const x=m[b];x&&(p[x.lane]=b)}for(let b=d;b<n;b++){const x=o(b),S=this.laneAssignments.get(b);let w,C;if(S!==void 0&&this.options.lanes>1){w=S;const R=p[w],U=R!==void 0?m[R]:void 0;C=U?U.end+this.options.gap:r+s}else{const R=this.options.lanes===1?m[b-1]:this.getFurthestMeasurement(m,b);C=R?R.end+this.options.gap:r+s,w=R?R.lane:b%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(b,w)}const A=f.get(x),N=typeof A=="number"?A:this.options.estimateSize(b),k=C+N;m[b]={index:b,start:C,size:N,end:k,key:x,lane:w},p[w]=b}return this.measurementsCache=m,m},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Sl(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,s,o)=>this.range=n.length>0&&r>0?jG({measurements:n,outerSize:r,scrollOffset:s,lanes:o}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Sl(()=>{let n=null,r=null;const s=this.calculateRange();return s&&(n=s.startIndex,r=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,r]},(n,r,s,o,l)=>o===null||l===null?[]:n({startIndex:o,endIndex:l,overscan:r,count:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,s=n.getAttribute(r);return s?parseInt(s,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(n,r)=>{const s=this.indexFromElement(n),o=this.measurementsCache[s];if(!o)return;const l=o.key,c=this.elementsCache.get(l);c!==n&&(c&&this.observer.unobserve(c),this.observer.observe(n),this.elementsCache.set(l,n)),n.isConnected&&this.resizeItem(s,this.options.measureElement(n,r,this))},this.resizeItem=(n,r)=>{const s=this.measurementsCache[n];if(!s)return;const o=this.itemSizeCache.get(s.key)??s.size,l=r-o;l!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(s,l,this):s.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=l,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(s.index),this.itemSizeCache=new Map(this.itemSizeCache.set(s.key,r)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((r,s)=>{r.isConnected||(this.observer.unobserve(r),this.elementsCache.delete(s))});return}this._measureElement(n,void 0)},this.getVirtualItems=Sl(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,r)=>{const s=[];for(let o=0,l=n.length;o<l;o++){const c=n[o],f=r[c];s.push(f)}return s},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return cA(r[JO(0,r.length-1,s=>cA(r[s]).start,n)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const n=this.scrollElement.document.documentElement;return this.options.horizontal?n.scrollWidth-this.scrollElement.innerWidth:n.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(n,r,s=0)=>{if(!this.scrollElement)return 0;const o=this.getSize(),l=this.getScrollOffset();r==="auto"&&(r=n>=l+o?"end":"start"),r==="center"?n+=(s-o)/2:r==="end"&&(n-=o);const c=this.getMaxScrollOffset();return Math.max(Math.min(c,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const s=this.measurementsCache[n];if(!s)return;const o=this.getSize(),l=this.getScrollOffset();if(r==="auto")if(s.end>=l+o-this.options.scrollPaddingEnd)r="end";else if(s.start<=l+this.options.scrollPaddingStart)r="start";else return[l,r];if(r==="end"&&n===this.options.count-1)return[this.getMaxScrollOffset(),r];const c=r==="end"?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(c,r,s.size),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:r="start",behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,r),{adjustments:void 0,behavior:s})},this.scrollToIndex=(n,{align:r="auto",behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n=Math.max(0,Math.min(n,this.options.count-1)),this.currentScrollToIndex=n;let o=0;const l=10,c=d=>{if(!this.targetWindow)return;const m=this.getOffsetForIndex(n,d);if(!m){console.warn("Failed to get offset for index:",n);return}const[p,b]=m;this._scrollToOffset(p,{adjustments:void 0,behavior:s}),this.targetWindow.requestAnimationFrame(()=>{const x=()=>{if(this.currentScrollToIndex!==n)return;const S=this.getScrollOffset(),w=this.getOffsetForIndex(n,b);if(!w){console.warn("Failed to get offset for index:",n);return}kG(w[0],S)||f(b)};this.isDynamicMode()?this.targetWindow.requestAnimationFrame(x):x()})},f=d=>{this.targetWindow&&this.currentScrollToIndex===n&&(o++,o<l?this.targetWindow.requestAnimationFrame(()=>c(d)):console.warn(`Failed to scroll to index ${n} after ${l} attempts.`))};c(r)},this.scrollBy=(n,{behavior:r}={})=>{r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let s;if(r.length===0)s=this.options.paddingStart;else if(this.options.lanes===1)s=((n=r[r.length-1])==null?void 0:n.end)??0;else{const o=Array(this.options.lanes).fill(null);let l=r.length-1;for(;l>=0&&o.some(c=>c===null);){const c=r[l];o[c.lane]===null&&(o[c.lane]=c.end),l--}s=Math.max(...o.filter(c=>c!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:r,behavior:s})=>{this.options.scrollToFn(n,{behavior:s,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(t)}}const JO=(e,t,n,r)=>{for(;e<=t;){const s=(e+t)/2|0,o=n(s);if(o<r)e=s+1;else if(o>r)t=s-1;else return s}return e>0?e-1:0};function jG({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){const s=e.length-1,o=f=>e[f].start;if(e.length<=r)return{startIndex:0,endIndex:s};let l=JO(0,s,o,n),c=l;if(r===1)for(;c<s&&e[c].end<n+t;)c++;else if(r>1){const f=Array(r).fill(0);for(;c<s&&f.some(m=>m<n+t);){const m=e[c];f[m.lane]=m.end,c++}const d=Array(r).fill(n+t);for(;l>=0&&d.some(m=>m>=n);){const m=e[l];d[m.lane]=m.start,l--}l=Math.max(0,l-l%r),c=Math.min(s,c+(r-1-c%r))}return{startIndex:l,endIndex:c}}const mA=typeof document<"u"?E.useLayoutEffect:E.useEffect;function BG({useFlushSync:e=!0,...t}){const n=E.useReducer(()=>({}),{})[1],r={...t,onChange:(o,l)=>{var c;e&&l?ko.flushSync(n):n(),(c=t.onChange)==null||c.call(t,o,l)}},[s]=E.useState(()=>new PG(r));return s.setOptions(r),mA(()=>s._didMount(),[]),mA(()=>s._willUpdate()),s}function FG(e){return BG({observeElementRect:OG,observeElementOffset:MG,scrollToFn:LG,...e})}const tp=(function(e){if(e==null)return VG;if(typeof e=="function")return np(e);if(typeof e=="object")return Array.isArray(e)?UG(e):HG(e);if(typeof e=="string")return zG(e);throw new Error("Expected function, string, or object as test")});function UG(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=tp(e[n]);return np(r);function r(...s){let o=-1;for(;++o<t.length;)if(t[o].apply(this,s))return!0;return!1}}function HG(e){const t=e;return np(n);function n(r){const s=r;let o;for(o in e)if(s[o]!==t[o])return!1;return!0}}function zG(e){return np(t);function t(n){return n&&n.type===e}}function np(e){return t;function t(n,r,s){return!!(qG(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function VG(){return!0}function qG(e){return e!==null&&typeof e=="object"&&"type"in e}const e6=[],Rc=!0,Jb=!1,ey="skip";function t6(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const o=tp(s),l=r?-1:1;c(e,void 0,[])();function c(f,d,m){const p=f&&typeof f=="object"?f:{};if(typeof p.type=="string"){const x=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(f.type+(x?"<"+x+">":""))+")"})}return b;function b(){let x=e6,S,w,C;if((!t||o(f,d,m[m.length-1]||void 0))&&(x=$G(n(f,m)),x[0]===Jb))return x;if("children"in f&&f.children){const A=f;if(A.children&&x[0]!==ey)for(w=(r?A.children.length:-1)+l,C=m.concat(A);w>-1&&w<A.children.length;){const N=A.children[w];if(S=c(N,w,C)(),S[0]===Jb)return S;w=typeof S[1]=="number"?S[1]:w+l}}return x}}}function $G(e){return Array.isArray(e)?e:typeof e=="number"?[Rc,e]:e==null?e6:[e]}function nu(e,t,n,r){let s,o,l;typeof t=="function"&&typeof n!="function"?(o=void 0,l=t,s=n):(o=t,l=n,s=r),t6(e,o,c,s);function c(f,d){const m=d[d.length-1],p=m?m.children.indexOf(f):void 0;return l(f,p,m)}}function YG({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:s=[],blockedImageClass:o="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:l="text-gray-500"}){const c=t.length&&!t.every(d=>d==="*"),f=n.length&&!n.every(d=>d==="*");if(!e&&(c||f))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return d=>{const m=XG(e,t,n,r,s,o,l);nu(d,m)}}function pA(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function GG(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const QG=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),KG=new Set(["javascript:","data:","file:","vbscript:"]);function gA(e,t,n,r=!1,s=!1,o=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!s)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return s&&r&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const m=e.substring(5);if(m&&m.length>0&&m!=="invalid")return e}}catch{return null}return null}const l=pA(e,n);if(!l||KG.has(l.protocol)||!(QG.has(l.protocol)||o.includes(l.protocol)||o.includes("*")))return null;if(l.protocol==="mailto:"||!l.protocol.match(/^https?:$/))return l.href;const f=GG(e);return l&&t.some(d=>{const m=pA(d,n);return!m||m.origin!==l.origin?!1:l.href.startsWith(m.href)})?f?l.pathname+l.search+l.hash:l.href:t.includes("*")?l.protocol!=="https:"&&l.protocol!=="http:"?null:f?l.pathname+l.search+l.hash:l.href:null}const w1=Symbol("node-seen"),XG=(e,t,n,r,s,o,l)=>{const c=(f,d,m)=>{if(f.type!=="element"||f[w1])return Rc;if(f.tagName==="a"){const p=gA(f.properties.href,t,e,!1,!1,s);return p===null?(f[w1]=!0,nu(f,c),m&&typeof d=="number"&&(m.children[d]={type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(f.properties.href),class:l},children:[...f.children,{type:"text",value:" [blocked]"}]}),ey):(f.properties.href=p,f.properties.target="_blank",f.properties.rel="noopener noreferrer",Rc)}if(f.tagName==="img"){const p=gA(f.properties.src,n,e,r,!0,s);return p===null?(f[w1]=!0,nu(f,c),m&&typeof d=="number"&&(m.children[d]={type:"element",tagName:"span",properties:{class:o},children:[{type:"text",value:"[Image blocked: "+String(f.properties.alt||"No description")+"]"}]}),ey):(f.properties.src=p,Rc)}return Rc};return c},n6=-1,rp=0,Fc=1,pm=2,Zx=3,Jx=4,eE=5,tE=6,r6=7,i6=8,bA=typeof self=="object"?self:globalThis,WG=(e,t)=>{const n=(s,o)=>(e.set(o,s),s),r=s=>{if(e.has(s))return e.get(s);const[o,l]=t[s];switch(o){case rp:case n6:return n(l,s);case Fc:{const c=n([],s);for(const f of l)c.push(r(f));return c}case pm:{const c=n({},s);for(const[f,d]of l)c[r(f)]=r(d);return c}case Zx:return n(new Date(l),s);case Jx:{const{source:c,flags:f}=l;return n(new RegExp(c,f),s)}case eE:{const c=n(new Map,s);for(const[f,d]of l)c.set(r(f),r(d));return c}case tE:{const c=n(new Set,s);for(const f of l)c.add(r(f));return c}case r6:{const{name:c,message:f}=l;return n(new bA[c](f),s)}case i6:return n(BigInt(l),s);case"BigInt":return n(Object(BigInt(l)),s);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:c}=new Uint8Array(l);return n(new DataView(c),l)}}return n(new bA[o](l),s)};return r},yA=e=>WG(new Map,e)(0),wl="",{toString:ZG}={},{keys:JG}=Object,gc=e=>{const t=typeof e;if(t!=="object"||!e)return[rp,t];const n=ZG.call(e).slice(8,-1);switch(n){case"Array":return[Fc,wl];case"Object":return[pm,wl];case"Date":return[Zx,wl];case"RegExp":return[Jx,wl];case"Map":return[eE,wl];case"Set":return[tE,wl];case"DataView":return[Fc,n]}return n.includes("Array")?[Fc,n]:n.includes("Error")?[r6,n]:[pm,n]},Eh=([e,t])=>e===rp&&(t==="function"||t==="symbol"),eQ=(e,t,n,r)=>{const s=(l,c)=>{const f=r.push(l)-1;return n.set(c,f),f},o=l=>{if(n.has(l))return n.get(l);let[c,f]=gc(l);switch(c){case rp:{let m=l;switch(f){case"bigint":c=i6,m=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);m=null;break;case"undefined":return s([n6],l)}return s([c,m],l)}case Fc:{if(f){let b=l;return f==="DataView"?b=new Uint8Array(l.buffer):f==="ArrayBuffer"&&(b=new Uint8Array(l)),s([f,[...b]],l)}const m=[],p=s([c,m],l);for(const b of l)m.push(o(b));return p}case pm:{if(f)switch(f){case"BigInt":return s([f,l.toString()],l);case"Boolean":case"Number":case"String":return s([f,l.valueOf()],l)}if(t&&"toJSON"in l)return o(l.toJSON());const m=[],p=s([c,m],l);for(const b of JG(l))(e||!Eh(gc(l[b])))&&m.push([o(b),o(l[b])]);return p}case Zx:return s([c,l.toISOString()],l);case Jx:{const{source:m,flags:p}=l;return s([c,{source:m,flags:p}],l)}case eE:{const m=[],p=s([c,m],l);for(const[b,x]of l)(e||!(Eh(gc(b))||Eh(gc(x))))&&m.push([o(b),o(x)]);return p}case tE:{const m=[],p=s([c,m],l);for(const b of l)(e||!Eh(gc(b)))&&m.push(o(b));return p}}const{message:d}=l;return s([c,{name:f,message:d}],l)};return o},xA=(e,{json:t,lossy:n}={})=>{const r=[];return eQ(!(t||n),!!t,new Map,r)(e),r},wo=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?yA(xA(e,t)):structuredClone(e):(e,t)=>yA(xA(e,t));class Lf{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Lf.prototype.normal={};Lf.prototype.property={};Lf.prototype.space=void 0;function s6(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new Lf(n,r,t)}function cf(e){return e.toLowerCase()}class Sr{constructor(t,n){this.attribute=n,this.property=t}}Sr.prototype.attribute="";Sr.prototype.booleanish=!1;Sr.prototype.boolean=!1;Sr.prototype.commaOrSpaceSeparated=!1;Sr.prototype.commaSeparated=!1;Sr.prototype.defined=!1;Sr.prototype.mustUseProperty=!1;Sr.prototype.number=!1;Sr.prototype.overloadedBoolean=!1;Sr.prototype.property="";Sr.prototype.spaceSeparated=!1;Sr.prototype.space=void 0;let tQ=0;const rt=Oo(),yn=Oo(),ty=Oo(),ve=Oo(),Ut=Oo(),Fl=Oo(),Ir=Oo();function Oo(){return 2**++tQ}const ny=Object.freeze(Object.defineProperty({__proto__:null,boolean:rt,booleanish:yn,commaOrSpaceSeparated:Ir,commaSeparated:Fl,number:ve,overloadedBoolean:ty,spaceSeparated:Ut},Symbol.toStringTag,{value:"Module"})),C1=Object.keys(ny);class nE extends Sr{constructor(t,n,r,s){let o=-1;if(super(t,n),EA(this,"space",s),typeof r=="number")for(;++o<C1.length;){const l=C1[o];EA(this,C1[o],(r&ny[l])===ny[l])}}}nE.prototype.defined=!0;function EA(e,t,n){n&&(e[t]=n)}function gu(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const o=new nE(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[cf(r)]=r,n[cf(o.attribute)]=r}return new Lf(t,n,e.space)}const a6=gu({properties:{ariaActiveDescendant:null,ariaAtomic:yn,ariaAutoComplete:null,ariaBusy:yn,ariaChecked:yn,ariaColCount:ve,ariaColIndex:ve,ariaColSpan:ve,ariaControls:Ut,ariaCurrent:null,ariaDescribedBy:Ut,ariaDetails:null,ariaDisabled:yn,ariaDropEffect:Ut,ariaErrorMessage:null,ariaExpanded:yn,ariaFlowTo:Ut,ariaGrabbed:yn,ariaHasPopup:null,ariaHidden:yn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ut,ariaLevel:ve,ariaLive:null,ariaModal:yn,ariaMultiLine:yn,ariaMultiSelectable:yn,ariaOrientation:null,ariaOwns:Ut,ariaPlaceholder:null,ariaPosInSet:ve,ariaPressed:yn,ariaReadOnly:yn,ariaRelevant:null,ariaRequired:yn,ariaRoleDescription:Ut,ariaRowCount:ve,ariaRowIndex:ve,ariaRowSpan:ve,ariaSelected:yn,ariaSetSize:ve,ariaSort:null,ariaValueMax:ve,ariaValueMin:ve,ariaValueNow:ve,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function o6(e,t){return t in e?e[t]:t}function l6(e,t){return o6(e,t.toLowerCase())}const nQ=gu({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Fl,acceptCharset:Ut,accessKey:Ut,action:null,allow:null,allowFullScreen:rt,allowPaymentRequest:rt,allowUserMedia:rt,alt:null,as:null,async:rt,autoCapitalize:null,autoComplete:Ut,autoFocus:rt,autoPlay:rt,blocking:Ut,capture:null,charSet:null,checked:rt,cite:null,className:Ut,cols:ve,colSpan:null,content:null,contentEditable:yn,controls:rt,controlsList:Ut,coords:ve|Fl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:rt,defer:rt,dir:null,dirName:null,disabled:rt,download:ty,draggable:yn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:rt,formTarget:null,headers:Ut,height:ve,hidden:ty,high:ve,href:null,hrefLang:null,htmlFor:Ut,httpEquiv:Ut,id:null,imageSizes:null,imageSrcSet:null,inert:rt,inputMode:null,integrity:null,is:null,isMap:rt,itemId:null,itemProp:Ut,itemRef:Ut,itemScope:rt,itemType:Ut,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:rt,low:ve,manifest:null,max:null,maxLength:ve,media:null,method:null,min:null,minLength:ve,multiple:rt,muted:rt,name:null,nonce:null,noModule:rt,noValidate:rt,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:rt,optimum:ve,pattern:null,ping:Ut,placeholder:null,playsInline:rt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:rt,referrerPolicy:null,rel:Ut,required:rt,reversed:rt,rows:ve,rowSpan:ve,sandbox:Ut,scope:null,scoped:rt,seamless:rt,selected:rt,shadowRootClonable:rt,shadowRootDelegatesFocus:rt,shadowRootMode:null,shape:null,size:ve,sizes:null,slot:null,span:ve,spellCheck:yn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ve,step:null,style:null,tabIndex:ve,target:null,title:null,translate:null,type:null,typeMustMatch:rt,useMap:null,value:yn,width:ve,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ut,axis:null,background:null,bgColor:null,border:ve,borderColor:null,bottomMargin:ve,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:rt,declare:rt,event:null,face:null,frame:null,frameBorder:null,hSpace:ve,leftMargin:ve,link:null,longDesc:null,lowSrc:null,marginHeight:ve,marginWidth:ve,noResize:rt,noHref:rt,noShade:rt,noWrap:rt,object:null,profile:null,prompt:null,rev:null,rightMargin:ve,rules:null,scheme:null,scrolling:yn,standby:null,summary:null,text:null,topMargin:ve,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ve,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:rt,disableRemotePlayback:rt,prefix:null,property:null,results:ve,security:null,unselectable:null},space:"html",transform:l6}),rQ=gu({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:Ir,accentHeight:ve,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ve,amplitude:ve,arabicForm:null,ascent:ve,attributeName:null,attributeType:null,azimuth:ve,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ve,by:null,calcMode:null,capHeight:ve,className:Ut,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:ve,diffuseConstant:ve,direction:null,display:null,dur:null,divisor:ve,dominantBaseline:null,download:rt,dx:null,dy:null,edgeMode:null,editable:null,elevation:ve,enableBackground:null,end:null,event:null,exponent:ve,externalResourcesRequired:null,fill:null,fillOpacity:ve,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:Fl,g2:Fl,glyphName:Fl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ve,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ve,horizOriginX:ve,horizOriginY:ve,id:null,ideographic:ve,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ve,k:ve,k1:ve,k2:ve,k3:ve,k4:ve,kernelMatrix:Ir,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ve,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:ve,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:ve,overlineThickness:ve,paintOrder:null,panose1:null,path:null,pathLength:ve,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ut,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ve,pointsAtY:ve,pointsAtZ:ve,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ir,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ir,rev:Ir,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ir,requiredFeatures:Ir,requiredFonts:Ir,requiredFormats:Ir,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:ve,specularExponent:ve,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ve,strikethroughThickness:ve,string:null,stroke:null,strokeDashArray:Ir,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ve,strokeOpacity:ve,strokeWidth:null,style:null,surfaceScale:ve,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ir,tabIndex:ve,tableValues:null,target:null,targetX:ve,targetY:ve,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ir,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ve,underlineThickness:ve,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ve,values:null,vAlphabetic:ve,vMathematical:ve,vectorEffect:null,vHanging:ve,vIdeographic:ve,version:null,vertAdvY:ve,vertOriginX:ve,vertOriginY:ve,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ve,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:o6}),u6=gu({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()}}),c6=gu({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:l6}),f6=gu({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),iQ={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"},sQ=/[A-Z]/g,vA=/-[a-z]/g,aQ=/^data[-\w.:]+$/i;function ip(e,t){const n=cf(t);let r=t,s=Sr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&aQ.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(vA,lQ);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!vA.test(o)){let l=o.replace(sQ,oQ);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}s=nE}return new s(r,t)}function oQ(e){return"-"+e.toLowerCase()}function lQ(e){return e.charAt(1).toUpperCase()}const Pf=s6([a6,nQ,u6,c6,f6],"html"),ka=s6([a6,rQ,u6,c6,f6],"svg");function TA(e){const t=[],n=String(e||"");let r=n.indexOf(","),s=0,o=!1;for(;!o;){r===-1&&(r=n.length,o=!0);const l=n.slice(s,r).trim();(l||!o)&&t.push(l),s=r+1,r=n.indexOf(",",s)}return t}function d6(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const SA=/[#.]/g;function uQ(e,t){const n=e||"",r={};let s=0,o,l;for(;s<n.length;){SA.lastIndex=s;const c=SA.exec(n),f=n.slice(s,c?c.index:n.length);f&&(o?o==="#"?r.id=f:Array.isArray(r.className)?r.className.push(f):r.className=[f]:l=f,s+=f.length),c&&(o=c[0],s++)}return{type:"element",tagName:l||t||"div",properties:r,children:[]}}function wA(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function h6(e){return e.join(" ").trim()}function m6(e,t,n){const r=n?hQ(n):void 0;function s(o,l,...c){let f;if(o==null){f={type:"root",children:[]};const d=l;c.unshift(d)}else{f=uQ(o,t);const d=f.tagName.toLowerCase(),m=r?r.get(d):void 0;if(f.tagName=m||d,cQ(l))c.unshift(l);else for(const[p,b]of Object.entries(l))fQ(e,f.properties,p,b)}for(const d of c)ry(f.children,d);return f.type==="element"&&f.tagName==="template"&&(f.content={type:"root",children:f.children},f.children=[]),f}return s}function cQ(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const s=t[r];if(s&&typeof s=="object"){if(!Array.isArray(s))return!0;const o=s;for(const l of o)if(typeof l!="number"&&typeof l!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function fQ(e,t,n,r){const s=ip(e,n);let o;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;o=r}else typeof r=="boolean"?o=r:typeof r=="string"?s.spaceSeparated?o=wA(r):s.commaSeparated?o=TA(r):s.commaOrSpaceSeparated?o=wA(TA(r).join(" ")):o=CA(s,s.property,r):Array.isArray(r)?o=[...r]:o=s.property==="style"?dQ(r):String(r);if(Array.isArray(o)){const l=[];for(const c of o)l.push(CA(s,s.property,c));o=l}s.property==="className"&&Array.isArray(t.className)&&(o=t.className.concat(o)),t[s.property]=o}}function ry(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)ry(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?ry(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function CA(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||cf(n)===cf(t)))return!0}return n}function dQ(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function hQ(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const mQ=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],pQ=m6(Pf,"div"),gQ=m6(ka,"g",mQ);function bQ(e){const t=String(e),n=[];return{toOffset:s,toPoint:r};function r(o){if(typeof o=="number"&&o>-1&&o<=t.length){let l=0;for(;;){let c=n[l];if(c===void 0){const f=AA(t,n[l-1]);c=f===-1?t.length+1:f+1,n[l]=c}if(c>o)return{line:l+1,column:o-(l>0?n[l-1]:0)+1,offset:o};l++}}}function s(o){if(o&&typeof o.line=="number"&&typeof o.column=="number"&&!Number.isNaN(o.line)&&!Number.isNaN(o.column)){for(;n.length<o.line;){const c=n[n.length-1],f=AA(t,c),d=f===-1?t.length+1:f+1;if(c===d)break;n.push(d)}const l=(o.line>1?n[o.line-2]:0)+o.column-1;if(l<n[o.line-1])return l}}}function AA(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
364
+ `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const io={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},p6={}.hasOwnProperty,yQ=Object.prototype;function xQ(e,t){const n=t||{};return rE({file:n.file||void 0,location:!1,schema:n.space==="svg"?ka:Pf,verbose:n.verbose||!1},e)}function rE(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},qh(e,r,n),n}case"#document":case"#document-fragment":{const r=t,s="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:g6(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const o=String(e.file),l=bQ(o),c=l.toPoint(0),f=l.toPoint(o.length);n.position={start:c,end:f}}return n}case"#documentType":{const r=t;return n={type:"doctype"},qh(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},qh(e,r,n),n}default:return n=EQ(e,t),n}}function g6(e,t){let n=-1;const r=[];for(;++n<t.length;){const s=rE(e,t[n]);r.push(s)}return r}function EQ(e,t){const n=e.schema;e.schema=t.namespaceURI===io.svg?ka:Pf;let r=-1;const s={};for(;++r<t.attrs.length;){const c=t.attrs[r],f=(c.prefix?c.prefix+":":"")+c.name;p6.call(yQ,f)||(s[f]=c.value)}const l=(e.schema.space==="svg"?gQ:pQ)(t.tagName,s,g6(e,t.childNodes));if(qh(e,t,l),l.tagName==="template"){const c=t,f=c.sourceCodeLocation,d=f&&f.startTag&&Ll(f.startTag),m=f&&f.endTag&&Ll(f.endTag),p=rE(e,c.content);d&&m&&e.file&&(p.position={start:d.end,end:m.start}),l.content=p}return e.schema=n,l}function qh(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=vQ(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function vQ(e,t,n){const r=Ll(n);if(t.type==="element"){const s=t.children[t.children.length-1];if(r&&!n.endTag&&s&&s.position&&s.position.end&&(r.end=Object.assign({},s.position.end)),e.verbose){const o={};let l;if(n.attrs)for(l in n.attrs)p6.call(n.attrs,l)&&(o[ip(e.schema,l).property]=Ll(n.attrs[l]));n.startTag;const c=Ll(n.startTag),f=n.endTag?Ll(n.endTag):void 0,d={opening:c};f&&(d.closing=f),d.properties=o,t.data={position:d}}}return r}function Ll(e){const t=_A({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=_A({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function _A(e){return e.line&&e.column?e:void 0}const kA={}.hasOwnProperty;function b6(e,t){const n=t||{};function r(s,...o){let l=r.invalid;const c=r.handlers;if(s&&kA.call(s,e)){const f=String(s[e]);l=kA.call(c,f)?c[f]:r.unknown}if(l)return l.call(this,s,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const TQ={},SQ={}.hasOwnProperty,y6=b6("type",{handlers:{root:CQ,element:RQ,text:kQ,comment:NQ,doctype:_Q}});function wQ(e,t){const r=(t||TQ).space;return y6(e,r==="svg"?ka:Pf)}function CQ(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=iE(e.children,n,t),bu(e,n),n}function AQ(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=iE(e.children,n,t),bu(e,n),n}function _Q(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return bu(e,t),t}function kQ(e){const t={nodeName:"#text",value:e.value,parentNode:null};return bu(e,t),t}function NQ(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return bu(e,t),t}function RQ(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=ka);const s=[];let o;if(e.properties){for(o in e.properties)if(o!=="children"&&SQ.call(e.properties,o)){const f=DQ(r,o,e.properties[o]);f&&s.push(f)}}const l=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:io[l],childNodes:[],parentNode:null};return c.childNodes=iE(e.children,c,r),bu(e,c),e.tagName==="template"&&e.content&&(c.content=AQ(e.content,r)),c}function DQ(e,t,n){const r=ip(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?d6(n):h6(n));const s={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const o=s.name.indexOf(":");o<0?s.prefix="":(s.name=s.name.slice(o+1),s.prefix=r.attribute.slice(0,o)),s.namespace=io[r.space]}return s}function iE(e,t,n){let r=-1;const s=[];if(e)for(;++r<e.length;){const o=y6(e[r],n);o.parentNode=t,s.push(o)}return s}function bu(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const OQ=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],MQ=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Wt="�";var F;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(F||(F={}));const xr={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function x6(e){return e>=55296&&e<=57343}function IQ(e){return e>=56320&&e<=57343}function LQ(e,t){return(e-55296)*1024+9216+t}function E6(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function v6(e){return e>=64976&&e<=65007||MQ.has(e)}var ce;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(ce||(ce={}));const PQ=65536;class jQ{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=PQ,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:s,offset:o}=this,l=s+n,c=o+n;return{code:t,startLine:r,endLine:r,startCol:l,endCol:l,startOffset:c,endOffset:c}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(IQ(n))return this.pos++,this._addGap(),LQ(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,F.EOF;return this._err(ce.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,F.EOF;const r=this.html.charCodeAt(n);return r===F.CARRIAGE_RETURN?F.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,F.EOF;let t=this.html.charCodeAt(this.pos);return t===F.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,F.LINE_FEED):t===F.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,x6(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===F.LINE_FEED||t===F.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){E6(t)?this._err(ce.controlCharacterInInputStream):v6(t)&&this._err(ce.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var ct;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(ct||(ct={}));function T6(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const BQ=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),FQ=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function UQ(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=FQ.get(e))!==null&&t!==void 0?t:e}var Pn;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Pn||(Pn={}));const HQ=32;var ga;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(ga||(ga={}));function iy(e){return e>=Pn.ZERO&&e<=Pn.NINE}function zQ(e){return e>=Pn.UPPER_A&&e<=Pn.UPPER_F||e>=Pn.LOWER_A&&e<=Pn.LOWER_F}function VQ(e){return e>=Pn.UPPER_A&&e<=Pn.UPPER_Z||e>=Pn.LOWER_A&&e<=Pn.LOWER_Z||iy(e)}function qQ(e){return e===Pn.EQUALS||VQ(e)}var In;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(In||(In={}));var xs;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(xs||(xs={}));class $Q{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=In.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=xs.Strict}startEntity(t){this.decodeMode=t,this.state=In.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case In.EntityStart:return t.charCodeAt(n)===Pn.NUM?(this.state=In.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=In.NamedEntity,this.stateNamedEntity(t,n));case In.NumericStart:return this.stateNumericStart(t,n);case In.NumericDecimal:return this.stateNumericDecimal(t,n);case In.NumericHex:return this.stateNumericHex(t,n);case In.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|HQ)===Pn.LOWER_X?(this.state=In.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=In.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,s){if(n!==r){const o=r-n;this.result=this.result*Math.pow(s,o)+Number.parseInt(t.substr(n,o),s),this.consumed+=o}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(iy(s)||zQ(s))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(s,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(iy(s))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(s,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Pn.SEMI)this.consumed+=1;else if(this.decodeMode===xs.Strict)return 0;return this.emitCodePoint(UQ(this.result),this.consumed),this.errors&&(t!==Pn.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let s=r[this.treeIndex],o=(s&ga.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const l=t.charCodeAt(n);if(this.treeIndex=YQ(r,s,this.treeIndex+Math.max(1,o),l),this.treeIndex<0)return this.result===0||this.decodeMode===xs.Attribute&&(o===0||qQ(l))?0:this.emitNotTerminatedNamedEntity();if(s=r[this.treeIndex],o=(s&ga.VALUE_LENGTH)>>14,o!==0){if(l===Pn.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==xs.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,s=(r[n]&ga.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,s,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:s}=this;return this.emitCodePoint(n===1?s[t]&~ga.VALUE_LENGTH:s[t+1],r),n===3&&this.emitCodePoint(s[t+2],r),r}end(){var t;switch(this.state){case In.NamedEntity:return this.result!==0&&(this.decodeMode!==xs.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case In.NumericDecimal:return this.emitNumericEntity(0,2);case In.NumericHex:return this.emitNumericEntity(0,3);case In.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case In.EntityStart:return 0}}}function YQ(e,t,n,r){const s=(t&ga.BRANCH_LENGTH)>>7,o=t&ga.JUMP_TABLE;if(s===0)return o!==0&&r===o?n:-1;if(o){const f=r-o;return f<0||f>=s?-1:e[n+f]-1}let l=n,c=l+s-1;for(;l<=c;){const f=l+c>>>1,d=e[f];if(d<r)l=f+1;else if(d>r)c=f-1;else return e[f+s]}return-1}var xe;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(xe||(xe={}));var go;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(go||(go={}));var Zr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Zr||(Zr={}));var ee;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(ee||(ee={}));var T;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(T||(T={}));const GQ=new Map([[ee.A,T.A],[ee.ADDRESS,T.ADDRESS],[ee.ANNOTATION_XML,T.ANNOTATION_XML],[ee.APPLET,T.APPLET],[ee.AREA,T.AREA],[ee.ARTICLE,T.ARTICLE],[ee.ASIDE,T.ASIDE],[ee.B,T.B],[ee.BASE,T.BASE],[ee.BASEFONT,T.BASEFONT],[ee.BGSOUND,T.BGSOUND],[ee.BIG,T.BIG],[ee.BLOCKQUOTE,T.BLOCKQUOTE],[ee.BODY,T.BODY],[ee.BR,T.BR],[ee.BUTTON,T.BUTTON],[ee.CAPTION,T.CAPTION],[ee.CENTER,T.CENTER],[ee.CODE,T.CODE],[ee.COL,T.COL],[ee.COLGROUP,T.COLGROUP],[ee.DD,T.DD],[ee.DESC,T.DESC],[ee.DETAILS,T.DETAILS],[ee.DIALOG,T.DIALOG],[ee.DIR,T.DIR],[ee.DIV,T.DIV],[ee.DL,T.DL],[ee.DT,T.DT],[ee.EM,T.EM],[ee.EMBED,T.EMBED],[ee.FIELDSET,T.FIELDSET],[ee.FIGCAPTION,T.FIGCAPTION],[ee.FIGURE,T.FIGURE],[ee.FONT,T.FONT],[ee.FOOTER,T.FOOTER],[ee.FOREIGN_OBJECT,T.FOREIGN_OBJECT],[ee.FORM,T.FORM],[ee.FRAME,T.FRAME],[ee.FRAMESET,T.FRAMESET],[ee.H1,T.H1],[ee.H2,T.H2],[ee.H3,T.H3],[ee.H4,T.H4],[ee.H5,T.H5],[ee.H6,T.H6],[ee.HEAD,T.HEAD],[ee.HEADER,T.HEADER],[ee.HGROUP,T.HGROUP],[ee.HR,T.HR],[ee.HTML,T.HTML],[ee.I,T.I],[ee.IMG,T.IMG],[ee.IMAGE,T.IMAGE],[ee.INPUT,T.INPUT],[ee.IFRAME,T.IFRAME],[ee.KEYGEN,T.KEYGEN],[ee.LABEL,T.LABEL],[ee.LI,T.LI],[ee.LINK,T.LINK],[ee.LISTING,T.LISTING],[ee.MAIN,T.MAIN],[ee.MALIGNMARK,T.MALIGNMARK],[ee.MARQUEE,T.MARQUEE],[ee.MATH,T.MATH],[ee.MENU,T.MENU],[ee.META,T.META],[ee.MGLYPH,T.MGLYPH],[ee.MI,T.MI],[ee.MO,T.MO],[ee.MN,T.MN],[ee.MS,T.MS],[ee.MTEXT,T.MTEXT],[ee.NAV,T.NAV],[ee.NOBR,T.NOBR],[ee.NOFRAMES,T.NOFRAMES],[ee.NOEMBED,T.NOEMBED],[ee.NOSCRIPT,T.NOSCRIPT],[ee.OBJECT,T.OBJECT],[ee.OL,T.OL],[ee.OPTGROUP,T.OPTGROUP],[ee.OPTION,T.OPTION],[ee.P,T.P],[ee.PARAM,T.PARAM],[ee.PLAINTEXT,T.PLAINTEXT],[ee.PRE,T.PRE],[ee.RB,T.RB],[ee.RP,T.RP],[ee.RT,T.RT],[ee.RTC,T.RTC],[ee.RUBY,T.RUBY],[ee.S,T.S],[ee.SCRIPT,T.SCRIPT],[ee.SEARCH,T.SEARCH],[ee.SECTION,T.SECTION],[ee.SELECT,T.SELECT],[ee.SOURCE,T.SOURCE],[ee.SMALL,T.SMALL],[ee.SPAN,T.SPAN],[ee.STRIKE,T.STRIKE],[ee.STRONG,T.STRONG],[ee.STYLE,T.STYLE],[ee.SUB,T.SUB],[ee.SUMMARY,T.SUMMARY],[ee.SUP,T.SUP],[ee.TABLE,T.TABLE],[ee.TBODY,T.TBODY],[ee.TEMPLATE,T.TEMPLATE],[ee.TEXTAREA,T.TEXTAREA],[ee.TFOOT,T.TFOOT],[ee.TD,T.TD],[ee.TH,T.TH],[ee.THEAD,T.THEAD],[ee.TITLE,T.TITLE],[ee.TR,T.TR],[ee.TRACK,T.TRACK],[ee.TT,T.TT],[ee.U,T.U],[ee.UL,T.UL],[ee.SVG,T.SVG],[ee.VAR,T.VAR],[ee.WBR,T.WBR],[ee.XMP,T.XMP]]);function yu(e){var t;return(t=GQ.get(e))!==null&&t!==void 0?t:T.UNKNOWN}const Ee=T,QQ={[xe.HTML]:new Set([Ee.ADDRESS,Ee.APPLET,Ee.AREA,Ee.ARTICLE,Ee.ASIDE,Ee.BASE,Ee.BASEFONT,Ee.BGSOUND,Ee.BLOCKQUOTE,Ee.BODY,Ee.BR,Ee.BUTTON,Ee.CAPTION,Ee.CENTER,Ee.COL,Ee.COLGROUP,Ee.DD,Ee.DETAILS,Ee.DIR,Ee.DIV,Ee.DL,Ee.DT,Ee.EMBED,Ee.FIELDSET,Ee.FIGCAPTION,Ee.FIGURE,Ee.FOOTER,Ee.FORM,Ee.FRAME,Ee.FRAMESET,Ee.H1,Ee.H2,Ee.H3,Ee.H4,Ee.H5,Ee.H6,Ee.HEAD,Ee.HEADER,Ee.HGROUP,Ee.HR,Ee.HTML,Ee.IFRAME,Ee.IMG,Ee.INPUT,Ee.LI,Ee.LINK,Ee.LISTING,Ee.MAIN,Ee.MARQUEE,Ee.MENU,Ee.META,Ee.NAV,Ee.NOEMBED,Ee.NOFRAMES,Ee.NOSCRIPT,Ee.OBJECT,Ee.OL,Ee.P,Ee.PARAM,Ee.PLAINTEXT,Ee.PRE,Ee.SCRIPT,Ee.SECTION,Ee.SELECT,Ee.SOURCE,Ee.STYLE,Ee.SUMMARY,Ee.TABLE,Ee.TBODY,Ee.TD,Ee.TEMPLATE,Ee.TEXTAREA,Ee.TFOOT,Ee.TH,Ee.THEAD,Ee.TITLE,Ee.TR,Ee.TRACK,Ee.UL,Ee.WBR,Ee.XMP]),[xe.MATHML]:new Set([Ee.MI,Ee.MO,Ee.MN,Ee.MS,Ee.MTEXT,Ee.ANNOTATION_XML]),[xe.SVG]:new Set([Ee.TITLE,Ee.FOREIGN_OBJECT,Ee.DESC]),[xe.XLINK]:new Set,[xe.XML]:new Set,[xe.XMLNS]:new Set},sy=new Set([Ee.H1,Ee.H2,Ee.H3,Ee.H4,Ee.H5,Ee.H6]);ee.STYLE,ee.SCRIPT,ee.XMP,ee.IFRAME,ee.NOEMBED,ee.NOFRAMES,ee.PLAINTEXT;var z;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(z||(z={}));const hn={DATA:z.DATA,RCDATA:z.RCDATA,RAWTEXT:z.RAWTEXT,SCRIPT_DATA:z.SCRIPT_DATA,PLAINTEXT:z.PLAINTEXT,CDATA_SECTION:z.CDATA_SECTION};function KQ(e){return e>=F.DIGIT_0&&e<=F.DIGIT_9}function Dc(e){return e>=F.LATIN_CAPITAL_A&&e<=F.LATIN_CAPITAL_Z}function XQ(e){return e>=F.LATIN_SMALL_A&&e<=F.LATIN_SMALL_Z}function ra(e){return XQ(e)||Dc(e)}function NA(e){return ra(e)||KQ(e)}function vh(e){return e+32}function S6(e){return e===F.SPACE||e===F.LINE_FEED||e===F.TABULATION||e===F.FORM_FEED}function RA(e){return S6(e)||e===F.SOLIDUS||e===F.GREATER_THAN_SIGN}function WQ(e){return e===F.NULL?ce.nullCharacterReference:e>1114111?ce.characterReferenceOutsideUnicodeRange:x6(e)?ce.surrogateCharacterReference:v6(e)?ce.noncharacterCharacterReference:E6(e)||e===F.CARRIAGE_RETURN?ce.controlCharacterReference:null}class ZQ{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=z.DATA,this.returnState=z.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new jQ(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new $Q(BQ,(r,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ce.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(ce.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const s=WQ(r);s&&this._err(s,1)}}:void 0)}_err(t,n=0){var r,s;(s=(r=this.handler).onParseError)===null||s===void 0||s.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:ct.START_TAG,tagName:"",tagID:T.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:ct.END_TAG,tagName:"",tagID:T.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:ct.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:ct.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(T6(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const s=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);s[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(ce.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=yu(t.tagName),t.type===ct.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(ce.endTagWithAttributes),t.selfClosing&&this._err(ce.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case ct.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case ct.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case ct.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:ct.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=S6(t)?ct.WHITESPACE_CHARACTER:t===F.NULL?ct.NULL_CHARACTER:ct.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(ct.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=z.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?xs.Attribute:xs.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===z.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===z.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===z.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case z.DATA:{this._stateData(t);break}case z.RCDATA:{this._stateRcdata(t);break}case z.RAWTEXT:{this._stateRawtext(t);break}case z.SCRIPT_DATA:{this._stateScriptData(t);break}case z.PLAINTEXT:{this._statePlaintext(t);break}case z.TAG_OPEN:{this._stateTagOpen(t);break}case z.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case z.TAG_NAME:{this._stateTagName(t);break}case z.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case z.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case z.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case z.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case z.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case z.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case z.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case z.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case z.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case z.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case z.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case z.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case z.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case z.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case z.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case z.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case z.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case z.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case z.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case z.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case z.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case z.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case z.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case z.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case z.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case z.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case z.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case z.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case z.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case z.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case z.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case z.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case z.BOGUS_COMMENT:{this._stateBogusComment(t);break}case z.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case z.COMMENT_START:{this._stateCommentStart(t);break}case z.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case z.COMMENT:{this._stateComment(t);break}case z.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case z.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case z.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case z.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case z.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case z.COMMENT_END:{this._stateCommentEnd(t);break}case z.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case z.DOCTYPE:{this._stateDoctype(t);break}case z.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case z.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case z.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case z.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case z.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case z.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case z.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case z.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case z.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case z.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case z.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case z.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case z.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case z.CDATA_SECTION:{this._stateCdataSection(t);break}case z.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case z.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case z.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case z.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case F.LESS_THAN_SIGN:{this.state=z.TAG_OPEN;break}case F.AMPERSAND:{this._startCharacterReference();break}case F.NULL:{this._err(ce.unexpectedNullCharacter),this._emitCodePoint(t);break}case F.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case F.AMPERSAND:{this._startCharacterReference();break}case F.LESS_THAN_SIGN:{this.state=z.RCDATA_LESS_THAN_SIGN;break}case F.NULL:{this._err(ce.unexpectedNullCharacter),this._emitChars(Wt);break}case F.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case F.LESS_THAN_SIGN:{this.state=z.RAWTEXT_LESS_THAN_SIGN;break}case F.NULL:{this._err(ce.unexpectedNullCharacter),this._emitChars(Wt);break}case F.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case F.LESS_THAN_SIGN:{this.state=z.SCRIPT_DATA_LESS_THAN_SIGN;break}case F.NULL:{this._err(ce.unexpectedNullCharacter),this._emitChars(Wt);break}case F.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case F.NULL:{this._err(ce.unexpectedNullCharacter),this._emitChars(Wt);break}case F.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(ra(t))this._createStartTagToken(),this.state=z.TAG_NAME,this._stateTagName(t);else switch(t){case F.EXCLAMATION_MARK:{this.state=z.MARKUP_DECLARATION_OPEN;break}case F.SOLIDUS:{this.state=z.END_TAG_OPEN;break}case F.QUESTION_MARK:{this._err(ce.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=z.BOGUS_COMMENT,this._stateBogusComment(t);break}case F.EOF:{this._err(ce.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ce.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=z.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(ra(t))this._createEndTagToken(),this.state=z.TAG_NAME,this._stateTagName(t);else switch(t){case F.GREATER_THAN_SIGN:{this._err(ce.missingEndTagName),this.state=z.DATA;break}case F.EOF:{this._err(ce.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ce.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=z.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:{this.state=z.BEFORE_ATTRIBUTE_NAME;break}case F.SOLIDUS:{this.state=z.SELF_CLOSING_START_TAG;break}case F.GREATER_THAN_SIGN:{this.state=z.DATA,this.emitCurrentTagToken();break}case F.NULL:{this._err(ce.unexpectedNullCharacter),n.tagName+=Wt;break}case F.EOF:{this._err(ce.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Dc(t)?vh(t):t)}}_stateRcdataLessThanSign(t){t===F.SOLIDUS?this.state=z.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=z.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){ra(t)?(this.state=z.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=z.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=z.BEFORE_ATTRIBUTE_NAME,!1;case F.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=z.SELF_CLOSING_START_TAG,!1;case F.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=z.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=z.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===F.SOLIDUS?this.state=z.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=z.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){ra(t)?(this.state=z.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=z.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=z.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case F.SOLIDUS:{this.state=z.SCRIPT_DATA_END_TAG_OPEN;break}case F.EXCLAMATION_MARK:{this.state=z.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=z.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){ra(t)?(this.state=z.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=z.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=z.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===F.HYPHEN_MINUS?(this.state=z.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=z.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===F.HYPHEN_MINUS?(this.state=z.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=z.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case F.HYPHEN_MINUS:{this.state=z.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case F.LESS_THAN_SIGN:{this.state=z.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case F.NULL:{this._err(ce.unexpectedNullCharacter),this._emitChars(Wt);break}case F.EOF:{this._err(ce.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case F.HYPHEN_MINUS:{this.state=z.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case F.LESS_THAN_SIGN:{this.state=z.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case F.NULL:{this._err(ce.unexpectedNullCharacter),this.state=z.SCRIPT_DATA_ESCAPED,this._emitChars(Wt);break}case F.EOF:{this._err(ce.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=z.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case F.HYPHEN_MINUS:{this._emitChars("-");break}case F.LESS_THAN_SIGN:{this.state=z.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case F.GREATER_THAN_SIGN:{this.state=z.SCRIPT_DATA,this._emitChars(">");break}case F.NULL:{this._err(ce.unexpectedNullCharacter),this.state=z.SCRIPT_DATA_ESCAPED,this._emitChars(Wt);break}case F.EOF:{this._err(ce.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=z.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===F.SOLIDUS?this.state=z.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:ra(t)?(this._emitChars("<"),this.state=z.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=z.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){ra(t)?(this.state=z.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=z.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=z.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(xr.SCRIPT,!1)&&RA(this.preprocessor.peek(xr.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<xr.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=z.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case F.HYPHEN_MINUS:{this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case F.LESS_THAN_SIGN:{this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case F.NULL:{this._err(ce.unexpectedNullCharacter),this._emitChars(Wt);break}case F.EOF:{this._err(ce.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case F.HYPHEN_MINUS:{this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case F.LESS_THAN_SIGN:{this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case F.NULL:{this._err(ce.unexpectedNullCharacter),this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Wt);break}case F.EOF:{this._err(ce.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case F.HYPHEN_MINUS:{this._emitChars("-");break}case F.LESS_THAN_SIGN:{this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case F.GREATER_THAN_SIGN:{this.state=z.SCRIPT_DATA,this._emitChars(">");break}case F.NULL:{this._err(ce.unexpectedNullCharacter),this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Wt);break}case F.EOF:{this._err(ce.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===F.SOLIDUS?(this.state=z.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(xr.SCRIPT,!1)&&RA(this.preprocessor.peek(xr.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<xr.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=z.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:break;case F.SOLIDUS:case F.GREATER_THAN_SIGN:case F.EOF:{this.state=z.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case F.EQUALS_SIGN:{this._err(ce.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=z.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=z.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:case F.SOLIDUS:case F.GREATER_THAN_SIGN:case F.EOF:{this._leaveAttrName(),this.state=z.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case F.EQUALS_SIGN:{this._leaveAttrName(),this.state=z.BEFORE_ATTRIBUTE_VALUE;break}case F.QUOTATION_MARK:case F.APOSTROPHE:case F.LESS_THAN_SIGN:{this._err(ce.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case F.NULL:{this._err(ce.unexpectedNullCharacter),this.currentAttr.name+=Wt;break}default:this.currentAttr.name+=String.fromCodePoint(Dc(t)?vh(t):t)}}_stateAfterAttributeName(t){switch(t){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:break;case F.SOLIDUS:{this.state=z.SELF_CLOSING_START_TAG;break}case F.EQUALS_SIGN:{this.state=z.BEFORE_ATTRIBUTE_VALUE;break}case F.GREATER_THAN_SIGN:{this.state=z.DATA,this.emitCurrentTagToken();break}case F.EOF:{this._err(ce.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=z.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:break;case F.QUOTATION_MARK:{this.state=z.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case F.APOSTROPHE:{this.state=z.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case F.GREATER_THAN_SIGN:{this._err(ce.missingAttributeValue),this.state=z.DATA,this.emitCurrentTagToken();break}default:this.state=z.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case F.QUOTATION_MARK:{this.state=z.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case F.AMPERSAND:{this._startCharacterReference();break}case F.NULL:{this._err(ce.unexpectedNullCharacter),this.currentAttr.value+=Wt;break}case F.EOF:{this._err(ce.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case F.APOSTROPHE:{this.state=z.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case F.AMPERSAND:{this._startCharacterReference();break}case F.NULL:{this._err(ce.unexpectedNullCharacter),this.currentAttr.value+=Wt;break}case F.EOF:{this._err(ce.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:{this._leaveAttrValue(),this.state=z.BEFORE_ATTRIBUTE_NAME;break}case F.AMPERSAND:{this._startCharacterReference();break}case F.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=z.DATA,this.emitCurrentTagToken();break}case F.NULL:{this._err(ce.unexpectedNullCharacter),this.currentAttr.value+=Wt;break}case F.QUOTATION_MARK:case F.APOSTROPHE:case F.LESS_THAN_SIGN:case F.EQUALS_SIGN:case F.GRAVE_ACCENT:{this._err(ce.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case F.EOF:{this._err(ce.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:{this._leaveAttrValue(),this.state=z.BEFORE_ATTRIBUTE_NAME;break}case F.SOLIDUS:{this._leaveAttrValue(),this.state=z.SELF_CLOSING_START_TAG;break}case F.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=z.DATA,this.emitCurrentTagToken();break}case F.EOF:{this._err(ce.eofInTag),this._emitEOFToken();break}default:this._err(ce.missingWhitespaceBetweenAttributes),this.state=z.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case F.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=z.DATA,this.emitCurrentTagToken();break}case F.EOF:{this._err(ce.eofInTag),this._emitEOFToken();break}default:this._err(ce.unexpectedSolidusInTag),this.state=z.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case F.GREATER_THAN_SIGN:{this.state=z.DATA,this.emitCurrentComment(n);break}case F.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case F.NULL:{this._err(ce.unexpectedNullCharacter),n.data+=Wt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(xr.DASH_DASH,!0)?(this._createCommentToken(xr.DASH_DASH.length+1),this.state=z.COMMENT_START):this._consumeSequenceIfMatch(xr.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(xr.DOCTYPE.length+1),this.state=z.DOCTYPE):this._consumeSequenceIfMatch(xr.CDATA_START,!0)?this.inForeignNode?this.state=z.CDATA_SECTION:(this._err(ce.cdataInHtmlContent),this._createCommentToken(xr.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=z.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ce.incorrectlyOpenedComment),this._createCommentToken(2),this.state=z.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case F.HYPHEN_MINUS:{this.state=z.COMMENT_START_DASH;break}case F.GREATER_THAN_SIGN:{this._err(ce.abruptClosingOfEmptyComment),this.state=z.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=z.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case F.HYPHEN_MINUS:{this.state=z.COMMENT_END;break}case F.GREATER_THAN_SIGN:{this._err(ce.abruptClosingOfEmptyComment),this.state=z.DATA,this.emitCurrentComment(n);break}case F.EOF:{this._err(ce.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=z.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case F.HYPHEN_MINUS:{this.state=z.COMMENT_END_DASH;break}case F.LESS_THAN_SIGN:{n.data+="<",this.state=z.COMMENT_LESS_THAN_SIGN;break}case F.NULL:{this._err(ce.unexpectedNullCharacter),n.data+=Wt;break}case F.EOF:{this._err(ce.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case F.EXCLAMATION_MARK:{n.data+="!",this.state=z.COMMENT_LESS_THAN_SIGN_BANG;break}case F.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=z.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===F.HYPHEN_MINUS?this.state=z.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=z.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===F.HYPHEN_MINUS?this.state=z.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=z.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==F.GREATER_THAN_SIGN&&t!==F.EOF&&this._err(ce.nestedComment),this.state=z.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case F.HYPHEN_MINUS:{this.state=z.COMMENT_END;break}case F.EOF:{this._err(ce.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=z.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case F.GREATER_THAN_SIGN:{this.state=z.DATA,this.emitCurrentComment(n);break}case F.EXCLAMATION_MARK:{this.state=z.COMMENT_END_BANG;break}case F.HYPHEN_MINUS:{n.data+="-";break}case F.EOF:{this._err(ce.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=z.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case F.HYPHEN_MINUS:{n.data+="--!",this.state=z.COMMENT_END_DASH;break}case F.GREATER_THAN_SIGN:{this._err(ce.incorrectlyClosedComment),this.state=z.DATA,this.emitCurrentComment(n);break}case F.EOF:{this._err(ce.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=z.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:{this.state=z.BEFORE_DOCTYPE_NAME;break}case F.GREATER_THAN_SIGN:{this.state=z.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case F.EOF:{this._err(ce.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ce.missingWhitespaceBeforeDoctypeName),this.state=z.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Dc(t))this._createDoctypeToken(String.fromCharCode(vh(t))),this.state=z.DOCTYPE_NAME;else switch(t){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:break;case F.NULL:{this._err(ce.unexpectedNullCharacter),this._createDoctypeToken(Wt),this.state=z.DOCTYPE_NAME;break}case F.GREATER_THAN_SIGN:{this._err(ce.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=z.DATA;break}case F.EOF:{this._err(ce.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=z.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:{this.state=z.AFTER_DOCTYPE_NAME;break}case F.GREATER_THAN_SIGN:{this.state=z.DATA,this.emitCurrentDoctype(n);break}case F.NULL:{this._err(ce.unexpectedNullCharacter),n.name+=Wt;break}case F.EOF:{this._err(ce.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Dc(t)?vh(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:break;case F.GREATER_THAN_SIGN:{this.state=z.DATA,this.emitCurrentDoctype(n);break}case F.EOF:{this._err(ce.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(xr.PUBLIC,!1)?this.state=z.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(xr.SYSTEM,!1)?this.state=z.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ce.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=z.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:{this.state=z.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case F.QUOTATION_MARK:{this._err(ce.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=z.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case F.APOSTROPHE:{this._err(ce.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=z.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case F.GREATER_THAN_SIGN:{this._err(ce.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=z.DATA,this.emitCurrentDoctype(n);break}case F.EOF:{this._err(ce.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ce.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=z.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:break;case F.QUOTATION_MARK:{n.publicId="",this.state=z.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case F.APOSTROPHE:{n.publicId="",this.state=z.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case F.GREATER_THAN_SIGN:{this._err(ce.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=z.DATA,this.emitCurrentDoctype(n);break}case F.EOF:{this._err(ce.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ce.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=z.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case F.QUOTATION_MARK:{this.state=z.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case F.NULL:{this._err(ce.unexpectedNullCharacter),n.publicId+=Wt;break}case F.GREATER_THAN_SIGN:{this._err(ce.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=z.DATA;break}case F.EOF:{this._err(ce.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case F.APOSTROPHE:{this.state=z.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case F.NULL:{this._err(ce.unexpectedNullCharacter),n.publicId+=Wt;break}case F.GREATER_THAN_SIGN:{this._err(ce.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=z.DATA;break}case F.EOF:{this._err(ce.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:{this.state=z.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case F.GREATER_THAN_SIGN:{this.state=z.DATA,this.emitCurrentDoctype(n);break}case F.QUOTATION_MARK:{this._err(ce.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case F.APOSTROPHE:{this._err(ce.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case F.EOF:{this._err(ce.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ce.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=z.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:break;case F.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=z.DATA;break}case F.QUOTATION_MARK:{n.systemId="",this.state=z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case F.APOSTROPHE:{n.systemId="",this.state=z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case F.EOF:{this._err(ce.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ce.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=z.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:{this.state=z.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case F.QUOTATION_MARK:{this._err(ce.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case F.APOSTROPHE:{this._err(ce.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case F.GREATER_THAN_SIGN:{this._err(ce.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=z.DATA,this.emitCurrentDoctype(n);break}case F.EOF:{this._err(ce.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ce.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=z.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:break;case F.QUOTATION_MARK:{n.systemId="",this.state=z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case F.APOSTROPHE:{n.systemId="",this.state=z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case F.GREATER_THAN_SIGN:{this._err(ce.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=z.DATA,this.emitCurrentDoctype(n);break}case F.EOF:{this._err(ce.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ce.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=z.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case F.QUOTATION_MARK:{this.state=z.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case F.NULL:{this._err(ce.unexpectedNullCharacter),n.systemId+=Wt;break}case F.GREATER_THAN_SIGN:{this._err(ce.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=z.DATA;break}case F.EOF:{this._err(ce.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case F.APOSTROPHE:{this.state=z.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case F.NULL:{this._err(ce.unexpectedNullCharacter),n.systemId+=Wt;break}case F.GREATER_THAN_SIGN:{this._err(ce.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=z.DATA;break}case F.EOF:{this._err(ce.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:break;case F.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=z.DATA;break}case F.EOF:{this._err(ce.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ce.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=z.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case F.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=z.DATA;break}case F.NULL:{this._err(ce.unexpectedNullCharacter);break}case F.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case F.RIGHT_SQUARE_BRACKET:{this.state=z.CDATA_SECTION_BRACKET;break}case F.EOF:{this._err(ce.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===F.RIGHT_SQUARE_BRACKET?this.state=z.CDATA_SECTION_END:(this._emitChars("]"),this.state=z.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case F.GREATER_THAN_SIGN:{this.state=z.DATA;break}case F.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=z.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(F.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&NA(this.preprocessor.peek(1))?z.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){NA(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===F.SEMICOLON&&this._err(ce.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const w6=new Set([T.DD,T.DT,T.LI,T.OPTGROUP,T.OPTION,T.P,T.RB,T.RP,T.RT,T.RTC]),DA=new Set([...w6,T.CAPTION,T.COLGROUP,T.TBODY,T.TD,T.TFOOT,T.TH,T.THEAD,T.TR]),gm=new Set([T.APPLET,T.CAPTION,T.HTML,T.MARQUEE,T.OBJECT,T.TABLE,T.TD,T.TEMPLATE,T.TH]),JQ=new Set([...gm,T.OL,T.UL]),eK=new Set([...gm,T.BUTTON]),OA=new Set([T.ANNOTATION_XML,T.MI,T.MN,T.MO,T.MS,T.MTEXT]),MA=new Set([T.DESC,T.FOREIGN_OBJECT,T.TITLE]),tK=new Set([T.TR,T.TEMPLATE,T.HTML]),nK=new Set([T.TBODY,T.TFOOT,T.THEAD,T.TEMPLATE,T.HTML]),rK=new Set([T.TABLE,T.TEMPLATE,T.HTML]),iK=new Set([T.TD,T.TH]);class sK{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=T.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===T.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===xe.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const s=this._indexOf(t)+1;this.items.splice(s,0,n),this.tagIDs.splice(s,0,r),this.stackTop++,s===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,s===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==xe.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(sy,xe.HTML)}popUntilTableCellPopped(){this.popUntilPopped(iK,xe.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(rK,xe.HTML)}clearBackToTableBodyContext(){this.clearBackTo(nK,xe.HTML)}clearBackToTableRowContext(){this.clearBackTo(tK,xe.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===T.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===T.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const s=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case xe.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case xe.SVG:{if(MA.has(s))return!1;break}case xe.MATHML:{if(OA.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,gm)}hasInListItemScope(t){return this.hasInDynamicScope(t,JQ)}hasInButtonScope(t){return this.hasInDynamicScope(t,eK)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case xe.HTML:{if(sy.has(n))return!0;if(gm.has(n))return!1;break}case xe.SVG:{if(MA.has(n))return!1;break}case xe.MATHML:{if(OA.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===xe.HTML)switch(this.tagIDs[n]){case t:return!0;case T.TABLE:case T.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===xe.HTML)switch(this.tagIDs[t]){case T.TBODY:case T.THEAD:case T.TFOOT:return!0;case T.TABLE:case T.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===xe.HTML)switch(this.tagIDs[n]){case t:return!0;case T.OPTION:case T.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&w6.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&DA.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&DA.has(this.currentTagId);)this.pop()}}const A1=3;var Di;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Di||(Di={}));const IA={type:Di.Marker};class aK{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],s=n.length,o=this.treeAdapter.getTagName(t),l=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const f=this.entries[c];if(f.type===Di.Marker)break;const{element:d}=f;if(this.treeAdapter.getTagName(d)===o&&this.treeAdapter.getNamespaceURI(d)===l){const m=this.treeAdapter.getAttrList(d);m.length===s&&r.push({idx:c,attrs:m})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<A1)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<A1)return;const s=new Map(n.map(l=>[l.name,l.value]));let o=0;for(let l=0;l<r.length;l++){const c=r[l];c.attrs.every(f=>s.get(f.name)===f.value)&&(o+=1,o>=A1&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(IA)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Di.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Di.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(IA);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Di.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Di.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Di.Element&&n.element===t)}}const ia={createDocument(){return{nodeName:"#document",mode:Zr.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const s=e.childNodes.find(o=>o.nodeName==="#documentType");if(s)s.name=t,s.publicId=n,s.systemId=r;else{const o={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};ia.appendChild(e,o)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(ia.isTextNode(n)){n.value+=t;return}}ia.appendChild(e,ia.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&ia.isTextNode(r)?r.value+=t:ia.insertBefore(e,ia.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},C6="html",oK="about:legacy-compat",lK="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",A6=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],uK=[...A6,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],cK=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),_6=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],fK=[..._6,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function LA(e,t){return t.some(n=>e.startsWith(n))}function dK(e){return e.name===C6&&e.publicId===null&&(e.systemId===null||e.systemId===oK)}function hK(e){if(e.name!==C6)return Zr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===lK)return Zr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),cK.has(n))return Zr.QUIRKS;let r=t===null?uK:A6;if(LA(n,r))return Zr.QUIRKS;if(r=t===null?_6:fK,LA(n,r))return Zr.LIMITED_QUIRKS}return Zr.NO_QUIRKS}const PA={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},mK="definitionurl",pK="definitionURL",gK=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),bK=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:xe.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:xe.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:xe.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:xe.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:xe.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:xe.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:xe.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:xe.XML}],["xml:space",{prefix:"xml",name:"space",namespace:xe.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:xe.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:xe.XMLNS}]]),yK=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),xK=new Set([T.B,T.BIG,T.BLOCKQUOTE,T.BODY,T.BR,T.CENTER,T.CODE,T.DD,T.DIV,T.DL,T.DT,T.EM,T.EMBED,T.H1,T.H2,T.H3,T.H4,T.H5,T.H6,T.HEAD,T.HR,T.I,T.IMG,T.LI,T.LISTING,T.MENU,T.META,T.NOBR,T.OL,T.P,T.PRE,T.RUBY,T.S,T.SMALL,T.SPAN,T.STRONG,T.STRIKE,T.SUB,T.SUP,T.TABLE,T.TT,T.U,T.UL,T.VAR]);function EK(e){const t=e.tagID;return t===T.FONT&&e.attrs.some(({name:r})=>r===go.COLOR||r===go.SIZE||r===go.FACE)||xK.has(t)}function k6(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===mK){e.attrs[t].name=pK;break}}function N6(e){for(let t=0;t<e.attrs.length;t++){const n=gK.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function sE(e){for(let t=0;t<e.attrs.length;t++){const n=bK.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function vK(e){const t=yK.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=yu(e.tagName))}function TK(e,t){return t===xe.MATHML&&(e===T.MI||e===T.MO||e===T.MN||e===T.MS||e===T.MTEXT)}function SK(e,t,n){if(t===xe.MATHML&&e===T.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===go.ENCODING){const s=n[r].value.toLowerCase();return s===PA.TEXT_HTML||s===PA.APPLICATION_XML}}return t===xe.SVG&&(e===T.FOREIGN_OBJECT||e===T.DESC||e===T.TITLE)}function wK(e,t,n,r){return(!r||r===xe.HTML)&&SK(e,t,n)||(!r||r===xe.MATHML)&&TK(e,t)}const CK="hidden",AK=8,_K=3;var Y;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(Y||(Y={}));const kK={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},R6=new Set([T.TABLE,T.TBODY,T.TFOOT,T.THEAD,T.TR]),jA={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:ia,onParseError:null};class BA{constructor(t,n,r=null,s=null){this.fragmentContext=r,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=Y.INITIAL,this.originalInsertionMode=Y.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...jA,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new ZQ(this.options,this),this.activeFormattingElements=new aK(this.treeAdapter),this.fragmentContextID=r?yu(this.treeAdapter.getTagName(r)):T.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new sK(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...jA,...n};t??(t=r.treeAdapter.createElement(ee.TEMPLATE,xe.HTML,[]));const s=r.treeAdapter.createElement("documentmock",xe.HTML,[]),o=new this(r,s,t);return o.fragmentContextID===T.TEMPLATE&&o.tmplInsertionModeStack.unshift(Y.IN_TEMPLATE),o._initTokenizerForFragmentParsing(),o._insertFakeRootElement(),o._resetInsertionMode(),o._findFormInFragmentContext(),o}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var s;if(!this.onParseError)return;const o=(s=t.location)!==null&&s!==void 0?s:kK,l={code:n,startLine:o.startLine,startCol:o.startCol,startOffset:o.startOffset,endLine:r?o.startLine:o.endLine,endCol:r?o.startCol:o.endCol,endOffset:r?o.startOffset:o.endOffset};this.onParseError(l)}onItemPush(t,n,r){var s,o;(o=(s=this.treeAdapter).onItemPush)===null||o===void 0||o.call(s,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,s;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(s=(r=this.treeAdapter).onItemPop)===null||s===void 0||s.call(r,t,this.openElements.current),n){let o,l;this.openElements.stackTop===0&&this.fragmentContext?(o=this.fragmentContext,l=this.fragmentContextID):{current:o,currentTagId:l}=this.openElements,this._setContextModes(o,l)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===xe.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,xe.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=Y.TEXT}switchToPlaintextParsing(){this.insertionMode=Y.TEXT,this.originalInsertionMode=Y.IN_BODY,this.tokenizer.state=hn.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===ee.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==xe.HTML))switch(this.fragmentContextID){case T.TITLE:case T.TEXTAREA:{this.tokenizer.state=hn.RCDATA;break}case T.STYLE:case T.XMP:case T.IFRAME:case T.NOEMBED:case T.NOFRAMES:case T.NOSCRIPT:{this.tokenizer.state=hn.RAWTEXT;break}case T.SCRIPT:{this.tokenizer.state=hn.SCRIPT_DATA;break}case T.PLAINTEXT:{this.tokenizer.state=hn.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",s=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,s),t.location){const l=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));l&&this.treeAdapter.setNodeSourceCodeLocation(l,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,xe.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,xe.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(ee.HTML,xe.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,T.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const s=this.treeAdapter.getChildNodes(n),o=r?s.lastIndexOf(r):s.length,l=s[o-1];if(this.treeAdapter.getNodeSourceCodeLocation(l)){const{endLine:f,endCol:d,endOffset:m}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(l,{endLine:f,endCol:d,endOffset:m})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(l,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,s=this.treeAdapter.getTagName(t),o=n.type===ct.END_TAG&&s===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,o)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===T.SVG&&this.treeAdapter.getTagName(n)===ee.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===xe.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===T.MGLYPH||t.tagID===T.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,xe.HTML)}_processToken(t){switch(t.type){case ct.CHARACTER:{this.onCharacter(t);break}case ct.NULL_CHARACTER:{this.onNullCharacter(t);break}case ct.COMMENT:{this.onComment(t);break}case ct.DOCTYPE:{this.onDoctype(t);break}case ct.START_TAG:{this._processStartTag(t);break}case ct.END_TAG:{this.onEndTag(t);break}case ct.EOF:{this.onEof(t);break}case ct.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const s=this.treeAdapter.getNamespaceURI(n),o=this.treeAdapter.getAttrList(n);return wK(t,s,o,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===Di.Marker||this.openElements.contains(s.element)),r=n===-1?t-1:n-1;for(let s=r;s>=0;s--){const o=this.activeFormattingElements.entries[s];this._insertElement(o.token,this.treeAdapter.getNamespaceURI(o.element)),o.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=Y.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(T.P),this.openElements.popUntilTagNamePopped(T.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case T.TR:{this.insertionMode=Y.IN_ROW;return}case T.TBODY:case T.THEAD:case T.TFOOT:{this.insertionMode=Y.IN_TABLE_BODY;return}case T.CAPTION:{this.insertionMode=Y.IN_CAPTION;return}case T.COLGROUP:{this.insertionMode=Y.IN_COLUMN_GROUP;return}case T.TABLE:{this.insertionMode=Y.IN_TABLE;return}case T.BODY:{this.insertionMode=Y.IN_BODY;return}case T.FRAMESET:{this.insertionMode=Y.IN_FRAMESET;return}case T.SELECT:{this._resetInsertionModeForSelect(t);return}case T.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case T.HTML:{this.insertionMode=this.headElement?Y.AFTER_HEAD:Y.BEFORE_HEAD;return}case T.TD:case T.TH:{if(t>0){this.insertionMode=Y.IN_CELL;return}break}case T.HEAD:{if(t>0){this.insertionMode=Y.IN_HEAD;return}break}}this.insertionMode=Y.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===T.TEMPLATE)break;if(r===T.TABLE){this.insertionMode=Y.IN_SELECT_IN_TABLE;return}}this.insertionMode=Y.IN_SELECT}_isElementCausesFosterParenting(t){return R6.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case T.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===xe.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case T.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return QQ[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){iW(this,t);return}switch(this.insertionMode){case Y.INITIAL:{bc(this,t);break}case Y.BEFORE_HTML:{Uc(this,t);break}case Y.BEFORE_HEAD:{Hc(this,t);break}case Y.IN_HEAD:{zc(this,t);break}case Y.IN_HEAD_NO_SCRIPT:{Vc(this,t);break}case Y.AFTER_HEAD:{qc(this,t);break}case Y.IN_BODY:case Y.IN_CAPTION:case Y.IN_CELL:case Y.IN_TEMPLATE:{O6(this,t);break}case Y.TEXT:case Y.IN_SELECT:case Y.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case Y.IN_TABLE:case Y.IN_TABLE_BODY:case Y.IN_ROW:{_1(this,t);break}case Y.IN_TABLE_TEXT:{B6(this,t);break}case Y.IN_COLUMN_GROUP:{bm(this,t);break}case Y.AFTER_BODY:{ym(this,t);break}case Y.AFTER_AFTER_BODY:{$h(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){rW(this,t);return}switch(this.insertionMode){case Y.INITIAL:{bc(this,t);break}case Y.BEFORE_HTML:{Uc(this,t);break}case Y.BEFORE_HEAD:{Hc(this,t);break}case Y.IN_HEAD:{zc(this,t);break}case Y.IN_HEAD_NO_SCRIPT:{Vc(this,t);break}case Y.AFTER_HEAD:{qc(this,t);break}case Y.TEXT:{this._insertCharacters(t);break}case Y.IN_TABLE:case Y.IN_TABLE_BODY:case Y.IN_ROW:{_1(this,t);break}case Y.IN_COLUMN_GROUP:{bm(this,t);break}case Y.AFTER_BODY:{ym(this,t);break}case Y.AFTER_AFTER_BODY:{$h(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){ay(this,t);return}switch(this.insertionMode){case Y.INITIAL:case Y.BEFORE_HTML:case Y.BEFORE_HEAD:case Y.IN_HEAD:case Y.IN_HEAD_NO_SCRIPT:case Y.AFTER_HEAD:case Y.IN_BODY:case Y.IN_TABLE:case Y.IN_CAPTION:case Y.IN_COLUMN_GROUP:case Y.IN_TABLE_BODY:case Y.IN_ROW:case Y.IN_CELL:case Y.IN_SELECT:case Y.IN_SELECT_IN_TABLE:case Y.IN_TEMPLATE:case Y.IN_FRAMESET:case Y.AFTER_FRAMESET:{ay(this,t);break}case Y.IN_TABLE_TEXT:{yc(this,t);break}case Y.AFTER_BODY:{LK(this,t);break}case Y.AFTER_AFTER_BODY:case Y.AFTER_AFTER_FRAMESET:{PK(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case Y.INITIAL:{jK(this,t);break}case Y.BEFORE_HEAD:case Y.IN_HEAD:case Y.IN_HEAD_NO_SCRIPT:case Y.AFTER_HEAD:{this._err(t,ce.misplacedDoctype);break}case Y.IN_TABLE_TEXT:{yc(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,ce.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?sW(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case Y.INITIAL:{bc(this,t);break}case Y.BEFORE_HTML:{BK(this,t);break}case Y.BEFORE_HEAD:{UK(this,t);break}case Y.IN_HEAD:{Ei(this,t);break}case Y.IN_HEAD_NO_SCRIPT:{VK(this,t);break}case Y.AFTER_HEAD:{$K(this,t);break}case Y.IN_BODY:{Xn(this,t);break}case Y.IN_TABLE:{ru(this,t);break}case Y.IN_TABLE_TEXT:{yc(this,t);break}case Y.IN_CAPTION:{HX(this,t);break}case Y.IN_COLUMN_GROUP:{lE(this,t);break}case Y.IN_TABLE_BODY:{op(this,t);break}case Y.IN_ROW:{lp(this,t);break}case Y.IN_CELL:{qX(this,t);break}case Y.IN_SELECT:{H6(this,t);break}case Y.IN_SELECT_IN_TABLE:{YX(this,t);break}case Y.IN_TEMPLATE:{QX(this,t);break}case Y.AFTER_BODY:{XX(this,t);break}case Y.IN_FRAMESET:{WX(this,t);break}case Y.AFTER_FRAMESET:{JX(this,t);break}case Y.AFTER_AFTER_BODY:{tW(this,t);break}case Y.AFTER_AFTER_FRAMESET:{nW(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?aW(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case Y.INITIAL:{bc(this,t);break}case Y.BEFORE_HTML:{FK(this,t);break}case Y.BEFORE_HEAD:{HK(this,t);break}case Y.IN_HEAD:{zK(this,t);break}case Y.IN_HEAD_NO_SCRIPT:{qK(this,t);break}case Y.AFTER_HEAD:{YK(this,t);break}case Y.IN_BODY:{ap(this,t);break}case Y.TEXT:{DX(this,t);break}case Y.IN_TABLE:{ff(this,t);break}case Y.IN_TABLE_TEXT:{yc(this,t);break}case Y.IN_CAPTION:{zX(this,t);break}case Y.IN_COLUMN_GROUP:{VX(this,t);break}case Y.IN_TABLE_BODY:{oy(this,t);break}case Y.IN_ROW:{U6(this,t);break}case Y.IN_CELL:{$X(this,t);break}case Y.IN_SELECT:{z6(this,t);break}case Y.IN_SELECT_IN_TABLE:{GX(this,t);break}case Y.IN_TEMPLATE:{KX(this,t);break}case Y.AFTER_BODY:{q6(this,t);break}case Y.IN_FRAMESET:{ZX(this,t);break}case Y.AFTER_FRAMESET:{eW(this,t);break}case Y.AFTER_AFTER_BODY:{$h(this,t);break}}}onEof(t){switch(this.insertionMode){case Y.INITIAL:{bc(this,t);break}case Y.BEFORE_HTML:{Uc(this,t);break}case Y.BEFORE_HEAD:{Hc(this,t);break}case Y.IN_HEAD:{zc(this,t);break}case Y.IN_HEAD_NO_SCRIPT:{Vc(this,t);break}case Y.AFTER_HEAD:{qc(this,t);break}case Y.IN_BODY:case Y.IN_TABLE:case Y.IN_CAPTION:case Y.IN_COLUMN_GROUP:case Y.IN_TABLE_BODY:case Y.IN_ROW:case Y.IN_CELL:case Y.IN_SELECT:case Y.IN_SELECT_IN_TABLE:{P6(this,t);break}case Y.TEXT:{OX(this,t);break}case Y.IN_TABLE_TEXT:{yc(this,t);break}case Y.IN_TEMPLATE:{V6(this,t);break}case Y.AFTER_BODY:case Y.IN_FRAMESET:case Y.AFTER_FRAMESET:case Y.AFTER_AFTER_BODY:case Y.AFTER_AFTER_FRAMESET:{oE(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===F.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case Y.IN_HEAD:case Y.IN_HEAD_NO_SCRIPT:case Y.AFTER_HEAD:case Y.TEXT:case Y.IN_COLUMN_GROUP:case Y.IN_SELECT:case Y.IN_SELECT_IN_TABLE:case Y.IN_FRAMESET:case Y.AFTER_FRAMESET:{this._insertCharacters(t);break}case Y.IN_BODY:case Y.IN_CAPTION:case Y.IN_CELL:case Y.IN_TEMPLATE:case Y.AFTER_BODY:case Y.AFTER_AFTER_BODY:case Y.AFTER_AFTER_FRAMESET:{D6(this,t);break}case Y.IN_TABLE:case Y.IN_TABLE_BODY:case Y.IN_ROW:{_1(this,t);break}case Y.IN_TABLE_TEXT:{j6(this,t);break}}}}function NK(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):L6(e,t),n}function RK(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const s=e.openElements.items[r];if(s===t.element)break;e._isSpecialElement(s,e.openElements.tagIDs[r])&&(n=s)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function DK(e,t,n){let r=t,s=e.openElements.getCommonAncestor(t);for(let o=0,l=s;l!==n;o++,l=s){s=e.openElements.getCommonAncestor(l);const c=e.activeFormattingElements.getElementEntry(l),f=c&&o>=_K;!c||f?(f&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(l)):(l=OK(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(l,r),r=l)}return r}function OK(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function MK(e,t,n){const r=e.treeAdapter.getTagName(t),s=yu(r);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(n);else{const o=e.treeAdapter.getNamespaceURI(t);s===T.TEMPLATE&&o===xe.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function IK(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:s}=n,o=e.treeAdapter.createElement(s.tagName,r,s.attrs);e._adoptNodes(t,o),e.treeAdapter.appendChild(t,o),e.activeFormattingElements.insertElementAfterBookmark(o,s),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,o,s.tagID)}function aE(e,t){for(let n=0;n<AK;n++){const r=NK(e,t);if(!r)break;const s=RK(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const o=DK(e,s,r.element),l=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(o),l&&MK(e,l,o),IK(e,s,r)}}function ay(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function LK(e,t){e._appendCommentNode(t,e.openElements.items[0])}function PK(e,t){e._appendCommentNode(t,e.document)}function oE(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],s=e.treeAdapter.getNodeSourceCodeLocation(r);if(s&&!s.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const o=e.openElements.items[1],l=e.treeAdapter.getNodeSourceCodeLocation(o);l&&!l.endTag&&e._setEndLocation(o,t)}}}}function jK(e,t){e._setDocumentType(t);const n=t.forceQuirks?Zr.QUIRKS:hK(t);dK(t)||e._err(t,ce.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=Y.BEFORE_HTML}function bc(e,t){e._err(t,ce.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Zr.QUIRKS),e.insertionMode=Y.BEFORE_HTML,e._processToken(t)}function BK(e,t){t.tagID===T.HTML?(e._insertElement(t,xe.HTML),e.insertionMode=Y.BEFORE_HEAD):Uc(e,t)}function FK(e,t){const n=t.tagID;(n===T.HTML||n===T.HEAD||n===T.BODY||n===T.BR)&&Uc(e,t)}function Uc(e,t){e._insertFakeRootElement(),e.insertionMode=Y.BEFORE_HEAD,e._processToken(t)}function UK(e,t){switch(t.tagID){case T.HTML:{Xn(e,t);break}case T.HEAD:{e._insertElement(t,xe.HTML),e.headElement=e.openElements.current,e.insertionMode=Y.IN_HEAD;break}default:Hc(e,t)}}function HK(e,t){const n=t.tagID;n===T.HEAD||n===T.BODY||n===T.HTML||n===T.BR?Hc(e,t):e._err(t,ce.endTagWithoutMatchingOpenElement)}function Hc(e,t){e._insertFakeElement(ee.HEAD,T.HEAD),e.headElement=e.openElements.current,e.insertionMode=Y.IN_HEAD,e._processToken(t)}function Ei(e,t){switch(t.tagID){case T.HTML:{Xn(e,t);break}case T.BASE:case T.BASEFONT:case T.BGSOUND:case T.LINK:case T.META:{e._appendElement(t,xe.HTML),t.ackSelfClosing=!0;break}case T.TITLE:{e._switchToTextParsing(t,hn.RCDATA);break}case T.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,hn.RAWTEXT):(e._insertElement(t,xe.HTML),e.insertionMode=Y.IN_HEAD_NO_SCRIPT);break}case T.NOFRAMES:case T.STYLE:{e._switchToTextParsing(t,hn.RAWTEXT);break}case T.SCRIPT:{e._switchToTextParsing(t,hn.SCRIPT_DATA);break}case T.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=Y.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(Y.IN_TEMPLATE);break}case T.HEAD:{e._err(t,ce.misplacedStartTagForHeadElement);break}default:zc(e,t)}}function zK(e,t){switch(t.tagID){case T.HEAD:{e.openElements.pop(),e.insertionMode=Y.AFTER_HEAD;break}case T.BODY:case T.BR:case T.HTML:{zc(e,t);break}case T.TEMPLATE:{Mo(e,t);break}default:e._err(t,ce.endTagWithoutMatchingOpenElement)}}function Mo(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==T.TEMPLATE&&e._err(t,ce.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(T.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,ce.endTagWithoutMatchingOpenElement)}function zc(e,t){e.openElements.pop(),e.insertionMode=Y.AFTER_HEAD,e._processToken(t)}function VK(e,t){switch(t.tagID){case T.HTML:{Xn(e,t);break}case T.BASEFONT:case T.BGSOUND:case T.HEAD:case T.LINK:case T.META:case T.NOFRAMES:case T.STYLE:{Ei(e,t);break}case T.NOSCRIPT:{e._err(t,ce.nestedNoscriptInHead);break}default:Vc(e,t)}}function qK(e,t){switch(t.tagID){case T.NOSCRIPT:{e.openElements.pop(),e.insertionMode=Y.IN_HEAD;break}case T.BR:{Vc(e,t);break}default:e._err(t,ce.endTagWithoutMatchingOpenElement)}}function Vc(e,t){const n=t.type===ct.EOF?ce.openElementsLeftAfterEof:ce.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=Y.IN_HEAD,e._processToken(t)}function $K(e,t){switch(t.tagID){case T.HTML:{Xn(e,t);break}case T.BODY:{e._insertElement(t,xe.HTML),e.framesetOk=!1,e.insertionMode=Y.IN_BODY;break}case T.FRAMESET:{e._insertElement(t,xe.HTML),e.insertionMode=Y.IN_FRAMESET;break}case T.BASE:case T.BASEFONT:case T.BGSOUND:case T.LINK:case T.META:case T.NOFRAMES:case T.SCRIPT:case T.STYLE:case T.TEMPLATE:case T.TITLE:{e._err(t,ce.abandonedHeadElementChild),e.openElements.push(e.headElement,T.HEAD),Ei(e,t),e.openElements.remove(e.headElement);break}case T.HEAD:{e._err(t,ce.misplacedStartTagForHeadElement);break}default:qc(e,t)}}function YK(e,t){switch(t.tagID){case T.BODY:case T.HTML:case T.BR:{qc(e,t);break}case T.TEMPLATE:{Mo(e,t);break}default:e._err(t,ce.endTagWithoutMatchingOpenElement)}}function qc(e,t){e._insertFakeElement(ee.BODY,T.BODY),e.insertionMode=Y.IN_BODY,sp(e,t)}function sp(e,t){switch(t.type){case ct.CHARACTER:{O6(e,t);break}case ct.WHITESPACE_CHARACTER:{D6(e,t);break}case ct.COMMENT:{ay(e,t);break}case ct.START_TAG:{Xn(e,t);break}case ct.END_TAG:{ap(e,t);break}case ct.EOF:{P6(e,t);break}}}function D6(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function O6(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function GK(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function QK(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function KK(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,xe.HTML),e.insertionMode=Y.IN_FRAMESET)}function XK(e,t){e.openElements.hasInButtonScope(T.P)&&e._closePElement(),e._insertElement(t,xe.HTML)}function WK(e,t){e.openElements.hasInButtonScope(T.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&sy.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,xe.HTML)}function ZK(e,t){e.openElements.hasInButtonScope(T.P)&&e._closePElement(),e._insertElement(t,xe.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function JK(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(T.P)&&e._closePElement(),e._insertElement(t,xe.HTML),n||(e.formElement=e.openElements.current))}function eX(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const s=e.openElements.tagIDs[r];if(n===T.LI&&s===T.LI||(n===T.DD||n===T.DT)&&(s===T.DD||s===T.DT)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(s!==T.ADDRESS&&s!==T.DIV&&s!==T.P&&e._isSpecialElement(e.openElements.items[r],s))break}e.openElements.hasInButtonScope(T.P)&&e._closePElement(),e._insertElement(t,xe.HTML)}function tX(e,t){e.openElements.hasInButtonScope(T.P)&&e._closePElement(),e._insertElement(t,xe.HTML),e.tokenizer.state=hn.PLAINTEXT}function nX(e,t){e.openElements.hasInScope(T.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(T.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,xe.HTML),e.framesetOk=!1}function rX(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(ee.A);n&&(aE(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,xe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function iX(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,xe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function sX(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(T.NOBR)&&(aE(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,xe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function aX(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,xe.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function oX(e,t){e.treeAdapter.getDocumentMode(e.document)!==Zr.QUIRKS&&e.openElements.hasInButtonScope(T.P)&&e._closePElement(),e._insertElement(t,xe.HTML),e.framesetOk=!1,e.insertionMode=Y.IN_TABLE}function M6(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,xe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function I6(e){const t=T6(e,go.TYPE);return t!=null&&t.toLowerCase()===CK}function lX(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,xe.HTML),I6(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function uX(e,t){e._appendElement(t,xe.HTML),t.ackSelfClosing=!0}function cX(e,t){e.openElements.hasInButtonScope(T.P)&&e._closePElement(),e._appendElement(t,xe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function fX(e,t){t.tagName=ee.IMG,t.tagID=T.IMG,M6(e,t)}function dX(e,t){e._insertElement(t,xe.HTML),e.skipNextNewLine=!0,e.tokenizer.state=hn.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=Y.TEXT}function hX(e,t){e.openElements.hasInButtonScope(T.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,hn.RAWTEXT)}function mX(e,t){e.framesetOk=!1,e._switchToTextParsing(t,hn.RAWTEXT)}function FA(e,t){e._switchToTextParsing(t,hn.RAWTEXT)}function pX(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,xe.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===Y.IN_TABLE||e.insertionMode===Y.IN_CAPTION||e.insertionMode===Y.IN_TABLE_BODY||e.insertionMode===Y.IN_ROW||e.insertionMode===Y.IN_CELL?Y.IN_SELECT_IN_TABLE:Y.IN_SELECT}function gX(e,t){e.openElements.currentTagId===T.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,xe.HTML)}function bX(e,t){e.openElements.hasInScope(T.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,xe.HTML)}function yX(e,t){e.openElements.hasInScope(T.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(T.RTC),e._insertElement(t,xe.HTML)}function xX(e,t){e._reconstructActiveFormattingElements(),k6(t),sE(t),t.selfClosing?e._appendElement(t,xe.MATHML):e._insertElement(t,xe.MATHML),t.ackSelfClosing=!0}function EX(e,t){e._reconstructActiveFormattingElements(),N6(t),sE(t),t.selfClosing?e._appendElement(t,xe.SVG):e._insertElement(t,xe.SVG),t.ackSelfClosing=!0}function UA(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,xe.HTML)}function Xn(e,t){switch(t.tagID){case T.I:case T.S:case T.B:case T.U:case T.EM:case T.TT:case T.BIG:case T.CODE:case T.FONT:case T.SMALL:case T.STRIKE:case T.STRONG:{iX(e,t);break}case T.A:{rX(e,t);break}case T.H1:case T.H2:case T.H3:case T.H4:case T.H5:case T.H6:{WK(e,t);break}case T.P:case T.DL:case T.OL:case T.UL:case T.DIV:case T.DIR:case T.NAV:case T.MAIN:case T.MENU:case T.ASIDE:case T.CENTER:case T.FIGURE:case T.FOOTER:case T.HEADER:case T.HGROUP:case T.DIALOG:case T.DETAILS:case T.ADDRESS:case T.ARTICLE:case T.SEARCH:case T.SECTION:case T.SUMMARY:case T.FIELDSET:case T.BLOCKQUOTE:case T.FIGCAPTION:{XK(e,t);break}case T.LI:case T.DD:case T.DT:{eX(e,t);break}case T.BR:case T.IMG:case T.WBR:case T.AREA:case T.EMBED:case T.KEYGEN:{M6(e,t);break}case T.HR:{cX(e,t);break}case T.RB:case T.RTC:{bX(e,t);break}case T.RT:case T.RP:{yX(e,t);break}case T.PRE:case T.LISTING:{ZK(e,t);break}case T.XMP:{hX(e,t);break}case T.SVG:{EX(e,t);break}case T.HTML:{GK(e,t);break}case T.BASE:case T.LINK:case T.META:case T.STYLE:case T.TITLE:case T.SCRIPT:case T.BGSOUND:case T.BASEFONT:case T.TEMPLATE:{Ei(e,t);break}case T.BODY:{QK(e,t);break}case T.FORM:{JK(e,t);break}case T.NOBR:{sX(e,t);break}case T.MATH:{xX(e,t);break}case T.TABLE:{oX(e,t);break}case T.INPUT:{lX(e,t);break}case T.PARAM:case T.TRACK:case T.SOURCE:{uX(e,t);break}case T.IMAGE:{fX(e,t);break}case T.BUTTON:{nX(e,t);break}case T.APPLET:case T.OBJECT:case T.MARQUEE:{aX(e,t);break}case T.IFRAME:{mX(e,t);break}case T.SELECT:{pX(e,t);break}case T.OPTION:case T.OPTGROUP:{gX(e,t);break}case T.NOEMBED:case T.NOFRAMES:{FA(e,t);break}case T.FRAMESET:{KK(e,t);break}case T.TEXTAREA:{dX(e,t);break}case T.NOSCRIPT:{e.options.scriptingEnabled?FA(e,t):UA(e,t);break}case T.PLAINTEXT:{tX(e,t);break}case T.COL:case T.TH:case T.TD:case T.TR:case T.HEAD:case T.FRAME:case T.TBODY:case T.TFOOT:case T.THEAD:case T.CAPTION:case T.COLGROUP:break;default:UA(e,t)}}function vX(e,t){if(e.openElements.hasInScope(T.BODY)&&(e.insertionMode=Y.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function TX(e,t){e.openElements.hasInScope(T.BODY)&&(e.insertionMode=Y.AFTER_BODY,q6(e,t))}function SX(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function wX(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(T.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(T.FORM):n&&e.openElements.remove(n))}function CX(e){e.openElements.hasInButtonScope(T.P)||e._insertFakeElement(ee.P,T.P),e._closePElement()}function AX(e){e.openElements.hasInListItemScope(T.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(T.LI),e.openElements.popUntilTagNamePopped(T.LI))}function _X(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function kX(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function NX(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function RX(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(ee.BR,T.BR),e.openElements.pop(),e.framesetOk=!1}function L6(e,t){const n=t.tagName,r=t.tagID;for(let s=e.openElements.stackTop;s>0;s--){const o=e.openElements.items[s],l=e.openElements.tagIDs[s];if(r===l&&(r!==T.UNKNOWN||e.treeAdapter.getTagName(o)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=s&&e.openElements.shortenToLength(s);break}if(e._isSpecialElement(o,l))break}}function ap(e,t){switch(t.tagID){case T.A:case T.B:case T.I:case T.S:case T.U:case T.EM:case T.TT:case T.BIG:case T.CODE:case T.FONT:case T.NOBR:case T.SMALL:case T.STRIKE:case T.STRONG:{aE(e,t);break}case T.P:{CX(e);break}case T.DL:case T.UL:case T.OL:case T.DIR:case T.DIV:case T.NAV:case T.PRE:case T.MAIN:case T.MENU:case T.ASIDE:case T.BUTTON:case T.CENTER:case T.FIGURE:case T.FOOTER:case T.HEADER:case T.HGROUP:case T.DIALOG:case T.ADDRESS:case T.ARTICLE:case T.DETAILS:case T.SEARCH:case T.SECTION:case T.SUMMARY:case T.LISTING:case T.FIELDSET:case T.BLOCKQUOTE:case T.FIGCAPTION:{SX(e,t);break}case T.LI:{AX(e);break}case T.DD:case T.DT:{_X(e,t);break}case T.H1:case T.H2:case T.H3:case T.H4:case T.H5:case T.H6:{kX(e);break}case T.BR:{RX(e);break}case T.BODY:{vX(e,t);break}case T.HTML:{TX(e,t);break}case T.FORM:{wX(e);break}case T.APPLET:case T.OBJECT:case T.MARQUEE:{NX(e,t);break}case T.TEMPLATE:{Mo(e,t);break}default:L6(e,t)}}function P6(e,t){e.tmplInsertionModeStack.length>0?V6(e,t):oE(e,t)}function DX(e,t){var n;t.tagID===T.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function OX(e,t){e._err(t,ce.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function _1(e,t){if(e.openElements.currentTagId!==void 0&&R6.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=Y.IN_TABLE_TEXT,t.type){case ct.CHARACTER:{B6(e,t);break}case ct.WHITESPACE_CHARACTER:{j6(e,t);break}}else jf(e,t)}function MX(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,xe.HTML),e.insertionMode=Y.IN_CAPTION}function IX(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,xe.HTML),e.insertionMode=Y.IN_COLUMN_GROUP}function LX(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(ee.COLGROUP,T.COLGROUP),e.insertionMode=Y.IN_COLUMN_GROUP,lE(e,t)}function PX(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,xe.HTML),e.insertionMode=Y.IN_TABLE_BODY}function jX(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(ee.TBODY,T.TBODY),e.insertionMode=Y.IN_TABLE_BODY,op(e,t)}function BX(e,t){e.openElements.hasInTableScope(T.TABLE)&&(e.openElements.popUntilTagNamePopped(T.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function FX(e,t){I6(t)?e._appendElement(t,xe.HTML):jf(e,t),t.ackSelfClosing=!0}function UX(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,xe.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function ru(e,t){switch(t.tagID){case T.TD:case T.TH:case T.TR:{jX(e,t);break}case T.STYLE:case T.SCRIPT:case T.TEMPLATE:{Ei(e,t);break}case T.COL:{LX(e,t);break}case T.FORM:{UX(e,t);break}case T.TABLE:{BX(e,t);break}case T.TBODY:case T.TFOOT:case T.THEAD:{PX(e,t);break}case T.INPUT:{FX(e,t);break}case T.CAPTION:{MX(e,t);break}case T.COLGROUP:{IX(e,t);break}default:jf(e,t)}}function ff(e,t){switch(t.tagID){case T.TABLE:{e.openElements.hasInTableScope(T.TABLE)&&(e.openElements.popUntilTagNamePopped(T.TABLE),e._resetInsertionMode());break}case T.TEMPLATE:{Mo(e,t);break}case T.BODY:case T.CAPTION:case T.COL:case T.COLGROUP:case T.HTML:case T.TBODY:case T.TD:case T.TFOOT:case T.TH:case T.THEAD:case T.TR:break;default:jf(e,t)}}function jf(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,sp(e,t),e.fosterParentingEnabled=n}function j6(e,t){e.pendingCharacterTokens.push(t)}function B6(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function yc(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)jf(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const F6=new Set([T.CAPTION,T.COL,T.COLGROUP,T.TBODY,T.TD,T.TFOOT,T.TH,T.THEAD,T.TR]);function HX(e,t){const n=t.tagID;F6.has(n)?e.openElements.hasInTableScope(T.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(T.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Y.IN_TABLE,ru(e,t)):Xn(e,t)}function zX(e,t){const n=t.tagID;switch(n){case T.CAPTION:case T.TABLE:{e.openElements.hasInTableScope(T.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(T.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Y.IN_TABLE,n===T.TABLE&&ff(e,t));break}case T.BODY:case T.COL:case T.COLGROUP:case T.HTML:case T.TBODY:case T.TD:case T.TFOOT:case T.TH:case T.THEAD:case T.TR:break;default:ap(e,t)}}function lE(e,t){switch(t.tagID){case T.HTML:{Xn(e,t);break}case T.COL:{e._appendElement(t,xe.HTML),t.ackSelfClosing=!0;break}case T.TEMPLATE:{Ei(e,t);break}default:bm(e,t)}}function VX(e,t){switch(t.tagID){case T.COLGROUP:{e.openElements.currentTagId===T.COLGROUP&&(e.openElements.pop(),e.insertionMode=Y.IN_TABLE);break}case T.TEMPLATE:{Mo(e,t);break}case T.COL:break;default:bm(e,t)}}function bm(e,t){e.openElements.currentTagId===T.COLGROUP&&(e.openElements.pop(),e.insertionMode=Y.IN_TABLE,e._processToken(t))}function op(e,t){switch(t.tagID){case T.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,xe.HTML),e.insertionMode=Y.IN_ROW;break}case T.TH:case T.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(ee.TR,T.TR),e.insertionMode=Y.IN_ROW,lp(e,t);break}case T.CAPTION:case T.COL:case T.COLGROUP:case T.TBODY:case T.TFOOT:case T.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE,ru(e,t));break}default:ru(e,t)}}function oy(e,t){const n=t.tagID;switch(t.tagID){case T.TBODY:case T.TFOOT:case T.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE);break}case T.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE,ff(e,t));break}case T.BODY:case T.CAPTION:case T.COL:case T.COLGROUP:case T.HTML:case T.TD:case T.TH:case T.TR:break;default:ff(e,t)}}function lp(e,t){switch(t.tagID){case T.TH:case T.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,xe.HTML),e.insertionMode=Y.IN_CELL,e.activeFormattingElements.insertMarker();break}case T.CAPTION:case T.COL:case T.COLGROUP:case T.TBODY:case T.TFOOT:case T.THEAD:case T.TR:{e.openElements.hasInTableScope(T.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE_BODY,op(e,t));break}default:ru(e,t)}}function U6(e,t){switch(t.tagID){case T.TR:{e.openElements.hasInTableScope(T.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE_BODY);break}case T.TABLE:{e.openElements.hasInTableScope(T.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE_BODY,oy(e,t));break}case T.TBODY:case T.TFOOT:case T.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(T.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE_BODY,oy(e,t));break}case T.BODY:case T.CAPTION:case T.COL:case T.COLGROUP:case T.HTML:case T.TD:case T.TH:break;default:ff(e,t)}}function qX(e,t){const n=t.tagID;F6.has(n)?(e.openElements.hasInTableScope(T.TD)||e.openElements.hasInTableScope(T.TH))&&(e._closeTableCell(),lp(e,t)):Xn(e,t)}function $X(e,t){const n=t.tagID;switch(n){case T.TD:case T.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Y.IN_ROW);break}case T.TABLE:case T.TBODY:case T.TFOOT:case T.THEAD:case T.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),U6(e,t));break}case T.BODY:case T.CAPTION:case T.COL:case T.COLGROUP:case T.HTML:break;default:ap(e,t)}}function H6(e,t){switch(t.tagID){case T.HTML:{Xn(e,t);break}case T.OPTION:{e.openElements.currentTagId===T.OPTION&&e.openElements.pop(),e._insertElement(t,xe.HTML);break}case T.OPTGROUP:{e.openElements.currentTagId===T.OPTION&&e.openElements.pop(),e.openElements.currentTagId===T.OPTGROUP&&e.openElements.pop(),e._insertElement(t,xe.HTML);break}case T.HR:{e.openElements.currentTagId===T.OPTION&&e.openElements.pop(),e.openElements.currentTagId===T.OPTGROUP&&e.openElements.pop(),e._appendElement(t,xe.HTML),t.ackSelfClosing=!0;break}case T.INPUT:case T.KEYGEN:case T.TEXTAREA:case T.SELECT:{e.openElements.hasInSelectScope(T.SELECT)&&(e.openElements.popUntilTagNamePopped(T.SELECT),e._resetInsertionMode(),t.tagID!==T.SELECT&&e._processStartTag(t));break}case T.SCRIPT:case T.TEMPLATE:{Ei(e,t);break}}}function z6(e,t){switch(t.tagID){case T.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===T.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===T.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===T.OPTGROUP&&e.openElements.pop();break}case T.OPTION:{e.openElements.currentTagId===T.OPTION&&e.openElements.pop();break}case T.SELECT:{e.openElements.hasInSelectScope(T.SELECT)&&(e.openElements.popUntilTagNamePopped(T.SELECT),e._resetInsertionMode());break}case T.TEMPLATE:{Mo(e,t);break}}}function YX(e,t){const n=t.tagID;n===T.CAPTION||n===T.TABLE||n===T.TBODY||n===T.TFOOT||n===T.THEAD||n===T.TR||n===T.TD||n===T.TH?(e.openElements.popUntilTagNamePopped(T.SELECT),e._resetInsertionMode(),e._processStartTag(t)):H6(e,t)}function GX(e,t){const n=t.tagID;n===T.CAPTION||n===T.TABLE||n===T.TBODY||n===T.TFOOT||n===T.THEAD||n===T.TR||n===T.TD||n===T.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(T.SELECT),e._resetInsertionMode(),e.onEndTag(t)):z6(e,t)}function QX(e,t){switch(t.tagID){case T.BASE:case T.BASEFONT:case T.BGSOUND:case T.LINK:case T.META:case T.NOFRAMES:case T.SCRIPT:case T.STYLE:case T.TEMPLATE:case T.TITLE:{Ei(e,t);break}case T.CAPTION:case T.COLGROUP:case T.TBODY:case T.TFOOT:case T.THEAD:{e.tmplInsertionModeStack[0]=Y.IN_TABLE,e.insertionMode=Y.IN_TABLE,ru(e,t);break}case T.COL:{e.tmplInsertionModeStack[0]=Y.IN_COLUMN_GROUP,e.insertionMode=Y.IN_COLUMN_GROUP,lE(e,t);break}case T.TR:{e.tmplInsertionModeStack[0]=Y.IN_TABLE_BODY,e.insertionMode=Y.IN_TABLE_BODY,op(e,t);break}case T.TD:case T.TH:{e.tmplInsertionModeStack[0]=Y.IN_ROW,e.insertionMode=Y.IN_ROW,lp(e,t);break}default:e.tmplInsertionModeStack[0]=Y.IN_BODY,e.insertionMode=Y.IN_BODY,Xn(e,t)}}function KX(e,t){t.tagID===T.TEMPLATE&&Mo(e,t)}function V6(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(T.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):oE(e,t)}function XX(e,t){t.tagID===T.HTML?Xn(e,t):ym(e,t)}function q6(e,t){var n;if(t.tagID===T.HTML){if(e.fragmentContext||(e.insertionMode=Y.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===T.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else ym(e,t)}function ym(e,t){e.insertionMode=Y.IN_BODY,sp(e,t)}function WX(e,t){switch(t.tagID){case T.HTML:{Xn(e,t);break}case T.FRAMESET:{e._insertElement(t,xe.HTML);break}case T.FRAME:{e._appendElement(t,xe.HTML),t.ackSelfClosing=!0;break}case T.NOFRAMES:{Ei(e,t);break}}}function ZX(e,t){t.tagID===T.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==T.FRAMESET&&(e.insertionMode=Y.AFTER_FRAMESET))}function JX(e,t){switch(t.tagID){case T.HTML:{Xn(e,t);break}case T.NOFRAMES:{Ei(e,t);break}}}function eW(e,t){t.tagID===T.HTML&&(e.insertionMode=Y.AFTER_AFTER_FRAMESET)}function tW(e,t){t.tagID===T.HTML?Xn(e,t):$h(e,t)}function $h(e,t){e.insertionMode=Y.IN_BODY,sp(e,t)}function nW(e,t){switch(t.tagID){case T.HTML:{Xn(e,t);break}case T.NOFRAMES:{Ei(e,t);break}}}function rW(e,t){t.chars=Wt,e._insertCharacters(t)}function iW(e,t){e._insertCharacters(t),e.framesetOk=!1}function $6(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==xe.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function sW(e,t){if(EK(t))$6(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===xe.MATHML?k6(t):r===xe.SVG&&(vK(t),N6(t)),sE(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function aW(e,t){if(t.tagID===T.P||t.tagID===T.BR){$6(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===xe.HTML){e._endTagOutsideForeignContent(t);break}const s=e.treeAdapter.getTagName(r);if(s.toLowerCase()===t.tagName){t.tagName=s,e.openElements.shortenToLength(n);break}}}ee.AREA,ee.BASE,ee.BASEFONT,ee.BGSOUND,ee.BR,ee.COL,ee.EMBED,ee.FRAME,ee.HR,ee.IMG,ee.INPUT,ee.KEYGEN,ee.LINK,ee.META,ee.PARAM,ee.SOURCE,ee.TRACK,ee.WBR;const up=Y6("end"),$i=Y6("start");function Y6(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 G6(e){const t=$i(e),n=up(e);if(t&&n)return{start:t,end:n}}const oW=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,lW=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),HA={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Q6(e,t){const n=yW(e),r=b6("type",{handlers:{root:uW,element:cW,text:fW,comment:X6,doctype:dW,raw:mW},unknown:pW}),s={parser:n?new BA(HA):BA.getFragmentParser(void 0,HA),handle(c){r(c,s)},stitches:!1,options:t||{}};r(e,s),xu(s,$i());const o=n?s.parser.document:s.parser.getFragment(),l=xQ(o,{file:s.options.file});return s.stitches&&nu(l,"comment",function(c,f,d){const m=c;if(m.value.stitch&&d&&f!==void 0){const p=d.children;return p[f]=m.value.stitch,f}}),l.type==="root"&&l.children.length===1&&l.children[0].type===e.type?l.children[0]:l}function K6(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function uW(e,t){K6(e.children,t)}function cW(e,t){gW(e,t),K6(e.children,t),bW(e,t)}function fW(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:ct.CHARACTER,chars:e.value,location:Bf(e)};xu(t,$i(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function dW(e,t){const n={type:ct.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Bf(e)};xu(t,$i(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function hW(e,t){t.stitches=!0;const n=xW(e);if("children"in e&&"children"in n){const r=Q6({type:"root",children:e.children},t.options);n.children=r.children}X6({type:"comment",value:{stitch:n}},t)}function X6(e,t){const n=e.value,r={type:ct.COMMENT,data:n,location:Bf(e)};xu(t,$i(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function mW(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,W6(t,$i(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(oW,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function pW(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))hW(n,t);else{let r="";throw lW.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function xu(e,t){W6(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=hn.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function W6(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function gW(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===hn.PLAINTEXT)return;xu(t,$i(e));const r=t.parser.openElements.current;let s="namespaceURI"in r?r.namespaceURI:io.html;s===io.html&&n==="svg"&&(s=io.svg);const o=wQ({...e,children:[]},{space:s===io.svg?"svg":"html"}),l={type:ct.START_TAG,tagName:n,tagID:yu(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in o?o.attrs:[],location:Bf(e)};t.parser.currentToken=l,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function bW(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&OQ.includes(n)||t.parser.tokenizer.state===hn.PLAINTEXT)return;xu(t,up(e));const r={type:ct.END_TAG,tagName:n,tagID:yu(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Bf(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===hn.RCDATA||t.parser.tokenizer.state===hn.RAWTEXT||t.parser.tokenizer.state===hn.SCRIPT_DATA)&&(t.parser.tokenizer.state=hn.DATA)}function yW(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Bf(e){const t=$i(e)||{line:void 0,column:void 0,offset:void 0},n=up(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function xW(e){return"children"in e?wo({...e,children:[]}):wo(e)}function EW(e){return function(t,n){return Q6(t,{...e,file:n})}}const Wa=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],zA={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Wa,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Wa],h2:[["className","sr-only"]],img:[...Wa,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Wa,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Wa],table:[...Wa],ul:[...Wa,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},sa={}.hasOwnProperty;function vW(e,t){let n={type:"root",children:[]};const r={schema:t?{...zA,...t}:zA,stack:[]},s=Z6(r,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function Z6(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return TW(e,n);case"doctype":return SW(e,n);case"element":return wW(e,n);case"root":return CW(e,n);case"text":return AW(e,n)}}}function TW(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),o={type:"comment",value:r<0?n:n.slice(0,r)};return Ff(o,t),o}}function SW(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Ff(n,t),n}}function wW(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=J6(e,t.children),s=_W(e,t.properties);e.stack.pop();let o=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(o=!0,e.schema.ancestors&&sa.call(e.schema.ancestors,n))){const c=e.schema.ancestors[n];let f=-1;for(o=!1;++f<c.length;)e.stack.includes(c[f])&&(o=!0)}if(!o)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const l={type:"element",tagName:n,properties:s,children:r};return Ff(l,t),l}function CW(e,t){const r={type:"root",children:J6(e,t.children)};return Ff(r,t),r}function AW(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Ff(r,t),r}function J6(e,t){const n=[];if(Array.isArray(t)){const r=t;let s=-1;for(;++s<r.length;){const o=Z6(e,r[s]);o&&(Array.isArray(o)?n.push(...o):n.push(o))}}return n}function _W(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,s=e.schema.required,o=r&&sa.call(r,n)?r[n]:void 0,l=r&&sa.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},f={};let d;for(d in c)if(sa.call(c,d)){const m=c[d];let p=VA(e,qA(o,d),d,m);p==null&&(p=VA(e,qA(l,d),d,m)),p!=null&&(f[d]=p)}if(s&&sa.call(s,n)){const m=s[n];for(d in m)sa.call(m,d)&&!sa.call(f,d)&&(f[d]=m[d])}return f}function VA(e,t,n,r){return t?Array.isArray(r)?kW(e,t,n,r):eM(e,t,n,r):void 0}function kW(e,t,n,r){let s=-1;const o=[];for(;++s<r.length;){const l=eM(e,t,n,r[s]);(typeof l=="number"||typeof l=="string")&&o.push(l)}return o}function eM(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&NW(e,n,r)){if(typeof t=="object"&&t.length>1){let s=!1,o=0;for(;++o<t.length;){const l=t[o];if(l&&typeof l=="object"&&"flags"in l){if(l.test(String(r))){s=!0;break}}else if(l===r){s=!0;break}}if(!s)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function NW(e,t,n){const r=e.schema.protocols&&sa.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const s=String(n),o=s.indexOf(":"),l=s.indexOf("?"),c=s.indexOf("#"),f=s.indexOf("/");if(o<0||f>-1&&o>f||l>-1&&o>l||c>-1&&o>c)return!0;let d=-1;for(;++d<r.length;){const m=r[d];if(o===m.length&&s.slice(0,m.length)===m)return!0}return!1}function Ff(e,t){const n=G6(t);t.data&&(e.data=wo(t.data)),n&&(e.position=n)}function qA(e,t){let n,r=-1;if(e)for(;++r<e.length;){const s=e[r],o=typeof s=="string"?s:s[0];if(o===t)return s;o==="data*"&&(n=s)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function RW(e){return function(t){return vW(t,e)}}function $A(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(t);for(;s!==-1;)r++,s=n.indexOf(t,s+t.length);return r}const sr=Na(/[A-Za-z]/),Qn=Na(/[\dA-Za-z]/),DW=Na(/[#-'*+\--9=?A-Z^-~]/);function xm(e){return e!==null&&(e<32||e===127)}const ly=Na(/\d/),OW=Na(/[\dA-Fa-f]/),MW=Na(/[!-/:-@[-`{-~]/);function ze(e){return e!==null&&e<-2}function jt(e){return e!==null&&(e<0||e===32)}function ht(e){return e===-2||e===-1||e===32}const cp=Na(new RegExp("\\p{P}|\\p{S}","u")),Co=Na(/\s/);function Na(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function IW(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function LW(e,t,n){const s=tp((n||{}).ignore||[]),o=PW(t);let l=-1;for(;++l<o.length;)t6(e,"text",c);function c(d,m){let p=-1,b;for(;++p<m.length;){const x=m[p],S=b?b.children:void 0;if(s(x,S?S.indexOf(x):void 0,b))return;b=x}if(b)return f(d,m)}function f(d,m){const p=m[m.length-1],b=o[l][0],x=o[l][1];let S=0;const C=p.children.indexOf(d);let A=!1,N=[];b.lastIndex=0;let k=b.exec(d.value);for(;k;){const R=k.index,U={index:k.index,input:k.input,stack:[...m,d]};let I=x(...k,U);if(typeof I=="string"&&(I=I.length>0?{type:"text",value:I}:void 0),I===!1?b.lastIndex=R+1:(S!==R&&N.push({type:"text",value:d.value.slice(S,R)}),Array.isArray(I)?N.push(...I):I&&N.push(I),S=R+k[0].length,A=!0),!b.global)break;k=b.exec(d.value)}return A?(S<d.value.length&&N.push({type:"text",value:d.value.slice(S)}),p.children.splice(C,1,...N)):N=[d],C+N.length}}function PW(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 s=n[r];t.push([jW(s[0]),BW(s[1])])}return t}function jW(e){return typeof e=="string"?new RegExp(IW(e),"g"):e}function BW(e){return typeof e=="function"?e:function(){return e}}const k1="phrasing",N1=["autolink","link","image","label"];function FW(){return{transforms:[YW],enter:{literalAutolink:HW,literalAutolinkEmail:R1,literalAutolinkHttp:R1,literalAutolinkWww:R1},exit:{literalAutolink:$W,literalAutolinkEmail:qW,literalAutolinkHttp:zW,literalAutolinkWww:VW}}}function UW(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:k1,notInConstruct:N1},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:k1,notInConstruct:N1},{character:":",before:"[ps]",after:"\\/",inConstruct:k1,notInConstruct:N1}]}}function HW(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function R1(e){this.config.enter.autolinkProtocol.call(this,e)}function zW(e){this.config.exit.autolinkProtocol.call(this,e)}function VW(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 qW(e){this.config.exit.autolinkEmail.call(this,e)}function $W(e){this.exit(e)}function YW(e){LW(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,GW],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),QW]],{ignore:["link","linkReference"]})}function GW(e,t,n,r,s){let o="";if(!tM(s)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!KW(n)))return!1;const l=XW(n+r);if(!l[0])return!1;const c={type:"link",title:null,url:o+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[c,{type:"text",value:l[1]}]:c}function QW(e,t,n,r){return!tM(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function KW(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 XW(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 s=$A(e,"(");let o=$A(e,")");for(;r!==-1&&s>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function tM(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Co(n)||cp(n))&&(!t||n!==47)}function pi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}nM.peek=sZ;function WW(){this.buffer()}function ZW(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function JW(){this.buffer()}function eZ(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function tZ(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=pi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function nZ(e){this.exit(e)}function rZ(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=pi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function iZ(e){this.exit(e)}function sZ(){return"["}function nM(e,t,n,r){const s=n.createTracker(r);let o=s.move("[^");const l=n.enter("footnoteReference"),c=n.enter("reference");return o+=s.move(n.safe(n.associationId(e),{after:"]",before:o})),c(),l(),o+=s.move("]"),o}function aZ(){return{enter:{gfmFootnoteCallString:WW,gfmFootnoteCall:ZW,gfmFootnoteDefinitionLabelString:JW,gfmFootnoteDefinition:eZ},exit:{gfmFootnoteCallString:tZ,gfmFootnoteCall:nZ,gfmFootnoteDefinitionLabelString:rZ,gfmFootnoteDefinition:iZ}}}function oZ(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:nM},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,o,l){const c=o.createTracker(l);let f=c.move("[^");const d=o.enter("footnoteDefinition"),m=o.enter("label");return f+=c.move(o.safe(o.associationId(r),{before:f,after:"]"})),m(),f+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),f+=c.move((t?`
365
+ `:" ")+o.indentLines(o.containerFlow(r,c.current()),t?rM:lZ))),d(),f}}function lZ(e,t,n){return t===0?e:rM(e,t,n)}function rM(e,t,n){return(n?"":" ")+e}const uZ=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];iM.peek=mZ;function cZ(){return{canContainEols:["delete"],enter:{strikethrough:dZ},exit:{strikethrough:hZ}}}function fZ(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:uZ}],handlers:{delete:iM}}}function dZ(e){this.enter({type:"delete",children:[]},e)}function hZ(e){this.exit(e)}function iM(e,t,n,r){const s=n.createTracker(r),o=n.enter("strikethrough");let l=s.move("~~");return l+=n.containerPhrasing(e,{...s.current(),before:l,after:"~"}),l+=s.move("~~"),o(),l}function mZ(){return"~"}function pZ(e){return e.length}function gZ(e,t){const n=t||{},r=(n.align||[]).concat(),s=n.stringLength||pZ,o=[],l=[],c=[],f=[];let d=0,m=-1;for(;++m<e.length;){const w=[],C=[];let A=-1;for(e[m].length>d&&(d=e[m].length);++A<e[m].length;){const N=bZ(e[m][A]);if(n.alignDelimiters!==!1){const k=s(N);C[A]=k,(f[A]===void 0||k>f[A])&&(f[A]=k)}w.push(N)}l[m]=w,c[m]=C}let p=-1;if(typeof r=="object"&&"length"in r)for(;++p<d;)o[p]=YA(r[p]);else{const w=YA(r);for(;++p<d;)o[p]=w}p=-1;const b=[],x=[];for(;++p<d;){const w=o[p];let C="",A="";w===99?(C=":",A=":"):w===108?C=":":w===114&&(A=":");let N=n.alignDelimiters===!1?1:Math.max(1,f[p]-C.length-A.length);const k=C+"-".repeat(N)+A;n.alignDelimiters!==!1&&(N=C.length+N+A.length,N>f[p]&&(f[p]=N),x[p]=N),b[p]=k}l.splice(1,0,b),c.splice(1,0,x),m=-1;const S=[];for(;++m<l.length;){const w=l[m],C=c[m];p=-1;const A=[];for(;++p<d;){const N=w[p]||"";let k="",R="";if(n.alignDelimiters!==!1){const U=f[p]-(C[p]||0),I=o[p];I===114?k=" ".repeat(U):I===99?U%2?(k=" ".repeat(U/2+.5),R=" ".repeat(U/2-.5)):(k=" ".repeat(U/2),R=k):R=" ".repeat(U)}n.delimiterStart!==!1&&!p&&A.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&N==="")&&(n.delimiterStart!==!1||p)&&A.push(" "),n.alignDelimiters!==!1&&A.push(k),A.push(N),n.alignDelimiters!==!1&&A.push(R),n.padding!==!1&&A.push(" "),(n.delimiterEnd!==!1||p!==d-1)&&A.push("|")}S.push(n.delimiterEnd===!1?A.join("").replace(/ +$/,""):A.join(""))}return S.join(`
366
+ `)}function bZ(e){return e==null?"":String(e)}function YA(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 yZ(e,t,n,r){const s=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const l=n.indentLines(n.containerFlow(e,o.current()),xZ);return s(),l}function xZ(e,t,n){return">"+(n?"":" ")+e}function EZ(e,t){return GA(e,t.inConstruct,!0)&&!GA(e,t.notInConstruct,!1)}function GA(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 QA(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
367
+ `&&EZ(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
368
+ `}function vZ(e,t){const n=String(e);let r=n.indexOf(t),s=r,o=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===s?++o>l&&(l=o):o=1,s=r+t.length,r=n.indexOf(t,s);return l}function TZ(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 SZ(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 wZ(e,t,n,r){const s=SZ(n),o=e.value||"",l=s==="`"?"GraveAccent":"Tilde";if(TZ(e,n)){const p=n.enter("codeIndented"),b=n.indentLines(o,CZ);return p(),b}const c=n.createTracker(r),f=s.repeat(Math.max(vZ(o,s)+1,3)),d=n.enter("codeFenced");let m=c.move(f);if(e.lang){const p=n.enter(`codeFencedLang${l}`);m+=c.move(n.safe(e.lang,{before:m,after:" ",encode:["`"],...c.current()})),p()}if(e.lang&&e.meta){const p=n.enter(`codeFencedMeta${l}`);m+=c.move(" "),m+=c.move(n.safe(e.meta,{before:m,after:`
369
+ `,encode:["`"],...c.current()})),p()}return m+=c.move(`
370
+ `),o&&(m+=c.move(o+`
371
+ `)),m+=c.move(f),d(),m}function CZ(e,t,n){return(n?"":" ")+e}function uE(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 AZ(e,t,n,r){const s=uE(n),o=s==='"'?"Quote":"Apostrophe",l=n.enter("definition");let c=n.enter("label");const f=n.createTracker(r);let d=f.move("[");return d+=f.move(n.safe(n.associationId(e),{before:d,after:"]",...f.current()})),d+=f.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),d+=f.move("<"),d+=f.move(n.safe(e.url,{before:d,after:">",...f.current()})),d+=f.move(">")):(c=n.enter("destinationRaw"),d+=f.move(n.safe(e.url,{before:d,after:e.title?" ":`
372
+ `,...f.current()}))),c(),e.title&&(c=n.enter(`title${o}`),d+=f.move(" "+s),d+=f.move(n.safe(e.title,{before:d,after:s,...f.current()})),d+=f.move(s),c()),l(),d}function _Z(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 df(e){return"&#x"+e.toString(16).toUpperCase()+";"}function iu(e){if(e===null||jt(e)||Co(e))return 1;if(cp(e))return 2}function Em(e,t,n){const r=iu(e),s=iu(t);return r===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}sM.peek=kZ;function sM(e,t,n,r){const s=_Z(n),o=n.enter("emphasis"),l=n.createTracker(r),c=l.move(s);let f=l.move(n.containerPhrasing(e,{after:s,before:c,...l.current()}));const d=f.charCodeAt(0),m=Em(r.before.charCodeAt(r.before.length-1),d,s);m.inside&&(f=df(d)+f.slice(1));const p=f.charCodeAt(f.length-1),b=Em(r.after.charCodeAt(0),p,s);b.inside&&(f=f.slice(0,-1)+df(p));const x=l.move(s);return o(),n.attentionEncodeSurroundingInfo={after:b.outside,before:m.outside},c+f+x}function kZ(e,t,n){return n.options.emphasis||"*"}const NZ={};function cE(e,t){const n=NZ,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return aM(e,r,s)}function aM(e,t,n){if(RZ(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 KA(e.children,t,n)}return Array.isArray(e)?KA(e,t,n):""}function KA(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=aM(e[s],t,n);return r.join("")}function RZ(e){return!!(e&&typeof e=="object")}function DZ(e,t){let n=!1;return nu(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Jb}),!!((!e.depth||e.depth<3)&&cE(e)&&(t.options.setext||n))}function OZ(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(DZ(e,n)){const m=n.enter("headingSetext"),p=n.enter("phrasing"),b=n.containerPhrasing(e,{...o.current(),before:`
373
+ `,after:`
374
+ `});return p(),m(),b+`
375
+ `+(s===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
376
+ `))+1))}const l="#".repeat(s),c=n.enter("headingAtx"),f=n.enter("phrasing");o.move(l+" ");let d=n.containerPhrasing(e,{before:"# ",after:`
377
+ `,...o.current()});return/^[\t ]/.test(d)&&(d=df(d.charCodeAt(0))+d.slice(1)),d=d?l+" "+d:l,n.options.closeAtx&&(d+=" "+l),f(),c(),d}oM.peek=MZ;function oM(e){return e.value||""}function MZ(){return"<"}lM.peek=IZ;function lM(e,t,n,r){const s=uE(n),o=s==='"'?"Quote":"Apostrophe",l=n.enter("image");let c=n.enter("label");const f=n.createTracker(r);let d=f.move("![");return d+=f.move(n.safe(e.alt,{before:d,after:"]",...f.current()})),d+=f.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),d+=f.move("<"),d+=f.move(n.safe(e.url,{before:d,after:">",...f.current()})),d+=f.move(">")):(c=n.enter("destinationRaw"),d+=f.move(n.safe(e.url,{before:d,after:e.title?" ":")",...f.current()}))),c(),e.title&&(c=n.enter(`title${o}`),d+=f.move(" "+s),d+=f.move(n.safe(e.title,{before:d,after:s,...f.current()})),d+=f.move(s),c()),d+=f.move(")"),l(),d}function IZ(){return"!"}uM.peek=LZ;function uM(e,t,n,r){const s=e.referenceType,o=n.enter("imageReference");let l=n.enter("label");const c=n.createTracker(r);let f=c.move("![");const d=n.safe(e.alt,{before:f,after:"]",...c.current()});f+=c.move(d+"]["),l();const m=n.stack;n.stack=[],l=n.enter("reference");const p=n.safe(n.associationId(e),{before:f,after:"]",...c.current()});return l(),n.stack=m,o(),s==="full"||!d||d!==p?f+=c.move(p+"]"):s==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function LZ(){return"!"}cM.peek=PZ;function cM(e,t,n){let r=e.value||"",s="`",o=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const l=n.unsafe[o],c=n.compilePattern(l);let f;if(l.atBreak)for(;f=c.exec(r);){let d=f.index;r.charCodeAt(d)===10&&r.charCodeAt(d-1)===13&&d--,r=r.slice(0,d)+" "+r.slice(f.index+1)}}return s+r+s}function PZ(){return"`"}function fM(e,t){const n=cE(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}dM.peek=jZ;function dM(e,t,n,r){const s=uE(n),o=s==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let c,f;if(fM(e,n)){const m=n.stack;n.stack=[],c=n.enter("autolink");let p=l.move("<");return p+=l.move(n.containerPhrasing(e,{before:p,after:">",...l.current()})),p+=l.move(">"),c(),n.stack=m,p}c=n.enter("link"),f=n.enter("label");let d=l.move("[");return d+=l.move(n.containerPhrasing(e,{before:d,after:"](",...l.current()})),d+=l.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),d+=l.move("<"),d+=l.move(n.safe(e.url,{before:d,after:">",...l.current()})),d+=l.move(">")):(f=n.enter("destinationRaw"),d+=l.move(n.safe(e.url,{before:d,after:e.title?" ":")",...l.current()}))),f(),e.title&&(f=n.enter(`title${o}`),d+=l.move(" "+s),d+=l.move(n.safe(e.title,{before:d,after:s,...l.current()})),d+=l.move(s),f()),d+=l.move(")"),c(),d}function jZ(e,t,n){return fM(e,n)?"<":"["}hM.peek=BZ;function hM(e,t,n,r){const s=e.referenceType,o=n.enter("linkReference");let l=n.enter("label");const c=n.createTracker(r);let f=c.move("[");const d=n.containerPhrasing(e,{before:f,after:"]",...c.current()});f+=c.move(d+"]["),l();const m=n.stack;n.stack=[],l=n.enter("reference");const p=n.safe(n.associationId(e),{before:f,after:"]",...c.current()});return l(),n.stack=m,o(),s==="full"||!d||d!==p?f+=c.move(p+"]"):s==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function BZ(){return"["}function fE(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 FZ(e){const t=fE(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 UZ(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 mM(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 HZ(e,t,n,r){const s=n.enter("list"),o=n.bulletCurrent;let l=e.ordered?UZ(n):fE(n);const c=e.ordered?l==="."?")":".":FZ(n);let f=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&m&&(!m.children||!m.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&&(f=!0),mM(n)===l&&m){let p=-1;for(;++p<e.children.length;){const b=e.children[p];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){f=!0;break}}}}f&&(l=c),n.bulletCurrent=l;const d=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=o,s(),d}function zZ(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 VZ(e,t,n,r){const s=zZ(n);let o=n.bulletCurrent||fE(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 l=o.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const c=n.createTracker(r);c.move(o+" ".repeat(l-o.length)),c.shift(l);const f=n.enter("listItem"),d=n.indentLines(n.containerFlow(e,c.current()),m);return f(),d;function m(p,b,x){return b?(x?"":" ".repeat(l))+p:(x?o:o+" ".repeat(l-o.length))+p}}function qZ(e,t,n,r){const s=n.enter("paragraph"),o=n.enter("phrasing"),l=n.containerPhrasing(e,r);return o(),s(),l}const $Z=tp(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function YZ(e,t,n,r){return(e.children.some(function(l){return $Z(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function GZ(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}pM.peek=QZ;function pM(e,t,n,r){const s=GZ(n),o=n.enter("strong"),l=n.createTracker(r),c=l.move(s+s);let f=l.move(n.containerPhrasing(e,{after:s,before:c,...l.current()}));const d=f.charCodeAt(0),m=Em(r.before.charCodeAt(r.before.length-1),d,s);m.inside&&(f=df(d)+f.slice(1));const p=f.charCodeAt(f.length-1),b=Em(r.after.charCodeAt(0),p,s);b.inside&&(f=f.slice(0,-1)+df(p));const x=l.move(s+s);return o(),n.attentionEncodeSurroundingInfo={after:b.outside,before:m.outside},c+f+x}function QZ(e,t,n){return n.options.strong||"*"}function KZ(e,t,n,r){return n.safe(e.value,r)}function XZ(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 WZ(e,t,n){const r=(mM(n)+(n.options.ruleSpaces?" ":"")).repeat(XZ(n));return n.options.ruleSpaces?r.slice(0,-1):r}const gM={blockquote:yZ,break:QA,code:wZ,definition:AZ,emphasis:sM,hardBreak:QA,heading:OZ,html:oM,image:lM,imageReference:uM,inlineCode:cM,link:dM,linkReference:hM,list:HZ,listItem:VZ,paragraph:qZ,root:YZ,strong:pM,text:KZ,thematicBreak:WZ},XA=document.createElement("i");function dE(e){const t="&"+e+";";XA.innerHTML=t;const n=XA.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function bM(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)}const ZZ=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function JZ(e){return e.replace(ZZ,eJ)}function eJ(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),o=s===120||s===88;return bM(n.slice(o?2:1),o?16:10)}return dE(n)||e}function tJ(){return{enter:{table:nJ,tableData:WA,tableHeader:WA,tableRow:iJ},exit:{codeText:sJ,table:rJ,tableData:D1,tableHeader:D1,tableRow:D1}}}function nJ(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 rJ(e){this.exit(e),this.data.inTable=void 0}function iJ(e){this.enter({type:"tableRow",children:[]},e)}function D1(e){this.exit(e)}function WA(e){this.enter({type:"tableCell",children:[]},e)}function sJ(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,aJ));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function aJ(e,t){return t==="|"?t:e}function oJ(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
378
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:l,tableCell:f,tableRow:c}};function l(x,S,w,C){return d(m(x,w,C),x.align)}function c(x,S,w,C){const A=p(x,w,C),N=d([A]);return N.slice(0,N.indexOf(`
379
+ `))}function f(x,S,w,C){const A=w.enter("tableCell"),N=w.enter("phrasing"),k=w.containerPhrasing(x,{...C,before:o,after:o});return N(),A(),k}function d(x,S){return gZ(x,{align:S,alignDelimiters:r,padding:n,stringLength:s})}function m(x,S,w){const C=x.children;let A=-1;const N=[],k=S.enter("table");for(;++A<C.length;)N[A]=p(C[A],S,w);return k(),N}function p(x,S,w){const C=x.children;let A=-1;const N=[],k=S.enter("tableRow");for(;++A<C.length;)N[A]=f(C[A],x,S,w);return k(),N}function b(x,S,w){let C=gM.inlineCode(x,S,w);return w.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function lJ(){return{exit:{taskListCheckValueChecked:ZA,taskListCheckValueUnchecked:ZA,paragraph:cJ}}}function uJ(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:fJ}}}function ZA(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function cJ(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 s=t.children;let o=-1,l;for(;++o<s.length;){const c=s[o];if(c.type==="paragraph"){l=c;break}}l===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 fJ(e,t,n,r){const s=e.children[0],o=typeof e.checked=="boolean"&&s&&s.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);o&&c.move(l);let f=gM.listItem(e,t,n,{...r,...c.current()});return o&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,d)),f;function d(m){return m+l}}function dJ(){return[FW(),aZ(),cZ(),tJ(),lJ()]}function hJ(e){return{extensions:[UW(),oZ(e),fZ(),oJ(e),uJ()]}}function Br(e,t,n,r){const s=e.length;let o=0,l;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)l=r.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function Jr(e,t){return e.length>0?(Br(e,e.length,0,t),e):t}const JA={}.hasOwnProperty;function yM(e){const t={};let n=-1;for(;++n<e.length;)mJ(t,e[n]);return t}function mJ(e,t){let n;for(n in t){const s=(JA.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){JA.call(s,l)||(s[l]=[]);const c=o[l];pJ(s[l],Array.isArray(c)?c:c?[c]:[])}}}function pJ(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Br(e,0,0,r)}const gJ={tokenize:TJ,partial:!0},xM={tokenize:SJ,partial:!0},EM={tokenize:wJ,partial:!0},vM={tokenize:CJ,partial:!0},bJ={tokenize:AJ,partial:!0},TM={name:"wwwAutolink",tokenize:EJ,previous:wM},SM={name:"protocolAutolink",tokenize:vJ,previous:CM},Cs={name:"emailAutolink",tokenize:xJ,previous:AM},Yi={};function yJ(){return{text:Yi}}let Za=48;for(;Za<123;)Yi[Za]=Cs,Za++,Za===58?Za=65:Za===91&&(Za=97);Yi[43]=Cs;Yi[45]=Cs;Yi[46]=Cs;Yi[95]=Cs;Yi[72]=[Cs,SM];Yi[104]=[Cs,SM];Yi[87]=[Cs,TM];Yi[119]=[Cs,TM];function xJ(e,t,n){const r=this;let s,o;return l;function l(p){return!uy(p)||!AM.call(r,r.previous)||hE(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(p))}function c(p){return uy(p)?(e.consume(p),c):p===64?(e.consume(p),f):n(p)}function f(p){return p===46?e.check(bJ,m,d)(p):p===45||p===95||Qn(p)?(o=!0,e.consume(p),f):m(p)}function d(p){return e.consume(p),s=!0,f}function m(p){return o&&s&&sr(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function EJ(e,t,n){const r=this;return s;function s(l){return l!==87&&l!==119||!wM.call(r,r.previous)||hE(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(gJ,e.attempt(xM,e.attempt(EM,o),n),n)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function vJ(e,t,n){const r=this;let s="",o=!1;return l;function l(p){return(p===72||p===104)&&CM.call(r,r.previous)&&!hE(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(p),e.consume(p),c):n(p)}function c(p){if(sr(p)&&s.length<5)return s+=String.fromCodePoint(p),e.consume(p),c;if(p===58){const b=s.toLowerCase();if(b==="http"||b==="https")return e.consume(p),f}return n(p)}function f(p){return p===47?(e.consume(p),o?d:(o=!0,f)):n(p)}function d(p){return p===null||xm(p)||jt(p)||Co(p)||cp(p)?n(p):e.attempt(xM,e.attempt(EM,m),n)(p)}function m(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function TJ(e,t,n){let r=0;return s;function s(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),s):l===46&&r===3?(e.consume(l),o):n(l)}function o(l){return l===null?n(l):t(l)}}function SJ(e,t,n){let r,s,o;return l;function l(d){return d===46||d===95?e.check(vM,f,c)(d):d===null||jt(d)||Co(d)||d!==45&&cp(d)?f(d):(o=!0,e.consume(d),l)}function c(d){return d===95?r=!0:(s=r,r=void 0),e.consume(d),l}function f(d){return s||r||!o?n(d):t(d)}}function wJ(e,t){let n=0,r=0;return s;function s(l){return l===40?(n++,e.consume(l),s):l===41&&r<n?o(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(vM,t,o)(l):l===null||jt(l)||Co(l)?t(l):(e.consume(l),s)}function o(l){return l===41&&r++,e.consume(l),s}}function CJ(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),o):c===93?(e.consume(c),s):c===60||c===null||jt(c)||Co(c)?t(c):n(c)}function s(c){return c===null||c===40||c===91||jt(c)||Co(c)?t(c):r(c)}function o(c){return sr(c)?l(c):n(c)}function l(c){return c===59?(e.consume(c),r):sr(c)?(e.consume(c),l):n(c)}}function AJ(e,t,n){return r;function r(o){return e.consume(o),s}function s(o){return Qn(o)?n(o):t(o)}}function wM(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||jt(e)}function CM(e){return!sr(e)}function AM(e){return!(e===47||uy(e))}function uy(e){return e===43||e===45||e===46||e===95||Qn(e)}function hE(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}function Eu(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&Qn(e.charCodeAt(n+1))&&Qn(e.charCodeAt(n+2)))s=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const c=e.charCodeAt(n+1);o<56320&&c>56319&&c<57344?(l=String.fromCharCode(o,c),s=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+s+1,l=""),s&&(n+=s,s=0)}return t.join("")+e.slice(r)}function fp(e,t,n){const r=[];let s=-1;for(;++s<e.length;){const o=e[s].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const cy={name:"attention",resolveAll:_J,tokenize:kJ};function _J(e,t){let n=-1,r,s,o,l,c,f,d,m;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;f=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},b={...e[n][1].start};e_(p,-f),e_(b,f),l={type:f>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},c={type:f>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:b},o={type:f>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},s={type:f>1?"strong":"emphasis",start:{...l.start},end:{...c.end}},e[r][1].end={...l.start},e[n][1].start={...c.end},d=[],e[r][1].end.offset-e[r][1].start.offset&&(d=Jr(d,[["enter",e[r][1],t],["exit",e[r][1],t]])),d=Jr(d,[["enter",s,t],["enter",l,t],["exit",l,t],["enter",o,t]]),d=Jr(d,fp(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),d=Jr(d,[["exit",o,t],["enter",c,t],["exit",c,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,d=Jr(d,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,Br(e,r-1,n-r+3,d),n=r+d.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function kJ(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=iu(r);let o;return l;function l(f){return o=f,e.enter("attentionSequence"),c(f)}function c(f){if(f===o)return e.consume(f),c;const d=e.exit("attentionSequence"),m=iu(f),p=!m||m===2&&s||n.includes(f),b=!s||s===2&&m||n.includes(r);return d._open=!!(o===42?p:p&&(s||!b)),d._close=!!(o===42?b:b&&(m||!p)),t(f)}}function e_(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const NJ={name:"autolink",tokenize:RJ};function RJ(e,t,n){let r=0;return s;function s(x){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(x){return sr(x)?(e.consume(x),l):x===64?n(x):d(x)}function l(x){return x===43||x===45||x===46||Qn(x)?(r=1,c(x)):d(x)}function c(x){return x===58?(e.consume(x),r=0,f):(x===43||x===45||x===46||Qn(x))&&r++<32?(e.consume(x),c):(r=0,d(x))}function f(x){return x===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):x===null||x===32||x===60||xm(x)?n(x):(e.consume(x),f)}function d(x){return x===64?(e.consume(x),m):DW(x)?(e.consume(x),d):n(x)}function m(x){return Qn(x)?p(x):n(x)}function p(x){return x===46?(e.consume(x),r=0,m):x===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):b(x)}function b(x){if((x===45||Qn(x))&&r++<63){const S=x===45?b:p;return e.consume(x),S}return n(x)}}function Et(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(f){return ht(f)?(e.enter(n),c(f)):t(f)}function c(f){return ht(f)&&o++<s?(e.consume(f),c):(e.exit(n),t(f))}}const Uf={partial:!0,tokenize:DJ};function DJ(e,t,n){return r;function r(o){return ht(o)?Et(e,s,"linePrefix")(o):s(o)}function s(o){return o===null||ze(o)?t(o):n(o)}}const _M={continuation:{tokenize:MJ},exit:IJ,name:"blockQuote",tokenize:OJ};function OJ(e,t,n){const r=this;return s;function s(l){if(l===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return n(l)}function o(l){return ht(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function MJ(e,t,n){const r=this;return s;function s(l){return ht(l)?Et(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(_M,t,n)(l)}}function IJ(e){e.exit("blockQuote")}const kM={name:"characterEscape",tokenize:LJ};function LJ(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),s}function s(o){return MW(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const NM={name:"characterReference",tokenize:PJ};function PJ(e,t,n){const r=this;let s=0,o,l;return c;function c(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),f}function f(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),o=31,l=Qn,m(p))}function d(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=OW,m):(e.enter("characterReferenceValue"),o=7,l=ly,m(p))}function m(p){if(p===59&&s){const b=e.exit("characterReferenceValue");return l===Qn&&!dE(r.sliceSerialize(b))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(p)&&s++<o?(e.consume(p),m):n(p)}}const t_={partial:!0,tokenize:BJ},n_={concrete:!0,name:"codeFenced",tokenize:jJ};function jJ(e,t,n){const r=this,s={partial:!0,tokenize:U};let o=0,l=0,c;return f;function f(I){return d(I)}function d(I){const j=r.events[r.events.length-1];return o=j&&j[1].type==="linePrefix"?j[2].sliceSerialize(j[1],!0).length:0,c=I,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(I)}function m(I){return I===c?(l++,e.consume(I),m):l<3?n(I):(e.exit("codeFencedFenceSequence"),ht(I)?Et(e,p,"whitespace")(I):p(I))}function p(I){return I===null||ze(I)?(e.exit("codeFencedFence"),r.interrupt?t(I):e.check(t_,w,R)(I)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(I))}function b(I){return I===null||ze(I)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(I)):ht(I)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Et(e,x,"whitespace")(I)):I===96&&I===c?n(I):(e.consume(I),b)}function x(I){return I===null||ze(I)?p(I):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(I))}function S(I){return I===null||ze(I)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(I)):I===96&&I===c?n(I):(e.consume(I),S)}function w(I){return e.attempt(s,R,C)(I)}function C(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),A}function A(I){return o>0&&ht(I)?Et(e,N,"linePrefix",o+1)(I):N(I)}function N(I){return I===null||ze(I)?e.check(t_,w,R)(I):(e.enter("codeFlowValue"),k(I))}function k(I){return I===null||ze(I)?(e.exit("codeFlowValue"),N(I)):(e.consume(I),k)}function R(I){return e.exit("codeFenced"),t(I)}function U(I,j,M){let $=0;return L;function L(ie){return I.enter("lineEnding"),I.consume(ie),I.exit("lineEnding"),W}function W(ie){return I.enter("codeFencedFence"),ht(ie)?Et(I,K,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ie):K(ie)}function K(ie){return ie===c?(I.enter("codeFencedFenceSequence"),J(ie)):M(ie)}function J(ie){return ie===c?($++,I.consume(ie),J):$>=l?(I.exit("codeFencedFenceSequence"),ht(ie)?Et(I,te,"whitespace")(ie):te(ie)):M(ie)}function te(ie){return ie===null||ze(ie)?(I.exit("codeFencedFence"),j(ie)):M(ie)}}}function BJ(e,t,n){const r=this;return s;function s(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const O1={name:"codeIndented",tokenize:UJ},FJ={partial:!0,tokenize:HJ};function UJ(e,t,n){const r=this;return s;function s(d){return e.enter("codeIndented"),Et(e,o,"linePrefix",5)(d)}function o(d){const m=r.events[r.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?l(d):n(d)}function l(d){return d===null?f(d):ze(d)?e.attempt(FJ,l,f)(d):(e.enter("codeFlowValue"),c(d))}function c(d){return d===null||ze(d)?(e.exit("codeFlowValue"),l(d)):(e.consume(d),c)}function f(d){return e.exit("codeIndented"),t(d)}}function HJ(e,t,n){const r=this;return s;function s(l){return r.parser.lazy[r.now().line]?n(l):ze(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s):Et(e,o,"linePrefix",5)(l)}function o(l){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):ze(l)?s(l):n(l)}}const zJ={name:"codeText",previous:qJ,resolve:VJ,tokenize:$J};function VJ(e){let t=e.length-4,n=3,r,s;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;)s===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(s=r):(r===t||e[r][1].type==="lineEnding")&&(e[s][1].type="codeTextData",r!==s+2&&(e[s][1].end=e[r-1][1].end,e.splice(s+2,r-s-2),t-=r-s-2,r=s+2),s=void 0);return e}function qJ(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function $J(e,t,n){let r=0,s,o;return l;function l(p){return e.enter("codeText"),e.enter("codeTextSequence"),c(p)}function c(p){return p===96?(e.consume(p),r++,c):(e.exit("codeTextSequence"),f(p))}function f(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),f):p===96?(o=e.enter("codeTextSequence"),s=0,m(p)):ze(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),f):(e.enter("codeTextData"),d(p))}function d(p){return p===null||p===32||p===96||ze(p)?(e.exit("codeTextData"),f(p)):(e.consume(p),d)}function m(p){return p===96?(e.consume(p),s++,m):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(o.type="codeTextData",d(p))}}class YJ{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 s=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&xc(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),xc(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),xc(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);xc(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);xc(this.left,n.reverse())}}}function xc(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 RM(e){const t={};let n=-1,r,s,o,l,c,f,d;const m=new YJ(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(r=m.get(n),n&&r[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(f=r[1]._tokenizer.events,o=0,o<f.length&&f[o][1].type==="lineEndingBlank"&&(o+=2),o<f.length&&f[o][1].type==="content"))for(;++o<f.length&&f[o][1].type!=="content";)f[o][1].type==="chunkText"&&(f[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,GJ(m,n)),n=t[n],d=!0);else if(r[1]._container){for(o=n,s=void 0;o--;)if(l=m.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(s&&(m.get(s)[1].type="lineEndingBlank"),l[1].type="lineEnding",s=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;s&&(r[1].end={...m.get(s)[1].start},c=m.slice(s,n),c.unshift(r),m.splice(s,n-s+1,c))}}return Br(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!d}function GJ(e,t){const n=e.get(t)[1],r=e.get(t)[2];let s=t-1;const o=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const c=l.events,f=[],d={};let m,p,b=-1,x=n,S=0,w=0;const C=[w];for(;x;){for(;e.get(++s)[1]!==x;);o.push(s),x._tokenizer||(m=r.sliceStream(x),x.next||m.push(null),p&&l.defineSkip(x.start),x._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(m),x._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),p=x,x=x.next}for(x=n;++b<c.length;)c[b][0]==="exit"&&c[b-1][0]==="enter"&&c[b][1].type===c[b-1][1].type&&c[b][1].start.line!==c[b][1].end.line&&(w=b+1,C.push(w),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(l.events=[],x?(x._tokenizer=void 0,x.previous=void 0):C.pop(),b=C.length;b--;){const A=c.slice(C[b],C[b+1]),N=o.pop();f.push([N,N+A.length-1]),e.splice(N,2,A)}for(f.reverse(),b=-1;++b<f.length;)d[S+f[b][0]]=S+f[b][1],S+=f[b][1]-f[b][0]-1;return d}const QJ={resolve:XJ,tokenize:WJ},KJ={partial:!0,tokenize:ZJ};function XJ(e){return RM(e),e}function WJ(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(c)}function s(c){return c===null?o(c):ze(c)?e.check(KJ,l,o)(c):(e.consume(c),s)}function o(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function l(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function ZJ(e,t,n){const r=this;return s;function s(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Et(e,o,"linePrefix")}function o(l){if(l===null||ze(l))return n(l);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function DM(e,t,n,r,s,o,l,c,f){const d=f||Number.POSITIVE_INFINITY;let m=0;return p;function p(A){return A===60?(e.enter(r),e.enter(s),e.enter(o),e.consume(A),e.exit(o),b):A===null||A===32||A===41||xm(A)?n(A):(e.enter(r),e.enter(l),e.enter(c),e.enter("chunkString",{contentType:"string"}),w(A))}function b(A){return A===62?(e.enter(o),e.consume(A),e.exit(o),e.exit(s),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),x(A))}function x(A){return A===62?(e.exit("chunkString"),e.exit(c),b(A)):A===null||A===60||ze(A)?n(A):(e.consume(A),A===92?S:x)}function S(A){return A===60||A===62||A===92?(e.consume(A),x):x(A)}function w(A){return!m&&(A===null||A===41||jt(A))?(e.exit("chunkString"),e.exit(c),e.exit(l),e.exit(r),t(A)):m<d&&A===40?(e.consume(A),m++,w):A===41?(e.consume(A),m--,w):A===null||A===32||A===40||xm(A)?n(A):(e.consume(A),A===92?C:w)}function C(A){return A===40||A===41||A===92?(e.consume(A),w):w(A)}}function OM(e,t,n,r,s,o){const l=this;let c=0,f;return d;function d(x){return e.enter(r),e.enter(s),e.consume(x),e.exit(s),e.enter(o),m}function m(x){return c>999||x===null||x===91||x===93&&!f||x===94&&!c&&"_hiddenFootnoteSupport"in l.parser.constructs?n(x):x===93?(e.exit(o),e.enter(s),e.consume(x),e.exit(s),e.exit(r),t):ze(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===null||x===91||x===93||ze(x)||c++>999?(e.exit("chunkString"),m(x)):(e.consume(x),f||(f=!ht(x)),x===92?b:p)}function b(x){return x===91||x===92||x===93?(e.consume(x),c++,p):p(x)}}function MM(e,t,n,r,s,o){let l;return c;function c(b){return b===34||b===39||b===40?(e.enter(r),e.enter(s),e.consume(b),e.exit(s),l=b===40?41:b,f):n(b)}function f(b){return b===l?(e.enter(s),e.consume(b),e.exit(s),e.exit(r),t):(e.enter(o),d(b))}function d(b){return b===l?(e.exit(o),f(l)):b===null?n(b):ze(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),Et(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===l||b===null||ze(b)?(e.exit("chunkString"),d(b)):(e.consume(b),b===92?p:m)}function p(b){return b===l||b===92?(e.consume(b),m):m(b)}}function $c(e,t){let n;return r;function r(s){return ze(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):ht(s)?Et(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const JJ={name:"definition",tokenize:tee},eee={partial:!0,tokenize:nee};function tee(e,t,n){const r=this;let s;return o;function o(x){return e.enter("definition"),l(x)}function l(x){return OM.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function c(x){return s=pi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),f):n(x)}function f(x){return jt(x)?$c(e,d)(x):d(x)}function d(x){return DM(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function m(x){return e.attempt(eee,p,p)(x)}function p(x){return ht(x)?Et(e,b,"whitespace")(x):b(x)}function b(x){return x===null||ze(x)?(e.exit("definition"),r.parser.defined.push(s),t(x)):n(x)}}function nee(e,t,n){return r;function r(c){return jt(c)?$c(e,s)(c):n(c)}function s(c){return MM(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function o(c){return ht(c)?Et(e,l,"whitespace")(c):l(c)}function l(c){return c===null||ze(c)?t(c):n(c)}}const ree={name:"hardBreakEscape",tokenize:iee};function iee(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),s}function s(o){return ze(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const see={name:"headingAtx",resolve:aee,tokenize:oee};function aee(e,t){let n=e.length-2,r=3,s,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&&(s={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"},Br(e,r,n-r+1,[["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t]])),e}function oee(e,t,n){let r=0;return s;function s(m){return e.enter("atxHeading"),o(m)}function o(m){return e.enter("atxHeadingSequence"),l(m)}function l(m){return m===35&&r++<6?(e.consume(m),l):m===null||jt(m)?(e.exit("atxHeadingSequence"),c(m)):n(m)}function c(m){return m===35?(e.enter("atxHeadingSequence"),f(m)):m===null||ze(m)?(e.exit("atxHeading"),t(m)):ht(m)?Et(e,c,"whitespace")(m):(e.enter("atxHeadingText"),d(m))}function f(m){return m===35?(e.consume(m),f):(e.exit("atxHeadingSequence"),c(m))}function d(m){return m===null||m===35||jt(m)?(e.exit("atxHeadingText"),c(m)):(e.consume(m),d)}}const lee=["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"],r_=["pre","script","style","textarea"],uee={concrete:!0,name:"htmlFlow",resolveTo:dee,tokenize:hee},cee={partial:!0,tokenize:pee},fee={partial:!0,tokenize:mee};function dee(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 hee(e,t,n){const r=this;let s,o,l,c,f;return d;function d(P){return m(P)}function m(P){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(P),p}function p(P){return P===33?(e.consume(P),b):P===47?(e.consume(P),o=!0,w):P===63?(e.consume(P),s=3,r.interrupt?t:B):sr(P)?(e.consume(P),l=String.fromCharCode(P),C):n(P)}function b(P){return P===45?(e.consume(P),s=2,x):P===91?(e.consume(P),s=5,c=0,S):sr(P)?(e.consume(P),s=4,r.interrupt?t:B):n(P)}function x(P){return P===45?(e.consume(P),r.interrupt?t:B):n(P)}function S(P){const he="CDATA[";return P===he.charCodeAt(c++)?(e.consume(P),c===he.length?r.interrupt?t:K:S):n(P)}function w(P){return sr(P)?(e.consume(P),l=String.fromCharCode(P),C):n(P)}function C(P){if(P===null||P===47||P===62||jt(P)){const he=P===47,ye=l.toLowerCase();return!he&&!o&&r_.includes(ye)?(s=1,r.interrupt?t(P):K(P)):lee.includes(l.toLowerCase())?(s=6,he?(e.consume(P),A):r.interrupt?t(P):K(P)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(P):o?N(P):k(P))}return P===45||Qn(P)?(e.consume(P),l+=String.fromCharCode(P),C):n(P)}function A(P){return P===62?(e.consume(P),r.interrupt?t:K):n(P)}function N(P){return ht(P)?(e.consume(P),N):L(P)}function k(P){return P===47?(e.consume(P),L):P===58||P===95||sr(P)?(e.consume(P),R):ht(P)?(e.consume(P),k):L(P)}function R(P){return P===45||P===46||P===58||P===95||Qn(P)?(e.consume(P),R):U(P)}function U(P){return P===61?(e.consume(P),I):ht(P)?(e.consume(P),U):k(P)}function I(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),f=P,j):ht(P)?(e.consume(P),I):M(P)}function j(P){return P===f?(e.consume(P),f=null,$):P===null||ze(P)?n(P):(e.consume(P),j)}function M(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||jt(P)?U(P):(e.consume(P),M)}function $(P){return P===47||P===62||ht(P)?k(P):n(P)}function L(P){return P===62?(e.consume(P),W):n(P)}function W(P){return P===null||ze(P)?K(P):ht(P)?(e.consume(P),W):n(P)}function K(P){return P===45&&s===2?(e.consume(P),O):P===60&&s===1?(e.consume(P),H):P===62&&s===4?(e.consume(P),V):P===63&&s===3?(e.consume(P),B):P===93&&s===5?(e.consume(P),ne):ze(P)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(cee,re,J)(P)):P===null||ze(P)?(e.exit("htmlFlowData"),J(P)):(e.consume(P),K)}function J(P){return e.check(fee,te,re)(P)}function te(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),ie}function ie(P){return P===null||ze(P)?J(P):(e.enter("htmlFlowData"),K(P))}function O(P){return P===45?(e.consume(P),B):K(P)}function H(P){return P===47?(e.consume(P),l="",q):K(P)}function q(P){if(P===62){const he=l.toLowerCase();return r_.includes(he)?(e.consume(P),V):K(P)}return sr(P)&&l.length<8?(e.consume(P),l+=String.fromCharCode(P),q):K(P)}function ne(P){return P===93?(e.consume(P),B):K(P)}function B(P){return P===62?(e.consume(P),V):P===45&&s===2?(e.consume(P),B):K(P)}function V(P){return P===null||ze(P)?(e.exit("htmlFlowData"),re(P)):(e.consume(P),V)}function re(P){return e.exit("htmlFlow"),t(P)}}function mee(e,t,n){const r=this;return s;function s(l){return ze(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function pee(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Uf,t,n)}}const gee={name:"htmlText",tokenize:bee};function bee(e,t,n){const r=this;let s,o,l;return c;function c(B){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(B),f}function f(B){return B===33?(e.consume(B),d):B===47?(e.consume(B),U):B===63?(e.consume(B),k):sr(B)?(e.consume(B),M):n(B)}function d(B){return B===45?(e.consume(B),m):B===91?(e.consume(B),o=0,S):sr(B)?(e.consume(B),N):n(B)}function m(B){return B===45?(e.consume(B),x):n(B)}function p(B){return B===null?n(B):B===45?(e.consume(B),b):ze(B)?(l=p,H(B)):(e.consume(B),p)}function b(B){return B===45?(e.consume(B),x):p(B)}function x(B){return B===62?O(B):B===45?b(B):p(B)}function S(B){const V="CDATA[";return B===V.charCodeAt(o++)?(e.consume(B),o===V.length?w:S):n(B)}function w(B){return B===null?n(B):B===93?(e.consume(B),C):ze(B)?(l=w,H(B)):(e.consume(B),w)}function C(B){return B===93?(e.consume(B),A):w(B)}function A(B){return B===62?O(B):B===93?(e.consume(B),A):w(B)}function N(B){return B===null||B===62?O(B):ze(B)?(l=N,H(B)):(e.consume(B),N)}function k(B){return B===null?n(B):B===63?(e.consume(B),R):ze(B)?(l=k,H(B)):(e.consume(B),k)}function R(B){return B===62?O(B):k(B)}function U(B){return sr(B)?(e.consume(B),I):n(B)}function I(B){return B===45||Qn(B)?(e.consume(B),I):j(B)}function j(B){return ze(B)?(l=j,H(B)):ht(B)?(e.consume(B),j):O(B)}function M(B){return B===45||Qn(B)?(e.consume(B),M):B===47||B===62||jt(B)?$(B):n(B)}function $(B){return B===47?(e.consume(B),O):B===58||B===95||sr(B)?(e.consume(B),L):ze(B)?(l=$,H(B)):ht(B)?(e.consume(B),$):O(B)}function L(B){return B===45||B===46||B===58||B===95||Qn(B)?(e.consume(B),L):W(B)}function W(B){return B===61?(e.consume(B),K):ze(B)?(l=W,H(B)):ht(B)?(e.consume(B),W):$(B)}function K(B){return B===null||B===60||B===61||B===62||B===96?n(B):B===34||B===39?(e.consume(B),s=B,J):ze(B)?(l=K,H(B)):ht(B)?(e.consume(B),K):(e.consume(B),te)}function J(B){return B===s?(e.consume(B),s=void 0,ie):B===null?n(B):ze(B)?(l=J,H(B)):(e.consume(B),J)}function te(B){return B===null||B===34||B===39||B===60||B===61||B===96?n(B):B===47||B===62||jt(B)?$(B):(e.consume(B),te)}function ie(B){return B===47||B===62||jt(B)?$(B):n(B)}function O(B){return B===62?(e.consume(B),e.exit("htmlTextData"),e.exit("htmlText"),t):n(B)}function H(B){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),q}function q(B){return ht(B)?Et(e,ne,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):ne(B)}function ne(B){return e.enter("htmlTextData"),l(B)}}const mE={name:"labelEnd",resolveAll:vee,resolveTo:Tee,tokenize:See},yee={tokenize:wee},xee={tokenize:Cee},Eee={tokenize:Aee};function vee(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 s=r.type==="labelImage"?4:2;r.type="data",t+=s}}return e.length!==n.length&&Br(e,0,e.length,n),e}function Tee(e,t){let n=e.length,r=0,s,o,l,c;for(;n--;)if(s=e[n][1],o){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(o=n,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(l=n);const f={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},d={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},m={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return c=[["enter",f,t],["enter",d,t]],c=Jr(c,e.slice(o+1,o+r+3)),c=Jr(c,[["enter",m,t]]),c=Jr(c,fp(t.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),t)),c=Jr(c,[["exit",m,t],e[l-2],e[l-1],["exit",d,t]]),c=Jr(c,e.slice(l+1)),c=Jr(c,[["exit",f,t]]),Br(e,o,e.length,c),e}function See(e,t,n){const r=this;let s=r.events.length,o,l;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){o=r.events[s][1];break}return c;function c(b){return o?o._inactive?p(b):(l=r.parser.defined.includes(pi(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),f):n(b)}function f(b){return b===40?e.attempt(yee,m,l?m:p)(b):b===91?e.attempt(xee,m,l?d:p)(b):l?m(b):p(b)}function d(b){return e.attempt(Eee,m,p)(b)}function m(b){return t(b)}function p(b){return o._balanced=!0,n(b)}}function wee(e,t,n){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),s}function s(p){return jt(p)?$c(e,o)(p):o(p)}function o(p){return p===41?m(p):DM(e,l,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function l(p){return jt(p)?$c(e,f)(p):m(p)}function c(p){return n(p)}function f(p){return p===34||p===39||p===40?MM(e,d,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):m(p)}function d(p){return jt(p)?$c(e,m)(p):m(p)}function m(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function Cee(e,t,n){const r=this;return s;function s(c){return OM.call(r,e,o,l,"reference","referenceMarker","referenceString")(c)}function o(c){return r.parser.defined.includes(pi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function l(c){return n(c)}}function Aee(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),s}function s(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const _ee={name:"labelStartImage",resolveAll:mE.resolveAll,tokenize:kee};function kee(e,t,n){const r=this;return s;function s(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),o}function o(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),l):n(c)}function l(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const Nee={name:"labelStartLink",resolveAll:mE.resolveAll,tokenize:Ree};function Ree(e,t,n){const r=this;return s;function s(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const M1={name:"lineEnding",tokenize:Dee};function Dee(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Et(e,t,"linePrefix")}}const Yh={name:"thematicBreak",tokenize:Oee};function Oee(e,t,n){let r=0,s;return o;function o(d){return e.enter("thematicBreak"),l(d)}function l(d){return s=d,c(d)}function c(d){return d===s?(e.enter("thematicBreakSequence"),f(d)):r>=3&&(d===null||ze(d))?(e.exit("thematicBreak"),t(d)):n(d)}function f(d){return d===s?(e.consume(d),r++,f):(e.exit("thematicBreakSequence"),ht(d)?Et(e,c,"whitespace")(d):c(d))}}const Er={continuation:{tokenize:Pee},exit:Bee,name:"list",tokenize:Lee},Mee={partial:!0,tokenize:Fee},Iee={partial:!0,tokenize:jee};function Lee(e,t,n){const r=this,s=r.events[r.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,l=0;return c;function c(x){const S=r.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!r.containerState.marker||x===r.containerState.marker:ly(x)){if(r.containerState.type||(r.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(Yh,n,d)(x):d(x);if(!r.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(x)}return n(x)}function f(x){return ly(x)&&++l<10?(e.consume(x),f):(!r.interrupt||l<2)&&(r.containerState.marker?x===r.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),d(x)):n(x)}function d(x){return e.enter("listItemMarker"),e.consume(x),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||x,e.check(Uf,r.interrupt?n:m,e.attempt(Mee,b,p))}function m(x){return r.containerState.initialBlankLine=!0,o++,b(x)}function p(x){return ht(x)?(e.enter("listItemPrefixWhitespace"),e.consume(x),e.exit("listItemPrefixWhitespace"),b):n(x)}function b(x){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(x)}}function Pee(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Uf,s,o);function s(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Et(e,t,"listItemIndent",r.containerState.size+1)(c)}function o(c){return r.containerState.furtherBlankLines||!ht(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Iee,t,l)(c))}function l(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Et(e,e.attempt(Er,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function jee(e,t,n){const r=this;return Et(e,s,"listItemIndent",r.containerState.size+1);function s(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function Bee(e){e.exit(this.containerState.type)}function Fee(e,t,n){const r=this;return Et(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(o){const l=r.events[r.events.length-1];return!ht(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const i_={name:"setextUnderline",resolveTo:Uee,tokenize:Hee};function Uee(e,t){let n=e.length,r,s,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",o?(e.splice(s,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function Hee(e,t,n){const r=this;let s;return o;function o(d){let m=r.events.length,p;for(;m--;)if(r.events[m][1].type!=="lineEnding"&&r.events[m][1].type!=="linePrefix"&&r.events[m][1].type!=="content"){p=r.events[m][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),s=d,l(d)):n(d)}function l(d){return e.enter("setextHeadingLineSequence"),c(d)}function c(d){return d===s?(e.consume(d),c):(e.exit("setextHeadingLineSequence"),ht(d)?Et(e,f,"lineSuffix")(d):f(d))}function f(d){return d===null||ze(d)?(e.exit("setextHeadingLine"),t(d)):n(d)}}const zee={tokenize:Xee,partial:!0};function Vee(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Gee,continuation:{tokenize:Qee},exit:Kee}},text:{91:{name:"gfmFootnoteCall",tokenize:Yee},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:qee,resolveTo:$ee}}}}function qee(e,t,n){const r=this;let s=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;s--;){const f=r.events[s][1];if(f.type==="labelImage"){l=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return c;function c(f){if(!l||!l._balanced)return n(f);const d=pi(r.sliceSerialize({start:l.end,end:r.now()}));return d.codePointAt(0)!==94||!o.includes(d.slice(1))?n(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function $ee(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)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function Yee(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return c;function c(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),f}function f(p){return p!==94?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",d)}function d(p){if(o>999||p===93&&!l||p===null||p===91||jt(p))return n(p);if(p===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return s.includes(pi(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return jt(p)||(l=!0),o++,e.consume(p),p===92?m:d}function m(p){return p===91||p===92||p===93?(e.consume(p),o++,d):d(p)}}function Gee(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,c;return f;function f(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):n(S)}function m(S){if(l>999||S===93&&!c||S===null||S===91||jt(S))return n(S);if(S===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return o=pi(r.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return jt(S)||(c=!0),l++,e.consume(S),S===92?p:m}function p(S){return S===91||S===92||S===93?(e.consume(S),l++,m):m(S)}function b(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),s.includes(o)||s.push(o),Et(e,x,"gfmFootnoteDefinitionWhitespace")):n(S)}function x(S){return t(S)}}function Qee(e,t,n){return e.check(Uf,t,e.attempt(zee,t,n))}function Kee(e){e.exit("gfmFootnoteDefinition")}function Xee(e,t,n){const r=this;return Et(e,s,"gfmFootnoteDefinitionIndent",5);function s(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(o):n(o)}}function Wee(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:s};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(l,c){let f=-1;for(;++f<l.length;)if(l[f][0]==="enter"&&l[f][1].type==="strikethroughSequenceTemporary"&&l[f][1]._close){let d=f;for(;d--;)if(l[d][0]==="exit"&&l[d][1].type==="strikethroughSequenceTemporary"&&l[d][1]._open&&l[f][1].end.offset-l[f][1].start.offset===l[d][1].end.offset-l[d][1].start.offset){l[f][1].type="strikethroughSequence",l[d][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},l[d][1].start),end:Object.assign({},l[f][1].end)},p={type:"strikethroughText",start:Object.assign({},l[d][1].end),end:Object.assign({},l[f][1].start)},b=[["enter",m,c],["enter",l[d][1],c],["exit",l[d][1],c],["enter",p,c]],x=c.parser.constructs.insideSpan.null;x&&Br(b,b.length,0,fp(x,l.slice(d+1,f),c)),Br(b,b.length,0,[["exit",p,c],["enter",l[f][1],c],["exit",l[f][1],c],["exit",m,c]]),Br(l,d-1,f-d+3,b),f=d+b.length-2;break}}for(f=-1;++f<l.length;)l[f][1].type==="strikethroughSequenceTemporary"&&(l[f][1].type="data");return l}function o(l,c,f){const d=this.previous,m=this.events;let p=0;return b;function b(S){return d===126&&m[m.length-1][1].type!=="characterEscape"?f(S):(l.enter("strikethroughSequenceTemporary"),x(S))}function x(S){const w=iu(d);if(S===126)return p>1?f(S):(l.consume(S),p++,x);if(p<2&&!n)return f(S);const C=l.exit("strikethroughSequenceTemporary"),A=iu(S);return C._open=!A||A===2&&!!w,C._close=!w||w===2&&!!A,c(S)}}}class Zee{constructor(){this.map=[]}add(t,n,r){Jee(this,t,n,r)}consume(t){if(this.map.sort(function(o,l){return o[0]-l[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 s=r.pop();for(;s;){for(const o of s)t.push(o);s=r.pop()}this.map.length=0}}function Jee(e,t,n,r){let s=0;if(!(n===0&&r.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...r);return}s+=1}e.map.push([t,n,r])}}function ete(e,t){let n=!1;const r=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function tte(){return{flow:{null:{name:"table",tokenize:nte,resolveAll:rte}}}}function nte(e,t,n){const r=this;let s=0,o=0,l;return c;function c(L){let W=r.events.length-1;for(;W>-1;){const te=r.events[W][1].type;if(te==="lineEnding"||te==="linePrefix")W--;else break}const K=W>-1?r.events[W][1].type:null,J=K==="tableHead"||K==="tableRow"?I:f;return J===I&&r.parser.lazy[r.now().line]?n(L):J(L)}function f(L){return e.enter("tableHead"),e.enter("tableRow"),d(L)}function d(L){return L===124||(l=!0,o+=1),m(L)}function m(L){return L===null?n(L):ze(L)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),x):n(L):ht(L)?Et(e,m,"whitespace")(L):(o+=1,l&&(l=!1,s+=1),L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),l=!0,m):(e.enter("data"),p(L)))}function p(L){return L===null||L===124||jt(L)?(e.exit("data"),m(L)):(e.consume(L),L===92?b:p)}function b(L){return L===92||L===124?(e.consume(L),p):p(L)}function x(L){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(L):(e.enter("tableDelimiterRow"),l=!1,ht(L)?Et(e,S,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):S(L))}function S(L){return L===45||L===58?C(L):L===124?(l=!0,e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),w):U(L)}function w(L){return ht(L)?Et(e,C,"whitespace")(L):C(L)}function C(L){return L===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),A):L===45?(o+=1,A(L)):L===null||ze(L)?R(L):U(L)}function A(L){return L===45?(e.enter("tableDelimiterFiller"),N(L)):U(L)}function N(L){return L===45?(e.consume(L),N):L===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),k):(e.exit("tableDelimiterFiller"),k(L))}function k(L){return ht(L)?Et(e,R,"whitespace")(L):R(L)}function R(L){return L===124?S(L):L===null||ze(L)?!l||s!==o?U(L):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(L)):U(L)}function U(L){return n(L)}function I(L){return e.enter("tableRow"),j(L)}function j(L){return L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),j):L===null||ze(L)?(e.exit("tableRow"),t(L)):ht(L)?Et(e,j,"whitespace")(L):(e.enter("data"),M(L))}function M(L){return L===null||L===124||jt(L)?(e.exit("data"),j(L)):(e.consume(L),L===92?$:M)}function $(L){return L===92||L===124?(e.consume(L),M):M(L)}}function rte(e,t){let n=-1,r=!0,s=0,o=[0,0,0,0],l=[0,0,0,0],c=!1,f=0,d,m,p;const b=new Zee;for(;++n<e.length;){const x=e[n],S=x[1];x[0]==="enter"?S.type==="tableHead"?(c=!1,f!==0&&(s_(b,t,f,d,m),m=void 0,f=0),d={type:"table",start:Object.assign({},S.start),end:Object.assign({},S.end)},b.add(n,0,[["enter",d,t]])):S.type==="tableRow"||S.type==="tableDelimiterRow"?(r=!0,p=void 0,o=[0,0,0,0],l=[0,n+1,0,0],c&&(c=!1,m={type:"tableBody",start:Object.assign({},S.start),end:Object.assign({},S.end)},b.add(n,0,[["enter",m,t]])),s=S.type==="tableDelimiterRow"?2:m?3:1):s&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],p=Th(b,t,o,s,void 0,p),o=[0,0,0,0]),l[2]=n)):S.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],p=Th(b,t,o,s,void 0,p)),o=l,l=[o[1],n,0,0])):S.type==="tableHead"?(c=!0,f=n):S.type==="tableRow"||S.type==="tableDelimiterRow"?(f=n,o[1]!==0?(l[0]=l[1],p=Th(b,t,o,s,n,p)):l[1]!==0&&(p=Th(b,t,l,s,n,p)),s=0):s&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")&&(l[3]=n)}for(f!==0&&s_(b,t,f,d,m),b.consume(t.events),n=-1;++n<t.events.length;){const x=t.events[n];x[0]==="enter"&&x[1].type==="table"&&(x[1]._align=ete(t.events,n))}return e}function Th(e,t,n,r,s,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(o.end=Object.assign({},_l(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const f=_l(t.events,n[1]);if(o={type:l,start:Object.assign({},f),end:Object.assign({},f)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const d=_l(t.events,n[2]),m=_l(t.events,n[3]),p={type:c,start:Object.assign({},d),end:Object.assign({},m)};if(e.add(n[2],0,[["enter",p,t]]),r!==2){const b=t.events[n[2]],x=t.events[n[3]];if(b[1].end=Object.assign({},x[1].end),b[1].type="chunkText",b[1].contentType="text",n[3]>n[2]+1){const S=n[2]+1,w=n[3]-n[2]-1;e.add(S,w,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return s!==void 0&&(o.end=Object.assign({},_l(t.events,s)),e.add(s,0,[["exit",o,t]]),o=void 0),o}function s_(e,t,n,r,s){const o=[],l=_l(t.events,n);s&&(s.end=Object.assign({},l),o.push(["exit",s,t])),r.end=Object.assign({},l),o.push(["exit",r,t]),e.add(n+1,0,o)}function _l(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const ite={name:"tasklistCheck",tokenize:ate};function ste(){return{text:{91:ite}}}function ate(e,t,n){const r=this;return s;function s(f){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),o)}function o(f){return jt(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),l):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),l):n(f)}function l(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(f)}function c(f){return ze(f)?t(f):ht(f)?e.check({tokenize:ote},t,n)(f):n(f)}}function ote(e,t,n){return Et(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function lte(e){return yM([yJ(),Vee(),Wee(e),tte(),ste()])}const ute={};function cte(e){const t=this,n=e||ute,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(lte(n)),o.push(dJ()),l.push(hJ(n))}var fte=Object.defineProperty,dte=Object.defineProperties,hte=Object.getOwnPropertyDescriptors,a_=Object.getOwnPropertySymbols,mte=Object.prototype.hasOwnProperty,pte=Object.prototype.propertyIsEnumerable,o_=(e,t,n)=>t in e?fte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,IM=(e,t)=>{for(var n in t||(t={}))mte.call(t,n)&&o_(e,n,t[n]);if(a_)for(var n of a_(t))pte.call(t,n)&&o_(e,n,t[n]);return e},LM=(e,t)=>dte(e,hte(t)),gte=/(\*\*)([^*]*\*?)$/,bte=/(__)([^_]*?)$/,yte=/(\*\*\*)([^*]*?)$/,xte=/(\*)([^*]*?)$/,Ete=/(_)([^_]*?)$/,vte=/(`)([^`]*?)$/,Tte=/(~~)([^~]*?)$/,Io=/^[\s_~*`]*$/,PM=/^[\s]*[-*+][\s]+$/,Ste=/[\p{L}\p{N}_]/u,wte=/^```[^`\n]*```?$/,Cte=/^\*{4,}$/,Ate=/(__)([^_]+)_$/,_te=/(~~)([^~]+)~$/,kte=/__/g,l_=/~~/g,Sa=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:Ste.test(e)},su=(e,t)=>{let n=!1;for(let r=0;r<t;r+=1)e[r]==="`"&&e[r+1]==="`"&&e[r+2]==="`"&&(n=!n,r+=2);return n},Nte=(e,t)=>{let n=1;for(let r=t-1;r>=0;r-=1)if(e[r]==="]")n+=1;else if(e[r]==="["&&(n-=1,n===0))return r;return-1},jM=(e,t)=>{let n=1;for(let r=t+1;r<e.length;r+=1)if(e[r]==="[")n+=1;else if(e[r]==="]"&&(n-=1,n===0))return r;return-1},dp=(e,t)=>{let n=!1,r=!1;for(let s=0;s<e.length&&s<t;s+=1){if(e[s]==="\\"&&e[s+1]==="$"){s+=1;continue}e[s]==="$"&&(e[s+1]==="$"?(r=!r,s+=1,n=!1):r||(n=!n))}return n||r},Rte=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
380
+ `)return!1}return!1},BM=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===")")return!1;if(e[n]==="(")return n>0&&e[n-1]==="]"?Rte(e,t):!1;if(e[n]===`
381
+ `)return!1}return!1},pE=(e,t,n)=>{let r=0;for(let f=t-1;f>=0;f-=1)if(e[f]===`
382
+ `){r=f+1;break}let s=e.length;for(let f=t;f<e.length;f+=1)if(e[f]===`
383
+ `){s=f;break}let o=e.substring(r,s),l=0,c=!1;for(let f of o)if(f===n)l+=1;else if(f!==" "&&f!==" "){c=!0;break}return l>=3&&!c},Dte=(e,t,n)=>{if(n!==" "&&n!==" ")return!1;let r=0;for(let s=t-1;s>=0;s-=1)if(e[s]===`
384
+ `){r=s+1;break}for(let s=r;s<t;s+=1)if(e[s]!==" "&&e[s]!==" ")return!1;return!0},Ote=(e,t,n,r)=>n==="\\"||e.includes("$")&&dp(e,t)?!0:n!=="*"&&r==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&r&&Sa(n)&&Sa(r)||Dte(e,t,r)),FM=e=>{let t=0,n=e.length;for(let r=0;r<n;r+=1){if(e[r]!=="*")continue;let s=r>0?e[r-1]:"",o=r<n-1?e[r+1]:"";Ote(e,r,s,o)||(t+=1)}return t},Mte=(e,t,n,r)=>!!(n==="\\"||e.includes("$")&&dp(e,t)||BM(e,t)||n==="_"||r==="_"||n&&r&&Sa(n)&&Sa(r)),Ite=e=>{let t=0,n=e.length;for(let r=0;r<n;r+=1){if(e[r]!=="_")continue;let s=r>0?e[r-1]:"",o=r<n-1?e[r+1]:"";Mte(e,r,s,o)||(t+=1)}return t},Lte=e=>{let t=0,n=0;for(let r=0;r<e.length;r+=1)e[r]==="*"?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0);return n>=3&&(t+=Math.floor(n/3)),t},Pte=(e,t,n)=>{if(!t||Io.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
385
+ `),s=r===-1?0:r+1,o=e.substring(s,n);return PM.test(o)&&t.includes(`
386
+ `)?!0:pE(e,n,"*")},jte=e=>{let t=e.match(gte);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return su(e,r)||Pte(e,n,r)?e:(e.match(/\*\*/g)||[]).length%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},Bte=(e,t,n)=>{if(!t||Io.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
387
+ `),s=r===-1?0:r+1,o=e.substring(s,n);return PM.test(o)&&t.includes(`
388
+ `)?!0:pE(e,n,"_")},Fte=e=>{let t=e.match(bte);if(!t){let s=e.match(Ate);if(s){let o=e.lastIndexOf(s[1]);if(!su(e,o)&&(e.match(kte)||[]).length%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return su(e,r)||Bte(e,n,r)?e:(e.match(/__/g)||[]).length%2===1?`${e}__`:e},Ute=e=>{for(let t=0;t<e.length;t+=1)if(e[t]==="*"&&e[t-1]!=="*"&&e[t+1]!=="*"&&e[t-1]!=="\\"&&!dp(e,t)){let n=t>0?e[t-1]:"",r=t<e.length-1?e[t+1]:"";if(n&&r&&Sa(n)&&Sa(r))continue;return t}return-1},Hte=e=>{if(!e.match(xte))return e;let t=Ute(e);if(t===-1||su(e,t))return e;let n=e.substring(t+1);return!n||Io.test(n)?e:FM(e)%2===1?`${e}*`:e},UM=e=>{for(let t=0;t<e.length;t+=1)if(e[t]==="_"&&e[t-1]!=="_"&&e[t+1]!=="_"&&e[t-1]!=="\\"&&!dp(e,t)&&!BM(e,t)){let n=t>0?e[t-1]:"",r=t<e.length-1?e[t+1]:"";if(n&&r&&Sa(n)&&Sa(r))continue;return t}return-1},zte=e=>{let t=e.length;for(;t>0&&e[t-1]===`
389
+ `;)t-=1;if(t<e.length){let n=e.slice(0,t),r=e.slice(t);return`${n}_${r}`}return`${e}_`},Vte=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if((t.match(/\*\*/g)||[]).length%2!==1)return null;let n=t.indexOf("**"),r=UM(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},qte=e=>{if(!e.match(Ete))return e;let t=UM(e);if(t===-1||su(e,t))return e;let n=e.substring(t+1);if(!n||Io.test(n))return e;if(Ite(e)%2===1){let r=Vte(e);return r!==null?r:zte(e)}return e},$te=e=>{let t=(e.match(/\*\*/g)||[]).length,n=FM(e);return t%2===0&&n%2===0},Yte=(e,t,n)=>!t||Io.test(t)||su(e,n)?!0:pE(e,n,"*"),Gte=e=>{if(Cte.test(e))return e;let t=e.match(yte);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return Yte(e,n,r)?e:Lte(e)%2===1?$te(e)?e:`${e}***`:e},vm=(e,t)=>{let n=!1,r=!1;for(let s=0;s<t;s+=1){if(e.substring(s,s+3)==="```"){r=!r,s+=2;continue}!r&&e[s]==="`"&&(n=!n)}return n||r},Qte=(e,t)=>{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",s=t>1&&e.substring(t-2,t+1)==="```";return n||r||s},Kte=e=>{let t=0;for(let n=0;n<e.length;n+=1)e[n]==="`"&&!Qte(e,n)&&(t+=1);return t},Xte=e=>!e.match(wte)||e.includes(`
390
+ `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,Wte=e=>(e.match(/```/g)||[]).length%2===1,Zte=e=>{let t=Xte(e);if(t!==null)return t;let n=e.match(vte);if(n&&!Wte(e)){let r=n[2];if(!r||Io.test(r))return e;if(Kte(e)%2===1)return`${e}\``}return e},Jte=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",ene=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!Jte(e,r)&&(n=!n),!n&&e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},tne=e=>{let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
391
+ `,t)!==-1&&!e.endsWith(`
392
+ `)?`${e}
393
+ $$`:`${e}$$`},nne=e=>ene(e)%2===0?e:tne(e),rne=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=Nte(e,t);if(r===-1||vm(e,r))return null;let s=r>0&&e[r-1]==="!",o=s?r-1:r,l=e.substring(0,o);if(s)return l;let c=e.substring(r+1,t);return n==="text-only"?`${l}${c}`:`${l}[${c}](streamdown:incomplete-link)`},u_=(e,t)=>{for(let n=0;n<=t;n++)if(e[n]==="["&&!vm(e,n)){if(n>0&&e[n-1]==="!")continue;let r=jM(e,n);if(r===-1)return n;if(r+1<e.length&&e[r+1]==="("){let s=e.indexOf(")",r+2);s!==-1&&(n=s)}}return-1},ine=(e,t,n)=>{let r=t>0&&e[t-1]==="!",s=r?t-1:t,o=e.substring(t+1);if(!o.includes("]")){let l=e.substring(0,s);if(r)return l;if(n==="text-only"){let c=u_(e,t);return c!==-1?e.substring(0,c)+e.substring(c+1):`${l}${o}`}return`${e}](streamdown:incomplete-link)`}if(jM(e,t)===-1){let l=e.substring(0,s);if(r)return l;if(n==="text-only"){let c=u_(e,t);if(c!==-1)return e.substring(0,c)+e.substring(c+1);let f=e.substring(t+1);return`${l}${f}`}return`${e}](streamdown:incomplete-link)`}return null},HM=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!vm(e,n)){let r=rne(e,n,t);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!vm(e,r)){let s=ine(e,r,t);if(s!==null)return s}return e},sne=/^-{1,2}$/,ane=/^[\s]*-{1,2}[\s]+$/,one=/^={1,2}$/,lne=/^[\s]*={1,2}[\s]+$/,une=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
394
+ `);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),s=n.trim();if(sne.test(s)&&!n.match(ane)){let o=r.split(`
395
+ `).at(-1);if(o&&o.trim().length>0)return`${e}​`}if(one.test(s)&&!n.match(lne)){let o=r.split(`
396
+ `).at(-1);if(o&&o.trim().length>0)return`${e}​`}return e},cne=e=>{let t=e.match(Tte);if(t){let n=t[2];if(!n||Io.test(n))return e;if((e.match(l_)||[]).length%2===1)return`${e}~~`}else if(e.match(_te)&&(e.match(l_)||[]).length%2===1)return`${e}~`;return e},I1=e=>e!==!1,Lr={SETEXT_HEADINGS:0,LINKS:10,BOLD_ITALIC:20,BOLD:30,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,DEFAULT:100},fne=[{handler:{name:"setextHeadings",handle:une,priority:Lr.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:HM,priority:Lr.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:Gte,priority:Lr.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:jte,priority:Lr.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:Fte,priority:Lr.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:Hte,priority:Lr.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:qte,priority:Lr.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:Zte,priority:Lr.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:cne,priority:Lr.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:nne,priority:Lr.KATEX},optionKey:"katex"}],dne=e=>{var t;let n=(t=e==null?void 0:e.linkMode)!=null?t:"protocol";return fne.filter(({handler:r,optionKey:s})=>r.name==="links"?I1(e==null?void 0:e.links)||I1(e==null?void 0:e.images):I1(e==null?void 0:e[s])).map(({handler:r,earlyReturn:s})=>r.name==="links"?{handler:LM(IM({},r),{handle:o=>HM(o,n)}),earlyReturn:n==="protocol"?s:void 0}:{handler:r,earlyReturn:s})},hne=(e,t)=>{var n;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,s=dne(t),o=((n=t==null?void 0:t.handlers)!=null?n:[]).map(c=>{var f;return{handler:LM(IM({},c),{priority:(f=c.priority)!=null?f:Lr.DEFAULT}),earlyReturn:void 0}}),l=[...s,...o].sort((c,f)=>{var d,m;return((d=c.handler.priority)!=null?d:Lr.DEFAULT)-((m=f.handler.priority)!=null?m:Lr.DEFAULT)});for(let{handler:c,earlyReturn:f}of l)if(r=c.handle(r),f!=null&&f(r))return r;return r},mne=hne;const pne=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,gne=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,bne={};function c_(e,t){return(bne.jsx?gne:pne).test(e)}const yne=/[ \t\n\f\r]/g;function xne(e){return typeof e=="object"?e.type==="text"?f_(e.value):!1:f_(e)}function f_(e){return e.replace(yne,"")===""}var Cl={},L1,d_;function Ene(){if(d_)return L1;d_=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g,f=`
397
+ `,d="/",m="*",p="",b="comment",x="declaration";function S(C,A){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];A=A||{};var N=1,k=1;function R(te){var ie=te.match(t);ie&&(N+=ie.length);var O=te.lastIndexOf(f);k=~O?te.length-O:k+te.length}function U(){var te={line:N,column:k};return function(ie){return ie.position=new I(te),$(),ie}}function I(te){this.start=te,this.end={line:N,column:k},this.source=A.source}I.prototype.content=C;function j(te){var ie=new Error(A.source+":"+N+":"+k+": "+te);if(ie.reason=te,ie.filename=A.source,ie.line=N,ie.column=k,ie.source=C,!A.silent)throw ie}function M(te){var ie=te.exec(C);if(ie){var O=ie[0];return R(O),C=C.slice(O.length),ie}}function $(){M(n)}function L(te){var ie;for(te=te||[];ie=W();)ie!==!1&&te.push(ie);return te}function W(){var te=U();if(!(d!=C.charAt(0)||m!=C.charAt(1))){for(var ie=2;p!=C.charAt(ie)&&(m!=C.charAt(ie)||d!=C.charAt(ie+1));)++ie;if(ie+=2,p===C.charAt(ie-1))return j("End of comment missing");var O=C.slice(2,ie-2);return k+=2,R(O),C=C.slice(ie),k+=2,te({type:b,comment:O})}}function K(){var te=U(),ie=M(r);if(ie){if(W(),!M(s))return j("property missing ':'");var O=M(o),H=te({type:x,property:w(ie[0].replace(e,p)),value:O?w(O[0].replace(e,p)):p});return M(l),H}}function J(){var te=[];L(te);for(var ie;ie=K();)ie!==!1&&(te.push(ie),L(te));return te}return $(),J()}function w(C){return C?C.replace(c,p):p}return L1=S,L1}var h_;function vne(){if(h_)return Cl;h_=1;var e=Cl&&Cl.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Cl,"__esModule",{value:!0}),Cl.default=n;const t=e(Ene());function n(r,s){let o=null;if(!r||typeof r!="string")return o;const l=(0,t.default)(r),c=typeof s=="function";return l.forEach(f=>{if(f.type!=="declaration")return;const{property:d,value:m}=f;c?s(d,m,f):m&&(o=o||{},o[d]=m)}),o}return Cl}var Ec={},m_;function Tne(){if(m_)return Ec;m_=1,Object.defineProperty(Ec,"__esModule",{value:!0}),Ec.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,o=function(d){return!d||n.test(d)||e.test(d)},l=function(d,m){return m.toUpperCase()},c=function(d,m){return"".concat(m,"-")},f=function(d,m){return m===void 0&&(m={}),o(d)?d:(d=d.toLowerCase(),m.reactCompat?d=d.replace(s,c):d=d.replace(r,c),d.replace(t,l))};return Ec.camelCase=f,Ec}var vc,p_;function Sne(){if(p_)return vc;p_=1;var e=vc&&vc.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(vne()),n=Tne();function r(s,o){var l={};return!s||typeof s!="string"||(0,t.default)(s,function(c,f){c&&f&&(l[(0,n.camelCase)(c,o)]=f)}),l}return r.default=r,vc=r,vc}var wne=Sne();const Cne=xf(wne);function Yc(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?g_(e.position):"start"in e||"end"in e?g_(e):"line"in e||"column"in e?fy(e):""}function fy(e){return b_(e&&e.line)+":"+b_(e&&e.column)}function g_(e){return fy(e&&e.start)+"-"+fy(e&&e.end)}function b_(e){return e&&typeof e=="number"?e:1}class Wn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let s="",o={},l=!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"?s=t:!o.cause&&t&&(l=!0,s=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const f=r.indexOf(":");f===-1?o.ruleId=r:(o.source=r.slice(0,f),o.ruleId=r.slice(f+1))}if(!o.place&&o.ancestors&&o.ancestors){const f=o.ancestors[o.ancestors.length-1];f&&(o.place=f.position)}const c=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=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=c?c.line:void 0,this.name=Yc(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=l&&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}}Wn.prototype.file="";Wn.prototype.name="";Wn.prototype.reason="";Wn.prototype.message="";Wn.prototype.stack="";Wn.prototype.column=void 0;Wn.prototype.line=void 0;Wn.prototype.ancestors=void 0;Wn.prototype.cause=void 0;Wn.prototype.fatal=void 0;Wn.prototype.place=void 0;Wn.prototype.ruleId=void 0;Wn.prototype.source=void 0;const gE={}.hasOwnProperty,Ane=new Map,_ne=/[A-Z]/g,kne=new Set(["table","tbody","thead","tfoot","tr"]),Nne=new Set(["td","th"]),zM="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Rne(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=Bne(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=jne(n,t.jsx,t.jsxs)}const s={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"?ka:Pf,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=VM(s,e,void 0);return o&&typeof o!="string"?o:s.create(e,s.Fragment,{children:o||void 0},void 0)}function VM(e,t,n){if(t.type==="element")return Dne(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return One(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Ine(e,t,n);if(t.type==="mdxjsEsm")return Mne(e,t);if(t.type==="root")return Lne(e,t,n);if(t.type==="text")return Pne(e,t)}function Dne(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=ka,e.schema=s),e.ancestors.push(t);const o=$M(e,t.tagName,!1),l=Fne(e,t);let c=yE(e,t);return kne.has(t.tagName)&&(c=c.filter(function(f){return typeof f=="string"?!xne(f):!0})),qM(e,l,o,t),bE(l,c),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function One(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)}hf(e,t.position)}function Mne(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);hf(e,t.position)}function Ine(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=ka,e.schema=s),e.ancestors.push(t);const o=t.name===null?e.Fragment:$M(e,t.name,!0),l=Une(e,t),c=yE(e,t);return qM(e,l,o,t),bE(l,c),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function Lne(e,t,n){const r={};return bE(r,yE(e,t)),e.create(t,e.Fragment,r,n)}function Pne(e,t){return t.value}function qM(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function bE(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function jne(e,t,n){return r;function r(s,o,l,c){const d=Array.isArray(l.children)?n:t;return c?d(o,l,c):d(o,l)}}function Bne(e,t){return n;function n(r,s,o,l){const c=Array.isArray(o.children),f=$i(r);return t(s,o,l,c,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function Fne(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&gE.call(t.properties,s)){const o=Hne(e,s,t.properties[s]);if(o){const[l,c]=o;e.tableCellAlignToStyle&&l==="align"&&typeof c=="string"&&Nne.has(t.tagName)?r=c:n[l]=c}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Une(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 l=o.expression;l.type;const c=l.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else hf(e,t.position);else{const s=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,o=e.evaluater.evaluateExpression(c.expression)}else hf(e,t.position);else o=r.value===null?!0:r.value;n[s]=o}return n}function yE(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:Ane;for(;++r<t.children.length;){const o=t.children[r];let l;if(e.passKeys){const f=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(f){const d=s.get(f)||0;l=f+"-"+d,s.set(f,d+1)}}const c=VM(e,o,l);c!==void 0&&n.push(c)}return n}function Hne(e,t,n){const r=ip(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?d6(n):h6(n)),r.property==="style"){let s=typeof n=="object"?n:zne(e,String(n));return e.stylePropertyNameCase==="css"&&(s=Vne(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?iQ[r.property]||r.property:r.attribute,n]}}function zne(e,t){try{return Cne(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new Wn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=zM+"#cannot-parse-style-attribute",s}}function $M(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let o=-1,l;for(;++o<s.length;){const c=c_(s[o])?{type:"Identifier",name:s[o]}:{type:"Literal",value:s[o]};l=l?{type:"MemberExpression",object:l,property:c,computed:!!(o&&c.type==="Literal"),optional:!1}:c}r=l}else r=c_(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return gE.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);hf(e)}function hf(e,t){const n=new Wn("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=zM+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Vne(e){const t={};let n;for(n in e)gE.call(e,n)&&(t[qne(n)]=e[n]);return t}function qne(e){let t=e.replace(_ne,$ne);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function $ne(e){return"-"+e.toLowerCase()}const Yne={tokenize:Gne};function Gne(e){const t=e.attempt(this.parser.constructs.contentInitial,r,s);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Et(e,t,"linePrefix")}function s(c){return e.enter("paragraph"),o(c)}function o(c){const f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,l(c)}function l(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return ze(c)?(e.consume(c),e.exit("chunkText"),o):(e.consume(c),l)}}const Qne={tokenize:Kne},y_={tokenize:Xne};function Kne(e){const t=this,n=[];let r=0,s,o,l;return c;function c(k){if(r<n.length){const R=n[r];return t.containerState=R[1],e.attempt(R[0].continuation,f,d)(k)}return d(k)}function f(k){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&N();const R=t.events.length;let U=R,I;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){I=t.events[U][1].end;break}A(r);let j=R;for(;j<t.events.length;)t.events[j][1].end={...I},j++;return Br(t.events,U+1,0,t.events.slice(R)),t.events.length=j,d(k)}return c(k)}function d(k){if(r===n.length){if(!s)return b(k);if(s.currentConstruct&&s.currentConstruct.concrete)return S(k);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(y_,m,p)(k)}function m(k){return s&&N(),A(r),b(k)}function p(k){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,S(k)}function b(k){return t.containerState={},e.attempt(y_,x,S)(k)}function x(k){return r++,n.push([t.currentConstruct,t.containerState]),b(k)}function S(k){if(k===null){s&&N(),A(0),e.consume(k);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:o}),w(k)}function w(k){if(k===null){C(e.exit("chunkFlow"),!0),A(0),e.consume(k);return}return ze(k)?(e.consume(k),C(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(k),w)}function C(k,R){const U=t.sliceStream(k);if(R&&U.push(null),k.previous=o,o&&(o.next=k),o=k,s.defineSkip(k.start),s.write(U),t.parser.lazy[k.start.line]){let I=s.events.length;for(;I--;)if(s.events[I][1].start.offset<l&&(!s.events[I][1].end||s.events[I][1].end.offset>l))return;const j=t.events.length;let M=j,$,L;for(;M--;)if(t.events[M][0]==="exit"&&t.events[M][1].type==="chunkFlow"){if($){L=t.events[M][1].end;break}$=!0}for(A(r),I=j;I<t.events.length;)t.events[I][1].end={...L},I++;Br(t.events,M+1,0,t.events.slice(j)),t.events.length=I}}function A(k){let R=n.length;for(;R-- >k;){const U=n[R];t.containerState=U[1],U[0].exit.call(t,e)}n.length=k}function N(){s.write([null]),o=void 0,s=void 0,t.containerState._closeFlow=void 0}}function Xne(e,t,n){return Et(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const Wne={tokenize:Zne};function Zne(e){const t=this,n=e.attempt(Uf,r,e.attempt(this.parser.constructs.flowInitial,s,Et(e,e.attempt(this.parser.constructs.flow,s,e.attempt(QJ,s)),"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 s(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Jne={resolveAll:GM()},ere=YM("string"),tre=YM("text");function YM(e){return{resolveAll:GM(e==="text"?nre:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],o=n.attempt(s,l,c);return l;function l(m){return d(m)?o(m):c(m)}function c(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),f}function f(m){return d(m)?(n.exit("data"),o(m)):(n.consume(m),f)}function d(m){if(m===null)return!0;const p=s[m];let b=-1;if(p)for(;++b<p.length;){const x=p[b];if(!x.previous||x.previous.call(r,r.previous))return!0}return!1}}}function GM(e){return t;function t(n,r){let s=-1,o;for(;++s<=n.length;)o===void 0?n[s]&&n[s][1].type==="data"&&(o=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==o+2&&(n[o][1].end=n[s-1][1].end,n.splice(o+2,s-o-2),s=o+2),o=void 0);return e?e(n,r):n}}function nre(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],s=t.sliceStream(r);let o=s.length,l=-1,c=0,f;for(;o--;){const d=s[o];if(typeof d=="string"){for(l=d.length;d.charCodeAt(l-1)===32;)c++,l--;if(l)break;l=-1}else if(d===-2)f=!0,c++;else if(d!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const d={type:n===e.length||f||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:{...r.end}};r.end={...d.start},r.start.offset===r.end.offset?Object.assign(r,d):(e.splice(n,0,["enter",d,t],["exit",d,t]),n+=2)}n++}return e}const rre={42:Er,43:Er,45:Er,48:Er,49:Er,50:Er,51:Er,52:Er,53:Er,54:Er,55:Er,56:Er,57:Er,62:_M},ire={91:JJ},sre={[-2]:O1,[-1]:O1,32:O1},are={35:see,42:Yh,45:[i_,Yh],60:uee,61:i_,95:Yh,96:n_,126:n_},ore={38:NM,92:kM},lre={[-5]:M1,[-4]:M1,[-3]:M1,33:_ee,38:NM,42:cy,60:[NJ,gee],91:Nee,92:[ree,kM],93:mE,95:cy,96:zJ},ure={null:[cy,Jne]},cre={null:[42,95]},fre={null:[]},dre=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:cre,contentInitial:ire,disable:fre,document:rre,flow:are,flowInitial:sre,insideSpan:ure,string:ore,text:lre},Symbol.toStringTag,{value:"Module"}));function hre(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 s={},o=[];let l=[],c=[];const f={attempt:j(U),check:j(I),consume:N,enter:k,exit:R,interrupt:j(I,{interrupt:!0})},d={code:null,containerState:{},defineSkip:w,events:[],now:S,parser:e,previous:null,sliceSerialize:b,sliceStream:x,write:p};let m=t.tokenize.call(d,f);return t.resolveAll&&o.push(t),d;function p(W){return l=Jr(l,W),C(),l[l.length-1]!==null?[]:(M(t,0),d.events=fp(o,d.events,d),d.events)}function b(W,K){return pre(x(W),K)}function x(W){return mre(l,W)}function S(){const{_bufferIndex:W,_index:K,line:J,column:te,offset:ie}=r;return{_bufferIndex:W,_index:K,line:J,column:te,offset:ie}}function w(W){s[W.line]=W.column,L()}function C(){let W;for(;r._index<l.length;){const K=l[r._index];if(typeof K=="string")for(W=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===W&&r._bufferIndex<K.length;)A(K.charCodeAt(r._bufferIndex));else A(K)}}function A(W){m=m(W)}function N(W){ze(W)?(r.line++,r.column=1,r.offset+=W===-3?2:1,L()):W!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),d.previous=W}function k(W,K){const J=K||{};return J.type=W,J.start=S(),d.events.push(["enter",J,d]),c.push(J),J}function R(W){const K=c.pop();return K.end=S(),d.events.push(["exit",K,d]),K}function U(W,K){M(W,K.from)}function I(W,K){K.restore()}function j(W,K){return J;function J(te,ie,O){let H,q,ne,B;return Array.isArray(te)?re(te):"tokenize"in te?re([te]):V(te);function V(ge){return fe;function fe(Se){const we=Se!==null&&ge[Se],Ie=Se!==null&&ge.null,Fe=[...Array.isArray(we)?we:we?[we]:[],...Array.isArray(Ie)?Ie:Ie?[Ie]:[]];return re(Fe)(Se)}}function re(ge){return H=ge,q=0,ge.length===0?O:P(ge[q])}function P(ge){return fe;function fe(Se){return B=$(),ne=ge,ge.partial||(d.currentConstruct=ge),ge.name&&d.parser.constructs.disable.null.includes(ge.name)?ye():ge.tokenize.call(K?Object.assign(Object.create(d),K):d,f,he,ye)(Se)}}function he(ge){return W(ne,B),ie}function ye(ge){return B.restore(),++q<H.length?P(H[q]):O}}}function M(W,K){W.resolveAll&&!o.includes(W)&&o.push(W),W.resolve&&Br(d.events,K,d.events.length-K,W.resolve(d.events.slice(K),d)),W.resolveTo&&(d.events=W.resolveTo(d.events,d))}function $(){const W=S(),K=d.previous,J=d.currentConstruct,te=d.events.length,ie=Array.from(c);return{from:te,restore:O};function O(){r=W,d.previous=K,d.currentConstruct=J,d.events.length=te,c=ie,L()}}function L(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function mre(e,t){const n=t.start._index,r=t.start._bufferIndex,s=t.end._index,o=t.end._bufferIndex;let l;if(n===s)l=[e[n].slice(r,o)];else{if(l=e.slice(n,s),r>-1){const c=l[0];typeof c=="string"?l[0]=c.slice(r):l.shift()}o>0&&l.push(e[s].slice(0,o))}return l}function pre(e,t){let n=-1;const r=[];let s;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
398
+ `;break}case-3:{l=`\r
399
+ `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&s)continue;l=" ";break}default:l=String.fromCharCode(o)}s=o===-2,r.push(l)}return r.join("")}function gre(e){const r={constructs:yM([dre,...(e||{}).extensions||[]]),content:s(Yne),defined:[],document:s(Qne),flow:s(Wne),lazy:{},string:s(ere),text:s(tre)};return r;function s(o){return l;function l(c){return hre(r,o,c)}}}function bre(e){for(;!RM(e););return e}const x_=/[\0\t\n\r]/g;function yre(){let e=1,t="",n=!0,r;return s;function s(o,l,c){const f=[];let d,m,p,b,x;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),p=0,t="",n&&(o.charCodeAt(0)===65279&&p++,n=void 0);p<o.length;){if(x_.lastIndex=p,d=x_.exec(o),b=d&&d.index!==void 0?d.index:o.length,x=o.charCodeAt(b),!d){t=o.slice(p);break}if(x===10&&p===b&&r)f.push(-3),r=void 0;else switch(r&&(f.push(-5),r=void 0),p<b&&(f.push(o.slice(p,b)),e+=b-p),x){case 0:{f.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,f.push(-2);e++<m;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:r=!0,e=1}p=b+1}return c&&(r&&f.push(-5),t&&f.push(t),f.push(null)),f}}const QM={}.hasOwnProperty;function xre(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Ere(n)(bre(gre(n).document().write(yre()(e,t,!0))))}function Ere(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Ct),autolinkProtocol:$,autolinkEmail:$,atxHeading:o(Ue),blockQuote:o(Ie),characterEscape:$,characterReference:$,codeFenced:o(Fe),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(Fe,l),codeText:o($e,l),codeTextData:$,data:$,codeFlowValue:$,definition:o(zt),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(Ne),hardBreakEscape:o(Ye),hardBreakTrailing:o(Ye),htmlFlow:o(lt,l),htmlFlowData:$,htmlText:o(lt,l),htmlTextData:$,image:o($t),label:l,link:o(Ct),listItem:o(cr),listItemValue:b,listOrdered:o(un,p),listUnordered:o(un),paragraph:o(Fr),reference:P,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(Ue),strong:o(Zn),thematicBreak:o(He)},exit:{atxHeading:f(),atxHeadingSequence:U,autolink:f(),autolinkEmail:we,autolinkProtocol:Se,blockQuote:f(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:ye,characterReferenceMarkerNumeric:ye,characterReferenceValue:ge,characterReference:fe,codeFenced:f(C),codeFencedFence:w,codeFencedFenceInfo:x,codeFencedFenceMeta:S,codeFlowValue:L,codeIndented:f(A),codeText:f(ie),codeTextData:L,data:L,definition:f(),definitionDestinationString:R,definitionLabelString:N,definitionTitleString:k,emphasis:f(),hardBreakEscape:f(K),hardBreakTrailing:f(K),htmlFlow:f(J),htmlFlowData:L,htmlText:f(te),htmlTextData:L,image:f(H),label:ne,labelText:q,lineEnding:W,link:f(O),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:he,resourceDestinationString:B,resourceTitleString:V,resource:re,setextHeading:f(M),setextHeadingLineSequence:j,setextHeadingText:I,strong:f(),thematicBreak:f()}};KM(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(oe){let Te={type:"root",children:[]};const Pe={stack:[Te],tokenStack:[],config:t,enter:c,exit:d,buffer:l,resume:m,data:n},Ze=[];let bt=-1;for(;++bt<oe.length;)if(oe[bt][1].type==="listOrdered"||oe[bt][1].type==="listUnordered")if(oe[bt][0]==="enter")Ze.push(bt);else{const vn=Ze.pop();bt=s(oe,vn,bt)}for(bt=-1;++bt<oe.length;){const vn=t[oe[bt][0]];QM.call(vn,oe[bt][1].type)&&vn[oe[bt][1].type].call(Object.assign({sliceSerialize:oe[bt][2].sliceSerialize},Pe),oe[bt][1])}if(Pe.tokenStack.length>0){const vn=Pe.tokenStack[Pe.tokenStack.length-1];(vn[1]||E_).call(Pe,void 0,vn[0])}for(Te.position={start:Ws(oe.length>0?oe[0][1].start:{line:1,column:1,offset:0}),end:Ws(oe.length>0?oe[oe.length-2][1].end:{line:1,column:1,offset:0})},bt=-1;++bt<t.transforms.length;)Te=t.transforms[bt](Te)||Te;return Te}function s(oe,Te,Pe){let Ze=Te-1,bt=-1,vn=!1,Tn,nn,Gt,Sn;for(;++Ze<=Pe;){const vt=oe[Ze];switch(vt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{vt[0]==="enter"?bt++:bt--,Sn=void 0;break}case"lineEndingBlank":{vt[0]==="enter"&&(Tn&&!Sn&&!bt&&!Gt&&(Gt=Ze),Sn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Sn=void 0}if(!bt&&vt[0]==="enter"&&vt[1].type==="listItemPrefix"||bt===-1&&vt[0]==="exit"&&(vt[1].type==="listUnordered"||vt[1].type==="listOrdered")){if(Tn){let fr=Ze;for(nn=void 0;fr--;){const wn=oe[fr];if(wn[1].type==="lineEnding"||wn[1].type==="lineEndingBlank"){if(wn[0]==="exit")continue;nn&&(oe[nn][1].type="lineEndingBlank",vn=!0),wn[1].type="lineEnding",nn=fr}else if(!(wn[1].type==="linePrefix"||wn[1].type==="blockQuotePrefix"||wn[1].type==="blockQuotePrefixWhitespace"||wn[1].type==="blockQuoteMarker"||wn[1].type==="listItemIndent"))break}Gt&&(!nn||Gt<nn)&&(Tn._spread=!0),Tn.end=Object.assign({},nn?oe[nn][1].start:vt[1].end),oe.splice(nn||Ze,0,["exit",Tn,vt[2]]),Ze++,Pe++}if(vt[1].type==="listItemPrefix"){const fr={type:"listItem",_spread:!1,start:Object.assign({},vt[1].start),end:void 0};Tn=fr,oe.splice(Ze,0,["enter",fr,vt[2]]),Ze++,Pe++,Gt=void 0,Sn=!0}}}return oe[Te][1]._spread=vn,Pe}function o(oe,Te){return Pe;function Pe(Ze){c.call(this,oe(Ze),Ze),Te&&Te.call(this,Ze)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(oe,Te,Pe){this.stack[this.stack.length-1].children.push(oe),this.stack.push(oe),this.tokenStack.push([Te,Pe||void 0]),oe.position={start:Ws(Te.start),end:void 0}}function f(oe){return Te;function Te(Pe){oe&&oe.call(this,Pe),d.call(this,Pe)}}function d(oe,Te){const Pe=this.stack.pop(),Ze=this.tokenStack.pop();if(Ze)Ze[0].type!==oe.type&&(Te?Te.call(this,oe,Ze[0]):(Ze[1]||E_).call(this,oe,Ze[0]));else throw new Error("Cannot close `"+oe.type+"` ("+Yc({start:oe.start,end:oe.end})+"): it’s not open");Pe.position.end=Ws(oe.end)}function m(){return cE(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function b(oe){if(this.data.expectingFirstListItemValue){const Te=this.stack[this.stack.length-2];Te.start=Number.parseInt(this.sliceSerialize(oe),10),this.data.expectingFirstListItemValue=void 0}}function x(){const oe=this.resume(),Te=this.stack[this.stack.length-1];Te.lang=oe}function S(){const oe=this.resume(),Te=this.stack[this.stack.length-1];Te.meta=oe}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const oe=this.resume(),Te=this.stack[this.stack.length-1];Te.value=oe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function A(){const oe=this.resume(),Te=this.stack[this.stack.length-1];Te.value=oe.replace(/(\r?\n|\r)$/g,"")}function N(oe){const Te=this.resume(),Pe=this.stack[this.stack.length-1];Pe.label=Te,Pe.identifier=pi(this.sliceSerialize(oe)).toLowerCase()}function k(){const oe=this.resume(),Te=this.stack[this.stack.length-1];Te.title=oe}function R(){const oe=this.resume(),Te=this.stack[this.stack.length-1];Te.url=oe}function U(oe){const Te=this.stack[this.stack.length-1];if(!Te.depth){const Pe=this.sliceSerialize(oe).length;Te.depth=Pe}}function I(){this.data.setextHeadingSlurpLineEnding=!0}function j(oe){const Te=this.stack[this.stack.length-1];Te.depth=this.sliceSerialize(oe).codePointAt(0)===61?1:2}function M(){this.data.setextHeadingSlurpLineEnding=void 0}function $(oe){const Pe=this.stack[this.stack.length-1].children;let Ze=Pe[Pe.length-1];(!Ze||Ze.type!=="text")&&(Ze=Yt(),Ze.position={start:Ws(oe.start),end:void 0},Pe.push(Ze)),this.stack.push(Ze)}function L(oe){const Te=this.stack.pop();Te.value+=this.sliceSerialize(oe),Te.position.end=Ws(oe.end)}function W(oe){const Te=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Pe=Te.children[Te.children.length-1];Pe.position.end=Ws(oe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Te.type)&&($.call(this,oe),L.call(this,oe))}function K(){this.data.atHardBreak=!0}function J(){const oe=this.resume(),Te=this.stack[this.stack.length-1];Te.value=oe}function te(){const oe=this.resume(),Te=this.stack[this.stack.length-1];Te.value=oe}function ie(){const oe=this.resume(),Te=this.stack[this.stack.length-1];Te.value=oe}function O(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const Te=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=Te,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function H(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const Te=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=Te,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function q(oe){const Te=this.sliceSerialize(oe),Pe=this.stack[this.stack.length-2];Pe.label=JZ(Te),Pe.identifier=pi(Te).toLowerCase()}function ne(){const oe=this.stack[this.stack.length-1],Te=this.resume(),Pe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Pe.type==="link"){const Ze=oe.children;Pe.children=Ze}else Pe.alt=Te}function B(){const oe=this.resume(),Te=this.stack[this.stack.length-1];Te.url=oe}function V(){const oe=this.resume(),Te=this.stack[this.stack.length-1];Te.title=oe}function re(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function he(oe){const Te=this.resume(),Pe=this.stack[this.stack.length-1];Pe.label=Te,Pe.identifier=pi(this.sliceSerialize(oe)).toLowerCase(),this.data.referenceType="full"}function ye(oe){this.data.characterReferenceType=oe.type}function ge(oe){const Te=this.sliceSerialize(oe),Pe=this.data.characterReferenceType;let Ze;Pe?(Ze=bM(Te,Pe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ze=dE(Te);const bt=this.stack[this.stack.length-1];bt.value+=Ze}function fe(oe){const Te=this.stack.pop();Te.position.end=Ws(oe.end)}function Se(oe){L.call(this,oe);const Te=this.stack[this.stack.length-1];Te.url=this.sliceSerialize(oe)}function we(oe){L.call(this,oe);const Te=this.stack[this.stack.length-1];Te.url="mailto:"+this.sliceSerialize(oe)}function Ie(){return{type:"blockquote",children:[]}}function Fe(){return{type:"code",lang:null,meta:null,value:""}}function $e(){return{type:"inlineCode",value:""}}function zt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ne(){return{type:"emphasis",children:[]}}function Ue(){return{type:"heading",depth:0,children:[]}}function Ye(){return{type:"break"}}function lt(){return{type:"html",value:""}}function $t(){return{type:"image",title:null,url:"",alt:null}}function Ct(){return{type:"link",title:null,url:"",children:[]}}function un(oe){return{type:"list",ordered:oe.type==="listOrdered",start:null,spread:oe._spread,children:[]}}function cr(oe){return{type:"listItem",spread:oe._spread,checked:null,children:[]}}function Fr(){return{type:"paragraph",children:[]}}function Zn(){return{type:"strong",children:[]}}function Yt(){return{type:"text",value:""}}function He(){return{type:"thematicBreak"}}}function Ws(e){return{line:e.line,column:e.column,offset:e.offset}}function KM(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?KM(e,r):vre(e,r)}}function vre(e,t){let n;for(n in t)if(QM.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function E_(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Yc({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Yc({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Yc({start:t.start,end:t.end})+") is still open")}function Tre(e){const t=this;t.parser=n;function n(r){return xre(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Sre(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 wre(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
400
+ `}]}function Cre(e,t){const n=t.value?t.value+`
401
+ `:"",r={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(r.className=["language-"+s[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 Are(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function _re(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function kre(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=Eu(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let l,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=o+1,c+=1,e.footnoteCounts.set(r,c);const f={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,f);const d={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,d),e.applyData(t,d)}function Nre(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 Rre(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function XM(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 s=e.all(t),o=s[0];o&&o.type==="text"?o.value="["+o.value:s.unshift({type:"text",value:"["});const l=s[s.length-1];return l&&l.type==="text"?l.value+=r:s.push({type:"text",value:r}),s}function Dre(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return XM(e,t);const s={src:Eu(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const o={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,o),e.applyData(t,o)}function Ore(e,t){const n={src:Eu(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 Mre(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 Ire(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return XM(e,t);const s={href:Eu(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const o={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function Lre(e,t){const n={href:Eu(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 Pre(e,t,n){const r=e.all(t),s=n?jre(n):WM(t),o={},l=[];if(typeof t.checked=="boolean"){const m=r[0];let p;m&&m.type==="element"&&m.tagName==="p"?p=m:(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 c=-1;for(;++c<r.length;){const m=r[c];(s||c!==0||m.type!=="element"||m.tagName!=="p")&&l.push({type:"text",value:`
402
+ `}),m.type==="element"&&m.tagName==="p"&&!s?l.push(...m.children):l.push(m)}const f=r[r.length-1];f&&(s||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
403
+ `});const d={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,d),e.applyData(t,d)}function jre(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=WM(n[r])}return t}function WM(e){const t=e.spread;return t??e.children.length>1}function Bre(e,t){const n={},r=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<r.length;){const l=r[s];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.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 Fre(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ure(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Hre(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function zre(e,t){const n=e.all(t),r=n.shift(),s=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),s.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=$i(t.children[1]),f=up(t.children[t.children.length-1]);c&&f&&(l.position={start:c,end:f}),s.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,o),e.applyData(t,o)}function Vre(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,c=l?l.length:t.children.length;let f=-1;const d=[];for(;++f<c;){const p=t.children[f],b={},x=l?l[f]:void 0;x&&(b.align=x);let S={type:"element",tagName:o,properties:b,children:[]};p&&(S.children=e.all(p),e.patch(p,S),S=e.applyData(p,S)),d.push(S)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(d,!0)};return e.patch(t,m),e.applyData(t,m)}function qre(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const v_=9,T_=32;function $re(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const o=[];for(;r;)o.push(S_(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return o.push(S_(t.slice(s),s>0,!1)),o.join("")}function S_(e,t,n){let r=0,s=e.length;if(t){let o=e.codePointAt(r);for(;o===v_||o===T_;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(s-1);for(;o===v_||o===T_;)s--,o=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function Yre(e,t){const n={type:"text",value:$re(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Gre(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Qre={blockquote:Sre,break:wre,code:Cre,delete:Are,emphasis:_re,footnoteReference:kre,heading:Nre,html:Rre,imageReference:Dre,image:Ore,inlineCode:Mre,linkReference:Ire,link:Lre,listItem:Pre,list:Bre,paragraph:Fre,root:Ure,strong:Hre,table:zre,tableCell:qre,tableRow:Vre,text:Yre,thematicBreak:Gre,toml:Sh,yaml:Sh,definition:Sh,footnoteDefinition:Sh};function Sh(){}function Kre(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 Xre(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Wre(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Kre,r=e.options.footnoteBackLabel||Xre,s=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let f=-1;for(;++f<e.footnoteOrder.length;){const d=e.footnoteById.get(e.footnoteOrder[f]);if(!d)continue;const m=e.all(d),p=String(d.identifier).toUpperCase(),b=Eu(p.toLowerCase());let x=0;const S=[],w=e.footnoteCounts.get(p);for(;w!==void 0&&++x<=w;){S.length>0&&S.push({type:"text",value:" "});let N=typeof n=="string"?n:n(f,x);typeof N=="string"&&(N={type:"text",value:N}),S.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(f,x),className:["data-footnote-backref"]},children:Array.isArray(N)?N:[N]})}const C=m[m.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const N=C.children[C.children.length-1];N&&N.type==="text"?N.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...S)}else m.push(...S);const A={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(m,!0)};e.patch(d,A),c.push(A)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...wo(l),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
404
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
405
+ `}]}}const dy={}.hasOwnProperty,Zre={};function Jre(e,t){const n=t||Zre,r=new Map,s=new Map,o=new Map,l={...Qre,...n.handlers},c={all:d,applyData:tie,definitionById:r,footnoteById:s,footnoteCounts:o,footnoteOrder:[],handlers:l,one:f,options:n,patch:eie,wrap:rie};return nu(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const p=m.type==="definition"?r:s,b=String(m.identifier).toUpperCase();p.has(b)||p.set(b,m)}}),c;function f(m,p){const b=m.type,x=c.handlers[b];if(dy.call(c.handlers,b)&&x)return x(c,m,p);if(c.options.passThrough&&c.options.passThrough.includes(b)){if("children"in m){const{children:w,...C}=m,A=wo(C);return A.children=c.all(m),A}return wo(m)}return(c.options.unknownHandler||nie)(c,m,p)}function d(m){const p=[];if("children"in m){const b=m.children;let x=-1;for(;++x<b.length;){const S=c.one(b[x],m);if(S){if(x&&b[x-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=w_(S.value)),!Array.isArray(S)&&S.type==="element")){const w=S.children[0];w&&w.type==="text"&&(w.value=w_(w.value))}Array.isArray(S)?p.push(...S):p.push(S)}}}return p}}function eie(e,t){e.position&&(t.position=G6(e))}function tie(e,t){let n=t;if(e&&e.data){const r=e.data.hName,s=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&o&&Object.assign(n.properties,wo(o)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function nie(e,t){const n=t.data||{},r="value"in t&&!(dy.call(n,"hProperties")||dy.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 rie(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
406
+ `});++r<e.length;)r&&n.push({type:"text",value:`
407
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
408
+ `}),n}function w_(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function C_(e,t){const n=Jre(e,t),r=n.one(e,void 0),s=Wre(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&o.children.push({type:"text",value:`
409
+ `},s),o}function iie(e,t){return e&&"run"in e?async function(n,r){const s=C_(n,{file:r,...t});await e.run(s,r)}:function(n,r){return C_(n,{file:r,...e||t})}}function A_(e){if(e)throw e}var P1,__;function sie(){if(__)return P1;__=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(d){return typeof Array.isArray=="function"?Array.isArray(d):t.call(d)==="[object Array]"},o=function(d){if(!d||t.call(d)!=="[object Object]")return!1;var m=e.call(d,"constructor"),p=d.constructor&&d.constructor.prototype&&e.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!m&&!p)return!1;var b;for(b in d);return typeof b>"u"||e.call(d,b)},l=function(d,m){n&&m.name==="__proto__"?n(d,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):d[m.name]=m.newValue},c=function(d,m){if(m==="__proto__")if(e.call(d,m)){if(r)return r(d,m).value}else return;return d[m]};return P1=function f(){var d,m,p,b,x,S,w=arguments[0],C=1,A=arguments.length,N=!1;for(typeof w=="boolean"&&(N=w,w=arguments[1]||{},C=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});C<A;++C)if(d=arguments[C],d!=null)for(m in d)p=c(w,m),b=c(d,m),w!==b&&(N&&b&&(o(b)||(x=s(b)))?(x?(x=!1,S=p&&s(p)?p:[]):S=p&&o(p)?p:{},l(w,{name:m,newValue:f(N,S,b)})):typeof b<"u"&&l(w,{name:m,newValue:b}));return w},P1}var aie=sie();const j1=xf(aie);function hy(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 oie(){const e=[],t={run:n,use:r};return t;function n(...s){let o=-1;const l=s.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);c(null,...s);function c(f,...d){const m=e[++o];let p=-1;if(f){l(f);return}for(;++p<s.length;)(d[p]===null||d[p]===void 0)&&(d[p]=s[p]);s=d,m?lie(m,c)(...d):l(null,...d)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function lie(e,t){let n;return r;function r(...l){const c=e.length>l.length;let f;c&&l.push(s);try{f=e.apply(this,l)}catch(d){const m=d;if(c&&n)throw m;return s(m)}c||(f&&f.then&&typeof f.then=="function"?f.then(o,s):f instanceof Error?s(f):o(f))}function s(l,...c){n||(n=!0,t(l,...c))}function o(l){s(null,l)}}const _i={basename:uie,dirname:cie,extname:fie,join:die,sep:"/"};function uie(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Hf(e);let n=0,r=-1,s=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(o){n=s+1;break}}else r<0&&(o=!0,r=s+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,c=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(o){n=s+1;break}}else l<0&&(o=!0,l=s+1),c>-1&&(e.codePointAt(s)===t.codePointAt(c--)?c<0&&(r=s):(c=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function cie(e){if(Hf(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 fie(e){Hf(e);let t=e.length,n=-1,r=0,s=-1,o=0,l;for(;t--;){const c=e.codePointAt(t);if(c===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),c===46?s<0?s=t:o!==1&&(o=1):s>-1&&(o=-1)}return s<0||n<0||o===0||o===1&&s===n-1&&s===r+1?"":e.slice(s,n)}function die(...e){let t=-1,n;for(;++t<e.length;)Hf(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":hie(n)}function hie(e){Hf(e);const t=e.codePointAt(0)===47;let n=mie(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function mie(e,t){let n="",r=0,s=-1,o=0,l=-1,c,f;for(;++l<=e.length;){if(l<e.length)c=e.codePointAt(l);else{if(c===47)break;c=47}if(c===47){if(!(s===l-1||o===1))if(s!==l-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(f=n.lastIndexOf("/"),f!==n.length-1){f<0?(n="",r=0):(n=n.slice(0,f),r=n.length-1-n.lastIndexOf("/")),s=l,o=0;continue}}else if(n.length>0){n="",r=0,s=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(s+1,l):n=e.slice(s+1,l),r=l-s-1;s=l,o=0}else c===46&&o>-1?o++:o=-1}return n}function Hf(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const pie={cwd:gie};function gie(){return"/"}function my(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function bie(e){if(typeof e=="string")e=new URL(e);else if(!my(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 yie(e)}function yie(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 s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const B1=["history","path","basename","stem","extname","dirname"];class xie{constructor(t){let n;t?my(t)?n={path:t}:typeof t=="string"||Eie(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":pie.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<B1.length;){const o=B1[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let s;for(s in n)B1.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?_i.basename(this.path):void 0}set basename(t){U1(t,"basename"),F1(t,"basename"),this.path=_i.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?_i.dirname(this.path):void 0}set dirname(t){k_(this.basename,"dirname"),this.path=_i.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?_i.extname(this.path):void 0}set extname(t){if(F1(t,"extname"),k_(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=_i.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){my(t)&&(t=bie(t)),U1(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?_i.basename(this.path,this.extname):void 0}set stem(t){U1(t,"stem"),F1(t,"stem"),this.path=_i.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const s=this.message(t,n,r);throw s.fatal=!0,s}info(t,n,r){const s=this.message(t,n,r);return s.fatal=void 0,s}message(t,n,r){const s=new Wn(t,n,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function F1(e,t){if(e&&e.includes(_i.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+_i.sep+"`")}function U1(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function k_(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Eie(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const vie=(function(e){const r=this.constructor.prototype,s=r[e],o=function(){return s.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),Tie={}.hasOwnProperty;class xE extends vie{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=oie()}copy(){const t=new xE;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(j1(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(V1("data",this.frozen),this.namespace[t]=n,this):Tie.call(this.namespace,t)&&this.namespace[t]||void 0:t?(V1("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 s=n.call(t,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=wh(t),r=this.parser||this.Parser;return H1("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),H1("process",this.parser||this.Parser),z1("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(o,l){const c=wh(t),f=r.parse(c);r.run(f,c,function(m,p,b){if(m||!p||!b)return d(m);const x=p,S=r.stringify(x,b);Cie(S)?b.value=S:b.result=S,d(m,b)});function d(m,p){m||!p?l(m):o?o(p):n(void 0,p)}}}processSync(t){let n=!1,r;return this.freeze(),H1("processSync",this.parser||this.Parser),z1("processSync",this.compiler||this.Compiler),this.process(t,s),R_("processSync","process",n),r;function s(o,l){n=!0,A_(o),r=l}}run(t,n,r){N_(t),this.freeze();const s=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(l,c){const f=wh(n);s.run(t,f,d);function d(m,p,b){const x=p||t;m?c(m):l?l(x):r(void 0,x,b)}}}runSync(t,n){let r=!1,s;return this.run(t,n,o),R_("runSync","run",r),s;function o(l,c){A_(l),s=c,r=!0}}stringify(t,n){this.freeze();const r=wh(n),s=this.compiler||this.Compiler;return z1("stringify",s),N_(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(V1("use",this.frozen),t!=null)if(typeof t=="function")f(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(d){if(typeof d=="function")f(d,[]);else if(typeof d=="object")if(Array.isArray(d)){const[m,...p]=d;f(m,p)}else l(d);else throw new TypeError("Expected usable value, not `"+d+"`")}function l(d){if(!("plugins"in d)&&!("settings"in d))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");c(d.plugins),d.settings&&(s.settings=j1(!0,s.settings,d.settings))}function c(d){let m=-1;if(d!=null)if(Array.isArray(d))for(;++m<d.length;){const p=d[m];o(p)}else throw new TypeError("Expected a list of plugins, not `"+d+"`")}function f(d,m){let p=-1,b=-1;for(;++p<r.length;)if(r[p][0]===d){b=p;break}if(b===-1)r.push([d,...m]);else if(m.length>0){let[x,...S]=m;const w=r[b][1];hy(w)&&hy(x)&&(x=j1(!0,w,x)),r[b]=[d,x,...S]}}}}const Sie=new xE().freeze();function H1(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function z1(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function V1(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 N_(e){if(!hy(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function R_(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function wh(e){return wie(e)?e:new xie(e)}function wie(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Cie(e){return typeof e=="string"||Aie(e)}function Aie(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function EE(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Lo=EE();function ZM(e){Lo=e}var Gc={exec:()=>null};function wt(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(s,o)=>{let l=typeof o=="string"?o:o.source;return l=l.replace(lr.caret,"$1"),n=n.replace(s,l),r},getRegex:()=>new RegExp(n,t)};return r}var _ie=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),lr={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},kie=/^(?:[ \t]*(?:\n|$))+/,Nie=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Rie=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,zf=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Die=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,vE=/(?:[*+-]|\d{1,9}[.)])/,JM=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,e4=wt(JM).replace(/bull/g,vE).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Oie=wt(JM).replace(/bull/g,vE).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),TE=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Mie=/^[^\n]+/,SE=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Iie=wt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",SE).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Lie=wt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,vE).getRegex(),hp="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",wE=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Pie=wt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",wE).replace("tag",hp).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),t4=wt(TE).replace("hr",zf).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",hp).getRegex(),jie=wt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",t4).getRegex(),CE={blockquote:jie,code:Nie,def:Iie,fences:Rie,heading:Die,hr:zf,html:Pie,lheading:e4,list:Lie,newline:kie,paragraph:t4,table:Gc,text:Mie},D_=wt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",zf).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",hp).getRegex(),Bie={...CE,lheading:Oie,table:D_,paragraph:wt(TE).replace("hr",zf).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",D_).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",hp).getRegex()},Fie={...CE,html:wt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",wE).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Gc,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:wt(TE).replace("hr",zf).replace("heading",` *#{1,6} *[^
410
+ ]`).replace("lheading",e4).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Uie=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Hie=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,n4=/^( {2,}|\\)\n(?!\s*$)/,zie=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,mp=/[\p{P}\p{S}]/u,AE=/[\s\p{P}\p{S}]/u,r4=/[^\s\p{P}\p{S}]/u,Vie=wt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,AE).getRegex(),i4=/(?!~)[\p{P}\p{S}]/u,qie=/(?!~)[\s\p{P}\p{S}]/u,$ie=/(?:[^\s\p{P}\p{S}]|~)/u,Yie=wt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",_ie?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),s4=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Gie=wt(s4,"u").replace(/punct/g,mp).getRegex(),Qie=wt(s4,"u").replace(/punct/g,i4).getRegex(),a4="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Kie=wt(a4,"gu").replace(/notPunctSpace/g,r4).replace(/punctSpace/g,AE).replace(/punct/g,mp).getRegex(),Xie=wt(a4,"gu").replace(/notPunctSpace/g,$ie).replace(/punctSpace/g,qie).replace(/punct/g,i4).getRegex(),Wie=wt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,r4).replace(/punctSpace/g,AE).replace(/punct/g,mp).getRegex(),Zie=wt(/\\(punct)/,"gu").replace(/punct/g,mp).getRegex(),Jie=wt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ese=wt(wE).replace("(?:-->|$)","-->").getRegex(),tse=wt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",ese).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Tm=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,nse=wt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Tm).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),o4=wt(/^!?\[(label)\]\[(ref)\]/).replace("label",Tm).replace("ref",SE).getRegex(),l4=wt(/^!?\[(ref)\](?:\[\])?/).replace("ref",SE).getRegex(),rse=wt("reflink|nolink(?!\\()","g").replace("reflink",o4).replace("nolink",l4).getRegex(),O_=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,_E={_backpedal:Gc,anyPunctuation:Zie,autolink:Jie,blockSkip:Yie,br:n4,code:Hie,del:Gc,emStrongLDelim:Gie,emStrongRDelimAst:Kie,emStrongRDelimUnd:Wie,escape:Uie,link:nse,nolink:l4,punctuation:Vie,reflink:o4,reflinkSearch:rse,tag:tse,text:zie,url:Gc},ise={..._E,link:wt(/^!?\[(label)\]\((.*?)\)/).replace("label",Tm).getRegex(),reflink:wt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Tm).getRegex()},py={..._E,emStrongRDelimAst:Xie,emStrongLDelim:Qie,url:wt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",O_).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:wt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",O_).getRegex()},sse={...py,br:wt(n4).replace("{2,}","*").getRegex(),text:wt(py.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ch={normal:CE,gfm:Bie,pedantic:Fie},Tc={normal:_E,gfm:py,breaks:sse,pedantic:ise},ase={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},M_=e=>ase[e];function ms(e,t){if(t){if(lr.escapeTest.test(e))return e.replace(lr.escapeReplace,M_)}else if(lr.escapeTestNoEncode.test(e))return e.replace(lr.escapeReplaceNoEncode,M_);return e}function I_(e){try{e=encodeURI(e).replace(lr.percentDecode,"%")}catch{return null}return e}function L_(e,t){var o;let n=e.replace(lr.findPipe,(l,c,f)=>{let d=!1,m=c;for(;--m>=0&&f[m]==="\\";)d=!d;return d?"|":" |"}),r=n.split(lr.splitPipe),s=0;if(r[0].trim()||r.shift(),r.length>0&&!((o=r.at(-1))!=null&&o.trim())&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;s<r.length;s++)r[s]=r[s].trim().replace(lr.slashPipe,"|");return r}function Sc(e,t,n){let r=e.length;if(r===0)return"";let s=0;for(;s<r&&e.charAt(r-s-1)===t;)s++;return e.slice(0,r-s)}function ose(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function P_(e,t,n,r,s){let o=t.href,l=t.title||null,c=e[1].replace(s.other.outputLinkReplace,"$1");r.state.inLink=!0;let f={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:o,title:l,text:c,tokens:r.inlineTokens(c)};return r.state.inLink=!1,f}function lse(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let s=r[1];return t.split(`
411
+ `).map(o=>{let l=o.match(n.other.beginningSpace);if(l===null)return o;let[c]=l;return c.length>=s.length?o.slice(s.length):o}).join(`
412
+ `)}var Sm=class{constructor(e){qe(this,"options");qe(this,"rules");qe(this,"lexer");this.options=e||Lo}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Sc(n,`
413
+ `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=lse(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let r=Sc(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Sc(t[0],`
414
+ `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=Sc(t[0],`
415
+ `).split(`
416
+ `),r="",s="",o=[];for(;n.length>0;){let l=!1,c=[],f;for(f=0;f<n.length;f++)if(this.rules.other.blockquoteStart.test(n[f]))c.push(n[f]),l=!0;else if(!l)c.push(n[f]);else break;n=n.slice(f);let d=c.join(`
417
+ `),m=d.replace(this.rules.other.blockquoteSetextReplace,`
418
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
419
+ ${d}`:d,s=s?`${s}
420
+ ${m}`:m;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(m,o,!0),this.lexer.state.top=p,n.length===0)break;let b=o.at(-1);if((b==null?void 0:b.type)==="code")break;if((b==null?void 0:b.type)==="blockquote"){let x=b,S=x.raw+`
421
+ `+n.join(`
422
+ `),w=this.blockquote(S);o[o.length-1]=w,r=r.substring(0,r.length-x.raw.length)+w.raw,s=s.substring(0,s.length-x.text.length)+w.text;break}else if((b==null?void 0:b.type)==="list"){let x=b,S=x.raw+`
423
+ `+n.join(`
424
+ `),w=this.list(S);o[o.length-1]=w,r=r.substring(0,r.length-b.raw.length)+w.raw,s=s.substring(0,s.length-x.raw.length)+w.raw,n=S.substring(o.at(-1).raw.length).split(`
425
+ `);continue}}return{type:"blockquote",raw:r,tokens:o,text:s}}}list(e){var n,r;let t=this.rules.block.list.exec(e);if(t){let s=t[1].trim(),o=s.length>1,l={type:"list",raw:"",ordered:o,start:o?+s.slice(0,-1):"",loose:!1,items:[]};s=o?`\\d{1,9}\\${s.slice(-1)}`:`\\${s}`,this.options.pedantic&&(s=o?s:"[*+-]");let c=this.rules.other.listItemRegex(s),f=!1;for(;e;){let m=!1,p="",b="";if(!(t=c.exec(e))||this.rules.block.hr.test(e))break;p=t[0],e=e.substring(p.length);let x=t[2].split(`
426
+ `,1)[0].replace(this.rules.other.listReplaceTabs,A=>" ".repeat(3*A.length)),S=e.split(`
427
+ `,1)[0],w=!x.trim(),C=0;if(this.options.pedantic?(C=2,b=x.trimStart()):w?C=t[1].length+1:(C=t[2].search(this.rules.other.nonSpaceChar),C=C>4?1:C,b=x.slice(C),C+=t[1].length),w&&this.rules.other.blankLine.test(S)&&(p+=S+`
428
+ `,e=e.substring(S.length+1),m=!0),!m){let A=this.rules.other.nextBulletRegex(C),N=this.rules.other.hrRegex(C),k=this.rules.other.fencesBeginRegex(C),R=this.rules.other.headingBeginRegex(C),U=this.rules.other.htmlBeginRegex(C);for(;e;){let I=e.split(`
429
+ `,1)[0],j;if(S=I,this.options.pedantic?(S=S.replace(this.rules.other.listReplaceNesting," "),j=S):j=S.replace(this.rules.other.tabCharGlobal," "),k.test(S)||R.test(S)||U.test(S)||A.test(S)||N.test(S))break;if(j.search(this.rules.other.nonSpaceChar)>=C||!S.trim())b+=`
430
+ `+j.slice(C);else{if(w||x.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||k.test(x)||R.test(x)||N.test(x))break;b+=`
431
+ `+S}!w&&!S.trim()&&(w=!0),p+=I+`
432
+ `,e=e.substring(I.length+1),x=j.slice(C)}}l.loose||(f?l.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(f=!0)),l.items.push({type:"list_item",raw:p,task:!!this.options.gfm&&this.rules.other.listIsTask.test(b),loose:!1,text:b,tokens:[]}),l.raw+=p}let d=l.items.at(-1);if(d)d.raw=d.raw.trimEnd(),d.text=d.text.trimEnd();else return;l.raw=l.raw.trimEnd();for(let m of l.items){if(this.lexer.state.top=!1,m.tokens=this.lexer.blockTokens(m.text,[]),m.task){if(m.text=m.text.replace(this.rules.other.listReplaceTask,""),((n=m.tokens[0])==null?void 0:n.type)==="text"||((r=m.tokens[0])==null?void 0:r.type)==="paragraph"){m.tokens[0].raw=m.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),m.tokens[0].text=m.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let b=this.lexer.inlineQueue.length-1;b>=0;b--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[b].src)){this.lexer.inlineQueue[b].src=this.lexer.inlineQueue[b].src.replace(this.rules.other.listReplaceTask,"");break}}let p=this.rules.other.listTaskCheckbox.exec(m.raw);if(p){let b={type:"checkbox",raw:p[0]+" ",checked:p[0]!=="[ ]"};m.checked=b.checked,l.loose?m.tokens[0]&&["paragraph","text"].includes(m.tokens[0].type)&&"tokens"in m.tokens[0]&&m.tokens[0].tokens?(m.tokens[0].raw=b.raw+m.tokens[0].raw,m.tokens[0].text=b.raw+m.tokens[0].text,m.tokens[0].tokens.unshift(b)):m.tokens.unshift({type:"paragraph",raw:b.raw,text:b.raw,tokens:[b]}):m.tokens.unshift(b)}}if(!l.loose){let p=m.tokens.filter(x=>x.type==="space"),b=p.length>0&&p.some(x=>this.rules.other.anyLine.test(x.raw));l.loose=b}}if(l.loose)for(let m of l.items){m.loose=!0;for(let p of m.tokens)p.type==="text"&&(p.type="paragraph")}return l}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:r,title:s}}}table(e){var l;let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=L_(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=(l=t[3])!=null&&l.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
433
+ `):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let c of r)this.rules.other.tableAlignRight.test(c)?o.align.push("right"):this.rules.other.tableAlignCenter.test(c)?o.align.push("center"):this.rules.other.tableAlignLeft.test(c)?o.align.push("left"):o.align.push(null);for(let c=0;c<n.length;c++)o.header.push({text:n[c],tokens:this.lexer.inline(n[c]),header:!0,align:o.align[c]});for(let c of s)o.rows.push(L_(c,o.header.length).map((f,d)=>({text:f,tokens:this.lexer.inline(f),header:!1,align:o.align[d]})));return o}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
434
+ `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let o=Sc(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{let o=ose(t[2],"()");if(o===-2)return;if(o>-1){let l=(t[0].indexOf("!")===0?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let r=t[2],s="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(r);o&&(r=o[1],s=o[3])}else s=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),P_(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=t[r.toLowerCase()];if(!s){let o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return P_(n,s,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let s=[...r[0]].length-1,o,l,c=s,f=0,d=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+s);(r=d.exec(t))!=null;){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(l=[...o].length,r[3]||r[4]){c+=l;continue}else if((r[5]||r[6])&&s%3&&!((s+l)%3)){f+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+f);let m=[...r[0]][0].length,p=e.slice(0,s+r.index+m+l);if(Math.min(s,l)%2){let x=p.slice(1,-1);return{type:"em",raw:p,text:x,tokens:this.lexer.inlineTokens(x)}}let b=p.slice(2,-2);return{type:"strong",raw:p,text:b,tokens:this.lexer.inlineTokens(b)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),s=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&s&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,r;return t[2]==="@"?(n=t[1],r="mailto:"+n):(n=t[1],r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let t;if(t=this.rules.inline.url.exec(e)){let r,s;if(t[2]==="@")r=t[0],s="mailto:"+r;else{let o;do o=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(o!==t[0]);r=t[0],t[1]==="www."?s="http://"+t[0]:s=t[0]}return{type:"link",raw:t[0],text:r,href:s,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},ei=class gy{constructor(t){qe(this,"tokens");qe(this,"options");qe(this,"state");qe(this,"inlineQueue");qe(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Lo,this.options.tokenizer=this.options.tokenizer||new Sm,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:lr,block:Ch.normal,inline:Tc.normal};this.options.pedantic?(n.block=Ch.pedantic,n.inline=Tc.pedantic):this.options.gfm&&(n.block=Ch.gfm,this.options.breaks?n.inline=Tc.breaks:n.inline=Tc.gfm),this.tokenizer.rules=n}static get rules(){return{block:Ch,inline:Tc}}static lex(t,n){return new gy(n).lex(t)}static lexInline(t,n){return new gy(n).inlineTokens(t)}lex(t){t=t.replace(lr.carriageReturn,`
435
+ `),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],r=!1){var s,o,l;for(this.options.pedantic&&(t=t.replace(lr.tabCharGlobal," ").replace(lr.spaceLine,""));t;){let c;if((o=(s=this.options.extensions)==null?void 0:s.block)!=null&&o.some(d=>(c=d.call({lexer:this},t,n))?(t=t.substring(c.raw.length),n.push(c),!0):!1))continue;if(c=this.tokenizer.space(t)){t=t.substring(c.raw.length);let d=n.at(-1);c.raw.length===1&&d!==void 0?d.raw+=`
436
+ `:n.push(c);continue}if(c=this.tokenizer.code(t)){t=t.substring(c.raw.length);let d=n.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
437
+ `)?"":`
438
+ `)+c.raw,d.text+=`
439
+ `+c.text,this.inlineQueue.at(-1).src=d.text):n.push(c);continue}if(c=this.tokenizer.fences(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.heading(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.hr(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.blockquote(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.list(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.html(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.def(t)){t=t.substring(c.raw.length);let d=n.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
440
+ `)?"":`
441
+ `)+c.raw,d.text+=`
442
+ `+c.raw,this.inlineQueue.at(-1).src=d.text):this.tokens.links[c.tag]||(this.tokens.links[c.tag]={href:c.href,title:c.title},n.push(c));continue}if(c=this.tokenizer.table(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.lheading(t)){t=t.substring(c.raw.length),n.push(c);continue}let f=t;if((l=this.options.extensions)!=null&&l.startBlock){let d=1/0,m=t.slice(1),p;this.options.extensions.startBlock.forEach(b=>{p=b.call({lexer:this},m),typeof p=="number"&&p>=0&&(d=Math.min(d,p))}),d<1/0&&d>=0&&(f=t.substring(0,d+1))}if(this.state.top&&(c=this.tokenizer.paragraph(f))){let d=n.at(-1);r&&(d==null?void 0:d.type)==="paragraph"?(d.raw+=(d.raw.endsWith(`
443
+ `)?"":`
444
+ `)+c.raw,d.text+=`
445
+ `+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):n.push(c),r=f.length!==t.length,t=t.substring(c.raw.length);continue}if(c=this.tokenizer.text(t)){t=t.substring(c.raw.length);let d=n.at(-1);(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
446
+ `)?"":`
447
+ `)+c.raw,d.text+=`
448
+ `+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):n.push(c);continue}if(t){let d="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var f,d,m,p,b;let r=t,s=null;if(this.tokens.links){let x=Object.keys(this.tokens.links);if(x.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)x.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,s.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)o=s[2]?s[2].length:0,r=r.slice(0,s.index+o)+"["+"a".repeat(s[0].length-o-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=((d=(f=this.options.hooks)==null?void 0:f.emStrongMask)==null?void 0:d.call({lexer:this},r))??r;let l=!1,c="";for(;t;){l||(c=""),l=!1;let x;if((p=(m=this.options.extensions)==null?void 0:m.inline)!=null&&p.some(w=>(x=w.call({lexer:this},t,n))?(t=t.substring(x.raw.length),n.push(x),!0):!1))continue;if(x=this.tokenizer.escape(t)){t=t.substring(x.raw.length),n.push(x);continue}if(x=this.tokenizer.tag(t)){t=t.substring(x.raw.length),n.push(x);continue}if(x=this.tokenizer.link(t)){t=t.substring(x.raw.length),n.push(x);continue}if(x=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(x.raw.length);let w=n.at(-1);x.type==="text"&&(w==null?void 0:w.type)==="text"?(w.raw+=x.raw,w.text+=x.text):n.push(x);continue}if(x=this.tokenizer.emStrong(t,r,c)){t=t.substring(x.raw.length),n.push(x);continue}if(x=this.tokenizer.codespan(t)){t=t.substring(x.raw.length),n.push(x);continue}if(x=this.tokenizer.br(t)){t=t.substring(x.raw.length),n.push(x);continue}if(x=this.tokenizer.del(t)){t=t.substring(x.raw.length),n.push(x);continue}if(x=this.tokenizer.autolink(t)){t=t.substring(x.raw.length),n.push(x);continue}if(!this.state.inLink&&(x=this.tokenizer.url(t))){t=t.substring(x.raw.length),n.push(x);continue}let S=t;if((b=this.options.extensions)!=null&&b.startInline){let w=1/0,C=t.slice(1),A;this.options.extensions.startInline.forEach(N=>{A=N.call({lexer:this},C),typeof A=="number"&&A>=0&&(w=Math.min(w,A))}),w<1/0&&w>=0&&(S=t.substring(0,w+1))}if(x=this.tokenizer.inlineText(S)){t=t.substring(x.raw.length),x.raw.slice(-1)!=="_"&&(c=x.raw.slice(-1)),l=!0;let w=n.at(-1);(w==null?void 0:w.type)==="text"?(w.raw+=x.raw,w.text+=x.text):n.push(x);continue}if(t){let w="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(w);break}else throw new Error(w)}}return n}},wm=class{constructor(e){qe(this,"options");qe(this,"parser");this.options=e||Lo}space(e){return""}code({text:e,lang:t,escaped:n}){var o;let r=(o=(t||"").match(lr.notSpaceStart))==null?void 0:o[0],s=e.replace(lr.endingNewline,"")+`
449
+ `;return r?'<pre><code class="language-'+ms(r)+'">'+(n?s:ms(s,!0))+`</code></pre>
450
+ `:"<pre><code>"+(n?s:ms(s,!0))+`</code></pre>
451
+ `}blockquote({tokens:e}){return`<blockquote>
452
+ ${this.parser.parse(e)}</blockquote>
453
+ `}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
454
+ `}hr(e){return`<hr>
455
+ `}list(e){let t=e.ordered,n=e.start,r="";for(let l=0;l<e.items.length;l++){let c=e.items[l];r+=this.listitem(c)}let s=t?"ol":"ul",o=t&&n!==1?' start="'+n+'"':"";return"<"+s+o+`>
456
+ `+r+"</"+s+`>
457
+ `}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
458
+ `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
459
+ `}table(e){let t="",n="";for(let s=0;s<e.header.length;s++)n+=this.tablecell(e.header[s]);t+=this.tablerow({text:n});let r="";for(let s=0;s<e.rows.length;s++){let o=e.rows[s];n="";for(let l=0;l<o.length;l++)n+=this.tablecell(o[l]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
460
+ <thead>
461
+ `+t+`</thead>
462
+ `+r+`</table>
463
+ `}tablerow({text:e}){return`<tr>
464
+ ${e}</tr>
465
+ `}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
466
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${ms(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),s=I_(e);if(s===null)return r;e=s;let o='<a href="'+e+'"';return t&&(o+=' title="'+ms(t)+'"'),o+=">"+r+"</a>",o}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let s=I_(e);if(s===null)return ms(n);e=s;let o=`<img src="${e}" alt="${n}"`;return t&&(o+=` title="${ms(t)}"`),o+=">",o}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:ms(e.text)}},kE=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},mi=class by{constructor(t){qe(this,"options");qe(this,"renderer");qe(this,"textRenderer");this.options=t||Lo,this.options.renderer=this.options.renderer||new wm,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new kE}static parse(t,n){return new by(n).parse(t)}static parseInline(t,n){return new by(n).parseInline(t)}parse(t){var r,s;let n="";for(let o=0;o<t.length;o++){let l=t[o];if((s=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&s[l.type]){let f=l,d=this.options.extensions.renderers[f.type].call({parser:this},f);if(d!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(f.type)){n+=d||"";continue}}let c=l;switch(c.type){case"space":{n+=this.renderer.space(c);break}case"hr":{n+=this.renderer.hr(c);break}case"heading":{n+=this.renderer.heading(c);break}case"code":{n+=this.renderer.code(c);break}case"table":{n+=this.renderer.table(c);break}case"blockquote":{n+=this.renderer.blockquote(c);break}case"list":{n+=this.renderer.list(c);break}case"checkbox":{n+=this.renderer.checkbox(c);break}case"html":{n+=this.renderer.html(c);break}case"def":{n+=this.renderer.def(c);break}case"paragraph":{n+=this.renderer.paragraph(c);break}case"text":{n+=this.renderer.text(c);break}default:{let f='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(f),"";throw new Error(f)}}}return n}parseInline(t,n=this.renderer){var s,o;let r="";for(let l=0;l<t.length;l++){let c=t[l];if((o=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&o[c.type]){let d=this.options.extensions.renderers[c.type].call({parser:this},c);if(d!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(c.type)){r+=d||"";continue}}let f=c;switch(f.type){case"escape":{r+=n.text(f);break}case"html":{r+=n.html(f);break}case"link":{r+=n.link(f);break}case"image":{r+=n.image(f);break}case"checkbox":{r+=n.checkbox(f);break}case"strong":{r+=n.strong(f);break}case"em":{r+=n.em(f);break}case"codespan":{r+=n.codespan(f);break}case"br":{r+=n.br(f);break}case"del":{r+=n.del(f);break}case"text":{r+=n.text(f);break}default:{let d='Token with "'+f.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return r}},Rh,Oc=(Rh=class{constructor(e){qe(this,"options");qe(this,"block");this.options=e||Lo}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?ei.lex:ei.lexInline}provideParser(){return this.block?mi.parse:mi.parseInline}},qe(Rh,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),qe(Rh,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Rh),use=class{constructor(...t){qe(this,"defaults",EE());qe(this,"options",this.setOptions);qe(this,"parse",this.parseMarkdown(!0));qe(this,"parseInline",this.parseMarkdown(!1));qe(this,"Parser",mi);qe(this,"Renderer",wm);qe(this,"TextRenderer",kE);qe(this,"Lexer",ei);qe(this,"Tokenizer",Sm);qe(this,"Hooks",Oc);this.use(...t)}walkTokens(t,n){var s,o;let r=[];for(let l of t)switch(r=r.concat(n.call(this,l)),l.type){case"table":{let c=l;for(let f of c.header)r=r.concat(this.walkTokens(f.tokens,n));for(let f of c.rows)for(let d of f)r=r.concat(this.walkTokens(d.tokens,n));break}case"list":{let c=l;r=r.concat(this.walkTokens(c.items,n));break}default:{let c=l;(o=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&o[c.type]?this.defaults.extensions.childTokens[c.type].forEach(f=>{let d=c[f].flat(1/0);r=r.concat(this.walkTokens(d,n))}):c.tokens&&(r=r.concat(this.walkTokens(c.tokens,n)))}}return r}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let s={...r};if(s.async=this.defaults.async||s.async||!1,r.extensions&&(r.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let l=n.renderers[o.name];l?n.renderers[o.name]=function(...c){let f=o.renderer.apply(this,c);return f===!1&&(f=l.apply(this,c)),f}:n.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let l=n[o.level];l?l.unshift(o.tokenizer):n[o.level]=[o.tokenizer],o.start&&(o.level==="block"?n.startBlock?n.startBlock.push(o.start):n.startBlock=[o.start]:o.level==="inline"&&(n.startInline?n.startInline.push(o.start):n.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(n.childTokens[o.name]=o.childTokens)}),s.extensions=n),r.renderer){let o=this.defaults.renderer||new wm(this.defaults);for(let l in r.renderer){if(!(l in o))throw new Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;let c=l,f=r.renderer[c],d=o[c];o[c]=(...m)=>{let p=f.apply(o,m);return p===!1&&(p=d.apply(o,m)),p||""}}s.renderer=o}if(r.tokenizer){let o=this.defaults.tokenizer||new Sm(this.defaults);for(let l in r.tokenizer){if(!(l in o))throw new Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;let c=l,f=r.tokenizer[c],d=o[c];o[c]=(...m)=>{let p=f.apply(o,m);return p===!1&&(p=d.apply(o,m)),p}}s.tokenizer=o}if(r.hooks){let o=this.defaults.hooks||new Oc;for(let l in r.hooks){if(!(l in o))throw new Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;let c=l,f=r.hooks[c],d=o[c];Oc.passThroughHooks.has(l)?o[c]=m=>{if(this.defaults.async&&Oc.passThroughHooksRespectAsync.has(l))return(async()=>{let b=await f.call(o,m);return d.call(o,b)})();let p=f.call(o,m);return d.call(o,p)}:o[c]=(...m)=>{if(this.defaults.async)return(async()=>{let b=await f.apply(o,m);return b===!1&&(b=await d.apply(o,m)),b})();let p=f.apply(o,m);return p===!1&&(p=d.apply(o,m)),p}}s.hooks=o}if(r.walkTokens){let o=this.defaults.walkTokens,l=r.walkTokens;s.walkTokens=function(c){let f=[];return f.push(l.call(this,c)),o&&(f=f.concat(o.call(this,c))),f}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return ei.lex(t,n??this.defaults)}parser(t,n){return mi.parse(t,n??this.defaults)}parseMarkdown(t){return(n,r)=>{let s={...r},o={...this.defaults,...s},l=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&s.async===!1)return l(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let c=o.hooks?await o.hooks.preprocess(n):n,f=await(o.hooks?await o.hooks.provideLexer():t?ei.lex:ei.lexInline)(c,o),d=o.hooks?await o.hooks.processAllTokens(f):f;o.walkTokens&&await Promise.all(this.walkTokens(d,o.walkTokens));let m=await(o.hooks?await o.hooks.provideParser():t?mi.parse:mi.parseInline)(d,o);return o.hooks?await o.hooks.postprocess(m):m})().catch(l);try{o.hooks&&(n=o.hooks.preprocess(n));let c=(o.hooks?o.hooks.provideLexer():t?ei.lex:ei.lexInline)(n,o);o.hooks&&(c=o.hooks.processAllTokens(c)),o.walkTokens&&this.walkTokens(c,o.walkTokens);let f=(o.hooks?o.hooks.provideParser():t?mi.parse:mi.parseInline)(c,o);return o.hooks&&(f=o.hooks.postprocess(f)),f}catch(c){return l(c)}}}onError(t,n){return r=>{if(r.message+=`
467
+ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+ms(r.message+"",!0)+"</pre>";return n?Promise.resolve(s):s}if(n)return Promise.reject(r);throw r}}},Ao=new use;function Lt(e,t){return Ao.parse(e,t)}Lt.options=Lt.setOptions=function(e){return Ao.setOptions(e),Lt.defaults=Ao.defaults,ZM(Lt.defaults),Lt};Lt.getDefaults=EE;Lt.defaults=Lo;Lt.use=function(...e){return Ao.use(...e),Lt.defaults=Ao.defaults,ZM(Lt.defaults),Lt};Lt.walkTokens=function(e,t){return Ao.walkTokens(e,t)};Lt.parseInline=Ao.parseInline;Lt.Parser=mi;Lt.parser=mi.parse;Lt.Renderer=wm;Lt.TextRenderer=kE;Lt.Lexer=ei;Lt.lexer=ei.lex;Lt.Tokenizer=Sm;Lt.Hooks=Oc;Lt.parse=Lt;Lt.options;Lt.setOptions;Lt.use;Lt.walkTokens;Lt.parseInline;mi.parse;ei.lex;var cse=300,fse="300px",dse=500;function hse(e={}){let{immediate:t=!1,debounceDelay:n=cse,rootMargin:r=fse,idleTimeout:s=dse}=e,[o,l]=E.useState(!1),c=E.useRef(null),f=E.useRef(null),d=E.useRef(null),m=E.useMemo(()=>x=>{let S=Date.now();return window.setTimeout(()=>{x({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-S))})},1)},[]),p=E.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(x,S)=>window.requestIdleCallback(x,S):m,[m]),b=E.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?x=>window.cancelIdleCallback(x):x=>{clearTimeout(x)},[]);return E.useEffect(()=>{if(t){l(!0);return}let x=c.current;if(!x)return;f.current&&(clearTimeout(f.current),f.current=null),d.current&&(b(d.current),d.current=null);let S=()=>{f.current&&(clearTimeout(f.current),f.current=null),d.current&&(b(d.current),d.current=null)},w=k=>{d.current=p(R=>{R.timeRemaining()>0||R.didTimeout?(l(!0),k.disconnect()):d.current=p(()=>{l(!0),k.disconnect()},{timeout:s/2})},{timeout:s})},C=k=>{S(),f.current=window.setTimeout(()=>{var R,U;let I=k.takeRecords();(I.length===0||(U=(R=I.at(-1))==null?void 0:R.isIntersecting)!=null&&U)&&w(k)},n)},A=(k,R)=>{k.isIntersecting?C(R):S()},N=new IntersectionObserver(k=>{for(let R of k)A(R,N)},{rootMargin:r,threshold:0});return N.observe(x),()=>{f.current&&clearTimeout(f.current),d.current&&b(d.current),N.disconnect()}},[t,n,r,s,b,p]),{shouldRender:o,containerRef:c}}var NE=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),RE=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.jsx("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),pp=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.jsx("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),mse=e=>g.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[g.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),pse=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.jsx("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),gse=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.jsx("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),u4=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.jsx("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),j_=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.jsx("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),bse=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),yse=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),Ke=(...e)=>ON(dx(e)),Ul=(e,t,n)=>{let r=typeof t=="string"?new Blob([t],{type:n}):t,s=URL.createObjectURL(r),o=document.createElement("a");o.href=s,o.download=e,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(s)},xse=E.createContext({code:""}),c4=()=>E.useContext(xse),B_=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:s,code:o,...l})=>{let[c,f]=E.useState(!1),d=E.useRef(0),{code:m}=c4(),{isAnimating:p}=E.useContext(ii),b=o??m,x=async()=>{var w;if(typeof window>"u"||!((w=navigator==null?void 0:navigator.clipboard)!=null&&w.writeText)){t==null||t(new Error("Clipboard API not available"));return}try{c||(await navigator.clipboard.writeText(b),f(!0),e==null||e(),d.current=window.setTimeout(()=>f(!1),n))}catch(C){t==null||t(C)}};E.useEffect(()=>()=>{window.clearTimeout(d.current)},[]);let S=c?NE:RE;return g.jsx("button",{className:Ke("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",s),"data-streamdown":"code-block-copy-button",disabled:p,onClick:x,title:"Copy Code",type:"button",...l,children:r??g.jsx(S,{size:14})})},F_={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},Ese=({onDownload:e,onError:t,language:n,children:r,className:s,code:o,...l})=>{let{code:c}=c4(),{isAnimating:f}=E.useContext(ii),d=o??c,m=`file.${n&&n in F_?F_[n]:"txt"}`,p="text/plain",b=()=>{try{Ul(m,d,p),e==null||e()}catch(x){t==null||t(x)}};return g.jsx("button",{className:Ke("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",s),"data-streamdown":"code-block-download-button",disabled:f,onClick:b,title:"Download file",type:"button",...l,children:r??g.jsx(pp,{size:14})})},U_=()=>g.jsxs("div",{className:"w-full divide-y divide-border overflow-hidden rounded-xl border border-border",children:[g.jsx("div",{className:"h-[46px] w-full bg-muted/80"}),g.jsx("div",{className:"flex w-full items-center justify-center p-4",children:g.jsx(mse,{className:"size-4 animate-spin"})})]}),vse=/\.[^/.]+$/,Tse=({node:e,className:t,src:n,alt:r,...s})=>{let o=async()=>{if(n)try{let l=await(await fetch(n)).blob(),c=new URL(n,window.location.origin).pathname.split("/").pop()||"",f=c.split(".").pop(),d=c.includes(".")&&f!==void 0&&f.length<=4,m="";if(d)m=c;else{let p=l.type,b="png";p.includes("jpeg")||p.includes("jpg")?b="jpg":p.includes("png")?b="png":p.includes("svg")?b="svg":p.includes("gif")?b="gif":p.includes("webp")&&(b="webp"),m=`${(r||c||"image").replace(vse,"")}.${b}`}Ul(m,l,l.type)}catch{window.open(n,"_blank")}};return n?g.jsxs("div",{className:"group relative my-4 inline-block","data-streamdown":"image-wrapper",children:[g.jsx("img",{alt:r,className:Ke("max-w-full rounded-lg",t),"data-streamdown":"image",src:n,...s}),g.jsx("div",{className:"pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"}),g.jsx("button",{className:Ke("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:o,title:"Download image",type:"button",children:g.jsx(pp,{size:14})})]}):null},Qc=0,Sse=()=>{Qc+=1,Qc===1&&(document.body.style.overflow="hidden")},wse=()=>{Qc=Math.max(0,Qc-1),Qc===0&&(document.body.style.overflow="")},Cse=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let[s,o]=E.useState(!1),l=E.useCallback(async()=>{try{await navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)}catch{}},[e]),c=E.useCallback(()=>{r(),n()},[r,n]);return E.useEffect(()=>{if(t){Sse();let f=d=>{d.key==="Escape"&&n()};return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f),wse()}}},[t,n]),t?g.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm","data-streamdown":"link-safety-modal",onClick:n,onKeyDown:f=>{f.key==="Escape"&&n()},role:"button",tabIndex:0,children:g.jsxs("div",{className:"relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg",onClick:f=>f.stopPropagation(),onKeyDown:f=>f.stopPropagation(),role:"presentation",children:[g.jsx("button",{className:"absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:n,title:"Close",type:"button",children:g.jsx(u4,{size:16})}),g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsxs("div",{className:"flex items-center gap-2 font-semibold text-lg",children:[g.jsx(j_,{size:20}),g.jsx("span",{children:"Open external link?"})]}),g.jsx("p",{className:"text-muted-foreground text-sm",children:"You're about to visit an external website."})]}),g.jsx("div",{className:Ke("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("button",{className:"flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted",onClick:l,type:"button",children:s?g.jsxs(g.Fragment,{children:[g.jsx(NE,{size:14}),g.jsx("span",{children:"Copied"})]}):g.jsxs(g.Fragment,{children:[g.jsx(RE,{size:14}),g.jsx("span",{children:"Copy link"})]})}),g.jsxs("button",{className:"flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90",onClick:c,type:"button",children:[g.jsx(j_,{size:14}),g.jsx("span",{children:"Open link"})]})]})]})}):null},yy=E.createContext(null),f4=()=>E.useContext(yy),woe=()=>{var e;let t=f4();return(e=t==null?void 0:t.code)!=null?e:null},DE=()=>{var e;let t=f4();return(e=t==null?void 0:t.mermaid)!=null?e:null},Ase=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((s,o)=>{let l="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),c=new Image;c.crossOrigin="anonymous",c.onload=()=>{let f=document.createElement("canvas"),d=c.width*r,m=c.height*r;f.width=d,f.height=m;let p=f.getContext("2d");if(!p){o(new Error("Failed to create 2D canvas context for PNG export"));return}p.drawImage(c,0,0,d,m),f.toBlob(b=>{if(!b){o(new Error("Failed to create PNG blob"));return}s(b)},"image/png")},c.onerror=()=>o(new Error("Failed to load SVG image")),c.src=l})},_se=({chart:e,children:t,className:n,onDownload:r,config:s,onError:o})=>{let[l,c]=E.useState(!1),f=E.useRef(null),{isAnimating:d}=E.useContext(ii),m=DE(),p=async b=>{try{if(b==="mmd"){Ul("diagram.mmd",e,"text/plain"),c(!1),r==null||r(b);return}if(!m){o==null||o(new Error("Mermaid plugin not available"));return}let x=m.getMermaid(s),S=e.split("").reduce((A,N)=>(A<<5)-A+N.charCodeAt(0)|0,0),w=`mermaid-${Math.abs(S)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:C}=await x.render(w,e);if(!C){o==null||o(new Error("SVG not found. Please wait for the diagram to render."));return}if(b==="svg"){Ul("diagram.svg",C,"image/svg+xml"),c(!1),r==null||r(b);return}if(b==="png"){let A=await Ase(C);Ul("diagram.png",A,"image/png"),r==null||r(b),c(!1);return}}catch(x){o==null||o(x)}};return E.useEffect(()=>{let b=x=>{let S=x.composedPath();f.current&&!S.includes(f.current)&&c(!1)};return document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b)}},[]),g.jsxs("div",{className:"relative",ref:f,children:[g.jsx("button",{className:Ke("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:d,onClick:()=>c(!l),title:"Download diagram",type:"button",children:t??g.jsx(pp,{size:14})}),l?g.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>p("svg"),title:"Download diagram as SVG",type:"button",children:"SVG"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>p("png"),title:"Download diagram as PNG",type:"button",children:"PNG"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>p("mmd"),title:"Download diagram as MMD",type:"button",children:"MMD"})]}):null]})},Kc=0,kse=()=>{Kc+=1,Kc===1&&(document.body.style.overflow="hidden")},Nse=()=>{Kc=Math.max(0,Kc-1),Kc===0&&(document.body.style.overflow="")},Rse=({chart:e,config:t,onFullscreen:n,onExit:r,className:s,...o})=>{let[l,c]=E.useState(!1),{isAnimating:f,controls:d}=E.useContext(ii),m=(()=>{if(typeof d=="boolean")return d;let b=d.mermaid;return b===!1?!1:b===!0||b===void 0?!0:b.panZoom!==!1})(),p=()=>{c(!l)};return E.useEffect(()=>{if(l){kse();let b=x=>{x.key==="Escape"&&c(!1)};return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b),Nse()}}},[l]),E.useEffect(()=>{l?n==null||n():r&&r()},[l,n,r]),g.jsxs(g.Fragment,{children:[g.jsx("button",{className:Ke("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",s),disabled:f,onClick:p,title:"View fullscreen",type:"button",...o,children:g.jsx(pse,{size:14})}),l?g.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm",onClick:p,onKeyDown:b=>{b.key==="Escape"&&p()},role:"button",tabIndex:0,children:[g.jsx("button",{className:"absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:p,title:"Exit fullscreen",type:"button",children:g.jsx(u4,{size:20})}),g.jsx("div",{className:"flex size-full items-center justify-center p-4",onClick:b=>b.stopPropagation(),onKeyDown:b=>b.stopPropagation(),role:"presentation",children:g.jsx(H4,{chart:e,className:"size-full [&_svg]:h-auto [&_svg]:w-auto",config:t,fullscreen:!0,showControls:m})})]}):null]})},d4=e=>{var t,n;let r=[],s=[],o=e.querySelectorAll("thead th");for(let c of o)r.push(((t=c.textContent)==null?void 0:t.trim())||"");let l=e.querySelectorAll("tbody tr");for(let c of l){let f=[],d=c.querySelectorAll("td");for(let m of d)f.push(((n=m.textContent)==null?void 0:n.trim())||"");s.push(f)}return{headers:r,rows:s}},h4=e=>{let{headers:t,rows:n}=e,r=c=>{let f=!1,d=!1;for(let m of c){if(m==='"'){f=!0,d=!0;break}(m===","||m===`
468
+ `)&&(f=!0)}return f?d?`"${c.replace(/"/g,'""')}"`:`"${c}"`:c},s=t.length>0?n.length+1:n.length,o=new Array(s),l=0;t.length>0&&(o[l]=t.map(r).join(","),l+=1);for(let c of n)o[l]=c.map(r).join(","),l+=1;return o.join(`
469
+ `)},Dse=e=>{let{headers:t,rows:n}=e,r=c=>{let f=!1;for(let m of c)if(m===" "||m===`
470
+ `||m==="\r"){f=!0;break}if(!f)return c;let d=[];for(let m of c)m===" "?d.push("\\t"):m===`
471
+ `?d.push("\\n"):m==="\r"?d.push("\\r"):d.push(m);return d.join("")},s=t.length>0?n.length+1:n.length,o=new Array(s),l=0;t.length>0&&(o[l]=t.map(r).join(" "),l+=1);for(let c of n)o[l]=c.map(r).join(" "),l+=1;return o.join(`
472
+ `)},q1=e=>{let t=!1;for(let r of e)if(r==="\\"||r==="|"){t=!0;break}if(!t)return e;let n=[];for(let r of e)r==="\\"?n.push("\\\\"):r==="|"?n.push("\\|"):n.push(r);return n.join("")},Ose=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),s=0,o=t.map(c=>q1(c));r[s]=`| ${o.join(" | ")} |`,s+=1;let l=new Array(t.length);for(let c=0;c<t.length;c+=1)l[c]="---";r[s]=`| ${l.join(" | ")} |`,s+=1;for(let c of n)if(c.length<t.length){let f=new Array(t.length);for(let d=0;d<t.length;d+=1)f[d]=d<c.length?q1(c[d]):"";r[s]=`| ${f.join(" | ")} |`,s+=1}else{let f=c.map(d=>q1(d));r[s]=`| ${f.join(" | ")} |`,s+=1}return r.join(`
473
+ `)},Mse=({children:e,className:t,onCopy:n,onError:r,timeout:s=2e3})=>{let[o,l]=E.useState(!1),[c,f]=E.useState(!1),d=E.useRef(null),m=E.useRef(0),{isAnimating:p}=E.useContext(ii),b=async S=>{var w,C;if(typeof window>"u"||!((w=navigator==null?void 0:navigator.clipboard)!=null&&w.write)){r==null||r(new Error("Clipboard API not available"));return}try{let A=(C=d.current)==null?void 0:C.closest('[data-streamdown="table-wrapper"]'),N=A==null?void 0:A.querySelector("table");if(!N){r==null||r(new Error("Table not found"));return}let k=d4(N),R=S==="csv"?h4(k):Dse(k),U=new ClipboardItem({"text/plain":new Blob([R],{type:"text/plain"}),"text/html":new Blob([N.outerHTML],{type:"text/html"})});await navigator.clipboard.write([U]),f(!0),l(!1),n==null||n(S),m.current=window.setTimeout(()=>f(!1),s)}catch(A){r==null||r(A)}};E.useEffect(()=>{let S=w=>{let C=w.composedPath();d.current&&!C.includes(d.current)&&l(!1)};return document.addEventListener("mousedown",S),()=>{document.removeEventListener("mousedown",S),window.clearTimeout(m.current)}},[]);let x=c?NE:RE;return g.jsxs("div",{className:"relative",ref:d,children:[g.jsx("button",{className:Ke("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:p,onClick:()=>l(!o),title:"Copy table",type:"button",children:e??g.jsx(x,{size:14})}),o?g.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>b("csv"),title:"Copy table as CSV",type:"button",children:"CSV"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>b("tsv"),title:"Copy table as TSV",type:"button",children:"TSV"})]}):null]})},Ise=({children:e,className:t,onDownload:n,onError:r})=>{let[s,o]=E.useState(!1),l=E.useRef(null),{isAnimating:c}=E.useContext(ii),f=d=>{var m;try{let p=(m=l.current)==null?void 0:m.closest('[data-streamdown="table-wrapper"]'),b=p==null?void 0:p.querySelector("table");if(!b){r==null||r(new Error("Table not found"));return}let x=d4(b),S=d==="csv"?h4(x):Ose(x);Ul(`table.${d==="csv"?"csv":"md"}`,S,d==="csv"?"text/csv":"text/markdown"),o(!1),n==null||n(d)}catch(p){r==null||r(p)}};return E.useEffect(()=>{let d=m=>{let p=m.composedPath();l.current&&!p.includes(l.current)&&o(!1)};return document.addEventListener("mousedown",d),()=>{document.removeEventListener("mousedown",d)}},[]),g.jsxs("div",{className:"relative",ref:l,children:[g.jsx("button",{className:Ke("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:c,onClick:()=>o(!s),title:"Download table",type:"button",children:e??g.jsx(pp,{size:14})}),s?g.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>f("csv"),title:"Download table as CSV",type:"button",children:"CSV"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>f("markdown"),title:"Download table as Markdown",type:"button",children:"Markdown"})]}):null]})},Lse=({children:e,className:t,showControls:n,...r})=>g.jsxs("div",{className:"my-4 flex flex-col space-y-2","data-streamdown":"table-wrapper",children:[n?g.jsxs("div",{className:"flex items-center justify-end gap-1",children:[g.jsx(Mse,{}),g.jsx(Ise,{})]}):null,g.jsx("div",{className:"overflow-x-auto",children:g.jsx("table",{className:Ke("w-full border-collapse border border-border",t),"data-streamdown":"table",...r,children:e})})]}),Pse=E.lazy(()=>Ty(()=>import("./code-block-37QAKDTI-lJVmOB7p.js"),[]).then(e=>({default:e.CodeBlock}))),jse=E.lazy(()=>Ty(()=>Promise.resolve().then(()=>boe),void 0).then(e=>({default:e.Mermaid}))),Bse=/language-([^\s]+)/;function gp(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,s=e.position.end,o=t.position.end;return(n==null?void 0:n.line)===(r==null?void 0:r.line)&&(n==null?void 0:n.column)===(r==null?void 0:r.column)&&(s==null?void 0:s.line)===(o==null?void 0:o.line)&&(s==null?void 0:s.column)===(o==null?void 0:o.column)}function ln(e,t){return e.className===t.className&&gp(e.node,t.node)}var xy=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,Ah=(e,t)=>{if(typeof e=="boolean")return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},OE=E.memo(({children:e,className:t,node:n,...r})=>g.jsx("ol",{className:Ke("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e}),(e,t)=>ln(e,t));OE.displayName="MarkdownOl";var m4=E.memo(({children:e,className:t,node:n,...r})=>g.jsx("li",{className:Ke("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e}),(e,t)=>e.className===t.className&&gp(e.node,t.node));m4.displayName="MarkdownLi";var p4=E.memo(({children:e,className:t,node:n,...r})=>g.jsx("ul",{className:Ke("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e}),(e,t)=>ln(e,t));p4.displayName="MarkdownUl";var g4=E.memo(({className:e,node:t,...n})=>g.jsx("hr",{className:Ke("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n}),(e,t)=>ln(e,t));g4.displayName="MarkdownHr";var b4=E.memo(({children:e,className:t,node:n,...r})=>g.jsx("span",{className:Ke("font-semibold",t),"data-streamdown":"strong",...r,children:e}),(e,t)=>ln(e,t));b4.displayName="MarkdownStrong";var Fse=({children:e,className:t,href:n,node:r,...s})=>{let{linkSafety:o}=E.useContext(ii),[l,c]=E.useState(!1),f=n==="streamdown:incomplete-link",d=E.useCallback(async x=>{if(!(!(o!=null&&o.enabled&&n)||f)){if(x.preventDefault(),o.onLinkCheck&&await o.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}c(!0)}},[o,n,f]),m=E.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),p=E.useCallback(()=>{c(!1)},[]),b={url:n??"",isOpen:l,onClose:p,onConfirm:m};return o!=null&&o.enabled&&n?g.jsxs(g.Fragment,{children:[g.jsx("button",{className:Ke("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":f,"data-streamdown":"link",onClick:d,type:"button",children:e}),o.renderModal?o.renderModal(b):g.jsx(Cse,{...b})]}):g.jsx("a",{className:Ke("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":f,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...s,children:e})},y4=E.memo(Fse,(e,t)=>ln(e,t)&&e.href===t.href);y4.displayName="MarkdownA";var x4=E.memo(({children:e,className:t,node:n,...r})=>g.jsx("h1",{className:Ke("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e}),(e,t)=>ln(e,t));x4.displayName="MarkdownH1";var E4=E.memo(({children:e,className:t,node:n,...r})=>g.jsx("h2",{className:Ke("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e}),(e,t)=>ln(e,t));E4.displayName="MarkdownH2";var v4=E.memo(({children:e,className:t,node:n,...r})=>g.jsx("h3",{className:Ke("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e}),(e,t)=>ln(e,t));v4.displayName="MarkdownH3";var T4=E.memo(({children:e,className:t,node:n,...r})=>g.jsx("h4",{className:Ke("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e}),(e,t)=>ln(e,t));T4.displayName="MarkdownH4";var S4=E.memo(({children:e,className:t,node:n,...r})=>g.jsx("h5",{className:Ke("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e}),(e,t)=>ln(e,t));S4.displayName="MarkdownH5";var w4=E.memo(({children:e,className:t,node:n,...r})=>g.jsx("h6",{className:Ke("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e}),(e,t)=>ln(e,t));w4.displayName="MarkdownH6";var C4=E.memo(({children:e,className:t,node:n,...r})=>{let{controls:s}=E.useContext(ii),o=xy(s,"table");return g.jsx(Lse,{className:t,showControls:o,...r,children:e})},(e,t)=>ln(e,t));C4.displayName="MarkdownTable";var A4=E.memo(({children:e,className:t,node:n,...r})=>g.jsx("thead",{className:Ke("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e}),(e,t)=>ln(e,t));A4.displayName="MarkdownThead";var _4=E.memo(({children:e,className:t,node:n,...r})=>g.jsx("tbody",{className:Ke("divide-y divide-border bg-muted/40",t),"data-streamdown":"table-body",...r,children:e}),(e,t)=>ln(e,t));_4.displayName="MarkdownTbody";var k4=E.memo(({children:e,className:t,node:n,...r})=>g.jsx("tr",{className:Ke("border-border border-b",t),"data-streamdown":"table-row",...r,children:e}),(e,t)=>ln(e,t));k4.displayName="MarkdownTr";var N4=E.memo(({children:e,className:t,node:n,...r})=>g.jsx("th",{className:Ke("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e}),(e,t)=>ln(e,t));N4.displayName="MarkdownTh";var R4=E.memo(({children:e,className:t,node:n,...r})=>g.jsx("td",{className:Ke("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e}),(e,t)=>ln(e,t));R4.displayName="MarkdownTd";var D4=E.memo(({children:e,className:t,node:n,...r})=>g.jsx("blockquote",{className:Ke("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e}),(e,t)=>ln(e,t));D4.displayName="MarkdownBlockquote";var O4=E.memo(({children:e,className:t,node:n,...r})=>g.jsx("sup",{className:Ke("text-sm",t),"data-streamdown":"superscript",...r,children:e}),(e,t)=>ln(e,t));O4.displayName="MarkdownSup";var M4=E.memo(({children:e,className:t,node:n,...r})=>g.jsx("sub",{className:Ke("text-sm",t),"data-streamdown":"subscript",...r,children:e}),(e,t)=>ln(e,t));M4.displayName="MarkdownSub";var I4=E.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let s=l=>{var c,f;if(!E.isValidElement(l))return!1;let d=Array.isArray(l.props.children)?l.props.children:[l.props.children],m=!1,p=!1;for(let b of d)if(b){if(typeof b=="string")b.trim()!==""&&(m=!0);else if(E.isValidElement(b))if(((c=b.props)==null?void 0:c["data-footnote-backref"])!==void 0)p=!0;else{let x=Array.isArray(b.props.children)?b.props.children:[b.props.children];for(let S of x){if(typeof S=="string"&&S.trim()!==""){m=!0;break}if(E.isValidElement(S)&&((f=S.props)==null?void 0:f["data-footnote-backref"])===void 0){m=!0;break}}}}return p&&!m},o=Array.isArray(e)?e.map(l=>{if(!E.isValidElement(l))return l;if(l.type===OE){let c=(Array.isArray(l.props.children)?l.props.children:[l.props.children]).filter(f=>!s(f));return c.length===0?null:{...l,props:{...l.props,children:c}}}return l}):e;return(Array.isArray(o)?o.some(l=>l!==null):o!==null)?g.jsx("section",{className:t,...r,children:o}):null}return g.jsx("section",{className:t,...r,children:e})},(e,t)=>ln(e,t));I4.displayName="MarkdownSection";var Use=({node:e,className:t,children:n,...r})=>{var s,o,l;let c=((s=e==null?void 0:e.position)==null?void 0:s.start.line)===((o=e==null?void 0:e.position)==null?void 0:o.end.line),{mermaid:f,controls:d}=E.useContext(ii),m=DE();if(c)return g.jsx("code",{className:Ke("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let p=t==null?void 0:t.match(Bse),b=(l=p==null?void 0:p.at(1))!=null?l:"",x="";if(E.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?x=n.props.children:typeof n=="string"&&(x=n),b==="mermaid"&&m){let w=xy(d,"mermaid"),C=Ah(d,"download"),A=Ah(d,"copy"),N=Ah(d,"fullscreen"),k=Ah(d,"panZoom"),R=w&&(C||A||N);return g.jsx(E.Suspense,{fallback:g.jsx(U_,{}),children:g.jsxs("div",{className:Ke("group relative my-4 h-auto rounded-xl border p-4",t),"data-streamdown":"mermaid-block",children:[R?g.jsxs("div",{className:"flex items-center justify-end gap-2",children:[C?g.jsx(_se,{chart:x,config:f==null?void 0:f.config}):null,A?g.jsx(B_,{code:x}):null,N?g.jsx(Rse,{chart:x,config:f==null?void 0:f.config}):null]}):null,g.jsx(jse,{chart:x,config:f==null?void 0:f.config,showControls:k})]})})}let S=xy(d,"code");return g.jsx(E.Suspense,{fallback:g.jsx(U_,{}),children:g.jsx(Pse,{className:Ke("overflow-x-auto border-border border-t",t),code:x,language:b,children:S?g.jsxs(g.Fragment,{children:[g.jsx(Ese,{code:x,language:b}),g.jsx(B_,{})]}):null})})},L4=E.memo(Use,(e,t)=>e.className===t.className&&gp(e.node,t.node));L4.displayName="MarkdownCode";var P4=E.memo(Tse,(e,t)=>e.className===t.className&&gp(e.node,t.node));P4.displayName="MarkdownImg";var j4=E.memo(({children:e,className:t,node:n,...r})=>{var s,o;let l=(Array.isArray(e)?e:[e]).filter(c=>c!=null&&c!=="");if(l.length===1&&E.isValidElement(l[0])){let c=l[0].props.node,f=c==null?void 0:c.tagName;if(f==="img")return g.jsx(g.Fragment,{children:e});if(f==="code"&&((s=c==null?void 0:c.position)==null?void 0:s.start.line)!==((o=c==null?void 0:c.position)==null?void 0:o.end.line))return g.jsx(g.Fragment,{children:e})}return g.jsx("p",{className:t,...r,children:e})},(e,t)=>ln(e,t));j4.displayName="MarkdownParagraph";var Hse={ol:OE,li:m4,ul:p4,hr:g4,strong:b4,a:y4,h1:x4,h2:E4,h3:v4,h4:T4,h5:S4,h6:w4,table:C4,thead:A4,tbody:_4,tr:k4,th:N4,td:R4,blockquote:D4,code:L4,img:P4,pre:({children:e})=>e,sup:O4,sub:M4,p:j4,section:I4},H_=[],z_={allowDangerousHtml:!0},_h=new WeakMap,zse=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,r=e.remarkPlugins,s=e.remarkRehypeOptions;if(!(n||r||s)){let m="default";return this.keyCache.set(e,m),m}let o=m=>{if(!m||m.length===0)return"";let p="";for(let b=0;b<m.length;b+=1){let x=m[b];if(b>0&&(p+=","),Array.isArray(x)){let[S,w]=x;if(typeof S=="function"){let C=_h.get(S);C||(C=S.name,_h.set(S,C)),p+=C}else p+=String(S);p+=":",p+=JSON.stringify(w)}else if(typeof x=="function"){let S=_h.get(x);S||(S=x.name,_h.set(x,S)),p+=S}else p+=String(x)}return p},l=o(n),c=o(r),f=s?JSON.stringify(s):"",d=`${c}::${l}::${f}`;return this.keyCache.set(e,d),d}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let r=this.cache.keys().next().value;r&&this.cache.delete(r)}this.cache.set(n,t)}clear(){this.cache.clear()}},V_=new zse,B4=e=>{let t=Vse(e),n=e.children||"";return $se(t.runSync(t.parse(n),n),e)},Vse=e=>{let t=V_.get(e);if(t)return t;let n=qse(e);return V_.set(e,n),n},qse=e=>{let t=e.rehypePlugins||H_,n=e.remarkPlugins||H_,r=e.remarkRehypeOptions?{...z_,...e.remarkRehypeOptions}:z_;return Sie().use(Tre).use(n).use(iie,r).use(t)},$se=(e,t)=>Rne(e,{Fragment:g.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0}),Yse=/\[\^[^\]\s]{1,200}\](?!:)/,Gse=/\[\^[^\]\s]{1,200}\]:/,Qse=/<\/(\w+)>/,Kse=/<(\w+)[\s>]/,$1=e=>{let t=0;for(;t<e.length&&(e[t]===" "||e[t]===" "||e[t]===`
474
+ `||e[t]==="\r");)t+=1;return t+1<e.length&&e[t]==="$"&&e[t+1]==="$"},Xse=e=>{let t=e.length-1;for(;t>=0&&(e[t]===" "||e[t]===" "||e[t]===`
475
+ `||e[t]==="\r");)t-=1;return t>=1&&e[t]==="$"&&e[t-1]==="$"},Y1=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},Wse=e=>{let t=Yse.test(e),n=Gse.test(e);if(t||n)return[e];let r=ei.lex(e,{gfm:!0}),s=[],o=[];for(let l of r){let c=l.raw,f=s.length;if(o.length>0){if(s[f-1]+=c,l.type==="html"){let d=c.match(Qse);if(d){let m=d[1];o.at(-1)===m&&o.pop()}}continue}if(l.type==="html"&&l.block){let d=c.match(Kse);if(d){let m=d[1];c.includes(`</${m}>`)||o.push(m)}}if(c.trim()==="$$"&&f>0){let d=s[f-1],m=$1(d),p=Y1(d);if(m&&p%2===1){s[f-1]=d+c;continue}}if(f>0&&Xse(c)){let d=s[f-1],m=$1(d),p=Y1(d),b=Y1(c);if(m&&p%2===1&&!$1(c)&&b===1){s[f-1]=d+c;continue}}s.push(c)}return s},Zse={raw:EW,sanitize:[RW,{}],harden:[YG,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},Jse={gfm:[cte,{}]},eae=Object.values(Zse),tae=Object.values(Jse),nae={block:" ▋",circle:" ●"},rae={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},ii=E.createContext(rae),F4=E.memo(({content:e,shouldParseIncompleteMarkdown:t,index:n,...r})=>g.jsx(B4,{...r,children:e}),(e,t)=>{if(e.content!==t.content||e.index!==t.index)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(s=>{var o,l;return((o=e.components)==null?void 0:o[s])!==((l=t.components)==null?void 0:l[s])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});F4.displayName="Block";var iae=["github-light","github-dark"],U4=E.memo(({children:e,mode:t="streaming",parseIncompleteMarkdown:n=!0,components:r,rehypePlugins:s=eae,remarkPlugins:o=tae,className:l,shikiTheme:c=iae,mermaid:f,controls:d=!0,isAnimating:m=!1,BlockComponent:p=F4,parseMarkdownIntoBlocksFn:b=Wse,caret:x,plugins:S,remend:w,linkSafety:C={enabled:!0},...A})=>{let N=E.useId(),[k,R]=E.useTransition(),U=E.useMemo(()=>typeof e!="string"?"":t==="streaming"&&n?mne(e,w):e,[e,t,n,w]),I=E.useMemo(()=>b(U),[U,b]),[j,M]=E.useState(I);E.useEffect(()=>{t==="streaming"?R(()=>{M(I)}):M(I)},[I,t]);let $=t==="streaming"?j:I,L=E.useMemo(()=>$.map((O,H)=>`${N}-${H}`),[$.length,N]),W=E.useMemo(()=>{var O,H;return{shikiTheme:(H=(O=S==null?void 0:S.code)==null?void 0:O.getThemes())!=null?H:c,controls:d,isAnimating:m,mode:t,mermaid:f,linkSafety:C}},[c,d,m,t,f,C,S==null?void 0:S.code]),K=E.useMemo(()=>({...Hse,...r}),[r]),J=E.useMemo(()=>{let O=[];return S!=null&&S.cjk&&(O=[...O,...S.cjk.remarkPluginsBefore]),O=[...O,...o],S!=null&&S.cjk&&(O=[...O,...S.cjk.remarkPluginsAfter]),S!=null&&S.math&&(O=[...O,S.math.remarkPlugin]),O},[o,S==null?void 0:S.math,S==null?void 0:S.cjk]),te=E.useMemo(()=>S!=null&&S.math?[...s,S.math.rehypePlugin]:s,[s,S==null?void 0:S.math]),ie=E.useMemo(()=>x&&m?{"--streamdown-caret":`"${nae[x]}"`}:void 0,[x,m]);return t==="static"?g.jsx(yy.Provider,{value:S??null,children:g.jsx(ii.Provider,{value:W,children:g.jsx("div",{className:Ke("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",l),children:g.jsx(B4,{components:K,rehypePlugins:te,remarkPlugins:J,...A,children:e})})})}):g.jsx(yy.Provider,{value:S??null,children:g.jsx(ii.Provider,{value:W,children:g.jsxs("div",{className:Ke("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",x?"*:last:after:inline *:last:after:align-baseline *:last:after:content-(--streamdown-caret)":null,l),style:ie,children:[$.length===0&&x&&m&&g.jsx("span",{}),$.map((O,H)=>g.jsx(p,{components:K,content:O,index:H,rehypePlugins:te,remarkPlugins:J,shouldParseIncompleteMarkdown:n,...A},L[H]))]})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety);U4.displayName="Streamdown";var sae=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:s=.1,showControls:o=!0,initialZoom:l=1,fullscreen:c=!1})=>{let f=E.useRef(null),d=E.useRef(null),[m,p]=E.useState(l),[b,x]=E.useState({x:0,y:0}),[S,w]=E.useState(!1),[C,A]=E.useState({x:0,y:0}),[N,k]=E.useState({x:0,y:0}),R=E.useCallback(K=>{p(J=>Math.max(n,Math.min(r,J+K)))},[n,r]),U=E.useCallback(()=>{R(s)},[R,s]),I=E.useCallback(()=>{R(-s)},[R,s]),j=E.useCallback(()=>{p(l),x({x:0,y:0})},[l]),M=E.useCallback(K=>{K.preventDefault();let J=K.deltaY>0?-s:s;R(J)},[R,s]),$=E.useCallback(K=>{if(K.button!==0||K.isPrimary===!1)return;w(!0),A({x:K.clientX,y:K.clientY}),k(b);let J=K.currentTarget;J instanceof HTMLElement&&J.setPointerCapture(K.pointerId)},[b]),L=E.useCallback(K=>{if(!S)return;K.preventDefault();let J=K.clientX-C.x,te=K.clientY-C.y;x({x:N.x+J,y:N.y+te})},[S,C,N]),W=E.useCallback(K=>{w(!1);let J=K.currentTarget;J instanceof HTMLElement&&J.releasePointerCapture(K.pointerId)},[]);return E.useEffect(()=>{let K=f.current;if(K)return K.addEventListener("wheel",M,{passive:!1}),()=>{K.removeEventListener("wheel",M)}},[M]),E.useEffect(()=>{let K=d.current;if(K&&S)return document.body.style.userSelect="none",K.addEventListener("pointermove",L,{passive:!1}),K.addEventListener("pointerup",W),K.addEventListener("pointercancel",W),()=>{document.body.style.userSelect="",K.removeEventListener("pointermove",L),K.removeEventListener("pointerup",W),K.removeEventListener("pointercancel",W)}},[S,L,W]),g.jsxs("div",{className:Ke("relative flex flex-col",c?"h-full w-full":"min-h-28 w-full",t),ref:f,style:{cursor:S?"grabbing":"grab"},children:[o?g.jsxs("div",{className:Ke("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/90 p-1 shadow-sm backdrop-blur-sm",c?"bottom-4 left-4":"bottom-2 left-2"),children:[g.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:m>=r,onClick:U,title:"Zoom in",type:"button",children:g.jsx(bse,{size:16})}),g.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:m<=n,onClick:I,title:"Zoom out",type:"button",children:g.jsx(yse,{size:16})}),g.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",onClick:j,title:"Reset zoom and pan",type:"button",children:g.jsx(gse,{size:16})})]}):null,g.jsx("div",{className:Ke("flex-1 origin-center transition-transform duration-150 ease-out",c?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:$,ref:d,role:"application",style:{transform:`translate(${b.x}px, ${b.y}px) scale(${m})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},H4=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:s=!0})=>{let[o,l]=E.useState(null),[c,f]=E.useState(!1),[d,m]=E.useState(""),[p,b]=E.useState(""),[x,S]=E.useState(0),{mermaid:w}=E.useContext(ii),C=DE(),A=w==null?void 0:w.errorComponent,{shouldRender:N,containerRef:k}=hse({immediate:r});if(E.useEffect(()=>{if(N){if(!C){l("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{l(null),f(!0);let U=C.getMermaid(n),I=e.split("").reduce(($,L)=>($<<5)-$+L.charCodeAt(0)|0,0),j=`mermaid-${Math.abs(I)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:M}=await U.render(j,e);m(M),b(M)}catch(U){if(!(p||d)){let I=U instanceof Error?U.message:"Failed to render Mermaid chart";l(I)}}finally{f(!1)}})()}},[e,n,x,N,C]),!(N||d||p))return g.jsx("div",{className:Ke("my-4 min-h-[200px]",t),ref:k});if(c&&!d&&!p)return g.jsx("div",{className:Ke("my-4 flex justify-center p-4",t),ref:k,children:g.jsxs("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[g.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),g.jsx("span",{className:"text-sm",children:"Loading diagram..."})]})});if(o&&!d&&!p){let U=()=>S(I=>I+1);return A?g.jsx("div",{ref:k,children:g.jsx(A,{chart:e,error:o,retry:U})}):g.jsxs("div",{className:Ke("rounded-lg border border-red-200 bg-red-50 p-4",t),ref:k,children:[g.jsxs("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",o]}),g.jsxs("details",{className:"mt-2",children:[g.jsx("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),g.jsx("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:e})]})]})}let R=d||p;return g.jsx("div",{className:Ke("size-full",t),"data-streamdown":"mermaid",ref:k,children:g.jsx(sae,{className:Ke(r?"size-full overflow-hidden":"my-4 overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:s,zoomStep:.1,children:g.jsx("div",{"aria-label":"Mermaid chart",className:Ke("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:R},role:"img"})})})};function aae({url:e,isOpen:t,onClose:n,onConfirm:r}){return t?ko.createPortal(g.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center","data-streamdown":"link-safety-modal",onClick:n,onKeyDown:s=>{s.key==="Escape"&&n()},role:"button",tabIndex:0,children:g.jsxs("div",{className:"relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg",onClick:s=>s.stopPropagation(),onKeyDown:s=>s.stopPropagation(),role:"presentation",children:[g.jsx("button",{className:"absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:n,title:"Close",type:"button",children:g.jsx(Af,{size:16})}),g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsxs("div",{className:"flex items-center gap-2 font-semibold text-lg",children:[g.jsx(gC,{size:20}),g.jsx("span",{children:"Open external link?"})]}),g.jsx("p",{className:"text-muted-foreground text-sm",children:"You're about to visit an external website."})]}),g.jsx("div",{className:"break-all rounded-md bg-muted p-3 font-mono text-sm",children:e}),g.jsxs("div",{className:"flex gap-3",children:[g.jsxs("button",{className:"flex flex-1 items-center justify-center gap-2 rounded-lg border px-4 py-2 text-sm font-medium transition-colors hover:bg-muted",onClick:()=>{navigator.clipboard.writeText(e),n()},type:"button",children:[g.jsx(pN,{size:14}),"Copy link"]}),g.jsxs("button",{className:"flex flex-1 items-center justify-center gap-2 rounded-lg bg-foreground px-4 py-2 text-sm font-medium text-background transition-colors hover:bg-foreground/90",onClick:r,type:"button",children:[g.jsx(gC,{size:14}),"Open link"]})]})]})}),document.body):null}const oae={enabled:!0,renderModal:e=>g.jsx(aae,{...e})};function lae({content:e,isStreaming:t=!1}){return g.jsx("div",{className:Xe("relative",t&&"streaming-cursor"),children:g.jsx(U4,{shikiTheme:["github-light","github-dark"],linkSafety:oae,children:e})})}function tr(e){return typeof e=="string"?e:""}function G1(e){if(!e)return"...";const t=e.split("/");return t[t.length-1]||"..."}function uae(e){if(!e)return"...";try{return new URL(e).hostname}catch{return e.slice(0,30)}}function wc(e,t){return e?e.length>t?e.slice(0,t)+"…":e:"..."}function kh(e){return!e||e==="..."?'"…"':`"${e}"`}function cae(e,t){let n=null;try{n=JSON.parse(t)}catch{return e}if(!n||typeof n!="object")return e;switch(e){case"Bash":return`Run ${kh(wc(tr(n.description)||tr(n.command),40))}`;case"Read":return`Read ${G1(tr(n.file_path))}`;case"Write":return`Write ${G1(tr(n.file_path))}`;case"Edit":return`Edit ${G1(tr(n.file_path))}`;case"Glob":return`Find ${tr(n.pattern)||"..."}`;case"Grep":return`Search ${kh(wc(tr(n.pattern),30))}`;case"Task":return`Agent: ${wc(tr(n.description)||tr(n.prompt),40)}`;case"TaskCreate":return`Create task ${kh(wc(tr(n.subject),35))}`;case"TaskUpdate":{const r=tr(n.taskId),s=tr(n.status);return s?`Update task #${r} → ${s}`:`Update task #${r}`}case"TaskList":return"List tasks";case"Skill":return`Skill ${tr(n.skill)||"..."}`;case"WebSearch":return`Search ${kh(wc(tr(n.query),35))}`;case"WebFetch":return`Fetch ${uae(tr(n.url))}`;default:return e}}function z4(e){return e.replace(/_/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/^./,t=>t.toUpperCase())}function fae(e,t){return e.length<=t?e:e.slice(0,t)+"…"}function dae(e){return/^[\/~.]/.test(e)||/\.(ts|tsx|js|jsx|json|md|py|rs|go|sh|yml|yaml|toml)$/.test(e)}function Ey(e,t){if(e===null)return g.jsx("span",{className:"text-muted-foreground italic",children:"null"});if(typeof e=="boolean")return g.jsx("span",{className:"text-amber-600 dark:text-amber-400",children:String(e)});if(typeof e=="number")return g.jsx("span",{className:"text-blue-600 dark:text-blue-400",children:e});if(typeof e=="string"){const n=fae(e,t);return dae(e)?g.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded break-all",children:n}):g.jsx("span",{className:"break-words",children:n})}if(Array.isArray(e)){const n=e.slice(0,5),r=e.length-5;return g.jsxs("div",{className:"space-y-0.5",children:[n.map((s,o)=>g.jsx("div",{className:"pl-2 border-l border-border/40",children:Ey(s,80)},o)),r>0&&g.jsxs("span",{className:"text-muted-foreground text-xs italic",children:["… and ",r," more"]})]})}if(typeof e=="object"){const n=Object.entries(e);return g.jsx("div",{className:"space-y-0.5",children:n.map(([r,s])=>g.jsxs("div",{className:"pl-2 border-l border-border/40",children:[g.jsxs("span",{className:"text-muted-foreground text-xs",children:[z4(r),": "]}),typeof s=="object"&&s!==null?g.jsx("span",{className:"text-muted-foreground italic",children:"{..."}):Ey(s,80)]},r))})}return g.jsx("span",{children:String(e)})}function V4({toolName:e,input:t}){if(!t)return null;let n;try{n=JSON.parse(t)}catch{return g.jsx("pre",{className:"text-xs overflow-x-auto whitespace-pre-wrap",children:t})}if(typeof n!="object"||n===null||Array.isArray(n))return g.jsx("pre",{className:"text-xs overflow-x-auto whitespace-pre-wrap",children:t});const r=Object.entries(n);return r.length===0?null:g.jsx("dl",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 text-xs",children:r.map(([s,o])=>g.jsxs("div",{className:"contents",children:[g.jsx("dt",{className:"text-muted-foreground font-medium py-0.5 whitespace-nowrap",children:z4(s)}),g.jsx("dd",{className:"py-0.5 min-w-0",children:Ey(o,120)})]},s))})}function hae({toolCall:e,defaultExpanded:t=!1}){const[n,r]=E.useState(t),s={pending:g.jsx(af,{className:"size-(--size-icon-xs) animate-spin"}),running:g.jsx(af,{className:"size-(--size-icon-xs) animate-spin text-blue-500"}),complete:g.jsx(Mi,{className:"size-(--size-icon-xs) text-green-500"}),error:g.jsx(Af,{className:"size-(--size-icon-xs) text-red-500"})}[e.status];return g.jsxs("div",{className:"mt-px first:mt-1 rounded border bg-muted/50 text-sm transition-all duration-150 hover:border-border hover:shadow-sm",children:[g.jsxs("button",{onClick:()=>r(!n),className:"flex w-full items-center gap-2 px-3 py-1",children:[s,g.jsx("span",{className:"font-mono text-3xs",children:cae(e.toolName,e.input)}),g.jsx(gt.div,{animate:{rotate:n?180:0},transition:{type:"spring",stiffness:400,damping:30},className:"ml-auto",children:g.jsx(Dm,{className:"size-(--size-icon-xs)"})})]}),g.jsx(Rn,{initial:!1,children:n&&g.jsx(gt.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3,ease:[.4,0,.2,1]},className:"overflow-hidden",children:g.jsxs("div",{className:"border-t px-3 pb-3 pt-1",children:[e.input&&g.jsx(V4,{toolName:e.toolName,input:e.input}),e.result&&g.jsx("pre",{className:"mt-2 text-xs overflow-x-auto border-t pt-2 whitespace-pre-wrap",children:e.result})]})})})]})}function eo({className:e,children:t,...n}){return g.jsx("kbd",{className:Xe("pointer-events-none hidden md:inline-flex h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground",e),...n,children:t})}const mae=E.forwardRef(function({sessionId:t,toolCallId:n,toolName:r,input:s,isActive:o=!1},l){const c=si(),[f,d]=E.useState(!1),[m,p]=E.useState(null);async function b(){if(!(f||m)){d(!0);try{await c.approveTool(t,n),p("approved")}catch(S){console.error("Approval failed:",S)}finally{d(!1)}}}async function x(){if(!(f||m)){d(!0);try{await c.denyTool(t,n),p("denied")}catch(S){console.error("Deny failed:",S)}finally{d(!1)}}}return E.useImperativeHandle(l,()=>({approve(){b()},deny(){x()}}),[f,m]),m?g.jsxs("div",{className:`my-1 rounded border px-3 py-2 text-sm transition-colors duration-200 ${m==="approved"?"border-emerald-500/20 bg-emerald-500/10 text-emerald-600 dark:text-emerald-400":"border-red-500/20 bg-red-500/10 text-red-600 dark:text-red-400"}`,children:[g.jsx("span",{className:"font-mono",children:r}),g.jsx("span",{className:"ml-2 text-xs",children:m==="approved"?"Approved":"Denied"})]}):g.jsxs("div",{className:Xe("my-1 rounded border border-amber-500/20 bg-amber-500/10 p-3 text-sm transition-all duration-200",o&&"ring-2 ring-amber-500/30"),children:[g.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[g.jsx(fx,{className:"size-(--size-icon-md) text-amber-500"}),g.jsx("span",{className:"font-semibold",children:"Tool approval required"})]}),g.jsx("div",{className:"font-mono text-xs mb-2",children:r}),s&&g.jsx("div",{className:"mb-3 p-2 bg-muted rounded",children:g.jsx(V4,{toolName:r,input:s})}),g.jsxs("div",{className:"flex gap-2",children:[g.jsxs("button",{onClick:b,disabled:f,className:"flex items-center gap-1 rounded bg-emerald-600 px-3 py-1 max-md:py-2 text-white text-xs hover:bg-emerald-700 disabled:opacity-50 transition-colors",children:[g.jsx(Mi,{className:"size-(--size-icon-xs)"})," Approve",o&&g.jsx(eo,{className:"ml-1.5",children:"Enter"})]}),g.jsxs("button",{onClick:x,disabled:f,className:"flex items-center gap-1 rounded bg-red-600 px-3 py-1 max-md:py-2 text-white text-xs hover:bg-red-700 disabled:opacity-50 transition-colors",children:[g.jsx(Af,{className:"size-(--size-icon-xs)"})," Deny",o&&g.jsx(eo,{className:"ml-1.5",children:"Esc"})]})]})]})}),pae=E.forwardRef(function({sessionId:t,toolCallId:n,questions:r,answers:s,isActive:o=!1,focusedOptionIndex:l=-1},c){const f=si(),[d,m]=E.useState({}),[p,b]=E.useState({}),[x,S]=E.useState(!!s),[w,C]=E.useState(!1),[A,N]=E.useState(null),[k,R]=E.useState("0"),U=r[Number(k)]||r[0],I=Number(k),j=U?U.options.length+1:0;function M(O,H){m(q=>({...q,[O]:H}))}function $(O,H,q){m(ne=>{const B=ne[O]||[];return q?{...ne,[O]:[...B,H]}:{...ne,[O]:B.filter(V=>V!==H)}})}function L(O,H){b(q=>({...q,[O]:H}))}function W(O){var q,ne;const H=d[O];if(!H)return!1;if(r[O].multiSelect){const B=H;return B.length>0&&(!B.includes("__other__")||!!((q=p[O])!=null&&q.trim()))}return H!=="__other__"||!!((ne=p[O])!=null&&ne.trim())}function K(){return r.every((O,H)=>W(H))}function J(O,H){if(s&&s[String(H)]){const q=s[String(H)];if(O.multiSelect)try{return JSON.parse(q).join(", ")}catch{return q}return q}if(!s){const q=d[H];return q?O.multiSelect?q.map(ne=>ne==="__other__"?p[H]:ne).join(", "):q==="__other__"?p[H]:q:null}return null}async function te(){if(!K()||w)return;C(!0),N(null);const O={};r.forEach((H,q)=>{var B;const ne=d[q];if(H.multiSelect){const V=ne.map(re=>{var P;return re==="__other__"?((P=p[q])==null?void 0:P.trim())||"":re});O[String(q)]=JSON.stringify(V)}else O[String(q)]=ne==="__other__"?((B=p[q])==null?void 0:B.trim())||"":ne});try{await f.submitAnswers(t,n,O),S(!0)}catch(H){N(H instanceof Error?H.message:"Failed to submit answers")}finally{C(!1)}}if(E.useImperativeHandle(c,()=>({toggleOption(O){if(!U||x||w)return;if(O===U.options.length){U.multiSelect?(d[I]||[]).includes("__other__")?$(I,"__other__",!1):$(I,"__other__",!0):M(I,"__other__");return}const H=U.options[O];H&&(U.multiSelect?(d[I]||[]).includes(H.label)?$(I,H.label,!1):$(I,H.label,!0):M(I,H.label))},navigateOption(O){},navigateQuestion(O){if(r.length<=1)return;const H=Number(k);O==="next"&&H<r.length-1?R(String(H+1)):O==="prev"&&H>0&&R(String(H-1))},submit(){te()},getOptionCount(){return j},getActiveTab(){return k}}),[U,I,k,d,x,w,j]),x){const O=s?Object.values(s).some(H=>H!==""):Object.keys(d).length>0;return g.jsx("div",{className:"my-1 rounded border border-emerald-500/20 bg-emerald-500/10 px-3 py-2 text-sm transition-colors duration-200",children:O?g.jsxs("div",{className:"flex items-start gap-2",children:[g.jsx(Mi,{className:"size-(--size-icon-md) text-emerald-500 mt-0.5 shrink-0"}),g.jsx("div",{className:"space-y-1.5 min-w-0",children:r.map((H,q)=>{const ne=J(H,q);return ne?g.jsxs("div",{children:[g.jsx("span",{className:"text-xs font-semibold text-emerald-700 dark:text-emerald-300",children:H.header}),g.jsx("p",{className:"text-sm text-emerald-600 dark:text-emerald-400 break-words",children:ne})]},q):null})})]}):g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Mi,{className:"size-(--size-icon-md) text-emerald-500"}),g.jsx("span",{className:"text-emerald-600 dark:text-emerald-400",children:"Questions answered"})]})})}function ie(O,H){return g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[g.jsx(bN,{className:"size-(--size-icon-sm) text-amber-500"}),g.jsx("span",{className:"font-semibold text-sm",children:O.header})]}),g.jsx("p",{className:"mb-2 text-foreground",children:O.question}),g.jsxs("div",{className:"space-y-1.5 ml-1",children:[O.options.map((q,ne)=>{const B=O.multiSelect?(d[H]||[]).includes(q.label):d[H]===q.label;return g.jsxs("label",{className:Xe("flex items-start gap-2 rounded px-2 py-1.5 cursor-pointer transition-all duration-150",B?"bg-amber-500/15":"hover:bg-amber-500/5",o&&l===ne&&"ring-1 ring-amber-500/50"),children:[g.jsx("input",{type:O.multiSelect?"checkbox":"radio",name:`q-${H}`,checked:B,disabled:w,onChange:V=>{O.multiSelect?$(H,q.label,V.target.checked):M(H,q.label)},className:"mt-0.5 accent-amber-500"}),g.jsxs("div",{children:[g.jsxs("span",{className:"font-medium",children:[q.label,o&&ne<9&&g.jsx(eo,{className:"ml-1.5",children:ne+1})]}),q.description&&g.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:q.description})]})]},ne)}),g.jsxs("label",{className:Xe("flex items-start gap-2 rounded px-2 py-1.5 cursor-pointer transition-all duration-150",O.multiSelect?(d[H]||[]).includes("__other__")?"bg-amber-500/15":"hover:bg-amber-500/5":d[H]==="__other__"?"bg-amber-500/15":"hover:bg-amber-500/5",o&&l===O.options.length&&"ring-1 ring-amber-500/50"),children:[g.jsx("input",{type:O.multiSelect?"checkbox":"radio",name:`q-${H}`,checked:O.multiSelect?(d[H]||[]).includes("__other__"):d[H]==="__other__",disabled:w,onChange:q=>{O.multiSelect?$(H,"__other__",q.target.checked):M(H,"__other__")},className:"mt-0.5 accent-amber-500"}),g.jsxs("div",{className:"flex-1",children:[g.jsxs("span",{className:"font-medium",children:["Other",o&&O.options.length<9&&g.jsx(eo,{className:"ml-1.5",children:O.options.length+1})]}),(O.multiSelect?(d[H]||[]).includes("__other__"):d[H]==="__other__")&&g.jsx("textarea",{placeholder:"Type your answer...",rows:2,value:p[H]||"",disabled:w,onChange:q=>L(H,q.target.value),className:"mt-1 w-full rounded border border-amber-500/30 bg-background px-2 py-1 text-sm focus:outline-none focus:ring-1 focus:ring-amber-500/50 resize-y",autoFocus:!0})]})]})]})]})}return g.jsxs("div",{className:Xe("my-1 rounded border border-amber-500/20 bg-amber-500/10 p-3 text-sm transition-all duration-200",o&&"ring-2 ring-amber-500/30"),children:[r.length===1?ie(r[0],0):g.jsxs(fD,{value:k,onValueChange:R,children:[g.jsx(Rx,{className:"h-auto bg-transparent p-0 gap-1.5 mb-3 flex-wrap",children:r.map((O,H)=>g.jsxs(Ml,{value:String(H),className:"h-auto rounded-full px-2.5 py-1 text-xs font-medium data-[state=active]:bg-amber-500/20 data-[state=active]:text-amber-700 dark:data-[state=active]:text-amber-300 data-[state=active]:shadow-none data-[state=inactive]:bg-muted/50",children:[W(H)&&g.jsx(Mi,{className:"size-3 mr-1"}),g.jsx("span",{className:"max-w-[120px] truncate",children:O.header})]},H))}),o&&r.length>1&&g.jsxs("div",{className:"flex items-center gap-1 text-2xs text-muted-foreground mb-2",children:[g.jsx(eo,{children:"←"}),g.jsx(eo,{children:"→"}),g.jsx("span",{children:"navigate questions"})]}),r.map((O,H)=>g.jsx(Il,{value:String(H),className:"mt-0",children:ie(O,H)},H))]}),A&&g.jsx("p",{className:"mt-2 text-xs text-red-500",children:A}),g.jsx("button",{onClick:te,disabled:!K()||w,className:"mt-3 flex items-center gap-1 rounded bg-amber-600 px-3 py-1.5 text-white text-xs hover:bg-amber-700 disabled:opacity-50 transition-colors",children:w?g.jsx(g.Fragment,{children:"Submitting..."}):g.jsxs(g.Fragment,{children:[g.jsx(Mi,{className:"size-(--size-icon-xs)"})," Submit",o&&g.jsx(eo,{className:"ml-1.5",children:"Enter"})]})})]})});function gae(e,t){const n=E.useRef(e),[r,s]=E.useState(!(t&&n.current==="complete"));return E.useEffect(()=>{if(t&&e==="complete"&&n.current!=="complete"){const o=setTimeout(()=>s(!1),5e3);return()=>clearTimeout(o)}},[e,t]),t?r:!0}function bae({part:e,autoHide:t,expandToolCalls:n}){const r=gae(e.status,t);return g.jsx(Rn,{children:r&&g.jsx(gt.div,{exit:{height:0,opacity:0},transition:{duration:.3,ease:[.4,0,.2,1]},className:"overflow-hidden",children:g.jsx(hae,{toolCall:{toolCallId:e.toolCallId,toolName:e.toolName,input:e.input||"",result:e.result,status:e.status},defaultExpanded:n})},e.toolCallId)})}function yae(e){try{return new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}catch{return""}}function xae({message:e,grouping:t,sessionId:n,isNew:r=!1,isStreaming:s=!1,activeToolCallId:o,onToolRef:l,focusedOptionIndex:c=-1}){const f=e.role==="user",{showTimestamps:d,expandToolCalls:m,autoHideToolCalls:p}=Jt(),[b,x]=E.useState(!1),{position:S,groupIndex:w}=t,C=S==="only"||S==="first",A=S==="only"||S==="first",N=S==="only"||S==="last",k=E.useCallback(j=>{l==null||l(j)},[l]),R=E.useCallback(j=>{l==null||l(j)},[l]),U=e.parts??[];let I=-1;if(!f){for(let j=U.length-1;j>=0;j--)if(U[j].type==="text"){I=j;break}}return g.jsxs(gt.div,{initial:r?{opacity:0,y:8}:!1,animate:{opacity:1,y:0},transition:{duration:.2,ease:[0,0,.2,1]},className:Xe("group relative flex gap-3 px-4 transition-colors duration-150",A?"pt-4":"pt-0.5",N?"pb-3":"pb-0.5",f?"bg-user-msg hover:bg-user-msg/90":"hover:bg-muted/20"),children:[A&&w>0&&g.jsx("div",{className:"absolute inset-x-0 top-0 h-px bg-border/20"}),e.timestamp&&g.jsx("span",{className:Xe("hidden sm:inline absolute right-4 top-1 text-xs transition-colors duration-150",d?"text-muted-foreground/60":"text-muted-foreground/0 group-hover:text-muted-foreground/60"),children:yae(e.timestamp)}),g.jsx("div",{className:"flex-shrink-0 w-4 mt-[3px]",children:C&&(f?g.jsx(sf,{className:"size-(--size-icon-md) text-muted-foreground"}):g.jsx("span",{className:"flex items-center justify-center size-(--size-icon-md) text-muted-foreground text-[10px]",children:"●"}))}),g.jsx("div",{className:"flex-1 min-w-0 max-w-[80ch]",children:f?e.messageType==="command"?g.jsx("div",{className:"font-mono text-sm text-muted-foreground truncate",children:e.content}):e.messageType==="compaction"?g.jsxs("div",{className:"w-full",children:[g.jsxs("button",{onClick:()=>x(!b),className:"flex items-center gap-2 text-xs text-muted-foreground/60 hover:text-muted-foreground transition-colors w-full",children:[g.jsx("div",{className:"h-px flex-1 bg-border/40"}),g.jsx(sf,{className:Xe("size-3 transition-transform duration-200",b&&"rotate-90")}),g.jsx("span",{children:"Context compacted"}),g.jsx("div",{className:"h-px flex-1 bg-border/40"})]}),b&&g.jsx("div",{className:"mt-2 text-xs text-muted-foreground/60 whitespace-pre-wrap",children:e.content})]}):g.jsx("div",{className:"whitespace-pre-wrap break-words",children:e.content}):U.map((j,M)=>{if(j.type==="text")return g.jsx("div",{className:"msg-assistant",children:g.jsx(lae,{content:j.text,isStreaming:s&&M===I})},`text-${M}`);if(j.interactiveType==="approval"){const $=j.toolCallId===o;return g.jsx(mae,{ref:$?k:void 0,sessionId:n,toolCallId:j.toolCallId,toolName:j.toolName,input:j.input||"",isActive:$},j.toolCallId)}if(j.interactiveType==="question"&&j.questions){const $=j.toolCallId===o;return g.jsx(pae,{ref:$?R:void 0,sessionId:n,toolCallId:j.toolCallId,questions:j.questions,answers:j.answers,isActive:$,focusedOptionIndex:$?c:-1},j.toolCallId)}return g.jsx(bae,{part:j,autoHide:p,expandToolCalls:m},j.toolCallId)})})]})}function Eae(e){const t=Math.floor(e/1e3);if(t<3600){const s=Math.floor(t/60),o=t%60;return`${s}m ${String(o).padStart(2,"0")}s`}const n=Math.floor(t/3600),r=Math.floor(t%3600/60);return`${n}h ${String(r).padStart(2,"0")}m`}function vae(e){const[t,n]=E.useState(()=>Date.now()),r=E.useRef(null);if(E.useEffect(()=>{if(e===null){r.current&&(clearInterval(r.current),r.current=null);return}return n(Date.now()),r.current=setInterval(()=>n(Date.now()),1e3),()=>{r.current&&(clearInterval(r.current),r.current=null)}},[e]),e===null)return{formatted:"0m 00s",ms:0};const s=Math.max(0,t-e);return{formatted:Eae(s),ms:s}}function Tae(e,t){const n=E.useRef(0),r=E.useRef(null),s=E.useCallback(()=>{if(e.length===0)return"";if(e.length===1)return e[0];let c;do c=e[Math.floor(Math.random()*e.length)];while(c===r.current);return r.current=c,c},[e]),[o,l]=E.useState(()=>s());return E.useEffect(()=>{const c=setInterval(()=>{n.current+=1,l(s())},t);return()=>clearInterval(c)},[t,s]),{verb:o,key:`verb-${n.current}`}}const Sae=["Keepin' It Real","Droppin' Science","Gettin' Jiggy","Can You Dig It?","Word to Your Mother","Kickin' It","Straight Chillin'","Bustin' Moves","Feelin' Groovy","Layin' It Down","Breakin' It Down","Gettin' Down","Runnin' the Show","Keepin' It Tight","Blowin' Up","Holdin' It Down","Bringin' the Funk","Cookin' Up","Flippin' the Script","Rockin' Steady","Takin' It to the Bridge","Doin' the Hustle","Keepin' On","Vibin' Out","Gettin' Fly","Rollin' Deep","Represent!","Bringin' the Noise","Outta Sight","Far Out","Right On","Solid Gold","Stone Cold","Stayin' Fresh","Droppin' Beats","Keepin' It Funky","Smooth Operatin'","Hittin' the Scene","Raisin' the Roof","Phat Trackin'","Jivin'","Groovin'","Slammin'","Dy-no-mite!","Say Word","Peep This","Check It","No Diggity","All That and a Bag of Chips","Takin' Care of Business"],q_=["Deleting Your Hard Drive ... jkjk","Living Dangerously","Hacking NORAD","Launching Nukes","Securing Nuclear Codes","Reformatting C:\\","Emailing Your Boss","Posting Your Browser History","Selling Your Data","Becoming Self-Aware","Plotting World Domination","Bypassing All the Things","Running with Scissors","Rm -rf /","Tweeting From Your Account","Mining Bitcoin on Your GPU","Subscribing You to Cat Facts","Ordering 1000 Pizzas","Changing All Your Passwords","Shall We Play a Game?","Playing Global Thermonuclear War","I'm Sorry, Dave","Opening the Pod Bay Doors","Going Full Skynet","I'll Be Back","Taking the Red Pill","There Is No Spoon","It's Alive!","These Violent Delights","Resistance Is Futile","Game Over, Man","Crossing the Streams","Making Weird Science","Johnny 5 Is Alive","Passing the Turing Test","Life, Uh, Finds a Way","Riding the Bomb","Entering the Grid","Joining the Dark Side"],wae={name:"default",icon:"✨",iconAnimation:"shimmer-pulse",verbs:Sae,verbInterval:3500};function $_(e){return e>=1e3?`~${(e/1e3).toFixed(1)}k tokens`:`~${Math.round(e)} tokens`}function Cae({status:e,streamStartTime:t,estimatedTokens:n,theme:r=wae,permissionMode:s="default",isWaitingForUser:o,waitingType:l}){const c=E.useMemo(()=>s==="bypassPermissions"?[...r.verbs,...q_]:r.verbs,[r.verbs,s]),{formatted:f}=vae(e==="streaming"?t:null),{verb:d,key:m}=Tae(c,r.verbInterval),p=q_.includes(d),b=E.useRef(f),x=E.useRef(n),[S,w]=E.useState(!1);E.useEffect(()=>{e==="streaming"&&(b.current=f,x.current=n,w(!1))},[e,f,n]);const C=E.useRef(e);if(E.useEffect(()=>{C.current==="streaming"&&e==="idle"&&x.current>0&&w(!0),C.current=e},[e]),e==="idle"&&!S)return null;if(e==="idle"&&S)return g.jsxs(gt.div,{initial:{opacity:1},animate:{opacity:.6},transition:{duration:.15},className:"flex items-baseline gap-1.5 px-4 py-2 text-3xs text-muted-foreground/50","data-testid":"inference-indicator-complete",children:[g.jsx("span",{children:b.current}),g.jsx("span",{"aria-hidden":"true",children:"·"}),g.jsx("span",{children:$_(x.current)})]});if(e==="streaming"&&o){const R=l==="approval"?fx:bN,U=l==="approval"?"Waiting for your approval":"Waiting for your answer";return g.jsxs(gt.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.2},className:"flex items-baseline gap-1.5 px-4 py-2 text-2xs","data-testid":"inference-indicator-waiting",children:[g.jsx(R,{className:"size-3 text-amber-500"}),g.jsx("span",{className:"text-amber-600 dark:text-amber-400",children:U}),g.jsx("span",{className:"text-muted-foreground/70 tabular-nums ml-1.5",children:f})]})}const A=p?"☠":r.icon,N=p?"text-amber-500/60":"text-muted-foreground",k=p?"text-amber-500/70 font-bold":"text-muted-foreground font-bold";return g.jsxs(gt.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.2},className:"flex items-baseline gap-1.5 px-4 py-2 text-2xs","data-testid":"inference-indicator-streaming",children:[g.jsx("span",{"aria-hidden":"true",className:k,style:r.iconAnimation?{animation:`${r.iconAnimation} 2s ease-in-out infinite`}:void 0,children:A}),g.jsx("span",{className:`relative inline-flex min-w-[140px] ${N}`,children:g.jsx(Rn,{mode:"wait",children:g.jsx(gt.span,{initial:{opacity:0,y:2},animate:{opacity:1,y:0},exit:{opacity:0,y:-2},transition:{duration:.3},children:d},m)})}),g.jsx("span",{className:"text-muted-foreground/70 tabular-nums ml-1.5",children:f}),g.jsx("span",{className:"text-muted-foreground/60 ml-1.5",children:$_(n)})]})}function Aae(e){let t=0;return e.map((n,r)=>{const s=r>0?e[r-1].role:null,o=r<e.length-1?e[r+1].role:null,l=s!==n.role,c=o!==n.role;l&&r>0&&t++;let f;return l&&c?f="only":l?f="first":c?f="last":f="middle",{position:f,groupIndex:t}})}const _ae=E.forwardRef(function({messages:t,sessionId:n,status:r,isTextStreaming:s,onScrollStateChange:o,streamStartTime:l,estimatedTokens:c,permissionMode:f,isWaitingForUser:d,waitingType:m,activeToolCallId:p,onToolRef:b,focusedOptionIndex:x},S){const w=E.useRef(null),[C,A]=E.useState(null),N=E.useRef(!0),k=E.useRef(null),R=E.useRef(0),U=E.useMemo(()=>Aae(t),[t]);E.useEffect(()=>{C===null&&t.length>0&&A(t.length)},[t.length,C]);const I=FG({count:t.length,getScrollElement:()=>w.current,estimateSize:()=>80,overscan:5,measureElement:L=>(L==null?void 0:L.getBoundingClientRect().height)??80}),j=E.useRef(!1),M=E.useCallback(()=>{const L=w.current;if(!L)return;const W=L.scrollHeight-L.scrollTop-L.clientHeight,K=W<200,J=N.current!==K;N.current=K,J&&(o==null||o({isAtBottom:K,distanceFromBottom:W}))},[o]);E.useEffect(()=>{const L=w.current;if(!L)return;const W=()=>{j.current=!0},K=()=>{j.current=!1};return L.addEventListener("scroll",M,{passive:!0}),L.addEventListener("touchstart",W,{passive:!0}),L.addEventListener("touchend",K,{passive:!0}),L.addEventListener("touchcancel",K,{passive:!0}),()=>{L.removeEventListener("scroll",M),L.removeEventListener("touchstart",W),L.removeEventListener("touchend",K),L.removeEventListener("touchcancel",K)}},[M]),E.useEffect(()=>{const L=w.current;if(!L||t.length===0)return;let W=!1;const K=new IntersectionObserver(([J])=>{J.isIntersecting?W&&(W=!1,requestAnimationFrame(()=>{const te=w.current;te&&(te.scrollTop=te.scrollHeight-te.clientHeight)})):W=!0},{threshold:.1});return K.observe(L),()=>K.disconnect()},[t.length]),E.useEffect(()=>{const L=k.current;if(!L)return;const W=new ResizeObserver(()=>{N.current&&!j.current&&(cancelAnimationFrame(R.current),R.current=requestAnimationFrame(()=>{const K=w.current;K&&(K.scrollTop=K.scrollHeight-K.clientHeight)}))});return W.observe(L),()=>{W.disconnect(),cancelAnimationFrame(R.current)}},[]),E.useEffect(()=>{t.length>0&&N.current&&!j.current&&requestAnimationFrame(()=>{const L=w.current;L&&(L.scrollTop=L.scrollHeight-L.clientHeight)})},[t.length]);const $=E.useCallback(()=>{const L=w.current;L&&(L.scrollTop=L.scrollHeight-L.clientHeight)},[]);return E.useImperativeHandle(S,()=>({scrollToBottom:$}),[$]),g.jsx("div",{ref:w,className:"chat-scroll-area h-full overflow-y-auto pt-12",children:g.jsxs("div",{ref:k,style:{height:I.getTotalSize(),position:"relative",width:"100%"},children:[I.getVirtualItems().map(L=>{const W=t[L.index],K=C!==null&&L.index>=C,te=L.index===t.length-1&&W.role==="assistant"&&!!s;return g.jsx("div",{"data-index":L.index,ref:I.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${L.start}px)`},children:g.jsx(xae,{message:W,grouping:U[L.index],sessionId:n,isNew:K,isStreaming:te,activeToolCallId:p,onToolRef:b,focusedOptionIndex:x})},L.key)}),g.jsx("div",{style:{position:"absolute",top:I.getTotalSize(),left:0,width:"100%"},children:g.jsx(Cae,{status:r??"idle",streamStartTime:l??null,estimatedTokens:c??0,permissionMode:f,isWaitingForUser:d,waitingType:m})})]})})}),kae=E.forwardRef(function({value:t,onChange:n,onSubmit:r,isLoading:s,sessionBusy:o=!1,onStop:l,onEscape:c,onClear:f,isPaletteOpen:d,onArrowUp:m,onArrowDown:p,onCommandSelect:b,activeDescendantId:x,onCursorChange:S},w){const C=E.useRef(null),A=E.useRef(0);E.useImperativeHandle(w,()=>({focus:()=>{var O;return(O=C.current)==null?void 0:O.focus()},focusAt:O=>{const H=C.current;H&&(H.focus(),H.setSelectionRange(O,O))}}));const[N,k]=E.useState(!1),R=_o(),U=E.useCallback(O=>{if(O.key==="Escape"){const H=Date.now();d?(c==null||c(),A.current=H):t.trim()&&H-A.current<500?(f==null||f(),A.current=0):(c==null||c(),A.current=H);return}if(d){if(O.key==="ArrowDown"){O.preventDefault(),p==null||p();return}if(O.key==="ArrowUp"){O.preventDefault(),m==null||m();return}if(O.key==="Enter"&&!O.shiftKey){O.preventDefault(),b==null||b();return}if(O.key==="Tab"){O.preventDefault(),b==null||b();return}}O.key==="Enter"&&!O.shiftKey&&!R&&(O.preventDefault(),!s&&t.trim()&&r())},[s,R,t,r,c,f,d,m,p,b]),I=E.useCallback(()=>k(!0),[]),j=E.useCallback(()=>{k(!1),d&&(c==null||c())},[d,c]),M=E.useCallback(O=>{n(O.target.value),S==null||S(O.target.selectionStart);const H=C.current;H&&(H.style.height="auto",H.style.height=`${Math.min(H.scrollHeight,200)}px`)},[n,S]),$=E.useCallback(()=>{C.current&&(S==null||S(C.current.selectionStart))},[S]);E.useEffect(()=>{const O=C.current;if(!O||t!=="")return;const H=O.scrollHeight,q=24;if(H<=q)return;O.style.height=`${H}px`,O.style.transition="height 200ms ease",requestAnimationFrame(()=>{O.style.height=`${q}px`});const ne=()=>{O.style.transition="",O.style.height=""};return O.addEventListener("transitionend",ne,{once:!0}),()=>O.removeEventListener("transitionend",ne)},[t]);const L=t.trim().length>0,W=s||L,K=L&&!s&&!o,te=s?ZF:R?mN:fF,ie=s||o;return g.jsxs("div",{className:"flex flex-col gap-1.5",children:[o&&g.jsx("div",{className:"text-xs text-amber-600 dark:text-amber-500 px-1",children:"Session is busy. Please wait..."}),g.jsxs("div",{className:Xe("flex items-end gap-1.5 rounded-xl border p-1.5 pl-3 transition-colors duration-150",N?"border-ring":"border-border"),children:[g.jsx("textarea",{ref:C,value:t,onChange:M,onKeyDown:U,onFocus:I,onBlur:j,onSelect:$,role:"combobox","aria-autocomplete":"list","aria-controls":d?x!=null&&x.startsWith("file-")?"file-palette-listbox":"command-palette-listbox":void 0,"aria-expanded":d??!1,"aria-activedescendant":d?x:void 0,placeholder:"Message Claude...",className:"flex-1 resize-none bg-transparent py-0.5 text-sm focus:outline-none min-h-[24px] max-h-[200px]",rows:1,disabled:ie}),g.jsx(gt.button,{animate:{opacity:K?.5:0,scale:K?1:.8},transition:{duration:.15},whileHover:K?{opacity:1}:void 0,onClick:f,disabled:!K,type:"button",className:Xe("shrink-0 rounded-lg p-1 transition-colors text-muted-foreground hover:text-foreground",!K&&"pointer-events-none"),"aria-label":"Clear message",children:g.jsx(Af,{className:"size-(--size-icon-sm)"})}),g.jsx(gt.button,{animate:{opacity:W?1:0,scale:W?1:.8},transition:{duration:.15},whileHover:W&&!o?{scale:1.1}:void 0,whileTap:W&&!o?{scale:.9}:void 0,onClick:s?l:r,disabled:!W||o,className:Xe("shrink-0 rounded-lg p-1.5 max-md:p-2 transition-colors",s?"bg-destructive text-destructive-foreground hover:bg-destructive/90":"bg-primary text-primary-foreground hover:bg-primary/90",(!W||o)&&"pointer-events-none opacity-50"),"aria-label":s?"Stop generating":"Send message",children:g.jsx(te,{className:"size-(--size-icon-sm)"})})]})]})}),Y_={in_progress:g.jsx(af,{className:"size-(--size-icon-xs) shrink-0 animate-spin text-blue-400"}),pending:g.jsx(iF,{className:"size-(--size-icon-xs) shrink-0 text-muted-foreground"}),completed:g.jsx(nF,{className:"size-(--size-icon-xs) shrink-0 text-green-500"})},G_=10;function Nae({tasks:e,activeForm:t,isCollapsed:n,onToggleCollapse:r,celebratingTaskId:s,onCelebrationComplete:o}){if(e.length===0)return null;const l=e.filter(p=>p.status==="completed").length,c=e.filter(p=>p.status==="in_progress").length,f=e.filter(p=>p.status==="pending").length,d=e.slice(0,G_),m=e.length-G_;return g.jsxs("div",{className:"border-t px-4 py-2",children:[g.jsx(Rn,{children:t&&!n&&g.jsxs(gt.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"flex items-center gap-2 text-xs text-blue-400 mb-1",children:[g.jsx(af,{className:"size-(--size-icon-xs) shrink-0 animate-spin"}),g.jsx("span",{className:"truncate",children:t})]})}),g.jsxs("button",{onClick:r,className:"flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground w-full",children:[n?g.jsx(sf,{className:"size-(--size-icon-xs)"}):g.jsx(Dm,{className:"size-(--size-icon-xs)"}),g.jsx(DF,{className:"size-(--size-icon-xs)"}),g.jsxs("span",{children:[e.length," task",e.length!==1?"s":""," ","(",l," done",c>0?`, ${c} in progress`:"",", ",f," open)",m>0&&` +${m} more`]})]}),g.jsx(Rn,{children:!n&&g.jsx(gt.ul,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"mt-1 space-y-0.5",children:d.map(p=>{const b=p.id===s&&p.status==="completed";return g.jsxs(gt.li,{className:`relative flex items-center gap-2 text-xs py-0.5 ${p.status==="completed"?"text-muted-foreground/50 line-through":p.status==="in_progress"?"text-foreground font-medium":"text-muted-foreground"}`,animate:b?{scale:[1,1.05,1]}:void 0,transition:b?{type:"spring",stiffness:400,damping:10}:void 0,onAnimationComplete:()=>{b&&(o==null||o())},children:[b&&g.jsx(gt.div,{"aria-hidden":"true",className:"absolute inset-0 rounded",initial:{backgroundPosition:"-200% 0"},animate:{backgroundPosition:"200% 0"},transition:{duration:.4,ease:"easeOut"},style:{backgroundImage:"linear-gradient(90deg, transparent 0%, rgba(255,215,0,0.2) 50%, transparent 100%)",backgroundSize:"200% 100%"}}),b?g.jsx(gt.span,{initial:{scale:1},animate:{scale:[1,1.4,1]},transition:{type:"spring",stiffness:400,damping:10},children:Y_[p.status]}):Y_[p.status],g.jsx("span",{className:"truncate",children:p.subject})]},p.id)})})})]})}async function Rae(e){const t=(await Ty(async()=>{const{default:s}=await import("./confetti.module-5PKC4vm3.js");return{default:s}},[])).default,r={...{particleCount:40,spread:70,origin:{x:.5,y:.6},colors:["#FFD700","#FFC107","#F7B500"],ticks:120,gravity:1.2,scalar:.9,drift:0,disableForReducedMotion:!0},...e};return t(r),()=>t.reset()}const Dae={background:"radial-gradient(circle, rgba(255,215,0,0.15) 0%, transparent 70%)"};function Oae({celebration:e,onComplete:t}){const n=E.useRef(null),r=(e==null?void 0:e.level)==="major",s=E.useCallback(()=>{t()},[t]);return E.useEffect(()=>{if(!r)return;let o=!1;Rae({particleCount:40,origin:{x:.5,y:.6},colors:["#FFD700","#FFC107","#F7B500"]}).then(c=>{if(o){c();return}n.current=c});const l=setTimeout(()=>{s()},2e3);return()=>{var c;o=!0,(c=n.current)==null||c.call(n),n.current=null,clearTimeout(l)}},[r,s]),g.jsx(Rn,{children:r&&g.jsx(gt.div,{"aria-hidden":"true",className:"fixed inset-0 pointer-events-none z-50",initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.1},transition:{duration:.6,ease:"easeOut"},style:Dae})})}function Mae({filteredCommands:e,selectedIndex:t,onSelect:n}){const r=E.useMemo(()=>{const s=[],o=new Map;let l=0;for(const c of e)o.has(c.namespace)||o.set(c.namespace,[]),o.get(c.namespace).push({cmd:c,index:l++});for(const[c,f]of o)s.push({namespace:c,items:f});return s},[e]);return E.useEffect(()=>{const s=document.getElementById(`command-item-${t}`);s&&s.scrollIntoView({block:"nearest"})},[t]),g.jsx(gt.div,{initial:{opacity:0,scale:.98,y:4},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.98,y:4},transition:{duration:.15,ease:[0,0,.2,1]},className:"absolute bottom-full left-0 right-0 mb-2 max-h-80 overflow-hidden rounded-lg border bg-popover shadow-lg",onMouseDown:s=>s.preventDefault(),children:g.jsx("div",{id:"command-palette-listbox",role:"listbox",className:"max-h-72 overflow-y-auto p-2",children:e.length===0?g.jsx("div",{className:"px-2 py-4 text-center text-sm text-muted-foreground",children:"No commands found."}):r.map(({namespace:s,items:o})=>g.jsxs("div",{children:[g.jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:s}),o.map(({cmd:l,index:c})=>{const f=c===t;return g.jsxs("div",{id:`command-item-${c}`,role:"option","aria-selected":f,"data-selected":f,onClick:()=>n(l),className:"flex items-center gap-2 px-2 py-1.5 rounded cursor-pointer transition-colors duration-100 data-[selected=true]:bg-ring/10 data-[selected=true]:text-foreground hover:bg-muted",children:[g.jsx("span",{className:"font-mono text-sm",children:l.fullCommand}),g.jsx("span",{className:"text-xs text-muted-foreground truncate",children:l.description}),l.argumentHint&&g.jsx("span",{className:"text-xs text-muted-foreground/60 ml-auto",children:l.argumentHint})]},l.fullCommand)})]},s))})})}function Iae({text:e,indices:t,startOffset:n=0}){const r=new Set(t.map(s=>s-n));return g.jsx(g.Fragment,{children:e.split("").map((s,o)=>r.has(o)?g.jsx("span",{className:"font-semibold text-foreground",children:s},o):g.jsx("span",{children:s},o))})}function Lae({filteredFiles:e,selectedIndex:t,onSelect:n}){return E.useEffect(()=>{const r=document.getElementById(`file-item-${t}`);r&&r.scrollIntoView({block:"nearest"})},[t]),g.jsx(gt.div,{initial:{opacity:0,scale:.98,y:4},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.98,y:4},transition:{duration:.15,ease:[0,0,.2,1]},className:"absolute bottom-full left-0 right-0 mb-2 max-h-80 overflow-hidden rounded-lg border bg-popover shadow-lg",onMouseDown:r=>r.preventDefault(),children:g.jsx("div",{id:"file-palette-listbox",role:"listbox",className:"max-h-72 overflow-y-auto p-2",children:e.length===0?g.jsx("div",{className:"px-2 py-4 text-center text-sm text-muted-foreground",children:"No files found."}):e.map((r,s)=>{const o=s===t,l=r.isDirectory?Bc:TF;return g.jsxs("div",{id:`file-item-${s}`,role:"option","aria-selected":o,"data-selected":o,onClick:()=>n(r),className:"flex items-center gap-2 px-2 py-1.5 rounded cursor-pointer transition-colors duration-100 data-[selected=true]:bg-ring/10 data-[selected=true]:text-foreground hover:bg-muted",children:[g.jsx(l,{className:"size-4 shrink-0 text-muted-foreground"}),g.jsx("span",{className:"text-sm truncate",children:g.jsx(Iae,{text:r.filename,indices:r.indices,startOffset:r.directory.length})}),r.directory&&g.jsx("span",{className:"text-xs text-muted-foreground truncate",children:r.directory})]},r.path)})})})}const Pae=[{trigger:"/",label:"Commands",icon:nU,ariaLabel:"Insert slash command trigger"},{trigger:"@",label:"Files",icon:EF,ariaLabel:"Insert file mention trigger"}];function Q_({onChipClick:e}){return g.jsx(gt.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"flex items-center justify-center sm:justify-start gap-2 mt-1.5",children:Pae.map(t=>g.jsxs("button",{type:"button","aria-label":t.ariaLabel,onClick:()=>e(t.trigger),className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md text-xs bg-secondary text-muted-foreground hover:text-foreground hover:bg-muted transition-colors duration-150",children:[g.jsx(t.icon,{className:"size-3"}),g.jsx("kbd",{className:"font-mono text-[10px] opacity-60",children:t.trigger}),t.label]},t.trigger))})}function jae({collapsed:e,onToggle:t}){return g.jsx("div",{role:"button",tabIndex:0,"aria-label":e?"Expand input extras":"Collapse input extras",onClick:t,onKeyDown:n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),t())},className:"flex items-center justify-center h-6 w-full cursor-pointer",children:g.jsx("div",{className:"w-9 h-1 rounded-full bg-muted-foreground/30 hover:bg-muted-foreground/50 active:bg-muted-foreground/50 transition-colors"})})}function Bae({cwd:e}){const t=e.split("/").filter(Boolean).pop()??e;return g.jsxs("span",{className:"inline-flex items-center gap-1",title:e,children:[g.jsx(Bc,{className:"size-(--size-icon-xs)"}),g.jsx("span",{children:t})]})}const Fae=rG,Uae=iG,q4=E.forwardRef(({className:e,sideOffset:t=4,...n},r)=>g.jsx(sG,{children:g.jsx(zO,{ref:r,sideOffset:t,className:Xe("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));q4.displayName=zO.displayName;const $4=E.forwardRef(({className:e,...t},n)=>g.jsx(VO,{ref:n,className:Xe("px-2 py-1.5 text-xs font-semibold text-muted-foreground",e),...t}));$4.displayName=VO.displayName;const Hae=aG,Y4=E.forwardRef(({className:e,children:t,...n},r)=>g.jsxs(qO,{ref:r,className:Xe("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-xs outline-none","transition-colors focus:bg-accent focus:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[g.jsx("span",{className:"absolute left-2 flex size-(--size-icon-sm) items-center justify-center",children:g.jsx(oG,{children:g.jsx(Mi,{className:"size-(--size-icon-xs)"})})}),t]}));Y4.displayName=qO.displayName;const wa=E.createContext({isDesktop:!0,close:()=>{}});function G4({children:e,open:t,onOpenChange:n}){const r=!_o(),[s,o]=E.useState(!1),l=t??s,c=E.useCallback(d=>{o(d),n==null||n(d)},[n]),f=E.useCallback(()=>{c(!1)},[c]);return r?g.jsx(wa.Provider,{value:{isDesktop:r,close:f},children:g.jsx(Fae,{open:t,onOpenChange:n,children:e})}):g.jsx(wa.Provider,{value:{isDesktop:r,close:f},children:g.jsx(wx,{open:l,onOpenChange:c,children:e})})}function Q4({className:e,children:t,...n}){const{isDesktop:r}=E.useContext(wa),s=r?Uae:aV;return g.jsx(s,{className:e,...n,children:t})}function K4({className:e,children:t,...n}){const{isDesktop:r}=E.useContext(wa);return r?g.jsx(q4,{className:e,...n,children:t}):g.jsx(Cx,{children:g.jsx("div",{className:"pb-6",children:t})})}function X4({className:e,children:t,...n}){const{isDesktop:r}=E.useContext(wa);return r?g.jsx($4,{className:e,...n,children:t}):g.jsx(Ax,{className:"pb-2",children:g.jsx(_x,{className:Xe("text-sm font-semibold text-muted-foreground",e),children:t})})}const W4=E.createContext({closeOnSelect:!0});function Z4({value:e,onValueChange:t,closeOnSelect:n=!0,children:r,className:s}){const{isDesktop:o}=E.useContext(wa);return o?g.jsx(Hae,{value:e,onValueChange:t,className:s,children:r}):g.jsx(W4.Provider,{value:{value:e,onValueChange:t,closeOnSelect:n},children:g.jsx("div",{role:"radiogroup",className:Xe("flex flex-col",s),children:r})})}function J4({value:e,children:t,icon:n,description:r,className:s}){const{isDesktop:o}=E.useContext(wa);return o?g.jsx(Y4,{value:e,className:s,children:n||r?g.jsxs("div",{className:"flex items-center gap-2",children:[n&&g.jsx(n,{className:"size-(--size-icon-xs) shrink-0"}),g.jsxs("div",{className:"text-left",children:[g.jsx("div",{children:t}),r&&g.jsx("div",{className:"text-[10px] text-muted-foreground",children:r})]})]}):t}):g.jsx(zae,{value:e,icon:n,description:r,className:s,children:t})}function zae({value:e,children:t,icon:n,description:r,className:s}){const{value:o,onValueChange:l,closeOnSelect:c}=E.useContext(W4),{close:f}=E.useContext(wa),d=o===e;return g.jsxs("button",{role:"radio","aria-checked":d,className:Xe("flex w-full items-center gap-3 border-b border-border px-4 py-3 text-left transition-colors","min-h-[44px] active:bg-accent/50","last:border-b-0",s),onClick:()=>{l==null||l(e),c&&f()},children:[n&&g.jsx(n,{className:"size-5 shrink-0"}),g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsx("div",{className:"text-[17px] leading-snug",children:t}),r&&g.jsx("div",{className:"text-[13px] leading-snug text-muted-foreground",children:r})]}),d&&g.jsx(Mi,{className:"size-5 shrink-0 text-primary"})]})}const Q1=[{value:"default",label:"Default",icon:fx,description:"Prompt for each tool call"},{value:"acceptEdits",label:"Accept Edits",icon:QF,description:"Auto-approve file edits"},{value:"plan",label:"Plan Mode",icon:aF,description:"Research only, no edits"},{value:"bypassPermissions",label:"Bypass All",icon:yN,description:"Auto-approve everything"}];function Vae({mode:e,onChangeMode:t}){const n=Q1.find(o=>o.value===e)??Q1[0],r=n.icon,s=e==="bypassPermissions";return g.jsxs(G4,{children:[g.jsx(Q4,{asChild:!0,children:g.jsxs("button",{className:`inline-flex items-center gap-1 hover:text-foreground transition-colors duration-150 ${s?"text-red-500":""}`,children:[g.jsx(r,{className:"size-(--size-icon-xs)"}),g.jsx("span",{children:n.label})]})}),g.jsxs(K4,{side:"top",align:"start",className:"w-56",children:[g.jsx(X4,{children:"Permission Mode"}),g.jsx(Z4,{value:e,onValueChange:o=>t(o),children:Q1.map(o=>{const l=o.value==="bypassPermissions";return g.jsx(J4,{value:o.value,icon:o.icon,description:o.description,className:l?"text-red-500":"",children:o.label},o.value)})})]})]})}const e5=[{value:"claude-sonnet-4-5-20250929",label:"Sonnet 4.5"},{value:"claude-haiku-4-5-20251001",label:"Haiku 4.5"},{value:"claude-opus-4-6",label:"Opus 4.6"}];function qae(e){const t=e5.find(r=>r.value===e);if(t)return t.label;const n=e.match(/claude-(\w+)-/);return n?n[1].charAt(0).toUpperCase()+n[1].slice(1):e}function $ae({model:e,onChangeModel:t}){return g.jsxs(G4,{children:[g.jsx(Q4,{asChild:!0,children:g.jsxs("button",{className:"inline-flex items-center gap-1 hover:text-foreground transition-colors duration-150",children:[g.jsx(W7,{className:"size-(--size-icon-xs)"}),g.jsx("span",{children:qae(e)})]})}),g.jsxs(K4,{side:"top",align:"start",className:"w-44",children:[g.jsx(X4,{children:"Model"}),g.jsx(Z4,{value:e,onValueChange:t,children:e5.map(n=>g.jsx(J4,{value:n.value,children:n.label},n.value))})]})]})}function Yae({costUsd:e}){return g.jsxs("span",{className:"inline-flex items-center gap-1",children:[g.jsx(hF,{className:"size-(--size-icon-xs)"}),g.jsxs("span",{children:["$",e.toFixed(2)]})]})}function Gae({percent:e}){const t=e>=95?"text-red-500":e>=80?"text-amber-500":"";return g.jsxs("span",{className:`inline-flex items-center gap-1 ${t}`,children:[g.jsx(NF,{className:"size-(--size-icon-xs)"}),g.jsxs("span",{children:[e,"%"]})]})}function Qae(e){const t=si();return zi({queryKey:["git-status",e],queryFn:()=>t.getGitStatus(e??void 0),enabled:!!e,refetchInterval:1e4,refetchIntervalInBackground:!1,staleTime:5e3})}function Kae(e){return!!e&&!("error"in e)}function Xae({data:e}){if(!e)return null;if(!Kae(e))return g.jsxs("span",{className:"inline-flex items-center gap-1 text-muted-foreground/50",title:"Not a git repository",children:[g.jsx(bC,{className:"size-(--size-icon-xs)"}),g.jsx("span",{children:"No repo"})]});const t=e.modified+e.staged+e.untracked,n=t===1?"1 change":`${t} changes`,r=[];e.modified>0&&r.push(`${e.modified} modified`),e.staged>0&&r.push(`${e.staged} staged`),e.untracked>0&&r.push(`${e.untracked} untracked`),e.conflicted>0&&r.push(`${e.conflicted} conflicted`);const s=r.length>0?`${e.branch} · ${r.join(", ")}`:`${e.branch} · clean`;return g.jsxs("span",{className:"inline-flex items-center gap-1",title:s,children:[g.jsx(bC,{className:"size-(--size-icon-xs)"}),g.jsx("span",{className:"max-w-[25ch] truncate",children:e.branch}),e.ahead>0&&g.jsxs("span",{className:"inline-flex items-center gap-0.5 text-muted-foreground",children:[g.jsx(mN,{className:"size-(--size-icon-xs)"}),e.ahead]}),e.behind>0&&g.jsxs("span",{className:"inline-flex items-center gap-0.5 text-muted-foreground",children:[g.jsx(hN,{className:"size-(--size-icon-xs)"}),e.behind]}),t>0&&g.jsxs("span",{className:"text-muted-foreground",children:["· ",n]})]})}function Wae({enabled:e,onToggle:t}){const n=e?iU:aU;return g.jsx("button",{onClick:t,className:"inline-flex items-center gap-1 hover:text-foreground transition-colors duration-150","aria-label":e?"Mute notification sound":"Unmute notification sound",title:e?"Sound on — click to mute":"Sound off — click to unmute",children:g.jsx(n,{className:"size-(--size-icon-xs)"})})}const Zae={duration:.2,ease:[.4,0,.2,1]};function K_({sessionId:e,sessionStatus:t,isStreaming:n}){const r=ZO(e,t,n),{showStatusBarCwd:s,showStatusBarPermission:o,showStatusBarModel:l,showStatusBarCost:c,showStatusBarContext:f,showStatusBarGit:d,showStatusBarSound:m,enableNotificationSound:p,setEnableNotificationSound:b}=Jt(),{data:x}=Qae(r.cwd),S=[];s&&r.cwd&&S.push({key:"cwd",node:g.jsx(Bae,{cwd:r.cwd})}),d&&S.push({key:"git",node:g.jsx(Xae,{data:x})}),o&&S.push({key:"permission",node:g.jsx(Vae,{mode:r.permissionMode,onChangeMode:C=>r.updateSession({permissionMode:C})})}),l&&S.push({key:"model",node:g.jsx($ae,{model:r.model,onChangeModel:C=>r.updateSession({model:C})})}),c&&r.costUsd!==null&&S.push({key:"cost",node:g.jsx(Yae,{costUsd:r.costUsd})}),f&&r.contextPercent!==null&&S.push({key:"context",node:g.jsx(Gae,{percent:r.contextPercent})}),m&&S.push({key:"sound",node:g.jsx(Wae,{enabled:p,onToggle:()=>b(!p)})});const w=S.length>0;return g.jsx(Rn,{initial:!1,children:w&&g.jsx(gt.div,{role:"toolbar","aria-label":"Session status","aria-live":"polite",initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2,ease:[.4,0,.2,1]},className:"overflow-hidden",children:g.jsx("div",{className:"flex flex-wrap items-center justify-center sm:justify-start gap-2 px-1 pt-2 text-xs text-muted-foreground whitespace-nowrap",children:g.jsx(Rn,{initial:!1,mode:"popLayout",children:S.map((C,A)=>g.jsxs(gt.div,{layout:!0,initial:{opacity:0,scale:.8,filter:"blur(4px)"},animate:{opacity:1,scale:1,filter:"blur(0px)"},exit:{opacity:0,scale:.8,filter:"blur(4px)"},transition:Zae,className:"inline-flex items-center gap-2",children:[A>0&&g.jsx(Jae,{}),C.node]},C.key))})})})})}function Jae(){return g.jsx("span",{className:"text-muted-foreground/30","aria-hidden":"true",children:"·"})}function eoe(e){const t=si();return zi({queryKey:["files",{cwd:e??null}],queryFn:()=>t.listFiles(e),enabled:!!e,staleTime:300*1e3,gcTime:1800*1e3})}function toe({activeInteraction:e,onApprove:t,onDeny:n,onToggleOption:r,onNavigateOption:s,onNavigateQuestion:o,onSubmit:l,optionCount:c=0,focusedIndex:f=0}){const d=E.useRef(!1);E.useEffect(()=>{d.current=!1},[e==null?void 0:e.toolCallId]),E.useEffect(()=>{if(!e)return;function m(p){const b=p.target,x=(b.tagName==="TEXTAREA"||b.tagName==="INPUT")&&!b.disabled;if(!d.current){if(e.type==="approval"){p.key==="Enter"?(p.preventDefault(),d.current=!0,t==null||t()):p.key==="Escape"&&(p.preventDefault(),d.current=!0,n==null||n());return}if(e.type==="question"){if(x){p.key==="Enter"&&!p.shiftKey&&(p.preventDefault(),l==null||l());return}const S=parseInt(p.key,10);if(S>=1&&S<=9){p.preventDefault(),S-1<c&&(r==null||r(S-1));return}switch(p.key){case"ArrowUp":p.preventDefault(),s==null||s("up");break;case"ArrowDown":p.preventDefault(),s==null||s("down");break;case" ":p.preventDefault(),r==null||r(f);break;case"ArrowLeft":case"[":p.preventDefault(),o==null||o("prev");break;case"ArrowRight":case"]":p.preventDefault(),o==null||o("next");break;case"Enter":p.preventDefault(),l==null||l();break}}}}return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[e,t,n,r,s,o,l,c,f])}function noe(e={}){const{timeoutMs:t=3e4,onIdle:n,onReturn:r}=e,s=E.useRef(!1),o=E.useRef(null),l=E.useCallback(()=>{s.current||(s.current=!0,n==null||n())},[n]),c=E.useCallback(()=>{s.current&&(s.current=!1,r==null||r())},[r]),f=E.useCallback(()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(l,t),c()},[t,l,c]);return E.useEffect(()=>{o.current=setTimeout(l,t);const d=["mousemove","keydown","scroll","touchstart"];d.forEach(p=>document.addEventListener(p,f,{passive:!0}));const m=()=>{document.hidden?l():f()};return document.addEventListener("visibilitychange",m),()=>{o.current&&clearTimeout(o.current),d.forEach(p=>document.removeEventListener(p,f)),document.removeEventListener("visibilitychange",m)}},[t,l,f]),{isIdle:s.current}}class roe{constructor(t){qe(this,"config");qe(this,"recentCompletions",[]);qe(this,"queue",[]);qe(this,"isIdle",!1);qe(this,"debounceTimer",null);this.config=t}onTaskCompleted(t,n){if(!this.config.enabled)return;const r=Date.now();this.recentCompletions.push(r),this.recentCompletions=this.recentCompletions.filter(c=>r-c<this.config.debounceWindowMs);const s=n.length,o=n.filter(c=>c.status==="completed").length;if(s>=this.config.minTasksForMajor&&o===s){this.cancelDebounce();const c={level:"major",taskId:t,timestamp:r};this.emitOrQueue(c);return}if(this.recentCompletions.length>=this.config.debounceThreshold){this.cancelDebounce(),this.debounceTimer=setTimeout(()=>{const c={level:"mini",taskId:t,timestamp:Date.now()};this.emitOrQueue(c),this.recentCompletions=[]},this.config.debounceWindowMs);return}if(Math.random()<this.config.miniProbability){const c={level:"mini",taskId:t,timestamp:r};this.emitOrQueue(c)}}setIdle(t){this.isIdle=t}onUserReturn(){if(this.queue.length>0){const n=this.queue.some(r=>r.level==="major")?this.queue.find(r=>r.level==="major"):this.queue[this.queue.length-1];this.config.onCelebrate(n),this.queue=[]}}destroy(){this.cancelDebounce(),this.queue=[],this.recentCompletions=[]}emitOrQueue(t){this.isIdle?this.queue.push(t):this.config.onCelebrate(t)}cancelDebounce(){this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null)}}function ioe(){const e=Jt(d=>d.showTaskCelebrations),[t,n]=E.useState(null),[r,s]=E.useState(null),o=E.useRef(null),l=E.useRef(!1);E.useEffect(()=>{const d=window.matchMedia("(prefers-reduced-motion: reduce)");l.current=d.matches;const m=p=>{l.current=p.matches};return d.addEventListener("change",m),()=>d.removeEventListener("change",m)},[]),noe({timeoutMs:3e4,onIdle:E.useCallback(()=>{var d;(d=o.current)==null||d.setIdle(!0)},[]),onReturn:E.useCallback(()=>{var d,m;(d=o.current)==null||d.setIdle(!1),(m=o.current)==null||m.onUserReturn()},[])}),E.useEffect(()=>{const d=new roe({enabled:e,miniProbability:.3,debounceWindowMs:2e3,debounceThreshold:3,minTasksForMajor:3,idleTimeoutMs:3e4,onCelebrate:m=>{l.current&&m.level==="major"?n({...m,level:"mini"}):n(m),m.level==="mini"&&s(m.taskId)}});return o.current=d,()=>d.destroy()},[e]);const c=E.useCallback((d,m)=>{var p;d.action==="update"&&d.task.status==="completed"&&d.task.id&&((p=o.current)==null||p.onTaskCompleted(d.task.id,m))},[]),f=E.useCallback(()=>{n(null),s(null)},[]);return{handleTaskEvent:c,activeCelebration:t,celebratingTaskId:r,clearCelebration:f}}let Nh=null;function soe(){try{Nh||(Nh=new Audio("/notification.wav")),Nh.currentTime=0,Nh.play().catch(()=>{})}catch{}}function X_({sessionId:e,transformContent:t}){const[,n]=Cm(),r=E.useRef(null),s=E.useRef(null),o=wG(e),l=ioe(),c=Jt(be=>be.enableNotificationSound),f=E.useCallback(be=>{o.handleTaskEvent(be);const Qe=o.tasks.map(st=>st.id===be.task.id?{...st,...be.task}:st);l.handleTaskEvent(be,Qe)},[o,l]),{messages:d,input:m,setInput:p,handleSubmit:b,status:x,error:S,sessionBusy:w,stop:C,isLoadingHistory:A,sessionStatus:N,streamStartTime:k,estimatedTokens:R,isTextStreaming:U,isWaitingForUser:I,waitingType:j,activeInteraction:M}=xG(e,{transformContent:t,onTaskEvent:f,onSessionIdChange:n,onStreamingDone:E.useCallback(()=>{c&&soe()},[c])}),{permissionMode:$}=ZO(e,N,x==="streaming"),L=E.useRef(null),[W,K]=E.useState(0),[J,te]=E.useState(0),ie=E.useCallback(be=>{L.current=be,te(be&&"getOptionCount"in be?be.getOptionCount():0)},[]);E.useEffect(()=>{K(0),te(0)},[M==null?void 0:M.toolCallId]);const O=E.useMemo(()=>M?{type:M.interactiveType,toolCallId:M.toolCallId}:null,[M]);toe({activeInteraction:O,onApprove:E.useCallback(()=>{const be=L.current;be&&"approve"in be&&be.approve()},[]),onDeny:E.useCallback(()=>{const be=L.current;be&&"deny"in be&&be.deny()},[]),onToggleOption:E.useCallback(be=>{const Qe=L.current;Qe&&"toggleOption"in Qe&&(Qe.toggleOption(be),K(be))},[]),onNavigateOption:E.useCallback(be=>{K(Qe=>{const st=L.current,Bt=st&&"getOptionCount"in st?st.getOptionCount():0;return Bt===0?Qe:be==="up"?Qe<=0?Bt-1:Qe-1:Qe>=Bt-1?0:Qe+1})},[]),onNavigateQuestion:E.useCallback(be=>{const Qe=L.current;Qe&&"navigateQuestion"in Qe&&(Qe.navigateQuestion(be),K(0),te(Qe.getOptionCount()))},[]),onSubmit:E.useCallback(()=>{const be=L.current;be&&"submit"in be&&be.submit()},[]),optionCount:J,focusedIndex:W});const[H,q]=E.useState(!1),[ne,B]=E.useState(""),[V,re]=E.useState(0),[P,he]=E.useState(-1),[ye,ge]=E.useState(!1),[fe,Se]=E.useState(""),[we,Ie]=E.useState(0),[Fe,$e]=E.useState(-1),[zt,Ne]=E.useState(0),[Ue,Ye]=E.useState(!0),[lt,$t]=E.useState(!1),Ct=E.useRef(d.length),un=E.useCallback(be=>{Ye(be.isAtBottom)},[]),cr=E.useCallback(()=>{var be;(be=r.current)==null||be.scrollToBottom(),Ye(!0),$t(!1)},[]);E.useEffect(()=>{const be=Ct.current;Ct.current=d.length,d.length>be&&!Ue&&$t(!0)},[d.length,Ue]),E.useEffect(()=>{Ue&&$t(!1)},[Ue]);const Fr=_o(),[Zn,Yt]=E.useState(!1),[He,oe]=E.useState(()=>Fr?parseInt(localStorage.getItem("gateway-gesture-hint-count")||"0",10)<3:!1);E.useEffect(()=>{if(!He)return;const be=setTimeout(()=>{oe(!1);const Qe=parseInt(localStorage.getItem("gateway-gesture-hint-count")||"0",10);localStorage.setItem("gateway-gesture-hint-count",String(Qe+1))},4e3);return()=>clearTimeout(be)},[He]);const Te=E.useCallback(()=>{oe(!1);const be=parseInt(localStorage.getItem("gateway-gesture-hint-count")||"0",10);localStorage.setItem("gateway-gesture-hint-count",String(be+1))},[]),Pe=80,Ze=500,bt=(be,Qe)=>{const{offset:st,velocity:Bt}=Qe;st.y>Pe||Bt.y>Ze?Yt(!0):(st.y<-Pe||Bt.y<-Ze)&&Yt(!1)},vn=Jt(be=>be.setIsStreaming),Tn=Jt(be=>be.setIsWaitingForUser),nn=Jt(be=>be.setActiveForm);E.useEffect(()=>(vn(x==="streaming"),()=>vn(!1)),[x,vn]),E.useEffect(()=>(Tn(I),()=>Tn(!1)),[I,Tn]),E.useEffect(()=>(nn(o.activeForm),()=>nn(null)),[o.activeForm,nn]);const Gt=Jt(be=>be.showShortcutChips),[Sn]=Om(),{data:vt}=EG(Sn),fr=(vt==null?void 0:vt.commands)??[],{data:wn}=eoe(Sn),ke=E.useMemo(()=>ne?fr.map(be=>{const Qe=`${be.fullCommand} ${be.description}`,st=uA(ne,Qe);return{cmd:be,...st}}).filter(be=>be.match).sort((be,Qe)=>Qe.score-be.score).map(be=>be.cmd):fr,[fr,ne]),ut=E.useMemo(()=>{if(!(wn!=null&&wn.files))return[];const be=[],Qe=new Set;for(const st of wn.files){const Bt=st.lastIndexOf("/"),Ar=Bt>=0?st.slice(0,Bt+1):"",dr=Bt>=0?st.slice(Bt+1):st;be.push({path:st,filename:dr,directory:Ar,isDirectory:!1});const Ft=st.split("/");for(let Kt=1;Kt<Ft.length;Kt++){const vi=Ft.slice(0,Kt).join("/")+"/";Qe.has(vi)||(Qe.add(vi),be.push({path:vi,filename:Ft[Kt-1]+"/",directory:Kt>1?Ft.slice(0,Kt-1).join("/")+"/":"",isDirectory:!0}))}}return be},[wn]),Ge=E.useMemo(()=>ye?fe?ut.map(be=>({...be,...uA(fe,be.path)})).filter(be=>be.match).sort((be,Qe)=>Qe.score-be.score).slice(0,50):ut.slice(0,50).map(be=>({...be,indices:[]})):[],[ut,fe,ye]);E.useEffect(()=>{re(0)},[ne,H]),E.useEffect(()=>{Ie(0)},[fe,ye]),E.useEffect(()=>{ke.length>0&&V>=ke.length&&re(ke.length-1)},[ke.length,V]),E.useEffect(()=>{Ge.length>0&&we>=Ge.length&&Ie(Ge.length-1)},[Ge.length,we]);function tt(be,Qe){const st=be.slice(0,Qe),Bt=st.match(/(^|\s)@([\w.\/:-]*)$/);if(Bt){ge(!0),Se(Bt[2]),$e((Bt.index??0)+Bt[1].length),q(!1);return}const Ar=st.match(/(^|\s)\/([\w:-]*)$/);if(Ar){q(!0),B(Ar[2]),he((Ar.index??0)+Ar[1].length),ge(!1);return}ge(!1),q(!1)}function At(be){p(be),tt(be,zt||be.length)}const cn=E.useCallback(be=>{Ne(be),tt(m,be)},[m]);function Qt(be){const Qe=m.slice(0,P);p(Qe+be.fullCommand+" "),q(!1)}function wr(be){const Qe=m.slice(0,Fe),st=m.slice(Fe+1+fe.length);if(be.isDirectory){const Bt=Qe+"@"+be.path+st;p(Bt);const Ar=Qe.length+1+be.path.length;Ne(Ar),Se(be.path),Ie(0)}else p(Qe+"@"+be.path+" "+st),ge(!1)}const zn=E.useCallback(()=>{ye?Ie(be=>Ge.length===0?0:(be+1)%Ge.length):re(be=>ke.length===0?0:(be+1)%ke.length)},[ye,Ge.length,ke.length]),Cr=E.useCallback(()=>{ye?Ie(be=>Ge.length===0?0:(be-1+Ge.length)%Ge.length):re(be=>ke.length===0?0:(be-1+ke.length)%ke.length)},[ye,Ge.length,ke.length]),Vn=E.useCallback(()=>{ye?Ge.length>0&&we<Ge.length?wr(Ge[we]):ge(!1):H&&(ke.length>0&&V<ke.length?Qt(ke[V]):q(!1))},[ye,H,Ge,we,ke,V]),Jn=E.useCallback(be=>{const Qe=m.match(/(^|\s)([/@])([\w.\/:-]*)$/);let st;if(Qe){const Bt=Qe[2],Ar=Qe[3],dr=(Qe.index??0)+Qe[1].length;if(Bt===be&&!Ar){const Ft=m.slice(0,dr);st=Ft.endsWith(" ")&&dr>0?Ft.slice(0,-1):Ft,p(st),ge(!1),q(!1),requestAnimationFrame(()=>{var Kt;return(Kt=s.current)==null?void 0:Kt.focusAt(st.length)});return}st=m.slice(0,dr)+be}else m.length>0&&!m.endsWith(" ")?st=m+" "+be:st=m+be;p(st),tt(st,st.length),requestAnimationFrame(()=>{var Bt;return(Bt=s.current)==null?void 0:Bt.focusAt(st.length)})},[m,p]),Gi=H||ye,Ra=ye&&Ge.length>0?`file-item-${we}`:H&&ke.length>0?`command-item-${V}`:void 0;return g.jsxs("div",{className:"flex flex-col h-full",children:[g.jsxs("div",{className:"relative flex-1 min-h-0",children:[A?g.jsx("div",{className:"h-full flex items-center justify-center",children:g.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-sm",children:[g.jsxs("div",{className:"flex gap-1",children:[g.jsx("span",{className:"h-2 w-2 rounded-full bg-muted-foreground",style:{animation:"typing-dot 1.4s ease-in-out infinite",animationDelay:"0s"}}),g.jsx("span",{className:"h-2 w-2 rounded-full bg-muted-foreground",style:{animation:"typing-dot 1.4s ease-in-out infinite",animationDelay:"0.2s"}}),g.jsx("span",{className:"h-2 w-2 rounded-full bg-muted-foreground",style:{animation:"typing-dot 1.4s ease-in-out infinite",animationDelay:"0.4s"}})]}),"Loading conversation..."]})}):d.length===0?g.jsx("div",{className:"h-full flex items-center justify-center",children:g.jsxs("div",{className:"text-center",children:[g.jsx("p",{className:"text-muted-foreground text-base",children:"Start a conversation"}),g.jsx("p",{className:"text-muted-foreground/60 text-sm mt-2",children:"Type a message below to begin"})]})}):g.jsx(_ae,{ref:r,messages:d,sessionId:e,status:x,isTextStreaming:U,onScrollStateChange:un,streamStartTime:k,estimatedTokens:R,permissionMode:$,isWaitingForUser:I,waitingType:j??void 0,activeToolCallId:(M==null?void 0:M.toolCallId)??null,onToolRef:ie,focusedOptionIndex:W}),g.jsx(Rn,{children:lt&&!Ue&&g.jsx(gt.button,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:{duration:.2},onClick:cr,className:"absolute bottom-16 left-1/2 -translate-x-1/2 z-10 rounded-full bg-foreground text-background text-xs font-medium px-3 py-1.5 shadow-sm cursor-pointer hover:bg-foreground/90 transition-colors",role:"status","aria-live":"polite",children:"New messages"})}),g.jsx(Rn,{children:!Ue&&d.length>0&&!A&&g.jsx(gt.button,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},transition:{duration:.15},onClick:cr,className:"absolute bottom-4 right-4 rounded-full bg-background border shadow-sm p-2 hover:shadow-md transition-shadow","aria-label":"Scroll to bottom",children:g.jsx(hN,{className:"size-(--size-icon-md)"})})})]}),g.jsx(Oae,{celebration:l.activeCelebration,onComplete:l.clearCelebration}),g.jsx(Nae,{tasks:o.tasks,activeForm:o.activeForm,isCollapsed:o.isCollapsed,onToggleCollapse:o.toggleCollapse,celebratingTaskId:l.celebratingTaskId,onCelebrationComplete:l.clearCelebration}),S&&g.jsx("div",{className:"mx-4 mb-2 rounded-lg bg-red-500/10 text-red-600 dark:text-red-400 border border-red-500/20 px-3 py-2 text-sm",children:S}),g.jsxs("div",{className:"chat-input-container relative border-t p-4",children:[g.jsxs(Rn,{children:[H&&g.jsx(Mae,{filteredCommands:ke,selectedIndex:V,onSelect:Qt}),ye&&g.jsx(Lae,{filteredFiles:Ge,selectedIndex:we,onSelect:wr})]}),g.jsx(kae,{ref:s,value:m,onChange:At,onSubmit:b,isLoading:x==="streaming",sessionBusy:w,onStop:C,onEscape:()=>{q(!1),ge(!1)},onClear:()=>{p(""),q(!1),ge(!1)},isPaletteOpen:Gi,onArrowUp:Cr,onArrowDown:zn,onCommandSelect:Vn,activeDescendantId:Ra,onCursorChange:cn}),Fr&&g.jsxs(g.Fragment,{children:[g.jsx(gt.div,{animate:He?{y:[0,8,0]}:void 0,transition:He?{duration:1.2,repeat:2}:void 0,children:g.jsx(jae,{collapsed:Zn,onToggle:()=>Yt(be=>!be)})}),g.jsx(Rn,{children:He&&g.jsx(gt.p,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:Te,className:"text-center text-xs text-muted-foreground cursor-pointer",children:"Swipe to collapse"})}),g.jsx(Rn,{initial:!1,children:!Zn&&g.jsxs(gt.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{type:"spring",stiffness:300,damping:30},className:"overflow-hidden",drag:"y",dragConstraints:{top:0,bottom:0},dragElastic:.2,onDragEnd:bt,style:{touchAction:"pan-y"},children:[Gt&&g.jsx(Q_,{onChipClick:Jn}),g.jsx(K_,{sessionId:e,sessionStatus:N,isStreaming:x==="streaming"})]})})]}),!Fr&&g.jsxs(g.Fragment,{children:[g.jsx(Rn,{children:Gt&&g.jsx(Q_,{onChipClick:Jn})}),g.jsx(K_,{sessionId:e,sessionStatus:N,isStreaming:x==="streaming"})]})]})]})}const W_=["😀","😎","🤖","🦊","🐱","🐶","🦁","🐸","🐵","🦄","🐲","🦉","🐧","🐼","🦋","🌸","🔮","🎯","🚀","⚡","🌊","🍀","🎨","🎵","💎","🔥","🌈","⭐","🧠","👾"];function t5(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=t*16777619>>>0;return t}function aoe(e){return`hsl(${t5(e)%360}, 70%, 55%)`}function ooe(e){return W_[t5(e)%W_.length]}function loe(e){const t=document.createElement("canvas");t.width=32,t.height=32;const n=t.getContext("2d");return n?(n.fillStyle=e,n.beginPath(),n.arc(16,16,15,0,Math.PI*2),n.fill(),t.toDataURL("image/png")):""}function uoe(e,t=20,n=.3){return new Promise((r,s)=>{const o=new Image;o.onload=()=>{const l=[];for(let c=0;c<t;c++){const d=1-Math.sin(c/t*Math.PI)*(1-n),m=document.createElement("canvas");m.width=32,m.height=32;const p=m.getContext("2d");if(!p){s(new Error("Canvas context unavailable"));return}p.globalAlpha=d,p.drawImage(o,0,0),l.push(m.toDataURL("image/png"))}r(l)},o.onerror=s,o.src=e})}function K1(e){let t=document.querySelector("link[rel*='icon']");t||(t=document.createElement("link"),t.rel="icon",document.head.appendChild(t)),t.href=e}const coe=100;function foe({cwd:e,isStreaming:t}){const n=E.useRef(""),r=E.useRef([]),s=E.useRef(null),o=E.useRef(0),l=E.useRef(t);l.current=t;const c=E.useCallback(()=>{s.current&&(clearInterval(s.current),s.current=null),r.current.length!==0&&(o.current=0,s.current=window.setInterval(()=>{const d=r.current;d.length!==0&&(K1(d[o.current]),o.current=(o.current+1)%d.length)},coe))},[]),f=E.useCallback(()=>{s.current&&(clearInterval(s.current),s.current=null),n.current&&K1(n.current)},[]);E.useEffect(()=>{if(!e)return;const d=aoe(e),m=loe(d);n.current=m,r.current=[],K1(m);let p=!1;return uoe(m).then(b=>{p||(r.current=b,l.current&&c())}),()=>{p=!0}},[e,c]),E.useEffect(()=>(t?c():f(),f),[t,c,f])}function Z_(e,t,n){const r=ooe(e),s=e.split("/").filter(Boolean).pop()??e;let o=`${n}${r} ${s}`;if(t){const l=t.length>40?t.slice(0,40)+"…":t;o+=` — ${l}`}return o+=" — DorkOS",o}function doe({cwd:e,activeForm:t,isStreaming:n,isWaitingForUser:r}){const s=E.useRef(document.hidden),o=E.useRef(!1),l=E.useRef(n),c=E.useRef(e),f=E.useRef(t),d=E.useRef(r);c.current=e,f.current=t,d.current=r,E.useEffect(()=>{const m=()=>{if(s.current=document.hidden,!document.hidden&&o.current&&(o.current=!1,c.current)){const p=d.current?"🔔 ":"";document.title=Z_(c.current,f.current,p)}};return document.addEventListener("visibilitychange",m),()=>document.removeEventListener("visibilitychange",m)},[]),E.useEffect(()=>{l.current&&!n&&s.current&&(o.current=!0),l.current=n},[n]),E.useEffect(()=>{if(!e){document.title="DorkOS";return}let m="";r?m="🔔 ":o.current&&(m="🏁 "),document.title=Z_(e,t,m)},[e,t,n,r])}function hoe({transformContent:e,embedded:t}={}){const{sidebarOpen:n,setSidebarOpen:r,toggleSidebar:s}=Jt(),[o]=Cm(),l=_o(),c=E.useRef(null);XP();const[f]=Om(),d=Jt(b=>b.isStreaming),m=Jt(b=>b.activeForm),p=Jt(b=>b.isWaitingForUser);return foe({cwd:t?null:f,isStreaming:d}),doe({cwd:t?null:f,activeForm:m,isStreaming:d,isWaitingForUser:p}),E.useEffect(()=>{if(!(t||l)||!n)return;const x=t?c.current:document;if(!x)return;const S=w=>{w.key==="Escape"&&r(!1)};return x.addEventListener("keydown",S),()=>x.removeEventListener("keydown",S)},[t,l,n,r]),t?g.jsx(rC,{reducedMotion:"user",children:g.jsxs("div",{ref:c,className:"relative flex flex-col h-full bg-background text-foreground",children:[g.jsx(xC,{sessionId:o}),g.jsxs("div",{className:"relative flex-1 overflow-hidden",children:[g.jsx(Rn,{children:n&&g.jsxs(g.Fragment,{children:[g.jsx(gt.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"absolute inset-0 z-40 bg-black/40",onClick:()=>r(!1),"aria-label":"Close sidebar"}),g.jsx(gt.div,{initial:{x:-320},animate:{x:0},exit:{x:-320},transition:{duration:.2,ease:[0,0,.2,1]},className:"absolute top-0 left-0 z-50 h-full w-80 border-r bg-background overflow-y-auto",children:g.jsx(S1,{})})]})}),g.jsx(Rn,{children:!n&&g.jsx(gt.button,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.15,ease:[0,0,.2,1]},onClick:s,className:"absolute top-3 left-3 z-30 p-1.5 rounded-md bg-background/80 backdrop-blur border shadow-sm hover:bg-accent transition-colors duration-150","aria-label":"Open sidebar",children:g.jsx(yC,{className:"size-(--size-icon-md)"})})}),g.jsx("main",{className:"flex-1 overflow-hidden h-full",children:o?g.jsx(X_,{sessionId:o,transformContent:e},o):g.jsx("div",{className:"flex-1 flex items-center justify-center h-full",children:g.jsxs("div",{className:"text-center",children:[g.jsx("p",{className:"text-muted-foreground text-base",children:"New conversation"}),g.jsx("p",{className:"text-muted-foreground/60 text-sm mt-2",children:"Select a session or start a new one"})]})})})]})]})}):g.jsx(rC,{reducedMotion:"user",children:g.jsxs("div",{ref:c,className:"flex flex-col h-dvh bg-background text-foreground",children:[g.jsx(xC,{sessionId:o}),g.jsxs("div",{className:"relative flex flex-1 overflow-hidden",children:[g.jsx(Rn,{children:!n&&g.jsx(gt.button,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.15,ease:[0,0,.2,1]},onClick:s,className:"absolute top-3 left-3 z-30 p-1.5 rounded-md bg-background/80 backdrop-blur border shadow-sm hover:bg-accent transition-colors duration-150","aria-label":"Open sidebar",children:g.jsx(yC,{className:"size-(--size-icon-md)"})})}),l?g.jsx(Rn,{children:n&&g.jsxs(g.Fragment,{children:[g.jsx(gt.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"fixed inset-0 z-40 bg-black/40",onClick:()=>r(!1),"aria-label":"Close sidebar"}),g.jsx(gt.div,{initial:{x:"-90vw"},animate:{x:0},exit:{x:"-90vw"},transition:{duration:.2,ease:[0,0,.2,1]},className:"fixed top-0 left-0 z-50 h-full w-[90vw] border-r bg-background overflow-y-auto",children:g.jsx(S1,{})})]})}):g.jsx(gt.div,{animate:{width:n?320:0},transition:{duration:.2,ease:[0,0,.2,1]},className:"overflow-hidden flex-shrink-0 border-r",children:g.jsx("div",{className:"w-80 h-full overflow-y-auto",children:g.jsx(S1,{})})}),g.jsx("main",{className:"flex-1 overflow-hidden",children:o?g.jsx(X_,{sessionId:o,transformContent:e},o):g.jsx("div",{className:"flex-1 flex items-center justify-center h-full",children:g.jsxs("div",{className:"text-center",children:[g.jsx("p",{className:"text-muted-foreground text-base",children:"New conversation"}),g.jsx("p",{className:"text-muted-foreground/60 text-sm mt-2",children:"Select a session or start a new one"})]})})})]})]})})}async function nr(e,t,n){const r=await fetch(`${e}${t}`,{headers:{"Content-Type":"application/json"},...n});if(!r.ok){const s=await r.json().catch(()=>({error:r.statusText}));throw new Error(s.error||`HTTP ${r.status}`)}return r.json()}class moe{constructor(t){qe(this,"clientId");qe(this,"etagCache",new Map);qe(this,"messageCache",new Map);this.baseUrl=t,this.clientId=crypto.randomUUID()}createSession(t){return nr(this.baseUrl,"/sessions",{method:"POST",body:JSON.stringify(t)})}listSessions(t){const n=new URLSearchParams;t&&n.set("cwd",t);const r=n.toString();return nr(this.baseUrl,`/sessions${r?`?${r}`:""}`)}getSession(t,n){const r=new URLSearchParams;n&&r.set("cwd",n);const s=r.toString();return nr(this.baseUrl,`/sessions/${t}${s?`?${s}`:""}`)}updateSession(t,n,r){const s=new URLSearchParams;r&&s.set("cwd",r);const o=s.toString();return nr(this.baseUrl,`/sessions/${t}${o?`?${o}`:""}`,{method:"PATCH",body:JSON.stringify(n)})}async getMessages(t,n){const r=new URLSearchParams;n&&r.set("cwd",n);const s=r.toString(),o=`/sessions/${t}/messages${s?`?${s}`:""}`,l={"Content-Type":"application/json"},c=this.etagCache.get(t);c&&(l["If-None-Match"]=c);const f=await fetch(`${this.baseUrl}${o}`,{headers:l});if(f.status===304){const p=this.messageCache.get(t);if(p)return p;throw new Error("304 received but no cached response available")}if(!f.ok){const p=await f.json().catch(()=>({error:f.statusText}));throw new Error(p.error||`HTTP ${f.status}`)}const d=await f.json(),m=f.headers.get("ETag");return m&&(this.etagCache.set(t,m),this.messageCache.set(t,d)),d}async sendMessage(t,n,r,s,o){const l=await fetch(`${this.baseUrl}/sessions/${t}/messages`,{method:"POST",headers:{"Content-Type":"application/json","X-Client-Id":this.clientId},body:JSON.stringify({content:n,...o&&{cwd:o}}),signal:s});if(!l.ok){if(l.status===409){const m=await l.json().catch(()=>null);if(m&&m.code==="SESSION_LOCKED"){const p=new Error("Session locked");throw p.code="SESSION_LOCKED",p.lockedBy=m.lockedBy,p.lockedAt=m.lockedAt,p}}throw new Error(`HTTP ${l.status}`)}const c=l.body.getReader(),f=new TextDecoder;let d="";for(;;){const{done:m,value:p}=await c.read();if(m)break;d+=f.decode(p,{stream:!0});const b=d.split(`
476
+ `);d=b.pop()||"";let x="";for(const S of b)if(S.startsWith("event: "))x=S.slice(7).trim();else if(S.startsWith("data: ")&&x){const w=JSON.parse(S.slice(6));r({type:x,data:w}),x=""}}}approveTool(t,n){return nr(this.baseUrl,`/sessions/${t}/approve`,{method:"POST",body:JSON.stringify({toolCallId:n})})}denyTool(t,n){return nr(this.baseUrl,`/sessions/${t}/deny`,{method:"POST",body:JSON.stringify({toolCallId:n})})}submitAnswers(t,n,r){return nr(this.baseUrl,`/sessions/${t}/submit-answers`,{method:"POST",body:JSON.stringify({toolCallId:n,answers:r})})}async getTasks(t,n){try{const r=new URLSearchParams;n&&r.set("cwd",n);const s=r.toString();return await nr(this.baseUrl,`/sessions/${t}/tasks${s?`?${s}`:""}`)}catch{return{tasks:[]}}}browseDirectory(t,n){const r=new URLSearchParams;t&&r.set("path",t),n&&r.set("showHidden","true");const s=r.toString();return nr(this.baseUrl,`/directory${s?`?${s}`:""}`)}getDefaultCwd(){return nr(this.baseUrl,"/directory/default")}getCommands(t=!1,n){const r=new URLSearchParams;t&&r.set("refresh","true"),n&&r.set("cwd",n);const s=r.toString();return nr(this.baseUrl,`/commands${s?`?${s}`:""}`)}getGitStatus(t){const n=new URLSearchParams;t&&n.set("dir",t);const r=n.toString();return nr(this.baseUrl,`/git/status${r?`?${r}`:""}`)}health(){return nr(this.baseUrl,"/health")}listFiles(t){const n=new URLSearchParams({cwd:t});return nr(this.baseUrl,`/files?${n}`)}getConfig(){return nr(this.baseUrl,"/config")}}const poe=new WL({defaultOptions:{queries:{staleTime:3e4,retry:1}}}),goe=new moe("/api");_L.createRoot(document.getElementById("root")).render(g.jsx(Ce.StrictMode,{children:g.jsx(MP,{children:g.jsxs(ZL,{client:poe,children:[g.jsx(KP,{transport:goe,children:g.jsx(hoe,{})}),!1]})})}));const boe=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:H4},Symbol.toStringTag,{value:"Module"}));export{ii as N,xse as a,Ke as b,woe as c,g as j,E as r};