@dendelion/paper-camp 0.14.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/assets/{index-SjRbcqaJ.js → index-0BzPyUVh.js} +2 -2
- package/dist/app/assets/{index-SjRbcqaJ.js.map → index-0BzPyUVh.js.map} +1 -1
- package/dist/app/assets/{index-D2zDC3YW.js → index-BiDION9V.js} +2 -2
- package/dist/app/assets/{index-D2zDC3YW.js.map → index-BiDION9V.js.map} +1 -1
- package/dist/app/assets/index-Bz4Df_iX.js +2 -0
- package/dist/app/assets/index-Bz4Df_iX.js.map +1 -0
- package/dist/app/assets/{index-DrOhvDGC.js → index-C6vBW0wx.js} +2 -2
- package/dist/app/assets/{index-DrOhvDGC.js.map → index-C6vBW0wx.js.map} +1 -1
- package/dist/app/assets/{index-C5as2mi1.js → index-CGtPCj1V.js} +3 -3
- package/dist/app/assets/{index-C5as2mi1.js.map → index-CGtPCj1V.js.map} +1 -1
- package/dist/app/assets/index-Cm3hzD0z.js +7 -0
- package/dist/app/assets/index-Cm3hzD0z.js.map +1 -0
- package/dist/app/assets/index-Dtdlcmro.js +2 -0
- package/dist/app/assets/{index-BTh66TxZ.js.map → index-Dtdlcmro.js.map} +1 -1
- package/dist/app/assets/main-Ba3mXsWY.js +207 -0
- package/dist/app/assets/main-Ba3mXsWY.js.map +1 -0
- package/dist/app/assets/main-CIoBIAYG.css +1 -0
- package/dist/app/assets/{sidebar-section-BlseNbG8.js → sidebar-section-B3aJWLXB.js} +2 -2
- package/dist/app/assets/{sidebar-section-BlseNbG8.js.map → sidebar-section-B3aJWLXB.js.map} +1 -1
- package/dist/app/index.html +6 -6
- package/dist/app/toolbar.js +11822 -0
- package/dist/app/toolbar.js.map +1 -0
- package/dist/chunks/{scaffold.BL48Net9.js → parked-questions.DZYZgrSZ.js} +1334 -1227
- package/dist/chunks/parked-questions.DZYZgrSZ.js.map +1 -0
- package/dist/cli/index.js +7510 -7402
- package/dist/cli/index.js.map +1 -1
- package/dist/core/git-log.d.ts +6 -0
- package/dist/core/git-log.d.ts.map +1 -0
- package/dist/core/git-log.test.d.ts +2 -0
- package/dist/core/git-log.test.d.ts.map +1 -0
- package/dist/core/git-pr/branch.d.ts.map +1 -1
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +86 -78
- package/dist/core/parked-questions.d.ts +6 -0
- package/dist/core/parked-questions.d.ts.map +1 -0
- package/dist/core/parked-questions.test.d.ts +2 -0
- package/dist/core/parked-questions.test.d.ts.map +1 -0
- package/dist/core/parse/parser.d.ts +1 -0
- package/dist/core/parse/parser.d.ts.map +1 -1
- package/dist/core/parse/schemas.d.ts +1 -0
- package/dist/core/parse/schemas.d.ts.map +1 -1
- package/dist/core/readers.d.ts +1 -1
- package/dist/core/readers.d.ts.map +1 -1
- package/dist/core/release-notes.d.ts +4 -0
- package/dist/core/release-notes.d.ts.map +1 -0
- package/dist/core/release-notes.test.d.ts +2 -0
- package/dist/core/release-notes.test.d.ts.map +1 -0
- package/dist/core/serialize/serializer.d.ts +1 -0
- package/dist/core/serialize/serializer.d.ts.map +1 -1
- package/dist/core/status/status.d.ts +1 -1
- package/dist/core/status/status.d.ts.map +1 -1
- package/dist/core/trail.d.ts +8 -2
- package/dist/core/trail.d.ts.map +1 -1
- package/dist/types/index.d.ts +25 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +5 -5
- package/dist/types/index.js.map +1 -1
- package/dist/vite/index.d.ts +1 -1
- package/dist/vite/index.d.ts.map +1 -1
- package/dist/vite/index.js +51 -31
- package/dist/vite/index.js.map +1 -1
- package/dist/vite/proxy.d.ts +3 -1
- package/dist/vite/proxy.d.ts.map +1 -1
- package/package.json +6 -4
- package/dist/app/assets/index-BTh66TxZ.js +0 -2
- package/dist/app/assets/index-CXl1uFWF.js +0 -2
- package/dist/app/assets/index-CXl1uFWF.js.map +0 -1
- package/dist/app/assets/main-BC7PxPmE.js +0 -207
- package/dist/app/assets/main-BC7PxPmE.js.map +0 -1
- package/dist/app/assets/main-uLU_O3GC.css +0 -1
- package/dist/chunks/helpers.CUQjsQwc.js +0 -9
- package/dist/chunks/helpers.CUQjsQwc.js.map +0 -1
- package/dist/chunks/scaffold.BL48Net9.js.map +0 -1
- package/dist/toolbar/focus-panel.d.ts +0 -7
- package/dist/toolbar/focus-panel.d.ts.map +0 -1
- package/dist/toolbar/index.d.ts +0 -2
- package/dist/toolbar/index.d.ts.map +0 -1
- package/dist/toolbar/runs-panel.d.ts +0 -12
- package/dist/toolbar/runs-panel.d.ts.map +0 -1
- package/dist/toolbar/scout-panel.d.ts +0 -10
- package/dist/toolbar/scout-panel.d.ts.map +0 -1
- package/dist/toolbar/ship-panel.d.ts +0 -6
- package/dist/toolbar/ship-panel.d.ts.map +0 -1
- package/dist/toolbar/toolbar-element.d.ts +0 -7
- package/dist/toolbar/toolbar-element.d.ts.map +0 -1
- package/dist/toolbar/toolbar-idle.d.ts +0 -4
- package/dist/toolbar/toolbar-idle.d.ts.map +0 -1
- package/dist/toolbar/toolbar-idle.test.d.ts +0 -2
- package/dist/toolbar/toolbar-idle.test.d.ts.map +0 -1
- package/dist/toolbar/toolbar-link.d.ts +0 -7
- package/dist/toolbar/toolbar-link.d.ts.map +0 -1
- package/dist/toolbar/toolbar-shell.d.ts +0 -15
- package/dist/toolbar/toolbar-shell.d.ts.map +0 -1
- package/dist/toolbar/toolbar-shell.test.d.ts +0 -2
- package/dist/toolbar/toolbar-shell.test.d.ts.map +0 -1
- package/dist/toolbar/toolbar.d.ts +0 -2
- package/dist/toolbar/toolbar.d.ts.map +0 -1
- package/dist/toolbar/use-toolbar-shell.d.ts +0 -8
- package/dist/toolbar/use-toolbar-shell.d.ts.map +0 -1
- package/dist/toolbar.d.ts +0 -1
- package/dist/toolbar.js +0 -27019
- package/dist/toolbar.js.map +0 -1
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CXl1uFWF.js","assets/sidebar-section-BlseNbG8.js","assets/index-BTh66TxZ.js","assets/tokens-C3C44lLs.js","assets/index-C5as2mi1.js","assets/index-SjRbcqaJ.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();var ec=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var F0={exports:{}},Yc={},z0={exports:{}},re={};/**
|
|
3
|
-
* @license React
|
|
4
|
-
* react.production.min.js
|
|
5
|
-
*
|
|
6
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
|
-
*
|
|
8
|
-
* This source code is licensed under the MIT license found in the
|
|
9
|
-
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var ha=Symbol.for("react.element"),iC=Symbol.for("react.portal"),oC=Symbol.for("react.fragment"),aC=Symbol.for("react.strict_mode"),lC=Symbol.for("react.profiler"),cC=Symbol.for("react.provider"),uC=Symbol.for("react.context"),dC=Symbol.for("react.forward_ref"),fC=Symbol.for("react.suspense"),hC=Symbol.for("react.memo"),pC=Symbol.for("react.lazy"),ag=Symbol.iterator;function mC(e){return e===null||typeof e!="object"?null:(e=ag&&e[ag]||e["@@iterator"],typeof e=="function"?e:null)}var B0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},$0=Object.assign,V0={};function Mi(e,t,n){this.props=e,this.context=t,this.refs=V0,this.updater=n||B0}Mi.prototype.isReactComponent={};Mi.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Mi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function U0(){}U0.prototype=Mi.prototype;function Jh(e,t,n){this.props=e,this.context=t,this.refs=V0,this.updater=n||B0}var Zh=Jh.prototype=new U0;Zh.constructor=Jh;$0(Zh,Mi.prototype);Zh.isPureReactComponent=!0;var lg=Array.isArray,W0=Object.prototype.hasOwnProperty,ep={current:null},H0={key:!0,ref:!0,__self:!0,__source:!0};function G0(e,t,n){var r,s={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)W0.call(t,r)&&!H0.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];s.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:ha,type:e,key:i,ref:o,props:s,_owner:ep.current}}function gC(e,t){return{$$typeof:ha,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function tp(e){return typeof e=="object"&&e!==null&&e.$$typeof===ha}function yC(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var cg=/\/+/g;function Ou(e,t){return typeof e=="object"&&e!==null&&e.key!=null?yC(""+e.key):t.toString(36)}function Cl(e,t,n,r,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case ha:case iC:o=!0}}if(o)return o=e,s=s(o),e=r===""?"."+Ou(o,0):r,lg(s)?(n="",e!=null&&(n=e.replace(cg,"$&/")+"/"),Cl(s,t,n,"",function(u){return u})):s!=null&&(tp(s)&&(s=gC(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(cg,"$&/")+"/")+e)),t.push(s)),1;if(o=0,r=r===""?".":r+":",lg(e))for(var a=0;a<e.length;a++){i=e[a];var l=r+Ou(i,a);o+=Cl(i,t,n,l,s)}else if(l=mC(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+Ou(i,a++),o+=Cl(i,t,n,l,s);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Da(e,t,n){if(e==null)return e;var r=[],s=0;return Cl(e,r,"","",function(i){return t.call(n,i,s++)}),r}function xC(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var dt={current:null},Pl={transition:null},vC={ReactCurrentDispatcher:dt,ReactCurrentBatchConfig:Pl,ReactCurrentOwner:ep};function K0(){throw Error("act(...) is not supported in production builds of React.")}re.Children={map:Da,forEach:function(e,t,n){Da(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Da(e,function(){t++}),t},toArray:function(e){return Da(e,function(t){return t})||[]},only:function(e){if(!tp(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};re.Component=Mi;re.Fragment=oC;re.Profiler=lC;re.PureComponent=Jh;re.StrictMode=aC;re.Suspense=fC;re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=vC;re.act=K0;re.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=$0({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=ep.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)W0.call(t,l)&&!H0.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:ha,type:e.type,key:s,ref:i,props:r,_owner:o}};re.createContext=function(e){return e={$$typeof:uC,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:cC,_context:e},e.Consumer=e};re.createElement=G0;re.createFactory=function(e){var t=G0.bind(null,e);return t.type=e,t};re.createRef=function(){return{current:null}};re.forwardRef=function(e){return{$$typeof:dC,render:e}};re.isValidElement=tp;re.lazy=function(e){return{$$typeof:pC,_payload:{_status:-1,_result:e},_init:xC}};re.memo=function(e,t){return{$$typeof:hC,type:e,compare:t===void 0?null:t}};re.startTransition=function(e){var t=Pl.transition;Pl.transition={};try{e()}finally{Pl.transition=t}};re.unstable_act=K0;re.useCallback=function(e,t){return dt.current.useCallback(e,t)};re.useContext=function(e){return dt.current.useContext(e)};re.useDebugValue=function(){};re.useDeferredValue=function(e){return dt.current.useDeferredValue(e)};re.useEffect=function(e,t){return dt.current.useEffect(e,t)};re.useId=function(){return dt.current.useId()};re.useImperativeHandle=function(e,t,n){return dt.current.useImperativeHandle(e,t,n)};re.useInsertionEffect=function(e,t){return dt.current.useInsertionEffect(e,t)};re.useLayoutEffect=function(e,t){return dt.current.useLayoutEffect(e,t)};re.useMemo=function(e,t){return dt.current.useMemo(e,t)};re.useReducer=function(e,t,n){return dt.current.useReducer(e,t,n)};re.useRef=function(e){return dt.current.useRef(e)};re.useState=function(e){return dt.current.useState(e)};re.useSyncExternalStore=function(e,t,n){return dt.current.useSyncExternalStore(e,t,n)};re.useTransition=function(){return dt.current.useTransition()};re.version="18.3.1";z0.exports=re;var _=z0.exports;const wi=Qc(_);/**
|
|
11
|
-
* @license React
|
|
12
|
-
* react-jsx-runtime.production.min.js
|
|
13
|
-
*
|
|
14
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
15
|
-
*
|
|
16
|
-
* This source code is licensed under the MIT license found in the
|
|
17
|
-
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/var wC=_,bC=Symbol.for("react.element"),kC=Symbol.for("react.fragment"),_C=Object.prototype.hasOwnProperty,SC=wC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,CC={key:!0,ref:!0,__self:!0,__source:!0};function q0(e,t,n){var r,s={},i=null,o=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)_C.call(t,r)&&!CC.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:bC,type:e,key:i,ref:o,props:s,_owner:SC.current}}Yc.Fragment=kC;Yc.jsx=q0;Yc.jsxs=q0;F0.exports=Yc;var d=F0.exports,Q0={exports:{}},Ot={},Y0={exports:{}},X0={};/**
|
|
19
|
-
* @license React
|
|
20
|
-
* scheduler.production.min.js
|
|
21
|
-
*
|
|
22
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the MIT license found in the
|
|
25
|
-
* LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/(function(e){function t(M,$){var C=M.length;M.push($);e:for(;0<C;){var V=C-1>>>1,q=M[V];if(0<s(q,$))M[V]=$,M[C]=q,C=V;else break e}}function n(M){return M.length===0?null:M[0]}function r(M){if(M.length===0)return null;var $=M[0],C=M.pop();if(C!==$){M[0]=C;e:for(var V=0,q=M.length,N=q>>>1;V<N;){var le=2*(V+1)-1,fe=M[le],ue=le+1,Pt=M[ue];if(0>s(fe,C))ue<q&&0>s(Pt,fe)?(M[V]=Pt,M[ue]=C,V=ue):(M[V]=fe,M[le]=C,V=le);else if(ue<q&&0>s(Pt,C))M[V]=Pt,M[ue]=C,V=ue;else break e}}return $}function s(M,$){var C=M.sortIndex-$.sortIndex;return C!==0?C:M.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,f=null,h=3,p=!1,m=!1,y=!1,w=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(M){for(var $=n(u);$!==null;){if($.callback===null)r(u);else if($.startTime<=M)r(u),$.sortIndex=$.expirationTime,t(l,$);else break;$=n(u)}}function k(M){if(y=!1,v(M),!m)if(n(l)!==null)m=!0,D(S);else{var $=n(u);$!==null&&B(k,$.startTime-M)}}function S(M,$){m=!1,y&&(y=!1,g(j),j=-1),p=!0;var C=h;try{for(v($),f=n(l);f!==null&&(!(f.expirationTime>$)||M&&!I());){var V=f.callback;if(typeof V=="function"){f.callback=null,h=f.priorityLevel;var q=V(f.expirationTime<=$);$=e.unstable_now(),typeof q=="function"?f.callback=q:f===n(l)&&r(l),v($)}else r(l);f=n(l)}if(f!==null)var N=!0;else{var le=n(u);le!==null&&B(k,le.startTime-$),N=!1}return N}finally{f=null,h=C,p=!1}}var b=!1,P=null,j=-1,R=5,T=-1;function I(){return!(e.unstable_now()-T<R)}function A(){if(P!==null){var M=e.unstable_now();T=M;var $=!0;try{$=P(!0,M)}finally{$?F():(b=!1,P=null)}}else b=!1}var F;if(typeof x=="function")F=function(){x(A)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,E=z.port2;z.port1.onmessage=A,F=function(){E.postMessage(null)}}else F=function(){w(A,0)};function D(M){P=M,b||(b=!0,F())}function B(M,$){j=w(function(){M(e.unstable_now())},$)}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(M){M.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,D(S))},e.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<M?Math.floor(1e3/M):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(M){switch(h){case 1:case 2:case 3:var $=3;break;default:$=h}var C=h;h=$;try{return M()}finally{h=C}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(M,$){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var C=h;h=M;try{return $()}finally{h=C}},e.unstable_scheduleCallback=function(M,$,C){var V=e.unstable_now();switch(typeof C=="object"&&C!==null?(C=C.delay,C=typeof C=="number"&&0<C?V+C:V):C=V,M){case 1:var q=-1;break;case 2:q=250;break;case 5:q=1073741823;break;case 4:q=1e4;break;default:q=5e3}return q=C+q,M={id:c++,callback:$,priorityLevel:M,startTime:C,expirationTime:q,sortIndex:-1},C>V?(M.sortIndex=C,t(u,M),n(l)===null&&M===n(u)&&(y?(g(j),j=-1):y=!0,B(k,C-V))):(M.sortIndex=q,t(l,M),m||p||(m=!0,D(S))),M},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(M){var $=h;return function(){var C=h;h=$;try{return M.apply(this,arguments)}finally{h=C}}}})(X0);Y0.exports=X0;var PC=Y0.exports;/**
|
|
27
|
-
* @license React
|
|
28
|
-
* react-dom.production.min.js
|
|
29
|
-
*
|
|
30
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
31
|
-
*
|
|
32
|
-
* This source code is licensed under the MIT license found in the
|
|
33
|
-
* LICENSE file in the root directory of this source tree.
|
|
34
|
-
*/var jC=_,Dt=PC;function U(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var J0=new Set,$o={};function Ns(e,t){bi(e,t),bi(e+"Capture",t)}function bi(e,t){for($o[e]=t,e=0;e<t.length;e++)J0.add(t[e])}var Jn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ff=Object.prototype.hasOwnProperty,EC=/^[: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]*$/,ug={},dg={};function TC(e){return ff.call(dg,e)?!0:ff.call(ug,e)?!1:EC.test(e)?dg[e]=!0:(ug[e]=!0,!1)}function RC(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function NC(e,t,n,r){if(t===null||typeof t>"u"||RC(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ft(e,t,n,r,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var Je={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Je[e]=new ft(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Je[t]=new ft(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Je[e]=new ft(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Je[e]=new ft(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Je[e]=new ft(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Je[e]=new ft(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Je[e]=new ft(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Je[e]=new ft(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Je[e]=new ft(e,5,!1,e.toLowerCase(),null,!1,!1)});var np=/[\-:]([a-z])/g;function rp(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(np,rp);Je[t]=new ft(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(np,rp);Je[t]=new ft(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(np,rp);Je[t]=new ft(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Je[e]=new ft(e,1,!1,e.toLowerCase(),null,!1,!1)});Je.xlinkHref=new ft("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Je[e]=new ft(e,1,!1,e.toLowerCase(),null,!0,!0)});function sp(e,t,n,r){var s=Je.hasOwnProperty(t)?Je[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(NC(t,n,s,r)&&(n=null),r||s===null?TC(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var rr=jC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Oa=Symbol.for("react.element"),Qs=Symbol.for("react.portal"),Ys=Symbol.for("react.fragment"),ip=Symbol.for("react.strict_mode"),hf=Symbol.for("react.profiler"),Z0=Symbol.for("react.provider"),e1=Symbol.for("react.context"),op=Symbol.for("react.forward_ref"),pf=Symbol.for("react.suspense"),mf=Symbol.for("react.suspense_list"),ap=Symbol.for("react.memo"),xr=Symbol.for("react.lazy"),t1=Symbol.for("react.offscreen"),fg=Symbol.iterator;function Yi(e){return e===null||typeof e!="object"?null:(e=fg&&e[fg]||e["@@iterator"],typeof e=="function"?e:null)}var Ee=Object.assign,Fu;function xo(e){if(Fu===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Fu=t&&t[1]||""}return`
|
|
35
|
-
`+Fu+e}var zu=!1;function Bu(e,t){if(!e||zu)return"";zu=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var s=u.stack.split(`
|
|
36
|
-
`),i=r.stack.split(`
|
|
37
|
-
`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var l=`
|
|
38
|
-
`+s[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{zu=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?xo(e):""}function IC(e){switch(e.tag){case 5:return xo(e.type);case 16:return xo("Lazy");case 13:return xo("Suspense");case 19:return xo("SuspenseList");case 0:case 2:case 15:return e=Bu(e.type,!1),e;case 11:return e=Bu(e.type.render,!1),e;case 1:return e=Bu(e.type,!0),e;default:return""}}function gf(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ys:return"Fragment";case Qs:return"Portal";case hf:return"Profiler";case ip:return"StrictMode";case pf:return"Suspense";case mf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case e1:return(e.displayName||"Context")+".Consumer";case Z0:return(e._context.displayName||"Context")+".Provider";case op:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ap:return t=e.displayName||null,t!==null?t:gf(e.type)||"Memo";case xr:t=e._payload,e=e._init;try{return gf(e(t))}catch{}}return null}function AC(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return gf(t);case 8:return t===ip?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Br(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function n1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function MC(e){var t=n1(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Fa(e){e._valueTracker||(e._valueTracker=MC(e))}function r1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=n1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function tc(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function yf(e,t){var n=t.checked;return Ee({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function hg(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Br(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function s1(e,t){t=t.checked,t!=null&&sp(e,"checked",t,!1)}function xf(e,t){s1(e,t);var n=Br(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?vf(e,t.type,n):t.hasOwnProperty("defaultValue")&&vf(e,t.type,Br(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function pg(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function vf(e,t,n){(t!=="number"||tc(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var vo=Array.isArray;function di(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Br(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function wf(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(U(91));return Ee({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function mg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(U(92));if(vo(n)){if(1<n.length)throw Error(U(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Br(n)}}function i1(e,t){var n=Br(t.value),r=Br(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function gg(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function o1(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function bf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?o1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var za,a1=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(za=za||document.createElement("div"),za.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=za.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Vo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var So={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},LC=["Webkit","ms","Moz","O"];Object.keys(So).forEach(function(e){LC.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),So[t]=So[e]})});function l1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||So.hasOwnProperty(e)&&So[e]?(""+t).trim():t+"px"}function c1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=l1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var DC=Ee({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function kf(e,t){if(t){if(DC[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(U(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(U(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(U(61))}if(t.style!=null&&typeof t.style!="object")throw Error(U(62))}}function _f(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 Sf=null;function lp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Cf=null,fi=null,hi=null;function yg(e){if(e=ga(e)){if(typeof Cf!="function")throw Error(U(280));var t=e.stateNode;t&&(t=tu(t),Cf(e.stateNode,e.type,t))}}function u1(e){fi?hi?hi.push(e):hi=[e]:fi=e}function d1(){if(fi){var e=fi,t=hi;if(hi=fi=null,yg(e),t)for(e=0;e<t.length;e++)yg(t[e])}}function f1(e,t){return e(t)}function h1(){}var $u=!1;function p1(e,t,n){if($u)return e(t,n);$u=!0;try{return f1(e,t,n)}finally{$u=!1,(fi!==null||hi!==null)&&(h1(),d1())}}function Uo(e,t){var n=e.stateNode;if(n===null)return null;var r=tu(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(U(231,t,typeof n));return n}var Pf=!1;if(Jn)try{var Xi={};Object.defineProperty(Xi,"passive",{get:function(){Pf=!0}}),window.addEventListener("test",Xi,Xi),window.removeEventListener("test",Xi,Xi)}catch{Pf=!1}function OC(e,t,n,r,s,i,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Co=!1,nc=null,rc=!1,jf=null,FC={onError:function(e){Co=!0,nc=e}};function zC(e,t,n,r,s,i,o,a,l){Co=!1,nc=null,OC.apply(FC,arguments)}function BC(e,t,n,r,s,i,o,a,l){if(zC.apply(this,arguments),Co){if(Co){var u=nc;Co=!1,nc=null}else throw Error(U(198));rc||(rc=!0,jf=u)}}function Is(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function m1(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function xg(e){if(Is(e)!==e)throw Error(U(188))}function $C(e){var t=e.alternate;if(!t){if(t=Is(e),t===null)throw Error(U(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return xg(s),e;if(i===r)return xg(s),t;i=i.sibling}throw Error(U(188))}if(n.return!==r.return)n=s,r=i;else{for(var o=!1,a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o)throw Error(U(189))}}if(n.alternate!==r)throw Error(U(190))}if(n.tag!==3)throw Error(U(188));return n.stateNode.current===n?e:t}function g1(e){return e=$C(e),e!==null?y1(e):null}function y1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=y1(e);if(t!==null)return t;e=e.sibling}return null}var x1=Dt.unstable_scheduleCallback,vg=Dt.unstable_cancelCallback,VC=Dt.unstable_shouldYield,UC=Dt.unstable_requestPaint,Le=Dt.unstable_now,WC=Dt.unstable_getCurrentPriorityLevel,cp=Dt.unstable_ImmediatePriority,v1=Dt.unstable_UserBlockingPriority,sc=Dt.unstable_NormalPriority,HC=Dt.unstable_LowPriority,w1=Dt.unstable_IdlePriority,Xc=null,Rn=null;function GC(e){if(Rn&&typeof Rn.onCommitFiberRoot=="function")try{Rn.onCommitFiberRoot(Xc,e,void 0,(e.current.flags&128)===128)}catch{}}var fn=Math.clz32?Math.clz32:QC,KC=Math.log,qC=Math.LN2;function QC(e){return e>>>=0,e===0?32:31-(KC(e)/qC|0)|0}var Ba=64,$a=4194304;function wo(e){switch(e&-e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ic(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=wo(a):(i&=o,i!==0&&(r=wo(i)))}else o=n&~s,o!==0?r=wo(o):i!==0&&(r=wo(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-fn(t),s=1<<n,r|=e[n],t&=~s;return r}function YC(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function XC(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-fn(i),a=1<<o,l=s[o];l===-1?(!(a&n)||a&r)&&(s[o]=YC(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function Ef(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function b1(){var e=Ba;return Ba<<=1,!(Ba&4194240)&&(Ba=64),e}function Vu(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function pa(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-fn(t),e[t]=n}function JC(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-fn(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function up(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-fn(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var ce=0;function k1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var _1,dp,S1,C1,P1,Tf=!1,Va=[],Rr=null,Nr=null,Ir=null,Wo=new Map,Ho=new Map,br=[],ZC="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 submit".split(" ");function wg(e,t){switch(e){case"focusin":case"focusout":Rr=null;break;case"dragenter":case"dragleave":Nr=null;break;case"mouseover":case"mouseout":Ir=null;break;case"pointerover":case"pointerout":Wo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ho.delete(t.pointerId)}}function Ji(e,t,n,r,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},t!==null&&(t=ga(t),t!==null&&dp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function eP(e,t,n,r,s){switch(t){case"focusin":return Rr=Ji(Rr,e,t,n,r,s),!0;case"dragenter":return Nr=Ji(Nr,e,t,n,r,s),!0;case"mouseover":return Ir=Ji(Ir,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return Wo.set(i,Ji(Wo.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,Ho.set(i,Ji(Ho.get(i)||null,e,t,n,r,s)),!0}return!1}function j1(e){var t=fs(e.target);if(t!==null){var n=Is(t);if(n!==null){if(t=n.tag,t===13){if(t=m1(n),t!==null){e.blockedOn=t,P1(e.priority,function(){S1(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function jl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Rf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Sf=r,n.target.dispatchEvent(r),Sf=null}else return t=ga(n),t!==null&&dp(t),e.blockedOn=n,!1;t.shift()}return!0}function bg(e,t,n){jl(e)&&n.delete(t)}function tP(){Tf=!1,Rr!==null&&jl(Rr)&&(Rr=null),Nr!==null&&jl(Nr)&&(Nr=null),Ir!==null&&jl(Ir)&&(Ir=null),Wo.forEach(bg),Ho.forEach(bg)}function Zi(e,t){e.blockedOn===t&&(e.blockedOn=null,Tf||(Tf=!0,Dt.unstable_scheduleCallback(Dt.unstable_NormalPriority,tP)))}function Go(e){function t(s){return Zi(s,e)}if(0<Va.length){Zi(Va[0],e);for(var n=1;n<Va.length;n++){var r=Va[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Rr!==null&&Zi(Rr,e),Nr!==null&&Zi(Nr,e),Ir!==null&&Zi(Ir,e),Wo.forEach(t),Ho.forEach(t),n=0;n<br.length;n++)r=br[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<br.length&&(n=br[0],n.blockedOn===null);)j1(n),n.blockedOn===null&&br.shift()}var pi=rr.ReactCurrentBatchConfig,oc=!0;function nP(e,t,n,r){var s=ce,i=pi.transition;pi.transition=null;try{ce=1,fp(e,t,n,r)}finally{ce=s,pi.transition=i}}function rP(e,t,n,r){var s=ce,i=pi.transition;pi.transition=null;try{ce=4,fp(e,t,n,r)}finally{ce=s,pi.transition=i}}function fp(e,t,n,r){if(oc){var s=Rf(e,t,n,r);if(s===null)Ju(e,t,r,ac,n),wg(e,r);else if(eP(s,e,t,n,r))r.stopPropagation();else if(wg(e,r),t&4&&-1<ZC.indexOf(e)){for(;s!==null;){var i=ga(s);if(i!==null&&_1(i),i=Rf(e,t,n,r),i===null&&Ju(e,t,r,ac,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else Ju(e,t,r,null,n)}}var ac=null;function Rf(e,t,n,r){if(ac=null,e=lp(r),e=fs(e),e!==null)if(t=Is(e),t===null)e=null;else if(n=t.tag,n===13){if(e=m1(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return ac=e,null}function E1(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(WC()){case cp:return 1;case v1:return 4;case sc:case HC:return 16;case w1:return 536870912;default:return 16}default:return 16}}var _r=null,hp=null,El=null;function T1(){if(El)return El;var e,t=hp,n=t.length,r,s="value"in _r?_r.value:_r.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===s[i-r];r++);return El=s.slice(e,1<r?1-r:void 0)}function Tl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ua(){return!0}function kg(){return!1}function Ft(e){function t(n,r,s,i,o){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Ua:kg,this.isPropagationStopped=kg,this}return Ee(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ua)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ua)},persist:function(){},isPersistent:Ua}),t}var Li={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pp=Ft(Li),ma=Ee({},Li,{view:0,detail:0}),sP=Ft(ma),Uu,Wu,eo,Jc=Ee({},ma,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:mp,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==eo&&(eo&&e.type==="mousemove"?(Uu=e.screenX-eo.screenX,Wu=e.screenY-eo.screenY):Wu=Uu=0,eo=e),Uu)},movementY:function(e){return"movementY"in e?e.movementY:Wu}}),_g=Ft(Jc),iP=Ee({},Jc,{dataTransfer:0}),oP=Ft(iP),aP=Ee({},ma,{relatedTarget:0}),Hu=Ft(aP),lP=Ee({},Li,{animationName:0,elapsedTime:0,pseudoElement:0}),cP=Ft(lP),uP=Ee({},Li,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),dP=Ft(uP),fP=Ee({},Li,{data:0}),Sg=Ft(fP),hP={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pP={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"},mP={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function gP(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=mP[e])?!!t[e]:!1}function mp(){return gP}var yP=Ee({},ma,{key:function(e){if(e.key){var t=hP[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Tl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?pP[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:mp,charCode:function(e){return e.type==="keypress"?Tl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Tl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),xP=Ft(yP),vP=Ee({},Jc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Cg=Ft(vP),wP=Ee({},ma,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:mp}),bP=Ft(wP),kP=Ee({},Li,{propertyName:0,elapsedTime:0,pseudoElement:0}),_P=Ft(kP),SP=Ee({},Jc,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),CP=Ft(SP),PP=[9,13,27,32],gp=Jn&&"CompositionEvent"in window,Po=null;Jn&&"documentMode"in document&&(Po=document.documentMode);var jP=Jn&&"TextEvent"in window&&!Po,R1=Jn&&(!gp||Po&&8<Po&&11>=Po),Pg=" ",jg=!1;function N1(e,t){switch(e){case"keyup":return PP.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function I1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xs=!1;function EP(e,t){switch(e){case"compositionend":return I1(t);case"keypress":return t.which!==32?null:(jg=!0,Pg);case"textInput":return e=t.data,e===Pg&&jg?null:e;default:return null}}function TP(e,t){if(Xs)return e==="compositionend"||!gp&&N1(e,t)?(e=T1(),El=hp=_r=null,Xs=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return R1&&t.locale!=="ko"?null:t.data;default:return null}}var RP={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 Eg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!RP[e.type]:t==="textarea"}function A1(e,t,n,r){u1(r),t=lc(t,"onChange"),0<t.length&&(n=new pp("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var jo=null,Ko=null;function NP(e){W1(e,0)}function Zc(e){var t=ei(e);if(r1(t))return e}function IP(e,t){if(e==="change")return t}var M1=!1;if(Jn){var Gu;if(Jn){var Ku="oninput"in document;if(!Ku){var Tg=document.createElement("div");Tg.setAttribute("oninput","return;"),Ku=typeof Tg.oninput=="function"}Gu=Ku}else Gu=!1;M1=Gu&&(!document.documentMode||9<document.documentMode)}function Rg(){jo&&(jo.detachEvent("onpropertychange",L1),Ko=jo=null)}function L1(e){if(e.propertyName==="value"&&Zc(Ko)){var t=[];A1(t,Ko,e,lp(e)),p1(NP,t)}}function AP(e,t,n){e==="focusin"?(Rg(),jo=t,Ko=n,jo.attachEvent("onpropertychange",L1)):e==="focusout"&&Rg()}function MP(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Zc(Ko)}function LP(e,t){if(e==="click")return Zc(t)}function DP(e,t){if(e==="input"||e==="change")return Zc(t)}function OP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mn=typeof Object.is=="function"?Object.is:OP;function qo(e,t){if(mn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!ff.call(t,s)||!mn(e[s],t[s]))return!1}return!0}function Ng(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ig(e,t){var n=Ng(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ng(n)}}function D1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?D1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function O1(){for(var e=window,t=tc();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=tc(e.document)}return t}function yp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function FP(e){var t=O1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&D1(n.ownerDocument.documentElement,n)){if(r!==null&&yp(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=Ig(n,i);var o=Ig(n,r);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var zP=Jn&&"documentMode"in document&&11>=document.documentMode,Js=null,Nf=null,Eo=null,If=!1;function Ag(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;If||Js==null||Js!==tc(r)||(r=Js,"selectionStart"in r&&yp(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Eo&&qo(Eo,r)||(Eo=r,r=lc(Nf,"onSelect"),0<r.length&&(t=new pp("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Js)))}function Wa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Zs={animationend:Wa("Animation","AnimationEnd"),animationiteration:Wa("Animation","AnimationIteration"),animationstart:Wa("Animation","AnimationStart"),transitionend:Wa("Transition","TransitionEnd")},qu={},F1={};Jn&&(F1=document.createElement("div").style,"AnimationEvent"in window||(delete Zs.animationend.animation,delete Zs.animationiteration.animation,delete Zs.animationstart.animation),"TransitionEvent"in window||delete Zs.transitionend.transition);function eu(e){if(qu[e])return qu[e];if(!Zs[e])return e;var t=Zs[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in F1)return qu[e]=t[n];return e}var z1=eu("animationend"),B1=eu("animationiteration"),$1=eu("animationstart"),V1=eu("transitionend"),U1=new Map,Mg="abort auxClick 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(" ");function Gr(e,t){U1.set(e,t),Ns(t,[e])}for(var Qu=0;Qu<Mg.length;Qu++){var Yu=Mg[Qu],BP=Yu.toLowerCase(),$P=Yu[0].toUpperCase()+Yu.slice(1);Gr(BP,"on"+$P)}Gr(z1,"onAnimationEnd");Gr(B1,"onAnimationIteration");Gr($1,"onAnimationStart");Gr("dblclick","onDoubleClick");Gr("focusin","onFocus");Gr("focusout","onBlur");Gr(V1,"onTransitionEnd");bi("onMouseEnter",["mouseout","mouseover"]);bi("onMouseLeave",["mouseout","mouseover"]);bi("onPointerEnter",["pointerout","pointerover"]);bi("onPointerLeave",["pointerout","pointerover"]);Ns("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ns("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ns("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ns("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ns("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ns("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var bo="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(" "),VP=new Set("cancel close invalid load scroll toggle".split(" ").concat(bo));function Lg(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,BC(r,t,void 0,e),e.currentTarget=null}function W1(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;Lg(s,a,u),i=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;Lg(s,a,u),i=l}}}if(rc)throw e=jf,rc=!1,jf=null,e}function be(e,t){var n=t[Of];n===void 0&&(n=t[Of]=new Set);var r=e+"__bubble";n.has(r)||(H1(t,e,2,!1),n.add(r))}function Xu(e,t,n){var r=0;t&&(r|=4),H1(n,e,r,t)}var Ha="_reactListening"+Math.random().toString(36).slice(2);function Qo(e){if(!e[Ha]){e[Ha]=!0,J0.forEach(function(n){n!=="selectionchange"&&(VP.has(n)||Xu(n,!1,e),Xu(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ha]||(t[Ha]=!0,Xu("selectionchange",!1,t))}}function H1(e,t,n,r){switch(E1(t)){case 1:var s=nP;break;case 4:s=rP;break;default:s=fp}n=s.bind(null,t,n,e),s=void 0,!Pf||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function Ju(e,t,n,r,s){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;o=o.return}for(;a!==null;){if(o=fs(a),o===null)return;if(l=o.tag,l===5||l===6){r=i=o;continue e}a=a.parentNode}}r=r.return}p1(function(){var u=i,c=lp(n),f=[];e:{var h=U1.get(e);if(h!==void 0){var p=pp,m=e;switch(e){case"keypress":if(Tl(n)===0)break e;case"keydown":case"keyup":p=xP;break;case"focusin":m="focus",p=Hu;break;case"focusout":m="blur",p=Hu;break;case"beforeblur":case"afterblur":p=Hu;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=_g;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=oP;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=bP;break;case z1:case B1:case $1:p=cP;break;case V1:p=_P;break;case"scroll":p=sP;break;case"wheel":p=CP;break;case"copy":case"cut":case"paste":p=dP;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Cg}var y=(t&4)!==0,w=!y&&e==="scroll",g=y?h!==null?h+"Capture":null:h;y=[];for(var x=u,v;x!==null;){v=x;var k=v.stateNode;if(v.tag===5&&k!==null&&(v=k,g!==null&&(k=Uo(x,g),k!=null&&y.push(Yo(x,k,v)))),w)break;x=x.return}0<y.length&&(h=new p(h,m,null,n,c),f.push({event:h,listeners:y}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&n!==Sf&&(m=n.relatedTarget||n.fromElement)&&(fs(m)||m[Zn]))break e;if((p||h)&&(h=c.window===c?c:(h=c.ownerDocument)?h.defaultView||h.parentWindow:window,p?(m=n.relatedTarget||n.toElement,p=u,m=m?fs(m):null,m!==null&&(w=Is(m),m!==w||m.tag!==5&&m.tag!==6)&&(m=null)):(p=null,m=u),p!==m)){if(y=_g,k="onMouseLeave",g="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(y=Cg,k="onPointerLeave",g="onPointerEnter",x="pointer"),w=p==null?h:ei(p),v=m==null?h:ei(m),h=new y(k,x+"leave",p,n,c),h.target=w,h.relatedTarget=v,k=null,fs(c)===u&&(y=new y(g,x+"enter",m,n,c),y.target=v,y.relatedTarget=w,k=y),w=k,p&&m)t:{for(y=p,g=m,x=0,v=y;v;v=zs(v))x++;for(v=0,k=g;k;k=zs(k))v++;for(;0<x-v;)y=zs(y),x--;for(;0<v-x;)g=zs(g),v--;for(;x--;){if(y===g||g!==null&&y===g.alternate)break t;y=zs(y),g=zs(g)}y=null}else y=null;p!==null&&Dg(f,h,p,y,!1),m!==null&&w!==null&&Dg(f,w,m,y,!0)}}e:{if(h=u?ei(u):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var S=IP;else if(Eg(h))if(M1)S=DP;else{S=MP;var b=AP}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(S=LP);if(S&&(S=S(e,u))){A1(f,S,n,c);break e}b&&b(e,h,u),e==="focusout"&&(b=h._wrapperState)&&b.controlled&&h.type==="number"&&vf(h,"number",h.value)}switch(b=u?ei(u):window,e){case"focusin":(Eg(b)||b.contentEditable==="true")&&(Js=b,Nf=u,Eo=null);break;case"focusout":Eo=Nf=Js=null;break;case"mousedown":If=!0;break;case"contextmenu":case"mouseup":case"dragend":If=!1,Ag(f,n,c);break;case"selectionchange":if(zP)break;case"keydown":case"keyup":Ag(f,n,c)}var P;if(gp)e:{switch(e){case"compositionstart":var j="onCompositionStart";break e;case"compositionend":j="onCompositionEnd";break e;case"compositionupdate":j="onCompositionUpdate";break e}j=void 0}else Xs?N1(e,n)&&(j="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(j="onCompositionStart");j&&(R1&&n.locale!=="ko"&&(Xs||j!=="onCompositionStart"?j==="onCompositionEnd"&&Xs&&(P=T1()):(_r=c,hp="value"in _r?_r.value:_r.textContent,Xs=!0)),b=lc(u,j),0<b.length&&(j=new Sg(j,e,null,n,c),f.push({event:j,listeners:b}),P?j.data=P:(P=I1(n),P!==null&&(j.data=P)))),(P=jP?EP(e,n):TP(e,n))&&(u=lc(u,"onBeforeInput"),0<u.length&&(c=new Sg("onBeforeInput","beforeinput",null,n,c),f.push({event:c,listeners:u}),c.data=P))}W1(f,t)})}function Yo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function lc(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Uo(e,n),i!=null&&r.unshift(Yo(e,i,s)),i=Uo(e,t),i!=null&&r.push(Yo(e,i,s))),e=e.return}return r}function zs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Dg(e,t,n,r,s){for(var i=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,s?(l=Uo(n,i),l!=null&&o.unshift(Yo(n,l,a))):s||(l=Uo(n,i),l!=null&&o.push(Yo(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var UP=/\r\n?/g,WP=/\u0000|\uFFFD/g;function Og(e){return(typeof e=="string"?e:""+e).replace(UP,`
|
|
39
|
-
`).replace(WP,"")}function Ga(e,t,n){if(t=Og(t),Og(e)!==t&&n)throw Error(U(425))}function cc(){}var Af=null,Mf=null;function Lf(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Df=typeof setTimeout=="function"?setTimeout:void 0,HP=typeof clearTimeout=="function"?clearTimeout:void 0,Fg=typeof Promise=="function"?Promise:void 0,GP=typeof queueMicrotask=="function"?queueMicrotask:typeof Fg<"u"?function(e){return Fg.resolve(null).then(e).catch(KP)}:Df;function KP(e){setTimeout(function(){throw e})}function Zu(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),Go(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);Go(t)}function Ar(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function zg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Di=Math.random().toString(36).slice(2),En="__reactFiber$"+Di,Xo="__reactProps$"+Di,Zn="__reactContainer$"+Di,Of="__reactEvents$"+Di,qP="__reactListeners$"+Di,QP="__reactHandles$"+Di;function fs(e){var t=e[En];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Zn]||n[En]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=zg(e);e!==null;){if(n=e[En])return n;e=zg(e)}return t}e=n,n=e.parentNode}return null}function ga(e){return e=e[En]||e[Zn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ei(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(U(33))}function tu(e){return e[Xo]||null}var Ff=[],ti=-1;function Kr(e){return{current:e}}function ke(e){0>ti||(e.current=Ff[ti],Ff[ti]=null,ti--)}function xe(e,t){ti++,Ff[ti]=e.current,e.current=t}var $r={},st=Kr($r),xt=Kr(!1),Ps=$r;function ki(e,t){var n=e.type.contextTypes;if(!n)return $r;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function vt(e){return e=e.childContextTypes,e!=null}function uc(){ke(xt),ke(st)}function Bg(e,t,n){if(st.current!==$r)throw Error(U(168));xe(st,t),xe(xt,n)}function G1(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(U(108,AC(e)||"Unknown",s));return Ee({},n,r)}function dc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||$r,Ps=st.current,xe(st,e),xe(xt,xt.current),!0}function $g(e,t,n){var r=e.stateNode;if(!r)throw Error(U(169));n?(e=G1(e,t,Ps),r.__reactInternalMemoizedMergedChildContext=e,ke(xt),ke(st),xe(st,e)):ke(xt),xe(xt,n)}var Hn=null,nu=!1,ed=!1;function K1(e){Hn===null?Hn=[e]:Hn.push(e)}function YP(e){nu=!0,K1(e)}function qr(){if(!ed&&Hn!==null){ed=!0;var e=0,t=ce;try{var n=Hn;for(ce=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Hn=null,nu=!1}catch(s){throw Hn!==null&&(Hn=Hn.slice(e+1)),x1(cp,qr),s}finally{ce=t,ed=!1}}return null}var ni=[],ri=0,fc=null,hc=0,Ht=[],Gt=0,js=null,qn=1,Qn="";function as(e,t){ni[ri++]=hc,ni[ri++]=fc,fc=e,hc=t}function q1(e,t,n){Ht[Gt++]=qn,Ht[Gt++]=Qn,Ht[Gt++]=js,js=e;var r=qn;e=Qn;var s=32-fn(r)-1;r&=~(1<<s),n+=1;var i=32-fn(t)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,qn=1<<32-fn(t)+s|n<<s|r,Qn=i+e}else qn=1<<i|n<<s|r,Qn=e}function xp(e){e.return!==null&&(as(e,1),q1(e,1,0))}function vp(e){for(;e===fc;)fc=ni[--ri],ni[ri]=null,hc=ni[--ri],ni[ri]=null;for(;e===js;)js=Ht[--Gt],Ht[Gt]=null,Qn=Ht[--Gt],Ht[Gt]=null,qn=Ht[--Gt],Ht[Gt]=null}var Mt=null,It=null,Se=!1,dn=null;function Q1(e,t){var n=qt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Vg(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Mt=e,It=Ar(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Mt=e,It=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=js!==null?{id:qn,overflow:Qn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=qt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Mt=e,It=null,!0):!1;default:return!1}}function zf(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Bf(e){if(Se){var t=It;if(t){var n=t;if(!Vg(e,t)){if(zf(e))throw Error(U(418));t=Ar(n.nextSibling);var r=Mt;t&&Vg(e,t)?Q1(r,n):(e.flags=e.flags&-4097|2,Se=!1,Mt=e)}}else{if(zf(e))throw Error(U(418));e.flags=e.flags&-4097|2,Se=!1,Mt=e}}}function Ug(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Mt=e}function Ka(e){if(e!==Mt)return!1;if(!Se)return Ug(e),Se=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Lf(e.type,e.memoizedProps)),t&&(t=It)){if(zf(e))throw Y1(),Error(U(418));for(;t;)Q1(e,t),t=Ar(t.nextSibling)}if(Ug(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){It=Ar(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}It=null}}else It=Mt?Ar(e.stateNode.nextSibling):null;return!0}function Y1(){for(var e=It;e;)e=Ar(e.nextSibling)}function _i(){It=Mt=null,Se=!1}function wp(e){dn===null?dn=[e]:dn.push(e)}var XP=rr.ReactCurrentBatchConfig;function to(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(U(309));var r=n.stateNode}if(!r)throw Error(U(147,e));var s=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(U(284));if(!n._owner)throw Error(U(290,e))}return e}function qa(e,t){throw e=Object.prototype.toString.call(t),Error(U(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Wg(e){var t=e._init;return t(e._payload)}function X1(e){function t(g,x){if(e){var v=g.deletions;v===null?(g.deletions=[x],g.flags|=16):v.push(x)}}function n(g,x){if(!e)return null;for(;x!==null;)t(g,x),x=x.sibling;return null}function r(g,x){for(g=new Map;x!==null;)x.key!==null?g.set(x.key,x):g.set(x.index,x),x=x.sibling;return g}function s(g,x){return g=Or(g,x),g.index=0,g.sibling=null,g}function i(g,x,v){return g.index=v,e?(v=g.alternate,v!==null?(v=v.index,v<x?(g.flags|=2,x):v):(g.flags|=2,x)):(g.flags|=1048576,x)}function o(g){return e&&g.alternate===null&&(g.flags|=2),g}function a(g,x,v,k){return x===null||x.tag!==6?(x=ad(v,g.mode,k),x.return=g,x):(x=s(x,v),x.return=g,x)}function l(g,x,v,k){var S=v.type;return S===Ys?c(g,x,v.props.children,k,v.key):x!==null&&(x.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===xr&&Wg(S)===x.type)?(k=s(x,v.props),k.ref=to(g,x,v),k.return=g,k):(k=Dl(v.type,v.key,v.props,null,g.mode,k),k.ref=to(g,x,v),k.return=g,k)}function u(g,x,v,k){return x===null||x.tag!==4||x.stateNode.containerInfo!==v.containerInfo||x.stateNode.implementation!==v.implementation?(x=ld(v,g.mode,k),x.return=g,x):(x=s(x,v.children||[]),x.return=g,x)}function c(g,x,v,k,S){return x===null||x.tag!==7?(x=vs(v,g.mode,k,S),x.return=g,x):(x=s(x,v),x.return=g,x)}function f(g,x,v){if(typeof x=="string"&&x!==""||typeof x=="number")return x=ad(""+x,g.mode,v),x.return=g,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Oa:return v=Dl(x.type,x.key,x.props,null,g.mode,v),v.ref=to(g,null,x),v.return=g,v;case Qs:return x=ld(x,g.mode,v),x.return=g,x;case xr:var k=x._init;return f(g,k(x._payload),v)}if(vo(x)||Yi(x))return x=vs(x,g.mode,v,null),x.return=g,x;qa(g,x)}return null}function h(g,x,v,k){var S=x!==null?x.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return S!==null?null:a(g,x,""+v,k);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Oa:return v.key===S?l(g,x,v,k):null;case Qs:return v.key===S?u(g,x,v,k):null;case xr:return S=v._init,h(g,x,S(v._payload),k)}if(vo(v)||Yi(v))return S!==null?null:c(g,x,v,k,null);qa(g,v)}return null}function p(g,x,v,k,S){if(typeof k=="string"&&k!==""||typeof k=="number")return g=g.get(v)||null,a(x,g,""+k,S);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case Oa:return g=g.get(k.key===null?v:k.key)||null,l(x,g,k,S);case Qs:return g=g.get(k.key===null?v:k.key)||null,u(x,g,k,S);case xr:var b=k._init;return p(g,x,v,b(k._payload),S)}if(vo(k)||Yi(k))return g=g.get(v)||null,c(x,g,k,S,null);qa(x,k)}return null}function m(g,x,v,k){for(var S=null,b=null,P=x,j=x=0,R=null;P!==null&&j<v.length;j++){P.index>j?(R=P,P=null):R=P.sibling;var T=h(g,P,v[j],k);if(T===null){P===null&&(P=R);break}e&&P&&T.alternate===null&&t(g,P),x=i(T,x,j),b===null?S=T:b.sibling=T,b=T,P=R}if(j===v.length)return n(g,P),Se&&as(g,j),S;if(P===null){for(;j<v.length;j++)P=f(g,v[j],k),P!==null&&(x=i(P,x,j),b===null?S=P:b.sibling=P,b=P);return Se&&as(g,j),S}for(P=r(g,P);j<v.length;j++)R=p(P,g,j,v[j],k),R!==null&&(e&&R.alternate!==null&&P.delete(R.key===null?j:R.key),x=i(R,x,j),b===null?S=R:b.sibling=R,b=R);return e&&P.forEach(function(I){return t(g,I)}),Se&&as(g,j),S}function y(g,x,v,k){var S=Yi(v);if(typeof S!="function")throw Error(U(150));if(v=S.call(v),v==null)throw Error(U(151));for(var b=S=null,P=x,j=x=0,R=null,T=v.next();P!==null&&!T.done;j++,T=v.next()){P.index>j?(R=P,P=null):R=P.sibling;var I=h(g,P,T.value,k);if(I===null){P===null&&(P=R);break}e&&P&&I.alternate===null&&t(g,P),x=i(I,x,j),b===null?S=I:b.sibling=I,b=I,P=R}if(T.done)return n(g,P),Se&&as(g,j),S;if(P===null){for(;!T.done;j++,T=v.next())T=f(g,T.value,k),T!==null&&(x=i(T,x,j),b===null?S=T:b.sibling=T,b=T);return Se&&as(g,j),S}for(P=r(g,P);!T.done;j++,T=v.next())T=p(P,g,j,T.value,k),T!==null&&(e&&T.alternate!==null&&P.delete(T.key===null?j:T.key),x=i(T,x,j),b===null?S=T:b.sibling=T,b=T);return e&&P.forEach(function(A){return t(g,A)}),Se&&as(g,j),S}function w(g,x,v,k){if(typeof v=="object"&&v!==null&&v.type===Ys&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Oa:e:{for(var S=v.key,b=x;b!==null;){if(b.key===S){if(S=v.type,S===Ys){if(b.tag===7){n(g,b.sibling),x=s(b,v.props.children),x.return=g,g=x;break e}}else if(b.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===xr&&Wg(S)===b.type){n(g,b.sibling),x=s(b,v.props),x.ref=to(g,b,v),x.return=g,g=x;break e}n(g,b);break}else t(g,b);b=b.sibling}v.type===Ys?(x=vs(v.props.children,g.mode,k,v.key),x.return=g,g=x):(k=Dl(v.type,v.key,v.props,null,g.mode,k),k.ref=to(g,x,v),k.return=g,g=k)}return o(g);case Qs:e:{for(b=v.key;x!==null;){if(x.key===b)if(x.tag===4&&x.stateNode.containerInfo===v.containerInfo&&x.stateNode.implementation===v.implementation){n(g,x.sibling),x=s(x,v.children||[]),x.return=g,g=x;break e}else{n(g,x);break}else t(g,x);x=x.sibling}x=ld(v,g.mode,k),x.return=g,g=x}return o(g);case xr:return b=v._init,w(g,x,b(v._payload),k)}if(vo(v))return m(g,x,v,k);if(Yi(v))return y(g,x,v,k);qa(g,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,x!==null&&x.tag===6?(n(g,x.sibling),x=s(x,v),x.return=g,g=x):(n(g,x),x=ad(v,g.mode,k),x.return=g,g=x),o(g)):n(g,x)}return w}var Si=X1(!0),J1=X1(!1),pc=Kr(null),mc=null,si=null,bp=null;function kp(){bp=si=mc=null}function _p(e){var t=pc.current;ke(pc),e._currentValue=t}function $f(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function mi(e,t){mc=e,bp=si=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(gt=!0),e.firstContext=null)}function Jt(e){var t=e._currentValue;if(bp!==e)if(e={context:e,memoizedValue:t,next:null},si===null){if(mc===null)throw Error(U(308));si=e,mc.dependencies={lanes:0,firstContext:e}}else si=si.next=e;return t}var hs=null;function Sp(e){hs===null?hs=[e]:hs.push(e)}function Z1(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Sp(t)):(n.next=s.next,s.next=n),t.interleaved=n,er(e,r)}function er(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var vr=!1;function Cp(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ew(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Yn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Mr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,oe&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,er(e,n)}return s=r.interleaved,s===null?(t.next=t,Sp(r)):(t.next=s.next,s.next=t),r.interleaved=t,er(e,n)}function Rl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,up(e,n)}}function Hg(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function gc(e,t,n,r){var s=e.updateQueue;vr=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?i=u:o.next=u,o=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==o&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(i!==null){var f=s.baseState;o=0,c=u=l=null,a=i;do{var h=a.lane,p=a.eventTime;if((r&h)===h){c!==null&&(c=c.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=e,y=a;switch(h=t,p=n,y.tag){case 1:if(m=y.payload,typeof m=="function"){f=m.call(p,f,h);break e}f=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=y.payload,h=typeof m=="function"?m.call(p,f,h):m,h==null)break e;f=Ee({},f,h);break e;case 2:vr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=s.effects,h===null?s.effects=[a]:h.push(a))}else p={eventTime:p,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=p,l=f):c=c.next=p,o|=h;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;h=a,a=h.next,h.next=null,s.lastBaseUpdate=h,s.shared.pending=null}}while(!0);if(c===null&&(l=f),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=c,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);Ts|=o,e.lanes=o,e.memoizedState=f}}function Gg(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(U(191,s));s.call(r)}}}var ya={},Nn=Kr(ya),Jo=Kr(ya),Zo=Kr(ya);function ps(e){if(e===ya)throw Error(U(174));return e}function Pp(e,t){switch(xe(Zo,t),xe(Jo,e),xe(Nn,ya),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:bf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=bf(t,e)}ke(Nn),xe(Nn,t)}function Ci(){ke(Nn),ke(Jo),ke(Zo)}function tw(e){ps(Zo.current);var t=ps(Nn.current),n=bf(t,e.type);t!==n&&(xe(Jo,e),xe(Nn,n))}function jp(e){Jo.current===e&&(ke(Nn),ke(Jo))}var Pe=Kr(0);function yc(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var td=[];function Ep(){for(var e=0;e<td.length;e++)td[e]._workInProgressVersionPrimary=null;td.length=0}var Nl=rr.ReactCurrentDispatcher,nd=rr.ReactCurrentBatchConfig,Es=0,je=null,$e=null,Ge=null,xc=!1,To=!1,ea=0,JP=0;function Ze(){throw Error(U(321))}function Tp(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!mn(e[n],t[n]))return!1;return!0}function Rp(e,t,n,r,s,i){if(Es=i,je=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Nl.current=e===null||e.memoizedState===null?nj:rj,e=n(r,s),To){i=0;do{if(To=!1,ea=0,25<=i)throw Error(U(301));i+=1,Ge=$e=null,t.updateQueue=null,Nl.current=sj,e=n(r,s)}while(To)}if(Nl.current=vc,t=$e!==null&&$e.next!==null,Es=0,Ge=$e=je=null,xc=!1,t)throw Error(U(300));return e}function Np(){var e=ea!==0;return ea=0,e}function _n(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ge===null?je.memoizedState=Ge=e:Ge=Ge.next=e,Ge}function Zt(){if($e===null){var e=je.alternate;e=e!==null?e.memoizedState:null}else e=$e.next;var t=Ge===null?je.memoizedState:Ge.next;if(t!==null)Ge=t,$e=e;else{if(e===null)throw Error(U(310));$e=e,e={memoizedState:$e.memoizedState,baseState:$e.baseState,baseQueue:$e.baseQueue,queue:$e.queue,next:null},Ge===null?je.memoizedState=Ge=e:Ge=Ge.next=e}return Ge}function ta(e,t){return typeof t=="function"?t(e):t}function rd(e){var t=Zt(),n=t.queue;if(n===null)throw Error(U(311));n.lastRenderedReducer=e;var r=$e,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var a=o=null,l=null,u=i;do{var c=u.lane;if((Es&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var f={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=f,o=r):l=l.next=f,je.lanes|=c,Ts|=c}u=u.next}while(u!==null&&u!==i);l===null?o=r:l.next=a,mn(r,t.memoizedState)||(gt=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,je.lanes|=i,Ts|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function sd(e){var t=Zt(),n=t.queue;if(n===null)throw Error(U(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);mn(i,t.memoizedState)||(gt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function nw(){}function rw(e,t){var n=je,r=Zt(),s=t(),i=!mn(r.memoizedState,s);if(i&&(r.memoizedState=s,gt=!0),r=r.queue,Ip(ow.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Ge!==null&&Ge.memoizedState.tag&1){if(n.flags|=2048,na(9,iw.bind(null,n,r,s,t),void 0,null),Ke===null)throw Error(U(349));Es&30||sw(n,t,s)}return s}function sw(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=je.updateQueue,t===null?(t={lastEffect:null,stores:null},je.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function iw(e,t,n,r){t.value=n,t.getSnapshot=r,aw(t)&&lw(e)}function ow(e,t,n){return n(function(){aw(t)&&lw(e)})}function aw(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!mn(e,n)}catch{return!0}}function lw(e){var t=er(e,1);t!==null&&hn(t,e,1,-1)}function Kg(e){var t=_n();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ta,lastRenderedState:e},t.queue=e,e=e.dispatch=tj.bind(null,je,e),[t.memoizedState,e]}function na(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=je.updateQueue,t===null?(t={lastEffect:null,stores:null},je.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function cw(){return Zt().memoizedState}function Il(e,t,n,r){var s=_n();je.flags|=e,s.memoizedState=na(1|t,n,void 0,r===void 0?null:r)}function ru(e,t,n,r){var s=Zt();r=r===void 0?null:r;var i=void 0;if($e!==null){var o=$e.memoizedState;if(i=o.destroy,r!==null&&Tp(r,o.deps)){s.memoizedState=na(t,n,i,r);return}}je.flags|=e,s.memoizedState=na(1|t,n,i,r)}function qg(e,t){return Il(8390656,8,e,t)}function Ip(e,t){return ru(2048,8,e,t)}function uw(e,t){return ru(4,2,e,t)}function dw(e,t){return ru(4,4,e,t)}function fw(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function hw(e,t,n){return n=n!=null?n.concat([e]):null,ru(4,4,fw.bind(null,t,e),n)}function Ap(){}function pw(e,t){var n=Zt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Tp(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function mw(e,t){var n=Zt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Tp(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function gw(e,t,n){return Es&21?(mn(n,t)||(n=b1(),je.lanes|=n,Ts|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,gt=!0),e.memoizedState=n)}function ZP(e,t){var n=ce;ce=n!==0&&4>n?n:4,e(!0);var r=nd.transition;nd.transition={};try{e(!1),t()}finally{ce=n,nd.transition=r}}function yw(){return Zt().memoizedState}function ej(e,t,n){var r=Dr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},xw(e))vw(t,n);else if(n=Z1(e,t,n,r),n!==null){var s=ut();hn(n,e,r,s),ww(n,t,r)}}function tj(e,t,n){var r=Dr(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(xw(e))vw(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,mn(a,o)){var l=t.interleaved;l===null?(s.next=s,Sp(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=Z1(e,t,s,r),n!==null&&(s=ut(),hn(n,e,r,s),ww(n,t,r))}}function xw(e){var t=e.alternate;return e===je||t!==null&&t===je}function vw(e,t){To=xc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ww(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,up(e,n)}}var vc={readContext:Jt,useCallback:Ze,useContext:Ze,useEffect:Ze,useImperativeHandle:Ze,useInsertionEffect:Ze,useLayoutEffect:Ze,useMemo:Ze,useReducer:Ze,useRef:Ze,useState:Ze,useDebugValue:Ze,useDeferredValue:Ze,useTransition:Ze,useMutableSource:Ze,useSyncExternalStore:Ze,useId:Ze,unstable_isNewReconciler:!1},nj={readContext:Jt,useCallback:function(e,t){return _n().memoizedState=[e,t===void 0?null:t],e},useContext:Jt,useEffect:qg,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Il(4194308,4,fw.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Il(4194308,4,e,t)},useInsertionEffect:function(e,t){return Il(4,2,e,t)},useMemo:function(e,t){var n=_n();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=_n();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ej.bind(null,je,e),[r.memoizedState,e]},useRef:function(e){var t=_n();return e={current:e},t.memoizedState=e},useState:Kg,useDebugValue:Ap,useDeferredValue:function(e){return _n().memoizedState=e},useTransition:function(){var e=Kg(!1),t=e[0];return e=ZP.bind(null,e[1]),_n().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=je,s=_n();if(Se){if(n===void 0)throw Error(U(407));n=n()}else{if(n=t(),Ke===null)throw Error(U(349));Es&30||sw(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,qg(ow.bind(null,r,i,e),[e]),r.flags|=2048,na(9,iw.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=_n(),t=Ke.identifierPrefix;if(Se){var n=Qn,r=qn;n=(r&~(1<<32-fn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ea++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=JP++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},rj={readContext:Jt,useCallback:pw,useContext:Jt,useEffect:Ip,useImperativeHandle:hw,useInsertionEffect:uw,useLayoutEffect:dw,useMemo:mw,useReducer:rd,useRef:cw,useState:function(){return rd(ta)},useDebugValue:Ap,useDeferredValue:function(e){var t=Zt();return gw(t,$e.memoizedState,e)},useTransition:function(){var e=rd(ta)[0],t=Zt().memoizedState;return[e,t]},useMutableSource:nw,useSyncExternalStore:rw,useId:yw,unstable_isNewReconciler:!1},sj={readContext:Jt,useCallback:pw,useContext:Jt,useEffect:Ip,useImperativeHandle:hw,useInsertionEffect:uw,useLayoutEffect:dw,useMemo:mw,useReducer:sd,useRef:cw,useState:function(){return sd(ta)},useDebugValue:Ap,useDeferredValue:function(e){var t=Zt();return $e===null?t.memoizedState=e:gw(t,$e.memoizedState,e)},useTransition:function(){var e=sd(ta)[0],t=Zt().memoizedState;return[e,t]},useMutableSource:nw,useSyncExternalStore:rw,useId:yw,unstable_isNewReconciler:!1};function cn(e,t){if(e&&e.defaultProps){t=Ee({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Vf(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ee({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var su={isMounted:function(e){return(e=e._reactInternals)?Is(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ut(),s=Dr(e),i=Yn(r,s);i.payload=t,n!=null&&(i.callback=n),t=Mr(e,i,s),t!==null&&(hn(t,e,s,r),Rl(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ut(),s=Dr(e),i=Yn(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Mr(e,i,s),t!==null&&(hn(t,e,s,r),Rl(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ut(),r=Dr(e),s=Yn(n,r);s.tag=2,t!=null&&(s.callback=t),t=Mr(e,s,r),t!==null&&(hn(t,e,r,n),Rl(t,e,r))}};function Qg(e,t,n,r,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,o):t.prototype&&t.prototype.isPureReactComponent?!qo(n,r)||!qo(s,i):!0}function bw(e,t,n){var r=!1,s=$r,i=t.contextType;return typeof i=="object"&&i!==null?i=Jt(i):(s=vt(t)?Ps:st.current,r=t.contextTypes,i=(r=r!=null)?ki(e,s):$r),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=su,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function Yg(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&su.enqueueReplaceState(t,t.state,null)}function Uf(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},Cp(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=Jt(i):(i=vt(t)?Ps:st.current,s.context=ki(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Vf(e,t,i,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&su.enqueueReplaceState(s,s.state,null),gc(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Pi(e,t){try{var n="",r=t;do n+=IC(r),r=r.return;while(r);var s=n}catch(i){s=`
|
|
40
|
-
Error generating stack: `+i.message+`
|
|
41
|
-
`+i.stack}return{value:e,source:t,stack:s,digest:null}}function id(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Wf(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var ij=typeof WeakMap=="function"?WeakMap:Map;function kw(e,t,n){n=Yn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){bc||(bc=!0,eh=r),Wf(e,t)},n}function _w(e,t,n){n=Yn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){Wf(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Wf(e,t),typeof r!="function"&&(Lr===null?Lr=new Set([this]):Lr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Xg(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new ij;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=vj.bind(null,e,t,n),t.then(e,e))}function Jg(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Zg(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Yn(-1,1),t.tag=2,Mr(n,t,1))),n.lanes|=1),e)}var oj=rr.ReactCurrentOwner,gt=!1;function at(e,t,n,r){t.child=e===null?J1(t,null,n,r):Si(t,e.child,n,r)}function ey(e,t,n,r,s){n=n.render;var i=t.ref;return mi(t,s),r=Rp(e,t,n,r,i,s),n=Np(),e!==null&&!gt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,tr(e,t,s)):(Se&&n&&xp(t),t.flags|=1,at(e,t,r,s),t.child)}function ty(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!$p(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Sw(e,t,i,r,s)):(e=Dl(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:qo,n(o,r)&&e.ref===t.ref)return tr(e,t,s)}return t.flags|=1,e=Or(i,r),e.ref=t.ref,e.return=t,t.child=e}function Sw(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(qo(i,r)&&e.ref===t.ref)if(gt=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(gt=!0);else return t.lanes=e.lanes,tr(e,t,s)}return Hf(e,t,n,r,s)}function Cw(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},xe(oi,Nt),Nt|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,xe(oi,Nt),Nt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,xe(oi,Nt),Nt|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,xe(oi,Nt),Nt|=r;return at(e,t,s,n),t.child}function Pw(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Hf(e,t,n,r,s){var i=vt(n)?Ps:st.current;return i=ki(t,i),mi(t,s),n=Rp(e,t,n,r,i,s),r=Np(),e!==null&&!gt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,tr(e,t,s)):(Se&&r&&xp(t),t.flags|=1,at(e,t,n,s),t.child)}function ny(e,t,n,r,s){if(vt(n)){var i=!0;dc(t)}else i=!1;if(mi(t,s),t.stateNode===null)Al(e,t),bw(t,n,r),Uf(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=Jt(u):(u=vt(n)?Ps:st.current,u=ki(t,u));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&Yg(t,o,r,u),vr=!1;var h=t.memoizedState;o.state=h,gc(t,r,o,s),l=t.memoizedState,a!==r||h!==l||xt.current||vr?(typeof c=="function"&&(Vf(t,n,c,r),l=t.memoizedState),(a=vr||Qg(t,n,a,r,h,l,u))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,ew(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:cn(t.type,a),o.props=u,f=t.pendingProps,h=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Jt(l):(l=vt(n)?Ps:st.current,l=ki(t,l));var p=n.getDerivedStateFromProps;(c=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==f||h!==l)&&Yg(t,o,r,l),vr=!1,h=t.memoizedState,o.state=h,gc(t,r,o,s);var m=t.memoizedState;a!==f||h!==m||xt.current||vr?(typeof p=="function"&&(Vf(t,n,p,r),m=t.memoizedState),(u=vr||Qg(t,n,u,r,h,m,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,m,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,m,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=l,r=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Gf(e,t,n,r,i,s)}function Gf(e,t,n,r,s,i){Pw(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&$g(t,n,!1),tr(e,t,i);r=t.stateNode,oj.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Si(t,e.child,null,i),t.child=Si(t,null,a,i)):at(e,t,a,i),t.memoizedState=r.state,s&&$g(t,n,!0),t.child}function jw(e){var t=e.stateNode;t.pendingContext?Bg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Bg(e,t.context,!1),Pp(e,t.containerInfo)}function ry(e,t,n,r,s){return _i(),wp(s),t.flags|=256,at(e,t,n,r),t.child}var Kf={dehydrated:null,treeContext:null,retryLane:0};function qf(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ew(e,t,n){var r=t.pendingProps,s=Pe.current,i=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),xe(Pe,s&1),e===null)return Bf(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=au(o,r,0,null),e=vs(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=qf(n),t.memoizedState=Kf,e):Mp(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return aj(e,t,o,r,a,s,n);if(i){i=r.fallback,o=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Or(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=Or(a,i):(i=vs(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o=o===null?qf(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=Kf,r}return i=e.child,e=i.sibling,r=Or(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Mp(e,t){return t=au({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Qa(e,t,n,r){return r!==null&&wp(r),Si(t,e.child,null,n),e=Mp(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function aj(e,t,n,r,s,i,o){if(n)return t.flags&256?(t.flags&=-257,r=id(Error(U(422))),Qa(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=au({mode:"visible",children:r.children},s,0,null),i=vs(i,s,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Si(t,e.child,null,o),t.child.memoizedState=qf(o),t.memoizedState=Kf,i);if(!(t.mode&1))return Qa(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(U(419)),r=id(i,r,void 0),Qa(e,t,o,r)}if(a=(o&e.childLanes)!==0,gt||a){if(r=Ke,r!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,er(e,s),hn(r,e,s,-1))}return Bp(),r=id(Error(U(421))),Qa(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=wj.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,It=Ar(s.nextSibling),Mt=t,Se=!0,dn=null,e!==null&&(Ht[Gt++]=qn,Ht[Gt++]=Qn,Ht[Gt++]=js,qn=e.id,Qn=e.overflow,js=t),t=Mp(t,r.children),t.flags|=4096,t)}function sy(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),$f(e.return,t,n)}function od(e,t,n,r,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function Tw(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(at(e,t,r.children,n),r=Pe.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&sy(e,n,t);else if(e.tag===19)sy(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(xe(Pe,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&yc(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),od(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&yc(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}od(t,!0,n,null,i);break;case"together":od(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Al(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function tr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ts|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(U(153));if(t.child!==null){for(e=t.child,n=Or(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Or(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function lj(e,t,n){switch(t.tag){case 3:jw(t),_i();break;case 5:tw(t);break;case 1:vt(t.type)&&dc(t);break;case 4:Pp(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;xe(pc,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(xe(Pe,Pe.current&1),t.flags|=128,null):n&t.child.childLanes?Ew(e,t,n):(xe(Pe,Pe.current&1),e=tr(e,t,n),e!==null?e.sibling:null);xe(Pe,Pe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Tw(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),xe(Pe,Pe.current),r)break;return null;case 22:case 23:return t.lanes=0,Cw(e,t,n)}return tr(e,t,n)}var Rw,Qf,Nw,Iw;Rw=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Qf=function(){};Nw=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,ps(Nn.current);var i=null;switch(n){case"input":s=yf(e,s),r=yf(e,r),i=[];break;case"select":s=Ee({},s,{value:void 0}),r=Ee({},r,{value:void 0}),i=[];break;case"textarea":s=wf(e,s),r=wf(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=cc)}kf(n,r);var o;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&($o.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var l=r[u];if(a=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(i||(i=[]),i.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&($o.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&be("scroll",e),i||a===l||(i=[])):(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};Iw=function(e,t,n,r){n!==r&&(t.flags|=4)};function no(e,t){if(!Se)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function et(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function cj(e,t,n){var r=t.pendingProps;switch(vp(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return et(t),null;case 1:return vt(t.type)&&uc(),et(t),null;case 3:return r=t.stateNode,Ci(),ke(xt),ke(st),Ep(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ka(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,dn!==null&&(rh(dn),dn=null))),Qf(e,t),et(t),null;case 5:jp(t);var s=ps(Zo.current);if(n=t.type,e!==null&&t.stateNode!=null)Nw(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(U(166));return et(t),null}if(e=ps(Nn.current),Ka(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[En]=t,r[Xo]=i,e=(t.mode&1)!==0,n){case"dialog":be("cancel",r),be("close",r);break;case"iframe":case"object":case"embed":be("load",r);break;case"video":case"audio":for(s=0;s<bo.length;s++)be(bo[s],r);break;case"source":be("error",r);break;case"img":case"image":case"link":be("error",r),be("load",r);break;case"details":be("toggle",r);break;case"input":hg(r,i),be("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},be("invalid",r);break;case"textarea":mg(r,i),be("invalid",r)}kf(n,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];o==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&Ga(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&Ga(r.textContent,a,e),s=["children",""+a]):$o.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&be("scroll",r)}switch(n){case"input":Fa(r),pg(r,i,!0);break;case"textarea":Fa(r),gg(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=cc)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=o1(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[En]=t,e[Xo]=r,Rw(e,t,!1,!1),t.stateNode=e;e:{switch(o=_f(n,r),n){case"dialog":be("cancel",e),be("close",e),s=r;break;case"iframe":case"object":case"embed":be("load",e),s=r;break;case"video":case"audio":for(s=0;s<bo.length;s++)be(bo[s],e);s=r;break;case"source":be("error",e),s=r;break;case"img":case"image":case"link":be("error",e),be("load",e),s=r;break;case"details":be("toggle",e),s=r;break;case"input":hg(e,r),s=yf(e,r),be("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=Ee({},r,{value:void 0}),be("invalid",e);break;case"textarea":mg(e,r),s=wf(e,r),be("invalid",e);break;default:s=r}kf(n,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?c1(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&a1(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Vo(e,l):typeof l=="number"&&Vo(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&($o.hasOwnProperty(i)?l!=null&&i==="onScroll"&&be("scroll",e):l!=null&&sp(e,i,l,o))}switch(n){case"input":Fa(e),pg(e,r,!1);break;case"textarea":Fa(e),gg(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Br(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?di(e,!!r.multiple,i,!1):r.defaultValue!=null&&di(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=cc)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return et(t),null;case 6:if(e&&t.stateNode!=null)Iw(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(U(166));if(n=ps(Zo.current),ps(Nn.current),Ka(t)){if(r=t.stateNode,n=t.memoizedProps,r[En]=t,(i=r.nodeValue!==n)&&(e=Mt,e!==null))switch(e.tag){case 3:Ga(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ga(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[En]=t,t.stateNode=r}return et(t),null;case 13:if(ke(Pe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Se&&It!==null&&t.mode&1&&!(t.flags&128))Y1(),_i(),t.flags|=98560,i=!1;else if(i=Ka(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(U(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(U(317));i[En]=t}else _i(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;et(t),i=!1}else dn!==null&&(rh(dn),dn=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Pe.current&1?Ve===0&&(Ve=3):Bp())),t.updateQueue!==null&&(t.flags|=4),et(t),null);case 4:return Ci(),Qf(e,t),e===null&&Qo(t.stateNode.containerInfo),et(t),null;case 10:return _p(t.type._context),et(t),null;case 17:return vt(t.type)&&uc(),et(t),null;case 19:if(ke(Pe),i=t.memoizedState,i===null)return et(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)no(i,!1);else{if(Ve!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=yc(e),o!==null){for(t.flags|=128,no(i,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return xe(Pe,Pe.current&1|2),t.child}e=e.sibling}i.tail!==null&&Le()>ji&&(t.flags|=128,r=!0,no(i,!1),t.lanes=4194304)}else{if(!r)if(e=yc(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),no(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Se)return et(t),null}else 2*Le()-i.renderingStartTime>ji&&n!==1073741824&&(t.flags|=128,r=!0,no(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Le(),t.sibling=null,n=Pe.current,xe(Pe,r?n&1|2:n&1),t):(et(t),null);case 22:case 23:return zp(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Nt&1073741824&&(et(t),t.subtreeFlags&6&&(t.flags|=8192)):et(t),null;case 24:return null;case 25:return null}throw Error(U(156,t.tag))}function uj(e,t){switch(vp(t),t.tag){case 1:return vt(t.type)&&uc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ci(),ke(xt),ke(st),Ep(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return jp(t),null;case 13:if(ke(Pe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));_i()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ke(Pe),null;case 4:return Ci(),null;case 10:return _p(t.type._context),null;case 22:case 23:return zp(),null;case 24:return null;default:return null}}var Ya=!1,nt=!1,dj=typeof WeakSet=="function"?WeakSet:Set,G=null;function ii(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ie(e,t,r)}else n.current=null}function Yf(e,t,n){try{n()}catch(r){Ie(e,t,r)}}var iy=!1;function fj(e,t){if(Af=oc,e=O1(),yp(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,u=0,c=0,f=e,h=null;t:for(;;){for(var p;f!==n||s!==0&&f.nodeType!==3||(a=o+s),f!==i||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(p=f.firstChild)!==null;)h=f,f=p;for(;;){if(f===e)break t;if(h===n&&++u===s&&(a=o),h===i&&++c===r&&(l=o),(p=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Mf={focusedElem:e,selectionRange:n},oc=!1,G=t;G!==null;)if(t=G,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,G=e;else for(;G!==null;){t=G;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var y=m.memoizedProps,w=m.memoizedState,g=t.stateNode,x=g.getSnapshotBeforeUpdate(t.elementType===t.type?y:cn(t.type,y),w);g.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(U(163))}}catch(k){Ie(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,G=e;break}G=t.return}return m=iy,iy=!1,m}function Ro(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&Yf(t,n,i)}s=s.next}while(s!==r)}}function iu(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Xf(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Aw(e){var t=e.alternate;t!==null&&(e.alternate=null,Aw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[En],delete t[Xo],delete t[Of],delete t[qP],delete t[QP])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Mw(e){return e.tag===5||e.tag===3||e.tag===4}function oy(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Mw(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Jf(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=cc));else if(r!==4&&(e=e.child,e!==null))for(Jf(e,t,n),e=e.sibling;e!==null;)Jf(e,t,n),e=e.sibling}function Zf(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Zf(e,t,n),e=e.sibling;e!==null;)Zf(e,t,n),e=e.sibling}var qe=null,un=!1;function or(e,t,n){for(n=n.child;n!==null;)Lw(e,t,n),n=n.sibling}function Lw(e,t,n){if(Rn&&typeof Rn.onCommitFiberUnmount=="function")try{Rn.onCommitFiberUnmount(Xc,n)}catch{}switch(n.tag){case 5:nt||ii(n,t);case 6:var r=qe,s=un;qe=null,or(e,t,n),qe=r,un=s,qe!==null&&(un?(e=qe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):qe.removeChild(n.stateNode));break;case 18:qe!==null&&(un?(e=qe,n=n.stateNode,e.nodeType===8?Zu(e.parentNode,n):e.nodeType===1&&Zu(e,n),Go(e)):Zu(qe,n.stateNode));break;case 4:r=qe,s=un,qe=n.stateNode.containerInfo,un=!0,or(e,t,n),qe=r,un=s;break;case 0:case 11:case 14:case 15:if(!nt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Yf(n,t,o),s=s.next}while(s!==r)}or(e,t,n);break;case 1:if(!nt&&(ii(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ie(n,t,a)}or(e,t,n);break;case 21:or(e,t,n);break;case 22:n.mode&1?(nt=(r=nt)||n.memoizedState!==null,or(e,t,n),nt=r):or(e,t,n);break;default:or(e,t,n)}}function ay(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new dj),t.forEach(function(r){var s=bj.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function nn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:qe=a.stateNode,un=!1;break e;case 3:qe=a.stateNode.containerInfo,un=!0;break e;case 4:qe=a.stateNode.containerInfo,un=!0;break e}a=a.return}if(qe===null)throw Error(U(160));Lw(i,o,s),qe=null,un=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){Ie(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Dw(t,e),t=t.sibling}function Dw(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(nn(t,e),vn(e),r&4){try{Ro(3,e,e.return),iu(3,e)}catch(y){Ie(e,e.return,y)}try{Ro(5,e,e.return)}catch(y){Ie(e,e.return,y)}}break;case 1:nn(t,e),vn(e),r&512&&n!==null&&ii(n,n.return);break;case 5:if(nn(t,e),vn(e),r&512&&n!==null&&ii(n,n.return),e.flags&32){var s=e.stateNode;try{Vo(s,"")}catch(y){Ie(e,e.return,y)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=n!==null?n.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&s1(s,i),_f(a,o);var u=_f(a,i);for(o=0;o<l.length;o+=2){var c=l[o],f=l[o+1];c==="style"?c1(s,f):c==="dangerouslySetInnerHTML"?a1(s,f):c==="children"?Vo(s,f):sp(s,c,f,u)}switch(a){case"input":xf(s,i);break;case"textarea":i1(s,i);break;case"select":var h=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var p=i.value;p!=null?di(s,!!i.multiple,p,!1):h!==!!i.multiple&&(i.defaultValue!=null?di(s,!!i.multiple,i.defaultValue,!0):di(s,!!i.multiple,i.multiple?[]:"",!1))}s[Xo]=i}catch(y){Ie(e,e.return,y)}}break;case 6:if(nn(t,e),vn(e),r&4){if(e.stateNode===null)throw Error(U(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(y){Ie(e,e.return,y)}}break;case 3:if(nn(t,e),vn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Go(t.containerInfo)}catch(y){Ie(e,e.return,y)}break;case 4:nn(t,e),vn(e);break;case 13:nn(t,e),vn(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(Op=Le())),r&4&&ay(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(nt=(u=nt)||c,nn(t,e),nt=u):nn(t,e),vn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(G=e,c=e.child;c!==null;){for(f=G=c;G!==null;){switch(h=G,p=h.child,h.tag){case 0:case 11:case 14:case 15:Ro(4,h,h.return);break;case 1:ii(h,h.return);var m=h.stateNode;if(typeof m.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(y){Ie(r,n,y)}}break;case 5:ii(h,h.return);break;case 22:if(h.memoizedState!==null){cy(f);continue}}p!==null?(p.return=h,G=p):cy(f)}c=c.sibling}e:for(c=null,f=e;;){if(f.tag===5){if(c===null){c=f;try{s=f.stateNode,u?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=f.stateNode,l=f.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=l1("display",o))}catch(y){Ie(e,e.return,y)}}}else if(f.tag===6){if(c===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(y){Ie(e,e.return,y)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;c===f&&(c=null),f=f.return}c===f&&(c=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:nn(t,e),vn(e),r&4&&ay(e);break;case 21:break;default:nn(t,e),vn(e)}}function vn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Mw(n)){var r=n;break e}n=n.return}throw Error(U(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Vo(s,""),r.flags&=-33);var i=oy(e);Zf(e,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,a=oy(e);Jf(e,a,o);break;default:throw Error(U(161))}}catch(l){Ie(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function hj(e,t,n){G=e,Ow(e)}function Ow(e,t,n){for(var r=(e.mode&1)!==0;G!==null;){var s=G,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||Ya;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||nt;a=Ya;var u=nt;if(Ya=o,(nt=l)&&!u)for(G=s;G!==null;)o=G,l=o.child,o.tag===22&&o.memoizedState!==null?uy(s):l!==null?(l.return=o,G=l):uy(s);for(;i!==null;)G=i,Ow(i),i=i.sibling;G=s,Ya=a,nt=u}ly(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,G=i):ly(e)}}function ly(e){for(;G!==null;){var t=G;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:nt||iu(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!nt)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:cn(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Gg(t,i,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Gg(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var f=c.dehydrated;f!==null&&Go(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(U(163))}nt||t.flags&512&&Xf(t)}catch(h){Ie(t,t.return,h)}}if(t===e){G=null;break}if(n=t.sibling,n!==null){n.return=t.return,G=n;break}G=t.return}}function cy(e){for(;G!==null;){var t=G;if(t===e){G=null;break}var n=t.sibling;if(n!==null){n.return=t.return,G=n;break}G=t.return}}function uy(e){for(;G!==null;){var t=G;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{iu(4,t)}catch(l){Ie(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(l){Ie(t,s,l)}}var i=t.return;try{Xf(t)}catch(l){Ie(t,i,l)}break;case 5:var o=t.return;try{Xf(t)}catch(l){Ie(t,o,l)}}}catch(l){Ie(t,t.return,l)}if(t===e){G=null;break}var a=t.sibling;if(a!==null){a.return=t.return,G=a;break}G=t.return}}var pj=Math.ceil,wc=rr.ReactCurrentDispatcher,Lp=rr.ReactCurrentOwner,Yt=rr.ReactCurrentBatchConfig,oe=0,Ke=null,ze=null,Xe=0,Nt=0,oi=Kr(0),Ve=0,ra=null,Ts=0,ou=0,Dp=0,No=null,mt=null,Op=0,ji=1/0,Wn=null,bc=!1,eh=null,Lr=null,Xa=!1,Sr=null,kc=0,Io=0,th=null,Ml=-1,Ll=0;function ut(){return oe&6?Le():Ml!==-1?Ml:Ml=Le()}function Dr(e){return e.mode&1?oe&2&&Xe!==0?Xe&-Xe:XP.transition!==null?(Ll===0&&(Ll=b1()),Ll):(e=ce,e!==0||(e=window.event,e=e===void 0?16:E1(e.type)),e):1}function hn(e,t,n,r){if(50<Io)throw Io=0,th=null,Error(U(185));pa(e,n,r),(!(oe&2)||e!==Ke)&&(e===Ke&&(!(oe&2)&&(ou|=n),Ve===4&&kr(e,Xe)),wt(e,r),n===1&&oe===0&&!(t.mode&1)&&(ji=Le()+500,nu&&qr()))}function wt(e,t){var n=e.callbackNode;XC(e,t);var r=ic(e,e===Ke?Xe:0);if(r===0)n!==null&&vg(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&vg(n),t===1)e.tag===0?YP(dy.bind(null,e)):K1(dy.bind(null,e)),GP(function(){!(oe&6)&&qr()}),n=null;else{switch(k1(r)){case 1:n=cp;break;case 4:n=v1;break;case 16:n=sc;break;case 536870912:n=w1;break;default:n=sc}n=Hw(n,Fw.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Fw(e,t){if(Ml=-1,Ll=0,oe&6)throw Error(U(327));var n=e.callbackNode;if(gi()&&e.callbackNode!==n)return null;var r=ic(e,e===Ke?Xe:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=_c(e,r);else{t=r;var s=oe;oe|=2;var i=Bw();(Ke!==e||Xe!==t)&&(Wn=null,ji=Le()+500,xs(e,t));do try{yj();break}catch(a){zw(e,a)}while(!0);kp(),wc.current=i,oe=s,ze!==null?t=0:(Ke=null,Xe=0,t=Ve)}if(t!==0){if(t===2&&(s=Ef(e),s!==0&&(r=s,t=nh(e,s))),t===1)throw n=ra,xs(e,0),kr(e,r),wt(e,Le()),n;if(t===6)kr(e,r);else{if(s=e.current.alternate,!(r&30)&&!mj(s)&&(t=_c(e,r),t===2&&(i=Ef(e),i!==0&&(r=i,t=nh(e,i))),t===1))throw n=ra,xs(e,0),kr(e,r),wt(e,Le()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(U(345));case 2:ls(e,mt,Wn);break;case 3:if(kr(e,r),(r&130023424)===r&&(t=Op+500-Le(),10<t)){if(ic(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){ut(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Df(ls.bind(null,e,mt,Wn),t);break}ls(e,mt,Wn);break;case 4:if(kr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var o=31-fn(r);i=1<<o,o=t[o],o>s&&(s=o),r&=~i}if(r=s,r=Le()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*pj(r/1960))-r,10<r){e.timeoutHandle=Df(ls.bind(null,e,mt,Wn),r);break}ls(e,mt,Wn);break;case 5:ls(e,mt,Wn);break;default:throw Error(U(329))}}}return wt(e,Le()),e.callbackNode===n?Fw.bind(null,e):null}function nh(e,t){var n=No;return e.current.memoizedState.isDehydrated&&(xs(e,t).flags|=256),e=_c(e,t),e!==2&&(t=mt,mt=n,t!==null&&rh(t)),e}function rh(e){mt===null?mt=e:mt.push.apply(mt,e)}function mj(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!mn(i(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function kr(e,t){for(t&=~Dp,t&=~ou,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-fn(t),r=1<<n;e[n]=-1,t&=~r}}function dy(e){if(oe&6)throw Error(U(327));gi();var t=ic(e,0);if(!(t&1))return wt(e,Le()),null;var n=_c(e,t);if(e.tag!==0&&n===2){var r=Ef(e);r!==0&&(t=r,n=nh(e,r))}if(n===1)throw n=ra,xs(e,0),kr(e,t),wt(e,Le()),n;if(n===6)throw Error(U(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ls(e,mt,Wn),wt(e,Le()),null}function Fp(e,t){var n=oe;oe|=1;try{return e(t)}finally{oe=n,oe===0&&(ji=Le()+500,nu&&qr())}}function Rs(e){Sr!==null&&Sr.tag===0&&!(oe&6)&&gi();var t=oe;oe|=1;var n=Yt.transition,r=ce;try{if(Yt.transition=null,ce=1,e)return e()}finally{ce=r,Yt.transition=n,oe=t,!(oe&6)&&qr()}}function zp(){Nt=oi.current,ke(oi)}function xs(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,HP(n)),ze!==null)for(n=ze.return;n!==null;){var r=n;switch(vp(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&uc();break;case 3:Ci(),ke(xt),ke(st),Ep();break;case 5:jp(r);break;case 4:Ci();break;case 13:ke(Pe);break;case 19:ke(Pe);break;case 10:_p(r.type._context);break;case 22:case 23:zp()}n=n.return}if(Ke=e,ze=e=Or(e.current,null),Xe=Nt=t,Ve=0,ra=null,Dp=ou=Ts=0,mt=No=null,hs!==null){for(t=0;t<hs.length;t++)if(n=hs[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=s,r.next=o}n.pending=r}hs=null}return e}function zw(e,t){do{var n=ze;try{if(kp(),Nl.current=vc,xc){for(var r=je.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}xc=!1}if(Es=0,Ge=$e=je=null,To=!1,ea=0,Lp.current=null,n===null||n.return===null){Ve=1,ra=t,ze=null;break}e:{var i=e,o=n.return,a=n,l=t;if(t=Xe,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,f=c.tag;if(!(c.mode&1)&&(f===0||f===11||f===15)){var h=c.alternate;h?(c.updateQueue=h.updateQueue,c.memoizedState=h.memoizedState,c.lanes=h.lanes):(c.updateQueue=null,c.memoizedState=null)}var p=Jg(o);if(p!==null){p.flags&=-257,Zg(p,o,a,i,t),p.mode&1&&Xg(i,u,t),t=p,l=u;var m=t.updateQueue;if(m===null){var y=new Set;y.add(l),t.updateQueue=y}else m.add(l);break e}else{if(!(t&1)){Xg(i,u,t),Bp();break e}l=Error(U(426))}}else if(Se&&a.mode&1){var w=Jg(o);if(w!==null){!(w.flags&65536)&&(w.flags|=256),Zg(w,o,a,i,t),wp(Pi(l,a));break e}}i=l=Pi(l,a),Ve!==4&&(Ve=2),No===null?No=[i]:No.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var g=kw(i,l,t);Hg(i,g);break e;case 1:a=l;var x=i.type,v=i.stateNode;if(!(i.flags&128)&&(typeof x.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Lr===null||!Lr.has(v)))){i.flags|=65536,t&=-t,i.lanes|=t;var k=_w(i,a,t);Hg(i,k);break e}}i=i.return}while(i!==null)}Vw(n)}catch(S){t=S,ze===n&&n!==null&&(ze=n=n.return);continue}break}while(!0)}function Bw(){var e=wc.current;return wc.current=vc,e===null?vc:e}function Bp(){(Ve===0||Ve===3||Ve===2)&&(Ve=4),Ke===null||!(Ts&268435455)&&!(ou&268435455)||kr(Ke,Xe)}function _c(e,t){var n=oe;oe|=2;var r=Bw();(Ke!==e||Xe!==t)&&(Wn=null,xs(e,t));do try{gj();break}catch(s){zw(e,s)}while(!0);if(kp(),oe=n,wc.current=r,ze!==null)throw Error(U(261));return Ke=null,Xe=0,Ve}function gj(){for(;ze!==null;)$w(ze)}function yj(){for(;ze!==null&&!VC();)$w(ze)}function $w(e){var t=Ww(e.alternate,e,Nt);e.memoizedProps=e.pendingProps,t===null?Vw(e):ze=t,Lp.current=null}function Vw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=uj(n,t),n!==null){n.flags&=32767,ze=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ve=6,ze=null;return}}else if(n=cj(n,t,Nt),n!==null){ze=n;return}if(t=t.sibling,t!==null){ze=t;return}ze=t=e}while(t!==null);Ve===0&&(Ve=5)}function ls(e,t,n){var r=ce,s=Yt.transition;try{Yt.transition=null,ce=1,xj(e,t,n,r)}finally{Yt.transition=s,ce=r}return null}function xj(e,t,n,r){do gi();while(Sr!==null);if(oe&6)throw Error(U(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(U(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(JC(e,i),e===Ke&&(ze=Ke=null,Xe=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Xa||(Xa=!0,Hw(sc,function(){return gi(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Yt.transition,Yt.transition=null;var o=ce;ce=1;var a=oe;oe|=4,Lp.current=null,fj(e,n),Dw(n,e),FP(Mf),oc=!!Af,Mf=Af=null,e.current=n,hj(n),UC(),oe=a,ce=o,Yt.transition=i}else e.current=n;if(Xa&&(Xa=!1,Sr=e,kc=s),i=e.pendingLanes,i===0&&(Lr=null),GC(n.stateNode),wt(e,Le()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(bc)throw bc=!1,e=eh,eh=null,e;return kc&1&&e.tag!==0&&gi(),i=e.pendingLanes,i&1?e===th?Io++:(Io=0,th=e):Io=0,qr(),null}function gi(){if(Sr!==null){var e=k1(kc),t=Yt.transition,n=ce;try{if(Yt.transition=null,ce=16>e?16:e,Sr===null)var r=!1;else{if(e=Sr,Sr=null,kc=0,oe&6)throw Error(U(331));var s=oe;for(oe|=4,G=e.current;G!==null;){var i=G,o=i.child;if(G.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(G=u;G!==null;){var c=G;switch(c.tag){case 0:case 11:case 15:Ro(8,c,i)}var f=c.child;if(f!==null)f.return=c,G=f;else for(;G!==null;){c=G;var h=c.sibling,p=c.return;if(Aw(c),c===u){G=null;break}if(h!==null){h.return=p,G=h;break}G=p}}}var m=i.alternate;if(m!==null){var y=m.child;if(y!==null){m.child=null;do{var w=y.sibling;y.sibling=null,y=w}while(y!==null)}}G=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,G=o;else e:for(;G!==null;){if(i=G,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Ro(9,i,i.return)}var g=i.sibling;if(g!==null){g.return=i.return,G=g;break e}G=i.return}}var x=e.current;for(G=x;G!==null;){o=G;var v=o.child;if(o.subtreeFlags&2064&&v!==null)v.return=o,G=v;else e:for(o=x;G!==null;){if(a=G,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:iu(9,a)}}catch(S){Ie(a,a.return,S)}if(a===o){G=null;break e}var k=a.sibling;if(k!==null){k.return=a.return,G=k;break e}G=a.return}}if(oe=s,qr(),Rn&&typeof Rn.onPostCommitFiberRoot=="function")try{Rn.onPostCommitFiberRoot(Xc,e)}catch{}r=!0}return r}finally{ce=n,Yt.transition=t}}return!1}function fy(e,t,n){t=Pi(n,t),t=kw(e,t,1),e=Mr(e,t,1),t=ut(),e!==null&&(pa(e,1,t),wt(e,t))}function Ie(e,t,n){if(e.tag===3)fy(e,e,n);else for(;t!==null;){if(t.tag===3){fy(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Lr===null||!Lr.has(r))){e=Pi(n,e),e=_w(t,e,1),t=Mr(t,e,1),e=ut(),t!==null&&(pa(t,1,e),wt(t,e));break}}t=t.return}}function vj(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ut(),e.pingedLanes|=e.suspendedLanes&n,Ke===e&&(Xe&n)===n&&(Ve===4||Ve===3&&(Xe&130023424)===Xe&&500>Le()-Op?xs(e,0):Dp|=n),wt(e,t)}function Uw(e,t){t===0&&(e.mode&1?(t=$a,$a<<=1,!($a&130023424)&&($a=4194304)):t=1);var n=ut();e=er(e,t),e!==null&&(pa(e,t,n),wt(e,n))}function wj(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Uw(e,n)}function bj(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(U(314))}r!==null&&r.delete(t),Uw(e,n)}var Ww;Ww=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||xt.current)gt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return gt=!1,lj(e,t,n);gt=!!(e.flags&131072)}else gt=!1,Se&&t.flags&1048576&&q1(t,hc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Al(e,t),e=t.pendingProps;var s=ki(t,st.current);mi(t,n),s=Rp(null,t,r,e,s,n);var i=Np();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,vt(r)?(i=!0,dc(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Cp(t),s.updater=su,t.stateNode=s,s._reactInternals=t,Uf(t,r,e,n),t=Gf(null,t,r,!0,i,n)):(t.tag=0,Se&&i&&xp(t),at(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Al(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=_j(r),e=cn(r,e),s){case 0:t=Hf(null,t,r,e,n);break e;case 1:t=ny(null,t,r,e,n);break e;case 11:t=ey(null,t,r,e,n);break e;case 14:t=ty(null,t,r,cn(r.type,e),n);break e}throw Error(U(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:cn(r,s),Hf(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:cn(r,s),ny(e,t,r,s,n);case 3:e:{if(jw(t),e===null)throw Error(U(387));r=t.pendingProps,i=t.memoizedState,s=i.element,ew(e,t),gc(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=Pi(Error(U(423)),t),t=ry(e,t,r,n,s);break e}else if(r!==s){s=Pi(Error(U(424)),t),t=ry(e,t,r,n,s);break e}else for(It=Ar(t.stateNode.containerInfo.firstChild),Mt=t,Se=!0,dn=null,n=J1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(_i(),r===s){t=tr(e,t,n);break e}at(e,t,r,n)}t=t.child}return t;case 5:return tw(t),e===null&&Bf(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,Lf(r,s)?o=null:i!==null&&Lf(r,i)&&(t.flags|=32),Pw(e,t),at(e,t,o,n),t.child;case 6:return e===null&&Bf(t),null;case 13:return Ew(e,t,n);case 4:return Pp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Si(t,null,r,n):at(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:cn(r,s),ey(e,t,r,s,n);case 7:return at(e,t,t.pendingProps,n),t.child;case 8:return at(e,t,t.pendingProps.children,n),t.child;case 12:return at(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,xe(pc,r._currentValue),r._currentValue=o,i!==null)if(mn(i.value,o)){if(i.children===s.children&&!xt.current){t=tr(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=Yn(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),$f(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(U(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),$f(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}at(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,mi(t,n),s=Jt(s),r=r(s),t.flags|=1,at(e,t,r,n),t.child;case 14:return r=t.type,s=cn(r,t.pendingProps),s=cn(r.type,s),ty(e,t,r,s,n);case 15:return Sw(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:cn(r,s),Al(e,t),t.tag=1,vt(r)?(e=!0,dc(t)):e=!1,mi(t,n),bw(t,r,s),Uf(t,r,s,n),Gf(null,t,r,!0,e,n);case 19:return Tw(e,t,n);case 22:return Cw(e,t,n)}throw Error(U(156,t.tag))};function Hw(e,t){return x1(e,t)}function kj(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qt(e,t,n,r){return new kj(e,t,n,r)}function $p(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _j(e){if(typeof e=="function")return $p(e)?1:0;if(e!=null){if(e=e.$$typeof,e===op)return 11;if(e===ap)return 14}return 2}function Or(e,t){var n=e.alternate;return n===null?(n=qt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Dl(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")$p(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Ys:return vs(n.children,s,i,t);case ip:o=8,s|=8;break;case hf:return e=qt(12,n,t,s|2),e.elementType=hf,e.lanes=i,e;case pf:return e=qt(13,n,t,s),e.elementType=pf,e.lanes=i,e;case mf:return e=qt(19,n,t,s),e.elementType=mf,e.lanes=i,e;case t1:return au(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Z0:o=10;break e;case e1:o=9;break e;case op:o=11;break e;case ap:o=14;break e;case xr:o=16,r=null;break e}throw Error(U(130,e==null?e:typeof e,""))}return t=qt(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function vs(e,t,n,r){return e=qt(7,e,r,t),e.lanes=n,e}function au(e,t,n,r){return e=qt(22,e,r,t),e.elementType=t1,e.lanes=n,e.stateNode={isHidden:!1},e}function ad(e,t,n){return e=qt(6,e,null,t),e.lanes=n,e}function ld(e,t,n){return t=qt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Sj(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Vu(0),this.expirationTimes=Vu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vu(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Vp(e,t,n,r,s,i,o,a,l){return e=new Sj(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=qt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Cp(i),e}function Cj(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Qs,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Gw(e){if(!e)return $r;e=e._reactInternals;e:{if(Is(e)!==e||e.tag!==1)throw Error(U(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(vt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(U(171))}if(e.tag===1){var n=e.type;if(vt(n))return G1(e,n,t)}return t}function Kw(e,t,n,r,s,i,o,a,l){return e=Vp(n,r,!0,e,s,i,o,a,l),e.context=Gw(null),n=e.current,r=ut(),s=Dr(n),i=Yn(r,s),i.callback=t??null,Mr(n,i,s),e.current.lanes=s,pa(e,s,r),wt(e,r),e}function lu(e,t,n,r){var s=t.current,i=ut(),o=Dr(s);return n=Gw(n),t.context===null?t.context=n:t.pendingContext=n,t=Yn(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Mr(s,t,o),e!==null&&(hn(e,s,o,i),Rl(e,s,o)),o}function Sc(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function hy(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Up(e,t){hy(e,t),(e=e.alternate)&&hy(e,t)}function Pj(){return null}var qw=typeof reportError=="function"?reportError:function(e){console.error(e)};function Wp(e){this._internalRoot=e}cu.prototype.render=Wp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(U(409));lu(e,t,null,null)};cu.prototype.unmount=Wp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Rs(function(){lu(null,e,null,null)}),t[Zn]=null}};function cu(e){this._internalRoot=e}cu.prototype.unstable_scheduleHydration=function(e){if(e){var t=C1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<br.length&&t!==0&&t<br[n].priority;n++);br.splice(n,0,e),n===0&&j1(e)}};function Hp(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function uu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function py(){}function jj(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var u=Sc(o);i.call(u)}}var o=Kw(t,r,e,0,null,!1,!1,"",py);return e._reactRootContainer=o,e[Zn]=o.current,Qo(e.nodeType===8?e.parentNode:e),Rs(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var u=Sc(l);a.call(u)}}var l=Vp(e,0,!1,null,null,!1,!1,"",py);return e._reactRootContainer=l,e[Zn]=l.current,Qo(e.nodeType===8?e.parentNode:e),Rs(function(){lu(t,l,n,r)}),l}function du(e,t,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=Sc(o);a.call(l)}}lu(t,o,e,s)}else o=jj(n,t,e,s,r);return Sc(o)}_1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=wo(t.pendingLanes);n!==0&&(up(t,n|1),wt(t,Le()),!(oe&6)&&(ji=Le()+500,qr()))}break;case 13:Rs(function(){var r=er(e,1);if(r!==null){var s=ut();hn(r,e,1,s)}}),Up(e,1)}};dp=function(e){if(e.tag===13){var t=er(e,134217728);if(t!==null){var n=ut();hn(t,e,134217728,n)}Up(e,134217728)}};S1=function(e){if(e.tag===13){var t=Dr(e),n=er(e,t);if(n!==null){var r=ut();hn(n,e,t,r)}Up(e,t)}};C1=function(){return ce};P1=function(e,t){var n=ce;try{return ce=e,t()}finally{ce=n}};Cf=function(e,t,n){switch(t){case"input":if(xf(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=tu(r);if(!s)throw Error(U(90));r1(r),xf(r,s)}}}break;case"textarea":i1(e,n);break;case"select":t=n.value,t!=null&&di(e,!!n.multiple,t,!1)}};f1=Fp;h1=Rs;var Ej={usingClientEntryPoint:!1,Events:[ga,ei,tu,u1,d1,Fp]},ro={findFiberByHostInstance:fs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Tj={bundleType:ro.bundleType,version:ro.version,rendererPackageName:ro.rendererPackageName,rendererConfig:ro.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:rr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=g1(e),e===null?null:e.stateNode},findFiberByHostInstance:ro.findFiberByHostInstance||Pj,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ja=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ja.isDisabled&&Ja.supportsFiber)try{Xc=Ja.inject(Tj),Rn=Ja}catch{}}Ot.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ej;Ot.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Hp(t))throw Error(U(200));return Cj(e,t,null,n)};Ot.createRoot=function(e,t){if(!Hp(e))throw Error(U(299));var n=!1,r="",s=qw;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Vp(e,1,!1,null,null,n,!1,r,s),e[Zn]=t.current,Qo(e.nodeType===8?e.parentNode:e),new Wp(t)};Ot.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(U(188)):(e=Object.keys(e).join(","),Error(U(268,e)));return e=g1(t),e=e===null?null:e.stateNode,e};Ot.flushSync=function(e){return Rs(e)};Ot.hydrate=function(e,t,n){if(!uu(t))throw Error(U(200));return du(null,e,t,!0,n)};Ot.hydrateRoot=function(e,t,n){if(!Hp(e))throw Error(U(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=qw;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Kw(t,null,e,1,n??null,s,!1,i,o),e[Zn]=t.current,Qo(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new cu(t)};Ot.render=function(e,t,n){if(!uu(t))throw Error(U(200));return du(null,e,t,!1,n)};Ot.unmountComponentAtNode=function(e){if(!uu(e))throw Error(U(40));return e._reactRootContainer?(Rs(function(){du(null,null,e,!1,function(){e._reactRootContainer=null,e[Zn]=null})}),!0):!1};Ot.unstable_batchedUpdates=Fp;Ot.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!uu(n))throw Error(U(200));if(e==null||e._reactInternals===void 0)throw Error(U(38));return du(e,t,n,!1,r)};Ot.version="18.3.1-next-f1338f8080-20240426";function Qw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Qw)}catch(e){console.error(e)}}Qw(),Q0.exports=Ot;var As=Q0.exports,Yw,my=As;Yw=my.createRoot,my.hydrateRoot;var ko=typeof window<"u"?_.useLayoutEffect:_.useEffect;function cd(e){const t=_.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function Rj(e,t,n={},r={}){_.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const s=new IntersectionObserver(([i])=>{t(i)},n);return s.observe(e.current),()=>{s.disconnect()}},[t,n,r.disabled,e])}function Nj(e){const t=_.useRef(null);return _.useImperativeHandle(e,()=>t.current,[]),t}const Xw=!1;function sa(e){return e[e.length-1]}function Ij(e){return typeof e=="function"}function Cr(e,t){return Ij(e)?e(t):e}const Aj=Object.prototype.hasOwnProperty,gy=Object.prototype.propertyIsEnumerable,Mj=()=>Object.create(null),ts=(e,t)=>Pr(e,t,Mj);function Pr(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;const s=t,i=vy(e)&&vy(s);if(!i&&!(Ei(e)&&Ei(s)))return s;const o=i?e:yy(e);if(!o)return s;const a=i?s:yy(s);if(!a)return s;const l=o.length,u=a.length,c=i?new Array(u):n();let f=0;for(let h=0;h<u;h++){const p=i?h:a[h],m=e[p],y=s[p];if(m===y){c[p]=m,(i?h<l:Aj.call(e,p))&&f++;continue}if(m===null||y===null||typeof m!="object"||typeof y!="object"){c[p]=y;continue}const w=Pr(m,y,n,r+1);c[p]=w,w===m&&f++}return l===u&&f===l?e:c}function yy(e){const t=Object.getOwnPropertyNames(e);for(const s of t)if(!gy.call(e,s))return!1;const n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;const r=t;for(const s of n){if(!gy.call(e,s))return!1;r.push(s)}return r}function Ei(e){if(!xy(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!xy(n)||!n.hasOwnProperty("isPrototypeOf"))}function xy(e){return Object.prototype.toString.call(e)==="[object Object]"}function vy(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ws(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,s=e.length;r<s;r++)if(!ws(e[r],t[r],n))return!1;return!0}if(Ei(e)&&Ei(t)){const r=(n==null?void 0:n.ignoreUndefined)??!0;if(n!=null&&n.partial){for(const o in t)if((!r||t[o]!==void 0)&&!ws(e[o],t[o],n))return!1;return!0}let s=0;if(!r)s=Object.keys(e).length;else for(const o in e)e[o]!==void 0&&s++;let i=0;for(const o in t)if((!r||t[o]!==void 0)&&(i++,i>s||!ws(e[o],t[o],n)))return!1;return s===i}return!1}function Ti(e){let t,n;const r=new Promise((s,i)=>{t=s,n=i});return r.status="pending",r.resolve=s=>{r.status="resolved",r.value=s,t(s),e==null||e(s)},r.reject=s=>{r.status="rejected",n(s)},r}function ia(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function Lj(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function wy(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return Lj(t)}const Dj=["http:","https:","mailto:","tel:"];function Cc(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function so(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let n=0,r="",s;for(;(s=t.exec(e))!==null;)r+=wy(e.slice(n,s.index))+s[0],n=t.lastIndex;r=r+wy(n?e.slice(n):e);let i=!1;return r.startsWith("//")&&(i=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:i}}function Oj(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function Fj(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Xn(){throw new Error("Invariant failed")}function oa(e){const t=new Map;let n,r;const s=i=>{i.next&&(i.prev?(i.prev.next=i.next,i.next.prev=i.prev,i.next=void 0,r&&(r.next=i,i.prev=r)):(i.next.prev=void 0,n=i.next,i.next=void 0,r&&(i.prev=r,r.next=i)),r=i)};return{get(i){const o=t.get(i);if(o)return s(o),o.value},set(i,o){if(t.size>=e&&n){const l=n;t.delete(l.key),l.next&&(n=l.next,l.next.prev=void 0),l===r&&(r=void 0)}const a=t.get(i);if(a)a.value=o,s(a);else{const l={key:i,value:o,prev:r};r&&(r.next=l),r=l,n||(n=l),t.set(i,l)}},clear(){t.clear(),n=void 0,r=void 0}}}const jr=4,Jw=5;function zj(e){const t=e.indexOf("{");if(t===-1)return null;const n=e.indexOf("}",t);return n===-1||t+1>=e.length?null:[t,n]}function Gp(e,t,n=new Uint16Array(6)){const r=e.indexOf("/",t),s=r===-1?e.length:r,i=e.substring(t,s);if(!i||!i.includes("$"))return n[0]=0,n[1]=t,n[2]=t,n[3]=s,n[4]=s,n[5]=s,n;if(i==="$"){const a=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=a,n[4]=a,n[5]=a,n}if(i.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=s,n[4]=s,n[5]=s,n;const o=zj(i);if(o){const[a,l]=o,u=i.charCodeAt(a+1);if(u===45){if(a+2<i.length&&i.charCodeAt(a+2)===36){const c=a+3,f=l;if(c<f)return n[0]=3,n[1]=t+a,n[2]=t+c,n[3]=t+f,n[4]=t+l+1,n[5]=s,n}}else if(u===36){const c=a+1,f=a+2;return f===l?(n[0]=2,n[1]=t+a,n[2]=t+c,n[3]=t+f,n[4]=t+l+1,n[5]=e.length,n):(n[0]=1,n[1]=t+a,n[2]=t+f,n[3]=t+l,n[4]=t+l+1,n[5]=s,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=s,n[4]=s,n[5]=s,n}function fu(e,t,n,r,s,i,o){var l,u,c,f,h,p,m,y,w,g,x,v,k;o==null||o(n);let a=r;{const S=n.fullPath??n.from,b=S.length,P=((l=n.options)==null?void 0:l.caseSensitive)??e,j=!!((c=(u=n.options)==null?void 0:u.params)!=null&&c.parse&&((h=(f=n.options)==null?void 0:f.skipRouteOnParseError)!=null&&h.params));for(;a<b;){const T=Gp(S,a,t);let I;const A=a,F=T[5];switch(a=F+1,i++,T[0]){case 0:{const z=S.substring(T[2],T[3]);if(P){const E=(p=s.static)==null?void 0:p.get(z);if(E)I=E;else{s.static??(s.static=new Map);const D=ms(n.fullPath??n.from);D.parent=s,D.depth=i,I=D,s.static.set(z,D)}}else{const E=z.toLowerCase(),D=(m=s.staticInsensitive)==null?void 0:m.get(E);if(D)I=D;else{s.staticInsensitive??(s.staticInsensitive=new Map);const B=ms(n.fullPath??n.from);B.parent=s,B.depth=i,I=B,s.staticInsensitive.set(E,B)}}break}case 1:{const z=S.substring(A,T[1]),E=S.substring(T[4],F),D=P&&!!(z||E),B=z?D?z:z.toLowerCase():void 0,M=E?D?E:E.toLowerCase():void 0,$=!j&&((y=s.dynamic)==null?void 0:y.find(C=>!C.skipOnParamError&&C.caseSensitive===D&&C.prefix===B&&C.suffix===M));if($)I=$;else{const C=dd(1,n.fullPath??n.from,D,B,M);I=C,C.depth=i,C.parent=s,s.dynamic??(s.dynamic=[]),s.dynamic.push(C)}break}case 3:{const z=S.substring(A,T[1]),E=S.substring(T[4],F),D=P&&!!(z||E),B=z?D?z:z.toLowerCase():void 0,M=E?D?E:E.toLowerCase():void 0,$=!j&&((w=s.optional)==null?void 0:w.find(C=>!C.skipOnParamError&&C.caseSensitive===D&&C.prefix===B&&C.suffix===M));if($)I=$;else{const C=dd(3,n.fullPath??n.from,D,B,M);I=C,C.parent=s,C.depth=i,s.optional??(s.optional=[]),s.optional.push(C)}break}case 2:{const z=S.substring(A,T[1]),E=S.substring(T[4],F),D=P&&!!(z||E),B=z?D?z:z.toLowerCase():void 0,M=E?D?E:E.toLowerCase():void 0,$=dd(2,n.fullPath??n.from,D,B,M);I=$,$.parent=s,$.depth=i,s.wildcard??(s.wildcard=[]),s.wildcard.push($)}}s=I}if(j&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const T=ms(n.fullPath??n.from);T.kind=Jw,T.parent=s,i++,T.depth=i,s.pathless??(s.pathless=[]),s.pathless.push(T),s=T}const R=(n.path||!n.children)&&!n.isRoot;if(R&&S.endsWith("/")){const T=ms(n.fullPath??n.from);T.kind=jr,T.parent=s,i++,T.depth=i,s.index=T,s=T}s.parse=((x=(g=n.options)==null?void 0:g.params)==null?void 0:x.parse)??null,s.skipOnParamError=j,s.parsingPriority=((k=(v=n.options)==null?void 0:v.skipRouteOnParseError)==null?void 0:k.priority)??0,R&&!s.route&&(s.route=n,s.fullPath=n.fullPath??n.from)}if(n.children)for(const S of n.children)fu(e,t,S,a,s,i,o)}function ud(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function wr(e){var t,n,r;if(e.pathless)for(const s of e.pathless)wr(s);if(e.static)for(const s of e.static.values())wr(s);if(e.staticInsensitive)for(const s of e.staticInsensitive.values())wr(s);if((t=e.dynamic)!=null&&t.length){e.dynamic.sort(ud);for(const s of e.dynamic)wr(s)}if((n=e.optional)!=null&&n.length){e.optional.sort(ud);for(const s of e.optional)wr(s)}if((r=e.wildcard)!=null&&r.length){e.wildcard.sort(ud);for(const s of e.wildcard)wr(s)}}function ms(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function dd(e,t,n,r,s){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:n,prefix:r,suffix:s}}function Bj(e,t){const n=ms("/"),r=new Uint16Array(6);for(const s of e)fu(!1,r,s,1,n,0);wr(n),t.masksTree=n,t.flatCache=oa(1e3)}function $j(e,t){e||(e="/");const n=t.flatCache.get(e);if(n)return n;const r=Kp(e,t.masksTree);return t.flatCache.set(e,r),r}function Vj(e,t,n,r,s){e||(e="/"),r||(r="/");const i=t?`case\0${e}`:e;let o=s.singleCache.get(i);return o||(o=ms("/"),fu(t,new Uint16Array(6),{from:e},1,o,0),s.singleCache.set(i,o)),Kp(r,o,n)}function Uj(e,t,n=!1){const r=n?e:`nofuzz\0${e}`,s=t.matchCache.get(r);if(s!==void 0)return s;e||(e="/");let i;try{i=Kp(e,t.segmentTree,n)}catch(o){if(o instanceof URIError)i=null;else throw o}return i&&(i.branch=Gj(i.route)),t.matchCache.set(r,i),i}function Wj(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function Hj(e,t=!1,n){const r=ms(e.fullPath),s=new Uint16Array(6),i={},o={};let a=0;return fu(t,s,e,1,r,0,l=>{if(n==null||n(l,a),l.id in i&&Xn(),i[l.id]=l,a!==0&&l.path){const u=Wj(l.fullPath);(!o[u]||l.fullPath.endsWith("/"))&&(o[u]=l)}a++}),wr(r),{processedTree:{segmentTree:r,singleCache:oa(1e3),matchCache:oa(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:o}}function Kp(e,t,n=!1){const r=e.split("/"),s=qj(e,r,t,n);if(!s)return null;const[i]=Zw(e,r,s);return{route:s.node.route,rawParams:i,parsedParams:s.parsedParams}}function Zw(e,t,n){var c,f,h,p,m,y,w,g,x,v;const r=Kj(n.node);let s=null;const i=Object.create(null);let o=((c=n.extract)==null?void 0:c.part)??0,a=((f=n.extract)==null?void 0:f.node)??0,l=((h=n.extract)==null?void 0:h.path)??0,u=((p=n.extract)==null?void 0:p.segment)??0;for(;a<r.length;o++,a++,l++,u++){const k=r[a];if(k.kind===jr)break;if(k.kind===Jw){u--,o--,l--;continue}const S=t[o],b=l;if(S&&(l+=S.length),k.kind===1){s??(s=n.node.fullPath.split("/"));const P=s[u],j=((m=k.prefix)==null?void 0:m.length)??0;if(P.charCodeAt(j)===123){const R=((y=k.suffix)==null?void 0:y.length)??0,T=P.substring(j+2,P.length-R-1),I=S.substring(j,S.length-R);i[T]=decodeURIComponent(I)}else{const R=P.substring(1);i[R]=decodeURIComponent(S)}}else if(k.kind===3){if(n.skipped&1<<a){o--,l=b-1;continue}s??(s=n.node.fullPath.split("/"));const P=s[u],j=((w=k.prefix)==null?void 0:w.length)??0,R=((g=k.suffix)==null?void 0:g.length)??0,T=P.substring(j+3,P.length-R-1),I=k.suffix||k.prefix?S.substring(j,S.length-R):S;I&&(i[T]=decodeURIComponent(I))}else if(k.kind===2){const P=k,j=e.substring(b+(((x=P.prefix)==null?void 0:x.length)??0),e.length-(((v=P.suffix)==null?void 0:v.length)??0)),R=decodeURIComponent(j);i["*"]=R,i._splat=R;break}}return n.rawParams&&Object.assign(i,n.rawParams),[i,{part:o,node:a,path:l,segment:u}]}function Gj(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Kj(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function qj(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const s=!sa(t),i=s&&e!=="/",o=t.length-(s?1:0),a=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let l=null,u=null;for(;a.length;){const c=a.pop(),{node:f,index:h,skipped:p,depth:m,statics:y,dynamics:w,optionals:g}=c;let{extract:x,rawParams:v,parsedParams:k}=c;if(f.kind===2&&f.route&&!el(u,c))continue;if(f.skipOnParamError){if(!by(e,t,c))continue;v=c.rawParams,x=c.extract,k=c.parsedParams}r&&f.route&&f.kind!==jr&&el(l,c)&&(l=c);const S=h===o;if(S&&(f.route&&(!i||f.kind===jr||f.kind===2)&&el(u,c)&&(u=c),!f.optional&&!f.wildcard&&!f.index&&!f.pathless))continue;const b=S?void 0:t[h];let P;if(S&&f.index){const j={node:f.index,index:h,skipped:p,depth:m+1,statics:y,dynamics:w,optionals:g,extract:x,rawParams:v,parsedParams:k};let R=!0;if(f.index.skipOnParamError&&(by(e,t,j)||(R=!1)),R){if(!w&&!g&&!p&&Qj(y,o))return j;el(u,j)&&(u=j)}}if(f.wildcard)for(let j=f.wildcard.length-1;j>=0;j--){const R=f.wildcard[j],{prefix:T,suffix:I}=R;if(!(T&&(S||!(R.caseSensitive?b:P??(P=b.toLowerCase())).startsWith(T)))){if(I){if(S)continue;const A=t.slice(h).join("/").slice(-I.length);if((R.caseSensitive?A:A.toLowerCase())!==I)continue}a.push({node:R,index:o,skipped:p,depth:m+1,statics:y,dynamics:w,optionals:g,extract:x,rawParams:v,parsedParams:k})}}if(f.optional){const j=p|1<<m,R=m+1;for(let T=f.optional.length-1;T>=0;T--){const I=f.optional[T];a.push({node:I,index:h,skipped:j,depth:R,statics:y,dynamics:w,optionals:g,extract:x,rawParams:v,parsedParams:k})}if(!S)for(let T=f.optional.length-1;T>=0;T--){const I=f.optional[T],{prefix:A,suffix:F}=I;if(A||F){const z=I.caseSensitive?b:P??(P=b.toLowerCase());if(A&&!z.startsWith(A)||F&&!z.endsWith(F))continue}a.push({node:I,index:h+1,skipped:p,depth:R,statics:y,dynamics:w,optionals:g+Za(o,h),extract:x,rawParams:v,parsedParams:k})}}if(!S&&f.dynamic&&b)for(let j=f.dynamic.length-1;j>=0;j--){const R=f.dynamic[j],{prefix:T,suffix:I}=R;if(T||I){const A=R.caseSensitive?b:P??(P=b.toLowerCase());if(T&&!A.startsWith(T)||I&&!A.endsWith(I))continue}a.push({node:R,index:h+1,skipped:p,depth:m+1,statics:y,dynamics:w+Za(o,h),optionals:g,extract:x,rawParams:v,parsedParams:k})}if(!S&&f.staticInsensitive){const j=f.staticInsensitive.get(P??(P=b.toLowerCase()));j&&a.push({node:j,index:h+1,skipped:p,depth:m+1,statics:y+Za(o,h),dynamics:w,optionals:g,extract:x,rawParams:v,parsedParams:k})}if(!S&&f.static){const j=f.static.get(b);j&&a.push({node:j,index:h+1,skipped:p,depth:m+1,statics:y+Za(o,h),dynamics:w,optionals:g,extract:x,rawParams:v,parsedParams:k})}if(f.pathless){const j=m+1;for(let R=f.pathless.length-1;R>=0;R--){const T=f.pathless[R];a.push({node:T,index:h,skipped:p,depth:j,statics:y,dynamics:w,optionals:g,extract:x,rawParams:v,parsedParams:k})}}}if(u)return u;if(r&&l){let c=l.index;for(let h=0;h<l.index;h++)c+=t[h].length;const f=c===e.length?"/":e.slice(c);return l.rawParams??(l.rawParams=Object.create(null)),l.rawParams["**"]=decodeURIComponent(f),l}return null}function Za(e,t){return 2**(e-t-1)}function Qj(e,t){return e===2**(t-1)-1}function by(e,t,n){try{const[r,s]=Zw(e,t,n);n.rawParams=r,n.extract=s;const i=n.node.parse(r);return n.parsedParams=Object.assign(Object.create(null),n.parsedParams,i),!0}catch{return null}}function el(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===jr)>(e.node.kind===jr)||t.node.kind===jr==(e.node.kind===jr)&&t.depth>e.depth))):!0}function Ol(e){return qp(e.filter(t=>t!==void 0).join("/"))}function qp(e){return e.replace(/\/{2,}/g,"/")}function eb(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Fr(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function tb(e){return Fr(eb(e))}function Pc(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function Yj(e,t,n){return Pc(e,n)===Pc(t,n)}function Xj({base:e,to:t,trailingSlash:n="never",cache:r}){const s=t.startsWith("/"),i=!s&&t===".";let o;if(r){o=s?t:i?e:e+"\0"+t;const f=r.get(o);if(f)return f}let a;if(i)a=e.split("/");else if(s)a=t.split("/");else{for(a=e.split("/");a.length>1&&sa(a)==="";)a.pop();const f=t.split("/");for(let h=0,p=f.length;h<p;h++){const m=f[h];m===""?h?h===p-1&&a.push(m):a=[m]:m===".."?a.pop():m==="."||a.push(m)}}a.length>1&&(sa(a)===""?n==="never"&&a.pop():n==="always"&&a.push(""));let l,u="";for(let f=0;f<a.length;f++){f>0&&(u+="/");const h=a[f];if(!h)continue;l=Gp(h,0,l);const p=l[0];if(p===0){u+=h;continue}const m=l[5],y=h.substring(0,l[1]),w=h.substring(l[4],m),g=h.substring(l[2],l[3]);p===1?u+=y||w?`${y}{$${g}}${w}`:`$${g}`:p===2?u+=y||w?`${y}{$}${w}`:"$":u+=`${y}{-$${g}}${w}`}u=qp(u);const c=u||"/";return o&&r&&r.set(o,c),c}function Jj(e){const t=new Map(e.map(s=>[encodeURIComponent(s),s])),n=Array.from(t.keys()).map(s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(n,"g");return s=>s.replace(r,i=>t.get(i)??i)}function fd(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(s=>_y(s,n)).join("/"):_y(r,n)}function ky({path:e,params:t,decoder:n,...r}){let s=!1;const i=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:i,isMissingParams:s};if(!e.includes("$"))return{interpolatedPath:e,usedParams:i,isMissingParams:s};const o=e.length;let a=0,l,u="";for(;a<o;){const c=a;l=Gp(e,c,l);const f=l[5];if(a=f+1,c===f)continue;const h=l[0];if(h===0){u+="/"+e.substring(c,f);continue}if(h===2){const p=t._splat;i._splat=p,i["*"]=p;const m=e.substring(c,l[1]),y=e.substring(l[4],f);if(!p){s=!0,(m||y)&&(u+="/"+m+y);continue}const w=fd("_splat",t,n);u+="/"+m+w+y;continue}if(h===1){const p=e.substring(l[2],l[3]);!s&&!(p in t)&&(s=!0),i[p]=t[p];const m=e.substring(c,l[1]),y=e.substring(l[4],f),w=fd(p,t,n)??"undefined";u+="/"+m+w+y;continue}if(h===3){const p=e.substring(l[2],l[3]),m=t[p];if(m==null)continue;i[p]=m;const y=e.substring(c,l[1]),w=e.substring(l[4],f),g=fd(p,t,n)??"";u+="/"+y+g+w;continue}}return e.endsWith("/")&&(u+="/"),{usedParams:i,interpolatedPath:u||"/",isMissingParams:s}}function _y(e,t){const n=encodeURIComponent(e);return(t==null?void 0:t(n))??n}function rt(e){return(e==null?void 0:e.isNotFound)===!0}function Zj(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}const eE="tsr-scroll-restoration-v1_3";function tE(){const e=Zj();if(!e)return null;let t={};try{const r=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");Ei(r)&&(t=r)}catch{}return{get state(){return t},set:r=>{t=Cr(r,t)||t},persist:()=>{try{e.setItem(eE,JSON.stringify(t))}catch{}}}}const Sy=tE(),nE=e=>e.state.__TSR_key||e.href;function rE(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let tl=!1;const io="window",Cy="data-scroll-restoration-id";function sE(e,t){if(!Sy)return;const n=Sy;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!n)return;e.isScrollRestorationSetup=!0,tl=!1;const r=e.options.getScrollRestorationKey||nE,s=new Map;window.history.scrollRestoration="manual";const i=a=>{if(!(tl||!e.isScrollRestoring))if(a.target===document||a.target===window)s.set(io,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const l=a.target;s.set(l,{scrollX:l.scrollLeft||0,scrollY:l.scrollTop||0})}},o=a=>{var u;if(!e.isScrollRestoring||!a||s.size===0||!n)return;const l=(u=n.state)[a]||(u[a]={});for(const[c,f]of s){let h;if(c===io)h=io;else if(c.isConnected){const p=c.getAttribute(Cy);h=p?`[${Cy}="${p}"]`:rE(c)}h&&(l[h]=f)}};document.addEventListener("scroll",i,!0),e.subscribe("onBeforeLoad",a=>{o(a.fromLocation?r(a.fromLocation):void 0),s.clear()}),window.addEventListener("pagehide",()=>{o(r(e.stores.resolvedLocation.get()??e.stores.location.get())),n.persist()}),e.subscribe("onRendered",a=>{var f;const l=r(a.toLocation),u=e.options.scrollRestorationBehavior,c=e.options.scrollToTopSelectors;if(s.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){tl=!0;try{const h=e.isScrollRestoring?n.state[l]:void 0;let p=!1;if(h)for(const m in h){const y=h[m];if(!Ei(y))continue;const{scrollX:w,scrollY:g}=y;if(!(!Number.isFinite(w)||!Number.isFinite(g))){if(m===io)window.scrollTo({top:g,left:w,behavior:u}),p=!0;else if(m){let x;try{x=document.querySelector(m)}catch{continue}x&&(x.scrollLeft=w,x.scrollTop=g,p=!0)}}}if(!p){const m=e.history.location.hash.slice(1);if(m){const y=((f=window.history.state)==null?void 0:f.__hashScrollIntoViewOptions)??!0;if(y){const w=document.getElementById(m);w&&w.scrollIntoView(y)}}else{const y={top:0,left:0,behavior:u};if(window.scrollTo(y),c)for(const w of c){if(w===io)continue;const g=typeof w=="function"?w():document.querySelector(w);g&&g.scrollTo(y)}}}}finally{tl=!1}e.isScrollRestoring&&n.set(h=>(h[l]||(h[l]={}),h))}})}function iE(e,t=String){const n=new URLSearchParams;for(const r in e){const s=e[r];s!==void 0&&n.set(r,t(s))}return n.toString()}function hd(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function oE(e){const t=new URLSearchParams(e),n=Object.create(null);for(const[r,s]of t.entries()){const i=n[r];i==null?n[r]=hd(s):Array.isArray(i)?i.push(hd(s)):n[r]=[i,hd(s)]}return n}const aE=cE(JSON.parse),lE=uE(JSON.stringify,JSON.parse);function cE(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=oE(t);for(const r in n){const s=n[r];if(typeof s=="string")try{n[r]=e(s)}catch{}}return n}}function uE(e,t){const n=typeof t=="function";function r(s){if(typeof s=="object"&&s!==null)try{return e(s)}catch{}else if(n&&typeof s=="string")try{return t(s),e(s)}catch{}return s}return s=>{const i=iE(s,r);return i?`?${i}`:""}}const bs="__root__";function dE(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function yt(e){return e instanceof Response&&!!e.options}function fE(e){return{input:({url:t})=>{for(const n of e)t=sh(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=nb(e[n],t);return t}}}function hE(e){const t=tb(e.basepath),n=`/${t}`,r=`${n}/`,s=e.caseSensitive?n:n.toLowerCase(),i=e.caseSensitive?r:r.toLowerCase();return{input:({url:o})=>{const a=e.caseSensitive?o.pathname:o.pathname.toLowerCase();return a===s?o.pathname="/":a.startsWith(i)&&(o.pathname=o.pathname.slice(n.length)),o},output:({url:o})=>(o.pathname=Ol(["/",t,o.pathname]),o)}}function sh(e,t){var r;const n=(r=e==null?void 0:e.input)==null?void 0:r.call(e,{url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function nb(e,t){var r;const n=(r=e==null?void 0:e.output)==null?void 0:r.call(e,{url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function pE(e,t){const{createMutableStore:n,createReadonlyStore:r,batch:s,init:i}=t,o=new Map,a=new Map,l=new Map,u=n(e.status),c=n(e.loadedAt),f=n(e.isLoading),h=n(e.isTransitioning),p=n(e.location),m=n(e.resolvedLocation),y=n(e.statusCode),w=n(e.redirect),g=n([]),x=n([]),v=n([]),k=r(()=>pd(o,g.get())),S=r(()=>pd(a,x.get())),b=r(()=>pd(l,v.get())),P=r(()=>g.get()[0]),j=r(()=>g.get().some(B=>{var M;return((M=o.get(B))==null?void 0:M.get().status)==="pending"})),R=r(()=>{var B;return{locationHref:p.get().href,resolvedLocationHref:(B=m.get())==null?void 0:B.href,status:u.get()}}),T=r(()=>({status:u.get(),loadedAt:c.get(),isLoading:f.get(),isTransitioning:h.get(),matches:k.get(),location:p.get(),resolvedLocation:m.get(),statusCode:y.get(),redirect:w.get()})),I=oa(64);function A(B){let M=I.get(B);return M||(M=r(()=>{const $=g.get();for(const C of $){const V=o.get(C);if(V&&V.routeId===B)return V.get()}}),I.set(B,M)),M}const F={status:u,loadedAt:c,isLoading:f,isTransitioning:h,location:p,resolvedLocation:m,statusCode:y,redirect:w,matchesId:g,pendingIds:x,cachedIds:v,matches:k,pendingMatches:S,cachedMatches:b,firstId:P,hasPending:j,matchRouteDeps:R,matchStores:o,pendingMatchStores:a,cachedMatchStores:l,__store:T,getRouteMatchStore:A,setMatches:z,setPending:E,setCached:D};z(e.matches),i==null||i(F);function z(B){md(B,o,g,n,s)}function E(B){md(B,a,x,n,s)}function D(B){md(B,l,v,n,s)}return F}function pd(e,t){const n=[];for(const r of t){const s=e.get(r);s&&n.push(s.get())}return n}function md(e,t,n,r,s){const i=e.map(a=>a.id),o=new Set(i);s(()=>{for(const a of t.keys())o.has(a)||t.delete(a);for(const a of e){const l=t.get(a.id);if(!l){const u=r(a);u.routeId=a.routeId,t.set(a.id,u);continue}l.routeId=a.routeId,l.get()!==a&&l.set(a)}Fj(n.get(),i)||n.set(i)})}const ih=e=>{var t;if(!e.rendered)return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)},mE=e=>e.stores.matchesId.get().some(t=>{var n;return(n=e.stores.matchStores.get(t))==null?void 0:n.get()._forcePending}),hu=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),ks=(e,t,n=!0)=>{const r={...e.router.options.context??{}},s=n?t:t-1;for(let i=0;i<=s;i++){const o=e.matches[i];if(!o)continue;const a=e.router.getMatch(o.id);a&&Object.assign(r,a.__routeContext,a.__beforeLoadContext)}return r},Py=(e,t)=>{if(!e.matches.length)return;const n=t.routeId,r=e.matches.findIndex(o=>o.routeId===e.router.routeTree.id),s=r>=0?r:0;let i=n?e.matches.findIndex(o=>o.routeId===n):e.firstBadMatchIndex??e.matches.length-1;i<0&&(i=s);for(let o=i;o>=0;o--){const a=e.matches[o];if(e.router.looseRoutesById[a.routeId].options.notFoundComponent)return o}return n?i:s},Er=(e,t,n)=>{var r,s,i;if(!(!yt(n)&&!rt(n)))throw yt(n)&&n.redirectHandled&&!n.options.reloadDocument||(t&&((r=t._nonReactive.beforeLoadPromise)==null||r.resolve(),(s=t._nonReactive.loaderPromise)==null||s.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,o=>({...o,status:yt(n)?"redirected":rt(n)?"notFound":o.status==="pending"?"success":o.status,context:ks(e,t.index),isFetching:!1,error:n})),rt(n)&&!n.routeId&&(n.routeId=t.routeId),(i=t._nonReactive.loadPromise)==null||i.resolve()),yt(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n))),n},rb=(e,t)=>{const n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},jy=(e,t,n)=>{const r=ks(e,n);e.updateMatch(t,s=>({...s,context:r}))},oo=(e,t,n,r)=>{var a,l;const{id:s,routeId:i}=e.matches[t],o=e.router.looseRoutesById[i];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??(e.firstBadMatchIndex=t),Er(e,e.router.getMatch(s),n);try{(l=(a=o.options).onError)==null||l.call(a,n)}catch(u){n=u,Er(e,e.router.getMatch(s),n)}e.updateMatch(s,u=>{var c,f;return(c=u._nonReactive.beforeLoadPromise)==null||c.resolve(),u._nonReactive.beforeLoadPromise=void 0,(f=u._nonReactive.loadPromise)==null||f.resolve(),{...u,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!e.preload&&!yt(n)&&!rt(n)&&(e.serialError??(e.serialError=n))},sb=(e,t,n,r)=>{var i;if(r._nonReactive.pendingTimeout!==void 0)return;const s=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!hu(e,t)&&(n.options.loader||n.options.beforeLoad||ob(n))&&typeof s=="number"&&s!==1/0&&(n.options.pendingComponent??((i=e.router.options)==null?void 0:i.defaultPendingComponent))){const o=setTimeout(()=>{ih(e)},s);r._nonReactive.pendingTimeout=o}},gE=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;sb(e,t,n,r);const s=()=>{const i=e.router.getMatch(t);i.preload&&(i.status==="redirected"||i.status==="notFound")&&Er(e,i,i.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(s):s()},yE=(e,t,n,r)=>{const s=e.router.getMatch(t);let i=s._nonReactive.loadPromise;s._nonReactive.loadPromise=Ti(()=>{i==null||i.resolve(),i=void 0});const{paramsError:o,searchError:a}=s;o&&oo(e,n,o,"PARSE_PARAMS"),a&&oo(e,n,a,"VALIDATE_SEARCH"),sb(e,t,r,s);const l=new AbortController;let u=!1;const c=()=>{u||(u=!0,e.updateMatch(t,k=>({...k,isFetching:"beforeLoad",fetchCount:k.fetchCount+1,abortController:l})))},f=()=>{var k;(k=s._nonReactive.beforeLoadPromise)==null||k.resolve(),s._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,S=>({...S,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{c(),f()});return}s._nonReactive.beforeLoadPromise=Ti();const h={...ks(e,n,!1),...s.__routeContext},{search:p,params:m,cause:y}=s,w=hu(e,t),g={search:p,abortController:l,params:m,preload:w,context:h,location:e.location,navigate:k=>e.router.navigate({...k,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:w?"preload":y,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},x=k=>{if(k===void 0){e.router.batch(()=>{c(),f()});return}(yt(k)||rt(k))&&(c(),oo(e,n,k,"BEFORE_LOAD")),e.router.batch(()=>{c(),e.updateMatch(t,S=>({...S,__beforeLoadContext:k})),f()})};let v;try{if(v=r.options.beforeLoad(g),ia(v))return c(),v.catch(k=>{oo(e,n,k,"BEFORE_LOAD")}).then(x)}catch(k){c(),oo(e,n,k,"BEFORE_LOAD")}x(v)},xE=(e,t)=>{const{id:n,routeId:r}=e.matches[t],s=e.router.looseRoutesById[r],i=()=>a(),o=()=>yE(e,n,t,s),a=()=>{if(rb(e,n))return;const l=gE(e,n,s);return ia(l)?l.then(o):o()};return i()},vE=(e,t,n)=>{var i,o,a,l,u,c;const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const s={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([(o=(i=n.options).head)==null?void 0:o.call(i,s),(l=(a=n.options).scripts)==null?void 0:l.call(a,s),(c=(u=n.options).headers)==null?void 0:c.call(u,s)]).then(([f,h,p])=>({meta:f==null?void 0:f.meta,links:f==null?void 0:f.links,headScripts:f==null?void 0:f.scripts,headers:p,scripts:h,styles:f==null?void 0:f.styles}))},ib=(e,t,n,r,s)=>{const i=t[r-1],{params:o,loaderDeps:a,abortController:l,cause:u}=e.router.getMatch(n),c=ks(e,r),f=hu(e,n);return{params:o,deps:a,preload:!!f,parentMatchPromise:i,abortController:l,context:c,location:e.location,navigate:h=>e.router.navigate({...h,_fromLocation:e.location}),cause:f?"preload":u,route:s,...e.router.options.additionalContext}},Ey=async(e,t,n,r,s)=>{var i,o,a,l,u;try{const c=e.router.getMatch(n);try{(!(Xw??e.router.isServer)||c.ssr===!0)&&aa(s);const f=s.options.loader,h=typeof f=="function"?f:f==null?void 0:f.handler,p=h==null?void 0:h(ib(e,t,n,r,s)),m=!!h&&ia(p);if((m||s._lazyPromise||s._componentsPromise||s.options.head||s.options.scripts||s.options.headers||c._nonReactive.minPendingPromise)&&e.updateMatch(n,w=>({...w,isFetching:"loader"})),h){const w=m?await p:p;Er(e,e.router.getMatch(n),w),w!==void 0&&e.updateMatch(n,g=>({...g,loaderData:w}))}s._lazyPromise&&await s._lazyPromise;const y=c._nonReactive.minPendingPromise;y&&await y,s._componentsPromise&&await s._componentsPromise,e.updateMatch(n,w=>({...w,error:void 0,context:ks(e,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(f){let h=f;if((h==null?void 0:h.name)==="AbortError"){if(c.abortController.signal.aborted){(i=c._nonReactive.loaderPromise)==null||i.resolve(),c._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,m=>({...m,status:m.status==="pending"?"success":m.status,isFetching:!1,context:ks(e,r)}));return}const p=c._nonReactive.minPendingPromise;p&&await p,rt(f)&&await((a=(o=s.options.notFoundComponent)==null?void 0:o.preload)==null?void 0:a.call(o)),Er(e,e.router.getMatch(n),f);try{(u=(l=s.options).onError)==null||u.call(l,f)}catch(m){h=m,Er(e,e.router.getMatch(n),m)}!yt(h)&&!rt(h)&&await aa(s,["errorComponent"]),e.updateMatch(n,m=>({...m,error:h,context:ks(e,r),status:"error",isFetching:!1}))}}catch(c){const f=e.router.getMatch(n);f&&(f._nonReactive.loaderPromise=void 0),Er(e,f,c)}},wE=async(e,t,n)=>{var p,m,y,w;async function r(g,x,v,k,S){const b=Date.now()-x.updatedAt,P=g?S.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:S.options.staleTime??e.router.options.defaultStaleTime??0,j=S.options.shouldReload,R=typeof j=="function"?j(ib(e,t,s,n,S)):j,{status:T,invalid:I}=k,A=b>=P&&(!!e.forceStaleReload||k.cause==="enter"||v!==void 0&&v!==k.id);o=T==="success"&&(I||(R??A)),g&&S.options.preload===!1||(o&&!e.sync&&c?(a=!0,(async()=>{var F,z;try{await Ey(e,t,s,n,S);const E=e.router.getMatch(s);(F=E._nonReactive.loaderPromise)==null||F.resolve(),(z=E._nonReactive.loadPromise)==null||z.resolve(),E._nonReactive.loaderPromise=void 0,E._nonReactive.loadPromise=void 0}catch(E){yt(E)&&await e.router.navigate(E.options)}})()):T!=="success"||o?await Ey(e,t,s,n,S):jy(e,s,n))}const{id:s,routeId:i}=e.matches[n];let o=!1,a=!1;const l=e.router.looseRoutesById[i],u=l.options.loader,c=((typeof u=="function"||u==null?void 0:u.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(rb(e,s)){if(!e.router.getMatch(s))return e.matches[n];jy(e,s,n)}else{const g=e.router.getMatch(s),x=e.router.stores.matchesId.get()[n],v=((p=x&&e.router.stores.matchStores.get(x)||null)==null?void 0:p.routeId)===i?x:(m=e.router.stores.matches.get().find(S=>S.routeId===i))==null?void 0:m.id,k=hu(e,s);if(g._nonReactive.loaderPromise){if(g.status==="success"&&!e.sync&&!g.preload&&c)return g;await g._nonReactive.loaderPromise;const S=e.router.getMatch(s),b=S._nonReactive.error||S.error;b&&Er(e,S,b),S.status==="pending"&&await r(k,g,v,S,l)}else{const S=k&&!e.router.stores.matchStores.has(s),b=e.router.getMatch(s);b._nonReactive.loaderPromise=Ti(),S!==b.preload&&e.updateMatch(s,P=>({...P,preload:S})),await r(k,g,v,b,l)}}const f=e.router.getMatch(s);a||((y=f._nonReactive.loaderPromise)==null||y.resolve(),(w=f._nonReactive.loadPromise)==null||w.resolve(),f._nonReactive.loadPromise=void 0),clearTimeout(f._nonReactive.pendingTimeout),f._nonReactive.pendingTimeout=void 0,a||(f._nonReactive.loaderPromise=void 0),f._nonReactive.dehydrated=void 0;const h=a?f.isFetching:!1;return h!==f.isFetching||f.invalid!==!1?(e.updateMatch(s,g=>({...g,isFetching:h,invalid:!1})),e.router.getMatch(s)):f};async function Ty(e){var h,p;const t=e,n=[];mE(t.router)&&ih(t);let r;for(let m=0;m<t.matches.length;m++){try{const y=xE(t,m);ia(y)&&await y}catch(y){if(yt(y))throw y;if(rt(y))r=y;else if(!t.preload)throw y;break}if(t.serialError||t.firstBadMatchIndex!=null)break}const s=t.firstBadMatchIndex??t.matches.length,i=r&&!t.preload?Py(t,r):void 0,o=r&&t.preload?0:i!==void 0?Math.min(i+1,s):s;let a,l;for(let m=0;m<o;m++)n.push(wE(t,n,m));try{await Promise.all(n)}catch{const m=await Promise.allSettled(n);for(const y of m){if(y.status!=="rejected")continue;const w=y.reason;if(yt(w))throw w;rt(w)?a??(a=w):l??(l=w)}if(l!==void 0)throw l}const u=a??(r&&!t.preload?r:void 0);let c=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!u&&r&&t.preload)return t.matches;if(u){const m=Py(t,u);m===void 0&&Xn();const y=t.matches[m],w=t.router.looseRoutesById[y.routeId],g=(h=t.router.options)==null?void 0:h.defaultNotFoundComponent;!w.options.notFoundComponent&&g&&(w.options.notFoundComponent=g),u.routeId=y.routeId;const x=y.routeId===t.router.routeTree.id;t.updateMatch(y.id,v=>({...v,...x?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:u},isFetching:!1})),c=m,await aa(w,["notFoundComponent"])}else if(!t.preload){const m=t.matches[0];m.globalNotFound||(p=t.router.getMatch(m.id))!=null&&p.globalNotFound&&t.updateMatch(m.id,y=>({...y,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const m=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await aa(m,["errorComponent"])}for(let m=0;m<=c;m++){const{id:y,routeId:w}=t.matches[m],g=t.router.looseRoutesById[w];try{const x=vE(t,y,g);if(x){const v=await x;t.updateMatch(y,k=>({...k,...v}))}}catch(x){console.error(`Error executing head for route ${w}:`,x)}}const f=ih(t);if(ia(f)&&await f,u)throw u;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function Ry(e,t){const n=t.map(r=>{var s,i;return(i=(s=e.options[r])==null?void 0:s.preload)==null?void 0:i.call(s)}).filter(Boolean);if(n.length!==0)return Promise.all(n)}function aa(e,t=Fl){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(r=>{const{id:s,...i}=r.options;Object.assign(e.options,i),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const n=()=>e._componentsLoaded?void 0:t===Fl?(()=>{if(e._componentsPromise===void 0){const r=Ry(e,Fl);r?e._componentsPromise=r.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():Ry(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function ob(e){var t;for(const n of Fl)if((t=e.options[n])!=null&&t.preload)return!0;return!1}const Fl=["component","errorComponent","pendingComponent","notFoundComponent"];var zr="__TSR_index",Ny="popstate",Iy="beforeunload";function bE(e){let t=e.getLocation();const n=new Set,r=o=>{t=e.getLocation(),n.forEach(a=>a({location:t,action:o}))},s=o=>{e.notifyOnIndexChange??!0?r(o):t=e.getLocation()},i=async({task:o,navigateOpts:a,...l})=>{var f,h;if((a==null?void 0:a.ignoreBlocker)??!1){o();return}const u=((f=e.getBlockers)==null?void 0:f.call(e))??[],c=l.type==="PUSH"||l.type==="REPLACE";if(typeof document<"u"&&u.length&&c)for(const p of u){const m=jc(l.path,l.state);if(await p.blockerFn({currentLocation:t,nextLocation:m,action:l.type})){(h=e.onBlocked)==null||h.call(e);return}}o()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:o=>(n.add(o),()=>{n.delete(o)}),push:(o,a,l)=>{const u=t.state[zr];a=Ay(u+1,a),i({task:()=>{e.pushState(o,a),r({type:"PUSH"})},navigateOpts:l,type:"PUSH",path:o,state:a})},replace:(o,a,l)=>{const u=t.state[zr];a=Ay(u,a),i({task:()=>{e.replaceState(o,a),r({type:"REPLACE"})},navigateOpts:l,type:"REPLACE",path:o,state:a})},go:(o,a)=>{i({task:()=>{e.go(o),s({type:"GO",index:o})},navigateOpts:a,type:"GO"})},back:o=>{i({task:()=>{e.back((o==null?void 0:o.ignoreBlocker)??!1),s({type:"BACK"})},navigateOpts:o,type:"BACK"})},forward:o=>{i({task:()=>{e.forward((o==null?void 0:o.ignoreBlocker)??!1),s({type:"FORWARD"})},navigateOpts:o,type:"FORWARD"})},canGoBack:()=>t.state[zr]!==0,createHref:o=>e.createHref(o),block:o=>{var l;if(!e.setBlockers)return()=>{};const a=((l=e.getBlockers)==null?void 0:l.call(e))??[];return e.setBlockers([...a,o]),()=>{var c,f;const u=((c=e.getBlockers)==null?void 0:c.call(e))??[];(f=e.setBlockers)==null||f.call(e,u.filter(h=>h!==o))}},flush:()=>{var o;return(o=e.flush)==null?void 0:o.call(e)},destroy:()=>{var o;return(o=e.destroy)==null?void 0:o.call(e)},notify:r}}function Ay(e,t){t||(t={});const n=Qp();return{...t,key:n,__TSR_key:n,[zr]:e}}function kE(e){var j,R;const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let s=[];const i=()=>s,o=T=>s=T,a=T=>T,l=()=>jc(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state);if(!((j=t.history.state)!=null&&j.__TSR_key)&&!((R=t.history.state)!=null&&R.key)){const T=Qp();t.history.replaceState({[zr]:0,key:T,__TSR_key:T},"")}let u=l(),c,f=!1,h=!1,p=!1,m=!1;const y=()=>u;let w,g;const x=()=>{w&&(P._ignoreSubscribers=!0,(w.isPush?t.history.pushState:t.history.replaceState)(w.state,"",w.href),P._ignoreSubscribers=!1,w=void 0,g=void 0,c=void 0)},v=(T,I,A)=>{const F=a(I);g||(c=u),u=jc(I,A),w={href:F,state:A,isPush:(w==null?void 0:w.isPush)||T==="push"},g||(g=Promise.resolve().then(()=>x()))},k=T=>{u=l(),P.notify({type:T})},S=async()=>{if(h){h=!1;return}const T=l(),I=T.state[zr]-u.state[zr],A=I===1,F=I===-1,z=!A&&!F||f;f=!1;const E=z?"GO":F?"BACK":"FORWARD",D=z?{type:"GO",index:I}:{type:F?"BACK":"FORWARD"};if(p)p=!1;else{const B=i();if(typeof document<"u"&&B.length){for(const M of B)if(await M.blockerFn({currentLocation:u,nextLocation:T,action:E})){h=!0,t.history.go(1),P.notify(D);return}}}u=l(),P.notify(D)},b=T=>{if(m){m=!1;return}let I=!1;const A=i();if(typeof document<"u"&&A.length)for(const F of A){const z=F.enableBeforeUnload??!0;if(z===!0){I=!0;break}if(typeof z=="function"&&z()===!0){I=!0;break}}if(I)return T.preventDefault(),T.returnValue=""},P=bE({getLocation:y,getLength:()=>t.history.length,pushState:(T,I)=>v("push",T,I),replaceState:(T,I)=>v("replace",T,I),back:T=>(T&&(p=!0),m=!0,t.history.back()),forward:T=>{T&&(p=!0),m=!0,t.history.forward()},go:T=>{f=!0,t.history.go(T)},createHref:T=>a(T),flush:x,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(Iy,b,{capture:!0}),t.removeEventListener(Ny,S)},onBlocked:()=>{c&&u!==c&&(u=c)},getBlockers:i,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(Iy,b,{capture:!0}),t.addEventListener(Ny,S),t.history.pushState=function(...T){const I=n.apply(t.history,T);return P._ignoreSubscribers||k("PUSH"),I},t.history.replaceState=function(...T){const I=r.apply(t.history,T);return P._ignoreSubscribers||k("REPLACE"),I},P}function _E(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function jc(e,t){const n=_E(e),r=n.indexOf("#"),s=n.indexOf("?"),i=Qp();return{href:n,pathname:n.substring(0,r>0?s>0?Math.min(r,s):r:s>0?s:n.length),hash:r>-1?n.substring(r):"",search:s>-1?n.slice(s,r===-1?void 0:r):"",state:t||{[zr]:0,key:i,__TSR_key:i}}}function Qp(){return(Math.random()+1).toString(36).substring(7)}function yi(e,t){const n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:(n==null?void 0:n.pathname)!==r.pathname,hrefChanged:(n==null?void 0:n.href)!==r.href,hashChanged:(n==null?void 0:n.hash)!==r.hash}}var SE=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{var c;const r=this.options,s=this.basepath??(r==null?void 0:r.basepath)??"/",i=this.basepath===void 0,o=r==null?void 0:r.rewrite;if(this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=Jj(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=kE()),this.origin=this.options.origin,this.origin||(window!=null&&window.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let f;this.resolvePathCache=oa(1e3),f=this.buildRouteTree(),this.setRoutes(f)}if(!this.stores&&this.latestLocation){const f=this.getStoreConfig(this);this.batch=f.batch,this.stores=pE(PE(this.latestLocation),f),sE(this)}let a=!1;const l=this.options.basepath??"/",u=this.options.rewrite;if(i||s!==l||o!==u){this.basepath=l;const f=[],h=tb(l);h&&h!=="/"&&f.push(hE({basepath:l})),u&&f.push(u),this.rewrite=f.length===0?void 0:f.length===1?f[0]:fE(f),this.history&&this.updateLatestLocation(),a=!0}a&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof((c=window.CSS)==null?void 0:c.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const n=Hj(this.routeTree,this.options.caseSensitive,(r,s)=>{r.init({originalIndex:s})});return this.options.routeMasks&&Bj(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,r)=>{const s={eventType:n,fn:r};return this.subscribers.add(s),()=>{this.subscribers.delete(s)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const s=({pathname:l,search:u,hash:c,href:f,state:h})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(l)){const g=this.options.parseSearch(u),x=this.options.stringifySearch(g);return{href:l+x+c,publicHref:l+x+c,pathname:so(l).path,external:!1,searchStr:x,search:ts(r==null?void 0:r.search,g),hash:so(c.slice(1)).path,state:Pr(r==null?void 0:r.state,h)}}const p=new URL(f,this.origin),m=sh(this.rewrite,p),y=this.options.parseSearch(m.search),w=this.options.stringifySearch(y);return m.search=w,{href:m.href.replace(m.origin,""),publicHref:f,pathname:so(m.pathname).path,external:!!this.rewrite&&m.origin!==this.origin,searchStr:w,search:ts(r==null?void 0:r.search,y),hash:so(m.hash.slice(1)).path,state:Pr(r==null?void 0:r.state,h)}},i=s(n),{__tempLocation:o,__tempKey:a}=i.state;if(o&&(!a||a===this.tempLocationKey)){const l=s(o);return l.state.key=i.state.key,l.state.__TSR_key=i.state.__TSR_key,delete l.state.__tempLocation,{...l,maskedLocation:i}}return i},this.resolvePathWithBase=(n,r)=>Xj({base:n,to:qp(r),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,s)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},s):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>jE({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(n=>{this.cancelMatch(n)}),this.stores.matchesId.get().forEach(n=>{var s;if(this.stores.pendingMatchStores.has(n))return;const r=(s=this.stores.matchStores.get(n))==null?void 0:s.get();r&&(r.status==="pending"||r.isFetching==="loader")&&this.cancelMatch(n)})},this.buildLocation=n=>{const r=(i={})=>{var T,I;const o=i._fromLocation||this.pendingBuiltLocation||this.latestLocation,a=this.matchRoutesLightweight(o);i.from;const l=i.unsafeRelative==="path"?o.pathname:i.from??a.fullPath,u=this.resolvePathWithBase(l,"."),c=a.search,f=Object.assign(Object.create(null),a.params),h=i.to?this.resolvePathWithBase(u,`${i.to}`):this.resolvePathWithBase(u,"."),p=i.params===!1||i.params===null?Object.create(null):(i.params??!0)===!0?f:Object.assign(f,Cr(i.params,f)),m=this.getMatchedRoutes(h);let y=m.matchedRoutes;if((!m.foundRoute||m.foundRoute.path!=="/"&&m.routeParams["**"])&&this.options.notFoundRoute&&(y=[...y,this.options.notFoundRoute]),Object.keys(p).length>0)for(const A of y){const F=((T=A.options.params)==null?void 0:T.stringify)??A.options.stringifyParams;if(F)try{Object.assign(p,F(p))}catch{}}const w=n.leaveParams?h:so(ky({path:h,params:p,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let g=c;if(n._includeValidateSearch&&((I=this.options.search)!=null&&I.strict)){const A={};y.forEach(F=>{if(F.options.validateSearch)try{Object.assign(A,zl(F.options.validateSearch,{...A,...g}))}catch{}}),g=A}g=EE({search:g,dest:i,destRoutes:y,_includeValidateSearch:n._includeValidateSearch}),g=ts(c,g);const x=this.options.stringifySearch(g),v=i.hash===!0?o.hash:i.hash?Cr(i.hash,o.hash):void 0,k=v?`#${v}`:"";let S=i.state===!0?o.state:i.state?Cr(i.state,o.state):{};S=Pr(o.state,S);const b=`${w}${x}${k}`;let P,j,R=!1;if(this.rewrite){const A=new URL(b,this.origin),F=nb(this.rewrite,A);P=A.href.replace(A.origin,""),F.origin!==this.origin?(j=F.href,R=!0):j=F.pathname+F.search+F.hash}else P=Oj(b),j=P;return{publicHref:j,href:P,pathname:w,search:g,searchStr:x,state:S,hash:v??"",external:R,unmaskOnReload:i.unmaskOnReload}},s=(i={},o)=>{const a=r(i);let l=o?r(o):void 0;if(!l){const u=Object.create(null);if(this.options.routeMasks){const c=$j(a.pathname,this.processedTree);if(c){Object.assign(u,c.rawParams);const{from:f,params:h,...p}=c.route,m=h===!1||h===null?Object.create(null):(h??!0)===!0?u:Object.assign(u,Cr(h,u));o={from:n.from,...p,params:m},l=r(o)}}}return l&&(a.maskedLocation=l),a};return n.mask?s(n,{from:n.from,...n.mask}):s(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:r,...s})=>{const i=()=>{const l=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];l.forEach(c=>{s.state[c]=this.latestLocation.state[c]});const u=ws(s.state,this.latestLocation.state);return l.forEach(c=>{delete s.state[c]}),u},o=Fr(this.latestLocation.href)===Fr(s.href);let a=this.commitLocationPromise;if(this.commitLocationPromise=Ti(()=>{a==null||a.resolve(),a=void 0}),o&&i())this.load();else{let{maskedLocation:l,hashScrollIntoView:u,...c}=s;l&&(c={...l,state:{...l.state,__tempKey:void 0,__tempLocation:{...c,search:c.searchStr,state:{...c.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(c.unmaskOnReload??this.options.unmaskOnReload??!1)&&(c.state.__tempKey=this.tempLocationKey)),c.state.__hashScrollIntoViewOptions=u??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[s.replace?"replace":"push"](c.publicHref,c.state,{ignoreBlocker:r})}return this.resetNextScroll=s.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:s,viewTransition:i,ignoreBlocker:o,href:a,...l}={})=>{if(a){const f=this.history.location.state.__TSR_index,h=jc(a,{__TSR_index:n?f:f+1}),p=new URL(h.pathname,this.origin);l.to=sh(this.rewrite,p).pathname,l.search=this.options.parseSearch(h.search),l.hash=h.hash.slice(1)}const u=this.buildLocation({...l,_includeValidateSearch:!0});this.pendingBuiltLocation=u;const c=this.commitLocation({...u,viewTransition:i,replace:n,resetScroll:r,hashScrollIntoView:s,ignoreBlocker:o});return Promise.resolve().then(()=>{this.pendingBuiltLocation===u&&(this.pendingBuiltLocation=void 0)}),c},this.navigate=async({to:n,reloadDocument:r,href:s,publicHref:i,...o})=>{var l,u;let a=!1;if(s)try{new URL(`${s}`),a=!0}catch{}if(a&&!r&&(r=!0),r){if(n!==void 0||!s){const f=this.buildLocation({to:n,...o});s=s??f.publicHref,i=i??f.publicHref}const c=!a&&i?i:s;if(Cc(c,this.protocolAllowlist))return Promise.resolve();if(!o.ignoreBlocker){const f=((u=(l=this.history).getBlockers)==null?void 0:u.call(l))??[];for(const h of f)if(h!=null&&h.blockerFn&&await h.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return o.replace?window.location.replace(c):window.location.href=c,Promise.resolve()}return this.buildAndCommitLocation({...o,href:s,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation),r=this.stores.cachedMatches.get().filter(s=>!n.some(i=>i.id===s.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(n),this.stores.setCached(r)})},this.load=async n=>{let r,s,i;const o=this.stores.resolvedLocation.get()??this.stores.location.get();for(i=new Promise(l=>{this.startTransition(async()=>{var u;try{this.beforeLoad();const c=this.latestLocation,f=yi(c,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...f}),this.emit({type:"onBeforeLoad",...f}),await Ty({router:this,sync:n==null?void 0:n.sync,forceStaleReload:o.href===c.href,matches:this.stores.pendingMatches.get(),location:c,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{var w,g;let h=null,p=null,m=null,y=null;this.batch(()=>{const x=this.stores.pendingMatches.get(),v=x.length,k=this.stores.matches.get();h=v?k.filter(P=>!this.stores.pendingMatchStores.has(P.id)):null;const S=new Set;for(const P of this.stores.pendingMatchStores.values())P.routeId&&S.add(P.routeId);const b=new Set;for(const P of this.stores.matchStores.values())P.routeId&&b.add(P.routeId);p=v?k.filter(P=>!S.has(P.routeId)):null,m=v?x.filter(P=>!b.has(P.routeId)):null,y=v?x.filter(P=>b.has(P.routeId)):k,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),v&&(this.stores.setMatches(x),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...h.filter(P=>P.status!=="error"&&P.status!=="notFound"&&P.status!=="redirected")]),this.clearExpiredCache())});for(const[x,v]of[[p,"onLeave"],[m,"onEnter"],[y,"onStay"]])if(x)for(const k of x)(g=(w=this.looseRoutesById[k.routeId].options)[v])==null||g.call(w,k)})})}})}catch(c){yt(c)?(r=c,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):rt(c)&&(s=c);const f=r?r.status:s?404:this.stores.matches.get().some(h=>h.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(f),this.stores.redirect.set(r)})}this.latestLoadPromise===i&&((u=this.commitLocationPromise)==null||u.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),l()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let a;this.hasNotFoundMatch()?a=404:this.stores.matches.get().some(l=>l.status==="error")&&(a=500),a!==void 0&&this.stores.statusCode.set(a)},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let s;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const i=this.latestLocation,o=this.stores.resolvedLocation.get(),a=typeof r.types=="function"?r.types(yi(i,o)):r.types;if(a===!1){n();return}s={update:n,types:a}}else s=n;document.startViewTransition(s)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const s=this.stores.pendingMatchStores.get(n);if(s){s.set(r);return}const i=this.stores.matchStores.get(n);if(i){i.set(r);return}const o=this.stores.cachedMatchStores.get(n);if(o){const a=r(o.get());a.status==="redirected"?this.stores.cachedMatchStores.delete(n)&&this.stores.cachedIds.set(l=>l.filter(u=>u!==n)):o.set(a)}})},this.getMatch=n=>{var r,s,i;return((r=this.stores.cachedMatchStores.get(n))==null?void 0:r.get())??((s=this.stores.pendingMatchStores.get(n))==null?void 0:s.get())??((i=this.stores.matchStores.get(n))==null?void 0:i.get())},this.invalidate=n=>{const r=s=>{var i;return((i=n==null?void 0:n.filter)==null?void 0:i.call(n,s))??!0?{...s,invalid:!0,...n!=null&&n.forcePending||s.status==="error"||s.status==="notFound"?{status:"pending",error:void 0}:void 0}:s};return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(r)),this.stores.setCached(this.stores.cachedMatches.get().map(r)),this.stores.setPending(this.stores.pendingMatches.get().map(r))}),this.shouldViewTransition=!1,this.load({sync:n==null?void 0:n.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const r=n.headers.get("Location");if(!n.options.href||n.options._builtLocation){const s=n.options._builtLocation??this.buildLocation(n.options),i=this.getParsedLocationHref(s);n.options.href=i,n.headers.set("Location",i)}else if(r)try{const s=new URL(r);if(this.origin&&s.origin===this.origin){const i=s.pathname+s.search+s.hash;n.options.href=i,n.headers.set("Location",i)}}catch{}if(n.options.href&&!n.options._builtLocation&&Cc(n.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n==null?void 0:n.filter;r!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(s=>!r(s))):this.stores.setCached([])},this.clearExpiredCache=()=>{const n=Date.now(),r=s=>{const i=this.looseRoutesById[s.routeId];if(!i.options.loader)return!0;const o=(s.preload?i.options.preloadGcTime??this.options.defaultPreloadGcTime:i.options.gcTime??this.options.defaultGcTime)??300*1e3;return s.status==="error"?!0:n-s.updatedAt>=o};this.clearCache({filter:r})},this.loadRouteChunk=aa,this.preloadRoute=async n=>{const r=n._builtLocation??this.buildLocation(n);let s=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const i=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),o=new Set([...i,...this.stores.cachedIds.get()]),a=s.filter(l=>!o.has(l.id));if(a.length){const l=this.stores.cachedMatches.get();this.stores.setCached([...l,...a])}try{return s=await Ty({router:this,matches:s,location:r,preload:!0,updateMatch:(l,u)=>{i.has(l)?s=s.map(c=>c.id===l?u(c):c):this.updateMatch(l,u)}}),s}catch(l){if(yt(l))return l.options.reloadDocument?void 0:await this.preloadRoute({...l.options,_fromLocation:r});rt(l)||console.error(l);return}},this.matchRoute=(n,r)=>{const s={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},i=this.buildLocation(s);if(r!=null&&r.pending&&this.stores.status.get()!=="pending")return!1;const o=((r==null?void 0:r.pending)===void 0?!this.stores.isLoading.get():r.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),a=Vj(i.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,o.pathname,this.processedTree);return!a||n.params&&!ws(a.rawParams,n.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?ws(o.search,i.search,{partial:!0})?a.rawParams:!1:a.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(n=>n.status==="notFound"||n.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??lE,parseSearch:e.parseSearch??aE,protocolAllowlist:e.protocolAllowlist??Dj}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}get looseRoutesById(){return this.routesById}getParentContext(e){return e!=null&&e.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){var f,h;const n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:s,parsedParams:i}=n;let{matchedRoutes:o}=n,a=!1;(r?r.path!=="/"&&s["**"]:Fr(e.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:a=!0);const l=a?RE(this.options.notFoundMode,o):void 0,u=new Array(o.length),c=new Map;for(const p of this.stores.matchStores.values())p.routeId&&c.set(p.routeId,p.get());for(let p=0;p<o.length;p++){const m=o[p],y=u[p-1];let w,g,x;{const E=(y==null?void 0:y.search)??e.search,D=(y==null?void 0:y._strictSearch)??void 0;try{const B=zl(m.options.validateSearch,{...E})??void 0;w={...E,...B},g={...D,...B},x=void 0}catch(B){let M=B;if(B instanceof Ec||(M=new Ec(B.message,{cause:B})),t!=null&&t.throwOnError)throw M;w=E,g={},x=M}}const v=((h=(f=m.options).loaderDeps)==null?void 0:h.call(f,{search:w}))??"",k=v?JSON.stringify(v):"",{interpolatedPath:S,usedParams:b}=ky({path:m.fullPath,params:s,decoder:this.pathParamsDecoder,server:this.isServer}),P=m.id+S+k,j=this.getMatch(P),R=c.get(m.id),T=(j==null?void 0:j._strictParams)??b;let I;if(!j)try{My(m,b,i,T)}catch(E){if(rt(E)||yt(E)?I=E:I=new CE(E.message,{cause:E}),t!=null&&t.throwOnError)throw I}Object.assign(s,T);const A=R?"stay":"enter";let F;if(j)F={...j,cause:A,params:(R==null?void 0:R.params)??s,_strictParams:T,search:ts(R?R.search:j.search,w),_strictSearch:g};else{const E=m.options.loader||m.options.beforeLoad||m.lazyFn||ob(m)?"pending":"success";F={id:P,ssr:m.options.ssr,index:p,routeId:m.id,params:(R==null?void 0:R.params)??s,_strictParams:T,pathname:S,updatedAt:Date.now(),search:R?ts(R.search,w):w,_strictSearch:g,searchError:void 0,status:E,isFetching:!1,error:void 0,paramsError:I,__routeContext:void 0,_nonReactive:{loadPromise:Ti()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:A,loaderDeps:R?Pr(R.loaderDeps,v):v,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:m.options.staticData||{},fullPath:m.fullPath}}t!=null&&t.preload||(F.globalNotFound=l===m.id),F.searchError=x;const z=this.getParentContext(y);F.context={...z,...F.__routeContext,...F.__beforeLoadContext},u[p]=F}for(let p=0;p<u.length;p++){const m=u[p],y=this.looseRoutesById[m.routeId],w=this.getMatch(m.id),g=c.get(m.routeId);if(m.params=g?ts(g.params,s):s,!w){const x=u[p-1],v=this.getParentContext(x);if(y.options.context){const k={deps:m.loaderDeps,params:m.params,context:v??{},location:e,navigate:S=>this.navigate({...S,_fromLocation:e}),buildLocation:this.buildLocation,cause:m.cause,abortController:m.abortController,preload:!!m.preload,matches:u,routeId:y.id};m.__routeContext=y.options.context(k)??void 0}m.context={...v,...m.__routeContext,...m.__beforeLoadContext}}}return u}matchRoutesLightweight(e){var c;const{matchedRoutes:t,routeParams:n,parsedParams:r}=this.getMatchedRoutes(e.pathname),s=sa(t),i={...e.search};for(const f of t)try{Object.assign(i,zl(f.options.validateSearch,i))}catch{}const o=sa(this.stores.matchesId.get()),a=o&&((c=this.stores.matchStores.get(o))==null?void 0:c.get()),l=a&&a.routeId===s.id&&a.pathname===e.pathname;let u;if(l)u=a.params;else{const f=Object.assign(Object.create(null),n);for(const h of t)try{My(h,n,r??{},f)}catch{}u=f}return{matchedRoutes:t,fullPath:s.fullPath,search:i,params:u}}},Ec=class extends Error{},CE=class extends Error{};function PE(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function zl(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Ec("Async validation not supported");if(n.issues)throw new Ec(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function jE({pathname:e,routesById:t,processedTree:n}){const r=Object.create(null),s=Fr(e);let i,o;const a=Uj(s,n,!0);return a&&(i=a.route,Object.assign(r,a.rawParams),o=Object.assign(Object.create(null),a.parsedParams)),{matchedRoutes:(a==null?void 0:a.branch)||[t.__root__],routeParams:r,foundRoute:i,parsedParams:o}}function EE({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return TE(n)(e,t,r??!1)}function TE(e){var s;const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const i of e){if("search"in i.options)(s=i.options.search)!=null&&s.middlewares&&t.middlewares.push(...i.options.search.middlewares);else if(i.options.preSearchFilters||i.options.postSearchFilters){const o=({search:a,next:l})=>{let u=a;"preSearchFilters"in i.options&&i.options.preSearchFilters&&(u=i.options.preSearchFilters.reduce((f,h)=>h(f),a));const c=l(u);return"postSearchFilters"in i.options&&i.options.postSearchFilters?i.options.postSearchFilters.reduce((f,h)=>h(f),c):c};t.middlewares.push(o)}if(i.options.validateSearch){const o=({search:a,next:l})=>{const u=l(a);if(!t._includeValidateSearch)return u;try{return{...u,...zl(i.options.validateSearch,u)??void 0}}catch{return u}};t.middlewares.push(o)}}const n=({search:i})=>{const o=t.dest;return o.search?o.search===!0?i:Cr(o.search,i):{}};t.middlewares.push(n);const r=(i,o,a)=>{if(i>=a.length)return o;const l=a[i];return l({search:o,next:c=>r(i+1,c,a)})};return function(o,a,l){return t.dest=a,t._includeValidateSearch=l,r(0,o,t.middlewares)}}function RE(e,t){if(e!=="root")for(let n=t.length-1;n>=0;n--){const r=t[n];if(r.children)return r.id}return bs}function My(e,t,n,r){var i;const s=((i=e.options.params)==null?void 0:i.parse)??e.options.parseParams;if(s)if(e.options.skipRouteOnParseError)for(const o in t)o in n&&(r[o]=n[o]);else{const o=s(r);Object.assign(r,o)}}const NE="Error preloading route! ☝️";var ab=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=t=>{var l,u;this.originalIndex=t.originalIndex;const n=this.options,r=!(n!=null&&n.path)&&!(n!=null&&n.id);this.parentRoute=(u=(l=this.options).getParentRoute)==null?void 0:u.call(l),r?this._path=bs:this.parentRoute||Xn();let s=r?bs:n==null?void 0:n.path;s&&s!=="/"&&(s=eb(s));const i=(n==null?void 0:n.id)||s;let o=r?bs:Ol([this.parentRoute.id==="__root__"?"":this.parentRoute.id,i]);s==="__root__"&&(s="/"),o!=="__root__"&&(o=Ol(["/",o]));const a=o==="__root__"?"/":Ol([this.parentRoute.fullPath,s]);this._path=s,this._id=o,this._fullPath=a,this._to=Fr(a)},this.addChildren=t=>this._addFileChildren(t),this._addFileChildren=t=>(Array.isArray(t)&&(this.children=t),typeof t=="object"&&t!==null&&(this.children=Object.values(t)),this),this._addFileTypes=()=>this,this.updateLoader=t=>(Object.assign(this.options,t),this),this.update=t=>(Object.assign(this.options,t),this),this.lazy=t=>(this.lazyFn=t,this),this.redirect=t=>dE({from:this.fullPath,...t}),this.options=e||{},this.isRoot=!(e!=null&&e.getParentRoute),e!=null&&e.id&&(e!=null&&e.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},IE=class extends ab{constructor(e){super(e)}};function AE(e){if(typeof document<"u"&&document.querySelector){const t=e.stores.location.get(),n=t.state.__hashScrollIntoViewOptions??!0;if(n&&t.hash!==""){const r=document.getElementById(t.hash);r&&r.scrollIntoView(n)}}}function Yp(e){const t=e.errorComponent??Xp;return d.jsx(ME,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?_.createElement(t,{error:n,reset:r}):e.children})}var ME=class extends _.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){const n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function Xp({error:e}){const[t,n]=_.useState(!1);return d.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[d.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[d.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),d.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),d.jsx("div",{style:{height:".25rem"}}),t?d.jsx("div",{children:d.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?d.jsx("code",{children:e.message}):null})}):null]})}function LE({children:e,fallback:t=null}){return lb()?d.jsx(wi.Fragment,{children:e}):d.jsx(wi.Fragment,{children:t})}function lb(){return wi.useSyncExternalStore(DE,()=>!0,()=>!1)}function DE(){return()=>{}}var cb=_.createContext(null);function zt(e){return _.useContext(cb)}var pu=_.createContext(void 0),OE=_.createContext(void 0),_e=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(_e||{});function FE({update:e,notify:t,unwatched:n}){return{link:r,unlink:s,propagate:i,checkDirty:o,shallowPropagate:a};function r(u,c,f){const h=c.depsTail;if(h!==void 0&&h.dep===u)return;const p=h!==void 0?h.nextDep:c.deps;if(p!==void 0&&p.dep===u){p.version=f,c.depsTail=p;return}const m=u.subsTail;if(m!==void 0&&m.version===f&&m.sub===c)return;const y=c.depsTail=u.subsTail={version:f,dep:u,sub:c,prevDep:h,nextDep:p,prevSub:m,nextSub:void 0};p!==void 0&&(p.prevDep=y),h!==void 0?h.nextDep=y:c.deps=y,m!==void 0?m.nextSub=y:u.subs=y}function s(u,c=u.sub){const f=u.dep,h=u.prevDep,p=u.nextDep,m=u.nextSub,y=u.prevSub;return p!==void 0?p.prevDep=h:c.depsTail=h,h!==void 0?h.nextDep=p:c.deps=p,m!==void 0?m.prevSub=y:f.subsTail=y,y!==void 0?y.nextSub=m:(f.subs=m)===void 0&&n(f),p}function i(u){let c=u.nextSub,f;e:do{const h=u.sub;let p=h.flags;if(p&60?p&12?p&4?!(p&48)&&l(u,h)?(h.flags=p|40,p&=1):p=0:h.flags=p&-9|32:p=0:h.flags=p|32,p&2&&t(h),p&1){const m=h.subs;if(m!==void 0){const y=(u=m).nextSub;y!==void 0&&(f={value:c,prev:f},c=y);continue}}if((u=c)!==void 0){c=u.nextSub;continue}for(;f!==void 0;)if(u=f.value,f=f.prev,u!==void 0){c=u.nextSub;continue e}break}while(!0)}function o(u,c){let f,h=0,p=!1;e:do{const m=u.dep,y=m.flags;if(c.flags&16)p=!0;else if((y&17)===17){if(e(m)){const w=m.subs;w.nextSub!==void 0&&a(w),p=!0}}else if((y&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(f={value:u,prev:f}),u=m.deps,c=m,++h;continue}if(!p){const w=u.nextDep;if(w!==void 0){u=w;continue}}for(;h--;){const w=c.subs,g=w.nextSub!==void 0;if(g?(u=f.value,f=f.prev):u=w,p){if(e(c)){g&&a(w),c=u.sub;continue}p=!1}else c.flags&=-33;c=u.sub;const x=u.nextDep;if(x!==void 0){u=x;continue e}}return p}while(!0)}function a(u){do{const c=u.sub,f=c.flags;(f&48)===32&&(c.flags=f|16,(f&6)===2&&t(c))}while((u=u.nextSub)!==void 0)}function l(u,c){let f=c.depsTail;for(;f!==void 0;){if(f===u)return!0;f=f.prevDep}return!1}}function zE(e,t,n){var i,o,a;const r=typeof e=="object",s=r?e:void 0;return{next:(i=r?e.next:e)==null?void 0:i.bind(s),error:(o=r?e.error:t)==null?void 0:o.bind(s),complete:(a=r?e.complete:n)==null?void 0:a.bind(s)}}const oh=[];let Bl=0;const{link:Ly,unlink:BE,propagate:$E,checkDirty:ub,shallowPropagate:Dy}=FE({update(e){return e._update()},notify(e){oh[ah++]=e,e.flags&=~_e.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=_e.Mutable|_e.Dirty,Tc(e))}});let nl=0,ah=0,Pn,lh=0;function db(e){try{++lh,e()}finally{--lh||fb()}}function Tc(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=BE(n,e)}function fb(){if(!(lh>0)){for(;nl<ah;){const e=oh[nl];oh[nl++]=void 0,e.notify()}nl=0,ah=0}}function Oy(e,t){const n=typeof e=="function",r=e,s={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?_e.None:_e.Mutable,get(){return Pn!==void 0&&Ly(s,Pn,Bl),s._snapshot},subscribe(i){const o=zE(i),a={current:!1},l=VE(()=>{var u;s.get(),a.current?(u=o.next)==null||u.call(o,s._snapshot):a.current=!0});return{unsubscribe:()=>{l.stop()}}},_update(i){const o=Pn,a=(t==null?void 0:t.compare)??Object.is;if(n)Pn=s,++Bl,s.depsTail=void 0;else if(i===void 0)return!1;n&&(s.flags=_e.Mutable|_e.RecursedCheck);try{const l=s._snapshot,u=typeof i=="function"?i(l):i===void 0&&n?r(l):i;return l===void 0||!a(l,u)?(s._snapshot=u,!0):!1}finally{Pn=o,n&&(s.flags&=~_e.RecursedCheck),Tc(s)}}};return n?(s.flags=_e.Mutable|_e.Dirty,s.get=function(){const i=s.flags;if(i&_e.Dirty||i&_e.Pending&&ub(s.deps,s)){if(s._update()){const o=s.subs;o!==void 0&&Dy(o)}}else i&_e.Pending&&(s.flags=i&~_e.Pending);return Pn!==void 0&&Ly(s,Pn,Bl),s._snapshot}):s.set=function(i){if(s._update(i)){const o=s.subs;o!==void 0&&($E(o),Dy(o),fb())}},s}function VE(e){const t=()=>{const r=Pn;Pn=n,++Bl,n.depsTail=void 0,n.flags=_e.Watching|_e.RecursedCheck;try{return e()}finally{Pn=r,n.flags&=~_e.RecursedCheck,Tc(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:_e.Watching|_e.RecursedCheck,notify(){const r=this.flags;r&_e.Dirty||r&_e.Pending&&ub(this.deps,this)?t():this.flags=_e.Watching},stop(){this.flags=_e.None,this.depsTail=void 0,Tc(this)}};return t(),n}var hb={exports:{}},pb={},mb={exports:{}},gb={};/**
|
|
42
|
-
* @license React
|
|
43
|
-
* use-sync-external-store-shim.production.js
|
|
44
|
-
*
|
|
45
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
46
|
-
*
|
|
47
|
-
* This source code is licensed under the MIT license found in the
|
|
48
|
-
* LICENSE file in the root directory of this source tree.
|
|
49
|
-
*/var Ri=_;function UE(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var WE=typeof Object.is=="function"?Object.is:UE,HE=Ri.useState,GE=Ri.useEffect,KE=Ri.useLayoutEffect,qE=Ri.useDebugValue;function QE(e,t){var n=t(),r=HE({inst:{value:n,getSnapshot:t}}),s=r[0].inst,i=r[1];return KE(function(){s.value=n,s.getSnapshot=t,gd(s)&&i({inst:s})},[e,n,t]),GE(function(){return gd(s)&&i({inst:s}),e(function(){gd(s)&&i({inst:s})})},[e]),qE(n),n}function gd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!WE(e,n)}catch{return!0}}function YE(e,t){return t()}var XE=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?YE:QE;gb.useSyncExternalStore=Ri.useSyncExternalStore!==void 0?Ri.useSyncExternalStore:XE;mb.exports=gb;var JE=mb.exports;/**
|
|
50
|
-
* @license React
|
|
51
|
-
* use-sync-external-store-shim/with-selector.production.js
|
|
52
|
-
*
|
|
53
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
54
|
-
*
|
|
55
|
-
* This source code is licensed under the MIT license found in the
|
|
56
|
-
* LICENSE file in the root directory of this source tree.
|
|
57
|
-
*/var mu=_,ZE=JE;function eT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var tT=typeof Object.is=="function"?Object.is:eT,nT=ZE.useSyncExternalStore,rT=mu.useRef,sT=mu.useEffect,iT=mu.useMemo,oT=mu.useDebugValue;pb.useSyncExternalStoreWithSelector=function(e,t,n,r,s){var i=rT(null);if(i.current===null){var o={hasValue:!1,value:null};i.current=o}else o=i.current;i=iT(function(){function l(p){if(!u){if(u=!0,c=p,p=r(p),s!==void 0&&o.hasValue){var m=o.value;if(s(m,p))return f=m}return f=p}if(m=f,tT(c,p))return m;var y=r(p);return s!==void 0&&s(m,y)?(c=p,m):(c=p,f=y)}var u=!1,c,f,h=n===void 0?null:n;return[function(){return l(t())},h===null?void 0:function(){return l(h())}]},[t,n,r,s]);var a=nT(e,i[0],i[1]);return sT(function(){o.hasValue=!0,o.value=a},[a]),oT(a),a};hb.exports=pb;var yb=hb.exports;const aT=Qc(yb);function lT(e,t){return e===t}function kt(e,t,n=lT){const r=_.useCallback(o=>{if(!e)return()=>{};const{unsubscribe:a}=e.subscribe(o);return a},[e]),s=_.useCallback(()=>e==null?void 0:e.get(),[e]);return yb.useSyncExternalStoreWithSelector(r,s,s,t,n)}var cT={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function Ms(e){const t=zt(),n=_.useContext(e.from?OE:pu),r=e.from??n,s=r?e.from?t.stores.getRouteMatchStore(r):t.stores.matchStores.get(r):void 0,i=_.useRef(void 0);return kt(s??cT,o=>{if((e.shouldThrow??!0)&&!o&&Xn(),o===void 0)return;const a=e.select?e.select(o):o;if(e.structuralSharing??t.options.defaultStructuralSharing){const l=Pr(i.current,a);return i.current=l,l}return a})}function xb(e){return Ms({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function vb(e){const{select:t,...n}=e;return Ms({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function Oi(e){return Ms({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function Jp(e){return Ms({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Bt(e){const t=zt();return _.useCallback(n=>t.navigate({...n,from:n.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,t])}function wb(e){return Ms({...e,select:t=>e.select?e.select(t.context):t.context})}function uT(e,t){const n=zt(),r=Nj(t),{activeProps:s,inactiveProps:i,activeOptions:o,to:a,preload:l,preloadDelay:u,preloadIntentProximity:c,hashScrollIntoView:f,replace:h,startTransition:p,resetScroll:m,viewTransition:y,children:w,target:g,disabled:x,style:v,className:k,onClick:S,onBlur:b,onFocus:P,onMouseEnter:j,onMouseLeave:R,onTouchStart:T,ignoreBlocker:I,params:A,search:F,hash:z,state:E,mask:D,reloadDocument:B,unsafeRelative:M,from:$,_fromLocation:C,...V}=e,q=lb(),N=_.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),le=kt(n.stores.location,de=>de,(de,L)=>de.href===L.href),fe=_.useMemo(()=>{const de={_fromLocation:le,...N};return n.buildLocation(de)},[n,le,N]),ue=fe.maskedLocation?fe.maskedLocation.publicHref:fe.publicHref,Pt=fe.maskedLocation?fe.maskedLocation.external:fe.external,He=_.useMemo(()=>gT(ue,Pt,n.history,x),[x,Pt,ue,n.history]),$t=_.useMemo(()=>{if(He!=null&&He.external)return Cc(He.href,n.protocolAllowlist)?void 0:He.href;if(!yT(a)&&!(typeof a!="string"||a.indexOf(":")===-1))try{return new URL(a),Cc(a,n.protocolAllowlist)?void 0:a}catch{}},[a,He,n.protocolAllowlist]),yn=_.useMemo(()=>{if($t)return!1;if(o!=null&&o.exact){if(!Yj(le.pathname,fe.pathname,n.basepath))return!1}else{const de=Pc(le.pathname,n.basepath),L=Pc(fe.pathname,n.basepath);if(!(de.startsWith(L)&&(de.length===L.length||de[L.length]==="/")))return!1}return((o==null?void 0:o.includeSearch)??!0)&&!ws(le.search,fe.search,{partial:!(o!=null&&o.exact),ignoreUndefined:!(o!=null&&o.explicitUndefined)})?!1:o!=null&&o.includeHash?q&&le.hash===fe.hash:!0},[o==null?void 0:o.exact,o==null?void 0:o.explicitUndefined,o==null?void 0:o.includeHash,o==null?void 0:o.includeSearch,le,$t,q,fe.hash,fe.pathname,fe.search,n.basepath]),On=yn?Cr(s,{})??dT:yd,Ds=yn?yd:Cr(i,{})??yd,Na=[k,On.className,Ds.className].filter(Boolean).join(" "),Ia=(v||On.style||Ds.style)&&{...v,...On.style,...Ds.style},[Aa,Gi]=_.useState(!1),Ki=_.useRef(!1),ir=e.reloadDocument||$t?!1:l??n.options.defaultPreload,Os=u??n.options.defaultPreloadDelay??0,xn=_.useCallback(()=>{n.preloadRoute({...N,_builtLocation:fe}).catch(de=>{console.warn(de),console.warn(NE)})},[n,N,fe]);Rj(r,_.useCallback(de=>{de!=null&&de.isIntersecting&&xn()},[xn]),mT,{disabled:!!x||ir!=="viewport"}),_.useEffect(()=>{Ki.current||!x&&ir==="render"&&(xn(),Ki.current=!0)},[x,xn,ir]);const Lu=de=>{const L=de.currentTarget.getAttribute("target"),H=g!==void 0?g:L;if(!x&&!xT(de)&&!de.defaultPrevented&&(!H||H==="_self")&&de.button===0){de.preventDefault(),As.flushSync(()=>{Gi(!0)});const Z=n.subscribe("onResolved",()=>{Z(),Gi(!1)});n.navigate({...N,replace:h,resetScroll:m,hashScrollIntoView:f,startTransition:p,viewTransition:y,ignoreBlocker:I})}};if($t)return{...V,ref:r,href:$t,...w&&{children:w},...g&&{target:g},...x&&{disabled:x},...v&&{style:v},...k&&{className:k},...S&&{onClick:S},...b&&{onBlur:b},...P&&{onFocus:P},...j&&{onMouseEnter:j},...R&&{onMouseLeave:R},...T&&{onTouchStart:T}};const Ma=de=>{if(x||ir!=="intent")return;if(!Os){xn();return}const L=de.currentTarget;if(ao.has(L))return;const H=setTimeout(()=>{ao.delete(L),xn()},Os);ao.set(L,H)},Du=de=>{x||ir!=="intent"||xn()},La=de=>{if(x||!ir||!Os)return;const L=de.currentTarget,H=ao.get(L);H&&(clearTimeout(H),ao.delete(L))};return{...V,...On,...Ds,href:He==null?void 0:He.href,ref:r,onClick:Bs([S,Lu]),onBlur:Bs([b,La]),onFocus:Bs([P,Ma]),onMouseEnter:Bs([j,Ma]),onMouseLeave:Bs([R,La]),onTouchStart:Bs([T,Du]),disabled:!!x,target:g,...Ia&&{style:Ia},...Na&&{className:Na},...x&&fT,...yn&&hT,...q&&Aa&&pT}}var yd={},dT={className:"active"},fT={role:"link","aria-disabled":!0},hT={"data-status":"active","aria-current":"page"},pT={"data-transitioning":"transitioning"},ao=new WeakMap,mT={rootMargin:"100px"},Bs=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function gT(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function yT(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var bb=_.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:s,...i}=uT(r,t),o=typeof r.children=="function"?r.children({isActive:i["data-status"]==="active"}):r.children;if(!n){const{disabled:a,...l}=i;return _.createElement("a",l,o)}return _.createElement(n,i,o)});function xT(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var vT=class extends ab{constructor(e){super(e),this.useMatch=t=>Ms({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>wb({...t,from:this.id}),this.useSearch=t=>Jp({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>Oi({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>vb({...t,from:this.id}),this.useLoaderData=t=>xb({...t,from:this.id}),this.useNavigate=()=>Bt({from:this.fullPath}),this.Link=wi.forwardRef((t,n)=>d.jsx(bb,{ref:n,from:this.fullPath,...t}))}};function gn(e){return new vT(e)}var wT=class extends IE{constructor(e){super(e),this.useMatch=t=>Ms({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>wb({...t,from:this.id}),this.useSearch=t=>Jp({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>Oi({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>vb({...t,from:this.id}),this.useLoaderData=t=>xb({...t,from:this.id}),this.useNavigate=()=>Bt({from:this.fullPath}),this.Link=wi.forwardRef((t,n)=>d.jsx(bb,{ref:n,from:this.fullPath,...t}))}};function bT(e){return new wT(e)}function kT(e){const t=zt(),n=`not-found-${kt(t.stores.location,r=>r.pathname)}-${kt(t.stores.status,r=>r)}`;return d.jsx(Yp,{getResetKey:()=>n,onCatch:(r,s)=>{var i;if(rt(r))(i=e.onCatch)==null||i.call(e,r,s);else throw r},errorComponent:({error:r})=>{var s;if(rt(r))return(s=e.fallback)==null?void 0:s.call(e,r);throw r},children:e.children})}function _T(){return d.jsx("p",{children:"Not Found"})}function Gs(e){return d.jsx(d.Fragment,{children:e.children})}function kb(e,t,n){return t.options.notFoundComponent?d.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?d.jsx(e.options.defaultNotFoundComponent,{...n}):d.jsx(_T,{})}function ST(e){return null}function CT(){return ST(zt()),null}var _b=_.memo(function({matchId:t}){const n=zt(),r=n.stores.matchStores.get(t);r||Xn();const s=kt(n.stores.loadedAt,o=>o),i=kt(r,o=>o);return d.jsx(PT,{router:n,matchId:t,resetKey:s,matchState:_.useMemo(()=>{var l;const o=i.routeId,a=(l=n.routesById[o].parentRoute)==null?void 0:l.id;return{routeId:o,ssr:i.ssr,_displayPending:i._displayPending,parentRouteId:a}},[i._displayPending,i.routeId,i.ssr,n.routesById])})});function PT({router:e,matchId:t,resetKey:n,matchState:r}){var m,y;const s=e.routesById[r.routeId],i=s.options.pendingComponent??e.options.defaultPendingComponent,o=i?d.jsx(i,{}):null,a=s.options.errorComponent??e.options.defaultErrorComponent,l=s.options.onCatch??e.options.defaultOnCatch,u=s.isRoot?s.options.notFoundComponent??((m=e.options.notFoundRoute)==null?void 0:m.options.component):s.options.notFoundComponent,c=r.ssr===!1||r.ssr==="data-only",f=(!s.isRoot||s.options.wrapInSuspense||c)&&(s.options.wrapInSuspense??i??(((y=s.options.errorComponent)==null?void 0:y.preload)||c))?_.Suspense:Gs,h=a?Yp:Gs,p=u?kT:Gs;return d.jsxs(s.isRoot?s.options.shellComponent??Gs:Gs,{children:[d.jsx(pu.Provider,{value:t,children:d.jsx(f,{fallback:o,children:d.jsx(h,{getResetKey:()=>n,errorComponent:a||Xp,onCatch:(w,g)=>{if(rt(w))throw w.routeId??(w.routeId=r.routeId),w;l==null||l(w,g)},children:d.jsx(p,{fallback:w=>{if(w.routeId??(w.routeId=r.routeId),!u||w.routeId&&w.routeId!==r.routeId||!w.routeId&&!s.isRoot)throw w;return _.createElement(u,w)},children:c||r._displayPending?d.jsx(LE,{fallback:o,children:d.jsx(Fy,{matchId:t})}):d.jsx(Fy,{matchId:t})})})})}),r.parentRouteId===bs?d.jsxs(d.Fragment,{children:[d.jsx(jT,{resetKey:n}),e.options.scrollRestoration&&Xw?d.jsx(CT,{}):null]}):null]})}function jT({resetKey:e}){const t=zt(),n=_.useRef(void 0);return ko(()=>{const r=t.latestLocation.href;(n.current===void 0||n.current!==r)&&(t.emit({type:"onRendered",...yi(t.stores.location.get(),t.stores.resolvedLocation.get())}),n.current=r)},[t.latestLocation.state.__TSR_key,e,t]),null}var Fy=_.memo(function({matchId:t}){const n=zt(),r=(c,f)=>{var h;return((h=n.getMatch(c.id))==null?void 0:h._nonReactive[f])??c._nonReactive[f]},s=n.stores.matchStores.get(t);s||Xn();const i=kt(s,c=>c),o=i.routeId,a=n.routesById[o],l=_.useMemo(()=>{var f;const c=(f=n.routesById[o].options.remountDeps??n.options.defaultRemountDeps)==null?void 0:f({routeId:o,loaderDeps:i.loaderDeps,params:i._strictParams,search:i._strictSearch});return c?JSON.stringify(c):void 0},[o,i.loaderDeps,i._strictParams,i._strictSearch,n.options.defaultRemountDeps,n.routesById]),u=_.useMemo(()=>{const c=a.options.component??n.options.defaultComponent;return c?d.jsx(c,{},l):d.jsx(Sb,{})},[l,a.options.component,n.options.defaultComponent]);if(i._displayPending)throw r(i,"displayPendingPromise");if(i._forcePending)throw r(i,"minPendingPromise");if(i.status==="pending"){const c=a.options.pendingMinMs??n.options.defaultPendingMinMs;if(c){const f=n.getMatch(i.id);if(f&&!f._nonReactive.minPendingPromise){const h=Ti();f._nonReactive.minPendingPromise=h,setTimeout(()=>{h.resolve(),f._nonReactive.minPendingPromise=void 0},c)}}throw r(i,"loadPromise")}if(i.status==="notFound")return rt(i.error)||Xn(),kb(n,a,i.error);if(i.status==="redirected")throw yt(i.error)||Xn(),r(i,"loadPromise");if(i.status==="error")throw i.error;return u}),Sb=_.memo(function(){const t=zt(),n=_.useContext(pu);let r,s=!1,i;{const u=n?t.stores.matchStores.get(n):void 0;[r,s]=kt(u,c=>[c==null?void 0:c.routeId,(c==null?void 0:c.globalNotFound)??!1]),i=kt(t.stores.matchesId,c=>c[c.findIndex(f=>f===n)+1])}const o=r?t.routesById[r]:void 0,a=t.options.defaultPendingComponent?d.jsx(t.options.defaultPendingComponent,{}):null;if(s)return o||Xn(),kb(t,o,void 0);if(!i)return null;const l=d.jsx(_b,{matchId:i});return r===bs?d.jsx(_.Suspense,{fallback:a,children:l}):l});function ET(){const e=zt(),t=_.useRef({router:e,mounted:!1}),[n,r]=_.useState(!1),s=kt(e.stores.isLoading,f=>f),i=kt(e.stores.hasPending,f=>f),o=cd(s),a=s||n||i,l=cd(a),u=s||i,c=cd(u);return e.startTransition=f=>{r(!0),_.startTransition(()=>{f(),r(!1)})},_.useEffect(()=>{const f=e.history.subscribe(e.load),h=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Fr(e.latestLocation.publicHref)!==Fr(h.publicHref)&&e.commitLocation({...h,replace:!0}),()=>{f()}},[e,e.history]),ko(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(h){console.error(h)}})()},[e]),ko(()=>{o&&!s&&e.emit({type:"onLoad",...yi(e.stores.location.get(),e.stores.resolvedLocation.get())})},[o,e,s]),ko(()=>{c&&!u&&e.emit({type:"onBeforeRouteMount",...yi(e.stores.location.get(),e.stores.resolvedLocation.get())})},[u,c,e]),ko(()=>{if(l&&!a){const f=yi(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...f}),db(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),f.hrefChanged&&AE(e)}},[a,l,e]),null}function TT(){const e=zt(),t=e.routesById[bs].options.pendingComponent??e.options.defaultPendingComponent,n=t?d.jsx(t,{}):null,r=d.jsxs(typeof document<"u"&&e.ssr?Gs:_.Suspense,{fallback:n,children:[d.jsx(ET,{}),d.jsx(RT,{})]});return e.options.InnerWrap?d.jsx(e.options.InnerWrap,{children:r}):r}function RT(){const e=zt(),t=kt(e.stores.firstId,s=>s),n=kt(e.stores.loadedAt,s=>s),r=t?d.jsx(_b,{matchId:t}):null;return d.jsx(pu.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:d.jsx(Yp,{getResetKey:()=>n,errorComponent:Xp,onCatch:void 0,children:r})})}var NT=e=>({createMutableStore:Oy,createReadonlyStore:Oy,batch:db}),IT=e=>new AT(e),AT=class extends SE{constructor(e){super(e,NT)}};function MT({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=d.jsx(cb.Provider,{value:e,children:t});return e.options.Wrap?d.jsx(e.options.Wrap,{children:r}):r}function LT({router:e,...t}){return d.jsx(MT,{router:e,...t,children:d.jsx(TT,{})})}function DT(e){const t=zt({warn:(e==null?void 0:e.router)===void 0}),n=(e==null?void 0:e.router)||t,r=_.useRef(void 0);return kt(n.stores.__store,s=>{if(e!=null&&e.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const i=Pr(r.current,e.select(s));return r.current=i,i}return e.select(s)}return s})}const OT="modulepreload",FT=function(e){return"/"+e},zy={},Qr=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));s=Promise.allSettled(n.map(l=>{if(l=FT(l),l in zy)return;zy[l]=!0;const u=l.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${c}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":OT,u||(f.as="script"),f.crossOrigin="",f.href=l,a&&f.setAttribute("nonce",a),document.head.appendChild(f),u)return new Promise((h,p)=>{f.addEventListener("load",h),f.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}function i(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return s.then(o=>{for(const a of o||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})};function zT(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const BT=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,$T=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,VT={};function By(e,t){return(VT.jsx?$T:BT).test(e)}const UT=/[ \t\n\f\r]/g;function WT(e){return typeof e=="object"?e.type==="text"?$y(e.value):!1:$y(e)}function $y(e){return e.replace(UT,"")===""}class xa{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}xa.prototype.normal={};xa.prototype.property={};xa.prototype.space=void 0;function Cb(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new xa(n,r,t)}function ch(e){return e.toLowerCase()}class Ct{constructor(t,n){this.attribute=n,this.property=t}}Ct.prototype.attribute="";Ct.prototype.booleanish=!1;Ct.prototype.boolean=!1;Ct.prototype.commaOrSpaceSeparated=!1;Ct.prototype.commaSeparated=!1;Ct.prototype.defined=!1;Ct.prototype.mustUseProperty=!1;Ct.prototype.number=!1;Ct.prototype.overloadedBoolean=!1;Ct.prototype.property="";Ct.prototype.spaceSeparated=!1;Ct.prototype.space=void 0;let HT=0;const ee=Ls(),De=Ls(),uh=Ls(),W=Ls(),pe=Ls(),_s=Ls(),Rt=Ls();function Ls(){return 2**++HT}const dh=Object.freeze(Object.defineProperty({__proto__:null,boolean:ee,booleanish:De,commaOrSpaceSeparated:Rt,commaSeparated:_s,number:W,overloadedBoolean:uh,spaceSeparated:pe},Symbol.toStringTag,{value:"Module"})),xd=Object.keys(dh);class Zp extends Ct{constructor(t,n,r,s){let i=-1;if(super(t,n),Vy(this,"space",s),typeof r=="number")for(;++i<xd.length;){const o=xd[i];Vy(this,xd[i],(r&dh[o])===dh[o])}}}Zp.prototype.defined=!0;function Vy(e,t,n){n&&(e[t]=n)}function Fi(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const i=new Zp(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[ch(r)]=r,n[ch(i.attribute)]=r}return new xa(t,n,e.space)}const Pb=Fi({properties:{ariaActiveDescendant:null,ariaAtomic:De,ariaAutoComplete:null,ariaBusy:De,ariaChecked:De,ariaColCount:W,ariaColIndex:W,ariaColSpan:W,ariaControls:pe,ariaCurrent:null,ariaDescribedBy:pe,ariaDetails:null,ariaDisabled:De,ariaDropEffect:pe,ariaErrorMessage:null,ariaExpanded:De,ariaFlowTo:pe,ariaGrabbed:De,ariaHasPopup:null,ariaHidden:De,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:pe,ariaLevel:W,ariaLive:null,ariaModal:De,ariaMultiLine:De,ariaMultiSelectable:De,ariaOrientation:null,ariaOwns:pe,ariaPlaceholder:null,ariaPosInSet:W,ariaPressed:De,ariaReadOnly:De,ariaRelevant:null,ariaRequired:De,ariaRoleDescription:pe,ariaRowCount:W,ariaRowIndex:W,ariaRowSpan:W,ariaSelected:De,ariaSetSize:W,ariaSort:null,ariaValueMax:W,ariaValueMin:W,ariaValueNow:W,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function jb(e,t){return t in e?e[t]:t}function Eb(e,t){return jb(e,t.toLowerCase())}const GT=Fi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:_s,acceptCharset:pe,accessKey:pe,action:null,allow:null,allowFullScreen:ee,allowPaymentRequest:ee,allowUserMedia:ee,alpha:ee,alt:null,as:null,async:ee,autoCapitalize:null,autoComplete:pe,autoFocus:ee,autoPlay:ee,blocking:pe,capture:null,charSet:null,checked:ee,cite:null,className:pe,closedBy:null,colorSpace:null,cols:W,colSpan:W,command:null,commandFor:null,content:null,contentEditable:De,controls:ee,controlsList:pe,coords:W|_s,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ee,defer:ee,dir:null,dirName:null,disabled:ee,download:uh,draggable:De,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ee,formTarget:null,headers:pe,height:W,hidden:uh,high:W,href:null,hrefLang:null,htmlFor:pe,httpEquiv:pe,id:null,imageSizes:null,imageSrcSet:null,inert:ee,inputMode:null,integrity:null,is:null,isMap:ee,itemId:null,itemProp:pe,itemRef:pe,itemScope:ee,itemType:pe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ee,low:W,manifest:null,max:null,maxLength:W,media:null,method:null,min:null,minLength:W,multiple:ee,muted:ee,name:null,nonce:null,noModule:ee,noValidate:ee,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:ee,optimum:W,pattern:null,ping:pe,placeholder:null,playsInline:ee,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ee,referrerPolicy:null,rel:pe,required:ee,reversed:ee,rows:W,rowSpan:W,sandbox:pe,scope:null,scoped:ee,seamless:ee,selected:ee,shadowRootClonable:ee,shadowRootCustomElementRegistry:ee,shadowRootDelegatesFocus:ee,shadowRootMode:null,shadowRootSerializable:ee,shape:null,size:W,sizes:null,slot:null,span:W,spellCheck:De,src:null,srcDoc:null,srcLang:null,srcSet:null,start:W,step:null,style:null,tabIndex:W,target:null,title:null,translate:null,type:null,typeMustMatch:ee,useMap:null,value:De,width:W,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:pe,axis:null,background:null,bgColor:null,border:W,borderColor:null,bottomMargin:W,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ee,declare:ee,event:null,face:null,frame:null,frameBorder:null,hSpace:W,leftMargin:W,link:null,longDesc:null,lowSrc:null,marginHeight:W,marginWidth:W,noResize:ee,noHref:ee,noShade:ee,noWrap:ee,object:null,profile:null,prompt:null,rev:null,rightMargin:W,rules:null,scheme:null,scrolling:De,standby:null,summary:null,text:null,topMargin:W,valueType:null,version:null,vAlign:null,vLink:null,vSpace:W,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:ee,disablePictureInPicture:ee,disableRemotePlayback:ee,exportParts:_s,part:pe,prefix:null,property:null,results:W,security:null,unselectable:null},space:"html",transform:Eb}),KT=Fi({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",maskType:"mask-type",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:Rt,accentHeight:W,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:W,amplitude:W,arabicForm:null,ascent:W,attributeName:null,attributeType:null,azimuth:W,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:W,by:null,calcMode:null,capHeight:W,className:pe,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:W,diffuseConstant:W,direction:null,display:null,dur:null,divisor:W,dominantBaseline:null,download:ee,dx:null,dy:null,edgeMode:null,editable:null,elevation:W,enableBackground:null,end:null,event:null,exponent:W,externalResourcesRequired:null,fill:null,fillOpacity:W,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:_s,g2:_s,glyphName:_s,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:W,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:W,horizOriginX:W,horizOriginY:W,id:null,ideographic:W,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:W,k:W,k1:W,k2:W,k3:W,k4:W,kernelMatrix:Rt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:W,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:W,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:W,overlineThickness:W,paintOrder:null,panose1:null,path:null,pathLength:W,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:pe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:W,pointsAtY:W,pointsAtZ:W,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Rt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Rt,rev:Rt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Rt,requiredFeatures:Rt,requiredFonts:Rt,requiredFormats:Rt,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:W,specularExponent:W,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:W,strikethroughThickness:W,string:null,stroke:null,strokeDashArray:Rt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:W,strokeOpacity:W,strokeWidth:null,style:null,surfaceScale:W,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Rt,tabIndex:W,tableValues:null,target:null,targetX:W,targetY:W,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Rt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:W,underlineThickness:W,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:W,values:null,vAlphabetic:W,vMathematical:W,vectorEffect:null,vHanging:W,vIdeographic:W,version:null,vertAdvY:W,vertOriginX:W,vertOriginY:W,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:W,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:jb}),Tb=Fi({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Rb=Fi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Eb}),Nb=Fi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),qT={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"},QT=/[A-Z]/g,Uy=/-[a-z]/g,YT=/^data[-\w.:]+$/i;function XT(e,t){const n=ch(t);let r=t,s=Ct;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&YT.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(Uy,ZT);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!Uy.test(i)){let o=i.replace(QT,JT);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}s=Zp}return new s(r,t)}function JT(e){return"-"+e.toLowerCase()}function ZT(e){return e.charAt(1).toUpperCase()}const e2=Cb([Pb,GT,Tb,Rb,Nb],"html"),em=Cb([Pb,KT,Tb,Rb,Nb],"svg");function t2(e){return e.join(" ").trim()}var tm={},Wy=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n2=/\n/g,r2=/^\s*/,s2=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i2=/^:\s*/,o2=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a2=/^[;\s]*/,l2=/^\s+|\s+$/g,c2=`
|
|
58
|
-
`,Hy="/",Gy="*",ds="",u2="comment",d2="declaration";function f2(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function s(m){var y=m.match(n2);y&&(n+=y.length);var w=m.lastIndexOf(c2);r=~w?m.length-w:r+m.length}function i(){var m={line:n,column:r};return function(y){return y.position=new o(m),u(),y}}function o(m){this.start=m,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function a(m){var y=new Error(t.source+":"+n+":"+r+": "+m);if(y.reason=m,y.filename=t.source,y.line=n,y.column=r,y.source=e,!t.silent)throw y}function l(m){var y=m.exec(e);if(y){var w=y[0];return s(w),e=e.slice(w.length),y}}function u(){l(r2)}function c(m){var y;for(m=m||[];y=f();)y!==!1&&m.push(y);return m}function f(){var m=i();if(!(Hy!=e.charAt(0)||Gy!=e.charAt(1))){for(var y=2;ds!=e.charAt(y)&&(Gy!=e.charAt(y)||Hy!=e.charAt(y+1));)++y;if(y+=2,ds===e.charAt(y-1))return a("End of comment missing");var w=e.slice(2,y-2);return r+=2,s(w),e=e.slice(y),r+=2,m({type:u2,comment:w})}}function h(){var m=i(),y=l(s2);if(y){if(f(),!l(i2))return a("property missing ':'");var w=l(o2),g=m({type:d2,property:Ky(y[0].replace(Wy,ds)),value:w?Ky(w[0].replace(Wy,ds)):ds});return l(a2),g}}function p(){var m=[];c(m);for(var y;y=h();)y!==!1&&(m.push(y),c(m));return m}return u(),p()}function Ky(e){return e?e.replace(l2,ds):ds}var h2=f2,p2=ec&&ec.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tm,"__esModule",{value:!0});tm.default=g2;const m2=p2(h2);function g2(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,m2.default)(e),s=typeof t=="function";return r.forEach(i=>{if(i.type!=="declaration")return;const{property:o,value:a}=i;s?t(o,a,i):a&&(n=n||{},n[o]=a)}),n}var gu={};Object.defineProperty(gu,"__esModule",{value:!0});gu.camelCase=void 0;var y2=/^--[a-zA-Z0-9_-]+$/,x2=/-([a-z])/g,v2=/^[^-]+$/,w2=/^-(webkit|moz|ms|o|khtml)-/,b2=/^-(ms)-/,k2=function(e){return!e||v2.test(e)||y2.test(e)},_2=function(e,t){return t.toUpperCase()},qy=function(e,t){return"".concat(t,"-")},S2=function(e,t){return t===void 0&&(t={}),k2(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(b2,qy):e=e.replace(w2,qy),e.replace(x2,_2))};gu.camelCase=S2;var C2=ec&&ec.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},P2=C2(tm),j2=gu;function fh(e,t){var n={};return!e||typeof e!="string"||(0,P2.default)(e,function(r,s){r&&s&&(n[(0,j2.camelCase)(r,t)]=s)}),n}fh.default=fh;var E2=fh;const T2=Qc(E2),Ib=Ab("end"),nm=Ab("start");function Ab(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function R2(e){const t=nm(e),n=Ib(e);if(t&&n)return{start:t,end:n}}function Ao(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Qy(e.position):"start"in e||"end"in e?Qy(e):"line"in e||"column"in e?hh(e):""}function hh(e){return Yy(e&&e.line)+":"+Yy(e&&e.column)}function Qy(e){return hh(e&&e.start)+"-"+hh(e&&e.end)}function Yy(e){return e&&typeof e=="number"?e:1}class ot extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let s="",i={},o=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?s=t:!i.cause&&t&&(o=!0,s=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?i.ruleId=r:(i.source=r.slice(0,l),i.ruleId=r.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}const a=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=a?a.line:void 0,this.name=Ao(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=o&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ot.prototype.file="";ot.prototype.name="";ot.prototype.reason="";ot.prototype.message="";ot.prototype.stack="";ot.prototype.column=void 0;ot.prototype.line=void 0;ot.prototype.ancestors=void 0;ot.prototype.cause=void 0;ot.prototype.fatal=void 0;ot.prototype.place=void 0;ot.prototype.ruleId=void 0;ot.prototype.source=void 0;const rm={}.hasOwnProperty,N2=new Map,I2=/[A-Z]/g,A2=new Set(["table","tbody","thead","tfoot","tr"]),M2=new Set(["td","th"]),Mb="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function L2(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=U2(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=V2(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?em:e2,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=Lb(s,e,void 0);return i&&typeof i!="string"?i:s.create(e,s.Fragment,{children:i||void 0},void 0)}function Lb(e,t,n){if(t.type==="element")return D2(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return O2(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return z2(e,t,n);if(t.type==="mdxjsEsm")return F2(e,t);if(t.type==="root")return B2(e,t,n);if(t.type==="text")return $2(e,t)}function D2(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=em,e.schema=s),e.ancestors.push(t);const i=Ob(e,t.tagName,!1),o=W2(e,t);let a=im(e,t);return A2.has(t.tagName)&&(a=a.filter(function(l){return typeof l=="string"?!WT(l):!0})),Db(e,o,i,t),sm(o,a),e.ancestors.pop(),e.schema=r,e.create(t,i,o,n)}function O2(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}la(e,t.position)}function F2(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);la(e,t.position)}function z2(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=em,e.schema=s),e.ancestors.push(t);const i=t.name===null?e.Fragment:Ob(e,t.name,!0),o=H2(e,t),a=im(e,t);return Db(e,o,i,t),sm(o,a),e.ancestors.pop(),e.schema=r,e.create(t,i,o,n)}function B2(e,t,n){const r={};return sm(r,im(e,t)),e.create(t,e.Fragment,r,n)}function $2(e,t){return t.value}function Db(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function sm(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function V2(e,t,n){return r;function r(s,i,o,a){const u=Array.isArray(o.children)?n:t;return a?u(i,o,a):u(i,o)}}function U2(e,t){return n;function n(r,s,i,o){const a=Array.isArray(i.children),l=nm(r);return t(s,i,o,a,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function W2(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&rm.call(t.properties,s)){const i=G2(e,s,t.properties[s]);if(i){const[o,a]=i;e.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&M2.has(t.tagName)?r=a:n[o]=a}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function H2(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const o=i.expression;o.type;const a=o.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else la(e,t.position);else{const s=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,i=e.evaluater.evaluateExpression(a.expression)}else la(e,t.position);else i=r.value===null?!0:r.value;n[s]=i}return n}function im(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:N2;for(;++r<t.children.length;){const i=t.children[r];let o;if(e.passKeys){const l=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(l){const u=s.get(l)||0;o=l+"-"+u,s.set(l,u+1)}}const a=Lb(e,i,o);a!==void 0&&n.push(a)}return n}function G2(e,t,n){const r=XT(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?zT(n):t2(n)),r.property==="style"){let s=typeof n=="object"?n:K2(e,String(n));return e.stylePropertyNameCase==="css"&&(s=q2(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?qT[r.property]||r.property:r.attribute,n]}}function K2(e,t){try{return T2(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new ot("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=Mb+"#cannot-parse-style-attribute",s}}function Ob(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let i=-1,o;for(;++i<s.length;){const a=By(s[i])?{type:"Identifier",name:s[i]}:{type:"Literal",value:s[i]};o=o?{type:"MemberExpression",object:o,property:a,computed:!!(i&&a.type==="Literal"),optional:!1}:a}r=o}else r=By(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return rm.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);la(e)}function la(e,t){const n=new ot("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Mb+"#cannot-handle-mdx-estrees-without-createevaluater",n}function q2(e){const t={};let n;for(n in e)rm.call(e,n)&&(t[Q2(n)]=e[n]);return t}function Q2(e){let t=e.replace(I2,Y2);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Y2(e){return"-"+e.toLowerCase()}const vd={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"]},X2={};function J2(e,t){const n=X2,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Fb(e,r,s)}function Fb(e,t,n){if(Z2(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Xy(e.children,t,n)}return Array.isArray(e)?Xy(e,t,n):""}function Xy(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=Fb(e[s],t,n);return r.join("")}function Z2(e){return!!(e&&typeof e=="object")}const Jy=document.createElement("i");function om(e){const t="&"+e+";";Jy.innerHTML=t;const n=Jy.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Mn(e,t,n,r){const s=e.length;let i=0,o;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);i<r.length;)o=r.slice(i,i+1e4),o.unshift(t,0),e.splice(...o),i+=1e4,t+=1e4}function Kt(e,t){return e.length>0?(Mn(e,e.length,0,t),e):t}const Zy={}.hasOwnProperty;function eR(e){const t={};let n=-1;for(;++n<e.length;)tR(t,e[n]);return t}function tR(e,t){let n;for(n in t){const s=(Zy.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let o;if(i)for(o in i){Zy.call(s,o)||(s[o]=[]);const a=i[o];nR(s[o],Array.isArray(a)?a:a?[a]:[])}}}function nR(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Mn(e,0,0,r)}function zb(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function xi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Tn=Yr(/[A-Za-z]/),At=Yr(/[\dA-Za-z]/),rR=Yr(/[#-'*+\--9=?A-Z^-~]/);function ph(e){return e!==null&&(e<32||e===127)}const mh=Yr(/\d/),sR=Yr(/[\dA-Fa-f]/),iR=Yr(/[!-/:-@[-`{-~]/);function J(e){return e!==null&&e<-2}function bt(e){return e!==null&&(e<0||e===32)}function ae(e){return e===-2||e===-1||e===32}const oR=Yr(new RegExp("\\p{P}|\\p{S}","u")),aR=Yr(/\s/);function Yr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function zi(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const i=e.charCodeAt(n);let o="";if(i===37&&At(e.charCodeAt(n+1))&&At(e.charCodeAt(n+2)))s=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(o=String.fromCharCode(i));else if(i>55295&&i<57344){const a=e.charCodeAt(n+1);i<56320&&a>56319&&a<57344?(o=String.fromCharCode(i,a),s=1):o="�"}else o=String.fromCharCode(i);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+s+1,o=""),s&&(n+=s,s=0)}return t.join("")+e.slice(r)}function ve(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let i=0;return o;function o(l){return ae(l)?(e.enter(n),a(l)):t(l)}function a(l){return ae(l)&&i++<s?(e.consume(l),a):(e.exit(n),t(l))}}const lR={tokenize:cR};function cR(e){const t=e.attempt(this.parser.constructs.contentInitial,r,s);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),ve(e,t,"linePrefix")}function s(a){return e.enter("paragraph"),i(a)}function i(a){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,o(a)}function o(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return J(a)?(e.consume(a),e.exit("chunkText"),i):(e.consume(a),o)}}const uR={tokenize:dR},ex={tokenize:fR};function dR(e){const t=this,n=[];let r=0,s,i,o;return a;function a(v){if(r<n.length){const k=n[r];return t.containerState=k[1],e.attempt(k[0].continuation,l,u)(v)}return u(v)}function l(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&x();const k=t.events.length;let S=k,b;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){b=t.events[S][1].end;break}g(r);let P=k;for(;P<t.events.length;)t.events[P][1].end={...b},P++;return Mn(t.events,S+1,0,t.events.slice(k)),t.events.length=P,u(v)}return a(v)}function u(v){if(r===n.length){if(!s)return h(v);if(s.currentConstruct&&s.currentConstruct.concrete)return m(v);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ex,c,f)(v)}function c(v){return s&&x(),g(r),h(v)}function f(v){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(v)}function h(v){return t.containerState={},e.attempt(ex,p,m)(v)}function p(v){return r++,n.push([t.currentConstruct,t.containerState]),h(v)}function m(v){if(v===null){s&&x(),g(0),e.consume(v);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:i}),y(v)}function y(v){if(v===null){w(e.exit("chunkFlow"),!0),g(0),e.consume(v);return}return J(v)?(e.consume(v),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(v),y)}function w(v,k){const S=t.sliceStream(v);if(k&&S.push(null),v.previous=i,i&&(i.next=v),i=v,s.defineSkip(v.start),s.write(S),t.parser.lazy[v.start.line]){let b=s.events.length;for(;b--;)if(s.events[b][1].start.offset<o&&(!s.events[b][1].end||s.events[b][1].end.offset>o))return;const P=t.events.length;let j=P,R,T;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){if(R){T=t.events[j][1].end;break}R=!0}for(g(r),b=P;b<t.events.length;)t.events[b][1].end={...T},b++;Mn(t.events,j+1,0,t.events.slice(P)),t.events.length=b}}function g(v){let k=n.length;for(;k-- >v;){const S=n[k];t.containerState=S[1],S[0].exit.call(t,e)}n.length=v}function x(){s.write([null]),i=void 0,s=void 0,t.containerState._closeFlow=void 0}}function fR(e,t,n){return ve(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function tx(e){if(e===null||bt(e)||aR(e))return 1;if(oR(e))return 2}function am(e,t,n){const r=[];let s=-1;for(;++s<e.length;){const i=e[s].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const gh={name:"attention",resolveAll:hR,tokenize:pR};function hR(e,t){let n=-1,r,s,i,o,a,l,u,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f={...e[r][1].end},h={...e[n][1].start};nx(f,-l),nx(h,l),o={type:l>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},a={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},i={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},s={type:l>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},e[r][1].end={...o.start},e[n][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Kt(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=Kt(u,[["enter",s,t],["enter",o,t],["exit",o,t],["enter",i,t]]),u=Kt(u,am(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Kt(u,[["exit",i,t],["enter",a,t],["exit",a,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=Kt(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,Mn(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function pR(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=tx(r);let i;return o;function o(l){return i=l,e.enter("attentionSequence"),a(l)}function a(l){if(l===i)return e.consume(l),a;const u=e.exit("attentionSequence"),c=tx(l),f=!c||c===2&&s||n.includes(l),h=!s||s===2&&c||n.includes(r);return u._open=!!(i===42?f:f&&(s||!h)),u._close=!!(i===42?h:h&&(c||!f)),t(l)}}function nx(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const mR={name:"autolink",tokenize:gR};function gR(e,t,n){let r=0;return s;function s(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(p){return Tn(p)?(e.consume(p),o):p===64?n(p):u(p)}function o(p){return p===43||p===45||p===46||At(p)?(r=1,a(p)):u(p)}function a(p){return p===58?(e.consume(p),r=0,l):(p===43||p===45||p===46||At(p))&&r++<32?(e.consume(p),a):(r=0,u(p))}function l(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||ph(p)?n(p):(e.consume(p),l)}function u(p){return p===64?(e.consume(p),c):rR(p)?(e.consume(p),u):n(p)}function c(p){return At(p)?f(p):n(p)}function f(p){return p===46?(e.consume(p),r=0,c):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):h(p)}function h(p){if((p===45||At(p))&&r++<63){const m=p===45?h:f;return e.consume(p),m}return n(p)}}const yu={partial:!0,tokenize:yR};function yR(e,t,n){return r;function r(i){return ae(i)?ve(e,s,"linePrefix")(i):s(i)}function s(i){return i===null||J(i)?t(i):n(i)}}const Bb={continuation:{tokenize:vR},exit:wR,name:"blockQuote",tokenize:xR};function xR(e,t,n){const r=this;return s;function s(o){if(o===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),i}return n(o)}function i(o){return ae(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function vR(e,t,n){const r=this;return s;function s(o){return ae(o)?ve(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):i(o)}function i(o){return e.attempt(Bb,t,n)(o)}}function wR(e){e.exit("blockQuote")}const $b={name:"characterEscape",tokenize:bR};function bR(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),s}function s(i){return iR(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const Vb={name:"characterReference",tokenize:kR};function kR(e,t,n){const r=this;let s=0,i,o;return a;function a(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),l}function l(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),i=31,o=At,c(f))}function u(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,o=sR,c):(e.enter("characterReferenceValue"),i=7,o=mh,c(f))}function c(f){if(f===59&&s){const h=e.exit("characterReferenceValue");return o===At&&!om(r.sliceSerialize(h))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(f)&&s++<i?(e.consume(f),c):n(f)}}const rx={partial:!0,tokenize:SR},sx={concrete:!0,name:"codeFenced",tokenize:_R};function _R(e,t,n){const r=this,s={partial:!0,tokenize:S};let i=0,o=0,a;return l;function l(b){return u(b)}function u(b){const P=r.events[r.events.length-1];return i=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,a=b,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(b)}function c(b){return b===a?(o++,e.consume(b),c):o<3?n(b):(e.exit("codeFencedFenceSequence"),ae(b)?ve(e,f,"whitespace")(b):f(b))}function f(b){return b===null||J(b)?(e.exit("codeFencedFence"),r.interrupt?t(b):e.check(rx,y,k)(b)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(b))}function h(b){return b===null||J(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(b)):ae(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ve(e,p,"whitespace")(b)):b===96&&b===a?n(b):(e.consume(b),h)}function p(b){return b===null||J(b)?f(b):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===null||J(b)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(b)):b===96&&b===a?n(b):(e.consume(b),m)}function y(b){return e.attempt(s,k,w)(b)}function w(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),g}function g(b){return i>0&&ae(b)?ve(e,x,"linePrefix",i+1)(b):x(b)}function x(b){return b===null||J(b)?e.check(rx,y,k)(b):(e.enter("codeFlowValue"),v(b))}function v(b){return b===null||J(b)?(e.exit("codeFlowValue"),x(b)):(e.consume(b),v)}function k(b){return e.exit("codeFenced"),t(b)}function S(b,P,j){let R=0;return T;function T(E){return b.enter("lineEnding"),b.consume(E),b.exit("lineEnding"),I}function I(E){return b.enter("codeFencedFence"),ae(E)?ve(b,A,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):A(E)}function A(E){return E===a?(b.enter("codeFencedFenceSequence"),F(E)):j(E)}function F(E){return E===a?(R++,b.consume(E),F):R>=o?(b.exit("codeFencedFenceSequence"),ae(E)?ve(b,z,"whitespace")(E):z(E)):j(E)}function z(E){return E===null||J(E)?(b.exit("codeFencedFence"),P(E)):j(E)}}}function SR(e,t,n){const r=this;return s;function s(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i)}function i(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const wd={name:"codeIndented",tokenize:PR},CR={partial:!0,tokenize:jR};function PR(e,t,n){const r=this;return s;function s(u){return e.enter("codeIndented"),ve(e,i,"linePrefix",5)(u)}function i(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?o(u):n(u)}function o(u){return u===null?l(u):J(u)?e.attempt(CR,o,l)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||J(u)?(e.exit("codeFlowValue"),o(u)):(e.consume(u),a)}function l(u){return e.exit("codeIndented"),t(u)}}function jR(e,t,n){const r=this;return s;function s(o){return r.parser.lazy[r.now().line]?n(o):J(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s):ve(e,i,"linePrefix",5)(o)}function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(o):J(o)?s(o):n(o)}}const ER={name:"codeText",previous:RR,resolve:TR,tokenize:NR};function TR(e){let t=e.length-4,n=3,r,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)s===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(s=r):(r===t||e[r][1].type==="lineEnding")&&(e[s][1].type="codeTextData",r!==s+2&&(e[s][1].end=e[r-1][1].end,e.splice(s+2,r-s-2),t-=r-s-2,r=s+2),s=void 0);return e}function RR(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function NR(e,t,n){let r=0,s,i;return o;function o(f){return e.enter("codeText"),e.enter("codeTextSequence"),a(f)}function a(f){return f===96?(e.consume(f),r++,a):(e.exit("codeTextSequence"),l(f))}function l(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),l):f===96?(i=e.enter("codeTextSequence"),s=0,c(f)):J(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),l):(e.enter("codeTextData"),u(f))}function u(f){return f===null||f===32||f===96||J(f)?(e.exit("codeTextData"),l(f)):(e.consume(f),u)}function c(f){return f===96?(e.consume(f),s++,c):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(i.type="codeTextData",u(f))}}class IR{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const s=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&lo(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),lo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),lo(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);lo(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);lo(this.left,n.reverse())}}}function lo(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Ub(e){const t={};let n=-1,r,s,i,o,a,l,u;const c=new IR(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,i=0,i<l.length&&l[i][1].type==="lineEndingBlank"&&(i+=2),i<l.length&&l[i][1].type==="content"))for(;++i<l.length&&l[i][1].type!=="content";)l[i][1].type==="chunkText"&&(l[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,AR(c,n)),n=t[n],u=!0);else if(r[1]._container){for(i=n,s=void 0;i--;)if(o=c.get(i),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(s&&(c.get(s)[1].type="lineEndingBlank"),o[1].type="lineEnding",s=i);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;s&&(r[1].end={...c.get(s)[1].start},a=c.slice(s,n),a.unshift(r),c.splice(s,n-s+1,a))}}return Mn(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function AR(e,t){const n=e.get(t)[1],r=e.get(t)[2];let s=t-1;const i=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const a=o.events,l=[],u={};let c,f,h=-1,p=n,m=0,y=0;const w=[y];for(;p;){for(;e.get(++s)[1]!==p;);i.push(s),p._tokenizer||(c=r.sliceStream(p),p.next||c.push(null),f&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(c),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=n;++h<a.length;)a[h][0]==="exit"&&a[h-1][0]==="enter"&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(y=h+1,w.push(y),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):w.pop(),h=w.length;h--;){const g=a.slice(w[h],w[h+1]),x=i.pop();l.push([x,x+g.length-1]),e.splice(x,2,g)}for(l.reverse(),h=-1;++h<l.length;)u[m+l[h][0]]=m+l[h][1],m+=l[h][1]-l[h][0]-1;return u}const MR={resolve:DR,tokenize:OR},LR={partial:!0,tokenize:FR};function DR(e){return Ub(e),e}function OR(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(a)}function s(a){return a===null?i(a):J(a)?e.check(LR,o,i)(a):(e.consume(a),s)}function i(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function o(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function FR(e,t,n){const r=this;return s;function s(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),ve(e,i,"linePrefix")}function i(o){if(o===null||J(o))return n(o);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function Wb(e,t,n,r,s,i,o,a,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return f;function f(g){return g===60?(e.enter(r),e.enter(s),e.enter(i),e.consume(g),e.exit(i),h):g===null||g===32||g===41||ph(g)?n(g):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),y(g))}function h(g){return g===62?(e.enter(i),e.consume(g),e.exit(i),e.exit(s),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===62?(e.exit("chunkString"),e.exit(a),h(g)):g===null||g===60||J(g)?n(g):(e.consume(g),g===92?m:p)}function m(g){return g===60||g===62||g===92?(e.consume(g),p):p(g)}function y(g){return!c&&(g===null||g===41||bt(g))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),t(g)):c<u&&g===40?(e.consume(g),c++,y):g===41?(e.consume(g),c--,y):g===null||g===32||g===40||ph(g)?n(g):(e.consume(g),g===92?w:y)}function w(g){return g===40||g===41||g===92?(e.consume(g),y):y(g)}}function Hb(e,t,n,r,s,i){const o=this;let a=0,l;return u;function u(p){return e.enter(r),e.enter(s),e.consume(p),e.exit(s),e.enter(i),c}function c(p){return a>999||p===null||p===91||p===93&&!l||p===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?n(p):p===93?(e.exit(i),e.enter(s),e.consume(p),e.exit(s),e.exit(r),t):J(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||J(p)||a++>999?(e.exit("chunkString"),c(p)):(e.consume(p),l||(l=!ae(p)),p===92?h:f)}function h(p){return p===91||p===92||p===93?(e.consume(p),a++,f):f(p)}}function Gb(e,t,n,r,s,i){let o;return a;function a(h){return h===34||h===39||h===40?(e.enter(r),e.enter(s),e.consume(h),e.exit(s),o=h===40?41:h,l):n(h)}function l(h){return h===o?(e.enter(s),e.consume(h),e.exit(s),e.exit(r),t):(e.enter(i),u(h))}function u(h){return h===o?(e.exit(i),l(o)):h===null?n(h):J(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),ve(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===o||h===null||J(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?f:c)}function f(h){return h===o||h===92?(e.consume(h),c):c(h)}}function Mo(e,t){let n;return r;function r(s){return J(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):ae(s)?ve(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const zR={name:"definition",tokenize:$R},BR={partial:!0,tokenize:VR};function $R(e,t,n){const r=this;let s;return i;function i(p){return e.enter("definition"),o(p)}function o(p){return Hb.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return s=xi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),l):n(p)}function l(p){return bt(p)?Mo(e,u)(p):u(p)}function u(p){return Wb(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return e.attempt(BR,f,f)(p)}function f(p){return ae(p)?ve(e,h,"whitespace")(p):h(p)}function h(p){return p===null||J(p)?(e.exit("definition"),r.parser.defined.push(s),t(p)):n(p)}}function VR(e,t,n){return r;function r(a){return bt(a)?Mo(e,s)(a):n(a)}function s(a){return Gb(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function i(a){return ae(a)?ve(e,o,"whitespace")(a):o(a)}function o(a){return a===null||J(a)?t(a):n(a)}}const UR={name:"hardBreakEscape",tokenize:WR};function WR(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),s}function s(i){return J(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const HR={name:"headingAtx",resolve:GR,tokenize:KR};function GR(e,t){let n=e.length-2,r=3,s,i;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(s={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Mn(e,r,n-r+1,[["enter",s,t],["enter",i,t],["exit",i,t],["exit",s,t]])),e}function KR(e,t,n){let r=0;return s;function s(c){return e.enter("atxHeading"),i(c)}function i(c){return e.enter("atxHeadingSequence"),o(c)}function o(c){return c===35&&r++<6?(e.consume(c),o):c===null||bt(c)?(e.exit("atxHeadingSequence"),a(c)):n(c)}function a(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||J(c)?(e.exit("atxHeading"),t(c)):ae(c)?ve(e,a,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),a(c))}function u(c){return c===null||c===35||bt(c)?(e.exit("atxHeadingText"),a(c)):(e.consume(c),u)}}const qR=["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"],ix=["pre","script","style","textarea"],QR={concrete:!0,name:"htmlFlow",resolveTo:JR,tokenize:ZR},YR={partial:!0,tokenize:tN},XR={partial:!0,tokenize:eN};function JR(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function ZR(e,t,n){const r=this;let s,i,o,a,l;return u;function u(N){return c(N)}function c(N){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(N),f}function f(N){return N===33?(e.consume(N),h):N===47?(e.consume(N),i=!0,y):N===63?(e.consume(N),s=3,r.interrupt?t:C):Tn(N)?(e.consume(N),o=String.fromCharCode(N),w):n(N)}function h(N){return N===45?(e.consume(N),s=2,p):N===91?(e.consume(N),s=5,a=0,m):Tn(N)?(e.consume(N),s=4,r.interrupt?t:C):n(N)}function p(N){return N===45?(e.consume(N),r.interrupt?t:C):n(N)}function m(N){const le="CDATA[";return N===le.charCodeAt(a++)?(e.consume(N),a===le.length?r.interrupt?t:A:m):n(N)}function y(N){return Tn(N)?(e.consume(N),o=String.fromCharCode(N),w):n(N)}function w(N){if(N===null||N===47||N===62||bt(N)){const le=N===47,fe=o.toLowerCase();return!le&&!i&&ix.includes(fe)?(s=1,r.interrupt?t(N):A(N)):qR.includes(o.toLowerCase())?(s=6,le?(e.consume(N),g):r.interrupt?t(N):A(N)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(N):i?x(N):v(N))}return N===45||At(N)?(e.consume(N),o+=String.fromCharCode(N),w):n(N)}function g(N){return N===62?(e.consume(N),r.interrupt?t:A):n(N)}function x(N){return ae(N)?(e.consume(N),x):T(N)}function v(N){return N===47?(e.consume(N),T):N===58||N===95||Tn(N)?(e.consume(N),k):ae(N)?(e.consume(N),v):T(N)}function k(N){return N===45||N===46||N===58||N===95||At(N)?(e.consume(N),k):S(N)}function S(N){return N===61?(e.consume(N),b):ae(N)?(e.consume(N),S):v(N)}function b(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),l=N,P):ae(N)?(e.consume(N),b):j(N)}function P(N){return N===l?(e.consume(N),l=null,R):N===null||J(N)?n(N):(e.consume(N),P)}function j(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||bt(N)?S(N):(e.consume(N),j)}function R(N){return N===47||N===62||ae(N)?v(N):n(N)}function T(N){return N===62?(e.consume(N),I):n(N)}function I(N){return N===null||J(N)?A(N):ae(N)?(e.consume(N),I):n(N)}function A(N){return N===45&&s===2?(e.consume(N),D):N===60&&s===1?(e.consume(N),B):N===62&&s===4?(e.consume(N),V):N===63&&s===3?(e.consume(N),C):N===93&&s===5?(e.consume(N),$):J(N)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(YR,q,F)(N)):N===null||J(N)?(e.exit("htmlFlowData"),F(N)):(e.consume(N),A)}function F(N){return e.check(XR,z,q)(N)}function z(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),E}function E(N){return N===null||J(N)?F(N):(e.enter("htmlFlowData"),A(N))}function D(N){return N===45?(e.consume(N),C):A(N)}function B(N){return N===47?(e.consume(N),o="",M):A(N)}function M(N){if(N===62){const le=o.toLowerCase();return ix.includes(le)?(e.consume(N),V):A(N)}return Tn(N)&&o.length<8?(e.consume(N),o+=String.fromCharCode(N),M):A(N)}function $(N){return N===93?(e.consume(N),C):A(N)}function C(N){return N===62?(e.consume(N),V):N===45&&s===2?(e.consume(N),C):A(N)}function V(N){return N===null||J(N)?(e.exit("htmlFlowData"),q(N)):(e.consume(N),V)}function q(N){return e.exit("htmlFlow"),t(N)}}function eN(e,t,n){const r=this;return s;function s(o){return J(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):n(o)}function i(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function tN(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(yu,t,n)}}const nN={name:"htmlText",tokenize:rN};function rN(e,t,n){const r=this;let s,i,o;return a;function a(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),l}function l(C){return C===33?(e.consume(C),u):C===47?(e.consume(C),S):C===63?(e.consume(C),v):Tn(C)?(e.consume(C),j):n(C)}function u(C){return C===45?(e.consume(C),c):C===91?(e.consume(C),i=0,m):Tn(C)?(e.consume(C),x):n(C)}function c(C){return C===45?(e.consume(C),p):n(C)}function f(C){return C===null?n(C):C===45?(e.consume(C),h):J(C)?(o=f,B(C)):(e.consume(C),f)}function h(C){return C===45?(e.consume(C),p):f(C)}function p(C){return C===62?D(C):C===45?h(C):f(C)}function m(C){const V="CDATA[";return C===V.charCodeAt(i++)?(e.consume(C),i===V.length?y:m):n(C)}function y(C){return C===null?n(C):C===93?(e.consume(C),w):J(C)?(o=y,B(C)):(e.consume(C),y)}function w(C){return C===93?(e.consume(C),g):y(C)}function g(C){return C===62?D(C):C===93?(e.consume(C),g):y(C)}function x(C){return C===null||C===62?D(C):J(C)?(o=x,B(C)):(e.consume(C),x)}function v(C){return C===null?n(C):C===63?(e.consume(C),k):J(C)?(o=v,B(C)):(e.consume(C),v)}function k(C){return C===62?D(C):v(C)}function S(C){return Tn(C)?(e.consume(C),b):n(C)}function b(C){return C===45||At(C)?(e.consume(C),b):P(C)}function P(C){return J(C)?(o=P,B(C)):ae(C)?(e.consume(C),P):D(C)}function j(C){return C===45||At(C)?(e.consume(C),j):C===47||C===62||bt(C)?R(C):n(C)}function R(C){return C===47?(e.consume(C),D):C===58||C===95||Tn(C)?(e.consume(C),T):J(C)?(o=R,B(C)):ae(C)?(e.consume(C),R):D(C)}function T(C){return C===45||C===46||C===58||C===95||At(C)?(e.consume(C),T):I(C)}function I(C){return C===61?(e.consume(C),A):J(C)?(o=I,B(C)):ae(C)?(e.consume(C),I):R(C)}function A(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),s=C,F):J(C)?(o=A,B(C)):ae(C)?(e.consume(C),A):(e.consume(C),z)}function F(C){return C===s?(e.consume(C),s=void 0,E):C===null?n(C):J(C)?(o=F,B(C)):(e.consume(C),F)}function z(C){return C===null||C===34||C===39||C===60||C===61||C===96?n(C):C===47||C===62||bt(C)?R(C):(e.consume(C),z)}function E(C){return C===47||C===62||bt(C)?R(C):n(C)}function D(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),t):n(C)}function B(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),M}function M(C){return ae(C)?ve(e,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):$(C)}function $(C){return e.enter("htmlTextData"),o(C)}}const lm={name:"labelEnd",resolveAll:aN,resolveTo:lN,tokenize:cN},sN={tokenize:uN},iN={tokenize:dN},oN={tokenize:fN};function aN(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const s=r.type==="labelImage"?4:2;r.type="data",t+=s}}return e.length!==n.length&&Mn(e,0,e.length,n),e}function lN(e,t){let n=e.length,r=0,s,i,o,a;for(;n--;)if(s=e[n][1],i){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(i=n,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(o=n);const l={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[i][1].start},end:{...e[o][1].end}},c={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[o-2][1].start}};return a=[["enter",l,t],["enter",u,t]],a=Kt(a,e.slice(i+1,i+r+3)),a=Kt(a,[["enter",c,t]]),a=Kt(a,am(t.parser.constructs.insideSpan.null,e.slice(i+r+4,o-3),t)),a=Kt(a,[["exit",c,t],e[o-2],e[o-1],["exit",u,t]]),a=Kt(a,e.slice(o+1)),a=Kt(a,[["exit",l,t]]),Mn(e,i,e.length,a),e}function cN(e,t,n){const r=this;let s=r.events.length,i,o;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){i=r.events[s][1];break}return a;function a(h){return i?i._inactive?f(h):(o=r.parser.defined.includes(xi(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),l):n(h)}function l(h){return h===40?e.attempt(sN,c,o?c:f)(h):h===91?e.attempt(iN,c,o?u:f)(h):o?c(h):f(h)}function u(h){return e.attempt(oN,c,f)(h)}function c(h){return t(h)}function f(h){return i._balanced=!0,n(h)}}function uN(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),s}function s(f){return bt(f)?Mo(e,i)(f):i(f)}function i(f){return f===41?c(f):Wb(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function o(f){return bt(f)?Mo(e,l)(f):c(f)}function a(f){return n(f)}function l(f){return f===34||f===39||f===40?Gb(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function u(f){return bt(f)?Mo(e,c)(f):c(f)}function c(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function dN(e,t,n){const r=this;return s;function s(a){return Hb.call(r,e,i,o,"reference","referenceMarker","referenceString")(a)}function i(a){return r.parser.defined.includes(xi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function o(a){return n(a)}}function fN(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),s}function s(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const hN={name:"labelStartImage",resolveAll:lm.resolveAll,tokenize:pN};function pN(e,t,n){const r=this;return s;function s(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),i}function i(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),o):n(a)}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const mN={name:"labelStartLink",resolveAll:lm.resolveAll,tokenize:gN};function gN(e,t,n){const r=this;return s;function s(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),i}function i(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const bd={name:"lineEnding",tokenize:yN};function yN(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ve(e,t,"linePrefix")}}const $l={name:"thematicBreak",tokenize:xN};function xN(e,t,n){let r=0,s;return i;function i(u){return e.enter("thematicBreak"),o(u)}function o(u){return s=u,a(u)}function a(u){return u===s?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||J(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===s?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),ae(u)?ve(e,a,"whitespace")(u):a(u))}}const pt={continuation:{tokenize:kN},exit:SN,name:"list",tokenize:bN},vN={partial:!0,tokenize:CN},wN={partial:!0,tokenize:_N};function bN(e,t,n){const r=this,s=r.events[r.events.length-1];let i=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,o=0;return a;function a(p){const m=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:mh(p)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check($l,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return n(p)}function l(p){return mh(p)&&++o<10?(e.consume(p),l):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):n(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(yu,r.interrupt?n:c,e.attempt(vN,h,f))}function c(p){return r.containerState.initialBlankLine=!0,i++,h(p)}function f(p){return ae(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function kN(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(yu,s,i);function s(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ve(e,t,"listItemIndent",r.containerState.size+1)(a)}function i(a){return r.containerState.furtherBlankLines||!ae(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(wN,t,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,ve(e,e.attempt(pt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function _N(e,t,n){const r=this;return ve(e,s,"listItemIndent",r.containerState.size+1);function s(i){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(i):n(i)}}function SN(e){e.exit(this.containerState.type)}function CN(e,t,n){const r=this;return ve(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(i){const o=r.events[r.events.length-1];return!ae(i)&&o&&o[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const ox={name:"setextUnderline",resolveTo:PN,tokenize:jN};function PN(e,t){let n=e.length,r,s,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",i?(e.splice(s,0,["enter",o,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end={...e[i][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function jN(e,t,n){const r=this;let s;return i;function i(u){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),s=u,o(u)):n(u)}function o(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===s?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),ae(u)?ve(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||J(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const EN={tokenize:TN};function TN(e){const t=this,n=e.attempt(yu,r,e.attempt(this.parser.constructs.flowInitial,s,ve(e,e.attempt(this.parser.constructs.flow,s,e.attempt(MR,s)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const RN={resolveAll:qb()},NN=Kb("string"),IN=Kb("text");function Kb(e){return{resolveAll:qb(e==="text"?AN:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],i=n.attempt(s,o,a);return o;function o(c){return u(c)?i(c):a(c)}function a(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),l}function l(c){return u(c)?(n.exit("data"),i(c)):(n.consume(c),l)}function u(c){if(c===null)return!0;const f=s[c];let h=-1;if(f)for(;++h<f.length;){const p=f[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function qb(e){return t;function t(n,r){let s=-1,i;for(;++s<=n.length;)i===void 0?n[s]&&n[s][1].type==="data"&&(i=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==i+2&&(n[i][1].end=n[s-1][1].end,n.splice(i+2,s-i-2),s=i+2),i=void 0);return e?e(n,r):n}}function AN(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],s=t.sliceStream(r);let i=s.length,o=-1,a=0,l;for(;i--;){const u=s[i];if(typeof u=="string"){for(o=u.length;u.charCodeAt(o-1)===32;)a++,o--;if(o)break;o=-1}else if(u===-2)l=!0,a++;else if(u!==-1){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const u={type:n===e.length||l||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?o:r.start._bufferIndex+o,_index:r.start._index+i,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const MN={42:pt,43:pt,45:pt,48:pt,49:pt,50:pt,51:pt,52:pt,53:pt,54:pt,55:pt,56:pt,57:pt,62:Bb},LN={91:zR},DN={[-2]:wd,[-1]:wd,32:wd},ON={35:HR,42:$l,45:[ox,$l],60:QR,61:ox,95:$l,96:sx,126:sx},FN={38:Vb,92:$b},zN={[-5]:bd,[-4]:bd,[-3]:bd,33:hN,38:Vb,42:gh,60:[mR,nN],91:mN,92:[UR,$b],93:lm,95:gh,96:ER},BN={null:[gh,RN]},$N={null:[42,95]},VN={null:[]},UN=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:$N,contentInitial:LN,disable:VN,document:MN,flow:ON,flowInitial:DN,insideSpan:BN,string:FN,text:zN},Symbol.toStringTag,{value:"Module"}));function WN(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},i=[];let o=[],a=[];const l={attempt:P(S),check:P(b),consume:x,enter:v,exit:k,interrupt:P(b,{interrupt:!0})},u={code:null,containerState:{},defineSkip:y,events:[],now:m,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:f};let c=t.tokenize.call(u,l);return t.resolveAll&&i.push(t),u;function f(I){return o=Kt(o,I),w(),o[o.length-1]!==null?[]:(j(t,0),u.events=am(i,u.events,u),u.events)}function h(I,A){return GN(p(I),A)}function p(I){return HN(o,I)}function m(){const{_bufferIndex:I,_index:A,line:F,column:z,offset:E}=r;return{_bufferIndex:I,_index:A,line:F,column:z,offset:E}}function y(I){s[I.line]=I.column,T()}function w(){let I;for(;r._index<o.length;){const A=o[r._index];if(typeof A=="string")for(I=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===I&&r._bufferIndex<A.length;)g(A.charCodeAt(r._bufferIndex));else g(A)}}function g(I){c=c(I)}function x(I){J(I)?(r.line++,r.column=1,r.offset+=I===-3?2:1,T()):I!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=I}function v(I,A){const F=A||{};return F.type=I,F.start=m(),u.events.push(["enter",F,u]),a.push(F),F}function k(I){const A=a.pop();return A.end=m(),u.events.push(["exit",A,u]),A}function S(I,A){j(I,A.from)}function b(I,A){A.restore()}function P(I,A){return F;function F(z,E,D){let B,M,$,C;return Array.isArray(z)?q(z):"tokenize"in z?q([z]):V(z);function V(ue){return Pt;function Pt(He){const $t=He!==null&&ue[He],yn=He!==null&&ue.null,On=[...Array.isArray($t)?$t:$t?[$t]:[],...Array.isArray(yn)?yn:yn?[yn]:[]];return q(On)(He)}}function q(ue){return B=ue,M=0,ue.length===0?D:N(ue[M])}function N(ue){return Pt;function Pt(He){return C=R(),$=ue,ue.partial||(u.currentConstruct=ue),ue.name&&u.parser.constructs.disable.null.includes(ue.name)?fe():ue.tokenize.call(A?Object.assign(Object.create(u),A):u,l,le,fe)(He)}}function le(ue){return I($,C),E}function fe(ue){return C.restore(),++M<B.length?N(B[M]):D}}}function j(I,A){I.resolveAll&&!i.includes(I)&&i.push(I),I.resolve&&Mn(u.events,A,u.events.length-A,I.resolve(u.events.slice(A),u)),I.resolveTo&&(u.events=I.resolveTo(u.events,u))}function R(){const I=m(),A=u.previous,F=u.currentConstruct,z=u.events.length,E=Array.from(a);return{from:z,restore:D};function D(){r=I,u.previous=A,u.currentConstruct=F,u.events.length=z,a=E,T()}}function T(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function HN(e,t){const n=t.start._index,r=t.start._bufferIndex,s=t.end._index,i=t.end._bufferIndex;let o;if(n===s)o=[e[n].slice(r,i)];else{if(o=e.slice(n,s),r>-1){const a=o[0];typeof a=="string"?o[0]=a.slice(r):o.shift()}i>0&&o.push(e[s].slice(0,i))}return o}function GN(e,t){let n=-1;const r=[];let s;for(;++n<e.length;){const i=e[n];let o;if(typeof i=="string")o=i;else switch(i){case-5:{o="\r";break}case-4:{o=`
|
|
59
|
-
`;break}case-3:{o=`\r
|
|
60
|
-
`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&s)continue;o=" ";break}default:o=String.fromCharCode(i)}s=i===-2,r.push(o)}return r.join("")}function KN(e){const r={constructs:eR([UN,...(e||{}).extensions||[]]),content:s(lR),defined:[],document:s(uR),flow:s(EN),lazy:{},string:s(NN),text:s(IN)};return r;function s(i){return o;function o(a){return WN(r,i,a)}}}function qN(e){for(;!Ub(e););return e}const ax=/[\0\t\n\r]/g;function QN(){let e=1,t="",n=!0,r;return s;function s(i,o,a){const l=[];let u,c,f,h,p;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(o||void 0).decode(i)),f=0,t="",n&&(i.charCodeAt(0)===65279&&f++,n=void 0);f<i.length;){if(ax.lastIndex=f,u=ax.exec(i),h=u&&u.index!==void 0?u.index:i.length,p=i.charCodeAt(h),!u){t=i.slice(f);break}if(p===10&&f===h&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),f<h&&(l.push(i.slice(f,h)),e+=h-f),p){case 0:{l.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,l.push(-2);e++<c;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}f=h+1}return a&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const YN=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function XN(e){return e.replace(YN,JN)}function JN(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),i=s===120||s===88;return zb(n.slice(i?2:1),i?16:10)}return om(n)||e}const Qb={}.hasOwnProperty;function ZN(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),eI(n)(qN(KN(n).document().write(QN()(e,t,!0))))}function eI(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(Os),autolinkProtocol:R,autolinkEmail:R,atxHeading:i(Aa),blockQuote:i(yn),characterEscape:R,characterReference:R,codeFenced:i(On),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:i(On,o),codeText:i(Ds,o),codeTextData:R,data:R,codeFlowValue:R,definition:i(Na),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:i(Ia),hardBreakEscape:i(Gi),hardBreakTrailing:i(Gi),htmlFlow:i(Ki,o),htmlFlowData:R,htmlText:i(Ki,o),htmlTextData:R,image:i(ir),label:o,link:i(Os),listItem:i(Lu),listItemValue:h,listOrdered:i(xn,f),listUnordered:i(xn),paragraph:i(Ma),reference:N,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:i(Aa),strong:i(Du),thematicBreak:i(de)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:$t,autolinkProtocol:He,blockQuote:l(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:ue,characterReference:Pt,codeFenced:l(w),codeFencedFence:y,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:T,codeIndented:l(g),codeText:l(E),codeTextData:T,data:T,definition:l(),definitionDestinationString:k,definitionLabelString:x,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(A),hardBreakTrailing:l(A),htmlFlow:l(F),htmlFlowData:T,htmlText:l(z),htmlTextData:T,image:l(B),label:$,labelText:M,lineEnding:I,link:l(D),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:le,resourceDestinationString:C,resourceTitleString:V,resource:q,setextHeading:l(j),setextHeadingLineSequence:P,setextHeadingText:b,strong:l(),thematicBreak:l()}};Yb(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(L){let H={type:"root",children:[]};const Z={stack:[H],tokenStack:[],config:t,enter:a,exit:u,buffer:o,resume:c,data:n},se=[];let he=-1;for(;++he<L.length;)if(L[he][1].type==="listOrdered"||L[he][1].type==="listUnordered")if(L[he][0]==="enter")se.push(he);else{const tn=se.pop();he=s(L,tn,he)}for(he=-1;++he<L.length;){const tn=t[L[he][0]];Qb.call(tn,L[he][1].type)&&tn[L[he][1].type].call(Object.assign({sliceSerialize:L[he][2].sliceSerialize},Z),L[he][1])}if(Z.tokenStack.length>0){const tn=Z.tokenStack[Z.tokenStack.length-1];(tn[1]||lx).call(Z,void 0,tn[0])}for(H.position={start:ar(L.length>0?L[0][1].start:{line:1,column:1,offset:0}),end:ar(L.length>0?L[L.length-2][1].end:{line:1,column:1,offset:0})},he=-1;++he<t.transforms.length;)H=t.transforms[he](H)||H;return H}function s(L,H,Z){let se=H-1,he=-1,tn=!1,es,Fn,qi,Qi;for(;++se<=Z;){const jt=L[se];switch(jt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{jt[0]==="enter"?he++:he--,Qi=void 0;break}case"lineEndingBlank":{jt[0]==="enter"&&(es&&!Qi&&!he&&!qi&&(qi=se),Qi=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Qi=void 0}if(!he&&jt[0]==="enter"&&jt[1].type==="listItemPrefix"||he===-1&&jt[0]==="exit"&&(jt[1].type==="listUnordered"||jt[1].type==="listOrdered")){if(es){let Fs=se;for(Fn=void 0;Fs--;){const zn=L[Fs];if(zn[1].type==="lineEnding"||zn[1].type==="lineEndingBlank"){if(zn[0]==="exit")continue;Fn&&(L[Fn][1].type="lineEndingBlank",tn=!0),zn[1].type="lineEnding",Fn=Fs}else if(!(zn[1].type==="linePrefix"||zn[1].type==="blockQuotePrefix"||zn[1].type==="blockQuotePrefixWhitespace"||zn[1].type==="blockQuoteMarker"||zn[1].type==="listItemIndent"))break}qi&&(!Fn||qi<Fn)&&(es._spread=!0),es.end=Object.assign({},Fn?L[Fn][1].start:jt[1].end),L.splice(Fn||se,0,["exit",es,jt[2]]),se++,Z++}if(jt[1].type==="listItemPrefix"){const Fs={type:"listItem",_spread:!1,start:Object.assign({},jt[1].start),end:void 0};es=Fs,L.splice(se,0,["enter",Fs,jt[2]]),se++,Z++,qi=void 0,Qi=!0}}}return L[H][1]._spread=tn,Z}function i(L,H){return Z;function Z(se){a.call(this,L(se),se),H&&H.call(this,se)}}function o(){this.stack.push({type:"fragment",children:[]})}function a(L,H,Z){this.stack[this.stack.length-1].children.push(L),this.stack.push(L),this.tokenStack.push([H,Z||void 0]),L.position={start:ar(H.start),end:void 0}}function l(L){return H;function H(Z){L&&L.call(this,Z),u.call(this,Z)}}function u(L,H){const Z=this.stack.pop(),se=this.tokenStack.pop();if(se)se[0].type!==L.type&&(H?H.call(this,L,se[0]):(se[1]||lx).call(this,L,se[0]));else throw new Error("Cannot close `"+L.type+"` ("+Ao({start:L.start,end:L.end})+"): it’s not open");Z.position.end=ar(L.end)}function c(){return J2(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function h(L){if(this.data.expectingFirstListItemValue){const H=this.stack[this.stack.length-2];H.start=Number.parseInt(this.sliceSerialize(L),10),this.data.expectingFirstListItemValue=void 0}}function p(){const L=this.resume(),H=this.stack[this.stack.length-1];H.lang=L}function m(){const L=this.resume(),H=this.stack[this.stack.length-1];H.meta=L}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const L=this.resume(),H=this.stack[this.stack.length-1];H.value=L.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const L=this.resume(),H=this.stack[this.stack.length-1];H.value=L.replace(/(\r?\n|\r)$/g,"")}function x(L){const H=this.resume(),Z=this.stack[this.stack.length-1];Z.label=H,Z.identifier=xi(this.sliceSerialize(L)).toLowerCase()}function v(){const L=this.resume(),H=this.stack[this.stack.length-1];H.title=L}function k(){const L=this.resume(),H=this.stack[this.stack.length-1];H.url=L}function S(L){const H=this.stack[this.stack.length-1];if(!H.depth){const Z=this.sliceSerialize(L).length;H.depth=Z}}function b(){this.data.setextHeadingSlurpLineEnding=!0}function P(L){const H=this.stack[this.stack.length-1];H.depth=this.sliceSerialize(L).codePointAt(0)===61?1:2}function j(){this.data.setextHeadingSlurpLineEnding=void 0}function R(L){const Z=this.stack[this.stack.length-1].children;let se=Z[Z.length-1];(!se||se.type!=="text")&&(se=La(),se.position={start:ar(L.start),end:void 0},Z.push(se)),this.stack.push(se)}function T(L){const H=this.stack.pop();H.value+=this.sliceSerialize(L),H.position.end=ar(L.end)}function I(L){const H=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Z=H.children[H.children.length-1];Z.position.end=ar(L.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(H.type)&&(R.call(this,L),T.call(this,L))}function A(){this.data.atHardBreak=!0}function F(){const L=this.resume(),H=this.stack[this.stack.length-1];H.value=L}function z(){const L=this.resume(),H=this.stack[this.stack.length-1];H.value=L}function E(){const L=this.resume(),H=this.stack[this.stack.length-1];H.value=L}function D(){const L=this.stack[this.stack.length-1];if(this.data.inReference){const H=this.data.referenceType||"shortcut";L.type+="Reference",L.referenceType=H,delete L.url,delete L.title}else delete L.identifier,delete L.label;this.data.referenceType=void 0}function B(){const L=this.stack[this.stack.length-1];if(this.data.inReference){const H=this.data.referenceType||"shortcut";L.type+="Reference",L.referenceType=H,delete L.url,delete L.title}else delete L.identifier,delete L.label;this.data.referenceType=void 0}function M(L){const H=this.sliceSerialize(L),Z=this.stack[this.stack.length-2];Z.label=XN(H),Z.identifier=xi(H).toLowerCase()}function $(){const L=this.stack[this.stack.length-1],H=this.resume(),Z=this.stack[this.stack.length-1];if(this.data.inReference=!0,Z.type==="link"){const se=L.children;Z.children=se}else Z.alt=H}function C(){const L=this.resume(),H=this.stack[this.stack.length-1];H.url=L}function V(){const L=this.resume(),H=this.stack[this.stack.length-1];H.title=L}function q(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function le(L){const H=this.resume(),Z=this.stack[this.stack.length-1];Z.label=H,Z.identifier=xi(this.sliceSerialize(L)).toLowerCase(),this.data.referenceType="full"}function fe(L){this.data.characterReferenceType=L.type}function ue(L){const H=this.sliceSerialize(L),Z=this.data.characterReferenceType;let se;Z?(se=zb(H,Z==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):se=om(H);const he=this.stack[this.stack.length-1];he.value+=se}function Pt(L){const H=this.stack.pop();H.position.end=ar(L.end)}function He(L){T.call(this,L);const H=this.stack[this.stack.length-1];H.url=this.sliceSerialize(L)}function $t(L){T.call(this,L);const H=this.stack[this.stack.length-1];H.url="mailto:"+this.sliceSerialize(L)}function yn(){return{type:"blockquote",children:[]}}function On(){return{type:"code",lang:null,meta:null,value:""}}function Ds(){return{type:"inlineCode",value:""}}function Na(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ia(){return{type:"emphasis",children:[]}}function Aa(){return{type:"heading",depth:0,children:[]}}function Gi(){return{type:"break"}}function Ki(){return{type:"html",value:""}}function ir(){return{type:"image",title:null,url:"",alt:null}}function Os(){return{type:"link",title:null,url:"",children:[]}}function xn(L){return{type:"list",ordered:L.type==="listOrdered",start:null,spread:L._spread,children:[]}}function Lu(L){return{type:"listItem",spread:L._spread,checked:null,children:[]}}function Ma(){return{type:"paragraph",children:[]}}function Du(){return{type:"strong",children:[]}}function La(){return{type:"text",value:""}}function de(){return{type:"thematicBreak"}}}function ar(e){return{line:e.line,column:e.column,offset:e.offset}}function Yb(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Yb(e,r):tI(e,r)}}function tI(e,t){let n;for(n in t)if(Qb.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function lx(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ao({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ao({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ao({start:t.start,end:t.end})+") is still open")}function nI(e){const t=this;t.parser=n;function n(r){return ZN(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function rI(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function sI(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
61
|
-
`}]}function iI(e,t){const n=t.value?t.value+`
|
|
62
|
-
`:"",r={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(r.className=["language-"+s[0]]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function oI(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function aI(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function lI(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=zi(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let o,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=i+1,a+=1,e.footnoteCounts.set(r,a);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function cI(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function uI(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Xb(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const s=e.all(t),i=s[0];i&&i.type==="text"?i.value="["+i.value:s.unshift({type:"text",value:"["});const o=s[s.length-1];return o&&o.type==="text"?o.value+=r:s.push({type:"text",value:r}),s}function dI(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Xb(e,t);const s={src:zi(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const i={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,i),e.applyData(t,i)}function fI(e,t){const n={src:zi(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function hI(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function pI(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Xb(e,t);const s={href:zi(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const i={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function mI(e,t){const n={href:zi(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function gI(e,t,n){const r=e.all(t),s=n?yI(n):Jb(t),i={},o=[];if(typeof t.checked=="boolean"){const c=r[0];let f;c&&c.type==="element"&&c.tagName==="p"?f=c:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const c=r[a];(s||a!==0||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
|
|
63
|
-
`}),c.type==="element"&&c.tagName==="p"&&!s?o.push(...c.children):o.push(c)}const l=r[r.length-1];l&&(s||l.type!=="element"||l.tagName!=="p")&&o.push({type:"text",value:`
|
|
64
|
-
`});const u={type:"element",tagName:"li",properties:i,children:o};return e.patch(t,u),e.applyData(t,u)}function yI(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Jb(n[r])}return t}function Jb(e){const t=e.spread;return t??e.children.length>1}function xI(e,t){const n={},r=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<r.length;){const o=r[s];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}function vI(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wI(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function bI(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function kI(e,t){const n=e.all(t),r=n.shift(),s=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),s.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=nm(t.children[1]),l=Ib(t.children[t.children.length-1]);a&&l&&(o.position={start:a,end:l}),s.push(o)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,i),e.applyData(t,i)}function _I(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,a=o?o.length:t.children.length;let l=-1;const u=[];for(;++l<a;){const f=t.children[l],h={},p=o?o[l]:void 0;p&&(h.align=p);let m={type:"element",tagName:i,properties:h,children:[]};f&&(m.children=e.all(f),e.patch(f,m),m=e.applyData(f,m)),u.push(m)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,c),e.applyData(t,c)}function SI(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const cx=9,ux=32;function CI(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const i=[];for(;r;)i.push(dx(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return i.push(dx(t.slice(s),s>0,!1)),i.join("")}function dx(e,t,n){let r=0,s=e.length;if(t){let i=e.codePointAt(r);for(;i===cx||i===ux;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(s-1);for(;i===cx||i===ux;)s--,i=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function PI(e,t){const n={type:"text",value:CI(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function jI(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const EI={blockquote:rI,break:sI,code:iI,delete:oI,emphasis:aI,footnoteReference:lI,heading:cI,html:uI,imageReference:dI,image:fI,inlineCode:hI,linkReference:pI,link:mI,listItem:gI,list:xI,paragraph:vI,root:wI,strong:bI,table:kI,tableCell:SI,tableRow:_I,text:PI,thematicBreak:jI,toml:rl,yaml:rl,definition:rl,footnoteDefinition:rl};function rl(){}const Zb=-1,xu=0,Lo=1,Rc=2,cm=3,um=4,dm=5,fm=6,ek=7,tk=8,TI=typeof self=="object"?self:globalThis,fx=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new TI[e](t)},RI=(e,t)=>{const n=(s,i)=>(e.set(i,s),s),r=s=>{if(e.has(s))return e.get(s);const[i,o]=t[s];switch(i){case xu:case Zb:return n(o,s);case Lo:{const a=n([],s);for(const l of o)a.push(r(l));return a}case Rc:{const a=n({},s);for(const[l,u]of o)a[r(l)]=r(u);return a}case cm:return n(new Date(o),s);case um:{const{source:a,flags:l}=o;return n(new RegExp(a,l),s)}case dm:{const a=n(new Map,s);for(const[l,u]of o)a.set(r(l),r(u));return a}case fm:{const a=n(new Set,s);for(const l of o)a.add(r(l));return a}case ek:{const{name:a,message:l}=o;return n(fx(a,l),s)}case tk:return n(BigInt(o),s);case"BigInt":return n(Object(BigInt(o)),s);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:a}=new Uint8Array(o);return n(new DataView(a),o)}}return n(fx(i,o),s)};return r},hx=e=>RI(new Map,e)(0),$s="",{toString:NI}={},{keys:II}=Object,co=e=>{const t=typeof e;if(t!=="object"||!e)return[xu,t];const n=NI.call(e).slice(8,-1);switch(n){case"Array":return[Lo,$s];case"Object":return[Rc,$s];case"Date":return[cm,$s];case"RegExp":return[um,$s];case"Map":return[dm,$s];case"Set":return[fm,$s];case"DataView":return[Lo,n]}return n.includes("Array")?[Lo,n]:n.includes("Error")?[ek,n]:[Rc,n]},sl=([e,t])=>e===xu&&(t==="function"||t==="symbol"),AI=(e,t,n,r)=>{const s=(o,a)=>{const l=r.push(o)-1;return n.set(a,l),l},i=o=>{if(n.has(o))return n.get(o);let[a,l]=co(o);switch(a){case xu:{let c=o;switch(l){case"bigint":a=tk,c=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);c=null;break;case"undefined":return s([Zb],o)}return s([a,c],o)}case Lo:{if(l){let h=o;return l==="DataView"?h=new Uint8Array(o.buffer):l==="ArrayBuffer"&&(h=new Uint8Array(o)),s([l,[...h]],o)}const c=[],f=s([a,c],o);for(const h of o)c.push(i(h));return f}case Rc:{if(l)switch(l){case"BigInt":return s([l,o.toString()],o);case"Boolean":case"Number":case"String":return s([l,o.valueOf()],o)}if(t&&"toJSON"in o)return i(o.toJSON());const c=[],f=s([a,c],o);for(const h of II(o))(e||!sl(co(o[h])))&&c.push([i(h),i(o[h])]);return f}case cm:return s([a,o.toISOString()],o);case um:{const{source:c,flags:f}=o;return s([a,{source:c,flags:f}],o)}case dm:{const c=[],f=s([a,c],o);for(const[h,p]of o)(e||!(sl(co(h))||sl(co(p))))&&c.push([i(h),i(p)]);return f}case fm:{const c=[],f=s([a,c],o);for(const h of o)(e||!sl(co(h)))&&c.push(i(h));return f}}const{message:u}=o;return s([a,{name:l,message:u}],o)};return i},px=(e,{json:t,lossy:n}={})=>{const r=[];return AI(!(t||n),!!t,new Map,r)(e),r},Nc=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?hx(px(e,t)):structuredClone(e):(e,t)=>hx(px(e,t));function MI(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function LI(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function DI(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||MI,r=e.options.footnoteBackLabel||LI,s=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let l=-1;for(;++l<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[l]);if(!u)continue;const c=e.all(u),f=String(u.identifier).toUpperCase(),h=zi(f.toLowerCase());let p=0;const m=[],y=e.footnoteCounts.get(f);for(;y!==void 0&&++p<=y;){m.length>0&&m.push({type:"text",value:" "});let x=typeof n=="string"?n:n(l,p);typeof x=="string"&&(x={type:"text",value:x}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,p),className:["data-footnote-backref"]},children:Array.isArray(x)?x:[x]})}const w=c[c.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const x=w.children[w.children.length-1];x&&x.type==="text"?x.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...m)}else c.push(...m);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(c,!0)};e.patch(u,g),a.push(g)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...Nc(o),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
|
|
65
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
|
|
66
|
-
`}]}}const nk=function(e){if(e==null)return BI;if(typeof e=="function")return vu(e);if(typeof e=="object")return Array.isArray(e)?OI(e):FI(e);if(typeof e=="string")return zI(e);throw new Error("Expected function, string, or object as test")};function OI(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=nk(e[n]);return vu(r);function r(...s){let i=-1;for(;++i<t.length;)if(t[i].apply(this,s))return!0;return!1}}function FI(e){const t=e;return vu(n);function n(r){const s=r;let i;for(i in e)if(s[i]!==t[i])return!1;return!0}}function zI(e){return vu(t);function t(n){return n&&n.type===e}}function vu(e){return t;function t(n,r,s){return!!($I(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function BI(){return!0}function $I(e){return e!==null&&typeof e=="object"&&"type"in e}const rk=[],VI=!0,mx=!1,UI="skip";function WI(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const i=nk(s),o=r?-1:1;a(e,void 0,[])();function a(l,u,c){const f=l&&typeof l=="object"?l:{};if(typeof f.type=="string"){const p=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=rk,m,y,w;if((!t||i(l,u,c[c.length-1]||void 0))&&(p=HI(n(l,c)),p[0]===mx))return p;if("children"in l&&l.children){const g=l;if(g.children&&p[0]!==UI)for(y=(r?g.children.length:-1)+o,w=c.concat(g);y>-1&&y<g.children.length;){const x=g.children[y];if(m=a(x,y,w)(),m[0]===mx)return m;y=typeof m[1]=="number"?m[1]:y+o}}return p}}}function HI(e){return Array.isArray(e)?e:typeof e=="number"?[VI,e]:e==null?rk:[e]}function sk(e,t,n,r){let s,i,o;typeof t=="function"&&typeof n!="function"?(i=void 0,o=t,s=n):(i=t,o=n,s=r),WI(e,i,a,s);function a(l,u){const c=u[u.length-1],f=c?c.children.indexOf(l):void 0;return o(l,f,c)}}const yh={}.hasOwnProperty,GI={};function KI(e,t){const n=t||GI,r=new Map,s=new Map,i=new Map,o={...EI,...n.handlers},a={all:u,applyData:QI,definitionById:r,footnoteById:s,footnoteCounts:i,footnoteOrder:[],handlers:o,one:l,options:n,patch:qI,wrap:XI};return sk(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const f=c.type==="definition"?r:s,h=String(c.identifier).toUpperCase();f.has(h)||f.set(h,c)}}),a;function l(c,f){const h=c.type,p=a.handlers[h];if(yh.call(a.handlers,h)&&p)return p(a,c,f);if(a.options.passThrough&&a.options.passThrough.includes(h)){if("children"in c){const{children:y,...w}=c,g=Nc(w);return g.children=a.all(c),g}return Nc(c)}return(a.options.unknownHandler||YI)(a,c,f)}function u(c){const f=[];if("children"in c){const h=c.children;let p=-1;for(;++p<h.length;){const m=a.one(h[p],c);if(m){if(p&&h[p-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=gx(m.value)),!Array.isArray(m)&&m.type==="element")){const y=m.children[0];y&&y.type==="text"&&(y.value=gx(y.value))}Array.isArray(m)?f.push(...m):f.push(m)}}}return f}}function qI(e,t){e.position&&(t.position=R2(e))}function QI(e,t){let n=t;if(e&&e.data){const r=e.data.hName,s=e.data.hChildren,i=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&i&&Object.assign(n.properties,Nc(i)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function YI(e,t){const n=t.data||{},r="value"in t&&!(yh.call(n,"hProperties")||yh.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function XI(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
67
|
-
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
68
|
-
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
69
|
-
`}),n}function gx(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function yx(e,t){const n=KI(e,t),r=n.one(e,void 0),s=DI(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&i.children.push({type:"text",value:`
|
|
70
|
-
`},s),i}function JI(e,t){return e&&"run"in e?async function(n,r){const s=yx(n,{file:r,...t});await e.run(s,r)}:function(n,r){return yx(n,{file:r,...e||t})}}function xx(e){if(e)throw e}var Vl=Object.prototype.hasOwnProperty,ik=Object.prototype.toString,vx=Object.defineProperty,wx=Object.getOwnPropertyDescriptor,bx=function(t){return typeof Array.isArray=="function"?Array.isArray(t):ik.call(t)==="[object Array]"},kx=function(t){if(!t||ik.call(t)!=="[object Object]")return!1;var n=Vl.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Vl.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var s;for(s in t);return typeof s>"u"||Vl.call(t,s)},_x=function(t,n){vx&&n.name==="__proto__"?vx(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Sx=function(t,n){if(n==="__proto__")if(Vl.call(t,n)){if(wx)return wx(t,n).value}else return;return t[n]},ZI=function e(){var t,n,r,s,i,o,a=arguments[0],l=1,u=arguments.length,c=!1;for(typeof a=="boolean"&&(c=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l<u;++l)if(t=arguments[l],t!=null)for(n in t)r=Sx(a,n),s=Sx(t,n),a!==s&&(c&&s&&(kx(s)||(i=bx(s)))?(i?(i=!1,o=r&&bx(r)?r:[]):o=r&&kx(r)?r:{},_x(a,{name:n,newValue:e(c,o,s)})):typeof s<"u"&&_x(a,{name:n,newValue:s}));return a};const kd=Qc(ZI);function xh(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function eA(){const e=[],t={run:n,use:r};return t;function n(...s){let i=-1;const o=s.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);a(null,...s);function a(l,...u){const c=e[++i];let f=-1;if(l){o(l);return}for(;++f<s.length;)(u[f]===null||u[f]===void 0)&&(u[f]=s[f]);s=u,c?tA(c,a)(...u):o(null,...u)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function tA(e,t){let n;return r;function r(...o){const a=e.length>o.length;let l;a&&o.push(s);try{l=e.apply(this,o)}catch(u){const c=u;if(a&&n)throw c;return s(c)}a||(l&&l.then&&typeof l.then=="function"?l.then(i,s):l instanceof Error?s(l):i(l))}function s(o,...a){n||(n=!0,t(o,...a))}function i(o){s(null,o)}}const Sn={basename:nA,dirname:rA,extname:sA,join:iA,sep:"/"};function nA(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');va(e);let n=0,r=-1,s=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(i){n=s+1;break}}else r<0&&(i=!0,r=s+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,a=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(i){n=s+1;break}}else o<0&&(i=!0,o=s+1),a>-1&&(e.codePointAt(s)===t.codePointAt(a--)?a<0&&(r=s):(a=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function rA(e){if(va(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function sA(e){va(e);let t=e.length,n=-1,r=0,s=-1,i=0,o;for(;t--;){const a=e.codePointAt(t);if(a===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),a===46?s<0?s=t:i!==1&&(i=1):s>-1&&(i=-1)}return s<0||n<0||i===0||i===1&&s===n-1&&s===r+1?"":e.slice(s,n)}function iA(...e){let t=-1,n;for(;++t<e.length;)va(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":oA(n)}function oA(e){va(e);const t=e.codePointAt(0)===47;let n=aA(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function aA(e,t){let n="",r=0,s=-1,i=0,o=-1,a,l;for(;++o<=e.length;){if(o<e.length)a=e.codePointAt(o);else{if(a===47)break;a=47}if(a===47){if(!(s===o-1||i===1))if(s!==o-1&&i===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),s=o,i=0;continue}}else if(n.length>0){n="",r=0,s=o,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(s+1,o):n=e.slice(s+1,o),r=o-s-1;s=o,i=0}else a===46&&i>-1?i++:i=-1}return n}function va(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const lA={cwd:cA};function cA(){return"/"}function vh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function uA(e){if(typeof e=="string")e=new URL(e);else if(!vh(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return dA(e)}function dA(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const _d=["history","path","basename","stem","extname","dirname"];class ok{constructor(t){let n;t?vh(t)?n={path:t}:typeof t=="string"||fA(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":lA.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<_d.length;){const i=_d[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let s;for(s in n)_d.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Sn.basename(this.path):void 0}set basename(t){Cd(t,"basename"),Sd(t,"basename"),this.path=Sn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Sn.dirname(this.path):void 0}set dirname(t){Cx(this.basename,"dirname"),this.path=Sn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Sn.extname(this.path):void 0}set extname(t){if(Sd(t,"extname"),Cx(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Sn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){vh(t)&&(t=uA(t)),Cd(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Sn.basename(this.path,this.extname):void 0}set stem(t){Cd(t,"stem"),Sd(t,"stem"),this.path=Sn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const s=this.message(t,n,r);throw s.fatal=!0,s}info(t,n,r){const s=this.message(t,n,r);return s.fatal=void 0,s}message(t,n,r){const s=new ot(t,n,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Sd(e,t){if(e&&e.includes(Sn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Sn.sep+"`")}function Cd(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Cx(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function fA(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const hA=function(e){const r=this.constructor.prototype,s=r[e],i=function(){return s.apply(i,arguments)};return Object.setPrototypeOf(i,r),i},pA={}.hasOwnProperty;class hm extends hA{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=eA()}copy(){const t=new hm;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(kd(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Ed("data",this.frozen),this.namespace[t]=n,this):pA.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ed("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const s=n.call(t,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=il(t),r=this.parser||this.Parser;return Pd("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Pd("process",this.parser||this.Parser),jd("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(i,o){const a=il(t),l=r.parse(a);r.run(l,a,function(c,f,h){if(c||!f||!h)return u(c);const p=f,m=r.stringify(p,h);yA(m)?h.value=m:h.result=m,u(c,h)});function u(c,f){c||!f?o(c):i?i(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),Pd("processSync",this.parser||this.Parser),jd("processSync",this.compiler||this.Compiler),this.process(t,s),jx("processSync","process",n),r;function s(i,o){n=!0,xx(i),r=o}}run(t,n,r){Px(t),this.freeze();const s=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(o,a){const l=il(n);s.run(t,l,u);function u(c,f,h){const p=f||t;c?a(c):o?o(p):r(void 0,p,h)}}}runSync(t,n){let r=!1,s;return this.run(t,n,i),jx("runSync","run",r),s;function i(o,a){xx(o),s=a,r=!0}}stringify(t,n){this.freeze();const r=il(n),s=this.compiler||this.Compiler;return jd("stringify",s),Px(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(Ed("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[c,...f]=u;l(c,f)}else o(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function o(u){if(!("plugins"in u)&&!("settings"in u))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");a(u.plugins),u.settings&&(s.settings=kd(!0,s.settings,u.settings))}function a(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){const f=u[c];i(f)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,c){let f=-1,h=-1;for(;++f<r.length;)if(r[f][0]===u){h=f;break}if(h===-1)r.push([u,...c]);else if(c.length>0){let[p,...m]=c;const y=r[h][1];xh(y)&&xh(p)&&(p=kd(!0,y,p)),r[h]=[u,p,...m]}}}}const mA=new hm().freeze();function Pd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function jd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ed(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Px(e){if(!xh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function jx(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function il(e){return gA(e)?e:new ok(e)}function gA(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function yA(e){return typeof e=="string"||xA(e)}function xA(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const vA="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ex=[],Tx={allowDangerousHtml:!0},wA=/^(https?|ircs?|mailto|xmpp)$/i,bA=[{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 kA(e){const t=_A(e),n=SA(e);return CA(t.runSync(t.parse(n),n),e)}function _A(e){const t=e.rehypePlugins||Ex,n=e.remarkPlugins||Ex,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Tx}:Tx;return mA().use(nI).use(n).use(JI,r).use(t)}function SA(e){const t=e.children||"",n=new ok;return typeof t=="string"&&(n.value=t),n}function CA(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,i=t.disallowedElements,o=t.skipHtml,a=t.unwrapDisallowed,l=t.urlTransform||PA;for(const c of bA)Object.hasOwn(t,c.from)&&(""+c.from+(c.to?"use `"+c.to+"` instead":"remove it")+vA+c.id,void 0);return sk(e,u),L2(e,{Fragment:d.Fragment,components:s,ignoreInvalidStyle:!0,jsx:d.jsx,jsxs:d.jsxs,passKeys:!0,passNode:!0});function u(c,f,h){if(c.type==="raw"&&h&&typeof f=="number")return o?h.children.splice(f,1):h.children[f]={type:"text",value:c.value},f;if(c.type==="element"){let p;for(p in vd)if(Object.hasOwn(vd,p)&&Object.hasOwn(c.properties,p)){const m=c.properties[p],y=vd[p];(y===null||y.includes(c.tagName))&&(c.properties[p]=l(String(m||""),p,c))}}if(c.type==="element"){let p=n?!n.includes(c.tagName):i?i.includes(c.tagName):!1;if(!p&&r&&typeof f=="number"&&(p=!r(c,f,h)),p&&h&&typeof f=="number")return a&&c.children?h.children.splice(f,1,...c.children):h.children.splice(f,1),f}}}function PA(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||r!==-1&&t>r||wA.test(e.slice(0,t))?e:""}const Td=e=>`font-display-luminari font-semibold ${e} mt-6 mb-3 leading-tight`,jA={p:({children:e})=>d.jsx("p",{className:"mb-4",children:e}),strong:({children:e})=>d.jsx("strong",{className:"font-bold",children:e}),h1:({children:e})=>d.jsx("h1",{className:Td("text-lg"),children:e}),h2:({children:e})=>d.jsx("h2",{className:Td("text-[1.3rem]"),children:e}),h3:({children:e})=>d.jsx("h3",{className:Td("text-[1.1rem]"),children:e}),a:({children:e,href:t})=>d.jsx("a",{href:t,target:"_blank",rel:"noreferrer",className:"text-watercolor-amber-dark",children:e}),code:({children:e})=>d.jsx("code",{className:"font-mono text-[0.85em] bg-black/[6%] rounded-[3px] py-[0.1em] px-[0.35em]",children:e}),pre:({children:e})=>d.jsx("pre",{className:"font-mono text-[0.85em] bg-black/[6%] rounded-md py-3 px-4 overflow-x-auto mb-4",children:e}),ul:({children:e})=>d.jsx("ul",{className:"list-disc mb-4 pl-[1.4rem]",children:e}),ol:({children:e})=>d.jsx("ol",{className:"list-decimal mb-4 pl-[1.4rem]",children:e}),li:({children:e})=>d.jsx("li",{className:"mb-[0.4rem]",children:e}),blockquote:({children:e})=>d.jsx("blockquote",{className:"mb-4 pl-4 border-l-[3px] border-solid border-black/[15%] opacity-[0.85]",children:e})},ak=({children:e})=>d.jsx(kA,{components:jA,children:e}),EA={},Rx=e=>{let t;const n=new Set,r=(c,f)=>{const h=typeof c=="function"?c(t):c;if(!Object.is(h,t)){const p=t;t=f??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(m=>m(t,p))}},s=()=>t,l={setState:r,getState:s,getInitialState:()=>u,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(EA?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,s,l);return l},TA=e=>e?Rx(e):Rx,lk={},{useDebugValue:RA}=wi,{useSyncExternalStoreWithSelector:NA}=aT;let Nx=!1;const IA=e=>e;function AA(e,t=IA,n){(lk?"production":void 0)!=="production"&&n&&!Nx&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),Nx=!0);const r=NA(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return RA(r),r}const MA=e=>{(lk?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?TA(e):e,n=(r,s)=>AA(t,r,s);return Object.assign(n,t),n},LA=e=>MA,ck=async()=>{const e=await fetch("/api/capabilities");return e.ok?(await e.json()).capabilities:null},DA=async()=>{const e=await fetch("/api/agent/auth-status");return e.ok?await e.json():null},x9=async()=>{try{const e=await fetch("/api/connections");return e.ok?(await e.json()).connections:null}catch{return null}},v9=async e=>{try{const t=await fetch(`/api/connections/connect?id=${encodeURIComponent(e)}`,{method:"POST"});return t.ok?(await t.json()).connection:null}catch{return null}},uk=async()=>{try{const e=await fetch("/api/config");return e.ok?e.json():null}catch{return null}},w9=async e=>{try{const t=await fetch("/api/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(t.ok)return{ok:!0};const n=await t.json().catch(()=>null);return{ok:!1,error:n==null?void 0:n.error}}catch(t){return{ok:!1,error:t.message}}},OA=async()=>{try{const e=await fetch("/api/icon");if(!e.ok)return null;const t=await e.blob();return new Promise(n=>{const r=new FileReader;r.onloadend=()=>n(r.result),r.readAsDataURL(t)})}catch{return null}},b9=async e=>{try{return(await fetch("/api/icon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dataUri:e})})).ok}catch{return!1}},FA=async()=>{try{const e=await fetch("/api/package-name");return e.ok?e.json():null}catch{return null}},Dn=async(e,t="Launch failed")=>{if(!e.ok){const n=await e.json().catch(()=>({error:t}));throw new Error(n.error)}},zA=async()=>(await fetch("/api/agent/status")).json(),BA=async()=>(await fetch("/api/agent/reconcile-queue")).json(),$A=async(e,t)=>{const n=await fetch("/api/agent/launch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({planId:e,phaseIndex:t})});await Dn(n)},VA=async(e,t)=>{const n=await fetch("/api/agent/launch-audit",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({planId:e,prompt:t})});await Dn(n)},UA=async(e,t)=>{const n=await fetch("/api/agent/launch-reconcile",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({planId:e,prompt:t})});await Dn(n)},WA=async(e,t)=>{const n=await fetch("/api/agent/launch-draft",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ideaId:e,prompt:t})});await Dn(n)},HA=async(e,t)=>{const n=await fetch("/api/agent/launch-extend",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ideaId:e,prompt:t})});await Dn(n)},GA=async e=>{const t=await fetch("/api/agent/launch-suggest",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:e})});await Dn(t)},KA=async()=>{const e=await fetch("/api/agent/launch-reconcile-all",{method:"POST"});await Dn(e)},qA=async e=>{const t=await fetch("/api/agent/launch-run-all",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({planId:e})});await Dn(t)},QA=async e=>{const t=await fetch("/api/agent/launch-fix-review",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({planId:e})});await Dn(t)},YA=async(e,t,n)=>{const r=await fetch("/api/agent/feedback-message",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({planId:e,text:t,context:n})}),s=await r.json();if(!r.ok)throw new Error(s.error??"Failed to send message");return s},Ix=async(e,t,n,r)=>{const s=await fetch("/api/agent/feedback-promote",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({planId:e,index:t,target:n,note:r})});if(!s.ok){const i=await s.json().catch(()=>null);throw new Error((i==null?void 0:i.error)??`Failed to promote message (${s.status})`)}},XA=async e=>{const t=await fetch("/api/agent/feedback-summarize",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({planId:e})}),n=await t.json().catch(()=>null);if(!t.ok)throw new Error((n==null?void 0:n.error)??`Failed to summarize feedback (${t.status})`);return n},JA=async(e,t)=>{const n=await fetch("/api/agent/feedback-undo",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({planId:e,commitSha:t})}),r=await n.json();if(!n.ok)throw new Error(r.error??"Failed to undo edit");return r},ZA=async e=>{const t=await fetch("/api/agent/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({taskId:e})});await Dn(t,"Stop failed")},eM=async()=>(await fetch("/api/agent/login-relay/start",{method:"POST"})).json(),tM=async()=>(await fetch("/api/agent/login-relay/status")).json(),nM=async()=>{await fetch("/api/agent/login-relay/cancel",{method:"POST"})};function In(e,t,n,r=()=>({}),s){return async()=>{s&&e({[s]:!0});try{const i=await t();e({...n(i),...s&&{[s]:!1}})}catch(i){e({...r(i),...s&&{[s]:!1}})}}}function lr(e,t){return async(...n)=>{await t(...n),await e().loadAgentStatus()}}let rM=0;const Ax=()=>`preview-${++rM}`;function sM(e,t){return{agentAuthStatus:null,loadAgentAuthStatus:In(e,DA,n=>({agentAuthStatus:n}),()=>({agentAuthStatus:null})),agentStatus:[],loadAgentStatus:async()=>{try{const n=await zA();e({agentStatus:n});const r=t().pendingReconcile,s=r?n.find(o=>o.taskKind==="reconcile"&&o.planId===r.planId):void 0;r&&s&&(s.status==="done"?(await t().loadPlans(),e(o=>({reconcileQueue:[...o.reconcileQueue,{...r,previewId:Ax()}],pendingReconcile:null}))):s.status==="error"&&e({pendingReconcile:null}));const i=n.find(o=>o.taskKind==="batch-reconcile");if((i==null?void 0:i.status)==="done"&&!t().batchReconcileConsumed){const o=await BA();o&&o.length>0&&(await t().loadPlans(),e(a=>({reconcileQueue:[...a.reconcileQueue,...o.map(l=>({planId:l.planId,before:l.before,previewId:Ax()}))]}))),e({batchReconcileConsumed:!0})}}catch{}},launchAgent:lr(t,$A),launchPlanAudit:lr(t,VA),launchPlanReconcile:async(n,r,s)=>{const i=t().pendingReconcile;if(i)throw new Error(i.planId===n?"A reconcile is already in progress for this plan":"A reconcile is already in progress for another plan");if(t().reconcileQueue.some(o=>o.planId===n))throw new Error("Review the pending reconcile for this plan first");e({pendingReconcile:{planId:n,before:s}});try{await UA(n,r)}catch(o){throw e({pendingReconcile:null}),o}await t().loadAgentStatus()},launchPlanDraft:lr(t,WA),launchIdeaExtend:lr(t,HA),launchBatchReconcile:lr(t,async()=>{e({batchReconcileConsumed:!1}),await KA()}),launchSuggestIdeas:lr(t,GA),launchRunAll:lr(t,qA),launchFixReview:lr(t,QA),stopAgent:async n=>{try{await ZA(n)}finally{await t().loadAgentStatus()}},loginRelay:null,startLoginRelay:async()=>{try{const n=await eM();e({loginRelay:n})}catch(n){e({loginRelay:{phase:"error",authorizeUrl:null,error:n.message}})}},loadLoginRelayStatus:In(e,tM,n=>({loginRelay:n})),cancelLoginRelay:async()=>{try{await nM()}finally{e({loginRelay:null})}},pendingReconcile:null,reconcileQueue:[],removeFromReconcileQueue:n=>e(r=>({reconcileQueue:r.reconcileQueue.filter(s=>s.previewId!==n)})),batchReconcileConsumed:!1}}const iM=async()=>(await fetch("/api/tasks")).json(),k9=async e=>{const t=await fetch(`/api/tasks/output?id=${encodeURIComponent(e)}`);if(!t.ok)throw new Error(`Failed to fetch task log: ${t.status}`);return t.json()},oM=async()=>(await fetch("/api/suggestions")).json(),aM=async e=>{const t=await fetch("/api/suggestions/promote",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({suggestion:e})});if(!t.ok){const n=await t.json().catch(()=>({error:"Failed to promote suggestion"}));throw new Error(n.error)}return t.json()},lM=async e=>{const t=await fetch("/api/suggestions/dismiss",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({suggestion:e})});if(!t.ok){const n=await t.json().catch(()=>({error:"Failed to dismiss suggestion"}));throw new Error(n.error)}},cM=async()=>(await fetch("/api/docs")).json(),uM=async()=>{const e=await fetch("/api/roadmap");if(!e.ok)throw new Error(`Failed to fetch roadmap: ${e.status}`);return e.json()},dM=async(e,t,n,r)=>{const s=await fetch("/api/roadmap/promote",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({horizonTitle:e,item:t,subject:n,candidateName:r})});if(!s.ok){const i=await s.json().catch(()=>({error:"Failed to promote roadmap item"}));throw new Error(i.error)}return s.json()},_9=async(e,t,n)=>{const r=await fetch("/api/roadmap/items",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({horizonTitle:e,name:t,description:n})});if(!r.ok){const s=await r.json().catch(()=>({error:"Failed to add roadmap item"}));throw new Error(s.error)}},S9=async(e,t,n)=>{const r=await fetch("/api/roadmap/candidates",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({horizonTitle:e,itemName:t,name:n})});if(!r.ok){const s=await r.json().catch(()=>({error:"Failed to add roadmap candidate"}));throw new Error(s.error)}},fM=async()=>(await fetch("/api/consistency")).json(),dk=async()=>(await fetch("/api/ideas")).json(),hM=async()=>(await fetch("/api/archivable-ideas")).json(),pM=async e=>{const t=await fetch("/api/ideas/archive",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:e})}),n=await t.json();if(!t.ok)throw new Error(n.error??"Failed to archive ideas");return n},fk=async e=>{const t=await fetch("/api/ideas",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await t.json();if(!t.ok)throw new Error(n.error??"Failed to create idea");return n.id},hk=async(e,t)=>{const n=await fetch("/api/ideas/check-overlap",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:e,candidates:t})}),r=await n.json();if(!n.ok)throw new Error(r.error??"Failed to check overlap");return r},mM=async()=>{const e=await fetch("/api/ideas/prioritise",{method:"POST"}),t=await e.json();if(!e.ok)throw new Error(t.error??"Failed to prioritise queue");return t},pk=async()=>(await fetch("/api/plans")).json(),gM=async e=>{await fetch("/api/plans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})},yM=async(e,t)=>{const n=await fetch(`/api/plans?title=${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){const r=await n.json().catch(()=>null);throw new Error((r==null?void 0:r.error)??`Failed to update plan (${n.status})`)}};function xM(e,t){return{repoDocs:[],repoDocsLoading:!0,loadRepoDocs:async()=>{e({repoDocsLoading:!0});try{const n=await cM();e({repoDocs:n.files,repoDocsLoading:!1});const{activeDocTitle:r}=t();if(!r){const s=["MAIN.md","README.md"].find(i=>n.files.some(o=>o.name===i));s&&e({activeDocTitle:s})}}catch{e({repoDocs:[],repoDocsLoading:!1})}},activeDocTitle:null,setActiveDocTitle:n=>e({activeDocTitle:n}),docSearchQuery:"",setDocSearchQuery:n=>e({docSearchQuery:n})}}function vM(e,t){return{ideaEntries:[],loadIdeas:In(e,dk,n=>({ideaEntries:n.entries}),()=>({ideaEntries:[]})),archivableIdeas:[],loadArchivableIdeas:In(e,hM,n=>({archivableIdeas:n}),()=>({archivableIdeas:[]})),archiveIdeas:async n=>{await pM(n),await Promise.all([t().loadArchivableIdeas(),t().loadPlans(),t().loadIdeas()])}}}const Ic=e=>{const t=new Date(e);if(Number.isNaN(t.getTime()))return e;const n=Math.floor((Date.now()-t.getTime())/864e5);return n<=0?"today":n===1?"yesterday":n<7?`${n}d ago`:n<30?`${Math.floor(n/7)}w ago`:n<365?`${Math.floor(n/30)}mo ago`:`${Math.floor(n/365)}y ago`},mk=e=>{if(e.length===0)return null;const t=e.filter(n=>n.done).length;return{done:t,total:e.length,pct:Math.round(t/e.length*100)}},gk=e=>mk(e.phases),Mx=e=>{var t;return((t=gk(e))==null?void 0:t.pct)??null},wM=e=>mk([...e.phases,...e.fixes??[]]),pm=(e,t)=>e?t.find(n=>n.planId===e&&n.status!=="done"&&n.status!=="error"):void 0,mm=(e,t)=>e.status==="done"||e.status==="dropped"?e.status:pm(e.id,t)?"in-progress":e.status,bM=e=>e.kind==="question"&&(e.state??"open")==="open",Lx=(e,t)=>(e.date??"").localeCompare(t.date??""),kM=e=>e.map(t=>({plan:t,questions:(t.thread??[]).filter(bM)})).filter(t=>t.questions.length>0).map(t=>({plan:t.plan,questions:[...t.questions].sort(Lx)})).sort((t,n)=>Lx(t.questions[0],n.questions[0])),_M=(e,t)=>{if(e)return e.find(n=>n.status==="in-progress"||n.status==="review")};function Rd(e,t){const n=e.split(/(\s+)/).filter(c=>c!==""),r=t.split(/(\s+)/).filter(c=>c!==""),s=n.length,i=r.length,o=Array.from({length:s+1},()=>new Array(i+1).fill(0));for(let c=s-1;c>=0;c--)for(let f=i-1;f>=0;f--)o[c][f]=n[c]===r[f]?o[c+1][f+1]+1:Math.max(o[c+1][f],o[c][f+1]);const a=[];let l=0,u=0;for(;l<s&&u<i;)n[l]===r[u]?(a.push({type:"same",text:n[l]}),l++,u++):o[l+1][u]>=o[l][u+1]?(a.push({type:"removed",text:n[l]}),l++):(a.push({type:"added",text:r[u]}),u++);for(;l<s;)a.push({type:"removed",text:n[l]}),l++;for(;u<i;)a.push({type:"added",text:r[u]}),u++;return SM(a)}function SM(e){const t=[];for(const n of e){const r=t[t.length-1];r&&r.type===n.type?r.text+=n.text:t.push({...n})}return t}const CM=["idea","planned","in-progress","review","done","dropped"],PM=["feat","fix","chore","docs","refactor"],jM=["claude-code","opencode"],yk={"claude-code":"Claude Code",opencode:"OpenCode"},C9={"claude-code":{model:["opus","sonnet","fable","haiku"],effort:["low","medium","high","xhigh","max"]},opencode:{model:null}},P9={phase:{agent:"opencode"},planDraft:{agent:"claude-code"},ideaExtend:{agent:"claude-code"},commitSuggest:{agent:"claude-code"},feedback:{agent:"claude-code",model:"sonnet",effort:"medium"}},EM=["in-progress","review","planned","idea"],TM=["open"],gm={statuses:EM,tags:[],search:"",sortKey:"order",sortDirection:"asc",noteStatuses:TM,subject:null},Dx={"in-progress":0,review:1,planned:2,idea:3,done:4,dropped:5},ol=e=>{const t=new Date(e.updated??e.created).getTime();return Number.isNaN(t)?0:t},Ox=e=>{const t=new Date(e.created).getTime();return Number.isNaN(t)?0:t},Fx=e=>{var n;const t=(n=e.id)==null?void 0:n.match(/(\d+)\s*$/);return t?Number(t[1]):Number.POSITIVE_INFINITY},Nd=(e,t)=>{const n=t.trim().toLowerCase();return n?e.title.toLowerCase().includes(n)||e.body.toLowerCase().includes(n):!0},zx=(e,t)=>t.size===0?!0:e.tags.some(n=>t.has(n)),Do=(e,t)=>t===null||e===t,ym=(e,t,n,r="asc")=>{if(n==="order")return e.order!==void 0&&t.order!==void 0?(r==="desc"?-1:1)*(e.order-t.order):e.order!==void 0?-1:t.order!==void 0?1:Ox(e)-Ox(t);const s=(()=>{switch(n){case"status":{const i=Dx[e.status]-Dx[t.status];return i!==0?i:ol(t)-ol(e)}case"updated":return ol(t)-ol(e);case"title":return e.title.localeCompare(t.title);case"id":return Fx(e)-Fx(t);case"progress":return(Mx(t)??-1)-(Mx(e)??-1);default:return 0}})();return r==="desc"?-s:s},wh=(e,t)=>{const n={};for(const r of e)for(const s of t(r))n[String(s)]=(n[String(s)]??0)+1;return n},Ul=(e,t=gm)=>{const n=new Set(t.tags),r=new Set(t.statuses),s=wh(e.filter(a=>zx(a,n)&&Nd(a,t.search)&&Do(a.subject,t.subject)),a=>[a.status]);for(const a of CM)s[a]??(s[a]=0);const i=wh(e.filter(a=>r.has(a.status)&&Nd(a,t.search)&&Do(a.subject,t.subject)),a=>a.tags);return{rows:e.filter(a=>r.has(a.status)&&zx(a,n)&&Nd(a,t.search)&&Do(a.subject,t.subject)).sort((a,l)=>ym(a,l,t.sortKey,t.sortDirection)),statusCounts:s,tagCounts:i}},RM=["open","done","dropped"],NM={open:"idea",done:"done",dropped:"dropped"},Id=(e,t)=>{const n=t.trim().toLowerCase();return n?e.title.toLowerCase().includes(n)||e.body.toLowerCase().includes(n):!0},IM=e=>e.type==="plan"?e.plan.subject:e.idea.subject,AM=(e,t)=>{var a;const n=[],r=new Map,s=[];for(const l of e){const u=IM(l);if(!u||t&&!t.includes(u)){s.push(l);continue}r.has(u)||(n.push(u),r.set(u,[])),(a=r.get(u))==null||a.push(l)}const o=(t?t.filter(l=>r.has(l)):n).map(l=>({subject:l,rows:r.get(l)??[]}));return s.length>0&&o.push({subject:null,rows:s}),o},Bx=e=>e.type==="plan"?e.plan:e.type==="note"?{title:e.idea.title,id:e.idea.id??void 0,status:NM[e.idea.status??"open"],created:e.idea.created??"",tags:[],body:e.idea.body,phases:[],order:e.idea.order}:{...(e.children.length>0?[...e.children].sort((n,r)=>ym(n,r,"status"))[0]:void 0)??{status:"idea",created:e.idea.created??"",tags:[],body:e.idea.body,phases:[]},title:e.idea.title,id:e.idea.id??void 0,order:e.idea.order},MM=(e,t,n=gm)=>{const{statusCounts:r,tagCounts:s}=Ul(e,n),i=t.filter(p=>p.kind==="note"),o=t.filter(p=>p.kind!=="note"),a=new Set(o.map(p=>p.id).filter(p=>!!p)),l=new Map,u=[];for(const p of e)if(p.idea&&a.has(p.idea)){const m=l.get(p.idea)??[];m.push(p),l.set(p.idea,m)}else u.push(p);const c=new Set(n.noteStatuses),f=wh(i.filter(p=>Id(p,n.search)),p=>[p.status??"open"]);for(const p of RM)f[p]??(f[p]=0);const h=Ul(u,n).rows.map(p=>({type:"plan",plan:p}));for(const p of o){const m=p.id?l.get(p.id)??[]:[],y=Ul(m,n).rows;!Do(p.subject,n.subject)&&y.length===0||y.length===0&&(m.length>0||!Id(p,n.search))||h.push({type:"idea-group",idea:p,children:y})}for(const p of i)c.has(p.status??"open")&&Id(p,n.search)&&Do(p.subject,n.subject)&&h.push({type:"note",idea:p});return h.sort((p,m)=>ym(Bx(p),Bx(m),n.sortKey,n.sortDirection)),{rows:h,statusCounts:r,tagCounts:s,noteStatusCounts:f}},LM=.2,DM=5,xk=3,vk=2,wk=1,OM=xk+vk+wk,FM=new Set(["a","an","the","and","or","of","to","in","on","for","is","at","with","this","that","it","as","be","by","are","was","were","from","into","so","but","not","its"]),al=e=>{const t=e.toLowerCase().split(/[^a-z0-9]+/).filter(n=>n.length>=2&&!FM.has(n));return new Set(t)},Ad=(e,t)=>{let n=0;for(const r of e)t.has(r)&&(n+=1);return n};function zM(e,t,n={}){const{threshold:r=LM,limit:s=DM}=n,i=al(e);if(i.size===0)return[];const o=[];for(const a of t){const l=al(a.title),u=al(a.body),c=al((a.tags??[]).join(" ")),h=(Ad(i,l)*xk+Ad(i,c)*vk+Ad(i,u)*wk)/(i.size*OM);h>=r&&o.push({candidate:a,score:h})}return o.sort((a,l)=>l.score-a.score),o.slice(0,s)}const BM=e=>{if(!e.file)return;const t=e.line_start??e.line;if(!t)return e.file;const n=e.line_end&&e.line_end!==t?`-${e.line_end}`:"";return`${e.file}:${t}${n}`},$M=(e,t)=>{const n=e.description??e.title??e.summary;if(!(n!=null&&n.trim()))throw new Error(`Finding ${t+1} has no description/title/summary`);const r=[BM(e),e.failure_scenario??e.reasoning].filter(Boolean).join(" — ");return{done:!1,text:n.trim(),description:r||void 0,source:"review"}},VM=e=>{let t;try{t=JSON.parse(e)}catch{throw new Error("Not valid JSON")}const n=Array.isArray(t)?t:Array.isArray(t==null?void 0:t.findings)?t.findings:null;if(!n)throw new Error('Expected a JSON array of findings, or an object with a "findings" array');if(n.length===0)throw new Error("No findings to add");return n.map((r,s)=>$M(r,s))};function UM(e,t){return{plans:null,plansLoading:!1,plansError:null,loadPlans:In(e,pk,n=>({plans:n,plansError:null}),n=>({plansError:String(n)}),"plansLoading"),planFilters:gm,togglePlanStatus:n=>e(r=>({planFilters:{...r.planFilters,statuses:r.planFilters.statuses.includes(n)?r.planFilters.statuses.filter(s=>s!==n):[...r.planFilters.statuses,n]}})),togglePlanTag:n=>e(r=>({planFilters:{...r.planFilters,tags:r.planFilters.tags.includes(n)?r.planFilters.tags.filter(s=>s!==n):[...r.planFilters.tags,n]}})),toggleNoteStatus:n=>e(r=>({planFilters:{...r.planFilters,noteStatuses:r.planFilters.noteStatuses.includes(n)?r.planFilters.noteStatuses.filter(s=>s!==n):[...r.planFilters.noteStatuses,n]}})),setPlanSearch:n=>e(r=>({planFilters:{...r.planFilters,search:n}})),setSubjectFilter:n=>e(r=>({planFilters:{...r.planFilters,subject:n}})),setPlanSortKey:n=>e(r=>({planFilters:{...r.planFilters,sortKey:n}})),togglePlanSortDirection:()=>e(n=>({planFilters:{...n.planFilters,sortDirection:n.planFilters.sortDirection==="asc"?"desc":"asc"}})),detailView:"details",setDetailView:n=>e({detailView:n})}}async function Xr(e,t){if(e.ok)return;const n=await e.json().catch(()=>({error:t}));throw new Error(n.error)}const WM=async()=>{const e=await fetch("/api/git/status");return await Xr(e,"Failed to load git status"),e.json()},j9=async()=>{const e=await fetch("/api/git/diff");return await Xr(e,"Failed to load diff"),(await e.json()).files},bk=async(e,t,n)=>{const r=await fetch("/api/git/commit",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:e,title:t,message:n})});await Xr(r,"Commit failed")},HM=async()=>{const e=await fetch("/api/git/push",{method:"POST"});await Xr(e,"Push failed")},kk=async e=>{const t=await fetch("/api/git/suggest-commit-message",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:e})});return await Xr(t,"Failed to suggest a commit message"),t.json()},GM=async()=>{const e=await fetch("/api/git/sync",{method:"POST"});if(e.status===202){const t=await e.json();return t.conflictPrompt?{ok:!1,recovering:!1,conflictPrompt:t.conflictPrompt,message:t.error}:{ok:!1,recovering:t.recovering,message:t.error}}return await Xr(e,"Sync failed"),{ok:!0}},KM=async()=>{const e=await fetch("/api/git/pull",{method:"POST"});await Xr(e,"Pull failed")},qM=async()=>{const e=await fetch("/api/git/fix-divergence",{method:"POST"});if(e.status===202){const t=await e.json();return t.conflictPrompt?{ok:!1,recovering:!1,conflictPrompt:t.conflictPrompt,message:t.error}:{ok:!1,recovering:t.recovering,message:t.error}}return await Xr(e,"Fix failed"),{ok:!0}},QM=async e=>{const t=await fetch("/api/git/resolve-conflict",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:e})});try{return await t.json()}catch{return{ok:!1,error:`Unexpected response (status ${t.status})`}}},YM=async e=>{const t=await fetch("/api/git/branch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({planId:e})}),n=await t.json();if(!t.ok)throw new Error(n.error??"Failed to create branch");return n.branch},XM=async()=>(await fetch("/api/status")).json(),JM=async e=>{await fetch(`/api/status/check?name=${e}`,{method:"POST"})},ZM=async()=>{await fetch("/api/status/fix",{method:"POST"})},eL=async()=>{const e=await fetch("/api/refresh",{method:"POST"});if(!e.ok)throw new Error(`Failed to drop caches: ${e.statusText}`)};function tL(e,t){return{status:null,refreshing:!1,loadStatus:In(e,XM,n=>({status:n})),refreshAll:async()=>{e({refreshing:!0});try{await eL().catch(()=>{}),await Promise.all([t().loadPlans(),t().loadIdeas(),t().loadArchivableIdeas(),t().loadSuggestions(),t().loadStatus(),t().loadConsistency(),t().loadGitStatus(),t().loadAgentStatus(),t().loadAgentAuthStatus()]);const n=t().plansError;return n?{ok:!1,error:n}:{ok:!0}}finally{e({refreshing:!1})}},runCheck:async n=>{try{await JM(n)}catch{}},fixQuality:async()=>{try{await ZM()}catch{}},commitInFlight:!1,setCommitInFlight:n=>e({commitInFlight:n}),activeGitAction:null,setActiveGitAction:n=>e({activeGitAction:n}),quickCommit:async()=>{const{gitStatus:n,loadGitStatus:r,commitInFlight:s}=t();if(s)return{ok:!1,error:"A commit is already in progress"};if(!n||n.length===0)return{ok:!1,error:"Nothing to commit"};const i=n.map(o=>o.path);e({commitInFlight:!0});try{const{title:o,message:a}=await kk(i);return await bk(i,o,a||void 0),await r()?{ok:!0,title:o}:{ok:!0,title:o,warning:"Committed, but the git status refresh failed — reload to confirm"}}catch(o){return{ok:!1,error:o.message}}finally{e({commitInFlight:!1})}},consistency:[],loadConsistency:In(e,fM,n=>({consistency:n})),gitStatus:null,gitBranch:null,gitAhead:0,gitBehind:0,gitDiverged:!1,gitBranchHygiene:null,loadGitStatus:async()=>{try{const{branch:n,entries:r,ahead:s,behind:i,diverged:o,branchHygiene:a}=await WM();return e({gitStatus:r,gitBranch:n,gitAhead:s,gitBehind:i,gitDiverged:o,gitBranchHygiene:a}),!0}catch{return!1}},capabilities:[],loadCapabilities:In(e,ck,n=>({capabilities:n??[]}),()=>({capabilities:[]}))}}function nL(e,t){return{suggestions:[],suggestionsLoading:!0,loadSuggestions:In(e,oM,n=>({suggestions:n.entries}),()=>({suggestions:[]}),"suggestionsLoading"),promoteSuggestion:async n=>{const{id:r}=await aM(n);return await Promise.all([t().loadSuggestions(),t().loadPlans(),t().loadIdeas()]),r},dismissSuggestion:async n=>{await lM(n),await t().loadSuggestions()},promoteRoadmapItem:async(n,r,s,i)=>{const{id:o}=await dM(n,r,s,i);return await Promise.all([t().loadPlans(),t().loadIdeas()]),o},launchPrioritise:async()=>{const n=await mM();return await t().refreshAll(),n}}}function rL(e){return{taskLog:[],taskLogLoading:!0,loadTaskLog:In(e,iM,t=>({taskLog:t.entries}),()=>({taskLog:[]}),"taskLogLoading")}}const O=LA()((e,t)=>({...UM(e),...vM(e,t),...nL(e,t),...rL(e),...xM(e,t),...tL(e,t),...sM(e,t)})),xm=e=>e.agentStatus.some(t=>t.status!=="done"&&t.status!=="error"),Jr=e=>e.capabilities.length===0||e.capabilities.some(t=>t.id.startsWith("agent:")&&t.status==="ok"),sL=e=>{const t=e.capabilities.find(n=>n.id==="gh");return t===void 0||t.status==="ok"},iL=e=>e.capabilities.filter(t=>t.status!=="ok").length,oL=e=>{var t;return((t=e.agentAuthStatus)==null?void 0:t.loggedIn)===!1};function aL(e){return e.includes("running")?"running":e.includes("fail")?"fail":e.every(t=>t==="stale")?"stale":"pass"}function _k(e){var t,n,r,s;return{qualityStatus:aL([((t=e==null?void 0:e.lint)==null?void 0:t.status)??"stale",((n=e==null?void 0:e.format)==null?void 0:n.status)??"stale"]),testStatus:((r=e==null?void 0:e.test)==null?void 0:r.status)??"stale",consistencyStatus:((s=e==null?void 0:e.consistency)==null?void 0:s.status)??"stale"}}function Sk(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=Sk(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function lL(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=Sk(e))&&(r&&(r+=" "),r+=t);return r}const vm="-",cL=e=>{const t=dL(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(vm);return a[0]===""&&a.length!==1&&a.shift(),Ck(a,t)||uL(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},Ck=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?Ck(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(vm);return(o=t.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},$x=/^\[(.+)\]$/,uL=e=>{if($x.test(e)){const t=$x.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},dL=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return hL(Object.entries(e.classGroups),n).forEach(([i,o])=>{bh(o,r,i,t)}),r},bh=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:Vx(t,s);i.classGroupId=n;return}if(typeof s=="function"){if(fL(s)){bh(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,o])=>{bh(o,Vx(t,i),n,r)})})},Vx=(e,t)=>{let n=e;return t.split(vm).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},fL=e=>e.isThemeGetter,hL=(e,t)=>t?e.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[t+o,a])):i);return[n,s]}):e,pL=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(i,o)=>{n.set(i,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let o=n.get(i);if(o!==void 0)return o;if((o=r.get(i))!==void 0)return s(i,o),o},set(i,o){n.has(i)?n.set(i,o):s(i,o)}}},Pk="!",mL=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],i=t.length,o=a=>{const l=[];let u=0,c=0,f;for(let w=0;w<a.length;w++){let g=a[w];if(u===0){if(g===s&&(r||a.slice(w,w+i)===t)){l.push(a.slice(c,w)),c=w+i;continue}if(g==="/"){f=w;continue}}g==="["?u++:g==="]"&&u--}const h=l.length===0?a:a.substring(c),p=h.startsWith(Pk),m=p?h.substring(1):h,y=f&&f>c?f-c:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:y}};return n?a=>n({className:a,parseClassName:o}):o},gL=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},yL=e=>({cache:pL(e.cacheSize),parseClassName:mL(e),...cL(e)}),xL=/\s+/,vL=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,i=[],o=e.trim().split(xL);let a="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:c,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:p}=n(u);let m=!!p,y=r(m?h.substring(0,p):h);if(!y){if(!m){a=u+(a.length>0?" "+a:a);continue}if(y=r(h),!y){a=u+(a.length>0?" "+a:a);continue}m=!1}const w=gL(c).join(":"),g=f?w+Pk:w,x=g+y;if(i.includes(x))continue;i.push(x);const v=s(y,m);for(let k=0;k<v.length;++k){const S=v[k];i.push(g+S)}a=u+(a.length>0?" "+a:a)}return a};function wL(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=jk(t))&&(r&&(r+=" "),r+=n);return r}const jk=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=jk(e[r]))&&(n&&(n+=" "),n+=t);return n};function bL(e,...t){let n,r,s,i=o;function o(l){const u=t.reduce((c,f)=>f(c),e());return n=yL(u),r=n.cache.get,s=n.cache.set,i=a,a(l)}function a(l){const u=r(l);if(u)return u;const c=vL(l,n);return s(l,c),c}return function(){return i(wL.apply(null,arguments))}}const we=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Ek=/^\[(?:([a-z-]+):)?(.+)\]$/i,kL=/^\d+\/\d+$/,_L=new Set(["px","full","screen"]),SL=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,CL=/\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$/,PL=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,jL=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,EL=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Bn=e=>vi(e)||_L.has(e)||kL.test(e),cr=e=>Bi(e,"length",DL),vi=e=>!!e&&!Number.isNaN(Number(e)),Md=e=>Bi(e,"number",vi),uo=e=>!!e&&Number.isInteger(Number(e)),TL=e=>e.endsWith("%")&&vi(e.slice(0,-1)),te=e=>Ek.test(e),ur=e=>SL.test(e),RL=new Set(["length","size","percentage"]),NL=e=>Bi(e,RL,Tk),IL=e=>Bi(e,"position",Tk),AL=new Set(["image","url"]),ML=e=>Bi(e,AL,FL),LL=e=>Bi(e,"",OL),fo=()=>!0,Bi=(e,t,n)=>{const r=Ek.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},DL=e=>CL.test(e)&&!PL.test(e),Tk=()=>!1,OL=e=>jL.test(e),FL=e=>EL.test(e),zL=()=>{const e=we("colors"),t=we("spacing"),n=we("blur"),r=we("brightness"),s=we("borderColor"),i=we("borderRadius"),o=we("borderSpacing"),a=we("borderWidth"),l=we("contrast"),u=we("grayscale"),c=we("hueRotate"),f=we("invert"),h=we("gap"),p=we("gradientColorStops"),m=we("gradientColorStopPositions"),y=we("inset"),w=we("margin"),g=we("opacity"),x=we("padding"),v=we("saturate"),k=we("scale"),S=we("sepia"),b=we("skew"),P=we("space"),j=we("translate"),R=()=>["auto","contain","none"],T=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto",te,t],A=()=>[te,t],F=()=>["",Bn,cr],z=()=>["auto",vi,te],E=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],D=()=>["solid","dashed","dotted","double","none"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],M=()=>["start","end","center","between","around","evenly","stretch"],$=()=>["","0",te],C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>[vi,te];return{cacheSize:500,separator:":",theme:{colors:[fo],spacing:[Bn,cr],blur:["none","",ur,te],brightness:V(),borderColor:[e],borderRadius:["none","","full",ur,te],borderSpacing:A(),borderWidth:F(),contrast:V(),grayscale:$(),hueRotate:V(),invert:$(),gap:A(),gradientColorStops:[e],gradientColorStopPositions:[TL,cr],inset:I(),margin:I(),opacity:V(),padding:A(),saturate:V(),scale:V(),sepia:$(),skew:V(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",te]}],container:["container"],columns:[{columns:[ur]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],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:[...E(),te]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",uo,te]}],basis:[{basis:I()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",te]}],grow:[{grow:$()}],shrink:[{shrink:$()}],order:[{order:["first","last","none",uo,te]}],"grid-cols":[{"grid-cols":[fo]}],"col-start-end":[{col:["auto",{span:["full",uo,te]},te]}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":[fo]}],"row-start-end":[{row:["auto",{span:[uo,te]},te]}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",te]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",te]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...M()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...M(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...M(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",te,t]}],"min-w":[{"min-w":[te,t,"min","max","fit"]}],"max-w":[{"max-w":[te,t,"none","full","min","max","fit","prose",{screen:[ur]},ur]}],h:[{h:[te,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[te,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[te,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[te,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ur,cr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Md]}],"font-family":[{font:[fo]}],"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:["tighter","tight","normal","wide","wider","widest",te]}],"line-clamp":[{"line-clamp":["none",vi,Md]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Bn,te]}],"list-image":[{"list-image":["none",te]}],"list-style-type":[{list:["none","disc","decimal",te]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Bn,cr]}],"underline-offset":[{"underline-offset":["auto",Bn,te]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",te]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",te]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...E(),IL]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",NL]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ML]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...D(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:D()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...D()]}],"outline-offset":[{"outline-offset":[Bn,te]}],"outline-w":[{outline:[Bn,cr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[Bn,cr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ur,LL]}],"shadow-color":[{shadow:[fo]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...B(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",ur,te]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[f]}],saturate:[{saturate:[v]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",te]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",te]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",te]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[k]}],"scale-x":[{"scale-x":[k]}],"scale-y":[{"scale-y":[k]}],rotate:[{rotate:[uo,te]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"skew-x":[{"skew-x":[b]}],"skew-y":[{"skew-y":[b]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",te]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",te]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"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",te]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Bn,cr,Md]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},BL=bL(zL);function Ld(e,t,n){if(e&&e.length){const[r,s]=t,i=Math.PI/180*n,o=Math.cos(i),a=Math.sin(i);for(const l of e){const[u,c]=l;l[0]=(u-r)*o-(c-s)*a+r,l[1]=(u-r)*a+(c-s)*o+s}}}function $L(e,t){return e[0]===t[0]&&e[1]===t[1]}function VL(e,t,n,r=1){const s=n,i=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,a=[0,0];if(s)for(const u of o)Ld(u,a,s);const l=function(u,c,f){const h=[];for(const x of u){const v=[...x];$L(v[0],v[v.length-1])||v.push([v[0][0],v[0][1]]),v.length>2&&h.push(v)}const p=[];c=Math.max(c,.1);const m=[];for(const x of h)for(let v=0;v<x.length-1;v++){const k=x[v],S=x[v+1];if(k[1]!==S[1]){const b=Math.min(k[1],S[1]);m.push({ymin:b,ymax:Math.max(k[1],S[1]),x:b===k[1]?k[0]:S[0],islope:(S[0]-k[0])/(S[1]-k[1])})}}if(m.sort((x,v)=>x.ymin<v.ymin?-1:x.ymin>v.ymin?1:x.x<v.x?-1:x.x>v.x?1:x.ymax===v.ymax?0:(x.ymax-v.ymax)/Math.abs(x.ymax-v.ymax)),!m.length)return p;let y=[],w=m[0].ymin,g=0;for(;y.length||m.length;){if(m.length){let x=-1;for(let v=0;v<m.length&&!(m[v].ymin>w);v++)x=v;m.splice(0,x+1).forEach(v=>{y.push({s:w,edge:v})})}if(y=y.filter(x=>!(x.edge.ymax<=w)),y.sort((x,v)=>x.edge.x===v.edge.x?0:(x.edge.x-v.edge.x)/Math.abs(x.edge.x-v.edge.x)),(f!==1||g%c==0)&&y.length>1)for(let x=0;x<y.length;x+=2){const v=x+1;if(v>=y.length)break;const k=y[x].edge,S=y[v].edge;p.push([[Math.round(k.x),w],[Math.round(S.x),w]])}w+=f,y.forEach(x=>{x.edge.x=x.edge.x+f*x.edge.islope}),g++}return p}(o,i,r);if(s){for(const u of o)Ld(u,a,-s);(function(u,c,f){const h=[];u.forEach(p=>h.push(...p)),Ld(h,c,f)})(l,a,-s)}return l}function wa(e,t){var n;const r=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let i=1;return t.roughness>=1&&(((n=t.randomizer)===null||n===void 0?void 0:n.next())||Math.random())>.7&&(i=s),VL(e,s,r,i||1)}class wm{constructor(t){this.helper=t}fillPolygons(t,n){return this._fillPolygons(t,n)}_fillPolygons(t,n){const r=wa(t,n);return{type:"fillSketch",ops:this.renderLines(r,n)}}renderLines(t,n){const r=[];for(const s of t)r.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],n));return r}}function wu(e){const t=e[0],n=e[1];return Math.sqrt(Math.pow(t[0]-n[0],2)+Math.pow(t[1]-n[1],2))}class UL extends wm{fillPolygons(t,n){let r=n.hachureGap;r<0&&(r=4*n.strokeWidth),r=Math.max(r,.1);const s=wa(t,Object.assign({},n,{hachureGap:r})),i=Math.PI/180*n.hachureAngle,o=[],a=.5*r*Math.cos(i),l=.5*r*Math.sin(i);for(const[u,c]of s)wu([u,c])&&o.push([[u[0]-a,u[1]+l],[...c]],[[u[0]+a,u[1]-l],[...c]]);return{type:"fillSketch",ops:this.renderLines(o,n)}}}class WL extends wm{fillPolygons(t,n){const r=this._fillPolygons(t,n),s=Object.assign({},n,{hachureAngle:n.hachureAngle+90}),i=this._fillPolygons(t,s);return r.ops=r.ops.concat(i.ops),r}}class HL{constructor(t){this.helper=t}fillPolygons(t,n){const r=wa(t,n=Object.assign({},n,{hachureAngle:0}));return this.dotsOnLines(r,n)}dotsOnLines(t,n){const r=[];let s=n.hachureGap;s<0&&(s=4*n.strokeWidth),s=Math.max(s,.1);let i=n.fillWeight;i<0&&(i=n.strokeWidth/2);const o=s/4;for(const a of t){const l=wu(a),u=l/s,c=Math.ceil(u)-1,f=l-c*s,h=(a[0][0]+a[1][0])/2-s/4,p=Math.min(a[0][1],a[1][1]);for(let m=0;m<c;m++){const y=p+f+m*s,w=h-o+2*Math.random()*o,g=y-o+2*Math.random()*o,x=this.helper.ellipse(w,g,i,i,n);r.push(...x.ops)}}return{type:"fillSketch",ops:r}}}class GL{constructor(t){this.helper=t}fillPolygons(t,n){const r=wa(t,n);return{type:"fillSketch",ops:this.dashedLine(r,n)}}dashedLine(t,n){const r=n.dashOffset<0?n.hachureGap<0?4*n.strokeWidth:n.hachureGap:n.dashOffset,s=n.dashGap<0?n.hachureGap<0?4*n.strokeWidth:n.hachureGap:n.dashGap,i=[];return t.forEach(o=>{const a=wu(o),l=Math.floor(a/(r+s)),u=(a+s-l*(r+s))/2;let c=o[0],f=o[1];c[0]>f[0]&&(c=o[1],f=o[0]);const h=Math.atan((f[1]-c[1])/(f[0]-c[0]));for(let p=0;p<l;p++){const m=p*(r+s),y=m+r,w=[c[0]+m*Math.cos(h)+u*Math.cos(h),c[1]+m*Math.sin(h)+u*Math.sin(h)],g=[c[0]+y*Math.cos(h)+u*Math.cos(h),c[1]+y*Math.sin(h)+u*Math.sin(h)];i.push(...this.helper.doubleLineOps(w[0],w[1],g[0],g[1],n))}}),i}}class KL{constructor(t){this.helper=t}fillPolygons(t,n){const r=n.hachureGap<0?4*n.strokeWidth:n.hachureGap,s=n.zigzagOffset<0?r:n.zigzagOffset,i=wa(t,n=Object.assign({},n,{hachureGap:r+s}));return{type:"fillSketch",ops:this.zigzagLines(i,s,n)}}zigzagLines(t,n,r){const s=[];return t.forEach(i=>{const o=wu(i),a=Math.round(o/(2*n));let l=i[0],u=i[1];l[0]>u[0]&&(l=i[1],u=i[0]);const c=Math.atan((u[1]-l[1])/(u[0]-l[0]));for(let f=0;f<a;f++){const h=2*f*n,p=2*(f+1)*n,m=Math.sqrt(2*Math.pow(n,2)),y=[l[0]+h*Math.cos(c),l[1]+h*Math.sin(c)],w=[l[0]+p*Math.cos(c),l[1]+p*Math.sin(c)],g=[y[0]+m*Math.cos(c+Math.PI/4),y[1]+m*Math.sin(c+Math.PI/4)];s.push(...this.helper.doubleLineOps(y[0],y[1],g[0],g[1],r),...this.helper.doubleLineOps(g[0],g[1],w[0],w[1],r))}}),s}}const ht={};class qL{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const QL=0,Dd=1,Ux=2,ll={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function Od(e,t){return e.type===t}function bm(e){const t=[],n=function(o){const a=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))a[a.length]={type:QL,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];a[a.length]={type:Dd,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return a[a.length]={type:Ux,text:""},a}(e);let r="BOD",s=0,i=n[s];for(;!Od(i,Ux);){let o=0;const a=[];if(r==="BOD"){if(i.text!=="M"&&i.text!=="m")return bm("M0,0"+e);s++,o=ll[i.text],r=i.text}else Od(i,Dd)?o=ll[r]:(s++,o=ll[i.text],r=i.text);if(!(s+o<n.length))throw new Error("Path data ended short");for(let l=s;l<s+o;l++){const u=n[l];if(!Od(u,Dd))throw new Error("Param not a number: "+r+","+u.text);a[a.length]=+u.text}if(typeof ll[r]!="number")throw new Error("Bad segment: "+r);{const l={key:r,data:a};t.push(l),s+=o,i=n[s],r==="M"&&(r="L"),r==="m"&&(r="l")}}return t}function Rk(e){let t=0,n=0,r=0,s=0;const i=[];for(const{key:o,data:a}of e)switch(o){case"M":i.push({key:"M",data:[...a]}),[t,n]=a,[r,s]=a;break;case"m":t+=a[0],n+=a[1],i.push({key:"M",data:[t,n]}),r=t,s=n;break;case"L":i.push({key:"L",data:[...a]}),[t,n]=a;break;case"l":t+=a[0],n+=a[1],i.push({key:"L",data:[t,n]});break;case"C":i.push({key:"C",data:[...a]}),t=a[4],n=a[5];break;case"c":{const l=a.map((u,c)=>c%2?u+n:u+t);i.push({key:"C",data:l}),t=l[4],n=l[5];break}case"Q":i.push({key:"Q",data:[...a]}),t=a[2],n=a[3];break;case"q":{const l=a.map((u,c)=>c%2?u+n:u+t);i.push({key:"Q",data:l}),t=l[2],n=l[3];break}case"A":i.push({key:"A",data:[...a]}),t=a[5],n=a[6];break;case"a":t+=a[5],n+=a[6],i.push({key:"A",data:[a[0],a[1],a[2],a[3],a[4],t,n]});break;case"H":i.push({key:"H",data:[...a]}),t=a[0];break;case"h":t+=a[0],i.push({key:"H",data:[t]});break;case"V":i.push({key:"V",data:[...a]}),n=a[0];break;case"v":n+=a[0],i.push({key:"V",data:[n]});break;case"S":i.push({key:"S",data:[...a]}),t=a[2],n=a[3];break;case"s":{const l=a.map((u,c)=>c%2?u+n:u+t);i.push({key:"S",data:l}),t=l[2],n=l[3];break}case"T":i.push({key:"T",data:[...a]}),t=a[0],n=a[1];break;case"t":t+=a[0],n+=a[1],i.push({key:"T",data:[t,n]});break;case"Z":case"z":i.push({key:"Z",data:[]}),t=r,n=s}return i}function Nk(e){const t=[];let n="",r=0,s=0,i=0,o=0,a=0,l=0;for(const{key:u,data:c}of e){switch(u){case"M":t.push({key:"M",data:[...c]}),[r,s]=c,[i,o]=c;break;case"C":t.push({key:"C",data:[...c]}),r=c[4],s=c[5],a=c[2],l=c[3];break;case"L":t.push({key:"L",data:[...c]}),[r,s]=c;break;case"H":r=c[0],t.push({key:"L",data:[r,s]});break;case"V":s=c[0],t.push({key:"L",data:[r,s]});break;case"S":{let f=0,h=0;n==="C"||n==="S"?(f=r+(r-a),h=s+(s-l)):(f=r,h=s),t.push({key:"C",data:[f,h,...c]}),a=c[0],l=c[1],r=c[2],s=c[3];break}case"T":{const[f,h]=c;let p=0,m=0;n==="Q"||n==="T"?(p=r+(r-a),m=s+(s-l)):(p=r,m=s);const y=r+2*(p-r)/3,w=s+2*(m-s)/3,g=f+2*(p-f)/3,x=h+2*(m-h)/3;t.push({key:"C",data:[y,w,g,x,f,h]}),a=p,l=m,r=f,s=h;break}case"Q":{const[f,h,p,m]=c,y=r+2*(f-r)/3,w=s+2*(h-s)/3,g=p+2*(f-p)/3,x=m+2*(h-m)/3;t.push({key:"C",data:[y,w,g,x,p,m]}),a=f,l=h,r=p,s=m;break}case"A":{const f=Math.abs(c[0]),h=Math.abs(c[1]),p=c[2],m=c[3],y=c[4],w=c[5],g=c[6];f===0||h===0?(t.push({key:"C",data:[r,s,w,g,w,g]}),r=w,s=g):(r!==w||s!==g)&&(Ik(r,s,w,g,f,h,p,m,y).forEach(function(x){t.push({key:"C",data:x})}),r=w,s=g);break}case"Z":t.push({key:"Z",data:[]}),r=i,s=o}n=u}return t}function ho(e,t,n){return[e*Math.cos(n)-t*Math.sin(n),e*Math.sin(n)+t*Math.cos(n)]}function Ik(e,t,n,r,s,i,o,a,l,u){const c=(f=o,Math.PI*f/180);var f;let h=[],p=0,m=0,y=0,w=0;if(u)[p,m,y,w]=u;else{[e,t]=ho(e,t,-c),[n,r]=ho(n,r,-c);const F=(e-n)/2,z=(t-r)/2;let E=F*F/(s*s)+z*z/(i*i);E>1&&(E=Math.sqrt(E),s*=E,i*=E);const D=s*s,B=i*i,M=D*B-D*z*z-B*F*F,$=D*z*z+B*F*F,C=(a===l?-1:1)*Math.sqrt(Math.abs(M/$));y=C*s*z/i+(e+n)/2,w=C*-i*F/s+(t+r)/2,p=Math.asin(parseFloat(((t-w)/i).toFixed(9))),m=Math.asin(parseFloat(((r-w)/i).toFixed(9))),e<y&&(p=Math.PI-p),n<y&&(m=Math.PI-m),p<0&&(p=2*Math.PI+p),m<0&&(m=2*Math.PI+m),l&&p>m&&(p-=2*Math.PI),!l&&m>p&&(m-=2*Math.PI)}let g=m-p;if(Math.abs(g)>120*Math.PI/180){const F=m,z=n,E=r;m=l&&m>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,h=Ik(n=y+s*Math.cos(m),r=w+i*Math.sin(m),z,E,s,i,o,0,l,[m,F,y,w])}g=m-p;const x=Math.cos(p),v=Math.sin(p),k=Math.cos(m),S=Math.sin(m),b=Math.tan(g/4),P=4/3*s*b,j=4/3*i*b,R=[e,t],T=[e+P*v,t-j*x],I=[n+P*S,r-j*k],A=[n,r];if(T[0]=2*R[0]-T[0],T[1]=2*R[1]-T[1],u)return[T,I,A].concat(h);{h=[T,I,A].concat(h);const F=[];for(let z=0;z<h.length;z+=3){const E=ho(h[z][0],h[z][1],c),D=ho(h[z+1][0],h[z+1][1],c),B=ho(h[z+2][0],h[z+2][1],c);F.push([E[0],E[1],D[0],D[1],B[0],B[1]])}return F}}const YL={randOffset:function(e,t){return Y(e,t)},randOffsetWithRange:function(e,t,n){return Ac(e,t,n)},ellipse:function(e,t,n,r,s){const i=Mk(n,r,s);return kh(e,t,s,i).opset},doubleLineOps:function(e,t,n,r,s){return Vr(e,t,n,r,s,!0)}};function Ak(e,t,n,r,s){return{type:"path",ops:Vr(e,t,n,r,s)}}function Wl(e,t,n){const r=(e||[]).length;if(r>2){const s=[];for(let i=0;i<r-1;i++)s.push(...Vr(e[i][0],e[i][1],e[i+1][0],e[i+1][1],n));return t&&s.push(...Vr(e[r-1][0],e[r-1][1],e[0][0],e[0][1],n)),{type:"path",ops:s}}return r===2?Ak(e[0][0],e[0][1],e[1][0],e[1][1],n):{type:"path",ops:[]}}function XL(e,t,n,r,s){return function(i,o){return Wl(i,!0,o)}([[e,t],[e+n,t],[e+n,t+r],[e,t+r]],s)}function Wx(e,t){if(e.length){const n=typeof e[0][0]=="number"?[e]:e,r=cl(n[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:cl(n[0],1.5*(1+.22*t.roughness),Kx(t));for(let i=1;i<n.length;i++){const o=n[i];if(o.length){const a=cl(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:cl(o,1.5*(1+.22*t.roughness),Kx(t));for(const u of a)u.op!=="move"&&r.push(u);for(const u of l)u.op!=="move"&&s.push(u)}}return{type:"path",ops:r.concat(s)}}return{type:"path",ops:[]}}function Mk(e,t,n){const r=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(n.curveStepCount,n.curveStepCount/Math.sqrt(200)*r)),i=2*Math.PI/s;let o=Math.abs(e/2),a=Math.abs(t/2);const l=1-n.curveFitting;return o+=Y(o*l,n),a+=Y(a*l,n),{increment:i,rx:o,ry:a}}function kh(e,t,n,r){const[s,i]=qx(r.increment,e,t,r.rx,r.ry,1,r.increment*Ac(.1,Ac(.4,1,n),n),n);let o=Mc(s,null,n);if(!n.disableMultiStroke&&n.roughness!==0){const[a]=qx(r.increment,e,t,r.rx,r.ry,1.5,0,n),l=Mc(a,null,n);o=o.concat(l)}return{estimatedPoints:i,opset:{type:"path",ops:o}}}function Hx(e,t,n,r,s,i,o,a,l){const u=e,c=t;let f=Math.abs(n/2),h=Math.abs(r/2);f+=Y(.01*f,l),h+=Y(.01*h,l);let p=s,m=i;for(;p<0;)p+=2*Math.PI,m+=2*Math.PI;m-p>2*Math.PI&&(p=0,m=2*Math.PI);const y=2*Math.PI/l.curveStepCount,w=Math.min(y/2,(m-p)/2),g=Qx(w,u,c,f,h,p,m,1,l);if(!l.disableMultiStroke){const x=Qx(w,u,c,f,h,p,m,1.5,l);g.push(...x)}return o&&(a?g.push(...Vr(u,c,u+f*Math.cos(p),c+h*Math.sin(p),l),...Vr(u,c,u+f*Math.cos(m),c+h*Math.sin(m),l)):g.push({op:"lineTo",data:[u,c]},{op:"lineTo",data:[u+f*Math.cos(p),c+h*Math.sin(p)]})),{type:"path",ops:g}}function Gx(e,t){const n=Nk(Rk(bm(e))),r=[];let s=[0,0],i=[0,0];for(const{key:o,data:a}of n)switch(o){case"M":i=[a[0],a[1]],s=[a[0],a[1]];break;case"L":r.push(...Vr(i[0],i[1],a[0],a[1],t)),i=[a[0],a[1]];break;case"C":{const[l,u,c,f,h,p]=a;r.push(...JL(l,u,c,f,h,p,i,t)),i=[h,p];break}case"Z":r.push(...Vr(i[0],i[1],s[0],s[1],t)),i=[s[0],s[1]]}return{type:"path",ops:r}}function Fd(e,t){const n=[];for(const r of e)if(r.length){const s=t.maxRandomnessOffset||0,i=r.length;if(i>2){n.push({op:"move",data:[r[0][0]+Y(s,t),r[0][1]+Y(s,t)]});for(let o=1;o<i;o++)n.push({op:"lineTo",data:[r[o][0]+Y(s,t),r[o][1]+Y(s,t)]})}}return{type:"fillPath",ops:n}}function Vs(e,t){return function(n,r){let s=n.fillStyle||"hachure";if(!ht[s])switch(s){case"zigzag":ht[s]||(ht[s]=new UL(r));break;case"cross-hatch":ht[s]||(ht[s]=new WL(r));break;case"dots":ht[s]||(ht[s]=new HL(r));break;case"dashed":ht[s]||(ht[s]=new GL(r));break;case"zigzag-line":ht[s]||(ht[s]=new KL(r));break;default:s="hachure",ht[s]||(ht[s]=new wm(r))}return ht[s]}(t,YL).fillPolygons(e,t)}function Kx(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Lk(e){return e.randomizer||(e.randomizer=new qL(e.seed||0)),e.randomizer.next()}function Ac(e,t,n,r=1){return n.roughness*r*(Lk(n)*(t-e)+e)}function Y(e,t,n=1){return Ac(-e,e,t,n)}function Vr(e,t,n,r,s,i=!1){const o=i?s.disableMultiStrokeFill:s.disableMultiStroke,a=_h(e,t,n,r,s,!0,!1);if(o)return a;const l=_h(e,t,n,r,s,!0,!0);return a.concat(l)}function _h(e,t,n,r,s,i,o){const a=Math.pow(e-n,2)+Math.pow(t-r,2),l=Math.sqrt(a);let u=1;u=l<200?1:l>500?.4:-.0016668*l+1.233334;let c=s.maxRandomnessOffset||0;c*c*100>a&&(c=l/10);const f=c/2,h=.2+.2*Lk(s);let p=s.bowing*s.maxRandomnessOffset*(r-t)/200,m=s.bowing*s.maxRandomnessOffset*(e-n)/200;p=Y(p,s,u),m=Y(m,s,u);const y=[],w=()=>Y(f,s,u),g=()=>Y(c,s,u),x=s.preserveVertices;return o?y.push({op:"move",data:[e+(x?0:w()),t+(x?0:w())]}):y.push({op:"move",data:[e+(x?0:Y(c,s,u)),t+(x?0:Y(c,s,u))]}),o?y.push({op:"bcurveTo",data:[p+e+(n-e)*h+w(),m+t+(r-t)*h+w(),p+e+2*(n-e)*h+w(),m+t+2*(r-t)*h+w(),n+(x?0:w()),r+(x?0:w())]}):y.push({op:"bcurveTo",data:[p+e+(n-e)*h+g(),m+t+(r-t)*h+g(),p+e+2*(n-e)*h+g(),m+t+2*(r-t)*h+g(),n+(x?0:g()),r+(x?0:g())]}),y}function cl(e,t,n){if(!e.length)return[];const r=[];r.push([e[0][0]+Y(t,n),e[0][1]+Y(t,n)]),r.push([e[0][0]+Y(t,n),e[0][1]+Y(t,n)]);for(let s=1;s<e.length;s++)r.push([e[s][0]+Y(t,n),e[s][1]+Y(t,n)]),s===e.length-1&&r.push([e[s][0]+Y(t,n),e[s][1]+Y(t,n)]);return Mc(r,null,n)}function Mc(e,t,n){const r=e.length,s=[];if(r>3){const i=[],o=1-n.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let a=1;a+2<r;a++){const l=e[a];i[0]=[l[0],l[1]],i[1]=[l[0]+(o*e[a+1][0]-o*e[a-1][0])/6,l[1]+(o*e[a+1][1]-o*e[a-1][1])/6],i[2]=[e[a+1][0]+(o*e[a][0]-o*e[a+2][0])/6,e[a+1][1]+(o*e[a][1]-o*e[a+2][1])/6],i[3]=[e[a+1][0],e[a+1][1]],s.push({op:"bcurveTo",data:[i[1][0],i[1][1],i[2][0],i[2][1],i[3][0],i[3][1]]})}}else r===3?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):r===2&&s.push(..._h(e[0][0],e[0][1],e[1][0],e[1][1],n,!0,!0));return s}function qx(e,t,n,r,s,i,o,a){const l=[],u=[];if(a.roughness===0){e/=4,u.push([t+r*Math.cos(-e),n+s*Math.sin(-e)]);for(let c=0;c<=2*Math.PI;c+=e){const f=[t+r*Math.cos(c),n+s*Math.sin(c)];l.push(f),u.push(f)}u.push([t+r*Math.cos(0),n+s*Math.sin(0)]),u.push([t+r*Math.cos(e),n+s*Math.sin(e)])}else{const c=Y(.5,a)-Math.PI/2;u.push([Y(i,a)+t+.9*r*Math.cos(c-e),Y(i,a)+n+.9*s*Math.sin(c-e)]);const f=2*Math.PI+c-.01;for(let h=c;h<f;h+=e){const p=[Y(i,a)+t+r*Math.cos(h),Y(i,a)+n+s*Math.sin(h)];l.push(p),u.push(p)}u.push([Y(i,a)+t+r*Math.cos(c+2*Math.PI+.5*o),Y(i,a)+n+s*Math.sin(c+2*Math.PI+.5*o)]),u.push([Y(i,a)+t+.98*r*Math.cos(c+o),Y(i,a)+n+.98*s*Math.sin(c+o)]),u.push([Y(i,a)+t+.9*r*Math.cos(c+.5*o),Y(i,a)+n+.9*s*Math.sin(c+.5*o)])}return[u,l]}function Qx(e,t,n,r,s,i,o,a,l){const u=i+Y(.1,l),c=[];c.push([Y(a,l)+t+.9*r*Math.cos(u-e),Y(a,l)+n+.9*s*Math.sin(u-e)]);for(let f=u;f<=o;f+=e)c.push([Y(a,l)+t+r*Math.cos(f),Y(a,l)+n+s*Math.sin(f)]);return c.push([t+r*Math.cos(o),n+s*Math.sin(o)]),c.push([t+r*Math.cos(o),n+s*Math.sin(o)]),Mc(c,null,l)}function JL(e,t,n,r,s,i,o,a){const l=[],u=[a.maxRandomnessOffset||1,(a.maxRandomnessOffset||1)+.3];let c=[0,0];const f=a.disableMultiStroke?1:2,h=a.preserveVertices;for(let p=0;p<f;p++)p===0?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(h?0:Y(u[0],a)),o[1]+(h?0:Y(u[0],a))]}),c=h?[s,i]:[s+Y(u[p],a),i+Y(u[p],a)],l.push({op:"bcurveTo",data:[e+Y(u[p],a),t+Y(u[p],a),n+Y(u[p],a),r+Y(u[p],a),c[0],c[1]]});return l}function po(e){return[...e]}function Yx(e,t=0){const n=e.length;if(n<3)throw new Error("A curve must have at least three points.");const r=[];if(n===3)r.push(po(e[0]),po(e[1]),po(e[2]),po(e[2]));else{const s=[];s.push(e[0],e[0]);for(let a=1;a<e.length;a++)s.push(e[a]),a===e.length-1&&s.push(e[a]);const i=[],o=1-t;r.push(po(s[0]));for(let a=1;a+2<s.length;a++){const l=s[a];i[0]=[l[0],l[1]],i[1]=[l[0]+(o*s[a+1][0]-o*s[a-1][0])/6,l[1]+(o*s[a+1][1]-o*s[a-1][1])/6],i[2]=[s[a+1][0]+(o*s[a][0]-o*s[a+2][0])/6,s[a+1][1]+(o*s[a][1]-o*s[a+2][1])/6],i[3]=[s[a+1][0],s[a+1][1]],r.push(i[1],i[2],i[3])}}return r}function Hl(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function ZL(e,t,n){const r=Hl(t,n);if(r===0)return Hl(e,t);let s=((e[0]-t[0])*(n[0]-t[0])+(e[1]-t[1])*(n[1]-t[1]))/r;return s=Math.max(0,Math.min(1,s)),Hl(e,cs(t,n,s))}function cs(e,t,n){return[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n]}function Sh(e,t,n,r){const s=r||[];if(function(a,l){const u=a[l+0],c=a[l+1],f=a[l+2],h=a[l+3];let p=3*c[0]-2*u[0]-h[0];p*=p;let m=3*c[1]-2*u[1]-h[1];m*=m;let y=3*f[0]-2*h[0]-u[0];y*=y;let w=3*f[1]-2*h[1]-u[1];return w*=w,p<y&&(p=y),m<w&&(m=w),p+m}(e,t)<n){const a=e[t+0];s.length?(i=s[s.length-1],o=a,Math.sqrt(Hl(i,o))>1&&s.push(a)):s.push(a),s.push(e[t+3])}else{const l=e[t+0],u=e[t+1],c=e[t+2],f=e[t+3],h=cs(l,u,.5),p=cs(u,c,.5),m=cs(c,f,.5),y=cs(h,p,.5),w=cs(p,m,.5),g=cs(y,w,.5);Sh([l,h,y,g],0,n,s),Sh([g,w,m,f],0,n,s)}var i,o;return s}function eD(e,t){return Lc(e,0,e.length,t)}function Lc(e,t,n,r,s){const i=s||[],o=e[t],a=e[n-1];let l=0,u=1;for(let c=t+1;c<n-1;++c){const f=ZL(e[c],o,a);f>l&&(l=f,u=c)}return Math.sqrt(l)>r?(Lc(e,t,u+1,r,i),Lc(e,u,n,r,i)):(i.length||i.push(o),i.push(a)),i}function zd(e,t=.15,n){const r=[],s=(e.length-1)/3;for(let i=0;i<s;i++)Sh(e,3*i,t,r);return n&&n>0?Lc(r,0,r.length,n):r}const Et="none";let Dc=class{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,n,r){return{shape:t,sets:n||[],options:r||this.defaultOptions}}line(t,n,r,s,i){const o=this._o(i);return this._d("line",[Ak(t,n,r,s,o)],o)}rectangle(t,n,r,s,i){const o=this._o(i),a=[],l=XL(t,n,r,s,o);if(o.fill){const u=[[t,n],[t+r,n],[t+r,n+s],[t,n+s]];o.fillStyle==="solid"?a.push(Fd([u],o)):a.push(Vs([u],o))}return o.stroke!==Et&&a.push(l),this._d("rectangle",a,o)}ellipse(t,n,r,s,i){const o=this._o(i),a=[],l=Mk(r,s,o),u=kh(t,n,o,l);if(o.fill)if(o.fillStyle==="solid"){const c=kh(t,n,o,l).opset;c.type="fillPath",a.push(c)}else a.push(Vs([u.estimatedPoints],o));return o.stroke!==Et&&a.push(u.opset),this._d("ellipse",a,o)}circle(t,n,r,s){const i=this.ellipse(t,n,r,r,s);return i.shape="circle",i}linearPath(t,n){const r=this._o(n);return this._d("linearPath",[Wl(t,!1,r)],r)}arc(t,n,r,s,i,o,a=!1,l){const u=this._o(l),c=[],f=Hx(t,n,r,s,i,o,a,!0,u);if(a&&u.fill)if(u.fillStyle==="solid"){const h=Object.assign({},u);h.disableMultiStroke=!0;const p=Hx(t,n,r,s,i,o,!0,!1,h);p.type="fillPath",c.push(p)}else c.push(function(h,p,m,y,w,g,x){const v=h,k=p;let S=Math.abs(m/2),b=Math.abs(y/2);S+=Y(.01*S,x),b+=Y(.01*b,x);let P=w,j=g;for(;P<0;)P+=2*Math.PI,j+=2*Math.PI;j-P>2*Math.PI&&(P=0,j=2*Math.PI);const R=(j-P)/x.curveStepCount,T=[];for(let I=P;I<=j;I+=R)T.push([v+S*Math.cos(I),k+b*Math.sin(I)]);return T.push([v+S*Math.cos(j),k+b*Math.sin(j)]),T.push([v,k]),Vs([T],x)}(t,n,r,s,i,o,u));return u.stroke!==Et&&c.push(f),this._d("arc",c,u)}curve(t,n){const r=this._o(n),s=[],i=Wx(t,r);if(r.fill&&r.fill!==Et)if(r.fillStyle==="solid"){const o=Wx(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],a=t;if(a.length){const l=typeof a[0][0]=="number"?[a]:a;for(const u of l)u.length<3?o.push(...u):u.length===3?o.push(...zd(Yx([u[0],u[0],u[1],u[2]]),10,(1+r.roughness)/2)):o.push(...zd(Yx(u),10,(1+r.roughness)/2))}o.length&&s.push(Vs([o],r))}return r.stroke!==Et&&s.push(i),this._d("curve",s,r)}polygon(t,n){const r=this._o(n),s=[],i=Wl(t,!0,r);return r.fill&&(r.fillStyle==="solid"?s.push(Fd([t],r)):s.push(Vs([t],r))),r.stroke!==Et&&s.push(i),this._d("polygon",s,r)}path(t,n){const r=this._o(n),s=[];if(!t)return this._d("path",s,r);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const i=r.fill&&r.fill!=="transparent"&&r.fill!==Et,o=r.stroke!==Et,a=!!(r.simplification&&r.simplification<1),l=function(c,f,h){const p=Nk(Rk(bm(c))),m=[];let y=[],w=[0,0],g=[];const x=()=>{g.length>=4&&y.push(...zd(g,f)),g=[]},v=()=>{x(),y.length&&(m.push(y),y=[])};for(const{key:S,data:b}of p)switch(S){case"M":v(),w=[b[0],b[1]],y.push(w);break;case"L":x(),y.push([b[0],b[1]]);break;case"C":if(!g.length){const P=y.length?y[y.length-1]:w;g.push([P[0],P[1]])}g.push([b[0],b[1]]),g.push([b[2],b[3]]),g.push([b[4],b[5]]);break;case"Z":x(),y.push([w[0],w[1]])}if(v(),!h)return m;const k=[];for(const S of m){const b=eD(S,h);b.length&&k.push(b)}return k}(t,1,a?4-4*(r.simplification||1):(1+r.roughness)/2),u=Gx(t,r);if(i)if(r.fillStyle==="solid")if(l.length===1){const c=Gx(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else s.push(Fd(l,r));else s.push(Vs(l,r));return o&&(a?l.forEach(c=>{s.push(Wl(c,!1,r))}):s.push(u)),this._d("path",s,r)}opsToPath(t,n){let r="";for(const s of t.ops){const i=typeof n=="number"&&n>=0?s.data.map(o=>+o.toFixed(n)):s.data;switch(s.op){case"move":r+=`M${i[0]} ${i[1]} `;break;case"bcurveTo":r+=`C${i[0]} ${i[1]}, ${i[2]} ${i[3]}, ${i[4]} ${i[5]} `;break;case"lineTo":r+=`L${i[0]} ${i[1]} `}}return r.trim()}toPaths(t){const n=t.sets||[],r=t.options||this.defaultOptions,s=[];for(const i of n){let o=null;switch(i.type){case"path":o={d:this.opsToPath(i),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:Et};break;case"fillPath":o={d:this.opsToPath(i),stroke:Et,strokeWidth:0,fill:r.fill||Et};break;case"fillSketch":o=this.fillSketch(i,r)}o&&s.push(o)}return s}fillSketch(t,n){let r=n.fillWeight;return r<0&&(r=n.strokeWidth/2),{d:this.opsToPath(t),stroke:n.fill||Et,strokeWidth:r,fill:Et}}_mergedShape(t){return t.filter((n,r)=>r===0||n.op!=="move")}},tD=class{constructor(t,n){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Dc(n)}draw(t){const n=t.sets||[],r=t.options||this.getDefaultOptions(),s=this.ctx,i=t.options.fixedDecimalPlaceDigits;for(const o of n)switch(o.type){case"path":s.save(),s.strokeStyle=r.stroke==="none"?"transparent":r.stroke,s.lineWidth=r.strokeWidth,r.strokeLineDash&&s.setLineDash(r.strokeLineDash),r.strokeLineDashOffset&&(s.lineDashOffset=r.strokeLineDashOffset),this._drawToContext(s,o,i),s.restore();break;case"fillPath":{s.save(),s.fillStyle=r.fill||"";const a=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,o,i,a),s.restore();break}case"fillSketch":this.fillSketch(s,o,r)}}fillSketch(t,n,r){let s=r.fillWeight;s<0&&(s=r.strokeWidth/2),t.save(),r.fillLineDash&&t.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(t.lineDashOffset=r.fillLineDashOffset),t.strokeStyle=r.fill||"",t.lineWidth=s,this._drawToContext(t,n,r.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,n,r,s="nonzero"){t.beginPath();for(const i of n.ops){const o=typeof r=="number"&&r>=0?i.data.map(a=>+a.toFixed(r)):i.data;switch(i.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}n.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,n,r,s,i){const o=this.gen.line(t,n,r,s,i);return this.draw(o),o}rectangle(t,n,r,s,i){const o=this.gen.rectangle(t,n,r,s,i);return this.draw(o),o}ellipse(t,n,r,s,i){const o=this.gen.ellipse(t,n,r,s,i);return this.draw(o),o}circle(t,n,r,s){const i=this.gen.circle(t,n,r,s);return this.draw(i),i}linearPath(t,n){const r=this.gen.linearPath(t,n);return this.draw(r),r}polygon(t,n){const r=this.gen.polygon(t,n);return this.draw(r),r}arc(t,n,r,s,i,o,a=!1,l){const u=this.gen.arc(t,n,r,s,i,o,a,l);return this.draw(u),u}curve(t,n){const r=this.gen.curve(t,n);return this.draw(r),r}path(t,n){const r=this.gen.path(t,n);return this.draw(r),r}};const ul="http://www.w3.org/2000/svg";class nD{constructor(t,n){this.svg=t,this.gen=new Dc(n)}draw(t){const n=t.sets||[],r=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,i=s.createElementNS(ul,"g"),o=t.options.fixedDecimalPlaceDigits;for(const a of n){let l=null;switch(a.type){case"path":l=s.createElementNS(ul,"path"),l.setAttribute("d",this.opsToPath(a,o)),l.setAttribute("stroke",r.stroke),l.setAttribute("stroke-width",r.strokeWidth+""),l.setAttribute("fill","none"),r.strokeLineDash&&l.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":l=s.createElementNS(ul,"path"),l.setAttribute("d",this.opsToPath(a,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",r.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(s,a,r)}l&&i.appendChild(l)}return i}fillSketch(t,n,r){let s=r.fillWeight;s<0&&(s=r.strokeWidth/2);const i=t.createElementNS(ul,"path");return i.setAttribute("d",this.opsToPath(n,r.fixedDecimalPlaceDigits)),i.setAttribute("stroke",r.fill||""),i.setAttribute("stroke-width",s+""),i.setAttribute("fill","none"),r.fillLineDash&&i.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&i.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),i}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,n){return this.gen.opsToPath(t,n)}line(t,n,r,s,i){const o=this.gen.line(t,n,r,s,i);return this.draw(o)}rectangle(t,n,r,s,i){const o=this.gen.rectangle(t,n,r,s,i);return this.draw(o)}ellipse(t,n,r,s,i){const o=this.gen.ellipse(t,n,r,s,i);return this.draw(o)}circle(t,n,r,s){const i=this.gen.circle(t,n,r,s);return this.draw(i)}linearPath(t,n){const r=this.gen.linearPath(t,n);return this.draw(r)}polygon(t,n){const r=this.gen.polygon(t,n);return this.draw(r)}arc(t,n,r,s,i,o,a=!1,l){const u=this.gen.arc(t,n,r,s,i,o,a,l);return this.draw(u)}curve(t,n){const r=this.gen.curve(t,n);return this.draw(r)}path(t,n){const r=this.gen.path(t,n);return this.draw(r)}}var rD={canvas:(e,t)=>new tD(e,t),svg:(e,t)=>new nD(e,t),generator:e=>new Dc(e),newSeed:()=>Dc.newSeed()};const km=_.createContext({});function _m(e){const t=_.useRef(null);return t.current===null&&(t.current=e()),t.current}const sD=typeof window<"u",Dk=sD?_.useLayoutEffect:_.useEffect,bu=_.createContext(null);function Sm(e,t){e.indexOf(t)===-1&&e.push(t)}function Oc(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Ln=(e,t,n)=>n>t?t:n<e?e:n;let Cm=()=>{};const Ur={},Ok=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Fk=e=>typeof e=="object"&&e!==null,zk=e=>/^0[^.\s]+$/u.test(e);function Bk(e){let t;return()=>(t===void 0&&(t=e()),t)}const Xt=e=>e,ba=(...e)=>e.reduce((t,n)=>r=>n(t(r))),ca=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1};class Pm{constructor(){this.subscriptions=[]}add(t){return Sm(this.subscriptions,t),()=>Oc(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let i=0;i<s;i++){const o=this.subscriptions[i];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Lt=e=>e*1e3,Qt=e=>e/1e3,$k=(e,t)=>t?e*(1e3/t):0,Vk=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,iD=1e-7,oD=12;function aD(e,t,n,r,s){let i,o,a=0;do o=t+(n-t)/2,i=Vk(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>iD&&++a<oD);return o}function ka(e,t,n,r){if(e===t&&n===r)return Xt;const s=i=>aD(i,0,1,e,n);return i=>i===0||i===1?i:Vk(s(i),t,r)}const Uk=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Wk=e=>t=>1-e(1-t),Hk=ka(.33,1.53,.69,.99),jm=Wk(Hk),Gk=Uk(jm),Kk=e=>e>=1?1:(e*=2)<1?.5*jm(e):.5*(2-Math.pow(2,-10*(e-1))),Em=e=>1-Math.sin(Math.acos(e)),qk=Wk(Em),Qk=Uk(Em),lD=ka(.42,0,1,1),cD=ka(0,0,.58,1),Yk=ka(.42,0,.58,1),uD=e=>Array.isArray(e)&&typeof e[0]!="number",Xk=e=>Array.isArray(e)&&typeof e[0]=="number",dD={linear:Xt,easeIn:lD,easeInOut:Yk,easeOut:cD,circIn:Em,circInOut:Qk,circOut:qk,backIn:jm,backInOut:Gk,backOut:Hk,anticipate:Kk},fD=e=>typeof e=="string",Xx=e=>{if(Xk(e)){Cm(e.length===4);const[t,n,r,s]=e;return ka(t,n,r,s)}else if(fD(e))return dD[e];return e},dl=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function hD(e,t){let n=new Set,r=new Set,s=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){o.has(c)&&(u.schedule(c),e()),c(a)}const u={schedule:(c,f=!1,h=!1)=>{const m=h&&s?n:r;return f&&o.add(c),m.add(c),c},cancel:c=>{r.delete(c),o.delete(c)},process:c=>{if(a=c,s){i=!0;return}s=!0;const f=n;n=r,r=f,n.forEach(l),n.clear(),s=!1,i&&(i=!1,u.process(c))}};return u}const pD=40;function Jk(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=dl.reduce((v,k)=>(v[k]=hD(i),v),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:f,preRender:h,render:p,postRender:m}=o,y=()=>{const v=Ur.useManualTiming,k=v?s.timestamp:performance.now();n=!1,v||(s.delta=r?1e3/60:Math.max(Math.min(k-s.timestamp,pD),1)),s.timestamp=k,s.isProcessing=!0,a.process(s),l.process(s),u.process(s),c.process(s),f.process(s),h.process(s),p.process(s),m.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(y))},w=()=>{n=!0,r=!0,s.isProcessing||e(y)};return{schedule:dl.reduce((v,k)=>{const S=o[k];return v[k]=(b,P=!1,j=!1)=>(n||w(),S.schedule(b,P,j)),v},{}),cancel:v=>{for(let k=0;k<dl.length;k++)o[dl[k]].cancel(v)},state:s,steps:o}}const{schedule:ge,cancel:Wr,state:Qe,steps:Bd}=Jk(typeof requestAnimationFrame<"u"?requestAnimationFrame:Xt,!0);let Gl;function mD(){Gl=void 0}const lt={now:()=>(Gl===void 0&<.set(Qe.isProcessing||Ur.useManualTiming?Qe.timestamp:performance.now()),Gl),set:e=>{Gl=e,queueMicrotask(mD)}},Zk=e=>t=>typeof t=="string"&&t.startsWith(e),e_=Zk("--"),gD=Zk("var(--"),Tm=e=>gD(e)?yD.test(e.split("/*")[0].trim()):!1,yD=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Jx(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const $i={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ua={...$i,transform:e=>Ln(0,1,e)},fl={...$i,default:1},Oo=e=>Math.round(e*1e5)/1e5,Rm=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function xD(e){return e==null}const vD=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Nm=(e,t)=>n=>!!(typeof n=="string"&&vD.test(n)&&n.startsWith(e)||t&&!xD(n)&&Object.prototype.hasOwnProperty.call(n,t)),t_=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,a]=r.match(Rm);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},wD=e=>Ln(0,255,e),$d={...$i,transform:e=>Math.round(wD(e))},gs={test:Nm("rgb","red"),parse:t_("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+$d.transform(e)+", "+$d.transform(t)+", "+$d.transform(n)+", "+Oo(ua.transform(r))+")"};function bD(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const Ch={test:Nm("#"),parse:bD,transform:gs.transform},_a=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Un=_a("deg"),An=_a("%"),K=_a("px"),kD=_a("vh"),_D=_a("vw"),Zx={...An,parse:e=>An.parse(e)/100,transform:e=>An.transform(e*100)},ai={test:Nm("hsl","hue"),parse:t_("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+An.transform(Oo(t))+", "+An.transform(Oo(n))+", "+Oo(ua.transform(r))+")"},Fe={test:e=>gs.test(e)||Ch.test(e)||ai.test(e),parse:e=>gs.test(e)?gs.parse(e):ai.test(e)?ai.parse(e):Ch.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?gs.transform(e):ai.transform(e),getAnimatableNone:e=>{const t=Fe.parse(e);return t.alpha=0,Fe.transform(t)}},SD=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function CD(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Rm))==null?void 0:t.length)||0)+(((n=e.match(SD))==null?void 0:n.length)||0)>0}const n_="number",r_="color",PD="var",jD="var(",ev="${}",ED=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ni(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const a=t.replace(ED,l=>(Fe.test(l)?(r.color.push(i),s.push(r_),n.push(Fe.parse(l))):l.startsWith(jD)?(r.var.push(i),s.push(PD),n.push(l)):(r.number.push(i),s.push(n_),n.push(parseFloat(l))),++i,ev)).split(ev);return{values:n,split:a,indexes:r,types:s}}function TD(e){return Ni(e).values}function s_({split:e,types:t}){const n=e.length;return r=>{let s="";for(let i=0;i<n;i++)if(s+=e[i],r[i]!==void 0){const o=t[i];o===n_?s+=Oo(r[i]):o===r_?s+=Fe.transform(r[i]):s+=r[i]}return s}}function RD(e){return s_(Ni(e))}const ND=e=>typeof e=="number"?0:Fe.test(e)?Fe.getAnimatableNone(e):e,ID=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:ND(e);function AD(e){const t=Ni(e);return s_(t)(t.values.map((r,s)=>ID(r,t.split[s])))}const pn={test:CD,parse:TD,createTransformer:RD,getAnimatableNone:AD};function Vd(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function MD({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,i=0,o=0;if(!t)s=i=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=Vd(l,a,e+1/3),i=Vd(l,a,e),o=Vd(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function Fc(e,t){return n=>n>0?t:e}const me=(e,t,n)=>e+(t-e)*n,Ud=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},LD=[Ch,gs,ai],DD=e=>LD.find(t=>t.test(e));function tv(e){const t=DD(e);if(!t)return!1;let n=t.parse(e);return t===ai&&(n=MD(n)),n}const nv=(e,t)=>{const n=tv(e),r=tv(t);if(!n||!r)return Fc(e,t);const s={...n};return i=>(s.red=Ud(n.red,r.red,i),s.green=Ud(n.green,r.green,i),s.blue=Ud(n.blue,r.blue,i),s.alpha=me(n.alpha,r.alpha,i),gs.transform(s))},Ph=new Set(["none","hidden"]);function OD(e,t){return Ph.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function FD(e,t){return n=>me(e,t,n)}function Im(e){return typeof e=="number"?FD:typeof e=="string"?Tm(e)?Fc:Fe.test(e)?nv:$D:Array.isArray(e)?i_:typeof e=="object"?Fe.test(e)?nv:zD:Fc}function i_(e,t){const n=[...e],r=n.length,s=e.map((i,o)=>Im(i)(i,t[o]));return i=>{for(let o=0;o<r;o++)n[o]=s[o](i);return n}}function zD(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=Im(e[s])(e[s],t[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function BD(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],o=e.indexes[i][r[i]],a=e.values[o]??0;n[s]=a,r[i]++}return n}const $D=(e,t)=>{const n=pn.createTransformer(t),r=Ni(e),s=Ni(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?Ph.has(e)&&!s.values.length||Ph.has(t)&&!r.values.length?OD(e,t):ba(i_(BD(r,s),s.values),n):Fc(e,t)};function o_(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?me(e,t,n):Im(e)(e,t)}const VD=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ge.update(t,n),stop:()=>Wr(t),now:()=>Qe.isProcessing?Qe.timestamp:lt.now()}},a_=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let i=0;i<s;i++)r+=Math.round(e(i/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},zc=2e4;function Am(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<zc;)t+=n,r=e.next(t);return t>=zc?1/0:t}function UD(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(Am(r),zc);return{type:"keyframes",ease:i=>r.next(s*i).value/t,duration:Qt(s)}}const Ne={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function jh(e,t){return e*Math.sqrt(1-t*t)}const WD=12;function HD(e,t,n){let r=n;for(let s=1;s<WD;s++)r=r-e(r)/t(r);return r}const Wd=.001;function GD({duration:e=Ne.duration,bounce:t=Ne.bounce,velocity:n=Ne.velocity,mass:r=Ne.mass}){let s,i,o=1-t;o=Ln(Ne.minDamping,Ne.maxDamping,o),e=Ln(Ne.minDuration,Ne.maxDuration,Qt(e)),o<1?(s=u=>{const c=u*o,f=c*e,h=c-n,p=jh(u,o),m=Math.exp(-f);return Wd-h/p*m},i=u=>{const f=u*o*e,h=f*n+n,p=Math.pow(o,2)*Math.pow(u,2)*e,m=Math.exp(-f),y=jh(Math.pow(u,2),o);return(-s(u)+Wd>0?-1:1)*((h-p)*m)/y}):(s=u=>{const c=Math.exp(-u*e),f=(u-n)*e+1;return-Wd+c*f},i=u=>{const c=Math.exp(-u*e),f=(n-u)*(e*e);return c*f});const a=5/e,l=HD(s,i,a);if(e=Lt(e),isNaN(l))return{stiffness:Ne.stiffness,damping:Ne.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const KD=["duration","bounce"],qD=["stiffness","damping","mass"];function rv(e,t){return t.some(n=>e[n]!==void 0)}function QD(e){let t={velocity:Ne.velocity,stiffness:Ne.stiffness,damping:Ne.damping,mass:Ne.mass,isResolvedFromDuration:!1,...e};if(!rv(e,qD)&&rv(e,KD))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*Ln(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:Ne.mass,stiffness:s,damping:i}}else{const n=GD({...e,velocity:0});t={...t,...n,mass:Ne.mass},t.isResolvedFromDuration=!0}return t}function Bc(e=Ne.visualDuration,t=Ne.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:u,mass:c,duration:f,velocity:h,isResolvedFromDuration:p}=QD({...n,velocity:-Qt(n.velocity||0)}),m=h||0,y=u/(2*Math.sqrt(l*c)),w=o-i,g=Qt(Math.sqrt(l/c)),x=Math.abs(w)<5;r||(r=x?Ne.restSpeed.granular:Ne.restSpeed.default),s||(s=x?Ne.restDelta.granular:Ne.restDelta.default);let v,k,S,b,P,j;if(y<1)S=jh(g,y),b=(m+y*g*w)/S,v=T=>{const I=Math.exp(-y*g*T);return o-I*(b*Math.sin(S*T)+w*Math.cos(S*T))},P=y*g*b+w*S,j=y*g*w-b*S,k=T=>Math.exp(-y*g*T)*(P*Math.sin(S*T)+j*Math.cos(S*T));else if(y===1){v=I=>o-Math.exp(-g*I)*(w+(m+g*w)*I);const T=m+g*w;k=I=>Math.exp(-g*I)*(g*T*I-m)}else{const T=g*Math.sqrt(y*y-1);v=z=>{const E=Math.exp(-y*g*z),D=Math.min(T*z,300);return o-E*((m+y*g*w)*Math.sinh(D)+T*w*Math.cosh(D))/T};const I=(m+y*g*w)/T,A=y*g*I-w*T,F=y*g*w-I*T;k=z=>{const E=Math.exp(-y*g*z),D=Math.min(T*z,300);return E*(A*Math.sinh(D)+F*Math.cosh(D))}}const R={calculatedDuration:p&&f||null,velocity:T=>Lt(k(T)),next:T=>{if(!p&&y<1){const A=Math.exp(-y*g*T),F=Math.sin(S*T),z=Math.cos(S*T),E=o-A*(b*F+w*z),D=Lt(A*(P*F+j*z));return a.done=Math.abs(D)<=r&&Math.abs(o-E)<=s,a.value=a.done?o:E,a}const I=v(T);if(p)a.done=T>=f;else{const A=Lt(k(T));a.done=Math.abs(A)<=r&&Math.abs(o-I)<=s}return a.value=a.done?o:I,a},toString:()=>{const T=Math.min(Am(R),zc),I=a_(A=>R.next(T*A).value,T,30);return T+"ms "+I},toTransition:()=>{}};return R}Bc.applyToOptions=e=>{const t=UD(e,100,Bc);return e.ease=t.ease,e.duration=Lt(t.duration),e.type="keyframes",e};const YD=5;function l_(e,t,n){const r=Math.max(t-YD,0);return $k(n-e(r),t-r)}function Eh({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const f=e[0],h={done:!1,value:f},p=j=>a!==void 0&&j<a||l!==void 0&&j>l,m=j=>a===void 0?l:l===void 0||Math.abs(a-j)<Math.abs(l-j)?a:l;let y=n*t;const w=f+y,g=o===void 0?w:o(w);g!==w&&(y=g-f);const x=j=>-y*Math.exp(-j/r),v=j=>g+x(j),k=j=>{const R=x(j),T=v(j);h.done=Math.abs(R)<=u,h.value=h.done?g:T};let S,b;const P=j=>{p(h.value)&&(S=j,b=Bc({keyframes:[h.value,m(h.value)],velocity:l_(v,j,h.value),damping:s,stiffness:i,restDelta:u,restSpeed:c}))};return P(0),{calculatedDuration:null,next:j=>{let R=!1;return!b&&S===void 0&&(R=!0,k(j),P(j)),S!==void 0&&j>=S?b.next(j-S):(!R&&k(j),h)}}}function XD(e,t,n){const r=[],s=n||Ur.mix||o_,i=e.length-1;for(let o=0;o<i;o++){let a=s(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||Xt:t;a=ba(l,a)}r.push(a)}return r}function JD(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const i=e.length;if(Cm(i===t.length),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=XD(t,r,s),l=a.length,u=c=>{if(o&&c<e[0])return t[0];let f=0;if(l>1)for(;f<e.length-2&&!(c<e[f+1]);f++);const h=ca(e[f],e[f+1],c);return a[f](h)};return n?c=>u(Ln(e[0],e[i-1],c)):u}function ZD(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=ca(0,t,r);e.push(me(n,1,s))}}function e3(e){const t=[0];return ZD(t,e.length-1),t}function t3(e,t){return e.map(n=>n*t)}function n3(e,t){return e.map(()=>t||Yk).splice(0,e.length-1)}function Fo({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=uD(r)?r.map(Xx):Xx(r),i={done:!1,value:t[0]},o=t3(n&&n.length===t.length?n:e3(t),e),a=JD(o,t,{ease:Array.isArray(s)?s:n3(t,s)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const r3=e=>e!==null;function ku(e,{repeat:t,repeatType:n="loop"},r,s=1){const i=e.filter(r3),a=s<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const s3={decay:Eh,inertia:Eh,tween:Fo,keyframes:Fo,spring:Bc};function c_(e){typeof e.type=="string"&&(e.type=s3[e.type])}class Mm{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const i3=e=>e/100;class $c extends Mm{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==lt.now()&&this.tick(lt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;c_(t);const{type:n=Fo,repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=t;let{keyframes:a}=t;const l=n||Fo;l!==Fo&&typeof a[0]!="number"&&(this.mixKeyframes=ba(i3,o_(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=Am(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:s,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:c,repeat:f,repeatType:h,repeatDelay:p,type:m,onUpdate:y,finalKeyframe:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const g=this.currentTime-u*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?g<0:g>s;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let v=this.currentTime,k=r;if(f){const j=Math.min(this.currentTime,s)/a;let R=Math.floor(j),T=j%1;!T&&j>=1&&(T=1),T===1&&R--,R=Math.min(R,f+1),!!(R%2)&&(h==="reverse"?(T=1-T,p&&(T-=p/a)):h==="mirror"&&(k=o)),v=Ln(0,1,T)*a}let S;x?(this.delayState.value=c[0],S=this.delayState):S=k.next(v),i&&!x&&(S.value=i(S.value));let{done:b}=S;!x&&l!==null&&(b=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const P=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&b);return P&&m!==Eh&&(S.value=ku(c,this.options,w,this.speed)),y&&y(S.value),P&&this.finish(),S}then(t,n){return this.finished.then(t,n)}get duration(){return Qt(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Qt(t)}get time(){return Qt(this.currentTime)}set time(t){t=Lt(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return l_(r=>this.generator.next(r).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(lt.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=Qt(this.currentTime))}play(){var s,i;if(this.isStopped)return;const{driver:t=VD,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(i=(s=this.options).onPlay)==null||i.call(s);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(lt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function o3(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const ys=e=>e*180/Math.PI,Th=e=>{const t=ys(Math.atan2(e[1],e[0]));return Rh(t)},a3={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Th,rotateZ:Th,skewX:e=>ys(Math.atan(e[1])),skewY:e=>ys(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Rh=e=>(e=e%360,e<0&&(e+=360),e),sv=Th,iv=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ov=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),l3={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:iv,scaleY:ov,scale:e=>(iv(e)+ov(e))/2,rotateX:e=>Rh(ys(Math.atan2(e[6],e[5]))),rotateY:e=>Rh(ys(Math.atan2(-e[2],e[0]))),rotateZ:sv,rotate:sv,skewX:e=>ys(Math.atan(e[4])),skewY:e=>ys(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Nh(e){return e.includes("scale")?1:0}function Ih(e,t){if(!e||e==="none")return Nh(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=l3,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=a3,s=a}if(!s)return Nh(t);const i=r[t],o=s[1].split(",").map(u3);return typeof i=="function"?i(o):o[i]}const c3=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Ih(n,t)};function u3(e){return parseFloat(e.trim())}const Vi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ui=new Set([...Vi,"pathRotation"]),av=e=>e===$i||e===K,d3=new Set(["x","y","z"]),f3=Vi.filter(e=>!d3.has(e));function h3(e){const t=[];return f3.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Tr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const s=e.max-e.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const s=e.max-e.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Ih(t,"x"),y:(e,{transform:t})=>Ih(t,"y")};Tr.translateX=Tr.x;Tr.translateY=Tr.y;const Ss=new Set;let Ah=!1,Mh=!1,Lh=!1;function u_(){if(Mh){const e=Array.from(Ss).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=h3(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,o])=>{var a;(a=r.getValue(i))==null||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Mh=!1,Ah=!1,Ss.forEach(e=>e.complete(Lh)),Ss.clear()}function d_(){Ss.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Mh=!0)})}function p3(){Lh=!0,d_(),u_(),Lh=!1}class Lm{constructor(t,n,r,s,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Ss.add(this),Ah||(Ah=!0,ge.read(d_),ge.resolveKeyframes(u_))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;if(t[0]===null){const i=s==null?void 0:s.get(),o=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const a=r.readValue(n,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),s&&i===void 0&&s.set(t[0])}o3(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ss.delete(this)}cancel(){this.state==="scheduled"&&(Ss.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const m3=e=>e.startsWith("--");function f_(e,t,n){m3(t)?e.style.setProperty(t,n):e.style[t]=n}const g3={};function h_(e,t){const n=Bk(e);return()=>g3[t]??n()}const y3=h_(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),p_=h_(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),_o=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,lv={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:_o([0,.65,.55,1]),circOut:_o([.55,0,1,.45]),backIn:_o([.31,.01,.66,-.59]),backOut:_o([.33,1.53,.69,.99])};function m_(e,t){if(e)return typeof e=="function"?p_()?a_(e,t):"ease-out":Xk(e)?_o(e):Array.isArray(e)?e.map(n=>m_(n,t)||lv.easeOut):lv[e]}function x3(e,t,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const f=m_(a,s);Array.isArray(f)&&(c.easing=f);const h={delay:r,duration:s,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"};return u&&(h.pseudoElement=u),e.animate(c,h)}function g_(e){return typeof e=="function"&&"applyToOptions"in e}function v3({type:e,...t}){return g_(e)&&p_()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class y_ extends Mm{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:s,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=t,Cm(typeof t.type!="string");const u=v3(t);this.animation=x3(n,r,s,u,i),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const c=ku(s,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(c),f_(n,r,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,s;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((s=(r=this.animation).commitStyles)==null||s.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Qt(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Qt(t)}get time(){return Qt(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Lt(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:r,observe:s}){var i;return this.allowFlatten&&((i=this.animation.effect)==null||i.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&y3()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),Xt):s(this)}}const x_={anticipate:Kk,backInOut:Gk,circInOut:Qk};function w3(e){return e in x_}function b3(e){typeof e.ease=="string"&&w3(e.ease)&&(e.ease=x_[e.ease])}const Hd=10;class k3 extends y_{constructor(t){b3(t),c_(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:s,element:i,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new $c({...o,autoplay:!1}),l=Math.max(Hd,lt.now()-this.startTime),u=Ln(0,Hd,l-Hd),c=a.sample(l).value,{name:f}=this.options;i&&f&&f_(i,f,c),n.setWithVelocity(a.sample(Math.max(0,l-u)).value,c,u),a.stop()}}const cv=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(pn.test(e)||e==="0")&&!e.startsWith("url("));function _3(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function S3(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],o=cv(s,t),a=cv(i,t);return!o||!a?!1:_3(e)||(n==="spring"||g_(n))&&r}function Dh(e){e.duration=0,e.type="keyframes"}const v_=new Set(["opacity","clipPath","filter","transform"]),C3=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function P3(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&C3.test(e[t]))return!0;return!1}const j3=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),E3=Bk(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function T3(e){var f;const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:i,type:o,keyframes:a}=e;if(!(((f=t==null?void 0:t.owner)==null?void 0:f.current)instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:c}=t.owner.getProps();return E3()&&n&&(v_.has(n)||j3.has(n)&&P3(a))&&(n!=="transform"||!c)&&!u&&!r&&s!=="mirror"&&i!==0&&o!=="inertia"}const R3=40;class N3 extends Mm{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",keyframes:a,name:l,motionValue:u,element:c,...f}){var m;super(),this.stop=()=>{var y,w;this._animation&&(this._animation.stop(),(y=this.stopTimeline)==null||y.call(this)),(w=this.keyframeResolver)==null||w.cancel()},this.createdAt=lt.now();const h={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,name:l,motionValue:u,element:c,...f},p=(c==null?void 0:c.KeyframeResolver)||Lm;this.keyframeResolver=new p(a,(y,w,g)=>this.onKeyframesResolved(y,w,h,!g),l,u,c),(m=this.keyframeResolver)==null||m.scheduleResolve()}onKeyframesResolved(t,n,r,s){var g,x;this.keyframeResolver=void 0;const{name:i,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:c}=r;this.resolvedAt=lt.now();let f=!0;S3(t,i,o,a)||(f=!1,(Ur.instantAnimations||!l)&&(c==null||c(ku(t,r,n))),t[0]=t[t.length-1],Dh(r),r.repeat=0);const p={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>R3?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},m=f&&!u&&T3(p),y=(x=(g=p.motionValue)==null?void 0:g.owner)==null?void 0:x.current;let w;if(m)try{w=new k3({...p,element:y})}catch{w=new $c(p)}else w=new $c(p);w.finished.then(()=>{this.notifyFinished()}).catch(Xt),this.pendingTimeline&&(this.stopTimeline=w.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=w}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),p3()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function w_(e,t,n,r=0,s=1){const i=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),o=e.size,a=(o-1)*r;return typeof n=="function"?n(i,o):s===1?i*r:a-i*r}const uv=30,I3=e=>!isNaN(parseFloat(e));class A3{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const s=lt.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=lt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=I3(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Pm);const r=this.events[t].add(n);return t==="change"?()=>{r(),ge.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=lt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>uv)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,uv);return $k(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ii(e,t){return new A3(e,t)}function b_(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function Dm(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?b_(n,e):n}const M3={type:"spring",stiffness:500,damping:25,restSpeed:10},L3=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),D3={type:"keyframes",duration:.8},O3={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},F3=(e,{keyframes:t})=>t.length>2?D3:Ui.has(e)?e.startsWith("scale")?L3(t[1]):M3:O3,z3=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function B3(e){for(const t in e)if(!z3.has(t))return!0;return!1}const Om=(e,t,n,r={},s,i)=>o=>{const a=Dm(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Lt(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:s};B3(a)||Object.assign(c,F3(e,c)),c.duration&&(c.duration=Lt(c.duration)),c.repeatDelay&&(c.repeatDelay=Lt(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let f=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Dh(c),c.delay===0&&(f=!0)),(Ur.instantAnimations||Ur.skipAnimations||s!=null&&s.shouldSkipAnimations||a.skipAnimations)&&(f=!0,Dh(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,f&&!i&&t.get()!==void 0){const h=ku(c.keyframes,a);if(h!==void 0){ge.update(()=>{c.onUpdate(h),c.onComplete()});return}}return a.isSync?new $c(c):new N3(c)},$3=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function V3(e){const t=$3.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}function k_(e,t,n=1){const[r,s]=V3(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return Ok(o)?parseFloat(o):o}return Tm(s)?k_(s,t,n+1):s}function dv(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Fm(e,t,n,r){if(typeof t=="function"){const[s,i]=dv(r);t=t(n!==void 0?n:e.custom,s,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,i]=dv(r);t=t(n!==void 0?n:e.custom,s,i)}return t}function Cs(e,t,n){const r=e.getProps();return Fm(r,t,n!==void 0?n:r.custom,e)}const __=new Set(["width","height","top","left","right","bottom",...Vi]),Oh=e=>Array.isArray(e);function U3(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ii(n))}function W3(e){return Oh(e)?e[e.length-1]||0:e}function H3(e,t){const n=Cs(e,t);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const a=W3(i[o]);U3(e,o,a)}}const Ye=e=>!!(e&&e.getVelocity);function G3(e){return!!(Ye(e)&&e.add)}function Fh(e,t){const n=e.getValue("willChange");if(G3(n))return n.add(t);if(!n&&Ur.WillChange){const r=new Ur.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function zm(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const K3="framerAppearId",S_="data-"+zm(K3);function C_(e){return e.props[S_]}function q3({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function P_(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:i,transitionEnd:o,...a}=t;const l=e.getDefaultTransition();i=i?b_(i,l):l;const u=i==null?void 0:i.reduceMotion,c=i==null?void 0:i.skipAnimations;r&&(i=r);const f=[],h=s&&e.animationState&&e.animationState.getState()[s],p=i==null?void 0:i.path;p&&p.animateVisualElement(e,a,i,n,f);for(const m in a){const y=e.getValue(m,e.latestValues[m]??null),w=a[m];if(w===void 0||h&&q3(h,m))continue;const g={delay:n,...Dm(i||{},m)};c&&(g.skipAnimations=!0);const x=y.get();if(x!==void 0&&!y.isAnimating()&&!Array.isArray(w)&&w===x&&!g.velocity){ge.update(()=>y.set(w));continue}let v=!1;if(window.MotionHandoffAnimation){const b=C_(e);if(b){const P=window.MotionHandoffAnimation(b,m,ge);P!==null&&(g.startTime=P,v=!0)}}Fh(e,m);const k=u??e.shouldReduceMotion;y.start(Om(m,y,w,k&&__.has(m)?{type:!1}:g,e,v));const S=y.animation;S&&f.push(S)}if(o){const m=()=>ge.update(()=>{o&&H3(e,o)});f.length?Promise.all(f).then(m):m()}return f}function zh(e,t,n={}){var l;const r=Cs(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const i=r?()=>Promise.all(P_(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:f,staggerDirection:h}=s;return Q3(e,t,u,c,f,h,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[u,c]=a==="beforeChildren"?[i,o]:[o,i];return u().then(()=>c())}else return Promise.all([i(),o(n.delay)])}function Q3(e,t,n=0,r=0,s=0,i=1,o){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(zh(l,t,{...o,delay:n+(typeof r=="function"?0:r)+w_(e.variantChildren,l,r,s,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function Y3(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>zh(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=zh(e,t,n);else{const s=typeof t=="function"?Cs(e,t,n.custom):t;r=Promise.all(P_(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const X3={test:e=>e==="auto",parse:e=>e},j_=e=>t=>t.test(e),E_=[$i,K,An,Un,_D,kD,X3],fv=e=>E_.find(j_(e));function J3(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||zk(e):!0}const Z3=new Set(["brightness","contrast","saturate","opacity"]);function eO(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Rm)||[];if(!r)return e;const s=n.replace(r,"");let i=Z3.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const tO=/\b([a-z-]*)\(.*?\)/gu,Bh={...pn,getAnimatableNone:e=>{const t=e.match(tO);return t?t.map(eO).join(" "):e}},$h={...pn,getAnimatableNone:e=>{const t=pn.parse(e);return pn.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},hv={...$i,transform:Math.round},nO={rotate:Un,pathRotation:Un,rotateX:Un,rotateY:Un,rotateZ:Un,scale:fl,scaleX:fl,scaleY:fl,scaleZ:fl,skew:Un,skewX:Un,skewY:Un,distance:K,translateX:K,translateY:K,translateZ:K,x:K,y:K,z:K,perspective:K,transformPerspective:K,opacity:ua,originX:Zx,originY:Zx,originZ:K},Vc={borderWidth:K,borderTopWidth:K,borderRightWidth:K,borderBottomWidth:K,borderLeftWidth:K,borderRadius:K,borderTopLeftRadius:K,borderTopRightRadius:K,borderBottomRightRadius:K,borderBottomLeftRadius:K,width:K,maxWidth:K,height:K,maxHeight:K,top:K,right:K,bottom:K,left:K,inset:K,insetBlock:K,insetBlockStart:K,insetBlockEnd:K,insetInline:K,insetInlineStart:K,insetInlineEnd:K,padding:K,paddingTop:K,paddingRight:K,paddingBottom:K,paddingLeft:K,paddingBlock:K,paddingBlockStart:K,paddingBlockEnd:K,paddingInline:K,paddingInlineStart:K,paddingInlineEnd:K,margin:K,marginTop:K,marginRight:K,marginBottom:K,marginLeft:K,marginBlock:K,marginBlockStart:K,marginBlockEnd:K,marginInline:K,marginInlineStart:K,marginInlineEnd:K,fontSize:K,backgroundPositionX:K,backgroundPositionY:K,...nO,zIndex:hv,fillOpacity:ua,strokeOpacity:ua,numOctaves:hv},rO={...Vc,color:Fe,backgroundColor:Fe,outlineColor:Fe,fill:Fe,stroke:Fe,borderColor:Fe,borderTopColor:Fe,borderRightColor:Fe,borderBottomColor:Fe,borderLeftColor:Fe,filter:Bh,WebkitFilter:Bh,mask:$h,WebkitMask:$h},T_=e=>rO[e],sO=new Set([Bh,$h]);function R_(e,t){let n=T_(e);return sO.has(n)||(n=pn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const iO=new Set(["auto","none","0"]);function oO(e,t,n){let r=0,s;for(;r<e.length&&!s;){const i=e[r];typeof i=="string"&&!iO.has(i)&&Ni(i).values.length&&(s=e[r]),r++}if(s&&n)for(const i of t)e[i]=R_(n,s)}class aO extends Lm{constructor(t,n,r,s,i){super(t,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let f=t[c];if(typeof f=="string"&&(f=f.trim(),Tm(f))){const h=k_(f,n.current);h!==void 0&&(t[c]=h),c===t.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!__.has(r)||t.length!==2)return;const[s,i]=t,o=fv(s),a=fv(i),l=Jx(s),u=Jx(i);if(l!==u&&Tr[r]){this.needsMeasurement=!0;return}if(o!==a)if(av(o)&&av(a))for(let c=0;c<t.length;c++){const f=t[c];typeof f=="string"&&(t[c]=parseFloat(f))}else Tr[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||J3(t[s]))&&r.push(s);r.length&&oO(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Tr[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const i=r.length-1,o=r[i];r[i]=Tr[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{t.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function N_(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const s=(n==null?void 0:n[e])??r.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(r=>r!=null)}const Vh=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Kl(e){return Fk(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Bm}=Jk(queueMicrotask,!1),ln={x:!1,y:!1};function I_(){return ln.x||ln.y}function lO(e){return e==="x"||e==="y"?ln[e]?null:(ln[e]=!0,()=>{ln[e]=!1}):ln.x||ln.y?null:(ln.x=ln.y=!0,()=>{ln.x=ln.y=!1})}function A_(e,t){const n=N_(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function cO(e){return!(e.pointerType==="touch"||I_())}function uO(e,t,n={}){const[r,s,i]=A_(e,n);return r.forEach(o=>{let a=!1,l=!1,u;const c=()=>{o.removeEventListener("pointerleave",m)},f=w=>{u&&(u(w),u=void 0),c()},h=w=>{a=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),l&&(l=!1,f(w))},p=()=>{a=!0,window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",h,s)},m=w=>{if(w.pointerType!=="touch"){if(a){l=!0;return}f(w)}},y=w=>{if(!cO(w))return;l=!1;const g=t(o,w);typeof g=="function"&&(u=g,o.addEventListener("pointerleave",m,s))};o.addEventListener("pointerenter",y,s),o.addEventListener("pointerdown",p,s)}),i}const M_=(e,t)=>t?e===t?!0:M_(e,t.parentElement):!1,$m=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,dO=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function fO(e){return dO.has(e.tagName)||e.isContentEditable===!0}const hO=new Set(["INPUT","SELECT","TEXTAREA"]);function pO(e){return hO.has(e.tagName)||e.isContentEditable===!0}const ql=new WeakSet;function pv(e){return t=>{t.key==="Enter"&&e(t)}}function Gd(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const mO=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=pv(()=>{if(ql.has(n))return;Gd(n,"down");const s=pv(()=>{Gd(n,"up")}),i=()=>Gd(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function mv(e){return $m(e)&&!I_()}const gv=new WeakSet;function gO(e,t,n={}){const[r,s,i]=A_(e,n),o=a=>{const l=a.currentTarget;if(!mv(a)||gv.has(a))return;ql.add(l),n.stopPropagation&&gv.add(a);const u=t(l,a),c=(p,m)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),ql.has(l)&&ql.delete(l),mv(p)&&typeof u=="function"&&u(p,{success:m})},f=p=>{c(p,l===window||l===document||n.useGlobalTarget||M_(l,p.target))},h=p=>{c(p,!1)};window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",h,s)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),Kl(a)&&(a.addEventListener("focus",u=>mO(u,s)),!fO(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function Vm(e){return Fk(e)&&"ownerSVGElement"in e}const Ql=new WeakMap;let gr;const L_=(e,t,n)=>(r,s)=>s&&s[0]?s[0][e+"Size"]:Vm(r)&&"getBBox"in r?r.getBBox()[t]:r[n],yO=L_("inline","width","offsetWidth"),xO=L_("block","height","offsetHeight");function vO({target:e,borderBoxSize:t}){var n;(n=Ql.get(e))==null||n.forEach(r=>{r(e,{get width(){return yO(e,t)},get height(){return xO(e,t)}})})}function wO(e){e.forEach(vO)}function bO(){typeof ResizeObserver>"u"||(gr=new ResizeObserver(wO))}function kO(e,t){gr||bO();const n=N_(e);return n.forEach(r=>{let s=Ql.get(r);s||(s=new Set,Ql.set(r,s)),s.add(t),gr==null||gr.observe(r)}),()=>{n.forEach(r=>{const s=Ql.get(r);s==null||s.delete(t),s!=null&&s.size||gr==null||gr.unobserve(r)})}}const Yl=new Set;let li;function _O(){li=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Yl.forEach(t=>t(e))},window.addEventListener("resize",li)}function SO(e){return Yl.add(e),li||_O(),()=>{Yl.delete(e),!Yl.size&&typeof li=="function"&&(window.removeEventListener("resize",li),li=void 0)}}function yv(e,t){return typeof e=="function"?SO(e):kO(e,t)}function CO(e){return Vm(e)&&e.tagName==="svg"}const PO=[...E_,Fe,pn],jO=e=>PO.find(j_(e)),xv=()=>({translate:0,scale:1,origin:0,originPoint:0}),ci=()=>({x:xv(),y:xv()}),vv=()=>({min:0,max:0}),Be=()=>({x:vv(),y:vv()}),EO=new WeakMap;function _u(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function da(e){return typeof e=="string"||Array.isArray(e)}const Um=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Wm=["initial",...Um];function Su(e){return _u(e.animate)||Wm.some(t=>da(e[t]))}function D_(e){return!!(Su(e)||e.variants)}function TO(e,t,n){for(const r in t){const s=t[r],i=n[r];if(Ye(s))e.addValue(r,s);else if(Ye(i))e.addValue(r,Ii(s,{owner:e}));else if(i!==s)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(r);e.addValue(r,Ii(o!==void 0?o:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Uc={current:null},Hm={current:!1},RO=typeof window<"u";function O_(){if(Hm.current=!0,!!RO)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Uc.current=e.matches;e.addEventListener("change",t),t()}else Uc.current=!1}const wv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Wc={};function F_(e){Wc=e}function NO(){return Wc}class IO{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,skipAnimations:i,blockInitialAnimation:o,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Lm,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=lt.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,ge.render(this.render,!1,!0))};const{latestValues:u,renderState:c}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=i,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=Su(n),this.isVariantNode=D_(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in h){const m=h[p];u[p]!==void 0&&Ye(m)&&m.set(u[p])}}mount(t){var n,r;if(this.hasBeenMounted)for(const s in this.initialValues)(n=this.values.get(s))==null||n.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=t,EO.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,i)=>this.bindToMotionValue(i,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Hm.current||O_(),this.shouldReduceMotion=Uc.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),Wr(this.notifyUpdate),Wr(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&v_.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:u,duration:c}=n.accelerate,f=new y_({element:this.current,name:t,keyframes:a,times:l,ease:u,duration:Lt(c)}),h=o(f);this.valueSubscriptions.set(t,()=>{h(),f.cancel()});return}const r=Ui.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&ge.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),i&&i()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Wc){const n=Wc[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Be()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<wv.length;r++){const s=wv[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,o=t[i];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=TO(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Ii(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Ok(r)||zk(r))?r=parseFloat(r):!jO(r)&&pn.test(n)&&(r=R_(t,n)),this.setBaseTarget(t,Ye(r)?r.get():r)),Ye(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var i;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=Fm(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Ye(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Pm),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Bm.render(this.render)}}class z_ extends IO{constructor(){super(...arguments),this.KeyframeResolver=aO}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ye(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Zr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function B_({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function AO({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function MO(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Kd(e){return e===void 0||e===1}function Uh({scale:e,scaleX:t,scaleY:n}){return!Kd(e)||!Kd(t)||!Kd(n)}function us(e){return Uh(e)||$_(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function $_(e){return bv(e.x)||bv(e.y)}function bv(e){return e&&e!=="0%"}function Hc(e,t,n){const r=e-n,s=t*r;return n+s}function kv(e,t,n,r,s){return s!==void 0&&(e=Hc(e,s,r)),Hc(e,n,r)+t}function Wh(e,t=0,n=1,r,s){e.min=kv(e.min,t,n,r,s),e.max=kv(e.max,t,n,r,s)}function V_(e,{x:t,y:n}){Wh(e.x,t.translate,t.scale,t.originPoint),Wh(e.y,n.translate,n.scale,n.originPoint)}const _v=.999999999999,Sv=1.0000000000001;function LO(e,t,n,r=!1){var a;const s=n.length;if(!s)return;t.x=t.y=1;let i,o;for(let l=0;l<s;l++){i=n[l],o=i.projectionDelta;const{visualElement:u}=i.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(jn(e.x,-i.scroll.offset.x),jn(e.y,-i.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,V_(e,o)),r&&us(i.latestValues)&&Xl(e,i.latestValues,(a=i.layout)==null?void 0:a.layoutBox))}t.x<Sv&&t.x>_v&&(t.x=1),t.y<Sv&&t.y>_v&&(t.y=1)}function jn(e,t){e.min+=t,e.max+=t}function Cv(e,t,n,r,s=.5){const i=me(e.min,e.max,s);Wh(e,t,n,i,r)}function Pv(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function Xl(e,t,n){const r=n??e;Cv(e.x,Pv(t.x,r.x),t.scaleX,t.scale,t.originX),Cv(e.y,Pv(t.y,r.y),t.scaleY,t.scale,t.originY)}function U_(e,t){return B_(MO(e.getBoundingClientRect(),t))}function DO(e,t,n){const r=U_(e,n),{scroll:s}=t;return s&&(jn(r.x,s.offset.x),jn(r.y,s.offset.y)),r}const OO={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},FO=Vi.length;function zO(e,t,n){let r="",s=!0;for(let o=0;o<FO;o++){const a=Vi[o],l=e[a];if(l===void 0)continue;let u=!0;if(typeof l=="number")u=l===(a.startsWith("scale")?1:0);else{const c=parseFloat(l);u=a.startsWith("scale")?c===1:c===0}if(!u||n){const c=Vh(l,Vc[a]);if(!u){s=!1;const f=OO[a]||a;r+=`${f}(${c}) `}n&&(t[a]=c)}}const i=e.pathRotation;return i&&(s=!1,r+=`rotate(${Vh(i,Vc.pathRotation)}) `),r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function Gm(e,t,n){const{style:r,vars:s,transformOrigin:i}=e;let o=!1,a=!1;for(const l in t){const u=t[l];if(Ui.has(l)){o=!0;continue}else if(e_(l)){s[l]=u;continue}else{const c=Vh(u,Vc[l]);l.startsWith("origin")?(a=!0,i[l]=c):r[l]=c}}if(t.transform||(o||n?r.transform=zO(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=i;r.transformOrigin=`${l} ${u} ${c}`}}function W_(e,{style:t,vars:n},r,s){const i=e.style;let o;for(o in t)i[o]=t[o];s==null||s.applyProjectionStyles(i,r);for(o in n)i.setProperty(o,n[o])}function jv(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const mo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(K.test(e))e=parseFloat(e);else return e;const n=jv(e,t.target.x),r=jv(e,t.target.y);return`${n}% ${r}%`}},BO={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=pn.parse(e);if(s.length>5)return r;const i=pn.createTransformer(e),o=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;s[0+o]/=a,s[1+o]/=l;const u=me(a,l,.5);return typeof s[2+o]=="number"&&(s[2+o]/=u),typeof s[3+o]=="number"&&(s[3+o]/=u),i(s)}},Hh={borderRadius:{...mo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:mo,borderTopRightRadius:mo,borderBottomLeftRadius:mo,borderBottomRightRadius:mo,boxShadow:BO};function H_(e,{layout:t,layoutId:n}){return Ui.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Hh[e]||e==="opacity")}function Km(e,t,n){var o;const r=e.style,s=t==null?void 0:t.style,i={};if(!r)return i;for(const a in r)(Ye(r[a])||s&&Ye(s[a])||H_(a,e)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(i[a]=r[a]);return i}function $O(e){return window.getComputedStyle(e)}class VO extends z_{constructor(){super(...arguments),this.type="html",this.renderInstance=W_}readValueFromInstance(t,n){var r;if(Ui.has(n))return(r=this.projection)!=null&&r.isProjecting?Nh(n):c3(t,n);{const s=$O(t),i=(e_(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return U_(t,n)}build(t,n,r){Gm(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Km(t,n,r)}}const UO={offset:"stroke-dashoffset",array:"stroke-dasharray"},WO={offset:"strokeDashoffset",array:"strokeDasharray"};function HO(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?UO:WO;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const GO=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function G_(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:i=1,pathOffset:o=0,...a},l,u,c){if(Gm(e,a,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h}=e;f.transform&&(h.transform=f.transform,delete f.transform),(h.transform||f.transformOrigin)&&(h.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),h.transform&&(h.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete f.transformBox);for(const p of GO)f[p]!==void 0&&(h[p]=f[p],delete f[p]);t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),s!==void 0&&HO(f,s,i,o,!1)}const K_=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),q_=e=>typeof e=="string"&&e.toLowerCase()==="svg";function KO(e,t,n,r){W_(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(K_.has(s)?s:zm(s),t.attrs[s])}function Q_(e,t,n){const r=Km(e,t,n);for(const s in e)if(Ye(e[s])||Ye(t[s])){const i=Vi.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=e[s]}return r}class qO extends z_{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Be}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ui.has(n)){const r=T_(n);return r&&r.default||0}return n=K_.has(n)?n:zm(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Q_(t,n,r)}build(t,n,r){G_(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){KO(t,n,r,s)}mount(t){this.isSVGTag=q_(t.tagName),super.mount(t)}}const QO=Wm.length;function Y_(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Y_(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<QO;n++){const r=Wm[n],s=e.props[r];(da(s)||s===!1)&&(t[r]=s)}return t}function X_(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const YO=[...Um].reverse(),XO=Um.length;function JO(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Y3(e,n,r)))}function ZO(e){let t=JO(e),n=Ev(),r=!0,s=!1;const i=u=>(c,f)=>{var p;const h=Cs(e,f,u==="exit"?(p=e.presenceContext)==null?void 0:p.custom:void 0);if(h){const{transition:m,transitionEnd:y,...w}=h;c={...c,...w,...y}}return c};function o(u){t=u(e)}function a(u){const{props:c}=e,f=Y_(e.parent)||{},h=[],p=new Set;let m={},y=1/0;for(let g=0;g<XO;g++){const x=YO[g],v=n[x],k=c[x]!==void 0?c[x]:f[x],S=da(k),b=x===u?v.isActive:null;b===!1&&(y=g);let P=k===f[x]&&k!==c[x]&&S;if(P&&(r||s)&&e.manuallyAnimateOnMount&&(P=!1),v.protectedKeys={...m},!v.isActive&&b===null||!k&&!v.prevProp||_u(k)||typeof k=="boolean")continue;if(x==="exit"&&v.isActive&&b!==!0){v.prevResolvedValues&&(m={...m,...v.prevResolvedValues});continue}const j=eF(v.prevProp,k);let R=j||x===u&&v.isActive&&!P&&S||g>y&&S,T=!1;const I=Array.isArray(k)?k:[k];let A=I.reduce(i(x),{});b===!1&&(A={});const{prevResolvedValues:F={}}=v,z={...F,...A},E=M=>{R=!0,p.has(M)&&(T=!0,p.delete(M)),v.needsAnimating[M]=!0;const $=e.getValue(M);$&&($.liveStyle=!1)};for(const M in z){const $=A[M],C=F[M];if(m.hasOwnProperty(M))continue;let V=!1;Oh($)&&Oh(C)?V=!X_($,C)||j:V=$!==C,V?$!=null?E(M):p.add(M):$!==void 0&&p.has(M)?E(M):v.protectedKeys[M]=!0}v.prevProp=k,v.prevResolvedValues=A,v.isActive&&(m={...m,...A}),(r||s)&&e.blockInitialAnimation&&(R=!1);const D=P&&j;R&&(!D||T)&&h.push(...I.map(M=>{const $={type:x};if(typeof M=="string"&&(r||s)&&!D&&e.manuallyAnimateOnMount&&e.parent){const{parent:C}=e,V=Cs(C,M);if(C.enteringChildren&&V){const{delayChildren:q}=V.transition||{};$.delay=w_(C.enteringChildren,e,q)}}return{animation:M,options:$}}))}if(p.size){const g={};if(typeof c.initial!="boolean"){const x=Cs(e,Array.isArray(c.initial)?c.initial[0]:c.initial);x&&x.transition&&(g.transition=x.transition)}p.forEach(x=>{const v=e.getBaseTarget(x),k=e.getValue(x);k&&(k.liveStyle=!0),g[x]=v??null}),h.push({animation:g})}let w=!!h.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(w=!1),r=!1,s=!1,w?t(h):Promise.resolve()}function l(u,c){var h;if(n[u].isActive===c)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(p=>{var m;return(m=p.animationState)==null?void 0:m.setActive(u,c)}),n[u].isActive=c;const f=a(u);for(const p in n)n[p].protectedKeys={};return f}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Ev(),s=!0}}}function eF(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!X_(t,e):!1}function ns(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ev(){return{animate:ns(!0),whileInView:ns(),whileHover:ns(),whileTap:ns(),whileDrag:ns(),whileFocus:ns(),exit:ns()}}function Gh(e,t){e.min=t.min,e.max=t.max}function rn(e,t){Gh(e.x,t.x),Gh(e.y,t.y)}function Tv(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const J_=1e-4,tF=1-J_,nF=1+J_,Z_=.01,rF=0-Z_,sF=0+Z_;function ct(e){return e.max-e.min}function iF(e,t,n){return Math.abs(e-t)<=n}function Rv(e,t,n,r=.5){e.origin=r,e.originPoint=me(t.min,t.max,e.origin),e.scale=ct(n)/ct(t),e.translate=me(n.min,n.max,e.origin)-e.originPoint,(e.scale>=tF&&e.scale<=nF||isNaN(e.scale))&&(e.scale=1),(e.translate>=rF&&e.translate<=sF||isNaN(e.translate))&&(e.translate=0)}function zo(e,t,n,r){Rv(e.x,t.x,n.x,r?r.originX:void 0),Rv(e.y,t.y,n.y,r?r.originY:void 0)}function Nv(e,t,n,r=0){const s=r?me(n.min,n.max,r):n.min;e.min=s+t.min,e.max=e.min+ct(t)}function oF(e,t,n,r){Nv(e.x,t.x,n.x,r==null?void 0:r.x),Nv(e.y,t.y,n.y,r==null?void 0:r.y)}function Iv(e,t,n,r=0){const s=r?me(n.min,n.max,r):n.min;e.min=t.min-s,e.max=e.min+ct(t)}function Gc(e,t,n,r){Iv(e.x,t.x,n.x,r==null?void 0:r.x),Iv(e.y,t.y,n.y,r==null?void 0:r.y)}function Av(e,t,n,r,s){return e-=t,e=Hc(e,1/n,r),s!==void 0&&(e=Hc(e,1/s,r)),e}function aF(e,t=0,n=1,r=.5,s,i=e,o=e){if(An.test(t)&&(t=parseFloat(t),t=me(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=me(i.min,i.max,r);e===i&&(a-=t),e.min=Av(e.min,t,n,a,s),e.max=Av(e.max,t,n,a,s)}function Mv(e,t,[n,r,s],i,o){aF(e,t[n],t[r],t[s],t.scale,i,o)}const lF=["x","scaleX","originX"],cF=["y","scaleY","originY"];function Lv(e,t,n,r){Mv(e.x,t,lF,n?n.x:void 0,r?r.x:void 0),Mv(e.y,t,cF,n?n.y:void 0,r?r.y:void 0)}function Dv(e){return e.translate===0&&e.scale===1}function eS(e){return Dv(e.x)&&Dv(e.y)}function Ov(e,t){return e.min===t.min&&e.max===t.max}function uF(e,t){return Ov(e.x,t.x)&&Ov(e.y,t.y)}function Fv(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function tS(e,t){return Fv(e.x,t.x)&&Fv(e.y,t.y)}function zv(e){return ct(e.x)/ct(e.y)}function Bv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Cn(e){return[e("x"),e("y")]}function dF(e,t,n){let r="";const s=e.x.translate/t.x,i=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((s||i||o)&&(r=`translate3d(${s}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,pathRotation:f,rotateX:h,rotateY:p,skewX:m,skewY:y}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),f&&(r+=`rotate(${f}deg) `),h&&(r+=`rotateX(${h}deg) `),p&&(r+=`rotateY(${p}deg) `),m&&(r+=`skewX(${m}deg) `),y&&(r+=`skewY(${y}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const nS=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],fF=nS.length,$v=e=>typeof e=="string"?parseFloat(e):e,Vv=e=>typeof e=="number"||K.test(e);function hF(e,t,n,r,s,i){s?(e.opacity=me(0,n.opacity??1,pF(r)),e.opacityExit=me(t.opacity??1,0,mF(r))):i&&(e.opacity=me(t.opacity??1,n.opacity??1,r));for(let o=0;o<fF;o++){const a=nS[o];let l=Uv(t,a),u=Uv(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Vv(l)===Vv(u)?(e[a]=Math.max(me($v(l),$v(u),r),0),(An.test(u)||An.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=me(t.rotate||0,n.rotate||0,r))}function Uv(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const pF=rS(0,.5,qk),mF=rS(.5,.95,Xt);function rS(e,t,n){return r=>r<e?0:r>t?1:n(ca(e,t,r))}function gF(e,t,n){const r=Ye(e)?e:Ii(e);return r.start(Om("",r,t,n)),r.animation}function fa(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const yF=(e,t)=>e.depth-t.depth;class xF{constructor(){this.children=[],this.isDirty=!1}add(t){Sm(this.children,t),this.isDirty=!0}remove(t){Oc(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(yF),this.isDirty=!1,this.children.forEach(t)}}function vF(e,t){const n=lt.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(Wr(r),e(i-t))};return ge.setup(r,!0),()=>Wr(r)}function Jl(e){return Ye(e)?e.get():e}class wF{constructor(){this.members=[]}add(t){Sm(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const s=r.instance;(!s||s.isConnected===!1)&&!r.snapshot&&(Oc(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(Oc(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){var n;for(let r=this.members.indexOf(t)-1;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1&&((n=s.instance)==null?void 0:n.isConnected)!==!1)return this.promote(s),!0}return!1}promote(t,n){var s;const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=r.options,{layoutDependency:o}=t.options;(i===void 0||i!==o)&&(t.resumeFrom=r,n&&(r.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),(s=t.root)!=null&&s.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,s,i,o;(r=(n=t.options).onExitComplete)==null||r.call(n),(o=(s=t.resumingFrom)==null?void 0:(i=s.options).onExitComplete)==null||o.call(i)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const Zl={hasAnimatedSinceResize:!0,hasEverUpdated:!1},qd=["","X","Y","Z"],bF=1e3;let kF=0;function Qd(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function sS(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=C_(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ge,!(s||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&sS(r)}function iS({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},a=t==null?void 0:t()){this.id=kF++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(CF),this.nodes.forEach(NF),this.nodes.forEach(IF),this.nodes.forEach(PF)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new xF)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Pm),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=Vm(o)&&!CO(o),this.instance=o;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let c,f=0;const h=()=>this.root.updateBlockedByResize=!1;ge.read(()=>{f=window.innerWidth}),e(o,()=>{const p=window.innerWidth;p!==f&&(f=p,this.root.updateBlockedByResize=!0,c&&c(),c=vF(h,250),Zl.hasAnimatedSinceResize&&(Zl.hasAnimatedSinceResize=!1,this.nodes.forEach(Gv)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||OF,{onLayoutAnimationStart:y,onLayoutAnimationComplete:w}=u.getProps(),g=!this.targetLayout||!tS(this.targetLayout,p),x=!f&&h;if(this.options.layoutRoot||this.resumeFrom||x||f&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...Dm(m,"layout"),onPlay:y,onComplete:w};(u.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(c,x,v.path)}else f||Gv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Wr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(AF),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&sS(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const f=this.path[c];f.shouldResetTransform=!0,(typeof f.latestValues.x=="string"||typeof f.latestValues.y=="string")&&(f.isLayoutDirty=!0),f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const l=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),l&&this.nodes.forEach(EF),this.nodes.forEach(Wv);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Hv);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(TF),this.nodes.forEach(RF),this.nodes.forEach(_F),this.nodes.forEach(SF)):this.nodes.forEach(Hv),this.clearAllSnapshots();const a=lt.now();Qe.delta=Ln(0,1e3/60,a-Qe.timestamp),Qe.timestamp=a,Qe.isProcessing=!0,Bd.update.process(Qe),Bd.preRender.process(Qe),Bd.render.process(Qe),Qe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Bm.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(jF),this.sharedNodes.forEach(MF)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ge.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ge.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ct(this.snapshot.measuredBox.x)&&!ct(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Be()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!eS(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||us(this.latestValues)||c)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),FF(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return Be();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(zF))){const{scroll:c}=this.root;c&&(jn(a.x,c.offset.x),jn(a.y,c.offset.y))}return a}removeElementScroll(o){var l;const a=Be();if(rn(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:f,options:h}=c;c!==this.root&&f&&h.layoutScroll&&(f.wasRoot&&rn(a,o),jn(a.x,f.offset.x),jn(a.y,f.offset.y))}return a}applyTransform(o,a=!1,l){var c,f;const u=l||Be();rn(u,o);for(let h=0;h<this.path.length;h++){const p=this.path[h];!a&&p.options.layoutScroll&&p.scroll&&p!==p.root&&(jn(u.x,-p.scroll.offset.x),jn(u.y,-p.scroll.offset.y)),us(p.latestValues)&&Xl(u,p.latestValues,(c=p.layout)==null?void 0:c.layoutBox)}return us(this.latestValues)&&Xl(u,this.latestValues,(f=this.layout)==null?void 0:f.layoutBox),u}removeTransform(o){var l;const a=Be();rn(a,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];if(!us(c.latestValues))continue;let f;c.instance&&(Uh(c.latestValues)&&c.updateSnapshot(),f=Be(),rn(f,c.measurePageBox())),Lv(a,c.latestValues,(l=c.snapshot)==null?void 0:l.layoutBox,f)}return us(this.latestValues)&&Lv(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Qe.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var p;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:f}=this.options;if(!this.layout||!(c||f))return;this.resolvedRelativeTargetAt=Qe.timestamp;const h=this.getClosestProjectingParent();h&&this.linkedParentVersion!==h.layoutVersion&&!h.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&h&&h.layout?this.createRelativeTarget(h,this.layout.layoutBox,h.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Be(),this.targetWithTransforms=Be()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),oF(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):rn(this.target,this.layout.layoutBox),V_(this.target,this.targetDelta)):rn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?this.createRelativeTarget(h,this.target,h.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Uh(this.parent.latestValues)||$_(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Be(),this.relativeTargetOrigin=Be(),Gc(this.relativeTargetOrigin,a,l,this.options.layoutAnchor||void 0),rn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var m;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Qe.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;rn(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;LO(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Be());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Tv(this.prevProjectionDelta.x,this.projectionDelta.x),Tv(this.prevProjectionDelta.y,this.projectionDelta.y)),zo(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!Bv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Bv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ci(),this.projectionDelta=ci(),this.projectionDeltaWithTransform=ci()}setAnimationOrigin(o,a=!1,l){const u=this.snapshot,c=u?u.latestValues:{},f={...this.latestValues},h=ci();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const p=Be(),m=u?u.source:void 0,y=this.layout?this.layout.source:void 0,w=m!==y,g=this.getStack(),x=!g||g.members.length<=1,v=!!(w&&!x&&this.options.crossfade===!0&&!this.path.some(DF));this.animationProgress=0;let k;const S=l==null?void 0:l.interpolateProjection(o);this.mixTargetDelta=b=>{const P=b/1e3,j=S==null?void 0:S(P);j?(h.x.translate=j.x,h.x.scale=me(o.x.scale,1,P),h.x.origin=o.x.origin,h.x.originPoint=o.x.originPoint,h.y.translate=j.y,h.y.scale=me(o.y.scale,1,P),h.y.origin=o.y.origin,h.y.originPoint=o.y.originPoint):(Kv(h.x,o.x,P),Kv(h.y,o.y,P)),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Gc(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),LF(this.relativeTarget,this.relativeTargetOrigin,p,P),k&&uF(this.relativeTarget,k)&&(this.isProjectionDirty=!1),k||(k=Be()),rn(k,this.relativeTarget)),w&&(this.animationValues=f,hF(f,c,this.latestValues,P,v,x)),j&&j.rotate!==void 0&&(this.animationValues||(this.animationValues=f),this.animationValues.pathRotation=j.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(Wr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ge.update(()=>{Zl.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ii(0)),this.motionValue.jump(0,!1),this.currentAnimation=gF(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),o.onUpdate&&o.onUpdate(c)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(bF),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&oS(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Be();const f=ct(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+f;const h=ct(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}rn(a,l),Xl(a,c),zo(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new wF),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Qd("z",o,u,this.animationValues);for(let c=0;c<qd.length;c++)Qd(`rotate${qd[c]}`,o,u,this.animationValues),Qd(`skew${qd[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Jl(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Jl(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!us(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let f=dF(this.projectionDeltaWithTransform,this.treeScale,c);l&&(f=l(c,f)),o.transform=f;const{x:h,y:p}=this.projectionDelta;o.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,u.animationValues?o.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:o.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const m in Hh){if(c[m]===void 0)continue;const{correct:y,applyTo:w,isCSSVariable:g}=Hh[m],x=f==="none"?c[m]:y(c[m],u);if(w){const v=w.length;for(let k=0;k<v;k++)o[w[k]]=x}else g?this.options.visualElement.renderState.vars[m]=x:o[m]=x}this.options.layoutId&&(o.pointerEvents=u===this?Jl(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Wv),this.root.sharedNodes.clear()}}}function _F(e){e.updateLayout()}function SF(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;if(i==="size")Cn(f=>{const h=o?t.measuredBox[f]:t.layoutBox[f],p=ct(h);h.min=r[f].min,h.max=h.min+p});else if(i==="x"||i==="y"){const f=i==="x"?"y":"x";Gh(o?t.measuredBox[f]:t.layoutBox[f],r[f])}else oS(i,t.layoutBox,r)&&Cn(f=>{const h=o?t.measuredBox[f]:t.layoutBox[f],p=ct(r[f]);h.max=h.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+p)});const a=ci();zo(a,r,t.layoutBox);const l=ci();o?zo(l,e.applyTransform(s,!0),t.measuredBox):zo(l,r,t.layoutBox);const u=!eS(a);let c=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:p}=f;if(h&&p){const m=e.options.layoutAnchor||void 0,y=Be();Gc(y,t.layoutBox,h.layoutBox,m);const w=Be();Gc(w,r,p.layoutBox,m),tS(y,w)||(c=!0),f.options.layoutRoot&&(e.relativeTarget=w,e.relativeTargetOrigin=y,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function CF(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function PF(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function jF(e){e.clearSnapshot()}function Wv(e){e.clearMeasurements()}function EF(e){e.isLayoutDirty=!0,e.updateLayout()}function Hv(e){e.isLayoutDirty=!1}function TF(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function RF(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Gv(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function NF(e){e.resolveTargetDelta()}function IF(e){e.calcProjection()}function AF(e){e.resetSkewAndRotation()}function MF(e){e.removeLeadSnapshot()}function Kv(e,t,n){e.translate=me(t.translate,0,n),e.scale=me(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function qv(e,t,n,r){e.min=me(t.min,n.min,r),e.max=me(t.max,n.max,r)}function LF(e,t,n,r){qv(e.x,t.x,n.x,r),qv(e.y,t.y,n.y,r)}function DF(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const OF={duration:.45,ease:[.4,0,.1,1]},Qv=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Yv=Qv("applewebkit/")&&!Qv("chrome/")?Math.round:Xt;function Xv(e){e.min=Yv(e.min),e.max=Yv(e.max)}function FF(e){Xv(e.x),Xv(e.y)}function oS(e,t,n){return e==="position"||e==="preserve-aspect"&&!iF(zv(t),zv(n),.2)}function zF(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const BF=iS({attachResizeListener:(e,t)=>fa(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Yd={current:void 0},aS=iS({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Yd.current){const e=new BF({});e.mount(window),e.setOptions({layoutScroll:!0}),Yd.current=e}return Yd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),qm=_.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Jv(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function $F(...e){return t=>{let n=!1;const r=e.map(s=>{const i=Jv(s,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():Jv(e[s],null)}}}}function VF(...e){return _.useCallback($F(...e),e)}class UF extends _.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(Kl(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,s=Kl(r)&&r.offsetWidth||0,i=Kl(r)&&r.offsetHeight||0,o=getComputedStyle(n),a=this.props.sizeRef.current;a.height=parseFloat(o.height),a.width=parseFloat(o.width),a.top=n.offsetTop,a.left=n.offsetLeft,a.right=s-a.width-a.left,a.bottom=i-a.height-a.top,a.direction=o.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function WF({children:e,isPresent:t,anchorX:n,anchorY:r,root:s,pop:i}){var h;const o=_.useId(),a=_.useRef(null),l=_.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:u}=_.useContext(qm),c=((h=e.props)==null?void 0:h.ref)??(e==null?void 0:e.ref),f=VF(a,c);return _.useInsertionEffect(()=>{const{width:p,height:m,top:y,left:w,right:g,bottom:x,direction:v}=l.current;if(t||i===!1||!a.current||!p||!m)return;const k=v==="rtl",S=n==="left"?k?`right: ${g}`:`left: ${w}`:k?`left: ${w}`:`right: ${g}`,b=r==="bottom"?`bottom: ${x}`:`top: ${y}`;a.current.dataset.motionPopId=o;const P=document.createElement("style");u&&(P.nonce=u);const j=s??document.head;return j.appendChild(P),P.sheet&&P.sheet.insertRule(`
|
|
71
|
-
[data-motion-pop-id="${o}"] {
|
|
72
|
-
position: absolute !important;
|
|
73
|
-
width: ${p}px !important;
|
|
74
|
-
height: ${m}px !important;
|
|
75
|
-
${S}px !important;
|
|
76
|
-
${b}px !important;
|
|
77
|
-
}
|
|
78
|
-
`),()=>{var R;(R=a.current)==null||R.removeAttribute("data-motion-pop-id"),j.contains(P)&&j.removeChild(P)}},[t]),d.jsx(UF,{isPresent:t,childRef:a,sizeRef:l,pop:i,children:i===!1?e:_.cloneElement(e,{ref:f})})}const HF=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:o,anchorX:a,anchorY:l,root:u})=>{const c=_m(GF),f=_.useId();let h=!0,p=_.useMemo(()=>(h=!1,{id:f,initial:t,isPresent:n,custom:s,onExitComplete:m=>{c.set(m,!0);for(const y of c.values())if(!y)return;r&&r()},register:m=>(c.set(m,!1),()=>c.delete(m))}),[n,c,r]);return i&&h&&(p={...p}),_.useMemo(()=>{c.forEach((m,y)=>c.set(y,!1))},[n]),_.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),e=d.jsx(WF,{pop:o==="popLayout",isPresent:n,anchorX:a,anchorY:l,root:u,children:e}),d.jsx(bu.Provider,{value:p,children:e})};function GF(){return new Map}function lS(e=!0){const t=_.useContext(bu);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,i=_.useId();_.useEffect(()=>{if(e)return s(i)},[e]);const o=_.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,o]:[!0]}const hl=e=>e.key||"";function Zv(e){const t=[];return _.Children.forEach(e,n=>{_.isValidElement(n)&&t.push(n)}),t}const cS=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:i="sync",propagate:o=!1,anchorX:a="left",anchorY:l="top",root:u})=>{const[c,f]=lS(o),h=_.useMemo(()=>Zv(e),[e]),p=o&&!c?[]:h.map(hl),m=_.useRef(!0),y=_.useRef(h),w=_m(()=>new Map),g=_.useRef(new Set),[x,v]=_.useState(h),[k,S]=_.useState(h);Dk(()=>{m.current=!1,y.current=h;for(let j=0;j<k.length;j++){const R=hl(k[j]);p.includes(R)?(w.delete(R),g.current.delete(R)):w.get(R)!==!0&&w.set(R,!1)}},[k,p.length,p.join("-")]);const b=[];if(h!==x){let j=[...h];for(let R=0;R<k.length;R++){const T=k[R],I=hl(T);p.includes(I)||(j.splice(R,0,T),b.push(T))}return i==="wait"&&b.length&&(j=b),S(Zv(j)),v(h),null}const{forceRender:P}=_.useContext(km);return d.jsx(d.Fragment,{children:k.map(j=>{const R=hl(j),T=o&&!c?!1:h===k||p.includes(R),I=()=>{if(g.current.has(R))return;if(w.has(R))g.current.add(R),w.set(R,!0);else return;let A=!0;w.forEach(F=>{F||(A=!1)}),A&&(P==null||P(),S(y.current),o&&(f==null||f()),r&&r())};return d.jsx(HF,{isPresent:T,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:i,root:u,onExitComplete:T?void 0:I,anchorX:a,anchorY:l,children:j},R)})})},uS=_.createContext({strict:!1}),e0={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let t0=!1;function KF(){if(t0)return;const e={};for(const t in e0)e[t]={isEnabled:n=>e0[t].some(r=>!!n[r])};F_(e),t0=!0}function dS(){return KF(),NO()}function qF(e){const t=dS();for(const n in e)t[n]={...t[n],...e[n]};F_(t)}const QF=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Kc(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||QF.has(e)}let fS=e=>!Kc(e);function YF(e){typeof e=="function"&&(fS=t=>t.startsWith("on")?!Kc(t):e(t))}try{YF(require("@emotion/is-prop-valid").default)}catch{}function XF(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||Ye(e[s])||(fS(s)||n===!0&&Kc(s)||!t&&!Kc(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const Cu=_.createContext({});function JF(e,t){if(Su(e)){const{initial:n,animate:r}=e;return{initial:n===!1||da(n)?n:void 0,animate:da(r)?r:void 0}}return e.inherit!==!1?t:{}}function ZF(e){const{initial:t,animate:n}=JF(e,_.useContext(Cu));return _.useMemo(()=>({initial:t,animate:n}),[n0(t),n0(n)])}function n0(e){return Array.isArray(e)?e.join(" "):e}const Qm=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function hS(e,t,n){for(const r in t)!Ye(t[r])&&!H_(r,n)&&(e[r]=t[r])}function ez({transformTemplate:e},t){return _.useMemo(()=>{const n=Qm();return Gm(n,t,e),Object.assign({},n.vars,n.style)},[t])}function tz(e,t){const n=e.style||{},r={};return hS(r,n,e),Object.assign(r,ez(e,t)),r}function nz(e,t){const n={},r=tz(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const pS=()=>({...Qm(),attrs:{}});function rz(e,t,n,r){const s=_.useMemo(()=>{const i=pS();return G_(i,t,q_(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};hS(i,e.style,e),s.style={...i,...s.style}}return s}const sz=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ym(e){return typeof e!="string"||e.includes("-")?!1:!!(sz.indexOf(e)>-1||/[A-Z]/u.test(e))}function iz(e,t,n,{latestValues:r},s,i=!1,o){const l=(o??Ym(e)?rz:nz)(t,r,s,e),u=XF(t,typeof e=="string",i),c=e!==_.Fragment?{...u,...l,ref:n}:{},{children:f}=t,h=_.useMemo(()=>Ye(f)?f.get():f,[f]);return _.createElement(e,{...c,children:h})}function oz({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:az(n,r,s,e),renderState:t()}}function az(e,t,n,r){const s={},i=r(e,{});for(const h in i)s[h]=Jl(i[h]);let{initial:o,animate:a}=e;const l=Su(e),u=D_(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const f=c?a:o;if(f&&typeof f!="boolean"&&!_u(f)){const h=Array.isArray(f)?f:[f];for(let p=0;p<h.length;p++){const m=Fm(e,h[p]);if(m){const{transitionEnd:y,transition:w,...g}=m;for(const x in g){let v=g[x];if(Array.isArray(v)){const k=c?v.length-1:0;v=v[k]}v!==null&&(s[x]=v)}for(const x in y)s[x]=y[x]}}}return s}const mS=e=>(t,n)=>{const r=_.useContext(Cu),s=_.useContext(bu),i=()=>oz(e,t,r,s);return n?i():_m(i)},lz=mS({scrapeMotionValuesFromProps:Km,createRenderState:Qm}),cz=mS({scrapeMotionValuesFromProps:Q_,createRenderState:pS}),uz=Symbol.for("motionComponentSymbol");function dz(e,t,n){const r=_.useRef(n);_.useInsertionEffect(()=>{r.current=n});const s=_.useRef(null);return _.useCallback(i=>{var a;i&&((a=e.onMount)==null||a.call(e,i)),t&&(i?t.mount(i):t.unmount());const o=r.current;if(typeof o=="function")if(i){const l=o(i);typeof l=="function"&&(s.current=l)}else s.current?(s.current(),s.current=null):o(i);else o&&(o.current=i)},[t])}const gS=_.createContext({});function Ks(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function fz(e,t,n,r,s,i){var v,k;const{visualElement:o}=_.useContext(Cu),a=_.useContext(uS),l=_.useContext(bu),u=_.useContext(qm),c=u.reducedMotion,f=u.skipAnimations,h=_.useRef(null),p=_.useRef(!1);r=r||a.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,skipAnimations:f,isSVG:i}),p.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const m=h.current,y=_.useContext(gS);m&&!m.projection&&s&&(m.type==="html"||m.type==="svg")&&hz(h.current,n,s,y);const w=_.useRef(!1);_.useInsertionEffect(()=>{m&&w.current&&m.update(n,l)});const g=n[S_],x=_.useRef(!!g&&typeof window<"u"&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,g))&&((k=window.MotionHasOptimisedAnimation)==null?void 0:k.call(window,g)));return Dk(()=>{p.current=!0,m&&(w.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),x.current&&m.animationState&&m.animationState.animateChanges())}),_.useEffect(()=>{m&&(!x.current&&m.animationState&&m.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{var S;(S=window.MotionHandoffMarkAsComplete)==null||S.call(window,g)}),x.current=!1),m.enteringChildren=void 0)}),m}function hz(e,t,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutAnchor:c,layoutCrossfade:f}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:yS(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||a&&Ks(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:f,layoutScroll:l,layoutRoot:u,layoutAnchor:c})}function yS(e){if(e)return e.options.allowProjection!==!1?e.projection:yS(e.parent)}function Xd(e,{forwardMotionProps:t=!1,type:n}={},r,s){r&&qF(r);const i=n?n==="svg":Ym(e),o=i?cz:lz;function a(u,c){let f;const h={..._.useContext(qm),...u,layoutId:pz(u)},{isStatic:p}=h,m=ZF(u),y=o(u,p);if(!p&&typeof window<"u"){mz();const w=gz(h);f=w.MeasureLayout,m.visualElement=fz(e,y,h,s,w.ProjectionNode,i)}return d.jsxs(Cu.Provider,{value:m,children:[f&&m.visualElement?d.jsx(f,{visualElement:m.visualElement,...h}):null,iz(e,u,dz(y,m.visualElement,c),y,p,t,i)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=_.forwardRef(a);return l[uz]=e,l}function pz({layoutId:e}){const t=_.useContext(km).id;return t&&e!==void 0?t+"-"+e:e}function mz(e,t){_.useContext(uS).strict}function gz(e){const t=dS(),{drag:n,layout:r}=t;if(!n&&!r)return{};const s={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function yz(e,t){if(typeof Proxy>"u")return Xd;const n=new Map,r=(i,o)=>Xd(i,o,e,t),s=(i,o)=>r(i,o);return new Proxy(s,{get:(i,o)=>o==="create"?r:(n.has(o)||n.set(o,Xd(o,void 0,e,t)),n.get(o))})}const xz=(e,t)=>t.isSVG??Ym(e)?new qO(t):new VO(t,{allowProjection:e!==_.Fragment});class vz extends Zr{constructor(t){super(t),t.animationState||(t.animationState=ZO(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();_u(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let wz=0;class bz extends Zr{constructor(){super(...arguments),this.id=wz++,this.isExitComplete=!1}update(){var i;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;if(t&&r===!1){if(this.isExitComplete){const{initial:o,custom:a}=this.node.getProps();if(typeof o=="string"||typeof o=="object"&&o!==null&&!Array.isArray(o)){const l=Cs(this.node,o,a);if(l){const{transition:u,transitionEnd:c,...f}=l;for(const h in f)(i=this.node.getValue(h))==null||i.jump(f[h])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const kz={animation:{Feature:vz},exit:{Feature:bz}};function Sa(e){return{point:{x:e.pageX,y:e.pageY}}}const _z=e=>t=>$m(t)&&e(t,Sa(t));function Bo(e,t,n,r){return fa(e,t,_z(n),r)}const xS=({current:e})=>e?e.ownerDocument.defaultView:null,r0=(e,t)=>Math.abs(e-t);function Sz(e,t){const n=r0(e.x,t.x),r=r0(e.y,t.y);return Math.sqrt(n**2+r**2)}const s0=new Set(["auto","scroll"]);class vS{constructor(t,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=pl(this.lastRawMoveEventInfo,this.transformPagePoint));const p=Jd(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,y=Sz(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!y)return;const{point:w}=p,{timestamp:g}=Qe;this.history.push({...w,timestamp:g});const{onStart:x,onMove:v}=this.handlers;m||(x&&x(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,p)},this.handlePointerMove=(p,m)=>{this.lastMoveEvent=p,this.lastRawMoveEventInfo=m,this.lastMoveEventInfo=pl(m,this.transformPagePoint),ge.update(this.updatePoint,!0)},this.handlePointerUp=(p,m)=>{this.end();const{onEnd:y,onSessionEnd:w,resumeAnimation:g}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Jd(p.type==="pointercancel"?this.lastMoveEventInfo:pl(m,this.transformPagePoint),this.history);this.startEvent&&y&&y(p,x),w&&w(p,x)},!$m(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=s||window;const l=Sa(t),u=pl(l,this.transformPagePoint),{point:c}=u,{timestamp:f}=Qe;this.history=[{...c,timestamp:f}];const{onSessionStart:h}=n;h&&h(t,Jd(u,this.history)),this.removeListeners=ba(Bo(this.contextWindow,"pointermove",this.handlePointerMove),Bo(this.contextWindow,"pointerup",this.handlePointerUp),Bo(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(s0.has(r.overflowX)||s0.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,s=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:s.x-n.x,y:s.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,s),ge.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Wr(this.updatePoint)}}function pl(e,t){return t?{point:t(e.point)}:e}function i0(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Jd({point:e},t){return{point:e,delta:i0(e,wS(t)),offset:i0(e,Cz(t)),velocity:Pz(t,.1)}}function Cz(e){return e[0]}function wS(e){return e[e.length-1]}function Pz(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=wS(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>Lt(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&s.timestamp-r.timestamp>Lt(t)*2&&(r=e[1]);const i=Qt(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const o={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function jz(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?me(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?me(n,e,r.max):Math.min(e,n)),e}function o0(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Ez(e,{top:t,left:n,bottom:r,right:s}){return{x:o0(e.x,n,s),y:o0(e.y,t,r)}}function a0(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Tz(e,t){return{x:a0(e.x,t.x),y:a0(e.y,t.y)}}function Rz(e,t){let n=.5;const r=ct(e),s=ct(t);return s>r?n=ca(t.min,t.max-r,e.min):r>s&&(n=ca(e.min,e.max-s,t.min)),Ln(0,1,n)}function Nz(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Kh=.35;function Iz(e=Kh){return e===!1?e=0:e===!0&&(e=Kh),{x:l0(e,"left","right"),y:l0(e,"top","bottom")}}function l0(e,t,n){return{min:c0(e,t),max:c0(e,n)}}function c0(e,t){return typeof e=="number"?e:e[t]||0}const Az=new WeakMap;class Mz{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Be(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=f=>{n&&this.snapToCursor(Sa(f).point),this.stopAnimation()},o=(f,h)=>{const{drag:p,dragPropagation:m,onDragStart:y}=this.getProps();if(p&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=lO(p),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Cn(g=>{let x=this.getAxisMotionValue(g).get()||0;if(An.test(x)){const{projection:v}=this.visualElement;if(v&&v.layout){const k=v.layout.layoutBox[g];k&&(x=ct(k)*(parseFloat(x)/100))}}this.originPoint[g]=x}),y&&ge.update(()=>y(f,h),!1,!0),Fh(this.visualElement,"transform");const{animationState:w}=this.visualElement;w&&w.setActive("whileDrag",!0)},a=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h;const{dragPropagation:p,dragDirectionLock:m,onDirectionLock:y,onDrag:w}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:g}=h;if(m&&this.currentDirection===null){this.currentDirection=Dz(g),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",h.point,g),this.updateAxis("y",h.point,g),this.visualElement.render(),w&&ge.update(()=>w(f,h),!1,!0)},l=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h,this.stop(f,h),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:f}=this.getProps();(f||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new vS(t,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:xS(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,s=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!s||!r)return;const{velocity:o}=s;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&ge.postRender(()=>a(r,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!ml(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=jz(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var i;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,s=this.constraints;t&&Ks(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=Ez(r.layoutBox,t):this.constraints=!1,this.elastic=Iz(n),s!==this.constraints&&!Ks(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Cn(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Nz(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Ks(t))return!1;const r=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;s.root&&(s.root.scroll=void 0,s.root.updateScroll());const i=DO(r,s.root,this.visualElement.getTransformPagePoint());let o=Tz(s.layout.layoutBox,i);if(n){const a=n(AO(o));this.hasMutatedConstraints=!!a,a&&(o=B_(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Cn(c=>{if(!ml(c,n,this.currentDirection))return;let f=l&&l[c]||{};(o===!0||o===c)&&(f={min:0,max:0});const h=s?200:1e6,p=s?40:1e7,m={type:"inertia",velocity:r?t[c]:0,bounceStiffness:h,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Fh(this.visualElement,t),r.start(Om(t,r,0,n,this.visualElement,!1))}stopAnimation(){Cn(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps()[n];return s||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor(t){Cn(n=>{const{drag:r}=this.getProps();if(!ml(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n],l=i.get()||0;i.set(t[n]-me(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Ks(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Cn(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();s[o]=Rz({min:l,max:l},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),Cn(o=>{if(!ml(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(me(l,u,s[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Az.set(this.visualElement,this);const t=this.visualElement.current,n=Bo(t,"pointerdown",u=>{const{drag:c,dragListener:f=!0}=this.getProps(),h=u.target,p=h!==t&&pO(h);c&&f&&!p&&this.start(u)});let r;const s=()=>{const{dragConstraints:u}=this.getProps();Ks(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),r||(r=Lz(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ge.read(s);const a=fa(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:u,hasLayoutChanged:c})=>{this.isDragging&&c&&(Cn(f=>{const h=this.getAxisMotionValue(f);h&&(this.originPoint[f]+=u[f].translate,h.set(h.get()+u[f].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l&&l(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=Kh,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function u0(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Lz(e,t,n){const r=yv(e,u0(n)),s=yv(t,u0(n));return()=>{r(),s()}}function ml(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Dz(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Oz extends Zr{constructor(t){super(t),this.removeGroupControls=Xt,this.removeListeners=Xt,this.controls=new Mz(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Xt}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Zd=e=>(t,n)=>{e&&ge.update(()=>e(t,n),!1,!0)};class Fz extends Zr{constructor(){super(...arguments),this.removePointerDownListener=Xt}onPointerDown(t){this.session=new vS(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:xS(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:Zd(t),onStart:Zd(n),onMove:Zd(r),onEnd:(i,o)=>{delete this.session,s&&ge.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=Bo(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let ef=!1;class zz extends _.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),ef&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Zl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,{projection:o}=r;return o&&(o.isPresent=i,t.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),ef=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==i?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||ge.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),Bm.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;ef=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function bS(e){const[t,n]=lS(),r=_.useContext(km);return d.jsx(zz,{...e,layoutGroup:r,switchLayoutGroup:_.useContext(gS),isPresent:t,safeToRemove:n})}const Bz={pan:{Feature:Fz},drag:{Feature:Oz,ProjectionNode:aS,MeasureLayout:bS}};function d0(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&ge.postRender(()=>i(t,Sa(t)))}class $z extends Zr{mount(){const{current:t}=this.node;t&&(this.unmount=uO(t,(n,r)=>(d0(this.node,r,"Start"),s=>d0(this.node,s,"End"))))}unmount(){}}class Vz extends Zr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ba(fa(this.node.current,"focus",()=>this.onFocus()),fa(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function f0(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&ge.postRender(()=>i(t,Sa(t)))}class Uz extends Zr{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=gO(t,(s,i)=>(f0(this.node,i,"Start"),(o,{success:a})=>f0(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const qh=new WeakMap,tf=new WeakMap,Wz=e=>{const t=qh.get(e.target);t&&t(e)},Hz=e=>{e.forEach(Wz)};function Gz({root:e,...t}){const n=e||document;tf.has(n)||tf.set(n,{});const r=tf.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(Hz,{root:e,...t})),r[s]}function Kz(e,t,n){const r=Gz(t);return qh.set(e,n),r.observe(e),()=>{qh.delete(e),r.unobserve(e)}}const qz={some:0,all:1};class Qz extends Zr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var l;(l=this.stopObserver)==null||l.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:qz[s]},a=u=>{const{isIntersecting:c}=u;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:f,onViewportLeave:h}=this.node.getProps(),p=c?f:h;p&&p(u)};this.stopObserver=Kz(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Yz(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function Yz({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Xz={inView:{Feature:Qz},tap:{Feature:Uz},focus:{Feature:Vz},hover:{Feature:$z}},Jz={layout:{ProjectionNode:aS,MeasureLayout:bS}},Zz={...kz,...Xz,...Bz,...Jz},Ai=yz(Zz,xz);function Pu(){!Hm.current&&O_();const[e]=_.useState(Uc.current);return e}function ju(e,t){const n=_.useRef(t);n.current=t,_.useEffect(()=>{if(!e)return;const r=s=>{s.key==="Escape"&&n.current()};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e])}const nf={stackPanelWidth:480,navIslandBottom:"1.5rem",navIslandHeight:"4.5rem"},X={bgBase:"#FDFCF8",bgSurface:"#FAF8F0",bgElevated:"#F5F1E6",textPrimary:"#1A1917",textSecondary:"#68635C",accentBlue:"#7C9CC0",accentBlueDark:"#51719B",accentGreen:"#8FB996",accentGreenDark:"#5E8A66",accentAmber:"#D4A373",accentAmberDark:"#A67B4F",accentRose:"#C98B8B",accentRoseDark:"#9E5E5E",accentSlate:"#8A9BA8",accentSlateDark:"#5E7080",canvasBase:"#F0EAD8",canvas300:"#E5DBC4",canvasDark:"#D6C9A8",washBlue:"#DEE4E5",washGreen:"#E3EADC",washAmber:"#F2E5D5",washRose:"#EFE0DA",washSlate:"#E1E4E0",chalkboardBg:"#142e22",chalkboardChalk:"#d4e8cb",chalkboardBorderBase:"#C8D2C3"};function tt(e,t){const n=e.replace("#",""),r=Number.parseInt(n.slice(0,2),16),s=Number.parseInt(n.slice(2,4),16),i=Number.parseInt(n.slice(4,6),16);return`rgba(${r}, ${s}, ${i}, ${t})`}const eB={4:"1rem"};function Q(...e){return BL(lL(e))}const tB={height:32,lineHeight:"32px",padding:"0 16px"},nB={white:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.5' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.97 0 0 0 0 0.96 0 0 0 0 0.95 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23w)' opacity='1'/%3E%3C/svg%3E")`,paper:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E")`,speckle:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='speckle'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.4' numOctaves='1' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23speckle)' opacity='0.14'/%3E%3C/svg%3E")`,parchment:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='par'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='5' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.55 0 0 0 0 0.48 0 0 0 0 0.35 0 0 0 0.45 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23par)' opacity='1'/%3E%3C/svg%3E")`,canvas:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='cv'%3E%3CfeTurbulence type='turbulence' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.62 0 0 0 0 0.60 0 0 0 0 0.52 0 0 0 0.42 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23cv)' opacity='1'/%3E%3C/svg%3E")`,kraft:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='k'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.50 0 0 0 0 0.35 0 0 0 0 0.20 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23k)' opacity='1'/%3E%3C/svg%3E")`,chalkboard:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='c'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.15 0 0 0 0 0.28 0 0 0 0 0.20 0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23c)' opacity='1'/%3E%3C/svg%3E")`},rB={white:X.bgBase,paper:X.bgSurface,speckle:X.bgSurface,parchment:X.bgElevated,canvas:X.canvasBase,kraft:X.canvas300,chalkboard:X.chalkboardBg},h0={white:X.bgElevated,paper:X.bgElevated,speckle:X.bgElevated,parchment:X.canvasBase,canvas:X.canvas300,kraft:X.canvasDark,chalkboard:X.chalkboardBg},sB={base:X.bgBase,surface:X.bgSurface,elevated:X.bgElevated,canvas:X.canvasBase,canvasDark:X.canvasDark,blue:X.washBlue,green:X.washGreen,amber:X.washAmber,rose:X.washRose,slate:X.washSlate},iB={blue:"rgba(168, 200, 216, 0.35)",brown:"rgba(164, 144, 120, 0.35)",black:"rgba(61, 53, 43, 0.15)"};function kS(e){const t=typeof e=="string"?{texture:e}:e,n=t.texture??"paper",r=t.ruledType??"none",s=t.ruledColor??"blue",i=nB[n],o=t.fill?sB[t.fill]:t.shade?h0[n]:rB[n],a=iB[s],l={"--pui-texture-shade":h0[n],"--pui-texture-image":i};return r==="none"?{...l,backgroundColor:o,backgroundImage:i,backgroundRepeat:"repeat",backgroundSize:"200px 200px"}:r==="lines"?{...l,backgroundColor:o,backgroundImage:`${i}, repeating-linear-gradient(180deg, transparent, transparent 31px, ${a} 31px, ${a} 32px)`,backgroundRepeat:"repeat, repeat",backgroundSize:"200px 200px, 100% 32px"}:{...l,backgroundColor:o,backgroundImage:`${i}, repeating-linear-gradient(180deg, transparent, transparent 31px, ${a} 31px, ${a} 32px), repeating-linear-gradient(90deg, transparent, transparent 31px, ${a} 31px, ${a} 32px)`,backgroundRepeat:"repeat, repeat, repeat",backgroundSize:"200px 200px, 100% 32px, 32px 32px"}}function Ca(e){return kS(e)}function Wi(e,t="paper"){if(e!==!1)return Ca(e===!0?t:e)}function oB(e){const t=Tu((e==null?void 0:e.seed)??Math.random()),n=Math.max(0,Math.min(1,(e==null?void 0:e.wobble)??.5)),r=8+Math.round(n*6),s=50,i=50,o=46,a=2+n*14,l=[];for(let u=0;u<r;u++){const c=u/r*Math.PI*2+(t()-.5)*.15*n,f=o+(t()-.5)*a*2;l.push({x:s+Math.cos(c)*f,y:i+Math.sin(c)*f})}return Eu(l)}function aB(e,t){const n=Tu(`${e}-ring`),r=Math.max(0,Math.min(1,t??.5)),s=8+Math.round(r*6),i=50,o=50,a=49,l=2+r*14,u=[];for(let c=0;c<s;c++){const f=c/s*Math.PI*2+(n()-.5)*.15*r,h=a+(n()-.5)*l*2;u.push({x:i+Math.cos(f)*h,y:o+Math.sin(f)*h})}return Eu(u)}function lB(e){const t=Tu((e==null?void 0:e.seed)??Math.random()),n=Math.max(0,Math.min(1,(e==null?void 0:e.wobble)??.5)),r=3+Math.round(n*3),s=2,i=3+n*10,o=[],a=[{ax:s,ay:s,bx:100-s,by:s},{ax:100-s,ay:s,bx:100-s,by:100-s},{ax:100-s,ay:100-s,bx:s,by:100-s},{ax:s,ay:100-s,bx:s,by:s}];for(const l of a)for(let u=0;u<r;u++){const c=(u+.5)/r,f=l.ax+(l.bx-l.ax)*c,h=l.ay+(l.by-l.ay)*c,p=l.bx-l.ax,m=l.by-l.ay,y=Math.sqrt(p*p+m*m)||1,w=-m/y,g=p/y,x=(t()-.5)*i*2;o.push({x:f+w*x,y:h+g*x})}return Eu(o)}function cB(e,t){const n=Tu(`${e}-ring`),r=Math.max(0,Math.min(1,t??.5)),s=3+Math.round(r*3),i=0,o=3+r*10,a=[],l=[{ax:i,ay:i,bx:100-i,by:i},{ax:100-i,ay:i,bx:100-i,by:100-i},{ax:100-i,ay:100-i,bx:i,by:100-i},{ax:i,ay:100-i,bx:i,by:i}];for(const u of l)for(let c=0;c<s;c++){const f=(c+.5)/s,h=u.ax+(u.bx-u.ax)*f,p=u.ay+(u.by-u.ay)*f,m=u.bx-u.ax,y=u.by-u.ay,w=Math.sqrt(m*m+y*y)||1,g=-y/w,x=m/w,v=(n()-.5)*o*2;a.push({x:h+g*v,y:p+x*v})}return Eu(a)}function Eu(e){const t=e.length;if(t<3)return"";let n=`M ${dr(e[0].x)} ${dr(e[0].y)}`;for(let r=0;r<t;r++){const s=e[(r-1+t)%t],i=e[r],o=e[(r+1)%t],a=e[(r+2)%t],l=i.x+(o.x-s.x)/6,u=i.y+(o.y-s.y)/6,c=o.x-(a.x-i.x)/6,f=o.y-(a.y-i.y)/6;n+=` C ${dr(l)} ${dr(u)}, ${dr(c)} ${dr(f)}, ${dr(o.x)} ${dr(o.y)}`}return n+=" Z",n}function dr(e){return e.toFixed(2)}function Tu(e){let t=typeof e=="string"?uB(e):e;return()=>(t=t*16807%2147483647,(t-1)/2147483646)}function uB(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return Math.abs(t)||1}function Ru(){const e=_.useId();return _.useMemo(()=>{let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)>>>0;return(t+1)/4294967296},[e])}function Hi(e){const t=Ru();return _.useMemo(()=>({blob:oB({seed:t,wobble:e}),ring:aB(t,e)}),[t,e])}const dB="button-module__button___Z331g",fB="button-module__blobBg___QQFzf",hB="button-module__blobFill___XwLjV",pB="button-module__blobRing___567UW",mB="button-module__isActive___FXNSJ",gB="button-module__primary___ppbyq",yB="button-module__secondary___esy5L",xB="button-module__ghost___NisA0",vB="button-module__danger___Wnvuq",wB="button-module__chalkboard___d3Nqb",bB="button-module__small___u7y8a",kB="button-module__medium___HBIAj",_B="button-module__large___RPzNy",SB="button-module__fullWidth___H0P0F",CB="button-module__iconLeft___s60SZ",PB="button-module__iconRight___75eFu",jB="button-module__label___pXAyM",Vt={button:dB,blobBg:fB,blobFill:hB,blobRing:pB,isActive:mB,primary:gB,secondary:yB,ghost:xB,danger:vB,chalkboard:wB,small:bB,medium:kB,large:_B,fullWidth:SB,iconLeft:CB,iconRight:PB,label:jB},ne=_.forwardRef(function({variant:e="primary",surface:t="paper",size:n="medium",icon:r,iconRight:s,fullWidth:i=!1,wobble:o=.5,isActive:a=!1,children:l,className:u,...c},f){const h=Hi(o);return d.jsxs("button",{ref:f,type:"button",className:Q(Vt.button,Vt[e],Vt[n],t==="chalkboard"&&Vt.chalkboard,a&&Vt.isActive,i&&Vt.fullWidth,u),...c,children:[d.jsxs("svg",{className:Vt.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[d.jsx("path",{d:h.blob,className:Vt.blobFill}),d.jsx("path",{d:h.ring,className:Vt.blobRing})]}),r&&d.jsx("span",{className:Vt.iconLeft,children:r}),d.jsx("span",{className:Vt.label,children:l}),s&&d.jsx("span",{className:Vt.iconRight,children:s})]})});function Xm(e){return{blue:e.accentBlue,green:e.accentGreen,amber:e.accentAmber,rose:e.accentRose,slate:e.accentSlate}}const Oe=rD.generator(),EB="sketch-border-module__svg___whV4x",TB="sketch-border-module__behind___lgdYV",RB="sketch-border-module__stroke___vAm-v",NB="sketch-border-module__fill___zlpd6",gl={svg:EB,behind:TB,stroke:RB,fill:NB},IB=1.2,AB=.7;function _t({shape:e="rect",radius:t=9,roughness:n=1.2,bowing:r=1,strokeWidth:s=1,inset:i=2,fill:o=!1,clip:a=!1,smooth:l=!1,straight:u=!0,strokeInset:c=!0,className:f}){const[h]=_.useState(Math.random),p=_.useRef(null),[m,y]=_.useState(null);_.useEffect(()=>{var x;const v=(x=p.current)==null?void 0:x.parentElement;if(!v)return;const k=new ResizeObserver(()=>{const S=v.offsetWidth,b=v.offsetHeight;y(P=>P&&P.width===S&&P.height===b?P:{width:S,height:b})});return k.observe(v),()=>k.disconnect()},[]);const{parts:w,clipPath:g}=_.useMemo(()=>{if(!m||m.width<8||m.height<8)return{parts:null,clipPath:null};const x=Math.max(1,Math.round(h*1e6)),v=x,k=x*2654435761%2147483647,S=R=>Oe.toPaths(Oe.path(R,{seed:v,roughness:n,bowing:r,preserveVertices:!0,strokeWidth:s})).filter(T=>!T.fill||T.fill==="none").map(T=>({d:T.d,filled:!1}));if(l){const R={seed:v,roughness:n,bowing:r,strokeWidth:s,disableMultiStroke:!0},T=A=>Oe.toPaths(A).filter(F=>!F.fill||F.fill==="none").map(F=>({d:F.d,filled:!1}));if(a){const A=yl(e,m,i,t,rs(k),n*1.1),F=c?p0(s,n):0,z=F?yl(e,m,i+F,t,rs(k),n*1.1):A;return{parts:T(Oe.path(z,{...R,preserveVertices:!0})),clipPath:A}}const I=e==="circle"?Oe.ellipse(m.width/2,m.height/2,m.width-i*2,m.height-i*2,R):Oe.path(rf(m,i,t,rs(v)),{...R,preserveVertices:!0});return{parts:T(I),clipPath:null}}if(a){if(u){const A=rf(m,i,t,rs(k)),F=Oe.toPaths(Oe.path(A,{seed:v,roughness:IB,bowing:AB,preserveVertices:!0,strokeWidth:s})).filter(z=>!z.fill||z.fill==="none").map(z=>({d:z.d,filled:!1}));return{parts:F.length?F:[{d:A,filled:!1}],clipPath:A}}const R=yl(e,m,i,t,rs(k),n*1.1),T=c?p0(s,n):0,I=T?yl(e,m,i+T,t,rs(k),n*1.1):R;return{parts:S(I),clipPath:R}}const b=(R,T)=>{const I=T?{fill:"#000",fillStyle:"solid"}:{},A=e==="circle"?Oe.ellipse(m.width/2,m.height/2,m.width-i*2,m.height-i*2,{seed:R,roughness:n,bowing:r,strokeWidth:s,...I}):Oe.path(rf(m,i,t,rs(R)),{seed:R,roughness:n,bowing:r,preserveVertices:!0,strokeWidth:s,...I});return Oe.toPaths(A)},P=o?b(k,!0).filter(R=>!!R.fill&&R.fill!=="none").map(R=>({d:R.d,filled:!0})):[],j=b(v,!1).filter(R=>!R.fill||R.fill==="none").map(R=>({d:R.d,filled:!1}));return{parts:[...P,...j],clipPath:null}},[m,h,a,l,u,e,t,n,r,s,i,o,c]);return _.useEffect(()=>{var x;const v=(x=p.current)==null?void 0:x.parentElement;if(v)return g?v.style.setProperty("--sketch-clip",`path("${g}")`):v.style.removeProperty("--sketch-clip"),()=>{v.style.removeProperty("--sketch-clip")}},[g]),d.jsx("svg",{ref:p,className:Q(gl.svg,o&&gl.behind,f),viewBox:m?`0 0 ${m.width} ${m.height}`:void 0,"aria-hidden":"true",children:w==null?void 0:w.map((x,v)=>x.filled?d.jsx("path",{className:gl.fill,d:x.d},`f-${v}`):d.jsx("path",{className:gl.stroke,d:x.d,strokeWidth:s},`s-${v}`))})}function p0(e,t){return e/2+t*1.5}function rs(e){let t=e;return()=>(t=t*16807%2147483647,(t-1)/2147483646)}function yl(e,t,n,r,s,i){const o=t.width-n*2,a=t.height-n*2,l=t.width/2,u=t.height/2,c=()=>(s()-.5)*i*2,f=[];if(e==="circle")for(let h=0;h<16;h++){const p=h/16*Math.PI*2;f.push({x:l+Math.cos(p)*o/2+c(),y:u+Math.sin(p)*a/2+c()})}else{const h=Math.max(2,Math.min(r,o/2,a/2)),p=n,m=n,y=(x,v,k)=>{for(const S of[0,45,90]){const b=(k+S)*Math.PI/180;f.push({x:x+Math.cos(b)*h+c(),y:v+Math.sin(b)*h+c()})}},w=(x,v,k,S)=>{const b=Math.hypot(k-x,S-v),P=Math.min(12,Math.max(1,Math.round(b/160)));for(let j=1;j<=P;j++){const R=j/(P+1);f.push({x:x+(k-x)*R+c(),y:v+(S-v)*R+c()})}};y(p+h,m+h,180),w(p+h,m,p+o-h,m),y(p+o-h,m+h,270),w(p+o,m+h,p+o,m+a-h),y(p+o-h,m+a-h,0),w(p+o-h,m+a,p+h,m+a),y(p+h,m+a-h,90),w(p,m+a-h,p,m+h);const g=3;return m0([...f.slice(g),...f.slice(0,g)])}return m0(f)}function m0(e){const t=e.length;if(t<3)return"";const n=(s,i)=>Math.max(.001,Math.hypot(i.x-s.x,i.y-s.y)**.5);let r=`M ${e[0].x.toFixed(2)} ${e[0].y.toFixed(2)}`;for(let s=0;s<t;s++){const i=e[(s-1+t)%t],o=e[s],a=e[(s+1)%t],l=e[(s+2)%t],u=n(i,o),c=n(o,a),f=n(a,l),h=a.x-o.x+c*((o.x-i.x)/u-(a.x-i.x)/(u+c)),p=a.y-o.y+c*((o.y-i.y)/u-(a.y-i.y)/(u+c)),m=a.x-o.x+c*((l.x-a.x)/f-(l.x-o.x)/(c+f)),y=a.y-o.y+c*((l.y-a.y)/f-(l.y-o.y)/(c+f)),w=o.x+h/3,g=o.y+p/3,x=a.x-m/3,v=a.y-y/3;r+=` C ${w.toFixed(2)} ${g.toFixed(2)}, ${x.toFixed(2)} ${v.toFixed(2)}, ${a.x.toFixed(2)} ${a.y.toFixed(2)}`}return`${r} Z`}function rf(e,t,n,r){const s=[0,0,0,0].map(()=>Math.max(2,n+(r()-.5)*3));return MB(t,t,e.width-t*2,e.height-t*2,s)}function MB(e,t,n,r,s){const i=c=>Math.min(c,n/2,r/2),[o,a,l,u]=s.map(i);return[`M ${ye(e+o)} ${ye(t)}`,`L ${ye(e+n-a)} ${ye(t)}`,`Q ${ye(e+n)} ${ye(t)} ${ye(e+n)} ${ye(t+a)}`,`L ${ye(e+n)} ${ye(t+r-l)}`,`Q ${ye(e+n)} ${ye(t+r)} ${ye(e+n-l)} ${ye(t+r)}`,`L ${ye(e+u)} ${ye(t+r)}`,`Q ${ye(e)} ${ye(t+r)} ${ye(e)} ${ye(t+r-u)}`,`L ${ye(e)} ${ye(t+o)}`,`Q ${ye(e)} ${ye(t)} ${ye(e+o)} ${ye(t)}`,"Z"].join(" ")}function ye(e){return e.toFixed(2)}const St={surface:{radius:12,inset:2.5,roughness:.2,bowing:0,strokeWidth:1.3},field:{radius:8,inset:2,roughness:1.1,strokeWidth:1.3},control:{radius:6,inset:2,roughness:.5,bowing:.6,strokeWidth:1.4},pill:{radius:999,inset:2,roughness:.7,strokeWidth:1}},LB="page-module__page___-uHnG",DB="page-module__outlined___Wwtyg",OB="page-module__surface___sWfI6",FB="page-module__flat___HlOaY",zB="page-module__withAccent___lsv-m",BB="page-module__accentBlue___XxbMV",$B="page-module__accentGreen___Ne6Q8",VB="page-module__accentAmber___kLAwa",UB="page-module__accentRose___O9ZbZ",WB="page-module__accentSlate___xCB66",qs={page:LB,outlined:DB,surface:OB,flat:FB,withAccent:zB,accentBlue:BB,accentGreen:$B,accentAmber:VB,accentRose:UB,accentSlate:WB},HB=Xm(qs),GB={all:14,top:14,none:2};function _S({children:e,className:t,style:n,texture:r=!0,withAccent:s=!1,accentColor:i="blue",rounded:o="all",outline:a=!1,sketch:l=!1}){const u=Wi(r,{texture:"white",ruledType:"lines",ruledColor:"blue"})??{backgroundColor:"var(--pui-bg-base)"};return d.jsxs("div",{className:Q(qs.page,a&&qs.outlined,s&&qs.withAccent,s&&HB[i],!l&&qs.flat,t),style:n,children:[d.jsx(_t,{clip:!0,...St.surface,radius:GB[o],straight:!l}),d.jsx("div",{className:qs.surface,style:u,children:e})]})}const KB="layout-module__layout___O1aWi",qB="layout-module__header___I-kxe",QB="layout-module__headerLeft___JChJQ",YB="layout-module__headerTitles___aqSUG",XB="layout-module__headerTitle___wvr39",JB="layout-module__headerSubtitle___6f5BD",ZB="layout-module__headerActions___adC12",e4="layout-module__mobileToggle___4WpVG",t4="layout-module__body___tywNf",n4="layout-module__mobileOverlay___tzbBC",r4="layout-module__sidebar___8VKGq",s4="layout-module__sidebarOpen___47rtr",i4="layout-module__sidebarInner___tq2X6",o4="layout-module__logoArea___RLnC0",a4="layout-module__logoText___pAmfV",l4="layout-module__nav___FxcrZ",c4="layout-module__main___9z7bu",u4="layout-module__navIslandFixed___H4TwP",d4="layout-module__content___jL-VB",f4="layout-module__contentWithPage___vVdfN",h4="layout-module__footer___LyakU",p4="layout-module__footerText___8BYxc",Re={layout:KB,header:qB,headerLeft:QB,headerTitles:YB,headerTitle:XB,headerSubtitle:JB,headerActions:ZB,mobileToggle:e4,body:t4,mobileOverlay:n4,sidebar:r4,sidebarOpen:s4,sidebarInner:i4,logoArea:o4,logoText:a4,nav:l4,main:c4,navIslandFixed:u4,content:d4,contentWithPage:f4,footer:h4,footerText:p4};function m4(e){return!e||e==="plain"?{backgroundColor:"var(--pui-bg-base)"}:typeof e=="object"&&"image"in e?{backgroundImage:`url(${e.image})`,backgroundRepeat:"repeat",backgroundSize:"200px 200px"}:Ca(e)}function g4({children:e,showHeader:t=!0,showFooter:n=!1,showSidebar:r=!0,showPage:s=!0,background:i="paper",title:o,subtitle:a,headerActions:l,headerHeight:u,headerTexture:c,navigationItems:f=[],activeItemId:h,onNavigate:p,logo:m,footerContent:y,navigationIsland:w,style:g,bleedBottom:x=!0,routeKey:v,stackOpen:k}){const[S,b]=_.useState(!1),P=Pu();ju(S,()=>b(!1));const j=m4(i),R=r&&f.length>0,T=u!==void 0||c!==void 0?{...c!==void 0?Ca(c):{},...u!==void 0?{height:typeof u=="number"?`${u}px`:u}:{}}:void 0;return d.jsxs("div",{className:Re.layout,style:{...j,...g},children:[t&&d.jsxs("header",{className:Re.header,style:T,children:[d.jsxs("div",{className:Re.headerLeft,children:[R&&d.jsx("button",{type:"button",className:Re.mobileToggle,onClick:()=>b(!0),"aria-label":"Open navigation",children:d.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2",children:d.jsx("path",{d:"M3 5h14M3 10h14M3 15h14",strokeLinecap:"round"})})}),d.jsxs("div",{className:Re.headerTitles,children:[o&&d.jsx("h1",{className:Re.headerTitle,children:o}),a&&d.jsx("span",{className:Re.headerSubtitle,children:a})]})]}),l&&d.jsx("div",{className:Re.headerActions,children:l})]}),d.jsxs("div",{className:Re.body,children:[S&&d.jsx("button",{type:"button",className:Re.mobileOverlay,onClick:()=>b(!1),"aria-label":"Close navigation",tabIndex:-1}),R&&d.jsx("aside",{className:Q(Re.sidebar,S&&Re.sidebarOpen),children:d.jsxs("div",{className:Re.sidebarInner,children:[d.jsx("div",{className:Re.logoArea,children:m||d.jsx("span",{className:Re.logoText,children:"Paper UI"})}),d.jsx("nav",{className:Re.nav,"aria-label":"Main navigation",children:f.map(I=>{const A=I.id===h;return d.jsx(ne,{variant:"ghost",size:"small",isActive:A,onClick:()=>{p==null||p(I),b(!1)},"aria-current":A?"page":void 0,icon:I.icon,style:tB,children:I.label},I.id)})})]})}),d.jsx("div",{className:Re.main,children:d.jsx("main",{className:s?Re.contentWithPage:Re.content,style:x?{paddingBottom:0}:void 0,children:(()=>{const I=v!==void 0?d.jsx(cS,{mode:"wait",children:d.jsx(Ai.div,{initial:P?void 0:{opacity:0,y:8},animate:{opacity:1,y:0},exit:P?void 0:{opacity:0,y:-8},transition:{duration:.2,ease:"easeOut"},style:{height:"100%"},children:e},v)}):e;return s?d.jsx(_S,{rounded:x?"top":"all",style:x&&w?{paddingBottom:`calc(${nf.navIslandBottom} + ${nf.navIslandHeight} + ${eB[4]})`}:void 0,children:I}):I})()})})]}),w&&d.jsx("div",{className:Re.navIslandFixed,children:k!==void 0?d.jsx(Ai.div,{animate:{x:k?`-${nf.stackPanelWidth/2}px`:0},transition:{duration:P?0:.3,ease:[.4,0,.2,1]},children:w}):w}),n&&d.jsx("footer",{className:Re.footer,children:y||d.jsx("p",{className:Re.footerText,children:"Paper UI — Natural Materials Component Library"})})]})}const y4="checkbox-module__wrapper___uLYMI",x4="checkbox-module__blobFill___mPJSR",v4="checkbox-module__input___Ptgt7",w4="checkbox-module__blobBg___bw3sn",b4="checkbox-module__labelLeft___-vAmH",k4="checkbox-module__box___yAh-r",_4="checkbox-module__checkmark___tTyBz",S4="checkbox-module__indeterminateLine___IosI-",C4="checkbox-module__boxWrapper___byjoS",P4="checkbox-module__icon___RO-yn",j4="checkbox-module__labelText___bAnLr",E4="checkbox-module__chalkboard___sv6SL",Tt={wrapper:y4,blobFill:x4,input:v4,blobBg:w4,labelLeft:b4,box:k4,checkmark:_4,indeterminateLine:S4,boxWrapper:C4,icon:P4,labelText:j4,chalkboard:E4},T4=_.forwardRef(function({label:e,labelPosition:t="right",indeterminate:n=!1,wobble:r=.4,surface:s="paper",className:i,checked:o,onChange:a,id:l,...u},c){const f=_.useId(),h=l??f,p=Hi(r),m=_.useRef(null);return _.useEffect(()=>{m.current&&(m.current.indeterminate=n)},[n]),d.jsxs("label",{className:Q(Tt.wrapper,t==="left"&&Tt.labelLeft,s==="chalkboard"&&Tt.chalkboard,i),htmlFor:h,children:[d.jsxs("span",{className:Tt.boxWrapper,children:[d.jsx("input",{ref:y=>{m.current=y,typeof c=="function"?c(y):c&&(c.current=y)},id:h,type:"checkbox",className:Tt.input,checked:o,onChange:a,...u}),d.jsx("svg",{className:Tt.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:d.jsx("path",{d:p.blob,className:Tt.blobFill})}),d.jsxs("span",{className:Tt.box,"aria-hidden":"true",children:[d.jsx(_t,{smooth:!0,...St.control}),n?d.jsx("svg",{viewBox:"0 0 20 20",fill:"none",className:Tt.icon,children:d.jsx("line",{x1:"4",y1:"10",x2:"16",y2:"10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",className:Tt.indeterminateLine})}):d.jsx("svg",{viewBox:"0 0 20 20",fill:"none",className:Tt.icon,children:d.jsx("path",{d:"M4 10 L8 14 L16 6",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:Tt.checkmark})})]})]}),e&&d.jsx("span",{className:Tt.labelText,children:e})]})}),R4="icon-button-module__iconButton___avg6i",N4="icon-button-module__blobBg___466Vy",I4="icon-button-module__blobFill___FTN1g",A4="icon-button-module__blobRing___hRdQb",M4="icon-button-module__isActive___XlvtM",L4="icon-button-module__icon___h204x",D4="icon-button-module__ghost___Wbxog",O4="icon-button-module__danger___p0Xz5",F4="icon-button-module__small___bPnCU",z4="icon-button-module__medium___nOxPf",B4="icon-button-module__large___UBU5z",$4="icon-button-module__chalkboard___mi0sQ",$n={iconButton:R4,blobBg:N4,blobFill:I4,blobRing:A4,isActive:M4,icon:L4,default:"icon-button-module__default___9frNR",ghost:D4,danger:O4,small:F4,medium:z4,large:B4,chalkboard:$4},it=_.forwardRef(function({icon:e,variant:t="default",surface:n="paper",size:r="medium",label:s,wobble:i=.5,isActive:o=!1,className:a,...l},u){const c=Hi(i);return d.jsxs("button",{ref:u,type:"button",className:Q($n.iconButton,$n[t],n==="chalkboard"&&$n.chalkboard,$n[r],o&&$n.isActive,a),"aria-label":s,title:s,...l,children:[d.jsxs("svg",{className:$n.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[d.jsx("path",{d:c.blob,className:$n.blobFill}),d.jsx("path",{d:c.ring,className:$n.blobRing})]}),d.jsx("span",{className:$n.icon,children:e})]})}),V4="stamp-module__stamp___5qaNY",U4="stamp-module__small___BBlBg",W4="stamp-module__medium___HG2YD",H4="stamp-module__large___aUT0I",G4="stamp-module__blobBg___Mdrdd",K4="stamp-module__blobFill___QyCeB",q4="stamp-module__blobRing___EUDx7",Q4="stamp-module__dot___qZyCR",Y4="stamp-module__label___T89iH",X4="stamp-module__chalkboard___syI4T",fr={stamp:V4,small:U4,medium:W4,large:H4,blobBg:G4,blobFill:K4,blobRing:q4,dot:Q4,label:Y4,chalkboard:X4},sf={neutral:{fill:tt(X.accentSlate,.14),text:X.accentSlateDark,ring:tt(X.accentSlateDark,.35)},info:{fill:tt(X.accentBlue,.14),text:X.accentBlueDark,ring:tt(X.accentBlueDark,.35)},success:{fill:tt(X.accentGreen,.16),text:X.accentGreenDark,ring:tt(X.accentGreenDark,.35)},warning:{fill:tt(X.accentAmber,.16),text:X.accentAmberDark,ring:tt(X.accentAmberDark,.4)},error:{fill:tt(X.accentRose,.16),text:X.accentRoseDark,ring:tt(X.accentRoseDark,.35)}},g0={fill:tt(X.chalkboardBorderBase,.1),ring:tt(X.chalkboardBorderBase,.35)};function Te({children:e,size:t="medium",variant:n,dot:r=!1,fillColor:s,textColor:i,wobble:o=.3,surface:a="paper",className:l}){const u=Hi(o),c=a==="chalkboard",f=n?c?g0.ring:sf[n].ring:void 0,h=s??(n?c?g0.fill:sf[n].fill:"transparent"),p=i??(n&&!c?sf[n].text:void 0);return d.jsxs("span",{className:Q(fr.stamp,fr[t],c&&fr.chalkboard,l),style:p?{color:p}:void 0,children:[d.jsxs("svg",{className:fr.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[d.jsx("path",{d:u.blob,className:fr.blobFill,style:{fill:h}}),f&&d.jsx("path",{d:u.ring,className:fr.blobRing,style:{stroke:f}})]}),r&&d.jsx("span",{className:fr.dot,"aria-hidden":"true"}),d.jsx("span",{className:fr.label,children:e})]})}const J4="copy-button-module__copyButton___-hTo4",Z4="copy-button-module__dark___O45N-",e$="copy-button-module__chalkboard___hW4aw",t$="copy-button-module__copied___XlHFr",xl={copyButton:J4,dark:Z4,chalkboard:e$,copied:t$};function Qh({text:e,variant:t="light",surface:n="paper",className:r,...s}){const[i,o]=_.useState(!1),a=_.useCallback(async()=>{try{await navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),1500)}catch(l){console.error("Failed to copy:",l)}},[e]);return d.jsx("button",{type:"button",onClick:a,className:Q(xl.copyButton,t==="dark"&&xl.dark,n==="chalkboard"&&xl.chalkboard,i&&xl.copied,r),...s,children:i?"Copied!":"Copy"})}const n$="code-block-module__codeBlock___dq28o",r$="code-block-module__header___42Fek",s$="code-block-module__relative___oO-zy",i$="code-block-module__copyOverlay___PjAuq",o$="code-block-module__pre___zXzLZ",a$="code-block-module__chalkboard___bdo9J",l$="code-block-module__chalkboardHeader___3RiVd",c$="code-block-module__chalkboardPre___iRBFR",hr={codeBlock:n$,header:r$,relative:s$,copyOverlay:i$,pre:o$,chalkboard:a$,chalkboardHeader:l$,chalkboardPre:c$};function N9({code:e,filename:t,surface:n="paper"}){return d.jsxs("div",{className:Q(hr.codeBlock,n==="chalkboard"&&hr.chalkboard),children:[t&&d.jsxs("div",{className:Q(hr.header,n==="chalkboard"&&hr.chalkboardHeader),children:[d.jsx("span",{children:t}),d.jsx(Qh,{text:e,variant:"light",surface:n})]}),!t&&d.jsx("div",{className:hr.relative,children:d.jsx("div",{className:hr.copyOverlay,children:d.jsx(Qh,{text:e,variant:"dark",surface:n})})}),d.jsx("pre",{className:Q(hr.pre,n==="chalkboard"&&hr.chalkboardPre),children:d.jsx("code",{children:e})})]})}function Pa({size:e=16}){return d.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[d.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),d.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function SS({size:e=16}){return d.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[d.jsx("path",{d:"M9 18h6"}),d.jsx("path",{d:"M10 22h4"}),d.jsx("path",{d:"M15.09 14c.18-.98.65-1.74 1.41-2.5A4.65 4.65 0 0 0 18 8 6 6 0 0 0 6 8c0 1 .23 2.23 1.5 3.5A4.61 4.61 0 0 1 8.91 14"})]})}function Jm({size:e=16}){return d.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:d.jsx("polyline",{points:"20 6 9 17 4 12"})})}function u$({size:e=16}){return d.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[d.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),d.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})}function d$({size:e=16}){return d.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:d.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})})}function f$({size:e=16}){return d.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[d.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),d.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}function CS({size:e=16}){return d.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:d.jsx("polyline",{points:"9 18 15 12 9 6"})})}const h$="table-module__tableFrame___KP-90",p$="table-module__tableWrapper___gc3Y3",m$="table-module__toolbar___zhCel",g$="table-module__search___zIBk2",y$="table-module__searchIcon___ayhK8",x$="table-module__searchInput___PqsEG",v$="table-module__toolbarActions___EX6qS",w$="table-module__tableScroll___1gvc4",b$="table-module__table___tdU5g",k$="table-module__th___GQbKk",_$="table-module__td___WktB5",S$="table-module__tr___xeZno",C$="table-module__expandTh___uxkR4",P$="table-module__expandTd___VoBRC",j$="table-module__expandIcon___8V45X",E$="table-module__expandable___R7o2l",T$="table-module__expandedRow___1TbTQ",R$="table-module__expandedCell___sKAaD",N$="table-module__boardScroll___Y1yqm",I$="table-module__board___kFAI-",A$="table-module__boardColumn___-W9bP",M$="table-module__boardColumnHeader___kY3Fj",L$="table-module__accentBlue___PEJ1V",D$="table-module__accentGreen___wJ53r",O$="table-module__accentAmber___Iezjv",F$="table-module__accentRose___W8zxc",z$="table-module__accentSlate___oUZCX",B$="table-module__boardColumnLabel___JBEed",$$="table-module__boardColumnCount___Pkpiq",V$="table-module__boardColumnBody___uAgRF",U$="table-module__boardRow___C1P60",W$="table-module__boardEmpty___IKv2W",H$="table-module__chalkboardFrame___xB3N5",G$="table-module__chalkboardWrapper___KjY5r",K$="table-module__chalkboard___v0m3A",ie={tableFrame:h$,tableWrapper:p$,toolbar:m$,search:g$,searchIcon:y$,searchInput:x$,toolbarActions:v$,tableScroll:w$,table:b$,th:k$,td:_$,tr:S$,expandTh:C$,expandTd:P$,expandIcon:j$,expandable:E$,expandedRow:T$,expandedCell:R$,boardScroll:N$,board:I$,boardColumn:A$,boardColumnHeader:M$,accentBlue:L$,accentGreen:D$,accentAmber:O$,accentRose:F$,accentSlate:z$,boardColumnLabel:B$,boardColumnCount:$$,boardColumnBody:V$,boardRow:U$,boardEmpty:W$,chalkboardFrame:H$,chalkboardWrapper:G$,chalkboard:K$},q$=Xm(ie);function Q$({data:e=[],columns:t=[],board:n,surface:r="paper",texture:s=!0,toolbar:i,expandable:o,showExpandColumn:a=!0,rowKey:l,rowClassName:u,rowTexture:c,className:f}){const h=Wi(s,r==="chalkboard"?"chalkboard":"paper"),p=!!i,[m,y]=_.useState(new Set),w=v=>{y(k=>{const S=new Set(k);return S.has(v)?S.delete(v):S.add(v),S})},g=!!(o&&a),x=g?t.length+1:t.length;return d.jsxs("div",{className:Q(ie.tableFrame,r==="chalkboard"&&ie.chalkboardFrame,f),children:[d.jsx(_t,{clip:!0,...St.surface}),d.jsxs("div",{className:Q(ie.tableWrapper,r==="chalkboard"&&ie.chalkboardWrapper),style:h,children:[p&&d.jsxs("div",{className:ie.toolbar,children:[i.search&&d.jsxs("div",{className:ie.search,children:[d.jsx(Y$,{className:ie.searchIcon}),d.jsx("input",{type:"text",className:ie.searchInput,placeholder:i.search.placeholder??"Search...","aria-label":i.search.placeholder??"Search",value:i.search.value,onChange:v=>{var k,S;return(S=(k=i.search)==null?void 0:k.onChange)==null?void 0:S.call(k,v.target.value)}}),d.jsx(_t,{fill:!0,...St.field})]}),i.actions&&d.jsx("div",{className:ie.toolbarActions,children:typeof i.actions=="function"?i.actions(r):i.actions})]}),n?d.jsx("div",{className:ie.boardScroll,children:d.jsx("div",{className:ie.board,children:n.map(v=>d.jsxs("div",{className:ie.boardColumn,children:[d.jsxs("div",{className:Q(ie.boardColumnHeader,r==="chalkboard"&&ie.chalkboard,v.accent&&q$[v.accent]),children:[d.jsx("span",{className:ie.boardColumnLabel,children:v.label}),d.jsx("span",{className:ie.boardColumnCount,children:v.items.length})]}),d.jsx("div",{className:ie.boardColumnBody,children:v.items.length===0?d.jsx("div",{className:ie.boardEmpty,children:v.emptyLabel??"empty"}):v.items.map((k,S)=>d.jsx("div",{className:Q(ie.boardRow,r==="chalkboard"&&ie.chalkboard),children:v.renderItem(k,S,r)},v.getKey?v.getKey(k,S):S))})]},v.key))})}):d.jsx("div",{className:ie.tableScroll,children:d.jsxs("table",{className:Q(ie.table,r==="chalkboard"&&ie.chalkboard),children:[d.jsxs("colgroup",{children:[g&&d.jsx("col",{style:{width:"48px"}}),t.map(v=>d.jsx("col",{style:v.width?{width:`${v.width*32}px`}:void 0},v.key))]}),d.jsx("thead",{children:d.jsxs("tr",{children:[g&&d.jsx("th",{className:Q(ie.th,ie.expandTh),"aria-label":"Expand"}),t.map(v=>d.jsx("th",{className:ie.th,style:v.align?{textAlign:v.align}:void 0,children:v.header},v.key))]})}),d.jsx("tbody",{children:e.map((v,k)=>{const S=l?l(v,k):k,b=o==null?void 0:o.render(v,k,r),P=!!b,j=P&&m.has(S),R=c==null?void 0:c(v,k);return d.jsxs(_.Fragment,{children:[d.jsxs("tr",{className:Q(ie.tr,P&&ie.expandable,u==null?void 0:u(v,k)),style:R?Ca(R):void 0,onClick:()=>P&&w(S),children:[g&&d.jsx("td",{className:Q(ie.td,ie.expandTd),children:P&&d.jsx("button",{type:"button",className:ie.expandIcon,"aria-expanded":j,"aria-label":j?"Collapse row":"Expand row",onClick:T=>{T.stopPropagation(),w(S)},children:d.jsx(CS,{size:14})})}),t.map(T=>d.jsx("td",{className:ie.td,style:T.align?{textAlign:T.align}:void 0,children:T.cell(v,k,r)},T.key))]}),j&&d.jsx("tr",{className:ie.expandedRow,children:d.jsx("td",{colSpan:x,className:ie.expandedCell,children:b})})]},S)})})]})})]})]})}function Y$({className:e}){return d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":"true",children:[d.jsx("circle",{cx:"11",cy:"11",r:"8"}),d.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]})}const X$="card-module__borderLayer___WSpJq",J$="card-module__elevated___uhWj9",Z$="card-module__textureLayer___Kcofz",e5="card-module__flat___KnG5z",t5="card-module__small___HXUTr",n5="card-module__withAccent___2t7bV",r5="card-module__accentBlue___a1KIq",s5="card-module__accentGreen___RNWoA",i5="card-module__accentAmber___uMhom",o5="card-module__accentRose___VPI3t",a5="card-module__accentSlate___-l4jE",l5="card-module__chalkboard___bQ48O",yr={borderLayer:X$,default:"card-module__default___glPy-",elevated:J$,textureLayer:Z$,flat:e5,small:t5,withAccent:n5,accentBlue:r5,accentGreen:s5,accentAmber:i5,accentRose:o5,accentSlate:a5,chalkboard:l5},c5=Xm(yr);function Ce({children:e,variant:t="default",surface:n="paper",size:r="medium",texture:s="parchment",fill:i,shade:o=!1,accent:a=!1,accentColor:l="blue",sketch:u=!1,className:c}){const f=n==="chalkboard"||s===!1?void 0:kS({...s===!0||typeof s=="string"?{texture:s===!0?"parchment":s}:s,...i?{fill:i}:{},...o?{shade:o}:{}});return d.jsxs("div",{className:Q(yr.borderLayer,yr[t],n==="chalkboard"&&yr.chalkboard,yr[r],a&&yr.withAccent,a&&c5[l],!u&&yr.flat,c),children:[d.jsx(_t,{clip:!0,...St.surface,straight:!u}),d.jsx("div",{className:yr.textureLayer,style:f,children:e})]})}const u5="input-module__wrapper___xaEw6",d5="input-module__label___lu7R1",f5="input-module__field___khFpX",h5="input-module__input___h7K-F",p5="input-module__small___SkByh",m5="input-module__medium___0QPuV",g5="input-module__large___zGwRu",y5="input-module__error___QDqga",x5="input-module__disabled___K-5hi",v5="input-module__helperText___njeLH",w5="input-module__helperError___qDBpD",b5="input-module__chalkboard___Xh-5s",wn={wrapper:u5,label:d5,field:f5,input:h5,small:p5,medium:m5,large:g5,error:y5,disabled:x5,helperText:v5,helperError:w5,chalkboard:b5},ja=_.forwardRef(function({label:e,helperText:t,error:n=!1,size:r="medium",surface:s="paper",className:i,id:o,...a},l){const u=_.useId(),c=o??u;return d.jsxs("div",{className:Q(wn.wrapper,s==="chalkboard"&&wn.chalkboard,i),children:[e&&d.jsx("label",{htmlFor:c,className:wn.label,children:e}),d.jsxs("span",{className:Q(wn.field,wn[r],n&&wn.error,a.disabled&&wn.disabled),children:[d.jsx("input",{ref:l,id:c,className:wn.input,...a}),d.jsx(_t,{fill:!0,...St.field})]}),t&&d.jsx("span",{className:Q(wn.helperText,n&&wn.helperError),children:t})]})}),k5="select-module__wrapper___Hc5F3",_5="select-module__label___ay-3s",S5="select-module__nativeSelect___UA2d-",C5="select-module__trigger___xMYHi",P5="select-module__open___w3mbZ",j5="select-module__triggerLabel___ihpER",E5="select-module__placeholder___0VOFP",T5="select-module__small___iU9W9",R5="select-module__chevron___0dCTg",N5="select-module__medium___B-XBN",I5="select-module__large___iII2c",A5="select-module__chevronOpen___cFOYe",M5="select-module__error___P5RBk",L5="select-module__dropdown___Q-uK3",D5="select-module__slideDown___sT374",O5="select-module__options___HmrQ0",F5="select-module__option___vNnue",z5="select-module__optionDisabled___ex2zq",B5="select-module__optionSelected___tAFjn",$5="select-module__optionHighlighted___zYQLq",V5="select-module__helperText___r5gyn",U5="select-module__helperError___ydSPT",W5="select-module__chalkboard___sXBw8",Me={wrapper:k5,label:_5,nativeSelect:S5,trigger:C5,open:P5,triggerLabel:j5,placeholder:E5,small:T5,chevron:R5,medium:N5,large:I5,chevronOpen:A5,error:M5,dropdown:L5,slideDown:D5,options:O5,option:F5,optionDisabled:z5,optionSelected:B5,optionHighlighted:$5,helperText:V5,helperError:U5,chalkboard:W5};function Yh({label:e,helperText:t,error:n=!1,size:r="medium",surface:s="paper",options:i,placeholder:o,value:a,defaultValue:l,onChange:u,name:c,disabled:f=!1,width:h,texture:p=!1,className:m}){const y=_.useId(),[w,g]=_.useState(!1),[x,v]=_.useState(-1),[k,S]=_.useState(l??""),[b,P]=_.useState(null),j=_.useRef(null),R=_.useRef(null),T=a!==void 0,I=T?a:k,A=i.find(C=>C.value===I),F=(A==null?void 0:A.label)??o??"Select...",z=_.useCallback(()=>{if(f)return;g(!0);const C=i.findIndex(V=>V.value===I);v(C>=0?C:0)},[f,i,I]),E=_.useCallback(()=>{g(!1),v(-1)},[]),D=_.useCallback(C=>{var V;C.disabled||(T||S(C.value),u==null||u(C.value),E(),(V=j.current)==null||V.focus())},[T,u,E]),B=_.useCallback(C=>{if(!f)switch(C.key){case"Enter":case" ":C.preventDefault(),w&&x>=0?D(i[x]):z();break;case"Escape":C.preventDefault(),w&&E();break;case"ArrowDown":C.preventDefault(),w?v(V=>{let q=V+1;for(;q<i.length&&i[q].disabled;)q++;return q<i.length?q:V}):z();break;case"ArrowUp":C.preventDefault(),w?v(V=>{let q=V-1;for(;q>=0&&i[q].disabled;)q--;return q>=0?q:V}):z();break;case"Home":if(C.preventDefault(),w){let V=0;for(;V<i.length&&i[V].disabled;)V++;V<i.length&&v(V)}break;case"End":if(C.preventDefault(),w){let V=i.length-1;for(;V>=0&&i[V].disabled;)V--;V>=0&&v(V)}break;case"Tab":w&&E();break}},[f,w,x,i,z,E,D]);_.useEffect(()=>{if(!w)return;const C=V=>{var q,N;const le=V.target;(q=j.current)!=null&&q.contains(le)||(N=R.current)!=null&&N.contains(le)||E()};return document.addEventListener("mousedown",C),()=>document.removeEventListener("mousedown",C)},[w,E]),_.useEffect(()=>{if(!w||x<0||!R.current)return;const C=R.current.querySelector(`[data-option-index="${x}"]`);C==null||C.scrollIntoView({block:"nearest"})},[w,x]),_.useEffect(()=>{if(!w){P(null);return}const C=()=>{if(!j.current)return;const V=j.current.getBoundingClientRect();if(V.bottom<0||V.top>window.innerHeight){E();return}P(V)};return C(),document.addEventListener("scroll",C,{capture:!0,passive:!0}),window.addEventListener("resize",C,{passive:!0}),()=>{document.removeEventListener("scroll",C,{capture:!0}),window.removeEventListener("resize",C)}},[w,E]);const M=Wi(p),$=M?{"--sketch-fill":M.backgroundColor}:void 0;return d.jsxs("div",{className:Q(Me.wrapper,s==="chalkboard"&&Me.chalkboard,m),style:h?{width:typeof h=="number"?`${h}px`:h}:void 0,children:[e&&d.jsx("label",{htmlFor:y,className:Me.label,children:e}),d.jsxs("select",{id:y,name:c,className:Me.nativeSelect,value:I,onChange:C=>u==null?void 0:u(C.target.value),disabled:f,"aria-hidden":"true",tabIndex:-1,children:[o&&d.jsx("option",{value:"",children:o}),i.map(C=>d.jsx("option",{value:C.value,disabled:C.disabled,children:C.label},C.value))]}),d.jsxs("button",{ref:j,type:"button",role:"combobox","aria-expanded":w,"aria-haspopup":"listbox","aria-controls":w?`${y}-listbox`:void 0,"aria-activedescendant":w&&x>=0?`${y}-option-${x}`:void 0,className:Q(Me.trigger,Me[r],n&&Me.error,w&&Me.open,f&&Me.disabled),onClick:()=>w?E():z(),onKeyDown:B,disabled:f,children:[d.jsx("span",{className:Q(Me.triggerLabel,!A&&Me.placeholder),children:F}),d.jsx(H5,{className:Q(Me.chevron,w&&Me.chevronOpen)}),d.jsx(_t,{fill:!0,...St.field})]}),w&&b&&As.createPortal(d.jsxs("div",{ref:R,id:`${y}-listbox`,role:"listbox",tabIndex:-1,className:Me.dropdown,style:{...$,position:"fixed",top:b.bottom+6,left:b.left,width:b.width},onKeyDown:C=>{var V;C.key==="Escape"&&(C.preventDefault(),E(),(V=j.current)==null||V.focus())},children:[d.jsx(_t,{fill:!0,...St.surface}),d.jsx("div",{className:Me.options,children:i.map((C,V)=>d.jsx("div",{id:`${y}-option-${V}`,role:"option","aria-selected":C.value===I,tabIndex:-1,"data-option-index":V,className:Q(Me.option,C.value===I&&Me.optionSelected,V===x&&Me.optionHighlighted,C.disabled&&Me.optionDisabled),onClick:q=>{q.stopPropagation(),D(C)},onMouseEnter:()=>v(V),children:C.label},C.value))})]}),document.body),t&&d.jsx("span",{className:Q(Me.helperText,n&&Me.helperError),children:t})]})}function H5({className:e}){return d.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":"true",children:d.jsx("polyline",{points:"6 9 12 15 18 9"})})}function PS({variant:e}){switch(e){case"info":return d.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[d.jsx("circle",{cx:"12",cy:"12",r:"10"}),d.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),d.jsx("circle",{cx:"12",cy:"8",r:"0.5",fill:"currentColor"})]});case"success":return d.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[d.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),d.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]});case"warning":return d.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[d.jsx("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),d.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),d.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]});case"error":return d.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[d.jsx("circle",{cx:"12",cy:"12",r:"10"}),d.jsx("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),d.jsx("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]})}}const G5="alert-module__alert___j7ZRS",K5="alert-module__surface___IaVgU",q5="alert-module__iconWrapper___kLoxT",Q5="alert-module__message___klR2U",Y5="alert-module__dismiss___f2uoG",X5="alert-module__info___PBo1l",J5="alert-module__success___AVBKS",Z5="alert-module__warning___zkMaJ",eV="alert-module__error___cxg96",tV="alert-module__chalkboard___7pgWk",ss={alert:G5,surface:K5,iconWrapper:q5,message:Q5,dismiss:Y5,info:X5,success:J5,warning:Z5,error:eV,chalkboard:tV};function jS({children:e,variant:t="info",surface:n="paper",texture:r="kraft",dismissible:s=!1,onDismiss:i,className:o}){const a=n==="chalkboard";return d.jsxs("div",{className:Q(ss.alert,ss[t],a&&ss.chalkboard,o),role:t==="warning"||t==="error"?"alert":"status",children:[d.jsx(_t,{clip:!0,...St.surface}),d.jsx("div",{className:ss.surface,style:a?void 0:Wi(r)}),d.jsx("span",{className:ss.iconWrapper,children:d.jsx(PS,{variant:t})}),d.jsx("div",{className:ss.message,children:e}),s&&d.jsx("button",{type:"button",className:ss.dismiss,onClick:i,"aria-label":"Dismiss alert",children:d.jsx(Pa,{size:16})})]})}const nV="modal-module__overlay___a52Ni",rV="modal-module__fadeIn___5OWd5",sV="modal-module__backdrop___RS4yj",iV="modal-module__modal___ZioOV",oV="modal-module__slideUp___vfFrm",aV="modal-module__small___hcxwF",lV="modal-module__medium___mjbM5",cV="modal-module__large___1dzyf",uV="modal-module__header___iP09B",dV="modal-module__title___nj06m",fV="modal-module__close___gQou9",hV="modal-module__body___Y-EdA",pV="modal-module__chalkboard___qY8qo",Vn={overlay:nV,fadeIn:rV,backdrop:sV,modal:iV,slideUp:oV,small:aV,medium:lV,large:cV,header:uV,title:dV,close:fV,body:hV,chalkboard:pV},mV='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';function Ea({open:e,onClose:t,title:n,children:r,size:s="medium",surface:i="paper",texture:o=!1,className:a}){const l=_.useId(),u=_.useRef(null),c=_.useRef(null);if(ju(e,t),_.useEffect(()=>{var h;if(!e)return;c.current=document.activeElement,(h=u.current)==null||h.focus();const p=y=>{var w;if(y.key!=="Tab")return;const g=(w=u.current)==null?void 0:w.querySelectorAll(mV);if(!g||g.length===0){y.preventDefault();return}const x=g[0],v=g[g.length-1];y.shiftKey&&document.activeElement===x?(y.preventDefault(),v.focus()):!y.shiftKey&&document.activeElement===v&&(y.preventDefault(),x.focus())};document.addEventListener("keydown",p);const m=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{var y,w;document.removeEventListener("keydown",p),document.body.style.overflow=m,(w=(y=c.current)==null?void 0:y.focus)==null||w.call(y)}},[e]),!e||typeof document>"u")return null;const f=Wi(o);return As.createPortal(d.jsxs("div",{className:Vn.overlay,children:[d.jsx("button",{type:"button",className:Vn.backdrop,"aria-label":"Close modal",onClick:t}),d.jsxs("div",{ref:u,className:Q(Vn.modal,Vn[s],i==="chalkboard"&&Vn.chalkboard,a),style:f,role:"dialog","aria-modal":"true","aria-labelledby":n?l:void 0,tabIndex:-1,children:[d.jsxs("div",{className:Vn.header,children:[n&&d.jsx("h2",{id:l,className:Vn.title,children:n}),d.jsx("button",{type:"button",className:Vn.close,onClick:t,"aria-label":"Close modal",children:d.jsx(Pa,{size:18})})]}),d.jsx("div",{className:Vn.body,children:r})]})]}),document.body)}const gV="textarea-module__wrapper___NbiNO",yV="textarea-module__label___ejhyZ",xV="textarea-module__field___KluQf",vV="textarea-module__textarea___0y-7v",wV="textarea-module__resizeGrip___lONlE",bV="textarea-module__small___yPyr8",kV="textarea-module__medium___ezQxA",_V="textarea-module__large___xfeKi",SV="textarea-module__error___EkXKJ",CV="textarea-module__disabled___9CKbb",PV="textarea-module__helperText___l1sPh",jV="textarea-module__helperError___VfTLy",EV="textarea-module__chalkboard___zZ0X0",sn={wrapper:gV,label:yV,field:xV,textarea:vV,resizeGrip:wV,small:bV,medium:kV,large:_V,error:SV,disabled:CV,helperText:PV,helperError:jV,chalkboard:EV},TV=48,Ta=_.forwardRef(function({label:e,helperText:t,error:n=!1,size:r="medium",surface:s="paper",className:i,id:o,...a},l){const u=_.useId(),c=o??u,f=_.useRef(null),h=_.useCallback(m=>{f.current=m,typeof l=="function"?l(m):l&&(l.current=m)},[l]),p=_.useCallback(m=>{const y=f.current;if(!y)return;m.preventDefault();const w=m.clientY,g=y.offsetHeight,x=k=>{y.style.height=`${Math.max(TV,g+k.clientY-w)}px`},v=()=>{window.removeEventListener("pointermove",x),window.removeEventListener("pointerup",v)};window.addEventListener("pointermove",x),window.addEventListener("pointerup",v)},[]);return d.jsxs("div",{className:Q(sn.wrapper,s==="chalkboard"&&sn.chalkboard,i),children:[e&&d.jsx("label",{htmlFor:c,className:sn.label,children:e}),d.jsxs("span",{className:Q(sn.field,sn[r],n&&sn.error,a.disabled&&sn.disabled),children:[d.jsx("textarea",{ref:h,id:c,className:sn.textarea,...a}),d.jsx(_t,{fill:!0,...St.field}),!a.disabled&&d.jsx("span",{className:sn.resizeGrip,onPointerDown:p,"aria-hidden":"true",title:"Drag to resize",children:d.jsxs("svg",{viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:[d.jsx("path",{d:"M11 4.5 L4.5 11"}),d.jsx("path",{d:"M11 8.5 L8.5 11"})]})})]}),t&&d.jsx("span",{className:Q(sn.helperText,n&&sn.helperError),children:t})]})}),RV="progress-module__track___a5BMO",NV="progress-module__svg___3U0-E",y0={track:RV,svg:NV},of=300,pr=1;function IV({value:e,max:t=100,color:n,height:r=6,surface:s="paper",className:i}){const o=t>0?Math.max(0,Math.min(100,Math.round(e/t*100))):0,a=s==="chalkboard",l=Math.max(1,Math.round(Ru()*1e6)),u=a?tt(X.chalkboardBorderBase,.16):tt(X.textPrimary,.12),c=n??(a?X.chalkboardChalk:X.textSecondary),f=_.useMemo(()=>Oe.toPaths(Oe.rectangle(pr,pr,of-pr*2,r-pr*2,{seed:l,roughness:2.2,fill:u,fillStyle:"solid",stroke:u,strokeWidth:1.5})),[l,u,r]),h=Math.max(o/100*(of-pr*2),0),p=_.useMemo(()=>h>0?Oe.toPaths(Oe.rectangle(pr,pr,h,r-pr*2,{seed:l+1,roughness:2,fill:c,fillStyle:"solid",stroke:c,strokeWidth:1})):[],[l,c,h,r]);return d.jsx("div",{className:Q(y0.track,i),style:{height:r,borderRadius:r/2},children:d.jsxs("svg",{className:y0.svg,viewBox:`0 0 ${of} ${r}`,preserveAspectRatio:"none","aria-hidden":"true",children:[f.map((m,y)=>d.jsx("path",{d:m.d,stroke:m.stroke,strokeWidth:m.strokeWidth,fill:m.fill},y)),p.map((m,y)=>d.jsx("path",{d:m.d,stroke:m.stroke,strokeWidth:m.strokeWidth,fill:m.fill},y))]})})}function AV(e){const t=Ru();return _.useMemo(()=>({blob:lB({seed:t,wobble:e}),ring:cB(t,e)}),[t,e])}const MV="list-item-module__listItem___-tw9O",LV="list-item-module__clickable___GLJmd",DV="list-item-module__blobBg___O3Mzh",OV="list-item-module__blobFill___dXHk1",FV="list-item-module__blobRing___S9mas",zV="list-item-module__active___UsL8O",BV="list-item-module__small___9dphK",$V="list-item-module__medium___yGZCr",VV="list-item-module__icon___2b4wU",UV="list-item-module__label___SIzJ4",WV="list-item-module__action___qGh0-",HV="list-item-module__chalkboard___qpWuM",Ut={listItem:MV,static:"list-item-module__static___qtEX6",clickable:LV,blobBg:DV,blobFill:OV,blobRing:FV,active:zV,small:BV,medium:$V,icon:VV,label:UV,action:WV,chalkboard:HV};function ui({active:e=!1,icon:t,action:n,size:r="medium",wobble:s=.5,surface:i="paper",children:o,className:a,...l}){const u=AV(s),c=!!l.onClick;return d.jsxs("button",{type:"button",className:Q(Ut.listItem,Ut[r],c&&Ut.clickable,!c&&!e&&Ut.static,e&&Ut.active,i==="chalkboard"&&Ut.chalkboard,a),"aria-current":e?"page":void 0,...l,children:[d.jsxs("svg",{className:Ut.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[d.jsx("path",{d:u.blob,className:Ut.blobFill}),d.jsx("path",{d:u.ring,className:Ut.blobRing})]}),t&&d.jsx("span",{className:Ut.icon,children:t}),d.jsx("span",{className:Ut.label,children:o}),n&&d.jsx("span",{className:Ut.action,children:n})]})}const GV="accordion-module__accordion___mqGl-",KV="accordion-module__header___mLfbd",qV="accordion-module__icon___Z90NR",QV="accordion-module__title___HusgG",YV="accordion-module__content___1K0td",XV="accordion-module__chalkboard___am8r4",JV="accordion-module__expanded___836xG",is={accordion:GV,header:KV,icon:qV,title:QV,content:YV,chalkboard:XV,expanded:JV};function ZV({title:e,children:t,expanded:n=!1,onToggle:r,surface:s="paper",className:i}){return d.jsxs("div",{className:Q(is.accordion,n&&is.expanded,s==="chalkboard"&&is.chalkboard,i),children:[d.jsxs("button",{type:"button",className:is.header,onClick:r,"aria-expanded":n,children:[d.jsx("span",{className:is.icon,"aria-hidden":"true",children:d.jsx(CS,{size:14})}),d.jsx("span",{className:is.title,children:e})]}),n&&d.jsx("div",{className:is.content,children:t})]})}const e6="icon-module__icon___2vrJz",t6="icon-module__blobBg___ENPYJ",n6="icon-module__blobFill___IPbwQ",r6="icon-module__blobRing___1awqV",s6="icon-module__content___TaZR6",i6="icon-module__small___Xp--F",o6="icon-module__medium___tCjMB",a6="icon-module__large___vBtP7",Us={icon:e6,blobBg:t6,blobFill:n6,blobRing:r6,content:s6,small:i6,medium:o6,large:a6},l6={small:20,medium:24,large:28};function c6({icon:e,size:t="medium",wobble:n=.5,fillColor:r,className:s}){const i=Hi(n),o=l6[t];return d.jsxs("span",{className:Q(Us.icon,Us[t],s),children:[d.jsxs("svg",{className:Us.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[d.jsx("path",{d:i.blob,className:Us.blobFill,style:r?{fill:r}:void 0}),d.jsx("path",{d:i.ring,className:Us.blobRing})]}),d.jsx("span",{className:Us.content,style:{width:o,height:o},children:e})]})}const u6="radio-module__wrapper___BB05E",d6="radio-module__blobFill___p5BX4",f6="radio-module__labelLeft___ijB93",h6="radio-module__input___M2nFJ",p6="radio-module__box___H7ofS",m6="radio-module__dot___jVJ-d",g6="radio-module__boxWrapper___Y3qis",y6="radio-module__blobBg___IR-M5",x6="radio-module__labelText___I-nu3",v6="radio-module__chalkboard___IIBqI",bn={wrapper:u6,blobFill:d6,labelLeft:f6,input:h6,box:p6,dot:m6,boxWrapper:g6,blobBg:y6,labelText:x6,chalkboard:v6};_.forwardRef(function({label:e,labelPosition:t="right",wobble:n=.4,surface:r="paper",className:s,checked:i,onChange:o,id:a,...l},u){const c=_.useId(),f=a??c,h=Hi(n);return d.jsxs("label",{className:Q(bn.wrapper,t==="left"&&bn.labelLeft,r==="chalkboard"&&bn.chalkboard,s),htmlFor:f,children:[d.jsxs("span",{className:bn.boxWrapper,children:[d.jsx("input",{ref:u,id:f,type:"radio",className:bn.input,checked:i,onChange:o,...l}),d.jsx("svg",{className:bn.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:d.jsx("path",{d:h.blob,className:bn.blobFill})}),d.jsxs("span",{className:bn.box,"aria-hidden":"true",children:[d.jsx(_t,{smooth:!0,shape:"circle",...St.control}),d.jsx("span",{className:bn.dot})]})]}),e&&d.jsx("span",{className:bn.labelText,children:e})]})});const w6="switch-module__wrapper___5-2P1",b6="switch-module__labelLeft___WlT-N",k6="switch-module__input___YKZRj",_6="switch-module__track___QNvnO",S6="switch-module__thumb___cunvF",C6="switch-module__small___WPIxc",P6="switch-module__medium___yPulW",j6="switch-module__large___VlKV1",E6="switch-module__labelText___9Qg39",T6="switch-module__chalkboard___qKTMz",mr={wrapper:w6,labelLeft:b6,input:k6,track:_6,thumb:S6,small:C6,medium:P6,large:j6,labelText:E6,chalkboard:T6},R6=_.forwardRef(function({label:e,labelPosition:t="right",size:n="medium",surface:r="paper",className:s,checked:i,onChange:o,id:a,...l},u){const c=_.useId(),f=a??c;return d.jsxs("label",{className:Q(mr.wrapper,mr[n],t==="left"&&mr.labelLeft,r==="chalkboard"&&mr.chalkboard,s),htmlFor:f,children:[d.jsx("input",{ref:u,id:f,type:"checkbox",className:mr.input,checked:i,onChange:o,...l}),d.jsxs("span",{className:mr.track,"aria-hidden":"true",children:[d.jsx(_t,{...St.pill}),d.jsx("span",{className:mr.thumb})]}),e&&d.jsx("span",{className:mr.labelText,children:e})]})}),N6="spinner-module__spinner___FDTk2",I6="spinner-module__chalkboard___DLE1z",A6="spinner-module__svg___JnCWN",M6="spinner-module__track___xbnbo",L6="spinner-module__head___j5dWe",go={spinner:N6,chalkboard:I6,svg:A6,track:M6,head:L6},D6={small:18,medium:28,large:40},x0=25,O6=18,v0=Oe.toPaths(Oe.circle(x0,x0,O6*2,{seed:7,roughness:1.15,disableMultiStroke:!0})).map(e=>e.d).join(" ");function Hr({size:e="medium",color:t,label:n="Loading",surface:r="paper",className:s}){const i=D6[e];return d.jsx("span",{className:Q(go.spinner,r==="chalkboard"&&go.chalkboard,s),role:"status","aria-label":n,children:d.jsxs("svg",{width:i,height:i,viewBox:"0 0 50 50",className:go.svg,style:t?{color:t}:void 0,"aria-hidden":"true",children:[d.jsx("path",{className:go.track,d:v0,fill:"none",pathLength:100,strokeLinecap:"round"}),d.jsx("path",{className:go.head,d:v0,fill:"none",pathLength:100,strokeLinecap:"round"})]})})}const F6="skeleton-module__skeleton___HCSvg",z6="skeleton-module__pulse___6eCq1",B6="skeleton-module__svg___OzxGp",$6="skeleton-module__text___v17Nv",V6="skeleton-module__rect___wqIJy",U6="skeleton-module__circle___RCmyR",af={skeleton:F6,pulse:z6,svg:B6,text:$6,rect:V6,circle:U6},w0={text:[0,0,200,24],rect:[0,0,200,100],circle:[0,0,40,40]},Ws=2;function on({variant:e="text",width:t,height:n,surface:r="paper",className:s,style:i}){const o=r==="chalkboard",a=Math.max(1,Math.round(Ru()*1e6)),l=o?tt(X.chalkboardBorderBase,.16):tt(X.textPrimary,.09),u=_.useMemo(()=>{const[,,c,f]=w0[e],h=e==="circle"?Oe.ellipse(c/2,f/2,c-Ws*2,f-Ws*2,{seed:a,roughness:1.5,fill:l,fillStyle:"solid",stroke:l,strokeWidth:1}):Oe.rectangle(Ws,Ws,c-Ws*2,f-Ws*2,{seed:a,roughness:1.4,fill:l,fillStyle:"solid",stroke:l,strokeWidth:1});return Oe.toPaths(h)},[e,a,l]);return d.jsx("span",{className:Q(af.skeleton,af[e],s),style:{width:t,height:n,...i},"aria-hidden":"true",children:d.jsx("svg",{className:af.svg,viewBox:w0[e].join(" "),preserveAspectRatio:"none","aria-hidden":"true",children:u.map((c,f)=>d.jsx("path",{d:c.d,stroke:c.stroke,strokeWidth:c.strokeWidth,fill:c.fill},f))})})}const W6="divider-module__horizontal___tP3rG",H6="divider-module__line___KnBes",G6="divider-module__label___WiUwZ",K6="divider-module__vertical___wBSrT",q6="divider-module__chalkboard___gXTde",Hs={horizontal:W6,line:H6,label:G6,vertical:K6,chalkboard:q6};function b0({orientation:e="horizontal",label:t,surface:n="paper",className:r}){const s=n==="chalkboard"&&Hs.chalkboard;return e==="vertical"?d.jsx("span",{className:Q(Hs.vertical,s,r),role:"separator","aria-orientation":"vertical"}):d.jsxs("div",{className:Q(Hs.horizontal,s,r),role:"separator",children:[d.jsx("span",{className:Hs.line}),t!=null&&d.jsxs(d.Fragment,{children:[d.jsx("span",{className:Hs.label,children:t}),d.jsx("span",{className:Hs.line})]})]})}const Q6="tooltip-module__wrapper___XeVNe",Y6="tooltip-module__tooltip___e-rkz",X6="tooltip-module__tooltipIn___CZbRw",J6="tooltip-module__top___78WWU",Z6="tooltip-module__bottom___Irl3O",e8="tooltip-module__left___C1Ec4",t8="tooltip-module__right___oUA-Z",n8="tooltip-module__chalkboard___Um6dx",vl={wrapper:Q6,tooltip:Y6,tooltipIn:X6,top:J6,bottom:Z6,left:e8,right:t8,chalkboard:n8},wl=8,bl=8,r8=typeof window>"u"?_.useEffect:_.useLayoutEffect;function s8(e,t,n){let r,s;switch(t){case"bottom":r=e.bottom+wl,s=e.left+e.width/2-n.width/2;break;case"left":r=e.top+e.height/2-n.height/2,s=e.left-wl-n.width;break;case"right":r=e.top+e.height/2-n.height/2,s=e.right+wl;break;default:r=e.top-wl-n.height,s=e.left+e.width/2-n.width/2}return s=Math.min(Math.max(s,bl),window.innerWidth-n.width-bl),r=Math.min(Math.max(r,bl),window.innerHeight-n.height-bl),{top:r,left:s}}function Ae({content:e,children:t,placement:n="top",delay:r=300,disabled:s=!1,surface:i="paper"}){const o=_.useId(),[a,l]=_.useState(!1),[u,c]=_.useState(!1),[f,h]=_.useState(!1),[p,m]=_.useState(null),[y,w]=_.useState(null),g=_.useRef(null),x=_.useRef(null),v=_.useRef(),k=!s&&!!e&&!f&&(a||u),S=()=>{clearTimeout(v.current),v.current=setTimeout(()=>l(!0),r)},b=()=>{clearTimeout(v.current),l(!1),h(!1)},P=()=>{h(!1),c(!0)},j=()=>{c(!1),h(!1)};ju(k,()=>h(!0)),_.useEffect(()=>{if(!k){m(null);return}const T=()=>{g.current&&m(g.current.getBoundingClientRect())};return T(),window.addEventListener("scroll",T,{capture:!0,passive:!0}),window.addEventListener("resize",T,{passive:!0}),()=>{window.removeEventListener("scroll",T,{capture:!0}),window.removeEventListener("resize",T)}},[k]),r8(()=>{if(!k){w(null);return}const T=x.current;T&&w({width:T.offsetWidth,height:T.offsetHeight})},[k,e,n]),_.useEffect(()=>()=>clearTimeout(v.current),[]);const R=t.props;return d.jsxs("span",{ref:g,className:vl.wrapper,onMouseEnter:S,onMouseLeave:b,onFocus:P,onBlur:j,children:[_.cloneElement(t,{"aria-describedby":k?o:R["aria-describedby"]}),k&&p&&typeof document<"u"&&As.createPortal(d.jsx("span",{ref:x,id:o,role:"tooltip",className:Q(vl.tooltip,vl[n],i==="chalkboard"&&vl.chalkboard),style:y?{position:"fixed",...s8(p,n,y)}:{position:"fixed",top:0,left:0,visibility:"hidden"},children:e}),document.body)]})}const i8="toast-module__stack___hDi0s",o8="toast-module__topLeft___Luw-F",a8="toast-module__topCenter___N1DwF",l8="toast-module__topRight___Dtgau",c8="toast-module__bottomLeft___Eb2lo",u8="toast-module__bottomCenter___gs-Yb",d8="toast-module__bottomRight___-0e2j",f8="toast-module__item___RFjtm",h8="toast-module__toastIn___9m9iN",p8="toast-module__card___ZCvJS",m8="toast-module__surface___mfMl0",g8="toast-module__iconWrapper___lnjcC",y8="toast-module__content___AlliM",x8="toast-module__title___1Oqh8",v8="toast-module__description___eiUSB",w8="toast-module__dismiss___tUGx4",b8="toast-module__info___Nh8S9",k8="toast-module__success___hlKLc",_8="toast-module__warning___XUMJt",S8="toast-module__error___pSFFC",C8="toast-module__chalkboard___c49gt",Wt={stack:i8,topLeft:o8,topCenter:a8,topRight:l8,bottomLeft:c8,bottomCenter:u8,bottomRight:d8,item:f8,toastIn:h8,card:p8,surface:m8,iconWrapper:g8,content:y8,title:x8,description:v8,dismiss:w8,info:b8,success:k8,warning:_8,error:S8,chalkboard:C8};function P8({record:e,surface:t="paper",onDismiss:n}){const r=_.useRef(e.duration),s=_.useRef(0),i=_.useRef(),o=_.useCallback(f=>{clearTimeout(i.current),!(f<=0)&&(s.current=Date.now(),i.current=setTimeout(()=>n(e.id),f))},[n,e.id]);_.useEffect(()=>(o(e.duration),()=>clearTimeout(i.current)),[o,e.duration]);const a=()=>{i.current&&(clearTimeout(i.current),r.current-=Date.now()-s.current)},l=()=>o(r.current),u=t==="chalkboard",c=e.variant==="warning"||e.variant==="error"?"alert":"status";return d.jsx("div",{className:Wt.item,onMouseEnter:a,onMouseLeave:l,children:d.jsxs("div",{className:Q(Wt.card,Wt[e.variant],u&&Wt.chalkboard),role:c,children:[d.jsx(_t,{clip:!0,...St.surface}),d.jsx("div",{className:Wt.surface,style:u?void 0:Wi("kraft")}),d.jsx("span",{className:Wt.iconWrapper,children:d.jsx(PS,{variant:e.variant})}),d.jsxs("div",{className:Wt.content,children:[e.title&&d.jsx("div",{className:Wt.title,children:e.title}),d.jsx("div",{className:Wt.description,children:e.description})]}),d.jsx("button",{type:"button",className:Wt.dismiss,onClick:()=>n(e.id),"aria-label":"Dismiss notification",children:d.jsx(Pa,{size:16})})]})})}const ES=_.createContext(null);function j8(e){return e.replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function E8({children:e,position:t="bottom-right",surface:n="paper",defaultDuration:r=5e3}){const[s,i]=_.useState([]),o=_.useRef(0),a=_.useCallback(c=>{i(f=>f.filter(h=>h.id!==c))},[]),l=_.useCallback(c=>{o.current+=1;const f=`toast-${o.current}`;return i(h=>[...h,{id:f,title:c.title,description:c.description,variant:c.variant??"info",duration:c.duration??r}]),f},[r]),u=t.startsWith("top")?[...s].reverse():s;return d.jsxs(ES.Provider,{value:{toast:l,dismiss:a},children:[e,typeof document<"u"&&As.createPortal(d.jsx("div",{className:Q(Wt.stack,Wt[j8(t)]),role:"region","aria-label":"Notifications",children:u.map(c=>d.jsx(P8,{record:c,surface:n,onDismiss:a},c.id))}),document.body)]})}function We(){const e=_.useContext(ES);if(!e)throw new Error("useToast must be used within a <ToastProvider>");return e}const T8="breadcrumb-module__breadcrumb___r-ILp",R8="breadcrumb-module__list___V3YFy",N8="breadcrumb-module__item___dDwYf",I8="breadcrumb-module__link___CHC9k",A8="breadcrumb-module__linkButton___XoMW-",M8="breadcrumb-module__current___dprI9",L8="breadcrumb-module__separator___uLhtn",D8="breadcrumb-module__chalkboard___COJpw",kn={breadcrumb:T8,list:R8,item:N8,link:I8,linkButton:A8,current:M8,static:"breadcrumb-module__static___affaf",separator:L8,chalkboard:D8};function k0({items:e,surface:t="paper",className:n}){return d.jsx("nav",{"aria-label":"Breadcrumb",className:Q(kn.breadcrumb,t==="chalkboard"&&kn.chalkboard,n),children:d.jsx("ol",{className:kn.list,children:e.map((r,s)=>{const i=s===e.length-1;return d.jsxs("li",{className:kn.item,children:[i?d.jsx("span",{className:kn.current,"aria-current":"page",children:r.label}):r.href?d.jsx("a",{href:r.href,className:kn.link,onClick:r.onClick,children:r.label}):r.onClick?d.jsx("button",{type:"button",className:Q(kn.link,kn.linkButton),onClick:r.onClick,children:r.label}):d.jsx("span",{className:kn.static,children:r.label}),!i&&d.jsx(O8,{className:kn.separator})]},r.id)})})})}function O8({className:e}){return d.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":"true",children:d.jsx("polyline",{points:"9 18 15 12 9 6"})})}const F8="menu-module__wrapper___WCtoy",z8="menu-module__menu___i40Wj",B8="menu-module__surface___SJbaB",$8="menu-module__list___YjCfD",V8="menu-module__item___aqcgg",U8="menu-module__icon___1qUvA",W8="menu-module__label___MtQMh",H8="menu-module__danger___p9oZo",G8="menu-module__itemDisabled___HByLP",K8="menu-module__separator___g2uay",q8="menu-module__chalkboard___5jIwI",an={wrapper:F8,menu:z8,surface:B8,list:$8,item:V8,icon:U8,label:W8,danger:H8,itemDisabled:G8,separator:K8,chalkboard:q8},Q8=6;function Y8(e){return"type"in e&&e.type==="separator"}function TS({trigger:e,items:t,align:n="start",surface:r="paper",className:s}){const i=_.useId(),[o,a]=_.useState(!1),[l,u]=_.useState(null),c=_.useRef(null),f=_.useRef(null),h=_.useCallback(()=>{var g,x;(x=(g=c.current)==null?void 0:g.querySelector("button, a, [tabindex]"))==null||x.focus()},[]),p=_.useCallback(()=>a(!1),[]);ju(o,()=>{p(),h()}),_.useEffect(()=>{if(!o)return;const g=x=>{var v,k;const S=x.target;(v=c.current)!=null&&v.contains(S)||(k=f.current)!=null&&k.contains(S)||p()};return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[o,p]),_.useEffect(()=>{if(!o){u(null);return}const g=()=>{c.current&&u(c.current.getBoundingClientRect())};return g(),document.addEventListener("scroll",g,{capture:!0,passive:!0}),window.addEventListener("resize",g,{passive:!0}),()=>{document.removeEventListener("scroll",g,{capture:!0}),window.removeEventListener("resize",g)}},[o]),_.useEffect(()=>{var g,x;!o||!l||(x=(g=f.current)==null?void 0:g.querySelector('[role="menuitem"]:not(:disabled)'))==null||x.focus()},[o,l]);const m=g=>{var x,v,k,S,b;const P=Array.from(((x=f.current)==null?void 0:x.querySelectorAll('[role="menuitem"]:not(:disabled)'))??[]);if(P.length===0)return;const j=P.indexOf(document.activeElement);switch(g.key){case"ArrowDown":g.preventDefault(),(v=P[(j+1)%P.length])==null||v.focus();break;case"ArrowUp":g.preventDefault(),(k=P[(j-1+P.length)%P.length])==null||k.focus();break;case"Home":g.preventDefault(),(S=P[0])==null||S.focus();break;case"End":g.preventDefault(),(b=P[P.length-1])==null||b.focus();break;case"Tab":p();break}},y=g=>{var x;g.disabled||(p(),h(),(x=g.onSelect)==null||x.call(g))},w=e.props;return d.jsxs("span",{ref:c,className:an.wrapper,children:[_.cloneElement(e,{"aria-haspopup":"menu","aria-expanded":o,onClick:g=>{var x;(x=w.onClick)==null||x.call(w,g),a(v=>!v)}}),o&&l&&typeof document<"u"&&As.createPortal(d.jsxs("div",{ref:f,id:i,role:"menu",className:Q(an.menu,r==="chalkboard"&&an.chalkboard,s),style:{position:"fixed",top:l.bottom+Q8,minWidth:l.width,...n==="end"?{right:window.innerWidth-l.right}:{left:l.left}},onKeyDown:m,children:[d.jsx(_t,{clip:!0,...St.surface}),d.jsx("div",{className:an.surface}),d.jsx("div",{className:an.list,children:t.map(g=>Y8(g)?d.jsx("div",{role:"separator",className:an.separator},g.id):d.jsxs("button",{type:"button",role:"menuitem",tabIndex:-1,disabled:g.disabled,className:Q(an.item,g.danger&&an.danger,g.disabled&&an.itemDisabled),onClick:()=>y(g),children:[g.icon&&d.jsx("span",{className:an.icon,children:g.icon}),d.jsx("span",{className:an.label,children:g.label})]},g.id))})]}),document.body)]})}function Ue(e){const t=e.split(`
|
|
79
|
-
`).map(r=>r.trim()).filter(Boolean);return t.find(r=>r.startsWith("!")||r.startsWith("error:")||r.startsWith("fatal:"))??t.at(-1)??e}const RS="font-display-luminari text-base font-semibold text-desk-text-muted mb-3",Gn={pass:"#2d5a3b",fail:"#5a2d2d",running:"#5a4a2d"},Kn={pass:"#b5d6b5",fail:"#d6a0a0",running:"#d6c4a0"},X8=Ue,J8=8,Z8="basis-[25.5rem]",eU=e=>{switch(e.taskKind){case"phase":return e.phaseIndex!==void 0?` — phase ${e.phaseIndex+1}`:"";case"audit":return" — audit";case"batch-reconcile":return" — batch reconcile";case"reconcile":return" — reconcile";case"fix-review":return" — fixing review comments";case"draft":return" — drafting";case"extend":return" — extending";case"commit-suggest":return" — suggesting commit message";case"overlap-check":return" — checking overlap";case"sync":return" — syncing to main";case"resolve-conflict":return" — resolving conflict";case"run-all":return" — run all phases";default:return""}},tU=({task:e,onStop:t})=>{const n=Bt(),{toast:r}=We(),s=()=>n({to:"/tasks",search:{taskId:e.id}}),i=async l=>{l.stopPropagation();try{await t(e.id)}catch(u){r({title:"Failed to stop agent",description:Ue(u.message),variant:"error"})}},o={starting:Gn.running,running:Gn.running,stopping:Gn.running,done:Gn.pass,error:Gn.fail,superseded:Gn.running},a={starting:Kn.running,running:Kn.running,stopping:Kn.running,done:Kn.pass,error:Kn.fail,superseded:Kn.running};return d.jsx(Ce,{surface:"chalkboard",size:"small",className:"stack-task-card",children:d.jsxs("div",{role:"button",tabIndex:0,onClick:s,onKeyDown:l=>{l.target===l.currentTarget&&(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),s())},className:"flex cursor-pointer items-center justify-between gap-2 rounded-[10px]",children:[d.jsxs("span",{className:"min-w-0 overflow-hidden text-ellipsis whitespace-nowrap font-display-luminari text-sm font-semibold text-desk-chalk",children:[e.planTitle,eU(e)," · ",yk[e.agentId]]}),d.jsxs("div",{className:"flex items-center gap-2",children:[e.status==="error"&&e.errorKind==="auth"?d.jsx("button",{type:"button",onClick:l=>{l.stopPropagation(),n({to:"/settings/$section",params:{section:"setup"}})},className:"bg-none bg-transparent border-none p-0 cursor-pointer",children:d.jsx(Te,{surface:"chalkboard",size:"small",fillColor:o.error,textColor:a.error,children:"stopped — agent signed out"})}):d.jsx(Te,{surface:"chalkboard",size:"small",fillColor:o[e.status],textColor:a[e.status],children:e.status}),(e.status==="running"||e.status==="starting"||e.status==="stopping")&&d.jsx(it,{icon:d.jsx(Pa,{}),variant:"ghost",size:"small",label:"Stop agent",onClick:i,disabled:e.status==="stopping"})]})]})})},nU=()=>{const e=O(r=>r.agentStatus),t=O(r=>r.stopAgent),n=e.slice(0,J8);return d.jsxs("div",{className:"flex min-h-0 flex-auto flex-col p-6",children:[d.jsx("div",{className:RS,children:"Agent"}),d.jsx("div",{className:`flex min-h-0 flex-auto flex-col gap-2 overflow-y-auto ${Z8} ${n.length>0?"justify-start":"justify-center"}`,children:n.length>0?n.map(r=>d.jsx(tU,{task:r,onStop:t},r.id)):d.jsx(Ce,{surface:"chalkboard",size:"small",children:d.jsx("p",{className:"m-0 text-center text-xs opacity-50",children:"No agent running."})})})]})};function kl(e,t){const{toast:n}=We(),r=O(o=>o.activeGitAction),s=O(o=>o.setActiveGitAction),i=_.useCallback(async o=>{if(!O.getState().activeGitAction){s(e);try{await o()}catch(a){n({title:t,description:Ue(a.message),variant:"error"})}finally{s(null)}}},[n,t,e,s]);return[r===e,i]}function Nu(){const e=O(k=>k.loadGitStatus),t=O(k=>k.loadPlans),n=O(k=>k.loadIdeas),r=O(k=>k.activeGitAction!==null),{toast:s,dismiss:i}=We(),o=()=>Promise.all([e(),t(),n()]),[a,l]=kl("push","Push failed"),[u,c]=kl("sync","Sync failed"),[f,h]=kl("pull","Pull failed"),[p,m]=kl("fix-divergence","Fix failed"),y=_.useCallback((k,S)=>{if(S.recovering)return s({title:`${k} needs help`,description:"Handed off to a recovery agent — see Stack for progress",variant:"warning"}),!0;if("conflictPrompt"in S){const{conflictPrompt:b,message:P}=S,j=s({title:`${k} hit a conflict`,description:d.jsxs("div",{className:"flex flex-col items-start gap-2",children:[d.jsx("span",{children:Ue(P)}),d.jsx(ne,{size:"small",onClick:async()=>{const R=await QM(b).catch(T=>({ok:!1,error:Ue(T.message)}));R.ok&&i(j),s({title:R.ok?"Resolving conflict":"Could not start the agent",description:R.ok?"Handed off to the agent — see Stack for progress":R.error??"The agent did not start.",variant:R.ok?"warning":"error"})},children:"Ask the agent to resolve"})]}),variant:"error",duration:0});return!0}return!1},[s,i]);return{pushing:a,syncing:u,pulling:f,fixingDivergence:p,gitActionBusy:r,handlePush:()=>l(async()=>{await HM(),await e()}),handleSync:()=>c(async()=>{const k=await GM();if(!k.ok){if(y("Sync",k)){await e();return}throw new Error(k.message)}await o()}),handlePull:()=>h(async()=>{await KM(),await o()}),handleFixDivergence:()=>m(async()=>{const k=await qM();if(!k.ok){if(y("Fix",k)){await e();return}throw new Error(k.message)}await o()})}}function _0(e){const t=e.match(/Found (\d+) errors?\./);return t?Number(t[1]):0}function rU(e,t){const n=_0(e)+_0(t);return n>0?`${n} lint/format issue${n===1?"":"s"} found.`:"Lint or format check failed."}function sU(e){const t=e.match(/Tests\s+(\d+) failed/);return t?`${t[1]} test${t[1]==="1"?"":"s"} failed.`:"Tests failed."}const NS=({size:e=16})=>d.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[d.jsx("path",{d:"m12 3-1.6 4.85a2 2 0 0 1-1.27 1.27L4.27 10.7l4.86 1.6a2 2 0 0 1 1.27 1.27L12 18.4l1.6-4.86a2 2 0 0 1 1.27-1.27l4.86-1.6-4.86-1.6a2 2 0 0 1-1.27-1.27L12 3Z"}),d.jsx("path",{d:"M19 3v3"}),d.jsx("path",{d:"M20.5 4.5h-3"})]}),IS=({size:e=16})=>d.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[d.jsx("path",{d:"M12 19V5"}),d.jsx("path",{d:"m5 12 7-7 7 7"})]}),AS=({size:e=16})=>d.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[d.jsx("path",{d:"M12 5v14"}),d.jsx("path",{d:"m5 12 7 7 7-7"})]}),Iu=({size:e=16})=>d.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[d.jsx("circle",{cx:"18",cy:"18",r:"3"}),d.jsx("circle",{cx:"6",cy:"6",r:"3"}),d.jsx("path",{d:"M6 9v5c0 .667 3 1 6 1s6-.333 6-1V9"}),d.jsx("path",{d:"M12 17v2"})]}),iU=({size:e=16})=>d.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[d.jsx("path",{d:"M21 12a9 9 0 1 1-2.64-6.36"}),d.jsx("polyline",{points:"21 3 21 9 15 9"})]}),MS=({size:e=16})=>d.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:[d.jsx("circle",{cx:"5",cy:"12",r:"2"}),d.jsx("circle",{cx:"12",cy:"12",r:"2"}),d.jsx("circle",{cx:"19",cy:"12",r:"2"})]}),oU=({size:e=16})=>d.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[d.jsx("path",{d:"m18 4 3 3-3 3"}),d.jsx("path",{d:"M3 7h5.5a3 3 0 0 1 2.5 1.35L15 16.65A3 3 0 0 0 17.5 18H21"}),d.jsx("path",{d:"m18 20 3-3-3-3"}),d.jsx("path",{d:"M3 17h5.5a3 3 0 0 0 2.5-1.35"}),d.jsx("path",{d:"M13 8.35A3 3 0 0 1 15.5 7H21"})]}),aU=({size:e=12})=>d.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round","aria-hidden":"true",children:[d.jsx("circle",{cx:"10",cy:"10",r:"3"}),d.jsx("path",{d:"M2.5 10h4.5M13 10h4.5"})]}),lU=({size:e=12})=>d.jsx("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:d.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8Z"})}),Zm=({size:e=14})=>d.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"opacity-[0.55] shrink-0",children:[d.jsx("title",{children:"Idea"}),d.jsx("path",{d:"M9 18h6M10 22h4M12 2a6 6 0 0 0-3.5 10.9c.53.4.9 1.03.9 1.72V15h5.2v-.38c0-.69.37-1.32.9-1.72A6 6 0 0 0 12 2Z"})]}),LS=({size:e=14})=>d.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"opacity-[0.55] shrink-0",children:[d.jsx("title",{children:"Note"}),d.jsx("path",{d:"M15 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9Z"}),d.jsx("path",{d:"M15 3v6h6"})]}),cU=["core","cli","app","server","agent","plans","ideas","docs","settings","stack","ui","ci","config","deps","repo"];function uU(e){var s;if(!e||e.phases.length>0&&e.phases.every(i=>i.done))return{title:""};const t=((s=e.tags)==null?void 0:s.find(i=>cU.includes(i)))??"repo";return{title:`${e.kind??"feat"}(${t}): ${e.title}`}}const dU=()=>{var A,F,z;const e=O(E=>E.status),t=O(E=>E.runCheck),n=O(E=>E.fixQuality),r=O(E=>E.consistency),s=O(E=>E.plans),i=O(E=>E.gitBranch),o=O(E=>E.gitAhead),a=O(E=>E.gitBehind),l=O(E=>E.gitDiverged),u=Bt(),[c,f]=_.useState(!1),{fixingDivergence:h,gitActionBusy:p,handleFixDivergence:m}=Nu(),{qualityStatus:y,testStatus:w,consistencyStatus:g}=_.useMemo(()=>_k(e),[e]),x=y==="running"||w==="running"||g==="running",v=r.length>0,k=_.useCallback(E=>E.kind==="orphan-subject"&&E.planId?s==null?void 0:s.entries.find(D=>D.id===E.planId):void 0,[s==null?void 0:s.entries]),S=_.useCallback(E=>{const D=k(E);D&&u({to:"/plans/$planId",params:{planId:encodeURIComponent(D.title)}})},[k,u]),b={...Gn,stale:"transparent"},P={...Kn,stale:void 0},j=x,R=v;`${((A=e==null?void 0:e.lint)==null?void 0:A.output)||"(none)"}${((F=e==null?void 0:e.format)==null?void 0:F.output)||"(none)"}`;const T=`Fix the failing tests in this repo. Output from the last test run:
|
|
80
|
-
|
|
81
|
-
${((z=e==null?void 0:e.test)==null?void 0:z.output)||"(no output captured)"}`,I=E=>d.jsx(Ae,{content:E.title,surface:"chalkboard",children:d.jsx("button",{type:"button",className:`inline-flex bg-none bg-transparent border-none p-0 enabled:hover:-translate-y-px enabled:hover:brightness-[1.15] enabled:active:translate-y-0 enabled:active:brightness-[0.95] ${j?"cursor-not-allowed":"cursor-pointer"} ${j&&E.status!=="running"?"opacity-50":"opacity-100"}`,onClick:()=>{j||E.onClick()},disabled:j,children:d.jsxs(Te,{surface:"chalkboard",size:"small",fillColor:b[E.status],textColor:P[E.status],children:[E.label,d.jsx("span",{className:E.status==="running"?"visible":"invisible",children:"…"})]})})});return d.jsxs("div",{className:"flex-none flex flex-col gap-3",children:[d.jsxs("div",{className:"flex gap-2 flex-wrap justify-center",children:[I({label:"Quality",status:y,title:"Code style & formatting (Biome lint + format). Click to run.",onClick:()=>{t("lint"),t("format")}}),I({label:"Tests",status:w,title:"Unit tests (Vitest). Click to run.",onClick:()=>t("test")}),I({label:"Consistency",status:g,title:"Dead code & architecture (Knip + dependency-cruiser). Click to run.",onClick:()=>t("consistency")}),d.jsxs("div",{children:[d.jsx(Ae,{content:R?"Plan/idea doc findings — orphan subjects & stale references. Click to show.":"Plan/idea docs — no findings (orphan subjects, stale references).",surface:"chalkboard",children:d.jsx("button",{type:"button",className:`inline-flex bg-none bg-transparent border-none p-0 ${R?"enabled:hover:-translate-y-px enabled:hover:brightness-[1.15] enabled:active:translate-y-0 enabled:active:brightness-[0.95] cursor-pointer":"cursor-default"}`,disabled:!R,"aria-expanded":R?c:void 0,"aria-controls":"stack-doc-findings",onClick:()=>{R&&f(E=>!E)},children:d.jsx(Te,{surface:"chalkboard",size:"small",fillColor:R?Gn.fail:Gn.pass,textColor:R?Kn.fail:Kn.pass,children:"Docs"})})}),c&&R&&d.jsx("div",{id:"stack-doc-findings",className:"mt-2 flex flex-col gap-2",children:r.map((E,D)=>d.jsx("div",{className:"font-mono text-2xs text-desk-text-muted",children:k(E)?d.jsx("button",{type:"button",onClick:()=>S(E),className:"bg-none bg-transparent border-none p-0 text-desk-chalk underline cursor-pointer [font:inherit] text-left",children:E.message}):d.jsx("span",{className:"text-left",children:E.message})},`${E.kind}-${E.title}-${D}`))})]})]}),(()=>{var B,M,$;let E,D=null;return j?E=d.jsx("span",{className:"text-desk-text-muted",children:"Running checks…"}):l?(E=d.jsxs("span",{className:"text-desk-text-muted",children:[i," has diverged from origin (",o," local, ",a," remote)"]}),D=d.jsx("button",{type:"button",onClick:m,disabled:p,className:"bg-none bg-transparent border-none p-0 text-desk-chalk underline cursor-pointer disabled:cursor-not-allowed disabled:opacity-50 [font:inherit]",children:h?"Fixing…":"Suggested fix: Fix git issues"})):y==="fail"?(E=d.jsx("span",{className:"text-desk-text-muted",children:rU(((B=e==null?void 0:e.lint)==null?void 0:B.output)??"",((M=e==null?void 0:e.format)==null?void 0:M.output)??"")}),D=d.jsx("button",{type:"button",onClick:n,className:"bg-none bg-transparent border-none p-0 text-desk-chalk underline cursor-pointer [font:inherit]",children:"Suggested fix: run biome --write"})):w==="fail"?(E=d.jsx("span",{className:"text-desk-text-muted",children:sU((($=e==null?void 0:e.test)==null?void 0:$.output)??"")}),D=d.jsxs("span",{className:"text-desk-chalk",children:["Suggested fix: ",d.jsx(Qh,{text:T,surface:"chalkboard"})]})):g==="fail"?(E=d.jsx("span",{className:"text-desk-text-muted",children:"Codebase consistency failed (knip / dependency-cruiser)."}),D=d.jsx("span",{className:"text-desk-text-muted opacity-80",children:"Run pnpm run consistency for details."})):v?E=d.jsx("span",{className:"text-desk-text-muted",children:"Plan doc issues — see the Docs stamp."}):y==="pass"&&w==="pass"&&g==="pass"?E=d.jsx("span",{className:"text-chalk-pass-text",children:"All checks passing."}):E=d.jsx("span",{className:"text-desk-text-muted opacity-60",children:"Checks haven't run yet."}),d.jsxs("div",{className:"text-center flex flex-col gap-1 font-handwritten text-sm",children:[E,d.jsx("span",{className:D?"visible":"invisible",children:D??" "})]})})()]})},fU=({count:e})=>{const t=Bt();return d.jsxs("button",{type:"button",onClick:()=>t({to:"/diff"}),className:"block mx-auto bg-none bg-transparent border-none p-0 text-center font-mono text-xs text-desk-text-muted underline cursor-pointer",children:[e," file",e===1?"":"s"," changed"]})},hU=({files:e})=>{const t=O(S=>S.plans),n=O(S=>S.agentStatus),r=O(S=>S.loadGitStatus),s=O(S=>S.commitInFlight),i=O(S=>S.setCommitInFlight),{toast:o}=We(),[a,l]=_.useState(""),[u,c]=_.useState(!1),[f,h]=_.useState(!1),[p,m]=_.useState(null),y=_.useMemo(()=>_M(t==null?void 0:t.entries),[t==null?void 0:t.entries]),{title:w}=_.useMemo(()=>uU(y),[y]);_.useEffect(()=>{w&&!a&&l(w)},[w,a]);const g=_.useRef(null),x=_.useRef(null);_.useEffect(()=>{if(g.current===null){if(n.length===0)return;g.current=new Set(n.filter(b=>b.suggestedCommit).map(b=>b.id))}const S=n.find(b=>{var P;return b.suggestedCommit&&!((P=g.current)!=null&&P.has(b.id))});!(S!=null&&S.suggestedCommit)||x.current===S.id||(x.current=S.id,l(S.suggestedCommit.title))},[n]);const v=_.useCallback(async()=>{if(!(!a.trim()||s)){c(!0),i(!0);try{await bk(e,a.trim()),l(""),await r()}catch(S){o({title:"Commit failed",description:X8(S.message),variant:"error"}),await r()}finally{c(!1),i(!1)}}},[a,e,r,s,i,o]),k=_.useCallback(async()=>{if(e.length!==0){h(!0),m(null);try{const S=await kk(e);l(S.title)}catch(S){m(S.message)}finally{h(!1)}}},[e]);return d.jsxs(d.Fragment,{children:[p&&d.jsx(jS,{surface:"chalkboard",dismissible:!0,onDismiss:()=>m(null),children:p}),d.jsxs("div",{className:"flex gap-2 items-center",children:[d.jsx("div",{className:"flex-1",children:d.jsx(ja,{surface:"chalkboard",size:"small",placeholder:"Commit title",value:a,onChange:S=>l(S.currentTarget.value)})}),d.jsx(it,{icon:d.jsx(NS,{size:16}),surface:"chalkboard",size:"small",label:"Suggest title and message from the diff",disabled:e.length===0||f,onClick:k,wobble:f?1:0})]}),d.jsx(ne,{surface:"chalkboard",size:"small",fullWidth:!0,disabled:e.length===0||!a.trim()||u||s,onClick:v,children:u||s?"Committing…":"Commit"})]})},pU=()=>{const{syncing:e,gitActionBusy:t,handleSync:n}=Nu();return d.jsx(ne,{surface:"chalkboard",size:"small",fullWidth:!0,icon:d.jsx(Iu,{size:14}),disabled:t,onClick:n,children:e?"Syncing…":"Branch merged — sync to main"})},mU=({gitAhead:e,gitBranchHygiene:t})=>{const{pushing:n,syncing:r,pulling:s,gitActionBusy:i,handlePush:o,handleSync:a,handlePull:l}=Nu();return e>0?d.jsxs(d.Fragment,{children:[d.jsxs("p",{className:"opacity-50 text-xs m-0",children:["All changes committed — ",e," commit",e===1?"":"s"," ready to push."]}),d.jsx(ne,{surface:"chalkboard",size:"small",icon:d.jsx(IS,{size:14}),disabled:i,onClick:o,children:n?"Pushing…":`Push ${e} commit${e===1?"":"s"}`})]}):d.jsxs(d.Fragment,{children:[d.jsx("p",{className:"opacity-50 text-xs m-0",children:"No changed files."}),d.jsxs("div",{className:"flex gap-2 items-center",children:[d.jsx(Ae,{content:t==="clean-on-main"?"Already on clean main":void 0,surface:"chalkboard",children:d.jsx(ne,{surface:"chalkboard",size:"small",icon:d.jsx(Iu,{size:14}),disabled:i||t==="clean-on-main",onClick:a,children:r?"Syncing…":"Sync to main"})}),d.jsx(ne,{surface:"chalkboard",size:"small",icon:d.jsx(AS,{size:14}),disabled:i,onClick:l,children:s?"Pulling…":"Pull"})]})]})},gU=()=>{const e=O(i=>i.gitStatus),t=O(i=>i.gitBranch),n=O(i=>i.gitAhead),r=O(i=>i.gitBranchHygiene),s=_.useMemo(()=>(e==null?void 0:e.map(i=>i.path))??[],[e]);return d.jsxs("div",{className:"flex-none flex flex-col p-6",children:[d.jsxs("div",{className:`${RS} flex items-center gap-2`,children:["Deliver",t&&d.jsx(Te,{surface:"chalkboard",size:"small",children:t})]}),d.jsxs(Ce,{surface:"chalkboard",size:"small",children:[d.jsx(dU,{}),e&&e.length>0?d.jsxs(d.Fragment,{children:[d.jsx(fU,{count:e.length}),d.jsx("div",{className:"flex-shrink-0 flex flex-col gap-3 mt-3",children:r==="stale-merged"?d.jsx(pU,{}):d.jsx(hU,{files:s})})]}):d.jsx("div",{className:"flex-1 min-h-0 flex flex-col items-center justify-center gap-3",children:d.jsx(mU,{gitAhead:n,gitBranchHygiene:r})})]})]})},yU=({open:e,onToggle:t,pinned:n=!1})=>{const r=e||n,s=O(b=>b.loadPlans),i=O(b=>b.status),o=O(b=>b.loadStatus),a=O(b=>b.consistency),l=O(b=>b.loadConsistency),u=O(b=>b.loadGitStatus),c=O(b=>b.agentStatus),f=O(b=>b.loadAgentStatus),h=O(b=>b.loadSuggestions),p=O(b=>b.loadArchivableIdeas),m=Pu(),y=_.useRef({loadPlans:s,loadStatus:o,loadConsistency:l,loadGitStatus:u,loadAgentStatus:f,loadSuggestions:h,loadArchivableIdeas:p});_.useEffect(()=>{y.current={loadPlans:s,loadStatus:o,loadConsistency:l,loadGitStatus:u,loadAgentStatus:f,loadSuggestions:h,loadArchivableIdeas:p}}),_.useEffect(()=>{y.current.loadStatus(),y.current.loadConsistency(),y.current.loadGitStatus(),y.current.loadAgentStatus(),y.current.loadArchivableIdeas()},[]),_.useEffect(()=>{const b=new EventSource("/api/activity/stream"),P={},j=(R,T,I)=>{P[R]&&clearTimeout(P[R]),P[R]=setTimeout(T,I)};return b.onmessage=R=>{const T=JSON.parse(R.data);if(T.type==="status"){j("status",()=>y.current.loadStatus(),80);return}if(T.type==="agent"){j("agent",()=>y.current.loadAgentStatus(),120);return}T.message==="changed"&&j("activity",()=>{y.current.loadPlans(),y.current.loadSuggestions(),y.current.loadStatus(),y.current.loadConsistency(),y.current.loadGitStatus(),y.current.loadAgentStatus(),y.current.loadArchivableIdeas()},250)},()=>{for(const R of Object.values(P))R&&clearTimeout(R);b.close()}},[]);const{qualityStatus:w,testStatus:g,consistencyStatus:x}=_.useMemo(()=>_k(i),[i]),v=a.length>0,k=w==="fail"||g==="fail"||x==="fail"||v,S=c.some(b=>b.status==="running"||b.status==="starting"||b.status==="stopping");return d.jsxs(d.Fragment,{children:[d.jsx(cS,{children:!r&&d.jsx(Ai.div,{initial:m?void 0:{opacity:0,x:20},animate:{opacity:1,x:0},exit:m?void 0:{opacity:0,x:20},transition:{duration:m?0:.2,ease:"easeOut"},className:"fixed right-0 top-[var(--pc-stack-toggle-top,50%)] z-[300] rounded-l-md shadow-[-2px_0_8px_rgba(0,0,0,0.15)] bg-desk-bg bg-chalkboard [background-repeat:repeat,no-repeat] [background-size:200px_200px,auto]",style:{transform:"translateY(-50%)"},children:d.jsx(it,{icon:S?d.jsx(Hr,{size:"small",surface:"chalkboard",label:"Agent running"}):k?d.jsx("span",{"aria-hidden":"true",className:"h-2 w-2 rounded-full bg-chalk-fail-text shadow-[0_0_6px_rgba(214,160,160,0.9)]"}):d.jsx("span",{className:"text-2xs",children:"S"}),surface:"chalkboard",size:"small",label:S?"Open stack panel — agent running":k?"Open stack panel — checks failing":"Open stack panel",onClick:t,className:`w-7 h-[64px] rounded-l-md ${S?"shadow-[inset_0_0_0_1px_rgba(214,196,160,0.6)]":k?"shadow-[inset_0_0_0_1px_rgba(214,160,160,0.6)]":""}`})})}),d.jsxs(Ai.div,{animate:{x:r?0:"100%"},transition:{duration:m?0:.3,ease:[.4,0,.2,1]},className:"fixed inset-y-0 right-0 z-[300] flex w-[min(480px,100vw)] flex-col overflow-hidden border-l-4 border-paper-950/[12%] text-desk-text bg-desk-bg bg-chalkboard [background-repeat:repeat,no-repeat] [background-size:200px_200px,auto]",children:[d.jsxs("div",{className:"flex h-20 shrink-0 items-center justify-between px-6",children:[d.jsx("span",{className:"font-display-luminari text-base font-bold text-desk-chalk",children:"Stack"}),!n&&d.jsx(it,{icon:d.jsx("span",{className:"text-sm leading-none",children:"×"}),surface:"chalkboard",size:"small",label:"Close stack panel",onClick:t,className:"h-7 w-7 border border-desk-border"})]}),d.jsx(b0,{surface:"chalkboard"}),d.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[d.jsx(nU,{}),d.jsx(b0,{surface:"chalkboard"}),d.jsx(gU,{})]})]})]})},xU=e=>e.replace(/^@[^/]+\//,"").replace(/[-_]/g," ").replace(/\b\w/g,t=>t.toUpperCase()),vU=()=>{const[e,t]=_.useState(null),[n,r]=_.useState(null),[s,i]=_.useState(!0);return _.useEffect(()=>{let o=!1;return i(!0),Promise.all([FA().then(a=>{!o&&a&&t(xU(a))}),OA().then(a=>{o||r(a)})]).finally(()=>{o||i(!1)}),()=>{o=!0}},[]),{projectName:e,iconDataUri:n,loading:s}},wU=["repo-docs"],bU=["subjects","setup","merge-policy"];function eg(){const{planId:e}=Oi({strict:!1});return typeof e=="string"?decodeURIComponent(e):null}function kU(){const{ideaId:e}=Oi({strict:!1});return typeof e=="string"?decodeURIComponent(e):null}function _U(){const{section:e}=Oi({strict:!1});return wU.includes(e)?e:null}function I9(){const{section:e}=Oi({strict:!1});return bU.includes(e)?e:null}function A9(){const e=_U(),t=O(r=>r.activeDocTitle),n=O(r=>r.repoDocs);return e??(t&&n.some(r=>r.name===t)?"repo-docs":null)}const SU=250;function DS(e,t,n={}){const{debounceMs:r=SU,...s}=n,[i,o]=_.useState(e);_.useEffect(()=>{const u=setTimeout(()=>o(e),r);return()=>clearTimeout(u)},[e,r]);const{threshold:a,limit:l}=s;return _.useMemo(()=>zM(i,t,{threshold:a,limit:l}),[i,t,a,l])}const OS=()=>{const[e,t]=_.useState([]),[n,r]=_.useState(!0),[s,i]=_.useState(!0);return _.useEffect(()=>{let o=!1;return uk().then(a=>{o||(t((a==null?void 0:a.subjects)??[]),i(a!==null),r(!1))}),()=>{o=!0}},[]),{subjects:e,loading:n,available:s}},CU=({size:e="md"})=>{const{projectName:t,iconDataUri:n,loading:r}=vU();return d.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[n?d.jsx("img",{src:n,alt:"",className:`object-contain shrink-0 ${e==="sm"?"w-[18px] h-[18px]":"w-[20px] h-[20px]"}`}):d.jsx(c6,{icon:d.jsx(d$,{}),size:"small"}),d.jsx("span",{className:`font-display-luminari font-semibold whitespace-nowrap overflow-hidden text-ellipsis min-w-0 ${e==="sm"?"text-sm":"text-md"}`,children:r?"Loading…":t??"Paper Camp"})]})},PU=()=>{const[e,t]=_.useState(null);return _.useEffect(()=>{},[]),e?d.jsxs("div",{role:"alert",className:"bg-watercolor-rose-dark text-desk-text py-2 px-4 text-2xs font-mono shrink-0",children:["Server failed to reload — restart `pnpm dev` to pick up the change. ",e]}):null};function FS(e,t=0){return e?{duration:0,ease:"easeOut"}:{duration:.18,ease:"easeOut",delay:t}}function zS(e,t={y:8}){return{initial:e?void 0:{opacity:0,...t},animate:{opacity:1,x:0,y:0}}}const jU=({routeKey:e,children:t,mobileOpen:n,onMobileClose:r})=>{const s=Pu(),i=_.useRef(null);return _.useEffect(()=>{if(!n)return;const o=a=>{a.key==="Escape"&&r()};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[n,r]),_.useEffect(()=>{var a;if(!n)return;const o=document.activeElement;return(a=i.current)==null||a.focus(),()=>{var l;return(l=o==null?void 0:o.focus)==null?void 0:l.call(o)}},[n]),d.jsxs(d.Fragment,{children:[n&&d.jsx("button",{type:"button",className:"lg:hidden fixed inset-0 z-[290] cursor-default border-none p-0 bg-ink-900/[40%] backdrop-blur-sm",onClick:r,"aria-label":"Close sidebar",tabIndex:-1}),d.jsx("aside",{ref:i,role:n?"dialog":void 0,"aria-modal":n||void 0,"aria-label":"Sidebar navigation",tabIndex:-1,className:`fixed inset-y-0 left-0 z-[300] w-[224px] shrink-0 flex flex-col overflow-hidden transition-transform duration-300 ease-out lg:sticky lg:inset-auto lg:top-0 lg:z-auto lg:translate-x-0 h-[var(--pc-sidebar-h,100%)] ${n?"translate-x-0":"-translate-x-full"} ${n?"bg-[var(--pui-bg-base)] shadow-[2px_0_12px_rgba(0,0,0,0.15)]":"bg-transparent"}`,children:d.jsx("div",{className:"flex-1 overflow-y-auto pt-5 relative",children:d.jsx(Ai.div,{...zS(s,{x:-8}),transition:FS(s,.08),children:t},e)})})]})},EU={...Ca("kraft"),display:"flex",alignItems:"center",gap:"0.75rem",height:"2rem",paddingLeft:"1rem",paddingRight:"1rem",borderBottom:"1px solid rgba(0, 0, 0, 0.08)",fontSize:"0.75rem",flexShrink:0,boxSizing:"border-box",overflowX:"auto",overflowY:"hidden",whiteSpace:"nowrap"},TU={display:"flex",alignItems:"center",gap:"0.75rem",flexShrink:0},RU={display:"flex",alignItems:"center",gap:"0.25rem"},NU={opacity:.5},IU={color:"var(--pui-text-primary)"},S0={opacity:.6},AU={flex:1},MU={display:"flex",alignItems:"center",gap:"0.5rem",flexShrink:0},_l={fontSize:"0.75rem"},C0={background:"none",backgroundColor:"transparent",border:"none",padding:0,cursor:"pointer"},LU=({gitBranch:e,gitAhead:t,changedFileCount:n,agentActive:r,activeTaskStatus:s,agentNotSignedIn:i,capabilityGapCount:o,gitBranchHygiene:a,commitInFlight:l,gitActionBusy:u,pushing:c,syncing:f,pulling:h,onSync:p,onPush:m,onPull:y,onQuickCommit:w,onOpenSetup:g})=>d.jsxs("div",{style:EU,children:[d.jsxs("div",{style:TU,children:[d.jsxs("span",{style:RU,children:[d.jsx("span",{style:NU,children:"⌥"}),d.jsx("code",{style:IU,children:e??"no branch"})]}),t>0&&d.jsxs("span",{style:S0,children:["↑",t]}),d.jsx("span",{style:S0,children:n>0?`${n} changed`:"clean"}),r&&d.jsx(Hr,{size:"small",label:`Agent ${s}…`}),i&&d.jsx(Ae,{content:"Sign in from Settings → Connections so agent tasks can run",children:d.jsx("button",{type:"button",onClick:g,style:C0,children:d.jsx(Te,{size:"small",variant:"warning",children:"Agent not signed in"})})}),o>0&&d.jsx(Ae,{content:"Some features are disabled — open Setup to fix",children:d.jsx("button",{type:"button",onClick:g,style:C0,children:d.jsxs(Te,{size:"small",variant:"warning",children:["Setup (",o,")"]})})})]}),d.jsx("div",{style:AU}),d.jsxs("div",{style:MU,children:[d.jsx(Ae,{content:a==="clean-on-main"?"Already on clean main":"Sync to main",children:d.jsx(ne,{variant:"ghost",size:"small",icon:d.jsx(Iu,{}),style:_l,disabled:u||a==="clean-on-main",onClick:p,children:f?"Syncing…":"Sync to main"})}),d.jsx(Ae,{content:"Push commits to origin",children:d.jsx(ne,{variant:"ghost",size:"small",icon:d.jsx(IS,{}),style:_l,disabled:u||t===0,onClick:m,children:c?"Pushing…":t>0?`Push (${t})`:"Push"})}),d.jsx(Ae,{content:"Fast-forward the current branch from origin",children:d.jsx(ne,{variant:"ghost",size:"small",icon:d.jsx(AS,{}),style:_l,disabled:u,onClick:y,children:h?"Pulling…":"Pull"})}),d.jsx(Ae,{content:"Commit all changes with an auto-suggested message",children:d.jsx(ne,{variant:"ghost",size:"small",icon:d.jsx(aU,{}),style:_l,disabled:l||n===0,onClick:w,children:l?"Committing…":n>0?`Commit (${n})`:"Commit"})})]})]}),DU=()=>{const e=O(P=>P.agentStatus),t=O(P=>P.gitStatus),n=O(P=>P.gitBranch),r=O(P=>P.gitAhead),s=O(P=>P.gitBranchHygiene),i=O(P=>P.quickCommit),o=O(P=>P.commitInFlight),a=O(iL),l=O(oL),{pushing:u,syncing:c,pulling:f,gitActionBusy:h,handlePush:p,handleSync:m,handlePull:y}=Nu(),{toast:w}=We(),g=Bt(),x=e.find(P=>P.status==="running"||P.status==="starting"||P.status==="stopping"),v=x!==void 0,k=(t==null?void 0:t.length)??0,S=async()=>{if(o||k===0)return;const P=await i();P.ok?w({title:"Committed",description:P.warning??P.title,variant:P.warning?"warning":"success"}):w({title:"Commit failed",description:P.error,variant:"error"})},b=()=>g({to:"/settings/$section",params:{section:"setup"}});return d.jsx(LU,{gitBranch:n,gitAhead:r,changedFileCount:k,agentActive:v,activeTaskStatus:x==null?void 0:x.status,agentNotSignedIn:l,capabilityGapCount:a,gitBranchHygiene:s,commitInFlight:o,gitActionBusy:h,pushing:u,syncing:c,pulling:f,onSync:m,onPush:p,onPull:y,onQuickCommit:S,onOpenSetup:b})},OU=({children:e})=>d.jsx("h1",{className:"text-4xl font-display-luminari font-semibold text-ink-900 mb-6 leading-[1.1]",children:e}),FU=3*6e4,zU=(e,t)=>{const n=O(o=>o.loadPlans),r=e.thread??[],s=r[r.length-1],i=e.id;_.useEffect(()=>{if(!i||!s||s.kind!=="chat")return;const o=setTimeout(()=>{XA(i).then(a=>{if(!a.skipped)return n()}).catch(()=>{})},FU);return()=>clearTimeout(o)},[t,i,s,n])},Ra=()=>{const e=O(i=>i.loadPlans),{toast:t}=We(),[n,r]=_.useState(!1);return{patch:async(i,o,a)=>{r(!0);try{return await yM(i,o),await e(),!0}catch(l){return t({title:(a==null?void 0:a.errorTitle)??"Update failed",description:l.message,variant:"error"}),!1}finally{r(!1)}},updating:n}},BU=e=>{const t=O(a=>a.loadPlans),{toast:n}=We(),[r,s]=_.useState(null);return{promotingIndex:r,promoteToDurable:async(a,l)=>{if(!(!e.id||r!==null)){s(a);try{await Ix(e.id,a,l),await t()}catch(u){n({title:"Promote failed",description:Ue(u.message),variant:"error"})}finally{s(null)}}},promoteToIdea:async(a,l)=>{if(!e.id||r!==null)return!1;s(a);try{const u=await fk(l);return await Ix(e.id,a,"log",`Captured as ${u}: ${l.title}`).catch(()=>{}),await t(),!0}catch(u){return n({title:"Promote failed",description:Ue(u.message),variant:"error"}),!1}finally{s(null)}}}},BS=(e,{reload:t,notify:n})=>{const[r,s]=_.useState(!1),[i,o]=_.useState(!1),[a,l]=_.useState(null);return _.useEffect(()=>{l(null)},[e.id]),{sending:r,send:async f=>{if(!e.id)return!1;s(!0),l(null);try{const h={route:window.location.pathname,focusedIdeaId:e.id,viewport:{width:window.innerWidth,height:window.innerHeight}},{error:p,undo:m}=await YA(e.id,f,h);return await t(),m&&l(m),p&&n({title:"Agent did not reply",description:Ue(p),variant:"error"}),!0}catch(h){return n({title:"Message failed to send",description:Ue(h.message),variant:"error"}),!1}finally{s(!1)}},undo:a,undoing:i,undoEdit:async()=>{if(!(!e.id||!a)){o(!0);try{const{error:f}=await JA(e.id,a.commitSha);if(f){n({title:"Undo failed",description:Ue(f),variant:"error"});return}l(null),await t()}catch(f){n({title:"Undo failed",description:Ue(f.message),variant:"error"})}finally{o(!1)}}}}},$U=async e=>{const t=await fetch(`/api/trail?id=${encodeURIComponent(e)}`);if(!t.ok)throw new Error("Failed to load the provenance trail");return t.json()},VU=e=>{const[t,n]=_.useState(null);return _.useEffect(()=>{if(n(null),!e)return;let r=!1;return $U(e).then(s=>{r||n(s)}).catch(()=>{}),()=>{r=!0}},[e]),t};function $S(){const[e,t]=_.useState("idle"),[n,r]=_.useState(null),s=_.useRef(null),i=_.useCallback(async a=>{s.current&&clearTimeout(s.current),t("loading"),r(null);try{await a(),t("success"),s.current=setTimeout(()=>{t("idle")},2e3)}catch(l){t("error"),r(l.message),s.current=setTimeout(()=>{t("idle"),r(null)},4e3)}},[]),o=_.useCallback(()=>{s.current&&clearTimeout(s.current),t("idle"),r(null)},[]);return{state:e,errorMessage:n,run:i,reset:o,loading:e==="loading",success:e==="success"}}const tg="Keep phases short: 3-7 phases, each a one-line imperative title. Add a description only when the phase isn't self-explanatory, and keep it to one sentence. Never restate the idea's body and never summarise the work you did.";function UU(e){const t=e.phases.map((s,i)=>`${i+1}. [${s.done?"x":" "}] ${s.text}`).join(`
|
|
82
|
-
`),n=e.log&&e.log.length>0?e.log.map(s=>`- ${s.date}: ${s.text}`).join(`
|
|
83
|
-
`):"(none)",r=e.clarifications&&e.clarifications.length>0?e.clarifications.map(s=>`- ${s.date}: ${s.text}`).join(`
|
|
84
|
-
`):"(none)";return`You are auditing the plan "${e.title}" (${e.id??"no id"}) for missing phases. The plan is a single file at papercamp/ideas/${e.id??"<ID>"}.md — if it is not there, it is archived at papercamp/ideas/archive/${e.id??"<ID>"}.md. Edit only that file.
|
|
85
|
-
|
|
86
|
-
Plan body: ${e.body}
|
|
87
|
-
|
|
88
|
-
Current phases:
|
|
89
|
-
${t}
|
|
90
|
-
|
|
91
|
-
Log entries (issues, bugs, and review notes recorded so far):
|
|
92
|
-
${n}
|
|
93
|
-
|
|
94
|
-
Clarifications (answered scope/design questions):
|
|
95
|
-
${r}
|
|
96
|
-
|
|
97
|
-
${tg}
|
|
98
|
-
|
|
99
|
-
Task:
|
|
100
|
-
1. Read the plan above, then inspect the relevant code in this repo.
|
|
101
|
-
2. Identify work that is clearly required to fulfil this plan but is covered by no existing phase. The Log entries are the best source — they often record bugs or gaps that were never turned into phases.
|
|
102
|
-
3. If you found missing work: append one \`- [ ] <short phase title>\` line per item at the end of the \`### Phases\` list. You may add detail below a checkbox line as continuation lines indented with 6 spaces. Then append exactly one line to the \`### Log\` section, formatted \`- YYYY-MM-DD: <what was found and appended>\`, creating that section after the Phases list if it does not exist.
|
|
103
|
-
4. If nothing is missing: make no edits at all — no Log line, no empty heading, no "nothing found" note. This audit re-runs regularly and must leave no trace when there is nothing to add.
|
|
104
|
-
|
|
105
|
-
Rules:
|
|
106
|
-
- Never modify, reorder, check, uncheck, or delete any existing line, even if it looks stale, wrong, or redundant.
|
|
107
|
-
- Never touch the YAML frontmatter.
|
|
108
|
-
- Append only: new unchecked phases at the end of the list, plus the single Log line.`}function WU(e){const t=e.phases.length>0,n=t?"plan":"idea",r=t?e.phases.map((s,i)=>`${i+1}. [${s.done?"x":" "}] ${s.text}`).join(`
|
|
109
|
-
`):"(none — this is a backlog idea with no phases yet)";return`You are reconciling the ${n} "${e.title}" (${e.id??"no id"}), stored as a single file at papercamp/ideas/${e.id??"<ID>"}.md — if it is not there, it is archived at papercamp/ideas/archive/${e.id??"<ID>"}.md. Edit only that file.
|
|
110
|
-
|
|
111
|
-
${t?"Plan":"Idea"} body: ${e.body}
|
|
112
|
-
|
|
113
|
-
Current phases:
|
|
114
|
-
${r}
|
|
115
|
-
|
|
116
|
-
Task: this ${n} has drifted from the codebase — some ${t?"phase descriptions and body prose":"body prose"} may reference file paths that moved, code symbols that were renamed or removed, or approaches that were superseded during implementation. Find and fix only that drift.
|
|
117
|
-
|
|
118
|
-
1. Read the ${n} above, then inspect the relevant code in this repo to find what has actually changed since the prose was written.
|
|
119
|
-
2. Reword only the sentences or phrases that are now stale: fix references and superseded approaches. Leave everything else byte-identical.
|
|
120
|
-
3. Do not summarize, restructure, or "improve" prose that is still accurate — an unnecessary rewrite is a failure of this task, not a bonus.
|
|
121
|
-
|
|
122
|
-
Hard guardrails, never violate these:
|
|
123
|
-
- Never touch the YAML frontmatter (id, title, kind, status, created, idea, tags, or any other field).
|
|
124
|
-
- Never un-check, check, delete, or reorder any phase line, checked or unchecked.
|
|
125
|
-
- Never add or remove phases.
|
|
126
|
-
- Never touch the Log or Clarifications sections.
|
|
127
|
-
- If nothing is stale, make no edits at all.`}function ng(e,t,n,r){return`You are ${t} the idea ${e.id??"no id"} ("${e.title}"), stored as a single file at papercamp/ideas/${e.id??"<ID>"}.md. Edit only that file, and within it only the \`### Log\` section.
|
|
128
|
-
|
|
129
|
-
${n}
|
|
130
|
-
|
|
131
|
-
${tg}
|
|
132
|
-
|
|
133
|
-
Task:
|
|
134
|
-
1. Explore this codebase and find what is relevant to the idea: the files it would touch, existing helpers or patterns it should build on, and constraints visible in the code.
|
|
135
|
-
2. Write up what you found as a single dated entry — name specific files and symbols, describe a workable approach, and include the architectural context you found. Sharpen the idea's original intent, do not redirect it.
|
|
136
|
-
3. Append exactly one line to the \`### Log\` section, formatted \`- YYYY-MM-DD: <what you found>\`, creating that section at the end of the file if it does not exist. Use today's date, and keep the entry to that single physical line (no literal line breaks).
|
|
137
|
-
|
|
138
|
-
Keep unchanged:
|
|
139
|
-
${r}
|
|
140
|
-
|
|
141
|
-
Append only — never rewrite or delete the idea's existing body or prior Log lines.`}function HU(e){const t=e.log&&e.log.length>0?e.log.map(s=>`- ${s.date}: ${s.text}`).join(`
|
|
142
|
-
`):"(none)",n=`Current idea body, in full (do not modify this):
|
|
143
|
-
${e.body}
|
|
144
|
-
|
|
145
|
-
Prior Log entries:
|
|
146
|
-
${t}`,r=`- the YAML frontmatter (id, title)
|
|
147
|
-
- the \`## ${e.id??"IDEA-N"}: ${e.title}\` heading line and the original body prose beneath it`;return ng(e,"expanding",n,r)}const VS=`- the YAML frontmatter (id, title, status)
|
|
148
|
-
- the original body prose beneath the frontmatter`;function GU(e){const t=`This idea was just promoted from an AI-generated one-liner suggestion — its current body is only that one-liner, with no deeper context yet:
|
|
149
|
-
${e.body}`;return ng(e,"fleshing out",t,VS)}function M9(e,t){const n=`This idea was just promoted from a roadmap item under "${t}" in ROADMAP.md — its current body is only that item's one-line description plus a provenance note, with no deeper context yet:
|
|
150
|
-
${e.body}`;return ng(e,"fleshing out",n,VS)}function KU(e,t){const n=t.filter(s=>s.status!=="done"),r=n.length?n.map(s=>`${s.id??"no id"}: ${s.title} (${s.phases.length} phases)`).join(`
|
|
151
|
-
`):"(no other open plans exist yet)";return`You are drafting a plan for the idea ${e.id??"no id"} ("${e.title}"), stored as a single file at papercamp/ideas/${e.id??"<ID>"}.md. The idea and its plan are ONE file: you draft the plan by editing that existing file in place — never create a new file.
|
|
152
|
-
|
|
153
|
-
Idea body, in full:
|
|
154
|
-
${e.body}
|
|
155
|
-
|
|
156
|
-
## What drafting adds to the file (see papercamp/about.md)
|
|
157
|
-
|
|
158
|
-
The file already has YAML frontmatter (id, title, status, created, …) and the prose body above. Drafting means:
|
|
159
|
-
|
|
160
|
-
1. Add a \`type\` field to the frontmatter: the Conventional Commits type that best fits (\`feat | fix | chore | docs | refactor\` — most are \`feat\`).
|
|
161
|
-
2. Add 1-4 short subsystem \`tags\` to the frontmatter if it has none.
|
|
162
|
-
3. Append a \`### Phases\` checklist at the end of the file (after any \`### Log\` section move it below the phases — Phases, then Log):
|
|
163
|
-
|
|
164
|
-
\`\`\`
|
|
165
|
-
### Phases
|
|
166
|
-
- [ ] Short phase title
|
|
167
|
-
Optional description of the phase, indented with 6 spaces.
|
|
168
|
-
\`\`\`
|
|
169
|
-
|
|
170
|
-
${tg}
|
|
171
|
-
|
|
172
|
-
Hard rules:
|
|
173
|
-
- Never change the \`id\`, \`title\`, \`status\`, or \`created\` fields — \`status\` stays exactly \`idea\`; a human promotes it after reviewing your draft.
|
|
174
|
-
- Never rewrite or delete the existing prose body or \`### Log\` entries — the idea's history stays intact.
|
|
175
|
-
- Phases: actionable steps a future agent or human could pick up one at a time, not one giant phase.
|
|
176
|
-
|
|
177
|
-
## Every other open (non-done) plan, for scope context
|
|
178
|
-
|
|
179
|
-
${r}
|
|
180
|
-
|
|
181
|
-
Use the open entities above only to avoid duplicating in-flight scope and to match phase granularity. Edit only papercamp/ideas/${e.id??"<ID>"}.md — never create, edit, move, or rename any other file.`}function qU(e,t){const n=e.length?e.map(s=>s.status==="done"||s.status==="dropped"?`- ${s.id??"no id"}: ${s.title} (status: ${s.status})`:`### ${s.id??"no id"}: ${s.title}
|
|
182
|
-
${s.body}`).join(`
|
|
183
|
-
|
|
184
|
-
`):"(no ideas yet)",r=t.length?t.map(s=>`- ${s.date}: ${s.title} — ${s.description}`).join(`
|
|
185
|
-
`):"(none yet)";return`You are scanning this repository for ideas worth suggesting, to append to papercamp/suggestions.md — a lightweight holding pen. Edit only that one file.
|
|
186
|
-
|
|
187
|
-
Existing ideas (do not repeat anything already covered here):
|
|
188
|
-
${n}
|
|
189
|
-
|
|
190
|
-
Existing suggestions already in the holding pen (do not repeat these either):
|
|
191
|
-
${r}
|
|
192
|
-
|
|
193
|
-
Task:
|
|
194
|
-
1. Explore this codebase for gaps, rough edges, or "you might want to do X" hunches that aren't already an idea or an existing suggestion above — things like missing error handling, an obvious follow-up to recent work, a TODO left in code, or a UX gap you notice while reading the app.
|
|
195
|
-
2. For each genuinely new one you find (0 to a handful — do not force a quota), append one line to papercamp/suggestions.md formatted exactly \`- YYYY-MM-DD: Title — one-line description\`, using today's date. Keep the title short (a few words, like an idea title) and the description to a single physical line (no literal line breaks).
|
|
196
|
-
3. If you find nothing worth suggesting, make no edits at all — no empty line, no placeholder.
|
|
197
|
-
|
|
198
|
-
Rules:
|
|
199
|
-
- Append only — never modify, reorder, or delete any existing line in suggestions.md.
|
|
200
|
-
- Never create papercamp/ideas/ files or touch ideas/index.md — a suggestion is not an idea until a human promotes it.
|
|
201
|
-
- Never touch any other file in the repo.`}const Au=({idea:e,otherPlans:t})=>{const n=O(f=>f.launchPlanDraft),r=O(Jr),{state:s,errorMessage:i,run:o}=$S(),{toast:a}=We(),l=()=>{const f=e.id;f&&o(async()=>{try{await n(f,KU(e,t))}catch(h){throw a({title:"Draft failed",description:Ue(h.message),variant:"error"}),h}})},u=s==="loading"?"Drafting…":s==="success"?"Draft sent!":s==="error"?"Draft failed":"Draft plan",c=s==="error"?i??"Draft failed":e.id?r?void 0:"No agent CLI found — set up in Settings":"Idea needs an ID before an agent can run";return d.jsx(Ae,{content:c,children:d.jsx(ne,{variant:"ghost",size:"small",onClick:l,disabled:s==="loading"||!e.id||!r,className:s==="error"?"text-watercolor-rose-dark":"text-ink-500",children:u})})},US=({children:e,collapsedLines:t=3,resetKey:n})=>{const r=_.useRef(null),[s,i]=_.useState(!1),[o,a]=_.useState(!1);return _.useLayoutEffect(()=>i(!1),[n]),_.useLayoutEffect(()=>{if(s)return;const l=r.current;if(!l)return;const u=()=>a(l.scrollHeight-l.clientHeight>1);u();const c=new ResizeObserver(u);return c.observe(l),()=>c.disconnect()},[s,n]),d.jsxs("div",{children:[d.jsx("div",{ref:r,className:s?void 0:`line-clamp-[${t}]`,children:e}),o&&d.jsx("button",{type:"button",onClick:()=>i(l=>!l),"aria-expanded":s,className:"self-start bg-none bg-transparent border-none py-1 px-0 [font:inherit] text-xs opacity-60 cursor-pointer underline",children:s?"Show less":"Show more"})]})},QU={review:"review",note:"note",decision:"decision",question:"question",clarification:"clarification"},WS=({messages:e,undo:t,undoing:n,onUndo:r,onPromote:s,promotingIndex:i})=>d.jsx(d.Fragment,{children:e.map((o,a)=>{const l=QU[o.kind],u=o.from==="agent",c=a===e.length-1,f=[{id:"decision",label:"Promote to decision",icon:d.jsx(Jm,{size:16}),onSelect:()=>s==null?void 0:s(a,"decision")},{id:"log",label:"Promote to log",icon:d.jsx(LS,{size:16}),onSelect:()=>s==null?void 0:s(a,"log")},{id:"idea",label:"Promote to idea",icon:d.jsx(SS,{size:16}),onSelect:()=>s==null?void 0:s(a,"idea")}];return d.jsxs("div",{className:`flex flex-col gap-1 ${u?"items-start":"items-end"}`,children:[d.jsx("div",{className:"max-w-[85%]",children:d.jsx(Ce,{size:"small",surface:"paper",texture:u?"kraft":l?"canvas":"parchment",shade:u,accent:!u,accentColor:l?"rose":"blue",children:d.jsx(US,{collapsedLines:o.kind==="chat"?1:3,resetKey:`${o.kind}-${o.date??""}-${a}`,children:o.text})})}),d.jsxs("div",{className:"flex items-center gap-2",children:[u&&d.jsx(Te,{size:"small",fillColor:"rgba(0,0,0,0.06)",children:"agent"}),u&&c&&t&&d.jsx(Ae,{content:"Revert this run's plan edit",children:d.jsx(ne,{size:"small",variant:"ghost",onClick:r,disabled:n,children:n?"Undoing…":"Undo"})}),o.date&&d.jsx("span",{className:"text-sm font-semibold opacity-[0.45]",children:o.date}),l&&d.jsx(Te,{size:"small",fillColor:"rgba(0,0,0,0.06)",children:l}),s&&o.kind==="chat"&&(i===a?d.jsx(Hr,{size:"small",label:"Promoting…"}):d.jsx(TS,{align:"end",trigger:d.jsx(it,{icon:d.jsx(MS,{size:14}),label:"Promote this message",size:"small",variant:"ghost"}),items:f}))]})]},`${o.kind}-${o.date??""}-${a}`)})}),sr=({id:e})=>e?d.jsx(Te,{size:"small",fillColor:"rgba(0,0,0,0.08)",children:e}):null,HS={"in-progress":"#C89A5A",planned:"#6A9B72",idea:"#8A9BAA",review:"#9B7AB5",done:"#8A7A8A",dropped:"#A06060"},rg={idea:"Idea",planned:"Planned","in-progress":"In progress",review:"Review",done:"Done",dropped:"Dropped"},nr={idea:{fill:"rgba(138, 155, 168, 0.25)",text:"#5E7080"},planned:{fill:"rgba(143, 185, 150, 0.25)",text:"#5E8A66"},"in-progress":{fill:"rgba(212, 163, 115, 0.25)",text:"#A67B4F"},review:{fill:"rgba(155, 122, 181, 0.25)",text:"#7B5E9E"},done:{fill:"rgba(168, 155, 168, 0.25)",text:"#6E5E6E"},dropped:{fill:"rgba(201, 139, 139, 0.25)",text:"#6E3A3A"}},GS={open:"Open",done:"Done",dropped:"Dropped"},qc={open:{fill:"rgba(143, 185, 150, 0.25)",text:"#5E8A66"},done:{fill:"rgba(168, 155, 168, 0.25)",text:"#6E5E6E"},dropped:{fill:"rgba(201, 139, 139, 0.25)",text:"#6E3A3A"}},YU={draft:"Draft",open:"Open",closed:"Closed",merged:"Merged"},P0={draft:{fill:"rgba(138, 155, 168, 0.25)",text:"#5E7080"},open:{fill:"rgba(143, 185, 150, 0.25)",text:"#5E8A66"},closed:{fill:"rgba(201, 139, 139, 0.25)",text:"#6E3A3A"},merged:{fill:"rgba(155, 122, 181, 0.25)",text:"#7B5E9E"}},XU={approved:"Approved","changes-requested":"Changes requested","review-required":"Review required"},j0={approved:{fill:"rgba(143, 185, 150, 0.25)",text:"#5E8A66"},"changes-requested":{fill:"rgba(201, 139, 139, 0.25)",text:"#6E3A3A"},"review-required":{fill:"rgba(212, 163, 115, 0.25)",text:"#A67B4F"}},KS=({pr:e})=>d.jsx("a",{href:e.url,target:"_blank",rel:"noreferrer",onClick:t=>t.stopPropagation(),className:"no-underline inline-flex",children:d.jsx(Te,{size:"small",fillColor:P0[e.state].fill,textColor:P0[e.state].text,children:d.jsxs("span",{className:"inline-flex items-center gap-1",children:[d.jsx(lU,{}),"#",e.number," ",YU[e.state]]})})}),qS=({pct:e,color:t,height:n=6})=>d.jsx(IV,{value:e,color:t,height:n}),E0={fill:"rgba(143, 185, 150, 0.25)",text:"#5E8A66"},T0={fill:"rgba(0, 0, 0, 0.05)",text:"rgba(0, 0, 0, 0.35)"},Sl=({reached:e,label:t,tooltip:n,href:r})=>{const s=d.jsx(Te,{size:"small",fillColor:e?E0.fill:T0.fill,textColor:e?E0.text:T0.text,children:t}),i=r?d.jsx("a",{href:r,target:"_blank",rel:"noreferrer",onClick:o=>o.stopPropagation(),className:"no-underline inline-flex",children:s}):s;return n?d.jsx(Ae,{content:n,children:i}):i},lf=()=>d.jsx("span",{className:"opacity-30","aria-hidden":"true",children:"→"}),R0=(e,t)=>`${e} ${t}${e===1?"":"s"}`;function JU(e){const t=e.match(/\(\[([0-9a-f]+)\]\((\S+)\)\)\s*$/);return t?{hash:t[1],url:t[2]}:void 0}const ZU=({trail:e})=>{var o,a;const{taskRuns:t,commits:n,pr:r,releaseLine:s}=e,i=s.data?JU(s.data):void 0;return d.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[d.jsx(Sl,{reached:t.reached,label:t.data?R0(t.data.length,"task run"):"Tasks",tooltip:(o=t.data)==null?void 0:o.map(l=>l.taskKind).join(", ")}),d.jsx(lf,{}),d.jsx(Sl,{reached:n.reached,label:n.data?R0(n.data.length,"commit"):"Commits",tooltip:(a=n.data)==null?void 0:a.join(`
|
|
202
|
-
`)}),d.jsx(lf,{}),r.data?d.jsx(KS,{pr:r.data}):d.jsx(Sl,{reached:!1,label:"PR"}),d.jsx(lf,{}),d.jsx(Sl,{reached:s.reached,label:i?`Released ${i.hash}`:"Release",tooltip:s.data,href:i==null?void 0:i.url})]})},eW=({pr:e})=>{const{reviewDecision:t,unresolvedThreadCount:n,hasNewCommentsSincePush:r}=e;return!t&&!n?null:d.jsxs("span",{className:"inline-flex items-center gap-2",children:[t&&d.jsx(Te,{size:"small",fillColor:j0[t].fill,textColor:j0[t].text,children:XU[t]}),!!n&&d.jsxs(Te,{size:"small",fillColor:nr["in-progress"].fill,textColor:nr["in-progress"].text,children:[n," unaddressed comment",n===1?"":"s",r?" · new":""]})]})},QS=({open:e,onClose:t,onAdd:n,initialContent:r})=>{const[s,i]=_.useState(""),[o,a]=_.useState(""),[l,u]=_.useState(!1),[c,f]=_.useState(!1),[h,p]=_.useState(null),[m,y]=_.useState(null),[w,g]=_.useState(!1),[x,v]=_.useState(null),[k,S]=_.useState(null),b=O(E=>{var D;return((D=E.plans)==null?void 0:D.entries)??[]}),{patch:P}=Ra(),j=Bt(),R=DS(s,b.map(E=>({id:E.id,title:E.title,body:E.body,tags:E.tags,log:E.log})));_.useEffect(()=>{e&&(i(""),a(r??""),u(!1),f(!1),p(null),g(!1),v(null),S(null))},[e,r]);const T=E=>{t(),j({to:"/plans/$planId",params:{planId:encodeURIComponent(E)}})},I=async()=>{const E=`${s.trim()}${o.trim()?`
|
|
203
|
-
|
|
204
|
-
${o.trim()}`:""}`;if(E){g(!0),S(null),v(null);try{const D=b.map(B=>({id:B.id,title:B.title,body:B.body,tags:B.tags}));v(await hk(E,D))}catch(D){S(D.message)}finally{g(!1)}}},A=E=>{const D=b.find(B=>B.id===E);D&&T(D.title)},F=async(E,D,B)=>{y(E);const $={date:new Date().toISOString().slice(0,10),text:s.trim()},C=await P(D,{log:[...B??[],$]},{errorTitle:"Extend failed"});y(null),C&&t()},z=async E=>{if(E.preventDefault(),!(!s.trim()||c)){p(null),f(!0);try{await n({title:s.trim(),content:o.trim()||void 0,kind:l?"note":void 0}),t()}catch(D){p(D.message)}finally{f(!1)}}};return d.jsx(Ea,{open:e,onClose:t,title:"New idea",size:"small",children:d.jsxs("form",{onSubmit:z,className:"flex flex-col gap-4",children:[d.jsx(ja,{label:"Title",value:s,onChange:E=>i(E.target.value),placeholder:"Idea title…",disabled:c,autoFocus:!0,required:!0}),R.length>0&&d.jsxs("div",{className:"flex flex-col gap-2",children:[d.jsx("span",{className:"text-sm opacity-60 font-semibold",children:"Similar ideas"}),R.map(({candidate:E})=>{const D={id:E.id??null,title:E.title,body:E.body,log:E.log},B=b.filter(M=>M.id!==E.id);return d.jsx(Ce,{size:"small",texture:"canvas",children:d.jsxs("div",{className:"flex flex-col gap-2",children:[d.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[d.jsx(sr,{id:E.id}),d.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:E.title})]}),d.jsxs("div",{className:"flex justify-end gap-2",children:[d.jsx(ne,{type:"button",variant:"ghost",size:"small",onClick:()=>T(E.title),children:"Open it"}),d.jsx(ne,{type:"button",variant:"ghost",size:"small",disabled:!E.id||!s.trim()||m!==null,onClick:()=>E.id&&F(E.id,E.title,E.log),children:m===E.id?"Extending…":"Extend it instead"}),d.jsx(Au,{idea:D,otherPlans:B})]})]})},E.id??E.title)})]}),d.jsxs("div",{className:"flex flex-col gap-2",children:[d.jsx("div",{children:d.jsx(ne,{type:"button",variant:"ghost",size:"small",disabled:!s.trim()||w,onClick:I,children:w?"Checking overlap…":"Check overlap"})}),k&&d.jsx("p",{className:"m-0 text-watercolor-rose-dark text-sm",children:k}),x&&d.jsx(Ce,{size:"small",texture:"canvas",children:d.jsxs("div",{className:"flex flex-col gap-2",children:[d.jsx("span",{className:"font-semibold",children:x.verdict==="new"?"Looks genuinely new":x.verdict==="extend"?`Extends ${x.targetId??"an existing idea"}`:`Belongs inside ${x.targetId??"an existing idea"}`}),d.jsx("span",{className:"text-sm opacity-80",children:x.reasoning}),x.targetId&&d.jsx("div",{className:"flex justify-end",children:d.jsx(ne,{type:"button",variant:"ghost",size:"small",onClick:()=>A(x.targetId),children:"Open it"})})]})})]}),d.jsx(Ta,{label:"Description",value:o,onChange:E=>a(E.target.value),placeholder:"Optional details…",disabled:c,rows:4}),d.jsx(R6,{label:"Just a note (no plan needed)",checked:l,onChange:E=>u(E.target.checked),disabled:c}),h&&d.jsx("p",{className:"m-0 text-watercolor-rose-dark text-sm",children:h}),d.jsxs("div",{className:"flex justify-end gap-2",children:[d.jsx(ne,{type:"button",variant:"ghost",onClick:t,disabled:c,children:"Cancel"}),d.jsx(ne,{type:"submit",variant:"primary",disabled:!s.trim()||c,children:"Add"})]})]})})},tW=({suggestion:e,onClose:t})=>{const n=O(c=>c.promoteSuggestion),r=O(c=>c.launchIdeaExtend),[s,i]=_.useState(!1),[o,a]=_.useState(null),{toast:l}=We();_.useEffect(()=>{e&&(i(!1),a(null))},[e]);const u=async()=>{if(e){i(!0),a(null);try{const c=await n(e),f=O.getState().ideaEntries.find(h=>h.id===c);if(f)try{await r(c,GU(f))}catch(h){l({title:"Idea created, but the refine agent failed to launch",description:Ue(h.message),variant:"error"})}t()}catch(c){a(c.message)}finally{i(!1)}}};return d.jsx(Ea,{open:e!==null,onClose:t,title:(e==null?void 0:e.title)??"",size:"small",children:d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsx("p",{className:"m-0 opacity-80",children:e==null?void 0:e.description}),o&&d.jsx("p",{className:"m-0 text-watercolor-rose-dark text-sm",children:o}),d.jsxs("div",{className:"flex justify-end gap-2",children:[d.jsx(ne,{type:"button",variant:"ghost",onClick:t,disabled:s,children:"Cancel"}),d.jsx(ne,{type:"button",variant:"primary",onClick:u,disabled:s,children:s?"Moving…":"Move to ideas"})]})]})})},cf=({tokens:e})=>d.jsx(d.Fragment,{children:e.map((t,n)=>{if(t.type==="same")return d.jsx("span",{children:t.text},`${t.type}-${n}`);const r=t.type==="added";return d.jsx("span",{className:r?"bg-watercolor-green/[30%] text-watercolor-green-dark no-underline":"bg-watercolor-rose/[30%] text-watercolor-rose-dark line-through",children:t.text},`${t.type}-${n}`)})}),N0=e=>d.jsx("h4",{className:"font-display-luminari text-xs font-semibold mb-2 opacity-[0.65]",children:e}),nW=({plan:e,before:t,onApprove:n,onDiscard:r,queuePosition:s})=>{const[i,o]=_.useState(!1),[a,l]=_.useState(!1),u=e.body!==t.body,c=e.phases.map((m,y)=>({phase:m,before:t.phases[y],index:y})).filter(({phase:m,before:y})=>y!==void 0&&(m.text!==y.text||(m.description??"")!==(y.description??""))),f=i||a,h=async()=>{if(!f){o(!0);try{await r()}finally{o(!1)}}},p=async()=>{l(!0);try{await n()}finally{l(!1)}};return d.jsx(Ea,{open:!0,title:s?`Review reconcile changes (${s.index} of ${s.total})`:"Review reconcile changes",size:"large",onClose:f?()=>{}:h,children:d.jsxs("div",{className:"flex flex-col gap-5",children:[d.jsxs("p",{className:"text-sm m-0 opacity-70",children:['The reconcile agent proposed the rewrite below for "',e.title,'". Approve to keep it, or discard to revert to the prior wording.']}),!u&&c.length===0&&d.jsx("p",{className:"text-sm m-0 opacity-60",children:"No wording changed."}),u&&d.jsxs("div",{children:[N0("Body"),d.jsx("p",{className:"text-base m-0 leading-normal",children:d.jsx(cf,{tokens:Rd(t.body,e.body)})})]}),c.length>0&&d.jsxs("div",{children:[N0("Phases"),d.jsx("div",{className:"flex flex-col gap-3",children:c.map(({phase:m,before:y,index:w})=>d.jsxs("div",{className:"text-sm leading-normal",children:[d.jsx(cf,{tokens:Rd(y.text,m.text)}),(m.description||y.description)&&d.jsx("div",{className:"opacity-[0.85] mt-1",children:d.jsx(cf,{tokens:Rd(y.description??"",m.description??"")})})]},w))})]}),d.jsxs("div",{className:"flex justify-end gap-2",children:[d.jsx(ne,{variant:"danger",size:"small",onClick:h,disabled:f,children:"Discard"}),d.jsx(ne,{variant:"primary",size:"small",onClick:p,disabled:f,children:"Approve"})]})]})})},rW=()=>{const e=O(c=>c.archivableIdeas),t=O(c=>c.archiveIdeas),[n,r]=_.useState(null),[s,i]=_.useState(!1),{toast:o}=We(),a=_.useCallback(async c=>{try{await t(c)}catch(f){o({title:"Archive failed",description:f.message,variant:"error"})}},[t,o]),l=_.useCallback(async c=>{r(c.id);try{await a([c.id])}finally{r(null)}},[a]),u=_.useCallback(async()=>{i(!0);try{await a(e.map(c=>c.id))}finally{i(!1)}},[a,e]);return e.length===0?null:d.jsxs("div",{className:"mt-5",children:[d.jsxs("div",{className:"flex items-center justify-between gap-2 mb-2",children:[d.jsxs("h2",{className:"text-sm m-0 opacity-60",children:["Ready to archive (",e.length,")"]}),d.jsx(ne,{variant:"ghost",size:"small",disabled:s||n!==null,onClick:u,children:s?"Archiving…":"Archive all"})]}),d.jsx("div",{className:"flex flex-col gap-1",children:e.map(c=>d.jsx("div",{className:"rounded-[10px]",children:d.jsx(Ce,{size:"small",texture:"canvas",className:"plan-row-card",children:d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(sr,{id:c.id}),d.jsx("span",{className:"flex-1 min-w-0 font-semibold overflow-hidden text-ellipsis whitespace-nowrap",children:c.title}),d.jsx(it,{icon:d.jsx("span",{children:"→"}),variant:"ghost",size:"small",label:`Archive ${c.title}`,disabled:n===c.id||s,onClick:()=>l(c),className:"w-[28px] h-[28px]"})]})})},c.id))})]})},sW="font-display-luminari font-semibold text-[1.75rem] leading-[1.2]",iW=({onAdd:e,disabled:t})=>{const[n,r]=_.useState(!1),[s,i]=_.useState(""),[o,a]=_.useState(null),[l,u]=_.useState(!1),c=()=>{r(!1),i(""),a(null)},f=async()=>{let h;try{h=VM(s)}catch(p){a(p instanceof Error?p.message:"Could not parse findings");return}u(!0),a(null);try{await e(h),c()}finally{u(!1)}};return d.jsxs(d.Fragment,{children:[d.jsx(Ae,{content:"Add code-review findings as phases",children:d.jsx(it,{variant:"ghost",size:"small",onClick:()=>r(!0),disabled:t,"aria-label":"Add code-review findings as phases",icon:d.jsx(f$,{size:16})})}),d.jsx(Ea,{open:n,onClose:c,title:"Add code-review findings",size:"small",children:d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsxs("p",{className:"text-sm m-0 opacity-70",children:["Paste the JSON findings from a ",d.jsx("code",{children:"/code-review"})," run. Each finding becomes a new, unchecked phase on this plan."]}),d.jsx(Ta,{value:s,onChange:h=>i(h.target.value),placeholder:'[{ "description": "...", "file": "src/foo.ts", "line_start": 12, "failure_scenario": "..." }]',rows:10,disabled:l}),o&&d.jsxs(jS,{variant:"warning",children:["Could not add phases — ",o]}),d.jsxs("div",{className:"flex justify-end gap-2",children:[d.jsx(ne,{type:"button",variant:"ghost",onClick:c,disabled:l,children:"Cancel"}),d.jsx(ne,{type:"button",variant:"primary",onClick:f,disabled:l||!s.trim(),children:"Add phases"})]})]})})]})},oW=PM.map(e=>({value:e,label:e})),aW=({open:e,onClose:t,onAdd:n})=>{const[r,s]=_.useState(""),[i,o]=_.useState(""),[a,l]=_.useState("feat"),[u,c]=_.useState(!1),[f,h]=_.useState(null),[p,m]=_.useState(null),[y,w]=_.useState(!1),[g,x]=_.useState(null),[v,k]=_.useState(null),S=O(E=>{var D;return((D=E.plans)==null?void 0:D.entries)??[]}),{patch:b}=Ra(),P=Bt(),{toast:j}=We(),R=DS(r,S.map(E=>({id:E.id,title:E.title,body:E.body,tags:E.tags,log:E.log})));_.useEffect(()=>{e&&(s(""),o(""),l("feat"),c(!1),h(null),w(!1),x(null),k(null))},[e]),_.useEffect(()=>{x(null),k(null)},[r,i]);const T=E=>{t(),P({to:"/plans/$planId",params:{planId:encodeURIComponent(E)}})},I=async()=>{const E=`${r.trim()}${i.trim()?`
|
|
205
|
-
|
|
206
|
-
${i.trim()}`:""}`;if(E){w(!0),k(null),x(null);try{const D=S.map(B=>({id:B.id,title:B.title,body:B.body,tags:B.tags}));x(await hk(E,D))}catch(D){k(D.message)}finally{w(!1)}}},A=E=>{const D=S.find(B=>B.id===E);D?T(D.title):j({title:"Plan not found",description:`No plan with id ${E}`,variant:"error"})},F=async(E,D,B)=>{m(E);const $={date:new Date().toISOString().slice(0,10),text:r.trim()},C=await b(D,{log:[...B??[],$]},{errorTitle:"Extend failed"});m(null),C&&t()},z=async E=>{if(E.preventDefault(),!(!r.trim()||u)){h(null),c(!0);try{await n({title:r.trim(),content:i.trim()||void 0,kind:a}),t()}catch(D){h(D.message)}finally{c(!1)}}};return d.jsx(Ea,{open:e,onClose:t,title:"Quick plan",size:"small",children:d.jsxs("form",{onSubmit:z,className:"flex flex-col gap-4",children:[d.jsx(ja,{label:"Title",value:r,onChange:E=>s(E.target.value),placeholder:"Backlog item title…",disabled:u,autoFocus:!0,required:!0}),R.length>0&&d.jsxs("div",{className:"flex flex-col gap-2",children:[d.jsx("span",{className:"text-sm opacity-60 font-semibold",children:"Similar ideas"}),R.map(({candidate:E})=>{const D={id:E.id??null,title:E.title,body:E.body,log:E.log},B=S.filter(M=>M.id!==E.id);return d.jsx(Ce,{size:"small",texture:"canvas",children:d.jsxs("div",{className:"flex flex-col gap-2",children:[d.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[d.jsx(sr,{id:E.id}),d.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:E.title})]}),d.jsxs("div",{className:"flex justify-end gap-2",children:[d.jsx(ne,{type:"button",variant:"ghost",size:"small",onClick:()=>T(E.title),children:"Open it"}),d.jsx(ne,{type:"button",variant:"ghost",size:"small",disabled:!E.id||!r.trim()||p!==null,onClick:()=>E.id&&F(E.id,E.title,E.log),children:p===E.id?"Extending…":"Extend it instead"}),d.jsx(Au,{idea:D,otherPlans:B})]})]})},E.id??E.title)})]}),d.jsxs("div",{className:"flex flex-col gap-2",children:[d.jsx("div",{children:d.jsx(ne,{type:"button",variant:"ghost",size:"small",disabled:!r.trim()||y,onClick:I,children:y?"Checking overlap…":"Check overlap"})}),v&&d.jsx("p",{className:"m-0 text-watercolor-rose-dark text-sm",children:v}),g&&d.jsx(Ce,{size:"small",texture:"canvas",children:d.jsxs("div",{className:"flex flex-col gap-2",children:[d.jsx("span",{className:"font-semibold",children:g.verdict==="new"?"Looks genuinely new":g.verdict==="extend"?`Extends ${g.targetId??"an existing idea"}`:`Belongs inside ${g.targetId??"an existing idea"}`}),d.jsx("span",{className:"text-sm opacity-80",children:g.reasoning}),g.targetId&&d.jsx("div",{className:"flex justify-end",children:d.jsx(ne,{type:"button",variant:"ghost",size:"small",onClick:()=>A(g.targetId),children:"Open it"})})]})})]}),d.jsx(Yh,{label:"Kind",value:a,onChange:E=>l(E),options:oW,disabled:u}),d.jsx(Ta,{label:"Description",value:i,onChange:E=>o(E.target.value),placeholder:"Optional details…",disabled:u,rows:4}),f&&d.jsx("p",{className:"m-0 text-watercolor-rose-dark text-sm",children:f}),d.jsxs("div",{className:"flex justify-end gap-2",children:[d.jsx(ne,{type:"button",variant:"ghost",onClick:t,disabled:u,children:"Cancel"}),d.jsx(ne,{type:"submit",variant:"primary",disabled:!r.trim()||u,children:"Add"})]})]})})},lW=()=>d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[d.jsx("path",{d:"M10 6h10M10 12h10M10 18h10"}),d.jsx("path",{d:"M3 6l1.5 1.5L7 5M3 12l1.5 1.5L7 11M3 18l1.5 1.5L7 17"})]}),cW=()=>{const e=O(o=>o.loadPlans),t=O(o=>o.gitBranchHygiene),[n,r]=_.useState(!1),s=t==="stale-merged",i=async o=>{await gM(o),await e(),r(!1)};return d.jsxs(d.Fragment,{children:[d.jsx(Ae,{content:s?"Switch to main first":void 0,children:d.jsx(it,{icon:d.jsx(lW,{}),variant:"ghost",size:"small",label:s?"Switch to main first":"Quick plan",disabled:s,onClick:()=>r(!0)})}),d.jsx(aW,{open:n,onClose:()=>r(!1),onAdd:i})]})},uW=({planId:e,phaseIndex:t,disabled:n})=>{const r=O(c=>c.launchAgent),s=O(Jr),{toast:i}=We(),[o,a]=_.useState(!1),l=async c=>{if(c.stopPropagation(),!!e){a(!0);try{await r(e,t)}catch(f){i({title:"Failed to start agent",description:Ue(f.message),variant:"error"})}finally{a(!1)}}},u=e?s?"Start agent on this phase":"No agent CLI found — set up in Settings":"Plan needs an ID before an agent can run";return d.jsx(it,{icon:d.jsx("span",{className:"text-xs leading-none",children:"▶"}),variant:"ghost",size:"small",label:u,onClick:l,disabled:n||o||!e||!s,className:"transition-opacity text-ink-500"})},dW=({plan:e,disabled:t})=>{const n=O(l=>l.launchPlanAudit),r=O(Jr),[s,i]=_.useState(!1),o=async()=>{if(e.id){i(!0);try{await n(e.id,UU(e))}catch(l){alert(l.message)}finally{i(!1)}}},a=e.id?r?void 0:"No agent CLI found — set up in Settings":"Plan needs an ID before an agent can run";return d.jsx(Ae,{content:a,children:d.jsx(ne,{variant:"ghost",size:"small",onClick:o,disabled:t||s||!e.id||!r,children:"Audit"})})},sg=({idea:e,compact:t})=>{const n=O(h=>h.launchIdeaExtend),r=O(Jr),{state:s,errorMessage:i,run:o}=$S(),{toast:a}=We(),l=e.id,u=()=>{l&&o(async()=>{const h=O.getState().ideaEntries.find(p=>p.id===l);if(!h)throw new Error(`Idea ${l} not found`);try{await n(l,HU(h))}catch(p){throw a({title:"Extension failed",description:Ue(p.message),variant:"error"}),p}})},c=s==="loading"?"Extending…":s==="success"?t?"Sent!":"Extension sent!":s==="error"?"Extension failed":t?"Extend":"Extend with AI",f=s==="error"?i??"Extension failed":l?r?void 0:"No agent CLI found — set up in Settings":"Idea needs an ID before an agent can run";return d.jsx(Ae,{content:f,children:d.jsx(ne,{variant:"ghost",size:"small",onClick:u,disabled:s==="loading"||!l||!r,className:s==="error"?"text-watercolor-rose-dark":void 0,children:c})})},fW=({plan:e,disabled:t})=>{const n=O(c=>c.launchFixReview),r=O(Jr),s=O(sL),[i,o]=_.useState(!1),a=async()=>{if(e.id){o(!0);try{await n(e.id)}catch(c){alert(c.message)}finally{o(!1)}}},l=t||i||!e.id||!r||!s,u=e.id?s?r?void 0:"No agent CLI found — set up in Settings":"GitHub CLI needs authentication — set up in Settings":"Plan needs an ID before an agent can run";return d.jsx(Ae,{content:u,children:d.jsx(ui,{size:"small",icon:d.jsx("span",{className:"text-watercolor-amber-dark",children:"⚑"}),onClick:a,disabled:l,className:l?"opacity-50":void 0,children:i?"Starting…":"Fix review comments"})})},hW=()=>{const e=O(s=>s.loadIdeas),[t,n]=_.useState(!1),r=async s=>{await fk(s),await e(),n(!1)};return d.jsxs(d.Fragment,{children:[d.jsx(it,{icon:d.jsx(SS,{size:16}),variant:"ghost",size:"small",label:"New idea",onClick:()=>n(!0)}),d.jsx(QS,{open:t,onClose:()=>n(!1),onAdd:r})]})};async function pW(e){var r;if((r=navigator.clipboard)!=null&&r.writeText)try{return await navigator.clipboard.writeText(e),!0}catch{}const t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select();let n=!1;try{n=document.execCommand("copy")}catch{n=!1}return document.body.removeChild(t),n}const mW=({planTitle:e,planId:t,phaseIndex:n})=>{const[r,s]=_.useState("idle"),i=async o=>{o.stopPropagation();const a=`Start phase ${n+1} of plan "${e}" in papercamp/ideas/${t??"<ID>"}.md`,l=await pW(a);s(l?"copied":"failed"),setTimeout(()=>s("idle"),1500)};return d.jsx(it,{icon:r==="copied"?d.jsx(Jm,{size:16}):r==="failed"?d.jsx(Pa,{size:16}):d.jsx(u$,{size:16}),variant:"ghost",size:"small",label:r==="copied"?"Copied":r==="failed"?"Copy failed — select and copy manually":"Copy phase prompt",onClick:i,className:`transition-opacity ${r==="copied"?"text-state-success":r==="failed"?"text-state-danger":"text-ink-500"}`})},gW=({plan:e,disabled:t})=>{const n=O(l=>l.launchPlanReconcile),r=O(Jr),[s,i]=_.useState(!1),o=async()=>{if(e.id){i(!0);try{await n(e.id,WU(e),{body:e.body,phases:e.phases})}catch(l){alert(l.message)}finally{i(!1)}}},a=e.id?r?void 0:"No agent CLI found — set up in Settings":"Plan needs an ID before an agent can run";return d.jsx(Ae,{content:a,children:d.jsx(ne,{variant:"ghost",size:"small",onClick:o,disabled:t||s||!e.id||!r,children:"Refresh"})})},YS=()=>{const e=O(s=>s.refreshAll),t=O(s=>s.refreshing),{toast:n}=We(),r=async()=>{if(t)return;const s=await e();s.ok?n({title:"Up to date",description:"Plans, ideas, checks and PR review state re-read.",variant:"success"}):n({title:"Couldn't refresh",description:s.error??"The read failed — is the dev server running?",variant:"error"})};return d.jsx(it,{icon:d.jsx("span",{className:`inline-flex${t?" animate-pc-spin motion-reduce:animate-none":""}`,children:d.jsx(iU,{size:16})}),label:t?"Refreshing…":"Refresh data",size:"small",variant:"ghost",disabled:t,onClick:r})},yW=({plan:e,disabled:t})=>{const n=O(u=>u.launchRunAll),r=O(Jr),[s,i]=_.useState(!1),o=async()=>{if(e.id){i(!0);try{await n(e.id)}catch(u){alert(u.message)}finally{i(!1)}}},a=t||s||!e.id||!r,l=e.id?r?void 0:"No agent CLI found — set up in Settings":"Plan needs an ID before an agent can run";return d.jsx(Ae,{content:l,children:d.jsx(ui,{size:"small",icon:d.jsx("span",{className:"text-ink-500",children:"▶"}),onClick:o,disabled:a,className:a?"opacity-50":void 0,children:s?"Starting…":"Run all phases"})})},xW=()=>{const e=O(y=>y.launchSuggestIdeas),t=O(y=>y.launchBatchReconcile),n=O(y=>y.launchPrioritise),r=O(y=>y.ideaEntries),s=O(y=>y.suggestions),i=O(xm),o=O(Jr),{toast:a}=We(),[l,u]=_.useState(null),c=async()=>{u("suggest");try{await e(qU(r,s))}catch(y){a({title:"Failed to launch",description:Ue(y.message),variant:"error"})}finally{u(null)}},f=async()=>{u("actualise");try{await t()}catch(y){a({title:"Failed to launch",description:Ue(y.message),variant:"error"})}finally{u(null)}},h=async()=>{u("prioritise");try{const y=await n();a({title:y.moved.length>0?"Queue reordered":"Already in order",description:y.why||void 0,variant:"success"})}catch(y){a({title:"Failed to prioritise",description:Ue(y.message),variant:"error"})}finally{u(null)}},p=l!==null||i,m=[{id:"suggest-ideas",label:l==="suggest"?"Starting…":"Suggest ideas",icon:d.jsx(NS,{size:16}),disabled:p||!o,onSelect:c},{id:"actualise-all",label:l==="actualise"?"Starting…":"Actualise all",icon:d.jsx(Jm,{size:16}),disabled:p||!o,onSelect:f},{id:"prioritise",label:l==="prioritise"?"Prioritising…":"Prioritise queue",icon:d.jsx(oU,{size:16}),disabled:p||!o,onSelect:h}];return d.jsx(TS,{align:"end",trigger:d.jsx(it,{icon:d.jsx(MS,{size:16}),label:"More actions",size:"small",variant:"ghost"}),items:m})};function vW(e){const t=e==null?void 0:e.match(/^[a-z]+\/([a-z]+-\d+)-/);return t?t[1].toUpperCase():null}const Mu="font-display-luminari text-sm font-semibold opacity-[0.65]",wW=({plan:e,auditRunning:t,agentBusy:n,agentPhaseIndex:r,planTask:s,updating:i,onTogglePhase:o,onToggleFix:a,onAddReviewPhases:l})=>{const u=O(p=>p.launchRunAll),c=e.fixes??[],f=c.some(p=>!p.done),h=[...e.phases.map((p,m)=>({kind:"phase",item:p,index:m})),...c.map((p,m)=>({kind:"fix",item:p,index:m}))];return d.jsxs("div",{className:"mb-8",children:[d.jsxs("div",{className:"flex items-center justify-between gap-3 mb-3 flex-wrap",children:[d.jsx("h3",{className:`${Mu} m-0`,children:"Phases"}),d.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[t&&d.jsx(Hr,{size:"small",label:"Audit running…"}),(e.status==="review"||e.status==="done")&&d.jsx(dW,{plan:e}),e.status!=="done"&&d.jsx(gW,{plan:e}),d.jsx(iW,{onAdd:l,disabled:i}),e.id&&f&&d.jsx(Ae,{content:"Run the open fixes with an agent",children:d.jsx(ne,{size:"small",onClick:()=>e.id&&u(e.id),disabled:n,children:n?"Running…":"Run fixes"})})]})]}),d.jsx(Q$,{data:h,columns:[{key:"checkbox",header:"Status",cell:p=>d.jsx(T4,{checked:p.item.done,onChange:()=>p.kind==="phase"?o(p.index):a(p.index),disabled:i}),width:2},{key:"title",header:"Title",cell:p=>d.jsxs("span",{className:`inline-flex items-center gap-2 ${p.item.done?"line-through opacity-[0.45]":"no-underline"}`,children:[p.item.text,p.kind==="phase"&&p.item.source==="review"&&d.jsx(Te,{size:"small",fillColor:nr.review.fill,textColor:nr.review.text,children:"review"}),p.kind==="fix"&&d.jsx(Te,{size:"small",variant:"warning",children:"fix"})]})},{key:"actions",header:"Actions",align:"end",cell:p=>p.kind==="phase"?d.jsxs("div",{className:"inline-flex gap-2 items-center",children:[d.jsx(mW,{planTitle:e.title,planId:e.id,phaseIndex:p.index}),!p.item.done&&r===p.index?d.jsx(Hr,{size:"small",label:`Agent ${s==null?void 0:s.status}…`}):!p.item.done&&d.jsx(uW,{planId:e.id,phaseIndex:p.index,disabled:n})]}):null,width:7}],expandable:{render:p=>p.item.description||null},showExpandColumn:!1,rowTexture:p=>p.kind==="fix"?"kraft":void 0,rowClassName:p=>p.kind==="phase"&&p.item.source==="review"?"bg-[rgba(155,122,181,0.08)]":void 0,className:"phase-table-phone"})]})},bW=({plan:e,gitBranch:t,onOwnBranch:n,branching:r,onCreateBranch:s})=>{const i=e.status==="planned"||e.status==="in-progress"||e.status==="review";return!i&&!e.pr?null:d.jsxs("div",{className:"flex items-center gap-3 flex-wrap mb-4",children:[i&&!n&&d.jsx(Ce,{size:"small",accent:!0,accentColor:"amber",texture:"kraft",children:d.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[d.jsxs("span",{className:"text-sm",children:["Working branch: ",d.jsx("code",{children:t??"unknown"})," — not this plan's branch."]}),e.id&&d.jsx(Ae,{content:`Creates ${(e.kind??"feat").toLowerCase()}/${e.id.toLowerCase()}-… from main, or switches to it if it already exists`,children:d.jsx(ne,{size:"small",onClick:s,disabled:r,children:r?"Switching…":"Create branch"})})]})}),i&&n&&d.jsxs("span",{className:"text-sm opacity-[0.45]",children:["Working branch: ",d.jsx("code",{children:t})]}),e.pr&&d.jsx(KS,{pr:e.pr}),e.pr&&d.jsx(eW,{pr:e.pr})]})},kW=({progress:e,color:t})=>d.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[d.jsx("div",{className:"flex-1",children:d.jsx(qS,{pct:e.pct,color:t})}),d.jsxs("span",{className:"text-sm opacity-50 flex-shrink-0",children:[e.done,"/",e.total]})]}),_W=({plan:e})=>d.jsx("div",{className:"mb-4",children:d.jsx("div",{className:"opacity-[0.85]",children:e.body&&d.jsx(US,{resetKey:e.id??e.title,children:d.jsx(ak,{children:e.body})})})}),SW=({clarifications:e})=>e.length===0?null:d.jsxs("div",{className:"mb-5",children:[d.jsx("h3",{className:`${Mu} mb-3`,children:"Clarifications"}),d.jsx("div",{className:"flex flex-col gap-2 mb-3",children:e.map((t,n)=>d.jsx("div",{className:"text-sm flex items-start justify-between gap-3 opacity-75",children:d.jsxs("span",{children:[d.jsx("span",{className:"font-semibold mr-2",children:t.date}),t.text]})},`clar-${t.date}-${n}`))})]}),CW=({planId:e})=>{const t=VU(e);return t?d.jsxs("div",{className:"mb-8",children:[d.jsx("h3",{className:`${Mu} mb-3`,children:"History"}),d.jsx(ZU,{trail:t})]}):null},PW=({plan:e,updating:t,onSend:n,undo:r,undoing:s,onUndo:i})=>{var g;const[o,a]=_.useState(""),[l,u]=_.useState(null),c=e.thread??[],{promotingIndex:f,promoteToDurable:h,promoteToIdea:p}=BU(e);zU(e,!0);const m=async()=>{o.trim()&&await n(o.trim())&&a("")},y=(x,v)=>{v==="idea"?u(x):h(x,v)},w=async x=>{l!==null&&await p(l,x)&&u(null)};return d.jsxs("div",{className:"mb-8",children:[d.jsx("h3",{className:`${Mu} mb-3`,children:"Feedback"}),d.jsxs(Ce,{size:"small",accent:!0,accentColor:"slate",texture:"kraft",children:[d.jsx("div",{className:"flex flex-col gap-3 mb-4",children:c.length>0?d.jsx(WS,{messages:c,undo:r,undoing:s,onUndo:i,onPromote:y,promotingIndex:f}):d.jsx("p",{className:"text-sm m-0 text-ink-500",children:"Jot a comment, ask a question, or say what's wrong with this plan."})}),d.jsxs("div",{className:"flex flex-col gap-2",children:[d.jsx(Ta,{value:o,onChange:x=>a(x.target.value),"aria-label":"Feedback message",placeholder:"Write a message…",rows:3,disabled:t}),d.jsxs("div",{className:"flex justify-end items-center gap-3",children:[d.jsx("span",{className:t?"visible":"invisible",children:d.jsx(Hr,{size:"small",label:"Agent replying…"})}),d.jsx(ne,{size:"small",onClick:m,disabled:t||!o.trim(),children:"Send"})]})]})]}),d.jsx(QS,{open:l!==null,onClose:()=>u(null),onAdd:w,initialContent:l!==null?(g=c[l])==null?void 0:g.text:void 0})]})},jW=({plan:e})=>{const t=O(E=>E.plans),n=O(E=>E.gitBranch),r=O(E=>E.loadGitStatus),s=O(E=>E.loadPlans),{toast:i}=We(),{patch:o,updating:a}=Ra(),[l,u]=_.useState(!1),c=O(E=>E.agentStatus),f=O(xm),h=O(E=>E.detailView),p=pm(e.id,c),m=p?p.phaseIndex:null,y=(p==null?void 0:p.taskKind)==="audit",w=wM(e),g=e.phases.length>0,x=h==="feedback",v={id:e.id??null,title:e.title,body:e.body,log:e.log},k=((t==null?void 0:t.entries)??[]).filter(E=>E.id!==e.id),S=e.id!==void 0&&vW(n)===e.id,b=async()=>{if(e.id){u(!0);try{const E=await YM(e.id);i({title:"Branch ready",description:`Now on ${E}`,variant:"success"}),await r()}catch(E){i({title:"Branch failed",description:Ue(E.message),variant:"error"})}finally{u(!1)}}},P=async E=>{const D=e.phases.map((M,$)=>$===E?{...M,done:!M.done}:M);D.every(M=>M.done)&&e.status==="in-progress"?await o(e.title,{phases:D,status:"review"}):await o(e.title,{phases:D})},j=async E=>{await o(e.title,{phases:[...e.phases,...E]})},R=async E=>{const D=(e.fixes??[]).map((M,$)=>$===E?{...M,done:!M.done}:M);D.every(M=>M.done)&&e.status==="in-progress"?await o(e.title,{fixes:D,status:"review"}):await o(e.title,{fixes:D})},{sending:T,send:I,undo:A,undoing:F,undoEdit:z}=BS(e,{reload:s,notify:i});return d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-baseline justify-between gap-3 mb-3 flex-wrap",children:[d.jsxs("h2",{className:`${sW} m-0 flex items-center gap-3 min-w-0 flex-wrap`,children:[d.jsx(sr,{id:e.id}),e.title]}),d.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[d.jsx("span",{className:"text-sm opacity-[0.45] whitespace-nowrap",children:e.updated?`updated ${Ic(e.updated)}`:`created ${Ic(e.created)}`}),d.jsx(YS,{})]})]}),x?d.jsx(PW,{plan:e,updating:T,onSend:I,undo:A,undoing:F,onUndo:z}):d.jsxs(d.Fragment,{children:[d.jsx(bW,{plan:e,gitBranch:n,onOwnBranch:S,branching:l,onCreateBranch:b}),w!==null&&d.jsx(kW,{progress:w,color:HS[mm(e,c)]}),d.jsx(_W,{plan:e}),d.jsx(SW,{clarifications:e.clarifications??[]}),!g&&d.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[d.jsx(Au,{idea:v,otherPlans:k}),d.jsx(sg,{idea:v})]}),g&&d.jsx(wW,{plan:e,auditRunning:y,agentBusy:f,agentPhaseIndex:m,planTask:p,updating:a,onTogglePhase:P,onToggleFix:R,onAddReviewPhases:j}),d.jsx(CW,{planId:e.id})]})]})},EW=()=>{const[e,t]=_.useState(new Set);return _.useEffect(()=>{let n=!1;return uM().then(r=>{n||!r||t(new Set(r.horizons.flatMap(s=>s.items.map(i=>i.name))))}).catch(()=>{}),()=>{n=!0}},[]),e},yo="text-sm font-semibold opacity-60 whitespace-nowrap overflow-hidden",ig=({order:e,done:t,running:n,status:r})=>d.jsx("span",{className:"flex-[0_0_36px] flex items-center justify-center",children:n?d.jsx(Hr,{size:"small",label:"Agent running"}):t?d.jsx("span",{"aria-label":"Done",className:"text-watercolor-green-dark text-sm",children:"✓"}):e!==void 0?d.jsx(Te,{size:"small",fillColor:"rgba(0,0,0,0.06)",children:d.jsx("span",{className:"font-handwritten text-xs leading-none",children:e})}):r==="idea"?d.jsx("span",{"aria-label":"Backlog — not planned yet",className:"inline-flex text-ink-300",children:d.jsx(Zm,{size:14})}):null}),Xh="grid grid-cols-[76px_minmax(0,1fr)_84px_96px_112px] gap-2.5 items-center max-lg:grid-cols-[76px_minmax(0,1fr)_96px_112px] max-[480px]:grid-cols-1 max-[480px]:gap-1",XS=({plans:e,activePlanTitle:t,onOpen:n,showHeader:r=!0})=>{const s=Xh,i=O(o=>o.agentStatus);return d.jsxs("div",{className:"flex flex-col gap-1",children:[r&&d.jsxs("div",{className:"flex items-center",children:[d.jsx("span",{className:"flex-[0_0_36px]"}),d.jsx("div",{className:"flex-1 min-w-0",children:d.jsx(Ce,{size:"small",texture:"kraft",className:"plan-row-card",children:d.jsxs("div",{className:s,children:[d.jsx("span",{className:yo,children:"Id"}),d.jsx("span",{className:yo,children:"Title"}),d.jsx("span",{className:`max-lg:hidden ${yo}`,children:"Updated"}),d.jsx("span",{className:yo,children:"Progress"}),d.jsx("span",{className:yo,children:"Status"})]})})})]}),e.map(o=>{var u;const a=gk(o),l=mm(o,i);return d.jsxs("div",{className:"flex items-center",children:[d.jsx(ig,{order:o.order,done:o.status==="done",status:o.status,running:!!pm(o.id,i)}),d.jsx("div",{role:n?"button":void 0,tabIndex:n?0:void 0,onClick:n?()=>n(o.title):void 0,onKeyDown:n?c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),n(o.title))}:void 0,className:`${n?"cursor-pointer":""} rounded-[10px] flex-1 min-w-0 ${o.title===t?"plan-row-highlighted outline outline-2 outline-offset-[-2px] outline-[rgba(200,154,90,0.5)]":""}`,children:d.jsx(Ce,{size:"small",texture:"canvas",className:"plan-row-card",children:d.jsxs("div",{className:s,children:[d.jsx(sr,{id:o.id}),d.jsx("span",{className:"font-semibold overflow-hidden text-ellipsis whitespace-nowrap",children:o.title}),d.jsx("span",{className:"max-lg:hidden text-sm opacity-[0.45] whitespace-nowrap",children:o.updated?Ic(o.updated):Ic(o.created)}),a?d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx("div",{className:"flex-1 min-w-0",children:d.jsx(qS,{pct:a.pct,color:HS[l]})}),d.jsxs("span",{className:"text-sm opacity-50 shrink-0",children:[a.done,"/",a.total]})]}):d.jsx("span",{className:"text-sm opacity-30",children:"—"}),d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx(Te,{size:"small",fillColor:nr[l].fill,textColor:nr[l].text,children:rg[l]}),((u=o.pr)==null?void 0:u.state)==="merged"&&d.jsx(Ae,{content:`Merged in #${o.pr.number}`,children:d.jsx("span",{className:"inline-flex text-[#7B5E9E]",children:d.jsx(Iu,{size:14})})})]})]})})})]},o.title)})]})},TW=5,RW="text-sm font-semibold opacity-60 whitespace-nowrap overflow-hidden",JS="grid grid-cols-[76px_minmax(0,1fr)_84px_96px_112px] gap-2.5 items-center max-lg:grid-cols-[76px_minmax(0,1fr)_96px_112px] max-[480px]:grid-cols-1 max-[480px]:gap-1",I0="font-handwritten text-xs font-semibold opacity-55 leading-none pt-2 pr-1 pb-0 pl-1",A0=`${RW} bg-none bg-transparent border-none p-0 cursor-pointer [font:inherit] text-inherit text-left`,NW=[{key:"id",label:"Id"},{key:"title",label:"Title"},{key:"updated",label:"Updated"},{key:"progress",label:"Progress"},{key:"status",label:"Status"}],ZS="flex items-center gap-2 min-w-0 bg-none bg-transparent border-none p-0 cursor-pointer text-left [font:inherit] text-inherit font-semibold",eC="overflow-hidden text-ellipsis whitespace-nowrap",IW=({rows:e,plans:t,activePlanTitle:n,onOpenPlan:r,onOpenIdea:s})=>{const[i,o]=_.useState(new Set),{subjects:a,loading:l,available:u}=OS(),c=EW(),f=Bt(),h=JS,p=O(b=>b.planFilters.sortKey),m=O(b=>b.planFilters.sortDirection),y=O(b=>b.setPlanSortKey),w=O(b=>b.togglePlanSortDirection),g=b=>{b===p?w():y(b)},x=b=>{o(P=>{const j=new Set(P);return j.has(b)?j.delete(b):j.add(b),j})},v=b=>b.type==="plan"?d.jsx(XS,{plans:[b.plan],activePlanTitle:n,onOpen:r,showHeader:!1},b.plan.title):b.type==="note"?d.jsx(AW,{row:b,onOpen:s},b.idea.title):d.jsx(MW,{row:b,plans:t,activePlanTitle:n,onOpenPlan:r,onOpenIdea:s,expanded:i.has(b.idea.title),onToggleExpanded:()=>x(b.idea.title)},b.idea.title),k=AM(e,l||!u?void 0:a),S=k.length>1;return d.jsxs("div",{className:"flex flex-col gap-1",children:[d.jsxs("div",{className:"flex items-center",children:[d.jsx("span",{role:"columnheader",className:"flex-[0_0_36px] flex justify-center","aria-sort":p==="order"?m==="asc"?"ascending":"descending":void 0,children:d.jsxs("button",{type:"button",className:A0,"aria-label":"Sort by run order",onClick:()=>g("order"),children:["#",p==="order"&&(m==="asc"?"▲":"▼")]})}),d.jsx("div",{className:"flex-1 min-w-0",children:d.jsx(Ce,{size:"small",texture:"kraft",className:"plan-row-card",children:d.jsx("div",{className:h,children:NW.map(({key:b,label:P})=>{const j=b===p;return d.jsx("span",{role:"columnheader",className:b==="updated"?"max-lg:hidden":void 0,"aria-sort":j?m==="asc"?"ascending":"descending":void 0,children:d.jsxs("button",{type:"button",className:A0,onClick:()=>g(b),children:[P,j&&(m==="asc"?" ▲":" ▼")]})},b)})})})})]}),S?k.map(b=>{const P=b.subject;return d.jsxs("div",{className:"flex flex-col gap-1",children:[d.jsx("div",{className:"flex items-baseline gap-2",children:P&&c.has(P)?d.jsx("button",{type:"button",className:`${I0} bg-none bg-transparent border-none cursor-pointer text-left hover:underline`,title:"View in roadmap",onClick:()=>f({to:"/roadmap",search:{item:P}}),children:P}):d.jsx("div",{className:I0,children:P??"No subject"})}),b.rows.map(j=>v(j))]},P??"__no-subject__")}):e.map(b=>v(b))]})},AW=({row:e,onOpen:t})=>{const n=e.idea,r=n.status??"open";return d.jsxs("div",{className:"flex items-center",children:[d.jsx(ig,{order:n.order,done:r==="done",status:r}),d.jsx("div",{role:t?"button":void 0,tabIndex:t?0:void 0,onClick:t?()=>t(n.title):void 0,onKeyDown:t?s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),t(n.title))}:void 0,className:`${t?"cursor-pointer":""} rounded-[10px] flex-1 min-w-0`,children:d.jsx(Ce,{size:"small",texture:"canvas",className:"plan-row-card",children:d.jsxs("div",{className:JS,children:[n.id?d.jsx(sr,{id:n.id}):d.jsx("span",{}),d.jsxs("span",{className:`${ZS} [cursor:inherit]`,children:[d.jsx(LS,{}),d.jsx("span",{className:eC,children:n.title})]}),d.jsx("span",{className:"max-lg:hidden text-sm opacity-[0.45]",children:"—"}),d.jsx("span",{className:"text-sm opacity-30",children:"—"}),d.jsx(Te,{size:"small",fillColor:qc[r].fill,textColor:qc[r].text,children:GS[r]})]})})})]})},MW=({row:e,plans:t,activePlanTitle:n,onOpenPlan:r,onOpenIdea:s,expanded:i,onToggleExpanded:o})=>{const a=e.idea,l=e.children,u=l.filter(p=>p.status==="done"),c=l.filter(p=>p.status!=="done"),f=l.length>TW,h=f&&!i?c:l;return d.jsxs("div",{className:"flex flex-col gap-1",children:[d.jsxs("div",{className:"flex items-center",children:[d.jsx(ig,{order:a.order,done:a.status==="done",status:a.status}),d.jsx("div",{className:"flex-1 min-w-0",children:d.jsx(Ce,{size:"small",texture:"canvas",className:"plan-row-card",children:d.jsxs("div",{className:"grid grid-cols-[76px_minmax(0,1fr)_84px_1fr] gap-2 items-center max-[480px]:grid-cols-1 max-[480px]:gap-1",children:[a.id?d.jsx(sr,{id:a.id}):d.jsx("span",{}),d.jsxs("button",{type:"button",onClick:()=>s==null?void 0:s(a.title),className:ZS,children:[d.jsx(Zm,{}),d.jsx("span",{className:eC,children:a.title})]}),d.jsx("span",{className:"max-lg:hidden text-sm opacity-[0.45]",children:"—"}),d.jsxs("div",{className:"flex items-center justify-end gap-2",children:[d.jsx("span",{className:`text-sm ${l.length>0?"opacity-60":"opacity-30"}`,children:l.length>0?`${u.length}/${l.length} plans done`:"—"}),d.jsx(sg,{idea:a,compact:!0}),d.jsx(Au,{idea:a,otherPlans:t})]})]})})})]}),l.length>0&&d.jsxs("div",{className:"ml-5 pl-3 border-l-2 border-black/[8%] flex flex-col gap-1",children:[d.jsx(XS,{plans:h,activePlanTitle:n,onOpen:r,showHeader:!1}),f&&d.jsx("button",{type:"button",onClick:o,className:"self-start bg-none bg-transparent border-none py-1 px-0 opacity-60 cursor-pointer underline text-xs [font:inherit]",children:i?"Show less":`+${u.length} done`})]})]})},LW=({plans:e,rows:t,activePlanTitle:n,onOpenPlan:r,onOpenIdea:s})=>{const i=_.useRef(null);return _.useEffect(()=>{var a;if(!n)return;const o=(a=i.current)==null?void 0:a.querySelector(".plan-row-highlighted");o==null||o.scrollIntoView({behavior:"smooth",block:"center"})},[n]),d.jsx("div",{ref:i,children:t.length>0?d.jsx(IW,{rows:t,plans:e,activePlanTitle:n,onOpenPlan:r,onOpenIdea:s}):d.jsx("p",{className:"opacity-50 py-6 px-0 text-center",children:"Nothing matches these filters — clear one, or check back once something moves into this status."})})},DW=({idea:e})=>d.jsxs("div",{className:"text-base leading-[1.7] text-ink-900",children:[d.jsxs("h2",{className:"font-display-luminari font-semibold text-[1.75rem] leading-tight mt-0 mr-0 mb-4 ml-0 flex items-center gap-3 flex-wrap",children:[d.jsx(sr,{id:e.id??void 0}),e.title,e.status&&d.jsx(Te,{size:"small",fillColor:qc[e.status].fill,textColor:qc[e.status].text,children:GS[e.status]})]}),d.jsx(ak,{children:e.body.replace(/^#{1,3}\s+.+(\n|$)/,"").replace(/^\s*-{3,}\s*(\n|$)/,"").trim()}),d.jsx("div",{className:"mt-6",children:d.jsx(sg,{idea:e})})]}),OW="font-display-luminari text-sm font-semibold opacity-[0.65]",FW=({plan:e,questions:t})=>{const n=Bt(),r=O(p=>p.loadPlans),{toast:s}=We(),[i,o]=_.useState(""),{sending:a,send:l,undo:u,undoing:c,undoEdit:f}=BS(e,{reload:r,notify:s}),h=async()=>{i.trim()&&await l(i.trim())&&o("")};return d.jsxs(Ce,{size:"small",accent:!0,accentColor:"amber",texture:"kraft",children:[d.jsxs("button",{type:"button",onClick:()=>n({to:"/plans/$planId",params:{planId:encodeURIComponent(e.title)}}),className:"flex items-center gap-2 mb-3 bg-transparent border-none p-0 cursor-pointer text-left [font:inherit] underline",children:[d.jsx(sr,{id:e.id}),e.title]}),d.jsx("div",{className:"flex flex-col gap-3 mb-4",children:d.jsx(WS,{messages:t,undo:u,undoing:c,onUndo:f})}),d.jsxs("div",{className:"flex flex-col gap-2",children:[d.jsx(Ta,{value:i,onChange:p=>o(p.target.value),"aria-label":`Reply to ${e.title}`,placeholder:"Reply to resolve and resume…",rows:2,disabled:a}),d.jsxs("div",{className:"flex justify-end items-center gap-3",children:[d.jsx("span",{className:a?"visible":"invisible",children:d.jsx(Hr,{size:"small",label:"Agent replying…"})}),d.jsx(ne,{size:"small",onClick:h,disabled:a||!i.trim(),children:"Reply"})]})]})]})},zW=({plans:e})=>{const[t,n]=_.useState(!1),r=kM(e),s=r.reduce((i,o)=>i+o.questions.length,0);return s===0?null:d.jsx("div",{className:"mb-6",children:d.jsx(ZV,{expanded:t,onToggle:()=>n(i=>!i),title:d.jsxs("span",{className:`${OW} inline-flex items-center gap-2`,children:["Open questions",d.jsx(Te,{size:"small",variant:"warning",children:s})]}),children:d.jsx("div",{className:"flex flex-col gap-4 pt-2",children:r.map(i=>d.jsx(FW,{plan:i.plan,questions:i.questions},i.plan.id??i.plan.title))})})})},uf="__no-subject__",os="font-handwritten text-xs font-semibold leading-none text-ink-300 mb-2",BW=()=>{const e=O(j=>j.plans),t=eg(),n=O(xm),r=O(j=>j.agentStatus),{patch:s,updating:i}=Ra(),{subjects:o,available:a}=OS(),l=O(j=>j.detailView),u=O(j=>j.setDetailView),c=t?e==null?void 0:e.entries.find(j=>j.title===t):null,[f,h]=_.useState("");if(_.useEffect(()=>{h((c==null?void 0:c.order)!==void 0?String(c==null?void 0:c.order):"")},[c==null?void 0:c.order]),!c)return null;const p=mm(c,r),m=c.status==="in-progress",y=c.status==="review",w=c.status==="dropped",g=c.phases.some(j=>!j.done),x=(c.status==="planned"||m)&&g,v=!!(c.pr&&(c.pr.state==="open"||c.pr.state==="draft")&&c.pr.unresolvedThreadCount),k=a&&c.subject&&!o.includes(c.subject)?c.subject:void 0,S=j=>s(c.title,j),b=m||y||c.status==="planned",P=async()=>{const j=f.trim(),R=Number(j);if(j===""||!Number.isInteger(R)||R<1){h(c.order!==void 0?String(c.order):"");return}R!==c.order&&await S({order:R})};return d.jsx("div",{className:"-mt-5",children:d.jsx(Ce,{surface:"paper",texture:"speckle",size:"small",children:d.jsxs("div",{className:"flex flex-col gap-5",children:[d.jsx("h2",{className:"m-0 font-display-luminari text-base text-ink-900",children:"Plan"}),d.jsxs("div",{children:[d.jsx("div",{className:os,children:"Show"}),d.jsxs("div",{className:"flex flex-col gap-1",children:[d.jsx(ui,{size:"small",active:l==="details",onClick:()=>u("details"),children:"Details"}),d.jsx(ui,{size:"small",active:l==="feedback",onClick:()=>u("feedback"),children:"Feedback"})]})]}),d.jsxs("div",{children:[d.jsx("div",{className:os,children:"Status"}),d.jsx(Te,{size:"small",fillColor:nr[p].fill,textColor:nr[p].text,children:rg[p]})]}),d.jsxs("div",{children:[d.jsx("div",{className:os,children:"Subject"}),d.jsx(Yh,{size:"small",value:c.subject??uf,onChange:j=>S({subject:j===uf?null:j}),disabled:i||!a,options:[{value:uf,label:"No subject"},...k?[{value:k,label:`${k} (orphan)`}]:[],...!a&&c.subject&&!k?[{value:c.subject,label:c.subject}]:[],...o.map(j=>({value:j,label:j}))]})]}),b&&d.jsxs("div",{children:[d.jsx("div",{className:os,children:"Order"}),d.jsx(ja,{type:"number",size:"small","aria-label":"Run order",min:1,value:f,onChange:j=>h(j.target.value),onBlur:P,disabled:i})]}),d.jsxs("div",{children:[d.jsx("div",{className:os,children:"Agent"}),d.jsx(Yh,{size:"small",value:c.agent??"",onChange:j=>S({agent:j||null}),disabled:i,options:[{value:"",label:"Project default agent"},...jM.map(j=>({value:j,label:yk[j]}))]})]}),c.tags.length>0&&d.jsxs("div",{children:[d.jsx("div",{className:os,children:"Tags"}),d.jsx("div",{className:"flex items-center gap-1 flex-wrap",children:c.tags.map(j=>d.jsx(Te,{size:"small",fillColor:"rgba(0,0,0,0.06)",children:j},j))})]}),d.jsxs("div",{children:[d.jsx("div",{className:os,children:"Actions"}),d.jsxs("div",{className:"flex flex-col gap-1",children:[x&&d.jsx(yW,{plan:c,disabled:n||i}),v&&d.jsx(fW,{plan:c,disabled:n||i}),y&&d.jsx(ui,{size:"small",icon:d.jsx("span",{className:"text-watercolor-green-dark",children:"✓"}),onClick:()=>S({status:"done"}),disabled:i,className:i?"opacity-50":void 0,children:"Approve & close"}),d.jsx(ui,{size:"small",icon:d.jsx("span",{className:w?"text-watercolor-green-dark":"text-watercolor-rose-dark",children:w?"↺":"⊘"}),onClick:()=>S({status:w?null:"dropped"}),disabled:i,className:i?"opacity-50":void 0,children:w?"Reopen plan":"Mark dropped"})]})]})]})})})},M0=8,$W=["in-progress","review","planned","idea","done","dropped"],VW={...rg,idea:"Backlog"},L0="text-2xs font-semibold tracking-[0.08em] uppercase text-ink-300 mb-2",UW=()=>{const e=O(v=>v.plans),t=eg(),n=O(v=>v.planFilters),r=O(v=>v.togglePlanStatus),s=O(v=>v.togglePlanTag),i=O(v=>v.setPlanSearch),o=O(v=>v.setSubjectFilter),a=Bt(),[l,u]=_.useState(!1);if(!e||t)return null;const{statusCounts:c,tagCounts:f}=Ul(e.entries,n),h=new Set(n.statuses),p=new Set(n.tags),y=[...new Set([...Object.keys(f),...n.tags])].sort((v,k)=>{const S=(f[k]??0)-(f[v]??0);return S!==0?S:v.localeCompare(k)}),w=l?y:y.slice(0,M0),g=y.length-w.length,x="bg-none bg-transparent border-none p-0 cursor-pointer opacity-70 underline text-2xs";return d.jsx("div",{className:"-mt-5",children:d.jsx(Ce,{surface:"paper",texture:"speckle",size:"small",children:d.jsxs("div",{className:"flex flex-col gap-5",children:[d.jsx("h2",{className:"m-0 font-display-luminari text-base text-ink-900",children:"Filters"}),d.jsx(ja,{type:"search",size:"small",placeholder:"Search plans…","aria-label":"Search plans",value:n.search,onChange:v=>i(v.target.value)}),n.subject!==null&&d.jsxs("div",{className:"flex items-center gap-2","data-testid":"subject-filter-chip",children:[d.jsxs("span",{className:"text-2xs opacity-70",children:["Subject: ",n.subject]}),d.jsx("button",{type:"button",onClick:()=>{o(null),a({to:"/",search:{}})},className:x,children:"Clear"})]}),d.jsxs("div",{children:[d.jsx("div",{className:L0,children:"Status"}),d.jsx("div",{className:"flex flex-col gap-1",children:$W.map(v=>{const k=h.has(v);return d.jsxs("button",{type:"button",onClick:()=>r(v),"aria-pressed":k,className:`flex items-center gap-2 w-full px-2 py-1 rounded-md border-none cursor-pointer text-left ${k?"bg-black/[5%] opacity-100":"bg-transparent opacity-50"}`,children:[d.jsx("span",{className:"w-[9px] h-[9px] rounded-full shrink-0",style:{background:nr[v].text}}),d.jsx("span",{className:"flex-1 text-xs text-ink-900",children:VW[v]}),d.jsx("span",{className:"text-2xs text-ink-500",children:c[v]})]},v)})})]}),d.jsxs("div",{children:[d.jsx("div",{className:L0,children:"Tags"}),d.jsxs("div",{className:"flex flex-wrap gap-1 items-center",children:[y.length===0&&d.jsx("span",{className:"opacity-50 text-2xs",children:"No tags"}),w.map(v=>{const k=p.has(v);return d.jsxs("button",{type:"button",onClick:()=>s(v),"aria-pressed":k,className:`text-2xs px-2 py-[2px] rounded-md border-[0.5px] border-black/[12%] cursor-pointer ${k?"bg-black/[8%] opacity-100":"bg-transparent opacity-55"}`,children:[v," ",f[v]??0]},v)}),g>0&&d.jsxs("button",{type:"button",onClick:()=>u(!0),className:x,children:["+",g," more"]}),l&&y.length>M0&&d.jsx("button",{type:"button",onClick:()=>u(!1),className:x,children:"Show less"})]})]})]})})})},D0=()=>d.jsxs("div",{className:"flex items-center gap-3 mb-6 flex-wrap",children:[d.jsx("h1",{className:"text-4xl flex-1 font-display-luminari font-semibold text-ink-900 m-0 leading-[1.1]",children:"Plans"}),d.jsx(YS,{}),d.jsx(hW,{}),d.jsx(cW,{}),d.jsx(xW,{})]}),WW=[{key:"a",title:"72%"},{key:"b",title:"54%"},{key:"c",title:"83%"},{key:"d",title:"46%"},{key:"e",title:"66%"},{key:"f",title:"58%"}],HW=()=>d.jsxs("div",{className:"flex flex-col gap-1","aria-hidden":"true",children:[d.jsxs("div",{className:"flex items-center",children:[d.jsx("span",{className:"flex-[0_0_36px]"}),d.jsx("div",{className:"flex-1 min-w-0",children:d.jsx(Ce,{size:"small",texture:"kraft",className:"plan-row-card",children:d.jsxs("div",{className:Xh,children:[d.jsx(on,{variant:"text",width:28}),d.jsx(on,{variant:"text",width:44}),d.jsx("span",{className:"max-lg:hidden",children:d.jsx(on,{variant:"text",width:56})}),d.jsx(on,{variant:"text",width:64}),d.jsx(on,{variant:"text",width:48})]})})})]}),WW.map(e=>d.jsxs("div",{className:"flex items-center",children:[d.jsx("span",{className:"flex-[0_0_36px] flex items-center justify-center",children:d.jsx(on,{variant:"text",width:16})}),d.jsx("div",{className:"flex-1 min-w-0",children:d.jsx(Ce,{size:"small",className:"plan-row-card",children:d.jsxs("div",{className:Xh,children:[d.jsx(on,{variant:"rect",width:44,height:18}),d.jsx(on,{variant:"text",width:e.title}),d.jsx("span",{className:"max-lg:hidden",children:d.jsx(on,{variant:"text",width:52})}),d.jsx(on,{variant:"rect",width:80,height:8}),d.jsx(on,{variant:"rect",width:64,height:20})]})})})]},e.key))]}),GW=()=>{const e=O(c=>c.reconcileQueue),t=O(c=>c.removeFromReconcileQueue),n=O(c=>c.plans),{patch:r}=Ra(),{toast:s}=We(),i=_.useRef(0),o=e[0]??null,a=o?(n==null?void 0:n.entries.find(c=>c.id===o.planId))??null:null;if(_.useEffect(()=>{o&&!a&&t(o.previewId)},[o,a,t]),_.useEffect(()=>{e.length===0&&(i.current=0)},[e.length]),!o||!a)return null;const l=async()=>{t(o.previewId),i.current+=1,s({title:"Kept the merged version",description:`"${a.title}" keeps the agent's rewrite.`})},u=async()=>{await r(a.title,{body:o.before.body,phases:o.before.phases},{errorTitle:"Discard failed"})&&(t(o.previewId),i.current+=1)};return d.jsx(nW,{plan:a,before:o.before,onApprove:l,onDiscard:u,queuePosition:{index:i.current+1,total:i.current+e.length}})},KW=({suggestions:e,onOpen:t,onDismiss:n})=>e.length===0?null:d.jsxs("div",{className:"mt-5",children:[d.jsx("h2",{className:"text-sm mb-2 opacity-60",children:"Suggested from AI"}),d.jsx("div",{className:"flex flex-col gap-1",children:e.map(r=>d.jsx("div",{className:"rounded-[10px]",children:d.jsx(Ce,{size:"small",texture:"canvas",className:"plan-row-card",children:d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs("button",{type:"button",onClick:()=>t(r),className:"flex-1 min-w-0 flex items-center gap-2 bg-none bg-transparent border-none p-0 cursor-pointer text-left [font:inherit] text-inherit",children:[d.jsx(Zm,{}),d.jsx("span",{className:"font-semibold overflow-hidden text-ellipsis whitespace-nowrap",children:r.title})]}),d.jsx(it,{icon:d.jsx("span",{children:"×"}),variant:"ghost",size:"small",label:"Dismiss",className:"w-[28px] h-[28px]",onClick:()=>n(r)})]})})},`${r.date}-${r.title}`))})]}),og=()=>{const e=O(b=>b.plans),t=O(b=>b.plansError),n=O(b=>b.ideaEntries),r=O(b=>b.suggestions);O(b=>b.loadPlans);const s=O(b=>b.setDetailView),i=O(b=>b.planFilters),o=O(b=>b.setSubjectFilter),a=eg(),l=kU(),u=O(b=>b.dismissSuggestion),c=Bt(),{toast:f}=We(),{subject:h}=Jp({strict:!1});_.useEffect(()=>{o(h??null)},[h,o]),_.useEffect(()=>{s("details")},[a,l,s]);const p=()=>{c({to:"/"})},m=b=>{c({to:"/plans/$planId",params:{planId:encodeURIComponent(b)}})},y=b=>{c({to:"/ideas/$ideaId",params:{ideaId:encodeURIComponent(b)}})},[w,g]=_.useState(null),x=async b=>{try{await u(b)}catch(P){f({title:"Failed to dismiss suggestion",description:P.message,variant:"error"})}},v=a?e==null?void 0:e.entries.find(b=>b.title===a):null,k=l?n.find(b=>b.title===l):null;if(t)return d.jsxs("div",{children:[d.jsx(OU,{children:"Plans"}),d.jsxs(Ce,{size:"small",accent:!0,accentColor:"rose",children:[d.jsx("p",{className:"m-0 font-semibold",children:"Couldn't load plans.md"}),d.jsx("p",{className:"m-0 opacity-75",children:t})]})]});if(!e)return d.jsxs("div",{children:[d.jsx(D0,{}),d.jsx("output",{"aria-live":"polite",className:"sr-only",children:"Loading plans…"}),d.jsx(HW,{})]});const{rows:S}=MM(e.entries,n,i);return d.jsxs(d.Fragment,{children:[d.jsx(GW,{}),v?d.jsxs("div",{children:[d.jsx("div",{className:"mb-4",children:d.jsx(k0,{items:[{id:"plans",label:"Plans",onClick:p},{id:"plan",label:v.title}]})}),d.jsx(jW,{plan:v})]}):k?d.jsxs("div",{children:[d.jsx("div",{className:"mb-4",children:d.jsx(k0,{items:[{id:"plans",label:"Plans",onClick:p},{id:"idea",label:k.title}]})}),d.jsx(DW,{idea:k})]}):d.jsxs("div",{children:[d.jsx(D0,{}),d.jsx(zW,{plans:e.entries}),e.warnings.length>0&&d.jsxs(Ce,{size:"small",accent:!0,accentColor:"amber",children:[d.jsx("p",{className:"m-0 font-semibold",children:"Some entries couldn't be parsed"}),d.jsx("ul",{className:"m-0 pl-5",children:e.warnings.map(b=>d.jsxs("li",{children:[b.title,": ",b.message]},b.title))})]}),e.entries.length===0?d.jsxs("p",{className:"opacity-50",children:["No ideas yet — capture one with ",d.jsx("strong",{children:"New idea"})," above, or click"," ",d.jsx("strong",{children:"Suggest ideas"})," to have an agent propose some."]}):d.jsx(LW,{plans:e.entries,rows:S,activePlanTitle:a,onOpenPlan:m,onOpenIdea:y}),d.jsx(rW,{}),d.jsx(KW,{suggestions:r,onOpen:g,onDismiss:x}),d.jsx(tW,{suggestion:w,onClose:()=>g(null)})]})]})},tC=_.lazy(()=>Qr(()=>import("./index-CXl1uFWF.js"),__vite__mapDeps([0,1])).then(e=>({default:e.DocsPage}))),qW=_.lazy(()=>Qr(()=>import("./index-CXl1uFWF.js"),__vite__mapDeps([0,1])).then(e=>({default:e.DocsSidebar}))),nC=_.lazy(()=>Qr(()=>import("./index-BTh66TxZ.js"),__vite__mapDeps([2,3,1])).then(e=>({default:e.SettingsPage}))),QW=_.lazy(()=>Qr(()=>import("./index-BTh66TxZ.js"),__vite__mapDeps([2,3,1])).then(e=>({default:e.SettingsSidebar}))),YW=_.lazy(()=>Qr(()=>import("./index-C5as2mi1.js"),__vite__mapDeps([4,3])).then(e=>({default:e.TasksPage}))),XW=_.lazy(()=>Qr(()=>import("./index-DrOhvDGC.js"),[]).then(e=>({default:e.RoadmapPage}))),JW=_.lazy(()=>Qr(()=>import("./index-D2zDC3YW.js"),[]).then(e=>({default:e.DiffPage}))),ZW=_.lazy(()=>Qr(()=>import("./index-SjRbcqaJ.js"),__vite__mapDeps([5,3])).then(e=>({default:e.StatsPage}))),df=[{id:"plans",label:"Plans",path:"/"},{id:"roadmap",label:"Roadmap",path:"/roadmap"},{id:"docs",label:"Docs",path:"/docs"},{id:"tasks",label:"Tasks",path:"/tasks"},{id:"stats",label:"Stats",path:"/stats"},{id:"settings",label:"Settings",path:"/settings"}],O0=()=>d.jsx("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:d.jsx("path",{d:"M3 5h14M3 10h14M3 15h14",strokeLinecap:"round"})}),rC="stack-open";function e9(){try{return localStorage.getItem(rC)==="true"}catch{return!1}}function t9(e){try{localStorage.setItem(rC,String(e))}catch{}}const n9="(min-width: 1440px)";function r9(e){const[t,n]=_.useState(()=>typeof window<"u"?window.matchMedia(e).matches:!1);return _.useEffect(()=>{const r=window.matchMedia(e),s=i=>n(i.matches);return n(r.matches),r.addEventListener("change",s),()=>r.removeEventListener("change",s)},[e]),t}const s9=()=>{var S;const e=Bt(),t=DT({select:b=>b.location.pathname}),n=O(b=>b.loadPlans),r=O(b=>b.loadIdeas),s=O(b=>b.loadSuggestions),i=O(b=>b.loadCapabilities),o=O(b=>b.loadAgentAuthStatus),a=O(b=>b.setActiveDocTitle),l=t==="/"||t.startsWith("/plans/")||t.startsWith("/ideas/"),u=t==="/docs"||t.startsWith("/docs/"),c=t==="/settings"||t.startsWith("/settings/"),f=l?"plans":u?"docs":c?"settings":(S=df.find(b=>b.path===t))==null?void 0:S.id,h=l||u||c,p=l?"plans":u?"docs":"settings",[m,y]=_.useState(e9),[w,g]=_.useState(!1),x=Pu(),v=r9(n9),k=_.useRef(!1);return _.useEffect(()=>{n(),r(),s(),i(),o()},[n,r,s,i,o]),_.useEffect(()=>{k.current||t!=="/"||(k.current=!0,Promise.all([uk(),ck()]).then(([b,P])=>{if(!(b!=null&&b.setupDismissed)&&P!==null&&!P.every(j=>j.status==="ok")){e({to:"/settings/$section",params:{section:"setup"}});return}Promise.all([dk(),pk()]).then(([j,R])=>{j.entries.length>1||R.entries.length>0||(a("USAGE.md"),e({to:"/docs"}))})}))},[t,e,a]),_.useEffect(()=>{g(!1)},[t]),d.jsxs(E8,{position:"bottom-left",children:[d.jsxs("div",{className:"h-screen box-border min-[1440px]:pr-[480px] flex flex-col",children:[d.jsx(PU,{}),d.jsx(DU,{}),d.jsx(g4,{style:{flex:"1 1 0%",minHeight:0,height:"auto"},background:{texture:"speckle",ruledType:"grid",ruledColor:"blue"},showHeader:!0,showSidebar:!1,showPage:!1,bleedBottom:!0,headerActions:d.jsxs(d.Fragment,{children:[h&&d.jsx(it,{variant:"ghost",size:"small",className:"lg:hidden max-[480px]:hidden",label:"Open sidebar",onClick:()=>g(!0),icon:d.jsx(O0,{})}),d.jsx(CU,{size:"sm"}),d.jsx("div",{className:"flex-1"}),d.jsx("nav",{"aria-label":"Main navigation",className:"flex items-center gap-1 max-[480px]:hidden",children:df.map(b=>d.jsx(ne,{variant:"ghost",size:"small",isActive:b.id===f,onClick:()=>e({to:b.path}),"aria-current":b.id===f?"page":void 0,children:b.label},b.id))})]}),children:d.jsx("div",{className:"flex flex-col h-full min-h-0",children:d.jsx("div",{className:"flex flex-1 min-h-0 justify-center items-start box-border overflow-y-auto -mt-8 -ml-8 -mr-8 pt-0 pl-8 pr-8 pb-[var(--pc-content-pad-bottom,32px)]",children:d.jsxs("div",{className:"flex min-w-0 justify-center lg:[--pc-sidebar-h:calc(100vh-160px)] gap-6 w-full",children:[h&&d.jsxs(jU,{routeKey:p,mobileOpen:w,onMobileClose:()=>g(!1),children:[l&&d.jsxs(d.Fragment,{children:[d.jsx(UW,{}),d.jsx(BW,{})]}),u&&d.jsx(_.Suspense,{fallback:null,children:d.jsx(qW,{})}),c&&d.jsx(_.Suspense,{fallback:null,children:d.jsx(QW,{})})]}),d.jsx("div",{className:`flex flex-col min-w-0 ${v?"flex-[1_1_0%]":"flex-[0_1_800px]"}`,children:d.jsx(Ai.div,{...zS(x),transition:FS(x),className:"flex flex-col flex-1 min-w-0",children:d.jsx(_S,{texture:{texture:"parchment"},outline:!0,className:`min-h-[calc(100vh-160px)] w-full ${v?"max-w-none":""}`,children:d.jsx(_.Suspense,{fallback:null,children:d.jsx(Sb,{})})})},t)})]})})})})]}),d.jsx(yU,{open:m,pinned:v,onToggle:()=>{const b=!m;t9(b),y(b)}}),d.jsxs("nav",{"aria-label":"Main navigation",className:"hidden max-[480px]:flex max-[480px]:fixed max-[480px]:left-0 max-[480px]:right-0 max-[480px]:bottom-0 max-[480px]:z-[250] max-[480px]:items-stretch max-[480px]:justify-around max-[480px]:gap-1 max-[480px]:py-2 max-[480px]:px-2 max-[480px]:[padding-bottom:calc(0.5rem+env(safe-area-inset-bottom))] max-[480px]:bg-[var(--pui-bg-base,#fff)] max-[480px]:border-t max-[480px]:border-black/10 max-[480px]:shadow-[0_-2px_8px_rgba(0,0,0,0.08)]",children:[h&&d.jsx(it,{variant:"ghost",size:"small",label:"Open sidebar",onClick:()=>g(!0),icon:d.jsx(O0,{}),className:"min-h-11"}),df.map(b=>d.jsx(ne,{variant:"ghost",size:"small",isActive:b.id===f,onClick:()=>e({to:b.path}),"aria-current":b.id===f?"page":void 0,className:"min-h-11",children:b.label},b.id))]})]})},en=bT({component:s9}),i9=gn({getParentRoute:()=>en,path:"/",component:og,validateSearch:e=>({subject:typeof e.subject=="string"?e.subject:void 0})}),o9=gn({getParentRoute:()=>en,path:"/plans/$planId",component:og}),a9=gn({getParentRoute:()=>en,path:"/ideas/$ideaId",component:og}),l9=gn({getParentRoute:()=>en,path:"/docs",component:tC}),c9=gn({getParentRoute:()=>en,path:"/docs/$section",component:tC}),u9=gn({getParentRoute:()=>en,path:"/settings",component:nC}),d9=gn({getParentRoute:()=>en,path:"/settings/$section",component:nC}),f9=gn({getParentRoute:()=>en,path:"/roadmap",component:XW,validateSearch:e=>({item:typeof e.item=="string"?e.item:void 0})}),h9=gn({getParentRoute:()=>en,path:"/diff",component:JW}),p9=gn({getParentRoute:()=>en,path:"/stats",component:ZW}),m9=gn({getParentRoute:()=>en,path:"/tasks",component:YW,validateSearch:e=>({taskId:typeof e.taskId=="string"?e.taskId:void 0})}),g9=en.addChildren([i9,o9,a9,l9,c9,u9,d9,m9,f9,h9,p9]),y9=IT({routeTree:g9}),sC=document.getElementById("root");if(!sC)throw new Error("#root element not found");Yw(sC).render(d.jsx(_.StrictMode,{children:d.jsx(LT,{router:y9})}));export{C9 as A,k9 as B,Ea as C,P9 as D,M9 as E,Ue as F,uM as G,S9 as H,_9 as I,ne as J,KS as K,rg as L,ak as M,EW as N,j9 as O,OU as P,IV as Q,CM as R,nr as S,Te as U,N9 as V,Bt as a,A9 as b,uk as c,sW as d,v9 as e,x9 as f,Ae as g,OS as h,ui as i,d as j,We as k,jS as l,I9 as m,vU as n,ja as o,b0 as p,b9 as q,_ as r,w9 as s,Yh as t,O as u,jM as v,Ce as w,yk as x,k0 as y,Jp as z};
|
|
207
|
-
//# sourceMappingURL=main-BC7PxPmE.js.map
|