kanna-code 0.1.4 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -10
- package/dist/client/assets/index-Byzgv_-q.js +409 -0
- package/dist/client/assets/index-gld9RxCU.css +1 -0
- package/dist/client/index.html +2 -2
- package/package.json +5 -1
- package/src/server/agent.test.ts +541 -0
- package/src/server/agent.ts +498 -193
- package/src/server/codex-app-server-protocol.ts +440 -0
- package/src/server/codex-app-server.test.ts +1353 -0
- package/src/server/codex-app-server.ts +1328 -0
- package/src/server/discovery.test.ts +211 -0
- package/src/server/discovery.ts +292 -17
- package/src/server/event-store.ts +81 -34
- package/src/server/events.ts +25 -17
- package/src/server/generate-title.ts +32 -39
- package/src/server/harness-types.ts +19 -0
- package/src/server/provider-catalog.test.ts +34 -0
- package/src/server/provider-catalog.ts +77 -0
- package/src/server/quick-response.test.ts +86 -0
- package/src/server/quick-response.ts +124 -0
- package/src/server/read-models.test.ts +105 -0
- package/src/server/read-models.ts +5 -1
- package/src/server/server.ts +2 -2
- package/src/shared/protocol.ts +12 -2
- package/src/shared/tools.test.ts +88 -0
- package/src/shared/tools.ts +233 -0
- package/src/shared/types.ts +404 -5
- package/dist/client/assets/index-BRiM6Nxc.css +0 -1
- package/dist/client/assets/index-CjRaPaQM.js +0 -418
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
var aE=Object.defineProperty;var oE=(e,n,l)=>n in e?aE(e,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[n]=l;var Pr=(e,n,l)=>oE(e,typeof n!="symbol"?n+"":n,l);function sE(e,n){for(var l=0;l<n.length;l++){const i=n[l];if(typeof i!="string"&&!Array.isArray(i)){for(const o in i)if(o!=="default"&&!(o in e)){const s=Object.getOwnPropertyDescriptor(i,o);s&&Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>i[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const c of s.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function l(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(o){if(o.ep)return;o.ep=!0;const s=l(o);fetch(o.href,s)}})();function ec(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qd={exports:{}},so={};/**
|
|
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 mv;function uE(){if(mv)return so;mv=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function l(i,o,s){var c=null;if(s!==void 0&&(c=""+s),o.key!==void 0&&(c=""+o.key),"key"in o){s={};for(var f in o)f!=="key"&&(s[f]=o[f])}else s=o;return o=s.ref,{$$typeof:e,type:i,key:c,ref:o!==void 0?o:null,props:s}}return so.Fragment=n,so.jsx=l,so.jsxs=l,so}var gv;function cE(){return gv||(gv=1,qd.exports=uE()),qd.exports}var x=cE(),Fd={exports:{}},Te={};/**
|
|
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 yv;function fE(){if(yv)return Te;yv=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),v=Symbol.iterator;function b(z){return z===null||typeof z!="object"?null:(z=v&&z[v]||z["@@iterator"],typeof z=="function"?z:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,E={};function N(z,L,T){this.props=z,this.context=L,this.refs=E,this.updater=T||k}N.prototype.isReactComponent={},N.prototype.setState=function(z,L){if(typeof z!="object"&&typeof z!="function"&&z!=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,z,L,"setState")},N.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function M(){}M.prototype=N.prototype;function j(z,L,T){this.props=z,this.context=L,this.refs=E,this.updater=T||k}var D=j.prototype=new M;D.constructor=j,C(D,N.prototype),D.isPureReactComponent=!0;var I=Array.isArray;function O(){}var P={H:null,A:null,T:null,S:null},q=Object.prototype.hasOwnProperty;function re(z,L,T){var se=T.ref;return{$$typeof:e,type:z,key:L,ref:se!==void 0?se:null,props:T}}function H(z,L){return re(z.type,L,z.props)}function J(z){return typeof z=="object"&&z!==null&&z.$$typeof===e}function ne(z){var L={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(T){return L[T]})}var W=/\/+/g;function Z(z,L){return typeof z=="object"&&z!==null&&z.key!=null?ne(""+z.key):L.toString(36)}function Q(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(O,O):(z.status="pending",z.then(function(L){z.status==="pending"&&(z.status="fulfilled",z.value=L)},function(L){z.status==="pending"&&(z.status="rejected",z.reason=L)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function B(z,L,T,se,ce){var ue=typeof z;(ue==="undefined"||ue==="boolean")&&(z=null);var we=!1;if(z===null)we=!0;else switch(ue){case"bigint":case"string":case"number":we=!0;break;case"object":switch(z.$$typeof){case e:case n:we=!0;break;case y:return we=z._init,B(we(z._payload),L,T,se,ce)}}if(we)return ce=ce(z),we=se===""?"."+Z(z,0):se,I(ce)?(T="",we!=null&&(T=we.replace(W,"$&/")+"/"),B(ce,L,T,"",function(Ne){return Ne})):ce!=null&&(J(ce)&&(ce=H(ce,T+(ce.key==null||z&&z.key===ce.key?"":(""+ce.key).replace(W,"$&/")+"/")+we)),L.push(ce)),1;we=0;var Ae=se===""?".":se+":";if(I(z))for(var xe=0;xe<z.length;xe++)se=z[xe],ue=Ae+Z(se,xe),we+=B(se,L,T,ue,ce);else if(xe=b(z),typeof xe=="function")for(z=xe.call(z),xe=0;!(se=z.next()).done;)se=se.value,ue=Ae+Z(se,xe++),we+=B(se,L,T,ue,ce);else if(ue==="object"){if(typeof z.then=="function")return B(Q(z),L,T,se,ce);throw L=String(z),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return we}function Y(z,L,T){if(z==null)return z;var se=[],ce=0;return B(z,se,"","",function(ue){return L.call(T,ue,ce++)}),se}function le(z){if(z._status===-1){var L=z._result;L=L(),L.then(function(T){(z._status===0||z._status===-1)&&(z._status=1,z._result=T)},function(T){(z._status===0||z._status===-1)&&(z._status=2,z._result=T)}),z._status===-1&&(z._status=0,z._result=L)}if(z._status===1)return z._result.default;throw z._result}var de=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof z=="object"&&z!==null&&typeof z.message=="string"?String(z.message):String(z),error:z});if(!window.dispatchEvent(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},R={map:Y,forEach:function(z,L,T){Y(z,function(){L.apply(this,arguments)},T)},count:function(z){var L=0;return Y(z,function(){L++}),L},toArray:function(z){return Y(z,function(L){return L})||[]},only:function(z){if(!J(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return Te.Activity=g,Te.Children=R,Te.Component=N,Te.Fragment=l,Te.Profiler=o,Te.PureComponent=j,Te.StrictMode=i,Te.Suspense=d,Te.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,Te.__COMPILER_RUNTIME={__proto__:null,c:function(z){return P.H.useMemoCache(z)}},Te.cache=function(z){return function(){return z.apply(null,arguments)}},Te.cacheSignal=function(){return null},Te.cloneElement=function(z,L,T){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var se=C({},z.props),ce=z.key;if(L!=null)for(ue in L.key!==void 0&&(ce=""+L.key),L)!q.call(L,ue)||ue==="key"||ue==="__self"||ue==="__source"||ue==="ref"&&L.ref===void 0||(se[ue]=L[ue]);var ue=arguments.length-2;if(ue===1)se.children=T;else if(1<ue){for(var we=Array(ue),Ae=0;Ae<ue;Ae++)we[Ae]=arguments[Ae+2];se.children=we}return re(z.type,ce,se)},Te.createContext=function(z){return z={$$typeof:c,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:s,_context:z},z},Te.createElement=function(z,L,T){var se,ce={},ue=null;if(L!=null)for(se in L.key!==void 0&&(ue=""+L.key),L)q.call(L,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(ce[se]=L[se]);var we=arguments.length-2;if(we===1)ce.children=T;else if(1<we){for(var Ae=Array(we),xe=0;xe<we;xe++)Ae[xe]=arguments[xe+2];ce.children=Ae}if(z&&z.defaultProps)for(se in we=z.defaultProps,we)ce[se]===void 0&&(ce[se]=we[se]);return re(z,ue,ce)},Te.createRef=function(){return{current:null}},Te.forwardRef=function(z){return{$$typeof:f,render:z}},Te.isValidElement=J,Te.lazy=function(z){return{$$typeof:y,_payload:{_status:-1,_result:z},_init:le}},Te.memo=function(z,L){return{$$typeof:h,type:z,compare:L===void 0?null:L}},Te.startTransition=function(z){var L=P.T,T={};P.T=T;try{var se=z(),ce=P.S;ce!==null&&ce(T,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(O,de)}catch(ue){de(ue)}finally{L!==null&&T.types!==null&&(L.types=T.types),P.T=L}},Te.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},Te.use=function(z){return P.H.use(z)},Te.useActionState=function(z,L,T){return P.H.useActionState(z,L,T)},Te.useCallback=function(z,L){return P.H.useCallback(z,L)},Te.useContext=function(z){return P.H.useContext(z)},Te.useDebugValue=function(){},Te.useDeferredValue=function(z,L){return P.H.useDeferredValue(z,L)},Te.useEffect=function(z,L){return P.H.useEffect(z,L)},Te.useEffectEvent=function(z){return P.H.useEffectEvent(z)},Te.useId=function(){return P.H.useId()},Te.useImperativeHandle=function(z,L,T){return P.H.useImperativeHandle(z,L,T)},Te.useInsertionEffect=function(z,L){return P.H.useInsertionEffect(z,L)},Te.useLayoutEffect=function(z,L){return P.H.useLayoutEffect(z,L)},Te.useMemo=function(z,L){return P.H.useMemo(z,L)},Te.useOptimistic=function(z,L){return P.H.useOptimistic(z,L)},Te.useReducer=function(z,L,T){return P.H.useReducer(z,L,T)},Te.useRef=function(z){return P.H.useRef(z)},Te.useState=function(z){return P.H.useState(z)},Te.useSyncExternalStore=function(z,L,T){return P.H.useSyncExternalStore(z,L,T)},Te.useTransition=function(){return P.H.useTransition()},Te.version="19.2.1",Te}var xv;function hp(){return xv||(xv=1,Fd.exports=fE()),Fd.exports}var w=hp();const Nt=ec(w),z0=sE({__proto__:null,default:Nt},[w]);var Vd={exports:{}},uo={},Gd={exports:{}},Yd={};/**
|
|
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 vv;function dE(){return vv||(vv=1,(function(e){function n(B,Y){var le=B.length;B.push(Y);e:for(;0<le;){var de=le-1>>>1,R=B[de];if(0<o(R,Y))B[de]=Y,B[le]=R,le=de;else break e}}function l(B){return B.length===0?null:B[0]}function i(B){if(B.length===0)return null;var Y=B[0],le=B.pop();if(le!==Y){B[0]=le;e:for(var de=0,R=B.length,z=R>>>1;de<z;){var L=2*(de+1)-1,T=B[L],se=L+1,ce=B[se];if(0>o(T,le))se<R&&0>o(ce,T)?(B[de]=ce,B[se]=le,de=se):(B[de]=T,B[L]=le,de=L);else if(se<R&&0>o(ce,le))B[de]=ce,B[se]=le,de=se;else break e}}return Y}function o(B,Y){var le=B.sortIndex-Y.sortIndex;return le!==0?le:B.id-Y.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var d=[],h=[],y=1,g=null,v=3,b=!1,k=!1,C=!1,E=!1,N=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function D(B){for(var Y=l(h);Y!==null;){if(Y.callback===null)i(h);else if(Y.startTime<=B)i(h),Y.sortIndex=Y.expirationTime,n(d,Y);else break;Y=l(h)}}function I(B){if(C=!1,D(B),!k)if(l(d)!==null)k=!0,O||(O=!0,ne());else{var Y=l(h);Y!==null&&Q(I,Y.startTime-B)}}var O=!1,P=-1,q=5,re=-1;function H(){return E?!0:!(e.unstable_now()-re<q)}function J(){if(E=!1,O){var B=e.unstable_now();re=B;var Y=!0;try{e:{k=!1,C&&(C=!1,M(P),P=-1),b=!0;var le=v;try{t:{for(D(B),g=l(d);g!==null&&!(g.expirationTime>B&&H());){var de=g.callback;if(typeof de=="function"){g.callback=null,v=g.priorityLevel;var R=de(g.expirationTime<=B);if(B=e.unstable_now(),typeof R=="function"){g.callback=R,D(B),Y=!0;break t}g===l(d)&&i(d),D(B)}else i(d);g=l(d)}if(g!==null)Y=!0;else{var z=l(h);z!==null&&Q(I,z.startTime-B),Y=!1}}break e}finally{g=null,v=le,b=!1}Y=void 0}}finally{Y?ne():O=!1}}}var ne;if(typeof j=="function")ne=function(){j(J)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,Z=W.port2;W.port1.onmessage=J,ne=function(){Z.postMessage(null)}}else ne=function(){N(J,0)};function Q(B,Y){P=N(function(){B(e.unstable_now())},Y)}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(B){B.callback=null},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):q=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(B){switch(v){case 1:case 2:case 3:var Y=3;break;default:Y=v}var le=v;v=Y;try{return B()}finally{v=le}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(B,Y){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var le=v;v=B;try{return Y()}finally{v=le}},e.unstable_scheduleCallback=function(B,Y,le){var de=e.unstable_now();switch(typeof le=="object"&&le!==null?(le=le.delay,le=typeof le=="number"&&0<le?de+le:de):le=de,B){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=le+R,B={id:y++,callback:Y,priorityLevel:B,startTime:le,expirationTime:R,sortIndex:-1},le>de?(B.sortIndex=le,n(h,B),l(d)===null&&B===l(h)&&(C?(M(P),P=-1):C=!0,Q(I,le-de))):(B.sortIndex=R,n(d,B),k||b||(k=!0,O||(O=!0,ne()))),B},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(B){var Y=v;return function(){var le=v;v=Y;try{return B.apply(this,arguments)}finally{v=le}}}})(Yd)),Yd}var bv;function hE(){return bv||(bv=1,Gd.exports=dE()),Gd.exports}var $d={exports:{}},Vt={};/**
|
|
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 wv;function pE(){if(wv)return Vt;wv=1;var e=hp();function n(d){var h="https://react.dev/errors/"+d;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)h+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+d+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var i={d:{f:l,r:function(){throw Error(n(522))},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},o=Symbol.for("react.portal");function s(d,h,y){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:g==null?null:""+g,children:d,containerInfo:h,implementation:y}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,h){if(d==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Vt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Vt.createPortal=function(d,h){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(n(299));return s(d,h,null,y)},Vt.flushSync=function(d){var h=c.T,y=i.p;try{if(c.T=null,i.p=2,d)return d()}finally{c.T=h,i.p=y,i.d.f()}},Vt.preconnect=function(d,h){typeof d=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,i.d.C(d,h))},Vt.prefetchDNS=function(d){typeof d=="string"&&i.d.D(d)},Vt.preinit=function(d,h){if(typeof d=="string"&&h&&typeof h.as=="string"){var y=h.as,g=f(y,h.crossOrigin),v=typeof h.integrity=="string"?h.integrity:void 0,b=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;y==="style"?i.d.S(d,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:g,integrity:v,fetchPriority:b}):y==="script"&&i.d.X(d,{crossOrigin:g,integrity:v,fetchPriority:b,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Vt.preinitModule=function(d,h){if(typeof d=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var y=f(h.as,h.crossOrigin);i.d.M(d,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&i.d.M(d)},Vt.preload=function(d,h){if(typeof d=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var y=h.as,g=f(y,h.crossOrigin);i.d.L(d,y,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Vt.preloadModule=function(d,h){if(typeof d=="string")if(h){var y=f(h.as,h.crossOrigin);i.d.m(d,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else i.d.m(d)},Vt.requestFormReset=function(d){i.d.r(d)},Vt.unstable_batchedUpdates=function(d,h){return d(h)},Vt.useFormState=function(d,h,y){return c.H.useFormState(d,h,y)},Vt.useFormStatus=function(){return c.H.useHostTransitionStatus()},Vt.version="19.2.1",Vt}var Sv;function L0(){if(Sv)return $d.exports;Sv=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),$d.exports=pE(),$d.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 Cv;function mE(){if(Cv)return uo;Cv=1;var e=hE(),n=hp(),l=L0();function i(t){var r="https://react.dev/errors/"+t;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)r+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+t+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function s(t){var r=t,a=t;if(t.alternate)for(;r.return;)r=r.return;else{t=r;do r=t,(r.flags&4098)!==0&&(a=r.return),t=r.return;while(t)}return r.tag===3?a:null}function c(t){if(t.tag===13){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function f(t){if(t.tag===31){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function d(t){if(s(t)!==t)throw Error(i(188))}function h(t){var r=t.alternate;if(!r){if(r=s(t),r===null)throw Error(i(188));return r!==t?null:t}for(var a=t,u=r;;){var p=a.return;if(p===null)break;var m=p.alternate;if(m===null){if(u=p.return,u!==null){a=u;continue}break}if(p.child===m.child){for(m=p.child;m;){if(m===a)return d(p),t;if(m===u)return d(p),r;m=m.sibling}throw Error(i(188))}if(a.return!==u.return)a=p,u=m;else{for(var S=!1,A=p.child;A;){if(A===a){S=!0,a=p,u=m;break}if(A===u){S=!0,u=p,a=m;break}A=A.sibling}if(!S){for(A=m.child;A;){if(A===a){S=!0,a=m,u=p;break}if(A===u){S=!0,u=m,a=p;break}A=A.sibling}if(!S)throw Error(i(189))}}if(a.alternate!==u)throw Error(i(190))}if(a.tag!==3)throw Error(i(188));return a.stateNode.current===a?t:r}function y(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t;for(t=t.child;t!==null;){if(r=y(t),r!==null)return r;t=t.sibling}return null}var g=Object.assign,v=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),j=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),re=Symbol.for("react.activity"),H=Symbol.for("react.memo_cache_sentinel"),J=Symbol.iterator;function ne(t){return t===null||typeof t!="object"?null:(t=J&&t[J]||t["@@iterator"],typeof t=="function"?t:null)}var W=Symbol.for("react.client.reference");function Z(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===W?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case C:return"Fragment";case N:return"Profiler";case E:return"StrictMode";case I:return"Suspense";case O:return"SuspenseList";case re:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case k:return"Portal";case j:return t.displayName||"Context";case M:return(t._context.displayName||"Context")+".Consumer";case D:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case P:return r=t.displayName||null,r!==null?r:Z(t.type)||"Memo";case q:r=t._payload,t=t._init;try{return Z(t(r))}catch{}}return null}var Q=Array.isArray,B=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le={pending:!1,data:null,method:null,action:null},de=[],R=-1;function z(t){return{current:t}}function L(t){0>R||(t.current=de[R],de[R]=null,R--)}function T(t,r){R++,de[R]=t.current,t.current=r}var se=z(null),ce=z(null),ue=z(null),we=z(null);function Ae(t,r){switch(T(ue,r),T(ce,t),T(se,null),r.nodeType){case 9:case 11:t=(t=r.documentElement)&&(t=t.namespaceURI)?Ux(t):0;break;default:if(t=r.tagName,r=r.namespaceURI)r=Ux(r),t=Hx(r,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}L(se),T(se,t)}function xe(){L(se),L(ce),L(ue)}function Ne(t){t.memoizedState!==null&&T(we,t);var r=se.current,a=Hx(r,t.type);r!==a&&(T(ce,t),T(se,a))}function rt(t){ce.current===t&&(L(se),L(ce)),we.current===t&&(L(we),lo._currentValue=le)}var tt,at;function Ye(t){if(tt===void 0)try{throw Error()}catch(a){var r=a.stack.trim().match(/\n( *(at )?)/);tt=r&&r[1]||"",at=-1<a.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+tt+t+at}var Dt=!1;function _t(t,r){if(!t||Dt)return"";Dt=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(r){var ae=function(){throw Error()};if(Object.defineProperty(ae.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ae,[])}catch(K){var X=K}Reflect.construct(t,[],ae)}else{try{ae.call()}catch(K){X=K}t.call(ae.prototype)}}else{try{throw Error()}catch(K){X=K}(ae=t())&&typeof ae.catch=="function"&&ae.catch(function(){})}}catch(K){if(K&&X&&typeof K.stack=="string")return[K.stack,X.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=u.DetermineComponentFrameRoot(),S=m[0],A=m[1];if(S&&A){var _=S.split(`
|
|
44
|
+
`),G=A.split(`
|
|
45
|
+
`);for(p=u=0;u<_.length&&!_[u].includes("DetermineComponentFrameRoot");)u++;for(;p<G.length&&!G[p].includes("DetermineComponentFrameRoot");)p++;if(u===_.length||p===G.length)for(u=_.length-1,p=G.length-1;1<=u&&0<=p&&_[u]!==G[p];)p--;for(;1<=u&&0<=p;u--,p--)if(_[u]!==G[p]){if(u!==1||p!==1)do if(u--,p--,0>p||_[u]!==G[p]){var ee=`
|
|
46
|
+
`+_[u].replace(" at new "," at ");return t.displayName&&ee.includes("<anonymous>")&&(ee=ee.replace("<anonymous>",t.displayName)),ee}while(1<=u&&0<=p);break}}}finally{Dt=!1,Error.prepareStackTrace=a}return(a=t?t.displayName||t.name:"")?Ye(a):""}function Fn(t,r){switch(t.tag){case 26:case 27:case 5:return Ye(t.type);case 16:return Ye("Lazy");case 13:return t.child!==r&&r!==null?Ye("Suspense Fallback"):Ye("Suspense");case 19:return Ye("SuspenseList");case 0:case 15:return _t(t.type,!1);case 11:return _t(t.type.render,!1);case 1:return _t(t.type,!0);case 31:return Ye("Activity");default:return""}}function Vn(t){try{var r="",a=null;do r+=Fn(t,a),a=t,t=t.return;while(t);return r}catch(u){return`
|
|
47
|
+
Error generating stack: `+u.message+`
|
|
48
|
+
`+u.stack}}var zt=Object.prototype.hasOwnProperty,Lt=e.unstable_scheduleCallback,Nn=e.unstable_cancelCallback,lr=e.unstable_shouldYield,$r=e.unstable_requestPaint,ft=e.unstable_now,Xr=e.unstable_getCurrentPriorityLevel,te=e.unstable_ImmediatePriority,$=e.unstable_UserBlockingPriority,oe=e.unstable_NormalPriority,he=e.unstable_LowPriority,be=e.unstable_IdlePriority,Oe=e.log,dn=e.unstable_setDisableYieldValue,Bt=null,dt=null;function Tt(t){if(typeof Oe=="function"&&dn(t),dt&&typeof dt.setStrictMode=="function")try{dt.setStrictMode(Bt,t)}catch{}}var $e=Math.clz32?Math.clz32:Mc,ir=Math.log,Zt=Math.LN2;function Mc(t){return t>>>=0,t===0?32:31-(ir(t)/Zt|0)|0}var ui=256,ci=262144,ht=4194304;function pt(t){var r=t&42;if(r!==0)return r;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Rt(t,r,a){var u=t.pendingLanes;if(u===0)return 0;var p=0,m=t.suspendedLanes,S=t.pingedLanes;t=t.warmLanes;var A=u&134217727;return A!==0?(u=A&~m,u!==0?p=pt(u):(S&=A,S!==0?p=pt(S):a||(a=A&~t,a!==0&&(p=pt(a))))):(A=u&~m,A!==0?p=pt(A):S!==0?p=pt(S):a||(a=u&~t,a!==0&&(p=pt(a)))),p===0?0:r!==0&&r!==p&&(r&m)===0&&(m=p&-p,a=r&-r,m>=a||m===32&&(a&4194048)!==0)?r:p}function Jt(t,r){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&r)===0}function Wt(t,r){switch(t){case 1:case 2:case 4:case 8:case 64:return r+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 r+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 Ft(){var t=ht;return ht<<=1,(ht&62914560)===0&&(ht=4194304),t}function en(t){for(var r=[],a=0;31>a;a++)r.push(t);return r}function An(t,r){t.pendingLanes|=r,r!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function St(t,r,a,u,p,m){var S=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var A=t.entanglements,_=t.expirationTimes,G=t.hiddenUpdates;for(a=S&~a;0<a;){var ee=31-$e(a),ae=1<<ee;A[ee]=0,_[ee]=-1;var X=G[ee];if(X!==null)for(G[ee]=null,ee=0;ee<X.length;ee++){var K=X[ee];K!==null&&(K.lane&=-536870913)}a&=~ae}u!==0&&Gn(t,u,0),m!==0&&p===0&&t.tag!==0&&(t.suspendedLanes|=m&~(S&~r))}function Gn(t,r,a){t.pendingLanes|=r,t.suspendedLanes&=~r;var u=31-$e(r);t.entangledLanes|=r,t.entanglements[u]=t.entanglements[u]|1073741824|a&261930}function hn(t,r){var a=t.entangledLanes|=r;for(t=t.entanglements;a;){var u=31-$e(a),p=1<<u;p&r|t[u]&r&&(t[u]|=r),a&=~p}}function Tn(t,r){var a=r&-r;return a=(a&42)!==0?1:br(a),(a&(t.suspendedLanes|r))!==0?0:a}function br(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function wr(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Yn(){var t=Y.p;return t!==0?t:(t=window.event,t===void 0?32:sv(t.type))}function Qr(t,r){var a=Y.p;try{return Y.p=t,r()}finally{Y.p=a}}var Rn=Math.random().toString(36).slice(2),Ut="__reactFiber$"+Rn,tn="__reactProps$"+Rn,fi="__reactContainer$"+Rn,Oc="__reactEvents$"+Rn,Q2="__reactListeners$"+Rn,K2="__reactHandles$"+Rn,Em="__reactResources$"+Rn,va="__reactMarker$"+Rn;function Dc(t){delete t[Ut],delete t[tn],delete t[Oc],delete t[Q2],delete t[K2]}function di(t){var r=t[Ut];if(r)return r;for(var a=t.parentNode;a;){if(r=a[fi]||a[Ut]){if(a=r.alternate,r.child!==null||a!==null&&a.child!==null)for(t=Yx(t);t!==null;){if(a=t[Ut])return a;t=Yx(t)}return r}t=a,a=t.parentNode}return null}function hi(t){if(t=t[Ut]||t[fi]){var r=t.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return t}return null}function ba(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t.stateNode;throw Error(i(33))}function pi(t){var r=t[Em];return r||(r=t[Em]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function jt(t){t[va]=!0}var Nm=new Set,Am={};function zl(t,r){mi(t,r),mi(t+"Capture",r)}function mi(t,r){for(Am[t]=r,t=0;t<r.length;t++)Nm.add(r[t])}var Z2=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]*$"),Tm={},Rm={};function J2(t){return zt.call(Rm,t)?!0:zt.call(Tm,t)?!1:Z2.test(t)?Rm[t]=!0:(Tm[t]=!0,!1)}function Ko(t,r,a){if(J2(r))if(a===null)t.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":t.removeAttribute(r);return;case"boolean":var u=r.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){t.removeAttribute(r);return}}t.setAttribute(r,""+a)}}function Zo(t,r,a){if(a===null)t.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(r);return}t.setAttribute(r,""+a)}}function Sr(t,r,a,u){if(u===null)t.removeAttribute(a);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttributeNS(r,a,""+u)}}function jn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function jm(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function W2(t,r,a){var u=Object.getOwnPropertyDescriptor(t.constructor.prototype,r);if(!t.hasOwnProperty(r)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var p=u.get,m=u.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return p.call(this)},set:function(S){a=""+S,m.call(this,S)}}),Object.defineProperty(t,r,{enumerable:u.enumerable}),{getValue:function(){return a},setValue:function(S){a=""+S},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function _c(t){if(!t._valueTracker){var r=jm(t)?"checked":"value";t._valueTracker=W2(t,r,""+t[r])}}function Mm(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var a=r.getValue(),u="";return t&&(u=jm(t)?t.checked?"true":"false":t.value),t=u,t!==a?(r.setValue(t),!0):!1}function Jo(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var eC=/[\n"\\]/g;function Mn(t){return t.replace(eC,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function zc(t,r,a,u,p,m,S,A){t.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?t.type=S:t.removeAttribute("type"),r!=null?S==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+jn(r)):t.value!==""+jn(r)&&(t.value=""+jn(r)):S!=="submit"&&S!=="reset"||t.removeAttribute("value"),r!=null?Lc(t,S,jn(r)):a!=null?Lc(t,S,jn(a)):u!=null&&t.removeAttribute("value"),p==null&&m!=null&&(t.defaultChecked=!!m),p!=null&&(t.checked=p&&typeof p!="function"&&typeof p!="symbol"),A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?t.name=""+jn(A):t.removeAttribute("name")}function Om(t,r,a,u,p,m,S,A){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(t.type=m),r!=null||a!=null){if(!(m!=="submit"&&m!=="reset"||r!=null)){_c(t);return}a=a!=null?""+jn(a):"",r=r!=null?""+jn(r):a,A||r===t.value||(t.value=r),t.defaultValue=r}u=u??p,u=typeof u!="function"&&typeof u!="symbol"&&!!u,t.checked=A?t.checked:!!u,t.defaultChecked=!!u,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(t.name=S),_c(t)}function Lc(t,r,a){r==="number"&&Jo(t.ownerDocument)===t||t.defaultValue===""+a||(t.defaultValue=""+a)}function gi(t,r,a,u){if(t=t.options,r){r={};for(var p=0;p<a.length;p++)r["$"+a[p]]=!0;for(a=0;a<t.length;a++)p=r.hasOwnProperty("$"+t[a].value),t[a].selected!==p&&(t[a].selected=p),p&&u&&(t[a].defaultSelected=!0)}else{for(a=""+jn(a),r=null,p=0;p<t.length;p++){if(t[p].value===a){t[p].selected=!0,u&&(t[p].defaultSelected=!0);return}r!==null||t[p].disabled||(r=t[p])}r!==null&&(r.selected=!0)}}function Dm(t,r,a){if(r!=null&&(r=""+jn(r),r!==t.value&&(t.value=r),a==null)){t.defaultValue!==r&&(t.defaultValue=r);return}t.defaultValue=a!=null?""+jn(a):""}function _m(t,r,a,u){if(r==null){if(u!=null){if(a!=null)throw Error(i(92));if(Q(u)){if(1<u.length)throw Error(i(93));u=u[0]}a=u}a==null&&(a=""),r=a}a=jn(r),t.defaultValue=a,u=t.textContent,u===a&&u!==""&&u!==null&&(t.value=u),_c(t)}function yi(t,r){if(r){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=r;return}}t.textContent=r}var tC=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 zm(t,r,a){var u=r.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?u?t.setProperty(r,""):r==="float"?t.cssFloat="":t[r]="":u?t.setProperty(r,a):typeof a!="number"||a===0||tC.has(r)?r==="float"?t.cssFloat=a:t[r]=(""+a).trim():t[r]=a+"px"}function Lm(t,r,a){if(r!=null&&typeof r!="object")throw Error(i(62));if(t=t.style,a!=null){for(var u in a)!a.hasOwnProperty(u)||r!=null&&r.hasOwnProperty(u)||(u.indexOf("--")===0?t.setProperty(u,""):u==="float"?t.cssFloat="":t[u]="");for(var p in r)u=r[p],r.hasOwnProperty(p)&&a[p]!==u&&zm(t,p,u)}else for(var m in r)r.hasOwnProperty(m)&&zm(t,m,r[m])}function Bc(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var nC=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"]]),rC=/^[\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 Wo(t){return rC.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Cr(){}var Uc=null;function Hc(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var xi=null,vi=null;function Bm(t){var r=hi(t);if(r&&(t=r.stateNode)){var a=t[tn]||null;e:switch(t=r.stateNode,r.type){case"input":if(zc(t,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),r=a.name,a.type==="radio"&&r!=null){for(a=t;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Mn(""+r)+'"][type="radio"]'),r=0;r<a.length;r++){var u=a[r];if(u!==t&&u.form===t.form){var p=u[tn]||null;if(!p)throw Error(i(90));zc(u,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(r=0;r<a.length;r++)u=a[r],u.form===t.form&&Mm(u)}break e;case"textarea":Dm(t,a.value,a.defaultValue);break e;case"select":r=a.value,r!=null&&gi(t,!!a.multiple,r,!1)}}}var Pc=!1;function Um(t,r,a){if(Pc)return t(r,a);Pc=!0;try{var u=t(r);return u}finally{if(Pc=!1,(xi!==null||vi!==null)&&(Ps(),xi&&(r=xi,t=vi,vi=xi=null,Bm(r),t)))for(r=0;r<t.length;r++)Bm(t[r])}}function wa(t,r){var a=t.stateNode;if(a===null)return null;var u=a[tn]||null;if(u===null)return null;a=u[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(t=t.type,u=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!u;break e;default:t=!1}if(t)return null;if(a&&typeof a!="function")throw Error(i(231,r,typeof a));return a}var kr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ic=!1;if(kr)try{var Sa={};Object.defineProperty(Sa,"passive",{get:function(){Ic=!0}}),window.addEventListener("test",Sa,Sa),window.removeEventListener("test",Sa,Sa)}catch{Ic=!1}var Kr=null,qc=null,es=null;function Hm(){if(es)return es;var t,r=qc,a=r.length,u,p="value"in Kr?Kr.value:Kr.textContent,m=p.length;for(t=0;t<a&&r[t]===p[t];t++);var S=a-t;for(u=1;u<=S&&r[a-u]===p[m-u];u++);return es=p.slice(t,1<u?1-u:void 0)}function ts(t){var r=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&r===13&&(t=13)):t=r,t===10&&(t=13),32<=t||t===13?t:0}function ns(){return!0}function Pm(){return!1}function nn(t){function r(a,u,p,m,S){this._reactName=a,this._targetInst=p,this.type=u,this.nativeEvent=m,this.target=S,this.currentTarget=null;for(var A in t)t.hasOwnProperty(A)&&(a=t[A],this[A]=a?a(m):m[A]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?ns:Pm,this.isPropagationStopped=Pm,this}return g(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=ns)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=ns)},persist:function(){},isPersistent:ns}),r}var Ll={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},rs=nn(Ll),Ca=g({},Ll,{view:0,detail:0}),lC=nn(Ca),Fc,Vc,ka,ls=g({},Ca,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Yc,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==ka&&(ka&&t.type==="mousemove"?(Fc=t.screenX-ka.screenX,Vc=t.screenY-ka.screenY):Vc=Fc=0,ka=t),Fc)},movementY:function(t){return"movementY"in t?t.movementY:Vc}}),Im=nn(ls),iC=g({},ls,{dataTransfer:0}),aC=nn(iC),oC=g({},Ca,{relatedTarget:0}),Gc=nn(oC),sC=g({},Ll,{animationName:0,elapsedTime:0,pseudoElement:0}),uC=nn(sC),cC=g({},Ll,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),fC=nn(cC),dC=g({},Ll,{data:0}),qm=nn(dC),hC={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pC={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"},mC={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function gC(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=mC[t])?!!r[t]:!1}function Yc(){return gC}var yC=g({},Ca,{key:function(t){if(t.key){var r=hC[t.key]||t.key;if(r!=="Unidentified")return r}return t.type==="keypress"?(t=ts(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?pC[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Yc,charCode:function(t){return t.type==="keypress"?ts(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?ts(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),xC=nn(yC),vC=g({},ls,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Fm=nn(vC),bC=g({},Ca,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Yc}),wC=nn(bC),SC=g({},Ll,{propertyName:0,elapsedTime:0,pseudoElement:0}),CC=nn(SC),kC=g({},ls,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),EC=nn(kC),NC=g({},Ll,{newState:0,oldState:0}),AC=nn(NC),TC=[9,13,27,32],$c=kr&&"CompositionEvent"in window,Ea=null;kr&&"documentMode"in document&&(Ea=document.documentMode);var RC=kr&&"TextEvent"in window&&!Ea,Vm=kr&&(!$c||Ea&&8<Ea&&11>=Ea),Gm=" ",Ym=!1;function $m(t,r){switch(t){case"keyup":return TC.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Xm(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var bi=!1;function jC(t,r){switch(t){case"compositionend":return Xm(r);case"keypress":return r.which!==32?null:(Ym=!0,Gm);case"textInput":return t=r.data,t===Gm&&Ym?null:t;default:return null}}function MC(t,r){if(bi)return t==="compositionend"||!$c&&$m(t,r)?(t=Hm(),es=qc=Kr=null,bi=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Vm&&r.locale!=="ko"?null:r.data;default:return null}}var OC={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 Qm(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!OC[t.type]:r==="textarea"}function Km(t,r,a,u){xi?vi?vi.push(u):vi=[u]:xi=u,r=$s(r,"onChange"),0<r.length&&(a=new rs("onChange","change",null,a,u),t.push({event:a,listeners:r}))}var Na=null,Aa=null;function DC(t){Ox(t,0)}function is(t){var r=ba(t);if(Mm(r))return t}function Zm(t,r){if(t==="change")return r}var Jm=!1;if(kr){var Xc;if(kr){var Qc="oninput"in document;if(!Qc){var Wm=document.createElement("div");Wm.setAttribute("oninput","return;"),Qc=typeof Wm.oninput=="function"}Xc=Qc}else Xc=!1;Jm=Xc&&(!document.documentMode||9<document.documentMode)}function eg(){Na&&(Na.detachEvent("onpropertychange",tg),Aa=Na=null)}function tg(t){if(t.propertyName==="value"&&is(Aa)){var r=[];Km(r,Aa,t,Hc(t)),Um(DC,r)}}function _C(t,r,a){t==="focusin"?(eg(),Na=r,Aa=a,Na.attachEvent("onpropertychange",tg)):t==="focusout"&&eg()}function zC(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return is(Aa)}function LC(t,r){if(t==="click")return is(r)}function BC(t,r){if(t==="input"||t==="change")return is(r)}function UC(t,r){return t===r&&(t!==0||1/t===1/r)||t!==t&&r!==r}var pn=typeof Object.is=="function"?Object.is:UC;function Ta(t,r){if(pn(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;var a=Object.keys(t),u=Object.keys(r);if(a.length!==u.length)return!1;for(u=0;u<a.length;u++){var p=a[u];if(!zt.call(r,p)||!pn(t[p],r[p]))return!1}return!0}function ng(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function rg(t,r){var a=ng(t);t=0;for(var u;a;){if(a.nodeType===3){if(u=t+a.textContent.length,t<=r&&u>=r)return{node:a,offset:r-t};t=u}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=ng(a)}}function lg(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?lg(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function ig(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var r=Jo(t.document);r instanceof t.HTMLIFrameElement;){try{var a=typeof r.contentWindow.location.href=="string"}catch{a=!1}if(a)t=r.contentWindow;else break;r=Jo(t.document)}return r}function Kc(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}var HC=kr&&"documentMode"in document&&11>=document.documentMode,wi=null,Zc=null,Ra=null,Jc=!1;function ag(t,r,a){var u=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Jc||wi==null||wi!==Jo(u)||(u=wi,"selectionStart"in u&&Kc(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Ra&&Ta(Ra,u)||(Ra=u,u=$s(Zc,"onSelect"),0<u.length&&(r=new rs("onSelect","select",null,r,a),t.push({event:r,listeners:u}),r.target=wi)))}function Bl(t,r){var a={};return a[t.toLowerCase()]=r.toLowerCase(),a["Webkit"+t]="webkit"+r,a["Moz"+t]="moz"+r,a}var Si={animationend:Bl("Animation","AnimationEnd"),animationiteration:Bl("Animation","AnimationIteration"),animationstart:Bl("Animation","AnimationStart"),transitionrun:Bl("Transition","TransitionRun"),transitionstart:Bl("Transition","TransitionStart"),transitioncancel:Bl("Transition","TransitionCancel"),transitionend:Bl("Transition","TransitionEnd")},Wc={},og={};kr&&(og=document.createElement("div").style,"AnimationEvent"in window||(delete Si.animationend.animation,delete Si.animationiteration.animation,delete Si.animationstart.animation),"TransitionEvent"in window||delete Si.transitionend.transition);function Ul(t){if(Wc[t])return Wc[t];if(!Si[t])return t;var r=Si[t],a;for(a in r)if(r.hasOwnProperty(a)&&a in og)return Wc[t]=r[a];return t}var sg=Ul("animationend"),ug=Ul("animationiteration"),cg=Ul("animationstart"),PC=Ul("transitionrun"),IC=Ul("transitionstart"),qC=Ul("transitioncancel"),fg=Ul("transitionend"),dg=new Map,ef="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(" ");ef.push("scrollEnd");function $n(t,r){dg.set(t,r),zl(r,[t])}var as=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},On=[],Ci=0,tf=0;function os(){for(var t=Ci,r=tf=Ci=0;r<t;){var a=On[r];On[r++]=null;var u=On[r];On[r++]=null;var p=On[r];On[r++]=null;var m=On[r];if(On[r++]=null,u!==null&&p!==null){var S=u.pending;S===null?p.next=p:(p.next=S.next,S.next=p),u.pending=p}m!==0&&hg(a,p,m)}}function ss(t,r,a,u){On[Ci++]=t,On[Ci++]=r,On[Ci++]=a,On[Ci++]=u,tf|=u,t.lanes|=u,t=t.alternate,t!==null&&(t.lanes|=u)}function nf(t,r,a,u){return ss(t,r,a,u),us(t)}function Hl(t,r){return ss(t,null,null,r),us(t)}function hg(t,r,a){t.lanes|=a;var u=t.alternate;u!==null&&(u.lanes|=a);for(var p=!1,m=t.return;m!==null;)m.childLanes|=a,u=m.alternate,u!==null&&(u.childLanes|=a),m.tag===22&&(t=m.stateNode,t===null||t._visibility&1||(p=!0)),t=m,m=m.return;return t.tag===3?(m=t.stateNode,p&&r!==null&&(p=31-$e(a),t=m.hiddenUpdates,u=t[p],u===null?t[p]=[r]:u.push(r),r.lane=a|536870912),m):null}function us(t){if(50<Za)throw Za=0,dd=null,Error(i(185));for(var r=t.return;r!==null;)t=r,r=t.return;return t.tag===3?t.stateNode:null}var ki={};function FC(t,r,a,u){this.tag=t,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function mn(t,r,a,u){return new FC(t,r,a,u)}function rf(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Er(t,r){var a=t.alternate;return a===null?(a=mn(t.tag,r,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a.alternate=t,t.alternate=a):(a.pendingProps=r,a.type=t.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=t.flags&65011712,a.childLanes=t.childLanes,a.lanes=t.lanes,a.child=t.child,a.memoizedProps=t.memoizedProps,a.memoizedState=t.memoizedState,a.updateQueue=t.updateQueue,r=t.dependencies,a.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a.refCleanup=t.refCleanup,a}function pg(t,r){t.flags&=65011714;var a=t.alternate;return a===null?(t.childLanes=0,t.lanes=r,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=a.childLanes,t.lanes=a.lanes,t.child=a.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=a.memoizedProps,t.memoizedState=a.memoizedState,t.updateQueue=a.updateQueue,t.type=a.type,r=a.dependencies,t.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),t}function cs(t,r,a,u,p,m){var S=0;if(u=t,typeof t=="function")rf(t)&&(S=1);else if(typeof t=="string")S=Xk(t,a,se.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case re:return t=mn(31,a,r,p),t.elementType=re,t.lanes=m,t;case C:return Pl(a.children,p,m,r);case E:S=8,p|=24;break;case N:return t=mn(12,a,r,p|2),t.elementType=N,t.lanes=m,t;case I:return t=mn(13,a,r,p),t.elementType=I,t.lanes=m,t;case O:return t=mn(19,a,r,p),t.elementType=O,t.lanes=m,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case j:S=10;break e;case M:S=9;break e;case D:S=11;break e;case P:S=14;break e;case q:S=16,u=null;break e}S=29,a=Error(i(130,t===null?"null":typeof t,"")),u=null}return r=mn(S,a,r,p),r.elementType=t,r.type=u,r.lanes=m,r}function Pl(t,r,a,u){return t=mn(7,t,u,r),t.lanes=a,t}function lf(t,r,a){return t=mn(6,t,null,r),t.lanes=a,t}function mg(t){var r=mn(18,null,null,0);return r.stateNode=t,r}function af(t,r,a){return r=mn(4,t.children!==null?t.children:[],t.key,r),r.lanes=a,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}var gg=new WeakMap;function Dn(t,r){if(typeof t=="object"&&t!==null){var a=gg.get(t);return a!==void 0?a:(r={value:t,source:r,stack:Vn(r)},gg.set(t,r),r)}return{value:t,source:r,stack:Vn(r)}}var Ei=[],Ni=0,fs=null,ja=0,_n=[],zn=0,Zr=null,ar=1,or="";function Nr(t,r){Ei[Ni++]=ja,Ei[Ni++]=fs,fs=t,ja=r}function yg(t,r,a){_n[zn++]=ar,_n[zn++]=or,_n[zn++]=Zr,Zr=t;var u=ar;t=or;var p=32-$e(u)-1;u&=~(1<<p),a+=1;var m=32-$e(r)+p;if(30<m){var S=p-p%5;m=(u&(1<<S)-1).toString(32),u>>=S,p-=S,ar=1<<32-$e(r)+p|a<<p|u,or=m+t}else ar=1<<m|a<<p|u,or=t}function of(t){t.return!==null&&(Nr(t,1),yg(t,1,0))}function sf(t){for(;t===fs;)fs=Ei[--Ni],Ei[Ni]=null,ja=Ei[--Ni],Ei[Ni]=null;for(;t===Zr;)Zr=_n[--zn],_n[zn]=null,or=_n[--zn],_n[zn]=null,ar=_n[--zn],_n[zn]=null}function xg(t,r){_n[zn++]=ar,_n[zn++]=or,_n[zn++]=Zr,ar=r.id,or=r.overflow,Zr=t}var Ht=null,lt=null,He=!1,Jr=null,Ln=!1,uf=Error(i(519));function Wr(t){var r=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ma(Dn(r,t)),uf}function vg(t){var r=t.stateNode,a=t.type,u=t.memoizedProps;switch(r[Ut]=t,r[tn]=u,a){case"dialog":ze("cancel",r),ze("close",r);break;case"iframe":case"object":case"embed":ze("load",r);break;case"video":case"audio":for(a=0;a<Wa.length;a++)ze(Wa[a],r);break;case"source":ze("error",r);break;case"img":case"image":case"link":ze("error",r),ze("load",r);break;case"details":ze("toggle",r);break;case"input":ze("invalid",r),Om(r,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":ze("invalid",r);break;case"textarea":ze("invalid",r),_m(r,u.value,u.defaultValue,u.children)}a=u.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||r.textContent===""+a||u.suppressHydrationWarning===!0||Lx(r.textContent,a)?(u.popover!=null&&(ze("beforetoggle",r),ze("toggle",r)),u.onScroll!=null&&ze("scroll",r),u.onScrollEnd!=null&&ze("scrollend",r),u.onClick!=null&&(r.onclick=Cr),r=!0):r=!1,r||Wr(t,!0)}function bg(t){for(Ht=t.return;Ht;)switch(Ht.tag){case 5:case 31:case 13:Ln=!1;return;case 27:case 3:Ln=!0;return;default:Ht=Ht.return}}function Ai(t){if(t!==Ht)return!1;if(!He)return bg(t),He=!0,!1;var r=t.tag,a;if((a=r!==3&&r!==27)&&((a=r===5)&&(a=t.type,a=!(a!=="form"&&a!=="button")||Ad(t.type,t.memoizedProps)),a=!a),a&<&&Wr(t),bg(t),r===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(i(317));lt=Gx(t)}else if(r===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(i(317));lt=Gx(t)}else r===27?(r=lt,hl(t.type)?(t=Od,Od=null,lt=t):lt=r):lt=Ht?Un(t.stateNode.nextSibling):null;return!0}function Il(){lt=Ht=null,He=!1}function cf(){var t=Jr;return t!==null&&(on===null?on=t:on.push.apply(on,t),Jr=null),t}function Ma(t){Jr===null?Jr=[t]:Jr.push(t)}var ff=z(null),ql=null,Ar=null;function el(t,r,a){T(ff,r._currentValue),r._currentValue=a}function Tr(t){t._currentValue=ff.current,L(ff)}function df(t,r,a){for(;t!==null;){var u=t.alternate;if((t.childLanes&r)!==r?(t.childLanes|=r,u!==null&&(u.childLanes|=r)):u!==null&&(u.childLanes&r)!==r&&(u.childLanes|=r),t===a)break;t=t.return}}function hf(t,r,a,u){var p=t.child;for(p!==null&&(p.return=t);p!==null;){var m=p.dependencies;if(m!==null){var S=p.child;m=m.firstContext;e:for(;m!==null;){var A=m;m=p;for(var _=0;_<r.length;_++)if(A.context===r[_]){m.lanes|=a,A=m.alternate,A!==null&&(A.lanes|=a),df(m.return,a,t),u||(S=null);break e}m=A.next}}else if(p.tag===18){if(S=p.return,S===null)throw Error(i(341));S.lanes|=a,m=S.alternate,m!==null&&(m.lanes|=a),df(S,a,t),S=null}else S=p.child;if(S!==null)S.return=p;else for(S=p;S!==null;){if(S===t){S=null;break}if(p=S.sibling,p!==null){p.return=S.return,S=p;break}S=S.return}p=S}}function Ti(t,r,a,u){t=null;for(var p=r,m=!1;p!==null;){if(!m){if((p.flags&524288)!==0)m=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var S=p.alternate;if(S===null)throw Error(i(387));if(S=S.memoizedProps,S!==null){var A=p.type;pn(p.pendingProps.value,S.value)||(t!==null?t.push(A):t=[A])}}else if(p===we.current){if(S=p.alternate,S===null)throw Error(i(387));S.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(t!==null?t.push(lo):t=[lo])}p=p.return}t!==null&&hf(r,t,a,u),r.flags|=262144}function ds(t){for(t=t.firstContext;t!==null;){if(!pn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Fl(t){ql=t,Ar=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Pt(t){return wg(ql,t)}function hs(t,r){return ql===null&&Fl(t),wg(t,r)}function wg(t,r){var a=r._currentValue;if(r={context:r,memoizedValue:a,next:null},Ar===null){if(t===null)throw Error(i(308));Ar=r,t.dependencies={lanes:0,firstContext:r},t.flags|=524288}else Ar=Ar.next=r;return a}var VC=typeof AbortController<"u"?AbortController:function(){var t=[],r=this.signal={aborted:!1,addEventListener:function(a,u){t.push(u)}};this.abort=function(){r.aborted=!0,t.forEach(function(a){return a()})}},GC=e.unstable_scheduleCallback,YC=e.unstable_NormalPriority,yt={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function pf(){return{controller:new VC,data:new Map,refCount:0}}function Oa(t){t.refCount--,t.refCount===0&&GC(YC,function(){t.controller.abort()})}var Da=null,mf=0,Ri=0,ji=null;function $C(t,r){if(Da===null){var a=Da=[];mf=0,Ri=xd(),ji={status:"pending",value:void 0,then:function(u){a.push(u)}}}return mf++,r.then(Sg,Sg),r}function Sg(){if(--mf===0&&Da!==null){ji!==null&&(ji.status="fulfilled");var t=Da;Da=null,Ri=0,ji=null;for(var r=0;r<t.length;r++)(0,t[r])()}}function XC(t,r){var a=[],u={status:"pending",value:null,reason:null,then:function(p){a.push(p)}};return t.then(function(){u.status="fulfilled",u.value=r;for(var p=0;p<a.length;p++)(0,a[p])(r)},function(p){for(u.status="rejected",u.reason=p,p=0;p<a.length;p++)(0,a[p])(void 0)}),u}var Cg=B.S;B.S=function(t,r){ax=ft(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&$C(t,r),Cg!==null&&Cg(t,r)};var Vl=z(null);function gf(){var t=Vl.current;return t!==null?t:We.pooledCache}function ps(t,r){r===null?T(Vl,Vl.current):T(Vl,r.pool)}function kg(){var t=gf();return t===null?null:{parent:yt._currentValue,pool:t}}var Mi=Error(i(460)),yf=Error(i(474)),ms=Error(i(542)),gs={then:function(){}};function Eg(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Ng(t,r,a){switch(a=t[a],a===void 0?t.push(r):a!==r&&(r.then(Cr,Cr),r=a),r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,Tg(t),t;default:if(typeof r.status=="string")r.then(Cr,Cr);else{if(t=We,t!==null&&100<t.shellSuspendCounter)throw Error(i(482));t=r,t.status="pending",t.then(function(u){if(r.status==="pending"){var p=r;p.status="fulfilled",p.value=u}},function(u){if(r.status==="pending"){var p=r;p.status="rejected",p.reason=u}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,Tg(t),t}throw Yl=r,Mi}}function Gl(t){try{var r=t._init;return r(t._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Yl=a,Mi):a}}var Yl=null;function Ag(){if(Yl===null)throw Error(i(459));var t=Yl;return Yl=null,t}function Tg(t){if(t===Mi||t===ms)throw Error(i(483))}var Oi=null,_a=0;function ys(t){var r=_a;return _a+=1,Oi===null&&(Oi=[]),Ng(Oi,t,r)}function za(t,r){r=r.props.ref,t.ref=r!==void 0?r:null}function xs(t,r){throw r.$$typeof===v?Error(i(525)):(t=Object.prototype.toString.call(r),Error(i(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t)))}function Rg(t){function r(F,U){if(t){var V=F.deletions;V===null?(F.deletions=[U],F.flags|=16):V.push(U)}}function a(F,U){if(!t)return null;for(;U!==null;)r(F,U),U=U.sibling;return null}function u(F){for(var U=new Map;F!==null;)F.key!==null?U.set(F.key,F):U.set(F.index,F),F=F.sibling;return U}function p(F,U){return F=Er(F,U),F.index=0,F.sibling=null,F}function m(F,U,V){return F.index=V,t?(V=F.alternate,V!==null?(V=V.index,V<U?(F.flags|=67108866,U):V):(F.flags|=67108866,U)):(F.flags|=1048576,U)}function S(F){return t&&F.alternate===null&&(F.flags|=67108866),F}function A(F,U,V,ie){return U===null||U.tag!==6?(U=lf(V,F.mode,ie),U.return=F,U):(U=p(U,V),U.return=F,U)}function _(F,U,V,ie){var Se=V.type;return Se===C?ee(F,U,V.props.children,ie,V.key):U!==null&&(U.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===q&&Gl(Se)===U.type)?(U=p(U,V.props),za(U,V),U.return=F,U):(U=cs(V.type,V.key,V.props,null,F.mode,ie),za(U,V),U.return=F,U)}function G(F,U,V,ie){return U===null||U.tag!==4||U.stateNode.containerInfo!==V.containerInfo||U.stateNode.implementation!==V.implementation?(U=af(V,F.mode,ie),U.return=F,U):(U=p(U,V.children||[]),U.return=F,U)}function ee(F,U,V,ie,Se){return U===null||U.tag!==7?(U=Pl(V,F.mode,ie,Se),U.return=F,U):(U=p(U,V),U.return=F,U)}function ae(F,U,V){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return U=lf(""+U,F.mode,V),U.return=F,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case b:return V=cs(U.type,U.key,U.props,null,F.mode,V),za(V,U),V.return=F,V;case k:return U=af(U,F.mode,V),U.return=F,U;case q:return U=Gl(U),ae(F,U,V)}if(Q(U)||ne(U))return U=Pl(U,F.mode,V,null),U.return=F,U;if(typeof U.then=="function")return ae(F,ys(U),V);if(U.$$typeof===j)return ae(F,hs(F,U),V);xs(F,U)}return null}function X(F,U,V,ie){var Se=U!==null?U.key:null;if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return Se!==null?null:A(F,U,""+V,ie);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case b:return V.key===Se?_(F,U,V,ie):null;case k:return V.key===Se?G(F,U,V,ie):null;case q:return V=Gl(V),X(F,U,V,ie)}if(Q(V)||ne(V))return Se!==null?null:ee(F,U,V,ie,null);if(typeof V.then=="function")return X(F,U,ys(V),ie);if(V.$$typeof===j)return X(F,U,hs(F,V),ie);xs(F,V)}return null}function K(F,U,V,ie,Se){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return F=F.get(V)||null,A(U,F,""+ie,Se);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case b:return F=F.get(ie.key===null?V:ie.key)||null,_(U,F,ie,Se);case k:return F=F.get(ie.key===null?V:ie.key)||null,G(U,F,ie,Se);case q:return ie=Gl(ie),K(F,U,V,ie,Se)}if(Q(ie)||ne(ie))return F=F.get(V)||null,ee(U,F,ie,Se,null);if(typeof ie.then=="function")return K(F,U,V,ys(ie),Se);if(ie.$$typeof===j)return K(F,U,V,hs(U,ie),Se);xs(U,ie)}return null}function pe(F,U,V,ie){for(var Se=null,Ie=null,ve=U,je=U=0,Ue=null;ve!==null&&je<V.length;je++){ve.index>je?(Ue=ve,ve=null):Ue=ve.sibling;var qe=X(F,ve,V[je],ie);if(qe===null){ve===null&&(ve=Ue);break}t&&ve&&qe.alternate===null&&r(F,ve),U=m(qe,U,je),Ie===null?Se=qe:Ie.sibling=qe,Ie=qe,ve=Ue}if(je===V.length)return a(F,ve),He&&Nr(F,je),Se;if(ve===null){for(;je<V.length;je++)ve=ae(F,V[je],ie),ve!==null&&(U=m(ve,U,je),Ie===null?Se=ve:Ie.sibling=ve,Ie=ve);return He&&Nr(F,je),Se}for(ve=u(ve);je<V.length;je++)Ue=K(ve,F,je,V[je],ie),Ue!==null&&(t&&Ue.alternate!==null&&ve.delete(Ue.key===null?je:Ue.key),U=m(Ue,U,je),Ie===null?Se=Ue:Ie.sibling=Ue,Ie=Ue);return t&&ve.forEach(function(xl){return r(F,xl)}),He&&Nr(F,je),Se}function ke(F,U,V,ie){if(V==null)throw Error(i(151));for(var Se=null,Ie=null,ve=U,je=U=0,Ue=null,qe=V.next();ve!==null&&!qe.done;je++,qe=V.next()){ve.index>je?(Ue=ve,ve=null):Ue=ve.sibling;var xl=X(F,ve,qe.value,ie);if(xl===null){ve===null&&(ve=Ue);break}t&&ve&&xl.alternate===null&&r(F,ve),U=m(xl,U,je),Ie===null?Se=xl:Ie.sibling=xl,Ie=xl,ve=Ue}if(qe.done)return a(F,ve),He&&Nr(F,je),Se;if(ve===null){for(;!qe.done;je++,qe=V.next())qe=ae(F,qe.value,ie),qe!==null&&(U=m(qe,U,je),Ie===null?Se=qe:Ie.sibling=qe,Ie=qe);return He&&Nr(F,je),Se}for(ve=u(ve);!qe.done;je++,qe=V.next())qe=K(ve,F,je,qe.value,ie),qe!==null&&(t&&qe.alternate!==null&&ve.delete(qe.key===null?je:qe.key),U=m(qe,U,je),Ie===null?Se=qe:Ie.sibling=qe,Ie=qe);return t&&ve.forEach(function(iE){return r(F,iE)}),He&&Nr(F,je),Se}function Je(F,U,V,ie){if(typeof V=="object"&&V!==null&&V.type===C&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case b:e:{for(var Se=V.key;U!==null;){if(U.key===Se){if(Se=V.type,Se===C){if(U.tag===7){a(F,U.sibling),ie=p(U,V.props.children),ie.return=F,F=ie;break e}}else if(U.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===q&&Gl(Se)===U.type){a(F,U.sibling),ie=p(U,V.props),za(ie,V),ie.return=F,F=ie;break e}a(F,U);break}else r(F,U);U=U.sibling}V.type===C?(ie=Pl(V.props.children,F.mode,ie,V.key),ie.return=F,F=ie):(ie=cs(V.type,V.key,V.props,null,F.mode,ie),za(ie,V),ie.return=F,F=ie)}return S(F);case k:e:{for(Se=V.key;U!==null;){if(U.key===Se)if(U.tag===4&&U.stateNode.containerInfo===V.containerInfo&&U.stateNode.implementation===V.implementation){a(F,U.sibling),ie=p(U,V.children||[]),ie.return=F,F=ie;break e}else{a(F,U);break}else r(F,U);U=U.sibling}ie=af(V,F.mode,ie),ie.return=F,F=ie}return S(F);case q:return V=Gl(V),Je(F,U,V,ie)}if(Q(V))return pe(F,U,V,ie);if(ne(V)){if(Se=ne(V),typeof Se!="function")throw Error(i(150));return V=Se.call(V),ke(F,U,V,ie)}if(typeof V.then=="function")return Je(F,U,ys(V),ie);if(V.$$typeof===j)return Je(F,U,hs(F,V),ie);xs(F,V)}return typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint"?(V=""+V,U!==null&&U.tag===6?(a(F,U.sibling),ie=p(U,V),ie.return=F,F=ie):(a(F,U),ie=lf(V,F.mode,ie),ie.return=F,F=ie),S(F)):a(F,U)}return function(F,U,V,ie){try{_a=0;var Se=Je(F,U,V,ie);return Oi=null,Se}catch(ve){if(ve===Mi||ve===ms)throw ve;var Ie=mn(29,ve,null,F.mode);return Ie.lanes=ie,Ie.return=F,Ie}finally{}}}var $l=Rg(!0),jg=Rg(!1),tl=!1;function xf(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vf(t,r){t=t.updateQueue,r.updateQueue===t&&(r.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function nl(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function rl(t,r,a){var u=t.updateQueue;if(u===null)return null;if(u=u.shared,(Ve&2)!==0){var p=u.pending;return p===null?r.next=r:(r.next=p.next,p.next=r),u.pending=r,r=us(t),hg(t,null,a),r}return ss(t,u,r,a),us(t)}function La(t,r,a){if(r=r.updateQueue,r!==null&&(r=r.shared,(a&4194048)!==0)){var u=r.lanes;u&=t.pendingLanes,a|=u,r.lanes=a,hn(t,a)}}function bf(t,r){var a=t.updateQueue,u=t.alternate;if(u!==null&&(u=u.updateQueue,a===u)){var p=null,m=null;if(a=a.firstBaseUpdate,a!==null){do{var S={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};m===null?p=m=S:m=m.next=S,a=a.next}while(a!==null);m===null?p=m=r:m=m.next=r}else p=m=r;a={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:m,shared:u.shared,callbacks:u.callbacks},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=r:t.next=r,a.lastBaseUpdate=r}var wf=!1;function Ba(){if(wf){var t=ji;if(t!==null)throw t}}function Ua(t,r,a,u){wf=!1;var p=t.updateQueue;tl=!1;var m=p.firstBaseUpdate,S=p.lastBaseUpdate,A=p.shared.pending;if(A!==null){p.shared.pending=null;var _=A,G=_.next;_.next=null,S===null?m=G:S.next=G,S=_;var ee=t.alternate;ee!==null&&(ee=ee.updateQueue,A=ee.lastBaseUpdate,A!==S&&(A===null?ee.firstBaseUpdate=G:A.next=G,ee.lastBaseUpdate=_))}if(m!==null){var ae=p.baseState;S=0,ee=G=_=null,A=m;do{var X=A.lane&-536870913,K=X!==A.lane;if(K?(Be&X)===X:(u&X)===X){X!==0&&X===Ri&&(wf=!0),ee!==null&&(ee=ee.next={lane:0,tag:A.tag,payload:A.payload,callback:null,next:null});e:{var pe=t,ke=A;X=r;var Je=a;switch(ke.tag){case 1:if(pe=ke.payload,typeof pe=="function"){ae=pe.call(Je,ae,X);break e}ae=pe;break e;case 3:pe.flags=pe.flags&-65537|128;case 0:if(pe=ke.payload,X=typeof pe=="function"?pe.call(Je,ae,X):pe,X==null)break e;ae=g({},ae,X);break e;case 2:tl=!0}}X=A.callback,X!==null&&(t.flags|=64,K&&(t.flags|=8192),K=p.callbacks,K===null?p.callbacks=[X]:K.push(X))}else K={lane:X,tag:A.tag,payload:A.payload,callback:A.callback,next:null},ee===null?(G=ee=K,_=ae):ee=ee.next=K,S|=X;if(A=A.next,A===null){if(A=p.shared.pending,A===null)break;K=A,A=K.next,K.next=null,p.lastBaseUpdate=K,p.shared.pending=null}}while(!0);ee===null&&(_=ae),p.baseState=_,p.firstBaseUpdate=G,p.lastBaseUpdate=ee,m===null&&(p.shared.lanes=0),sl|=S,t.lanes=S,t.memoizedState=ae}}function Mg(t,r){if(typeof t!="function")throw Error(i(191,t));t.call(r)}function Og(t,r){var a=t.callbacks;if(a!==null)for(t.callbacks=null,t=0;t<a.length;t++)Mg(a[t],r)}var Di=z(null),vs=z(0);function Dg(t,r){t=Br,T(vs,t),T(Di,r),Br=t|r.baseLanes}function Sf(){T(vs,Br),T(Di,Di.current)}function Cf(){Br=vs.current,L(Di),L(vs)}var gn=z(null),Bn=null;function ll(t){var r=t.alternate;T(mt,mt.current&1),T(gn,t),Bn===null&&(r===null||Di.current!==null||r.memoizedState!==null)&&(Bn=t)}function kf(t){T(mt,mt.current),T(gn,t),Bn===null&&(Bn=t)}function _g(t){t.tag===22?(T(mt,mt.current),T(gn,t),Bn===null&&(Bn=t)):il()}function il(){T(mt,mt.current),T(gn,gn.current)}function yn(t){L(gn),Bn===t&&(Bn=null),L(mt)}var mt=z(0);function bs(t){for(var r=t;r!==null;){if(r.tag===13){var a=r.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||jd(a)||Md(a)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var Rr=0,Re=null,Ke=null,xt=null,ws=!1,_i=!1,Xl=!1,Ss=0,Ha=0,zi=null,QC=0;function ut(){throw Error(i(321))}function Ef(t,r){if(r===null)return!1;for(var a=0;a<r.length&&a<t.length;a++)if(!pn(t[a],r[a]))return!1;return!0}function Nf(t,r,a,u,p,m){return Rr=m,Re=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,B.H=t===null||t.memoizedState===null?yy:If,Xl=!1,m=a(u,p),Xl=!1,_i&&(m=Lg(r,a,u,p)),zg(t),m}function zg(t){B.H=qa;var r=Ke!==null&&Ke.next!==null;if(Rr=0,xt=Ke=Re=null,ws=!1,Ha=0,zi=null,r)throw Error(i(300));t===null||vt||(t=t.dependencies,t!==null&&ds(t)&&(vt=!0))}function Lg(t,r,a,u){Re=t;var p=0;do{if(_i&&(zi=null),Ha=0,_i=!1,25<=p)throw Error(i(301));if(p+=1,xt=Ke=null,t.updateQueue!=null){var m=t.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}B.H=xy,m=r(a,u)}while(_i);return m}function KC(){var t=B.H,r=t.useState()[0];return r=typeof r.then=="function"?Pa(r):r,t=t.useState()[0],(Ke!==null?Ke.memoizedState:null)!==t&&(Re.flags|=1024),r}function Af(){var t=Ss!==0;return Ss=0,t}function Tf(t,r,a){r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~a}function Rf(t){if(ws){for(t=t.memoizedState;t!==null;){var r=t.queue;r!==null&&(r.pending=null),t=t.next}ws=!1}Rr=0,xt=Ke=Re=null,_i=!1,Ha=Ss=0,zi=null}function Xt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xt===null?Re.memoizedState=xt=t:xt=xt.next=t,xt}function gt(){if(Ke===null){var t=Re.alternate;t=t!==null?t.memoizedState:null}else t=Ke.next;var r=xt===null?Re.memoizedState:xt.next;if(r!==null)xt=r,Ke=t;else{if(t===null)throw Re.alternate===null?Error(i(467)):Error(i(310));Ke=t,t={memoizedState:Ke.memoizedState,baseState:Ke.baseState,baseQueue:Ke.baseQueue,queue:Ke.queue,next:null},xt===null?Re.memoizedState=xt=t:xt=xt.next=t}return xt}function Cs(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Pa(t){var r=Ha;return Ha+=1,zi===null&&(zi=[]),t=Ng(zi,t,r),r=Re,(xt===null?r.memoizedState:xt.next)===null&&(r=r.alternate,B.H=r===null||r.memoizedState===null?yy:If),t}function ks(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Pa(t);if(t.$$typeof===j)return Pt(t)}throw Error(i(438,String(t)))}function jf(t){var r=null,a=Re.updateQueue;if(a!==null&&(r=a.memoCache),r==null){var u=Re.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(r={data:u.data.map(function(p){return p.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),a===null&&(a=Cs(),Re.updateQueue=a),a.memoCache=r,a=r.data[r.index],a===void 0)for(a=r.data[r.index]=Array(t),u=0;u<t;u++)a[u]=H;return r.index++,a}function jr(t,r){return typeof r=="function"?r(t):r}function Es(t){var r=gt();return Mf(r,Ke,t)}function Mf(t,r,a){var u=t.queue;if(u===null)throw Error(i(311));u.lastRenderedReducer=a;var p=t.baseQueue,m=u.pending;if(m!==null){if(p!==null){var S=p.next;p.next=m.next,m.next=S}r.baseQueue=p=m,u.pending=null}if(m=t.baseState,p===null)t.memoizedState=m;else{r=p.next;var A=S=null,_=null,G=r,ee=!1;do{var ae=G.lane&-536870913;if(ae!==G.lane?(Be&ae)===ae:(Rr&ae)===ae){var X=G.revertLane;if(X===0)_!==null&&(_=_.next={lane:0,revertLane:0,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null}),ae===Ri&&(ee=!0);else if((Rr&X)===X){G=G.next,X===Ri&&(ee=!0);continue}else ae={lane:0,revertLane:G.revertLane,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},_===null?(A=_=ae,S=m):_=_.next=ae,Re.lanes|=X,sl|=X;ae=G.action,Xl&&a(m,ae),m=G.hasEagerState?G.eagerState:a(m,ae)}else X={lane:ae,revertLane:G.revertLane,gesture:G.gesture,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},_===null?(A=_=X,S=m):_=_.next=X,Re.lanes|=ae,sl|=ae;G=G.next}while(G!==null&&G!==r);if(_===null?S=m:_.next=A,!pn(m,t.memoizedState)&&(vt=!0,ee&&(a=ji,a!==null)))throw a;t.memoizedState=m,t.baseState=S,t.baseQueue=_,u.lastRenderedState=m}return p===null&&(u.lanes=0),[t.memoizedState,u.dispatch]}function Of(t){var r=gt(),a=r.queue;if(a===null)throw Error(i(311));a.lastRenderedReducer=t;var u=a.dispatch,p=a.pending,m=r.memoizedState;if(p!==null){a.pending=null;var S=p=p.next;do m=t(m,S.action),S=S.next;while(S!==p);pn(m,r.memoizedState)||(vt=!0),r.memoizedState=m,r.baseQueue===null&&(r.baseState=m),a.lastRenderedState=m}return[m,u]}function Bg(t,r,a){var u=Re,p=gt(),m=He;if(m){if(a===void 0)throw Error(i(407));a=a()}else a=r();var S=!pn((Ke||p).memoizedState,a);if(S&&(p.memoizedState=a,vt=!0),p=p.queue,zf(Pg.bind(null,u,p,t),[t]),p.getSnapshot!==r||S||xt!==null&&xt.memoizedState.tag&1){if(u.flags|=2048,Li(9,{destroy:void 0},Hg.bind(null,u,p,a,r),null),We===null)throw Error(i(349));m||(Rr&127)!==0||Ug(u,r,a)}return a}function Ug(t,r,a){t.flags|=16384,t={getSnapshot:r,value:a},r=Re.updateQueue,r===null?(r=Cs(),Re.updateQueue=r,r.stores=[t]):(a=r.stores,a===null?r.stores=[t]:a.push(t))}function Hg(t,r,a,u){r.value=a,r.getSnapshot=u,Ig(r)&&qg(t)}function Pg(t,r,a){return a(function(){Ig(r)&&qg(t)})}function Ig(t){var r=t.getSnapshot;t=t.value;try{var a=r();return!pn(t,a)}catch{return!0}}function qg(t){var r=Hl(t,2);r!==null&&sn(r,t,2)}function Df(t){var r=Xt();if(typeof t=="function"){var a=t;if(t=a(),Xl){Tt(!0);try{a()}finally{Tt(!1)}}}return r.memoizedState=r.baseState=t,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jr,lastRenderedState:t},r}function Fg(t,r,a,u){return t.baseState=a,Mf(t,Ke,typeof u=="function"?u:jr)}function ZC(t,r,a,u,p){if(Ts(t))throw Error(i(485));if(t=r.action,t!==null){var m={payload:p,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){m.listeners.push(S)}};B.T!==null?a(!0):m.isTransition=!1,u(m),a=r.pending,a===null?(m.next=r.pending=m,Vg(r,m)):(m.next=a.next,r.pending=a.next=m)}}function Vg(t,r){var a=r.action,u=r.payload,p=t.state;if(r.isTransition){var m=B.T,S={};B.T=S;try{var A=a(p,u),_=B.S;_!==null&&_(S,A),Gg(t,r,A)}catch(G){_f(t,r,G)}finally{m!==null&&S.types!==null&&(m.types=S.types),B.T=m}}else try{m=a(p,u),Gg(t,r,m)}catch(G){_f(t,r,G)}}function Gg(t,r,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(u){Yg(t,r,u)},function(u){return _f(t,r,u)}):Yg(t,r,a)}function Yg(t,r,a){r.status="fulfilled",r.value=a,$g(r),t.state=a,r=t.pending,r!==null&&(a=r.next,a===r?t.pending=null:(a=a.next,r.next=a,Vg(t,a)))}function _f(t,r,a){var u=t.pending;if(t.pending=null,u!==null){u=u.next;do r.status="rejected",r.reason=a,$g(r),r=r.next;while(r!==u)}t.action=null}function $g(t){t=t.listeners;for(var r=0;r<t.length;r++)(0,t[r])()}function Xg(t,r){return r}function Qg(t,r){if(He){var a=We.formState;if(a!==null){e:{var u=Re;if(He){if(lt){t:{for(var p=lt,m=Ln;p.nodeType!==8;){if(!m){p=null;break t}if(p=Un(p.nextSibling),p===null){p=null;break t}}m=p.data,p=m==="F!"||m==="F"?p:null}if(p){lt=Un(p.nextSibling),u=p.data==="F!";break e}}Wr(u)}u=!1}u&&(r=a[0])}}return a=Xt(),a.memoizedState=a.baseState=r,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xg,lastRenderedState:r},a.queue=u,a=py.bind(null,Re,u),u.dispatch=a,u=Df(!1),m=Pf.bind(null,Re,!1,u.queue),u=Xt(),p={state:r,dispatch:null,action:t,pending:null},u.queue=p,a=ZC.bind(null,Re,p,m,a),p.dispatch=a,u.memoizedState=t,[r,a,!1]}function Kg(t){var r=gt();return Zg(r,Ke,t)}function Zg(t,r,a){if(r=Mf(t,r,Xg)[0],t=Es(jr)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var u=Pa(r)}catch(S){throw S===Mi?ms:S}else u=r;r=gt();var p=r.queue,m=p.dispatch;return a!==r.memoizedState&&(Re.flags|=2048,Li(9,{destroy:void 0},JC.bind(null,p,a),null)),[u,m,t]}function JC(t,r){t.action=r}function Jg(t){var r=gt(),a=Ke;if(a!==null)return Zg(r,a,t);gt(),r=r.memoizedState,a=gt();var u=a.queue.dispatch;return a.memoizedState=t,[r,u,!1]}function Li(t,r,a,u){return t={tag:t,create:a,deps:u,inst:r,next:null},r=Re.updateQueue,r===null&&(r=Cs(),Re.updateQueue=r),a=r.lastEffect,a===null?r.lastEffect=t.next=t:(u=a.next,a.next=t,t.next=u,r.lastEffect=t),t}function Wg(){return gt().memoizedState}function Ns(t,r,a,u){var p=Xt();Re.flags|=t,p.memoizedState=Li(1|r,{destroy:void 0},a,u===void 0?null:u)}function As(t,r,a,u){var p=gt();u=u===void 0?null:u;var m=p.memoizedState.inst;Ke!==null&&u!==null&&Ef(u,Ke.memoizedState.deps)?p.memoizedState=Li(r,m,a,u):(Re.flags|=t,p.memoizedState=Li(1|r,m,a,u))}function ey(t,r){Ns(8390656,8,t,r)}function zf(t,r){As(2048,8,t,r)}function WC(t){Re.flags|=4;var r=Re.updateQueue;if(r===null)r=Cs(),Re.updateQueue=r,r.events=[t];else{var a=r.events;a===null?r.events=[t]:a.push(t)}}function ty(t){var r=gt().memoizedState;return WC({ref:r,nextImpl:t}),function(){if((Ve&2)!==0)throw Error(i(440));return r.impl.apply(void 0,arguments)}}function ny(t,r){return As(4,2,t,r)}function ry(t,r){return As(4,4,t,r)}function ly(t,r){if(typeof r=="function"){t=t();var a=r(t);return function(){typeof a=="function"?a():r(null)}}if(r!=null)return t=t(),r.current=t,function(){r.current=null}}function iy(t,r,a){a=a!=null?a.concat([t]):null,As(4,4,ly.bind(null,r,t),a)}function Lf(){}function ay(t,r){var a=gt();r=r===void 0?null:r;var u=a.memoizedState;return r!==null&&Ef(r,u[1])?u[0]:(a.memoizedState=[t,r],t)}function oy(t,r){var a=gt();r=r===void 0?null:r;var u=a.memoizedState;if(r!==null&&Ef(r,u[1]))return u[0];if(u=t(),Xl){Tt(!0);try{t()}finally{Tt(!1)}}return a.memoizedState=[u,r],u}function Bf(t,r,a){return a===void 0||(Rr&1073741824)!==0&&(Be&261930)===0?t.memoizedState=r:(t.memoizedState=a,t=sx(),Re.lanes|=t,sl|=t,a)}function sy(t,r,a,u){return pn(a,r)?a:Di.current!==null?(t=Bf(t,a,u),pn(t,r)||(vt=!0),t):(Rr&42)===0||(Rr&1073741824)!==0&&(Be&261930)===0?(vt=!0,t.memoizedState=a):(t=sx(),Re.lanes|=t,sl|=t,r)}function uy(t,r,a,u,p){var m=Y.p;Y.p=m!==0&&8>m?m:8;var S=B.T,A={};B.T=A,Pf(t,!1,r,a);try{var _=p(),G=B.S;if(G!==null&&G(A,_),_!==null&&typeof _=="object"&&typeof _.then=="function"){var ee=XC(_,u);Ia(t,r,ee,bn(t))}else Ia(t,r,u,bn(t))}catch(ae){Ia(t,r,{then:function(){},status:"rejected",reason:ae},bn())}finally{Y.p=m,S!==null&&A.types!==null&&(S.types=A.types),B.T=S}}function ek(){}function Uf(t,r,a,u){if(t.tag!==5)throw Error(i(476));var p=cy(t).queue;uy(t,p,r,le,a===null?ek:function(){return fy(t),a(u)})}function cy(t){var r=t.memoizedState;if(r!==null)return r;r={memoizedState:le,baseState:le,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jr,lastRenderedState:le},next:null};var a={};return r.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jr,lastRenderedState:a},next:null},t.memoizedState=r,t=t.alternate,t!==null&&(t.memoizedState=r),r}function fy(t){var r=cy(t);r.next===null&&(r=t.alternate.memoizedState),Ia(t,r.next.queue,{},bn())}function Hf(){return Pt(lo)}function dy(){return gt().memoizedState}function hy(){return gt().memoizedState}function tk(t){for(var r=t.return;r!==null;){switch(r.tag){case 24:case 3:var a=bn();t=nl(a);var u=rl(r,t,a);u!==null&&(sn(u,r,a),La(u,r,a)),r={cache:pf()},t.payload=r;return}r=r.return}}function nk(t,r,a){var u=bn();a={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Ts(t)?my(r,a):(a=nf(t,r,a,u),a!==null&&(sn(a,t,u),gy(a,r,u)))}function py(t,r,a){var u=bn();Ia(t,r,a,u)}function Ia(t,r,a,u){var p={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Ts(t))my(r,p);else{var m=t.alternate;if(t.lanes===0&&(m===null||m.lanes===0)&&(m=r.lastRenderedReducer,m!==null))try{var S=r.lastRenderedState,A=m(S,a);if(p.hasEagerState=!0,p.eagerState=A,pn(A,S))return ss(t,r,p,0),We===null&&os(),!1}catch{}finally{}if(a=nf(t,r,p,u),a!==null)return sn(a,t,u),gy(a,r,u),!0}return!1}function Pf(t,r,a,u){if(u={lane:2,revertLane:xd(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Ts(t)){if(r)throw Error(i(479))}else r=nf(t,a,u,2),r!==null&&sn(r,t,2)}function Ts(t){var r=t.alternate;return t===Re||r!==null&&r===Re}function my(t,r){_i=ws=!0;var a=t.pending;a===null?r.next=r:(r.next=a.next,a.next=r),t.pending=r}function gy(t,r,a){if((a&4194048)!==0){var u=r.lanes;u&=t.pendingLanes,a|=u,r.lanes=a,hn(t,a)}}var qa={readContext:Pt,use:ks,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useLayoutEffect:ut,useInsertionEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useSyncExternalStore:ut,useId:ut,useHostTransitionStatus:ut,useFormState:ut,useActionState:ut,useOptimistic:ut,useMemoCache:ut,useCacheRefresh:ut};qa.useEffectEvent=ut;var yy={readContext:Pt,use:ks,useCallback:function(t,r){return Xt().memoizedState=[t,r===void 0?null:r],t},useContext:Pt,useEffect:ey,useImperativeHandle:function(t,r,a){a=a!=null?a.concat([t]):null,Ns(4194308,4,ly.bind(null,r,t),a)},useLayoutEffect:function(t,r){return Ns(4194308,4,t,r)},useInsertionEffect:function(t,r){Ns(4,2,t,r)},useMemo:function(t,r){var a=Xt();r=r===void 0?null:r;var u=t();if(Xl){Tt(!0);try{t()}finally{Tt(!1)}}return a.memoizedState=[u,r],u},useReducer:function(t,r,a){var u=Xt();if(a!==void 0){var p=a(r);if(Xl){Tt(!0);try{a(r)}finally{Tt(!1)}}}else p=r;return u.memoizedState=u.baseState=p,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:p},u.queue=t,t=t.dispatch=nk.bind(null,Re,t),[u.memoizedState,t]},useRef:function(t){var r=Xt();return t={current:t},r.memoizedState=t},useState:function(t){t=Df(t);var r=t.queue,a=py.bind(null,Re,r);return r.dispatch=a,[t.memoizedState,a]},useDebugValue:Lf,useDeferredValue:function(t,r){var a=Xt();return Bf(a,t,r)},useTransition:function(){var t=Df(!1);return t=uy.bind(null,Re,t.queue,!0,!1),Xt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,r,a){var u=Re,p=Xt();if(He){if(a===void 0)throw Error(i(407));a=a()}else{if(a=r(),We===null)throw Error(i(349));(Be&127)!==0||Ug(u,r,a)}p.memoizedState=a;var m={value:a,getSnapshot:r};return p.queue=m,ey(Pg.bind(null,u,m,t),[t]),u.flags|=2048,Li(9,{destroy:void 0},Hg.bind(null,u,m,a,r),null),a},useId:function(){var t=Xt(),r=We.identifierPrefix;if(He){var a=or,u=ar;a=(u&~(1<<32-$e(u)-1)).toString(32)+a,r="_"+r+"R_"+a,a=Ss++,0<a&&(r+="H"+a.toString(32)),r+="_"}else a=QC++,r="_"+r+"r_"+a.toString(32)+"_";return t.memoizedState=r},useHostTransitionStatus:Hf,useFormState:Qg,useActionState:Qg,useOptimistic:function(t){var r=Xt();r.memoizedState=r.baseState=t;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=a,r=Pf.bind(null,Re,!0,a),a.dispatch=r,[t,r]},useMemoCache:jf,useCacheRefresh:function(){return Xt().memoizedState=tk.bind(null,Re)},useEffectEvent:function(t){var r=Xt(),a={impl:t};return r.memoizedState=a,function(){if((Ve&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}},If={readContext:Pt,use:ks,useCallback:ay,useContext:Pt,useEffect:zf,useImperativeHandle:iy,useInsertionEffect:ny,useLayoutEffect:ry,useMemo:oy,useReducer:Es,useRef:Wg,useState:function(){return Es(jr)},useDebugValue:Lf,useDeferredValue:function(t,r){var a=gt();return sy(a,Ke.memoizedState,t,r)},useTransition:function(){var t=Es(jr)[0],r=gt().memoizedState;return[typeof t=="boolean"?t:Pa(t),r]},useSyncExternalStore:Bg,useId:dy,useHostTransitionStatus:Hf,useFormState:Kg,useActionState:Kg,useOptimistic:function(t,r){var a=gt();return Fg(a,Ke,t,r)},useMemoCache:jf,useCacheRefresh:hy};If.useEffectEvent=ty;var xy={readContext:Pt,use:ks,useCallback:ay,useContext:Pt,useEffect:zf,useImperativeHandle:iy,useInsertionEffect:ny,useLayoutEffect:ry,useMemo:oy,useReducer:Of,useRef:Wg,useState:function(){return Of(jr)},useDebugValue:Lf,useDeferredValue:function(t,r){var a=gt();return Ke===null?Bf(a,t,r):sy(a,Ke.memoizedState,t,r)},useTransition:function(){var t=Of(jr)[0],r=gt().memoizedState;return[typeof t=="boolean"?t:Pa(t),r]},useSyncExternalStore:Bg,useId:dy,useHostTransitionStatus:Hf,useFormState:Jg,useActionState:Jg,useOptimistic:function(t,r){var a=gt();return Ke!==null?Fg(a,Ke,t,r):(a.baseState=t,[t,a.queue.dispatch])},useMemoCache:jf,useCacheRefresh:hy};xy.useEffectEvent=ty;function qf(t,r,a,u){r=t.memoizedState,a=a(u,r),a=a==null?r:g({},r,a),t.memoizedState=a,t.lanes===0&&(t.updateQueue.baseState=a)}var Ff={enqueueSetState:function(t,r,a){t=t._reactInternals;var u=bn(),p=nl(u);p.payload=r,a!=null&&(p.callback=a),r=rl(t,p,u),r!==null&&(sn(r,t,u),La(r,t,u))},enqueueReplaceState:function(t,r,a){t=t._reactInternals;var u=bn(),p=nl(u);p.tag=1,p.payload=r,a!=null&&(p.callback=a),r=rl(t,p,u),r!==null&&(sn(r,t,u),La(r,t,u))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var a=bn(),u=nl(a);u.tag=2,r!=null&&(u.callback=r),r=rl(t,u,a),r!==null&&(sn(r,t,a),La(r,t,a))}};function vy(t,r,a,u,p,m,S){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(u,m,S):r.prototype&&r.prototype.isPureReactComponent?!Ta(a,u)||!Ta(p,m):!0}function by(t,r,a,u){t=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(a,u),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(a,u),r.state!==t&&Ff.enqueueReplaceState(r,r.state,null)}function Ql(t,r){var a=r;if("ref"in r){a={};for(var u in r)u!=="ref"&&(a[u]=r[u])}if(t=t.defaultProps){a===r&&(a=g({},a));for(var p in t)a[p]===void 0&&(a[p]=t[p])}return a}function wy(t){as(t)}function Sy(t){console.error(t)}function Cy(t){as(t)}function Rs(t,r){try{var a=t.onUncaughtError;a(r.value,{componentStack:r.stack})}catch(u){setTimeout(function(){throw u})}}function ky(t,r,a){try{var u=t.onCaughtError;u(a.value,{componentStack:a.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function Vf(t,r,a){return a=nl(a),a.tag=3,a.payload={element:null},a.callback=function(){Rs(t,r)},a}function Ey(t){return t=nl(t),t.tag=3,t}function Ny(t,r,a,u){var p=a.type.getDerivedStateFromError;if(typeof p=="function"){var m=u.value;t.payload=function(){return p(m)},t.callback=function(){ky(r,a,u)}}var S=a.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(t.callback=function(){ky(r,a,u),typeof p!="function"&&(ul===null?ul=new Set([this]):ul.add(this));var A=u.stack;this.componentDidCatch(u.value,{componentStack:A!==null?A:""})})}function rk(t,r,a,u,p){if(a.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(r=a.alternate,r!==null&&Ti(r,a,p,!0),a=gn.current,a!==null){switch(a.tag){case 31:case 13:return Bn===null?Is():a.alternate===null&&ct===0&&(ct=3),a.flags&=-257,a.flags|=65536,a.lanes=p,u===gs?a.flags|=16384:(r=a.updateQueue,r===null?a.updateQueue=new Set([u]):r.add(u),md(t,u,p)),!1;case 22:return a.flags|=65536,u===gs?a.flags|=16384:(r=a.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([u])},a.updateQueue=r):(a=r.retryQueue,a===null?r.retryQueue=new Set([u]):a.add(u)),md(t,u,p)),!1}throw Error(i(435,a.tag))}return md(t,u,p),Is(),!1}if(He)return r=gn.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=p,u!==uf&&(t=Error(i(422),{cause:u}),Ma(Dn(t,a)))):(u!==uf&&(r=Error(i(423),{cause:u}),Ma(Dn(r,a))),t=t.current.alternate,t.flags|=65536,p&=-p,t.lanes|=p,u=Dn(u,a),p=Vf(t.stateNode,u,p),bf(t,p),ct!==4&&(ct=2)),!1;var m=Error(i(520),{cause:u});if(m=Dn(m,a),Ka===null?Ka=[m]:Ka.push(m),ct!==4&&(ct=2),r===null)return!0;u=Dn(u,a),a=r;do{switch(a.tag){case 3:return a.flags|=65536,t=p&-p,a.lanes|=t,t=Vf(a.stateNode,u,t),bf(a,t),!1;case 1:if(r=a.type,m=a.stateNode,(a.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(ul===null||!ul.has(m))))return a.flags|=65536,p&=-p,a.lanes|=p,p=Ey(p),Ny(p,t,a,u),bf(a,p),!1}a=a.return}while(a!==null);return!1}var Gf=Error(i(461)),vt=!1;function It(t,r,a,u){r.child=t===null?jg(r,null,a,u):$l(r,t.child,a,u)}function Ay(t,r,a,u,p){a=a.render;var m=r.ref;if("ref"in u){var S={};for(var A in u)A!=="ref"&&(S[A]=u[A])}else S=u;return Fl(r),u=Nf(t,r,a,S,m,p),A=Af(),t!==null&&!vt?(Tf(t,r,p),Mr(t,r,p)):(He&&A&&of(r),r.flags|=1,It(t,r,u,p),r.child)}function Ty(t,r,a,u,p){if(t===null){var m=a.type;return typeof m=="function"&&!rf(m)&&m.defaultProps===void 0&&a.compare===null?(r.tag=15,r.type=m,Ry(t,r,m,u,p)):(t=cs(a.type,null,u,r,r.mode,p),t.ref=r.ref,t.return=r,r.child=t)}if(m=t.child,!Wf(t,p)){var S=m.memoizedProps;if(a=a.compare,a=a!==null?a:Ta,a(S,u)&&t.ref===r.ref)return Mr(t,r,p)}return r.flags|=1,t=Er(m,u),t.ref=r.ref,t.return=r,r.child=t}function Ry(t,r,a,u,p){if(t!==null){var m=t.memoizedProps;if(Ta(m,u)&&t.ref===r.ref)if(vt=!1,r.pendingProps=u=m,Wf(t,p))(t.flags&131072)!==0&&(vt=!0);else return r.lanes=t.lanes,Mr(t,r,p)}return Yf(t,r,a,u,p)}function jy(t,r,a,u){var p=u.children,m=t!==null?t.memoizedState:null;if(t===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((r.flags&128)!==0){if(m=m!==null?m.baseLanes|a:a,t!==null){for(u=r.child=t.child,p=0;u!==null;)p=p|u.lanes|u.childLanes,u=u.sibling;u=p&~m}else u=0,r.child=null;return My(t,r,m,a,u)}if((a&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},t!==null&&ps(r,m!==null?m.cachePool:null),m!==null?Dg(r,m):Sf(),_g(r);else return u=r.lanes=536870912,My(t,r,m!==null?m.baseLanes|a:a,a,u)}else m!==null?(ps(r,m.cachePool),Dg(r,m),il(),r.memoizedState=null):(t!==null&&ps(r,null),Sf(),il());return It(t,r,p,a),r.child}function Fa(t,r){return t!==null&&t.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function My(t,r,a,u,p){var m=gf();return m=m===null?null:{parent:yt._currentValue,pool:m},r.memoizedState={baseLanes:a,cachePool:m},t!==null&&ps(r,null),Sf(),_g(r),t!==null&&Ti(t,r,u,!0),r.childLanes=p,null}function js(t,r){return r=Os({mode:r.mode,children:r.children},t.mode),r.ref=t.ref,t.child=r,r.return=t,r}function Oy(t,r,a){return $l(r,t.child,null,a),t=js(r,r.pendingProps),t.flags|=2,yn(r),r.memoizedState=null,t}function lk(t,r,a){var u=r.pendingProps,p=(r.flags&128)!==0;if(r.flags&=-129,t===null){if(He){if(u.mode==="hidden")return t=js(r,u),r.lanes=536870912,Fa(null,t);if(kf(r),(t=lt)?(t=Vx(t,Ln),t=t!==null&&t.data==="&"?t:null,t!==null&&(r.memoizedState={dehydrated:t,treeContext:Zr!==null?{id:ar,overflow:or}:null,retryLane:536870912,hydrationErrors:null},a=mg(t),a.return=r,r.child=a,Ht=r,lt=null)):t=null,t===null)throw Wr(r);return r.lanes=536870912,null}return js(r,u)}var m=t.memoizedState;if(m!==null){var S=m.dehydrated;if(kf(r),p)if(r.flags&256)r.flags&=-257,r=Oy(t,r,a);else if(r.memoizedState!==null)r.child=t.child,r.flags|=128,r=null;else throw Error(i(558));else if(vt||Ti(t,r,a,!1),p=(a&t.childLanes)!==0,vt||p){if(u=We,u!==null&&(S=Tn(u,a),S!==0&&S!==m.retryLane))throw m.retryLane=S,Hl(t,S),sn(u,t,S),Gf;Is(),r=Oy(t,r,a)}else t=m.treeContext,lt=Un(S.nextSibling),Ht=r,He=!0,Jr=null,Ln=!1,t!==null&&xg(r,t),r=js(r,u),r.flags|=4096;return r}return t=Er(t.child,{mode:u.mode,children:u.children}),t.ref=r.ref,r.child=t,t.return=r,t}function Ms(t,r){var a=r.ref;if(a===null)t!==null&&t.ref!==null&&(r.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(i(284));(t===null||t.ref!==a)&&(r.flags|=4194816)}}function Yf(t,r,a,u,p){return Fl(r),a=Nf(t,r,a,u,void 0,p),u=Af(),t!==null&&!vt?(Tf(t,r,p),Mr(t,r,p)):(He&&u&&of(r),r.flags|=1,It(t,r,a,p),r.child)}function Dy(t,r,a,u,p,m){return Fl(r),r.updateQueue=null,a=Lg(r,u,a,p),zg(t),u=Af(),t!==null&&!vt?(Tf(t,r,m),Mr(t,r,m)):(He&&u&&of(r),r.flags|=1,It(t,r,a,m),r.child)}function _y(t,r,a,u,p){if(Fl(r),r.stateNode===null){var m=ki,S=a.contextType;typeof S=="object"&&S!==null&&(m=Pt(S)),m=new a(u,m),r.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=Ff,r.stateNode=m,m._reactInternals=r,m=r.stateNode,m.props=u,m.state=r.memoizedState,m.refs={},xf(r),S=a.contextType,m.context=typeof S=="object"&&S!==null?Pt(S):ki,m.state=r.memoizedState,S=a.getDerivedStateFromProps,typeof S=="function"&&(qf(r,a,S,u),m.state=r.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(S=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),S!==m.state&&Ff.enqueueReplaceState(m,m.state,null),Ua(r,u,m,p),Ba(),m.state=r.memoizedState),typeof m.componentDidMount=="function"&&(r.flags|=4194308),u=!0}else if(t===null){m=r.stateNode;var A=r.memoizedProps,_=Ql(a,A);m.props=_;var G=m.context,ee=a.contextType;S=ki,typeof ee=="object"&&ee!==null&&(S=Pt(ee));var ae=a.getDerivedStateFromProps;ee=typeof ae=="function"||typeof m.getSnapshotBeforeUpdate=="function",A=r.pendingProps!==A,ee||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(A||G!==S)&&by(r,m,u,S),tl=!1;var X=r.memoizedState;m.state=X,Ua(r,u,m,p),Ba(),G=r.memoizedState,A||X!==G||tl?(typeof ae=="function"&&(qf(r,a,ae,u),G=r.memoizedState),(_=tl||vy(r,a,_,u,X,G,S))?(ee||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(r.flags|=4194308)):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=u,r.memoizedState=G),m.props=u,m.state=G,m.context=S,u=_):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{m=r.stateNode,vf(t,r),S=r.memoizedProps,ee=Ql(a,S),m.props=ee,ae=r.pendingProps,X=m.context,G=a.contextType,_=ki,typeof G=="object"&&G!==null&&(_=Pt(G)),A=a.getDerivedStateFromProps,(G=typeof A=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(S!==ae||X!==_)&&by(r,m,u,_),tl=!1,X=r.memoizedState,m.state=X,Ua(r,u,m,p),Ba();var K=r.memoizedState;S!==ae||X!==K||tl||t!==null&&t.dependencies!==null&&ds(t.dependencies)?(typeof A=="function"&&(qf(r,a,A,u),K=r.memoizedState),(ee=tl||vy(r,a,ee,u,X,K,_)||t!==null&&t.dependencies!==null&&ds(t.dependencies))?(G||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(u,K,_),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(u,K,_)),typeof m.componentDidUpdate=="function"&&(r.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof m.componentDidUpdate!="function"||S===t.memoizedProps&&X===t.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||S===t.memoizedProps&&X===t.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=K),m.props=u,m.state=K,m.context=_,u=ee):(typeof m.componentDidUpdate!="function"||S===t.memoizedProps&&X===t.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||S===t.memoizedProps&&X===t.memoizedState||(r.flags|=1024),u=!1)}return m=u,Ms(t,r),u=(r.flags&128)!==0,m||u?(m=r.stateNode,a=u&&typeof a.getDerivedStateFromError!="function"?null:m.render(),r.flags|=1,t!==null&&u?(r.child=$l(r,t.child,null,p),r.child=$l(r,null,a,p)):It(t,r,a,p),r.memoizedState=m.state,t=r.child):t=Mr(t,r,p),t}function zy(t,r,a,u){return Il(),r.flags|=256,It(t,r,a,u),r.child}var $f={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Xf(t){return{baseLanes:t,cachePool:kg()}}function Qf(t,r,a){return t=t!==null?t.childLanes&~a:0,r&&(t|=vn),t}function Ly(t,r,a){var u=r.pendingProps,p=!1,m=(r.flags&128)!==0,S;if((S=m)||(S=t!==null&&t.memoizedState===null?!1:(mt.current&2)!==0),S&&(p=!0,r.flags&=-129),S=(r.flags&32)!==0,r.flags&=-33,t===null){if(He){if(p?ll(r):il(),(t=lt)?(t=Vx(t,Ln),t=t!==null&&t.data!=="&"?t:null,t!==null&&(r.memoizedState={dehydrated:t,treeContext:Zr!==null?{id:ar,overflow:or}:null,retryLane:536870912,hydrationErrors:null},a=mg(t),a.return=r,r.child=a,Ht=r,lt=null)):t=null,t===null)throw Wr(r);return Md(t)?r.lanes=32:r.lanes=536870912,null}var A=u.children;return u=u.fallback,p?(il(),p=r.mode,A=Os({mode:"hidden",children:A},p),u=Pl(u,p,a,null),A.return=r,u.return=r,A.sibling=u,r.child=A,u=r.child,u.memoizedState=Xf(a),u.childLanes=Qf(t,S,a),r.memoizedState=$f,Fa(null,u)):(ll(r),Kf(r,A))}var _=t.memoizedState;if(_!==null&&(A=_.dehydrated,A!==null)){if(m)r.flags&256?(ll(r),r.flags&=-257,r=Zf(t,r,a)):r.memoizedState!==null?(il(),r.child=t.child,r.flags|=128,r=null):(il(),A=u.fallback,p=r.mode,u=Os({mode:"visible",children:u.children},p),A=Pl(A,p,a,null),A.flags|=2,u.return=r,A.return=r,u.sibling=A,r.child=u,$l(r,t.child,null,a),u=r.child,u.memoizedState=Xf(a),u.childLanes=Qf(t,S,a),r.memoizedState=$f,r=Fa(null,u));else if(ll(r),Md(A)){if(S=A.nextSibling&&A.nextSibling.dataset,S)var G=S.dgst;S=G,u=Error(i(419)),u.stack="",u.digest=S,Ma({value:u,source:null,stack:null}),r=Zf(t,r,a)}else if(vt||Ti(t,r,a,!1),S=(a&t.childLanes)!==0,vt||S){if(S=We,S!==null&&(u=Tn(S,a),u!==0&&u!==_.retryLane))throw _.retryLane=u,Hl(t,u),sn(S,t,u),Gf;jd(A)||Is(),r=Zf(t,r,a)}else jd(A)?(r.flags|=192,r.child=t.child,r=null):(t=_.treeContext,lt=Un(A.nextSibling),Ht=r,He=!0,Jr=null,Ln=!1,t!==null&&xg(r,t),r=Kf(r,u.children),r.flags|=4096);return r}return p?(il(),A=u.fallback,p=r.mode,_=t.child,G=_.sibling,u=Er(_,{mode:"hidden",children:u.children}),u.subtreeFlags=_.subtreeFlags&65011712,G!==null?A=Er(G,A):(A=Pl(A,p,a,null),A.flags|=2),A.return=r,u.return=r,u.sibling=A,r.child=u,Fa(null,u),u=r.child,A=t.child.memoizedState,A===null?A=Xf(a):(p=A.cachePool,p!==null?(_=yt._currentValue,p=p.parent!==_?{parent:_,pool:_}:p):p=kg(),A={baseLanes:A.baseLanes|a,cachePool:p}),u.memoizedState=A,u.childLanes=Qf(t,S,a),r.memoizedState=$f,Fa(t.child,u)):(ll(r),a=t.child,t=a.sibling,a=Er(a,{mode:"visible",children:u.children}),a.return=r,a.sibling=null,t!==null&&(S=r.deletions,S===null?(r.deletions=[t],r.flags|=16):S.push(t)),r.child=a,r.memoizedState=null,a)}function Kf(t,r){return r=Os({mode:"visible",children:r},t.mode),r.return=t,t.child=r}function Os(t,r){return t=mn(22,t,null,r),t.lanes=0,t}function Zf(t,r,a){return $l(r,t.child,null,a),t=Kf(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function By(t,r,a){t.lanes|=r;var u=t.alternate;u!==null&&(u.lanes|=r),df(t.return,r,a)}function Jf(t,r,a,u,p,m){var S=t.memoizedState;S===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:u,tail:a,tailMode:p,treeForkCount:m}:(S.isBackwards=r,S.rendering=null,S.renderingStartTime=0,S.last=u,S.tail=a,S.tailMode=p,S.treeForkCount=m)}function Uy(t,r,a){var u=r.pendingProps,p=u.revealOrder,m=u.tail;u=u.children;var S=mt.current,A=(S&2)!==0;if(A?(S=S&1|2,r.flags|=128):S&=1,T(mt,S),It(t,r,u,a),u=He?ja:0,!A&&t!==null&&(t.flags&128)!==0)e:for(t=r.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&By(t,a,r);else if(t.tag===19)By(t,a,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break e;for(;t.sibling===null;){if(t.return===null||t.return===r)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(p){case"forwards":for(a=r.child,p=null;a!==null;)t=a.alternate,t!==null&&bs(t)===null&&(p=a),a=a.sibling;a=p,a===null?(p=r.child,r.child=null):(p=a.sibling,a.sibling=null),Jf(r,!1,p,a,m,u);break;case"backwards":case"unstable_legacy-backwards":for(a=null,p=r.child,r.child=null;p!==null;){if(t=p.alternate,t!==null&&bs(t)===null){r.child=p;break}t=p.sibling,p.sibling=a,a=p,p=t}Jf(r,!0,a,null,m,u);break;case"together":Jf(r,!1,null,null,void 0,u);break;default:r.memoizedState=null}return r.child}function Mr(t,r,a){if(t!==null&&(r.dependencies=t.dependencies),sl|=r.lanes,(a&r.childLanes)===0)if(t!==null){if(Ti(t,r,a,!1),(a&r.childLanes)===0)return null}else return null;if(t!==null&&r.child!==t.child)throw Error(i(153));if(r.child!==null){for(t=r.child,a=Er(t,t.pendingProps),r.child=a,a.return=r;t.sibling!==null;)t=t.sibling,a=a.sibling=Er(t,t.pendingProps),a.return=r;a.sibling=null}return r.child}function Wf(t,r){return(t.lanes&r)!==0?!0:(t=t.dependencies,!!(t!==null&&ds(t)))}function ik(t,r,a){switch(r.tag){case 3:Ae(r,r.stateNode.containerInfo),el(r,yt,t.memoizedState.cache),Il();break;case 27:case 5:Ne(r);break;case 4:Ae(r,r.stateNode.containerInfo);break;case 10:el(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,kf(r),null;break;case 13:var u=r.memoizedState;if(u!==null)return u.dehydrated!==null?(ll(r),r.flags|=128,null):(a&r.child.childLanes)!==0?Ly(t,r,a):(ll(r),t=Mr(t,r,a),t!==null?t.sibling:null);ll(r);break;case 19:var p=(t.flags&128)!==0;if(u=(a&r.childLanes)!==0,u||(Ti(t,r,a,!1),u=(a&r.childLanes)!==0),p){if(u)return Uy(t,r,a);r.flags|=128}if(p=r.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),T(mt,mt.current),u)break;return null;case 22:return r.lanes=0,jy(t,r,a,r.pendingProps);case 24:el(r,yt,t.memoizedState.cache)}return Mr(t,r,a)}function Hy(t,r,a){if(t!==null)if(t.memoizedProps!==r.pendingProps)vt=!0;else{if(!Wf(t,a)&&(r.flags&128)===0)return vt=!1,ik(t,r,a);vt=(t.flags&131072)!==0}else vt=!1,He&&(r.flags&1048576)!==0&&yg(r,ja,r.index);switch(r.lanes=0,r.tag){case 16:e:{var u=r.pendingProps;if(t=Gl(r.elementType),r.type=t,typeof t=="function")rf(t)?(u=Ql(t,u),r.tag=1,r=_y(null,r,t,u,a)):(r.tag=0,r=Yf(null,r,t,u,a));else{if(t!=null){var p=t.$$typeof;if(p===D){r.tag=11,r=Ay(null,r,t,u,a);break e}else if(p===P){r.tag=14,r=Ty(null,r,t,u,a);break e}}throw r=Z(t)||t,Error(i(306,r,""))}}return r;case 0:return Yf(t,r,r.type,r.pendingProps,a);case 1:return u=r.type,p=Ql(u,r.pendingProps),_y(t,r,u,p,a);case 3:e:{if(Ae(r,r.stateNode.containerInfo),t===null)throw Error(i(387));u=r.pendingProps;var m=r.memoizedState;p=m.element,vf(t,r),Ua(r,u,null,a);var S=r.memoizedState;if(u=S.cache,el(r,yt,u),u!==m.cache&&hf(r,[yt],a,!0),Ba(),u=S.element,m.isDehydrated)if(m={element:u,isDehydrated:!1,cache:S.cache},r.updateQueue.baseState=m,r.memoizedState=m,r.flags&256){r=zy(t,r,u,a);break e}else if(u!==p){p=Dn(Error(i(424)),r),Ma(p),r=zy(t,r,u,a);break e}else{switch(t=r.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(lt=Un(t.firstChild),Ht=r,He=!0,Jr=null,Ln=!0,a=jg(r,null,u,a),r.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Il(),u===p){r=Mr(t,r,a);break e}It(t,r,u,a)}r=r.child}return r;case 26:return Ms(t,r),t===null?(a=Kx(r.type,null,r.pendingProps,null))?r.memoizedState=a:He||(a=r.type,t=r.pendingProps,u=Xs(ue.current).createElement(a),u[Ut]=r,u[tn]=t,qt(u,a,t),jt(u),r.stateNode=u):r.memoizedState=Kx(r.type,t.memoizedProps,r.pendingProps,t.memoizedState),null;case 27:return Ne(r),t===null&&He&&(u=r.stateNode=$x(r.type,r.pendingProps,ue.current),Ht=r,Ln=!0,p=lt,hl(r.type)?(Od=p,lt=Un(u.firstChild)):lt=p),It(t,r,r.pendingProps.children,a),Ms(t,r),t===null&&(r.flags|=4194304),r.child;case 5:return t===null&&He&&((p=u=lt)&&(u=zk(u,r.type,r.pendingProps,Ln),u!==null?(r.stateNode=u,Ht=r,lt=Un(u.firstChild),Ln=!1,p=!0):p=!1),p||Wr(r)),Ne(r),p=r.type,m=r.pendingProps,S=t!==null?t.memoizedProps:null,u=m.children,Ad(p,m)?u=null:S!==null&&Ad(p,S)&&(r.flags|=32),r.memoizedState!==null&&(p=Nf(t,r,KC,null,null,a),lo._currentValue=p),Ms(t,r),It(t,r,u,a),r.child;case 6:return t===null&&He&&((t=a=lt)&&(a=Lk(a,r.pendingProps,Ln),a!==null?(r.stateNode=a,Ht=r,lt=null,t=!0):t=!1),t||Wr(r)),null;case 13:return Ly(t,r,a);case 4:return Ae(r,r.stateNode.containerInfo),u=r.pendingProps,t===null?r.child=$l(r,null,u,a):It(t,r,u,a),r.child;case 11:return Ay(t,r,r.type,r.pendingProps,a);case 7:return It(t,r,r.pendingProps,a),r.child;case 8:return It(t,r,r.pendingProps.children,a),r.child;case 12:return It(t,r,r.pendingProps.children,a),r.child;case 10:return u=r.pendingProps,el(r,r.type,u.value),It(t,r,u.children,a),r.child;case 9:return p=r.type._context,u=r.pendingProps.children,Fl(r),p=Pt(p),u=u(p),r.flags|=1,It(t,r,u,a),r.child;case 14:return Ty(t,r,r.type,r.pendingProps,a);case 15:return Ry(t,r,r.type,r.pendingProps,a);case 19:return Uy(t,r,a);case 31:return lk(t,r,a);case 22:return jy(t,r,a,r.pendingProps);case 24:return Fl(r),u=Pt(yt),t===null?(p=gf(),p===null&&(p=We,m=pf(),p.pooledCache=m,m.refCount++,m!==null&&(p.pooledCacheLanes|=a),p=m),r.memoizedState={parent:u,cache:p},xf(r),el(r,yt,p)):((t.lanes&a)!==0&&(vf(t,r),Ua(r,null,null,a),Ba()),p=t.memoizedState,m=r.memoizedState,p.parent!==u?(p={parent:u,cache:u},r.memoizedState=p,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=p),el(r,yt,u)):(u=m.cache,el(r,yt,u),u!==p.cache&&hf(r,[yt],a,!0))),It(t,r,r.pendingProps.children,a),r.child;case 29:throw r.pendingProps}throw Error(i(156,r.tag))}function Or(t){t.flags|=4}function ed(t,r,a,u,p){if((r=(t.mode&32)!==0)&&(r=!1),r){if(t.flags|=16777216,(p&335544128)===p)if(t.stateNode.complete)t.flags|=8192;else if(dx())t.flags|=8192;else throw Yl=gs,yf}else t.flags&=-16777217}function Py(t,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!tv(r))if(dx())t.flags|=8192;else throw Yl=gs,yf}function Ds(t,r){r!==null&&(t.flags|=4),t.flags&16384&&(r=t.tag!==22?Ft():536870912,t.lanes|=r,Pi|=r)}function Va(t,r){if(!He)switch(t.tailMode){case"hidden":r=t.tail;for(var a=null;r!==null;)r.alternate!==null&&(a=r),r=r.sibling;a===null?t.tail=null:a.sibling=null;break;case"collapsed":a=t.tail;for(var u=null;a!==null;)a.alternate!==null&&(u=a),a=a.sibling;u===null?r||t.tail===null?t.tail=null:t.tail.sibling=null:u.sibling=null}}function it(t){var r=t.alternate!==null&&t.alternate.child===t.child,a=0,u=0;if(r)for(var p=t.child;p!==null;)a|=p.lanes|p.childLanes,u|=p.subtreeFlags&65011712,u|=p.flags&65011712,p.return=t,p=p.sibling;else for(p=t.child;p!==null;)a|=p.lanes|p.childLanes,u|=p.subtreeFlags,u|=p.flags,p.return=t,p=p.sibling;return t.subtreeFlags|=u,t.childLanes=a,r}function ak(t,r,a){var u=r.pendingProps;switch(sf(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return it(r),null;case 1:return it(r),null;case 3:return a=r.stateNode,u=null,t!==null&&(u=t.memoizedState.cache),r.memoizedState.cache!==u&&(r.flags|=2048),Tr(yt),xe(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(t===null||t.child===null)&&(Ai(r)?Or(r):t===null||t.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,cf())),it(r),null;case 26:var p=r.type,m=r.memoizedState;return t===null?(Or(r),m!==null?(it(r),Py(r,m)):(it(r),ed(r,p,null,u,a))):m?m!==t.memoizedState?(Or(r),it(r),Py(r,m)):(it(r),r.flags&=-16777217):(t=t.memoizedProps,t!==u&&Or(r),it(r),ed(r,p,t,u,a)),null;case 27:if(rt(r),a=ue.current,p=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==u&&Or(r);else{if(!u){if(r.stateNode===null)throw Error(i(166));return it(r),null}t=se.current,Ai(r)?vg(r):(t=$x(p,u,a),r.stateNode=t,Or(r))}return it(r),null;case 5:if(rt(r),p=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==u&&Or(r);else{if(!u){if(r.stateNode===null)throw Error(i(166));return it(r),null}if(m=se.current,Ai(r))vg(r);else{var S=Xs(ue.current);switch(m){case 1:m=S.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:m=S.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":m=S.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":m=S.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":m=S.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof u.is=="string"?S.createElement("select",{is:u.is}):S.createElement("select"),u.multiple?m.multiple=!0:u.size&&(m.size=u.size);break;default:m=typeof u.is=="string"?S.createElement(p,{is:u.is}):S.createElement(p)}}m[Ut]=r,m[tn]=u;e:for(S=r.child;S!==null;){if(S.tag===5||S.tag===6)m.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===r)break e;for(;S.sibling===null;){if(S.return===null||S.return===r)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}r.stateNode=m;e:switch(qt(m,p,u),p){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&Or(r)}}return it(r),ed(r,r.type,t===null?null:t.memoizedProps,r.pendingProps,a),null;case 6:if(t&&r.stateNode!=null)t.memoizedProps!==u&&Or(r);else{if(typeof u!="string"&&r.stateNode===null)throw Error(i(166));if(t=ue.current,Ai(r)){if(t=r.stateNode,a=r.memoizedProps,u=null,p=Ht,p!==null)switch(p.tag){case 27:case 5:u=p.memoizedProps}t[Ut]=r,t=!!(t.nodeValue===a||u!==null&&u.suppressHydrationWarning===!0||Lx(t.nodeValue,a)),t||Wr(r,!0)}else t=Xs(t).createTextNode(u),t[Ut]=r,r.stateNode=t}return it(r),null;case 31:if(a=r.memoizedState,t===null||t.memoizedState!==null){if(u=Ai(r),a!==null){if(t===null){if(!u)throw Error(i(318));if(t=r.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(i(557));t[Ut]=r}else Il(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;it(r),t=!1}else a=cf(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),t=!0;if(!t)return r.flags&256?(yn(r),r):(yn(r),null);if((r.flags&128)!==0)throw Error(i(558))}return it(r),null;case 13:if(u=r.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(p=Ai(r),u!==null&&u.dehydrated!==null){if(t===null){if(!p)throw Error(i(318));if(p=r.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(i(317));p[Ut]=r}else Il(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;it(r),p=!1}else p=cf(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=p),p=!0;if(!p)return r.flags&256?(yn(r),r):(yn(r),null)}return yn(r),(r.flags&128)!==0?(r.lanes=a,r):(a=u!==null,t=t!==null&&t.memoizedState!==null,a&&(u=r.child,p=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(p=u.alternate.memoizedState.cachePool.pool),m=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(m=u.memoizedState.cachePool.pool),m!==p&&(u.flags|=2048)),a!==t&&a&&(r.child.flags|=8192),Ds(r,r.updateQueue),it(r),null);case 4:return xe(),t===null&&Sd(r.stateNode.containerInfo),it(r),null;case 10:return Tr(r.type),it(r),null;case 19:if(L(mt),u=r.memoizedState,u===null)return it(r),null;if(p=(r.flags&128)!==0,m=u.rendering,m===null)if(p)Va(u,!1);else{if(ct!==0||t!==null&&(t.flags&128)!==0)for(t=r.child;t!==null;){if(m=bs(t),m!==null){for(r.flags|=128,Va(u,!1),t=m.updateQueue,r.updateQueue=t,Ds(r,t),r.subtreeFlags=0,t=a,a=r.child;a!==null;)pg(a,t),a=a.sibling;return T(mt,mt.current&1|2),He&&Nr(r,u.treeForkCount),r.child}t=t.sibling}u.tail!==null&&ft()>Us&&(r.flags|=128,p=!0,Va(u,!1),r.lanes=4194304)}else{if(!p)if(t=bs(m),t!==null){if(r.flags|=128,p=!0,t=t.updateQueue,r.updateQueue=t,Ds(r,t),Va(u,!0),u.tail===null&&u.tailMode==="hidden"&&!m.alternate&&!He)return it(r),null}else 2*ft()-u.renderingStartTime>Us&&a!==536870912&&(r.flags|=128,p=!0,Va(u,!1),r.lanes=4194304);u.isBackwards?(m.sibling=r.child,r.child=m):(t=u.last,t!==null?t.sibling=m:r.child=m,u.last=m)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=ft(),t.sibling=null,a=mt.current,T(mt,p?a&1|2:a&1),He&&Nr(r,u.treeForkCount),t):(it(r),null);case 22:case 23:return yn(r),Cf(),u=r.memoizedState!==null,t!==null?t.memoizedState!==null!==u&&(r.flags|=8192):u&&(r.flags|=8192),u?(a&536870912)!==0&&(r.flags&128)===0&&(it(r),r.subtreeFlags&6&&(r.flags|=8192)):it(r),a=r.updateQueue,a!==null&&Ds(r,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),u=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),u!==a&&(r.flags|=2048),t!==null&&L(Vl),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),r.memoizedState.cache!==a&&(r.flags|=2048),Tr(yt),it(r),null;case 25:return null;case 30:return null}throw Error(i(156,r.tag))}function ok(t,r){switch(sf(r),r.tag){case 1:return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return Tr(yt),xe(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 26:case 27:case 5:return rt(r),null;case 31:if(r.memoizedState!==null){if(yn(r),r.alternate===null)throw Error(i(340));Il()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 13:if(yn(r),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(i(340));Il()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return L(mt),null;case 4:return xe(),null;case 10:return Tr(r.type),null;case 22:case 23:return yn(r),Cf(),t!==null&&L(Vl),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 24:return Tr(yt),null;case 25:return null;default:return null}}function Iy(t,r){switch(sf(r),r.tag){case 3:Tr(yt),xe();break;case 26:case 27:case 5:rt(r);break;case 4:xe();break;case 31:r.memoizedState!==null&&yn(r);break;case 13:yn(r);break;case 19:L(mt);break;case 10:Tr(r.type);break;case 22:case 23:yn(r),Cf(),t!==null&&L(Vl);break;case 24:Tr(yt)}}function Ga(t,r){try{var a=r.updateQueue,u=a!==null?a.lastEffect:null;if(u!==null){var p=u.next;a=p;do{if((a.tag&t)===t){u=void 0;var m=a.create,S=a.inst;u=m(),S.destroy=u}a=a.next}while(a!==p)}}catch(A){Qe(r,r.return,A)}}function al(t,r,a){try{var u=r.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var m=p.next;u=m;do{if((u.tag&t)===t){var S=u.inst,A=S.destroy;if(A!==void 0){S.destroy=void 0,p=r;var _=a,G=A;try{G()}catch(ee){Qe(p,_,ee)}}}u=u.next}while(u!==m)}}catch(ee){Qe(r,r.return,ee)}}function qy(t){var r=t.updateQueue;if(r!==null){var a=t.stateNode;try{Og(r,a)}catch(u){Qe(t,t.return,u)}}}function Fy(t,r,a){a.props=Ql(t.type,t.memoizedProps),a.state=t.memoizedState;try{a.componentWillUnmount()}catch(u){Qe(t,r,u)}}function Ya(t,r){try{var a=t.ref;if(a!==null){switch(t.tag){case 26:case 27:case 5:var u=t.stateNode;break;case 30:u=t.stateNode;break;default:u=t.stateNode}typeof a=="function"?t.refCleanup=a(u):a.current=u}}catch(p){Qe(t,r,p)}}function sr(t,r){var a=t.ref,u=t.refCleanup;if(a!==null)if(typeof u=="function")try{u()}catch(p){Qe(t,r,p)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(p){Qe(t,r,p)}else a.current=null}function Vy(t){var r=t.type,a=t.memoizedProps,u=t.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":a.autoFocus&&u.focus();break e;case"img":a.src?u.src=a.src:a.srcSet&&(u.srcset=a.srcSet)}}catch(p){Qe(t,t.return,p)}}function td(t,r,a){try{var u=t.stateNode;Rk(u,t.type,a,r),u[tn]=r}catch(p){Qe(t,t.return,p)}}function Gy(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&hl(t.type)||t.tag===4}function nd(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Gy(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&hl(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function rd(t,r,a){var u=t.tag;if(u===5||u===6)t=t.stateNode,r?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(t,r):(r=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,r.appendChild(t),a=a._reactRootContainer,a!=null||r.onclick!==null||(r.onclick=Cr));else if(u!==4&&(u===27&&hl(t.type)&&(a=t.stateNode,r=null),t=t.child,t!==null))for(rd(t,r,a),t=t.sibling;t!==null;)rd(t,r,a),t=t.sibling}function _s(t,r,a){var u=t.tag;if(u===5||u===6)t=t.stateNode,r?a.insertBefore(t,r):a.appendChild(t);else if(u!==4&&(u===27&&hl(t.type)&&(a=t.stateNode),t=t.child,t!==null))for(_s(t,r,a),t=t.sibling;t!==null;)_s(t,r,a),t=t.sibling}function Yy(t){var r=t.stateNode,a=t.memoizedProps;try{for(var u=t.type,p=r.attributes;p.length;)r.removeAttributeNode(p[0]);qt(r,u,a),r[Ut]=t,r[tn]=a}catch(m){Qe(t,t.return,m)}}var Dr=!1,bt=!1,ld=!1,$y=typeof WeakSet=="function"?WeakSet:Set,Mt=null;function sk(t,r){if(t=t.containerInfo,Ed=tu,t=ig(t),Kc(t)){if("selectionStart"in t)var a={start:t.selectionStart,end:t.selectionEnd};else e:{a=(a=t.ownerDocument)&&a.defaultView||window;var u=a.getSelection&&a.getSelection();if(u&&u.rangeCount!==0){a=u.anchorNode;var p=u.anchorOffset,m=u.focusNode;u=u.focusOffset;try{a.nodeType,m.nodeType}catch{a=null;break e}var S=0,A=-1,_=-1,G=0,ee=0,ae=t,X=null;t:for(;;){for(var K;ae!==a||p!==0&&ae.nodeType!==3||(A=S+p),ae!==m||u!==0&&ae.nodeType!==3||(_=S+u),ae.nodeType===3&&(S+=ae.nodeValue.length),(K=ae.firstChild)!==null;)X=ae,ae=K;for(;;){if(ae===t)break t;if(X===a&&++G===p&&(A=S),X===m&&++ee===u&&(_=S),(K=ae.nextSibling)!==null)break;ae=X,X=ae.parentNode}ae=K}a=A===-1||_===-1?null:{start:A,end:_}}else a=null}a=a||{start:0,end:0}}else a=null;for(Nd={focusedElem:t,selectionRange:a},tu=!1,Mt=r;Mt!==null;)if(r=Mt,t=r.child,(r.subtreeFlags&1028)!==0&&t!==null)t.return=r,Mt=t;else for(;Mt!==null;){switch(r=Mt,m=r.alternate,t=r.flags,r.tag){case 0:if((t&4)!==0&&(t=r.updateQueue,t=t!==null?t.events:null,t!==null))for(a=0;a<t.length;a++)p=t[a],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&m!==null){t=void 0,a=r,p=m.memoizedProps,m=m.memoizedState,u=a.stateNode;try{var pe=Ql(a.type,p);t=u.getSnapshotBeforeUpdate(pe,m),u.__reactInternalSnapshotBeforeUpdate=t}catch(ke){Qe(a,a.return,ke)}}break;case 3:if((t&1024)!==0){if(t=r.stateNode.containerInfo,a=t.nodeType,a===9)Rd(t);else if(a===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Rd(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(i(163))}if(t=r.sibling,t!==null){t.return=r.return,Mt=t;break}Mt=r.return}}function Xy(t,r,a){var u=a.flags;switch(a.tag){case 0:case 11:case 15:zr(t,a),u&4&&Ga(5,a);break;case 1:if(zr(t,a),u&4)if(t=a.stateNode,r===null)try{t.componentDidMount()}catch(S){Qe(a,a.return,S)}else{var p=Ql(a.type,r.memoizedProps);r=r.memoizedState;try{t.componentDidUpdate(p,r,t.__reactInternalSnapshotBeforeUpdate)}catch(S){Qe(a,a.return,S)}}u&64&&qy(a),u&512&&Ya(a,a.return);break;case 3:if(zr(t,a),u&64&&(t=a.updateQueue,t!==null)){if(r=null,a.child!==null)switch(a.child.tag){case 27:case 5:r=a.child.stateNode;break;case 1:r=a.child.stateNode}try{Og(t,r)}catch(S){Qe(a,a.return,S)}}break;case 27:r===null&&u&4&&Yy(a);case 26:case 5:zr(t,a),r===null&&u&4&&Vy(a),u&512&&Ya(a,a.return);break;case 12:zr(t,a);break;case 31:zr(t,a),u&4&&Zy(t,a);break;case 13:zr(t,a),u&4&&Jy(t,a),u&64&&(t=a.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(a=yk.bind(null,a),Bk(t,a))));break;case 22:if(u=a.memoizedState!==null||Dr,!u){r=r!==null&&r.memoizedState!==null||bt,p=Dr;var m=bt;Dr=u,(bt=r)&&!m?Lr(t,a,(a.subtreeFlags&8772)!==0):zr(t,a),Dr=p,bt=m}break;case 30:break;default:zr(t,a)}}function Qy(t){var r=t.alternate;r!==null&&(t.alternate=null,Qy(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&Dc(r)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var ot=null,rn=!1;function _r(t,r,a){for(a=a.child;a!==null;)Ky(t,r,a),a=a.sibling}function Ky(t,r,a){if(dt&&typeof dt.onCommitFiberUnmount=="function")try{dt.onCommitFiberUnmount(Bt,a)}catch{}switch(a.tag){case 26:bt||sr(a,r),_r(t,r,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:bt||sr(a,r);var u=ot,p=rn;hl(a.type)&&(ot=a.stateNode,rn=!1),_r(t,r,a),to(a.stateNode),ot=u,rn=p;break;case 5:bt||sr(a,r);case 6:if(u=ot,p=rn,ot=null,_r(t,r,a),ot=u,rn=p,ot!==null)if(rn)try{(ot.nodeType===9?ot.body:ot.nodeName==="HTML"?ot.ownerDocument.body:ot).removeChild(a.stateNode)}catch(m){Qe(a,r,m)}else try{ot.removeChild(a.stateNode)}catch(m){Qe(a,r,m)}break;case 18:ot!==null&&(rn?(t=ot,qx(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,a.stateNode),Xi(t)):qx(ot,a.stateNode));break;case 4:u=ot,p=rn,ot=a.stateNode.containerInfo,rn=!0,_r(t,r,a),ot=u,rn=p;break;case 0:case 11:case 14:case 15:al(2,a,r),bt||al(4,a,r),_r(t,r,a);break;case 1:bt||(sr(a,r),u=a.stateNode,typeof u.componentWillUnmount=="function"&&Fy(a,r,u)),_r(t,r,a);break;case 21:_r(t,r,a);break;case 22:bt=(u=bt)||a.memoizedState!==null,_r(t,r,a),bt=u;break;default:_r(t,r,a)}}function Zy(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Xi(t)}catch(a){Qe(r,r.return,a)}}}function Jy(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Xi(t)}catch(a){Qe(r,r.return,a)}}function uk(t){switch(t.tag){case 31:case 13:case 19:var r=t.stateNode;return r===null&&(r=t.stateNode=new $y),r;case 22:return t=t.stateNode,r=t._retryCache,r===null&&(r=t._retryCache=new $y),r;default:throw Error(i(435,t.tag))}}function zs(t,r){var a=uk(t);r.forEach(function(u){if(!a.has(u)){a.add(u);var p=xk.bind(null,t,u);u.then(p,p)}})}function ln(t,r){var a=r.deletions;if(a!==null)for(var u=0;u<a.length;u++){var p=a[u],m=t,S=r,A=S;e:for(;A!==null;){switch(A.tag){case 27:if(hl(A.type)){ot=A.stateNode,rn=!1;break e}break;case 5:ot=A.stateNode,rn=!1;break e;case 3:case 4:ot=A.stateNode.containerInfo,rn=!0;break e}A=A.return}if(ot===null)throw Error(i(160));Ky(m,S,p),ot=null,rn=!1,m=p.alternate,m!==null&&(m.return=null),p.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)Wy(r,t),r=r.sibling}var Xn=null;function Wy(t,r){var a=t.alternate,u=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:ln(r,t),an(t),u&4&&(al(3,t,t.return),Ga(3,t),al(5,t,t.return));break;case 1:ln(r,t),an(t),u&512&&(bt||a===null||sr(a,a.return)),u&64&&Dr&&(t=t.updateQueue,t!==null&&(u=t.callbacks,u!==null&&(a=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=a===null?u:a.concat(u))));break;case 26:var p=Xn;if(ln(r,t),an(t),u&512&&(bt||a===null||sr(a,a.return)),u&4){var m=a!==null?a.memoizedState:null;if(u=t.memoizedState,a===null)if(u===null)if(t.stateNode===null){e:{u=t.type,a=t.memoizedProps,p=p.ownerDocument||p;t:switch(u){case"title":m=p.getElementsByTagName("title")[0],(!m||m[va]||m[Ut]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=p.createElement(u),p.head.insertBefore(m,p.querySelector("head > title"))),qt(m,u,a),m[Ut]=t,jt(m),u=m;break e;case"link":var S=Wx("link","href",p).get(u+(a.href||""));if(S){for(var A=0;A<S.length;A++)if(m=S[A],m.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&m.getAttribute("rel")===(a.rel==null?null:a.rel)&&m.getAttribute("title")===(a.title==null?null:a.title)&&m.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){S.splice(A,1);break t}}m=p.createElement(u),qt(m,u,a),p.head.appendChild(m);break;case"meta":if(S=Wx("meta","content",p).get(u+(a.content||""))){for(A=0;A<S.length;A++)if(m=S[A],m.getAttribute("content")===(a.content==null?null:""+a.content)&&m.getAttribute("name")===(a.name==null?null:a.name)&&m.getAttribute("property")===(a.property==null?null:a.property)&&m.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&m.getAttribute("charset")===(a.charSet==null?null:a.charSet)){S.splice(A,1);break t}}m=p.createElement(u),qt(m,u,a),p.head.appendChild(m);break;default:throw Error(i(468,u))}m[Ut]=t,jt(m),u=m}t.stateNode=u}else ev(p,t.type,t.stateNode);else t.stateNode=Jx(p,u,t.memoizedProps);else m!==u?(m===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):m.count--,u===null?ev(p,t.type,t.stateNode):Jx(p,u,t.memoizedProps)):u===null&&t.stateNode!==null&&td(t,t.memoizedProps,a.memoizedProps)}break;case 27:ln(r,t),an(t),u&512&&(bt||a===null||sr(a,a.return)),a!==null&&u&4&&td(t,t.memoizedProps,a.memoizedProps);break;case 5:if(ln(r,t),an(t),u&512&&(bt||a===null||sr(a,a.return)),t.flags&32){p=t.stateNode;try{yi(p,"")}catch(pe){Qe(t,t.return,pe)}}u&4&&t.stateNode!=null&&(p=t.memoizedProps,td(t,p,a!==null?a.memoizedProps:p)),u&1024&&(ld=!0);break;case 6:if(ln(r,t),an(t),u&4){if(t.stateNode===null)throw Error(i(162));u=t.memoizedProps,a=t.stateNode;try{a.nodeValue=u}catch(pe){Qe(t,t.return,pe)}}break;case 3:if(Zs=null,p=Xn,Xn=Qs(r.containerInfo),ln(r,t),Xn=p,an(t),u&4&&a!==null&&a.memoizedState.isDehydrated)try{Xi(r.containerInfo)}catch(pe){Qe(t,t.return,pe)}ld&&(ld=!1,ex(t));break;case 4:u=Xn,Xn=Qs(t.stateNode.containerInfo),ln(r,t),an(t),Xn=u;break;case 12:ln(r,t),an(t);break;case 31:ln(r,t),an(t),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,zs(t,u)));break;case 13:ln(r,t),an(t),t.child.flags&8192&&t.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Bs=ft()),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,zs(t,u)));break;case 22:p=t.memoizedState!==null;var _=a!==null&&a.memoizedState!==null,G=Dr,ee=bt;if(Dr=G||p,bt=ee||_,ln(r,t),bt=ee,Dr=G,an(t),u&8192)e:for(r=t.stateNode,r._visibility=p?r._visibility&-2:r._visibility|1,p&&(a===null||_||Dr||bt||Kl(t)),a=null,r=t;;){if(r.tag===5||r.tag===26){if(a===null){_=a=r;try{if(m=_.stateNode,p)S=m.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{A=_.stateNode;var ae=_.memoizedProps.style,X=ae!=null&&ae.hasOwnProperty("display")?ae.display:null;A.style.display=X==null||typeof X=="boolean"?"":(""+X).trim()}}catch(pe){Qe(_,_.return,pe)}}}else if(r.tag===6){if(a===null){_=r;try{_.stateNode.nodeValue=p?"":_.memoizedProps}catch(pe){Qe(_,_.return,pe)}}}else if(r.tag===18){if(a===null){_=r;try{var K=_.stateNode;p?Fx(K,!0):Fx(_.stateNode,!1)}catch(pe){Qe(_,_.return,pe)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===t)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;a===r&&(a=null),r=r.return}a===r&&(a=null),r.sibling.return=r.return,r=r.sibling}u&4&&(u=t.updateQueue,u!==null&&(a=u.retryQueue,a!==null&&(u.retryQueue=null,zs(t,a))));break;case 19:ln(r,t),an(t),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,zs(t,u)));break;case 30:break;case 21:break;default:ln(r,t),an(t)}}function an(t){var r=t.flags;if(r&2){try{for(var a,u=t.return;u!==null;){if(Gy(u)){a=u;break}u=u.return}if(a==null)throw Error(i(160));switch(a.tag){case 27:var p=a.stateNode,m=nd(t);_s(t,m,p);break;case 5:var S=a.stateNode;a.flags&32&&(yi(S,""),a.flags&=-33);var A=nd(t);_s(t,A,S);break;case 3:case 4:var _=a.stateNode.containerInfo,G=nd(t);rd(t,G,_);break;default:throw Error(i(161))}}catch(ee){Qe(t,t.return,ee)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function ex(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var r=t;ex(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),t=t.sibling}}function zr(t,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)Xy(t,r.alternate,r),r=r.sibling}function Kl(t){for(t=t.child;t!==null;){var r=t;switch(r.tag){case 0:case 11:case 14:case 15:al(4,r,r.return),Kl(r);break;case 1:sr(r,r.return);var a=r.stateNode;typeof a.componentWillUnmount=="function"&&Fy(r,r.return,a),Kl(r);break;case 27:to(r.stateNode);case 26:case 5:sr(r,r.return),Kl(r);break;case 22:r.memoizedState===null&&Kl(r);break;case 30:Kl(r);break;default:Kl(r)}t=t.sibling}}function Lr(t,r,a){for(a=a&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var u=r.alternate,p=t,m=r,S=m.flags;switch(m.tag){case 0:case 11:case 15:Lr(p,m,a),Ga(4,m);break;case 1:if(Lr(p,m,a),u=m,p=u.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(G){Qe(u,u.return,G)}if(u=m,p=u.updateQueue,p!==null){var A=u.stateNode;try{var _=p.shared.hiddenCallbacks;if(_!==null)for(p.shared.hiddenCallbacks=null,p=0;p<_.length;p++)Mg(_[p],A)}catch(G){Qe(u,u.return,G)}}a&&S&64&&qy(m),Ya(m,m.return);break;case 27:Yy(m);case 26:case 5:Lr(p,m,a),a&&u===null&&S&4&&Vy(m),Ya(m,m.return);break;case 12:Lr(p,m,a);break;case 31:Lr(p,m,a),a&&S&4&&Zy(p,m);break;case 13:Lr(p,m,a),a&&S&4&&Jy(p,m);break;case 22:m.memoizedState===null&&Lr(p,m,a),Ya(m,m.return);break;case 30:break;default:Lr(p,m,a)}r=r.sibling}}function id(t,r){var a=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),t=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(t=r.memoizedState.cachePool.pool),t!==a&&(t!=null&&t.refCount++,a!=null&&Oa(a))}function ad(t,r){t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&Oa(t))}function Qn(t,r,a,u){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)tx(t,r,a,u),r=r.sibling}function tx(t,r,a,u){var p=r.flags;switch(r.tag){case 0:case 11:case 15:Qn(t,r,a,u),p&2048&&Ga(9,r);break;case 1:Qn(t,r,a,u);break;case 3:Qn(t,r,a,u),p&2048&&(t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&Oa(t)));break;case 12:if(p&2048){Qn(t,r,a,u),t=r.stateNode;try{var m=r.memoizedProps,S=m.id,A=m.onPostCommit;typeof A=="function"&&A(S,r.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(_){Qe(r,r.return,_)}}else Qn(t,r,a,u);break;case 31:Qn(t,r,a,u);break;case 13:Qn(t,r,a,u);break;case 23:break;case 22:m=r.stateNode,S=r.alternate,r.memoizedState!==null?m._visibility&2?Qn(t,r,a,u):$a(t,r):m._visibility&2?Qn(t,r,a,u):(m._visibility|=2,Bi(t,r,a,u,(r.subtreeFlags&10256)!==0||!1)),p&2048&&id(S,r);break;case 24:Qn(t,r,a,u),p&2048&&ad(r.alternate,r);break;default:Qn(t,r,a,u)}}function Bi(t,r,a,u,p){for(p=p&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var m=t,S=r,A=a,_=u,G=S.flags;switch(S.tag){case 0:case 11:case 15:Bi(m,S,A,_,p),Ga(8,S);break;case 23:break;case 22:var ee=S.stateNode;S.memoizedState!==null?ee._visibility&2?Bi(m,S,A,_,p):$a(m,S):(ee._visibility|=2,Bi(m,S,A,_,p)),p&&G&2048&&id(S.alternate,S);break;case 24:Bi(m,S,A,_,p),p&&G&2048&&ad(S.alternate,S);break;default:Bi(m,S,A,_,p)}r=r.sibling}}function $a(t,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var a=t,u=r,p=u.flags;switch(u.tag){case 22:$a(a,u),p&2048&&id(u.alternate,u);break;case 24:$a(a,u),p&2048&&ad(u.alternate,u);break;default:$a(a,u)}r=r.sibling}}var Xa=8192;function Ui(t,r,a){if(t.subtreeFlags&Xa)for(t=t.child;t!==null;)nx(t,r,a),t=t.sibling}function nx(t,r,a){switch(t.tag){case 26:Ui(t,r,a),t.flags&Xa&&t.memoizedState!==null&&Qk(a,Xn,t.memoizedState,t.memoizedProps);break;case 5:Ui(t,r,a);break;case 3:case 4:var u=Xn;Xn=Qs(t.stateNode.containerInfo),Ui(t,r,a),Xn=u;break;case 22:t.memoizedState===null&&(u=t.alternate,u!==null&&u.memoizedState!==null?(u=Xa,Xa=16777216,Ui(t,r,a),Xa=u):Ui(t,r,a));break;default:Ui(t,r,a)}}function rx(t){var r=t.alternate;if(r!==null&&(t=r.child,t!==null)){r.child=null;do r=t.sibling,t.sibling=null,t=r;while(t!==null)}}function Qa(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var a=0;a<r.length;a++){var u=r[a];Mt=u,ix(u,t)}rx(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)lx(t),t=t.sibling}function lx(t){switch(t.tag){case 0:case 11:case 15:Qa(t),t.flags&2048&&al(9,t,t.return);break;case 3:Qa(t);break;case 12:Qa(t);break;case 22:var r=t.stateNode;t.memoizedState!==null&&r._visibility&2&&(t.return===null||t.return.tag!==13)?(r._visibility&=-3,Ls(t)):Qa(t);break;default:Qa(t)}}function Ls(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var a=0;a<r.length;a++){var u=r[a];Mt=u,ix(u,t)}rx(t)}for(t=t.child;t!==null;){switch(r=t,r.tag){case 0:case 11:case 15:al(8,r,r.return),Ls(r);break;case 22:a=r.stateNode,a._visibility&2&&(a._visibility&=-3,Ls(r));break;default:Ls(r)}t=t.sibling}}function ix(t,r){for(;Mt!==null;){var a=Mt;switch(a.tag){case 0:case 11:case 15:al(8,a,r);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var u=a.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:Oa(a.memoizedState.cache)}if(u=a.child,u!==null)u.return=a,Mt=u;else e:for(a=t;Mt!==null;){u=Mt;var p=u.sibling,m=u.return;if(Qy(u),u===a){Mt=null;break e}if(p!==null){p.return=m,Mt=p;break e}Mt=m}}}var ck={getCacheForType:function(t){var r=Pt(yt),a=r.data.get(t);return a===void 0&&(a=t(),r.data.set(t,a)),a},cacheSignal:function(){return Pt(yt).controller.signal}},fk=typeof WeakMap=="function"?WeakMap:Map,Ve=0,We=null,_e=null,Be=0,Xe=0,xn=null,ol=!1,Hi=!1,od=!1,Br=0,ct=0,sl=0,Zl=0,sd=0,vn=0,Pi=0,Ka=null,on=null,ud=!1,Bs=0,ax=0,Us=1/0,Hs=null,ul=null,Ct=0,cl=null,Ii=null,Ur=0,cd=0,fd=null,ox=null,Za=0,dd=null;function bn(){return(Ve&2)!==0&&Be!==0?Be&-Be:B.T!==null?xd():Yn()}function sx(){if(vn===0)if((Be&536870912)===0||He){var t=ci;ci<<=1,(ci&3932160)===0&&(ci=262144),vn=t}else vn=536870912;return t=gn.current,t!==null&&(t.flags|=32),vn}function sn(t,r,a){(t===We&&(Xe===2||Xe===9)||t.cancelPendingCommit!==null)&&(qi(t,0),fl(t,Be,vn,!1)),An(t,a),((Ve&2)===0||t!==We)&&(t===We&&((Ve&2)===0&&(Zl|=a),ct===4&&fl(t,Be,vn,!1)),ur(t))}function ux(t,r,a){if((Ve&6)!==0)throw Error(i(327));var u=!a&&(r&127)===0&&(r&t.expiredLanes)===0||Jt(t,r),p=u?pk(t,r):pd(t,r,!0),m=u;do{if(p===0){Hi&&!u&&fl(t,r,0,!1);break}else{if(a=t.current.alternate,m&&!dk(a)){p=pd(t,r,!1),m=!1;continue}if(p===2){if(m=r,t.errorRecoveryDisabledLanes&m)var S=0;else S=t.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){r=S;e:{var A=t;p=Ka;var _=A.current.memoizedState.isDehydrated;if(_&&(qi(A,S).flags|=256),S=pd(A,S,!1),S!==2){if(od&&!_){A.errorRecoveryDisabledLanes|=m,Zl|=m,p=4;break e}m=on,on=p,m!==null&&(on===null?on=m:on.push.apply(on,m))}p=S}if(m=!1,p!==2)continue}}if(p===1){qi(t,0),fl(t,r,0,!0);break}e:{switch(u=t,m=p,m){case 0:case 1:throw Error(i(345));case 4:if((r&4194048)!==r)break;case 6:fl(u,r,vn,!ol);break e;case 2:on=null;break;case 3:case 5:break;default:throw Error(i(329))}if((r&62914560)===r&&(p=Bs+300-ft(),10<p)){if(fl(u,r,vn,!ol),Rt(u,0,!0)!==0)break e;Ur=r,u.timeoutHandle=Px(cx.bind(null,u,a,on,Hs,ud,r,vn,Zl,Pi,ol,m,"Throttled",-0,0),p);break e}cx(u,a,on,Hs,ud,r,vn,Zl,Pi,ol,m,null,-0,0)}}break}while(!0);ur(t)}function cx(t,r,a,u,p,m,S,A,_,G,ee,ae,X,K){if(t.timeoutHandle=-1,ae=r.subtreeFlags,ae&8192||(ae&16785408)===16785408){ae={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Cr},nx(r,m,ae);var pe=(m&62914560)===m?Bs-ft():(m&4194048)===m?ax-ft():0;if(pe=Kk(ae,pe),pe!==null){Ur=m,t.cancelPendingCommit=pe(xx.bind(null,t,r,m,a,u,p,S,A,_,ee,ae,null,X,K)),fl(t,m,S,!G);return}}xx(t,r,m,a,u,p,S,A,_)}function dk(t){for(var r=t;;){var a=r.tag;if((a===0||a===11||a===15)&&r.flags&16384&&(a=r.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var u=0;u<a.length;u++){var p=a[u],m=p.getSnapshot;p=p.value;try{if(!pn(m(),p))return!1}catch{return!1}}if(a=r.child,r.subtreeFlags&16384&&a!==null)a.return=r,r=a;else{if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function fl(t,r,a,u){r&=~sd,r&=~Zl,t.suspendedLanes|=r,t.pingedLanes&=~r,u&&(t.warmLanes|=r),u=t.expirationTimes;for(var p=r;0<p;){var m=31-$e(p),S=1<<m;u[m]=-1,p&=~S}a!==0&&Gn(t,a,r)}function Ps(){return(Ve&6)===0?(Ja(0),!1):!0}function hd(){if(_e!==null){if(Xe===0)var t=_e.return;else t=_e,Ar=ql=null,Rf(t),Oi=null,_a=0,t=_e;for(;t!==null;)Iy(t.alternate,t),t=t.return;_e=null}}function qi(t,r){var a=t.timeoutHandle;a!==-1&&(t.timeoutHandle=-1,Ok(a)),a=t.cancelPendingCommit,a!==null&&(t.cancelPendingCommit=null,a()),Ur=0,hd(),We=t,_e=a=Er(t.current,null),Be=r,Xe=0,xn=null,ol=!1,Hi=Jt(t,r),od=!1,Pi=vn=sd=Zl=sl=ct=0,on=Ka=null,ud=!1,(r&8)!==0&&(r|=r&32);var u=t.entangledLanes;if(u!==0)for(t=t.entanglements,u&=r;0<u;){var p=31-$e(u),m=1<<p;r|=t[p],u&=~m}return Br=r,os(),a}function fx(t,r){Re=null,B.H=qa,r===Mi||r===ms?(r=Ag(),Xe=3):r===yf?(r=Ag(),Xe=4):Xe=r===Gf?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,xn=r,_e===null&&(ct=1,Rs(t,Dn(r,t.current)))}function dx(){var t=gn.current;return t===null?!0:(Be&4194048)===Be?Bn===null:(Be&62914560)===Be||(Be&536870912)!==0?t===Bn:!1}function hx(){var t=B.H;return B.H=qa,t===null?qa:t}function px(){var t=B.A;return B.A=ck,t}function Is(){ct=4,ol||(Be&4194048)!==Be&&gn.current!==null||(Hi=!0),(sl&134217727)===0&&(Zl&134217727)===0||We===null||fl(We,Be,vn,!1)}function pd(t,r,a){var u=Ve;Ve|=2;var p=hx(),m=px();(We!==t||Be!==r)&&(Hs=null,qi(t,r)),r=!1;var S=ct;e:do try{if(Xe!==0&&_e!==null){var A=_e,_=xn;switch(Xe){case 8:hd(),S=6;break e;case 3:case 2:case 9:case 6:gn.current===null&&(r=!0);var G=Xe;if(Xe=0,xn=null,Fi(t,A,_,G),a&&Hi){S=0;break e}break;default:G=Xe,Xe=0,xn=null,Fi(t,A,_,G)}}hk(),S=ct;break}catch(ee){fx(t,ee)}while(!0);return r&&t.shellSuspendCounter++,Ar=ql=null,Ve=u,B.H=p,B.A=m,_e===null&&(We=null,Be=0,os()),S}function hk(){for(;_e!==null;)mx(_e)}function pk(t,r){var a=Ve;Ve|=2;var u=hx(),p=px();We!==t||Be!==r?(Hs=null,Us=ft()+500,qi(t,r)):Hi=Jt(t,r);e:do try{if(Xe!==0&&_e!==null){r=_e;var m=xn;t:switch(Xe){case 1:Xe=0,xn=null,Fi(t,r,m,1);break;case 2:case 9:if(Eg(m)){Xe=0,xn=null,gx(r);break}r=function(){Xe!==2&&Xe!==9||We!==t||(Xe=7),ur(t)},m.then(r,r);break e;case 3:Xe=7;break e;case 4:Xe=5;break e;case 7:Eg(m)?(Xe=0,xn=null,gx(r)):(Xe=0,xn=null,Fi(t,r,m,7));break;case 5:var S=null;switch(_e.tag){case 26:S=_e.memoizedState;case 5:case 27:var A=_e;if(S?tv(S):A.stateNode.complete){Xe=0,xn=null;var _=A.sibling;if(_!==null)_e=_;else{var G=A.return;G!==null?(_e=G,qs(G)):_e=null}break t}}Xe=0,xn=null,Fi(t,r,m,5);break;case 6:Xe=0,xn=null,Fi(t,r,m,6);break;case 8:hd(),ct=6;break e;default:throw Error(i(462))}}mk();break}catch(ee){fx(t,ee)}while(!0);return Ar=ql=null,B.H=u,B.A=p,Ve=a,_e!==null?0:(We=null,Be=0,os(),ct)}function mk(){for(;_e!==null&&!lr();)mx(_e)}function mx(t){var r=Hy(t.alternate,t,Br);t.memoizedProps=t.pendingProps,r===null?qs(t):_e=r}function gx(t){var r=t,a=r.alternate;switch(r.tag){case 15:case 0:r=Dy(a,r,r.pendingProps,r.type,void 0,Be);break;case 11:r=Dy(a,r,r.pendingProps,r.type.render,r.ref,Be);break;case 5:Rf(r);default:Iy(a,r),r=_e=pg(r,Br),r=Hy(a,r,Br)}t.memoizedProps=t.pendingProps,r===null?qs(t):_e=r}function Fi(t,r,a,u){Ar=ql=null,Rf(r),Oi=null,_a=0;var p=r.return;try{if(rk(t,p,r,a,Be)){ct=1,Rs(t,Dn(a,t.current)),_e=null;return}}catch(m){if(p!==null)throw _e=p,m;ct=1,Rs(t,Dn(a,t.current)),_e=null;return}r.flags&32768?(He||u===1?t=!0:Hi||(Be&536870912)!==0?t=!1:(ol=t=!0,(u===2||u===9||u===3||u===6)&&(u=gn.current,u!==null&&u.tag===13&&(u.flags|=16384))),yx(r,t)):qs(r)}function qs(t){var r=t;do{if((r.flags&32768)!==0){yx(r,ol);return}t=r.return;var a=ak(r.alternate,r,Br);if(a!==null){_e=a;return}if(r=r.sibling,r!==null){_e=r;return}_e=r=t}while(r!==null);ct===0&&(ct=5)}function yx(t,r){do{var a=ok(t.alternate,t);if(a!==null){a.flags&=32767,_e=a;return}if(a=t.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!r&&(t=t.sibling,t!==null)){_e=t;return}_e=t=a}while(t!==null);ct=6,_e=null}function xx(t,r,a,u,p,m,S,A,_){t.cancelPendingCommit=null;do Fs();while(Ct!==0);if((Ve&6)!==0)throw Error(i(327));if(r!==null){if(r===t.current)throw Error(i(177));if(m=r.lanes|r.childLanes,m|=tf,St(t,a,m,S,A,_),t===We&&(_e=We=null,Be=0),Ii=r,cl=t,Ur=a,cd=m,fd=p,ox=u,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,vk(oe,function(){return Cx(),null})):(t.callbackNode=null,t.callbackPriority=0),u=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||u){u=B.T,B.T=null,p=Y.p,Y.p=2,S=Ve,Ve|=4;try{sk(t,r,a)}finally{Ve=S,Y.p=p,B.T=u}}Ct=1,vx(),bx(),wx()}}function vx(){if(Ct===1){Ct=0;var t=cl,r=Ii,a=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||a){a=B.T,B.T=null;var u=Y.p;Y.p=2;var p=Ve;Ve|=4;try{Wy(r,t);var m=Nd,S=ig(t.containerInfo),A=m.focusedElem,_=m.selectionRange;if(S!==A&&A&&A.ownerDocument&&lg(A.ownerDocument.documentElement,A)){if(_!==null&&Kc(A)){var G=_.start,ee=_.end;if(ee===void 0&&(ee=G),"selectionStart"in A)A.selectionStart=G,A.selectionEnd=Math.min(ee,A.value.length);else{var ae=A.ownerDocument||document,X=ae&&ae.defaultView||window;if(X.getSelection){var K=X.getSelection(),pe=A.textContent.length,ke=Math.min(_.start,pe),Je=_.end===void 0?ke:Math.min(_.end,pe);!K.extend&&ke>Je&&(S=Je,Je=ke,ke=S);var F=rg(A,ke),U=rg(A,Je);if(F&&U&&(K.rangeCount!==1||K.anchorNode!==F.node||K.anchorOffset!==F.offset||K.focusNode!==U.node||K.focusOffset!==U.offset)){var V=ae.createRange();V.setStart(F.node,F.offset),K.removeAllRanges(),ke>Je?(K.addRange(V),K.extend(U.node,U.offset)):(V.setEnd(U.node,U.offset),K.addRange(V))}}}}for(ae=[],K=A;K=K.parentNode;)K.nodeType===1&&ae.push({element:K,left:K.scrollLeft,top:K.scrollTop});for(typeof A.focus=="function"&&A.focus(),A=0;A<ae.length;A++){var ie=ae[A];ie.element.scrollLeft=ie.left,ie.element.scrollTop=ie.top}}tu=!!Ed,Nd=Ed=null}finally{Ve=p,Y.p=u,B.T=a}}t.current=r,Ct=2}}function bx(){if(Ct===2){Ct=0;var t=cl,r=Ii,a=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||a){a=B.T,B.T=null;var u=Y.p;Y.p=2;var p=Ve;Ve|=4;try{Xy(t,r.alternate,r)}finally{Ve=p,Y.p=u,B.T=a}}Ct=3}}function wx(){if(Ct===4||Ct===3){Ct=0,$r();var t=cl,r=Ii,a=Ur,u=ox;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?Ct=5:(Ct=0,Ii=cl=null,Sx(t,t.pendingLanes));var p=t.pendingLanes;if(p===0&&(ul=null),wr(a),r=r.stateNode,dt&&typeof dt.onCommitFiberRoot=="function")try{dt.onCommitFiberRoot(Bt,r,void 0,(r.current.flags&128)===128)}catch{}if(u!==null){r=B.T,p=Y.p,Y.p=2,B.T=null;try{for(var m=t.onRecoverableError,S=0;S<u.length;S++){var A=u[S];m(A.value,{componentStack:A.stack})}}finally{B.T=r,Y.p=p}}(Ur&3)!==0&&Fs(),ur(t),p=t.pendingLanes,(a&261930)!==0&&(p&42)!==0?t===dd?Za++:(Za=0,dd=t):Za=0,Ja(0)}}function Sx(t,r){(t.pooledCacheLanes&=r)===0&&(r=t.pooledCache,r!=null&&(t.pooledCache=null,Oa(r)))}function Fs(){return vx(),bx(),wx(),Cx()}function Cx(){if(Ct!==5)return!1;var t=cl,r=cd;cd=0;var a=wr(Ur),u=B.T,p=Y.p;try{Y.p=32>a?32:a,B.T=null,a=fd,fd=null;var m=cl,S=Ur;if(Ct=0,Ii=cl=null,Ur=0,(Ve&6)!==0)throw Error(i(331));var A=Ve;if(Ve|=4,lx(m.current),tx(m,m.current,S,a),Ve=A,Ja(0,!1),dt&&typeof dt.onPostCommitFiberRoot=="function")try{dt.onPostCommitFiberRoot(Bt,m)}catch{}return!0}finally{Y.p=p,B.T=u,Sx(t,r)}}function kx(t,r,a){r=Dn(a,r),r=Vf(t.stateNode,r,2),t=rl(t,r,2),t!==null&&(An(t,2),ur(t))}function Qe(t,r,a){if(t.tag===3)kx(t,t,a);else for(;r!==null;){if(r.tag===3){kx(r,t,a);break}else if(r.tag===1){var u=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(ul===null||!ul.has(u))){t=Dn(a,t),a=Ey(2),u=rl(r,a,2),u!==null&&(Ny(a,u,r,t),An(u,2),ur(u));break}}r=r.return}}function md(t,r,a){var u=t.pingCache;if(u===null){u=t.pingCache=new fk;var p=new Set;u.set(r,p)}else p=u.get(r),p===void 0&&(p=new Set,u.set(r,p));p.has(a)||(od=!0,p.add(a),t=gk.bind(null,t,r,a),r.then(t,t))}function gk(t,r,a){var u=t.pingCache;u!==null&&u.delete(r),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,We===t&&(Be&a)===a&&(ct===4||ct===3&&(Be&62914560)===Be&&300>ft()-Bs?(Ve&2)===0&&qi(t,0):sd|=a,Pi===Be&&(Pi=0)),ur(t)}function Ex(t,r){r===0&&(r=Ft()),t=Hl(t,r),t!==null&&(An(t,r),ur(t))}function yk(t){var r=t.memoizedState,a=0;r!==null&&(a=r.retryLane),Ex(t,a)}function xk(t,r){var a=0;switch(t.tag){case 31:case 13:var u=t.stateNode,p=t.memoizedState;p!==null&&(a=p.retryLane);break;case 19:u=t.stateNode;break;case 22:u=t.stateNode._retryCache;break;default:throw Error(i(314))}u!==null&&u.delete(r),Ex(t,a)}function vk(t,r){return Lt(t,r)}var Vs=null,Vi=null,gd=!1,Gs=!1,yd=!1,dl=0;function ur(t){t!==Vi&&t.next===null&&(Vi===null?Vs=Vi=t:Vi=Vi.next=t),Gs=!0,gd||(gd=!0,wk())}function Ja(t,r){if(!yd&&Gs){yd=!0;do for(var a=!1,u=Vs;u!==null;){if(t!==0){var p=u.pendingLanes;if(p===0)var m=0;else{var S=u.suspendedLanes,A=u.pingedLanes;m=(1<<31-$e(42|t)+1)-1,m&=p&~(S&~A),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(a=!0,Rx(u,m))}else m=Be,m=Rt(u,u===We?m:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(m&3)===0||Jt(u,m)||(a=!0,Rx(u,m));u=u.next}while(a);yd=!1}}function bk(){Nx()}function Nx(){Gs=gd=!1;var t=0;dl!==0&&Mk()&&(t=dl);for(var r=ft(),a=null,u=Vs;u!==null;){var p=u.next,m=Ax(u,r);m===0?(u.next=null,a===null?Vs=p:a.next=p,p===null&&(Vi=a)):(a=u,(t!==0||(m&3)!==0)&&(Gs=!0)),u=p}Ct!==0&&Ct!==5||Ja(t),dl!==0&&(dl=0)}function Ax(t,r){for(var a=t.suspendedLanes,u=t.pingedLanes,p=t.expirationTimes,m=t.pendingLanes&-62914561;0<m;){var S=31-$e(m),A=1<<S,_=p[S];_===-1?((A&a)===0||(A&u)!==0)&&(p[S]=Wt(A,r)):_<=r&&(t.expiredLanes|=A),m&=~A}if(r=We,a=Be,a=Rt(t,t===r?a:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),u=t.callbackNode,a===0||t===r&&(Xe===2||Xe===9)||t.cancelPendingCommit!==null)return u!==null&&u!==null&&Nn(u),t.callbackNode=null,t.callbackPriority=0;if((a&3)===0||Jt(t,a)){if(r=a&-a,r===t.callbackPriority)return r;switch(u!==null&&Nn(u),wr(a)){case 2:case 8:a=$;break;case 32:a=oe;break;case 268435456:a=be;break;default:a=oe}return u=Tx.bind(null,t),a=Lt(a,u),t.callbackPriority=r,t.callbackNode=a,r}return u!==null&&u!==null&&Nn(u),t.callbackPriority=2,t.callbackNode=null,2}function Tx(t,r){if(Ct!==0&&Ct!==5)return t.callbackNode=null,t.callbackPriority=0,null;var a=t.callbackNode;if(Fs()&&t.callbackNode!==a)return null;var u=Be;return u=Rt(t,t===We?u:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),u===0?null:(ux(t,u,r),Ax(t,ft()),t.callbackNode!=null&&t.callbackNode===a?Tx.bind(null,t):null)}function Rx(t,r){if(Fs())return null;ux(t,r,!0)}function wk(){Dk(function(){(Ve&6)!==0?Lt(te,bk):Nx()})}function xd(){if(dl===0){var t=Ri;t===0&&(t=ui,ui<<=1,(ui&261888)===0&&(ui=256)),dl=t}return dl}function jx(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Wo(""+t)}function Mx(t,r){var a=r.ownerDocument.createElement("input");return a.name=r.name,a.value=r.value,t.id&&a.setAttribute("form",t.id),r.parentNode.insertBefore(a,r),t=new FormData(t),a.parentNode.removeChild(a),t}function Sk(t,r,a,u,p){if(r==="submit"&&a&&a.stateNode===p){var m=jx((p[tn]||null).action),S=u.submitter;S&&(r=(r=S[tn]||null)?jx(r.formAction):S.getAttribute("formAction"),r!==null&&(m=r,S=null));var A=new rs("action","action",null,u,p);t.push({event:A,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(dl!==0){var _=S?Mx(p,S):new FormData(p);Uf(a,{pending:!0,data:_,method:p.method,action:m},null,_)}}else typeof m=="function"&&(A.preventDefault(),_=S?Mx(p,S):new FormData(p),Uf(a,{pending:!0,data:_,method:p.method,action:m},m,_))},currentTarget:p}]})}}for(var vd=0;vd<ef.length;vd++){var bd=ef[vd],Ck=bd.toLowerCase(),kk=bd[0].toUpperCase()+bd.slice(1);$n(Ck,"on"+kk)}$n(sg,"onAnimationEnd"),$n(ug,"onAnimationIteration"),$n(cg,"onAnimationStart"),$n("dblclick","onDoubleClick"),$n("focusin","onFocus"),$n("focusout","onBlur"),$n(PC,"onTransitionRun"),$n(IC,"onTransitionStart"),$n(qC,"onTransitionCancel"),$n(fg,"onTransitionEnd"),mi("onMouseEnter",["mouseout","mouseover"]),mi("onMouseLeave",["mouseout","mouseover"]),mi("onPointerEnter",["pointerout","pointerover"]),mi("onPointerLeave",["pointerout","pointerover"]),zl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),zl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),zl("onBeforeInput",["compositionend","keypress","textInput","paste"]),zl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),zl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),zl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Wa="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(" "),Ek=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Wa));function Ox(t,r){r=(r&4)!==0;for(var a=0;a<t.length;a++){var u=t[a],p=u.event;u=u.listeners;e:{var m=void 0;if(r)for(var S=u.length-1;0<=S;S--){var A=u[S],_=A.instance,G=A.currentTarget;if(A=A.listener,_!==m&&p.isPropagationStopped())break e;m=A,p.currentTarget=G;try{m(p)}catch(ee){as(ee)}p.currentTarget=null,m=_}else for(S=0;S<u.length;S++){if(A=u[S],_=A.instance,G=A.currentTarget,A=A.listener,_!==m&&p.isPropagationStopped())break e;m=A,p.currentTarget=G;try{m(p)}catch(ee){as(ee)}p.currentTarget=null,m=_}}}}function ze(t,r){var a=r[Oc];a===void 0&&(a=r[Oc]=new Set);var u=t+"__bubble";a.has(u)||(Dx(r,t,2,!1),a.add(u))}function wd(t,r,a){var u=0;r&&(u|=4),Dx(a,t,u,r)}var Ys="_reactListening"+Math.random().toString(36).slice(2);function Sd(t){if(!t[Ys]){t[Ys]=!0,Nm.forEach(function(a){a!=="selectionchange"&&(Ek.has(a)||wd(a,!1,t),wd(a,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[Ys]||(r[Ys]=!0,wd("selectionchange",!1,r))}}function Dx(t,r,a,u){switch(sv(r)){case 2:var p=Wk;break;case 8:p=eE;break;default:p=Bd}a=p.bind(null,r,a,t),p=void 0,!Ic||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(p=!0),u?p!==void 0?t.addEventListener(r,a,{capture:!0,passive:p}):t.addEventListener(r,a,!0):p!==void 0?t.addEventListener(r,a,{passive:p}):t.addEventListener(r,a,!1)}function Cd(t,r,a,u,p){var m=u;if((r&1)===0&&(r&2)===0&&u!==null)e:for(;;){if(u===null)return;var S=u.tag;if(S===3||S===4){var A=u.stateNode.containerInfo;if(A===p)break;if(S===4)for(S=u.return;S!==null;){var _=S.tag;if((_===3||_===4)&&S.stateNode.containerInfo===p)return;S=S.return}for(;A!==null;){if(S=di(A),S===null)return;if(_=S.tag,_===5||_===6||_===26||_===27){u=m=S;continue e}A=A.parentNode}}u=u.return}Um(function(){var G=m,ee=Hc(a),ae=[];e:{var X=dg.get(t);if(X!==void 0){var K=rs,pe=t;switch(t){case"keypress":if(ts(a)===0)break e;case"keydown":case"keyup":K=xC;break;case"focusin":pe="focus",K=Gc;break;case"focusout":pe="blur",K=Gc;break;case"beforeblur":case"afterblur":K=Gc;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":K=Im;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":K=aC;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":K=wC;break;case sg:case ug:case cg:K=uC;break;case fg:K=CC;break;case"scroll":case"scrollend":K=lC;break;case"wheel":K=EC;break;case"copy":case"cut":case"paste":K=fC;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":K=Fm;break;case"toggle":case"beforetoggle":K=AC}var ke=(r&4)!==0,Je=!ke&&(t==="scroll"||t==="scrollend"),F=ke?X!==null?X+"Capture":null:X;ke=[];for(var U=G,V;U!==null;){var ie=U;if(V=ie.stateNode,ie=ie.tag,ie!==5&&ie!==26&&ie!==27||V===null||F===null||(ie=wa(U,F),ie!=null&&ke.push(eo(U,ie,V))),Je)break;U=U.return}0<ke.length&&(X=new K(X,pe,null,a,ee),ae.push({event:X,listeners:ke}))}}if((r&7)===0){e:{if(X=t==="mouseover"||t==="pointerover",K=t==="mouseout"||t==="pointerout",X&&a!==Uc&&(pe=a.relatedTarget||a.fromElement)&&(di(pe)||pe[fi]))break e;if((K||X)&&(X=ee.window===ee?ee:(X=ee.ownerDocument)?X.defaultView||X.parentWindow:window,K?(pe=a.relatedTarget||a.toElement,K=G,pe=pe?di(pe):null,pe!==null&&(Je=s(pe),ke=pe.tag,pe!==Je||ke!==5&&ke!==27&&ke!==6)&&(pe=null)):(K=null,pe=G),K!==pe)){if(ke=Im,ie="onMouseLeave",F="onMouseEnter",U="mouse",(t==="pointerout"||t==="pointerover")&&(ke=Fm,ie="onPointerLeave",F="onPointerEnter",U="pointer"),Je=K==null?X:ba(K),V=pe==null?X:ba(pe),X=new ke(ie,U+"leave",K,a,ee),X.target=Je,X.relatedTarget=V,ie=null,di(ee)===G&&(ke=new ke(F,U+"enter",pe,a,ee),ke.target=V,ke.relatedTarget=Je,ie=ke),Je=ie,K&&pe)t:{for(ke=Nk,F=K,U=pe,V=0,ie=F;ie;ie=ke(ie))V++;ie=0;for(var Se=U;Se;Se=ke(Se))ie++;for(;0<V-ie;)F=ke(F),V--;for(;0<ie-V;)U=ke(U),ie--;for(;V--;){if(F===U||U!==null&&F===U.alternate){ke=F;break t}F=ke(F),U=ke(U)}ke=null}else ke=null;K!==null&&_x(ae,X,K,ke,!1),pe!==null&&Je!==null&&_x(ae,Je,pe,ke,!0)}}e:{if(X=G?ba(G):window,K=X.nodeName&&X.nodeName.toLowerCase(),K==="select"||K==="input"&&X.type==="file")var Ie=Zm;else if(Qm(X))if(Jm)Ie=BC;else{Ie=zC;var ve=_C}else K=X.nodeName,!K||K.toLowerCase()!=="input"||X.type!=="checkbox"&&X.type!=="radio"?G&&Bc(G.elementType)&&(Ie=Zm):Ie=LC;if(Ie&&(Ie=Ie(t,G))){Km(ae,Ie,a,ee);break e}ve&&ve(t,X,G),t==="focusout"&&G&&X.type==="number"&&G.memoizedProps.value!=null&&Lc(X,"number",X.value)}switch(ve=G?ba(G):window,t){case"focusin":(Qm(ve)||ve.contentEditable==="true")&&(wi=ve,Zc=G,Ra=null);break;case"focusout":Ra=Zc=wi=null;break;case"mousedown":Jc=!0;break;case"contextmenu":case"mouseup":case"dragend":Jc=!1,ag(ae,a,ee);break;case"selectionchange":if(HC)break;case"keydown":case"keyup":ag(ae,a,ee)}var je;if($c)e:{switch(t){case"compositionstart":var Ue="onCompositionStart";break e;case"compositionend":Ue="onCompositionEnd";break e;case"compositionupdate":Ue="onCompositionUpdate";break e}Ue=void 0}else bi?$m(t,a)&&(Ue="onCompositionEnd"):t==="keydown"&&a.keyCode===229&&(Ue="onCompositionStart");Ue&&(Vm&&a.locale!=="ko"&&(bi||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&bi&&(je=Hm()):(Kr=ee,qc="value"in Kr?Kr.value:Kr.textContent,bi=!0)),ve=$s(G,Ue),0<ve.length&&(Ue=new qm(Ue,t,null,a,ee),ae.push({event:Ue,listeners:ve}),je?Ue.data=je:(je=Xm(a),je!==null&&(Ue.data=je)))),(je=RC?jC(t,a):MC(t,a))&&(Ue=$s(G,"onBeforeInput"),0<Ue.length&&(ve=new qm("onBeforeInput","beforeinput",null,a,ee),ae.push({event:ve,listeners:Ue}),ve.data=je)),Sk(ae,t,G,a,ee)}Ox(ae,r)})}function eo(t,r,a){return{instance:t,listener:r,currentTarget:a}}function $s(t,r){for(var a=r+"Capture",u=[];t!==null;){var p=t,m=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||m===null||(p=wa(t,a),p!=null&&u.unshift(eo(t,p,m)),p=wa(t,r),p!=null&&u.push(eo(t,p,m))),t.tag===3)return u;t=t.return}return[]}function Nk(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function _x(t,r,a,u,p){for(var m=r._reactName,S=[];a!==null&&a!==u;){var A=a,_=A.alternate,G=A.stateNode;if(A=A.tag,_!==null&&_===u)break;A!==5&&A!==26&&A!==27||G===null||(_=G,p?(G=wa(a,m),G!=null&&S.unshift(eo(a,G,_))):p||(G=wa(a,m),G!=null&&S.push(eo(a,G,_)))),a=a.return}S.length!==0&&t.push({event:r,listeners:S})}var Ak=/\r\n?/g,Tk=/\u0000|\uFFFD/g;function zx(t){return(typeof t=="string"?t:""+t).replace(Ak,`
|
|
49
|
+
`).replace(Tk,"")}function Lx(t,r){return r=zx(r),zx(t)===r}function Ze(t,r,a,u,p,m){switch(a){case"children":typeof u=="string"?r==="body"||r==="textarea"&&u===""||yi(t,u):(typeof u=="number"||typeof u=="bigint")&&r!=="body"&&yi(t,""+u);break;case"className":Zo(t,"class",u);break;case"tabIndex":Zo(t,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Zo(t,a,u);break;case"style":Lm(t,u,m);break;case"data":if(r!=="object"){Zo(t,"data",u);break}case"src":case"href":if(u===""&&(r!=="a"||a!=="href")){t.removeAttribute(a);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(a);break}u=Wo(""+u),t.setAttribute(a,u);break;case"action":case"formAction":if(typeof u=="function"){t.setAttribute(a,"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 m=="function"&&(a==="formAction"?(r!=="input"&&Ze(t,r,"name",p.name,p,null),Ze(t,r,"formEncType",p.formEncType,p,null),Ze(t,r,"formMethod",p.formMethod,p,null),Ze(t,r,"formTarget",p.formTarget,p,null)):(Ze(t,r,"encType",p.encType,p,null),Ze(t,r,"method",p.method,p,null),Ze(t,r,"target",p.target,p,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(a);break}u=Wo(""+u),t.setAttribute(a,u);break;case"onClick":u!=null&&(t.onclick=Cr);break;case"onScroll":u!=null&&ze("scroll",t);break;case"onScrollEnd":u!=null&&ze("scrollend",t);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(i(61));if(a=u.__html,a!=null){if(p.children!=null)throw Error(i(60));t.innerHTML=a}}break;case"multiple":t.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":t.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){t.removeAttribute("xlink:href");break}a=Wo(""+u),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(a,""+u):t.removeAttribute(a);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":u&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(a,""):t.removeAttribute(a);break;case"capture":case"download":u===!0?t.setAttribute(a,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(a,u):t.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?t.setAttribute(a,u):t.removeAttribute(a);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?t.removeAttribute(a):t.setAttribute(a,u);break;case"popover":ze("beforetoggle",t),ze("toggle",t),Ko(t,"popover",u);break;case"xlinkActuate":Sr(t,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Sr(t,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Sr(t,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Sr(t,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Sr(t,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Sr(t,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Sr(t,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Sr(t,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Sr(t,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Ko(t,"is",u);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=nC.get(a)||a,Ko(t,a,u))}}function kd(t,r,a,u,p,m){switch(a){case"style":Lm(t,u,m);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(i(61));if(a=u.__html,a!=null){if(p.children!=null)throw Error(i(60));t.innerHTML=a}}break;case"children":typeof u=="string"?yi(t,u):(typeof u=="number"||typeof u=="bigint")&&yi(t,""+u);break;case"onScroll":u!=null&&ze("scroll",t);break;case"onScrollEnd":u!=null&&ze("scrollend",t);break;case"onClick":u!=null&&(t.onclick=Cr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Am.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(p=a.endsWith("Capture"),r=a.slice(2,p?a.length-7:void 0),m=t[tn]||null,m=m!=null?m[a]:null,typeof m=="function"&&t.removeEventListener(r,m,p),typeof u=="function")){typeof m!="function"&&m!==null&&(a in t?t[a]=null:t.hasAttribute(a)&&t.removeAttribute(a)),t.addEventListener(r,u,p);break e}a in t?t[a]=u:u===!0?t.setAttribute(a,""):Ko(t,a,u)}}}function qt(t,r,a){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ze("error",t),ze("load",t);var u=!1,p=!1,m;for(m in a)if(a.hasOwnProperty(m)){var S=a[m];if(S!=null)switch(m){case"src":u=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,r));default:Ze(t,r,m,S,a,null)}}p&&Ze(t,r,"srcSet",a.srcSet,a,null),u&&Ze(t,r,"src",a.src,a,null);return;case"input":ze("invalid",t);var A=m=S=p=null,_=null,G=null;for(u in a)if(a.hasOwnProperty(u)){var ee=a[u];if(ee!=null)switch(u){case"name":p=ee;break;case"type":S=ee;break;case"checked":_=ee;break;case"defaultChecked":G=ee;break;case"value":m=ee;break;case"defaultValue":A=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(i(137,r));break;default:Ze(t,r,u,ee,a,null)}}Om(t,m,A,_,G,S,p,!1);return;case"select":ze("invalid",t),u=S=m=null;for(p in a)if(a.hasOwnProperty(p)&&(A=a[p],A!=null))switch(p){case"value":m=A;break;case"defaultValue":S=A;break;case"multiple":u=A;default:Ze(t,r,p,A,a,null)}r=m,a=S,t.multiple=!!u,r!=null?gi(t,!!u,r,!1):a!=null&&gi(t,!!u,a,!0);return;case"textarea":ze("invalid",t),m=p=u=null;for(S in a)if(a.hasOwnProperty(S)&&(A=a[S],A!=null))switch(S){case"value":u=A;break;case"defaultValue":p=A;break;case"children":m=A;break;case"dangerouslySetInnerHTML":if(A!=null)throw Error(i(91));break;default:Ze(t,r,S,A,a,null)}_m(t,u,p,m);return;case"option":for(_ in a)if(a.hasOwnProperty(_)&&(u=a[_],u!=null))switch(_){case"selected":t.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:Ze(t,r,_,u,a,null)}return;case"dialog":ze("beforetoggle",t),ze("toggle",t),ze("cancel",t),ze("close",t);break;case"iframe":case"object":ze("load",t);break;case"video":case"audio":for(u=0;u<Wa.length;u++)ze(Wa[u],t);break;case"image":ze("error",t),ze("load",t);break;case"details":ze("toggle",t);break;case"embed":case"source":case"link":ze("error",t),ze("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(G in a)if(a.hasOwnProperty(G)&&(u=a[G],u!=null))switch(G){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,r));default:Ze(t,r,G,u,a,null)}return;default:if(Bc(r)){for(ee in a)a.hasOwnProperty(ee)&&(u=a[ee],u!==void 0&&kd(t,r,ee,u,a,void 0));return}}for(A in a)a.hasOwnProperty(A)&&(u=a[A],u!=null&&Ze(t,r,A,u,a,null))}function Rk(t,r,a,u){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,m=null,S=null,A=null,_=null,G=null,ee=null;for(K in a){var ae=a[K];if(a.hasOwnProperty(K)&&ae!=null)switch(K){case"checked":break;case"value":break;case"defaultValue":_=ae;default:u.hasOwnProperty(K)||Ze(t,r,K,null,u,ae)}}for(var X in u){var K=u[X];if(ae=a[X],u.hasOwnProperty(X)&&(K!=null||ae!=null))switch(X){case"type":m=K;break;case"name":p=K;break;case"checked":G=K;break;case"defaultChecked":ee=K;break;case"value":S=K;break;case"defaultValue":A=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(i(137,r));break;default:K!==ae&&Ze(t,r,X,K,u,ae)}}zc(t,S,A,_,G,ee,m,p);return;case"select":K=S=A=X=null;for(m in a)if(_=a[m],a.hasOwnProperty(m)&&_!=null)switch(m){case"value":break;case"multiple":K=_;default:u.hasOwnProperty(m)||Ze(t,r,m,null,u,_)}for(p in u)if(m=u[p],_=a[p],u.hasOwnProperty(p)&&(m!=null||_!=null))switch(p){case"value":X=m;break;case"defaultValue":A=m;break;case"multiple":S=m;default:m!==_&&Ze(t,r,p,m,u,_)}r=A,a=S,u=K,X!=null?gi(t,!!a,X,!1):!!u!=!!a&&(r!=null?gi(t,!!a,r,!0):gi(t,!!a,a?[]:"",!1));return;case"textarea":K=X=null;for(A in a)if(p=a[A],a.hasOwnProperty(A)&&p!=null&&!u.hasOwnProperty(A))switch(A){case"value":break;case"children":break;default:Ze(t,r,A,null,u,p)}for(S in u)if(p=u[S],m=a[S],u.hasOwnProperty(S)&&(p!=null||m!=null))switch(S){case"value":X=p;break;case"defaultValue":K=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(i(91));break;default:p!==m&&Ze(t,r,S,p,u,m)}Dm(t,X,K);return;case"option":for(var pe in a)if(X=a[pe],a.hasOwnProperty(pe)&&X!=null&&!u.hasOwnProperty(pe))switch(pe){case"selected":t.selected=!1;break;default:Ze(t,r,pe,null,u,X)}for(_ in u)if(X=u[_],K=a[_],u.hasOwnProperty(_)&&X!==K&&(X!=null||K!=null))switch(_){case"selected":t.selected=X&&typeof X!="function"&&typeof X!="symbol";break;default:Ze(t,r,_,X,u,K)}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 ke in a)X=a[ke],a.hasOwnProperty(ke)&&X!=null&&!u.hasOwnProperty(ke)&&Ze(t,r,ke,null,u,X);for(G in u)if(X=u[G],K=a[G],u.hasOwnProperty(G)&&X!==K&&(X!=null||K!=null))switch(G){case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(i(137,r));break;default:Ze(t,r,G,X,u,K)}return;default:if(Bc(r)){for(var Je in a)X=a[Je],a.hasOwnProperty(Je)&&X!==void 0&&!u.hasOwnProperty(Je)&&kd(t,r,Je,void 0,u,X);for(ee in u)X=u[ee],K=a[ee],!u.hasOwnProperty(ee)||X===K||X===void 0&&K===void 0||kd(t,r,ee,X,u,K);return}}for(var F in a)X=a[F],a.hasOwnProperty(F)&&X!=null&&!u.hasOwnProperty(F)&&Ze(t,r,F,null,u,X);for(ae in u)X=u[ae],K=a[ae],!u.hasOwnProperty(ae)||X===K||X==null&&K==null||Ze(t,r,ae,X,u,K)}function Bx(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function jk(){if(typeof performance.getEntriesByType=="function"){for(var t=0,r=0,a=performance.getEntriesByType("resource"),u=0;u<a.length;u++){var p=a[u],m=p.transferSize,S=p.initiatorType,A=p.duration;if(m&&A&&Bx(S)){for(S=0,A=p.responseEnd,u+=1;u<a.length;u++){var _=a[u],G=_.startTime;if(G>A)break;var ee=_.transferSize,ae=_.initiatorType;ee&&Bx(ae)&&(_=_.responseEnd,S+=ee*(_<A?1:(A-G)/(_-G)))}if(--u,r+=8*(m+S)/(p.duration/1e3),t++,10<t)break}}if(0<t)return r/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var Ed=null,Nd=null;function Xs(t){return t.nodeType===9?t:t.ownerDocument}function Ux(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Hx(t,r){if(t===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&r==="foreignObject"?0:t}function Ad(t,r){return t==="textarea"||t==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var Td=null;function Mk(){var t=window.event;return t&&t.type==="popstate"?t===Td?!1:(Td=t,!0):(Td=null,!1)}var Px=typeof setTimeout=="function"?setTimeout:void 0,Ok=typeof clearTimeout=="function"?clearTimeout:void 0,Ix=typeof Promise=="function"?Promise:void 0,Dk=typeof queueMicrotask=="function"?queueMicrotask:typeof Ix<"u"?function(t){return Ix.resolve(null).then(t).catch(_k)}:Px;function _k(t){setTimeout(function(){throw t})}function hl(t){return t==="head"}function qx(t,r){var a=r,u=0;do{var p=a.nextSibling;if(t.removeChild(a),p&&p.nodeType===8)if(a=p.data,a==="/$"||a==="/&"){if(u===0){t.removeChild(p),Xi(r);return}u--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")u++;else if(a==="html")to(t.ownerDocument.documentElement);else if(a==="head"){a=t.ownerDocument.head,to(a);for(var m=a.firstChild;m;){var S=m.nextSibling,A=m.nodeName;m[va]||A==="SCRIPT"||A==="STYLE"||A==="LINK"&&m.rel.toLowerCase()==="stylesheet"||a.removeChild(m),m=S}}else a==="body"&&to(t.ownerDocument.body);a=p}while(a);Xi(r)}function Fx(t,r){var a=t;t=0;do{var u=a.nextSibling;if(a.nodeType===1?r?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(r?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),u&&u.nodeType===8)if(a=u.data,a==="/$"){if(t===0)break;t--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||t++;a=u}while(a)}function Rd(t){var r=t.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var a=r;switch(r=r.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Rd(a),Dc(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}t.removeChild(a)}}function zk(t,r,a,u){for(;t.nodeType===1;){var p=a;if(t.nodeName.toLowerCase()!==r.toLowerCase()){if(!u&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(u){if(!t[va])switch(r){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(m=t.getAttribute("rel"),m==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(m!==p.rel||t.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||t.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||t.getAttribute("title")!==(p.title==null?null:p.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(m=t.getAttribute("src"),(m!==(p.src==null?null:p.src)||t.getAttribute("type")!==(p.type==null?null:p.type)||t.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&m&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(r==="input"&&t.type==="hidden"){var m=p.name==null?null:""+p.name;if(p.type==="hidden"&&t.getAttribute("name")===m)return t}else return t;if(t=Un(t.nextSibling),t===null)break}return null}function Lk(t,r,a){if(r==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=Un(t.nextSibling),t===null))return null;return t}function Vx(t,r){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!r||(t=Un(t.nextSibling),t===null))return null;return t}function jd(t){return t.data==="$?"||t.data==="$~"}function Md(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function Bk(t,r){var a=t.ownerDocument;if(t.data==="$~")t._reactRetry=r;else if(t.data!=="$?"||a.readyState!=="loading")r();else{var u=function(){r(),a.removeEventListener("DOMContentLoaded",u)};a.addEventListener("DOMContentLoaded",u),t._reactRetry=u}}function Un(t){for(;t!=null;t=t.nextSibling){var r=t.nodeType;if(r===1||r===3)break;if(r===8){if(r=t.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return t}var Od=null;function Gx(t){t=t.nextSibling;for(var r=0;t;){if(t.nodeType===8){var a=t.data;if(a==="/$"||a==="/&"){if(r===0)return Un(t.nextSibling);r--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||r++}t=t.nextSibling}return null}function Yx(t){t=t.previousSibling;for(var r=0;t;){if(t.nodeType===8){var a=t.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(r===0)return t;r--}else a!=="/$"&&a!=="/&"||r++}t=t.previousSibling}return null}function $x(t,r,a){switch(r=Xs(a),t){case"html":if(t=r.documentElement,!t)throw Error(i(452));return t;case"head":if(t=r.head,!t)throw Error(i(453));return t;case"body":if(t=r.body,!t)throw Error(i(454));return t;default:throw Error(i(451))}}function to(t){for(var r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Dc(t)}var Hn=new Map,Xx=new Set;function Qs(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Hr=Y.d;Y.d={f:Uk,r:Hk,D:Pk,C:Ik,L:qk,m:Fk,X:Gk,S:Vk,M:Yk};function Uk(){var t=Hr.f(),r=Ps();return t||r}function Hk(t){var r=hi(t);r!==null&&r.tag===5&&r.type==="form"?fy(r):Hr.r(t)}var Gi=typeof document>"u"?null:document;function Qx(t,r,a){var u=Gi;if(u&&typeof r=="string"&&r){var p=Mn(r);p='link[rel="'+t+'"][href="'+p+'"]',typeof a=="string"&&(p+='[crossorigin="'+a+'"]'),Xx.has(p)||(Xx.add(p),t={rel:t,crossOrigin:a,href:r},u.querySelector(p)===null&&(r=u.createElement("link"),qt(r,"link",t),jt(r),u.head.appendChild(r)))}}function Pk(t){Hr.D(t),Qx("dns-prefetch",t,null)}function Ik(t,r){Hr.C(t,r),Qx("preconnect",t,r)}function qk(t,r,a){Hr.L(t,r,a);var u=Gi;if(u&&t&&r){var p='link[rel="preload"][as="'+Mn(r)+'"]';r==="image"&&a&&a.imageSrcSet?(p+='[imagesrcset="'+Mn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(p+='[imagesizes="'+Mn(a.imageSizes)+'"]')):p+='[href="'+Mn(t)+'"]';var m=p;switch(r){case"style":m=Yi(t);break;case"script":m=$i(t)}Hn.has(m)||(t=g({rel:"preload",href:r==="image"&&a&&a.imageSrcSet?void 0:t,as:r},a),Hn.set(m,t),u.querySelector(p)!==null||r==="style"&&u.querySelector(no(m))||r==="script"&&u.querySelector(ro(m))||(r=u.createElement("link"),qt(r,"link",t),jt(r),u.head.appendChild(r)))}}function Fk(t,r){Hr.m(t,r);var a=Gi;if(a&&t){var u=r&&typeof r.as=="string"?r.as:"script",p='link[rel="modulepreload"][as="'+Mn(u)+'"][href="'+Mn(t)+'"]',m=p;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=$i(t)}if(!Hn.has(m)&&(t=g({rel:"modulepreload",href:t},r),Hn.set(m,t),a.querySelector(p)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(ro(m)))return}u=a.createElement("link"),qt(u,"link",t),jt(u),a.head.appendChild(u)}}}function Vk(t,r,a){Hr.S(t,r,a);var u=Gi;if(u&&t){var p=pi(u).hoistableStyles,m=Yi(t);r=r||"default";var S=p.get(m);if(!S){var A={loading:0,preload:null};if(S=u.querySelector(no(m)))A.loading=5;else{t=g({rel:"stylesheet",href:t,"data-precedence":r},a),(a=Hn.get(m))&&Dd(t,a);var _=S=u.createElement("link");jt(_),qt(_,"link",t),_._p=new Promise(function(G,ee){_.onload=G,_.onerror=ee}),_.addEventListener("load",function(){A.loading|=1}),_.addEventListener("error",function(){A.loading|=2}),A.loading|=4,Ks(S,r,u)}S={type:"stylesheet",instance:S,count:1,state:A},p.set(m,S)}}}function Gk(t,r){Hr.X(t,r);var a=Gi;if(a&&t){var u=pi(a).hoistableScripts,p=$i(t),m=u.get(p);m||(m=a.querySelector(ro(p)),m||(t=g({src:t,async:!0},r),(r=Hn.get(p))&&_d(t,r),m=a.createElement("script"),jt(m),qt(m,"link",t),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(p,m))}}function Yk(t,r){Hr.M(t,r);var a=Gi;if(a&&t){var u=pi(a).hoistableScripts,p=$i(t),m=u.get(p);m||(m=a.querySelector(ro(p)),m||(t=g({src:t,async:!0,type:"module"},r),(r=Hn.get(p))&&_d(t,r),m=a.createElement("script"),jt(m),qt(m,"link",t),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(p,m))}}function Kx(t,r,a,u){var p=(p=ue.current)?Qs(p):null;if(!p)throw Error(i(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(r=Yi(a.href),a=pi(p).hoistableStyles,u=a.get(r),u||(u={type:"style",instance:null,count:0,state:null},a.set(r,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=Yi(a.href);var m=pi(p).hoistableStyles,S=m.get(t);if(S||(p=p.ownerDocument||p,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(t,S),(m=p.querySelector(no(t)))&&!m._p&&(S.instance=m,S.state.loading=5),Hn.has(t)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Hn.set(t,a),m||$k(p,t,a,S.state))),r&&u===null)throw Error(i(528,""));return S}if(r&&u!==null)throw Error(i(529,""));return null;case"script":return r=a.async,a=a.src,typeof a=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=$i(a),a=pi(p).hoistableScripts,u=a.get(r),u||(u={type:"script",instance:null,count:0,state:null},a.set(r,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,t))}}function Yi(t){return'href="'+Mn(t)+'"'}function no(t){return'link[rel="stylesheet"]['+t+"]"}function Zx(t){return g({},t,{"data-precedence":t.precedence,precedence:null})}function $k(t,r,a,u){t.querySelector('link[rel="preload"][as="style"]['+r+"]")?u.loading=1:(r=t.createElement("link"),u.preload=r,r.addEventListener("load",function(){return u.loading|=1}),r.addEventListener("error",function(){return u.loading|=2}),qt(r,"link",a),jt(r),t.head.appendChild(r))}function $i(t){return'[src="'+Mn(t)+'"]'}function ro(t){return"script[async]"+t}function Jx(t,r,a){if(r.count++,r.instance===null)switch(r.type){case"style":var u=t.querySelector('style[data-href~="'+Mn(a.href)+'"]');if(u)return r.instance=u,jt(u),u;var p=g({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return u=(t.ownerDocument||t).createElement("style"),jt(u),qt(u,"style",p),Ks(u,a.precedence,t),r.instance=u;case"stylesheet":p=Yi(a.href);var m=t.querySelector(no(p));if(m)return r.state.loading|=4,r.instance=m,jt(m),m;u=Zx(a),(p=Hn.get(p))&&Dd(u,p),m=(t.ownerDocument||t).createElement("link"),jt(m);var S=m;return S._p=new Promise(function(A,_){S.onload=A,S.onerror=_}),qt(m,"link",u),r.state.loading|=4,Ks(m,a.precedence,t),r.instance=m;case"script":return m=$i(a.src),(p=t.querySelector(ro(m)))?(r.instance=p,jt(p),p):(u=a,(p=Hn.get(m))&&(u=g({},a),_d(u,p)),t=t.ownerDocument||t,p=t.createElement("script"),jt(p),qt(p,"link",u),t.head.appendChild(p),r.instance=p);case"void":return null;default:throw Error(i(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(u=r.instance,r.state.loading|=4,Ks(u,a.precedence,t));return r.instance}function Ks(t,r,a){for(var u=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=u.length?u[u.length-1]:null,m=p,S=0;S<u.length;S++){var A=u[S];if(A.dataset.precedence===r)m=A;else if(m!==p)break}m?m.parentNode.insertBefore(t,m.nextSibling):(r=a.nodeType===9?a.head:a,r.insertBefore(t,r.firstChild))}function Dd(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.title==null&&(t.title=r.title)}function _d(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.integrity==null&&(t.integrity=r.integrity)}var Zs=null;function Wx(t,r,a){if(Zs===null){var u=new Map,p=Zs=new Map;p.set(a,u)}else p=Zs,u=p.get(a),u||(u=new Map,p.set(a,u));if(u.has(t))return u;for(u.set(t,null),a=a.getElementsByTagName(t),p=0;p<a.length;p++){var m=a[p];if(!(m[va]||m[Ut]||t==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var S=m.getAttribute(r)||"";S=t+S;var A=u.get(S);A?A.push(m):u.set(S,[m])}}return u}function ev(t,r,a){t=t.ownerDocument||t,t.head.insertBefore(a,r==="title"?t.querySelector("head > title"):null)}function Xk(t,r,a){if(a===1||r.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;switch(r.rel){case"stylesheet":return t=r.disabled,typeof r.precedence=="string"&&t==null;default:return!0}case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function tv(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function Qk(t,r,a,u){if(a.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var p=Yi(u.href),m=r.querySelector(no(p));if(m){r=m._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(t.count++,t=Js.bind(t),r.then(t,t)),a.state.loading|=4,a.instance=m,jt(m);return}m=r.ownerDocument||r,u=Zx(u),(p=Hn.get(p))&&Dd(u,p),m=m.createElement("link"),jt(m);var S=m;S._p=new Promise(function(A,_){S.onload=A,S.onerror=_}),qt(m,"link",u),a.instance=m}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(a,r),(r=a.state.preload)&&(a.state.loading&3)===0&&(t.count++,a=Js.bind(t),r.addEventListener("load",a),r.addEventListener("error",a))}}var zd=0;function Kk(t,r){return t.stylesheets&&t.count===0&&eu(t,t.stylesheets),0<t.count||0<t.imgCount?function(a){var u=setTimeout(function(){if(t.stylesheets&&eu(t,t.stylesheets),t.unsuspend){var m=t.unsuspend;t.unsuspend=null,m()}},6e4+r);0<t.imgBytes&&zd===0&&(zd=62500*jk());var p=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&eu(t,t.stylesheets),t.unsuspend)){var m=t.unsuspend;t.unsuspend=null,m()}},(t.imgBytes>zd?50:800)+r);return t.unsuspend=a,function(){t.unsuspend=null,clearTimeout(u),clearTimeout(p)}}:null}function Js(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)eu(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Ws=null;function eu(t,r){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Ws=new Map,r.forEach(Zk,t),Ws=null,Js.call(t))}function Zk(t,r){if(!(r.state.loading&4)){var a=Ws.get(t);if(a)var u=a.get(null);else{a=new Map,Ws.set(t,a);for(var p=t.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<p.length;m++){var S=p[m];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(a.set(S.dataset.precedence,S),u=S)}u&&a.set(null,u)}p=r.instance,S=p.getAttribute("data-precedence"),m=a.get(S)||u,m===u&&a.set(null,p),a.set(S,p),this.count++,u=Js.bind(this),p.addEventListener("load",u),p.addEventListener("error",u),m?m.parentNode.insertBefore(p,m.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(p,t.firstChild)),r.state.loading|=4}}var lo={$$typeof:j,Provider:null,Consumer:null,_currentValue:le,_currentValue2:le,_threadCount:0};function Jk(t,r,a,u,p,m,S,A,_){this.tag=1,this.containerInfo=t,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=en(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=en(0),this.hiddenUpdates=en(null),this.identifierPrefix=u,this.onUncaughtError=p,this.onCaughtError=m,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.incompleteTransitions=new Map}function nv(t,r,a,u,p,m,S,A,_,G,ee,ae){return t=new Jk(t,r,a,S,_,G,ee,ae,A),r=1,m===!0&&(r|=24),m=mn(3,null,null,r),t.current=m,m.stateNode=t,r=pf(),r.refCount++,t.pooledCache=r,r.refCount++,m.memoizedState={element:u,isDehydrated:a,cache:r},xf(m),t}function rv(t){return t?(t=ki,t):ki}function lv(t,r,a,u,p,m){p=rv(p),u.context===null?u.context=p:u.pendingContext=p,u=nl(r),u.payload={element:a},m=m===void 0?null:m,m!==null&&(u.callback=m),a=rl(t,u,r),a!==null&&(sn(a,t,r),La(a,t,r))}function iv(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<r?a:r}}function Ld(t,r){iv(t,r),(t=t.alternate)&&iv(t,r)}function av(t){if(t.tag===13||t.tag===31){var r=Hl(t,67108864);r!==null&&sn(r,t,67108864),Ld(t,67108864)}}function ov(t){if(t.tag===13||t.tag===31){var r=bn();r=br(r);var a=Hl(t,r);a!==null&&sn(a,t,r),Ld(t,r)}}var tu=!0;function Wk(t,r,a,u){var p=B.T;B.T=null;var m=Y.p;try{Y.p=2,Bd(t,r,a,u)}finally{Y.p=m,B.T=p}}function eE(t,r,a,u){var p=B.T;B.T=null;var m=Y.p;try{Y.p=8,Bd(t,r,a,u)}finally{Y.p=m,B.T=p}}function Bd(t,r,a,u){if(tu){var p=Ud(u);if(p===null)Cd(t,r,u,nu,a),uv(t,u);else if(nE(p,t,r,a,u))u.stopPropagation();else if(uv(t,u),r&4&&-1<tE.indexOf(t)){for(;p!==null;){var m=hi(p);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var S=pt(m.pendingLanes);if(S!==0){var A=m;for(A.pendingLanes|=2,A.entangledLanes|=2;S;){var _=1<<31-$e(S);A.entanglements[1]|=_,S&=~_}ur(m),(Ve&6)===0&&(Us=ft()+500,Ja(0))}}break;case 31:case 13:A=Hl(m,2),A!==null&&sn(A,m,2),Ps(),Ld(m,2)}if(m=Ud(u),m===null&&Cd(t,r,u,nu,a),m===p)break;p=m}p!==null&&u.stopPropagation()}else Cd(t,r,u,null,a)}}function Ud(t){return t=Hc(t),Hd(t)}var nu=null;function Hd(t){if(nu=null,t=di(t),t!==null){var r=s(t);if(r===null)t=null;else{var a=r.tag;if(a===13){if(t=c(r),t!==null)return t;t=null}else if(a===31){if(t=f(r),t!==null)return t;t=null}else if(a===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;t=null}else r!==t&&(t=null)}}return nu=t,null}function sv(t){switch(t){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(Xr()){case te:return 2;case $:return 8;case oe:case he:return 32;case be:return 268435456;default:return 32}default:return 32}}var Pd=!1,pl=null,ml=null,gl=null,io=new Map,ao=new Map,yl=[],tE="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 uv(t,r){switch(t){case"focusin":case"focusout":pl=null;break;case"dragenter":case"dragleave":ml=null;break;case"mouseover":case"mouseout":gl=null;break;case"pointerover":case"pointerout":io.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":ao.delete(r.pointerId)}}function oo(t,r,a,u,p,m){return t===null||t.nativeEvent!==m?(t={blockedOn:r,domEventName:a,eventSystemFlags:u,nativeEvent:m,targetContainers:[p]},r!==null&&(r=hi(r),r!==null&&av(r)),t):(t.eventSystemFlags|=u,r=t.targetContainers,p!==null&&r.indexOf(p)===-1&&r.push(p),t)}function nE(t,r,a,u,p){switch(r){case"focusin":return pl=oo(pl,t,r,a,u,p),!0;case"dragenter":return ml=oo(ml,t,r,a,u,p),!0;case"mouseover":return gl=oo(gl,t,r,a,u,p),!0;case"pointerover":var m=p.pointerId;return io.set(m,oo(io.get(m)||null,t,r,a,u,p)),!0;case"gotpointercapture":return m=p.pointerId,ao.set(m,oo(ao.get(m)||null,t,r,a,u,p)),!0}return!1}function cv(t){var r=di(t.target);if(r!==null){var a=s(r);if(a!==null){if(r=a.tag,r===13){if(r=c(a),r!==null){t.blockedOn=r,Qr(t.priority,function(){ov(a)});return}}else if(r===31){if(r=f(a),r!==null){t.blockedOn=r,Qr(t.priority,function(){ov(a)});return}}else if(r===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function ru(t){if(t.blockedOn!==null)return!1;for(var r=t.targetContainers;0<r.length;){var a=Ud(t.nativeEvent);if(a===null){a=t.nativeEvent;var u=new a.constructor(a.type,a);Uc=u,a.target.dispatchEvent(u),Uc=null}else return r=hi(a),r!==null&&av(r),t.blockedOn=a,!1;r.shift()}return!0}function fv(t,r,a){ru(t)&&a.delete(r)}function rE(){Pd=!1,pl!==null&&ru(pl)&&(pl=null),ml!==null&&ru(ml)&&(ml=null),gl!==null&&ru(gl)&&(gl=null),io.forEach(fv),ao.forEach(fv)}function lu(t,r){t.blockedOn===r&&(t.blockedOn=null,Pd||(Pd=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,rE)))}var iu=null;function dv(t){iu!==t&&(iu=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){iu===t&&(iu=null);for(var r=0;r<t.length;r+=3){var a=t[r],u=t[r+1],p=t[r+2];if(typeof u!="function"){if(Hd(u||a)===null)continue;break}var m=hi(a);m!==null&&(t.splice(r,3),r-=3,Uf(m,{pending:!0,data:p,method:a.method,action:u},u,p))}}))}function Xi(t){function r(_){return lu(_,t)}pl!==null&&lu(pl,t),ml!==null&&lu(ml,t),gl!==null&&lu(gl,t),io.forEach(r),ao.forEach(r);for(var a=0;a<yl.length;a++){var u=yl[a];u.blockedOn===t&&(u.blockedOn=null)}for(;0<yl.length&&(a=yl[0],a.blockedOn===null);)cv(a),a.blockedOn===null&&yl.shift();if(a=(t.ownerDocument||t).$$reactFormReplay,a!=null)for(u=0;u<a.length;u+=3){var p=a[u],m=a[u+1],S=p[tn]||null;if(typeof m=="function")S||dv(a);else if(S){var A=null;if(m&&m.hasAttribute("formAction")){if(p=m,S=m[tn]||null)A=S.formAction;else if(Hd(p)!==null)continue}else A=S.action;typeof A=="function"?a[u+1]=A:(a.splice(u,3),u-=3),dv(a)}}}function hv(){function t(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(S){return p=S})},focusReset:"manual",scroll:"manual"})}function r(){p!==null&&(p(),p=null),u||setTimeout(a,20)}function a(){if(!u&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,p=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(a,100),function(){u=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),p!==null&&(p(),p=null)}}}function Id(t){this._internalRoot=t}au.prototype.render=Id.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(i(409));var a=r.current,u=bn();lv(a,u,t,r,null,null)},au.prototype.unmount=Id.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;lv(t.current,2,null,t,null,null),Ps(),r[fi]=null}};function au(t){this._internalRoot=t}au.prototype.unstable_scheduleHydration=function(t){if(t){var r=Yn();t={blockedOn:null,target:t,priority:r};for(var a=0;a<yl.length&&r!==0&&r<yl[a].priority;a++);yl.splice(a,0,t),a===0&&cv(t)}};var pv=n.version;if(pv!=="19.2.1")throw Error(i(527,pv,"19.2.1"));Y.findDOMNode=function(t){var r=t._reactInternals;if(r===void 0)throw typeof t.render=="function"?Error(i(188)):(t=Object.keys(t).join(","),Error(i(268,t)));return t=h(r),t=t!==null?y(t):null,t=t===null?null:t.stateNode,t};var lE={bundleType:0,version:"19.2.1",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ou=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ou.isDisabled&&ou.supportsFiber)try{Bt=ou.inject(lE),dt=ou}catch{}}return uo.createRoot=function(t,r){if(!o(t))throw Error(i(299));var a=!1,u="",p=wy,m=Sy,S=Cy;return r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(u=r.identifierPrefix),r.onUncaughtError!==void 0&&(p=r.onUncaughtError),r.onCaughtError!==void 0&&(m=r.onCaughtError),r.onRecoverableError!==void 0&&(S=r.onRecoverableError)),r=nv(t,1,!1,null,null,a,u,null,p,m,S,hv),t[fi]=r.current,Sd(t),new Id(r)},uo.hydrateRoot=function(t,r,a){if(!o(t))throw Error(i(299));var u=!1,p="",m=wy,S=Sy,A=Cy,_=null;return a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(p=a.identifierPrefix),a.onUncaughtError!==void 0&&(m=a.onUncaughtError),a.onCaughtError!==void 0&&(S=a.onCaughtError),a.onRecoverableError!==void 0&&(A=a.onRecoverableError),a.formState!==void 0&&(_=a.formState)),r=nv(t,1,!0,r,a??null,u,p,_,m,S,A,hv),r.context=rv(null),a=r.current,u=bn(),u=br(u),p=nl(u),p.callback=null,rl(a,p,u),a=u,r.current.lanes=a,An(r,a),ur(r),t[fi]=r.current,Sd(t),new au(r)},uo.version="19.2.1",uo}var kv;function gE(){if(kv)return Vd.exports;kv=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Vd.exports=mE(),Vd.exports}var yE=gE();/**
|
|
50
|
+
* react-router v7.13.1
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Remix Software Inc.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
+
*
|
|
57
|
+
* @license MIT
|
|
58
|
+
*/var Ev="popstate";function Nv(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function xE(e={}){function n(i,o){var h;let s=(h=o.state)==null?void 0:h.masked,{pathname:c,search:f,hash:d}=s||i.location;return Lh("",{pathname:c,search:f,hash:d},o.state&&o.state.usr||null,o.state&&o.state.key||"default",s?{pathname:i.location.pathname,search:i.location.search,hash:i.location.hash}:void 0)}function l(i,o){return typeof o=="string"?o:Ao(o)}return bE(n,l,null,e)}function st(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function mr(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function vE(){return Math.random().toString(36).substring(2,10)}function Av(e,n){return{usr:e.state,key:e.key,idx:n,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Lh(e,n,l=null,i,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof n=="string"?ca(n):n,state:l,key:n&&n.key||i||vE(),unstable_mask:o}}function Ao({pathname:e="/",search:n="",hash:l=""}){return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),l&&l!=="#"&&(e+=l.charAt(0)==="#"?l:"#"+l),e}function ca(e){let n={};if(e){let l=e.indexOf("#");l>=0&&(n.hash=e.substring(l),e=e.substring(0,l));let i=e.indexOf("?");i>=0&&(n.search=e.substring(i),e=e.substring(0,i)),e&&(n.pathname=e)}return n}function bE(e,n,l,i={}){let{window:o=document.defaultView,v5Compat:s=!1}=i,c=o.history,f="POP",d=null,h=y();h==null&&(h=0,c.replaceState({...c.state,idx:h},""));function y(){return(c.state||{idx:null}).idx}function g(){f="POP";let E=y(),N=E==null?null:E-h;h=E,d&&d({action:f,location:C.location,delta:N})}function v(E,N){f="PUSH";let M=Nv(E)?E:Lh(C.location,E,N);h=y()+1;let j=Av(M,h),D=C.createHref(M.unstable_mask||M);try{c.pushState(j,"",D)}catch(I){if(I instanceof DOMException&&I.name==="DataCloneError")throw I;o.location.assign(D)}s&&d&&d({action:f,location:C.location,delta:1})}function b(E,N){f="REPLACE";let M=Nv(E)?E:Lh(C.location,E,N);h=y();let j=Av(M,h),D=C.createHref(M.unstable_mask||M);c.replaceState(j,"",D),s&&d&&d({action:f,location:C.location,delta:0})}function k(E){return wE(E)}let C={get action(){return f},get location(){return e(o,c)},listen(E){if(d)throw new Error("A history only accepts one active listener");return o.addEventListener(Ev,g),d=E,()=>{o.removeEventListener(Ev,g),d=null}},createHref(E){return n(o,E)},createURL:k,encodeLocation(E){let N=k(E);return{pathname:N.pathname,search:N.search,hash:N.hash}},push:v,replace:b,go(E){return c.go(E)}};return C}function wE(e,n=!1){let l="http://localhost";typeof window<"u"&&(l=window.location.origin!=="null"?window.location.origin:window.location.href),st(l,"No window.location.(origin|href) available to create URL");let i=typeof e=="string"?e:Ao(e);return i=i.replace(/ $/,"%20"),!n&&i.startsWith("//")&&(i=l+i),new URL(i,l)}function B0(e,n,l="/"){return SE(e,n,l,!1)}function SE(e,n,l,i){let o=typeof n=="string"?ca(n):n,s=qr(o.pathname||"/",l);if(s==null)return null;let c=U0(e);CE(c);let f=null;for(let d=0;f==null&&d<c.length;++d){let h=_E(s);f=OE(c[d],h,i)}return f}function U0(e,n=[],l=[],i="",o=!1){let s=(c,f,d=o,h)=>{let y={relativePath:h===void 0?c.path||"":h,caseSensitive:c.caseSensitive===!0,childrenIndex:f,route:c};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(i)&&d)return;st(y.relativePath.startsWith(i),`Absolute route path "${y.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(i.length)}let g=hr([i,y.relativePath]),v=l.concat(y);c.children&&c.children.length>0&&(st(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),U0(c.children,n,v,g,d)),!(c.path==null&&!c.index)&&n.push({path:g,score:jE(g,c.index),routesMeta:v})};return e.forEach((c,f)=>{var d;if(c.path===""||!((d=c.path)!=null&&d.includes("?")))s(c,f);else for(let h of H0(c.path))s(c,f,!0,h)}),n}function H0(e){let n=e.split("/");if(n.length===0)return[];let[l,...i]=n,o=l.endsWith("?"),s=l.replace(/\?$/,"");if(i.length===0)return o?[s,""]:[s];let c=H0(i.join("/")),f=[];return f.push(...c.map(d=>d===""?s:[s,d].join("/"))),o&&f.push(...c),f.map(d=>e.startsWith("/")&&d===""?"/":d)}function CE(e){e.sort((n,l)=>n.score!==l.score?l.score-n.score:ME(n.routesMeta.map(i=>i.childrenIndex),l.routesMeta.map(i=>i.childrenIndex)))}var kE=/^:[\w-]+$/,EE=3,NE=2,AE=1,TE=10,RE=-2,Tv=e=>e==="*";function jE(e,n){let l=e.split("/"),i=l.length;return l.some(Tv)&&(i+=RE),n&&(i+=NE),l.filter(o=>!Tv(o)).reduce((o,s)=>o+(kE.test(s)?EE:s===""?AE:TE),i)}function ME(e,n){return e.length===n.length&&e.slice(0,-1).every((i,o)=>i===n[o])?e[e.length-1]-n[n.length-1]:0}function OE(e,n,l=!1){let{routesMeta:i}=e,o={},s="/",c=[];for(let f=0;f<i.length;++f){let d=i[f],h=f===i.length-1,y=s==="/"?n:n.slice(s.length)||"/",g=Du({path:d.relativePath,caseSensitive:d.caseSensitive,end:h},y),v=d.route;if(!g&&h&&l&&!i[i.length-1].route.index&&(g=Du({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},y)),!g)return null;Object.assign(o,g.params),c.push({params:o,pathname:hr([s,g.pathname]),pathnameBase:UE(hr([s,g.pathnameBase])),route:v}),g.pathnameBase!=="/"&&(s=hr([s,g.pathnameBase]))}return c}function Du(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[l,i]=DE(e.path,e.caseSensitive,e.end),o=n.match(l);if(!o)return null;let s=o[0],c=s.replace(/(.)\/+$/,"$1"),f=o.slice(1);return{params:i.reduce((h,{paramName:y,isOptional:g},v)=>{if(y==="*"){let k=f[v]||"";c=s.slice(0,s.length-k.length).replace(/(.)\/+$/,"$1")}const b=f[v];return g&&!b?h[y]=void 0:h[y]=(b||"").replace(/%2F/g,"/"),h},{}),pathname:s,pathnameBase:c,pattern:e}}function DE(e,n=!1,l=!0){mr(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let i=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,f,d,h,y)=>{if(i.push({paramName:f,isOptional:d!=null}),d){let g=y.charAt(h+c.length);return g&&g!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(i.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):l?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,n?void 0:"i"),i]}function _E(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return mr(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${n}).`),e}}function qr(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let l=n.endsWith("/")?n.length-1:n.length,i=e.charAt(l);return i&&i!=="/"?null:e.slice(l)||"/"}var zE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function LE(e,n="/"){let{pathname:l,search:i="",hash:o=""}=typeof e=="string"?ca(e):e,s;return l?(l=l.replace(/\/\/+/g,"/"),l.startsWith("/")?s=Rv(l.substring(1),"/"):s=Rv(l,n)):s=n,{pathname:s,search:HE(i),hash:PE(o)}}function Rv(e,n){let l=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?l.length>1&&l.pop():o!=="."&&l.push(o)}),l.length>1?l.join("/"):"/"}function Xd(e,n,l,i){return`Cannot include a '${e}' character in a manually specified \`to.${n}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${l}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function BE(e){return e.filter((n,l)=>l===0||n.route.path&&n.route.path.length>0)}function P0(e){let n=BE(e);return n.map((l,i)=>i===n.length-1?l.pathname:l.pathnameBase)}function pp(e,n,l,i=!1){let o;typeof e=="string"?o=ca(e):(o={...e},st(!o.pathname||!o.pathname.includes("?"),Xd("?","pathname","search",o)),st(!o.pathname||!o.pathname.includes("#"),Xd("#","pathname","hash",o)),st(!o.search||!o.search.includes("#"),Xd("#","search","hash",o)));let s=e===""||o.pathname==="",c=s?"/":o.pathname,f;if(c==null)f=l;else{let g=n.length-1;if(!i&&c.startsWith("..")){let v=c.split("/");for(;v[0]==="..";)v.shift(),g-=1;o.pathname=v.join("/")}f=g>=0?n[g]:"/"}let d=LE(o,f),h=c&&c!=="/"&&c.endsWith("/"),y=(s||c===".")&&l.endsWith("/");return!d.pathname.endsWith("/")&&(h||y)&&(d.pathname+="/"),d}var hr=e=>e.join("/").replace(/\/\/+/g,"/"),UE=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),HE=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,PE=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,IE=class{constructor(e,n,l,i=!1){this.status=e,this.statusText=n||"",this.internal=i,l instanceof Error?(this.data=l.toString(),this.error=l):this.data=l}};function qE(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function FE(e){return e.map(n=>n.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var I0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function q0(e,n){let l=e;if(typeof l!="string"||!zE.test(l))return{absoluteURL:void 0,isExternal:!1,to:l};let i=l,o=!1;if(I0)try{let s=new URL(window.location.href),c=l.startsWith("//")?new URL(s.protocol+l):new URL(l),f=qr(c.pathname,n);c.origin===s.origin&&f!=null?l=f+c.search+c.hash:o=!0}catch{mr(!1,`<Link to="${l}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:o,to:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var F0=["POST","PUT","PATCH","DELETE"];new Set(F0);var VE=["GET",...F0];new Set(VE);var fa=w.createContext(null);fa.displayName="DataRouter";var tc=w.createContext(null);tc.displayName="DataRouterState";var GE=w.createContext(!1),V0=w.createContext({isTransitioning:!1});V0.displayName="ViewTransition";var YE=w.createContext(new Map);YE.displayName="Fetchers";var $E=w.createContext(null);$E.displayName="Await";var qn=w.createContext(null);qn.displayName="Navigation";var Bo=w.createContext(null);Bo.displayName="Location";var nr=w.createContext({outlet:null,matches:[],isDataRoute:!1});nr.displayName="Route";var mp=w.createContext(null);mp.displayName="RouteError";var G0="REACT_ROUTER_ERROR",XE="REDIRECT",QE="ROUTE_ERROR_RESPONSE";function KE(e){if(e.startsWith(`${G0}:${XE}:{`))try{let n=JSON.parse(e.slice(28));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.location=="string"&&typeof n.reloadDocument=="boolean"&&typeof n.replace=="boolean")return n}catch{}}function ZE(e){if(e.startsWith(`${G0}:${QE}:{`))try{let n=JSON.parse(e.slice(40));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string")return new IE(n.status,n.statusText,n.data)}catch{}}function JE(e,{relative:n}={}){st(Uo(),"useHref() may be used only in the context of a <Router> component.");let{basename:l,navigator:i}=w.useContext(qn),{hash:o,pathname:s,search:c}=Ho(e,{relative:n}),f=s;return l!=="/"&&(f=s==="/"?l:hr([l,s])),i.createHref({pathname:f,search:c,hash:o})}function Uo(){return w.useContext(Bo)!=null}function yr(){return st(Uo(),"useLocation() may be used only in the context of a <Router> component."),w.useContext(Bo).location}var Y0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function $0(e){w.useContext(qn).static||w.useLayoutEffect(e)}function gp(){let{isDataRoute:e}=w.useContext(nr);return e?hN():WE()}function WE(){st(Uo(),"useNavigate() may be used only in the context of a <Router> component.");let e=w.useContext(fa),{basename:n,navigator:l}=w.useContext(qn),{matches:i}=w.useContext(nr),{pathname:o}=yr(),s=JSON.stringify(P0(i)),c=w.useRef(!1);return $0(()=>{c.current=!0}),w.useCallback((d,h={})=>{if(mr(c.current,Y0),!c.current)return;if(typeof d=="number"){l.go(d);return}let y=pp(d,JSON.parse(s),o,h.relative==="path");e==null&&n!=="/"&&(y.pathname=y.pathname==="/"?n:hr([n,y.pathname])),(h.replace?l.replace:l.push)(y,h.state,h)},[n,l,s,o,e])}var X0=w.createContext(null);function Q0(){return w.useContext(X0)}function eN(e){let n=w.useContext(nr).outlet;return w.useMemo(()=>n&&w.createElement(X0.Provider,{value:e},n),[n,e])}function tN(){let{matches:e}=w.useContext(nr),n=e[e.length-1];return n?n.params:{}}function Ho(e,{relative:n}={}){let{matches:l}=w.useContext(nr),{pathname:i}=yr(),o=JSON.stringify(P0(l));return w.useMemo(()=>pp(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function nN(e,n){return K0(e,n)}function K0(e,n,l){var E;st(Uo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=w.useContext(qn),{matches:o}=w.useContext(nr),s=o[o.length-1],c=s?s.params:{},f=s?s.pathname:"/",d=s?s.pathnameBase:"/",h=s&&s.route;{let N=h&&h.path||"";J0(f,!h||N.endsWith("*")||N.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${N}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
59
|
+
|
|
60
|
+
Please change the parent <Route path="${N}"> to <Route path="${N==="/"?"*":`${N}/*`}">.`)}let y=yr(),g;if(n){let N=typeof n=="string"?ca(n):n;st(d==="/"||((E=N.pathname)==null?void 0:E.startsWith(d)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${d}" but pathname "${N.pathname}" was given in the \`location\` prop.`),g=N}else g=y;let v=g.pathname||"/",b=v;if(d!=="/"){let N=d.replace(/^\//,"").split("/");b="/"+v.replace(/^\//,"").split("/").slice(N.length).join("/")}let k=B0(e,{pathname:b});mr(h||k!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),mr(k==null||k[k.length-1].route.element!==void 0||k[k.length-1].route.Component!==void 0||k[k.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let C=oN(k&&k.map(N=>Object.assign({},N,{params:Object.assign({},c,N.params),pathname:hr([d,i.encodeLocation?i.encodeLocation(N.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?d:hr([d,i.encodeLocation?i.encodeLocation(N.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathnameBase])})),o,l);return n&&C?w.createElement(Bo.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...g},navigationType:"POP"}},C):C}function rN(){let e=dN(),n=qE(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),l=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:i},s={padding:"2px 4px",backgroundColor:i},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=w.createElement(w.Fragment,null,w.createElement("p",null,"💿 Hey developer 👋"),w.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",w.createElement("code",{style:s},"ErrorBoundary")," or"," ",w.createElement("code",{style:s},"errorElement")," prop on your route.")),w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},n),l?w.createElement("pre",{style:o},l):null,c)}var lN=w.createElement(rN,null),Z0=class extends w.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){this.props.onError?this.props.onError(e,n):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const l=ZE(e.digest);l&&(e=l)}let n=e!==void 0?w.createElement(nr.Provider,{value:this.props.routeContext},w.createElement(mp.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?w.createElement(iN,{error:e},n):n}};Z0.contextType=GE;var Qd=new WeakMap;function iN({children:e,error:n}){let{basename:l}=w.useContext(qn);if(typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){let i=KE(n.digest);if(i){let o=Qd.get(n);if(o)throw o;let s=q0(i.location,l);if(I0&&!Qd.get(n))if(s.isExternal||i.reloadDocument)window.location.href=s.absoluteURL||s.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(s.to,{replace:i.replace}));throw Qd.set(n,c),c}return w.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s.absoluteURL||s.to}`})}}return e}function aN({routeContext:e,match:n,children:l}){let i=w.useContext(fa);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),w.createElement(nr.Provider,{value:e},l)}function oN(e,n=[],l){let i=l==null?void 0:l.state;if(e==null){if(!i)return null;if(i.errors)e=i.matches;else if(n.length===0&&!i.initialized&&i.matches.length>0)e=i.matches;else return null}let o=e,s=i==null?void 0:i.errors;if(s!=null){let y=o.findIndex(g=>g.route.id&&(s==null?void 0:s[g.route.id])!==void 0);st(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),o=o.slice(0,Math.min(o.length,y+1))}let c=!1,f=-1;if(l&&i){c=i.renderFallback;for(let y=0;y<o.length;y++){let g=o[y];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(f=y),g.route.id){let{loaderData:v,errors:b}=i,k=g.route.loader&&!v.hasOwnProperty(g.route.id)&&(!b||b[g.route.id]===void 0);if(g.route.lazy||k){l.isStatic&&(c=!0),f>=0?o=o.slice(0,f+1):o=[o[0]];break}}}}let d=l==null?void 0:l.onError,h=i&&d?(y,g)=>{var v,b;d(y,{location:i.location,params:((b=(v=i.matches)==null?void 0:v[0])==null?void 0:b.params)??{},unstable_pattern:FE(i.matches),errorInfo:g})}:void 0;return o.reduceRight((y,g,v)=>{let b,k=!1,C=null,E=null;i&&(b=s&&g.route.id?s[g.route.id]:void 0,C=g.route.errorElement||lN,c&&(f<0&&v===0?(J0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),k=!0,E=null):f===v&&(k=!0,E=g.route.hydrateFallbackElement||null)));let N=n.concat(o.slice(0,v+1)),M=()=>{let j;return b?j=C:k?j=E:g.route.Component?j=w.createElement(g.route.Component,null):g.route.element?j=g.route.element:j=y,w.createElement(aN,{match:g,routeContext:{outlet:y,matches:N,isDataRoute:i!=null},children:j})};return i&&(g.route.ErrorBoundary||g.route.errorElement||v===0)?w.createElement(Z0,{location:i.location,revalidation:i.revalidation,component:C,error:b,children:M(),routeContext:{outlet:null,matches:N,isDataRoute:!0},onError:h}):M()},null)}function yp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function sN(e){let n=w.useContext(fa);return st(n,yp(e)),n}function uN(e){let n=w.useContext(tc);return st(n,yp(e)),n}function cN(e){let n=w.useContext(nr);return st(n,yp(e)),n}function xp(e){let n=cN(e),l=n.matches[n.matches.length-1];return st(l.route.id,`${e} can only be used on routes that contain a unique "id"`),l.route.id}function fN(){return xp("useRouteId")}function dN(){var i;let e=w.useContext(mp),n=uN("useRouteError"),l=xp("useRouteError");return e!==void 0?e:(i=n.errors)==null?void 0:i[l]}function hN(){let{router:e}=sN("useNavigate"),n=xp("useNavigate"),l=w.useRef(!1);return $0(()=>{l.current=!0}),w.useCallback(async(o,s={})=>{mr(l.current,Y0),l.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:n,...s}))},[e,n])}var jv={};function J0(e,n,l){!n&&!jv[e]&&(jv[e]=!0,mr(!1,l))}w.memo(pN);function pN({routes:e,future:n,state:l,isStatic:i,onError:o}){return K0(e,void 0,{state:l,isStatic:i,onError:o})}function mN(e){return eN(e.context)}function xo(e){st(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function gN({basename:e="/",children:n=null,location:l,navigationType:i="POP",navigator:o,static:s=!1,unstable_useTransitions:c}){st(!Uo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),d=w.useMemo(()=>({basename:f,navigator:o,static:s,unstable_useTransitions:c,future:{}}),[f,o,s,c]);typeof l=="string"&&(l=ca(l));let{pathname:h="/",search:y="",hash:g="",state:v=null,key:b="default",unstable_mask:k}=l,C=w.useMemo(()=>{let E=qr(h,f);return E==null?null:{location:{pathname:E,search:y,hash:g,state:v,key:b,unstable_mask:k},navigationType:i}},[f,h,y,g,v,b,i,k]);return mr(C!=null,`<Router basename="${f}"> is not able to match the URL "${h}${y}${g}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:w.createElement(qn.Provider,{value:d},w.createElement(Bo.Provider,{children:n,value:C}))}function yN({children:e,location:n}){return nN(Bh(e),n)}function Bh(e,n=[]){let l=[];return w.Children.forEach(e,(i,o)=>{if(!w.isValidElement(i))return;let s=[...n,o];if(i.type===w.Fragment){l.push.apply(l,Bh(i.props.children,s));return}st(i.type===xo,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),st(!i.props.index||!i.props.children,"An index route cannot have child routes.");let c={id:i.props.id||s.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,middleware:i.props.middleware,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(c.children=Bh(i.props.children,s)),l.push(c)}),l}var Nu="get",Au="application/x-www-form-urlencoded";function nc(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function xN(e){return nc(e)&&e.tagName.toLowerCase()==="button"}function vN(e){return nc(e)&&e.tagName.toLowerCase()==="form"}function bN(e){return nc(e)&&e.tagName.toLowerCase()==="input"}function wN(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function SN(e,n){return e.button===0&&(!n||n==="_self")&&!wN(e)}var su=null;function CN(){if(su===null)try{new FormData(document.createElement("form"),0),su=!1}catch{su=!0}return su}var kN=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Kd(e){return e!=null&&!kN.has(e)?(mr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Au}"`),null):e}function EN(e,n){let l,i,o,s,c;if(vN(e)){let f=e.getAttribute("action");i=f?qr(f,n):null,l=e.getAttribute("method")||Nu,o=Kd(e.getAttribute("enctype"))||Au,s=new FormData(e)}else if(xN(e)||bN(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=e.getAttribute("formaction")||f.getAttribute("action");if(i=d?qr(d,n):null,l=e.getAttribute("formmethod")||f.getAttribute("method")||Nu,o=Kd(e.getAttribute("formenctype"))||Kd(f.getAttribute("enctype"))||Au,s=new FormData(f,e),!CN()){let{name:h,type:y,value:g}=e;if(y==="image"){let v=h?`${h}.`:"";s.append(`${v}x`,"0"),s.append(`${v}y`,"0")}else h&&s.append(h,g)}}else{if(nc(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');l=Nu,i=null,o=Au,c=e}return s&&o==="text/plain"&&(c=s,s=void 0),{action:i,method:l.toLowerCase(),encType:o,formData:s,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function vp(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function NN(e,n,l,i){let o=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return l?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${i}`:o.pathname=`${o.pathname}.${i}`:o.pathname==="/"?o.pathname=`_root.${i}`:n&&qr(o.pathname,n)==="/"?o.pathname=`${n.replace(/\/$/,"")}/_root.${i}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${i}`,o}async function AN(e,n){if(e.id in n)return n[e.id];try{let l=await import(e.module);return n[e.id]=l,l}catch(l){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(l),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function TN(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function RN(e,n,l){let i=await Promise.all(e.map(async o=>{let s=n.routes[o.route.id];if(s){let c=await AN(s,l);return c.links?c.links():[]}return[]}));return DN(i.flat(1).filter(TN).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Mv(e,n,l,i,o,s){let c=(d,h)=>l[h]?d.route.id!==l[h].route.id:!0,f=(d,h)=>{var y;return l[h].pathname!==d.pathname||((y=l[h].route.path)==null?void 0:y.endsWith("*"))&&l[h].params["*"]!==d.params["*"]};return s==="assets"?n.filter((d,h)=>c(d,h)||f(d,h)):s==="data"?n.filter((d,h)=>{var g;let y=i.routes[d.route.id];if(!y||!y.hasLoader)return!1;if(c(d,h)||f(d,h))return!0;if(d.route.shouldRevalidate){let v=d.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((g=l[0])==null?void 0:g.params)||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):[]}function jN(e,n,{includeHydrateFallback:l}={}){return MN(e.map(i=>{let o=n.routes[i.route.id];if(!o)return[];let s=[o.module];return o.clientActionModule&&(s=s.concat(o.clientActionModule)),o.clientLoaderModule&&(s=s.concat(o.clientLoaderModule)),l&&o.hydrateFallbackModule&&(s=s.concat(o.hydrateFallbackModule)),o.imports&&(s=s.concat(o.imports)),s}).flat(1))}function MN(e){return[...new Set(e)]}function ON(e){let n={},l=Object.keys(e).sort();for(let i of l)n[i]=e[i];return n}function DN(e,n){let l=new Set;return new Set(n),e.reduce((i,o)=>{let s=JSON.stringify(ON(o));return l.has(s)||(l.add(s),i.push({key:s,link:o})),i},[])}function W0(){let e=w.useContext(fa);return vp(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function _N(){let e=w.useContext(tc);return vp(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var bp=w.createContext(void 0);bp.displayName="FrameworkContext";function e1(){let e=w.useContext(bp);return vp(e,"You must render this element inside a <HydratedRouter> element"),e}function zN(e,n){let l=w.useContext(bp),[i,o]=w.useState(!1),[s,c]=w.useState(!1),{onFocus:f,onBlur:d,onMouseEnter:h,onMouseLeave:y,onTouchStart:g}=n,v=w.useRef(null);w.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let C=N=>{N.forEach(M=>{c(M.isIntersecting)})},E=new IntersectionObserver(C,{threshold:.5});return v.current&&E.observe(v.current),()=>{E.disconnect()}}},[e]),w.useEffect(()=>{if(i){let C=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(C)}}},[i]);let b=()=>{o(!0)},k=()=>{o(!1),c(!1)};return l?e!=="intent"?[s,v,{}]:[s,v,{onFocus:co(f,b),onBlur:co(d,k),onMouseEnter:co(h,b),onMouseLeave:co(y,k),onTouchStart:co(g,b)}]:[!1,v,{}]}function co(e,n){return l=>{e&&e(l),l.defaultPrevented||n(l)}}function LN({page:e,...n}){let{router:l}=W0(),i=w.useMemo(()=>B0(l.routes,e,l.basename),[l.routes,e,l.basename]);return i?w.createElement(UN,{page:e,matches:i,...n}):null}function BN(e){let{manifest:n,routeModules:l}=e1(),[i,o]=w.useState([]);return w.useEffect(()=>{let s=!1;return RN(e,n,l).then(c=>{s||o(c)}),()=>{s=!0}},[e,n,l]),i}function UN({page:e,matches:n,...l}){let i=yr(),{future:o,manifest:s,routeModules:c}=e1(),{basename:f}=W0(),{loaderData:d,matches:h}=_N(),y=w.useMemo(()=>Mv(e,n,h,s,i,"data"),[e,n,h,s,i]),g=w.useMemo(()=>Mv(e,n,h,s,i,"assets"),[e,n,h,s,i]),v=w.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let C=new Set,E=!1;if(n.forEach(M=>{var D;let j=s.routes[M.route.id];!j||!j.hasLoader||(!y.some(I=>I.route.id===M.route.id)&&M.route.id in d&&((D=c[M.route.id])!=null&&D.shouldRevalidate)||j.hasClientLoader?E=!0:C.add(M.route.id))}),C.size===0)return[];let N=NN(e,f,o.unstable_trailingSlashAwareDataRequests,"data");return E&&C.size>0&&N.searchParams.set("_routes",n.filter(M=>C.has(M.route.id)).map(M=>M.route.id).join(",")),[N.pathname+N.search]},[f,o.unstable_trailingSlashAwareDataRequests,d,i,s,y,n,e,c]),b=w.useMemo(()=>jN(g,s),[g,s]),k=BN(g);return w.createElement(w.Fragment,null,v.map(C=>w.createElement("link",{key:C,rel:"prefetch",as:"fetch",href:C,...l})),b.map(C=>w.createElement("link",{key:C,rel:"modulepreload",href:C,...l})),k.map(({key:C,link:E})=>w.createElement("link",{key:C,nonce:l.nonce,...E,crossOrigin:E.crossOrigin??l.crossOrigin})))}function HN(...e){return n=>{e.forEach(l=>{typeof l=="function"?l(n):l!=null&&(l.current=n)})}}var PN=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{PN&&(window.__reactRouterVersion="7.13.1")}catch{}function IN({basename:e,children:n,unstable_useTransitions:l,window:i}){let o=w.useRef();o.current==null&&(o.current=xE({window:i,v5Compat:!0}));let s=o.current,[c,f]=w.useState({action:s.action,location:s.location}),d=w.useCallback(h=>{l===!1?f(h):w.startTransition(()=>f(h))},[l]);return w.useLayoutEffect(()=>s.listen(d),[s,d]),w.createElement(gN,{basename:e,children:n,location:c.location,navigationType:c.action,navigator:s,unstable_useTransitions:l})}var t1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,n1=w.forwardRef(function({onClick:n,discover:l="render",prefetch:i="none",relative:o,reloadDocument:s,replace:c,unstable_mask:f,state:d,target:h,to:y,preventScrollReset:g,viewTransition:v,unstable_defaultShouldRevalidate:b,...k},C){let{basename:E,navigator:N,unstable_useTransitions:M}=w.useContext(qn),j=typeof y=="string"&&t1.test(y),D=q0(y,E);y=D.to;let I=JE(y,{relative:o}),O=yr(),P=null;if(f){let Q=pp(f,[],O.unstable_mask?O.unstable_mask.pathname:"/",!0);E!=="/"&&(Q.pathname=Q.pathname==="/"?E:hr([E,Q.pathname])),P=N.createHref(Q)}let[q,re,H]=zN(i,k),J=GN(y,{replace:c,unstable_mask:f,state:d,target:h,preventScrollReset:g,relative:o,viewTransition:v,unstable_defaultShouldRevalidate:b,unstable_useTransitions:M});function ne(Q){n&&n(Q),Q.defaultPrevented||J(Q)}let W=!(D.isExternal||s),Z=w.createElement("a",{...k,...H,href:(W?P:void 0)||D.absoluteURL||I,onClick:W?ne:n,ref:HN(C,re),target:h,"data-discover":!j&&l==="render"?"true":void 0});return q&&!j?w.createElement(w.Fragment,null,Z,w.createElement(LN,{page:I})):Z});n1.displayName="Link";var qN=w.forwardRef(function({"aria-current":n="page",caseSensitive:l=!1,className:i="",end:o=!1,style:s,to:c,viewTransition:f,children:d,...h},y){let g=Ho(c,{relative:h.relative}),v=yr(),b=w.useContext(tc),{navigator:k,basename:C}=w.useContext(qn),E=b!=null&&KN(g)&&f===!0,N=k.encodeLocation?k.encodeLocation(g).pathname:g.pathname,M=v.pathname,j=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;l||(M=M.toLowerCase(),j=j?j.toLowerCase():null,N=N.toLowerCase()),j&&C&&(j=qr(j,C)||j);const D=N!=="/"&&N.endsWith("/")?N.length-1:N.length;let I=M===N||!o&&M.startsWith(N)&&M.charAt(D)==="/",O=j!=null&&(j===N||!o&&j.startsWith(N)&&j.charAt(N.length)==="/"),P={isActive:I,isPending:O,isTransitioning:E},q=I?n:void 0,re;typeof i=="function"?re=i(P):re=[i,I?"active":null,O?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let H=typeof s=="function"?s(P):s;return w.createElement(n1,{...h,"aria-current":q,className:re,ref:y,style:H,to:c,viewTransition:f},typeof d=="function"?d(P):d)});qN.displayName="NavLink";var FN=w.forwardRef(({discover:e="render",fetcherKey:n,navigate:l,reloadDocument:i,replace:o,state:s,method:c=Nu,action:f,onSubmit:d,relative:h,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:v,...b},k)=>{let{unstable_useTransitions:C}=w.useContext(qn),E=XN(),N=QN(f,{relative:h}),M=c.toLowerCase()==="get"?"get":"post",j=typeof f=="string"&&t1.test(f),D=I=>{if(d&&d(I),I.defaultPrevented)return;I.preventDefault();let O=I.nativeEvent.submitter,P=(O==null?void 0:O.getAttribute("formmethod"))||c,q=()=>E(O||I.currentTarget,{fetcherKey:n,method:P,navigate:l,replace:o,state:s,relative:h,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:v});C&&l!==!1?w.startTransition(()=>q()):q()};return w.createElement("form",{ref:k,method:M,action:N,onSubmit:i?d:D,...b,"data-discover":!j&&e==="render"?"true":void 0})});FN.displayName="Form";function VN(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function r1(e){let n=w.useContext(fa);return st(n,VN(e)),n}function GN(e,{target:n,replace:l,unstable_mask:i,state:o,preventScrollReset:s,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:d,unstable_useTransitions:h}={}){let y=gp(),g=yr(),v=Ho(e,{relative:c});return w.useCallback(b=>{if(SN(b,n)){b.preventDefault();let k=l!==void 0?l:Ao(g)===Ao(v),C=()=>y(e,{replace:k,unstable_mask:i,state:o,preventScrollReset:s,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:d});h?w.startTransition(()=>C()):C()}},[g,y,v,l,i,o,n,e,s,c,f,d,h])}var YN=0,$N=()=>`__${String(++YN)}__`;function XN(){let{router:e}=r1("useSubmit"),{basename:n}=w.useContext(qn),l=fN(),i=e.fetch,o=e.navigate;return w.useCallback(async(s,c={})=>{let{action:f,method:d,encType:h,formData:y,body:g}=EN(s,n);if(c.navigate===!1){let v=c.fetcherKey||$N();await i(v,l,c.action||f,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:g,formMethod:c.method||d,formEncType:c.encType||h,flushSync:c.flushSync})}else await o(c.action||f,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:g,formMethod:c.method||d,formEncType:c.encType||h,replace:c.replace,state:c.state,fromRouteId:l,flushSync:c.flushSync,viewTransition:c.viewTransition})},[i,o,n,l])}function QN(e,{relative:n}={}){let{basename:l}=w.useContext(qn),i=w.useContext(nr);st(i,"useFormAction must be used inside a RouteContext");let[o]=i.matches.slice(-1),s={...Ho(e||".",{relative:n})},c=yr();if(e==null){s.search=c.search;let f=new URLSearchParams(s.search),d=f.getAll("index");if(d.some(y=>y==="")){f.delete("index"),d.filter(g=>g).forEach(g=>f.append("index",g));let y=f.toString();s.search=y?`?${y}`:""}}return(!e||e===".")&&o.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),l!=="/"&&(s.pathname=s.pathname==="/"?l:hr([l,s.pathname])),Ao(s)}function KN(e,{relative:n}={}){let l=w.useContext(V0);st(l!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=r1("useViewTransitionState"),o=Ho(e,{relative:n});if(!l.isTransitioning)return!1;let s=qr(l.currentLocation.pathname,i)||l.currentLocation.pathname,c=qr(l.nextLocation.pathname,i)||l.nextLocation.pathname;return Du(o.pathname,c)!=null||Du(o.pathname,s)!=null}var kl=L0();const ZN=ec(kl);function l1(e){var n,l,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(n=0;n<o;n++)e[n]&&(l=l1(e[n]))&&(i&&(i+=" "),i+=l)}else for(l in e)e[l]&&(i&&(i+=" "),i+=l);return i}function i1(){for(var e,n,l=0,i="",o=arguments.length;l<o;l++)(e=arguments[l])&&(n=l1(e))&&(i&&(i+=" "),i+=n);return i}const Ov=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Dv=i1,JN=(e,n)=>l=>{var i;if((n==null?void 0:n.variants)==null)return Dv(e,l==null?void 0:l.class,l==null?void 0:l.className);const{variants:o,defaultVariants:s}=n,c=Object.keys(o).map(h=>{const y=l==null?void 0:l[h],g=s==null?void 0:s[h];if(y===null)return null;const v=Ov(y)||Ov(g);return o[h][v]}),f=l&&Object.entries(l).reduce((h,y)=>{let[g,v]=y;return v===void 0||(h[g]=v),h},{}),d=n==null||(i=n.compoundVariants)===null||i===void 0?void 0:i.reduce((h,y)=>{let{class:g,className:v,...b}=y;return Object.entries(b).every(k=>{let[C,E]=k;return Array.isArray(E)?E.includes({...s,...f}[C]):{...s,...f}[C]===E})?[...h,g,v]:h},[]);return Dv(e,c,d,l==null?void 0:l.class,l==null?void 0:l.className)},WN=(e,n)=>{const l=new Array(e.length+n.length);for(let i=0;i<e.length;i++)l[i]=e[i];for(let i=0;i<n.length;i++)l[e.length+i]=n[i];return l},eA=(e,n)=>({classGroupId:e,validator:n}),a1=(e=new Map,n=null,l)=>({nextPart:e,validators:n,classGroupId:l}),_u="-",_v=[],tA="arbitrary..",nA=e=>{const n=lA(e),{conflictingClassGroups:l,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return rA(c);const f=c.split(_u),d=f[0]===""&&f.length>1?1:0;return o1(f,d,n)},getConflictingClassGroupIds:(c,f)=>{if(f){const d=i[c],h=l[c];return d?h?WN(h,d):d:h||_v}return l[c]||_v}}},o1=(e,n,l)=>{if(e.length-n===0)return l.classGroupId;const o=e[n],s=l.nextPart.get(o);if(s){const h=o1(e,n+1,s);if(h)return h}const c=l.validators;if(c===null)return;const f=n===0?e.join(_u):e.slice(n).join(_u),d=c.length;for(let h=0;h<d;h++){const y=c[h];if(y.validator(f))return y.classGroupId}},rA=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),l=n.indexOf(":"),i=n.slice(0,l);return i?tA+i:void 0})(),lA=e=>{const{theme:n,classGroups:l}=e;return iA(l,n)},iA=(e,n)=>{const l=a1();for(const i in e){const o=e[i];wp(o,l,i,n)}return l},wp=(e,n,l,i)=>{const o=e.length;for(let s=0;s<o;s++){const c=e[s];aA(c,n,l,i)}},aA=(e,n,l,i)=>{if(typeof e=="string"){oA(e,n,l);return}if(typeof e=="function"){sA(e,n,l,i);return}uA(e,n,l,i)},oA=(e,n,l)=>{const i=e===""?n:s1(n,e);i.classGroupId=l},sA=(e,n,l,i)=>{if(cA(e)){wp(e(i),n,l,i);return}n.validators===null&&(n.validators=[]),n.validators.push(eA(l,e))},uA=(e,n,l,i)=>{const o=Object.entries(e),s=o.length;for(let c=0;c<s;c++){const[f,d]=o[c];wp(d,s1(n,f),l,i)}},s1=(e,n)=>{let l=e;const i=n.split(_u),o=i.length;for(let s=0;s<o;s++){const c=i[s];let f=l.nextPart.get(c);f||(f=a1(),l.nextPart.set(c,f)),l=f}return l},cA=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,fA=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,l=Object.create(null),i=Object.create(null);const o=(s,c)=>{l[s]=c,n++,n>e&&(n=0,i=l,l=Object.create(null))};return{get(s){let c=l[s];if(c!==void 0)return c;if((c=i[s])!==void 0)return o(s,c),c},set(s,c){s in l?l[s]=c:o(s,c)}}},Uh="!",zv=":",dA=[],Lv=(e,n,l,i,o)=>({modifiers:e,hasImportantModifier:n,baseClassName:l,maybePostfixModifierPosition:i,isExternal:o}),hA=e=>{const{prefix:n,experimentalParseClassName:l}=e;let i=o=>{const s=[];let c=0,f=0,d=0,h;const y=o.length;for(let C=0;C<y;C++){const E=o[C];if(c===0&&f===0){if(E===zv){s.push(o.slice(d,C)),d=C+1;continue}if(E==="/"){h=C;continue}}E==="["?c++:E==="]"?c--:E==="("?f++:E===")"&&f--}const g=s.length===0?o:o.slice(d);let v=g,b=!1;g.endsWith(Uh)?(v=g.slice(0,-1),b=!0):g.startsWith(Uh)&&(v=g.slice(1),b=!0);const k=h&&h>d?h-d:void 0;return Lv(s,b,v,k)};if(n){const o=n+zv,s=i;i=c=>c.startsWith(o)?s(c.slice(o.length)):Lv(dA,!1,c,void 0,!0)}if(l){const o=i;i=s=>l({className:s,parseClassName:o})}return i},pA=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((l,i)=>{n.set(l,1e6+i)}),l=>{const i=[];let o=[];for(let s=0;s<l.length;s++){const c=l[s],f=c[0]==="[",d=n.has(c);f||d?(o.length>0&&(o.sort(),i.push(...o),o=[]),i.push(c)):o.push(c)}return o.length>0&&(o.sort(),i.push(...o)),i}},mA=e=>({cache:fA(e.cacheSize),parseClassName:hA(e),sortModifiers:pA(e),...nA(e)}),gA=/\s+/,yA=(e,n)=>{const{parseClassName:l,getClassGroupId:i,getConflictingClassGroupIds:o,sortModifiers:s}=n,c=[],f=e.trim().split(gA);let d="";for(let h=f.length-1;h>=0;h-=1){const y=f[h],{isExternal:g,modifiers:v,hasImportantModifier:b,baseClassName:k,maybePostfixModifierPosition:C}=l(y);if(g){d=y+(d.length>0?" "+d:d);continue}let E=!!C,N=i(E?k.substring(0,C):k);if(!N){if(!E){d=y+(d.length>0?" "+d:d);continue}if(N=i(k),!N){d=y+(d.length>0?" "+d:d);continue}E=!1}const M=v.length===0?"":v.length===1?v[0]:s(v).join(":"),j=b?M+Uh:M,D=j+N;if(c.indexOf(D)>-1)continue;c.push(D);const I=o(N,E);for(let O=0;O<I.length;++O){const P=I[O];c.push(j+P)}d=y+(d.length>0?" "+d:d)}return d},xA=(...e)=>{let n=0,l,i,o="";for(;n<e.length;)(l=e[n++])&&(i=u1(l))&&(o&&(o+=" "),o+=i);return o},u1=e=>{if(typeof e=="string")return e;let n,l="";for(let i=0;i<e.length;i++)e[i]&&(n=u1(e[i]))&&(l&&(l+=" "),l+=n);return l},vA=(e,...n)=>{let l,i,o,s;const c=d=>{const h=n.reduce((y,g)=>g(y),e());return l=mA(h),i=l.cache.get,o=l.cache.set,s=f,f(d)},f=d=>{const h=i(d);if(h)return h;const y=yA(d,l);return o(d,y),y};return s=c,(...d)=>s(xA(...d))},bA=[],kt=e=>{const n=l=>l[e]||bA;return n.isThemeGetter=!0,n},c1=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,f1=/^\((?:(\w[\w-]*):)?(.+)\)$/i,wA=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,SA=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,CA=/\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$/,kA=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,EA=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,NA=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,vl=e=>wA.test(e),De=e=>!!e&&!Number.isNaN(Number(e)),bl=e=>!!e&&Number.isInteger(Number(e)),Zd=e=>e.endsWith("%")&&De(e.slice(0,-1)),Ir=e=>SA.test(e),d1=()=>!0,AA=e=>CA.test(e)&&!kA.test(e),Sp=()=>!1,TA=e=>EA.test(e),RA=e=>NA.test(e),jA=e=>!me(e)&&!ge(e),MA=e=>jl(e,m1,Sp),me=e=>c1.test(e),Jl=e=>jl(e,g1,AA),Bv=e=>jl(e,HA,De),OA=e=>jl(e,x1,d1),DA=e=>jl(e,y1,Sp),Uv=e=>jl(e,h1,Sp),_A=e=>jl(e,p1,RA),uu=e=>jl(e,v1,TA),ge=e=>f1.test(e),fo=e=>ai(e,g1),zA=e=>ai(e,y1),Hv=e=>ai(e,h1),LA=e=>ai(e,m1),BA=e=>ai(e,p1),cu=e=>ai(e,v1,!0),UA=e=>ai(e,x1,!0),jl=(e,n,l)=>{const i=c1.exec(e);return i?i[1]?n(i[1]):l(i[2]):!1},ai=(e,n,l=!1)=>{const i=f1.exec(e);return i?i[1]?n(i[1]):l:!1},h1=e=>e==="position"||e==="percentage",p1=e=>e==="image"||e==="url",m1=e=>e==="length"||e==="size"||e==="bg-size",g1=e=>e==="length",HA=e=>e==="number",y1=e=>e==="family-name",x1=e=>e==="number"||e==="weight",v1=e=>e==="shadow",PA=()=>{const e=kt("color"),n=kt("font"),l=kt("text"),i=kt("font-weight"),o=kt("tracking"),s=kt("leading"),c=kt("breakpoint"),f=kt("container"),d=kt("spacing"),h=kt("radius"),y=kt("shadow"),g=kt("inset-shadow"),v=kt("text-shadow"),b=kt("drop-shadow"),k=kt("blur"),C=kt("perspective"),E=kt("aspect"),N=kt("ease"),M=kt("animate"),j=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],I=()=>[...D(),ge,me],O=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto","contain","none"],q=()=>[ge,me,d],re=()=>[vl,"full","auto",...q()],H=()=>[bl,"none","subgrid",ge,me],J=()=>["auto",{span:["full",bl,ge,me]},bl,ge,me],ne=()=>[bl,"auto",ge,me],W=()=>["auto","min","max","fr",ge,me],Z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Q=()=>["start","end","center","stretch","center-safe","end-safe"],B=()=>["auto",...q()],Y=()=>[vl,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...q()],le=()=>[vl,"screen","full","dvw","lvw","svw","min","max","fit",...q()],de=()=>[vl,"screen","full","lh","dvh","lvh","svh","min","max","fit",...q()],R=()=>[e,ge,me],z=()=>[...D(),Hv,Uv,{position:[ge,me]}],L=()=>["no-repeat",{repeat:["","x","y","space","round"]}],T=()=>["auto","cover","contain",LA,MA,{size:[ge,me]}],se=()=>[Zd,fo,Jl],ce=()=>["","none","full",h,ge,me],ue=()=>["",De,fo,Jl],we=()=>["solid","dashed","dotted","double"],Ae=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],xe=()=>[De,Zd,Hv,Uv],Ne=()=>["","none",k,ge,me],rt=()=>["none",De,ge,me],tt=()=>["none",De,ge,me],at=()=>[De,ge,me],Ye=()=>[vl,"full",...q()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ir],breakpoint:[Ir],color:[d1],container:[Ir],"drop-shadow":[Ir],ease:["in","out","in-out"],font:[jA],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ir],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ir],shadow:[Ir],spacing:["px",De],text:[Ir],"text-shadow":[Ir],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",vl,me,ge,E]}],container:["container"],columns:[{columns:[De,me,ge,f]}],"break-after":[{"break-after":j()}],"break-before":[{"break-before":j()}],"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:I()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:re()}],"inset-x":[{"inset-x":re()}],"inset-y":[{"inset-y":re()}],start:[{"inset-s":re(),start:re()}],end:[{"inset-e":re(),end:re()}],"inset-bs":[{"inset-bs":re()}],"inset-be":[{"inset-be":re()}],top:[{top:re()}],right:[{right:re()}],bottom:[{bottom:re()}],left:[{left:re()}],visibility:["visible","invisible","collapse"],z:[{z:[bl,"auto",ge,me]}],basis:[{basis:[vl,"full","auto",f,...q()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[De,vl,"auto","initial","none",me]}],grow:[{grow:["",De,ge,me]}],shrink:[{shrink:["",De,ge,me]}],order:[{order:[bl,"first","last","none",ge,me]}],"grid-cols":[{"grid-cols":H()}],"col-start-end":[{col:J()}],"col-start":[{"col-start":ne()}],"col-end":[{"col-end":ne()}],"grid-rows":[{"grid-rows":H()}],"row-start-end":[{row:J()}],"row-start":[{"row-start":ne()}],"row-end":[{"row-end":ne()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":W()}],"auto-rows":[{"auto-rows":W()}],gap:[{gap:q()}],"gap-x":[{"gap-x":q()}],"gap-y":[{"gap-y":q()}],"justify-content":[{justify:[...Z(),"normal"]}],"justify-items":[{"justify-items":[...Q(),"normal"]}],"justify-self":[{"justify-self":["auto",...Q()]}],"align-content":[{content:["normal",...Z()]}],"align-items":[{items:[...Q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Q(),{baseline:["","last"]}]}],"place-content":[{"place-content":Z()}],"place-items":[{"place-items":[...Q(),"baseline"]}],"place-self":[{"place-self":["auto",...Q()]}],p:[{p:q()}],px:[{px:q()}],py:[{py:q()}],ps:[{ps:q()}],pe:[{pe:q()}],pbs:[{pbs:q()}],pbe:[{pbe:q()}],pt:[{pt:q()}],pr:[{pr:q()}],pb:[{pb:q()}],pl:[{pl:q()}],m:[{m:B()}],mx:[{mx:B()}],my:[{my:B()}],ms:[{ms:B()}],me:[{me:B()}],mbs:[{mbs:B()}],mbe:[{mbe:B()}],mt:[{mt:B()}],mr:[{mr:B()}],mb:[{mb:B()}],ml:[{ml:B()}],"space-x":[{"space-x":q()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":q()}],"space-y-reverse":["space-y-reverse"],size:[{size:Y()}],"inline-size":[{inline:["auto",...le()]}],"min-inline-size":[{"min-inline":["auto",...le()]}],"max-inline-size":[{"max-inline":["none",...le()]}],"block-size":[{block:["auto",...de()]}],"min-block-size":[{"min-block":["auto",...de()]}],"max-block-size":[{"max-block":["none",...de()]}],w:[{w:[f,"screen",...Y()]}],"min-w":[{"min-w":[f,"screen","none",...Y()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[c]},...Y()]}],h:[{h:["screen","lh",...Y()]}],"min-h":[{"min-h":["screen","lh","none",...Y()]}],"max-h":[{"max-h":["screen","lh",...Y()]}],"font-size":[{text:["base",l,fo,Jl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,UA,OA]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Zd,me]}],"font-family":[{font:[zA,DA,n]}],"font-features":[{"font-features":[me]}],"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:[o,ge,me]}],"line-clamp":[{"line-clamp":[De,"none",ge,Bv]}],leading:[{leading:[s,...q()]}],"list-image":[{"list-image":["none",ge,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ge,me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:R()}],"text-color":[{text:R()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...we(),"wavy"]}],"text-decoration-thickness":[{decoration:[De,"from-font","auto",ge,Jl]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[De,"auto",ge,me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:q()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge,me]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ge,me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:z()}],"bg-repeat":[{bg:L()}],"bg-size":[{bg:T()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},bl,ge,me],radial:["",ge,me],conic:[bl,ge,me]},BA,_A]}],"bg-color":[{bg:R()}],"gradient-from-pos":[{from:se()}],"gradient-via-pos":[{via:se()}],"gradient-to-pos":[{to:se()}],"gradient-from":[{from:R()}],"gradient-via":[{via:R()}],"gradient-to":[{to:R()}],rounded:[{rounded:ce()}],"rounded-s":[{"rounded-s":ce()}],"rounded-e":[{"rounded-e":ce()}],"rounded-t":[{"rounded-t":ce()}],"rounded-r":[{"rounded-r":ce()}],"rounded-b":[{"rounded-b":ce()}],"rounded-l":[{"rounded-l":ce()}],"rounded-ss":[{"rounded-ss":ce()}],"rounded-se":[{"rounded-se":ce()}],"rounded-ee":[{"rounded-ee":ce()}],"rounded-es":[{"rounded-es":ce()}],"rounded-tl":[{"rounded-tl":ce()}],"rounded-tr":[{"rounded-tr":ce()}],"rounded-br":[{"rounded-br":ce()}],"rounded-bl":[{"rounded-bl":ce()}],"border-w":[{border:ue()}],"border-w-x":[{"border-x":ue()}],"border-w-y":[{"border-y":ue()}],"border-w-s":[{"border-s":ue()}],"border-w-e":[{"border-e":ue()}],"border-w-bs":[{"border-bs":ue()}],"border-w-be":[{"border-be":ue()}],"border-w-t":[{"border-t":ue()}],"border-w-r":[{"border-r":ue()}],"border-w-b":[{"border-b":ue()}],"border-w-l":[{"border-l":ue()}],"divide-x":[{"divide-x":ue()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ue()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...we(),"hidden","none"]}],"divide-style":[{divide:[...we(),"hidden","none"]}],"border-color":[{border:R()}],"border-color-x":[{"border-x":R()}],"border-color-y":[{"border-y":R()}],"border-color-s":[{"border-s":R()}],"border-color-e":[{"border-e":R()}],"border-color-bs":[{"border-bs":R()}],"border-color-be":[{"border-be":R()}],"border-color-t":[{"border-t":R()}],"border-color-r":[{"border-r":R()}],"border-color-b":[{"border-b":R()}],"border-color-l":[{"border-l":R()}],"divide-color":[{divide:R()}],"outline-style":[{outline:[...we(),"none","hidden"]}],"outline-offset":[{"outline-offset":[De,ge,me]}],"outline-w":[{outline:["",De,fo,Jl]}],"outline-color":[{outline:R()}],shadow:[{shadow:["","none",y,cu,uu]}],"shadow-color":[{shadow:R()}],"inset-shadow":[{"inset-shadow":["none",g,cu,uu]}],"inset-shadow-color":[{"inset-shadow":R()}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:R()}],"ring-offset-w":[{"ring-offset":[De,Jl]}],"ring-offset-color":[{"ring-offset":R()}],"inset-ring-w":[{"inset-ring":ue()}],"inset-ring-color":[{"inset-ring":R()}],"text-shadow":[{"text-shadow":["none",v,cu,uu]}],"text-shadow-color":[{"text-shadow":R()}],opacity:[{opacity:[De,ge,me]}],"mix-blend":[{"mix-blend":[...Ae(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ae()}],"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":[De]}],"mask-image-linear-from-pos":[{"mask-linear-from":xe()}],"mask-image-linear-to-pos":[{"mask-linear-to":xe()}],"mask-image-linear-from-color":[{"mask-linear-from":R()}],"mask-image-linear-to-color":[{"mask-linear-to":R()}],"mask-image-t-from-pos":[{"mask-t-from":xe()}],"mask-image-t-to-pos":[{"mask-t-to":xe()}],"mask-image-t-from-color":[{"mask-t-from":R()}],"mask-image-t-to-color":[{"mask-t-to":R()}],"mask-image-r-from-pos":[{"mask-r-from":xe()}],"mask-image-r-to-pos":[{"mask-r-to":xe()}],"mask-image-r-from-color":[{"mask-r-from":R()}],"mask-image-r-to-color":[{"mask-r-to":R()}],"mask-image-b-from-pos":[{"mask-b-from":xe()}],"mask-image-b-to-pos":[{"mask-b-to":xe()}],"mask-image-b-from-color":[{"mask-b-from":R()}],"mask-image-b-to-color":[{"mask-b-to":R()}],"mask-image-l-from-pos":[{"mask-l-from":xe()}],"mask-image-l-to-pos":[{"mask-l-to":xe()}],"mask-image-l-from-color":[{"mask-l-from":R()}],"mask-image-l-to-color":[{"mask-l-to":R()}],"mask-image-x-from-pos":[{"mask-x-from":xe()}],"mask-image-x-to-pos":[{"mask-x-to":xe()}],"mask-image-x-from-color":[{"mask-x-from":R()}],"mask-image-x-to-color":[{"mask-x-to":R()}],"mask-image-y-from-pos":[{"mask-y-from":xe()}],"mask-image-y-to-pos":[{"mask-y-to":xe()}],"mask-image-y-from-color":[{"mask-y-from":R()}],"mask-image-y-to-color":[{"mask-y-to":R()}],"mask-image-radial":[{"mask-radial":[ge,me]}],"mask-image-radial-from-pos":[{"mask-radial-from":xe()}],"mask-image-radial-to-pos":[{"mask-radial-to":xe()}],"mask-image-radial-from-color":[{"mask-radial-from":R()}],"mask-image-radial-to-color":[{"mask-radial-to":R()}],"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":D()}],"mask-image-conic-pos":[{"mask-conic":[De]}],"mask-image-conic-from-pos":[{"mask-conic-from":xe()}],"mask-image-conic-to-pos":[{"mask-conic-to":xe()}],"mask-image-conic-from-color":[{"mask-conic-from":R()}],"mask-image-conic-to-color":[{"mask-conic-to":R()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:z()}],"mask-repeat":[{mask:L()}],"mask-size":[{mask:T()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ge,me]}],filter:[{filter:["","none",ge,me]}],blur:[{blur:Ne()}],brightness:[{brightness:[De,ge,me]}],contrast:[{contrast:[De,ge,me]}],"drop-shadow":[{"drop-shadow":["","none",b,cu,uu]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",De,ge,me]}],"hue-rotate":[{"hue-rotate":[De,ge,me]}],invert:[{invert:["",De,ge,me]}],saturate:[{saturate:[De,ge,me]}],sepia:[{sepia:["",De,ge,me]}],"backdrop-filter":[{"backdrop-filter":["","none",ge,me]}],"backdrop-blur":[{"backdrop-blur":Ne()}],"backdrop-brightness":[{"backdrop-brightness":[De,ge,me]}],"backdrop-contrast":[{"backdrop-contrast":[De,ge,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",De,ge,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[De,ge,me]}],"backdrop-invert":[{"backdrop-invert":["",De,ge,me]}],"backdrop-opacity":[{"backdrop-opacity":[De,ge,me]}],"backdrop-saturate":[{"backdrop-saturate":[De,ge,me]}],"backdrop-sepia":[{"backdrop-sepia":["",De,ge,me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":q()}],"border-spacing-x":[{"border-spacing-x":q()}],"border-spacing-y":[{"border-spacing-y":q()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ge,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[De,"initial",ge,me]}],ease:[{ease:["linear","initial",N,ge,me]}],delay:[{delay:[De,ge,me]}],animate:[{animate:["none",M,ge,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,ge,me]}],"perspective-origin":[{"perspective-origin":I()}],rotate:[{rotate:rt()}],"rotate-x":[{"rotate-x":rt()}],"rotate-y":[{"rotate-y":rt()}],"rotate-z":[{"rotate-z":rt()}],scale:[{scale:tt()}],"scale-x":[{"scale-x":tt()}],"scale-y":[{"scale-y":tt()}],"scale-z":[{"scale-z":tt()}],"scale-3d":["scale-3d"],skew:[{skew:at()}],"skew-x":[{"skew-x":at()}],"skew-y":[{"skew-y":at()}],transform:[{transform:[ge,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:I()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ye()}],"translate-x":[{"translate-x":Ye()}],"translate-y":[{"translate-y":Ye()}],"translate-z":[{"translate-z":Ye()}],"translate-none":["translate-none"],accent:[{accent:R()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:R()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ge,me]}],"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":q()}],"scroll-mx":[{"scroll-mx":q()}],"scroll-my":[{"scroll-my":q()}],"scroll-ms":[{"scroll-ms":q()}],"scroll-me":[{"scroll-me":q()}],"scroll-mbs":[{"scroll-mbs":q()}],"scroll-mbe":[{"scroll-mbe":q()}],"scroll-mt":[{"scroll-mt":q()}],"scroll-mr":[{"scroll-mr":q()}],"scroll-mb":[{"scroll-mb":q()}],"scroll-ml":[{"scroll-ml":q()}],"scroll-p":[{"scroll-p":q()}],"scroll-px":[{"scroll-px":q()}],"scroll-py":[{"scroll-py":q()}],"scroll-ps":[{"scroll-ps":q()}],"scroll-pe":[{"scroll-pe":q()}],"scroll-pbs":[{"scroll-pbs":q()}],"scroll-pbe":[{"scroll-pbe":q()}],"scroll-pt":[{"scroll-pt":q()}],"scroll-pr":[{"scroll-pr":q()}],"scroll-pb":[{"scroll-pb":q()}],"scroll-pl":[{"scroll-pl":q()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ge,me]}],fill:[{fill:["none",...R()]}],"stroke-w":[{stroke:[De,fo,Jl,Bv]}],stroke:[{stroke:["none",...R()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},IA=vA(PA);function ye(...e){return IA(i1(e))}function Pv(e){return e.startsWith("chatId:")?e.slice(7):e}const qA=JN("touch-manipulation inline-flex items-center justify-center whitespace-nowrap cursor-pointer rounded-md 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",{variants:{variant:{default:"bg-primary text-primary-foreground disabled:bg-primary/50 disabled:text-primary-foreground/90 hover:bg-primary/90",juicy:"bg-logo text-primary-foreground disabled:text-primary-foreground/50 hover:bg-logo/90",destructive:"bg-destructive dark:text-background",outline:"border disabled:bg-transparent disabled:text-foreground/50 border-inpu disabled:border-input/90 bg-card hover:bg-muted hover:text-accent-foreground",secondary:"bg-transparent border border-border text-secondary-foreground hover:text-secondary-foreground/60 disabled:text-secondary-foreground/50",ghost:"hover:bg-accent dark:hover:bg-card hover:text-accent-foreground text-muted-foreground disabled:text-muted-foreground/50 border border-border/0 hover:border-border",link:"text-primary disabled:text-primary/50 underline-offset-4 hover:underline",none:""},size:{default:"h-10 px-4 rounded-full py-2",sm:"h-9 rounded-full px-3",lg:"h-11 rounded-full px-8",icon:"h-10 w-10 rounded-lg","icon-sm":"h-5.5 w-5.5 rounded-lg"}},defaultVariants:{variant:"default",size:"default"}}),Fe=w.forwardRef(({className:e,variant:n,size:l,...i},o)=>x.jsx("button",{className:ye(qA({variant:n,size:l,className:e})),ref:o,...i}));Fe.displayName="Button";function At(e,n,{checkForDefaultPrevented:l=!0}={}){return function(o){if(e==null||e(o),l===!1||!o.defaultPrevented)return n==null?void 0:n(o)}}function Iv(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function b1(...e){return n=>{let l=!1;const i=e.map(o=>{const s=Iv(o,n);return!l&&typeof s=="function"&&(l=!0),s});if(l)return()=>{for(let o=0;o<i.length;o++){const s=i[o];typeof s=="function"?s():Iv(e[o],null)}}}}function En(...e){return w.useCallback(b1(...e),e)}function FA(e,n){const l=w.createContext(n),i=s=>{const{children:c,...f}=s,d=w.useMemo(()=>f,Object.values(f));return x.jsx(l.Provider,{value:d,children:c})};i.displayName=e+"Provider";function o(s){const c=w.useContext(l);if(c)return c;if(n!==void 0)return n;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[i,o]}function rc(e,n=[]){let l=[];function i(s,c){const f=w.createContext(c),d=l.length;l=[...l,c];const h=g=>{var N;const{scope:v,children:b,...k}=g,C=((N=v==null?void 0:v[e])==null?void 0:N[d])||f,E=w.useMemo(()=>k,Object.values(k));return x.jsx(C.Provider,{value:E,children:b})};h.displayName=s+"Provider";function y(g,v){var C;const b=((C=v==null?void 0:v[e])==null?void 0:C[d])||f,k=w.useContext(b);if(k)return k;if(c!==void 0)return c;throw new Error(`\`${g}\` must be used within \`${s}\``)}return[h,y]}const o=()=>{const s=l.map(c=>w.createContext(c));return function(f){const d=(f==null?void 0:f[e])||s;return w.useMemo(()=>({[`__scope${e}`]:{...f,[e]:d}}),[f,d])}};return o.scopeName=e,[i,VA(o,...n)]}function VA(...e){const n=e[0];if(e.length===1)return n;const l=()=>{const i=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const c=i.reduce((f,{useScope:d,scopeName:h})=>{const g=d(s)[`__scope${h}`];return{...f,...g}},{});return w.useMemo(()=>({[`__scope${n.scopeName}`]:c}),[c])}};return l.scopeName=n.scopeName,l}var El=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},GA=z0[" useId ".trim().toString()]||(()=>{}),YA=0;function vo(e){const[n,l]=w.useState(GA());return El(()=>{l(i=>i??String(YA++))},[e]),e||(n?`radix-${n}`:"")}var $A=z0[" useInsertionEffect ".trim().toString()]||El;function Cp({prop:e,defaultProp:n,onChange:l=()=>{},caller:i}){const[o,s,c]=XA({defaultProp:n,onChange:l}),f=e!==void 0,d=f?e:o;{const y=w.useRef(e!==void 0);w.useEffect(()=>{const g=y.current;g!==f&&console.warn(`${i} is changing from ${g?"controlled":"uncontrolled"} to ${f?"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.`),y.current=f},[f,i])}const h=w.useCallback(y=>{var g;if(f){const v=QA(y)?y(e):y;v!==e&&((g=c.current)==null||g.call(c,v))}else s(y)},[f,e,s,c]);return[d,h]}function XA({defaultProp:e,onChange:n}){const[l,i]=w.useState(e),o=w.useRef(l),s=w.useRef(n);return $A(()=>{s.current=n},[n]),w.useEffect(()=>{var c;o.current!==l&&((c=s.current)==null||c.call(s,l),o.current=l)},[l,o]),[l,i,s]}function QA(e){return typeof e=="function"}function kp(e){const n=KA(e),l=w.forwardRef((i,o)=>{const{children:s,...c}=i,f=w.Children.toArray(s),d=f.find(JA);if(d){const h=d.props.children,y=f.map(g=>g===d?w.Children.count(h)>1?w.Children.only(null):w.isValidElement(h)?h.props.children:null:g);return x.jsx(n,{...c,ref:o,children:w.isValidElement(h)?w.cloneElement(h,void 0,y):null})}return x.jsx(n,{...c,ref:o,children:s})});return l.displayName=`${e}.Slot`,l}function KA(e){const n=w.forwardRef((l,i)=>{const{children:o,...s}=l;if(w.isValidElement(o)){const c=eT(o),f=WA(s,o.props);return o.type!==w.Fragment&&(f.ref=i?b1(i,c):c),w.cloneElement(o,f)}return w.Children.count(o)>1?w.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var w1=Symbol("radix.slottable");function ZA(e){const n=({children:l})=>x.jsx(x.Fragment,{children:l});return n.displayName=`${e}.Slottable`,n.__radixId=w1,n}function JA(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===w1}function WA(e,n){const l={...n};for(const i in n){const o=e[i],s=n[i];/^on[A-Z]/.test(i)?o&&s?l[i]=(...f)=>{const d=s(...f);return o(...f),d}:o&&(l[i]=o):i==="style"?l[i]={...o,...s}:i==="className"&&(l[i]=[o,s].filter(Boolean).join(" "))}return{...e,...l}}function eT(e){var i,o;let n=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,l=n&&"isReactWarning"in n&&n.isReactWarning;return l?e.ref:(n=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,l=n&&"isReactWarning"in n&&n.isReactWarning,l?e.props.ref:e.props.ref||e.ref)}var tT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Yt=tT.reduce((e,n)=>{const l=kp(`Primitive.${n}`),i=w.forwardRef((o,s)=>{const{asChild:c,...f}=o,d=c?l:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(d,{...f,ref:s})});return i.displayName=`Primitive.${n}`,{...e,[n]:i}},{});function nT(e,n){e&&kl.flushSync(()=>e.dispatchEvent(n))}function ia(e){const n=w.useRef(e);return w.useEffect(()=>{n.current=e}),w.useMemo(()=>(...l)=>{var i;return(i=n.current)==null?void 0:i.call(n,...l)},[])}function rT(e,n=globalThis==null?void 0:globalThis.document){const l=ia(e);w.useEffect(()=>{const i=o=>{o.key==="Escape"&&l(o)};return n.addEventListener("keydown",i,{capture:!0}),()=>n.removeEventListener("keydown",i,{capture:!0})},[l,n])}var lT="DismissableLayer",Hh="dismissableLayer.update",iT="dismissableLayer.pointerDownOutside",aT="dismissableLayer.focusOutside",qv,S1=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),lc=w.forwardRef((e,n)=>{const{disableOutsidePointerEvents:l=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:c,onDismiss:f,...d}=e,h=w.useContext(S1),[y,g]=w.useState(null),v=(y==null?void 0:y.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,b]=w.useState({}),k=En(n,P=>g(P)),C=Array.from(h.layers),[E]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),N=C.indexOf(E),M=y?C.indexOf(y):-1,j=h.layersWithOutsidePointerEventsDisabled.size>0,D=M>=N,I=uT(P=>{const q=P.target,re=[...h.branches].some(H=>H.contains(q));!D||re||(o==null||o(P),c==null||c(P),P.defaultPrevented||f==null||f())},v),O=cT(P=>{const q=P.target;[...h.branches].some(H=>H.contains(q))||(s==null||s(P),c==null||c(P),P.defaultPrevented||f==null||f())},v);return rT(P=>{M===h.layers.size-1&&(i==null||i(P),!P.defaultPrevented&&f&&(P.preventDefault(),f()))},v),w.useEffect(()=>{if(y)return l&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(qv=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(y)),h.layers.add(y),Fv(),()=>{l&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=qv)}},[y,v,l,h]),w.useEffect(()=>()=>{y&&(h.layers.delete(y),h.layersWithOutsidePointerEventsDisabled.delete(y),Fv())},[y,h]),w.useEffect(()=>{const P=()=>b({});return document.addEventListener(Hh,P),()=>document.removeEventListener(Hh,P)},[]),x.jsx(Yt.div,{...d,ref:k,style:{pointerEvents:j?D?"auto":"none":void 0,...e.style},onFocusCapture:At(e.onFocusCapture,O.onFocusCapture),onBlurCapture:At(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:At(e.onPointerDownCapture,I.onPointerDownCapture)})});lc.displayName=lT;var oT="DismissableLayerBranch",sT=w.forwardRef((e,n)=>{const l=w.useContext(S1),i=w.useRef(null),o=En(n,i);return w.useEffect(()=>{const s=i.current;if(s)return l.branches.add(s),()=>{l.branches.delete(s)}},[l.branches]),x.jsx(Yt.div,{...e,ref:o})});sT.displayName=oT;function uT(e,n=globalThis==null?void 0:globalThis.document){const l=ia(e),i=w.useRef(!1),o=w.useRef(()=>{});return w.useEffect(()=>{const s=f=>{if(f.target&&!i.current){let d=function(){C1(iT,l,h,{discrete:!0})};const h={originalEvent:f};f.pointerType==="touch"?(n.removeEventListener("click",o.current),o.current=d,n.addEventListener("click",o.current,{once:!0})):d()}else n.removeEventListener("click",o.current);i.current=!1},c=window.setTimeout(()=>{n.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(c),n.removeEventListener("pointerdown",s),n.removeEventListener("click",o.current)}},[n,l]),{onPointerDownCapture:()=>i.current=!0}}function cT(e,n=globalThis==null?void 0:globalThis.document){const l=ia(e),i=w.useRef(!1);return w.useEffect(()=>{const o=s=>{s.target&&!i.current&&C1(aT,l,{originalEvent:s},{discrete:!1})};return n.addEventListener("focusin",o),()=>n.removeEventListener("focusin",o)},[n,l]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function Fv(){const e=new CustomEvent(Hh);document.dispatchEvent(e)}function C1(e,n,l,{discrete:i}){const o=l.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:l});n&&o.addEventListener(e,n,{once:!0}),i?nT(o,s):o.dispatchEvent(s)}var Jd="focusScope.autoFocusOnMount",Wd="focusScope.autoFocusOnUnmount",Vv={bubbles:!1,cancelable:!0},fT="FocusScope",Ep=w.forwardRef((e,n)=>{const{loop:l=!1,trapped:i=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...c}=e,[f,d]=w.useState(null),h=ia(o),y=ia(s),g=w.useRef(null),v=En(n,C=>d(C)),b=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(i){let C=function(j){if(b.paused||!f)return;const D=j.target;f.contains(D)?g.current=D:Sl(g.current,{select:!0})},E=function(j){if(b.paused||!f)return;const D=j.relatedTarget;D!==null&&(f.contains(D)||Sl(g.current,{select:!0}))},N=function(j){if(document.activeElement===document.body)for(const I of j)I.removedNodes.length>0&&Sl(f)};document.addEventListener("focusin",C),document.addEventListener("focusout",E);const M=new MutationObserver(N);return f&&M.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",E),M.disconnect()}}},[i,f,b.paused]),w.useEffect(()=>{if(f){Yv.add(b);const C=document.activeElement;if(!f.contains(C)){const N=new CustomEvent(Jd,Vv);f.addEventListener(Jd,h),f.dispatchEvent(N),N.defaultPrevented||(dT(yT(k1(f)),{select:!0}),document.activeElement===C&&Sl(f))}return()=>{f.removeEventListener(Jd,h),setTimeout(()=>{const N=new CustomEvent(Wd,Vv);f.addEventListener(Wd,y),f.dispatchEvent(N),N.defaultPrevented||Sl(C??document.body,{select:!0}),f.removeEventListener(Wd,y),Yv.remove(b)},0)}}},[f,h,y,b]);const k=w.useCallback(C=>{if(!l&&!i||b.paused)return;const E=C.key==="Tab"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,N=document.activeElement;if(E&&N){const M=C.currentTarget,[j,D]=hT(M);j&&D?!C.shiftKey&&N===D?(C.preventDefault(),l&&Sl(j,{select:!0})):C.shiftKey&&N===j&&(C.preventDefault(),l&&Sl(D,{select:!0})):N===M&&C.preventDefault()}},[l,i,b.paused]);return x.jsx(Yt.div,{tabIndex:-1,...c,ref:v,onKeyDown:k})});Ep.displayName=fT;function dT(e,{select:n=!1}={}){const l=document.activeElement;for(const i of e)if(Sl(i,{select:n}),document.activeElement!==l)return}function hT(e){const n=k1(e),l=Gv(n,e),i=Gv(n.reverse(),e);return[l,i]}function k1(e){const n=[],l=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const o=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||o?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;l.nextNode();)n.push(l.currentNode);return n}function Gv(e,n){for(const l of e)if(!pT(l,{upTo:n}))return l}function pT(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function mT(e){return e instanceof HTMLInputElement&&"select"in e}function Sl(e,{select:n=!1}={}){if(e&&e.focus){const l=document.activeElement;e.focus({preventScroll:!0}),e!==l&&mT(e)&&n&&e.select()}}var Yv=gT();function gT(){let e=[];return{add(n){const l=e[0];n!==l&&(l==null||l.pause()),e=$v(e,n),e.unshift(n)},remove(n){var l;e=$v(e,n),(l=e[0])==null||l.resume()}}}function $v(e,n){const l=[...e],i=l.indexOf(n);return i!==-1&&l.splice(i,1),l}function yT(e){return e.filter(n=>n.tagName!=="A")}var xT="Portal",ic=w.forwardRef((e,n)=>{var f;const{container:l,...i}=e,[o,s]=w.useState(!1);El(()=>s(!0),[]);const c=l||o&&((f=globalThis==null?void 0:globalThis.document)==null?void 0:f.body);return c?ZN.createPortal(x.jsx(Yt.div,{...i,ref:n}),c):null});ic.displayName=xT;function vT(e,n){return w.useReducer((l,i)=>n[l][i]??l,e)}var Ml=e=>{const{present:n,children:l}=e,i=bT(n),o=typeof l=="function"?l({present:i.isPresent}):w.Children.only(l),s=En(i.ref,wT(o));return typeof l=="function"||i.isPresent?w.cloneElement(o,{ref:s}):null};Ml.displayName="Presence";function bT(e){const[n,l]=w.useState(),i=w.useRef(null),o=w.useRef(e),s=w.useRef("none"),c=e?"mounted":"unmounted",[f,d]=vT(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const h=fu(i.current);s.current=f==="mounted"?h:"none"},[f]),El(()=>{const h=i.current,y=o.current;if(y!==e){const v=s.current,b=fu(h);e?d("MOUNT"):b==="none"||(h==null?void 0:h.display)==="none"?d("UNMOUNT"):d(y&&v!==b?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),El(()=>{if(n){let h;const y=n.ownerDocument.defaultView??window,g=b=>{const C=fu(i.current).includes(CSS.escape(b.animationName));if(b.target===n&&C&&(d("ANIMATION_END"),!o.current)){const E=n.style.animationFillMode;n.style.animationFillMode="forwards",h=y.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=E)})}},v=b=>{b.target===n&&(s.current=fu(i.current))};return n.addEventListener("animationstart",v),n.addEventListener("animationcancel",g),n.addEventListener("animationend",g),()=>{y.clearTimeout(h),n.removeEventListener("animationstart",v),n.removeEventListener("animationcancel",g),n.removeEventListener("animationend",g)}}else d("ANIMATION_END")},[n,d]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:w.useCallback(h=>{i.current=h?getComputedStyle(h):null,l(h)},[])}}function fu(e){return(e==null?void 0:e.animationName)||"none"}function wT(e){var i,o;let n=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,l=n&&"isReactWarning"in n&&n.isReactWarning;return l?e.ref:(n=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,l=n&&"isReactWarning"in n&&n.isReactWarning,l?e.props.ref:e.props.ref||e.ref)}var eh=0;function E1(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Xv()),document.body.insertAdjacentElement("beforeend",e[1]??Xv()),eh++,()=>{eh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),eh--}},[])}function Xv(){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 fr=function(){return fr=Object.assign||function(n){for(var l,i=1,o=arguments.length;i<o;i++){l=arguments[i];for(var s in l)Object.prototype.hasOwnProperty.call(l,s)&&(n[s]=l[s])}return n},fr.apply(this,arguments)};function N1(e,n){var l={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.indexOf(i)<0&&(l[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(e);o<i.length;o++)n.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(l[i[o]]=e[i[o]]);return l}function ST(e,n,l){if(l||arguments.length===2)for(var i=0,o=n.length,s;i<o;i++)(s||!(i in n))&&(s||(s=Array.prototype.slice.call(n,0,i)),s[i]=n[i]);return e.concat(s||Array.prototype.slice.call(n))}var Tu="right-scroll-bar-position",Ru="width-before-scroll-bar",CT="with-scroll-bars-hidden",kT="--removed-body-scroll-bar-size";function th(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function ET(e,n){var l=w.useState(function(){return{value:e,callback:n,facade:{get current(){return l.value},set current(i){var o=l.value;o!==i&&(l.value=i,l.callback(i,o))}}}})[0];return l.callback=n,l.facade}var NT=typeof window<"u"?w.useLayoutEffect:w.useEffect,Qv=new WeakMap;function AT(e,n){var l=ET(null,function(i){return e.forEach(function(o){return th(o,i)})});return NT(function(){var i=Qv.get(l);if(i){var o=new Set(i),s=new Set(e),c=l.current;o.forEach(function(f){s.has(f)||th(f,null)}),s.forEach(function(f){o.has(f)||th(f,c)})}Qv.set(l,e)},[e]),l}function TT(e){return e}function RT(e,n){n===void 0&&(n=TT);var l=[],i=!1,o={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return l.length?l[l.length-1]:e},useMedium:function(s){var c=n(s,i);return l.push(c),function(){l=l.filter(function(f){return f!==c})}},assignSyncMedium:function(s){for(i=!0;l.length;){var c=l;l=[],c.forEach(s)}l={push:function(f){return s(f)},filter:function(){return l}}},assignMedium:function(s){i=!0;var c=[];if(l.length){var f=l;l=[],f.forEach(s),c=l}var d=function(){var y=c;c=[],y.forEach(s)},h=function(){return Promise.resolve().then(d)};h(),l={push:function(y){c.push(y),h()},filter:function(y){return c=c.filter(y),l}}}};return o}function jT(e){e===void 0&&(e={});var n=RT(null);return n.options=fr({async:!0,ssr:!1},e),n}var A1=function(e){var n=e.sideCar,l=N1(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=n.read();if(!i)throw new Error("Sidecar medium not found");return w.createElement(i,fr({},l))};A1.isSideCarExport=!0;function MT(e,n){return e.useMedium(n),A1}var T1=jT(),nh=function(){},ac=w.forwardRef(function(e,n){var l=w.useRef(null),i=w.useState({onScrollCapture:nh,onWheelCapture:nh,onTouchMoveCapture:nh}),o=i[0],s=i[1],c=e.forwardProps,f=e.children,d=e.className,h=e.removeScrollBar,y=e.enabled,g=e.shards,v=e.sideCar,b=e.noRelative,k=e.noIsolation,C=e.inert,E=e.allowPinchZoom,N=e.as,M=N===void 0?"div":N,j=e.gapMode,D=N1(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),I=v,O=AT([l,n]),P=fr(fr({},D),o);return w.createElement(w.Fragment,null,y&&w.createElement(I,{sideCar:T1,removeScrollBar:h,shards:g,noRelative:b,noIsolation:k,inert:C,setCallbacks:s,allowPinchZoom:!!E,lockRef:l,gapMode:j}),c?w.cloneElement(w.Children.only(f),fr(fr({},P),{ref:O})):w.createElement(M,fr({},P,{className:d,ref:O}),f))});ac.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ac.classNames={fullWidth:Ru,zeroRight:Tu};var OT=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function DT(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=OT();return n&&e.setAttribute("nonce",n),e}function _T(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function zT(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var LT=function(){var e=0,n=null;return{add:function(l){e==0&&(n=DT())&&(_T(n,l),zT(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},BT=function(){var e=LT();return function(n,l){w.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&l])}},R1=function(){var e=BT(),n=function(l){var i=l.styles,o=l.dynamic;return e(i,o),null};return n},UT={left:0,top:0,right:0,gap:0},rh=function(e){return parseInt(e||"",10)||0},HT=function(e){var n=window.getComputedStyle(document.body),l=n[e==="padding"?"paddingLeft":"marginLeft"],i=n[e==="padding"?"paddingTop":"marginTop"],o=n[e==="padding"?"paddingRight":"marginRight"];return[rh(l),rh(i),rh(o)]},PT=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return UT;var n=HT(e),l=document.documentElement.clientWidth,i=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,i-l+n[2]-n[0])}},IT=R1(),ta="data-scroll-locked",qT=function(e,n,l,i){var o=e.left,s=e.top,c=e.right,f=e.gap;return l===void 0&&(l="margin"),`
|
|
61
|
+
.`.concat(CT,` {
|
|
62
|
+
overflow: hidden `).concat(i,`;
|
|
63
|
+
padding-right: `).concat(f,"px ").concat(i,`;
|
|
64
|
+
}
|
|
65
|
+
body[`).concat(ta,`] {
|
|
66
|
+
overflow: hidden `).concat(i,`;
|
|
67
|
+
overscroll-behavior: contain;
|
|
68
|
+
`).concat([n&&"position: relative ".concat(i,";"),l==="margin"&&`
|
|
69
|
+
padding-left: `.concat(o,`px;
|
|
70
|
+
padding-top: `).concat(s,`px;
|
|
71
|
+
padding-right: `).concat(c,`px;
|
|
72
|
+
margin-left:0;
|
|
73
|
+
margin-top:0;
|
|
74
|
+
margin-right: `).concat(f,"px ").concat(i,`;
|
|
75
|
+
`),l==="padding"&&"padding-right: ".concat(f,"px ").concat(i,";")].filter(Boolean).join(""),`
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.`).concat(Tu,` {
|
|
79
|
+
right: `).concat(f,"px ").concat(i,`;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.`).concat(Ru,` {
|
|
83
|
+
margin-right: `).concat(f,"px ").concat(i,`;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.`).concat(Tu," .").concat(Tu,` {
|
|
87
|
+
right: 0 `).concat(i,`;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.`).concat(Ru," .").concat(Ru,` {
|
|
91
|
+
margin-right: 0 `).concat(i,`;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
body[`).concat(ta,`] {
|
|
95
|
+
`).concat(kT,": ").concat(f,`px;
|
|
96
|
+
}
|
|
97
|
+
`)},Kv=function(){var e=parseInt(document.body.getAttribute(ta)||"0",10);return isFinite(e)?e:0},FT=function(){w.useEffect(function(){return document.body.setAttribute(ta,(Kv()+1).toString()),function(){var e=Kv()-1;e<=0?document.body.removeAttribute(ta):document.body.setAttribute(ta,e.toString())}},[])},VT=function(e){var n=e.noRelative,l=e.noImportant,i=e.gapMode,o=i===void 0?"margin":i;FT();var s=w.useMemo(function(){return PT(o)},[o]);return w.createElement(IT,{styles:qT(s,!n,o,l?"":"!important")})},Ph=!1;if(typeof window<"u")try{var du=Object.defineProperty({},"passive",{get:function(){return Ph=!0,!0}});window.addEventListener("test",du,du),window.removeEventListener("test",du,du)}catch{Ph=!1}var Qi=Ph?{passive:!1}:!1,GT=function(e){return e.tagName==="TEXTAREA"},j1=function(e,n){if(!(e instanceof Element))return!1;var l=window.getComputedStyle(e);return l[n]!=="hidden"&&!(l.overflowY===l.overflowX&&!GT(e)&&l[n]==="visible")},YT=function(e){return j1(e,"overflowY")},$T=function(e){return j1(e,"overflowX")},Zv=function(e,n){var l=n.ownerDocument,i=n;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var o=M1(e,i);if(o){var s=O1(e,i),c=s[1],f=s[2];if(c>f)return!0}i=i.parentNode}while(i&&i!==l.body);return!1},XT=function(e){var n=e.scrollTop,l=e.scrollHeight,i=e.clientHeight;return[n,l,i]},QT=function(e){var n=e.scrollLeft,l=e.scrollWidth,i=e.clientWidth;return[n,l,i]},M1=function(e,n){return e==="v"?YT(n):$T(n)},O1=function(e,n){return e==="v"?XT(n):QT(n)},KT=function(e,n){return e==="h"&&n==="rtl"?-1:1},ZT=function(e,n,l,i,o){var s=KT(e,window.getComputedStyle(n).direction),c=s*i,f=l.target,d=n.contains(f),h=!1,y=c>0,g=0,v=0;do{if(!f)break;var b=O1(e,f),k=b[0],C=b[1],E=b[2],N=C-E-s*k;(k||N)&&M1(e,f)&&(g+=N,v+=k);var M=f.parentNode;f=M&&M.nodeType===Node.DOCUMENT_FRAGMENT_NODE?M.host:M}while(!d&&f!==document.body||d&&(n.contains(f)||n===f));return(y&&Math.abs(g)<1||!y&&Math.abs(v)<1)&&(h=!0),h},hu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Jv=function(e){return[e.deltaX,e.deltaY]},Wv=function(e){return e&&"current"in e?e.current:e},JT=function(e,n){return e[0]===n[0]&&e[1]===n[1]},WT=function(e){return`
|
|
98
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
99
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
100
|
+
`)},eR=0,Ki=[];function tR(e){var n=w.useRef([]),l=w.useRef([0,0]),i=w.useRef(),o=w.useState(eR++)[0],s=w.useState(R1)[0],c=w.useRef(e);w.useEffect(function(){c.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var C=ST([e.lockRef.current],(e.shards||[]).map(Wv),!0).filter(Boolean);return C.forEach(function(E){return E.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),C.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var f=w.useCallback(function(C,E){if("touches"in C&&C.touches.length===2||C.type==="wheel"&&C.ctrlKey)return!c.current.allowPinchZoom;var N=hu(C),M=l.current,j="deltaX"in C?C.deltaX:M[0]-N[0],D="deltaY"in C?C.deltaY:M[1]-N[1],I,O=C.target,P=Math.abs(j)>Math.abs(D)?"h":"v";if("touches"in C&&P==="h"&&O.type==="range")return!1;var q=window.getSelection(),re=q&&q.anchorNode,H=re?re===O||re.contains(O):!1;if(H)return!1;var J=Zv(P,O);if(!J)return!0;if(J?I=P:(I=P==="v"?"h":"v",J=Zv(P,O)),!J)return!1;if(!i.current&&"changedTouches"in C&&(j||D)&&(i.current=I),!I)return!0;var ne=i.current||I;return ZT(ne,E,C,ne==="h"?j:D)},[]),d=w.useCallback(function(C){var E=C;if(!(!Ki.length||Ki[Ki.length-1]!==s)){var N="deltaY"in E?Jv(E):hu(E),M=n.current.filter(function(I){return I.name===E.type&&(I.target===E.target||E.target===I.shadowParent)&&JT(I.delta,N)})[0];if(M&&M.should){E.cancelable&&E.preventDefault();return}if(!M){var j=(c.current.shards||[]).map(Wv).filter(Boolean).filter(function(I){return I.contains(E.target)}),D=j.length>0?f(E,j[0]):!c.current.noIsolation;D&&E.cancelable&&E.preventDefault()}}},[]),h=w.useCallback(function(C,E,N,M){var j={name:C,delta:E,target:N,should:M,shadowParent:nR(N)};n.current.push(j),setTimeout(function(){n.current=n.current.filter(function(D){return D!==j})},1)},[]),y=w.useCallback(function(C){l.current=hu(C),i.current=void 0},[]),g=w.useCallback(function(C){h(C.type,Jv(C),C.target,f(C,e.lockRef.current))},[]),v=w.useCallback(function(C){h(C.type,hu(C),C.target,f(C,e.lockRef.current))},[]);w.useEffect(function(){return Ki.push(s),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:v}),document.addEventListener("wheel",d,Qi),document.addEventListener("touchmove",d,Qi),document.addEventListener("touchstart",y,Qi),function(){Ki=Ki.filter(function(C){return C!==s}),document.removeEventListener("wheel",d,Qi),document.removeEventListener("touchmove",d,Qi),document.removeEventListener("touchstart",y,Qi)}},[]);var b=e.removeScrollBar,k=e.inert;return w.createElement(w.Fragment,null,k?w.createElement(s,{styles:WT(o)}):null,b?w.createElement(VT,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function nR(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const rR=MT(T1,tR);var Np=w.forwardRef(function(e,n){return w.createElement(ac,fr({},e,{ref:n,sideCar:rR}))});Np.classNames=ac.classNames;var lR=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},Zi=new WeakMap,pu=new WeakMap,mu={},lh=0,D1=function(e){return e&&(e.host||D1(e.parentNode))},iR=function(e,n){return n.map(function(l){if(e.contains(l))return l;var i=D1(l);return i&&e.contains(i)?i:(console.error("aria-hidden",l,"in not contained inside",e,". Doing nothing"),null)}).filter(function(l){return!!l})},aR=function(e,n,l,i){var o=iR(n,Array.isArray(e)?e:[e]);mu[l]||(mu[l]=new WeakMap);var s=mu[l],c=[],f=new Set,d=new Set(o),h=function(g){!g||f.has(g)||(f.add(g),h(g.parentNode))};o.forEach(h);var y=function(g){!g||d.has(g)||Array.prototype.forEach.call(g.children,function(v){if(f.has(v))y(v);else try{var b=v.getAttribute(i),k=b!==null&&b!=="false",C=(Zi.get(v)||0)+1,E=(s.get(v)||0)+1;Zi.set(v,C),s.set(v,E),c.push(v),C===1&&k&&pu.set(v,!0),E===1&&v.setAttribute(l,"true"),k||v.setAttribute(i,"true")}catch(N){console.error("aria-hidden: cannot operate on ",v,N)}})};return y(n),f.clear(),lh++,function(){c.forEach(function(g){var v=Zi.get(g)-1,b=s.get(g)-1;Zi.set(g,v),s.set(g,b),v||(pu.has(g)||g.removeAttribute(i),pu.delete(g)),b||g.removeAttribute(l)}),lh--,lh||(Zi=new WeakMap,Zi=new WeakMap,pu=new WeakMap,mu={})}},_1=function(e,n,l){l===void 0&&(l="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),o=lR(e);return o?(i.push.apply(i,Array.from(o.querySelectorAll("[aria-live], script"))),aR(i,o,l,"aria-hidden")):function(){return null}},oc="Dialog",[z1]=rc(oc),[oR,rr]=z1(oc),L1=e=>{const{__scopeDialog:n,children:l,open:i,defaultOpen:o,onOpenChange:s,modal:c=!0}=e,f=w.useRef(null),d=w.useRef(null),[h,y]=Cp({prop:i,defaultProp:o??!1,onChange:s,caller:oc});return x.jsx(oR,{scope:n,triggerRef:f,contentRef:d,contentId:vo(),titleId:vo(),descriptionId:vo(),open:h,onOpenChange:y,onOpenToggle:w.useCallback(()=>y(g=>!g),[y]),modal:c,children:l})};L1.displayName=oc;var B1="DialogTrigger",sR=w.forwardRef((e,n)=>{const{__scopeDialog:l,...i}=e,o=rr(B1,l),s=En(n,o.triggerRef);return x.jsx(Yt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Rp(o.open),...i,ref:s,onClick:At(e.onClick,o.onOpenToggle)})});sR.displayName=B1;var Ap="DialogPortal",[uR,U1]=z1(Ap,{forceMount:void 0}),H1=e=>{const{__scopeDialog:n,forceMount:l,children:i,container:o}=e,s=rr(Ap,n);return x.jsx(uR,{scope:n,forceMount:l,children:w.Children.map(i,c=>x.jsx(Ml,{present:l||s.open,children:x.jsx(ic,{asChild:!0,container:o,children:c})}))})};H1.displayName=Ap;var zu="DialogOverlay",P1=w.forwardRef((e,n)=>{const l=U1(zu,e.__scopeDialog),{forceMount:i=l.forceMount,...o}=e,s=rr(zu,e.__scopeDialog);return s.modal?x.jsx(Ml,{present:i||s.open,children:x.jsx(fR,{...o,ref:n})}):null});P1.displayName=zu;var cR=kp("DialogOverlay.RemoveScroll"),fR=w.forwardRef((e,n)=>{const{__scopeDialog:l,...i}=e,o=rr(zu,l);return x.jsx(Np,{as:cR,allowPinchZoom:!0,shards:[o.contentRef],children:x.jsx(Yt.div,{"data-state":Rp(o.open),...i,ref:n,style:{pointerEvents:"auto",...i.style}})})}),ni="DialogContent",I1=w.forwardRef((e,n)=>{const l=U1(ni,e.__scopeDialog),{forceMount:i=l.forceMount,...o}=e,s=rr(ni,e.__scopeDialog);return x.jsx(Ml,{present:i||s.open,children:s.modal?x.jsx(dR,{...o,ref:n}):x.jsx(hR,{...o,ref:n})})});I1.displayName=ni;var dR=w.forwardRef((e,n)=>{const l=rr(ni,e.__scopeDialog),i=w.useRef(null),o=En(n,l.contentRef,i);return w.useEffect(()=>{const s=i.current;if(s)return _1(s)},[]),x.jsx(q1,{...e,ref:o,trapFocus:l.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:At(e.onCloseAutoFocus,s=>{var c;s.preventDefault(),(c=l.triggerRef.current)==null||c.focus()}),onPointerDownOutside:At(e.onPointerDownOutside,s=>{const c=s.detail.originalEvent,f=c.button===0&&c.ctrlKey===!0;(c.button===2||f)&&s.preventDefault()}),onFocusOutside:At(e.onFocusOutside,s=>s.preventDefault())})}),hR=w.forwardRef((e,n)=>{const l=rr(ni,e.__scopeDialog),i=w.useRef(!1),o=w.useRef(!1);return x.jsx(q1,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var c,f;(c=e.onCloseAutoFocus)==null||c.call(e,s),s.defaultPrevented||(i.current||(f=l.triggerRef.current)==null||f.focus(),s.preventDefault()),i.current=!1,o.current=!1},onInteractOutside:s=>{var d,h;(d=e.onInteractOutside)==null||d.call(e,s),s.defaultPrevented||(i.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=s.target;((h=l.triggerRef.current)==null?void 0:h.contains(c))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),q1=w.forwardRef((e,n)=>{const{__scopeDialog:l,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:s,...c}=e,f=rr(ni,l),d=w.useRef(null),h=En(n,d);return E1(),x.jsxs(x.Fragment,{children:[x.jsx(Ep,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:o,onUnmountAutoFocus:s,children:x.jsx(lc,{role:"dialog",id:f.contentId,"aria-describedby":f.descriptionId,"aria-labelledby":f.titleId,"data-state":Rp(f.open),...c,ref:h,onDismiss:()=>f.onOpenChange(!1)})}),x.jsxs(x.Fragment,{children:[x.jsx(pR,{titleId:f.titleId}),x.jsx(gR,{contentRef:d,descriptionId:f.descriptionId})]})]})}),Tp="DialogTitle",F1=w.forwardRef((e,n)=>{const{__scopeDialog:l,...i}=e,o=rr(Tp,l);return x.jsx(Yt.h2,{id:o.titleId,...i,ref:n})});F1.displayName=Tp;var V1="DialogDescription",G1=w.forwardRef((e,n)=>{const{__scopeDialog:l,...i}=e,o=rr(V1,l);return x.jsx(Yt.p,{id:o.descriptionId,...i,ref:n})});G1.displayName=V1;var Y1="DialogClose",$1=w.forwardRef((e,n)=>{const{__scopeDialog:l,...i}=e,o=rr(Y1,l);return x.jsx(Yt.button,{type:"button",...i,ref:n,onClick:At(e.onClick,()=>o.onOpenChange(!1))})});$1.displayName=Y1;function Rp(e){return e?"open":"closed"}var X1="DialogTitleWarning",[Q9,Q1]=FA(X1,{contentName:ni,titleName:Tp,docsSlug:"dialog"}),pR=({titleId:e})=>{const n=Q1(X1),l=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.
|
|
101
|
+
|
|
102
|
+
If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
103
|
+
|
|
104
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(l))},[l,e]),null},mR="DialogDescriptionWarning",gR=({contentRef:e,descriptionId:n})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Q1(mR).contentName}}.`;return w.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");n&&o&&(document.getElementById(n)||console.warn(i))},[i,e,n]),null},yR=L1,xR=H1,K1=P1,Z1=I1,vR=F1,bR=G1,wR=$1;/**
|
|
105
|
+
* @license lucide-react v0.562.0 - ISC
|
|
106
|
+
*
|
|
107
|
+
* This source code is licensed under the ISC license.
|
|
108
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
109
|
+
*/const SR=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),CR=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,l,i)=>i?i.toUpperCase():l.toLowerCase()),eb=e=>{const n=CR(e);return n.charAt(0).toUpperCase()+n.slice(1)},J1=(...e)=>e.filter((n,l,i)=>!!n&&n.trim()!==""&&i.indexOf(n)===l).join(" ").trim(),kR=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0};/**
|
|
110
|
+
* @license lucide-react v0.562.0 - ISC
|
|
111
|
+
*
|
|
112
|
+
* This source code is licensed under the ISC license.
|
|
113
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
114
|
+
*/var ER={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"};/**
|
|
115
|
+
* @license lucide-react v0.562.0 - ISC
|
|
116
|
+
*
|
|
117
|
+
* This source code is licensed under the ISC license.
|
|
118
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
119
|
+
*/const NR=w.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:l=2,absoluteStrokeWidth:i,className:o="",children:s,iconNode:c,...f},d)=>w.createElement("svg",{ref:d,...ER,width:n,height:n,stroke:e,strokeWidth:i?Number(l)*24/Number(n):l,className:J1("lucide",o),...!s&&!kR(f)&&{"aria-hidden":"true"},...f},[...c.map(([h,y])=>w.createElement(h,y)),...Array.isArray(s)?s:[s]]));/**
|
|
120
|
+
* @license lucide-react v0.562.0 - ISC
|
|
121
|
+
*
|
|
122
|
+
* This source code is licensed under the ISC license.
|
|
123
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
124
|
+
*/const Ee=(e,n)=>{const l=w.forwardRef(({className:i,...o},s)=>w.createElement(NR,{ref:s,iconNode:n,className:J1(`lucide-${SR(eb(e))}`,`lucide-${e}`,i),...o}));return l.displayName=eb(e),l};/**
|
|
125
|
+
* @license lucide-react v0.562.0 - ISC
|
|
126
|
+
*
|
|
127
|
+
* This source code is licensed under the ISC license.
|
|
128
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
129
|
+
*/const AR=[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]],TR=Ee("arrow-down-to-line",AR);/**
|
|
130
|
+
* @license lucide-react v0.562.0 - ISC
|
|
131
|
+
*
|
|
132
|
+
* This source code is licensed under the ISC license.
|
|
133
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
134
|
+
*/const RR=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],jR=Ee("arrow-down",RR);/**
|
|
135
|
+
* @license lucide-react v0.562.0 - ISC
|
|
136
|
+
*
|
|
137
|
+
* This source code is licensed under the ISC license.
|
|
138
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
139
|
+
*/const MR=[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]],OR=Ee("arrow-left-right",MR);/**
|
|
140
|
+
* @license lucide-react v0.562.0 - ISC
|
|
141
|
+
*
|
|
142
|
+
* This source code is licensed under the ISC license.
|
|
143
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
144
|
+
*/const DR=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],_R=Ee("arrow-up",DR);/**
|
|
145
|
+
* @license lucide-react v0.562.0 - ISC
|
|
146
|
+
*
|
|
147
|
+
* This source code is licensed under the ISC license.
|
|
148
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
149
|
+
*/const zR=[["path",{d:"M12 6v12",key:"1vza4d"}],["path",{d:"M17.196 9 6.804 15",key:"1ah31z"}],["path",{d:"m6.804 9 10.392 6",key:"1b6pxd"}]],LR=Ee("asterisk",zR);/**
|
|
150
|
+
* @license lucide-react v0.562.0 - ISC
|
|
151
|
+
*
|
|
152
|
+
* This source code is licensed under the ISC license.
|
|
153
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
154
|
+
*/const BR=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],tb=Ee("brain",BR);/**
|
|
155
|
+
* @license lucide-react v0.562.0 - ISC
|
|
156
|
+
*
|
|
157
|
+
* This source code is licensed under the ISC license.
|
|
158
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
159
|
+
*/const UR=[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]],HR=Ee("check-check",UR);/**
|
|
160
|
+
* @license lucide-react v0.562.0 - ISC
|
|
161
|
+
*
|
|
162
|
+
* This source code is licensed under the ISC license.
|
|
163
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
164
|
+
*/const PR=[["path",{d:"M20 4L9 15",key:"1qkx8z"}],["path",{d:"M21 19L3 19",key:"100sma"}],["path",{d:"M9 15L4 10",key:"9zxff7"}]],IR=Ee("check-line",PR);/**
|
|
165
|
+
* @license lucide-react v0.562.0 - ISC
|
|
166
|
+
*
|
|
167
|
+
* This source code is licensed under the ISC license.
|
|
168
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
169
|
+
*/const qR=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ri=Ee("check",qR);/**
|
|
170
|
+
* @license lucide-react v0.562.0 - ISC
|
|
171
|
+
*
|
|
172
|
+
* This source code is licensed under the ISC license.
|
|
173
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
174
|
+
*/const FR=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],VR=Ee("chevron-down",FR);/**
|
|
175
|
+
* @license lucide-react v0.562.0 - ISC
|
|
176
|
+
*
|
|
177
|
+
* This source code is licensed under the ISC license.
|
|
178
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
179
|
+
*/const GR=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],YR=Ee("chevron-left",GR);/**
|
|
180
|
+
* @license lucide-react v0.562.0 - ISC
|
|
181
|
+
*
|
|
182
|
+
* This source code is licensed under the ISC license.
|
|
183
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
184
|
+
*/const $R=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Nl=Ee("chevron-right",$R);/**
|
|
185
|
+
* @license lucide-react v0.562.0 - ISC
|
|
186
|
+
*
|
|
187
|
+
* This source code is licensed under the ISC license.
|
|
188
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
189
|
+
*/const XR=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9",key:"1dfufj"}]],QR=Ee("circle-slash",XR);/**
|
|
190
|
+
* @license lucide-react v0.562.0 - ISC
|
|
191
|
+
*
|
|
192
|
+
* This source code is licensed under the ISC license.
|
|
193
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
194
|
+
*/const KR=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ZR=Ee("circle",KR);/**
|
|
195
|
+
* @license lucide-react v0.562.0 - ISC
|
|
196
|
+
*
|
|
197
|
+
* This source code is licensed under the ISC license.
|
|
198
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
199
|
+
*/const JR=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],nb=Ee("code-xml",JR);/**
|
|
200
|
+
* @license lucide-react v0.562.0 - ISC
|
|
201
|
+
*
|
|
202
|
+
* This source code is licensed under the ISC license.
|
|
203
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
204
|
+
*/const WR=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],ej=Ee("code",WR);/**
|
|
205
|
+
* @license lucide-react v0.562.0 - ISC
|
|
206
|
+
*
|
|
207
|
+
* This source code is licensed under the ISC license.
|
|
208
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
209
|
+
*/const tj=[["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"}]],sc=Ee("copy",tj);/**
|
|
210
|
+
* @license lucide-react v0.562.0 - ISC
|
|
211
|
+
*
|
|
212
|
+
* This source code is licensed under the ISC license.
|
|
213
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
214
|
+
*/const nj=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],rj=Ee("corner-down-left",nj);/**
|
|
215
|
+
* @license lucide-react v0.562.0 - ISC
|
|
216
|
+
*
|
|
217
|
+
* This source code is licensed under the ISC license.
|
|
218
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
219
|
+
*/const lj=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],ij=Ee("ellipsis",lj);/**
|
|
220
|
+
* @license lucide-react v0.562.0 - ISC
|
|
221
|
+
*
|
|
222
|
+
* This source code is licensed under the ISC license.
|
|
223
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
224
|
+
*/const aj=[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]],oj=Ee("file-pen",aj);/**
|
|
225
|
+
* @license lucide-react v0.562.0 - ISC
|
|
226
|
+
*
|
|
227
|
+
* This source code is licensed under the ISC license.
|
|
228
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
229
|
+
*/const sj=[["path",{d:"M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35",key:"17jvcc"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M14 19h6",key:"bvotb8"}],["path",{d:"M17 16v6",key:"18yu1i"}]],uj=Ee("file-plus-corner",sj);/**
|
|
230
|
+
* @license lucide-react v0.562.0 - ISC
|
|
231
|
+
*
|
|
232
|
+
* This source code is licensed under the ISC license.
|
|
233
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
234
|
+
*/const cj=[["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"}]],fj=Ee("file",cj);/**
|
|
235
|
+
* @license lucide-react v0.562.0 - ISC
|
|
236
|
+
*
|
|
237
|
+
* This source code is licensed under the ISC license.
|
|
238
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
239
|
+
*/const dj=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"M12 16.5A4.5 4.5 0 1 1 7.5 12 4.5 4.5 0 1 1 12 7.5a4.5 4.5 0 1 1 4.5 4.5 4.5 4.5 0 1 1-4.5 4.5",key:"14wa3c"}],["path",{d:"M12 7.5V9",key:"1oy5b0"}],["path",{d:"M7.5 12H9",key:"eltsq1"}],["path",{d:"M16.5 12H15",key:"vk5kw4"}],["path",{d:"M12 16.5V15",key:"k7eayi"}],["path",{d:"m8 8 1.88 1.88",key:"nxy4qf"}],["path",{d:"M14.12 9.88 16 8",key:"1lst6k"}],["path",{d:"m8 16 1.88-1.88",key:"h2eex1"}],["path",{d:"M14.12 14.12 16 16",key:"uqkrx3"}]],bo=Ee("flower",dj);/**
|
|
240
|
+
* @license lucide-react v0.562.0 - ISC
|
|
241
|
+
*
|
|
242
|
+
* This source code is licensed under the ISC license.
|
|
243
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
244
|
+
*/const hj=[["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"}]],W1=Ee("folder-open",hj);/**
|
|
245
|
+
* @license lucide-react v0.562.0 - ISC
|
|
246
|
+
*
|
|
247
|
+
* This source code is licensed under the ISC license.
|
|
248
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
249
|
+
*/const pj=[["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"}]],ew=Ee("folder",pj);/**
|
|
250
|
+
* @license lucide-react v0.562.0 - ISC
|
|
251
|
+
*
|
|
252
|
+
* This source code is licensed under the ISC license.
|
|
253
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
254
|
+
*/const mj=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],ih=Ee("gauge",mj);/**
|
|
255
|
+
* @license lucide-react v0.562.0 - ISC
|
|
256
|
+
*
|
|
257
|
+
* This source code is licensed under the ISC license.
|
|
258
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
259
|
+
*/const gj=[["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"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]],yj=Ee("list-checks",gj);/**
|
|
260
|
+
* @license lucide-react v0.562.0 - ISC
|
|
261
|
+
*
|
|
262
|
+
* This source code is licensed under the ISC license.
|
|
263
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
264
|
+
*/const xj=[["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"}]],Lu=Ee("list-todo",xj);/**
|
|
265
|
+
* @license lucide-react v0.562.0 - ISC
|
|
266
|
+
*
|
|
267
|
+
* This source code is licensed under the ISC license.
|
|
268
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
269
|
+
*/const vj=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],oi=Ee("loader-circle",vj);/**
|
|
270
|
+
* @license lucide-react v0.562.0 - ISC
|
|
271
|
+
*
|
|
272
|
+
* This source code is licensed under the ISC license.
|
|
273
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
274
|
+
*/const bj=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]],rb=Ee("lock-open",bj);/**
|
|
275
|
+
* @license lucide-react v0.562.0 - ISC
|
|
276
|
+
*
|
|
277
|
+
* This source code is licensed under the ISC license.
|
|
278
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
279
|
+
*/const wj=[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]],lb=Ee("map",wj);/**
|
|
280
|
+
* @license lucide-react v0.562.0 - ISC
|
|
281
|
+
*
|
|
282
|
+
* This source code is licensed under the ISC license.
|
|
283
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
284
|
+
*/const Sj=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],tw=Ee("menu",Sj);/**
|
|
285
|
+
* @license lucide-react v0.562.0 - ISC
|
|
286
|
+
*
|
|
287
|
+
* This source code is licensed under the ISC license.
|
|
288
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
289
|
+
*/const Cj=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],nw=Ee("message-circle-question-mark",Cj);/**
|
|
290
|
+
* @license lucide-react v0.562.0 - ISC
|
|
291
|
+
*
|
|
292
|
+
* This source code is licensed under the ISC license.
|
|
293
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
294
|
+
*/const kj=[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3",key:"hohbtr"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3",key:"5jw1f3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3",key:"198tvr"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3",key:"ph8mxp"}]],rw=Ee("minimize",kj);/**
|
|
295
|
+
* @license lucide-react v0.562.0 - ISC
|
|
296
|
+
*
|
|
297
|
+
* This source code is licensed under the ISC license.
|
|
298
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
299
|
+
*/const Ej=[["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"}]],jp=Ee("monitor",Ej);/**
|
|
300
|
+
* @license lucide-react v0.562.0 - ISC
|
|
301
|
+
*
|
|
302
|
+
* This source code is licensed under the ISC license.
|
|
303
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
304
|
+
*/const Nj=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],Ih=Ee("panel-left",Nj);/**
|
|
305
|
+
* @license lucide-react v0.562.0 - ISC
|
|
306
|
+
*
|
|
307
|
+
* This source code is licensed under the ISC license.
|
|
308
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
309
|
+
*/const Aj=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],lw=Ee("pencil",Aj);/**
|
|
310
|
+
* @license lucide-react v0.562.0 - ISC
|
|
311
|
+
*
|
|
312
|
+
* This source code is licensed under the ISC license.
|
|
313
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
314
|
+
*/const Tj=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],iw=Ee("plus",Tj);/**
|
|
315
|
+
* @license lucide-react v0.562.0 - ISC
|
|
316
|
+
*
|
|
317
|
+
* This source code is licensed under the ISC license.
|
|
318
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
319
|
+
*/const Rj=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],ah=Ee("search",Rj);/**
|
|
320
|
+
* @license lucide-react v0.562.0 - ISC
|
|
321
|
+
*
|
|
322
|
+
* This source code is licensed under the ISC license.
|
|
323
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
324
|
+
*/const jj=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],Mj=Ee("send",jj);/**
|
|
325
|
+
* @license lucide-react v0.562.0 - ISC
|
|
326
|
+
*
|
|
327
|
+
* This source code is licensed under the ISC license.
|
|
328
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
329
|
+
*/const Oj=[["path",{d:"M22 2 2 22",key:"y4kqgn"}]],Dj=Ee("slash",Oj);/**
|
|
330
|
+
* @license lucide-react v0.562.0 - ISC
|
|
331
|
+
*
|
|
332
|
+
* This source code is licensed under the ISC license.
|
|
333
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
334
|
+
*/const _j=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],To=Ee("sparkles",_j);/**
|
|
335
|
+
* @license lucide-react v0.562.0 - ISC
|
|
336
|
+
*
|
|
337
|
+
* This source code is licensed under the ISC license.
|
|
338
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
339
|
+
*/const zj=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],Mp=Ee("square-pen",zj);/**
|
|
340
|
+
* @license lucide-react v0.562.0 - ISC
|
|
341
|
+
*
|
|
342
|
+
* This source code is licensed under the ISC license.
|
|
343
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
344
|
+
*/const Lj=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Bj=Ee("square-x",Lj);/**
|
|
345
|
+
* @license lucide-react v0.562.0 - ISC
|
|
346
|
+
*
|
|
347
|
+
* This source code is licensed under the ISC license.
|
|
348
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
349
|
+
*/const Uj=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Op=Ee("terminal",Uj);/**
|
|
350
|
+
* @license lucide-react v0.562.0 - ISC
|
|
351
|
+
*
|
|
352
|
+
* This source code is licensed under the ISC license.
|
|
353
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
354
|
+
*/const Hj=[["rect",{width:"18",height:"12",x:"3",y:"8",rx:"1",key:"158fvp"}],["path",{d:"M10 8V5c0-.6-.4-1-1-1H6a1 1 0 0 0-1 1v3",key:"s0042v"}],["path",{d:"M19 8V5c0-.6-.4-1-1-1h-3a1 1 0 0 0-1 1v3",key:"9wmeh2"}]],Pj=Ee("toy-brick",Hj);/**
|
|
355
|
+
* @license lucide-react v0.562.0 - ISC
|
|
356
|
+
*
|
|
357
|
+
* This source code is licensed under the ISC license.
|
|
358
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
359
|
+
*/const Ij=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],qj=Ee("trash-2",Ij);/**
|
|
360
|
+
* @license lucide-react v0.562.0 - ISC
|
|
361
|
+
*
|
|
362
|
+
* This source code is licensed under the ISC license.
|
|
363
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
364
|
+
*/const Fj=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],Dp=Ee("user-round",Fj);/**
|
|
365
|
+
* @license lucide-react v0.562.0 - ISC
|
|
366
|
+
*
|
|
367
|
+
* This source code is licensed under the ISC license.
|
|
368
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
369
|
+
*/const Vj=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Po=Ee("x",Vj);/**
|
|
370
|
+
* @license lucide-react v0.562.0 - ISC
|
|
371
|
+
*
|
|
372
|
+
* This source code is licensed under the ISC license.
|
|
373
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
374
|
+
*/const Gj=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Bu=Ee("zap",Gj),aw=yR,Yj=xR,ow=w.forwardRef(({className:e,...n},l)=>x.jsx(K1,{ref:l,className:ye("fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n}));ow.displayName=K1.displayName;const $j={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg"},_p=w.forwardRef(({className:e,children:n,size:l="md",...i},o)=>x.jsxs(Yj,{children:[x.jsx(ow,{}),x.jsxs(Z1,{ref:o,className:ye("fixed left-1/2 top-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 rounded-xl border border-border bg-background shadow-xl 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%]","max-h-[85vh] flex flex-col",$j[l],e),...i,children:[n,x.jsxs(wR,{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:[x.jsx(Po,{className:"h-4 w-4"}),x.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));_p.displayName=Z1.displayName;function sw({className:e,...n}){return x.jsx(vR,{className:ye("text-lg font-medium leading-none tracking-tight",e),...n})}function Xj({className:e,...n}){return x.jsx(bR,{className:ye("text-sm text-muted-foreground",e),...n})}function uw({className:e,...n}){return x.jsx("div",{className:ye("flex-1 min-h-0 overflow-y-auto px-4 pb-4 pt-3.5",e),...n})}function cw({className:e,...n}){return x.jsx("div",{className:ye("shrink-0 flex justify-end gap-2 border-t border-border bg-background p-2 rounded-b-xl",e),...n})}const fw=w.createContext(null);function Qj({children:e}){const[n,l]=w.useState(null),[i,o]=w.useState(""),s=w.useRef(null);w.useEffect(()=>{(n==null?void 0:n.kind)==="prompt"&&(o(n.options.initialValue??""),setTimeout(()=>{var y,g;(y=s.current)==null||y.focus(),(g=s.current)==null||g.select()},0))},[n]);const c=w.useCallback(()=>{l(null),o("")},[]),f=w.useCallback(y=>new Promise(g=>{l({kind:"confirm",options:y,resolve:g})}),[]),d=w.useCallback(y=>new Promise(g=>{l({kind:"prompt",options:y,resolve:g})}),[]),h=w.useMemo(()=>({confirm:f,prompt:d}),[f,d]);return x.jsxs(fw.Provider,{value:h,children:[e,x.jsx(aw,{open:n!==null,onOpenChange:y=>{y||!n||(n.kind==="confirm"?n.resolve(!1):n.resolve(null),c())},children:x.jsx(_p,{size:"sm",children:n?x.jsxs(x.Fragment,{children:[x.jsxs(uw,{className:"space-y-4",children:[x.jsx(sw,{children:n.options.title}),n.options.description?x.jsx(Xj,{children:n.options.description}):null,n.kind==="prompt"?x.jsx("input",{ref:s,type:"text",value:i,onChange:y=>o(y.target.value),onKeyDown:y=>{y.key==="Enter"&&(y.preventDefault(),n.resolve(i.trim()||null),c())},className:"w-full px-3 py-2 text-sm border border-border rounded-md bg-background outline-none",placeholder:n.options.placeholder}):null]}),x.jsxs(cw,{children:[x.jsx(Fe,{variant:"ghost",size:"sm",onClick:()=>{n.kind==="confirm"?n.resolve(!1):n.resolve(null),c()},children:n.options.cancelLabel??"Cancel"}),x.jsx(Fe,{variant:n.kind==="confirm"?n.options.confirmVariant??"default":"secondary",size:"sm",onClick:()=>{n.kind==="confirm"?n.resolve(!0):n.resolve(i.trim()||null),c()},disabled:n.kind==="prompt"&&!i.trim(),children:n.options.confirmLabel??"Confirm"})]})]}):null})})]})}function Kj(){const e=w.useContext(fw);if(!e)throw new Error("useAppDialog must be used within AppDialogProvider");return e}const Zj=["top","right","bottom","left"],Al=Math.min,Sn=Math.max,Uu=Math.round,gu=Math.floor,pr=e=>({x:e,y:e}),Jj={left:"right",right:"left",bottom:"top",top:"bottom"};function qh(e,n,l){return Sn(e,Al(n,l))}function Fr(e,n){return typeof e=="function"?e(n):e}function Vr(e){return e.split("-")[0]}function da(e){return e.split("-")[1]}function zp(e){return e==="x"?"y":"x"}function Lp(e){return e==="y"?"height":"width"}function dr(e){const n=e[0];return n==="t"||n==="b"?"y":"x"}function Bp(e){return zp(dr(e))}function Wj(e,n,l){l===void 0&&(l=!1);const i=da(e),o=Bp(e),s=Lp(o);let c=o==="x"?i===(l?"end":"start")?"right":"left":i==="start"?"bottom":"top";return n.reference[s]>n.floating[s]&&(c=Hu(c)),[c,Hu(c)]}function e4(e){const n=Hu(e);return[Fh(e),n,Fh(n)]}function Fh(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const ib=["left","right"],ab=["right","left"],t4=["top","bottom"],n4=["bottom","top"];function r4(e,n,l){switch(e){case"top":case"bottom":return l?n?ab:ib:n?ib:ab;case"left":case"right":return n?t4:n4;default:return[]}}function l4(e,n,l,i){const o=da(e);let s=r4(Vr(e),l==="start",i);return o&&(s=s.map(c=>c+"-"+o),n&&(s=s.concat(s.map(Fh)))),s}function Hu(e){const n=Vr(e);return Jj[n]+e.slice(n.length)}function i4(e){return{top:0,right:0,bottom:0,left:0,...e}}function dw(e){return typeof e!="number"?i4(e):{top:e,right:e,bottom:e,left:e}}function Pu(e){const{x:n,y:l,width:i,height:o}=e;return{width:i,height:o,top:l,left:n,right:n+i,bottom:l+o,x:n,y:l}}function ob(e,n,l){let{reference:i,floating:o}=e;const s=dr(n),c=Bp(n),f=Lp(c),d=Vr(n),h=s==="y",y=i.x+i.width/2-o.width/2,g=i.y+i.height/2-o.height/2,v=i[f]/2-o[f]/2;let b;switch(d){case"top":b={x:y,y:i.y-o.height};break;case"bottom":b={x:y,y:i.y+i.height};break;case"right":b={x:i.x+i.width,y:g};break;case"left":b={x:i.x-o.width,y:g};break;default:b={x:i.x,y:i.y}}switch(da(n)){case"start":b[c]-=v*(l&&h?-1:1);break;case"end":b[c]+=v*(l&&h?-1:1);break}return b}async function a4(e,n){var l;n===void 0&&(n={});const{x:i,y:o,platform:s,rects:c,elements:f,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:y="viewport",elementContext:g="floating",altBoundary:v=!1,padding:b=0}=Fr(n,e),k=dw(b),E=f[v?g==="floating"?"reference":"floating":g],N=Pu(await s.getClippingRect({element:(l=await(s.isElement==null?void 0:s.isElement(E)))==null||l?E:E.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(f.floating)),boundary:h,rootBoundary:y,strategy:d})),M=g==="floating"?{x:i,y:o,width:c.floating.width,height:c.floating.height}:c.reference,j=await(s.getOffsetParent==null?void 0:s.getOffsetParent(f.floating)),D=await(s.isElement==null?void 0:s.isElement(j))?await(s.getScale==null?void 0:s.getScale(j))||{x:1,y:1}:{x:1,y:1},I=Pu(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:M,offsetParent:j,strategy:d}):M);return{top:(N.top-I.top+k.top)/D.y,bottom:(I.bottom-N.bottom+k.bottom)/D.y,left:(N.left-I.left+k.left)/D.x,right:(I.right-N.right+k.right)/D.x}}const o4=50,s4=async(e,n,l)=>{const{placement:i="bottom",strategy:o="absolute",middleware:s=[],platform:c}=l,f=c.detectOverflow?c:{...c,detectOverflow:a4},d=await(c.isRTL==null?void 0:c.isRTL(n));let h=await c.getElementRects({reference:e,floating:n,strategy:o}),{x:y,y:g}=ob(h,i,d),v=i,b=0;const k={};for(let C=0;C<s.length;C++){const E=s[C];if(!E)continue;const{name:N,fn:M}=E,{x:j,y:D,data:I,reset:O}=await M({x:y,y:g,initialPlacement:i,placement:v,strategy:o,middlewareData:k,rects:h,platform:f,elements:{reference:e,floating:n}});y=j??y,g=D??g,k[N]={...k[N],...I},O&&b<o4&&(b++,typeof O=="object"&&(O.placement&&(v=O.placement),O.rects&&(h=O.rects===!0?await c.getElementRects({reference:e,floating:n,strategy:o}):O.rects),{x:y,y:g}=ob(h,v,d)),C=-1)}return{x:y,y:g,placement:v,strategy:o,middlewareData:k}},u4=e=>({name:"arrow",options:e,async fn(n){const{x:l,y:i,placement:o,rects:s,platform:c,elements:f,middlewareData:d}=n,{element:h,padding:y=0}=Fr(e,n)||{};if(h==null)return{};const g=dw(y),v={x:l,y:i},b=Bp(o),k=Lp(b),C=await c.getDimensions(h),E=b==="y",N=E?"top":"left",M=E?"bottom":"right",j=E?"clientHeight":"clientWidth",D=s.reference[k]+s.reference[b]-v[b]-s.floating[k],I=v[b]-s.reference[b],O=await(c.getOffsetParent==null?void 0:c.getOffsetParent(h));let P=O?O[j]:0;(!P||!await(c.isElement==null?void 0:c.isElement(O)))&&(P=f.floating[j]||s.floating[k]);const q=D/2-I/2,re=P/2-C[k]/2-1,H=Al(g[N],re),J=Al(g[M],re),ne=H,W=P-C[k]-J,Z=P/2-C[k]/2+q,Q=qh(ne,Z,W),B=!d.arrow&&da(o)!=null&&Z!==Q&&s.reference[k]/2-(Z<ne?H:J)-C[k]/2<0,Y=B?Z<ne?Z-ne:Z-W:0;return{[b]:v[b]+Y,data:{[b]:Q,centerOffset:Z-Q-Y,...B&&{alignmentOffset:Y}},reset:B}}}),c4=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var l,i;const{placement:o,middlewareData:s,rects:c,initialPlacement:f,platform:d,elements:h}=n,{mainAxis:y=!0,crossAxis:g=!0,fallbackPlacements:v,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:C=!0,...E}=Fr(e,n);if((l=s.arrow)!=null&&l.alignmentOffset)return{};const N=Vr(o),M=dr(f),j=Vr(f)===f,D=await(d.isRTL==null?void 0:d.isRTL(h.floating)),I=v||(j||!C?[Hu(f)]:e4(f)),O=k!=="none";!v&&O&&I.push(...l4(f,C,k,D));const P=[f,...I],q=await d.detectOverflow(n,E),re=[];let H=((i=s.flip)==null?void 0:i.overflows)||[];if(y&&re.push(q[N]),g){const Z=Wj(o,c,D);re.push(q[Z[0]],q[Z[1]])}if(H=[...H,{placement:o,overflows:re}],!re.every(Z=>Z<=0)){var J,ne;const Z=(((J=s.flip)==null?void 0:J.index)||0)+1,Q=P[Z];if(Q&&(!(g==="alignment"?M!==dr(Q):!1)||H.every(le=>dr(le.placement)===M?le.overflows[0]>0:!0)))return{data:{index:Z,overflows:H},reset:{placement:Q}};let B=(ne=H.filter(Y=>Y.overflows[0]<=0).sort((Y,le)=>Y.overflows[1]-le.overflows[1])[0])==null?void 0:ne.placement;if(!B)switch(b){case"bestFit":{var W;const Y=(W=H.filter(le=>{if(O){const de=dr(le.placement);return de===M||de==="y"}return!0}).map(le=>[le.placement,le.overflows.filter(de=>de>0).reduce((de,R)=>de+R,0)]).sort((le,de)=>le[1]-de[1])[0])==null?void 0:W[0];Y&&(B=Y);break}case"initialPlacement":B=f;break}if(o!==B)return{reset:{placement:B}}}return{}}}};function sb(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function ub(e){return Zj.some(n=>e[n]>=0)}const f4=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:l,platform:i}=n,{strategy:o="referenceHidden",...s}=Fr(e,n);switch(o){case"referenceHidden":{const c=await i.detectOverflow(n,{...s,elementContext:"reference"}),f=sb(c,l.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:ub(f)}}}case"escaped":{const c=await i.detectOverflow(n,{...s,altBoundary:!0}),f=sb(c,l.floating);return{data:{escapedOffsets:f,escaped:ub(f)}}}default:return{}}}}},hw=new Set(["left","top"]);async function d4(e,n){const{placement:l,platform:i,elements:o}=e,s=await(i.isRTL==null?void 0:i.isRTL(o.floating)),c=Vr(l),f=da(l),d=dr(l)==="y",h=hw.has(c)?-1:1,y=s&&d?-1:1,g=Fr(n,e);let{mainAxis:v,crossAxis:b,alignmentAxis:k}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return f&&typeof k=="number"&&(b=f==="end"?k*-1:k),d?{x:b*y,y:v*h}:{x:v*h,y:b*y}}const h4=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var l,i;const{x:o,y:s,placement:c,middlewareData:f}=n,d=await d4(n,e);return c===((l=f.offset)==null?void 0:l.placement)&&(i=f.arrow)!=null&&i.alignmentOffset?{}:{x:o+d.x,y:s+d.y,data:{...d,placement:c}}}}},p4=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:l,y:i,placement:o,platform:s}=n,{mainAxis:c=!0,crossAxis:f=!1,limiter:d={fn:N=>{let{x:M,y:j}=N;return{x:M,y:j}}},...h}=Fr(e,n),y={x:l,y:i},g=await s.detectOverflow(n,h),v=dr(Vr(o)),b=zp(v);let k=y[b],C=y[v];if(c){const N=b==="y"?"top":"left",M=b==="y"?"bottom":"right",j=k+g[N],D=k-g[M];k=qh(j,k,D)}if(f){const N=v==="y"?"top":"left",M=v==="y"?"bottom":"right",j=C+g[N],D=C-g[M];C=qh(j,C,D)}const E=d.fn({...n,[b]:k,[v]:C});return{...E,data:{x:E.x-l,y:E.y-i,enabled:{[b]:c,[v]:f}}}}}},m4=function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:l,y:i,placement:o,rects:s,middlewareData:c}=n,{offset:f=0,mainAxis:d=!0,crossAxis:h=!0}=Fr(e,n),y={x:l,y:i},g=dr(o),v=zp(g);let b=y[v],k=y[g];const C=Fr(f,n),E=typeof C=="number"?{mainAxis:C,crossAxis:0}:{mainAxis:0,crossAxis:0,...C};if(d){const j=v==="y"?"height":"width",D=s.reference[v]-s.floating[j]+E.mainAxis,I=s.reference[v]+s.reference[j]-E.mainAxis;b<D?b=D:b>I&&(b=I)}if(h){var N,M;const j=v==="y"?"width":"height",D=hw.has(Vr(o)),I=s.reference[g]-s.floating[j]+(D&&((N=c.offset)==null?void 0:N[g])||0)+(D?0:E.crossAxis),O=s.reference[g]+s.reference[j]+(D?0:((M=c.offset)==null?void 0:M[g])||0)-(D?E.crossAxis:0);k<I?k=I:k>O&&(k=O)}return{[v]:b,[g]:k}}}},g4=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){var l,i;const{placement:o,rects:s,platform:c,elements:f}=n,{apply:d=()=>{},...h}=Fr(e,n),y=await c.detectOverflow(n,h),g=Vr(o),v=da(o),b=dr(o)==="y",{width:k,height:C}=s.floating;let E,N;g==="top"||g==="bottom"?(E=g,N=v===(await(c.isRTL==null?void 0:c.isRTL(f.floating))?"start":"end")?"left":"right"):(N=g,E=v==="end"?"top":"bottom");const M=C-y.top-y.bottom,j=k-y.left-y.right,D=Al(C-y[E],M),I=Al(k-y[N],j),O=!n.middlewareData.shift;let P=D,q=I;if((l=n.middlewareData.shift)!=null&&l.enabled.x&&(q=j),(i=n.middlewareData.shift)!=null&&i.enabled.y&&(P=M),O&&!v){const H=Sn(y.left,0),J=Sn(y.right,0),ne=Sn(y.top,0),W=Sn(y.bottom,0);b?q=k-2*(H!==0||J!==0?H+J:Sn(y.left,y.right)):P=C-2*(ne!==0||W!==0?ne+W:Sn(y.top,y.bottom))}await d({...n,availableWidth:q,availableHeight:P});const re=await c.getDimensions(f.floating);return k!==re.width||C!==re.height?{reset:{rects:!0}}:{}}}};function uc(){return typeof window<"u"}function ha(e){return pw(e)?(e.nodeName||"").toLowerCase():"#document"}function Cn(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function xr(e){var n;return(n=(pw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function pw(e){return uc()?e instanceof Node||e instanceof Cn(e).Node:!1}function Wn(e){return uc()?e instanceof Element||e instanceof Cn(e).Element:!1}function Gr(e){return uc()?e instanceof HTMLElement||e instanceof Cn(e).HTMLElement:!1}function cb(e){return!uc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Cn(e).ShadowRoot}function Io(e){const{overflow:n,overflowX:l,overflowY:i,display:o}=er(e);return/auto|scroll|overlay|hidden|clip/.test(n+i+l)&&o!=="inline"&&o!=="contents"}function y4(e){return/^(table|td|th)$/.test(ha(e))}function cc(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const x4=/transform|translate|scale|rotate|perspective|filter/,v4=/paint|layout|strict|content/,Wl=e=>!!e&&e!=="none";let oh;function Up(e){const n=Wn(e)?er(e):e;return Wl(n.transform)||Wl(n.translate)||Wl(n.scale)||Wl(n.rotate)||Wl(n.perspective)||!Hp()&&(Wl(n.backdropFilter)||Wl(n.filter))||x4.test(n.willChange||"")||v4.test(n.contain||"")}function b4(e){let n=Tl(e);for(;Gr(n)&&!aa(n);){if(Up(n))return n;if(cc(n))return null;n=Tl(n)}return null}function Hp(){return oh==null&&(oh=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),oh}function aa(e){return/^(html|body|#document)$/.test(ha(e))}function er(e){return Cn(e).getComputedStyle(e)}function fc(e){return Wn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Tl(e){if(ha(e)==="html")return e;const n=e.assignedSlot||e.parentNode||cb(e)&&e.host||xr(e);return cb(n)?n.host:n}function mw(e){const n=Tl(e);return aa(n)?e.ownerDocument?e.ownerDocument.body:e.body:Gr(n)&&Io(n)?n:mw(n)}function Ro(e,n,l){var i;n===void 0&&(n=[]),l===void 0&&(l=!0);const o=mw(e),s=o===((i=e.ownerDocument)==null?void 0:i.body),c=Cn(o);if(s){const f=Vh(c);return n.concat(c,c.visualViewport||[],Io(o)?o:[],f&&l?Ro(f):[])}else return n.concat(o,Ro(o,[],l))}function Vh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gw(e){const n=er(e);let l=parseFloat(n.width)||0,i=parseFloat(n.height)||0;const o=Gr(e),s=o?e.offsetWidth:l,c=o?e.offsetHeight:i,f=Uu(l)!==s||Uu(i)!==c;return f&&(l=s,i=c),{width:l,height:i,$:f}}function Pp(e){return Wn(e)?e:e.contextElement}function na(e){const n=Pp(e);if(!Gr(n))return pr(1);const l=n.getBoundingClientRect(),{width:i,height:o,$:s}=gw(n);let c=(s?Uu(l.width):l.width)/i,f=(s?Uu(l.height):l.height)/o;return(!c||!Number.isFinite(c))&&(c=1),(!f||!Number.isFinite(f))&&(f=1),{x:c,y:f}}const w4=pr(0);function yw(e){const n=Cn(e);return!Hp()||!n.visualViewport?w4:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function S4(e,n,l){return n===void 0&&(n=!1),!l||n&&l!==Cn(e)?!1:n}function li(e,n,l,i){n===void 0&&(n=!1),l===void 0&&(l=!1);const o=e.getBoundingClientRect(),s=Pp(e);let c=pr(1);n&&(i?Wn(i)&&(c=na(i)):c=na(e));const f=S4(s,l,i)?yw(s):pr(0);let d=(o.left+f.x)/c.x,h=(o.top+f.y)/c.y,y=o.width/c.x,g=o.height/c.y;if(s){const v=Cn(s),b=i&&Wn(i)?Cn(i):i;let k=v,C=Vh(k);for(;C&&i&&b!==k;){const E=na(C),N=C.getBoundingClientRect(),M=er(C),j=N.left+(C.clientLeft+parseFloat(M.paddingLeft))*E.x,D=N.top+(C.clientTop+parseFloat(M.paddingTop))*E.y;d*=E.x,h*=E.y,y*=E.x,g*=E.y,d+=j,h+=D,k=Cn(C),C=Vh(k)}}return Pu({width:y,height:g,x:d,y:h})}function dc(e,n){const l=fc(e).scrollLeft;return n?n.left+l:li(xr(e)).left+l}function xw(e,n){const l=e.getBoundingClientRect(),i=l.left+n.scrollLeft-dc(e,l),o=l.top+n.scrollTop;return{x:i,y:o}}function C4(e){let{elements:n,rect:l,offsetParent:i,strategy:o}=e;const s=o==="fixed",c=xr(i),f=n?cc(n.floating):!1;if(i===c||f&&s)return l;let d={scrollLeft:0,scrollTop:0},h=pr(1);const y=pr(0),g=Gr(i);if((g||!g&&!s)&&((ha(i)!=="body"||Io(c))&&(d=fc(i)),g)){const b=li(i);h=na(i),y.x=b.x+i.clientLeft,y.y=b.y+i.clientTop}const v=c&&!g&&!s?xw(c,d):pr(0);return{width:l.width*h.x,height:l.height*h.y,x:l.x*h.x-d.scrollLeft*h.x+y.x+v.x,y:l.y*h.y-d.scrollTop*h.y+y.y+v.y}}function k4(e){return Array.from(e.getClientRects())}function E4(e){const n=xr(e),l=fc(e),i=e.ownerDocument.body,o=Sn(n.scrollWidth,n.clientWidth,i.scrollWidth,i.clientWidth),s=Sn(n.scrollHeight,n.clientHeight,i.scrollHeight,i.clientHeight);let c=-l.scrollLeft+dc(e);const f=-l.scrollTop;return er(i).direction==="rtl"&&(c+=Sn(n.clientWidth,i.clientWidth)-o),{width:o,height:s,x:c,y:f}}const fb=25;function N4(e,n){const l=Cn(e),i=xr(e),o=l.visualViewport;let s=i.clientWidth,c=i.clientHeight,f=0,d=0;if(o){s=o.width,c=o.height;const y=Hp();(!y||y&&n==="fixed")&&(f=o.offsetLeft,d=o.offsetTop)}const h=dc(i);if(h<=0){const y=i.ownerDocument,g=y.body,v=getComputedStyle(g),b=y.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,k=Math.abs(i.clientWidth-g.clientWidth-b);k<=fb&&(s-=k)}else h<=fb&&(s+=h);return{width:s,height:c,x:f,y:d}}function A4(e,n){const l=li(e,!0,n==="fixed"),i=l.top+e.clientTop,o=l.left+e.clientLeft,s=Gr(e)?na(e):pr(1),c=e.clientWidth*s.x,f=e.clientHeight*s.y,d=o*s.x,h=i*s.y;return{width:c,height:f,x:d,y:h}}function db(e,n,l){let i;if(n==="viewport")i=N4(e,l);else if(n==="document")i=E4(xr(e));else if(Wn(n))i=A4(n,l);else{const o=yw(e);i={x:n.x-o.x,y:n.y-o.y,width:n.width,height:n.height}}return Pu(i)}function vw(e,n){const l=Tl(e);return l===n||!Wn(l)||aa(l)?!1:er(l).position==="fixed"||vw(l,n)}function T4(e,n){const l=n.get(e);if(l)return l;let i=Ro(e,[],!1).filter(f=>Wn(f)&&ha(f)!=="body"),o=null;const s=er(e).position==="fixed";let c=s?Tl(e):e;for(;Wn(c)&&!aa(c);){const f=er(c),d=Up(c);!d&&f.position==="fixed"&&(o=null),(s?!d&&!o:!d&&f.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Io(c)&&!d&&vw(e,c))?i=i.filter(y=>y!==c):o=f,c=Tl(c)}return n.set(e,i),i}function R4(e){let{element:n,boundary:l,rootBoundary:i,strategy:o}=e;const c=[...l==="clippingAncestors"?cc(n)?[]:T4(n,this._c):[].concat(l),i],f=db(n,c[0],o);let d=f.top,h=f.right,y=f.bottom,g=f.left;for(let v=1;v<c.length;v++){const b=db(n,c[v],o);d=Sn(b.top,d),h=Al(b.right,h),y=Al(b.bottom,y),g=Sn(b.left,g)}return{width:h-g,height:y-d,x:g,y:d}}function j4(e){const{width:n,height:l}=gw(e);return{width:n,height:l}}function M4(e,n,l){const i=Gr(n),o=xr(n),s=l==="fixed",c=li(e,!0,s,n);let f={scrollLeft:0,scrollTop:0};const d=pr(0);function h(){d.x=dc(o)}if(i||!i&&!s)if((ha(n)!=="body"||Io(o))&&(f=fc(n)),i){const b=li(n,!0,s,n);d.x=b.x+n.clientLeft,d.y=b.y+n.clientTop}else o&&h();s&&!i&&o&&h();const y=o&&!i&&!s?xw(o,f):pr(0),g=c.left+f.scrollLeft-d.x-y.x,v=c.top+f.scrollTop-d.y-y.y;return{x:g,y:v,width:c.width,height:c.height}}function sh(e){return er(e).position==="static"}function hb(e,n){if(!Gr(e)||er(e).position==="fixed")return null;if(n)return n(e);let l=e.offsetParent;return xr(e)===l&&(l=l.ownerDocument.body),l}function bw(e,n){const l=Cn(e);if(cc(e))return l;if(!Gr(e)){let o=Tl(e);for(;o&&!aa(o);){if(Wn(o)&&!sh(o))return o;o=Tl(o)}return l}let i=hb(e,n);for(;i&&y4(i)&&sh(i);)i=hb(i,n);return i&&aa(i)&&sh(i)&&!Up(i)?l:i||b4(e)||l}const O4=async function(e){const n=this.getOffsetParent||bw,l=this.getDimensions,i=await l(e.floating);return{reference:M4(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function D4(e){return er(e).direction==="rtl"}const _4={convertOffsetParentRelativeRectToViewportRelativeRect:C4,getDocumentElement:xr,getClippingRect:R4,getOffsetParent:bw,getElementRects:O4,getClientRects:k4,getDimensions:j4,getScale:na,isElement:Wn,isRTL:D4};function ww(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function z4(e,n){let l=null,i;const o=xr(e);function s(){var f;clearTimeout(i),(f=l)==null||f.disconnect(),l=null}function c(f,d){f===void 0&&(f=!1),d===void 0&&(d=1),s();const h=e.getBoundingClientRect(),{left:y,top:g,width:v,height:b}=h;if(f||n(),!v||!b)return;const k=gu(g),C=gu(o.clientWidth-(y+v)),E=gu(o.clientHeight-(g+b)),N=gu(y),j={rootMargin:-k+"px "+-C+"px "+-E+"px "+-N+"px",threshold:Sn(0,Al(1,d))||1};let D=!0;function I(O){const P=O[0].intersectionRatio;if(P!==d){if(!D)return c();P?c(!1,P):i=setTimeout(()=>{c(!1,1e-7)},1e3)}P===1&&!ww(h,e.getBoundingClientRect())&&c(),D=!1}try{l=new IntersectionObserver(I,{...j,root:o.ownerDocument})}catch{l=new IntersectionObserver(I,j)}l.observe(e)}return c(!0),s}function L4(e,n,l,i){i===void 0&&(i={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:d=!1}=i,h=Pp(e),y=o||s?[...h?Ro(h):[],...n?Ro(n):[]]:[];y.forEach(N=>{o&&N.addEventListener("scroll",l,{passive:!0}),s&&N.addEventListener("resize",l)});const g=h&&f?z4(h,l):null;let v=-1,b=null;c&&(b=new ResizeObserver(N=>{let[M]=N;M&&M.target===h&&b&&n&&(b.unobserve(n),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var j;(j=b)==null||j.observe(n)})),l()}),h&&!d&&b.observe(h),n&&b.observe(n));let k,C=d?li(e):null;d&&E();function E(){const N=li(e);C&&!ww(C,N)&&l(),C=N,k=requestAnimationFrame(E)}return l(),()=>{var N;y.forEach(M=>{o&&M.removeEventListener("scroll",l),s&&M.removeEventListener("resize",l)}),g==null||g(),(N=b)==null||N.disconnect(),b=null,d&&cancelAnimationFrame(k)}}const B4=h4,U4=p4,H4=c4,P4=g4,I4=f4,pb=u4,q4=m4,F4=(e,n,l)=>{const i=new Map,o={platform:_4,...l},s={...o.platform,_c:i};return s4(e,n,{...o,platform:s})};var V4=typeof document<"u",G4=function(){},ju=V4?w.useLayoutEffect:G4;function Iu(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let l,i,o;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(l=e.length,l!==n.length)return!1;for(i=l;i--!==0;)if(!Iu(e[i],n[i]))return!1;return!0}if(o=Object.keys(e),l=o.length,l!==Object.keys(n).length)return!1;for(i=l;i--!==0;)if(!{}.hasOwnProperty.call(n,o[i]))return!1;for(i=l;i--!==0;){const s=o[i];if(!(s==="_owner"&&e.$$typeof)&&!Iu(e[s],n[s]))return!1}return!0}return e!==e&&n!==n}function Sw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function mb(e,n){const l=Sw(e);return Math.round(n*l)/l}function uh(e){const n=w.useRef(e);return ju(()=>{n.current=e}),n}function Y4(e){e===void 0&&(e={});const{placement:n="bottom",strategy:l="absolute",middleware:i=[],platform:o,elements:{reference:s,floating:c}={},transform:f=!0,whileElementsMounted:d,open:h}=e,[y,g]=w.useState({x:0,y:0,strategy:l,placement:n,middlewareData:{},isPositioned:!1}),[v,b]=w.useState(i);Iu(v,i)||b(i);const[k,C]=w.useState(null),[E,N]=w.useState(null),M=w.useCallback(le=>{le!==O.current&&(O.current=le,C(le))},[]),j=w.useCallback(le=>{le!==P.current&&(P.current=le,N(le))},[]),D=s||k,I=c||E,O=w.useRef(null),P=w.useRef(null),q=w.useRef(y),re=d!=null,H=uh(d),J=uh(o),ne=uh(h),W=w.useCallback(()=>{if(!O.current||!P.current)return;const le={placement:n,strategy:l,middleware:v};J.current&&(le.platform=J.current),F4(O.current,P.current,le).then(de=>{const R={...de,isPositioned:ne.current!==!1};Z.current&&!Iu(q.current,R)&&(q.current=R,kl.flushSync(()=>{g(R)}))})},[v,n,l,J,ne]);ju(()=>{h===!1&&q.current.isPositioned&&(q.current.isPositioned=!1,g(le=>({...le,isPositioned:!1})))},[h]);const Z=w.useRef(!1);ju(()=>(Z.current=!0,()=>{Z.current=!1}),[]),ju(()=>{if(D&&(O.current=D),I&&(P.current=I),D&&I){if(H.current)return H.current(D,I,W);W()}},[D,I,W,H,re]);const Q=w.useMemo(()=>({reference:O,floating:P,setReference:M,setFloating:j}),[M,j]),B=w.useMemo(()=>({reference:D,floating:I}),[D,I]),Y=w.useMemo(()=>{const le={position:l,left:0,top:0};if(!B.floating)return le;const de=mb(B.floating,y.x),R=mb(B.floating,y.y);return f?{...le,transform:"translate("+de+"px, "+R+"px)",...Sw(B.floating)>=1.5&&{willChange:"transform"}}:{position:l,left:de,top:R}},[l,f,B.floating,y.x,y.y]);return w.useMemo(()=>({...y,update:W,refs:Q,elements:B,floatingStyles:Y}),[y,W,Q,B,Y])}const $4=e=>{function n(l){return{}.hasOwnProperty.call(l,"current")}return{name:"arrow",options:e,fn(l){const{element:i,padding:o}=typeof e=="function"?e(l):e;return i&&n(i)?i.current!=null?pb({element:i.current,padding:o}).fn(l):{}:i?pb({element:i,padding:o}).fn(l):{}}}},X4=(e,n)=>{const l=B4(e);return{name:l.name,fn:l.fn,options:[e,n]}},Q4=(e,n)=>{const l=U4(e);return{name:l.name,fn:l.fn,options:[e,n]}},K4=(e,n)=>({fn:q4(e).fn,options:[e,n]}),Z4=(e,n)=>{const l=H4(e);return{name:l.name,fn:l.fn,options:[e,n]}},J4=(e,n)=>{const l=P4(e);return{name:l.name,fn:l.fn,options:[e,n]}},W4=(e,n)=>{const l=I4(e);return{name:l.name,fn:l.fn,options:[e,n]}},e3=(e,n)=>{const l=$4(e);return{name:l.name,fn:l.fn,options:[e,n]}};var t3="Arrow",Cw=w.forwardRef((e,n)=>{const{children:l,width:i=10,height:o=5,...s}=e;return x.jsx(Yt.svg,{...s,ref:n,width:i,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?l:x.jsx("polygon",{points:"0,0 30,0 15,10"})})});Cw.displayName=t3;var n3=Cw;function r3(e){const[n,l]=w.useState(void 0);return El(()=>{if(e){l({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let c,f;if("borderBoxSize"in s){const d=s.borderBoxSize,h=Array.isArray(d)?d[0]:d;c=h.inlineSize,f=h.blockSize}else c=e.offsetWidth,f=e.offsetHeight;l({width:c,height:f})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else l(void 0)},[e]),n}var Ip="Popper",[kw,hc]=rc(Ip),[l3,Ew]=kw(Ip),Nw=e=>{const{__scopePopper:n,children:l}=e,[i,o]=w.useState(null);return x.jsx(l3,{scope:n,anchor:i,onAnchorChange:o,children:l})};Nw.displayName=Ip;var Aw="PopperAnchor",Tw=w.forwardRef((e,n)=>{const{__scopePopper:l,virtualRef:i,...o}=e,s=Ew(Aw,l),c=w.useRef(null),f=En(n,c),d=w.useRef(null);return w.useEffect(()=>{const h=d.current;d.current=(i==null?void 0:i.current)||c.current,h!==d.current&&s.onAnchorChange(d.current)}),i?null:x.jsx(Yt.div,{...o,ref:f})});Tw.displayName=Aw;var qp="PopperContent",[i3,a3]=kw(qp),Rw=w.forwardRef((e,n)=>{var we,Ae,xe,Ne,rt,tt;const{__scopePopper:l,side:i="bottom",sideOffset:o=0,align:s="center",alignOffset:c=0,arrowPadding:f=0,avoidCollisions:d=!0,collisionBoundary:h=[],collisionPadding:y=0,sticky:g="partial",hideWhenDetached:v=!1,updatePositionStrategy:b="optimized",onPlaced:k,...C}=e,E=Ew(qp,l),[N,M]=w.useState(null),j=En(n,at=>M(at)),[D,I]=w.useState(null),O=r3(D),P=(O==null?void 0:O.width)??0,q=(O==null?void 0:O.height)??0,re=i+(s!=="center"?"-"+s:""),H=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},J=Array.isArray(h)?h:[h],ne=J.length>0,W={padding:H,boundary:J.filter(s3),altBoundary:ne},{refs:Z,floatingStyles:Q,placement:B,isPositioned:Y,middlewareData:le}=Y4({strategy:"fixed",placement:re,whileElementsMounted:(...at)=>L4(...at,{animationFrame:b==="always"}),elements:{reference:E.anchor},middleware:[X4({mainAxis:o+q,alignmentAxis:c}),d&&Q4({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?K4():void 0,...W}),d&&Z4({...W}),J4({...W,apply:({elements:at,rects:Ye,availableWidth:Dt,availableHeight:_t})=>{const{width:Fn,height:Vn}=Ye.reference,zt=at.floating.style;zt.setProperty("--radix-popper-available-width",`${Dt}px`),zt.setProperty("--radix-popper-available-height",`${_t}px`),zt.setProperty("--radix-popper-anchor-width",`${Fn}px`),zt.setProperty("--radix-popper-anchor-height",`${Vn}px`)}}),D&&e3({element:D,padding:f}),u3({arrowWidth:P,arrowHeight:q}),v&&W4({strategy:"referenceHidden",...W})]}),[de,R]=Ow(B),z=ia(k);El(()=>{Y&&(z==null||z())},[Y,z]);const L=(we=le.arrow)==null?void 0:we.x,T=(Ae=le.arrow)==null?void 0:Ae.y,se=((xe=le.arrow)==null?void 0:xe.centerOffset)!==0,[ce,ue]=w.useState();return El(()=>{N&&ue(window.getComputedStyle(N).zIndex)},[N]),x.jsx("div",{ref:Z.setFloating,"data-radix-popper-content-wrapper":"",style:{...Q,transform:Y?Q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ce,"--radix-popper-transform-origin":[(Ne=le.transformOrigin)==null?void 0:Ne.x,(rt=le.transformOrigin)==null?void 0:rt.y].join(" "),...((tt=le.hide)==null?void 0:tt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:x.jsx(i3,{scope:l,placedSide:de,onArrowChange:I,arrowX:L,arrowY:T,shouldHideArrow:se,children:x.jsx(Yt.div,{"data-side":de,"data-align":R,...C,ref:j,style:{...C.style,animation:Y?void 0:"none"}})})})});Rw.displayName=qp;var jw="PopperArrow",o3={top:"bottom",right:"left",bottom:"top",left:"right"},Mw=w.forwardRef(function(n,l){const{__scopePopper:i,...o}=n,s=a3(jw,i),c=o3[s.placedSide];return x.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:x.jsx(n3,{...o,ref:l,style:{...o.style,display:"block"}})})});Mw.displayName=jw;function s3(e){return e!==null}var u3=e=>({name:"transformOrigin",options:e,fn(n){var E,N,M;const{placement:l,rects:i,middlewareData:o}=n,c=((E=o.arrow)==null?void 0:E.centerOffset)!==0,f=c?0:e.arrowWidth,d=c?0:e.arrowHeight,[h,y]=Ow(l),g={start:"0%",center:"50%",end:"100%"}[y],v=(((N=o.arrow)==null?void 0:N.x)??0)+f/2,b=(((M=o.arrow)==null?void 0:M.y)??0)+d/2;let k="",C="";return h==="bottom"?(k=c?g:`${v}px`,C=`${-d}px`):h==="top"?(k=c?g:`${v}px`,C=`${i.floating.height+d}px`):h==="right"?(k=`${-d}px`,C=c?g:`${b}px`):h==="left"&&(k=`${i.floating.width+d}px`,C=c?g:`${b}px`),{data:{x:k,y:C}}}});function Ow(e){const[n,l="center"]=e.split("-");return[n,l]}var Dw=Nw,Fp=Tw,_w=Rw,zw=Mw,c3=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"}),f3="VisuallyHidden",Lw=w.forwardRef((e,n)=>x.jsx(Yt.span,{...e,ref:n,style:{...c3,...e.style}}));Lw.displayName=f3;var d3=Lw,[pc]=rc("Tooltip",[hc]),mc=hc(),Bw="TooltipProvider",h3=700,Gh="tooltip.open",[p3,Vp]=pc(Bw),Uw=e=>{const{__scopeTooltip:n,delayDuration:l=h3,skipDelayDuration:i=300,disableHoverableContent:o=!1,children:s}=e,c=w.useRef(!0),f=w.useRef(!1),d=w.useRef(0);return w.useEffect(()=>{const h=d.current;return()=>window.clearTimeout(h)},[]),x.jsx(p3,{scope:n,isOpenDelayedRef:c,delayDuration:l,onOpen:w.useCallback(()=>{window.clearTimeout(d.current),c.current=!1},[]),onClose:w.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>c.current=!0,i)},[i]),isPointerInTransitRef:f,onPointerInTransitChange:w.useCallback(h=>{f.current=h},[]),disableHoverableContent:o,children:s})};Uw.displayName=Bw;var jo="Tooltip",[m3,qo]=pc(jo),Hw=e=>{const{__scopeTooltip:n,children:l,open:i,defaultOpen:o,onOpenChange:s,disableHoverableContent:c,delayDuration:f}=e,d=Vp(jo,e.__scopeTooltip),h=mc(n),[y,g]=w.useState(null),v=vo(),b=w.useRef(0),k=c??d.disableHoverableContent,C=f??d.delayDuration,E=w.useRef(!1),[N,M]=Cp({prop:i,defaultProp:o??!1,onChange:P=>{P?(d.onOpen(),document.dispatchEvent(new CustomEvent(Gh))):d.onClose(),s==null||s(P)},caller:jo}),j=w.useMemo(()=>N?E.current?"delayed-open":"instant-open":"closed",[N]),D=w.useCallback(()=>{window.clearTimeout(b.current),b.current=0,E.current=!1,M(!0)},[M]),I=w.useCallback(()=>{window.clearTimeout(b.current),b.current=0,M(!1)},[M]),O=w.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>{E.current=!0,M(!0),b.current=0},C)},[C,M]);return w.useEffect(()=>()=>{b.current&&(window.clearTimeout(b.current),b.current=0)},[]),x.jsx(Dw,{...h,children:x.jsx(m3,{scope:n,contentId:v,open:N,stateAttribute:j,trigger:y,onTriggerChange:g,onTriggerEnter:w.useCallback(()=>{d.isOpenDelayedRef.current?O():D()},[d.isOpenDelayedRef,O,D]),onTriggerLeave:w.useCallback(()=>{k?I():(window.clearTimeout(b.current),b.current=0)},[I,k]),onOpen:D,onClose:I,disableHoverableContent:k,children:l})})};Hw.displayName=jo;var Yh="TooltipTrigger",Pw=w.forwardRef((e,n)=>{const{__scopeTooltip:l,...i}=e,o=qo(Yh,l),s=Vp(Yh,l),c=mc(l),f=w.useRef(null),d=En(n,f,o.onTriggerChange),h=w.useRef(!1),y=w.useRef(!1),g=w.useCallback(()=>h.current=!1,[]);return w.useEffect(()=>()=>document.removeEventListener("pointerup",g),[g]),x.jsx(Fp,{asChild:!0,...c,children:x.jsx(Yt.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...i,ref:d,onPointerMove:At(e.onPointerMove,v=>{v.pointerType!=="touch"&&!y.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),y.current=!0)}),onPointerLeave:At(e.onPointerLeave,()=>{o.onTriggerLeave(),y.current=!1}),onPointerDown:At(e.onPointerDown,()=>{o.open&&o.onClose(),h.current=!0,document.addEventListener("pointerup",g,{once:!0})}),onFocus:At(e.onFocus,()=>{h.current||o.onOpen()}),onBlur:At(e.onBlur,o.onClose),onClick:At(e.onClick,o.onClose)})})});Pw.displayName=Yh;var Gp="TooltipPortal",[g3,y3]=pc(Gp,{forceMount:void 0}),Iw=e=>{const{__scopeTooltip:n,forceMount:l,children:i,container:o}=e,s=qo(Gp,n);return x.jsx(g3,{scope:n,forceMount:l,children:x.jsx(Ml,{present:l||s.open,children:x.jsx(ic,{asChild:!0,container:o,children:i})})})};Iw.displayName=Gp;var oa="TooltipContent",qw=w.forwardRef((e,n)=>{const l=y3(oa,e.__scopeTooltip),{forceMount:i=l.forceMount,side:o="top",...s}=e,c=qo(oa,e.__scopeTooltip);return x.jsx(Ml,{present:i||c.open,children:c.disableHoverableContent?x.jsx(Fw,{side:o,...s,ref:n}):x.jsx(x3,{side:o,...s,ref:n})})}),x3=w.forwardRef((e,n)=>{const l=qo(oa,e.__scopeTooltip),i=Vp(oa,e.__scopeTooltip),o=w.useRef(null),s=En(n,o),[c,f]=w.useState(null),{trigger:d,onClose:h}=l,y=o.current,{onPointerInTransitChange:g}=i,v=w.useCallback(()=>{f(null),g(!1)},[g]),b=w.useCallback((k,C)=>{const E=k.currentTarget,N={x:k.clientX,y:k.clientY},M=C3(N,E.getBoundingClientRect()),j=k3(N,M),D=E3(C.getBoundingClientRect()),I=A3([...j,...D]);f(I),g(!0)},[g]);return w.useEffect(()=>()=>v(),[v]),w.useEffect(()=>{if(d&&y){const k=E=>b(E,y),C=E=>b(E,d);return d.addEventListener("pointerleave",k),y.addEventListener("pointerleave",C),()=>{d.removeEventListener("pointerleave",k),y.removeEventListener("pointerleave",C)}}},[d,y,b,v]),w.useEffect(()=>{if(c){const k=C=>{const E=C.target,N={x:C.clientX,y:C.clientY},M=(d==null?void 0:d.contains(E))||(y==null?void 0:y.contains(E)),j=!N3(N,c);M?v():j&&(v(),h())};return document.addEventListener("pointermove",k),()=>document.removeEventListener("pointermove",k)}},[d,y,c,h,v]),x.jsx(Fw,{...e,ref:s})}),[v3,b3]=pc(jo,{isInside:!1}),w3=ZA("TooltipContent"),Fw=w.forwardRef((e,n)=>{const{__scopeTooltip:l,children:i,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:c,...f}=e,d=qo(oa,l),h=mc(l),{onClose:y}=d;return w.useEffect(()=>(document.addEventListener(Gh,y),()=>document.removeEventListener(Gh,y)),[y]),w.useEffect(()=>{if(d.trigger){const g=v=>{const b=v.target;b!=null&&b.contains(d.trigger)&&y()};return window.addEventListener("scroll",g,{capture:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})}},[d.trigger,y]),x.jsx(lc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:g=>g.preventDefault(),onDismiss:y,children:x.jsxs(_w,{"data-state":d.stateAttribute,...h,...f,ref:n,style:{...f.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[x.jsx(w3,{children:i}),x.jsx(v3,{scope:l,isInside:!0,children:x.jsx(d3,{id:d.contentId,role:"tooltip",children:o||i})})]})})});qw.displayName=oa;var Vw="TooltipArrow",S3=w.forwardRef((e,n)=>{const{__scopeTooltip:l,...i}=e,o=mc(l);return b3(Vw,l).isInside?null:x.jsx(zw,{...o,...i,ref:n})});S3.displayName=Vw;function C3(e,n){const l=Math.abs(n.top-e.y),i=Math.abs(n.bottom-e.y),o=Math.abs(n.right-e.x),s=Math.abs(n.left-e.x);switch(Math.min(l,i,o,s)){case s:return"left";case o:return"right";case l:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function k3(e,n,l=5){const i=[];switch(n){case"top":i.push({x:e.x-l,y:e.y+l},{x:e.x+l,y:e.y+l});break;case"bottom":i.push({x:e.x-l,y:e.y-l},{x:e.x+l,y:e.y-l});break;case"left":i.push({x:e.x+l,y:e.y-l},{x:e.x+l,y:e.y+l});break;case"right":i.push({x:e.x-l,y:e.y-l},{x:e.x-l,y:e.y+l});break}return i}function E3(e){const{top:n,right:l,bottom:i,left:o}=e;return[{x:o,y:n},{x:l,y:n},{x:l,y:i},{x:o,y:i}]}function N3(e,n){const{x:l,y:i}=e;let o=!1;for(let s=0,c=n.length-1;s<n.length;c=s++){const f=n[s],d=n[c],h=f.x,y=f.y,g=d.x,v=d.y;y>i!=v>i&&l<(g-h)*(i-y)/(v-y)+h&&(o=!o)}return o}function A3(e){const n=e.slice();return n.sort((l,i)=>l.x<i.x?-1:l.x>i.x?1:l.y<i.y?-1:l.y>i.y?1:0),T3(n)}function T3(e){if(e.length<=1)return e.slice();const n=[];for(let i=0;i<e.length;i++){const o=e[i];for(;n.length>=2;){const s=n[n.length-1],c=n[n.length-2];if((s.x-c.x)*(o.y-c.y)>=(s.y-c.y)*(o.x-c.x))n.pop();else break}n.push(o)}n.pop();const l=[];for(let i=e.length-1;i>=0;i--){const o=e[i];for(;l.length>=2;){const s=l[l.length-1],c=l[l.length-2];if((s.x-c.x)*(o.y-c.y)>=(s.y-c.y)*(o.x-c.x))l.pop();else break}l.push(o)}return l.pop(),n.length===1&&l.length===1&&n[0].x===l[0].x&&n[0].y===l[0].y?n:n.concat(l)}var R3=Uw,j3=Hw,M3=Pw,O3=Iw,Gw=qw;const D3=R3,qu=j3,Fu=M3,Mo=w.forwardRef(({className:e,sideOffset:n=4,...l},i)=>x.jsx(O3,{children:x.jsx(Gw,{ref:i,sideOffset:n,className:ye("z-50 overflow-hidden rounded-md bg-card text-card-foreground border border-border px-3 py-1.5 text-xs animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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",e),...l})}));Mo.displayName=Gw.displayName;const _3="0.3.0",z3={version:_3},Qt="Kanna",gb="kanna",L3=`kanna/${z3.version}`,B3="[kanna]",U3=`~/${Qt}`;function yu(e){return e?`${gb} ${e}`:gb}const H3={sm:"text-sm px-2.5 py-1",md:"text-sm px-3 py-1.5"};function P3({value:e,onValueChange:n,options:l,size:i="md",className:o,optionClassName:s}){return x.jsx("div",{className:ye("inline-flex items-center rounded-full border border-border p-0.5 ",o),children:l.map(c=>{const f=c.value===e,d=c.icon,h=d?w.isValidElement(d)?d:(()=>{const g=d;return x.jsx(g,{className:i==="sm"?"h-3.5 w-3.5":"h-4 w-4"})})():null,y=x.jsxs("button",{type:"button",onClick:()=>n(c.value),disabled:c.disabled,"aria-pressed":f,className:ye("rounded-full border transition-colors",d?"grid grid-cols-[auto_auto] items-center gap-2":"inline-flex items-center gap-1.5",H3[i],f?"bg-white dark:bg-muted text-slate-900 dark:text-slate-200 border-slate-300 dark:border-white/10 bg-slate-200 ":"border-transparent text-slate-800 hover:text-slate-900 dark:text-muted-foreground dark:hover:text-foreground",c.disabled&&"opacity-50 pointer-events-none",s),children:[h,x.jsx("span",{children:c.label})]},c.value);return c.tooltip?x.jsxs(qu,{children:[x.jsx(Fu,{asChild:!0,children:y}),x.jsx(Mo,{children:c.tooltip})]},c.value):y})})}function I3(e){return e.toLowerCase().replace(/[\s_]+/g,"-").replace(/[^a-z0-9-]/g,"").replace(/-+/g,"-").replace(/^-|-$/g,"")}function Yw({open:e,onOpenChange:n,onConfirm:l}){const[i,o]=w.useState("new"),[s,c]=w.useState(""),[f,d]=w.useState(""),h=w.useRef(null),y=w.useRef(null);w.useEffect(()=>{e&&(o("new"),c(""),d(""),setTimeout(()=>{var E;return(E=h.current)==null?void 0:E.focus()},0))},[e]),w.useEffect(()=>{e&&setTimeout(()=>{var E,N;i==="new"?(E=h.current)==null||E.focus():(N=y.current)==null||N.focus()},0)},[i,e]);const g=I3(s),v=g?`${U3}/${g}`:"",b=f.trim(),k=i==="new"?!!g:!!b,C=()=>{if(k){if(i==="new")l({mode:"new",localPath:v,title:s.trim()});else{const E=b.split("/").pop()||b;l({mode:"existing",localPath:b,title:E})}n(!1)}};return x.jsx(aw,{open:e,onOpenChange:n,children:x.jsxs(_p,{size:"sm",children:[x.jsxs(uw,{className:"space-y-4",children:[x.jsx(sw,{children:"Add Project"}),x.jsx(P3,{value:i,onValueChange:o,options:[{value:"new",label:"New Folder"},{value:"existing",label:"Existing Path"}],className:"w-full",optionClassName:"flex-1 justify-center"}),i==="new"?x.jsxs("div",{className:"space-y-2",children:[x.jsx("input",{ref:h,type:"text",value:s,onChange:E=>c(E.target.value),onKeyDown:E=>{E.key==="Enter"&&C(),E.key==="Escape"&&n(!1)},className:"w-full px-3 py-2 text-sm border border-border rounded-md bg-background outline-none",placeholder:"Project name"}),v&&x.jsx("p",{className:"text-xs text-muted-foreground font-mono",children:v})]}):x.jsxs("div",{className:"space-y-2",children:[x.jsx("input",{ref:y,type:"text",value:f,onChange:E=>d(E.target.value),onKeyDown:E=>{E.key==="Enter"&&C(),E.key==="Escape"&&n(!1)},className:"w-full px-3 py-2 text-sm border border-border rounded-md bg-background outline-none",placeholder:"~/Projects/my-app"}),x.jsx("p",{className:"text-xs text-muted-foreground",children:"The folder will be created if it doesn't exist."})]})]}),x.jsxs(cw,{children:[x.jsx(Fe,{variant:"ghost",size:"sm",onClick:()=>n(!1),children:"Cancel"}),x.jsx(Fe,{variant:"secondary",size:"sm",onClick:C,disabled:!k,children:"Create"})]})]})})}const gc=({children:e,className:n,shimmerWidth:l=100,animate:i=!0,...o})=>x.jsx("span",{style:{"--shiny-width":`${Math.min(l,100)}px`},className:ye("mx-auto max-w-md text-foreground/50",i?["animate-shiny-text [background-size:var(--shiny-width)_100%] bg-clip-text [background-position:0_0] bg-no-repeat [transition:background-position_1s_cubic-bezier(.6,.6,0,1)_infinite]","bg-gradient-to-r from-transparent via-black/80 via-50% to-transparent dark:via-white/80"]:["text-neutral"],n),...o,children:e}),q3=new Set(["starting","running"]);function F3({chat:e,activeChatId:n,onSelectChat:l,onDeleteChat:i}){return x.jsxs("div",{"data-chat-id":Pv(e.chatId),className:ye("group flex items-center gap-2 pl-2.5 pr-0.5 py-0.5 rounded-md cursor-pointer border-border/0 hover:border-border hover:bg-muted active:bg-muted border transition-colors",n===Pv(e.chatId)?"bg-muted border-border":"border-border/0 dark:hover:border-slate-400/10 "),onClick:()=>l(e.chatId),children:[q3.has(e.status)?x.jsx(oi,{className:"size-3.5 flex-shrink-0 animate-spin text-muted-foreground"}):e.status==="waiting_for_user"?x.jsx("div",{className:"relative ",children:x.jsxs("div",{className:" rounded-full z-0 size-3.5 flex items-center justify-center ",children:[x.jsx("div",{className:"absolute rounded-full z-0 size-2.5 bg-blue-400/80 animate-ping"}),x.jsx("div",{className:" rounded-full z-0 size-2.5 bg-blue-400 ring-2 ring-muted/20 dark:ring-muted/50"})]})}):null,x.jsx("span",{className:"text-sm truncate flex-1 translate-y-[-0.5px]",children:e.status!=="idle"&&e.status!=="waiting_for_user"?x.jsx(gc,{animate:e.status==="running",shimmerWidth:Math.max(20,e.title.length*3),children:e.title}):e.title}),x.jsx(Fe,{variant:"ghost",size:"icon",className:"h-7 w-7 opacity-100 md:opacity-0 md:group-hover:opacity-100 cursor-pointer rounded-sm hover:!bg-transparent",onClick:o=>{o.stopPropagation(),i(e.chatId)},title:"Delete chat",children:x.jsx(Po,{className:"size-3.5"})})]},e._id)}function V3(){for(var e=arguments.length,n=new Array(e),l=0;l<e;l++)n[l]=arguments[l];return w.useMemo(()=>i=>{n.forEach(o=>o(i))},n)}const yc=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function pa(e){const n=Object.prototype.toString.call(e);return n==="[object Window]"||n==="[object global]"}function Yp(e){return"nodeType"in e}function cn(e){var n,l;return e?pa(e)?e:Yp(e)&&(n=(l=e.ownerDocument)==null?void 0:l.defaultView)!=null?n:window:window}function $p(e){const{Document:n}=cn(e);return e instanceof n}function Fo(e){return pa(e)?!1:e instanceof cn(e).HTMLElement}function $w(e){return e instanceof cn(e).SVGElement}function ma(e){return e?pa(e)?e.document:Yp(e)?$p(e)?e:Fo(e)||$w(e)?e.ownerDocument:document:document:document}const gr=yc?w.useLayoutEffect:w.useEffect;function Xp(e){const n=w.useRef(e);return gr(()=>{n.current=e}),w.useCallback(function(){for(var l=arguments.length,i=new Array(l),o=0;o<l;o++)i[o]=arguments[o];return n.current==null?void 0:n.current(...i)},[])}function G3(){const e=w.useRef(null),n=w.useCallback((i,o)=>{e.current=setInterval(i,o)},[]),l=w.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[n,l]}function Oo(e,n){n===void 0&&(n=[e]);const l=w.useRef(e);return gr(()=>{l.current!==e&&(l.current=e)},n),l}function Vo(e,n){const l=w.useRef();return w.useMemo(()=>{const i=e(l.current);return l.current=i,i},[...n])}function Vu(e){const n=Xp(e),l=w.useRef(null),i=w.useCallback(o=>{o!==l.current&&(n==null||n(o,l.current)),l.current=o},[]);return[l,i]}function $h(e){const n=w.useRef();return w.useEffect(()=>{n.current=e},[e]),n.current}let ch={};function Go(e,n){return w.useMemo(()=>{if(n)return n;const l=ch[e]==null?0:ch[e]+1;return ch[e]=l,e+"-"+l},[e,n])}function Xw(e){return function(n){for(var l=arguments.length,i=new Array(l>1?l-1:0),o=1;o<l;o++)i[o-1]=arguments[o];return i.reduce((s,c)=>{const f=Object.entries(c);for(const[d,h]of f){const y=s[d];y!=null&&(s[d]=y+e*h)}return s},{...n})}}const ra=Xw(1),Gu=Xw(-1);function Y3(e){return"clientX"in e&&"clientY"in e}function Qp(e){if(!e)return!1;const{KeyboardEvent:n}=cn(e.target);return n&&e instanceof n}function $3(e){if(!e)return!1;const{TouchEvent:n}=cn(e.target);return n&&e instanceof n}function Xh(e){if($3(e)){if(e.touches&&e.touches.length){const{clientX:n,clientY:l}=e.touches[0];return{x:n,y:l}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:n,clientY:l}=e.changedTouches[0];return{x:n,y:l}}}return Y3(e)?{x:e.clientX,y:e.clientY}:null}const Do=Object.freeze({Translate:{toString(e){if(!e)return;const{x:n,y:l}=e;return"translate3d("+(n?Math.round(n):0)+"px, "+(l?Math.round(l):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:n,scaleY:l}=e;return"scaleX("+n+") scaleY("+l+")"}},Transform:{toString(e){if(e)return[Do.Translate.toString(e),Do.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:n,duration:l,easing:i}=e;return n+" "+l+"ms "+i}}}),yb="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function X3(e){return e.matches(yb)?e:e.querySelector(yb)}const Q3={display:"none"};function K3(e){let{id:n,value:l}=e;return Nt.createElement("div",{id:n,style:Q3},l)}function Z3(e){let{id:n,announcement:l,ariaLiveType:i="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return Nt.createElement("div",{id:n,style:o,role:"status","aria-live":i,"aria-atomic":!0},l)}function J3(){const[e,n]=w.useState("");return{announce:w.useCallback(i=>{i!=null&&n(i)},[]),announcement:e}}const Qw=w.createContext(null);function W3(e){const n=w.useContext(Qw);w.useEffect(()=>{if(!n)throw new Error("useDndMonitor must be used within a children of <DndContext>");return n(e)},[e,n])}function e5(){const[e]=w.useState(()=>new Set),n=w.useCallback(i=>(e.add(i),()=>e.delete(i)),[e]);return[w.useCallback(i=>{let{type:o,event:s}=i;e.forEach(c=>{var f;return(f=c[o])==null?void 0:f.call(c,s)})},[e]),n]}const t5={draggable:`
|
|
375
|
+
To pick up a draggable item, press the space bar.
|
|
376
|
+
While dragging, use the arrow keys to move the item.
|
|
377
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
378
|
+
`},n5={onDragStart(e){let{active:n}=e;return"Picked up draggable item "+n.id+"."},onDragOver(e){let{active:n,over:l}=e;return l?"Draggable item "+n.id+" was moved over droppable area "+l.id+".":"Draggable item "+n.id+" is no longer over a droppable area."},onDragEnd(e){let{active:n,over:l}=e;return l?"Draggable item "+n.id+" was dropped over droppable area "+l.id:"Draggable item "+n.id+" was dropped."},onDragCancel(e){let{active:n}=e;return"Dragging was cancelled. Draggable item "+n.id+" was dropped."}};function r5(e){let{announcements:n=n5,container:l,hiddenTextDescribedById:i,screenReaderInstructions:o=t5}=e;const{announce:s,announcement:c}=J3(),f=Go("DndLiveRegion"),[d,h]=w.useState(!1);if(w.useEffect(()=>{h(!0)},[]),W3(w.useMemo(()=>({onDragStart(g){let{active:v}=g;s(n.onDragStart({active:v}))},onDragMove(g){let{active:v,over:b}=g;n.onDragMove&&s(n.onDragMove({active:v,over:b}))},onDragOver(g){let{active:v,over:b}=g;s(n.onDragOver({active:v,over:b}))},onDragEnd(g){let{active:v,over:b}=g;s(n.onDragEnd({active:v,over:b}))},onDragCancel(g){let{active:v,over:b}=g;s(n.onDragCancel({active:v,over:b}))}}),[s,n])),!d)return null;const y=Nt.createElement(Nt.Fragment,null,Nt.createElement(K3,{id:i,value:o.draggable}),Nt.createElement(Z3,{id:f,announcement:c}));return l?kl.createPortal(y,l):y}var Et;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Et||(Et={}));function Yu(){}function xb(e,n){return w.useMemo(()=>({sensor:e,options:n??{}}),[e,n])}function l5(){for(var e=arguments.length,n=new Array(e),l=0;l<e;l++)n[l]=arguments[l];return w.useMemo(()=>[...n].filter(i=>i!=null),[...n])}const tr=Object.freeze({x:0,y:0});function i5(e,n){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function a5(e,n){let{data:{value:l}}=e,{data:{value:i}}=n;return l-i}function o5(e,n){let{data:{value:l}}=e,{data:{value:i}}=n;return i-l}function s5(e,n){if(!e||e.length===0)return null;const[l]=e;return l[n]}function vb(e,n,l){return n===void 0&&(n=e.left),l===void 0&&(l=e.top),{x:n+e.width*.5,y:l+e.height*.5}}const u5=e=>{let{collisionRect:n,droppableRects:l,droppableContainers:i}=e;const o=vb(n,n.left,n.top),s=[];for(const c of i){const{id:f}=c,d=l.get(f);if(d){const h=i5(vb(d),o);s.push({id:f,data:{droppableContainer:c,value:h}})}}return s.sort(a5)};function c5(e,n){const l=Math.max(n.top,e.top),i=Math.max(n.left,e.left),o=Math.min(n.left+n.width,e.left+e.width),s=Math.min(n.top+n.height,e.top+e.height),c=o-i,f=s-l;if(i<o&&l<s){const d=n.width*n.height,h=e.width*e.height,y=c*f,g=y/(d+h-y);return Number(g.toFixed(4))}return 0}const f5=e=>{let{collisionRect:n,droppableRects:l,droppableContainers:i}=e;const o=[];for(const s of i){const{id:c}=s,f=l.get(c);if(f){const d=c5(f,n);d>0&&o.push({id:c,data:{droppableContainer:s,value:d}})}}return o.sort(o5)};function d5(e,n,l){return{...e,scaleX:n&&l?n.width/l.width:1,scaleY:n&&l?n.height/l.height:1}}function Kw(e,n){return e&&n?{x:e.left-n.left,y:e.top-n.top}:tr}function h5(e){return function(l){for(var i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];return o.reduce((c,f)=>({...c,top:c.top+e*f.y,bottom:c.bottom+e*f.y,left:c.left+e*f.x,right:c.right+e*f.x}),{...l})}}const p5=h5(1);function m5(e){if(e.startsWith("matrix3d(")){const n=e.slice(9,-1).split(/, /);return{x:+n[12],y:+n[13],scaleX:+n[0],scaleY:+n[5]}}else if(e.startsWith("matrix(")){const n=e.slice(7,-1).split(/, /);return{x:+n[4],y:+n[5],scaleX:+n[0],scaleY:+n[3]}}return null}function g5(e,n,l){const i=m5(n);if(!i)return e;const{scaleX:o,scaleY:s,x:c,y:f}=i,d=e.left-c-(1-o)*parseFloat(l),h=e.top-f-(1-s)*parseFloat(l.slice(l.indexOf(" ")+1)),y=o?e.width/o:e.width,g=s?e.height/s:e.height;return{width:y,height:g,top:h,right:d+y,bottom:h+g,left:d}}const y5={ignoreTransform:!1};function ga(e,n){n===void 0&&(n=y5);let l=e.getBoundingClientRect();if(n.ignoreTransform){const{transform:h,transformOrigin:y}=cn(e).getComputedStyle(e);h&&(l=g5(l,h,y))}const{top:i,left:o,width:s,height:c,bottom:f,right:d}=l;return{top:i,left:o,width:s,height:c,bottom:f,right:d}}function bb(e){return ga(e,{ignoreTransform:!0})}function x5(e){const n=e.innerWidth,l=e.innerHeight;return{top:0,left:0,right:n,bottom:l,width:n,height:l}}function v5(e,n){return n===void 0&&(n=cn(e).getComputedStyle(e)),n.position==="fixed"}function b5(e,n){n===void 0&&(n=cn(e).getComputedStyle(e));const l=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const s=n[o];return typeof s=="string"?l.test(s):!1})}function Kp(e,n){const l=[];function i(o){if(n!=null&&l.length>=n||!o)return l;if($p(o)&&o.scrollingElement!=null&&!l.includes(o.scrollingElement))return l.push(o.scrollingElement),l;if(!Fo(o)||$w(o)||l.includes(o))return l;const s=cn(e).getComputedStyle(o);return o!==e&&b5(o,s)&&l.push(o),v5(o,s)?l:i(o.parentNode)}return e?i(e):l}function Zw(e){const[n]=Kp(e,1);return n??null}function fh(e){return!yc||!e?null:pa(e)?e:Yp(e)?$p(e)||e===ma(e).scrollingElement?window:Fo(e)?e:null:null}function Jw(e){return pa(e)?e.scrollX:e.scrollLeft}function Ww(e){return pa(e)?e.scrollY:e.scrollTop}function Qh(e){return{x:Jw(e),y:Ww(e)}}var Ot;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Ot||(Ot={}));function eS(e){return!yc||!e?!1:e===document.scrollingElement}function tS(e){const n={x:0,y:0},l=eS(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},i={x:e.scrollWidth-l.width,y:e.scrollHeight-l.height},o=e.scrollTop<=n.y,s=e.scrollLeft<=n.x,c=e.scrollTop>=i.y,f=e.scrollLeft>=i.x;return{isTop:o,isLeft:s,isBottom:c,isRight:f,maxScroll:i,minScroll:n}}const w5={x:.2,y:.2};function S5(e,n,l,i,o){let{top:s,left:c,right:f,bottom:d}=l;i===void 0&&(i=10),o===void 0&&(o=w5);const{isTop:h,isBottom:y,isLeft:g,isRight:v}=tS(e),b={x:0,y:0},k={x:0,y:0},C={height:n.height*o.y,width:n.width*o.x};return!h&&s<=n.top+C.height?(b.y=Ot.Backward,k.y=i*Math.abs((n.top+C.height-s)/C.height)):!y&&d>=n.bottom-C.height&&(b.y=Ot.Forward,k.y=i*Math.abs((n.bottom-C.height-d)/C.height)),!v&&f>=n.right-C.width?(b.x=Ot.Forward,k.x=i*Math.abs((n.right-C.width-f)/C.width)):!g&&c<=n.left+C.width&&(b.x=Ot.Backward,k.x=i*Math.abs((n.left+C.width-c)/C.width)),{direction:b,speed:k}}function C5(e){if(e===document.scrollingElement){const{innerWidth:s,innerHeight:c}=window;return{top:0,left:0,right:s,bottom:c,width:s,height:c}}const{top:n,left:l,right:i,bottom:o}=e.getBoundingClientRect();return{top:n,left:l,right:i,bottom:o,width:e.clientWidth,height:e.clientHeight}}function nS(e){return e.reduce((n,l)=>ra(n,Qh(l)),tr)}function k5(e){return e.reduce((n,l)=>n+Jw(l),0)}function E5(e){return e.reduce((n,l)=>n+Ww(l),0)}function N5(e,n){if(n===void 0&&(n=ga),!e)return;const{top:l,left:i,bottom:o,right:s}=n(e);Zw(e)&&(o<=0||s<=0||l>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const A5=[["x",["left","right"],k5],["y",["top","bottom"],E5]];class Zp{constructor(n,l){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const i=Kp(l),o=nS(i);this.rect={...n},this.width=n.width,this.height=n.height;for(const[s,c,f]of A5)for(const d of c)Object.defineProperty(this,d,{get:()=>{const h=f(i),y=o[s]-h;return this.rect[d]+y},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class wo{constructor(n){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(l=>{var i;return(i=this.target)==null?void 0:i.removeEventListener(...l)})},this.target=n}add(n,l,i){var o;(o=this.target)==null||o.addEventListener(n,l,i),this.listeners.push([n,l,i])}}function T5(e){const{EventTarget:n}=cn(e);return e instanceof n?e:ma(e)}function dh(e,n){const l=Math.abs(e.x),i=Math.abs(e.y);return typeof n=="number"?Math.sqrt(l**2+i**2)>n:"x"in n&&"y"in n?l>n.x&&i>n.y:"x"in n?l>n.x:"y"in n?i>n.y:!1}var Pn;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Pn||(Pn={}));function wb(e){e.preventDefault()}function R5(e){e.stopPropagation()}var Ge;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(Ge||(Ge={}));const rS={start:[Ge.Space,Ge.Enter],cancel:[Ge.Esc],end:[Ge.Space,Ge.Enter,Ge.Tab]},j5=(e,n)=>{let{currentCoordinates:l}=n;switch(e.code){case Ge.Right:return{...l,x:l.x+25};case Ge.Left:return{...l,x:l.x-25};case Ge.Down:return{...l,y:l.y+25};case Ge.Up:return{...l,y:l.y-25}}};class Jp{constructor(n){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=n;const{event:{target:l}}=n;this.props=n,this.listeners=new wo(ma(l)),this.windowListeners=new wo(cn(l)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Pn.Resize,this.handleCancel),this.windowListeners.add(Pn.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Pn.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:n,onStart:l}=this.props,i=n.node.current;i&&N5(i),l(tr)}handleKeyDown(n){if(Qp(n)){const{active:l,context:i,options:o}=this.props,{keyboardCodes:s=rS,coordinateGetter:c=j5,scrollBehavior:f="smooth"}=o,{code:d}=n;if(s.end.includes(d)){this.handleEnd(n);return}if(s.cancel.includes(d)){this.handleCancel(n);return}const{collisionRect:h}=i.current,y=h?{x:h.left,y:h.top}:tr;this.referenceCoordinates||(this.referenceCoordinates=y);const g=c(n,{active:l,context:i.current,currentCoordinates:y});if(g){const v=Gu(g,y),b={x:0,y:0},{scrollableAncestors:k}=i.current;for(const C of k){const E=n.code,{isTop:N,isRight:M,isLeft:j,isBottom:D,maxScroll:I,minScroll:O}=tS(C),P=C5(C),q={x:Math.min(E===Ge.Right?P.right-P.width/2:P.right,Math.max(E===Ge.Right?P.left:P.left+P.width/2,g.x)),y:Math.min(E===Ge.Down?P.bottom-P.height/2:P.bottom,Math.max(E===Ge.Down?P.top:P.top+P.height/2,g.y))},re=E===Ge.Right&&!M||E===Ge.Left&&!j,H=E===Ge.Down&&!D||E===Ge.Up&&!N;if(re&&q.x!==g.x){const J=C.scrollLeft+v.x,ne=E===Ge.Right&&J<=I.x||E===Ge.Left&&J>=O.x;if(ne&&!v.y){C.scrollTo({left:J,behavior:f});return}ne?b.x=C.scrollLeft-J:b.x=E===Ge.Right?C.scrollLeft-I.x:C.scrollLeft-O.x,b.x&&C.scrollBy({left:-b.x,behavior:f});break}else if(H&&q.y!==g.y){const J=C.scrollTop+v.y,ne=E===Ge.Down&&J<=I.y||E===Ge.Up&&J>=O.y;if(ne&&!v.x){C.scrollTo({top:J,behavior:f});return}ne?b.y=C.scrollTop-J:b.y=E===Ge.Down?C.scrollTop-I.y:C.scrollTop-O.y,b.y&&C.scrollBy({top:-b.y,behavior:f});break}}this.handleMove(n,ra(Gu(g,this.referenceCoordinates),b))}}}handleMove(n,l){const{onMove:i}=this.props;n.preventDefault(),i(l)}handleEnd(n){const{onEnd:l}=this.props;n.preventDefault(),this.detach(),l()}handleCancel(n){const{onCancel:l}=this.props;n.preventDefault(),this.detach(),l()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Jp.activators=[{eventName:"onKeyDown",handler:(e,n,l)=>{let{keyboardCodes:i=rS,onActivation:o}=n,{active:s}=l;const{code:c}=e.nativeEvent;if(i.start.includes(c)){const f=s.activatorNode.current;return f&&e.target!==f?!1:(e.preventDefault(),o==null||o({event:e.nativeEvent}),!0)}return!1}}];function Sb(e){return!!(e&&"distance"in e)}function Cb(e){return!!(e&&"delay"in e)}class Wp{constructor(n,l,i){var o;i===void 0&&(i=T5(n.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=n,this.events=l;const{event:s}=n,{target:c}=s;this.props=n,this.events=l,this.document=ma(c),this.documentListeners=new wo(this.document),this.listeners=new wo(i),this.windowListeners=new wo(cn(c)),this.initialCoordinates=(o=Xh(s))!=null?o:tr,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:n,props:{options:{activationConstraint:l,bypassActivationConstraint:i}}}=this;if(this.listeners.add(n.move.name,this.handleMove,{passive:!1}),this.listeners.add(n.end.name,this.handleEnd),n.cancel&&this.listeners.add(n.cancel.name,this.handleCancel),this.windowListeners.add(Pn.Resize,this.handleCancel),this.windowListeners.add(Pn.DragStart,wb),this.windowListeners.add(Pn.VisibilityChange,this.handleCancel),this.windowListeners.add(Pn.ContextMenu,wb),this.documentListeners.add(Pn.Keydown,this.handleKeydown),l){if(i!=null&&i({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Cb(l)){this.timeoutId=setTimeout(this.handleStart,l.delay),this.handlePending(l);return}if(Sb(l)){this.handlePending(l);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(n,l){const{active:i,onPending:o}=this.props;o(i,n,this.initialCoordinates,l)}handleStart(){const{initialCoordinates:n}=this,{onStart:l}=this.props;n&&(this.activated=!0,this.documentListeners.add(Pn.Click,R5,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Pn.SelectionChange,this.removeTextSelection),l(n))}handleMove(n){var l;const{activated:i,initialCoordinates:o,props:s}=this,{onMove:c,options:{activationConstraint:f}}=s;if(!o)return;const d=(l=Xh(n))!=null?l:tr,h=Gu(o,d);if(!i&&f){if(Sb(f)){if(f.tolerance!=null&&dh(h,f.tolerance))return this.handleCancel();if(dh(h,f.distance))return this.handleStart()}if(Cb(f)&&dh(h,f.tolerance))return this.handleCancel();this.handlePending(f,h);return}n.cancelable&&n.preventDefault(),c(d)}handleEnd(){const{onAbort:n,onEnd:l}=this.props;this.detach(),this.activated||n(this.props.active),l()}handleCancel(){const{onAbort:n,onCancel:l}=this.props;this.detach(),this.activated||n(this.props.active),l()}handleKeydown(n){n.code===Ge.Esc&&this.handleCancel()}removeTextSelection(){var n;(n=this.document.getSelection())==null||n.removeAllRanges()}}const M5={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class em extends Wp{constructor(n){const{event:l}=n,i=ma(l.target);super(n,M5,i)}}em.activators=[{eventName:"onPointerDown",handler:(e,n)=>{let{nativeEvent:l}=e,{onActivation:i}=n;return!l.isPrimary||l.button!==0?!1:(i==null||i({event:l}),!0)}}];const O5={move:{name:"mousemove"},end:{name:"mouseup"}};var Kh;(function(e){e[e.RightClick=2]="RightClick"})(Kh||(Kh={}));class D5 extends Wp{constructor(n){super(n,O5,ma(n.event.target))}}D5.activators=[{eventName:"onMouseDown",handler:(e,n)=>{let{nativeEvent:l}=e,{onActivation:i}=n;return l.button===Kh.RightClick?!1:(i==null||i({event:l}),!0)}}];const hh={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class _5 extends Wp{constructor(n){super(n,hh)}static setup(){return window.addEventListener(hh.move.name,n,{capture:!1,passive:!1}),function(){window.removeEventListener(hh.move.name,n)};function n(){}}}_5.activators=[{eventName:"onTouchStart",handler:(e,n)=>{let{nativeEvent:l}=e,{onActivation:i}=n;const{touches:o}=l;return o.length>1?!1:(i==null||i({event:l}),!0)}}];var So;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(So||(So={}));var $u;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})($u||($u={}));function z5(e){let{acceleration:n,activator:l=So.Pointer,canScroll:i,draggingRect:o,enabled:s,interval:c=5,order:f=$u.TreeOrder,pointerCoordinates:d,scrollableAncestors:h,scrollableAncestorRects:y,delta:g,threshold:v}=e;const b=B5({delta:g,disabled:!s}),[k,C]=G3(),E=w.useRef({x:0,y:0}),N=w.useRef({x:0,y:0}),M=w.useMemo(()=>{switch(l){case So.Pointer:return d?{top:d.y,bottom:d.y,left:d.x,right:d.x}:null;case So.DraggableRect:return o}},[l,o,d]),j=w.useRef(null),D=w.useCallback(()=>{const O=j.current;if(!O)return;const P=E.current.x*N.current.x,q=E.current.y*N.current.y;O.scrollBy(P,q)},[]),I=w.useMemo(()=>f===$u.TreeOrder?[...h].reverse():h,[f,h]);w.useEffect(()=>{if(!s||!h.length||!M){C();return}for(const O of I){if((i==null?void 0:i(O))===!1)continue;const P=h.indexOf(O),q=y[P];if(!q)continue;const{direction:re,speed:H}=S5(O,q,M,n,v);for(const J of["x","y"])b[J][re[J]]||(H[J]=0,re[J]=0);if(H.x>0||H.y>0){C(),j.current=O,k(D,c),E.current=H,N.current=re;return}}E.current={x:0,y:0},N.current={x:0,y:0},C()},[n,D,i,C,s,c,JSON.stringify(M),JSON.stringify(b),k,h,I,y,JSON.stringify(v)])}const L5={x:{[Ot.Backward]:!1,[Ot.Forward]:!1},y:{[Ot.Backward]:!1,[Ot.Forward]:!1}};function B5(e){let{delta:n,disabled:l}=e;const i=$h(n);return Vo(o=>{if(l||!i||!o)return L5;const s={x:Math.sign(n.x-i.x),y:Math.sign(n.y-i.y)};return{x:{[Ot.Backward]:o.x[Ot.Backward]||s.x===-1,[Ot.Forward]:o.x[Ot.Forward]||s.x===1},y:{[Ot.Backward]:o.y[Ot.Backward]||s.y===-1,[Ot.Forward]:o.y[Ot.Forward]||s.y===1}}},[l,n,i])}function U5(e,n){const l=n!=null?e.get(n):void 0,i=l?l.node.current:null;return Vo(o=>{var s;return n==null?null:(s=i??o)!=null?s:null},[i,n])}function H5(e,n){return w.useMemo(()=>e.reduce((l,i)=>{const{sensor:o}=i,s=o.activators.map(c=>({eventName:c.eventName,handler:n(c.handler,i)}));return[...l,...s]},[]),[e,n])}var _o;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(_o||(_o={}));var Zh;(function(e){e.Optimized="optimized"})(Zh||(Zh={}));const kb=new Map;function P5(e,n){let{dragging:l,dependencies:i,config:o}=n;const[s,c]=w.useState(null),{frequency:f,measure:d,strategy:h}=o,y=w.useRef(e),g=E(),v=Oo(g),b=w.useCallback(function(N){N===void 0&&(N=[]),!v.current&&c(M=>M===null?N:M.concat(N.filter(j=>!M.includes(j))))},[v]),k=w.useRef(null),C=Vo(N=>{if(g&&!l)return kb;if(!N||N===kb||y.current!==e||s!=null){const M=new Map;for(let j of e){if(!j)continue;if(s&&s.length>0&&!s.includes(j.id)&&j.rect.current){M.set(j.id,j.rect.current);continue}const D=j.node.current,I=D?new Zp(d(D),D):null;j.rect.current=I,I&&M.set(j.id,I)}return M}return N},[e,s,l,g,d]);return w.useEffect(()=>{y.current=e},[e]),w.useEffect(()=>{g||b()},[l,g]),w.useEffect(()=>{s&&s.length>0&&c(null)},[JSON.stringify(s)]),w.useEffect(()=>{g||typeof f!="number"||k.current!==null||(k.current=setTimeout(()=>{b(),k.current=null},f))},[f,g,b,...i]),{droppableRects:C,measureDroppableContainers:b,measuringScheduled:s!=null};function E(){switch(h){case _o.Always:return!1;case _o.BeforeDragging:return l;default:return!l}}}function lS(e,n){return Vo(l=>e?l||(typeof n=="function"?n(e):e):null,[n,e])}function I5(e,n){return lS(e,n)}function q5(e){let{callback:n,disabled:l}=e;const i=Xp(n),o=w.useMemo(()=>{if(l||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:s}=window;return new s(i)},[i,l]);return w.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function xc(e){let{callback:n,disabled:l}=e;const i=Xp(n),o=w.useMemo(()=>{if(l||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:s}=window;return new s(i)},[l]);return w.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function F5(e){return new Zp(ga(e),e)}function Eb(e,n,l){n===void 0&&(n=F5);const[i,o]=w.useState(null);function s(){o(d=>{if(!e)return null;if(e.isConnected===!1){var h;return(h=d??l)!=null?h:null}const y=n(e);return JSON.stringify(d)===JSON.stringify(y)?d:y})}const c=q5({callback(d){if(e)for(const h of d){const{type:y,target:g}=h;if(y==="childList"&&g instanceof HTMLElement&&g.contains(e)){s();break}}}}),f=xc({callback:s});return gr(()=>{s(),e?(f==null||f.observe(e),c==null||c.observe(document.body,{childList:!0,subtree:!0})):(f==null||f.disconnect(),c==null||c.disconnect())},[e]),i}function V5(e){const n=lS(e);return Kw(e,n)}const Nb=[];function G5(e){const n=w.useRef(e),l=Vo(i=>e?i&&i!==Nb&&e&&n.current&&e.parentNode===n.current.parentNode?i:Kp(e):Nb,[e]);return w.useEffect(()=>{n.current=e},[e]),l}function Y5(e){const[n,l]=w.useState(null),i=w.useRef(e),o=w.useCallback(s=>{const c=fh(s.target);c&&l(f=>f?(f.set(c,Qh(c)),new Map(f)):null)},[]);return w.useEffect(()=>{const s=i.current;if(e!==s){c(s);const f=e.map(d=>{const h=fh(d);return h?(h.addEventListener("scroll",o,{passive:!0}),[h,Qh(h)]):null}).filter(d=>d!=null);l(f.length?new Map(f):null),i.current=e}return()=>{c(e),c(s)};function c(f){f.forEach(d=>{const h=fh(d);h==null||h.removeEventListener("scroll",o)})}},[o,e]),w.useMemo(()=>e.length?n?Array.from(n.values()).reduce((s,c)=>ra(s,c),tr):nS(e):tr,[e,n])}function Ab(e,n){n===void 0&&(n=[]);const l=w.useRef(null);return w.useEffect(()=>{l.current=null},n),w.useEffect(()=>{const i=e!==tr;i&&!l.current&&(l.current=e),!i&&l.current&&(l.current=null)},[e]),l.current?Gu(e,l.current):tr}function $5(e){w.useEffect(()=>{if(!yc)return;const n=e.map(l=>{let{sensor:i}=l;return i.setup==null?void 0:i.setup()});return()=>{for(const l of n)l==null||l()}},e.map(n=>{let{sensor:l}=n;return l}))}function X5(e,n){return w.useMemo(()=>e.reduce((l,i)=>{let{eventName:o,handler:s}=i;return l[o]=c=>{s(c,n)},l},{}),[e,n])}function iS(e){return w.useMemo(()=>e?x5(e):null,[e])}const Tb=[];function Q5(e,n){n===void 0&&(n=ga);const[l]=e,i=iS(l?cn(l):null),[o,s]=w.useState(Tb);function c(){s(()=>e.length?e.map(d=>eS(d)?i:new Zp(n(d),d)):Tb)}const f=xc({callback:c});return gr(()=>{f==null||f.disconnect(),c(),e.forEach(d=>f==null?void 0:f.observe(d))},[e]),o}function K5(e){if(!e)return null;if(e.children.length>1)return e;const n=e.children[0];return Fo(n)?n:e}function Z5(e){let{measure:n}=e;const[l,i]=w.useState(null),o=w.useCallback(h=>{for(const{target:y}of h)if(Fo(y)){i(g=>{const v=n(y);return g?{...g,width:v.width,height:v.height}:v});break}},[n]),s=xc({callback:o}),c=w.useCallback(h=>{const y=K5(h);s==null||s.disconnect(),y&&(s==null||s.observe(y)),i(y?n(y):null)},[n,s]),[f,d]=Vu(c);return w.useMemo(()=>({nodeRef:f,rect:l,setRef:d}),[l,f,d])}const J5=[{sensor:em,options:{}},{sensor:Jp,options:{}}],W5={current:{}},Mu={draggable:{measure:bb},droppable:{measure:bb,strategy:_o.WhileDragging,frequency:Zh.Optimized},dragOverlay:{measure:ga}};class Co extends Map{get(n){var l;return n!=null&&(l=super.get(n))!=null?l:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(n=>{let{disabled:l}=n;return!l})}getNodeFor(n){var l,i;return(l=(i=this.get(n))==null?void 0:i.node.current)!=null?l:void 0}}const eM={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Co,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Yu},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Mu,measureDroppableContainers:Yu,windowRect:null,measuringScheduled:!1},tM={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Yu,draggableNodes:new Map,over:null,measureDroppableContainers:Yu},vc=w.createContext(tM),aS=w.createContext(eM);function nM(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Co}}}function rM(e,n){switch(n.type){case Et.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:n.initialCoordinates,active:n.active}};case Et.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:n.coordinates.x-e.draggable.initialCoordinates.x,y:n.coordinates.y-e.draggable.initialCoordinates.y}}};case Et.DragEnd:case Et.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Et.RegisterDroppable:{const{element:l}=n,{id:i}=l,o=new Co(e.droppable.containers);return o.set(i,l),{...e,droppable:{...e.droppable,containers:o}}}case Et.SetDroppableDisabled:{const{id:l,key:i,disabled:o}=n,s=e.droppable.containers.get(l);if(!s||i!==s.key)return e;const c=new Co(e.droppable.containers);return c.set(l,{...s,disabled:o}),{...e,droppable:{...e.droppable,containers:c}}}case Et.UnregisterDroppable:{const{id:l,key:i}=n,o=e.droppable.containers.get(l);if(!o||i!==o.key)return e;const s=new Co(e.droppable.containers);return s.delete(l),{...e,droppable:{...e.droppable,containers:s}}}default:return e}}function lM(e){let{disabled:n}=e;const{active:l,activatorEvent:i,draggableNodes:o}=w.useContext(vc),s=$h(i),c=$h(l==null?void 0:l.id);return w.useEffect(()=>{if(!n&&!i&&s&&c!=null){if(!Qp(s)||document.activeElement===s.target)return;const f=o.get(c);if(!f)return;const{activatorNode:d,node:h}=f;if(!d.current&&!h.current)return;requestAnimationFrame(()=>{for(const y of[d.current,h.current]){if(!y)continue;const g=X3(y);if(g){g.focus();break}}})}},[i,n,o,c,s]),null}function iM(e,n){let{transform:l,...i}=n;return e!=null&&e.length?e.reduce((o,s)=>s({transform:o,...i}),l):l}function aM(e){return w.useMemo(()=>({draggable:{...Mu.draggable,...e==null?void 0:e.draggable},droppable:{...Mu.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Mu.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function oM(e){let{activeNode:n,measure:l,initialRect:i,config:o=!0}=e;const s=w.useRef(!1),{x:c,y:f}=typeof o=="boolean"?{x:o,y:o}:o;gr(()=>{if(!c&&!f||!n){s.current=!1;return}if(s.current||!i)return;const h=n==null?void 0:n.node.current;if(!h||h.isConnected===!1)return;const y=l(h),g=Kw(y,i);if(c||(g.x=0),f||(g.y=0),s.current=!0,Math.abs(g.x)>0||Math.abs(g.y)>0){const v=Zw(h);v&&v.scrollBy({top:g.y,left:g.x})}},[n,c,f,i,l])}const oS=w.createContext({...tr,scaleX:1,scaleY:1});var Cl;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Cl||(Cl={}));const sM=w.memo(function(n){var l,i,o,s;let{id:c,accessibility:f,autoScroll:d=!0,children:h,sensors:y=J5,collisionDetection:g=f5,measuring:v,modifiers:b,...k}=n;const C=w.useReducer(rM,void 0,nM),[E,N]=C,[M,j]=e5(),[D,I]=w.useState(Cl.Uninitialized),O=D===Cl.Initialized,{draggable:{active:P,nodes:q,translate:re},droppable:{containers:H}}=E,J=P!=null?q.get(P):null,ne=w.useRef({initial:null,translated:null}),W=w.useMemo(()=>{var ht;return P!=null?{id:P,data:(ht=J==null?void 0:J.data)!=null?ht:W5,rect:ne}:null},[P,J]),Z=w.useRef(null),[Q,B]=w.useState(null),[Y,le]=w.useState(null),de=Oo(k,Object.values(k)),R=Go("DndDescribedBy",c),z=w.useMemo(()=>H.getEnabled(),[H]),L=aM(v),{droppableRects:T,measureDroppableContainers:se,measuringScheduled:ce}=P5(z,{dragging:O,dependencies:[re.x,re.y],config:L.droppable}),ue=U5(q,P),we=w.useMemo(()=>Y?Xh(Y):null,[Y]),Ae=ci(),xe=I5(ue,L.draggable.measure);oM({activeNode:P!=null?q.get(P):null,config:Ae.layoutShiftCompensation,initialRect:xe,measure:L.draggable.measure});const Ne=Eb(ue,L.draggable.measure,xe),rt=Eb(ue?ue.parentElement:null),tt=w.useRef({activatorEvent:null,active:null,activeNode:ue,collisionRect:null,collisions:null,droppableRects:T,draggableNodes:q,draggingNode:null,draggingNodeRect:null,droppableContainers:H,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),at=H.getNodeFor((l=tt.current.over)==null?void 0:l.id),Ye=Z5({measure:L.dragOverlay.measure}),Dt=(i=Ye.nodeRef.current)!=null?i:ue,_t=O?(o=Ye.rect)!=null?o:Ne:null,Fn=!!(Ye.nodeRef.current&&Ye.rect),Vn=V5(Fn?null:Ne),zt=iS(Dt?cn(Dt):null),Lt=G5(O?at??ue:null),Nn=Q5(Lt),lr=iM(b,{transform:{x:re.x-Vn.x,y:re.y-Vn.y,scaleX:1,scaleY:1},activatorEvent:Y,active:W,activeNodeRect:Ne,containerNodeRect:rt,draggingNodeRect:_t,over:tt.current.over,overlayNodeRect:Ye.rect,scrollableAncestors:Lt,scrollableAncestorRects:Nn,windowRect:zt}),$r=we?ra(we,re):null,ft=Y5(Lt),Xr=Ab(ft),te=Ab(ft,[Ne]),$=ra(lr,Xr),oe=_t?p5(_t,lr):null,he=W&&oe?g({active:W,collisionRect:oe,droppableRects:T,droppableContainers:z,pointerCoordinates:$r}):null,be=s5(he,"id"),[Oe,dn]=w.useState(null),Bt=Fn?lr:ra(lr,te),dt=d5(Bt,(s=Oe==null?void 0:Oe.rect)!=null?s:null,Ne),Tt=w.useRef(null),$e=w.useCallback((ht,pt)=>{let{sensor:Rt,options:Jt}=pt;if(Z.current==null)return;const Wt=q.get(Z.current);if(!Wt)return;const Ft=ht.nativeEvent,en=new Rt({active:Z.current,activeNode:Wt,event:Ft,options:Jt,context:tt,onAbort(St){if(!q.get(St))return;const{onDragAbort:hn}=de.current,Tn={id:St};hn==null||hn(Tn),M({type:"onDragAbort",event:Tn})},onPending(St,Gn,hn,Tn){if(!q.get(St))return;const{onDragPending:wr}=de.current,Yn={id:St,constraint:Gn,initialCoordinates:hn,offset:Tn};wr==null||wr(Yn),M({type:"onDragPending",event:Yn})},onStart(St){const Gn=Z.current;if(Gn==null)return;const hn=q.get(Gn);if(!hn)return;const{onDragStart:Tn}=de.current,br={activatorEvent:Ft,active:{id:Gn,data:hn.data,rect:ne}};kl.unstable_batchedUpdates(()=>{Tn==null||Tn(br),I(Cl.Initializing),N({type:Et.DragStart,initialCoordinates:St,active:Gn}),M({type:"onDragStart",event:br}),B(Tt.current),le(Ft)})},onMove(St){N({type:Et.DragMove,coordinates:St})},onEnd:An(Et.DragEnd),onCancel:An(Et.DragCancel)});Tt.current=en;function An(St){return async function(){const{active:hn,collisions:Tn,over:br,scrollAdjustedTranslate:wr}=tt.current;let Yn=null;if(hn&&wr){const{cancelDrop:Qr}=de.current;Yn={activatorEvent:Ft,active:hn,collisions:Tn,delta:wr,over:br},St===Et.DragEnd&&typeof Qr=="function"&&await Promise.resolve(Qr(Yn))&&(St=Et.DragCancel)}Z.current=null,kl.unstable_batchedUpdates(()=>{N({type:St}),I(Cl.Uninitialized),dn(null),B(null),le(null),Tt.current=null;const Qr=St===Et.DragEnd?"onDragEnd":"onDragCancel";if(Yn){const Rn=de.current[Qr];Rn==null||Rn(Yn),M({type:Qr,event:Yn})}})}}},[q]),ir=w.useCallback((ht,pt)=>(Rt,Jt)=>{const Wt=Rt.nativeEvent,Ft=q.get(Jt);if(Z.current!==null||!Ft||Wt.dndKit||Wt.defaultPrevented)return;const en={active:Ft};ht(Rt,pt.options,en)===!0&&(Wt.dndKit={capturedBy:pt.sensor},Z.current=Jt,$e(Rt,pt))},[q,$e]),Zt=H5(y,ir);$5(y),gr(()=>{Ne&&D===Cl.Initializing&&I(Cl.Initialized)},[Ne,D]),w.useEffect(()=>{const{onDragMove:ht}=de.current,{active:pt,activatorEvent:Rt,collisions:Jt,over:Wt}=tt.current;if(!pt||!Rt)return;const Ft={active:pt,activatorEvent:Rt,collisions:Jt,delta:{x:$.x,y:$.y},over:Wt};kl.unstable_batchedUpdates(()=>{ht==null||ht(Ft),M({type:"onDragMove",event:Ft})})},[$.x,$.y]),w.useEffect(()=>{const{active:ht,activatorEvent:pt,collisions:Rt,droppableContainers:Jt,scrollAdjustedTranslate:Wt}=tt.current;if(!ht||Z.current==null||!pt||!Wt)return;const{onDragOver:Ft}=de.current,en=Jt.get(be),An=en&&en.rect.current?{id:en.id,rect:en.rect.current,data:en.data,disabled:en.disabled}:null,St={active:ht,activatorEvent:pt,collisions:Rt,delta:{x:Wt.x,y:Wt.y},over:An};kl.unstable_batchedUpdates(()=>{dn(An),Ft==null||Ft(St),M({type:"onDragOver",event:St})})},[be]),gr(()=>{tt.current={activatorEvent:Y,active:W,activeNode:ue,collisionRect:oe,collisions:he,droppableRects:T,draggableNodes:q,draggingNode:Dt,draggingNodeRect:_t,droppableContainers:H,over:Oe,scrollableAncestors:Lt,scrollAdjustedTranslate:$},ne.current={initial:_t,translated:oe}},[W,ue,he,oe,q,Dt,_t,T,H,Oe,Lt,$]),z5({...Ae,delta:re,draggingRect:oe,pointerCoordinates:$r,scrollableAncestors:Lt,scrollableAncestorRects:Nn});const Mc=w.useMemo(()=>({active:W,activeNode:ue,activeNodeRect:Ne,activatorEvent:Y,collisions:he,containerNodeRect:rt,dragOverlay:Ye,draggableNodes:q,droppableContainers:H,droppableRects:T,over:Oe,measureDroppableContainers:se,scrollableAncestors:Lt,scrollableAncestorRects:Nn,measuringConfiguration:L,measuringScheduled:ce,windowRect:zt}),[W,ue,Ne,Y,he,rt,Ye,q,H,T,Oe,se,Lt,Nn,L,ce,zt]),ui=w.useMemo(()=>({activatorEvent:Y,activators:Zt,active:W,activeNodeRect:Ne,ariaDescribedById:{draggable:R},dispatch:N,draggableNodes:q,over:Oe,measureDroppableContainers:se}),[Y,Zt,W,Ne,N,R,q,Oe,se]);return Nt.createElement(Qw.Provider,{value:j},Nt.createElement(vc.Provider,{value:ui},Nt.createElement(aS.Provider,{value:Mc},Nt.createElement(oS.Provider,{value:dt},h)),Nt.createElement(lM,{disabled:(f==null?void 0:f.restoreFocus)===!1})),Nt.createElement(r5,{...f,hiddenTextDescribedById:R}));function ci(){const ht=(Q==null?void 0:Q.autoScrollEnabled)===!1,pt=typeof d=="object"?d.enabled===!1:d===!1,Rt=O&&!ht&&!pt;return typeof d=="object"?{...d,enabled:Rt}:{enabled:Rt}}}),uM=w.createContext(null),Rb="button",cM="Draggable";function fM(e){let{id:n,data:l,disabled:i=!1,attributes:o}=e;const s=Go(cM),{activators:c,activatorEvent:f,active:d,activeNodeRect:h,ariaDescribedById:y,draggableNodes:g,over:v}=w.useContext(vc),{role:b=Rb,roleDescription:k="draggable",tabIndex:C=0}=o??{},E=(d==null?void 0:d.id)===n,N=w.useContext(E?oS:uM),[M,j]=Vu(),[D,I]=Vu(),O=X5(c,n),P=Oo(l);gr(()=>(g.set(n,{id:n,key:s,node:M,activatorNode:D,data:P}),()=>{const re=g.get(n);re&&re.key===s&&g.delete(n)}),[g,n]);const q=w.useMemo(()=>({role:b,tabIndex:C,"aria-disabled":i,"aria-pressed":E&&b===Rb?!0:void 0,"aria-roledescription":k,"aria-describedby":y.draggable}),[i,b,C,E,k,y.draggable]);return{active:d,activatorEvent:f,activeNodeRect:h,attributes:q,isDragging:E,listeners:i?void 0:O,node:M,over:v,setNodeRef:j,setActivatorNodeRef:I,transform:N}}function dM(){return w.useContext(aS)}const hM="Droppable",pM={timeout:25};function mM(e){let{data:n,disabled:l=!1,id:i,resizeObserverConfig:o}=e;const s=Go(hM),{active:c,dispatch:f,over:d,measureDroppableContainers:h}=w.useContext(vc),y=w.useRef({disabled:l}),g=w.useRef(!1),v=w.useRef(null),b=w.useRef(null),{disabled:k,updateMeasurementsFor:C,timeout:E}={...pM,...o},N=Oo(C??i),M=w.useCallback(()=>{if(!g.current){g.current=!0;return}b.current!=null&&clearTimeout(b.current),b.current=setTimeout(()=>{h(Array.isArray(N.current)?N.current:[N.current]),b.current=null},E)},[E]),j=xc({callback:M,disabled:k||!c}),D=w.useCallback((q,re)=>{j&&(re&&(j.unobserve(re),g.current=!1),q&&j.observe(q))},[j]),[I,O]=Vu(D),P=Oo(n);return w.useEffect(()=>{!j||!I.current||(j.disconnect(),g.current=!1,j.observe(I.current))},[I,j]),w.useEffect(()=>(f({type:Et.RegisterDroppable,element:{id:i,key:s,disabled:l,node:I,rect:v,data:P}}),()=>f({type:Et.UnregisterDroppable,key:s,id:i})),[i]),w.useEffect(()=>{l!==y.current.disabled&&(f({type:Et.SetDroppableDisabled,id:i,key:s,disabled:l}),y.current.disabled=l)},[i,s,l,f]),{active:c,rect:v,isOver:(d==null?void 0:d.id)===i,node:I,over:d,setNodeRef:O}}function tm(e,n,l){const i=e.slice();return i.splice(l<0?i.length+l:l,0,i.splice(n,1)[0]),i}function gM(e,n){return e.reduce((l,i,o)=>{const s=n.get(i);return s&&(l[o]=s),l},Array(e.length))}function xu(e){return e!==null&&e>=0}function yM(e,n){if(e===n)return!0;if(e.length!==n.length)return!1;for(let l=0;l<e.length;l++)if(e[l]!==n[l])return!1;return!0}function xM(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const sS=e=>{let{rects:n,activeIndex:l,overIndex:i,index:o}=e;const s=tm(n,i,l),c=n[o],f=s[o];return!f||!c?null:{x:f.left-c.left,y:f.top-c.top,scaleX:f.width/c.width,scaleY:f.height/c.height}},vu={scaleX:1,scaleY:1},vM=e=>{var n;let{activeIndex:l,activeNodeRect:i,index:o,rects:s,overIndex:c}=e;const f=(n=s[l])!=null?n:i;if(!f)return null;if(o===l){const h=s[c];return h?{x:0,y:l<c?h.top+h.height-(f.top+f.height):h.top-f.top,...vu}:null}const d=bM(s,o,l);return o>l&&o<=c?{x:0,y:-f.height-d,...vu}:o<l&&o>=c?{x:0,y:f.height+d,...vu}:{x:0,y:0,...vu}};function bM(e,n,l){const i=e[n],o=e[n-1],s=e[n+1];return i?l<n?o?i.top-(o.top+o.height):s?s.top-(i.top+i.height):0:s?s.top-(i.top+i.height):o?i.top-(o.top+o.height):0:0}const uS="Sortable",cS=Nt.createContext({activeIndex:-1,containerId:uS,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:sS,disabled:{draggable:!1,droppable:!1}});function wM(e){let{children:n,id:l,items:i,strategy:o=sS,disabled:s=!1}=e;const{active:c,dragOverlay:f,droppableRects:d,over:h,measureDroppableContainers:y}=dM(),g=Go(uS,l),v=f.rect!==null,b=w.useMemo(()=>i.map(O=>typeof O=="object"&&"id"in O?O.id:O),[i]),k=c!=null,C=c?b.indexOf(c.id):-1,E=h?b.indexOf(h.id):-1,N=w.useRef(b),M=!yM(b,N.current),j=E!==-1&&C===-1||M,D=xM(s);gr(()=>{M&&k&&y(b)},[M,b,k,y]),w.useEffect(()=>{N.current=b},[b]);const I=w.useMemo(()=>({activeIndex:C,containerId:g,disabled:D,disableTransforms:j,items:b,overIndex:E,useDragOverlay:v,sortedRects:gM(b,d),strategy:o}),[C,g,D.draggable,D.droppable,j,b,E,d,v,o]);return Nt.createElement(cS.Provider,{value:I},n)}const SM=e=>{let{id:n,items:l,activeIndex:i,overIndex:o}=e;return tm(l,i,o).indexOf(n)},CM=e=>{let{containerId:n,isSorting:l,wasDragging:i,index:o,items:s,newIndex:c,previousItems:f,previousContainerId:d,transition:h}=e;return!h||!i||f!==s&&o===c?!1:l?!0:c!==o&&n===d},kM={duration:200,easing:"ease"},fS="transform",EM=Do.Transition.toString({property:fS,duration:0,easing:"linear"}),NM={roleDescription:"sortable"};function AM(e){let{disabled:n,index:l,node:i,rect:o}=e;const[s,c]=w.useState(null),f=w.useRef(l);return gr(()=>{if(!n&&l!==f.current&&i.current){const d=o.current;if(d){const h=ga(i.current,{ignoreTransform:!0}),y={x:d.left-h.left,y:d.top-h.top,scaleX:d.width/h.width,scaleY:d.height/h.height};(y.x||y.y)&&c(y)}}l!==f.current&&(f.current=l)},[n,l,i,o]),w.useEffect(()=>{s&&c(null)},[s]),s}function TM(e){let{animateLayoutChanges:n=CM,attributes:l,disabled:i,data:o,getNewIndex:s=SM,id:c,strategy:f,resizeObserverConfig:d,transition:h=kM}=e;const{items:y,containerId:g,activeIndex:v,disabled:b,disableTransforms:k,sortedRects:C,overIndex:E,useDragOverlay:N,strategy:M}=w.useContext(cS),j=RM(i,b),D=y.indexOf(c),I=w.useMemo(()=>({sortable:{containerId:g,index:D,items:y},...o}),[g,o,D,y]),O=w.useMemo(()=>y.slice(y.indexOf(c)),[y,c]),{rect:P,node:q,isOver:re,setNodeRef:H}=mM({id:c,data:I,disabled:j.droppable,resizeObserverConfig:{updateMeasurementsFor:O,...d}}),{active:J,activatorEvent:ne,activeNodeRect:W,attributes:Z,setNodeRef:Q,listeners:B,isDragging:Y,over:le,setActivatorNodeRef:de,transform:R}=fM({id:c,data:I,attributes:{...NM,...l},disabled:j.draggable}),z=V3(H,Q),L=!!J,T=L&&!k&&xu(v)&&xu(E),se=!N&&Y,ce=se&&T?R:null,we=T?ce??(f??M)({rects:C,activeNodeRect:W,activeIndex:v,overIndex:E,index:D}):null,Ae=xu(v)&&xu(E)?s({id:c,items:y,activeIndex:v,overIndex:E}):D,xe=J==null?void 0:J.id,Ne=w.useRef({activeId:xe,items:y,newIndex:Ae,containerId:g}),rt=y!==Ne.current.items,tt=n({active:J,containerId:g,isDragging:Y,isSorting:L,id:c,index:D,items:y,newIndex:Ne.current.newIndex,previousItems:Ne.current.items,previousContainerId:Ne.current.containerId,transition:h,wasDragging:Ne.current.activeId!=null}),at=AM({disabled:!tt,index:D,node:q,rect:P});return w.useEffect(()=>{L&&Ne.current.newIndex!==Ae&&(Ne.current.newIndex=Ae),g!==Ne.current.containerId&&(Ne.current.containerId=g),y!==Ne.current.items&&(Ne.current.items=y)},[L,Ae,g,y]),w.useEffect(()=>{if(xe===Ne.current.activeId)return;if(xe!=null&&Ne.current.activeId==null){Ne.current.activeId=xe;return}const Dt=setTimeout(()=>{Ne.current.activeId=xe},50);return()=>clearTimeout(Dt)},[xe]),{active:J,activeIndex:v,attributes:Z,data:I,rect:P,index:D,newIndex:Ae,items:y,isOver:re,isSorting:L,isDragging:Y,listeners:B,node:q,overIndex:E,over:le,setNodeRef:z,setActivatorNodeRef:de,setDroppableNodeRef:H,setDraggableNodeRef:Q,transform:at??we,transition:Ye()};function Ye(){if(at||rt&&Ne.current.newIndex===D)return EM;if(!(se&&!Qp(ne)||!h)&&(L||tt))return Do.Transition.toString({...h,property:fS})}}function RM(e,n){var l,i;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(l=e==null?void 0:e.draggable)!=null?l:n.draggable,droppable:(i=e==null?void 0:e.droppable)!=null?i:n.droppable}}Ge.Down,Ge.Right,Ge.Up,Ge.Left;function Jh(e){return e.split(/[\s_-]+/).filter(Boolean).map(n=>n.charAt(0).toUpperCase()+n.slice(1).toLowerCase()).join(" ")}function dS(e){return e.split("/").pop()||e}var bc="Popover",[hS]=rc(bc,[hc]),Yo=hc(),[jM,Ol]=hS(bc),pS=e=>{const{__scopePopover:n,children:l,open:i,defaultOpen:o,onOpenChange:s,modal:c=!1}=e,f=Yo(n),d=w.useRef(null),[h,y]=w.useState(!1),[g,v]=Cp({prop:i,defaultProp:o??!1,onChange:s,caller:bc});return x.jsx(Dw,{...f,children:x.jsx(jM,{scope:n,contentId:vo(),triggerRef:d,open:g,onOpenChange:v,onOpenToggle:w.useCallback(()=>v(b=>!b),[v]),hasCustomAnchor:h,onCustomAnchorAdd:w.useCallback(()=>y(!0),[]),onCustomAnchorRemove:w.useCallback(()=>y(!1),[]),modal:c,children:l})})};pS.displayName=bc;var mS="PopoverAnchor",MM=w.forwardRef((e,n)=>{const{__scopePopover:l,...i}=e,o=Ol(mS,l),s=Yo(l),{onCustomAnchorAdd:c,onCustomAnchorRemove:f}=o;return w.useEffect(()=>(c(),()=>f()),[c,f]),x.jsx(Fp,{...s,...i,ref:n})});MM.displayName=mS;var gS="PopoverTrigger",yS=w.forwardRef((e,n)=>{const{__scopePopover:l,...i}=e,o=Ol(gS,l),s=Yo(l),c=En(n,o.triggerRef),f=x.jsx(Yt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":SS(o.open),...i,ref:c,onClick:At(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?f:x.jsx(Fp,{asChild:!0,...s,children:f})});yS.displayName=gS;var nm="PopoverPortal",[OM,DM]=hS(nm,{forceMount:void 0}),xS=e=>{const{__scopePopover:n,forceMount:l,children:i,container:o}=e,s=Ol(nm,n);return x.jsx(OM,{scope:n,forceMount:l,children:x.jsx(Ml,{present:l||s.open,children:x.jsx(ic,{asChild:!0,container:o,children:i})})})};xS.displayName=nm;var sa="PopoverContent",vS=w.forwardRef((e,n)=>{const l=DM(sa,e.__scopePopover),{forceMount:i=l.forceMount,...o}=e,s=Ol(sa,e.__scopePopover);return x.jsx(Ml,{present:i||s.open,children:s.modal?x.jsx(zM,{...o,ref:n}):x.jsx(LM,{...o,ref:n})})});vS.displayName=sa;var _M=kp("PopoverContent.RemoveScroll"),zM=w.forwardRef((e,n)=>{const l=Ol(sa,e.__scopePopover),i=w.useRef(null),o=En(n,i),s=w.useRef(!1);return w.useEffect(()=>{const c=i.current;if(c)return _1(c)},[]),x.jsx(Np,{as:_M,allowPinchZoom:!0,children:x.jsx(bS,{...e,ref:o,trapFocus:l.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:At(e.onCloseAutoFocus,c=>{var f;c.preventDefault(),s.current||(f=l.triggerRef.current)==null||f.focus()}),onPointerDownOutside:At(e.onPointerDownOutside,c=>{const f=c.detail.originalEvent,d=f.button===0&&f.ctrlKey===!0,h=f.button===2||d;s.current=h},{checkForDefaultPrevented:!1}),onFocusOutside:At(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),LM=w.forwardRef((e,n)=>{const l=Ol(sa,e.__scopePopover),i=w.useRef(!1),o=w.useRef(!1);return x.jsx(bS,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var c,f;(c=e.onCloseAutoFocus)==null||c.call(e,s),s.defaultPrevented||(i.current||(f=l.triggerRef.current)==null||f.focus(),s.preventDefault()),i.current=!1,o.current=!1},onInteractOutside:s=>{var d,h;(d=e.onInteractOutside)==null||d.call(e,s),s.defaultPrevented||(i.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=s.target;((h=l.triggerRef.current)==null?void 0:h.contains(c))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),bS=w.forwardRef((e,n)=>{const{__scopePopover:l,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEscapeKeyDown:f,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:y,...g}=e,v=Ol(sa,l),b=Yo(l);return E1(),x.jsx(Ep,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:o,onUnmountAutoFocus:s,children:x.jsx(lc,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:y,onEscapeKeyDown:f,onPointerDownOutside:d,onFocusOutside:h,onDismiss:()=>v.onOpenChange(!1),children:x.jsx(_w,{"data-state":SS(v.open),role:"dialog",id:v.contentId,...b,...g,ref:n,style:{...g.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),wS="PopoverClose",BM=w.forwardRef((e,n)=>{const{__scopePopover:l,...i}=e,o=Ol(wS,l);return x.jsx(Yt.button,{type:"button",...i,ref:n,onClick:At(e.onClick,()=>o.onOpenChange(!1))})});BM.displayName=wS;var UM="PopoverArrow",HM=w.forwardRef((e,n)=>{const{__scopePopover:l,...i}=e,o=Yo(l);return x.jsx(zw,{...o,...i,ref:n})});HM.displayName=UM;function SS(e){return e?"open":"closed"}var PM=pS,IM=yS,qM=xS,CS=vS;const kS=PM,ES=IM,rm=w.forwardRef(({className:e,align:n="center",sideOffset:l=4,...i},o)=>x.jsx(qM,{children:x.jsx(CS,{ref:o,align:n,sideOffset:l,className:ye("z-50 w-72 rounded-xl border border-border bg-background p-4 shadow-lg outline-hidden animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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",e),...i})}));rm.displayName=CS.displayName;function FM({onRemove:e}){const[n,l]=w.useState(!1);return x.jsxs(kS,{open:n,onOpenChange:l,children:[x.jsx(ES,{asChild:!0,children:x.jsx(Fe,{variant:"ghost",size:"icon",className:"h-5.5 w-5.5 absolute right-6 !rounded opacity-100 md:opacity-0 md:group-hover/section:opacity-100",onClick:i=>i.stopPropagation(),children:x.jsx(ij,{className:"h-4 w-4 text-slate-500 dark:text-slate-400"})})}),x.jsx(rm,{align:"end",className:"p-1 w-auto min-w-[170px]",children:x.jsxs("button",{onClick:i=>{i.stopPropagation(),l(!1),e()},className:"w-full flex items-center gap-2.5 px-3 py-2 rounded-lg text-left transition-colors text-destructive dark:text-red-400 hover:bg-destructive/10 dark:hover:bg-red-500/20",children:[x.jsx(qj,{className:"h-4 w-4"}),x.jsx("span",{className:"text-xs font-medium",children:"Remove"})]})})]})}function VM({group:e,collapsedSections:n,expandedGroups:l,onToggleSection:i,onToggleExpandedGroup:o,renderChatRow:s,chatsPerProject:c,onNewLocalChat:f,onRemoveProject:d,isConnected:h,startingLocalPath:y}){const{groupKey:g,localPath:v,chats:b}=e,k=l.has(g),C=k?b:b.slice(0,c),E=b.length>c,{attributes:N,listeners:M,setNodeRef:j,setActivatorNodeRef:D,transform:I,transition:O,isDragging:P}=TM({id:g}),q={transform:Do.Translate.toString(I),transition:O};return x.jsxs("div",{ref:j,style:q,className:ye("group/section",P&&"opacity-50 shadow-lg z-50 relative"),...N,children:[x.jsxs("div",{ref:D,className:ye("sticky top-0 bg-background dark:bg-card z-10 relative pl-2.5 pr-3 py-2 pt-3 flex items-center justify-between","cursor-grab active:cursor-grabbing",P&&"cursor-grabbing"),onClick:()=>i(g),...M,children:[x.jsxs("div",{className:"flex items-center gap-2",children:[n.has(g)?x.jsx(ew,{className:"translate-y-[1px] size-3.5 shrink-0 text-slate-400 dark:text-slate-500"}):x.jsx(W1,{className:"translate-y-[1px] size-3.5 shrink-0 text-slate-400 dark:text-slate-500"}),x.jsxs(qu,{children:[x.jsx(Fu,{asChild:!0,children:x.jsx("span",{className:"truncate max-w-[150px] whitespace-nowrap text-sm text-slate-500 dark:text-slate-400",children:dS(v)})}),x.jsx(Mo,{side:"right",sideOffset:4,children:v})]}),x.jsx(Nl,{className:ye("size-3.5 translate-y-[1px] text-slate-400 transition-all duration-200 cursor-pointer",n.has(g)?"opacity-100":"rotate-90 opacity-0 group-hover/section:opacity-100")})]}),d?x.jsx(FM,{onRemove:()=>d(g)}):null,f&&x.jsxs(qu,{children:[x.jsx(Fu,{asChild:!0,children:x.jsx(Fe,{variant:"ghost",size:"icon",className:ye("h-5.5 w-5.5 absolute right-0 !rounded opacity-100 md:opacity-0 md:group-hover/section:opacity-100",(!h||y===v)&&"opacity-50 cursor-not-allowed"),disabled:!h||y===v,onClick:re=>{re.stopPropagation(),f(v)},children:y===v?x.jsx(oi,{className:"size-4 text-slate-500 dark:text-slate-400 animate-spin"}):x.jsx(Mp,{className:"size-3.5 text-slate-500 dark:text-slate-400"})})}),x.jsx(Mo,{side:"right",sideOffset:4,children:h?"New chat":`Start ${Qt} to connect`})]})]}),!n.has(g)&&x.jsxs("div",{className:"space-y-[2px] mb-2 ",children:[C.map(s),E&&x.jsx("button",{onClick:()=>o(g),className:"pl-3 py-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:k?"Show less":`Show more (${b.length-c})`})]})]})}function GM({projectGroups:e,collapsedSections:n,expandedGroups:l,onToggleSection:i,onToggleExpandedGroup:o,renderChatRow:s,chatsPerProject:c,onNewLocalChat:f,onRemoveProject:d,onReorderGroups:h,isConnected:y,startingLocalPath:g}){const v=l5(xb(em,{activationConstraint:{distance:8}}),xb(Jp)),b=w.useMemo(()=>e.map(N=>N.groupKey),[e]),k=w.useRef(null);function C(N){const M=N.active.id;n.has(M)?k.current=null:(k.current=M,i(M))}function E(N){const{active:M,over:j}=N;if(j&&M.id!==j.id&&h){const D=b.indexOf(M.id),I=b.indexOf(j.id);if(D!==-1&&I!==-1){const O=tm(b,D,I);h(O)}}if(k.current){const D=k.current;k.current=null,requestAnimationFrame(()=>i(D))}}return x.jsx(sM,{sensors:v,collisionDetection:u5,onDragStart:C,onDragEnd:E,children:x.jsx(wM,{items:b,strategy:vM,children:e.map(N=>x.jsx(VM,{group:N,collapsedSections:n,expandedGroups:l,onToggleSection:i,onToggleExpandedGroup:o,renderChatRow:s,chatsPerProject:c,onNewLocalChat:f,onRemoveProject:d,isConnected:y,startingLocalPath:g},N.groupKey))})})}const jb=e=>{let n;const l=new Set,i=(h,y)=>{const g=typeof h=="function"?h(n):h;if(!Object.is(g,n)){const v=n;n=y??(typeof g!="object"||g===null)?g:Object.assign({},n,g),l.forEach(b=>b(n,v))}},o=()=>n,f={setState:i,getState:o,getInitialState:()=>d,subscribe:h=>(l.add(h),()=>l.delete(h))},d=n=e(i,o,f);return f},YM=(e=>e?jb(e):jb),$M=e=>e;function XM(e,n=$M){const l=Nt.useSyncExternalStore(e.subscribe,Nt.useCallback(()=>n(e.getState()),[e,n]),Nt.useCallback(()=>n(e.getInitialState()),[e,n]));return Nt.useDebugValue(l),l}const QM=e=>{const n=YM(e),l=i=>XM(n,i);return Object.assign(l,n),l},lm=(e=>QM);function KM(e,n){let l;try{l=e()}catch{return}return{getItem:o=>{var s;const c=d=>d===null?null:JSON.parse(d,void 0),f=(s=l.getItem(o))!=null?s:null;return f instanceof Promise?f.then(c):c(f)},setItem:(o,s)=>l.setItem(o,JSON.stringify(s,void 0)),removeItem:o=>l.removeItem(o)}}const Wh=e=>n=>{try{const l=e(n);return l instanceof Promise?l:{then(i){return Wh(i)(l)},catch(i){return this}}}catch(l){return{then(i){return this},catch(i){return Wh(i)(l)}}}},ZM=(e,n)=>(l,i,o)=>{let s={storage:KM(()=>window.localStorage),partialize:E=>E,version:0,merge:(E,N)=>({...N,...E}),...n},c=!1,f=0;const d=new Set,h=new Set;let y=s.storage;if(!y)return e((...E)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),l(...E)},i,o);const g=()=>{const E=s.partialize({...i()});return y.setItem(s.name,{state:E,version:s.version})},v=o.setState;o.setState=(E,N)=>(v(E,N),g());const b=e((...E)=>(l(...E),g()),i,o);o.getInitialState=()=>b;let k;const C=()=>{var E,N;if(!y)return;const M=++f;c=!1,d.forEach(D=>{var I;return D((I=i())!=null?I:b)});const j=((N=s.onRehydrateStorage)==null?void 0:N.call(s,(E=i())!=null?E:b))||void 0;return Wh(y.getItem.bind(y))(s.name).then(D=>{if(D)if(typeof D.version=="number"&&D.version!==s.version){if(s.migrate){const I=s.migrate(D.state,D.version);return I instanceof Promise?I.then(O=>[!0,O]):[!0,I]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,D.state];return[!1,void 0]}).then(D=>{var I;if(M!==f)return;const[O,P]=D;if(k=s.merge(P,(I=i())!=null?I:b),l(k,!0),O)return g()}).then(()=>{M===f&&(j==null||j(k,void 0),k=i(),c=!0,h.forEach(D=>D(k)))}).catch(D=>{M===f&&(j==null||j(void 0,D))})};return o.persist={setOptions:E=>{s={...s,...E},E.storage&&(y=E.storage)},clearStorage:()=>{y==null||y.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>C(),hasHydrated:()=>c,onHydrate:E=>(d.add(E),()=>{d.delete(E)}),onFinishHydration:E=>(h.add(E),()=>{h.delete(E)})},s.skipHydration||C(),k||b},im=ZM,Mb=lm()(im(e=>({order:[],setOrder:n=>e({order:n})}),{name:"project-group-order"}));function JM({data:e,activeChatId:n,connectionStatus:l,ready:i,open:o,collapsed:s,showMobileOpenButton:c,onOpen:f,onClose:d,onCollapse:h,onExpand:y,onCreateChat:g,onCreateProject:v,onDeleteChat:b,onRemoveProject:k}){const C=yr(),E=gp(),N=w.useRef(null),[M,j]=w.useState(new Set),[D,I]=w.useState(new Set),[O,P]=w.useState(!1),q=10,re=Mb(T=>T.order),H=Mb(T=>T.setOrder),J=w.useMemo(()=>{if(re.length===0)return e.projectGroups;const T=new Map(e.projectGroups.map(ue=>[ue.groupKey,ue])),se=re.filter(ue=>T.has(ue)).map(ue=>T.get(ue)),ce=new Set(re);for(const ue of e.projectGroups)ce.has(ue.groupKey)||se.push(ue);return se},[e.projectGroups,re]),ne=w.useCallback(T=>H(T),[H]),W=w.useMemo(()=>new Map(e.projectGroups.map(T=>[T.localPath,T.groupKey])),[e.projectGroups]),Z=w.useMemo(()=>e.projectGroups.reduce((T,se)=>T+se.chats.length,0),[e.projectGroups]),Q=w.useCallback(T=>{j(se=>{const ce=new Set(se);return ce.has(T)?ce.delete(T):ce.add(T),ce})},[]),B=w.useCallback(T=>{I(se=>{const ce=new Set(se);return ce.has(T)?ce.delete(T):ce.add(T),ce})},[]),Y=w.useCallback(T=>x.jsx(F3,{chat:T,activeChatId:n,onSelectChat:se=>E(`/chat/${se}`),onDeleteChat:()=>b(T)},T._id),[n,E,b]);w.useEffect(()=>{!n||!N.current||requestAnimationFrame(()=>{const T=N.current,se=T==null?void 0:T.querySelector(`[data-chat-id="${n}"]`);if(!se||!T)return;const ce=se.getBoundingClientRect(),ue=T.getBoundingClientRect();if(ce.top<ue.top+38){const we=ce.top-ue.top+T.scrollTop;T.scrollTo({top:we-38,behavior:"smooth"})}else if(ce.bottom>ue.bottom){const we=ce.top+ce.height/2-ue.top+T.scrollTop,Ae=T.clientHeight/2;T.scrollTo({top:we-Ae,behavior:"smooth"})}})},[n,Z]);const le=Z>0,de=C.pathname==="/projects",R=l==="connecting"||!i,z=R?"Connecting":l==="connected"?"Connected":"Disconnected",L=l==="connected"?"bg-emerald-500":"bg-amber-500";return x.jsxs(x.Fragment,{children:[!o&&c&&x.jsx(Fe,{variant:"ghost",size:"icon",className:"fixed top-3 left-3 z-50 md:hidden",onClick:f,children:x.jsx(tw,{className:"h-5 w-5"})}),s&&de&&x.jsx("div",{className:"hidden md:flex fixed left-0 top-0 h-full z-40 items-start pt-4 pl-5 border-l border-border/0",children:x.jsxs("div",{className:"flex items-center gap-1",children:[x.jsx(bo,{className:"size-6 text-logo"}),x.jsx(Fe,{variant:"ghost",size:"icon",onClick:y,title:"Expand sidebar",children:x.jsx(Ih,{className:"h-5 w-5"})})]})}),x.jsxs("div",{"data-sidebar":"open",className:ye("fixed inset-0 z-50 bg-background dark:bg-card flex flex-col h-[100dvh] select-none","md:relative md:inset-auto md:w-[275px] md:mr-2 md:h-[calc(100dvh-16px)] md:my-2 md:ml-2 md:border md:border-border md:rounded-2xl",o?"flex":"hidden md:flex",s&&"md:hidden"),children:[x.jsxs("div",{className:" pl-3 pr-[7px] h-[64px] max-h-[64px] md:h-[55px] md:max-h-[55px] border-b flex items-center justify-between",children:[x.jsxs("div",{className:"group/sidebar-header flex items-center gap-2",children:[x.jsxs("button",{type:"button",onClick:h,title:"Collapse sidebar",className:"hidden md:flex relative items-center justify-center h-5 w-5 sm:h-6 sm:w-6",children:[x.jsx(bo,{className:"absolute inset-0.5 h-4 w-4 sm:h-5 sm:w-5 text-logo transition-all duration-200 ease-out opacity-100 scale-100 group-hover/sidebar-header:opacity-0 group-hover/sidebar-header:scale-0"}),x.jsx(Ih,{className:"absolute inset-0 h-4 w-4 sm:h-6 sm:w-6 text-slate-500 dark:text-slate-400 transition-all duration-200 ease-out opacity-0 scale-0 group-hover/sidebar-header:opacity-100 group-hover/sidebar-header:scale-80 hover:opacity-50"})]}),x.jsx(bo,{className:"h-5 w-5 sm:h-6 sm:w-6 text-logo md:hidden"}),x.jsx("span",{className:"font-logo text-base uppercase sm:text-md text-slate-600 dark:text-slate-100",children:Qt})]}),x.jsxs("div",{className:"flex items-center",children:[x.jsx(Fe,{variant:"ghost",size:"icon",onClick:()=>P(!0),title:"New project",children:x.jsx(iw,{className:"size-4"})}),x.jsx(Fe,{variant:"ghost",size:"icon",className:"md:hidden",onClick:d,children:x.jsx(Po,{className:"h-5 w-5"})})]})]}),x.jsx("div",{ref:N,className:"flex-1 min-h-0 overflow-y-auto scrollbar-hide",style:{WebkitOverflowScrolling:"touch"},children:x.jsxs("div",{className:"pb-2 px-2 pt-1.5",children:[!le&&R?x.jsx("div",{className:"space-y-5 px-1 pt-3",children:[0,1,2].map(T=>x.jsxs("div",{className:"space-y-2 animate-pulse",children:[x.jsx("div",{className:"h-4 w-28 rounded bg-muted"}),x.jsx("div",{className:"space-y-1",children:[0,1,2].map(se=>x.jsxs("div",{className:"flex items-center gap-2 rounded-md px-3 py-2",children:[x.jsx("div",{className:"h-3.5 w-3.5 rounded-full bg-muted"}),x.jsx("div",{className:ye("h-3.5 rounded bg-muted",se===0?"w-32":se===1?"w-40":"w-28")})]},se))})]},T))}):null,!le&&!R&&e.projectGroups.length===0?x.jsx("p",{className:"text-sm text-slate-400 p-2 mt-6 text-center",children:"No conversations yet"}):null,x.jsx(GM,{projectGroups:J,onReorderGroups:ne,collapsedSections:M,expandedGroups:D,onToggleSection:Q,onToggleExpandedGroup:B,renderChatRow:Y,chatsPerProject:q,onNewLocalChat:T=>{const se=W.get(T);se&&g(se)},onRemoveProject:k,isConnected:l==="connected"})]})}),x.jsx("div",{className:"border-t border-border p-2",children:x.jsx("button",{type:"button",onClick:()=>{E("/projects"),d()},className:ye("w-full rounded-xl rounded-t-md border px-3 py-2 text-left transition-colors",de?"bg-muted border-border":"border-border/0 hover:bg-muted hover:border-border active:bg-muted/80"),children:x.jsxs("div",{className:"flex items- justify-between gap-2",children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(jp,{className:"h-4 w-4 text-muted-foreground"}),x.jsx("span",{className:"text-sm",children:"Projects"})]}),x.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[x.jsx("span",{children:z}),R?x.jsx(oi,{className:"h-2 w-2 animate-spin"}):x.jsx("span",{className:ye("h-2 w-2 rounded-full",L)})]})]})})})]}),x.jsx(Yw,{open:O,onOpenChange:P,onConfirm:v}),o?x.jsx("div",{className:"fixed inset-0 bg-black/40 z-40 md:hidden",onClick:d}):null]})}const am=[{id:"low",label:"Low"},{id:"medium",label:"Medium"},{id:"high",label:"High"},{id:"max",label:"Max"}],NS=[{id:"minimal",label:"Minimal"},{id:"low",label:"Low"},{id:"medium",label:"Medium"},{id:"high",label:"High"},{id:"xhigh",label:"XHigh"}],AS={reasoningEffort:"high"},ep={reasoningEffort:"high",fastMode:!1};function Ob(e){return am.some(n=>n.id===e)}function Db(e){return NS.some(n=>n.id===e)}const WM=[{id:"claude",label:"Claude",defaultModel:"opus",defaultEffort:"high",supportsPlanMode:!0,models:[{id:"opus",label:"Opus",supportsEffort:!0},{id:"sonnet",label:"Sonnet",supportsEffort:!0},{id:"haiku",label:"Haiku",supportsEffort:!0}],efforts:[...am]},{id:"codex",label:"Codex",defaultModel:"gpt-5.4",supportsPlanMode:!0,models:[{id:"gpt-5.4",label:"GPT-5.4",supportsEffort:!1},{id:"gpt-5.3-codex",label:"GPT-5.3 Codex",supportsEffort:!1},{id:"gpt-5.3-codex-spark",label:"GPT-5.3 Codex Spark",supportsEffort:!1}],efforts:[]}],TS=w.forwardRef(({className:e,...n},l)=>x.jsx("textarea",{"data-gramm":"false","data-gramm_editor":"false","data-enable-grammarly":"false","data-1p-ignore":!0,autoComplete:"off",className:ye("flex w-full rounded-lg border border-border bg-background px-2.5 py-2 text-sm placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),ref:l,...n}));TS.displayName="Textarea";function eO(){const[e,n]=w.useState(()=>{if(typeof window>"u")return!1;const l=navigator.standalone===!0,i=window.matchMedia("(display-mode: standalone)").matches;return l||i});return w.useEffect(()=>{const l=window.matchMedia("(display-mode: standalone)"),i=o=>{n(o.matches||navigator.standalone===!0)};return l.addEventListener("change",i),()=>l.removeEventListener("change",i)},[]),e}const tO=lm()(im((e,n)=>({drafts:{},setDraft:(l,i)=>e(o=>{if(!i){const{[l]:s,...c}=o.drafts;return{drafts:c}}return{drafts:{...o.drafts,[l]:i}}}),clearDraft:l=>e(i=>{const{[l]:o,...s}=i.drafts;return{drafts:s}}),getDraft:l=>n().drafts[l]??""}),{name:"chat-input-drafts"}));function nO(e){return e==="gpt-5-codex"?"gpt-5.3-codex":e??"gpt-5.4"}function rO(e){var l;const n=(l=e==null?void 0:e.modelOptions)==null?void 0:l.reasoningEffort;return{model:(e==null?void 0:e.model)??"opus",modelOptions:{reasoningEffort:Ob(n)?n:Ob(e==null?void 0:e.effort)?e.effort:AS.reasoningEffort}}}function lO(e){var l,i;const n=(l=e==null?void 0:e.modelOptions)==null?void 0:l.reasoningEffort;return{model:nO(e==null?void 0:e.model),modelOptions:{reasoningEffort:Db(n)?n:Db(e==null?void 0:e.effort)?e.effort:ep.reasoningEffort,fastMode:typeof((i=e==null?void 0:e.modelOptions)==null?void 0:i.fastMode)=="boolean"?e.modelOptions.fastMode:ep.fastMode}}}const RS=lm()(im(e=>({provider:"claude",planMode:!1,preferences:{claude:{model:"opus",modelOptions:{...AS}},codex:{model:"gpt-5.4",modelOptions:{...ep}}},setProvider:n=>e({provider:n}),setModel:(n,l)=>e(i=>({preferences:{...i.preferences,[n]:{...i.preferences[n],model:l,modelOptions:n==="claude"&&l!=="opus"&&i.preferences.claude.modelOptions.reasoningEffort==="max"?{reasoningEffort:"high"}:i.preferences[n].modelOptions}}})),setModelOptions:(n,l)=>e(i=>({preferences:{...i.preferences,[n]:{...i.preferences[n],modelOptions:{...i.preferences[n].modelOptions,...l}}}})),setPlanMode:n=>e({planMode:n})}),{name:"chat-preferences",version:2,migrate:e=>{var l,i;const n=e;return{provider:(n==null?void 0:n.provider)??"claude",planMode:(n==null?void 0:n.planMode)??!1,preferences:{claude:rO((l=n==null?void 0:n.preferences)==null?void 0:l.claude),codex:lO((i=n==null?void 0:n.preferences)==null?void 0:i.codex)}}}}));function ei({onClick:e,selected:n,icon:l,label:i,description:o,disabled:s}){return x.jsxs("button",{onClick:e,disabled:s,className:ye("w-full flex items-center gap-2 p-2 border border-border/0 rounded-lg text-left transition-opacity",n?"bg-muted border-border":"hover:opacity-60",s&&"opacity-40 cursor-not-allowed"),children:[l,x.jsxs("div",{children:[x.jsx("div",{className:"text-sm font-medium",children:i}),x.jsx("div",{className:"text-xs text-muted-foreground",children:o})]})]})}function ho({trigger:e,triggerClassName:n,disabled:l=!1,children:i}){return l?x.jsx("button",{disabled:!0,className:ye("flex items-center gap-1.5 px-2 py-1 text-sm rounded-md text-muted-foreground [&>svg]:shrink-0 opacity-70 cursor-default",n),children:e}):x.jsxs(kS,{children:[x.jsx(ES,{asChild:!0,children:x.jsx("button",{className:ye("flex items-center gap-1.5 px-2 py-1 text-sm rounded-md transition-colors text-muted-foreground [&>svg]:shrink-0","hover:bg-muted/50",n),children:e})}),x.jsx(rm,{align:"center",className:"w-64 p-1",children:x.jsx("div",{className:"space-y-1",children:i})})]})}function iO({className:e,...n}){return x.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:ye("shrink-0",e),...n,children:x.jsx("path",{d:"M17.3041 3.541h-3.6718l6.696 16.918H24Zm-10.6082 0L0 20.459h3.7442l1.3693-3.5527h7.0052l1.3693 3.5528h3.7442L10.5363 3.5409Zm-.3712 10.2232 2.2914-5.9456 2.2914 5.9456Z"})})}function aO({className:e,...n}){return x.jsx("svg",{viewBox:"0 0 158.7128 157.296",fill:"currentColor","aria-hidden":"true",className:ye("shrink-0",e),...n,children:x.jsx("path",{d:"M60.8734 57.2556V42.3124c0-1.2586.4722-2.2029 1.5728-2.8314l30.0443-17.3023c4.0899-2.3593 8.9662-3.4599 13.9988-3.4599 18.8759 0 30.8307 14.6289 30.8307 30.2006 0 1.1007 0 2.3593-.158 3.6178l-31.1446-18.2467c-1.8872-1.1006-3.7754-1.1006-5.6629 0L60.8734 57.2556Zm70.1542 58.2005V79.7487c0-2.2028-.9446-3.7756-2.8318-4.8763l-39.481-22.9651 12.8982-7.3934c1.1007-.6285 2.0453-.6285 3.1458 0l30.0441 17.3024c8.6523 5.0341 14.4708 15.7296 14.4708 26.1107 0 11.9539-7.0769 22.965-18.2461 27.527ZM51.593 83.9964l-12.8982-7.5497c-1.1007-.6285-1.5728-1.5728-1.5728-2.8314V39.0105c0-16.8303 12.8982-29.5722 30.3585-29.5722 6.607 0 12.7403 2.2029 17.9324 6.1349l-30.987 17.9324c-1.8871 1.1007-2.8314 2.6735-2.8314 4.8764v45.6159ZM79.3562 100.0403 60.8733 89.6592V67.6383l18.4829-10.3811 18.4812 10.3811v22.0209l-18.4812 10.3811Zm11.8757 47.8188c-6.607 0-12.7403-2.2031-17.9324-6.1344l30.9866-17.9333c1.8872-1.1005 2.8318-2.6728 2.8318-4.8759v-45.616l13.0564 7.5498c1.1005.6285 1.5723 1.5728 1.5723 2.8314v34.6051c0 16.8297-13.0564 29.5723-30.5147 29.5723ZM53.9522 112.7822 23.9079 95.4798c-8.652-5.0343-14.471-15.7296-14.471-26.1107 0-12.1119 7.2356-22.9652 18.403-27.5272v35.8634c0 2.2028.9443 3.7756 2.8314 4.8763l39.3248 22.8068-12.8982 7.3938c-1.1007.6287-2.045.6287-3.1456 0ZM52.2229 138.5791c-17.7745 0-30.8306-13.3713-30.8306-29.8871 0-1.2585.1578-2.5169.3143-3.7754l30.987 17.9323c1.8871 1.1005 3.7757 1.1005 5.6628 0l39.4811-22.807v14.9435c0 1.2585-.4721 2.2021-1.5728 2.8308l-30.0443 17.3025c-4.0898 2.359-8.9662 3.4605-13.9989 3.4605h.0014ZM91.2319 157.296c19.0327 0 34.9188-13.5272 38.5383-31.4594 17.6164-4.562 28.9425-21.0779 28.9425-37.908 0-11.0112-4.719-21.7066-13.2133-29.4143.7867-3.3035 1.2595-6.607 1.2595-9.909 0-22.4929-18.2471-39.3247-39.3251-39.3247-4.2461 0-8.3363.6285-12.4262 2.045-7.0792-6.9213-16.8318-11.3254-27.5271-11.3254-19.0331 0-34.9191 13.5268-38.5384 31.4591C11.3255 36.0212 0 52.5373 0 69.3675c0 11.0112 4.7184 21.7065 13.2125 29.4142-.7865 3.3035-1.2586 6.6067-1.2586 9.9092 0 22.4923 18.2466 39.3241 39.3248 39.3241 4.2462 0 8.3362-.6277 12.426-2.0441 7.0776 6.921 16.8302 11.3251 27.5271 11.3251Z"})})}const _b={claude:iO,codex:aO},zb={opus:tb,sonnet:To,haiku:Bu,"gpt-5.4":tb,"gpt-5.3-codex":To,"gpt-5.3-codex-spark":Bu},oO=w.memo(function({onSubmit:n,onCancel:l,disabled:i,canCancel:o,chatId:s,activeProvider:c,availableProviders:f}){var R,z;const{getDraft:d,setDraft:h,clearDraft:y}=tO(),{provider:g,preferences:v,planMode:b,setProvider:k,setModel:C,setModelOptions:E,setPlanMode:N}=RS(),[M,j]=w.useState(()=>s?d(s):""),D=w.useRef(null),I=eO(),O=c??g,P=f.find(L=>L.id===O)??f[0],q=v[O],re=c!==null,H=(P==null?void 0:P.supportsPlanMode)??!1,J=O==="claude"?v.claude.modelOptions.reasoningEffort:v.codex.modelOptions.reasoningEffort,ne=v.codex.modelOptions.fastMode,W=O==="claude"?am:NS,Z=w.useCallback(()=>{const L=D.current;L&&(L.style.height="auto",L.style.height=`${L.scrollHeight}px`)},[]);w.useEffect(()=>{Z()},[M,Z]),w.useEffect(()=>(window.addEventListener("resize",Z),()=>window.removeEventListener("resize",Z)),[Z]),w.useEffect(()=>{var L;(L=D.current)==null||L.focus()},[s]);function Q(L){if(O==="claude"){E("claude",{reasoningEffort:L});return}E("codex",{reasoningEffort:L})}async function B(){if(!M.trim())return;const L=M;j(""),s&&y(s),D.current&&(D.current.style.height="auto");try{await n(L,{provider:O,model:q.model,modelOptions:O==="claude"?{claude:{...v.claude.modelOptions}}:{codex:{...v.codex.modelOptions}},planMode:H?b:!1})}catch(T){console.error("[ChatInput] Submit failed:",T),j(L),s&&h(s,L)}}function Y(L){if(L.key==="Tab"&&L.shiftKey&&H){L.preventDefault(),N(!b);return}if(L.key==="Escape"&&o){L.preventDefault(),l==null||l();return}const T="ontouchstart"in window||navigator.maxTouchPoints>0;L.key==="Enter"&&!L.shiftKey&&!o&&!T&&(L.preventDefault(),B())}const le=_b[O],de=zb[q.model]??To;return x.jsxs("div",{className:ye("p-3 pt-0 md:pb-2",I&&"px-5 pb-5"),children:[x.jsxs("div",{className:"flex items-end gap-2 max-w-[840px] mx-auto border dark:bg-card/40 backdrop-blur-lg border-border rounded-[29px] pr-1.5",children:[x.jsx(TS,{ref:D,placeholder:"Ask something...",value:M,autoFocus:!0,rows:1,onChange:L=>{j(L.target.value),s&&h(s,L.target.value),Z()},onKeyDown:Y,disabled:i,className:"flex-1 text-base p-3 md:p-4 pl-4.5 md:pl-6 resize-none max-h-[200px] outline-none bg-transparent border-0 shadow-none"}),x.jsx(Fe,{type:"button",onPointerDown:L=>{L.preventDefault(),o?l==null||l():!i&&M.trim()&&B()},disabled:!o&&(i||!M.trim()),size:"icon",className:"flex-shrink-0 bg-slate-600 text-white dark:bg-white dark:text-slate-900 rounded-full cursor-pointer h-10 w-10 md:h-11 md:w-11 mb-1 -mr-0.5 md:mr-0 md:mb-1.5 touch-manipulation disabled:bg-white/60 disabled:text-slate-700",children:o?x.jsx("div",{className:"w-3 h-3 md:w-4 md:h-4 rounded-xs bg-current"}):x.jsx(_R,{className:"h-5 w-5 md:h-6 md:w-6"})})]}),x.jsxs("div",{className:"flex justify-center items-center gap-0.5 max-w-[840px] mx-auto mt-2 animate-fade-in",children:[x.jsx(ho,{disabled:re,trigger:x.jsxs(x.Fragment,{children:[x.jsx(le,{className:"h-3.5 w-3.5"}),x.jsx("span",{children:(P==null?void 0:P.label)??O})]}),children:f.map(L=>{const T=_b[L.id];return x.jsx(ei,{onClick:()=>k(L.id),selected:O===L.id,icon:x.jsx(T,{className:"h-4 w-4 text-muted-foreground"}),label:L.label,description:L.supportsPlanMode?"Plan mode available":"Fast local JSONL exec flow"},L.id)})}),x.jsx(ho,{trigger:x.jsxs(x.Fragment,{children:[x.jsx(de,{className:"h-3.5 w-3.5"}),x.jsx("span",{children:((R=P.models.find(L=>L.id===q.model))==null?void 0:R.label)??q.model})]}),children:P.models.map(L=>{const T=zb[L.id]??To;return x.jsx(ei,{onClick:()=>C(O,L.id),selected:q.model===L.id,icon:x.jsx(T,{className:"h-4 w-4 text-muted-foreground"}),label:L.label,description:O==="claude"?"Claude model":"Codex model"},L.id)})}),x.jsx(ho,{trigger:x.jsxs(x.Fragment,{children:[x.jsx(ih,{className:"h-3.5 w-3.5"}),x.jsx("span",{children:((z=W.find(L=>L.id===J))==null?void 0:z.label)??J})]}),children:W.map(L=>x.jsx(ei,{onClick:()=>Q(L.id),selected:J===L.id,icon:x.jsx(ih,{className:"h-4 w-4 text-muted-foreground"}),label:L.label,description:O==="claude"?L.id==="max"?"Maximum effort, deepest reasoning":`${L.label} reasoning effort`:`${L.label} reasoning effort`,disabled:O==="claude"&&L.id==="max"&&q.model!=="opus"},L.id))}),O==="codex"?x.jsxs(ho,{trigger:x.jsxs(x.Fragment,{children:[x.jsx(Bu,{className:"h-3.5 w-3.5"}),x.jsx("span",{children:ne?"Fast Mode":"Standard"})]}),triggerClassName:ne?"text-emerald-500 dark:text-emerald-400":void 0,children:[x.jsx(ei,{onClick:()=>E("codex",{fastMode:!1}),selected:!ne,icon:x.jsx(ih,{className:"h-4 w-4 text-muted-foreground"}),label:"Standard",description:"Use the default Codex service tier"}),x.jsx(ei,{onClick:()=>E("codex",{fastMode:!0}),selected:ne,icon:x.jsx(Bu,{className:"h-4 w-4 text-muted-foreground"}),label:"Fast Mode",description:"Map to Codex serviceTier fast"})]}):null,H?x.jsxs(ho,{trigger:x.jsxs(x.Fragment,{children:[b?x.jsx(Lu,{className:"h-3.5 w-3.5"}):x.jsx(rb,{className:"h-3.5 w-3.5"}),x.jsx("span",{children:b?"Plan Mode":"Full Access"})]}),triggerClassName:b?"text-blue-400 dark:text-blue-300":void 0,children:[x.jsx(ei,{onClick:()=>N(!1),selected:!b,icon:x.jsx(rb,{className:"h-4 w-4 text-muted-foreground"}),label:"Full Access",description:"Execute immediately without plan approval"}),x.jsx(ei,{onClick:()=>N(!0),selected:b,icon:x.jsx(Lu,{className:"h-4 w-4 text-muted-foreground"}),label:"Plan Mode",description:"Review a plan before execution"})]}):null]})]})}),jS=w.forwardRef(({className:e,...n},l)=>x.jsx("div",{ref:l,className:ye("bg-card text-card-foreground",e),...n}));jS.displayName="Card";const MS=w.forwardRef(({className:e,...n},l)=>x.jsx("div",{ref:l,className:ye("flex flex-col space-y-1.5 p-2",e),...n}));MS.displayName="CardHeader";const sO=w.forwardRef(({className:e,...n},l)=>x.jsx("h3",{ref:l,className:ye("text-2xl font-semibold leading-none tracking-tight",e),...n}));sO.displayName="CardTitle";const uO=w.forwardRef(({className:e,...n},l)=>x.jsx("p",{ref:l,className:ye("text-sm text-muted-foreground",e),...n}));uO.displayName="CardDescription";const OS=w.forwardRef(({className:e,...n},l)=>x.jsx("div",{ref:l,className:ye("p-6 pt-0",e),...n}));OS.displayName="CardContent";const cO=w.forwardRef(({className:e,...n},l)=>x.jsx("div",{ref:l,className:ye("flex items-center p-6 pt-0",e),...n}));cO.displayName="CardFooter";function fO({sidebarCollapsed:e,onOpenSidebar:n,onExpandSidebar:l,onNewChat:i,localPath:o,onOpenExternal:s}){return x.jsx(MS,{className:ye("absolute top-0 md:top-2 left-0 right-0 z-10 px-2.5 pr-4 border-border/0 md:pb-0 flex items-center justify-center","backdrop-blur-lg md:backdrop-blur-none bg-gradient-to-b from-background md:from-transparent border-b border-x-0 md:border-x border-border md:border-none"),children:x.jsxs("div",{className:"relative flex items-center gap-2 w-full",children:[x.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0 border-l border-border/0",children:[x.jsx(Fe,{variant:"ghost",size:"icon",className:"md:hidden",onClick:n,children:x.jsx(tw,{className:"h-5 w-5"})}),e&&x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"flex items-center justify-center w-[40px] h-[40px]",children:x.jsx(bo,{className:"h-4 w-4 sm:h-5 sm:w-5 text-logo ml-1 hidden md:block"})}),x.jsx(Fe,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:l,title:"Expand sidebar",children:x.jsx(Ih,{className:"h-5 w-5"})})]}),x.jsx(Fe,{variant:"ghost",size:"icon",onClick:i,title:"Compose",children:x.jsx(Mp,{className:"h-5 w-5"})})]}),x.jsx("div",{className:"flex-1 min-w-0"}),x.jsx("div",{className:"flex items-center gap-1 flex-shrink-0",children:o&&s&&x.jsxs(x.Fragment,{children:[x.jsx(Fe,{variant:"ghost",size:"icon",onClick:()=>s("open_finder"),title:"Open in Finder",className:"border border-border/0",children:x.jsx(W1,{className:"h-4.5 w-4.5"})}),x.jsx(Fe,{variant:"ghost",size:"icon",onClick:()=>s("open_terminal"),title:"Open in Terminal",className:"border border-border/0",children:x.jsx(Op,{className:"h-4.5 w-4.5"})}),x.jsx(Fe,{variant:"ghost",size:"icon",onClick:()=>s("open_editor"),title:"Open in Cursor",className:"border border-border/0",children:x.jsx(ej,{className:"h-4.5 w-4.5"})})]})})]})})}const tp={Task:Lu,TaskOutput:Lu,Bash:Op,Glob:ah,Grep:ah,ExitPlanMode:lb,Read:fj,Edit:oj,Write:uj,NotebookEdit:lw,WebFetch:TR,TodoWrite:IR,WebSearch:ah,KillShell:Bj,AskUserQuestion:nw,Skill:To,EnterPlanMode:lb},DS=Pj;function _S(e){return tp[e]?tp[e]:DS}function Dl({children:e,className:n}){return x.jsx("div",{className:ye("flex gap-3 justify-start items-center",n),children:e})}function dO({children:e,className:n}){return x.jsx("div",{className:ye("flex items-center gap-1.5 text-xs",n),children:e})}function Rl({children:e,className:n}){return x.jsx("span",{className:ye("font-medium text-foreground/80",n),children:e})}function hO({children:e}){return x.jsx("span",{className:"text-muted-foreground",children:e})}function wc({children:e,expandedContent:n,defaultExpanded:l=!1}){const[i,o]=w.useState(l);return x.jsxs("div",{className:"flex flex-col w-full",children:[x.jsxs("button",{onClick:()=>o(!i),className:`group/expandable-row cursor-pointer grid grid-cols-[auto_1fr] items-center gap-1 text-sm ${i?"":"hover:opacity-60 transition-opacity"}`,children:[x.jsx("div",{className:"grid grid-cols-[auto_1fr] items-center gap-1.5",children:e}),x.jsx(Nl,{className:`h-4.5 w-4.5 text-muted-icon translate-y-[0.5px] transition-all duration-200 opacity-0 group-hover/expandable-row:opacity-100 ${i?"rotate-90 opacity-100":""}`})]}),i&&n]})}function Lb({label:e,children:n,copyText:l}){const[i,o]=w.useState(!1),s=l??Xu(n),c=w.useCallback(async()=>{await navigator.clipboard.writeText(s),o(!0),setTimeout(()=>o(!1),2e3)},[s]);return x.jsxs("div",{children:[x.jsx("span",{className:"font-medium text-muted-foreground",children:e}),x.jsxs("div",{className:"relative group/codeblock",children:[x.jsx("pre",{className:"my-1 text-xs font-mono whitespace-no-wrap break-all bg-muted border border-border rounded-lg p-2 max-h-64 overflow-auto w-full",children:n}),x.jsx(Fe,{variant:"ghost",size:"icon",className:ye("absolute top-2.5 right-1.5 z-10 h-8 w-8 rounded-md text-muted-foreground opacity-0 group-hover/codeblock:opacity-100 transition-opacity",!i&&"hover:text-foreground",i&&"hover:!bg-transparent hover:!border-transparent"),onClick:c,children:i?x.jsx(ri,{className:"h-4 w-4 text-green-400"}):x.jsx(sc,{className:"h-4 w-4"})})]})]})}function zS({children:e,icon:n,className:l}){return x.jsxs("span",{className:ye("inline-flex items-center gap-1 px-2 py-1 bg-muted border border-border rounded-full",l),children:[n&&x.jsx(n,{className:"h-3 w-3 text-muted-foreground"}),e]})}function Sc({children:e,className:n}){return x.jsxs("div",{className:ye("grid grid-cols-[auto_1fr] gap-2 min-w-0",n),children:[x.jsx("div",{className:" min-w-5 flex flex-col relative items-center justify-center",children:x.jsx("div",{className:"min-h-full w-[1px] bg-muted-foreground/20"})}),x.jsx("div",{className:"-ml-[1px] min-w-0 overflow-hidden",children:e})]})}function Xu(e){if(typeof e=="string")return e;if(typeof e=="number")return String(e);if(Array.isArray(e))return e.map(Xu).join("");if(e&&typeof e=="object"&&"props"in e){const n=e.props;return Xu(n.children)}return""}const Cc={pre:({children:e,...n})=>{const[l,i]=w.useState(!1),o=Xu(e),s=async()=>{await navigator.clipboard.writeText(o),i(!0),setTimeout(()=>i(!1),2e3)};return x.jsxs("div",{className:"relative overflow-x-auto max-w-full min-w-0 no-code-highlight group/pre",children:[x.jsx("pre",{className:"min-w-0 rounded-xl py-2.5 px-3.5 [.no-pre-highlight_&]:bg-background",...n,children:e}),x.jsx(Fe,{variant:"ghost",size:"icon",className:ye("absolute top-[35px] -translate-y-[50%] -translate-x-[1px] rounded-md right-1.5 h-8 w-8 text-muted-foreground opacity-0 group-hover/pre:opacity-100 transition-opacity",!l&&"hover:text-foreground",l&&"hover:!bg-transparent hover:!border-transparent"),onClick:s,children:l?x.jsx(ri,{className:"h-4 w-4 text-green-400"}):x.jsx(sc,{className:"h-4 w-4"})})]})},code:({children:e,className:n,...l})=>n?x.jsx("code",{className:"block text-xs whitespace-pre",...l,children:e}):x.jsx("code",{className:"break-all px-1 bg-border/60 dark:[.no-pre-highlight_&]:bg-background dark:[.text-pretty_&]:bg-neutral [.no-code-highlight_&]:!bg-transparent py-0.5 rounded text-sm whitespace-wrap",...l,children:e}),table:({children:e,...n})=>x.jsx("div",{className:"border border-border rounded-xl overflow-x-auto",children:x.jsx("table",{className:"table-auto min-w-full divide-y divide-border bg-background",...n,children:e})}),tbody:({children:e,...n})=>x.jsx("tbody",{className:"divide-y divide-border",...n,children:e}),th:({children:e,...n})=>x.jsx("th",{className:"text-left text-xs uppercase text-muted-foreground tracking-wider p-2 pl-0 first:pl-3 bg-muted dark:bg-card [&_*]:font-semibold",...n,children:e}),td:({children:e,...n})=>x.jsx("td",{className:"text-left p-2 pl-0 first:pl-3 [&_*]:font-normal ",...n,children:e}),p:({children:e,...n})=>x.jsx("p",{className:"break-words",...n,children:e}),a:({children:e,...n})=>x.jsx("a",{className:"transition-all underline decoration-2 text-orange-500 decoration-orange-500/50 hover:text-orange-500/70 dark:text-logo dark:decoration-logo/70 dark:hover:text-logo/60 dark:hover:decoration-logo/40 ",target:"_blank",rel:"noopener noreferrer",...n,children:e})},pO={...Cc,h1:({children:e})=>x.jsx("h1",{className:"text-2xl font-bold mt-6 mb-4 first:mt-0",children:e}),h2:({children:e})=>x.jsx("h2",{className:"text-xl font-semibold mt-5 mb-3 first:mt-0",children:e}),h3:({children:e})=>x.jsx("h3",{className:"text-lg font-semibold mt-4 mb-2 first:mt-0",children:e}),h4:({children:e})=>x.jsx("h4",{className:"text-base font-semibold mt-3 mb-2 first:mt-0",children:e}),h5:({children:e})=>x.jsx("h5",{className:"text-sm font-semibold mt-3 mb-1 first:mt-0",children:e}),h6:({children:e})=>x.jsx("h6",{className:"text-sm font-medium mt-3 mb-1 first:mt-0",children:e})},mO={connecting:"Connecting...",acquiring_sandbox:"Booting...",initializing:"Initializing...",starting:"Starting...",running:"Running...",waiting_for_user:"Waiting...",failed:"Failed"};function gO({status:e}){const n=(e?mO[e]:void 0)||"Processing...",l=e==="failed";return x.jsx(Dl,{className:"ml-[1px]",children:x.jsxs(dO,{children:[l?x.jsx(Po,{className:"size-4.5 text-red-500"}):x.jsx(oi,{className:"size-4.5 animate-spin text-muted-icon"}),x.jsx(gc,{className:"ml-[1px] text-sm",shimmerWidth:44,children:n})]})})}const LS=w.forwardRef(({className:e,children:n,...l},i)=>x.jsx("div",{ref:i,className:ye("relative overflow-y-auto overscroll-contain touch-pan-y scrollbar-hide",e),style:{WebkitOverflowScrolling:"touch"},...l,children:n}));LS.displayName="ScrollArea";function yO(e,n){const l={};return(e[e.length-1]===""?[...e,""]:e).join((l.padRight?" ":"")+","+(l.padLeft===!1?"":" ")).trim()}const xO=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,vO=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,bO={};function Bb(e,n){return(bO.jsx?vO:xO).test(e)}const wO=/[ \t\n\f\r]/g;function SO(e){return typeof e=="object"?e.type==="text"?Ub(e.value):!1:Ub(e)}function Ub(e){return e.replace(wO,"")===""}class $o{constructor(n,l,i){this.normal=l,this.property=n,i&&(this.space=i)}}$o.prototype.normal={};$o.prototype.property={};$o.prototype.space=void 0;function BS(e,n){const l={},i={};for(const o of e)Object.assign(l,o.property),Object.assign(i,o.normal);return new $o(l,i,n)}function np(e){return e.toLowerCase()}class fn{constructor(n,l){this.attribute=l,this.property=n}}fn.prototype.attribute="";fn.prototype.booleanish=!1;fn.prototype.boolean=!1;fn.prototype.commaOrSpaceSeparated=!1;fn.prototype.commaSeparated=!1;fn.prototype.defined=!1;fn.prototype.mustUseProperty=!1;fn.prototype.number=!1;fn.prototype.overloadedBoolean=!1;fn.prototype.property="";fn.prototype.spaceSeparated=!1;fn.prototype.space=void 0;let CO=0;const Me=si(),wt=si(),rp=si(),fe=si(),nt=si(),la=si(),wn=si();function si(){return 2**++CO}const lp=Object.freeze(Object.defineProperty({__proto__:null,boolean:Me,booleanish:wt,commaOrSpaceSeparated:wn,commaSeparated:la,number:fe,overloadedBoolean:rp,spaceSeparated:nt},Symbol.toStringTag,{value:"Module"})),ph=Object.keys(lp);class om extends fn{constructor(n,l,i,o){let s=-1;if(super(n,l),Hb(this,"space",o),typeof i=="number")for(;++s<ph.length;){const c=ph[s];Hb(this,ph[s],(i&lp[c])===lp[c])}}}om.prototype.defined=!0;function Hb(e,n,l){l&&(e[n]=l)}function ya(e){const n={},l={};for(const[i,o]of Object.entries(e.properties)){const s=new om(i,e.transform(e.attributes||{},i),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(s.mustUseProperty=!0),n[i]=s,l[np(i)]=i,l[np(s.attribute)]=i}return new $o(n,l,e.space)}const US=ya({properties:{ariaActiveDescendant:null,ariaAtomic:wt,ariaAutoComplete:null,ariaBusy:wt,ariaChecked:wt,ariaColCount:fe,ariaColIndex:fe,ariaColSpan:fe,ariaControls:nt,ariaCurrent:null,ariaDescribedBy:nt,ariaDetails:null,ariaDisabled:wt,ariaDropEffect:nt,ariaErrorMessage:null,ariaExpanded:wt,ariaFlowTo:nt,ariaGrabbed:wt,ariaHasPopup:null,ariaHidden:wt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:nt,ariaLevel:fe,ariaLive:null,ariaModal:wt,ariaMultiLine:wt,ariaMultiSelectable:wt,ariaOrientation:null,ariaOwns:nt,ariaPlaceholder:null,ariaPosInSet:fe,ariaPressed:wt,ariaReadOnly:wt,ariaRelevant:null,ariaRequired:wt,ariaRoleDescription:nt,ariaRowCount:fe,ariaRowIndex:fe,ariaRowSpan:fe,ariaSelected:wt,ariaSetSize:fe,ariaSort:null,ariaValueMax:fe,ariaValueMin:fe,ariaValueNow:fe,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function HS(e,n){return n in e?e[n]:n}function PS(e,n){return HS(e,n.toLowerCase())}const kO=ya({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:la,acceptCharset:nt,accessKey:nt,action:null,allow:null,allowFullScreen:Me,allowPaymentRequest:Me,allowUserMedia:Me,alt:null,as:null,async:Me,autoCapitalize:null,autoComplete:nt,autoFocus:Me,autoPlay:Me,blocking:nt,capture:null,charSet:null,checked:Me,cite:null,className:nt,cols:fe,colSpan:null,content:null,contentEditable:wt,controls:Me,controlsList:nt,coords:fe|la,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Me,defer:Me,dir:null,dirName:null,disabled:Me,download:rp,draggable:wt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Me,formTarget:null,headers:nt,height:fe,hidden:rp,high:fe,href:null,hrefLang:null,htmlFor:nt,httpEquiv:nt,id:null,imageSizes:null,imageSrcSet:null,inert:Me,inputMode:null,integrity:null,is:null,isMap:Me,itemId:null,itemProp:nt,itemRef:nt,itemScope:Me,itemType:nt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Me,low:fe,manifest:null,max:null,maxLength:fe,media:null,method:null,min:null,minLength:fe,multiple:Me,muted:Me,name:null,nonce:null,noModule:Me,noValidate:Me,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:Me,optimum:fe,pattern:null,ping:nt,placeholder:null,playsInline:Me,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Me,referrerPolicy:null,rel:nt,required:Me,reversed:Me,rows:fe,rowSpan:fe,sandbox:nt,scope:null,scoped:Me,seamless:Me,selected:Me,shadowRootClonable:Me,shadowRootDelegatesFocus:Me,shadowRootMode:null,shape:null,size:fe,sizes:null,slot:null,span:fe,spellCheck:wt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:fe,step:null,style:null,tabIndex:fe,target:null,title:null,translate:null,type:null,typeMustMatch:Me,useMap:null,value:wt,width:fe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:nt,axis:null,background:null,bgColor:null,border:fe,borderColor:null,bottomMargin:fe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Me,declare:Me,event:null,face:null,frame:null,frameBorder:null,hSpace:fe,leftMargin:fe,link:null,longDesc:null,lowSrc:null,marginHeight:fe,marginWidth:fe,noResize:Me,noHref:Me,noShade:Me,noWrap:Me,object:null,profile:null,prompt:null,rev:null,rightMargin:fe,rules:null,scheme:null,scrolling:wt,standby:null,summary:null,text:null,topMargin:fe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:fe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Me,disableRemotePlayback:Me,prefix:null,property:null,results:fe,security:null,unselectable:null},space:"html",transform:PS}),EO=ya({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:wn,accentHeight:fe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:fe,amplitude:fe,arabicForm:null,ascent:fe,attributeName:null,attributeType:null,azimuth:fe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:fe,by:null,calcMode:null,capHeight:fe,className:nt,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:fe,diffuseConstant:fe,direction:null,display:null,dur:null,divisor:fe,dominantBaseline:null,download:Me,dx:null,dy:null,edgeMode:null,editable:null,elevation:fe,enableBackground:null,end:null,event:null,exponent:fe,externalResourcesRequired:null,fill:null,fillOpacity:fe,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:la,g2:la,glyphName:la,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:fe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:fe,horizOriginX:fe,horizOriginY:fe,id:null,ideographic:fe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:fe,k:fe,k1:fe,k2:fe,k3:fe,k4:fe,kernelMatrix:wn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:fe,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:fe,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:fe,overlineThickness:fe,paintOrder:null,panose1:null,path:null,pathLength:fe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:nt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:fe,pointsAtY:fe,pointsAtZ:fe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:wn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:wn,rev:wn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:wn,requiredFeatures:wn,requiredFonts:wn,requiredFormats:wn,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:fe,specularExponent:fe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:fe,strikethroughThickness:fe,string:null,stroke:null,strokeDashArray:wn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:fe,strokeOpacity:fe,strokeWidth:null,style:null,surfaceScale:fe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:wn,tabIndex:fe,tableValues:null,target:null,targetX:fe,targetY:fe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:wn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:fe,underlineThickness:fe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:fe,values:null,vAlphabetic:fe,vMathematical:fe,vectorEffect:null,vHanging:fe,vIdeographic:fe,version:null,vertAdvY:fe,vertOriginX:fe,vertOriginY:fe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:fe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:HS}),IS=ya({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),qS=ya({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:PS}),FS=ya({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),NO={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"},AO=/[A-Z]/g,Pb=/-[a-z]/g,TO=/^data[-\w.:]+$/i;function RO(e,n){const l=np(n);let i=n,o=fn;if(l in e.normal)return e.property[e.normal[l]];if(l.length>4&&l.slice(0,4)==="data"&&TO.test(n)){if(n.charAt(4)==="-"){const s=n.slice(5).replace(Pb,MO);i="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=n.slice(4);if(!Pb.test(s)){let c=s.replace(AO,jO);c.charAt(0)!=="-"&&(c="-"+c),n="data"+c}}o=om}return new o(i,n)}function jO(e){return"-"+e.toLowerCase()}function MO(e){return e.charAt(1).toUpperCase()}const OO=BS([US,kO,IS,qS,FS],"html"),sm=BS([US,EO,IS,qS,FS],"svg");function DO(e){return e.join(" ").trim()}var Ji={},mh,Ib;function _O(){if(Ib)return mh;Ib=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,l=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,d=`
|
|
379
|
+
`,h="/",y="*",g="",v="comment",b="declaration";function k(E,N){if(typeof E!="string")throw new TypeError("First argument must be a string");if(!E)return[];N=N||{};var M=1,j=1;function D(Z){var Q=Z.match(n);Q&&(M+=Q.length);var B=Z.lastIndexOf(d);j=~B?Z.length-B:j+Z.length}function I(){var Z={line:M,column:j};return function(Q){return Q.position=new O(Z),re(),Q}}function O(Z){this.start=Z,this.end={line:M,column:j},this.source=N.source}O.prototype.content=E;function P(Z){var Q=new Error(N.source+":"+M+":"+j+": "+Z);if(Q.reason=Z,Q.filename=N.source,Q.line=M,Q.column=j,Q.source=E,!N.silent)throw Q}function q(Z){var Q=Z.exec(E);if(Q){var B=Q[0];return D(B),E=E.slice(B.length),Q}}function re(){q(l)}function H(Z){var Q;for(Z=Z||[];Q=J();)Q!==!1&&Z.push(Q);return Z}function J(){var Z=I();if(!(h!=E.charAt(0)||y!=E.charAt(1))){for(var Q=2;g!=E.charAt(Q)&&(y!=E.charAt(Q)||h!=E.charAt(Q+1));)++Q;if(Q+=2,g===E.charAt(Q-1))return P("End of comment missing");var B=E.slice(2,Q-2);return j+=2,D(B),E=E.slice(Q),j+=2,Z({type:v,comment:B})}}function ne(){var Z=I(),Q=q(i);if(Q){if(J(),!q(o))return P("property missing ':'");var B=q(s),Y=Z({type:b,property:C(Q[0].replace(e,g)),value:B?C(B[0].replace(e,g)):g});return q(c),Y}}function W(){var Z=[];H(Z);for(var Q;Q=ne();)Q!==!1&&(Z.push(Q),H(Z));return Z}return re(),W()}function C(E){return E?E.replace(f,g):g}return mh=k,mh}var qb;function zO(){if(qb)return Ji;qb=1;var e=Ji&&Ji.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Ji,"__esModule",{value:!0}),Ji.default=l;const n=e(_O());function l(i,o){let s=null;if(!i||typeof i!="string")return s;const c=(0,n.default)(i),f=typeof o=="function";return c.forEach(d=>{if(d.type!=="declaration")return;const{property:h,value:y}=d;f?o(h,y,d):y&&(s=s||{},s[h]=y)}),s}return Ji}var po={},Fb;function LO(){if(Fb)return po;Fb=1,Object.defineProperty(po,"__esModule",{value:!0}),po.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,l=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,s=function(h){return!h||l.test(h)||e.test(h)},c=function(h,y){return y.toUpperCase()},f=function(h,y){return"".concat(y,"-")},d=function(h,y){return y===void 0&&(y={}),s(h)?h:(h=h.toLowerCase(),y.reactCompat?h=h.replace(o,f):h=h.replace(i,f),h.replace(n,c))};return po.camelCase=d,po}var mo,Vb;function BO(){if(Vb)return mo;Vb=1;var e=mo&&mo.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},n=e(zO()),l=LO();function i(o,s){var c={};return!o||typeof o!="string"||(0,n.default)(o,function(f,d){f&&d&&(c[(0,l.camelCase)(f,s)]=d)}),c}return i.default=i,mo=i,mo}var UO=BO();const HO=ec(UO),VS=GS("end"),um=GS("start");function GS(e){return n;function n(l){const i=l&&l.position&&l.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function PO(e){const n=um(e),l=VS(e);if(n&&l)return{start:n,end:l}}function ko(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Gb(e.position):"start"in e||"end"in e?Gb(e):"line"in e||"column"in e?ip(e):""}function ip(e){return Yb(e&&e.line)+":"+Yb(e&&e.column)}function Gb(e){return ip(e&&e.start)+"-"+ip(e&&e.end)}function Yb(e){return e&&typeof e=="number"?e:1}class $t extends Error{constructor(n,l,i){super(),typeof l=="string"&&(i=l,l=void 0);let o="",s={},c=!1;if(l&&("line"in l&&"column"in l?s={place:l}:"start"in l&&"end"in l?s={place:l}:"type"in l?s={ancestors:[l],place:l.position}:s={...l}),typeof n=="string"?o=n:!s.cause&&n&&(c=!0,o=n.message,s.cause=n),!s.ruleId&&!s.source&&typeof i=="string"){const d=i.indexOf(":");d===-1?s.ruleId=i:(s.source=i.slice(0,d),s.ruleId=i.slice(d+1))}if(!s.place&&s.ancestors&&s.ancestors){const d=s.ancestors[s.ancestors.length-1];d&&(s.place=d.position)}const f=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=f?f.line:void 0,this.name=ko(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=c&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}$t.prototype.file="";$t.prototype.name="";$t.prototype.reason="";$t.prototype.message="";$t.prototype.stack="";$t.prototype.column=void 0;$t.prototype.line=void 0;$t.prototype.ancestors=void 0;$t.prototype.cause=void 0;$t.prototype.fatal=void 0;$t.prototype.place=void 0;$t.prototype.ruleId=void 0;$t.prototype.source=void 0;const cm={}.hasOwnProperty,IO=new Map,qO=/[A-Z]/g,FO=new Set(["table","tbody","thead","tfoot","tr"]),VO=new Set(["td","th"]),YS="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function GO(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const l=n.filePath||void 0;let i;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=WO(l,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=JO(l,n.jsx,n.jsxs)}const o={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:i,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:l,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?sm:OO,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},s=$S(o,e,void 0);return s&&typeof s!="string"?s:o.create(e,o.Fragment,{children:s||void 0},void 0)}function $S(e,n,l){if(n.type==="element")return YO(e,n,l);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return $O(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return QO(e,n,l);if(n.type==="mdxjsEsm")return XO(e,n);if(n.type==="root")return KO(e,n,l);if(n.type==="text")return ZO(e,n)}function YO(e,n,l){const i=e.schema;let o=i;n.tagName.toLowerCase()==="svg"&&i.space==="html"&&(o=sm,e.schema=o),e.ancestors.push(n);const s=QS(e,n.tagName,!1),c=eD(e,n);let f=dm(e,n);return FO.has(n.tagName)&&(f=f.filter(function(d){return typeof d=="string"?!SO(d):!0})),XS(e,c,s,n),fm(c,f),e.ancestors.pop(),e.schema=i,e.create(n,s,c,l)}function $O(e,n){if(n.data&&n.data.estree&&e.evaluater){const i=n.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}zo(e,n.position)}function XO(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);zo(e,n.position)}function QO(e,n,l){const i=e.schema;let o=i;n.name==="svg"&&i.space==="html"&&(o=sm,e.schema=o),e.ancestors.push(n);const s=n.name===null?e.Fragment:QS(e,n.name,!0),c=tD(e,n),f=dm(e,n);return XS(e,c,s,n),fm(c,f),e.ancestors.pop(),e.schema=i,e.create(n,s,c,l)}function KO(e,n,l){const i={};return fm(i,dm(e,n)),e.create(n,e.Fragment,i,l)}function ZO(e,n){return n.value}function XS(e,n,l,i){typeof l!="string"&&l!==e.Fragment&&e.passNode&&(n.node=i)}function fm(e,n){if(n.length>0){const l=n.length>1?n:n[0];l&&(e.children=l)}}function JO(e,n,l){return i;function i(o,s,c,f){const h=Array.isArray(c.children)?l:n;return f?h(s,c,f):h(s,c)}}function WO(e,n){return l;function l(i,o,s,c){const f=Array.isArray(s.children),d=um(i);return n(o,s,c,f,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function eD(e,n){const l={};let i,o;for(o in n.properties)if(o!=="children"&&cm.call(n.properties,o)){const s=nD(e,o,n.properties[o]);if(s){const[c,f]=s;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&VO.has(n.tagName)?i=f:l[c]=f}}if(i){const s=l.style||(l.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return l}function tD(e,n){const l={};for(const i of n.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const s=i.data.estree.body[0];s.type;const c=s.expression;c.type;const f=c.properties[0];f.type,Object.assign(l,e.evaluater.evaluateExpression(f.argument))}else zo(e,n.position);else{const o=i.name;let s;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const f=i.value.data.estree.body[0];f.type,s=e.evaluater.evaluateExpression(f.expression)}else zo(e,n.position);else s=i.value===null?!0:i.value;l[o]=s}return l}function dm(e,n){const l=[];let i=-1;const o=e.passKeys?new Map:IO;for(;++i<n.children.length;){const s=n.children[i];let c;if(e.passKeys){const d=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(d){const h=o.get(d)||0;c=d+"-"+h,o.set(d,h+1)}}const f=$S(e,s,c);f!==void 0&&l.push(f)}return l}function nD(e,n,l){const i=RO(e.schema,n);if(!(l==null||typeof l=="number"&&Number.isNaN(l))){if(Array.isArray(l)&&(l=i.commaSeparated?yO(l):DO(l)),i.property==="style"){let o=typeof l=="object"?l:rD(e,String(l));return e.stylePropertyNameCase==="css"&&(o=lD(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&i.space?NO[i.property]||i.property:i.attribute,l]}}function rD(e,n){try{return HO(n,{reactCompat:!0})}catch(l){if(e.ignoreInvalidStyle)return{};const i=l,o=new $t("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=YS+"#cannot-parse-style-attribute",o}}function QS(e,n,l){let i;if(!l)i={type:"Literal",value:n};else if(n.includes(".")){const o=n.split(".");let s=-1,c;for(;++s<o.length;){const f=Bb(o[s])?{type:"Identifier",name:o[s]}:{type:"Literal",value:o[s]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(s&&f.type==="Literal"),optional:!1}:f}i=c}else i=Bb(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(i.type==="Literal"){const o=i.value;return cm.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(i);zo(e)}function zo(e,n){const l=new $t("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw l.file=e.filePath||void 0,l.url=YS+"#cannot-handle-mdx-estrees-without-createevaluater",l}function lD(e){const n={};let l;for(l in e)cm.call(e,l)&&(n[iD(l)]=e[l]);return n}function iD(e){let n=e.replace(qO,aD);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function aD(e){return"-"+e.toLowerCase()}const gh={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},oD={};function hm(e,n){const l=oD,i=typeof l.includeImageAlt=="boolean"?l.includeImageAlt:!0,o=typeof l.includeHtml=="boolean"?l.includeHtml:!0;return KS(e,i,o)}function KS(e,n,l){if(sD(e)){if("value"in e)return e.type==="html"&&!l?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return $b(e.children,n,l)}return Array.isArray(e)?$b(e,n,l):""}function $b(e,n,l){const i=[];let o=-1;for(;++o<e.length;)i[o]=KS(e[o],n,l);return i.join("")}function sD(e){return!!(e&&typeof e=="object")}const Xb=document.createElement("i");function pm(e){const n="&"+e+";";Xb.innerHTML=n;const l=Xb.textContent;return l.charCodeAt(l.length-1)===59&&e!=="semi"||l===n?!1:l}function kn(e,n,l,i){const o=e.length;let s=0,c;if(n<0?n=-n>o?0:o+n:n=n>o?o:n,l=l>0?l:0,i.length<1e4)c=Array.from(i),c.unshift(n,l),e.splice(...c);else for(l&&e.splice(n,l);s<i.length;)c=i.slice(s,s+1e4),c.unshift(n,0),e.splice(...c),s+=1e4,n+=1e4}function In(e,n){return e.length>0?(kn(e,e.length,0,n),e):n}const Qb={}.hasOwnProperty;function ZS(e){const n={};let l=-1;for(;++l<e.length;)uD(n,e[l]);return n}function uD(e,n){let l;for(l in n){const o=(Qb.call(e,l)?e[l]:void 0)||(e[l]={}),s=n[l];let c;if(s)for(c in s){Qb.call(o,c)||(o[c]=[]);const f=s[c];cD(o[c],Array.isArray(f)?f:f?[f]:[])}}}function cD(e,n){let l=-1;const i=[];for(;++l<n.length;)(n[l].add==="after"?e:i).push(n[l]);kn(e,0,0,i)}function JS(e,n){const l=Number.parseInt(e,n);return l<9||l===11||l>13&&l<32||l>126&&l<160||l>55295&&l<57344||l>64975&&l<65008||(l&65535)===65535||(l&65535)===65534||l>1114111?"�":String.fromCodePoint(l)}function Jn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Kt=_l(/[A-Za-z]/),Gt=_l(/[\dA-Za-z]/),fD=_l(/[#-'*+\--9=?A-Z^-~]/);function Qu(e){return e!==null&&(e<32||e===127)}const ap=_l(/\d/),dD=_l(/[\dA-Fa-f]/),hD=_l(/[!-/:-@[-`{-~]/);function Ce(e){return e!==null&&e<-2}function et(e){return e!==null&&(e<0||e===32)}function Le(e){return e===-2||e===-1||e===32}const kc=_l(new RegExp("\\p{P}|\\p{S}","u")),ii=_l(/\s/);function _l(e){return n;function n(l){return l!==null&&l>-1&&e.test(String.fromCharCode(l))}}function xa(e){const n=[];let l=-1,i=0,o=0;for(;++l<e.length;){const s=e.charCodeAt(l);let c="";if(s===37&&Gt(e.charCodeAt(l+1))&&Gt(e.charCodeAt(l+2)))o=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(c=String.fromCharCode(s));else if(s>55295&&s<57344){const f=e.charCodeAt(l+1);s<56320&&f>56319&&f<57344?(c=String.fromCharCode(s,f),o=1):c="�"}else c=String.fromCharCode(s);c&&(n.push(e.slice(i,l),encodeURIComponent(c)),i=l+o+1,c=""),o&&(l+=o,o=0)}return n.join("")+e.slice(i)}function Pe(e,n,l,i){const o=i?i-1:Number.POSITIVE_INFINITY;let s=0;return c;function c(d){return Le(d)?(e.enter(l),f(d)):n(d)}function f(d){return Le(d)&&s++<o?(e.consume(d),f):(e.exit(l),n(d))}}const pD={tokenize:mD};function mD(e){const n=e.attempt(this.parser.constructs.contentInitial,i,o);let l;return n;function i(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Pe(e,n,"linePrefix")}function o(f){return e.enter("paragraph"),s(f)}function s(f){const d=e.enter("chunkText",{contentType:"text",previous:l});return l&&(l.next=d),l=d,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return Ce(f)?(e.consume(f),e.exit("chunkText"),s):(e.consume(f),c)}}const gD={tokenize:yD},Kb={tokenize:xD};function yD(e){const n=this,l=[];let i=0,o,s,c;return f;function f(j){if(i<l.length){const D=l[i];return n.containerState=D[1],e.attempt(D[0].continuation,d,h)(j)}return h(j)}function d(j){if(i++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,o&&M();const D=n.events.length;let I=D,O;for(;I--;)if(n.events[I][0]==="exit"&&n.events[I][1].type==="chunkFlow"){O=n.events[I][1].end;break}N(i);let P=D;for(;P<n.events.length;)n.events[P][1].end={...O},P++;return kn(n.events,I+1,0,n.events.slice(D)),n.events.length=P,h(j)}return f(j)}function h(j){if(i===l.length){if(!o)return v(j);if(o.currentConstruct&&o.currentConstruct.concrete)return k(j);n.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(Kb,y,g)(j)}function y(j){return o&&M(),N(i),v(j)}function g(j){return n.parser.lazy[n.now().line]=i!==l.length,c=n.now().offset,k(j)}function v(j){return n.containerState={},e.attempt(Kb,b,k)(j)}function b(j){return i++,l.push([n.currentConstruct,n.containerState]),v(j)}function k(j){if(j===null){o&&M(),N(0),e.consume(j);return}return o=o||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:s}),C(j)}function C(j){if(j===null){E(e.exit("chunkFlow"),!0),N(0),e.consume(j);return}return Ce(j)?(e.consume(j),E(e.exit("chunkFlow")),i=0,n.interrupt=void 0,f):(e.consume(j),C)}function E(j,D){const I=n.sliceStream(j);if(D&&I.push(null),j.previous=s,s&&(s.next=j),s=j,o.defineSkip(j.start),o.write(I),n.parser.lazy[j.start.line]){let O=o.events.length;for(;O--;)if(o.events[O][1].start.offset<c&&(!o.events[O][1].end||o.events[O][1].end.offset>c))return;const P=n.events.length;let q=P,re,H;for(;q--;)if(n.events[q][0]==="exit"&&n.events[q][1].type==="chunkFlow"){if(re){H=n.events[q][1].end;break}re=!0}for(N(i),O=P;O<n.events.length;)n.events[O][1].end={...H},O++;kn(n.events,q+1,0,n.events.slice(P)),n.events.length=O}}function N(j){let D=l.length;for(;D-- >j;){const I=l[D];n.containerState=I[1],I[0].exit.call(n,e)}l.length=j}function M(){o.write([null]),s=void 0,o=void 0,n.containerState._closeFlow=void 0}}function xD(e,n,l){return Pe(e,e.attempt(this.parser.constructs.document,n,l),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ua(e){if(e===null||et(e)||ii(e))return 1;if(kc(e))return 2}function Ec(e,n,l){const i=[];let o=-1;for(;++o<e.length;){const s=e[o].resolveAll;s&&!i.includes(s)&&(n=s(n,l),i.push(s))}return n}const op={name:"attention",resolveAll:vD,tokenize:bD};function vD(e,n){let l=-1,i,o,s,c,f,d,h,y;for(;++l<e.length;)if(e[l][0]==="enter"&&e[l][1].type==="attentionSequence"&&e[l][1]._close){for(i=l;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&n.sliceSerialize(e[i][1]).charCodeAt(0)===n.sliceSerialize(e[l][1]).charCodeAt(0)){if((e[i][1]._close||e[l][1]._open)&&(e[l][1].end.offset-e[l][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[l][1].end.offset-e[l][1].start.offset)%3))continue;d=e[i][1].end.offset-e[i][1].start.offset>1&&e[l][1].end.offset-e[l][1].start.offset>1?2:1;const g={...e[i][1].end},v={...e[l][1].start};Zb(g,-d),Zb(v,d),c={type:d>1?"strongSequence":"emphasisSequence",start:g,end:{...e[i][1].end}},f={type:d>1?"strongSequence":"emphasisSequence",start:{...e[l][1].start},end:v},s={type:d>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[l][1].start}},o={type:d>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[i][1].end={...c.start},e[l][1].start={...f.end},h=[],e[i][1].end.offset-e[i][1].start.offset&&(h=In(h,[["enter",e[i][1],n],["exit",e[i][1],n]])),h=In(h,[["enter",o,n],["enter",c,n],["exit",c,n],["enter",s,n]]),h=In(h,Ec(n.parser.constructs.insideSpan.null,e.slice(i+1,l),n)),h=In(h,[["exit",s,n],["enter",f,n],["exit",f,n],["exit",o,n]]),e[l][1].end.offset-e[l][1].start.offset?(y=2,h=In(h,[["enter",e[l][1],n],["exit",e[l][1],n]])):y=0,kn(e,i-1,l-i+3,h),l=i+h.length-y-2;break}}for(l=-1;++l<e.length;)e[l][1].type==="attentionSequence"&&(e[l][1].type="data");return e}function bD(e,n){const l=this.parser.constructs.attentionMarkers.null,i=this.previous,o=ua(i);let s;return c;function c(d){return s=d,e.enter("attentionSequence"),f(d)}function f(d){if(d===s)return e.consume(d),f;const h=e.exit("attentionSequence"),y=ua(d),g=!y||y===2&&o||l.includes(d),v=!o||o===2&&y||l.includes(i);return h._open=!!(s===42?g:g&&(o||!v)),h._close=!!(s===42?v:v&&(y||!g)),n(d)}}function Zb(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const wD={name:"autolink",tokenize:SD};function SD(e,n,l){let i=0;return o;function o(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(b){return Kt(b)?(e.consume(b),c):b===64?l(b):h(b)}function c(b){return b===43||b===45||b===46||Gt(b)?(i=1,f(b)):h(b)}function f(b){return b===58?(e.consume(b),i=0,d):(b===43||b===45||b===46||Gt(b))&&i++<32?(e.consume(b),f):(i=0,h(b))}function d(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),n):b===null||b===32||b===60||Qu(b)?l(b):(e.consume(b),d)}function h(b){return b===64?(e.consume(b),y):fD(b)?(e.consume(b),h):l(b)}function y(b){return Gt(b)?g(b):l(b)}function g(b){return b===46?(e.consume(b),i=0,y):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),n):v(b)}function v(b){if((b===45||Gt(b))&&i++<63){const k=b===45?v:g;return e.consume(b),k}return l(b)}}const Xo={partial:!0,tokenize:CD};function CD(e,n,l){return i;function i(s){return Le(s)?Pe(e,o,"linePrefix")(s):o(s)}function o(s){return s===null||Ce(s)?n(s):l(s)}}const WS={continuation:{tokenize:ED},exit:ND,name:"blockQuote",tokenize:kD};function kD(e,n,l){const i=this;return o;function o(c){if(c===62){const f=i.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),s}return l(c)}function s(c){return Le(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(c))}}function ED(e,n,l){const i=this;return o;function o(c){return Le(c)?Pe(e,s,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):s(c)}function s(c){return e.attempt(WS,n,l)(c)}}function ND(e){e.exit("blockQuote")}const e2={name:"characterEscape",tokenize:AD};function AD(e,n,l){return i;function i(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),o}function o(s){return hD(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):l(s)}}const t2={name:"characterReference",tokenize:TD};function TD(e,n,l){const i=this;let o=0,s,c;return f;function f(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),d}function d(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),s=31,c=Gt,y(g))}function h(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,c=dD,y):(e.enter("characterReferenceValue"),s=7,c=ap,y(g))}function y(g){if(g===59&&o){const v=e.exit("characterReferenceValue");return c===Gt&&!pm(i.sliceSerialize(v))?l(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return c(g)&&o++<s?(e.consume(g),y):l(g)}}const Jb={partial:!0,tokenize:jD},Wb={concrete:!0,name:"codeFenced",tokenize:RD};function RD(e,n,l){const i=this,o={partial:!0,tokenize:I};let s=0,c=0,f;return d;function d(O){return h(O)}function h(O){const P=i.events[i.events.length-1];return s=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,f=O,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),y(O)}function y(O){return O===f?(c++,e.consume(O),y):c<3?l(O):(e.exit("codeFencedFenceSequence"),Le(O)?Pe(e,g,"whitespace")(O):g(O))}function g(O){return O===null||Ce(O)?(e.exit("codeFencedFence"),i.interrupt?n(O):e.check(Jb,C,D)(O)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(O))}function v(O){return O===null||Ce(O)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(O)):Le(O)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Pe(e,b,"whitespace")(O)):O===96&&O===f?l(O):(e.consume(O),v)}function b(O){return O===null||Ce(O)?g(O):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),k(O))}function k(O){return O===null||Ce(O)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(O)):O===96&&O===f?l(O):(e.consume(O),k)}function C(O){return e.attempt(o,D,E)(O)}function E(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),N}function N(O){return s>0&&Le(O)?Pe(e,M,"linePrefix",s+1)(O):M(O)}function M(O){return O===null||Ce(O)?e.check(Jb,C,D)(O):(e.enter("codeFlowValue"),j(O))}function j(O){return O===null||Ce(O)?(e.exit("codeFlowValue"),M(O)):(e.consume(O),j)}function D(O){return e.exit("codeFenced"),n(O)}function I(O,P,q){let re=0;return H;function H(Q){return O.enter("lineEnding"),O.consume(Q),O.exit("lineEnding"),J}function J(Q){return O.enter("codeFencedFence"),Le(Q)?Pe(O,ne,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):ne(Q)}function ne(Q){return Q===f?(O.enter("codeFencedFenceSequence"),W(Q)):q(Q)}function W(Q){return Q===f?(re++,O.consume(Q),W):re>=c?(O.exit("codeFencedFenceSequence"),Le(Q)?Pe(O,Z,"whitespace")(Q):Z(Q)):q(Q)}function Z(Q){return Q===null||Ce(Q)?(O.exit("codeFencedFence"),P(Q)):q(Q)}}}function jD(e,n,l){const i=this;return o;function o(c){return c===null?l(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s)}function s(c){return i.parser.lazy[i.now().line]?l(c):n(c)}}const yh={name:"codeIndented",tokenize:OD},MD={partial:!0,tokenize:DD};function OD(e,n,l){const i=this;return o;function o(h){return e.enter("codeIndented"),Pe(e,s,"linePrefix",5)(h)}function s(h){const y=i.events[i.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?c(h):l(h)}function c(h){return h===null?d(h):Ce(h)?e.attempt(MD,c,d)(h):(e.enter("codeFlowValue"),f(h))}function f(h){return h===null||Ce(h)?(e.exit("codeFlowValue"),c(h)):(e.consume(h),f)}function d(h){return e.exit("codeIndented"),n(h)}}function DD(e,n,l){const i=this;return o;function o(c){return i.parser.lazy[i.now().line]?l(c):Ce(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):Pe(e,s,"linePrefix",5)(c)}function s(c){const f=i.events[i.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?n(c):Ce(c)?o(c):l(c)}}const _D={name:"codeText",previous:LD,resolve:zD,tokenize:BD};function zD(e){let n=e.length-4,l=3,i,o;if((e[l][1].type==="lineEnding"||e[l][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(i=l;++i<n;)if(e[i][1].type==="codeTextData"){e[l][1].type="codeTextPadding",e[n][1].type="codeTextPadding",l+=2,n-=2;break}}for(i=l-1,n++;++i<=n;)o===void 0?i!==n&&e[i][1].type!=="lineEnding"&&(o=i):(i===n||e[i][1].type==="lineEnding")&&(e[o][1].type="codeTextData",i!==o+2&&(e[o][1].end=e[i-1][1].end,e.splice(o+2,i-o-2),n-=i-o-2,i=o+2),o=void 0);return e}function LD(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function BD(e,n,l){let i=0,o,s;return c;function c(g){return e.enter("codeText"),e.enter("codeTextSequence"),f(g)}function f(g){return g===96?(e.consume(g),i++,f):(e.exit("codeTextSequence"),d(g))}function d(g){return g===null?l(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),d):g===96?(s=e.enter("codeTextSequence"),o=0,y(g)):Ce(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(g))}function h(g){return g===null||g===32||g===96||Ce(g)?(e.exit("codeTextData"),d(g)):(e.consume(g),h)}function y(g){return g===96?(e.consume(g),o++,y):o===i?(e.exit("codeTextSequence"),e.exit("codeText"),n(g)):(s.type="codeTextData",h(g))}}class UD{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,l){const i=l??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(n,i):n>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(n,l,i){const o=l||0;this.setCursor(Math.trunc(n));const s=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return i&&go(this.left,i),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),go(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),go(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const l=this.left.splice(n,Number.POSITIVE_INFINITY);go(this.right,l.reverse())}else{const l=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);go(this.left,l.reverse())}}}function go(e,n){let l=0;if(n.length<1e4)e.push(...n);else for(;l<n.length;)e.push(...n.slice(l,l+1e4)),l+=1e4}function n2(e){const n={};let l=-1,i,o,s,c,f,d,h;const y=new UD(e);for(;++l<y.length;){for(;l in n;)l=n[l];if(i=y.get(l),l&&i[1].type==="chunkFlow"&&y.get(l-1)[1].type==="listItemPrefix"&&(d=i[1]._tokenizer.events,s=0,s<d.length&&d[s][1].type==="lineEndingBlank"&&(s+=2),s<d.length&&d[s][1].type==="content"))for(;++s<d.length&&d[s][1].type!=="content";)d[s][1].type==="chunkText"&&(d[s][1]._isInFirstContentOfListItem=!0,s++);if(i[0]==="enter")i[1].contentType&&(Object.assign(n,HD(y,l)),l=n[l],h=!0);else if(i[1]._container){for(s=l,o=void 0;s--;)if(c=y.get(s),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(o&&(y.get(o)[1].type="lineEndingBlank"),c[1].type="lineEnding",o=s);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;o&&(i[1].end={...y.get(o)[1].start},f=y.slice(o,l),f.unshift(i),y.splice(o,l-o+1,f))}}return kn(e,0,Number.POSITIVE_INFINITY,y.slice(0)),!h}function HD(e,n){const l=e.get(n)[1],i=e.get(n)[2];let o=n-1;const s=[];let c=l._tokenizer;c||(c=i.parser[l.contentType](l.start),l._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,d=[],h={};let y,g,v=-1,b=l,k=0,C=0;const E=[C];for(;b;){for(;e.get(++o)[1]!==b;);s.push(o),b._tokenizer||(y=i.sliceStream(b),b.next||y.push(null),g&&c.defineSkip(b.start),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(y),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),g=b,b=b.next}for(b=l;++v<f.length;)f[v][0]==="exit"&&f[v-1][0]==="enter"&&f[v][1].type===f[v-1][1].type&&f[v][1].start.line!==f[v][1].end.line&&(C=v+1,E.push(C),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(c.events=[],b?(b._tokenizer=void 0,b.previous=void 0):E.pop(),v=E.length;v--;){const N=f.slice(E[v],E[v+1]),M=s.pop();d.push([M,M+N.length-1]),e.splice(M,2,N)}for(d.reverse(),v=-1;++v<d.length;)h[k+d[v][0]]=k+d[v][1],k+=d[v][1]-d[v][0]-1;return h}const PD={resolve:qD,tokenize:FD},ID={partial:!0,tokenize:VD};function qD(e){return n2(e),e}function FD(e,n){let l;return i;function i(f){return e.enter("content"),l=e.enter("chunkContent",{contentType:"content"}),o(f)}function o(f){return f===null?s(f):Ce(f)?e.check(ID,c,s)(f):(e.consume(f),o)}function s(f){return e.exit("chunkContent"),e.exit("content"),n(f)}function c(f){return e.consume(f),e.exit("chunkContent"),l.next=e.enter("chunkContent",{contentType:"content",previous:l}),l=l.next,o}}function VD(e,n,l){const i=this;return o;function o(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Pe(e,s,"linePrefix")}function s(c){if(c===null||Ce(c))return l(c);const f=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?n(c):e.interrupt(i.parser.constructs.flow,l,n)(c)}}function r2(e,n,l,i,o,s,c,f,d){const h=d||Number.POSITIVE_INFINITY;let y=0;return g;function g(N){return N===60?(e.enter(i),e.enter(o),e.enter(s),e.consume(N),e.exit(s),v):N===null||N===32||N===41||Qu(N)?l(N):(e.enter(i),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),C(N))}function v(N){return N===62?(e.enter(s),e.consume(N),e.exit(s),e.exit(o),e.exit(i),n):(e.enter(f),e.enter("chunkString",{contentType:"string"}),b(N))}function b(N){return N===62?(e.exit("chunkString"),e.exit(f),v(N)):N===null||N===60||Ce(N)?l(N):(e.consume(N),N===92?k:b)}function k(N){return N===60||N===62||N===92?(e.consume(N),b):b(N)}function C(N){return!y&&(N===null||N===41||et(N))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(i),n(N)):y<h&&N===40?(e.consume(N),y++,C):N===41?(e.consume(N),y--,C):N===null||N===32||N===40||Qu(N)?l(N):(e.consume(N),N===92?E:C)}function E(N){return N===40||N===41||N===92?(e.consume(N),C):C(N)}}function l2(e,n,l,i,o,s){const c=this;let f=0,d;return h;function h(b){return e.enter(i),e.enter(o),e.consume(b),e.exit(o),e.enter(s),y}function y(b){return f>999||b===null||b===91||b===93&&!d||b===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?l(b):b===93?(e.exit(s),e.enter(o),e.consume(b),e.exit(o),e.exit(i),n):Ce(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),y):(e.enter("chunkString",{contentType:"string"}),g(b))}function g(b){return b===null||b===91||b===93||Ce(b)||f++>999?(e.exit("chunkString"),y(b)):(e.consume(b),d||(d=!Le(b)),b===92?v:g)}function v(b){return b===91||b===92||b===93?(e.consume(b),f++,g):g(b)}}function i2(e,n,l,i,o,s){let c;return f;function f(v){return v===34||v===39||v===40?(e.enter(i),e.enter(o),e.consume(v),e.exit(o),c=v===40?41:v,d):l(v)}function d(v){return v===c?(e.enter(o),e.consume(v),e.exit(o),e.exit(i),n):(e.enter(s),h(v))}function h(v){return v===c?(e.exit(s),d(c)):v===null?l(v):Ce(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),Pe(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),y(v))}function y(v){return v===c||v===null||Ce(v)?(e.exit("chunkString"),h(v)):(e.consume(v),v===92?g:y)}function g(v){return v===c||v===92?(e.consume(v),y):y(v)}}function Eo(e,n){let l;return i;function i(o){return Ce(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l=!0,i):Le(o)?Pe(e,i,l?"linePrefix":"lineSuffix")(o):n(o)}}const GD={name:"definition",tokenize:$D},YD={partial:!0,tokenize:XD};function $D(e,n,l){const i=this;let o;return s;function s(b){return e.enter("definition"),c(b)}function c(b){return l2.call(i,e,f,l,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function f(b){return o=Jn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),d):l(b)}function d(b){return et(b)?Eo(e,h)(b):h(b)}function h(b){return r2(e,y,l,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function y(b){return e.attempt(YD,g,g)(b)}function g(b){return Le(b)?Pe(e,v,"whitespace")(b):v(b)}function v(b){return b===null||Ce(b)?(e.exit("definition"),i.parser.defined.push(o),n(b)):l(b)}}function XD(e,n,l){return i;function i(f){return et(f)?Eo(e,o)(f):l(f)}function o(f){return i2(e,s,l,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function s(f){return Le(f)?Pe(e,c,"whitespace")(f):c(f)}function c(f){return f===null||Ce(f)?n(f):l(f)}}const QD={name:"hardBreakEscape",tokenize:KD};function KD(e,n,l){return i;function i(s){return e.enter("hardBreakEscape"),e.consume(s),o}function o(s){return Ce(s)?(e.exit("hardBreakEscape"),n(s)):l(s)}}const ZD={name:"headingAtx",resolve:JD,tokenize:WD};function JD(e,n){let l=e.length-2,i=3,o,s;return e[i][1].type==="whitespace"&&(i+=2),l-2>i&&e[l][1].type==="whitespace"&&(l-=2),e[l][1].type==="atxHeadingSequence"&&(i===l-1||l-4>i&&e[l-2][1].type==="whitespace")&&(l-=i+1===l?2:4),l>i&&(o={type:"atxHeadingText",start:e[i][1].start,end:e[l][1].end},s={type:"chunkText",start:e[i][1].start,end:e[l][1].end,contentType:"text"},kn(e,i,l-i+1,[["enter",o,n],["enter",s,n],["exit",s,n],["exit",o,n]])),e}function WD(e,n,l){let i=0;return o;function o(y){return e.enter("atxHeading"),s(y)}function s(y){return e.enter("atxHeadingSequence"),c(y)}function c(y){return y===35&&i++<6?(e.consume(y),c):y===null||et(y)?(e.exit("atxHeadingSequence"),f(y)):l(y)}function f(y){return y===35?(e.enter("atxHeadingSequence"),d(y)):y===null||Ce(y)?(e.exit("atxHeading"),n(y)):Le(y)?Pe(e,f,"whitespace")(y):(e.enter("atxHeadingText"),h(y))}function d(y){return y===35?(e.consume(y),d):(e.exit("atxHeadingSequence"),f(y))}function h(y){return y===null||y===35||et(y)?(e.exit("atxHeadingText"),f(y)):(e.consume(y),h)}}const e_=["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"],e0=["pre","script","style","textarea"],t_={concrete:!0,name:"htmlFlow",resolveTo:l_,tokenize:i_},n_={partial:!0,tokenize:o_},r_={partial:!0,tokenize:a_};function l_(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function i_(e,n,l){const i=this;let o,s,c,f,d;return h;function h(T){return y(T)}function y(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),g}function g(T){return T===33?(e.consume(T),v):T===47?(e.consume(T),s=!0,C):T===63?(e.consume(T),o=3,i.interrupt?n:R):Kt(T)?(e.consume(T),c=String.fromCharCode(T),E):l(T)}function v(T){return T===45?(e.consume(T),o=2,b):T===91?(e.consume(T),o=5,f=0,k):Kt(T)?(e.consume(T),o=4,i.interrupt?n:R):l(T)}function b(T){return T===45?(e.consume(T),i.interrupt?n:R):l(T)}function k(T){const se="CDATA[";return T===se.charCodeAt(f++)?(e.consume(T),f===se.length?i.interrupt?n:ne:k):l(T)}function C(T){return Kt(T)?(e.consume(T),c=String.fromCharCode(T),E):l(T)}function E(T){if(T===null||T===47||T===62||et(T)){const se=T===47,ce=c.toLowerCase();return!se&&!s&&e0.includes(ce)?(o=1,i.interrupt?n(T):ne(T)):e_.includes(c.toLowerCase())?(o=6,se?(e.consume(T),N):i.interrupt?n(T):ne(T)):(o=7,i.interrupt&&!i.parser.lazy[i.now().line]?l(T):s?M(T):j(T))}return T===45||Gt(T)?(e.consume(T),c+=String.fromCharCode(T),E):l(T)}function N(T){return T===62?(e.consume(T),i.interrupt?n:ne):l(T)}function M(T){return Le(T)?(e.consume(T),M):H(T)}function j(T){return T===47?(e.consume(T),H):T===58||T===95||Kt(T)?(e.consume(T),D):Le(T)?(e.consume(T),j):H(T)}function D(T){return T===45||T===46||T===58||T===95||Gt(T)?(e.consume(T),D):I(T)}function I(T){return T===61?(e.consume(T),O):Le(T)?(e.consume(T),I):j(T)}function O(T){return T===null||T===60||T===61||T===62||T===96?l(T):T===34||T===39?(e.consume(T),d=T,P):Le(T)?(e.consume(T),O):q(T)}function P(T){return T===d?(e.consume(T),d=null,re):T===null||Ce(T)?l(T):(e.consume(T),P)}function q(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||et(T)?I(T):(e.consume(T),q)}function re(T){return T===47||T===62||Le(T)?j(T):l(T)}function H(T){return T===62?(e.consume(T),J):l(T)}function J(T){return T===null||Ce(T)?ne(T):Le(T)?(e.consume(T),J):l(T)}function ne(T){return T===45&&o===2?(e.consume(T),B):T===60&&o===1?(e.consume(T),Y):T===62&&o===4?(e.consume(T),z):T===63&&o===3?(e.consume(T),R):T===93&&o===5?(e.consume(T),de):Ce(T)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(n_,L,W)(T)):T===null||Ce(T)?(e.exit("htmlFlowData"),W(T)):(e.consume(T),ne)}function W(T){return e.check(r_,Z,L)(T)}function Z(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),Q}function Q(T){return T===null||Ce(T)?W(T):(e.enter("htmlFlowData"),ne(T))}function B(T){return T===45?(e.consume(T),R):ne(T)}function Y(T){return T===47?(e.consume(T),c="",le):ne(T)}function le(T){if(T===62){const se=c.toLowerCase();return e0.includes(se)?(e.consume(T),z):ne(T)}return Kt(T)&&c.length<8?(e.consume(T),c+=String.fromCharCode(T),le):ne(T)}function de(T){return T===93?(e.consume(T),R):ne(T)}function R(T){return T===62?(e.consume(T),z):T===45&&o===2?(e.consume(T),R):ne(T)}function z(T){return T===null||Ce(T)?(e.exit("htmlFlowData"),L(T)):(e.consume(T),z)}function L(T){return e.exit("htmlFlow"),n(T)}}function a_(e,n,l){const i=this;return o;function o(c){return Ce(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):l(c)}function s(c){return i.parser.lazy[i.now().line]?l(c):n(c)}}function o_(e,n,l){return i;function i(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Xo,n,l)}}const s_={name:"htmlText",tokenize:u_};function u_(e,n,l){const i=this;let o,s,c;return f;function f(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),d}function d(R){return R===33?(e.consume(R),h):R===47?(e.consume(R),I):R===63?(e.consume(R),j):Kt(R)?(e.consume(R),q):l(R)}function h(R){return R===45?(e.consume(R),y):R===91?(e.consume(R),s=0,k):Kt(R)?(e.consume(R),M):l(R)}function y(R){return R===45?(e.consume(R),b):l(R)}function g(R){return R===null?l(R):R===45?(e.consume(R),v):Ce(R)?(c=g,Y(R)):(e.consume(R),g)}function v(R){return R===45?(e.consume(R),b):g(R)}function b(R){return R===62?B(R):R===45?v(R):g(R)}function k(R){const z="CDATA[";return R===z.charCodeAt(s++)?(e.consume(R),s===z.length?C:k):l(R)}function C(R){return R===null?l(R):R===93?(e.consume(R),E):Ce(R)?(c=C,Y(R)):(e.consume(R),C)}function E(R){return R===93?(e.consume(R),N):C(R)}function N(R){return R===62?B(R):R===93?(e.consume(R),N):C(R)}function M(R){return R===null||R===62?B(R):Ce(R)?(c=M,Y(R)):(e.consume(R),M)}function j(R){return R===null?l(R):R===63?(e.consume(R),D):Ce(R)?(c=j,Y(R)):(e.consume(R),j)}function D(R){return R===62?B(R):j(R)}function I(R){return Kt(R)?(e.consume(R),O):l(R)}function O(R){return R===45||Gt(R)?(e.consume(R),O):P(R)}function P(R){return Ce(R)?(c=P,Y(R)):Le(R)?(e.consume(R),P):B(R)}function q(R){return R===45||Gt(R)?(e.consume(R),q):R===47||R===62||et(R)?re(R):l(R)}function re(R){return R===47?(e.consume(R),B):R===58||R===95||Kt(R)?(e.consume(R),H):Ce(R)?(c=re,Y(R)):Le(R)?(e.consume(R),re):B(R)}function H(R){return R===45||R===46||R===58||R===95||Gt(R)?(e.consume(R),H):J(R)}function J(R){return R===61?(e.consume(R),ne):Ce(R)?(c=J,Y(R)):Le(R)?(e.consume(R),J):re(R)}function ne(R){return R===null||R===60||R===61||R===62||R===96?l(R):R===34||R===39?(e.consume(R),o=R,W):Ce(R)?(c=ne,Y(R)):Le(R)?(e.consume(R),ne):(e.consume(R),Z)}function W(R){return R===o?(e.consume(R),o=void 0,Q):R===null?l(R):Ce(R)?(c=W,Y(R)):(e.consume(R),W)}function Z(R){return R===null||R===34||R===39||R===60||R===61||R===96?l(R):R===47||R===62||et(R)?re(R):(e.consume(R),Z)}function Q(R){return R===47||R===62||et(R)?re(R):l(R)}function B(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),n):l(R)}function Y(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),le}function le(R){return Le(R)?Pe(e,de,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):de(R)}function de(R){return e.enter("htmlTextData"),c(R)}}const mm={name:"labelEnd",resolveAll:h_,resolveTo:p_,tokenize:m_},c_={tokenize:g_},f_={tokenize:y_},d_={tokenize:x_};function h_(e){let n=-1;const l=[];for(;++n<e.length;){const i=e[n][1];if(l.push(e[n]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const o=i.type==="labelImage"?4:2;i.type="data",n+=o}}return e.length!==l.length&&kn(e,0,e.length,l),e}function p_(e,n){let l=e.length,i=0,o,s,c,f;for(;l--;)if(o=e[l][1],s){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[l][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(c){if(e[l][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(s=l,o.type!=="labelLink")){i=2;break}}else o.type==="labelEnd"&&(c=l);const d={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[s][1].start},end:{...e[c][1].end}},y={type:"labelText",start:{...e[s+i+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",d,n],["enter",h,n]],f=In(f,e.slice(s+1,s+i+3)),f=In(f,[["enter",y,n]]),f=In(f,Ec(n.parser.constructs.insideSpan.null,e.slice(s+i+4,c-3),n)),f=In(f,[["exit",y,n],e[c-2],e[c-1],["exit",h,n]]),f=In(f,e.slice(c+1)),f=In(f,[["exit",d,n]]),kn(e,s,e.length,f),e}function m_(e,n,l){const i=this;let o=i.events.length,s,c;for(;o--;)if((i.events[o][1].type==="labelImage"||i.events[o][1].type==="labelLink")&&!i.events[o][1]._balanced){s=i.events[o][1];break}return f;function f(v){return s?s._inactive?g(v):(c=i.parser.defined.includes(Jn(i.sliceSerialize({start:s.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),d):l(v)}function d(v){return v===40?e.attempt(c_,y,c?y:g)(v):v===91?e.attempt(f_,y,c?h:g)(v):c?y(v):g(v)}function h(v){return e.attempt(d_,y,g)(v)}function y(v){return n(v)}function g(v){return s._balanced=!0,l(v)}}function g_(e,n,l){return i;function i(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),o}function o(g){return et(g)?Eo(e,s)(g):s(g)}function s(g){return g===41?y(g):r2(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function c(g){return et(g)?Eo(e,d)(g):y(g)}function f(g){return l(g)}function d(g){return g===34||g===39||g===40?i2(e,h,l,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):y(g)}function h(g){return et(g)?Eo(e,y)(g):y(g)}function y(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),n):l(g)}}function y_(e,n,l){const i=this;return o;function o(f){return l2.call(i,e,s,c,"reference","referenceMarker","referenceString")(f)}function s(f){return i.parser.defined.includes(Jn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?n(f):l(f)}function c(f){return l(f)}}function x_(e,n,l){return i;function i(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),o}function o(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),n):l(s)}}const v_={name:"labelStartImage",resolveAll:mm.resolveAll,tokenize:b_};function b_(e,n,l){const i=this;return o;function o(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),s}function s(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):l(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in i.parser.constructs?l(f):n(f)}}const w_={name:"labelStartLink",resolveAll:mm.resolveAll,tokenize:S_};function S_(e,n,l){const i=this;return o;function o(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),s}function s(c){return c===94&&"_hiddenFootnoteSupport"in i.parser.constructs?l(c):n(c)}}const xh={name:"lineEnding",tokenize:C_};function C_(e,n){return l;function l(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Pe(e,n,"linePrefix")}}const Ou={name:"thematicBreak",tokenize:k_};function k_(e,n,l){let i=0,o;return s;function s(h){return e.enter("thematicBreak"),c(h)}function c(h){return o=h,f(h)}function f(h){return h===o?(e.enter("thematicBreakSequence"),d(h)):i>=3&&(h===null||Ce(h))?(e.exit("thematicBreak"),n(h)):l(h)}function d(h){return h===o?(e.consume(h),i++,d):(e.exit("thematicBreakSequence"),Le(h)?Pe(e,f,"whitespace")(h):f(h))}}const un={continuation:{tokenize:T_},exit:j_,name:"list",tokenize:A_},E_={partial:!0,tokenize:M_},N_={partial:!0,tokenize:R_};function A_(e,n,l){const i=this,o=i.events[i.events.length-1];let s=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,c=0;return f;function f(b){const k=i.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!i.containerState.marker||b===i.containerState.marker:ap(b)){if(i.containerState.type||(i.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(Ou,l,h)(b):h(b);if(!i.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(b)}return l(b)}function d(b){return ap(b)&&++c<10?(e.consume(b),d):(!i.interrupt||c<2)&&(i.containerState.marker?b===i.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),h(b)):l(b)}function h(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||b,e.check(Xo,i.interrupt?l:y,e.attempt(E_,v,g))}function y(b){return i.containerState.initialBlankLine=!0,s++,v(b)}function g(b){return Le(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),v):l(b)}function v(b){return i.containerState.size=s+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(b)}}function T_(e,n,l){const i=this;return i.containerState._closeFlow=void 0,e.check(Xo,o,s);function o(f){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Pe(e,n,"listItemIndent",i.containerState.size+1)(f)}function s(f){return i.containerState.furtherBlankLines||!Le(f)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,c(f)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(N_,n,c)(f))}function c(f){return i.containerState._closeFlow=!0,i.interrupt=void 0,Pe(e,e.attempt(un,n,l),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function R_(e,n,l){const i=this;return Pe(e,o,"listItemIndent",i.containerState.size+1);function o(s){const c=i.events[i.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===i.containerState.size?n(s):l(s)}}function j_(e){e.exit(this.containerState.type)}function M_(e,n,l){const i=this;return Pe(e,o,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(s){const c=i.events[i.events.length-1];return!Le(s)&&c&&c[1].type==="listItemPrefixWhitespace"?n(s):l(s)}}const t0={name:"setextUnderline",resolveTo:O_,tokenize:D_};function O_(e,n){let l=e.length,i,o,s;for(;l--;)if(e[l][0]==="enter"){if(e[l][1].type==="content"){i=l;break}e[l][1].type==="paragraph"&&(o=l)}else e[l][1].type==="content"&&e.splice(l,1),!s&&e[l][1].type==="definition"&&(s=l);const c={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",s?(e.splice(o,0,["enter",c,n]),e.splice(s+1,0,["exit",e[i][1],n]),e[i][1].end={...e[s][1].end}):e[i][1]=c,e.push(["exit",c,n]),e}function D_(e,n,l){const i=this;let o;return s;function s(h){let y=i.events.length,g;for(;y--;)if(i.events[y][1].type!=="lineEnding"&&i.events[y][1].type!=="linePrefix"&&i.events[y][1].type!=="content"){g=i.events[y][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||g)?(e.enter("setextHeadingLine"),o=h,c(h)):l(h)}function c(h){return e.enter("setextHeadingLineSequence"),f(h)}function f(h){return h===o?(e.consume(h),f):(e.exit("setextHeadingLineSequence"),Le(h)?Pe(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||Ce(h)?(e.exit("setextHeadingLine"),n(h)):l(h)}}const __={tokenize:z_};function z_(e){const n=this,l=e.attempt(Xo,i,e.attempt(this.parser.constructs.flowInitial,o,Pe(e,e.attempt(this.parser.constructs.flow,o,e.attempt(PD,o)),"linePrefix")));return l;function i(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),n.currentConstruct=void 0,l}function o(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n.currentConstruct=void 0,l}}const L_={resolveAll:o2()},B_=a2("string"),U_=a2("text");function a2(e){return{resolveAll:o2(e==="text"?H_:void 0),tokenize:n};function n(l){const i=this,o=this.parser.constructs[e],s=l.attempt(o,c,f);return c;function c(y){return h(y)?s(y):f(y)}function f(y){if(y===null){l.consume(y);return}return l.enter("data"),l.consume(y),d}function d(y){return h(y)?(l.exit("data"),s(y)):(l.consume(y),d)}function h(y){if(y===null)return!0;const g=o[y];let v=-1;if(g)for(;++v<g.length;){const b=g[v];if(!b.previous||b.previous.call(i,i.previous))return!0}return!1}}}function o2(e){return n;function n(l,i){let o=-1,s;for(;++o<=l.length;)s===void 0?l[o]&&l[o][1].type==="data"&&(s=o,o++):(!l[o]||l[o][1].type!=="data")&&(o!==s+2&&(l[s][1].end=l[o-1][1].end,l.splice(s+2,o-s-2),o=s+2),s=void 0);return e?e(l,i):l}}function H_(e,n){let l=0;for(;++l<=e.length;)if((l===e.length||e[l][1].type==="lineEnding")&&e[l-1][1].type==="data"){const i=e[l-1][1],o=n.sliceStream(i);let s=o.length,c=-1,f=0,d;for(;s--;){const h=o[s];if(typeof h=="string"){for(c=h.length;h.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(h===-2)d=!0,f++;else if(h!==-1){s++;break}}if(n._contentTypeTextTrailing&&l===e.length&&(f=0),f){const h={type:l===e.length||d||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?c:i.start._bufferIndex+c,_index:i.start._index+s,line:i.end.line,column:i.end.column-f,offset:i.end.offset-f},end:{...i.end}};i.end={...h.start},i.start.offset===i.end.offset?Object.assign(i,h):(e.splice(l,0,["enter",h,n],["exit",h,n]),l+=2)}l++}return e}const P_={42:un,43:un,45:un,48:un,49:un,50:un,51:un,52:un,53:un,54:un,55:un,56:un,57:un,62:WS},I_={91:GD},q_={[-2]:yh,[-1]:yh,32:yh},F_={35:ZD,42:Ou,45:[t0,Ou],60:t_,61:t0,95:Ou,96:Wb,126:Wb},V_={38:t2,92:e2},G_={[-5]:xh,[-4]:xh,[-3]:xh,33:v_,38:t2,42:op,60:[wD,s_],91:w_,92:[QD,e2],93:mm,95:op,96:_D},Y_={null:[op,L_]},$_={null:[42,95]},X_={null:[]},Q_=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:$_,contentInitial:I_,disable:X_,document:P_,flow:F_,flowInitial:q_,insideSpan:Y_,string:V_,text:G_},Symbol.toStringTag,{value:"Module"}));function K_(e,n,l){let i={_bufferIndex:-1,_index:0,line:l&&l.line||1,column:l&&l.column||1,offset:l&&l.offset||0};const o={},s=[];let c=[],f=[];const d={attempt:P(I),check:P(O),consume:M,enter:j,exit:D,interrupt:P(O,{interrupt:!0})},h={code:null,containerState:{},defineSkip:C,events:[],now:k,parser:e,previous:null,sliceSerialize:v,sliceStream:b,write:g};let y=n.tokenize.call(h,d);return n.resolveAll&&s.push(n),h;function g(J){return c=In(c,J),E(),c[c.length-1]!==null?[]:(q(n,0),h.events=Ec(s,h.events,h),h.events)}function v(J,ne){return J_(b(J),ne)}function b(J){return Z_(c,J)}function k(){const{_bufferIndex:J,_index:ne,line:W,column:Z,offset:Q}=i;return{_bufferIndex:J,_index:ne,line:W,column:Z,offset:Q}}function C(J){o[J.line]=J.column,H()}function E(){let J;for(;i._index<c.length;){const ne=c[i._index];if(typeof ne=="string")for(J=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===J&&i._bufferIndex<ne.length;)N(ne.charCodeAt(i._bufferIndex));else N(ne)}}function N(J){y=y(J)}function M(J){Ce(J)?(i.line++,i.column=1,i.offset+=J===-3?2:1,H()):J!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===c[i._index].length&&(i._bufferIndex=-1,i._index++)),h.previous=J}function j(J,ne){const W=ne||{};return W.type=J,W.start=k(),h.events.push(["enter",W,h]),f.push(W),W}function D(J){const ne=f.pop();return ne.end=k(),h.events.push(["exit",ne,h]),ne}function I(J,ne){q(J,ne.from)}function O(J,ne){ne.restore()}function P(J,ne){return W;function W(Z,Q,B){let Y,le,de,R;return Array.isArray(Z)?L(Z):"tokenize"in Z?L([Z]):z(Z);function z(ue){return we;function we(Ae){const xe=Ae!==null&&ue[Ae],Ne=Ae!==null&&ue.null,rt=[...Array.isArray(xe)?xe:xe?[xe]:[],...Array.isArray(Ne)?Ne:Ne?[Ne]:[]];return L(rt)(Ae)}}function L(ue){return Y=ue,le=0,ue.length===0?B:T(ue[le])}function T(ue){return we;function we(Ae){return R=re(),de=ue,ue.partial||(h.currentConstruct=ue),ue.name&&h.parser.constructs.disable.null.includes(ue.name)?ce():ue.tokenize.call(ne?Object.assign(Object.create(h),ne):h,d,se,ce)(Ae)}}function se(ue){return J(de,R),Q}function ce(ue){return R.restore(),++le<Y.length?T(Y[le]):B}}}function q(J,ne){J.resolveAll&&!s.includes(J)&&s.push(J),J.resolve&&kn(h.events,ne,h.events.length-ne,J.resolve(h.events.slice(ne),h)),J.resolveTo&&(h.events=J.resolveTo(h.events,h))}function re(){const J=k(),ne=h.previous,W=h.currentConstruct,Z=h.events.length,Q=Array.from(f);return{from:Z,restore:B};function B(){i=J,h.previous=ne,h.currentConstruct=W,h.events.length=Z,f=Q,H()}}function H(){i.line in o&&i.column<2&&(i.column=o[i.line],i.offset+=o[i.line]-1)}}function Z_(e,n){const l=n.start._index,i=n.start._bufferIndex,o=n.end._index,s=n.end._bufferIndex;let c;if(l===o)c=[e[l].slice(i,s)];else{if(c=e.slice(l,o),i>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(i):c.shift()}s>0&&c.push(e[o].slice(0,s))}return c}function J_(e,n){let l=-1;const i=[];let o;for(;++l<e.length;){const s=e[l];let c;if(typeof s=="string")c=s;else switch(s){case-5:{c="\r";break}case-4:{c=`
|
|
380
|
+
`;break}case-3:{c=`\r
|
|
381
|
+
`;break}case-2:{c=n?" ":" ";break}case-1:{if(!n&&o)continue;c=" ";break}default:c=String.fromCharCode(s)}o=s===-2,i.push(c)}return i.join("")}function W_(e){const i={constructs:ZS([Q_,...(e||{}).extensions||[]]),content:o(pD),defined:[],document:o(gD),flow:o(__),lazy:{},string:o(B_),text:o(U_)};return i;function o(s){return c;function c(f){return K_(i,s,f)}}}function ez(e){for(;!n2(e););return e}const n0=/[\0\t\n\r]/g;function tz(){let e=1,n="",l=!0,i;return o;function o(s,c,f){const d=[];let h,y,g,v,b;for(s=n+(typeof s=="string"?s.toString():new TextDecoder(c||void 0).decode(s)),g=0,n="",l&&(s.charCodeAt(0)===65279&&g++,l=void 0);g<s.length;){if(n0.lastIndex=g,h=n0.exec(s),v=h&&h.index!==void 0?h.index:s.length,b=s.charCodeAt(v),!h){n=s.slice(g);break}if(b===10&&g===v&&i)d.push(-3),i=void 0;else switch(i&&(d.push(-5),i=void 0),g<v&&(d.push(s.slice(g,v)),e+=v-g),b){case 0:{d.push(65533),e++;break}case 9:{for(y=Math.ceil(e/4)*4,d.push(-2);e++<y;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:i=!0,e=1}g=v+1}return f&&(i&&d.push(-5),n&&d.push(n),d.push(null)),d}}const nz=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function rz(e){return e.replace(nz,lz)}function lz(e,n,l){if(n)return n;if(l.charCodeAt(0)===35){const o=l.charCodeAt(1),s=o===120||o===88;return JS(l.slice(s?2:1),s?16:10)}return pm(l)||e}const s2={}.hasOwnProperty;function iz(e,n,l){return n&&typeof n=="object"&&(l=n,n=void 0),az(l)(ez(W_(l).document().write(tz()(e,n,!0))))}function az(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(zt),autolinkProtocol:re,autolinkEmail:re,atxHeading:s(Dt),blockQuote:s(Ne),characterEscape:re,characterReference:re,codeFenced:s(rt),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:s(rt,c),codeText:s(tt,c),codeTextData:re,data:re,codeFlowValue:re,definition:s(at),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:s(Ye),hardBreakEscape:s(_t),hardBreakTrailing:s(_t),htmlFlow:s(Fn,c),htmlFlowData:re,htmlText:s(Fn,c),htmlTextData:re,image:s(Vn),label:c,link:s(zt),listItem:s(Nn),listItemValue:v,listOrdered:s(Lt,g),listUnordered:s(Lt),paragraph:s(lr),reference:T,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:s(Dt),strong:s($r),thematicBreak:s(Xr)},exit:{atxHeading:d(),atxHeadingSequence:I,autolink:d(),autolinkEmail:xe,autolinkProtocol:Ae,blockQuote:d(),characterEscapeValue:H,characterReferenceMarkerHexadecimal:ce,characterReferenceMarkerNumeric:ce,characterReferenceValue:ue,characterReference:we,codeFenced:d(E),codeFencedFence:C,codeFencedFenceInfo:b,codeFencedFenceMeta:k,codeFlowValue:H,codeIndented:d(N),codeText:d(Q),codeTextData:H,data:H,definition:d(),definitionDestinationString:D,definitionLabelString:M,definitionTitleString:j,emphasis:d(),hardBreakEscape:d(ne),hardBreakTrailing:d(ne),htmlFlow:d(W),htmlFlowData:H,htmlText:d(Z),htmlTextData:H,image:d(Y),label:de,labelText:le,lineEnding:J,link:d(B),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:se,resourceDestinationString:R,resourceTitleString:z,resource:L,setextHeading:d(q),setextHeadingLineSequence:P,setextHeadingText:O,strong:d(),thematicBreak:d()}};u2(n,(e||{}).mdastExtensions||[]);const l={};return i;function i(te){let $={type:"root",children:[]};const oe={stack:[$],tokenStack:[],config:n,enter:f,exit:h,buffer:c,resume:y,data:l},he=[];let be=-1;for(;++be<te.length;)if(te[be][1].type==="listOrdered"||te[be][1].type==="listUnordered")if(te[be][0]==="enter")he.push(be);else{const Oe=he.pop();be=o(te,Oe,be)}for(be=-1;++be<te.length;){const Oe=n[te[be][0]];s2.call(Oe,te[be][1].type)&&Oe[te[be][1].type].call(Object.assign({sliceSerialize:te[be][2].sliceSerialize},oe),te[be][1])}if(oe.tokenStack.length>0){const Oe=oe.tokenStack[oe.tokenStack.length-1];(Oe[1]||r0).call(oe,void 0,Oe[0])}for($.position={start:wl(te.length>0?te[0][1].start:{line:1,column:1,offset:0}),end:wl(te.length>0?te[te.length-2][1].end:{line:1,column:1,offset:0})},be=-1;++be<n.transforms.length;)$=n.transforms[be]($)||$;return $}function o(te,$,oe){let he=$-1,be=-1,Oe=!1,dn,Bt,dt,Tt;for(;++he<=oe;){const $e=te[he];switch($e[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{$e[0]==="enter"?be++:be--,Tt=void 0;break}case"lineEndingBlank":{$e[0]==="enter"&&(dn&&!Tt&&!be&&!dt&&(dt=he),Tt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Tt=void 0}if(!be&&$e[0]==="enter"&&$e[1].type==="listItemPrefix"||be===-1&&$e[0]==="exit"&&($e[1].type==="listUnordered"||$e[1].type==="listOrdered")){if(dn){let ir=he;for(Bt=void 0;ir--;){const Zt=te[ir];if(Zt[1].type==="lineEnding"||Zt[1].type==="lineEndingBlank"){if(Zt[0]==="exit")continue;Bt&&(te[Bt][1].type="lineEndingBlank",Oe=!0),Zt[1].type="lineEnding",Bt=ir}else if(!(Zt[1].type==="linePrefix"||Zt[1].type==="blockQuotePrefix"||Zt[1].type==="blockQuotePrefixWhitespace"||Zt[1].type==="blockQuoteMarker"||Zt[1].type==="listItemIndent"))break}dt&&(!Bt||dt<Bt)&&(dn._spread=!0),dn.end=Object.assign({},Bt?te[Bt][1].start:$e[1].end),te.splice(Bt||he,0,["exit",dn,$e[2]]),he++,oe++}if($e[1].type==="listItemPrefix"){const ir={type:"listItem",_spread:!1,start:Object.assign({},$e[1].start),end:void 0};dn=ir,te.splice(he,0,["enter",ir,$e[2]]),he++,oe++,dt=void 0,Tt=!0}}}return te[$][1]._spread=Oe,oe}function s(te,$){return oe;function oe(he){f.call(this,te(he),he),$&&$.call(this,he)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(te,$,oe){this.stack[this.stack.length-1].children.push(te),this.stack.push(te),this.tokenStack.push([$,oe||void 0]),te.position={start:wl($.start),end:void 0}}function d(te){return $;function $(oe){te&&te.call(this,oe),h.call(this,oe)}}function h(te,$){const oe=this.stack.pop(),he=this.tokenStack.pop();if(he)he[0].type!==te.type&&($?$.call(this,te,he[0]):(he[1]||r0).call(this,te,he[0]));else throw new Error("Cannot close `"+te.type+"` ("+ko({start:te.start,end:te.end})+"): it’s not open");oe.position.end=wl(te.end)}function y(){return hm(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function v(te){if(this.data.expectingFirstListItemValue){const $=this.stack[this.stack.length-2];$.start=Number.parseInt(this.sliceSerialize(te),10),this.data.expectingFirstListItemValue=void 0}}function b(){const te=this.resume(),$=this.stack[this.stack.length-1];$.lang=te}function k(){const te=this.resume(),$=this.stack[this.stack.length-1];$.meta=te}function C(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const te=this.resume(),$=this.stack[this.stack.length-1];$.value=te.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function N(){const te=this.resume(),$=this.stack[this.stack.length-1];$.value=te.replace(/(\r?\n|\r)$/g,"")}function M(te){const $=this.resume(),oe=this.stack[this.stack.length-1];oe.label=$,oe.identifier=Jn(this.sliceSerialize(te)).toLowerCase()}function j(){const te=this.resume(),$=this.stack[this.stack.length-1];$.title=te}function D(){const te=this.resume(),$=this.stack[this.stack.length-1];$.url=te}function I(te){const $=this.stack[this.stack.length-1];if(!$.depth){const oe=this.sliceSerialize(te).length;$.depth=oe}}function O(){this.data.setextHeadingSlurpLineEnding=!0}function P(te){const $=this.stack[this.stack.length-1];$.depth=this.sliceSerialize(te).codePointAt(0)===61?1:2}function q(){this.data.setextHeadingSlurpLineEnding=void 0}function re(te){const oe=this.stack[this.stack.length-1].children;let he=oe[oe.length-1];(!he||he.type!=="text")&&(he=ft(),he.position={start:wl(te.start),end:void 0},oe.push(he)),this.stack.push(he)}function H(te){const $=this.stack.pop();$.value+=this.sliceSerialize(te),$.position.end=wl(te.end)}function J(te){const $=this.stack[this.stack.length-1];if(this.data.atHardBreak){const oe=$.children[$.children.length-1];oe.position.end=wl(te.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes($.type)&&(re.call(this,te),H.call(this,te))}function ne(){this.data.atHardBreak=!0}function W(){const te=this.resume(),$=this.stack[this.stack.length-1];$.value=te}function Z(){const te=this.resume(),$=this.stack[this.stack.length-1];$.value=te}function Q(){const te=this.resume(),$=this.stack[this.stack.length-1];$.value=te}function B(){const te=this.stack[this.stack.length-1];if(this.data.inReference){const $=this.data.referenceType||"shortcut";te.type+="Reference",te.referenceType=$,delete te.url,delete te.title}else delete te.identifier,delete te.label;this.data.referenceType=void 0}function Y(){const te=this.stack[this.stack.length-1];if(this.data.inReference){const $=this.data.referenceType||"shortcut";te.type+="Reference",te.referenceType=$,delete te.url,delete te.title}else delete te.identifier,delete te.label;this.data.referenceType=void 0}function le(te){const $=this.sliceSerialize(te),oe=this.stack[this.stack.length-2];oe.label=rz($),oe.identifier=Jn($).toLowerCase()}function de(){const te=this.stack[this.stack.length-1],$=this.resume(),oe=this.stack[this.stack.length-1];if(this.data.inReference=!0,oe.type==="link"){const he=te.children;oe.children=he}else oe.alt=$}function R(){const te=this.resume(),$=this.stack[this.stack.length-1];$.url=te}function z(){const te=this.resume(),$=this.stack[this.stack.length-1];$.title=te}function L(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function se(te){const $=this.resume(),oe=this.stack[this.stack.length-1];oe.label=$,oe.identifier=Jn(this.sliceSerialize(te)).toLowerCase(),this.data.referenceType="full"}function ce(te){this.data.characterReferenceType=te.type}function ue(te){const $=this.sliceSerialize(te),oe=this.data.characterReferenceType;let he;oe?(he=JS($,oe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):he=pm($);const be=this.stack[this.stack.length-1];be.value+=he}function we(te){const $=this.stack.pop();$.position.end=wl(te.end)}function Ae(te){H.call(this,te);const $=this.stack[this.stack.length-1];$.url=this.sliceSerialize(te)}function xe(te){H.call(this,te);const $=this.stack[this.stack.length-1];$.url="mailto:"+this.sliceSerialize(te)}function Ne(){return{type:"blockquote",children:[]}}function rt(){return{type:"code",lang:null,meta:null,value:""}}function tt(){return{type:"inlineCode",value:""}}function at(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ye(){return{type:"emphasis",children:[]}}function Dt(){return{type:"heading",depth:0,children:[]}}function _t(){return{type:"break"}}function Fn(){return{type:"html",value:""}}function Vn(){return{type:"image",title:null,url:"",alt:null}}function zt(){return{type:"link",title:null,url:"",children:[]}}function Lt(te){return{type:"list",ordered:te.type==="listOrdered",start:null,spread:te._spread,children:[]}}function Nn(te){return{type:"listItem",spread:te._spread,checked:null,children:[]}}function lr(){return{type:"paragraph",children:[]}}function $r(){return{type:"strong",children:[]}}function ft(){return{type:"text",value:""}}function Xr(){return{type:"thematicBreak"}}}function wl(e){return{line:e.line,column:e.column,offset:e.offset}}function u2(e,n){let l=-1;for(;++l<n.length;){const i=n[l];Array.isArray(i)?u2(e,i):oz(e,i)}}function oz(e,n){let l;for(l in n)if(s2.call(n,l))switch(l){case"canContainEols":{const i=n[l];i&&e[l].push(...i);break}case"transforms":{const i=n[l];i&&e[l].push(...i);break}case"enter":case"exit":{const i=n[l];i&&Object.assign(e[l],i);break}}}function r0(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+ko({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+ko({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+ko({start:n.start,end:n.end})+") is still open")}function sz(e){const n=this;n.parser=l;function l(i){return iz(i,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function uz(e,n){const l={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,l),e.applyData(n,l)}function cz(e,n){const l={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,l),[e.applyData(n,l),{type:"text",value:`
|
|
382
|
+
`}]}function fz(e,n){const l=n.value?n.value+`
|
|
383
|
+
`:"",i={},o=n.lang?n.lang.split(/\s+/):[];o.length>0&&(i.className=["language-"+o[0]]);let s={type:"element",tagName:"code",properties:i,children:[{type:"text",value:l}]};return n.meta&&(s.data={meta:n.meta}),e.patch(n,s),s=e.applyData(n,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(n,s),s}function dz(e,n){const l={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,l),e.applyData(n,l)}function hz(e,n){const l={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,l),e.applyData(n,l)}function pz(e,n){const l=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(n.identifier).toUpperCase(),o=xa(i.toLowerCase()),s=e.footnoteOrder.indexOf(i);let c,f=e.footnoteCounts.get(i);f===void 0?(f=0,e.footnoteOrder.push(i),c=e.footnoteOrder.length):c=s+1,f+=1,e.footnoteCounts.set(i,f);const d={type:"element",tagName:"a",properties:{href:"#"+l+"fn-"+o,id:l+"fnref-"+o+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(n,d);const h={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(n,h),e.applyData(n,h)}function mz(e,n){const l={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,l),e.applyData(n,l)}function gz(e,n){if(e.options.allowDangerousHtml){const l={type:"raw",value:n.value};return e.patch(n,l),e.applyData(n,l)}}function c2(e,n){const l=n.referenceType;let i="]";if(l==="collapsed"?i+="[]":l==="full"&&(i+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+i}];const o=e.all(n),s=o[0];s&&s.type==="text"?s.value="["+s.value:o.unshift({type:"text",value:"["});const c=o[o.length-1];return c&&c.type==="text"?c.value+=i:o.push({type:"text",value:i}),o}function yz(e,n){const l=String(n.identifier).toUpperCase(),i=e.definitionById.get(l);if(!i)return c2(e,n);const o={src:xa(i.url||""),alt:n.alt};i.title!==null&&i.title!==void 0&&(o.title=i.title);const s={type:"element",tagName:"img",properties:o,children:[]};return e.patch(n,s),e.applyData(n,s)}function xz(e,n){const l={src:xa(n.url)};n.alt!==null&&n.alt!==void 0&&(l.alt=n.alt),n.title!==null&&n.title!==void 0&&(l.title=n.title);const i={type:"element",tagName:"img",properties:l,children:[]};return e.patch(n,i),e.applyData(n,i)}function vz(e,n){const l={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,l);const i={type:"element",tagName:"code",properties:{},children:[l]};return e.patch(n,i),e.applyData(n,i)}function bz(e,n){const l=String(n.identifier).toUpperCase(),i=e.definitionById.get(l);if(!i)return c2(e,n);const o={href:xa(i.url||"")};i.title!==null&&i.title!==void 0&&(o.title=i.title);const s={type:"element",tagName:"a",properties:o,children:e.all(n)};return e.patch(n,s),e.applyData(n,s)}function wz(e,n){const l={href:xa(n.url)};n.title!==null&&n.title!==void 0&&(l.title=n.title);const i={type:"element",tagName:"a",properties:l,children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function Sz(e,n,l){const i=e.all(n),o=l?Cz(l):f2(n),s={},c=[];if(typeof n.checked=="boolean"){const y=i[0];let g;y&&y.type==="element"&&y.tagName==="p"?g=y:(g={type:"element",tagName:"p",properties:{},children:[]},i.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let f=-1;for(;++f<i.length;){const y=i[f];(o||f!==0||y.type!=="element"||y.tagName!=="p")&&c.push({type:"text",value:`
|
|
384
|
+
`}),y.type==="element"&&y.tagName==="p"&&!o?c.push(...y.children):c.push(y)}const d=i[i.length-1];d&&(o||d.type!=="element"||d.tagName!=="p")&&c.push({type:"text",value:`
|
|
385
|
+
`});const h={type:"element",tagName:"li",properties:s,children:c};return e.patch(n,h),e.applyData(n,h)}function Cz(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const l=e.children;let i=-1;for(;!n&&++i<l.length;)n=f2(l[i])}return n}function f2(e){const n=e.spread;return n??e.children.length>1}function kz(e,n){const l={},i=e.all(n);let o=-1;for(typeof n.start=="number"&&n.start!==1&&(l.start=n.start);++o<i.length;){const c=i[o];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){l.className=["contains-task-list"];break}}const s={type:"element",tagName:n.ordered?"ol":"ul",properties:l,children:e.wrap(i,!0)};return e.patch(n,s),e.applyData(n,s)}function Ez(e,n){const l={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,l),e.applyData(n,l)}function Nz(e,n){const l={type:"root",children:e.wrap(e.all(n))};return e.patch(n,l),e.applyData(n,l)}function Az(e,n){const l={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,l),e.applyData(n,l)}function Tz(e,n){const l=e.all(n),i=l.shift(),o=[];if(i){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(n.children[0],c),o.push(c)}if(l.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(l,!0)},f=um(n.children[1]),d=VS(n.children[n.children.length-1]);f&&d&&(c.position={start:f,end:d}),o.push(c)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(n,s),e.applyData(n,s)}function Rz(e,n,l){const i=l?l.children:void 0,s=(i?i.indexOf(n):1)===0?"th":"td",c=l&&l.type==="table"?l.align:void 0,f=c?c.length:n.children.length;let d=-1;const h=[];for(;++d<f;){const g=n.children[d],v={},b=c?c[d]:void 0;b&&(v.align=b);let k={type:"element",tagName:s,properties:v,children:[]};g&&(k.children=e.all(g),e.patch(g,k),k=e.applyData(g,k)),h.push(k)}const y={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(n,y),e.applyData(n,y)}function jz(e,n){const l={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,l),e.applyData(n,l)}const l0=9,i0=32;function Mz(e){const n=String(e),l=/\r?\n|\r/g;let i=l.exec(n),o=0;const s=[];for(;i;)s.push(a0(n.slice(o,i.index),o>0,!0),i[0]),o=i.index+i[0].length,i=l.exec(n);return s.push(a0(n.slice(o),o>0,!1)),s.join("")}function a0(e,n,l){let i=0,o=e.length;if(n){let s=e.codePointAt(i);for(;s===l0||s===i0;)i++,s=e.codePointAt(i)}if(l){let s=e.codePointAt(o-1);for(;s===l0||s===i0;)o--,s=e.codePointAt(o-1)}return o>i?e.slice(i,o):""}function Oz(e,n){const l={type:"text",value:Mz(String(n.value))};return e.patch(n,l),e.applyData(n,l)}function Dz(e,n){const l={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,l),e.applyData(n,l)}const _z={blockquote:uz,break:cz,code:fz,delete:dz,emphasis:hz,footnoteReference:pz,heading:mz,html:gz,imageReference:yz,image:xz,inlineCode:vz,linkReference:bz,link:wz,listItem:Sz,list:kz,paragraph:Ez,root:Nz,strong:Az,table:Tz,tableCell:jz,tableRow:Rz,text:Oz,thematicBreak:Dz,toml:bu,yaml:bu,definition:bu,footnoteDefinition:bu};function bu(){}const d2=-1,Nc=0,No=1,Ku=2,gm=3,ym=4,xm=5,vm=6,h2=7,p2=8,o0=typeof self=="object"?self:globalThis,zz=(e,n)=>{const l=(o,s)=>(e.set(s,o),o),i=o=>{if(e.has(o))return e.get(o);const[s,c]=n[o];switch(s){case Nc:case d2:return l(c,o);case No:{const f=l([],o);for(const d of c)f.push(i(d));return f}case Ku:{const f=l({},o);for(const[d,h]of c)f[i(d)]=i(h);return f}case gm:return l(new Date(c),o);case ym:{const{source:f,flags:d}=c;return l(new RegExp(f,d),o)}case xm:{const f=l(new Map,o);for(const[d,h]of c)f.set(i(d),i(h));return f}case vm:{const f=l(new Set,o);for(const d of c)f.add(i(d));return f}case h2:{const{name:f,message:d}=c;return l(new o0[f](d),o)}case p2:return l(BigInt(c),o);case"BigInt":return l(Object(BigInt(c)),o);case"ArrayBuffer":return l(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return l(new DataView(f),c)}}return l(new o0[s](c),o)};return i},s0=e=>zz(new Map,e)(0),Wi="",{toString:Lz}={},{keys:Bz}=Object,yo=e=>{const n=typeof e;if(n!=="object"||!e)return[Nc,n];const l=Lz.call(e).slice(8,-1);switch(l){case"Array":return[No,Wi];case"Object":return[Ku,Wi];case"Date":return[gm,Wi];case"RegExp":return[ym,Wi];case"Map":return[xm,Wi];case"Set":return[vm,Wi];case"DataView":return[No,l]}return l.includes("Array")?[No,l]:l.includes("Error")?[h2,l]:[Ku,l]},wu=([e,n])=>e===Nc&&(n==="function"||n==="symbol"),Uz=(e,n,l,i)=>{const o=(c,f)=>{const d=i.push(c)-1;return l.set(f,d),d},s=c=>{if(l.has(c))return l.get(c);let[f,d]=yo(c);switch(f){case Nc:{let y=c;switch(d){case"bigint":f=p2,y=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);y=null;break;case"undefined":return o([d2],c)}return o([f,y],c)}case No:{if(d){let v=c;return d==="DataView"?v=new Uint8Array(c.buffer):d==="ArrayBuffer"&&(v=new Uint8Array(c)),o([d,[...v]],c)}const y=[],g=o([f,y],c);for(const v of c)y.push(s(v));return g}case Ku:{if(d)switch(d){case"BigInt":return o([d,c.toString()],c);case"Boolean":case"Number":case"String":return o([d,c.valueOf()],c)}if(n&&"toJSON"in c)return s(c.toJSON());const y=[],g=o([f,y],c);for(const v of Bz(c))(e||!wu(yo(c[v])))&&y.push([s(v),s(c[v])]);return g}case gm:return o([f,c.toISOString()],c);case ym:{const{source:y,flags:g}=c;return o([f,{source:y,flags:g}],c)}case xm:{const y=[],g=o([f,y],c);for(const[v,b]of c)(e||!(wu(yo(v))||wu(yo(b))))&&y.push([s(v),s(b)]);return g}case vm:{const y=[],g=o([f,y],c);for(const v of c)(e||!wu(yo(v)))&&y.push(s(v));return g}}const{message:h}=c;return o([f,{name:d,message:h}],c)};return s},u0=(e,{json:n,lossy:l}={})=>{const i=[];return Uz(!(n||l),!!n,new Map,i)(e),i},Zu=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?s0(u0(e,n)):structuredClone(e):(e,n)=>s0(u0(e,n));function Hz(e,n){const l=[{type:"text",value:"↩"}];return n>1&&l.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),l}function Pz(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function Iz(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",l=e.options.footnoteBackContent||Hz,i=e.options.footnoteBackLabel||Pz,o=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let d=-1;for(;++d<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[d]);if(!h)continue;const y=e.all(h),g=String(h.identifier).toUpperCase(),v=xa(g.toLowerCase());let b=0;const k=[],C=e.footnoteCounts.get(g);for(;C!==void 0&&++b<=C;){k.length>0&&k.push({type:"text",value:" "});let M=typeof l=="string"?l:l(d,b);typeof M=="string"&&(M={type:"text",value:M}),k.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+v+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(d,b),className:["data-footnote-backref"]},children:Array.isArray(M)?M:[M]})}const E=y[y.length-1];if(E&&E.type==="element"&&E.tagName==="p"){const M=E.children[E.children.length-1];M&&M.type==="text"?M.value+=" ":E.children.push({type:"text",value:" "}),E.children.push(...k)}else y.push(...k);const N={type:"element",tagName:"li",properties:{id:n+"fn-"+v},children:e.wrap(y,!0)};e.patch(h,N),f.push(N)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Zu(c),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
386
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
|
|
387
|
+
`}]}}const Ac=(function(e){if(e==null)return Gz;if(typeof e=="function")return Tc(e);if(typeof e=="object")return Array.isArray(e)?qz(e):Fz(e);if(typeof e=="string")return Vz(e);throw new Error("Expected function, string, or object as test")});function qz(e){const n=[];let l=-1;for(;++l<e.length;)n[l]=Ac(e[l]);return Tc(i);function i(...o){let s=-1;for(;++s<n.length;)if(n[s].apply(this,o))return!0;return!1}}function Fz(e){const n=e;return Tc(l);function l(i){const o=i;let s;for(s in e)if(o[s]!==n[s])return!1;return!0}}function Vz(e){return Tc(n);function n(l){return l&&l.type===e}}function Tc(e){return n;function n(l,i,o){return!!(Yz(l)&&e.call(this,l,typeof i=="number"?i:void 0,o||void 0))}}function Gz(){return!0}function Yz(e){return e!==null&&typeof e=="object"&&"type"in e}const m2=[],$z=!0,sp=!1,Xz="skip";function g2(e,n,l,i){let o;typeof n=="function"&&typeof l!="function"?(i=l,l=n):o=n;const s=Ac(o),c=i?-1:1;f(e,void 0,[])();function f(d,h,y){const g=d&&typeof d=="object"?d:{};if(typeof g.type=="string"){const b=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(d.type+(b?"<"+b+">":""))+")"})}return v;function v(){let b=m2,k,C,E;if((!n||s(d,h,y[y.length-1]||void 0))&&(b=Qz(l(d,y)),b[0]===sp))return b;if("children"in d&&d.children){const N=d;if(N.children&&b[0]!==Xz)for(C=(i?N.children.length:-1)+c,E=y.concat(N);C>-1&&C<N.children.length;){const M=N.children[C];if(k=f(M,C,E)(),k[0]===sp)return k;C=typeof k[1]=="number"?k[1]:C+c}}return b}}}function Qz(e){return Array.isArray(e)?e:typeof e=="number"?[$z,e]:e==null?m2:[e]}function bm(e,n,l,i){let o,s,c;typeof n=="function"&&typeof l!="function"?(s=void 0,c=n,o=l):(s=n,c=l,o=i),g2(e,s,f,o);function f(d,h){const y=h[h.length-1],g=y?y.children.indexOf(d):void 0;return c(d,g,y)}}const up={}.hasOwnProperty,Kz={};function Zz(e,n){const l=n||Kz,i=new Map,o=new Map,s=new Map,c={..._z,...l.handlers},f={all:h,applyData:Wz,definitionById:i,footnoteById:o,footnoteCounts:s,footnoteOrder:[],handlers:c,one:d,options:l,patch:Jz,wrap:t6};return bm(e,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const g=y.type==="definition"?i:o,v=String(y.identifier).toUpperCase();g.has(v)||g.set(v,y)}}),f;function d(y,g){const v=y.type,b=f.handlers[v];if(up.call(f.handlers,v)&&b)return b(f,y,g);if(f.options.passThrough&&f.options.passThrough.includes(v)){if("children"in y){const{children:C,...E}=y,N=Zu(E);return N.children=f.all(y),N}return Zu(y)}return(f.options.unknownHandler||e6)(f,y,g)}function h(y){const g=[];if("children"in y){const v=y.children;let b=-1;for(;++b<v.length;){const k=f.one(v[b],y);if(k){if(b&&v[b-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=c0(k.value)),!Array.isArray(k)&&k.type==="element")){const C=k.children[0];C&&C.type==="text"&&(C.value=c0(C.value))}Array.isArray(k)?g.push(...k):g.push(k)}}}return g}}function Jz(e,n){e.position&&(n.position=PO(e))}function Wz(e,n){let l=n;if(e&&e.data){const i=e.data.hName,o=e.data.hChildren,s=e.data.hProperties;if(typeof i=="string")if(l.type==="element")l.tagName=i;else{const c="children"in l?l.children:[l];l={type:"element",tagName:i,properties:{},children:c}}l.type==="element"&&s&&Object.assign(l.properties,Zu(s)),"children"in l&&l.children&&o!==null&&o!==void 0&&(l.children=o)}return l}function e6(e,n){const l=n.data||{},i="value"in n&&!(up.call(l,"hProperties")||up.call(l,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function t6(e,n){const l=[];let i=-1;for(n&&l.push({type:"text",value:`
|
|
388
|
+
`});++i<e.length;)i&&l.push({type:"text",value:`
|
|
389
|
+
`}),l.push(e[i]);return n&&e.length>0&&l.push({type:"text",value:`
|
|
390
|
+
`}),l}function c0(e){let n=0,l=e.charCodeAt(n);for(;l===9||l===32;)n++,l=e.charCodeAt(n);return e.slice(n)}function f0(e,n){const l=Zz(e,n),i=l.one(e,void 0),o=Iz(l),s=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return o&&s.children.push({type:"text",value:`
|
|
391
|
+
`},o),s}function n6(e,n){return e&&"run"in e?async function(l,i){const o=f0(l,{file:i,...n});await e.run(o,i)}:function(l,i){return f0(l,{file:i,...e||n})}}function d0(e){if(e)throw e}var vh,h0;function r6(){if(h0)return vh;h0=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,l=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(h){return typeof Array.isArray=="function"?Array.isArray(h):n.call(h)==="[object Array]"},s=function(h){if(!h||n.call(h)!=="[object Object]")return!1;var y=e.call(h,"constructor"),g=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!y&&!g)return!1;var v;for(v in h);return typeof v>"u"||e.call(h,v)},c=function(h,y){l&&y.name==="__proto__"?l(h,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):h[y.name]=y.newValue},f=function(h,y){if(y==="__proto__")if(e.call(h,y)){if(i)return i(h,y).value}else return;return h[y]};return vh=function d(){var h,y,g,v,b,k,C=arguments[0],E=1,N=arguments.length,M=!1;for(typeof C=="boolean"&&(M=C,C=arguments[1]||{},E=2),(C==null||typeof C!="object"&&typeof C!="function")&&(C={});E<N;++E)if(h=arguments[E],h!=null)for(y in h)g=f(C,y),v=f(h,y),C!==v&&(M&&v&&(s(v)||(b=o(v)))?(b?(b=!1,k=g&&o(g)?g:[]):k=g&&s(g)?g:{},c(C,{name:y,newValue:d(M,k,v)})):typeof v<"u"&&c(C,{name:y,newValue:v}));return C},vh}var l6=r6();const bh=ec(l6);function cp(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function i6(){const e=[],n={run:l,use:i};return n;function l(...o){let s=-1;const c=o.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...o);function f(d,...h){const y=e[++s];let g=-1;if(d){c(d);return}for(;++g<o.length;)(h[g]===null||h[g]===void 0)&&(h[g]=o[g]);o=h,y?a6(y,f)(...h):c(null,...h)}}function i(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),n}}function a6(e,n){let l;return i;function i(...c){const f=e.length>c.length;let d;f&&c.push(o);try{d=e.apply(this,c)}catch(h){const y=h;if(f&&l)throw y;return o(y)}f||(d&&d.then&&typeof d.then=="function"?d.then(s,o):d instanceof Error?o(d):s(d))}function o(c,...f){l||(l=!0,n(c,...f))}function s(c){o(null,c)}}const cr={basename:o6,dirname:s6,extname:u6,join:c6,sep:"/"};function o6(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Qo(e);let l=0,i=-1,o=e.length,s;if(n===void 0||n.length===0||n.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(s){l=o+1;break}}else i<0&&(s=!0,i=o+1);return i<0?"":e.slice(l,i)}if(n===e)return"";let c=-1,f=n.length-1;for(;o--;)if(e.codePointAt(o)===47){if(s){l=o+1;break}}else c<0&&(s=!0,c=o+1),f>-1&&(e.codePointAt(o)===n.codePointAt(f--)?f<0&&(i=o):(f=-1,i=c));return l===i?i=c:i<0&&(i=e.length),e.slice(l,i)}function s6(e){if(Qo(e),e.length===0)return".";let n=-1,l=e.length,i;for(;--l;)if(e.codePointAt(l)===47){if(i){n=l;break}}else i||(i=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function u6(e){Qo(e);let n=e.length,l=-1,i=0,o=-1,s=0,c;for(;n--;){const f=e.codePointAt(n);if(f===47){if(c){i=n+1;break}continue}l<0&&(c=!0,l=n+1),f===46?o<0?o=n:s!==1&&(s=1):o>-1&&(s=-1)}return o<0||l<0||s===0||s===1&&o===l-1&&o===i+1?"":e.slice(o,l)}function c6(...e){let n=-1,l;for(;++n<e.length;)Qo(e[n]),e[n]&&(l=l===void 0?e[n]:l+"/"+e[n]);return l===void 0?".":f6(l)}function f6(e){Qo(e);const n=e.codePointAt(0)===47;let l=d6(e,!n);return l.length===0&&!n&&(l="."),l.length>0&&e.codePointAt(e.length-1)===47&&(l+="/"),n?"/"+l:l}function d6(e,n){let l="",i=0,o=-1,s=0,c=-1,f,d;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(o===c-1||s===1))if(o!==c-1&&s===2){if(l.length<2||i!==2||l.codePointAt(l.length-1)!==46||l.codePointAt(l.length-2)!==46){if(l.length>2){if(d=l.lastIndexOf("/"),d!==l.length-1){d<0?(l="",i=0):(l=l.slice(0,d),i=l.length-1-l.lastIndexOf("/")),o=c,s=0;continue}}else if(l.length>0){l="",i=0,o=c,s=0;continue}}n&&(l=l.length>0?l+"/..":"..",i=2)}else l.length>0?l+="/"+e.slice(o+1,c):l=e.slice(o+1,c),i=c-o-1;o=c,s=0}else f===46&&s>-1?s++:s=-1}return l}function Qo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const h6={cwd:p6};function p6(){return"/"}function fp(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function m6(e){if(typeof e=="string")e=new URL(e);else if(!fp(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return g6(e)}function g6(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const n=e.pathname;let l=-1;for(;++l<n.length;)if(n.codePointAt(l)===37&&n.codePointAt(l+1)===50){const i=n.codePointAt(l+2);if(i===70||i===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(n)}const wh=["history","path","basename","stem","extname","dirname"];class y2{constructor(n){let l;n?fp(n)?l={path:n}:typeof n=="string"||y6(n)?l={value:n}:l=n:l={},this.cwd="cwd"in l?"":h6.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<wh.length;){const s=wh[i];s in l&&l[s]!==void 0&&l[s]!==null&&(this[s]=s==="history"?[...l[s]]:l[s])}let o;for(o in l)wh.includes(o)||(this[o]=l[o])}get basename(){return typeof this.path=="string"?cr.basename(this.path):void 0}set basename(n){Ch(n,"basename"),Sh(n,"basename"),this.path=cr.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?cr.dirname(this.path):void 0}set dirname(n){p0(this.basename,"dirname"),this.path=cr.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?cr.extname(this.path):void 0}set extname(n){if(Sh(n,"extname"),p0(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=cr.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){fp(n)&&(n=m6(n)),Ch(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?cr.basename(this.path,this.extname):void 0}set stem(n){Ch(n,"stem"),Sh(n,"stem"),this.path=cr.join(this.dirname||"",n+(this.extname||""))}fail(n,l,i){const o=this.message(n,l,i);throw o.fatal=!0,o}info(n,l,i){const o=this.message(n,l,i);return o.fatal=void 0,o}message(n,l,i){const o=new $t(n,l,i);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function Sh(e,n){if(e&&e.includes(cr.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+cr.sep+"`")}function Ch(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function p0(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function y6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const x6=(function(e){const i=this.constructor.prototype,o=i[e],s=function(){return o.apply(s,arguments)};return Object.setPrototypeOf(s,i),s}),v6={}.hasOwnProperty;class wm extends x6{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=i6()}copy(){const n=new wm;let l=-1;for(;++l<this.attachers.length;){const i=this.attachers[l];n.use(...i)}return n.data(bh(!0,{},this.namespace)),n}data(n,l){return typeof n=="string"?arguments.length===2?(Nh("data",this.frozen),this.namespace[n]=l,this):v6.call(this.namespace,n)&&this.namespace[n]||void 0:n?(Nh("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[l,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const o=l.call(n,...i);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const l=Su(n),i=this.parser||this.Parser;return kh("parse",i),i(String(l),l)}process(n,l){const i=this;return this.freeze(),kh("process",this.parser||this.Parser),Eh("process",this.compiler||this.Compiler),l?o(void 0,l):new Promise(o);function o(s,c){const f=Su(n),d=i.parse(f);i.run(d,f,function(y,g,v){if(y||!g||!v)return h(y);const b=g,k=i.stringify(b,v);S6(k)?v.value=k:v.result=k,h(y,v)});function h(y,g){y||!g?c(y):s?s(g):l(void 0,g)}}}processSync(n){let l=!1,i;return this.freeze(),kh("processSync",this.parser||this.Parser),Eh("processSync",this.compiler||this.Compiler),this.process(n,o),g0("processSync","process",l),i;function o(s,c){l=!0,d0(s),i=c}}run(n,l,i){m0(n),this.freeze();const o=this.transformers;return!i&&typeof l=="function"&&(i=l,l=void 0),i?s(void 0,i):new Promise(s);function s(c,f){const d=Su(l);o.run(n,d,h);function h(y,g,v){const b=g||n;y?f(y):c?c(b):i(void 0,b,v)}}}runSync(n,l){let i=!1,o;return this.run(n,l,s),g0("runSync","run",i),o;function s(c,f){d0(c),o=f,i=!0}}stringify(n,l){this.freeze();const i=Su(l),o=this.compiler||this.Compiler;return Eh("stringify",o),m0(n),o(n,i)}use(n,...l){const i=this.attachers,o=this.namespace;if(Nh("use",this.frozen),n!=null)if(typeof n=="function")d(n,l);else if(typeof n=="object")Array.isArray(n)?f(n):c(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function s(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[y,...g]=h;d(y,g)}else c(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function c(h){if(!("plugins"in h)&&!("settings"in h))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");f(h.plugins),h.settings&&(o.settings=bh(!0,o.settings,h.settings))}function f(h){let y=-1;if(h!=null)if(Array.isArray(h))for(;++y<h.length;){const g=h[y];s(g)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,y){let g=-1,v=-1;for(;++g<i.length;)if(i[g][0]===h){v=g;break}if(v===-1)i.push([h,...y]);else if(y.length>0){let[b,...k]=y;const C=i[v][1];cp(C)&&cp(b)&&(b=bh(!0,C,b)),i[v]=[h,b,...k]}}}}const b6=new wm().freeze();function kh(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Eh(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Nh(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function m0(e){if(!cp(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function g0(e,n,l){if(!l)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Su(e){return w6(e)?e:new y2(e)}function w6(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function S6(e){return typeof e=="string"||C6(e)}function C6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const k6="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",y0=[],x0={allowDangerousHtml:!0},E6=/^(https?|ircs?|mailto|xmpp)$/i,N6=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Rc(e){const n=A6(e),l=T6(e);return R6(n.runSync(n.parse(l),l),e)}function A6(e){const n=e.rehypePlugins||y0,l=e.remarkPlugins||y0,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...x0}:x0;return b6().use(sz).use(l).use(n6,i).use(n)}function T6(e){const n=e.children||"",l=new y2;return typeof n=="string"&&(l.value=n),l}function R6(e,n){const l=n.allowedElements,i=n.allowElement,o=n.components,s=n.disallowedElements,c=n.skipHtml,f=n.unwrapDisallowed,d=n.urlTransform||j6;for(const y of N6)Object.hasOwn(n,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+k6+y.id,void 0);return bm(e,h),GO(e,{Fragment:x.Fragment,components:o,ignoreInvalidStyle:!0,jsx:x.jsx,jsxs:x.jsxs,passKeys:!0,passNode:!0});function h(y,g,v){if(y.type==="raw"&&v&&typeof g=="number")return c?v.children.splice(g,1):v.children[g]={type:"text",value:y.value},g;if(y.type==="element"){let b;for(b in gh)if(Object.hasOwn(gh,b)&&Object.hasOwn(y.properties,b)){const k=y.properties[b],C=gh[b];(C===null||C.includes(y.tagName))&&(y.properties[b]=d(String(k||""),b,y))}}if(y.type==="element"){let b=l?!l.includes(y.tagName):s?s.includes(y.tagName):!1;if(!b&&i&&typeof g=="number"&&(b=!i(y,g,v)),b&&v&&typeof g=="number")return f&&y.children?v.children.splice(g,1,...y.children):v.children.splice(g,1),g}}}function j6(e){const n=e.indexOf(":"),l=e.indexOf("?"),i=e.indexOf("#"),o=e.indexOf("/");return n===-1||o!==-1&&n>o||l!==-1&&n>l||i!==-1&&n>i||E6.test(e.slice(0,n))?e:""}function v0(e,n){const l=String(e);if(typeof n!="string")throw new TypeError("Expected character");let i=0,o=l.indexOf(n);for(;o!==-1;)i++,o=l.indexOf(n,o+n.length);return i}function M6(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function O6(e,n,l){const o=Ac((l||{}).ignore||[]),s=D6(n);let c=-1;for(;++c<s.length;)g2(e,"text",f);function f(h,y){let g=-1,v;for(;++g<y.length;){const b=y[g],k=v?v.children:void 0;if(o(b,k?k.indexOf(b):void 0,v))return;v=b}if(v)return d(h,y)}function d(h,y){const g=y[y.length-1],v=s[c][0],b=s[c][1];let k=0;const E=g.children.indexOf(h);let N=!1,M=[];v.lastIndex=0;let j=v.exec(h.value);for(;j;){const D=j.index,I={index:j.index,input:j.input,stack:[...y,h]};let O=b(...j,I);if(typeof O=="string"&&(O=O.length>0?{type:"text",value:O}:void 0),O===!1?v.lastIndex=D+1:(k!==D&&M.push({type:"text",value:h.value.slice(k,D)}),Array.isArray(O)?M.push(...O):O&&M.push(O),k=D+j[0].length,N=!0),!v.global)break;j=v.exec(h.value)}return N?(k<h.value.length&&M.push({type:"text",value:h.value.slice(k)}),g.children.splice(E,1,...M)):M=[h],E+M.length}}function D6(e){const n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const l=!e[0]||Array.isArray(e[0])?e:[e];let i=-1;for(;++i<l.length;){const o=l[i];n.push([_6(o[0]),z6(o[1])])}return n}function _6(e){return typeof e=="string"?new RegExp(M6(e),"g"):e}function z6(e){return typeof e=="function"?e:function(){return e}}const Ah="phrasing",Th=["autolink","link","image","label"];function L6(){return{transforms:[F6],enter:{literalAutolink:U6,literalAutolinkEmail:Rh,literalAutolinkHttp:Rh,literalAutolinkWww:Rh},exit:{literalAutolink:q6,literalAutolinkEmail:I6,literalAutolinkHttp:H6,literalAutolinkWww:P6}}}function B6(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ah,notInConstruct:Th},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ah,notInConstruct:Th},{character:":",before:"[ps]",after:"\\/",inConstruct:Ah,notInConstruct:Th}]}}function U6(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Rh(e){this.config.enter.autolinkProtocol.call(this,e)}function H6(e){this.config.exit.autolinkProtocol.call(this,e)}function P6(e){this.config.exit.data.call(this,e);const n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function I6(e){this.config.exit.autolinkEmail.call(this,e)}function q6(e){this.exit(e)}function F6(e){O6(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,V6],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),G6]],{ignore:["link","linkReference"]})}function V6(e,n,l,i,o){let s="";if(!x2(o)||(/^w/i.test(n)&&(l=n+l,n="",s="http://"),!Y6(l)))return!1;const c=$6(l+i);if(!c[0])return!1;const f={type:"link",title:null,url:s+n+c[0],children:[{type:"text",value:n+c[0]}]};return c[1]?[f,{type:"text",value:c[1]}]:f}function G6(e,n,l,i){return!x2(i,!0)||/[-\d_]$/.test(l)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+l,children:[{type:"text",value:n+"@"+l}]}}function Y6(e){const n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function $6(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let l=n[0],i=l.indexOf(")");const o=v0(e,"(");let s=v0(e,")");for(;i!==-1&&o>s;)e+=l.slice(0,i+1),l=l.slice(i+1),i=l.indexOf(")"),s++;return[e,l]}function x2(e,n){const l=e.input.charCodeAt(e.index-1);return(e.index===0||ii(l)||kc(l))&&(!n||l!==47)}v2.peek=nL;function X6(){this.buffer()}function Q6(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function K6(){this.buffer()}function Z6(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function J6(e){const n=this.resume(),l=this.stack[this.stack.length-1];l.type,l.identifier=Jn(this.sliceSerialize(e)).toLowerCase(),l.label=n}function W6(e){this.exit(e)}function eL(e){const n=this.resume(),l=this.stack[this.stack.length-1];l.type,l.identifier=Jn(this.sliceSerialize(e)).toLowerCase(),l.label=n}function tL(e){this.exit(e)}function nL(){return"["}function v2(e,n,l,i){const o=l.createTracker(i);let s=o.move("[^");const c=l.enter("footnoteReference"),f=l.enter("reference");return s+=o.move(l.safe(l.associationId(e),{after:"]",before:s})),f(),c(),s+=o.move("]"),s}function rL(){return{enter:{gfmFootnoteCallString:X6,gfmFootnoteCall:Q6,gfmFootnoteDefinitionLabelString:K6,gfmFootnoteDefinition:Z6},exit:{gfmFootnoteCallString:J6,gfmFootnoteCall:W6,gfmFootnoteDefinitionLabelString:eL,gfmFootnoteDefinition:tL}}}function lL(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:l,footnoteReference:v2},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function l(i,o,s,c){const f=s.createTracker(c);let d=f.move("[^");const h=s.enter("footnoteDefinition"),y=s.enter("label");return d+=f.move(s.safe(s.associationId(i),{before:d,after:"]"})),y(),d+=f.move("]:"),i.children&&i.children.length>0&&(f.shift(4),d+=f.move((n?`
|
|
392
|
+
`:" ")+s.indentLines(s.containerFlow(i,f.current()),n?b2:iL))),h(),d}}function iL(e,n,l){return n===0?e:b2(e,n,l)}function b2(e,n,l){return(l?"":" ")+e}const aL=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];w2.peek=fL;function oL(){return{canContainEols:["delete"],enter:{strikethrough:uL},exit:{strikethrough:cL}}}function sL(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:aL}],handlers:{delete:w2}}}function uL(e){this.enter({type:"delete",children:[]},e)}function cL(e){this.exit(e)}function w2(e,n,l,i){const o=l.createTracker(i),s=l.enter("strikethrough");let c=o.move("~~");return c+=l.containerPhrasing(e,{...o.current(),before:c,after:"~"}),c+=o.move("~~"),s(),c}function fL(){return"~"}function dL(e){return e.length}function hL(e,n){const l=n||{},i=(l.align||[]).concat(),o=l.stringLength||dL,s=[],c=[],f=[],d=[];let h=0,y=-1;for(;++y<e.length;){const C=[],E=[];let N=-1;for(e[y].length>h&&(h=e[y].length);++N<e[y].length;){const M=pL(e[y][N]);if(l.alignDelimiters!==!1){const j=o(M);E[N]=j,(d[N]===void 0||j>d[N])&&(d[N]=j)}C.push(M)}c[y]=C,f[y]=E}let g=-1;if(typeof i=="object"&&"length"in i)for(;++g<h;)s[g]=b0(i[g]);else{const C=b0(i);for(;++g<h;)s[g]=C}g=-1;const v=[],b=[];for(;++g<h;){const C=s[g];let E="",N="";C===99?(E=":",N=":"):C===108?E=":":C===114&&(N=":");let M=l.alignDelimiters===!1?1:Math.max(1,d[g]-E.length-N.length);const j=E+"-".repeat(M)+N;l.alignDelimiters!==!1&&(M=E.length+M+N.length,M>d[g]&&(d[g]=M),b[g]=M),v[g]=j}c.splice(1,0,v),f.splice(1,0,b),y=-1;const k=[];for(;++y<c.length;){const C=c[y],E=f[y];g=-1;const N=[];for(;++g<h;){const M=C[g]||"";let j="",D="";if(l.alignDelimiters!==!1){const I=d[g]-(E[g]||0),O=s[g];O===114?j=" ".repeat(I):O===99?I%2?(j=" ".repeat(I/2+.5),D=" ".repeat(I/2-.5)):(j=" ".repeat(I/2),D=j):D=" ".repeat(I)}l.delimiterStart!==!1&&!g&&N.push("|"),l.padding!==!1&&!(l.alignDelimiters===!1&&M==="")&&(l.delimiterStart!==!1||g)&&N.push(" "),l.alignDelimiters!==!1&&N.push(j),N.push(M),l.alignDelimiters!==!1&&N.push(D),l.padding!==!1&&N.push(" "),(l.delimiterEnd!==!1||g!==h-1)&&N.push("|")}k.push(l.delimiterEnd===!1?N.join("").replace(/ +$/,""):N.join(""))}return k.join(`
|
|
393
|
+
`)}function pL(e){return e==null?"":String(e)}function b0(e){const n=typeof e=="string"?e.codePointAt(0):0;return n===67||n===99?99:n===76||n===108?108:n===82||n===114?114:0}function mL(e,n,l,i){const o=l.enter("blockquote"),s=l.createTracker(i);s.move("> "),s.shift(2);const c=l.indentLines(l.containerFlow(e,s.current()),gL);return o(),c}function gL(e,n,l){return">"+(l?"":" ")+e}function yL(e,n){return w0(e,n.inConstruct,!0)&&!w0(e,n.notInConstruct,!1)}function w0(e,n,l){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return l;let i=-1;for(;++i<n.length;)if(e.includes(n[i]))return!0;return!1}function S0(e,n,l,i){let o=-1;for(;++o<l.unsafe.length;)if(l.unsafe[o].character===`
|
|
394
|
+
`&&yL(l.stack,l.unsafe[o]))return/[ \t]/.test(i.before)?"":" ";return`\\
|
|
395
|
+
`}function xL(e,n){const l=String(e);let i=l.indexOf(n),o=i,s=0,c=0;if(typeof n!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===o?++s>c&&(c=s):s=1,o=i+n.length,i=l.indexOf(n,o);return c}function vL(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function bL(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function wL(e,n,l,i){const o=bL(l),s=e.value||"",c=o==="`"?"GraveAccent":"Tilde";if(vL(e,l)){const g=l.enter("codeIndented"),v=l.indentLines(s,SL);return g(),v}const f=l.createTracker(i),d=o.repeat(Math.max(xL(s,o)+1,3)),h=l.enter("codeFenced");let y=f.move(d);if(e.lang){const g=l.enter(`codeFencedLang${c}`);y+=f.move(l.safe(e.lang,{before:y,after:" ",encode:["`"],...f.current()})),g()}if(e.lang&&e.meta){const g=l.enter(`codeFencedMeta${c}`);y+=f.move(" "),y+=f.move(l.safe(e.meta,{before:y,after:`
|
|
396
|
+
`,encode:["`"],...f.current()})),g()}return y+=f.move(`
|
|
397
|
+
`),s&&(y+=f.move(s+`
|
|
398
|
+
`)),y+=f.move(d),h(),y}function SL(e,n,l){return(l?"":" ")+e}function Sm(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function CL(e,n,l,i){const o=Sm(l),s=o==='"'?"Quote":"Apostrophe",c=l.enter("definition");let f=l.enter("label");const d=l.createTracker(i);let h=d.move("[");return h+=d.move(l.safe(l.associationId(e),{before:h,after:"]",...d.current()})),h+=d.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=l.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(l.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(f=l.enter("destinationRaw"),h+=d.move(l.safe(e.url,{before:h,after:e.title?" ":`
|
|
399
|
+
`,...d.current()}))),f(),e.title&&(f=l.enter(`title${s}`),h+=d.move(" "+o),h+=d.move(l.safe(e.title,{before:h,after:o,...d.current()})),h+=d.move(o),f()),c(),h}function kL(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function Lo(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ju(e,n,l){const i=ua(e),o=ua(n);return i===void 0?o===void 0?l==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}S2.peek=EL;function S2(e,n,l,i){const o=kL(l),s=l.enter("emphasis"),c=l.createTracker(i),f=c.move(o);let d=c.move(l.containerPhrasing(e,{after:o,before:f,...c.current()}));const h=d.charCodeAt(0),y=Ju(i.before.charCodeAt(i.before.length-1),h,o);y.inside&&(d=Lo(h)+d.slice(1));const g=d.charCodeAt(d.length-1),v=Ju(i.after.charCodeAt(0),g,o);v.inside&&(d=d.slice(0,-1)+Lo(g));const b=c.move(o);return s(),l.attentionEncodeSurroundingInfo={after:v.outside,before:y.outside},f+d+b}function EL(e,n,l){return l.options.emphasis||"*"}function NL(e,n){let l=!1;return bm(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return l=!0,sp}),!!((!e.depth||e.depth<3)&&hm(e)&&(n.options.setext||l))}function AL(e,n,l,i){const o=Math.max(Math.min(6,e.depth||1),1),s=l.createTracker(i);if(NL(e,l)){const y=l.enter("headingSetext"),g=l.enter("phrasing"),v=l.containerPhrasing(e,{...s.current(),before:`
|
|
400
|
+
`,after:`
|
|
401
|
+
`});return g(),y(),v+`
|
|
402
|
+
`+(o===1?"=":"-").repeat(v.length-(Math.max(v.lastIndexOf("\r"),v.lastIndexOf(`
|
|
403
|
+
`))+1))}const c="#".repeat(o),f=l.enter("headingAtx"),d=l.enter("phrasing");s.move(c+" ");let h=l.containerPhrasing(e,{before:"# ",after:`
|
|
404
|
+
`,...s.current()});return/^[\t ]/.test(h)&&(h=Lo(h.charCodeAt(0))+h.slice(1)),h=h?c+" "+h:c,l.options.closeAtx&&(h+=" "+c),d(),f(),h}C2.peek=TL;function C2(e){return e.value||""}function TL(){return"<"}k2.peek=RL;function k2(e,n,l,i){const o=Sm(l),s=o==='"'?"Quote":"Apostrophe",c=l.enter("image");let f=l.enter("label");const d=l.createTracker(i);let h=d.move("![");return h+=d.move(l.safe(e.alt,{before:h,after:"]",...d.current()})),h+=d.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=l.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(l.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(f=l.enter("destinationRaw"),h+=d.move(l.safe(e.url,{before:h,after:e.title?" ":")",...d.current()}))),f(),e.title&&(f=l.enter(`title${s}`),h+=d.move(" "+o),h+=d.move(l.safe(e.title,{before:h,after:o,...d.current()})),h+=d.move(o),f()),h+=d.move(")"),c(),h}function RL(){return"!"}E2.peek=jL;function E2(e,n,l,i){const o=e.referenceType,s=l.enter("imageReference");let c=l.enter("label");const f=l.createTracker(i);let d=f.move("![");const h=l.safe(e.alt,{before:d,after:"]",...f.current()});d+=f.move(h+"]["),c();const y=l.stack;l.stack=[],c=l.enter("reference");const g=l.safe(l.associationId(e),{before:d,after:"]",...f.current()});return c(),l.stack=y,s(),o==="full"||!h||h!==g?d+=f.move(g+"]"):o==="shortcut"?d=d.slice(0,-1):d+=f.move("]"),d}function jL(){return"!"}N2.peek=ML;function N2(e,n,l){let i=e.value||"",o="`",s=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(i);)o+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++s<l.unsafe.length;){const c=l.unsafe[s],f=l.compilePattern(c);let d;if(c.atBreak)for(;d=f.exec(i);){let h=d.index;i.charCodeAt(h)===10&&i.charCodeAt(h-1)===13&&h--,i=i.slice(0,h)+" "+i.slice(d.index+1)}}return o+i+o}function ML(){return"`"}function A2(e,n){const l=hm(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(l===e.url||"mailto:"+l===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}T2.peek=OL;function T2(e,n,l,i){const o=Sm(l),s=o==='"'?"Quote":"Apostrophe",c=l.createTracker(i);let f,d;if(A2(e,l)){const y=l.stack;l.stack=[],f=l.enter("autolink");let g=c.move("<");return g+=c.move(l.containerPhrasing(e,{before:g,after:">",...c.current()})),g+=c.move(">"),f(),l.stack=y,g}f=l.enter("link"),d=l.enter("label");let h=c.move("[");return h+=c.move(l.containerPhrasing(e,{before:h,after:"](",...c.current()})),h+=c.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=l.enter("destinationLiteral"),h+=c.move("<"),h+=c.move(l.safe(e.url,{before:h,after:">",...c.current()})),h+=c.move(">")):(d=l.enter("destinationRaw"),h+=c.move(l.safe(e.url,{before:h,after:e.title?" ":")",...c.current()}))),d(),e.title&&(d=l.enter(`title${s}`),h+=c.move(" "+o),h+=c.move(l.safe(e.title,{before:h,after:o,...c.current()})),h+=c.move(o),d()),h+=c.move(")"),f(),h}function OL(e,n,l){return A2(e,l)?"<":"["}R2.peek=DL;function R2(e,n,l,i){const o=e.referenceType,s=l.enter("linkReference");let c=l.enter("label");const f=l.createTracker(i);let d=f.move("[");const h=l.containerPhrasing(e,{before:d,after:"]",...f.current()});d+=f.move(h+"]["),c();const y=l.stack;l.stack=[],c=l.enter("reference");const g=l.safe(l.associationId(e),{before:d,after:"]",...f.current()});return c(),l.stack=y,s(),o==="full"||!h||h!==g?d+=f.move(g+"]"):o==="shortcut"?d=d.slice(0,-1):d+=f.move("]"),d}function DL(){return"["}function Cm(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function _L(e){const n=Cm(e),l=e.options.bulletOther;if(!l)return n==="*"?"-":"*";if(l!=="*"&&l!=="+"&&l!=="-")throw new Error("Cannot serialize items with `"+l+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(l===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+l+"`) to be different");return l}function zL(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function j2(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function LL(e,n,l,i){const o=l.enter("list"),s=l.bulletCurrent;let c=e.ordered?zL(l):Cm(l);const f=e.ordered?c==="."?")":".":_L(l);let d=n&&l.bulletLastUsed?c===l.bulletLastUsed:!1;if(!e.ordered){const y=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&y&&(!y.children||!y.children[0])&&l.stack[l.stack.length-1]==="list"&&l.stack[l.stack.length-2]==="listItem"&&l.stack[l.stack.length-3]==="list"&&l.stack[l.stack.length-4]==="listItem"&&l.indexStack[l.indexStack.length-1]===0&&l.indexStack[l.indexStack.length-2]===0&&l.indexStack[l.indexStack.length-3]===0&&(d=!0),j2(l)===c&&y){let g=-1;for(;++g<e.children.length;){const v=e.children[g];if(v&&v.type==="listItem"&&v.children&&v.children[0]&&v.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(c=f),l.bulletCurrent=c;const h=l.containerFlow(e,i);return l.bulletLastUsed=c,l.bulletCurrent=s,o(),h}function BL(e){const n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function UL(e,n,l,i){const o=BL(l);let s=l.bulletCurrent||Cm(l);n&&n.type==="list"&&n.ordered&&(s=(typeof n.start=="number"&&n.start>-1?n.start:1)+(l.options.incrementListMarker===!1?0:n.children.indexOf(e))+s);let c=s.length+1;(o==="tab"||o==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(c=Math.ceil(c/4)*4);const f=l.createTracker(i);f.move(s+" ".repeat(c-s.length)),f.shift(c);const d=l.enter("listItem"),h=l.indentLines(l.containerFlow(e,f.current()),y);return d(),h;function y(g,v,b){return v?(b?"":" ".repeat(c))+g:(b?s:s+" ".repeat(c-s.length))+g}}function HL(e,n,l,i){const o=l.enter("paragraph"),s=l.enter("phrasing"),c=l.containerPhrasing(e,i);return s(),o(),c}const PL=Ac(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function IL(e,n,l,i){return(e.children.some(function(c){return PL(c)})?l.containerPhrasing:l.containerFlow).call(l,e,i)}function qL(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}M2.peek=FL;function M2(e,n,l,i){const o=qL(l),s=l.enter("strong"),c=l.createTracker(i),f=c.move(o+o);let d=c.move(l.containerPhrasing(e,{after:o,before:f,...c.current()}));const h=d.charCodeAt(0),y=Ju(i.before.charCodeAt(i.before.length-1),h,o);y.inside&&(d=Lo(h)+d.slice(1));const g=d.charCodeAt(d.length-1),v=Ju(i.after.charCodeAt(0),g,o);v.inside&&(d=d.slice(0,-1)+Lo(g));const b=c.move(o+o);return s(),l.attentionEncodeSurroundingInfo={after:v.outside,before:y.outside},f+d+b}function FL(e,n,l){return l.options.strong||"*"}function VL(e,n,l,i){return l.safe(e.value,i)}function GL(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function YL(e,n,l){const i=(j2(l)+(l.options.ruleSpaces?" ":"")).repeat(GL(l));return l.options.ruleSpaces?i.slice(0,-1):i}const O2={blockquote:mL,break:S0,code:wL,definition:CL,emphasis:S2,hardBreak:S0,heading:AL,html:C2,image:k2,imageReference:E2,inlineCode:N2,link:T2,linkReference:R2,list:LL,listItem:UL,paragraph:HL,root:IL,strong:M2,text:VL,thematicBreak:YL};function $L(){return{enter:{table:XL,tableData:C0,tableHeader:C0,tableRow:KL},exit:{codeText:ZL,table:QL,tableData:jh,tableHeader:jh,tableRow:jh}}}function XL(e){const n=e._align;this.enter({type:"table",align:n.map(function(l){return l==="none"?null:l}),children:[]},e),this.data.inTable=!0}function QL(e){this.exit(e),this.data.inTable=void 0}function KL(e){this.enter({type:"tableRow",children:[]},e)}function jh(e){this.exit(e)}function C0(e){this.enter({type:"tableCell",children:[]},e)}function ZL(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,JL));const l=this.stack[this.stack.length-1];l.type,l.value=n,this.exit(e)}function JL(e,n){return n==="|"?n:e}function WL(e){const n=e||{},l=n.tableCellPadding,i=n.tablePipeAlign,o=n.stringLength,s=l?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
405
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:v,table:c,tableCell:d,tableRow:f}};function c(b,k,C,E){return h(y(b,C,E),b.align)}function f(b,k,C,E){const N=g(b,C,E),M=h([N]);return M.slice(0,M.indexOf(`
|
|
406
|
+
`))}function d(b,k,C,E){const N=C.enter("tableCell"),M=C.enter("phrasing"),j=C.containerPhrasing(b,{...E,before:s,after:s});return M(),N(),j}function h(b,k){return hL(b,{align:k,alignDelimiters:i,padding:l,stringLength:o})}function y(b,k,C){const E=b.children;let N=-1;const M=[],j=k.enter("table");for(;++N<E.length;)M[N]=g(E[N],k,C);return j(),M}function g(b,k,C){const E=b.children;let N=-1;const M=[],j=k.enter("tableRow");for(;++N<E.length;)M[N]=d(E[N],b,k,C);return j(),M}function v(b,k,C){let E=O2.inlineCode(b,k,C);return C.stack.includes("tableCell")&&(E=E.replace(/\|/g,"\\$&")),E}}function e8(){return{exit:{taskListCheckValueChecked:k0,taskListCheckValueUnchecked:k0,paragraph:n8}}}function t8(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:r8}}}function k0(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function n8(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const l=this.stack[this.stack.length-1];l.type;const i=l.children[0];if(i&&i.type==="text"){const o=n.children;let s=-1,c;for(;++s<o.length;){const f=o[s];if(f.type==="paragraph"){c=f;break}}c===l&&(i.value=i.value.slice(1),i.value.length===0?l.children.shift():l.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,l.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function r8(e,n,l,i){const o=e.children[0],s=typeof e.checked=="boolean"&&o&&o.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",f=l.createTracker(i);s&&f.move(c);let d=O2.listItem(e,n,l,{...i,...f.current()});return s&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),d;function h(y){return y+c}}function l8(){return[L6(),rL(),oL(),$L(),e8()]}function i8(e){return{extensions:[B6(),lL(e),sL(),WL(e),t8()]}}const a8={tokenize:d8,partial:!0},D2={tokenize:h8,partial:!0},_2={tokenize:p8,partial:!0},z2={tokenize:m8,partial:!0},o8={tokenize:g8,partial:!0},L2={name:"wwwAutolink",tokenize:c8,previous:U2},B2={name:"protocolAutolink",tokenize:f8,previous:H2},Yr={name:"emailAutolink",tokenize:u8,previous:P2},vr={};function s8(){return{text:vr}}let ti=48;for(;ti<123;)vr[ti]=Yr,ti++,ti===58?ti=65:ti===91&&(ti=97);vr[43]=Yr;vr[45]=Yr;vr[46]=Yr;vr[95]=Yr;vr[72]=[Yr,B2];vr[104]=[Yr,B2];vr[87]=[Yr,L2];vr[119]=[Yr,L2];function u8(e,n,l){const i=this;let o,s;return c;function c(g){return!dp(g)||!P2.call(i,i.previous)||km(i.events)?l(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(g))}function f(g){return dp(g)?(e.consume(g),f):g===64?(e.consume(g),d):l(g)}function d(g){return g===46?e.check(o8,y,h)(g):g===45||g===95||Gt(g)?(s=!0,e.consume(g),d):y(g)}function h(g){return e.consume(g),o=!0,d}function y(g){return s&&o&&Kt(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(g)):l(g)}}function c8(e,n,l){const i=this;return o;function o(c){return c!==87&&c!==119||!U2.call(i,i.previous)||km(i.events)?l(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(a8,e.attempt(D2,e.attempt(_2,s),l),l)(c))}function s(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(c)}}function f8(e,n,l){const i=this;let o="",s=!1;return c;function c(g){return(g===72||g===104)&&H2.call(i,i.previous)&&!km(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(g),e.consume(g),f):l(g)}function f(g){if(Kt(g)&&o.length<5)return o+=String.fromCodePoint(g),e.consume(g),f;if(g===58){const v=o.toLowerCase();if(v==="http"||v==="https")return e.consume(g),d}return l(g)}function d(g){return g===47?(e.consume(g),s?h:(s=!0,d)):l(g)}function h(g){return g===null||Qu(g)||et(g)||ii(g)||kc(g)?l(g):e.attempt(D2,e.attempt(_2,y),l)(g)}function y(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(g)}}function d8(e,n,l){let i=0;return o;function o(c){return(c===87||c===119)&&i<3?(i++,e.consume(c),o):c===46&&i===3?(e.consume(c),s):l(c)}function s(c){return c===null?l(c):n(c)}}function h8(e,n,l){let i,o,s;return c;function c(h){return h===46||h===95?e.check(z2,d,f)(h):h===null||et(h)||ii(h)||h!==45&&kc(h)?d(h):(s=!0,e.consume(h),c)}function f(h){return h===95?i=!0:(o=i,i=void 0),e.consume(h),c}function d(h){return o||i||!s?l(h):n(h)}}function p8(e,n){let l=0,i=0;return o;function o(c){return c===40?(l++,e.consume(c),o):c===41&&i<l?s(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(z2,n,s)(c):c===null||et(c)||ii(c)?n(c):(e.consume(c),o)}function s(c){return c===41&&i++,e.consume(c),o}}function m8(e,n,l){return i;function i(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),i):f===38?(e.consume(f),s):f===93?(e.consume(f),o):f===60||f===null||et(f)||ii(f)?n(f):l(f)}function o(f){return f===null||f===40||f===91||et(f)||ii(f)?n(f):i(f)}function s(f){return Kt(f)?c(f):l(f)}function c(f){return f===59?(e.consume(f),i):Kt(f)?(e.consume(f),c):l(f)}}function g8(e,n,l){return i;function i(s){return e.consume(s),o}function o(s){return Gt(s)?l(s):n(s)}}function U2(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||et(e)}function H2(e){return!Kt(e)}function P2(e){return!(e===47||dp(e))}function dp(e){return e===43||e===45||e===46||e===95||Gt(e)}function km(e){let n=e.length,l=!1;for(;n--;){const i=e[n][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){l=!0;break}if(i._gfmAutolinkLiteralWalkedInto){l=!1;break}}return e.length>0&&!l&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),l}const y8={tokenize:E8,partial:!0};function x8(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:S8,continuation:{tokenize:C8},exit:k8}},text:{91:{name:"gfmFootnoteCall",tokenize:w8},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:v8,resolveTo:b8}}}}function v8(e,n,l){const i=this;let o=i.events.length;const s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let c;for(;o--;){const d=i.events[o][1];if(d.type==="labelImage"){c=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return f;function f(d){if(!c||!c._balanced)return l(d);const h=Jn(i.sliceSerialize({start:c.end,end:i.now()}));return h.codePointAt(0)!==94||!s.includes(h.slice(1))?l(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),n(d))}}function b8(e,n){let l=e.length;for(;l--;)if(e[l][1].type==="labelImage"&&e[l][0]==="enter"){e[l][1];break}e[l+1][1].type="data",e[l+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[l+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[l+3][1].end),end:Object.assign({},e[l+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},f=[e[l+1],e[l+2],["enter",i,n],e[l+3],e[l+4],["enter",o,n],["exit",o,n],["enter",s,n],["enter",c,n],["exit",c,n],["exit",s,n],e[e.length-2],e[e.length-1],["exit",i,n]];return e.splice(l,e.length-l+1,...f),e}function w8(e,n,l){const i=this,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s=0,c;return f;function f(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),d}function d(g){return g!==94?l(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(g){if(s>999||g===93&&!c||g===null||g===91||et(g))return l(g);if(g===93){e.exit("chunkString");const v=e.exit("gfmFootnoteCallString");return o.includes(Jn(i.sliceSerialize(v)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):l(g)}return et(g)||(c=!0),s++,e.consume(g),g===92?y:h}function y(g){return g===91||g===92||g===93?(e.consume(g),s++,h):h(g)}}function S8(e,n,l){const i=this,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s,c=0,f;return d;function d(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",y):l(k)}function y(k){if(c>999||k===93&&!f||k===null||k===91||et(k))return l(k);if(k===93){e.exit("chunkString");const C=e.exit("gfmFootnoteDefinitionLabelString");return s=Jn(i.sliceSerialize(C)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),v}return et(k)||(f=!0),c++,e.consume(k),k===92?g:y}function g(k){return k===91||k===92||k===93?(e.consume(k),c++,y):y(k)}function v(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),o.includes(s)||o.push(s),Pe(e,b,"gfmFootnoteDefinitionWhitespace")):l(k)}function b(k){return n(k)}}function C8(e,n,l){return e.check(Xo,n,e.attempt(y8,n,l))}function k8(e){e.exit("gfmFootnoteDefinition")}function E8(e,n,l){const i=this;return Pe(e,o,"gfmFootnoteDefinitionIndent",5);function o(s){const c=i.events[i.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?n(s):l(s)}}function N8(e){let l=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:s,resolveAll:o};return l==null&&(l=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function o(c,f){let d=-1;for(;++d<c.length;)if(c[d][0]==="enter"&&c[d][1].type==="strikethroughSequenceTemporary"&&c[d][1]._close){let h=d;for(;h--;)if(c[h][0]==="exit"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._open&&c[d][1].end.offset-c[d][1].start.offset===c[h][1].end.offset-c[h][1].start.offset){c[d][1].type="strikethroughSequence",c[h][1].type="strikethroughSequence";const y={type:"strikethrough",start:Object.assign({},c[h][1].start),end:Object.assign({},c[d][1].end)},g={type:"strikethroughText",start:Object.assign({},c[h][1].end),end:Object.assign({},c[d][1].start)},v=[["enter",y,f],["enter",c[h][1],f],["exit",c[h][1],f],["enter",g,f]],b=f.parser.constructs.insideSpan.null;b&&kn(v,v.length,0,Ec(b,c.slice(h+1,d),f)),kn(v,v.length,0,[["exit",g,f],["enter",c[d][1],f],["exit",c[d][1],f],["exit",y,f]]),kn(c,h-1,d-h+3,v),d=h+v.length-2;break}}for(d=-1;++d<c.length;)c[d][1].type==="strikethroughSequenceTemporary"&&(c[d][1].type="data");return c}function s(c,f,d){const h=this.previous,y=this.events;let g=0;return v;function v(k){return h===126&&y[y.length-1][1].type!=="characterEscape"?d(k):(c.enter("strikethroughSequenceTemporary"),b(k))}function b(k){const C=ua(h);if(k===126)return g>1?d(k):(c.consume(k),g++,b);if(g<2&&!l)return d(k);const E=c.exit("strikethroughSequenceTemporary"),N=ua(k);return E._open=!N||N===2&&!!C,E._close=!C||C===2&&!!N,f(k)}}}class A8{constructor(){this.map=[]}add(n,l,i){T8(this,n,l,i)}consume(n){if(this.map.sort(function(s,c){return s[0]-c[0]}),this.map.length===0)return;let l=this.map.length;const i=[];for(;l>0;)l-=1,i.push(n.slice(this.map[l][0]+this.map[l][1]),this.map[l][2]),n.length=this.map[l][0];i.push(n.slice()),n.length=0;let o=i.pop();for(;o;){for(const s of o)n.push(s);o=i.pop()}this.map.length=0}}function T8(e,n,l,i){let o=0;if(!(l===0&&i.length===0)){for(;o<e.map.length;){if(e.map[o][0]===n){e.map[o][1]+=l,e.map[o][2].push(...i);return}o+=1}e.map.push([n,l,i])}}function R8(e,n){let l=!1;const i=[];for(;n<e.length;){const o=e[n];if(l){if(o[0]==="enter")o[1].type==="tableContent"&&i.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){const s=i.length-1;i[s]=i[s]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(l=!0);n+=1}return i}function j8(){return{flow:{null:{name:"table",tokenize:M8,resolveAll:O8}}}}function M8(e,n,l){const i=this;let o=0,s=0,c;return f;function f(H){let J=i.events.length-1;for(;J>-1;){const Z=i.events[J][1].type;if(Z==="lineEnding"||Z==="linePrefix")J--;else break}const ne=J>-1?i.events[J][1].type:null,W=ne==="tableHead"||ne==="tableRow"?O:d;return W===O&&i.parser.lazy[i.now().line]?l(H):W(H)}function d(H){return e.enter("tableHead"),e.enter("tableRow"),h(H)}function h(H){return H===124||(c=!0,s+=1),y(H)}function y(H){return H===null?l(H):Ce(H)?s>1?(s=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(H),e.exit("lineEnding"),b):l(H):Le(H)?Pe(e,y,"whitespace")(H):(s+=1,c&&(c=!1,o+=1),H===124?(e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),c=!0,y):(e.enter("data"),g(H)))}function g(H){return H===null||H===124||et(H)?(e.exit("data"),y(H)):(e.consume(H),H===92?v:g)}function v(H){return H===92||H===124?(e.consume(H),g):g(H)}function b(H){return i.interrupt=!1,i.parser.lazy[i.now().line]?l(H):(e.enter("tableDelimiterRow"),c=!1,Le(H)?Pe(e,k,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):k(H))}function k(H){return H===45||H===58?E(H):H===124?(c=!0,e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),C):I(H)}function C(H){return Le(H)?Pe(e,E,"whitespace")(H):E(H)}function E(H){return H===58?(s+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(H),e.exit("tableDelimiterMarker"),N):H===45?(s+=1,N(H)):H===null||Ce(H)?D(H):I(H)}function N(H){return H===45?(e.enter("tableDelimiterFiller"),M(H)):I(H)}function M(H){return H===45?(e.consume(H),M):H===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(H),e.exit("tableDelimiterMarker"),j):(e.exit("tableDelimiterFiller"),j(H))}function j(H){return Le(H)?Pe(e,D,"whitespace")(H):D(H)}function D(H){return H===124?k(H):H===null||Ce(H)?!c||o!==s?I(H):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(H)):I(H)}function I(H){return l(H)}function O(H){return e.enter("tableRow"),P(H)}function P(H){return H===124?(e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),P):H===null||Ce(H)?(e.exit("tableRow"),n(H)):Le(H)?Pe(e,P,"whitespace")(H):(e.enter("data"),q(H))}function q(H){return H===null||H===124||et(H)?(e.exit("data"),P(H)):(e.consume(H),H===92?re:q)}function re(H){return H===92||H===124?(e.consume(H),q):q(H)}}function O8(e,n){let l=-1,i=!0,o=0,s=[0,0,0,0],c=[0,0,0,0],f=!1,d=0,h,y,g;const v=new A8;for(;++l<e.length;){const b=e[l],k=b[1];b[0]==="enter"?k.type==="tableHead"?(f=!1,d!==0&&(E0(v,n,d,h,y),y=void 0,d=0),h={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},v.add(l,0,[["enter",h,n]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(i=!0,g=void 0,s=[0,0,0,0],c=[0,l+1,0,0],f&&(f=!1,y={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},v.add(l,0,[["enter",y,n]])),o=k.type==="tableDelimiterRow"?2:y?3:1):o&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(i=!1,c[2]===0&&(s[1]!==0&&(c[0]=c[1],g=Cu(v,n,s,o,void 0,g),s=[0,0,0,0]),c[2]=l)):k.type==="tableCellDivider"&&(i?i=!1:(s[1]!==0&&(c[0]=c[1],g=Cu(v,n,s,o,void 0,g)),s=c,c=[s[1],l,0,0])):k.type==="tableHead"?(f=!0,d=l):k.type==="tableRow"||k.type==="tableDelimiterRow"?(d=l,s[1]!==0?(c[0]=c[1],g=Cu(v,n,s,o,l,g)):c[1]!==0&&(g=Cu(v,n,c,o,l,g)),o=0):o&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(c[3]=l)}for(d!==0&&E0(v,n,d,h,y),v.consume(n.events),l=-1;++l<n.events.length;){const b=n.events[l];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=R8(n.events,l))}return e}function Cu(e,n,l,i,o,s){const c=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",f="tableContent";l[0]!==0&&(s.end=Object.assign({},ea(n.events,l[0])),e.add(l[0],0,[["exit",s,n]]));const d=ea(n.events,l[1]);if(s={type:c,start:Object.assign({},d),end:Object.assign({},d)},e.add(l[1],0,[["enter",s,n]]),l[2]!==0){const h=ea(n.events,l[2]),y=ea(n.events,l[3]),g={type:f,start:Object.assign({},h),end:Object.assign({},y)};if(e.add(l[2],0,[["enter",g,n]]),i!==2){const v=n.events[l[2]],b=n.events[l[3]];if(v[1].end=Object.assign({},b[1].end),v[1].type="chunkText",v[1].contentType="text",l[3]>l[2]+1){const k=l[2]+1,C=l[3]-l[2]-1;e.add(k,C,[])}}e.add(l[3]+1,0,[["exit",g,n]])}return o!==void 0&&(s.end=Object.assign({},ea(n.events,o)),e.add(o,0,[["exit",s,n]]),s=void 0),s}function E0(e,n,l,i,o){const s=[],c=ea(n.events,l);o&&(o.end=Object.assign({},c),s.push(["exit",o,n])),i.end=Object.assign({},c),s.push(["exit",i,n]),e.add(l+1,0,s)}function ea(e,n){const l=e[n],i=l[0]==="enter"?"start":"end";return l[1][i]}const D8={name:"tasklistCheck",tokenize:z8};function _8(){return{text:{91:D8}}}function z8(e,n,l){const i=this;return o;function o(d){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?l(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),s)}function s(d){return et(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),c):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),c):l(d)}function c(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):l(d)}function f(d){return Ce(d)?n(d):Le(d)?e.check({tokenize:L8},n,l)(d):l(d)}}function L8(e,n,l){return Pe(e,i,"whitespace");function i(o){return o===null?l(o):n(o)}}function B8(e){return ZS([s8(),x8(),N8(e),j8(),_8()])}const U8={};function jc(e){const n=this,l=e||U8,i=n.data(),o=i.micromarkExtensions||(i.micromarkExtensions=[]),s=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),c=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);o.push(B8(l)),s.push(l8()),c.push(i8(l))}function H8({content:e}){return x.jsx("div",{className:"flex gap-2 justify-end",children:x.jsx("div",{className:"max-w-[85%] sm:max-w-[80%] rounded-[20px] py-1.5 px-3.5 bg-muted text-primary border border-border prose prose-sm prose-invert [&_p]:whitespace-pre-line",children:x.jsx(Rc,{remarkPlugins:[jc],components:Cc,children:e})})})}function P8({json:e}){return x.jsx("div",{className:"flex gap-3 justify-start",children:x.jsx("div",{className:"flex-1 max-w-[90%]",children:x.jsx("pre",{className:"text-xs font-mono whitespace-pre-wrap break-words bg-muted rounded-lg p-3 overflow-auto max-h-96",children:e})})})}function I2({title:e,count:n,children:l,badge:i}){const[o,s]=w.useState(!1);return n===0?null:x.jsxs("div",{className:"flex flex-col gap-1.5",children:[x.jsxs("button",{onClick:()=>s(!o),className:"flex items-center gap-1 cursor-pointer group/section hover:opacity-60 transition-opacity",children:[x.jsx(Nl,{className:ye("h-3.5 w-3.5 text-muted-foreground transition-transform duration-200",o&&"rotate-90")}),x.jsx("span",{className:"text-muted-foreground font-medium",children:e}),x.jsx("span",{className:"text-muted-foreground/60",children:n}),i]}),o&&x.jsx("div",{className:"ml-5",children:l})]})}function Mh({title:e,items:n,icon:l,getIcon:i}){return n.length===0?null:x.jsx(I2,{title:e,count:n.length,children:x.jsx("div",{className:"flex flex-wrap gap-1.5",children:n.map(o=>x.jsx(zS,{icon:i?i(o):l,children:o},o))})})}function I8(e){const n=e.match(/^mcp__([^_]+)__(.+)$/);return n?{server:n[1],tool:n[2]}:null}function q2({status:e}){const n=e==="connected"?"bg-emerald-500":e==="pending"?"bg-yellow-500":"bg-red-500";return x.jsx("span",{className:ye("inline-block h-2 w-2 rounded-full shrink-0",n)})}function q8(e){switch(e){case"connected":return"Connected";case"failed":return"Failed";case"needs-auth":return"Needs auth";case"pending":return"Connecting...";case"disabled":return"Disabled";default:return e}}function N0({server:e}){const[n,l]=w.useState(!1),i=e.status==="connected";return x.jsxs("div",{className:"flex flex-col gap-1.5",children:[x.jsxs("button",{onClick:()=>i&&e.tools.length>0&&l(!n),className:ye("flex items-center gap-1.5",i&&e.tools.length>0&&"cursor-pointer hover:opacity-60 transition-opacity"),children:[i&&e.tools.length>0&&x.jsx(Nl,{className:ye("h-3 w-3 text-muted-foreground transition-transform duration-200",n&&"rotate-90")}),x.jsx(q2,{status:e.status}),x.jsx("span",{className:"text-muted-foreground font-medium",children:Jh(e.name)}),i?x.jsxs("span",{className:"text-muted-foreground/50",children:[e.tools.length," tools"]}):x.jsx("span",{className:"text-muted-foreground/50",children:q8(e.status)})]}),!i&&e.error&&x.jsx("span",{className:"text-destructive ml-5",children:e.error}),n&&e.tools.length>0&&x.jsx("div",{className:"flex flex-wrap gap-1.5 ml-5",children:e.tools.map(o=>x.jsx(zS,{icon:_S(`mcp__${e.name}__${o}`),children:o},o))})]})}function F8({servers:e}){if(e.length===0)return null;const n=e.filter(o=>o.status==="connected"),l=e.filter(o=>o.status!=="connected"),i=l.length>0?x.jsxs("span",{className:"flex items-center gap-1 ml-1",children:[x.jsx(q2,{status:"failed"}),x.jsxs("span",{className:"text-muted-foreground/60",children:[l.length," disconnected"]})]}):null;return x.jsx(I2,{title:"MCP Servers",count:e.length,badge:i,children:x.jsxs("div",{className:"flex flex-col gap-2",children:[n.map(o=>x.jsx(N0,{server:o},o.name)),l.map(o=>x.jsx(N0,{server:o},o.name))]})})}function V8({rawJson:e}){const[n,l]=w.useState(!1);return x.jsxs("div",{className:"flex flex-col gap-1.5",children:[x.jsxs("button",{onClick:()=>l(!n),className:"flex items-center gap-1 cursor-pointer group/section hover:opacity-60 transition-opacity",children:[x.jsx(Nl,{className:ye("h-3.5 w-3.5 text-muted-foreground transition-transform duration-200",n&&"rotate-90")}),x.jsx("span",{className:"text-muted-foreground font-medium",children:"Raw Message"})]}),n&&x.jsx("pre",{className:"ml-5 text-xs whitespace-pre-wrap break-all border border-border rounded-md p-3 overflow-x-auto max-h-96 overflow-y-auto",children:e})]})}function G8({message:e,rawJson:n}){const{coreTools:l,mcpServersWithTools:i}=w.useMemo(()=>{const o=new Map,s=[];for(const f of e.tools){const d=I8(f);if(d){const h=o.get(d.server)||[];h.push(d.tool),o.set(d.server,h)}else s.push(f)}const c=e.mcpServers.map(f=>({name:f.name,status:f.status,error:f.error,tools:o.get(f.name)||[]}));return{coreTools:s,mcpServersWithTools:c}},[e.tools,e.mcpServers]);return x.jsx(Dl,{children:x.jsxs(wc,{expandedContent:x.jsx(Sc,{className:"my-4 text-xs",children:x.jsxs("div",{className:"flex flex-col gap-3",children:[x.jsx(hO,{children:e.model}),x.jsx(Mh,{title:"Tools",items:l,getIcon:o=>tp[o]??DS}),x.jsx(Mh,{title:"Agents",items:e.agents,icon:Dp}),x.jsx(Mh,{title:"Commands",items:e.slashCommands,icon:Dj}),x.jsx(F8,{servers:i}),n&&x.jsx(V8,{rawJson:n})]})}),children:[x.jsx(LR,{className:"h-5 w-5 text-logo"}),x.jsx(Rl,{children:"Session Started"})]})})}function Y8({message:e}){return x.jsx(Dl,{className:"hidden",children:x.jsxs(wc,{expandedContent:x.jsx(Sc,{className:"my-4 text-xs",children:x.jsx("pre",{className:"font-mono whitespace-pre-wrap break-all bg-muted border border-border rounded-lg p-2 max-h-64 overflow-auto",children:JSON.stringify(e.accountInfo,null,2)})}),children:[x.jsx("div",{className:"size-5 flex justify-center items-center ",children:x.jsx(Dp,{className:"h-4 w-4 text-muted-foreground"})}),x.jsx(Rl,{children:"Account"})]})})}function $8({message:e}){return x.jsx("div",{className:"text-pretty prose prose-sm dark:prose-invert px-0.5 w-full max-w-full space-y-4",children:x.jsx(Rc,{remarkPlugins:[jc],components:Cc,children:e.text})})}function X8({question:e,currentIndex:n,totalQuestions:l,onBack:i,children:o}){const s=i&&n>0;return x.jsxs("div",{className:"rounded-2xl border border-border overflow-hidden",children:[x.jsxs("div",{className:"relative",children:[x.jsxs("h3",{className:"font-medium text-foreground text-sm p-3 px-4 bg-card border-b border-border text-foreground flex flex-row items-center gap-2",children:[s?x.jsx("button",{onClick:i,className:" text-muted-foreground hover:opacity-60 transition-all flex items-center",children:x.jsx(YR,{className:"h-4 w-4 -ml-0.5",strokeWidth:3})}):l>1?x.jsxs("span",{className:"font-bold text-muted-foreground whitespace-nowrap",children:[n+1," of ",l]}):null,e]}),l>1&&x.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-border",children:x.jsx("div",{className:"h-full bg-muted-foreground/40 transition-all duration-300",style:{width:`${n/l*100}%`}})})]}),o]})}function A0({label:e,description:n}){return x.jsxs(x.Fragment,{children:[x.jsx("span",{className:"text-foreground text-sm",children:e}),n&&x.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:n})]})}function F2({selected:e,multiSelect:n,onClick:l}){return x.jsx("button",{type:"button",onClick:l,className:ye("flex-shrink-0 w-5 h-5 border-1 flex items-center justify-center",n?"rounded":"rounded-full",e?"border-slate-500/0 bg-foreground":"border-muted-foreground/50 bg-background",l&&e&&"cursor-pointer"),children:e&&x.jsx(ri,{strokeWidth:3,className:"translate-y-[0.5px] h-3 w-3 text-white dark:text-background"})})}function Q8({option:e,selected:n,multiSelect:l,onClick:i,isLast:o}){const s="w-full text-left p-3 pt-2.5 pl-4 pr-5 bg-background",c=o?"":"border-b border-border";return i?x.jsx("button",{onClick:i,className:ye(s,c,"transition-all cursor-pointer"),children:x.jsxs("div",{className:"flex items-center justify-between gap-3",children:[x.jsx("div",{className:"flex-1 min-w-0",children:x.jsx(A0,{label:e.label,description:e.description})}),x.jsx(F2,{selected:n,multiSelect:l})]})}):x.jsx("div",{className:ye(s,c),children:x.jsx(A0,{label:e.label,description:e.description})})}function K8(e){return e==null?void 0:e.answers}function Kn(e){return e.id||e.question}function Z8({message:e,onSubmit:n,isLatest:l}){var ne;const i=e.input.questions,o=!!e.result,s=K8(e.result),[c,f]=w.useState(0),[d,h]=w.useState({}),[y,g]=w.useState({}),[v,b]=w.useState(o),k=(W,Z)=>{var le;const Q=(le=y[W])==null?void 0:le.trim(),B=d[W]||"",Y=Z||i.find(de=>Kn(de)===W);return Y!=null&&Y.multiSelect?[B,Q].filter(Boolean).join(", "):Q||B},C=W=>{const Z=d[Kn(W)]||"";return W.multiSelect?Z.split(", ").filter(Boolean):[Z]},E=(W,Z)=>{const Q=Kn(W);if(W.multiSelect){const B=d[Q]?d[Q].split(", ").filter(Boolean):[],Y=B.includes(Z)?B.filter(le=>le!==Z):[...B,Z];h({...d,[Q]:Y.join(", ")})}else h({...d,[Q]:Z}),g({...y,[Q]:""}),c<i.length-1&&setTimeout(()=>f(c+1),150)},N=(W,Z)=>{const Q=Kn(W);g({...y,[Q]:Z}),Z&&!W.multiSelect&&h({...d,[Q]:""})},M=W=>{const Z=Kn(W);W.multiSelect&&y[Z]&&g({...y,[Z]:""})},j=i.every(W=>k(Kn(W),W).length>0),D=i[c],I=c===i.length-1,O=D&&k(Kn(D),D).length>0,P=()=>{c<i.length-1&&f(c+1)},q=()=>{c>0&&f(c-1)},re=()=>{if(!j)return;const W={};for(const Z of i){const Q=Kn(Z);W[Q]=k(Q,Z)}h(W),b(!0),n(e.toolId,i,W)};if(v||o){const W=s||d;return x.jsx("div",{className:"w-full",children:x.jsxs("div",{className:"rounded-2xl border border-border overflow-hidden",children:[x.jsxs("div",{className:"font-medium text-sm p-3 px-4 pr-5 bg-muted border-b border-border flex flex-row items-center justify-between",children:[x.jsxs("p",{children:["Question",i.length!==1?"s":""]}),x.jsx("p",{className:"",children:"Answers"})]}),i.map((Z,Q)=>{const B=W[Kn(Z)]||W[Z.question]||"",Y=Q===i.length-1;return x.jsxs("div",{className:ye("w-full p-3 pt-2.5 pl-4 pr-5 bg-background flex items-center justify-between gap-3",!Y&&"border-b border-border"),children:[x.jsx("span",{className:"text-sm",children:Z.question}),B&&x.jsx("span",{className:"text-sm font-medium text-right",children:B}),!B&&x.jsx("span",{className:"text-sm font-medium text-right italic",children:"No Response"})]},Kn(Z))})]})})}if(!l)return x.jsx("div",{className:"w-full py-2",children:x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(nw,{className:"h-4 w-4 text-muted-foreground"}),x.jsx("span",{className:"text-sm text-muted-foreground",children:"Questions pending (newer question active)"})]})});if(!D)return null;const H=C(D),J=y[Kn(D)]||"";return x.jsxs("div",{className:"w-full space-y-3",children:[x.jsxs(X8,{question:D.question,currentIndex:c,totalQuestions:i.length,onBack:c>0?q:void 0,children:[(ne=D.options)==null?void 0:ne.map(W=>x.jsx(Q8,{option:W,selected:H.includes(W.label),multiSelect:D.multiSelect,onClick:()=>E(D,W.label)},W.label)),x.jsx("div",{className:"transition-all bg-background",children:x.jsxs("div",{className:"flex pr-5 items-center justify-between gap-3",children:[x.jsx("input",{type:"text",value:J,onChange:W=>N(D,W.target.value),placeholder:"Other...",className:"flex-1 px-3 !py-1 pl-4 min-h-[55px] min-w-0 text-sm bg-transparent outline-none text-foreground placeholder:text-muted-foreground"}),x.jsx(F2,{selected:!!J,multiSelect:D.multiSelect,onClick:D.multiSelect&&J?()=>M(D):void 0})]})})]}),x.jsxs("div",{className:"flex justify-end gap-2 mx-2",children:[!I&&O&&(D.multiSelect||!!J)&&x.jsx(Fe,{size:"sm",onClick:P,children:"Next"}),I&&x.jsx(Fe,{size:"sm",onClick:re,disabled:!j,className:ye(!j&&"opacity-50 cursor-not-allowed","rounded-full"),children:"Submit"})]})]})}function J8({message:e,onConfirm:n}){const l=!!e.result,[i,o]=w.useState(!1),[s,c]=w.useState(!1),[f,d]=w.useState(!1),[h,y]=w.useState(""),g=w.useRef(null),v=e.input;w.useEffect(()=>{f&&g.current&&g.current.focus()},[f]);const b=async()=>{v!=null&&v.plan&&(await navigator.clipboard.writeText(v.plan),c(!0),setTimeout(()=>c(!1),2e3))},k=l?e.result:null;return x.jsxs("div",{className:"flex flex-col gap-3",children:[x.jsxs("div",{className:"relative rounded-2xl border border-border overflow-hidden group/plan",children:[(v==null?void 0:v.plan)&&x.jsx(Fe,{variant:"ghost",size:"icon",className:ye("absolute top-2 right-2 z-10 h-8 w-8 rounded-md text-muted-foreground opacity-0 group-hover/plan:opacity-100 transition-opacity",!s&&"hover:text-foreground",s&&"hover:!bg-transparent hover:!border-transparent"),onClick:b,children:s?x.jsx(ri,{className:"h-4 w-4 text-green-400"}):x.jsx(sc,{className:"h-4 w-4"})}),x.jsxs("div",{className:ye("!pt-5 !pb-0 px-4 md:py-4.5 md:px-5.5 bg-muted dark:bg-card overflow-scroll no-pre-highlight transition-all",l&&!i?"max-h-[min(400px,40vh)] ":"",l?"hover:!pb-[32px]":""),children:[l&&x.jsxs(Fe,{variant:"ghost",className:"absolute z-10 bottom-2 pr-2.5 !pl-3.5 h-[34px] inline-flex gap-1 text-sm left-[50%] -translate-x-[50%] text-muted-foreground backdrop-blur-sm hover:text-foreground opacity-0 group-hover/plan:opacity-100 transition-all rounded-full border border-border",onClick:()=>o(!i),children:[i?"Show Less":"Show More",x.jsx(VR,{className:`size-3.5 transition-transform ${i?"rotate-180":""}`})]}),v!=null&&v.plan?x.jsxs("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:[x.jsx(Rc,{remarkPlugins:[jc],components:pO,children:v.plan}),x.jsx("div",{className:"mt-5"})]}):x.jsx("p",{className:"text-sm text-muted-foreground",children:"No plan provided"})]})]}),l?x.jsx("div",{className:"flex justify-end mx-2",children:x.jsxs("span",{className:"pl-4 inline text-sm font-medium bg-background text-foreground/60 border border-border py-1.5 px-3 rounded-[20px] leading-relaxed max-w-[85%] sm:max-w-[80%]",children:[x.jsx("em",{children:k!=null&&k.clearContext?"Approved & Cleared Context":k!=null&&k.confirmed?"Approved":k!=null&&k.message?`Adjusted: "${k.message}"`:"Adjusted Plan"}),x.jsx(rj,{className:"inline h-4 w-4 ml-1.5 -mt-0.5"})]})}):x.jsxs("div",{className:"flex flex-col gap-3",children:[!f&&x.jsxs("div",{className:"flex flex-col md:flex-row items-stretch md:items-center justify-end gap-2 mx-2",children:[x.jsxs(Fe,{size:"sm",onClick:()=>n(e.toolId,!0,!0),className:"rounded-full bg-primary text-background pr-4 md:order-last",children:[x.jsx(HR,{className:"h-4 w-4 mr-1.5"}),"Approve & Clear"]}),x.jsxs("div",{className:"flex items-stretch md:items-center gap-2 md:contents",children:[x.jsxs(Fe,{size:"sm",variant:"outline",onClick:()=>d(!0),className:"rounded-full border-border flex-1 md:flex-initial md:order-first",children:[x.jsx(lw,{className:"h-4 w-4 mr-1.5"}),"Suggest Edits"]}),x.jsxs(Fe,{size:"sm",variant:"outline",onClick:()=>n(e.toolId,!0),className:"rounded-full border-border flex-1 md:flex-initial",children:[x.jsx(ri,{className:"h-4 w-4 mr-1.5"}),"Approve"]})]})]}),f&&x.jsxs("div",{className:"flex flex-col gap-2",children:[x.jsx("textarea",{ref:g,value:h,onChange:C=>y(C.target.value),onKeyDown:C=>{C.key==="Enter"&&!C.shiftKey&&h.trim()&&(C.preventDefault(),n(e.toolId,!1,void 0,h.trim())),C.key==="Escape"&&(d(!1),y(""))},placeholder:"Describe what you'd like to change...",rows:3,className:"w-full rounded-2xl border border-border bg-muted dark:bg-card px-4 py-3 text-sm text-foreground placeholder:text-muted-foreground resize-none outline-none"}),x.jsxs("div",{className:"flex items-center justify-end gap-2 mx-2",children:[x.jsx(Fe,{size:"sm",variant:"ghost",onClick:()=>{d(!1),y("")},className:"rounded-full text-muted-foreground",children:"Cancel"}),x.jsxs(Fe,{size:"sm",disabled:!h.trim(),onClick:()=>n(e.toolId,!1,void 0,h.trim()),className:"rounded-full bg-primary text-background disabled:opacity-50 disabled:pointer-events-none",children:[x.jsx(Mj,{className:"h-4 w-4 mr-1.5"}),"Adjust Plan"]})]})]})]})]})}const W8={completed:{Icon:ri,iconClass:"text-emerald-500",textClass:"text-muted-foreground"},in_progress:{Icon:oi,iconClass:"text-foreground animate-spin",textClass:"text-foreground font-medium"},pending:{Icon:ZR,iconClass:"text-muted-foreground",textClass:"text-muted-foreground"}};function e9({message:e}){const n=e.input.todos;return n.length?x.jsx("div",{className:"w-full",children:x.jsxs("div",{className:"rounded-2xl border border-border overflow-hidden",children:[x.jsxs("h3",{className:"font-medium text-foreground text-sm p-3 px-4 bg-card border-b border-border flex items-center gap-2",children:[x.jsx(yj,{className:"h-4 w-4 text-muted-foreground"}),"Progress"]}),x.jsx("div",{children:n.map((l,i)=>{const o=i===n.length-1,{Icon:s,iconClass:c,textClass:f}=W8[l.status];return x.jsxs("div",{className:ye("flex items-center gap-3 px-4 py-2.5 bg-background",!o&&"border-b border-border"),children:[x.jsx(s,{className:ye("h-4 w-4 flex-shrink-0",c)}),x.jsx("span",{className:ye("text-sm",f),children:l.status==="in_progress"?l.activeForm:l.content})]},i)})})]})}):null}function Oh(e,n){if(!e)return"";if(n){const l=n.endsWith("/")?n:`${n}/`;if(e.startsWith(l))return e.slice(l.length);if(e===n)return""}return e.replace(/^\/home\/user\/workspace\//,"")}function t9(e){const n=e.split(`
|
|
407
|
+
`),l=/^\s*(\d+)→(.*)$/;return n.map(i=>{const o=i.match(l);return o?{lineNumber:parseInt(o[1],10),content:o[2]}:{lineNumber:null,content:i}})}function n9(e){return e.replace(/<[^>]+>/g,"")}function r9(e,n){const l=e.split(`
|
|
408
|
+
`),i=n.split(`
|
|
409
|
+
`),o=l9(l,i),s=i9(l,i,o);return a9(s)}function l9(e,n){const l=e.length,i=n.length,o=Array.from({length:l+1},()=>Array(i+1).fill(0));for(let s=1;s<=l;s++)for(let c=1;c<=i;c++)o[s][c]=e[s-1]===n[c-1]?o[s-1][c-1]+1:Math.max(o[s-1][c],o[s][c-1]);return o}function i9(e,n,l){const i=[];let o=e.length,s=n.length;for(;o>0||s>0;)o>0&&s>0&&e[o-1]===n[s-1]?(i.push({type:"context",text:e[o-1],oldIdx:o,newIdx:s}),o--,s--):s>0&&(o===0||l[o][s-1]>=l[o-1][s])?(i.push({type:"added",text:n[s-1],oldIdx:o,newIdx:s}),s--):(i.push({type:"removed",text:e[o-1],oldIdx:o,newIdx:s}),o--);return i.reverse()}function a9(e){return e.map(n=>{const l=n.type==="removed"?"-":n.type==="added"?"+":" ";return{type:n.type,content:`${l}${n.text}`}})}function Dh({content:e,isDiff:n=!1,oldString:l,newString:i}){const o=w.useMemo(()=>n&&l!==void 0&&i!==void 0?r9(l,i):[],[n,l,i]),s=w.useMemo(()=>n?[]:t9(e),[e,n]),c=w.useMemo(()=>s.some(f=>f.lineNumber!==null),[s]);return n&&o.length>0?x.jsx("div",{className:"my-1 rounded-lg border border-border overflow-hidden",children:x.jsx("div",{className:"overflow-auto max-h-64 md:max-h-[50vh]",children:x.jsx("table",{className:"w-full border-collapse text-xs font-mono",children:x.jsx("tbody",{children:o.map((f,d)=>{const h=f.type==="removed"?"bg-red-500/10 dark:bg-red-500/15":f.type==="added"?"bg-green-500/10 dark:bg-green-500/15":"",y=f.type==="removed"?"text-red-700 dark:text-red-400":f.type==="added"?"text-green-700 dark:text-green-400":"text-foreground";return x.jsxs("tr",{className:h,children:[x.jsx("td",{className:`px-2 py-0 select-none w-0 whitespace-nowrap ${f.type==="removed"?"text-red-500/50":f.type==="added"?"text-green-500/50":"text-muted-foreground/50"}`,children:f.type==="removed"?"-":f.type==="added"?"+":" "}),x.jsx("td",{className:`px-2 py-0 whitespace-pre select-all ${y}`,children:f.content.slice(1)})]},d)})})})})}):x.jsx("div",{className:"my-1 rounded-lg border border-border overflow-hidden",children:x.jsx("div",{className:"overflow-auto max-h-64 md:max-h-[50vh]",children:x.jsx("table",{className:"w-full border-collapse text-xs font-mono",children:x.jsx("tbody",{children:s.map((f,d)=>x.jsxs("tr",{children:[c&&x.jsx("td",{className:"px-2 py-0 select-none w-0 whitespace-nowrap text-muted-foreground/50 text-right",children:f.lineNumber!==null?f.lineNumber:""}),x.jsx("td",{className:"px-2 py-0 whitespace-pre select-all text-foreground",children:n9(f.content)})]},d))})})})})}function V2({message:e,isLoading:n=!1,localPath:l}){var k;const i=e.result!==void 0,o=!i&&n,s=w.useMemo(()=>{if(e.toolKind==="skill")return e.input.skill;if(e.toolKind==="glob")return`Search files ${e.input.pattern==="**/*"?"in all directories":`matching ${e.input.pattern}`}`;if(e.toolKind==="grep"){const C=e.input.pattern,E=e.input.outputMode;return E==="count"?`Count \`${C}\` occurrences`:E==="content"?`Find \`${C}\` in text`:`Find \`${C}\` in files`}return e.toolKind==="bash"?e.input.description||e.input.command||"Bash":e.toolKind==="web_search"?e.input.query||"Web Search":e.toolKind==="read_file"?`Read ${Oh(e.input.filePath,l)}`:e.toolKind==="write_file"?`Write ${Oh(e.input.filePath,l)}`:e.toolKind==="edit_file"?`Edit ${Oh(e.input.filePath,l)}`:e.toolKind==="mcp_generic"?`${Jh(e.input.tool)} from ${Jh(e.input.server)}`:e.toolKind==="subagent_task"&&e.input.subagentType||e.toolName},[e.input,e.toolName,l]),c=w.useMemo(()=>e.toolKind==="subagent_task",[e.toolKind]),f=w.useMemo(()=>{if(e.toolKind==="skill")return e.input.skill},[e.input,e.toolKind]),d=e.toolKind==="bash",h=e.toolKind==="write_file",y=e.toolKind==="edit_file",g=e.toolKind==="read_file",v=w.useMemo(()=>{if(typeof e.result=="string")return e.result;if(!e.result)return"";if(typeof e.result=="object"&&e.result!==null&&"content"in e.result){const C=e.result.content;if(typeof C=="string")return C}return JSON.stringify(e.result,null,2)},[e.result]),b=w.useMemo(()=>{switch(e.toolKind){case"bash":return e.input.command;case"write_file":return e.input.content;default:return JSON.stringify(e.input,null,2)}},[e]);return x.jsx(Dl,{className:"w-full",children:x.jsxs(wc,{expandedContent:x.jsx(Sc,{className:"my-4 text-sm",children:x.jsxs("div",{className:"flex flex-col gap-2",children:[y?x.jsx(Dh,{content:"",isDiff:!0,oldString:e.input.oldString,newString:e.input.newString}):!g&&!h&&x.jsx(Lb,{label:d?x.jsxs("span",{className:"flex items-center gap-2 w-full",children:[x.jsx("span",{children:"Command"}),!!e.input.timeoutMs&&x.jsxs("span",{className:"text-muted-foreground",children:["timeout: ",String(e.input.timeoutMs),"ms"]}),!!e.input.runInBackground&&x.jsx("span",{className:"text-muted-foreground",children:"background"})]}):h?"Contents":"Input",copyText:b,children:b}),i&&g&&!e.isError&&x.jsx(Dh,{content:v}),h&&!e.isError&&x.jsx(Dh,{content:e.input.content}),i&&!g&&!(h&&!e.isError)&&!(y&&!e.isError)&&x.jsx(Lb,{label:e.isError?"Error":"Result",copyText:v,children:v})]})}),children:[x.jsx("div",{className:"w-5 h-5 relative flex items-center justify-center",children:(()=>{if(e.isError)return x.jsx(Po,{className:"size-4 text-destructive"});if(c)return x.jsx(Dp,{className:"size-4 text-muted-icon"});const C=_S(e.toolName);return x.jsx(C,{className:"size-4 text-muted-icon"})})()}),x.jsx(Rl,{className:"text-left transition-opacity duration-200 truncate",children:x.jsx(gc,{animate:o,shimmerWidth:Math.max(20,(((k=f||s)==null?void 0:k.length)??33)*3),children:f||s})})]})})}function o9({message:e}){const n=l=>{if(l<1e3)return`${l}ms`;const i=Math.floor(l/1e3),o=Math.floor(i/3600),s=Math.floor(i%3600/60),c=i%60;return o>0?`${o}h${s>0?` ${s}m`:""}`:s>0?`${s}m${c>0?` ${c}s`:""}`:`${c}s`};return x.jsxs(Dl,{className:`px-0.5 text-xs tracking-wide ${e.durationMs>6e4?"":"hidden"}`,children:[x.jsx("div",{className:"w-full h-[1px] bg-border"}),x.jsxs(Rl,{className:"whitespace-nowrap text-[11px] tracking-widest text-muted-foreground/60 uppercase flex-shrink-0",children:["Worked for ",n(e.durationMs)]}),x.jsx("div",{className:"w-full h-[1px] bg-border"})]})}function s9({message:e}){return x.jsx("div",{className:"flex items-center justify-end gap-2 text-sm text-muted-foreground my-3",children:x.jsxs("div",{className:"inline-flex gap-1.5 items-center justify-center whitespace-nowrap text-sm font-medium bg-background text-foreground/60 border border-border h-9 pl-1 pr-4 rounded-full",children:[x.jsx(QR,{className:"h-4 w-4 ml-1.5"}),x.jsx("em",{children:"Interrupted"})]})})}function Wu({size:e=4}){return x.jsxs("svg",{className:"flex-1",viewBox:`0 0 100 ${e}`,preserveAspectRatio:"none",style:{height:`${e}px`},children:[x.jsx("pattern",{id:"zigzag",width:e,height:e,patternUnits:"userSpaceOnUse",children:x.jsx("path",{d:`M0 ${e} L${e/2} 0 L${e} ${e}`,fill:"none",stroke:"currentColor",strokeWidth:"0.5",className:"text-muted-foreground/30",style:{stroke:"currentColor"}})}),x.jsx("rect",{width:"100%",height:e,fill:"url(#zigzag)",className:"text-muted-foreground/30"})]})}function u9(){return x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx(Wu,{}),x.jsx("span",{className:"text-[11px] tracking-widest text-muted-foreground uppercase flex-shrink-0",children:"Compacted"}),x.jsx(Wu,{})]})}function c9(){return x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx(Wu,{}),x.jsx("span",{className:"text-[11px] tracking-widest text-muted-foreground uppercase flex-shrink-0",children:"Context Cleared"}),x.jsx(Wu,{})]})}function f9({message:e}){return x.jsx(Dl,{children:x.jsxs(wc,{expandedContent:x.jsx(Sc,{className:"my-4 text-xs",children:x.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:x.jsx(Rc,{remarkPlugins:[jc],components:Cc,children:e.summary})})}),children:[x.jsx("div",{className:"w-5 h-5 relative flex items-center justify-center",children:x.jsx(rw,{className:"h-4.5 w-4.5 text-muted-foreground"})}),x.jsx(Rl,{children:"Summarized"})]})})}const d9={compacting:"Compacting..."};function h9({message:e}){const n=d9[e.status]||e.status;return x.jsxs(Dl,{className:"grid grid-cols-[auto_1fr] items-center gap-1.5 text-sm animate-pulse",children:[x.jsx("div",{className:"w-5 h-5 relative flex items-center justify-center",children:x.jsx(rw,{className:"h-4.5 w-4.5 text-muted-foreground"})}),x.jsx(Rl,{className:"text-left transition-opacity duration-200 truncate",children:n})]})}const p9={read_file:{key:"read",singular:"read",plural:"reads"},edit_file:{key:"edit",singular:"edit",plural:"edits"},write_file:{key:"write",singular:"write",plural:"writes"},bash:{key:"bash",singular:"command",plural:"commands"},grep:{key:"grep",singular:"search",plural:"searches"},glob:{key:"glob",singular:"glob",plural:"globs"},subagent_task:{key:"task",singular:"agent",plural:"agents"},web_search:{key:"websearch",singular:"web search",plural:"web searches"},skill:{key:"skill",singular:"skill",plural:"skills"},todo_write:{key:"todo",singular:"todo update",plural:"todo updates"}},m9={key:"other",singular:"tool call",plural:"tool calls"};function g9(e){return p9[e]??m9}function y9(e){const n=new Map,l=[];for(const i of e){const o=i.toolKind,s=g9(o),c=n.get(s.key);c?c.count++:(n.set(s.key,{category:s,count:1}),l.push(s.key))}return l.map(i=>{const{category:o,count:s}=n.get(i);return`${s} ${s===1?o.singular:o.plural}`}).join(", ")}function x9({messages:e,isLoading:n,localPath:l}){const[i,o]=w.useState(!1),s=w.useMemo(()=>y9(e),[e]),f=e.some(d=>d.result===void 0)&&n;return x.jsx(Dl,{className:"w-full",children:x.jsxs("div",{className:"flex flex-col w-full",children:[x.jsx("button",{onClick:()=>o(!i),className:`group cursor-pointer grid grid-cols-[auto_1fr] items-center gap-1 text-sm ${!i&&!f?"hover:opacity-60 transition-opacity":""}`,children:x.jsxs("div",{className:"grid grid-cols-[auto_1fr] items-center gap-1.5",children:[x.jsx("div",{className:"w-5 h-5 relative flex items-center justify-center",children:x.jsx(Nl,{className:`h-4.5 w-4.5 text-muted-icon transition-all duration-200 ${i?"rotate-90":""}`})}),x.jsx(Rl,{className:"text-left",children:x.jsx(gc,{animate:f,children:s})})]})}),i&&x.jsxs("div",{className:"my-4 flex flex-col gap-3",children:[e.map(d=>x.jsx(V2,{message:d,isLoading:n,localPath:l},d.id)),e.length>5&&x.jsx("button",{onClick:()=>o(!1),className:"cursor-pointer grid grid-cols-[auto_1fr] items-center gap-1 text-xs hover:opacity-80 transition-opacity",children:x.jsxs("div",{className:"grid grid-cols-[auto_1fr] items-center gap-1.5",children:[x.jsx("div",{className:"w-5 h-5 relative flex items-center justify-center",children:x.jsx(Nl,{className:"h-4.5 w-4.5 text-muted-icon -rotate-90"})}),x.jsx(Rl,{className:"text-left",children:"Collapse"})]})})]})]})})}const v9=new Set(["AskUserQuestion","ExitPlanMode","TodoWrite"]);function T0(e){if(e.kind!=="tool")return!1;const n=e.toolName;return!v9.has(n)}function b9(e){const n=[];let l=0;for(;l<e.length;){const i=e[l];if(T0(i)){const o=[i],s=l;for(l+=1;l<e.length&&T0(e[l]);)o.push(e[l]),l+=1;o.length>=2?n.push({type:"tool-group",messages:o,startIndex:s}):n.push({type:"single",message:i,index:s});continue}n.push({type:"single",message:i,index:l}),l+=1}return n}function w9({messages:e,isLoading:n,localPath:l,latestToolIds:i,onAskUserQuestionSubmit:o,onExitPlanModeConfirm:s}){const c=w.useMemo(()=>b9(e),[e]);function f(d,h){if(d.kind==="user_prompt")return x.jsx(H8,{content:d.content},d.id);switch(d.kind){case"unknown":return x.jsx(P8,{json:d.json},d.id);case"system_init":return e.findIndex(g=>g.kind==="system_init")===h?x.jsx(G8,{message:d,rawJson:d.debugRaw},d.id):null;case"account_info":return e.findIndex(g=>g.kind==="account_info")===h?x.jsx(Y8,{message:d},d.id):null;case"assistant_text":return x.jsx($8,{message:d},d.id);case"tool":return d.toolKind==="ask_user_question"?x.jsx(Z8,{message:d,onSubmit:o,isLatest:d.id===i.AskUserQuestion},d.id):d.toolKind==="exit_plan_mode"?x.jsx(J8,{message:d,onConfirm:s,isLatest:d.id===i.ExitPlanMode},d.id):d.toolKind==="todo_write"?d.id!==i.TodoWrite?null:x.jsx(e9,{message:d},d.id):x.jsx(V2,{message:d,isLoading:n,localPath:l},d.id);case"result":{const y=e[h+1],g=e[h-1];return(y==null?void 0:y.kind)==="context_cleared"||(g==null?void 0:g.kind)==="context_cleared"?null:x.jsx(o9,{message:d},d.id)}case"interrupted":return x.jsx(s9,{message:d},d.id);case"compact_boundary":return x.jsx(u9,{},d.id);case"context_cleared":return x.jsx(c9,{},d.id);case"compact_summary":return x.jsx(f9,{message:d},d.id);case"status":return h===e.length-1?x.jsx(h9,{message:d},d.id):null}}return x.jsx(x.Fragment,{children:c.map(d=>{if(d.type==="tool-group")return x.jsx("div",{className:"group relative",children:x.jsx(x9,{messages:d.messages,isLoading:n,localPath:l})},`group-${d.startIndex}`);const h=f(d.message,d.index);return h?x.jsx("div",{id:`msg-${d.message.id}`,className:"group relative",children:h},d.message.id):null})})}function R0(){var n,l,i,o;const e=Q0();return x.jsx("div",{className:"flex-1 flex flex-col min-w-0 relative",children:x.jsxs(jS,{className:"bg-background flex-1 flex flex-col overflow-hidden border-0 rounded-none relative",children:[x.jsxs(OS,{className:"flex-1 p-0 overflow-hidden relative",children:[x.jsx(fO,{sidebarCollapsed:e.sidebarCollapsed,onOpenSidebar:e.openSidebar,onExpandSidebar:e.expandSidebar,onNewChat:e.handleCompose,localPath:e.navbarLocalPath,onOpenExternal:s=>{e.handleOpenExternal(s)}}),x.jsx(LS,{ref:e.scrollRef,onScroll:e.updateScrollState,className:"h-full px-4 scroll-pt-[72px]",children:x.jsxs("div",{className:"animate-fade-in space-y-5 pt-[72px] max-w-[800px] mx-auto",style:{paddingBottom:e.transcriptPaddingBottom},children:[e.messages.length===0?x.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[40vh] text-muted-foreground gap-4",children:[x.jsx(bo,{strokeWidth:1.5,className:"size-8 text-muted-foreground"}),x.jsx("div",{className:"text-base font-normal text-muted-foreground text-center max-w-xs",children:"What are we making?"})]}):x.jsx(w9,{messages:e.messages,isLoading:e.isProcessing,localPath:(n=e.runtime)==null?void 0:n.localPath,latestToolIds:e.latestToolIds,onAskUserQuestionSubmit:e.handleAskUserQuestion,onExitPlanModeConfirm:e.handleExitPlanMode}),e.isProcessing?x.jsx(gO,{status:(l=e.runtime)==null?void 0:l.status}):null,e.commandError?x.jsx("div",{className:"text-sm text-destructive border border-destructive/20 bg-destructive/5 rounded-xl px-4 py-3",children:e.commandError}):null,x.jsx("div",{className:"flex-1 min-h-[10vh]","aria-hidden":"true"})]})}),x.jsx("div",{style:{bottom:e.transcriptPaddingBottom-36},className:ye("absolute left-1/2 -translate-x-1/2 z-10 transition-all",e.showScrollButton?"scale-100 duration-300 ease-[cubic-bezier(0.34,1.56,0.64,1)]":"scale-60 duration-300 ease-out pointer-events-none blur-sm opacity-0"),children:x.jsx("button",{onClick:e.scrollToBottom,className:"flex items-center transition-colors gap-1.5 px-2 bg-white hover:bg-muted border border-border rounded-full aspect-square cursor-pointer text-sm text-primary hover:text-foreground dark:bg-slate-700 dark:hover:bg-slate-600 dark:text-slate-100 dark:border-slate-600",children:x.jsx(jR,{className:"h-5 w-5"})})})]}),x.jsx("div",{className:"absolute bottom-0 left-0 right-0 z-20 pointer-events-none",children:x.jsx("div",{className:"bg-gradient-to-t from-background via-background pointer-events-auto",ref:e.inputRef,children:x.jsx(oO,{onSubmit:e.handleSend,onCancel:()=>{e.handleCancel()},disabled:!e.hasSelectedProject||((i=e.runtime)==null?void 0:i.status)==="waiting_for_user",canCancel:e.canCancel,chatId:e.activeChatId,activeProvider:((o=e.runtime)==null?void 0:o.provider)??null,availableProviders:e.availableProviders},e.activeChatId??"new-chat")})})]})})}function S9({text:e}){const[n,l]=w.useState(!1);async function i(){await navigator.clipboard.writeText(e),l(!0),setTimeout(()=>l(!1),2e3)}return x.jsx(Fe,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-foreground",onClick:()=>void i(),children:n?x.jsx(ri,{className:"h-4 w-4 text-green-400"}):x.jsx(sc,{className:"h-4 w-4"})})}function j0({children:e}){return x.jsxs("div",{className:"grid grid-cols-[1fr_auto] items-center group bg-background border border-border text-foreground rounded-xl p-1.5 pl-3 font-mono text-sm",children:[x.jsxs("pre",{className:"inline-flex items-center gap-2 overflow-x-auto",children:[x.jsx(Nl,{className:"inline h-4 w-4 opacity-40"}),x.jsx("code",{children:e})]}),x.jsx(S9,{text:e})]})}function ku({children:e}){return x.jsx("div",{className:"bg-card border border-border rounded-2xl p-4",children:e})}function _h({children:e}){return x.jsx("h2",{className:"text-[13px] font-medium text-muted-foreground uppercase tracking-wider mb-3",children:e})}function M0({narrow:e=!1,title:n,subtitle:l,icon:i=jp}){return x.jsxs("div",{className:ye("w-full",e?"max-w-2xl px-6 pt-16 mx-auto":"px-6 pt-16 mb-10"),children:[x.jsxs("div",{className:ye("flex items-center gap-3 mb-2",e&&"justify-center"),children:[x.jsx("div",{className:"p-2 pl-0 rounded-lg",children:x.jsx(i,{className:"h-6 w-6 text-muted-foreground"})}),x.jsx("h1",{className:"text-2xl font-semibold text-foreground",children:n})]}),x.jsx("p",{className:ye("text-muted-foreground",e&&"mb-10 text-center"),children:l})]})}function zh({icon:e,title:n,subtitle:l,iconClassName:i}){return x.jsxs("div",{className:"flex flex-col items-center gap-0",children:[x.jsx("div",{className:"p-3 mb-2 rounded-xl bg-background border border-border",children:x.jsx(e,{className:i||"h-8 w-8 text-muted-foreground"})}),x.jsx("span",{className:"text-sm font-medium",children:n}),x.jsx("span",{className:"text-xs text-muted-foreground",children:l})]})}function O0(){return x.jsx(OR,{className:"h-4 w-4 text-muted-foreground"})}function D0({number:e,title:n,children:l}){return x.jsx("div",{className:"flex gap-4",children:x.jsxs("div",{className:"flex-1 min-w-0",children:[x.jsxs("div",{className:"grid grid-cols-[auto_1fr] items-baseline gap-3",children:[x.jsxs("div",{className:"flex-shrink-0 flex items-center justify-center font-medium text-logo",children:[e,"."]}),x.jsx("h3",{className:"font-medium text-foreground mb-2",children:n})]}),x.jsx("div",{className:"text-muted-foreground text-sm space-y-3",children:l})]})})}function C9({localPath:e,loading:n,onClick:l}){return x.jsxs(qu,{children:[x.jsx(Fu,{asChild:!0,children:x.jsxs("button",{className:ye("border border-border hover:border-primary/30 group rounded-lg bg-card px-4 py-3 flex items-center gap-3 w-full text-left hover:bg-muted/50 transition-colors",n&&"opacity-50 cursor-not-allowed"),disabled:n,onClick:l,children:[x.jsx(ew,{className:"h-4 w-4 text-muted-foreground flex-shrink-0"}),x.jsx("span",{className:"font-medium text-foreground truncate flex-1",children:dS(e)}),n?x.jsx(oi,{className:"h-4 w-4 text-muted-foreground group-hover:text-primary animate-spin flex-shrink-0"}):x.jsx(Mp,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity flex-shrink-0"})]})}),x.jsx(Mo,{children:x.jsx("p",{children:e})})]})}function k9({connectionStatus:e,ready:n,snapshot:l,startingLocalPath:i,commandError:o,onOpenProject:s,onCreateProject:c}){const[f,d]=w.useState(!1),h=w.useMemo(()=>(l==null?void 0:l.projects)??[],[l==null?void 0:l.projects]),y=e==="connecting"||!n,g=e==="connected"&&n;return x.jsxs("div",{className:"flex-1 flex flex-col min-w-0 bg-background overflow-y-auto",children:[g?x.jsxs(x.Fragment,{children:[x.jsx(M0,{title:(l==null?void 0:l.machine.displayName)??"Local Projects",subtitle:`${Qt} is connected, choose a project below to get started.`}),x.jsxs("div",{className:"w-full px-6 mb-10",children:[x.jsxs("div",{className:"flex items-baseline justify-between mb-3",children:[x.jsx("h2",{className:"text-[13px] font-medium text-muted-foreground uppercase tracking-wider",children:"Projects"}),x.jsxs(Fe,{variant:"default",size:"sm",onClick:()=>d(!0),children:[x.jsx(iw,{className:"h-4 w-4 mr-1.5"}),"Add Project"]})]}),h.length>0?x.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-4 3xl:grid-cols-5 gap-2",children:h.map(v=>x.jsx(C9,{localPath:v.localPath,loading:i===v.localPath,onClick:()=>{s(v.localPath)}},v.localPath))}):x.jsx(ku,{children:x.jsx("p",{className:"text-sm text-muted-foreground",children:"No local projects discovered yet. Open one with Claude or Codex, or create a new project here."})}),o?x.jsx("div",{className:"text-sm text-destructive border border-destructive/20 bg-destructive/5 rounded-xl px-4 py-3 mt-4",children:o}):null]})]}):x.jsxs(x.Fragment,{children:[x.jsx(M0,{narrow:!0,icon:nb,title:y?`Connecting ${Qt}`:`Connect ${Qt}`,subtitle:y?`${Qt} is starting up and loading your local projects.`:`Run ${Qt} directly on your machine with full access to your local files and agent project history.`}),x.jsxs("div",{className:"max-w-2xl w-full mx-auto pb-12 px-6",children:[x.jsx(_h,{children:"Status"}),x.jsx("div",{className:"mb-8",children:x.jsx(ku,{children:x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx(oi,{className:"h-4 w-4 text-muted-foreground animate-spin"}),x.jsx("span",{className:"text-sm text-muted-foreground",children:y?`Connecting to your local ${Qt} server...`:x.jsxs(x.Fragment,{children:["Not connected. Run ",x.jsx("code",{className:"bg-background border border-border rounded-md mx-0.5 p-1 font-mono text-xs text-foreground",children:yu()})," from any terminal on this machine."]})})]})})}),y?null:x.jsxs("div",{className:"mb-10",children:[x.jsx(_h,{children:"How it works"}),x.jsx(ku,{children:x.jsxs("div",{className:"flex items-center justify-around gap-6 py-4 px-2",children:[x.jsx(zh,{icon:Op,title:`${Qt} CLI`,subtitle:"On Your Machine"}),x.jsx(O0,{}),x.jsx(zh,{icon:jp,title:`${Qt} Server`,subtitle:"Local WebSocket"}),x.jsx(O0,{}),x.jsx(zh,{icon:nb,title:`${Qt} UI`,subtitle:"Project Chat"})]})})]}),y?null:x.jsxs("div",{className:"mb-10",children:[x.jsx(_h,{children:"Setup"}),x.jsx(ku,{children:x.jsxs("div",{className:"space-y-4",children:[x.jsxs(D0,{number:1,title:`Start ${Qt}`,children:[x.jsx("p",{children:"Run this command in your terminal:"}),x.jsx(j0,{children:yu()})]}),x.jsxs(D0,{number:2,title:"Open the local UI",children:[x.jsxs("p",{children:[Qt," serves the app locally and opens the Local Projects page in an app-style browser window."]}),x.jsx(j0,{children:"http://localhost:3210/local"})]}),x.jsxs("div",{className:"mt-8",children:[x.jsx("h3",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider mb-4",children:"Notes"}),x.jsxs("div",{className:"space-y-3 text-sm",children:[x.jsxs("div",{className:"flex gap-4",children:[x.jsx("code",{className:"font-mono text-foreground whitespace-nowrap",children:yu("").trim()}),x.jsx("span",{className:"text-muted-foreground",children:"Start in the current directory"})]}),x.jsxs("div",{className:"flex gap-4",children:[x.jsx("code",{className:"font-mono text-foreground whitespace-nowrap",children:yu("--no-open")}),x.jsx("span",{className:"text-muted-foreground",children:"Start the server without opening the browser"})]})]})]})]})})]})]})]}),x.jsx(Yw,{open:f,onOpenChange:d,onConfirm:v=>{c(v)}}),x.jsx("div",{className:"py-4 text-center",children:x.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v",L3.split("/")[1]]})})]})}function E9(){const e=Q0();return x.jsx("div",{className:"flex-1 flex flex-col min-w-0 relative",children:x.jsx(k9,{connectionStatus:e.connectionStatus,ready:e.localProjectsReady,snapshot:e.localProjects,startingLocalPath:e.startingLocalPath,commandError:e.commandError,onOpenProject:e.handleOpenLocalProject,onCreateProject:e.handleCreateProject})})}function Eu(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function N9(e){if(typeof e!="string")return e;try{return JSON.parse(e)}catch{return e}}function A9(e,n){const l=N9(n);switch(e.toolKind){case"ask_user_question":{const o=Eu(l),s=Eu(o==null?void 0:o.answers)??(o||{});return{answers:Object.fromEntries(Object.entries(s).map(([c,f])=>[c,String(f)]))}}case"exit_plan_mode":{const o=Eu(l);return{confirmed:typeof(o==null?void 0:o.confirmed)=="boolean"?o.confirmed:void 0,clearContext:typeof(o==null?void 0:o.clearContext)=="boolean"?o.clearContext:void 0,message:typeof(o==null?void 0:o.message)=="string"?o.message:void 0}}case"read_file":if(typeof l=="string")return l;const i=Eu(l);return{content:typeof(i==null?void 0:i.content)=="string"?i.content:JSON.stringify(l,null,2)};default:return l}}function G2(e){return new Date(e).toISOString()}function Zn(e){return{id:e._id,messageId:e.messageId,timestamp:G2(e.createdAt),hidden:e.hidden}}function T9(e){return{id:e._id,messageId:e.messageId,hidden:e.hidden,kind:"tool",toolKind:e.tool.toolKind,toolName:e.tool.toolName,toolId:e.tool.toolId,input:e.tool.input,timestamp:G2(e.createdAt)}}function R9(e){if(e.debugRaw)try{return JSON.parse(e.debugRaw).tool_use_result}catch{return}}function j9(e){const n=new Map,l=[];for(const i of e)switch(i.kind){case"user_prompt":l.push({...Zn(i),kind:"user_prompt",content:i.content});break;case"system_init":l.push({...Zn(i),kind:"system_init",provider:i.provider,model:i.model,tools:i.tools,agents:i.agents,slashCommands:i.slashCommands,mcpServers:i.mcpServers,debugRaw:i.debugRaw});break;case"account_info":l.push({...Zn(i),kind:"account_info",accountInfo:i.accountInfo});break;case"assistant_text":l.push({...Zn(i),kind:"assistant_text",text:i.text});break;case"tool_call":{const o=T9(i);n.set(i.tool.toolId,{hydrated:o,normalized:i.tool}),l.push(o);break}case"tool_result":{const o=n.get(i.toolId);if(o){const s=o.normalized.toolKind==="ask_user_question"||o.normalized.toolKind==="exit_plan_mode"?R9(i)??i.content:i.content;o.hydrated.result=A9(o.normalized,s),o.hydrated.rawResult=s,o.hydrated.isError=i.isError}break}case"result":l.push({...Zn(i),kind:"result",success:!i.isError,cancelled:i.subtype==="cancelled",result:i.result,durationMs:i.durationMs,costUsd:i.costUsd});break;case"status":l.push({...Zn(i),kind:"status",status:i.status});break;case"compact_boundary":l.push({...Zn(i),kind:"compact_boundary"});break;case"compact_summary":l.push({...Zn(i),kind:"compact_summary",summary:i.summary});break;case"context_cleared":l.push({...Zn(i),kind:"context_cleared"});break;case"interrupted":l.push({...Zn(i),kind:"interrupted"});break;default:l.push({...Zn(i),kind:"unknown",json:JSON.stringify(i,null,2)});break}return l}const M9=["AskUserQuestion","ExitPlanMode","TodoWrite"],O9=new Set(["TodoWrite"]);function D9(e,n){for(let l=e.length-1;l>=0;l-=1){const i=e[l];if(i.kind!=="tool")continue;const o=i;if(o.toolName===n&&!o.result)return o.id}return null}function _9(e,n){for(let l=e.length-1;l>=0;l-=1){const i=e[l];if(i.kind!=="tool")continue;const o=i;if(o.toolName===n)return o.id}return null}function z9(e){const n={};for(const l of M9)n[l]=O9.has(l)?_9(e,l):D9(e,l);return n}function L9(e){return e==="starting"||e==="running"||e==="waiting_for_user"}function B9(e){return e==="starting"||e==="running"||e==="waiting_for_user"}class U9{constructor(n){Pr(this,"url");Pr(this,"ws",null);Pr(this,"reconnectTimer",null);Pr(this,"reconnectDelayMs",750);Pr(this,"subscriptions",new Map);Pr(this,"pending",new Map);Pr(this,"outboundQueue",[]);Pr(this,"statusListeners",new Set);this.url=n,this.connect()}dispose(){var n;this.reconnectTimer&&(window.clearTimeout(this.reconnectTimer),this.reconnectTimer=null),(n=this.ws)==null||n.close(),this.ws=null;for(const l of this.pending.values())l.reject(new Error("Socket disposed"));this.pending.clear()}onStatus(n){return this.statusListeners.add(n),n(this.getStatus()),()=>{this.statusListeners.delete(n)}}subscribe(n,l){const i=crypto.randomUUID();return this.subscriptions.set(i,{topic:n,listener:l}),this.enqueue({v:1,type:"subscribe",id:i,topic:n}),()=>{this.subscriptions.delete(i),this.enqueue({v:1,type:"unsubscribe",id:i})}}command(n){const l=crypto.randomUUID(),i={v:1,type:"command",id:l,command:n};return new Promise((o,s)=>{this.pending.set(l,{resolve:o,reject:s}),this.enqueue(i)})}connect(){this.emitStatus("connecting"),this.ws=new WebSocket(this.url),this.ws.addEventListener("open",()=>{this.reconnectDelayMs=750,this.emitStatus("connected");for(const[n,l]of this.subscriptions.entries())this.sendNow({v:1,type:"subscribe",id:n,topic:l.topic});for(;this.outboundQueue.length>0;){const n=this.outboundQueue.shift();n&&this.sendNow(n)}}),this.ws.addEventListener("message",n=>{let l;try{l=JSON.parse(String(n.data))}catch{return}if(l.type==="snapshot"){const i=this.subscriptions.get(l.id);i==null||i.listener(l.snapshot.data);return}if(l.type==="ack"){const i=this.pending.get(l.id);if(!i)return;this.pending.delete(l.id),i.resolve(l.result);return}if(l.type==="error"){if(!l.id){console.error(B3,l.message);return}const i=this.pending.get(l.id);if(!i)return;this.pending.delete(l.id),i.reject(new Error(l.message))}}),this.ws.addEventListener("close",()=>{this.emitStatus("disconnected");for(const n of this.pending.values())n.reject(new Error("Disconnected"));this.pending.clear(),this.scheduleReconnect()})}scheduleReconnect(){this.reconnectTimer===null&&(this.reconnectTimer=window.setTimeout(()=>{this.reconnectTimer=null,this.connect(),this.reconnectDelayMs=Math.min(this.reconnectDelayMs*2,5e3)},this.reconnectDelayMs))}getStatus(){var n,l;return((n=this.ws)==null?void 0:n.readyState)===WebSocket.OPEN?"connected":((l=this.ws)==null?void 0:l.readyState)===WebSocket.CONNECTING?"connecting":"disconnected"}emitStatus(n){for(const l of this.statusListeners)l(n)}enqueue(n){var l;if(((l=this.ws)==null?void 0:l.readyState)===WebSocket.OPEN){this.sendNow(n);return}this.outboundQueue.push(n)}sendNow(n){var l;(l=this.ws)==null||l.send(JSON.stringify(n))}}function H9(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`}function P9(){const e=w.useRef(null);return e.current||(e.current=new U9(H9())),w.useEffect(()=>{const n=e.current;return()=>{n==null||n.dispose()}},[]),e.current}function I9(e){var ft,Xr,te;const n=gp(),l=P9(),i=Kj(),[o,s]=w.useState({projectGroups:[]}),[c,f]=w.useState(null),[d,h]=w.useState(null),[y,g]=w.useState("connecting"),[v,b]=w.useState(!1),[k,C]=w.useState(!1),[E,N]=w.useState(!1),[M,j]=w.useState(null),[D,I]=w.useState(!1),[O,P]=w.useState(!1),[q,re]=w.useState(148),[H,J]=w.useState(!0),[ne,W]=w.useState(null),[Z,Q]=w.useState(null),[B,Y]=w.useState(null),le=w.useRef(null),de=w.useRef(null);w.useEffect(()=>l.onStatus(g),[l]),w.useEffect(()=>l.subscribe({type:"sidebar"},$=>{s($),b(!0),W(null)}),[l]),w.useEffect(()=>l.subscribe({type:"local-projects"},$=>{f($),C(!0),W(null)}),[l]),w.useEffect(()=>{if(!e){h(null),N(!0);return}return N(!1),l.subscribe({type:"chat",chatId:e},$=>{h($),N(!0),W(null)})},[e,l]),w.useEffect(()=>{if(M)return;const $=o.projectGroups[0];$&&j($.groupKey)},[M,o.projectGroups]),w.useEffect(()=>{if(!e||!v||!E)return;if(o.projectGroups.some(oe=>oe.chats.some(he=>he.chatId===e))){B===e&&Y(null);return}B!==e&&n("/")},[e,E,n,B,o.projectGroups,v]),w.useEffect(()=>{d&&(j(d.runtime.projectId),B===d.runtime.chatId&&Y(null))},[d,B]),w.useLayoutEffect(()=>{const $=de.current;if(!$)return;const oe=new ResizeObserver(()=>{re($.getBoundingClientRect().height)});return oe.observe($),re($.getBoundingClientRect().height),()=>oe.disconnect()},[]);const R=w.useMemo(()=>j9((d==null?void 0:d.messages)??[]),[d==null?void 0:d.messages]),z=w.useMemo(()=>z9(R),[R]),L=(d==null?void 0:d.runtime)??null,T=(d==null?void 0:d.availableProviders)??WM,se=B9(L==null?void 0:L.status),ce=L9(L==null?void 0:L.status),ue=q+48,we=!H&&R.length>0,Ae=((ft=c==null?void 0:c.projects[0])==null?void 0:ft.localPath)??null,xe=(L==null?void 0:L.localPath)??Ae??((Xr=o.projectGroups[0])==null?void 0:Xr.localPath),Ne=!!(M??(L==null?void 0:L.projectId)??((te=o.projectGroups[0])==null?void 0:te.groupKey)??Ae);w.useEffect(()=>{const $=le.current;if(!$)return;$.scrollHeight-$.scrollTop-$.clientHeight<120&&$.scrollTo({top:$.scrollHeight,behavior:"smooth"})},[e,R.length,L==null?void 0:L.status]);function rt(){const $=le.current;if(!$)return;const oe=$.scrollHeight-$.scrollTop-$.clientHeight;J(oe<24)}function tt(){const $=le.current;$&&$.scrollTo({top:$.scrollHeight,behavior:"smooth"})}async function at($){try{const oe=await l.command({type:"chat.create",projectId:$});j($),Y(oe.chatId),n(`/chat/${oe.chatId}`),I(!1)}catch(oe){W(oe instanceof Error?oe.message:String(oe))}}async function Ye($){try{Q($);const oe=await l.command({type:"project.open",localPath:$});j(oe.projectId);const he=await l.command({type:"chat.create",projectId:oe.projectId});Y(he.chatId),n(`/chat/${he.chatId}`),I(!1),W(null)}catch(oe){W(oe instanceof Error?oe.message:String(oe))}finally{Q(null)}}async function Dt($){try{Q($.localPath);const oe=await l.command($.mode==="new"?{type:"project.create",localPath:$.localPath,title:$.title}:{type:"project.open",localPath:$.localPath});j(oe.projectId);const he=await l.command({type:"chat.create",projectId:oe.projectId});Y(he.chatId),n(`/chat/${he.chatId}`),I(!1),W(null)}catch(oe){W(oe instanceof Error?oe.message:String(oe))}finally{Q(null)}}async function _t($,oe){var he;try{let be=M??((he=o.projectGroups[0])==null?void 0:he.groupKey)??null;if(!e&&!be&&Ae&&(be=(await l.command({type:"project.open",localPath:Ae})).projectId,j(be)),!e&&!be)throw new Error("Open a project first");const Oe=await l.command({type:"chat.send",chatId:e??void 0,projectId:e?void 0:be??void 0,provider:oe==null?void 0:oe.provider,content:$,model:oe==null?void 0:oe.model,modelOptions:oe==null?void 0:oe.modelOptions,planMode:oe==null?void 0:oe.planMode});!e&&Oe.chatId&&(Y(Oe.chatId),n(`/chat/${Oe.chatId}`)),W(null)}catch(be){throw W(be instanceof Error?be.message:String(be)),be}}async function Fn(){if(e)try{await l.command({type:"chat.cancel",chatId:e})}catch($){W($ instanceof Error?$.message:String($))}}async function Vn($){if(await i.confirm({title:"Delete Chat",description:`Delete "${$.title}"? This cannot be undone.`,confirmLabel:"Delete",confirmVariant:"destructive"}))try{await l.command({type:"chat.delete",chatId:$.chatId}),$.chatId===e&&n("/")}catch(he){W(he instanceof Error?he.message:String(he))}}async function zt($){const oe=o.projectGroups.find(Oe=>Oe.groupKey===$);if(!oe)return;const he=oe.localPath.split("/").filter(Boolean).pop()??oe.localPath;if(await i.confirm({title:"Remove",description:`Remove "${he}" from the sidebar? Existing chats will be removed from ${Qt}.`,confirmLabel:"Remove",confirmVariant:"destructive"}))try{await l.command({type:"project.remove",projectId:$}),(L==null?void 0:L.projectId)===$&&n("/projects"),W(null)}catch(Oe){W(Oe instanceof Error?Oe.message:String(Oe))}}async function Lt($){var he,be;const oe=(L==null?void 0:L.localPath)??((he=c==null?void 0:c.projects[0])==null?void 0:he.localPath)??((be=o.projectGroups[0])==null?void 0:be.localPath);if(oe)try{await l.command({type:"system.openExternal",action:$,localPath:oe})}catch(Oe){W(Oe instanceof Error?Oe.message:String(Oe))}}function Nn(){var he,be;const $=M??((he=o.projectGroups[0])==null?void 0:he.groupKey);if($){at($);return}const oe=(be=c==null?void 0:c.projects[0])==null?void 0:be.localPath;if(oe){Ye(oe);return}n("/projects")}async function lr($,oe,he){if(e)try{await l.command({type:"chat.respondTool",chatId:e,toolUseId:$,result:{questions:oe,answers:he}})}catch(be){W(be instanceof Error?be.message:String(be))}}async function $r($,oe,he,be){if(e){oe&&RS.getState().setPlanMode(!1);try{await l.command({type:"chat.respondTool",chatId:e,toolUseId:$,result:{confirmed:oe,...he?{clearContext:!0}:{},...be?{message:be}:{}}})}catch(Oe){W(Oe instanceof Error?Oe.message:String(Oe))}}}return{activeChatId:e,sidebarData:o,localProjects:c,chatSnapshot:d,connectionStatus:y,sidebarReady:v,localProjectsReady:k,commandError:ne,startingLocalPath:Z,sidebarOpen:D,sidebarCollapsed:O,scrollRef:le,inputRef:de,messages:R,latestToolIds:z,runtime:L,availableProviders:T,isProcessing:se,canCancel:ce,transcriptPaddingBottom:ue,showScrollButton:we,navbarLocalPath:xe,hasSelectedProject:Ne,openSidebar:()=>I(!0),closeSidebar:()=>I(!1),collapseSidebar:()=>P(!0),expandSidebar:()=>P(!1),updateScrollState:rt,scrollToBottom:tt,handleCreateChat:at,handleOpenLocalProject:Ye,handleCreateProject:Dt,handleSend:_t,handleCancel:Fn,handleDeleteChat:Vn,handleRemoveProject:zt,handleOpenExternal:Lt,handleCompose:Nn,handleAskUserQuestion:lr,handleExitPlanMode:$r}}function q9(){const e=yr(),n=tN(),l=I9(n.chatId??null),i=e.pathname==="/projects";return x.jsxs("div",{className:"flex h-[100dvh] min-h-[100dvh] overflow-hidden",children:[x.jsx(JM,{data:l.sidebarData,activeChatId:l.activeChatId,connectionStatus:l.connectionStatus,ready:l.sidebarReady,open:l.sidebarOpen,collapsed:l.sidebarCollapsed,showMobileOpenButton:i,onOpen:l.openSidebar,onClose:l.closeSidebar,onCollapse:l.collapseSidebar,onExpand:l.expandSidebar,onCreateChat:o=>{l.handleCreateChat(o)},onCreateProject:o=>{l.handleCreateProject(o)},onDeleteChat:o=>{l.handleDeleteChat(o)},onRemoveProject:o=>{l.handleRemoveProject(o)}}),x.jsx(mN,{context:l})]})}function F9(){return x.jsx(D3,{children:x.jsx(Qj,{children:x.jsx(yN,{children:x.jsxs(xo,{element:x.jsx(q9,{}),children:[x.jsx(xo,{path:"/",element:x.jsx(R0,{})}),x.jsx(xo,{path:"/projects",element:x.jsx(E9,{})}),x.jsx(xo,{path:"/chat/:chatId",element:x.jsx(R0,{})})]})})})})}const Y2="lever-theme",V9=w.createContext(void 0),G9=e=>e==="light"||e==="dark"||e==="system",$2=()=>typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",_0=e=>{if(typeof document>"u")return;const n=e==="system"?$2():e;document.documentElement.classList.toggle("dark",n==="dark")},Y9=()=>{if(typeof window>"u")return"system";const e=window.localStorage.getItem(Y2);return G9(e)?e:"system"};function $9({children:e}){const[n,l]=w.useState(Y9);w.useEffect(()=>{_0(n),typeof window<"u"&&window.localStorage.setItem(Y2,n)},[n]),w.useEffect(()=>{if(n!=="system")return;const o=window.matchMedia("(prefers-color-scheme: dark)"),s=()=>_0("system");return o.addEventListener?(o.addEventListener("change",s),()=>o.removeEventListener("change",s)):(o.addListener(s),()=>o.removeListener(s))},[n]);const i=w.useMemo(()=>{const o=n==="system"?$2():n;return{theme:n,resolvedTheme:o,setTheme:l}},[n]);return x.jsx(V9.Provider,{value:i,children:e})}const X2=document.getElementById("root");if(!X2)throw new Error("Missing #root");yE.createRoot(X2).render(x.jsx(w.StrictMode,{children:x.jsx(IN,{children:x.jsx($9,{children:x.jsx(F9,{})})})}));
|