syntaur 0.4.5 → 0.5.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/dashboard/dist/assets/{_basePickBy-ZY1FrcKw.js → _basePickBy-Bcut0btZ.js} +1 -1
- package/dashboard/dist/assets/{_baseUniq-C7xZB6ea.js → _baseUniq-AQSP2JEk.js} +1 -1
- package/dashboard/dist/assets/{arc-CPtDVk1A.js → arc-BLTpY9lc.js} +1 -1
- package/dashboard/dist/assets/{architectureDiagram-2XIMDMQ5-Dr5rnxwf.js → architectureDiagram-2XIMDMQ5-CJtwMY_X.js} +1 -1
- package/dashboard/dist/assets/{blockDiagram-WCTKOSBZ-SsDboTb2.js → blockDiagram-WCTKOSBZ-Don-O7X7.js} +1 -1
- package/dashboard/dist/assets/{c4Diagram-IC4MRINW-CZqjXmV0.js → c4Diagram-IC4MRINW-C_M3yTTB.js} +1 -1
- package/dashboard/dist/assets/channel-BfXmPwE5.js +1 -0
- package/dashboard/dist/assets/{chunk-4BX2VUAB-BYskd63Z.js → chunk-4BX2VUAB-CGss0jXe.js} +1 -1
- package/dashboard/dist/assets/{chunk-55IACEB6-CWLImr1E.js → chunk-55IACEB6-BatoPJga.js} +1 -1
- package/dashboard/dist/assets/{chunk-FMBD7UC4-fQXSIXhy.js → chunk-FMBD7UC4-DxH4wO82.js} +1 -1
- package/dashboard/dist/assets/{chunk-JSJVCQXG-DJXtEexG.js → chunk-JSJVCQXG-BL3izAFQ.js} +1 -1
- package/dashboard/dist/assets/{chunk-KX2RTZJC-C0ivaZ1M.js → chunk-KX2RTZJC-GnqXwnge.js} +1 -1
- package/dashboard/dist/assets/{chunk-NQ4KR5QH-DlwLjqC5.js → chunk-NQ4KR5QH-gvCn4QMb.js} +1 -1
- package/dashboard/dist/assets/{chunk-QZHKN3VN-DBEYrRqx.js → chunk-QZHKN3VN-CYGWogyi.js} +1 -1
- package/dashboard/dist/assets/{chunk-WL4C6EOR-BQyYCp1z.js → chunk-WL4C6EOR-D9mVTQ1F.js} +1 -1
- package/dashboard/dist/assets/classDiagram-VBA2DB6C-D7_G1qy0.js +1 -0
- package/dashboard/dist/assets/classDiagram-v2-RAHNMMFH-D7_G1qy0.js +1 -0
- package/dashboard/dist/assets/clone-BKG-N796.js +1 -0
- package/dashboard/dist/assets/{cose-bilkent-S5V4N54A-CAYzelqd.js → cose-bilkent-S5V4N54A-CUWQCKt4.js} +1 -1
- package/dashboard/dist/assets/{dagre-KLK3FWXG-xpTJb8E7.js → dagre-KLK3FWXG-CH3ijEvV.js} +1 -1
- package/dashboard/dist/assets/{diagram-E7M64L7V-DRDjskHd.js → diagram-E7M64L7V-sq83lpV1.js} +1 -1
- package/dashboard/dist/assets/{diagram-IFDJBPK2-B1r1ZXm3.js → diagram-IFDJBPK2-BzQG_rtq.js} +1 -1
- package/dashboard/dist/assets/{diagram-P4PSJMXO-BeE6-ZUH.js → diagram-P4PSJMXO-Dg0eZn0q.js} +1 -1
- package/dashboard/dist/assets/{erDiagram-INFDFZHY-BG6KKBm1.js → erDiagram-INFDFZHY-4b9eQ0uj.js} +1 -1
- package/dashboard/dist/assets/{flowDiagram-PKNHOUZH-CSFv3RpZ.js → flowDiagram-PKNHOUZH-C9fzKcsZ.js} +1 -1
- package/dashboard/dist/assets/{ganttDiagram-A5KZAMGK-Off4zK-k.js → ganttDiagram-A5KZAMGK-Bzt6i9SH.js} +1 -1
- package/dashboard/dist/assets/{gitGraphDiagram-K3NZZRJ6-Msv_4mYB.js → gitGraphDiagram-K3NZZRJ6-D0wFOagh.js} +1 -1
- package/dashboard/dist/assets/{graph-rPPnNEMq.js → graph-EEIGvqDh.js} +1 -1
- package/dashboard/dist/assets/index-C7f0ySJE.js +481 -0
- package/dashboard/dist/assets/{infoDiagram-LFFYTUFH-CeBirxFd.js → infoDiagram-LFFYTUFH-DLYMsj1D.js} +1 -1
- package/dashboard/dist/assets/{ishikawaDiagram-PHBUUO56-BZ_w8PcD.js → ishikawaDiagram-PHBUUO56-DVebKkzl.js} +1 -1
- package/dashboard/dist/assets/{journeyDiagram-4ABVD52K-3FqMPEfs.js → journeyDiagram-4ABVD52K-BsmgOWVw.js} +1 -1
- package/dashboard/dist/assets/{kanban-definition-K7BYSVSG-BlCmFkEx.js → kanban-definition-K7BYSVSG-BTnHf0ey.js} +1 -1
- package/dashboard/dist/assets/{layout-C50nYMhx.js → layout-BbM7HRvv.js} +1 -1
- package/dashboard/dist/assets/{linear-D2Cjmh1X.js → linear-C37bJKPO.js} +1 -1
- package/dashboard/dist/assets/{mermaid.core-BXFuNYa4.js → mermaid.core-MZ_JgnRL.js} +4 -4
- package/dashboard/dist/assets/{mindmap-definition-YRQLILUH-CowIfM07.js → mindmap-definition-YRQLILUH-CgHS4hFo.js} +1 -1
- package/dashboard/dist/assets/{pieDiagram-SKSYHLDU-DG5IQcKl.js → pieDiagram-SKSYHLDU-CmAgopJe.js} +1 -1
- package/dashboard/dist/assets/{quadrantDiagram-337W2JSQ-DKD46CSX.js → quadrantDiagram-337W2JSQ-BvzYUPR6.js} +1 -1
- package/dashboard/dist/assets/{requirementDiagram-Z7DCOOCP-Dd-qX6Ul.js → requirementDiagram-Z7DCOOCP-Bs52VP7k.js} +1 -1
- package/dashboard/dist/assets/{sankeyDiagram-WA2Y5GQK-CDAylULt.js → sankeyDiagram-WA2Y5GQK-aXvGPR1o.js} +1 -1
- package/dashboard/dist/assets/{sequenceDiagram-2WXFIKYE-D-5Jq5jy.js → sequenceDiagram-2WXFIKYE-CzgcfU6K.js} +1 -1
- package/dashboard/dist/assets/{stateDiagram-RAJIS63D-BmBOa8i0.js → stateDiagram-RAJIS63D-BXBJf9Hq.js} +1 -1
- package/dashboard/dist/assets/stateDiagram-v2-FVOUBMTO-QqOtsuOs.js +1 -0
- package/dashboard/dist/assets/{timeline-definition-YZTLITO2-C9Sdg7du.js → timeline-definition-YZTLITO2-BsXp26Ai.js} +1 -1
- package/dashboard/dist/assets/{treemap-KZPCXAKY-D-PDxUdK.js → treemap-KZPCXAKY-C3WbDii1.js} +1 -1
- package/dashboard/dist/assets/{vennDiagram-LZ73GAT5-CBO5f6MT.js → vennDiagram-LZ73GAT5-B28LMHWd.js} +1 -1
- package/dashboard/dist/assets/{xychartDiagram-JWTSCODW-4xZrquqP.js → xychartDiagram-JWTSCODW-C3Xwz8mS.js} +1 -1
- package/dashboard/dist/index.html +1 -1
- package/dist/dashboard/server.js +726 -115
- package/dist/dashboard/server.js.map +1 -1
- package/dist/index.js +1019 -381
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dashboard/dist/assets/channel-ejDeCb7i.js +0 -1
- package/dashboard/dist/assets/classDiagram-VBA2DB6C-BW_esmsF.js +0 -1
- package/dashboard/dist/assets/classDiagram-v2-RAHNMMFH-BW_esmsF.js +0 -1
- package/dashboard/dist/assets/clone-y13L00zF.js +0 -1
- package/dashboard/dist/assets/index-D_uE8gHg.js +0 -481
- package/dashboard/dist/assets/stateDiagram-v2-FVOUBMTO-Dsk6o9iT.js +0 -1
|
@@ -1,481 +0,0 @@
|
|
|
1
|
-
function sj(e,t){for(var n=0;n<t.length;n++){const o=t[n];if(typeof o!="string"&&!Array.isArray(o)){for(const i in o)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(o,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>o[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))o(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const c of a.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&o(c)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function o(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();function lc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function IO(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function o(){return this instanceof o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(n,o,i.get?i:{enumerable:!0,get:function(){return e[o]}})}),n}var bd={exports:{}},Pi={},wd={exports:{}},ze={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var $g;function ij(){if($g)return ze;$g=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),x=Symbol.iterator;function v(F){return F===null||typeof F!="object"?null:(F=x&&F[x]||F["@@iterator"],typeof F=="function"?F:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,k={};function j(F,J,I){this.props=F,this.context=J,this.refs=k,this.updater=I||b}j.prototype.isReactComponent={},j.prototype.setState=function(F,J){if(typeof F!="object"&&typeof F!="function"&&F!=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,F,J,"setState")},j.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function S(){}S.prototype=j.prototype;function T(F,J,I){this.props=F,this.context=J,this.refs=k,this.updater=I||b}var A=T.prototype=new S;A.constructor=T,N(A,j.prototype),A.isPureReactComponent=!0;var L=Array.isArray,O=Object.prototype.hasOwnProperty,P={current:null},$={key:!0,ref:!0,__self:!0,__source:!0};function E(F,J,I){var de,ve={},fe=null,Ee=null;if(J!=null)for(de in J.ref!==void 0&&(Ee=J.ref),J.key!==void 0&&(fe=""+J.key),J)O.call(J,de)&&!$.hasOwnProperty(de)&&(ve[de]=J[de]);var Ne=arguments.length-2;if(Ne===1)ve.children=I;else if(1<Ne){for(var Re=Array(Ne),je=0;je<Ne;je++)Re[je]=arguments[je+2];ve.children=Re}if(F&&F.defaultProps)for(de in Ne=F.defaultProps,Ne)ve[de]===void 0&&(ve[de]=Ne[de]);return{$$typeof:e,type:F,key:fe,ref:Ee,props:ve,_owner:P.current}}function H(F,J){return{$$typeof:e,type:F.type,key:J,ref:F.ref,props:F.props,_owner:F._owner}}function Z(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function K(F){var J={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(I){return J[I]})}var q=/\/+/g;function Y(F,J){return typeof F=="object"&&F!==null&&F.key!=null?K(""+F.key):J.toString(36)}function X(F,J,I,de,ve){var fe=typeof F;(fe==="undefined"||fe==="boolean")&&(F=null);var Ee=!1;if(F===null)Ee=!0;else switch(fe){case"string":case"number":Ee=!0;break;case"object":switch(F.$$typeof){case e:case t:Ee=!0}}if(Ee)return Ee=F,ve=ve(Ee),F=de===""?"."+Y(Ee,0):de,L(ve)?(I="",F!=null&&(I=F.replace(q,"$&/")+"/"),X(ve,J,I,"",function(je){return je})):ve!=null&&(Z(ve)&&(ve=H(ve,I+(!ve.key||Ee&&Ee.key===ve.key?"":(""+ve.key).replace(q,"$&/")+"/")+F)),J.push(ve)),1;if(Ee=0,de=de===""?".":de+":",L(F))for(var Ne=0;Ne<F.length;Ne++){fe=F[Ne];var Re=de+Y(fe,Ne);Ee+=X(fe,J,I,Re,ve)}else if(Re=v(F),typeof Re=="function")for(F=Re.call(F),Ne=0;!(fe=F.next()).done;)fe=fe.value,Re=de+Y(fe,Ne++),Ee+=X(fe,J,I,Re,ve);else if(fe==="object")throw J=String(F),Error("Objects are not valid as a React child (found: "+(J==="[object Object]"?"object with keys {"+Object.keys(F).join(", ")+"}":J)+"). If you meant to render a collection of children, use an array instead.");return Ee}function _(F,J,I){if(F==null)return F;var de=[],ve=0;return X(F,de,"","",function(fe){return J.call(I,fe,ve++)}),de}function D(F){if(F._status===-1){var J=F._result;J=J(),J.then(function(I){(F._status===0||F._status===-1)&&(F._status=1,F._result=I)},function(I){(F._status===0||F._status===-1)&&(F._status=2,F._result=I)}),F._status===-1&&(F._status=0,F._result=J)}if(F._status===1)return F._result.default;throw F._result}var V={current:null},W={transition:null},ee={ReactCurrentDispatcher:V,ReactCurrentBatchConfig:W,ReactCurrentOwner:P};function R(){throw Error("act(...) is not supported in production builds of React.")}return ze.Children={map:_,forEach:function(F,J,I){_(F,function(){J.apply(this,arguments)},I)},count:function(F){var J=0;return _(F,function(){J++}),J},toArray:function(F){return _(F,function(J){return J})||[]},only:function(F){if(!Z(F))throw Error("React.Children.only expected to receive a single React element child.");return F}},ze.Component=j,ze.Fragment=n,ze.Profiler=i,ze.PureComponent=T,ze.StrictMode=o,ze.Suspense=p,ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ee,ze.act=R,ze.cloneElement=function(F,J,I){if(F==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+F+".");var de=N({},F.props),ve=F.key,fe=F.ref,Ee=F._owner;if(J!=null){if(J.ref!==void 0&&(fe=J.ref,Ee=P.current),J.key!==void 0&&(ve=""+J.key),F.type&&F.type.defaultProps)var Ne=F.type.defaultProps;for(Re in J)O.call(J,Re)&&!$.hasOwnProperty(Re)&&(de[Re]=J[Re]===void 0&&Ne!==void 0?Ne[Re]:J[Re])}var Re=arguments.length-2;if(Re===1)de.children=I;else if(1<Re){Ne=Array(Re);for(var je=0;je<Re;je++)Ne[je]=arguments[je+2];de.children=Ne}return{$$typeof:e,type:F.type,key:ve,ref:fe,props:de,_owner:Ee}},ze.createContext=function(F){return F={$$typeof:c,_currentValue:F,_currentValue2:F,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},F.Provider={$$typeof:a,_context:F},F.Consumer=F},ze.createElement=E,ze.createFactory=function(F){var J=E.bind(null,F);return J.type=F,J},ze.createRef=function(){return{current:null}},ze.forwardRef=function(F){return{$$typeof:d,render:F}},ze.isValidElement=Z,ze.lazy=function(F){return{$$typeof:h,_payload:{_status:-1,_result:F},_init:D}},ze.memo=function(F,J){return{$$typeof:m,type:F,compare:J===void 0?null:J}},ze.startTransition=function(F){var J=W.transition;W.transition={};try{F()}finally{W.transition=J}},ze.unstable_act=R,ze.useCallback=function(F,J){return V.current.useCallback(F,J)},ze.useContext=function(F){return V.current.useContext(F)},ze.useDebugValue=function(){},ze.useDeferredValue=function(F){return V.current.useDeferredValue(F)},ze.useEffect=function(F,J){return V.current.useEffect(F,J)},ze.useId=function(){return V.current.useId()},ze.useImperativeHandle=function(F,J,I){return V.current.useImperativeHandle(F,J,I)},ze.useInsertionEffect=function(F,J){return V.current.useInsertionEffect(F,J)},ze.useLayoutEffect=function(F,J){return V.current.useLayoutEffect(F,J)},ze.useMemo=function(F,J){return V.current.useMemo(F,J)},ze.useReducer=function(F,J,I){return V.current.useReducer(F,J,I)},ze.useRef=function(F){return V.current.useRef(F)},ze.useState=function(F){return V.current.useState(F)},ze.useSyncExternalStore=function(F,J,I){return V.current.useSyncExternalStore(F,J,I)},ze.useTransition=function(){return V.current.useTransition()},ze.version="18.3.1",ze}var Fg;function qf(){return Fg||(Fg=1,wd.exports=ij()),wd.exports}/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.production.min.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var zg;function lj(){if(zg)return Pi;zg=1;var e=qf(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function c(d,p,m){var h,x={},v=null,b=null;m!==void 0&&(v=""+m),p.key!==void 0&&(v=""+p.key),p.ref!==void 0&&(b=p.ref);for(h in p)o.call(p,h)&&!a.hasOwnProperty(h)&&(x[h]=p[h]);if(d&&d.defaultProps)for(h in p=d.defaultProps,p)x[h]===void 0&&(x[h]=p[h]);return{$$typeof:t,type:d,key:v,ref:b,props:x,_owner:i.current}}return Pi.Fragment=n,Pi.jsx=c,Pi.jsxs=c,Pi}var Bg;function aj(){return Bg||(Bg=1,bd.exports=lj()),bd.exports}var l=aj(),g=qf();const yt=lc(g),Qy=sj({__proto__:null,default:yt},[g]);var ka={},kd={exports:{}},kn={},jd={exports:{}},Sd={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.min.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var Ug;function cj(){return Ug||(Ug=1,(function(e){function t(W,ee){var R=W.length;W.push(ee);e:for(;0<R;){var F=R-1>>>1,J=W[F];if(0<i(J,ee))W[F]=ee,W[R]=J,R=F;else break e}}function n(W){return W.length===0?null:W[0]}function o(W){if(W.length===0)return null;var ee=W[0],R=W.pop();if(R!==ee){W[0]=R;e:for(var F=0,J=W.length,I=J>>>1;F<I;){var de=2*(F+1)-1,ve=W[de],fe=de+1,Ee=W[fe];if(0>i(ve,R))fe<J&&0>i(Ee,ve)?(W[F]=Ee,W[fe]=R,F=fe):(W[F]=ve,W[de]=R,F=de);else if(fe<J&&0>i(Ee,R))W[F]=Ee,W[fe]=R,F=fe;else break e}}return ee}function i(W,ee){var R=W.sortIndex-ee.sortIndex;return R!==0?R:W.id-ee.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var p=[],m=[],h=1,x=null,v=3,b=!1,N=!1,k=!1,j=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(W){for(var ee=n(m);ee!==null;){if(ee.callback===null)o(m);else if(ee.startTime<=W)o(m),ee.sortIndex=ee.expirationTime,t(p,ee);else break;ee=n(m)}}function L(W){if(k=!1,A(W),!N)if(n(p)!==null)N=!0,D(O);else{var ee=n(m);ee!==null&&V(L,ee.startTime-W)}}function O(W,ee){N=!1,k&&(k=!1,S(E),E=-1),b=!0;var R=v;try{for(A(ee),x=n(p);x!==null&&(!(x.expirationTime>ee)||W&&!K());){var F=x.callback;if(typeof F=="function"){x.callback=null,v=x.priorityLevel;var J=F(x.expirationTime<=ee);ee=e.unstable_now(),typeof J=="function"?x.callback=J:x===n(p)&&o(p),A(ee)}else o(p);x=n(p)}if(x!==null)var I=!0;else{var de=n(m);de!==null&&V(L,de.startTime-ee),I=!1}return I}finally{x=null,v=R,b=!1}}var P=!1,$=null,E=-1,H=5,Z=-1;function K(){return!(e.unstable_now()-Z<H)}function q(){if($!==null){var W=e.unstable_now();Z=W;var ee=!0;try{ee=$(!0,W)}finally{ee?Y():(P=!1,$=null)}}else P=!1}var Y;if(typeof T=="function")Y=function(){T(q)};else if(typeof MessageChannel<"u"){var X=new MessageChannel,_=X.port2;X.port1.onmessage=q,Y=function(){_.postMessage(null)}}else Y=function(){j(q,0)};function D(W){$=W,P||(P=!0,Y())}function V(W,ee){E=j(function(){W(e.unstable_now())},ee)}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(W){W.callback=null},e.unstable_continueExecution=function(){N||b||(N=!0,D(O))},e.unstable_forceFrameRate=function(W){0>W||125<W?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):H=0<W?Math.floor(1e3/W):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_getFirstCallbackNode=function(){return n(p)},e.unstable_next=function(W){switch(v){case 1:case 2:case 3:var ee=3;break;default:ee=v}var R=v;v=ee;try{return W()}finally{v=R}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(W,ee){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var R=v;v=W;try{return ee()}finally{v=R}},e.unstable_scheduleCallback=function(W,ee,R){var F=e.unstable_now();switch(typeof R=="object"&&R!==null?(R=R.delay,R=typeof R=="number"&&0<R?F+R:F):R=F,W){case 1:var J=-1;break;case 2:J=250;break;case 5:J=1073741823;break;case 4:J=1e4;break;default:J=5e3}return J=R+J,W={id:h++,callback:ee,priorityLevel:W,startTime:R,expirationTime:J,sortIndex:-1},R>F?(W.sortIndex=R,t(m,W),n(p)===null&&W===n(m)&&(k?(S(E),E=-1):k=!0,V(L,R-F))):(W.sortIndex=J,t(p,W),N||b||(N=!0,D(O))),W},e.unstable_shouldYield=K,e.unstable_wrapCallback=function(W){var ee=v;return function(){var R=v;v=ee;try{return W.apply(this,arguments)}finally{v=R}}}})(Sd)),Sd}var Hg;function uj(){return Hg||(Hg=1,jd.exports=cj()),jd.exports}/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.min.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var Wg;function dj(){if(Wg)return kn;Wg=1;var e=qf(),t=uj();function n(r){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+r,u=1;u<arguments.length;u++)s+="&args[]="+encodeURIComponent(arguments[u]);return"Minified React error #"+r+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=new Set,i={};function a(r,s){c(r,s),c(r+"Capture",s)}function c(r,s){for(i[r]=s,r=0;r<s.length;r++)o.add(s[r])}var d=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,m=/^[: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]*$/,h={},x={};function v(r){return p.call(x,r)?!0:p.call(h,r)?!1:m.test(r)?x[r]=!0:(h[r]=!0,!1)}function b(r,s,u,f){if(u!==null&&u.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return f?!1:u!==null?!u.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function N(r,s,u,f){if(s===null||typeof s>"u"||b(r,s,u,f))return!0;if(f)return!1;if(u!==null)switch(u.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function k(r,s,u,f,y,w,C){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=f,this.attributeNamespace=y,this.mustUseProperty=u,this.propertyName=r,this.type=s,this.sanitizeURL=w,this.removeEmptyString=C}var j={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){j[r]=new k(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var s=r[0];j[s]=new k(s,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){j[r]=new k(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){j[r]=new k(r,2,!1,r,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(r){j[r]=new k(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){j[r]=new k(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){j[r]=new k(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){j[r]=new k(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){j[r]=new k(r,5,!1,r.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function T(r){return r[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(r){var s=r.replace(S,T);j[s]=new k(s,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var s=r.replace(S,T);j[s]=new k(s,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var s=r.replace(S,T);j[s]=new k(s,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){j[r]=new k(r,1,!1,r.toLowerCase(),null,!1,!1)}),j.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){j[r]=new k(r,1,!1,r.toLowerCase(),null,!0,!0)});function A(r,s,u,f){var y=j.hasOwnProperty(s)?j[s]:null;(y!==null?y.type!==0:f||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(N(s,u,y,f)&&(u=null),f||y===null?v(s)&&(u===null?r.removeAttribute(s):r.setAttribute(s,""+u)):y.mustUseProperty?r[y.propertyName]=u===null?y.type===3?!1:"":u:(s=y.attributeName,f=y.attributeNamespace,u===null?r.removeAttribute(s):(y=y.type,u=y===3||y===4&&u===!0?"":""+u,f?r.setAttributeNS(f,s,u):r.setAttribute(s,u))))}var L=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,O=Symbol.for("react.element"),P=Symbol.for("react.portal"),$=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),H=Symbol.for("react.profiler"),Z=Symbol.for("react.provider"),K=Symbol.for("react.context"),q=Symbol.for("react.forward_ref"),Y=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),V=Symbol.for("react.offscreen"),W=Symbol.iterator;function ee(r){return r===null||typeof r!="object"?null:(r=W&&r[W]||r["@@iterator"],typeof r=="function"?r:null)}var R=Object.assign,F;function J(r){if(F===void 0)try{throw Error()}catch(u){var s=u.stack.trim().match(/\n( *(at )?)/);F=s&&s[1]||""}return`
|
|
34
|
-
`+F+r}var I=!1;function de(r,s){if(!r||I)return"";I=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(te){var f=te}Reflect.construct(r,[],s)}else{try{s.call()}catch(te){f=te}r.call(s.prototype)}else{try{throw Error()}catch(te){f=te}r()}}catch(te){if(te&&f&&typeof te.stack=="string"){for(var y=te.stack.split(`
|
|
35
|
-
`),w=f.stack.split(`
|
|
36
|
-
`),C=y.length-1,M=w.length-1;1<=C&&0<=M&&y[C]!==w[M];)M--;for(;1<=C&&0<=M;C--,M--)if(y[C]!==w[M]){if(C!==1||M!==1)do if(C--,M--,0>M||y[C]!==w[M]){var z=`
|
|
37
|
-
`+y[C].replace(" at new "," at ");return r.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",r.displayName)),z}while(1<=C&&0<=M);break}}}finally{I=!1,Error.prepareStackTrace=u}return(r=r?r.displayName||r.name:"")?J(r):""}function ve(r){switch(r.tag){case 5:return J(r.type);case 16:return J("Lazy");case 13:return J("Suspense");case 19:return J("SuspenseList");case 0:case 2:case 15:return r=de(r.type,!1),r;case 11:return r=de(r.type.render,!1),r;case 1:return r=de(r.type,!0),r;default:return""}}function fe(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case $:return"Fragment";case P:return"Portal";case H:return"Profiler";case E:return"StrictMode";case Y:return"Suspense";case X:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case K:return(r.displayName||"Context")+".Consumer";case Z:return(r._context.displayName||"Context")+".Provider";case q:var s=r.render;return r=r.displayName,r||(r=s.displayName||s.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case _:return s=r.displayName||null,s!==null?s:fe(r.type)||"Memo";case D:s=r._payload,r=r._init;try{return fe(r(s))}catch{}}return null}function Ee(r){var s=r.type;switch(r.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=s.render,r=r.displayName||r.name||"",s.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return fe(s);case 8:return s===E?"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 s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Ne(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Re(r){var s=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function je(r){var s=Re(r)?"checked":"value",u=Object.getOwnPropertyDescriptor(r.constructor.prototype,s),f=""+r[s];if(!r.hasOwnProperty(s)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var y=u.get,w=u.set;return Object.defineProperty(r,s,{configurable:!0,get:function(){return y.call(this)},set:function(C){f=""+C,w.call(this,C)}}),Object.defineProperty(r,s,{enumerable:u.enumerable}),{getValue:function(){return f},setValue:function(C){f=""+C},stopTracking:function(){r._valueTracker=null,delete r[s]}}}}function ut(r){r._valueTracker||(r._valueTracker=je(r))}function tt(r){if(!r)return!1;var s=r._valueTracker;if(!s)return!0;var u=s.getValue(),f="";return r&&(f=Re(r)?r.checked?"true":"false":r.value),r=f,r!==u?(s.setValue(r),!0):!1}function Ue(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function Be(r,s){var u=s.checked;return R({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:u??r._wrapperState.initialChecked})}function Ct(r,s){var u=s.defaultValue==null?"":s.defaultValue,f=s.checked!=null?s.checked:s.defaultChecked;u=Ne(s.value!=null?s.value:u),r._wrapperState={initialChecked:f,initialValue:u,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function Ot(r,s){s=s.checked,s!=null&&A(r,"checked",s,!1)}function cn(r,s){Ot(r,s);var u=Ne(s.value),f=s.type;if(u!=null)f==="number"?(u===0&&r.value===""||r.value!=u)&&(r.value=""+u):r.value!==""+u&&(r.value=""+u);else if(f==="submit"||f==="reset"){r.removeAttribute("value");return}s.hasOwnProperty("value")?Xe(r,s.type,u):s.hasOwnProperty("defaultValue")&&Xe(r,s.type,Ne(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(r.defaultChecked=!!s.defaultChecked)}function hn(r,s,u){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var f=s.type;if(!(f!=="submit"&&f!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+r._wrapperState.initialValue,u||s===r.value||(r.value=s),r.defaultValue=s}u=r.name,u!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,u!==""&&(r.name=u)}function Xe(r,s,u){(s!=="number"||Ue(r.ownerDocument)!==r)&&(u==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+u&&(r.defaultValue=""+u))}var nt=Array.isArray;function Vt(r,s,u,f){if(r=r.options,s){s={};for(var y=0;y<u.length;y++)s["$"+u[y]]=!0;for(u=0;u<r.length;u++)y=s.hasOwnProperty("$"+r[u].value),r[u].selected!==y&&(r[u].selected=y),y&&f&&(r[u].defaultSelected=!0)}else{for(u=""+Ne(u),s=null,y=0;y<r.length;y++){if(r[y].value===u){r[y].selected=!0,f&&(r[y].defaultSelected=!0);return}s!==null||r[y].disabled||(s=r[y])}s!==null&&(s.selected=!0)}}function Qt(r,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return R({},s,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function mn(r,s){var u=s.value;if(u==null){if(u=s.children,s=s.defaultValue,u!=null){if(s!=null)throw Error(n(92));if(nt(u)){if(1<u.length)throw Error(n(93));u=u[0]}s=u}s==null&&(s=""),u=s}r._wrapperState={initialValue:Ne(u)}}function Pn(r,s){var u=Ne(s.value),f=Ne(s.defaultValue);u!=null&&(u=""+u,u!==r.value&&(r.value=u),s.defaultValue==null&&r.defaultValue!==u&&(r.defaultValue=u)),f!=null&&(r.defaultValue=""+f)}function Tn(r){var s=r.textContent;s===r._wrapperState.initialValue&&s!==""&&s!==null&&(r.value=s)}function re(r){switch(r){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 le(r,s){return r==null||r==="http://www.w3.org/1999/xhtml"?re(s):r==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var pe,ne=(function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,u,f,y){MSApp.execUnsafeLocalFunction(function(){return r(s,u,f,y)})}:r})(function(r,s){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=s;else{for(pe=pe||document.createElement("div"),pe.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=pe.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;s.firstChild;)r.appendChild(s.firstChild)}});function me(r,s){if(s){var u=r.firstChild;if(u&&u===r.lastChild&&u.nodeType===3){u.nodeValue=s;return}}r.textContent=s}var ke={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},_t=["Webkit","ms","Moz","O"];Object.keys(ke).forEach(function(r){_t.forEach(function(s){s=s+r.charAt(0).toUpperCase()+r.substring(1),ke[s]=ke[r]})});function Jt(r,s,u){return s==null||typeof s=="boolean"||s===""?"":u||typeof s!="number"||s===0||ke.hasOwnProperty(r)&&ke[r]?(""+s).trim():s+"px"}function qt(r,s){r=r.style;for(var u in s)if(s.hasOwnProperty(u)){var f=u.indexOf("--")===0,y=Jt(u,s[u],f);u==="float"&&(u="cssFloat"),f?r.setProperty(u,y):r[u]=y}}var U=R({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 ae(r,s){if(s){if(U[r]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,r));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function ge(r,s){if(r.indexOf("-")===-1)return typeof s.is=="string";switch(r){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 Oe=null;function zn(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Zt=null,dt=null,Fe=null;function Ye(r){if(r=hi(r)){if(typeof Zt!="function")throw Error(n(280));var s=r.stateNode;s&&(s=Ml(s),Zt(r.stateNode,r.type,s))}}function wt(r){dt?Fe?Fe.push(r):Fe=[r]:dt=r}function Mt(){if(dt){var r=dt,s=Fe;if(Fe=dt=null,Ye(r),s)for(r=0;r<s.length;r++)Ye(s[r])}}function Gt(r,s){return r(s)}function en(){}var gn=!1;function Ar(r,s,u){if(gn)return r(s,u);gn=!0;try{return Gt(r,s,u)}finally{gn=!1,(dt!==null||Fe!==null)&&(en(),Mt())}}function ft(r,s){var u=r.stateNode;if(u===null)return null;var f=Ml(u);if(f===null)return null;u=f[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(r=r.type,f=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!f;break e;default:r=!1}if(r)return null;if(u&&typeof u!="function")throw Error(n(231,s,typeof u));return u}var Bn=!1;if(d)try{var tn={};Object.defineProperty(tn,"passive",{get:function(){Bn=!0}}),window.addEventListener("test",tn,tn),window.removeEventListener("test",tn,tn)}catch{Bn=!1}function Jn(r,s,u,f,y,w,C,M,z){var te=Array.prototype.slice.call(arguments,3);try{s.apply(u,te)}catch(se){this.onError(se)}}var Zn=!1,pr=null,An=!1,Dr=null,Ys={onError:function(r){Zn=!0,pr=r}};function p1(r,s,u,f,y,w,C,M,z){Zn=!1,pr=null,Jn.apply(Ys,arguments)}function h1(r,s,u,f,y,w,C,M,z){if(p1.apply(this,arguments),Zn){if(Zn){var te=pr;Zn=!1,pr=null}else throw Error(n(198));An||(An=!0,Dr=te)}}function Eo(r){var s=r,u=r;if(r.alternate)for(;s.return;)s=s.return;else{r=s;do s=r,(s.flags&4098)!==0&&(u=s.return),r=s.return;while(r)}return s.tag===3?u:null}function lh(r){if(r.tag===13){var s=r.memoizedState;if(s===null&&(r=r.alternate,r!==null&&(s=r.memoizedState)),s!==null)return s.dehydrated}return null}function ah(r){if(Eo(r)!==r)throw Error(n(188))}function m1(r){var s=r.alternate;if(!s){if(s=Eo(r),s===null)throw Error(n(188));return s!==r?null:r}for(var u=r,f=s;;){var y=u.return;if(y===null)break;var w=y.alternate;if(w===null){if(f=y.return,f!==null){u=f;continue}break}if(y.child===w.child){for(w=y.child;w;){if(w===u)return ah(y),r;if(w===f)return ah(y),s;w=w.sibling}throw Error(n(188))}if(u.return!==f.return)u=y,f=w;else{for(var C=!1,M=y.child;M;){if(M===u){C=!0,u=y,f=w;break}if(M===f){C=!0,f=y,u=w;break}M=M.sibling}if(!C){for(M=w.child;M;){if(M===u){C=!0,u=w,f=y;break}if(M===f){C=!0,f=w,u=y;break}M=M.sibling}if(!C)throw Error(n(189))}}if(u.alternate!==f)throw Error(n(190))}if(u.tag!==3)throw Error(n(188));return u.stateNode.current===u?r:s}function ch(r){return r=m1(r),r!==null?uh(r):null}function uh(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var s=uh(r);if(s!==null)return s;r=r.sibling}return null}var dh=t.unstable_scheduleCallback,fh=t.unstable_cancelCallback,g1=t.unstable_shouldYield,x1=t.unstable_requestPaint,kt=t.unstable_now,y1=t.unstable_getCurrentPriorityLevel,zc=t.unstable_ImmediatePriority,ph=t.unstable_UserBlockingPriority,xl=t.unstable_NormalPriority,v1=t.unstable_LowPriority,hh=t.unstable_IdlePriority,yl=null,hr=null;function b1(r){if(hr&&typeof hr.onCommitFiberRoot=="function")try{hr.onCommitFiberRoot(yl,r,void 0,(r.current.flags&128)===128)}catch{}}var er=Math.clz32?Math.clz32:j1,w1=Math.log,k1=Math.LN2;function j1(r){return r>>>=0,r===0?32:31-(w1(r)/k1|0)|0}var vl=64,bl=4194304;function Xs(r){switch(r&-r){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 r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function wl(r,s){var u=r.pendingLanes;if(u===0)return 0;var f=0,y=r.suspendedLanes,w=r.pingedLanes,C=u&268435455;if(C!==0){var M=C&~y;M!==0?f=Xs(M):(w&=C,w!==0&&(f=Xs(w)))}else C=u&~y,C!==0?f=Xs(C):w!==0&&(f=Xs(w));if(f===0)return 0;if(s!==0&&s!==f&&(s&y)===0&&(y=f&-f,w=s&-s,y>=w||y===16&&(w&4194240)!==0))return s;if((f&4)!==0&&(f|=u&16),s=r.entangledLanes,s!==0)for(r=r.entanglements,s&=f;0<s;)u=31-er(s),y=1<<u,f|=r[u],s&=~y;return f}function S1(r,s){switch(r){case 1:case 2:case 4:return s+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 s+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 C1(r,s){for(var u=r.suspendedLanes,f=r.pingedLanes,y=r.expirationTimes,w=r.pendingLanes;0<w;){var C=31-er(w),M=1<<C,z=y[C];z===-1?((M&u)===0||(M&f)!==0)&&(y[C]=S1(M,s)):z<=s&&(r.expiredLanes|=M),w&=~M}}function Bc(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function mh(){var r=vl;return vl<<=1,(vl&4194240)===0&&(vl=64),r}function Uc(r){for(var s=[],u=0;31>u;u++)s.push(r);return s}function Qs(r,s,u){r.pendingLanes|=s,s!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,s=31-er(s),r[s]=u}function N1(r,s){var u=r.pendingLanes&~s;r.pendingLanes=s,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=s,r.mutableReadLanes&=s,r.entangledLanes&=s,s=r.entanglements;var f=r.eventTimes;for(r=r.expirationTimes;0<u;){var y=31-er(u),w=1<<y;s[y]=0,f[y]=-1,r[y]=-1,u&=~w}}function Hc(r,s){var u=r.entangledLanes|=s;for(r=r.entanglements;u;){var f=31-er(u),y=1<<f;y&s|r[f]&s&&(r[f]|=s),u&=~y}}var Ge=0;function gh(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var xh,Wc,yh,vh,bh,Vc=!1,kl=[],Yr=null,Xr=null,Qr=null,Js=new Map,Zs=new Map,Jr=[],E1="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 wh(r,s){switch(r){case"focusin":case"focusout":Yr=null;break;case"dragenter":case"dragleave":Xr=null;break;case"mouseover":case"mouseout":Qr=null;break;case"pointerover":case"pointerout":Js.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zs.delete(s.pointerId)}}function ei(r,s,u,f,y,w){return r===null||r.nativeEvent!==w?(r={blockedOn:s,domEventName:u,eventSystemFlags:f,nativeEvent:w,targetContainers:[y]},s!==null&&(s=hi(s),s!==null&&Wc(s)),r):(r.eventSystemFlags|=f,s=r.targetContainers,y!==null&&s.indexOf(y)===-1&&s.push(y),r)}function R1(r,s,u,f,y){switch(s){case"focusin":return Yr=ei(Yr,r,s,u,f,y),!0;case"dragenter":return Xr=ei(Xr,r,s,u,f,y),!0;case"mouseover":return Qr=ei(Qr,r,s,u,f,y),!0;case"pointerover":var w=y.pointerId;return Js.set(w,ei(Js.get(w)||null,r,s,u,f,y)),!0;case"gotpointercapture":return w=y.pointerId,Zs.set(w,ei(Zs.get(w)||null,r,s,u,f,y)),!0}return!1}function kh(r){var s=Ro(r.target);if(s!==null){var u=Eo(s);if(u!==null){if(s=u.tag,s===13){if(s=lh(u),s!==null){r.blockedOn=s,bh(r.priority,function(){yh(u)});return}}else if(s===3&&u.stateNode.current.memoizedState.isDehydrated){r.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}r.blockedOn=null}function jl(r){if(r.blockedOn!==null)return!1;for(var s=r.targetContainers;0<s.length;){var u=Gc(r.domEventName,r.eventSystemFlags,s[0],r.nativeEvent);if(u===null){u=r.nativeEvent;var f=new u.constructor(u.type,u);Oe=f,u.target.dispatchEvent(f),Oe=null}else return s=hi(u),s!==null&&Wc(s),r.blockedOn=u,!1;s.shift()}return!0}function jh(r,s,u){jl(r)&&u.delete(s)}function P1(){Vc=!1,Yr!==null&&jl(Yr)&&(Yr=null),Xr!==null&&jl(Xr)&&(Xr=null),Qr!==null&&jl(Qr)&&(Qr=null),Js.forEach(jh),Zs.forEach(jh)}function ti(r,s){r.blockedOn===s&&(r.blockedOn=null,Vc||(Vc=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,P1)))}function ni(r){function s(y){return ti(y,r)}if(0<kl.length){ti(kl[0],r);for(var u=1;u<kl.length;u++){var f=kl[u];f.blockedOn===r&&(f.blockedOn=null)}}for(Yr!==null&&ti(Yr,r),Xr!==null&&ti(Xr,r),Qr!==null&&ti(Qr,r),Js.forEach(s),Zs.forEach(s),u=0;u<Jr.length;u++)f=Jr[u],f.blockedOn===r&&(f.blockedOn=null);for(;0<Jr.length&&(u=Jr[0],u.blockedOn===null);)kh(u),u.blockedOn===null&&Jr.shift()}var Ko=L.ReactCurrentBatchConfig,Sl=!0;function T1(r,s,u,f){var y=Ge,w=Ko.transition;Ko.transition=null;try{Ge=1,qc(r,s,u,f)}finally{Ge=y,Ko.transition=w}}function A1(r,s,u,f){var y=Ge,w=Ko.transition;Ko.transition=null;try{Ge=4,qc(r,s,u,f)}finally{Ge=y,Ko.transition=w}}function qc(r,s,u,f){if(Sl){var y=Gc(r,s,u,f);if(y===null)uu(r,s,f,Cl,u),wh(r,f);else if(R1(y,r,s,u,f))f.stopPropagation();else if(wh(r,f),s&4&&-1<E1.indexOf(r)){for(;y!==null;){var w=hi(y);if(w!==null&&xh(w),w=Gc(r,s,u,f),w===null&&uu(r,s,f,Cl,u),w===y)break;y=w}y!==null&&f.stopPropagation()}else uu(r,s,f,null,u)}}var Cl=null;function Gc(r,s,u,f){if(Cl=null,r=zn(f),r=Ro(r),r!==null)if(s=Eo(r),s===null)r=null;else if(u=s.tag,u===13){if(r=lh(s),r!==null)return r;r=null}else if(u===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;r=null}else s!==r&&(r=null);return Cl=r,null}function Sh(r){switch(r){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(y1()){case zc:return 1;case ph:return 4;case xl:case v1:return 16;case hh:return 536870912;default:return 16}default:return 16}}var Zr=null,Kc=null,Nl=null;function Ch(){if(Nl)return Nl;var r,s=Kc,u=s.length,f,y="value"in Zr?Zr.value:Zr.textContent,w=y.length;for(r=0;r<u&&s[r]===y[r];r++);var C=u-r;for(f=1;f<=C&&s[u-f]===y[w-f];f++);return Nl=y.slice(r,1<f?1-f:void 0)}function El(r){var s=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&s===13&&(r=13)):r=s,r===10&&(r=13),32<=r||r===13?r:0}function Rl(){return!0}function Nh(){return!1}function Dn(r){function s(u,f,y,w,C){this._reactName=u,this._targetInst=y,this.type=f,this.nativeEvent=w,this.target=C,this.currentTarget=null;for(var M in r)r.hasOwnProperty(M)&&(u=r[M],this[M]=u?u(w):w[M]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?Rl:Nh,this.isPropagationStopped=Nh,this}return R(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Rl)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Rl)},persist:function(){},isPersistent:Rl}),s}var Yo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Yc=Dn(Yo),ri=R({},Yo,{view:0,detail:0}),D1=Dn(ri),Xc,Qc,oi,Pl=R({},ri,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zc,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==oi&&(oi&&r.type==="mousemove"?(Xc=r.screenX-oi.screenX,Qc=r.screenY-oi.screenY):Qc=Xc=0,oi=r),Xc)},movementY:function(r){return"movementY"in r?r.movementY:Qc}}),Eh=Dn(Pl),I1=R({},Pl,{dataTransfer:0}),L1=Dn(I1),O1=R({},ri,{relatedTarget:0}),Jc=Dn(O1),_1=R({},Yo,{animationName:0,elapsedTime:0,pseudoElement:0}),M1=Dn(_1),$1=R({},Yo,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),F1=Dn($1),z1=R({},Yo,{data:0}),Rh=Dn(z1),B1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},U1={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"},H1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function W1(r){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(r):(r=H1[r])?!!s[r]:!1}function Zc(){return W1}var V1=R({},ri,{key:function(r){if(r.key){var s=B1[r.key]||r.key;if(s!=="Unidentified")return s}return r.type==="keypress"?(r=El(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?U1[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zc,charCode:function(r){return r.type==="keypress"?El(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?El(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),q1=Dn(V1),G1=R({},Pl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ph=Dn(G1),K1=R({},ri,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zc}),Y1=Dn(K1),X1=R({},Yo,{propertyName:0,elapsedTime:0,pseudoElement:0}),Q1=Dn(X1),J1=R({},Pl,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),Z1=Dn(J1),ek=[9,13,27,32],eu=d&&"CompositionEvent"in window,si=null;d&&"documentMode"in document&&(si=document.documentMode);var tk=d&&"TextEvent"in window&&!si,Th=d&&(!eu||si&&8<si&&11>=si),Ah=" ",Dh=!1;function Ih(r,s){switch(r){case"keyup":return ek.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Lh(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Xo=!1;function nk(r,s){switch(r){case"compositionend":return Lh(s);case"keypress":return s.which!==32?null:(Dh=!0,Ah);case"textInput":return r=s.data,r===Ah&&Dh?null:r;default:return null}}function rk(r,s){if(Xo)return r==="compositionend"||!eu&&Ih(r,s)?(r=Ch(),Nl=Kc=Zr=null,Xo=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return Th&&s.locale!=="ko"?null:s.data;default:return null}}var ok={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 Oh(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s==="input"?!!ok[r.type]:s==="textarea"}function _h(r,s,u,f){wt(f),s=Ll(s,"onChange"),0<s.length&&(u=new Yc("onChange","change",null,u,f),r.push({event:u,listeners:s}))}var ii=null,li=null;function sk(r){em(r,0)}function Tl(r){var s=ts(r);if(tt(s))return r}function ik(r,s){if(r==="change")return s}var Mh=!1;if(d){var tu;if(d){var nu="oninput"in document;if(!nu){var $h=document.createElement("div");$h.setAttribute("oninput","return;"),nu=typeof $h.oninput=="function"}tu=nu}else tu=!1;Mh=tu&&(!document.documentMode||9<document.documentMode)}function Fh(){ii&&(ii.detachEvent("onpropertychange",zh),li=ii=null)}function zh(r){if(r.propertyName==="value"&&Tl(li)){var s=[];_h(s,li,r,zn(r)),Ar(sk,s)}}function lk(r,s,u){r==="focusin"?(Fh(),ii=s,li=u,ii.attachEvent("onpropertychange",zh)):r==="focusout"&&Fh()}function ak(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Tl(li)}function ck(r,s){if(r==="click")return Tl(s)}function uk(r,s){if(r==="input"||r==="change")return Tl(s)}function dk(r,s){return r===s&&(r!==0||1/r===1/s)||r!==r&&s!==s}var tr=typeof Object.is=="function"?Object.is:dk;function ai(r,s){if(tr(r,s))return!0;if(typeof r!="object"||r===null||typeof s!="object"||s===null)return!1;var u=Object.keys(r),f=Object.keys(s);if(u.length!==f.length)return!1;for(f=0;f<u.length;f++){var y=u[f];if(!p.call(s,y)||!tr(r[y],s[y]))return!1}return!0}function Bh(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Uh(r,s){var u=Bh(r);r=0;for(var f;u;){if(u.nodeType===3){if(f=r+u.textContent.length,r<=s&&f>=s)return{node:u,offset:s-r};r=f}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=Bh(u)}}function Hh(r,s){return r&&s?r===s?!0:r&&r.nodeType===3?!1:s&&s.nodeType===3?Hh(r,s.parentNode):"contains"in r?r.contains(s):r.compareDocumentPosition?!!(r.compareDocumentPosition(s)&16):!1:!1}function Wh(){for(var r=window,s=Ue();s instanceof r.HTMLIFrameElement;){try{var u=typeof s.contentWindow.location.href=="string"}catch{u=!1}if(u)r=s.contentWindow;else break;s=Ue(r.document)}return s}function ru(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s&&(s==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||s==="textarea"||r.contentEditable==="true")}function fk(r){var s=Wh(),u=r.focusedElem,f=r.selectionRange;if(s!==u&&u&&u.ownerDocument&&Hh(u.ownerDocument.documentElement,u)){if(f!==null&&ru(u)){if(s=f.start,r=f.end,r===void 0&&(r=s),"selectionStart"in u)u.selectionStart=s,u.selectionEnd=Math.min(r,u.value.length);else if(r=(s=u.ownerDocument||document)&&s.defaultView||window,r.getSelection){r=r.getSelection();var y=u.textContent.length,w=Math.min(f.start,y);f=f.end===void 0?w:Math.min(f.end,y),!r.extend&&w>f&&(y=f,f=w,w=y),y=Uh(u,w);var C=Uh(u,f);y&&C&&(r.rangeCount!==1||r.anchorNode!==y.node||r.anchorOffset!==y.offset||r.focusNode!==C.node||r.focusOffset!==C.offset)&&(s=s.createRange(),s.setStart(y.node,y.offset),r.removeAllRanges(),w>f?(r.addRange(s),r.extend(C.node,C.offset)):(s.setEnd(C.node,C.offset),r.addRange(s)))}}for(s=[],r=u;r=r.parentNode;)r.nodeType===1&&s.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof u.focus=="function"&&u.focus(),u=0;u<s.length;u++)r=s[u],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var pk=d&&"documentMode"in document&&11>=document.documentMode,Qo=null,ou=null,ci=null,su=!1;function Vh(r,s,u){var f=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;su||Qo==null||Qo!==Ue(f)||(f=Qo,"selectionStart"in f&&ru(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),ci&&ai(ci,f)||(ci=f,f=Ll(ou,"onSelect"),0<f.length&&(s=new Yc("onSelect","select",null,s,u),r.push({event:s,listeners:f}),s.target=Qo)))}function Al(r,s){var u={};return u[r.toLowerCase()]=s.toLowerCase(),u["Webkit"+r]="webkit"+s,u["Moz"+r]="moz"+s,u}var Jo={animationend:Al("Animation","AnimationEnd"),animationiteration:Al("Animation","AnimationIteration"),animationstart:Al("Animation","AnimationStart"),transitionend:Al("Transition","TransitionEnd")},iu={},qh={};d&&(qh=document.createElement("div").style,"AnimationEvent"in window||(delete Jo.animationend.animation,delete Jo.animationiteration.animation,delete Jo.animationstart.animation),"TransitionEvent"in window||delete Jo.transitionend.transition);function Dl(r){if(iu[r])return iu[r];if(!Jo[r])return r;var s=Jo[r],u;for(u in s)if(s.hasOwnProperty(u)&&u in qh)return iu[r]=s[u];return r}var Gh=Dl("animationend"),Kh=Dl("animationiteration"),Yh=Dl("animationstart"),Xh=Dl("transitionend"),Qh=new Map,Jh="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 eo(r,s){Qh.set(r,s),a(s,[r])}for(var lu=0;lu<Jh.length;lu++){var au=Jh[lu],hk=au.toLowerCase(),mk=au[0].toUpperCase()+au.slice(1);eo(hk,"on"+mk)}eo(Gh,"onAnimationEnd"),eo(Kh,"onAnimationIteration"),eo(Yh,"onAnimationStart"),eo("dblclick","onDoubleClick"),eo("focusin","onFocus"),eo("focusout","onBlur"),eo(Xh,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ui="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(" "),gk=new Set("cancel close invalid load scroll toggle".split(" ").concat(ui));function Zh(r,s,u){var f=r.type||"unknown-event";r.currentTarget=u,h1(f,s,void 0,r),r.currentTarget=null}function em(r,s){s=(s&4)!==0;for(var u=0;u<r.length;u++){var f=r[u],y=f.event;f=f.listeners;e:{var w=void 0;if(s)for(var C=f.length-1;0<=C;C--){var M=f[C],z=M.instance,te=M.currentTarget;if(M=M.listener,z!==w&&y.isPropagationStopped())break e;Zh(y,M,te),w=z}else for(C=0;C<f.length;C++){if(M=f[C],z=M.instance,te=M.currentTarget,M=M.listener,z!==w&&y.isPropagationStopped())break e;Zh(y,M,te),w=z}}}if(An)throw r=Dr,An=!1,Dr=null,r}function rt(r,s){var u=s[gu];u===void 0&&(u=s[gu]=new Set);var f=r+"__bubble";u.has(f)||(tm(s,r,2,!1),u.add(f))}function cu(r,s,u){var f=0;s&&(f|=4),tm(u,r,f,s)}var Il="_reactListening"+Math.random().toString(36).slice(2);function di(r){if(!r[Il]){r[Il]=!0,o.forEach(function(u){u!=="selectionchange"&&(gk.has(u)||cu(u,!1,r),cu(u,!0,r))});var s=r.nodeType===9?r:r.ownerDocument;s===null||s[Il]||(s[Il]=!0,cu("selectionchange",!1,s))}}function tm(r,s,u,f){switch(Sh(s)){case 1:var y=T1;break;case 4:y=A1;break;default:y=qc}u=y.bind(null,s,u,r),y=void 0,!Bn||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(y=!0),f?y!==void 0?r.addEventListener(s,u,{capture:!0,passive:y}):r.addEventListener(s,u,!0):y!==void 0?r.addEventListener(s,u,{passive:y}):r.addEventListener(s,u,!1)}function uu(r,s,u,f,y){var w=f;if((s&1)===0&&(s&2)===0&&f!==null)e:for(;;){if(f===null)return;var C=f.tag;if(C===3||C===4){var M=f.stateNode.containerInfo;if(M===y||M.nodeType===8&&M.parentNode===y)break;if(C===4)for(C=f.return;C!==null;){var z=C.tag;if((z===3||z===4)&&(z=C.stateNode.containerInfo,z===y||z.nodeType===8&&z.parentNode===y))return;C=C.return}for(;M!==null;){if(C=Ro(M),C===null)return;if(z=C.tag,z===5||z===6){f=w=C;continue e}M=M.parentNode}}f=f.return}Ar(function(){var te=w,se=zn(u),ie=[];e:{var oe=Qh.get(r);if(oe!==void 0){var he=Yc,be=r;switch(r){case"keypress":if(El(u)===0)break e;case"keydown":case"keyup":he=q1;break;case"focusin":be="focus",he=Jc;break;case"focusout":be="blur",he=Jc;break;case"beforeblur":case"afterblur":he=Jc;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":he=Eh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":he=L1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":he=Y1;break;case Gh:case Kh:case Yh:he=M1;break;case Xh:he=Q1;break;case"scroll":he=D1;break;case"wheel":he=Z1;break;case"copy":case"cut":case"paste":he=F1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":he=Ph}var we=(s&4)!==0,jt=!we&&r==="scroll",G=we?oe!==null?oe+"Capture":null:oe;we=[];for(var B=te,Q;B!==null;){Q=B;var ue=Q.stateNode;if(Q.tag===5&&ue!==null&&(Q=ue,G!==null&&(ue=ft(B,G),ue!=null&&we.push(fi(B,ue,Q)))),jt)break;B=B.return}0<we.length&&(oe=new he(oe,be,null,u,se),ie.push({event:oe,listeners:we}))}}if((s&7)===0){e:{if(oe=r==="mouseover"||r==="pointerover",he=r==="mouseout"||r==="pointerout",oe&&u!==Oe&&(be=u.relatedTarget||u.fromElement)&&(Ro(be)||be[Ir]))break e;if((he||oe)&&(oe=se.window===se?se:(oe=se.ownerDocument)?oe.defaultView||oe.parentWindow:window,he?(be=u.relatedTarget||u.toElement,he=te,be=be?Ro(be):null,be!==null&&(jt=Eo(be),be!==jt||be.tag!==5&&be.tag!==6)&&(be=null)):(he=null,be=te),he!==be)){if(we=Eh,ue="onMouseLeave",G="onMouseEnter",B="mouse",(r==="pointerout"||r==="pointerover")&&(we=Ph,ue="onPointerLeave",G="onPointerEnter",B="pointer"),jt=he==null?oe:ts(he),Q=be==null?oe:ts(be),oe=new we(ue,B+"leave",he,u,se),oe.target=jt,oe.relatedTarget=Q,ue=null,Ro(se)===te&&(we=new we(G,B+"enter",be,u,se),we.target=Q,we.relatedTarget=jt,ue=we),jt=ue,he&&be)t:{for(we=he,G=be,B=0,Q=we;Q;Q=Zo(Q))B++;for(Q=0,ue=G;ue;ue=Zo(ue))Q++;for(;0<B-Q;)we=Zo(we),B--;for(;0<Q-B;)G=Zo(G),Q--;for(;B--;){if(we===G||G!==null&&we===G.alternate)break t;we=Zo(we),G=Zo(G)}we=null}else we=null;he!==null&&nm(ie,oe,he,we,!1),be!==null&&jt!==null&&nm(ie,jt,be,we,!0)}}e:{if(oe=te?ts(te):window,he=oe.nodeName&&oe.nodeName.toLowerCase(),he==="select"||he==="input"&&oe.type==="file")var Se=ik;else if(Oh(oe))if(Mh)Se=uk;else{Se=ak;var Te=lk}else(he=oe.nodeName)&&he.toLowerCase()==="input"&&(oe.type==="checkbox"||oe.type==="radio")&&(Se=ck);if(Se&&(Se=Se(r,te))){_h(ie,Se,u,se);break e}Te&&Te(r,oe,te),r==="focusout"&&(Te=oe._wrapperState)&&Te.controlled&&oe.type==="number"&&Xe(oe,"number",oe.value)}switch(Te=te?ts(te):window,r){case"focusin":(Oh(Te)||Te.contentEditable==="true")&&(Qo=Te,ou=te,ci=null);break;case"focusout":ci=ou=Qo=null;break;case"mousedown":su=!0;break;case"contextmenu":case"mouseup":case"dragend":su=!1,Vh(ie,u,se);break;case"selectionchange":if(pk)break;case"keydown":case"keyup":Vh(ie,u,se)}var Ae;if(eu)e:{switch(r){case"compositionstart":var Ie="onCompositionStart";break e;case"compositionend":Ie="onCompositionEnd";break e;case"compositionupdate":Ie="onCompositionUpdate";break e}Ie=void 0}else Xo?Ih(r,u)&&(Ie="onCompositionEnd"):r==="keydown"&&u.keyCode===229&&(Ie="onCompositionStart");Ie&&(Th&&u.locale!=="ko"&&(Xo||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&Xo&&(Ae=Ch()):(Zr=se,Kc="value"in Zr?Zr.value:Zr.textContent,Xo=!0)),Te=Ll(te,Ie),0<Te.length&&(Ie=new Rh(Ie,r,null,u,se),ie.push({event:Ie,listeners:Te}),Ae?Ie.data=Ae:(Ae=Lh(u),Ae!==null&&(Ie.data=Ae)))),(Ae=tk?nk(r,u):rk(r,u))&&(te=Ll(te,"onBeforeInput"),0<te.length&&(se=new Rh("onBeforeInput","beforeinput",null,u,se),ie.push({event:se,listeners:te}),se.data=Ae))}em(ie,s)})}function fi(r,s,u){return{instance:r,listener:s,currentTarget:u}}function Ll(r,s){for(var u=s+"Capture",f=[];r!==null;){var y=r,w=y.stateNode;y.tag===5&&w!==null&&(y=w,w=ft(r,u),w!=null&&f.unshift(fi(r,w,y)),w=ft(r,s),w!=null&&f.push(fi(r,w,y))),r=r.return}return f}function Zo(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function nm(r,s,u,f,y){for(var w=s._reactName,C=[];u!==null&&u!==f;){var M=u,z=M.alternate,te=M.stateNode;if(z!==null&&z===f)break;M.tag===5&&te!==null&&(M=te,y?(z=ft(u,w),z!=null&&C.unshift(fi(u,z,M))):y||(z=ft(u,w),z!=null&&C.push(fi(u,z,M)))),u=u.return}C.length!==0&&r.push({event:s,listeners:C})}var xk=/\r\n?/g,yk=/\u0000|\uFFFD/g;function rm(r){return(typeof r=="string"?r:""+r).replace(xk,`
|
|
38
|
-
`).replace(yk,"")}function Ol(r,s,u){if(s=rm(s),rm(r)!==s&&u)throw Error(n(425))}function _l(){}var du=null,fu=null;function pu(r,s){return r==="textarea"||r==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var hu=typeof setTimeout=="function"?setTimeout:void 0,vk=typeof clearTimeout=="function"?clearTimeout:void 0,om=typeof Promise=="function"?Promise:void 0,bk=typeof queueMicrotask=="function"?queueMicrotask:typeof om<"u"?function(r){return om.resolve(null).then(r).catch(wk)}:hu;function wk(r){setTimeout(function(){throw r})}function mu(r,s){var u=s,f=0;do{var y=u.nextSibling;if(r.removeChild(u),y&&y.nodeType===8)if(u=y.data,u==="/$"){if(f===0){r.removeChild(y),ni(s);return}f--}else u!=="$"&&u!=="$?"&&u!=="$!"||f++;u=y}while(u);ni(s)}function to(r){for(;r!=null;r=r.nextSibling){var s=r.nodeType;if(s===1||s===3)break;if(s===8){if(s=r.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return r}function sm(r){r=r.previousSibling;for(var s=0;r;){if(r.nodeType===8){var u=r.data;if(u==="$"||u==="$!"||u==="$?"){if(s===0)return r;s--}else u==="/$"&&s++}r=r.previousSibling}return null}var es=Math.random().toString(36).slice(2),mr="__reactFiber$"+es,pi="__reactProps$"+es,Ir="__reactContainer$"+es,gu="__reactEvents$"+es,kk="__reactListeners$"+es,jk="__reactHandles$"+es;function Ro(r){var s=r[mr];if(s)return s;for(var u=r.parentNode;u;){if(s=u[Ir]||u[mr]){if(u=s.alternate,s.child!==null||u!==null&&u.child!==null)for(r=sm(r);r!==null;){if(u=r[mr])return u;r=sm(r)}return s}r=u,u=r.parentNode}return null}function hi(r){return r=r[mr]||r[Ir],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function ts(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(n(33))}function Ml(r){return r[pi]||null}var xu=[],ns=-1;function no(r){return{current:r}}function ot(r){0>ns||(r.current=xu[ns],xu[ns]=null,ns--)}function Qe(r,s){ns++,xu[ns]=r.current,r.current=s}var ro={},nn=no(ro),xn=no(!1),Po=ro;function rs(r,s){var u=r.type.contextTypes;if(!u)return ro;var f=r.stateNode;if(f&&f.__reactInternalMemoizedUnmaskedChildContext===s)return f.__reactInternalMemoizedMaskedChildContext;var y={},w;for(w in u)y[w]=s[w];return f&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=s,r.__reactInternalMemoizedMaskedChildContext=y),y}function yn(r){return r=r.childContextTypes,r!=null}function $l(){ot(xn),ot(nn)}function im(r,s,u){if(nn.current!==ro)throw Error(n(168));Qe(nn,s),Qe(xn,u)}function lm(r,s,u){var f=r.stateNode;if(s=s.childContextTypes,typeof f.getChildContext!="function")return u;f=f.getChildContext();for(var y in f)if(!(y in s))throw Error(n(108,Ee(r)||"Unknown",y));return R({},u,f)}function Fl(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||ro,Po=nn.current,Qe(nn,r),Qe(xn,xn.current),!0}function am(r,s,u){var f=r.stateNode;if(!f)throw Error(n(169));u?(r=lm(r,s,Po),f.__reactInternalMemoizedMergedChildContext=r,ot(xn),ot(nn),Qe(nn,r)):ot(xn),Qe(xn,u)}var Lr=null,zl=!1,yu=!1;function cm(r){Lr===null?Lr=[r]:Lr.push(r)}function Sk(r){zl=!0,cm(r)}function oo(){if(!yu&&Lr!==null){yu=!0;var r=0,s=Ge;try{var u=Lr;for(Ge=1;r<u.length;r++){var f=u[r];do f=f(!0);while(f!==null)}Lr=null,zl=!1}catch(y){throw Lr!==null&&(Lr=Lr.slice(r+1)),dh(zc,oo),y}finally{Ge=s,yu=!1}}return null}var os=[],ss=0,Bl=null,Ul=0,Un=[],Hn=0,To=null,Or=1,_r="";function Ao(r,s){os[ss++]=Ul,os[ss++]=Bl,Bl=r,Ul=s}function um(r,s,u){Un[Hn++]=Or,Un[Hn++]=_r,Un[Hn++]=To,To=r;var f=Or;r=_r;var y=32-er(f)-1;f&=~(1<<y),u+=1;var w=32-er(s)+y;if(30<w){var C=y-y%5;w=(f&(1<<C)-1).toString(32),f>>=C,y-=C,Or=1<<32-er(s)+y|u<<y|f,_r=w+r}else Or=1<<w|u<<y|f,_r=r}function vu(r){r.return!==null&&(Ao(r,1),um(r,1,0))}function bu(r){for(;r===Bl;)Bl=os[--ss],os[ss]=null,Ul=os[--ss],os[ss]=null;for(;r===To;)To=Un[--Hn],Un[Hn]=null,_r=Un[--Hn],Un[Hn]=null,Or=Un[--Hn],Un[Hn]=null}var In=null,Ln=null,lt=!1,nr=null;function dm(r,s){var u=Gn(5,null,null,0);u.elementType="DELETED",u.stateNode=s,u.return=r,s=r.deletions,s===null?(r.deletions=[u],r.flags|=16):s.push(u)}function fm(r,s){switch(r.tag){case 5:var u=r.type;return s=s.nodeType!==1||u.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(r.stateNode=s,In=r,Ln=to(s.firstChild),!0):!1;case 6:return s=r.pendingProps===""||s.nodeType!==3?null:s,s!==null?(r.stateNode=s,In=r,Ln=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(u=To!==null?{id:Or,overflow:_r}:null,r.memoizedState={dehydrated:s,treeContext:u,retryLane:1073741824},u=Gn(18,null,null,0),u.stateNode=s,u.return=r,r.child=u,In=r,Ln=null,!0):!1;default:return!1}}function wu(r){return(r.mode&1)!==0&&(r.flags&128)===0}function ku(r){if(lt){var s=Ln;if(s){var u=s;if(!fm(r,s)){if(wu(r))throw Error(n(418));s=to(u.nextSibling);var f=In;s&&fm(r,s)?dm(f,u):(r.flags=r.flags&-4097|2,lt=!1,In=r)}}else{if(wu(r))throw Error(n(418));r.flags=r.flags&-4097|2,lt=!1,In=r}}}function pm(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;In=r}function Hl(r){if(r!==In)return!1;if(!lt)return pm(r),lt=!0,!1;var s;if((s=r.tag!==3)&&!(s=r.tag!==5)&&(s=r.type,s=s!=="head"&&s!=="body"&&!pu(r.type,r.memoizedProps)),s&&(s=Ln)){if(wu(r))throw hm(),Error(n(418));for(;s;)dm(r,s),s=to(s.nextSibling)}if(pm(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(n(317));e:{for(r=r.nextSibling,s=0;r;){if(r.nodeType===8){var u=r.data;if(u==="/$"){if(s===0){Ln=to(r.nextSibling);break e}s--}else u!=="$"&&u!=="$!"&&u!=="$?"||s++}r=r.nextSibling}Ln=null}}else Ln=In?to(r.stateNode.nextSibling):null;return!0}function hm(){for(var r=Ln;r;)r=to(r.nextSibling)}function is(){Ln=In=null,lt=!1}function ju(r){nr===null?nr=[r]:nr.push(r)}var Ck=L.ReactCurrentBatchConfig;function mi(r,s,u){if(r=u.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(u._owner){if(u=u._owner,u){if(u.tag!==1)throw Error(n(309));var f=u.stateNode}if(!f)throw Error(n(147,r));var y=f,w=""+r;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===w?s.ref:(s=function(C){var M=y.refs;C===null?delete M[w]:M[w]=C},s._stringRef=w,s)}if(typeof r!="string")throw Error(n(284));if(!u._owner)throw Error(n(290,r))}return r}function Wl(r,s){throw r=Object.prototype.toString.call(s),Error(n(31,r==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":r))}function mm(r){var s=r._init;return s(r._payload)}function gm(r){function s(G,B){if(r){var Q=G.deletions;Q===null?(G.deletions=[B],G.flags|=16):Q.push(B)}}function u(G,B){if(!r)return null;for(;B!==null;)s(G,B),B=B.sibling;return null}function f(G,B){for(G=new Map;B!==null;)B.key!==null?G.set(B.key,B):G.set(B.index,B),B=B.sibling;return G}function y(G,B){return G=po(G,B),G.index=0,G.sibling=null,G}function w(G,B,Q){return G.index=Q,r?(Q=G.alternate,Q!==null?(Q=Q.index,Q<B?(G.flags|=2,B):Q):(G.flags|=2,B)):(G.flags|=1048576,B)}function C(G){return r&&G.alternate===null&&(G.flags|=2),G}function M(G,B,Q,ue){return B===null||B.tag!==6?(B=hd(Q,G.mode,ue),B.return=G,B):(B=y(B,Q),B.return=G,B)}function z(G,B,Q,ue){var Se=Q.type;return Se===$?se(G,B,Q.props.children,ue,Q.key):B!==null&&(B.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===D&&mm(Se)===B.type)?(ue=y(B,Q.props),ue.ref=mi(G,B,Q),ue.return=G,ue):(ue=ha(Q.type,Q.key,Q.props,null,G.mode,ue),ue.ref=mi(G,B,Q),ue.return=G,ue)}function te(G,B,Q,ue){return B===null||B.tag!==4||B.stateNode.containerInfo!==Q.containerInfo||B.stateNode.implementation!==Q.implementation?(B=md(Q,G.mode,ue),B.return=G,B):(B=y(B,Q.children||[]),B.return=G,B)}function se(G,B,Q,ue,Se){return B===null||B.tag!==7?(B=Fo(Q,G.mode,ue,Se),B.return=G,B):(B=y(B,Q),B.return=G,B)}function ie(G,B,Q){if(typeof B=="string"&&B!==""||typeof B=="number")return B=hd(""+B,G.mode,Q),B.return=G,B;if(typeof B=="object"&&B!==null){switch(B.$$typeof){case O:return Q=ha(B.type,B.key,B.props,null,G.mode,Q),Q.ref=mi(G,null,B),Q.return=G,Q;case P:return B=md(B,G.mode,Q),B.return=G,B;case D:var ue=B._init;return ie(G,ue(B._payload),Q)}if(nt(B)||ee(B))return B=Fo(B,G.mode,Q,null),B.return=G,B;Wl(G,B)}return null}function oe(G,B,Q,ue){var Se=B!==null?B.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number")return Se!==null?null:M(G,B,""+Q,ue);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case O:return Q.key===Se?z(G,B,Q,ue):null;case P:return Q.key===Se?te(G,B,Q,ue):null;case D:return Se=Q._init,oe(G,B,Se(Q._payload),ue)}if(nt(Q)||ee(Q))return Se!==null?null:se(G,B,Q,ue,null);Wl(G,Q)}return null}function he(G,B,Q,ue,Se){if(typeof ue=="string"&&ue!==""||typeof ue=="number")return G=G.get(Q)||null,M(B,G,""+ue,Se);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case O:return G=G.get(ue.key===null?Q:ue.key)||null,z(B,G,ue,Se);case P:return G=G.get(ue.key===null?Q:ue.key)||null,te(B,G,ue,Se);case D:var Te=ue._init;return he(G,B,Q,Te(ue._payload),Se)}if(nt(ue)||ee(ue))return G=G.get(Q)||null,se(B,G,ue,Se,null);Wl(B,ue)}return null}function be(G,B,Q,ue){for(var Se=null,Te=null,Ae=B,Ie=B=0,zt=null;Ae!==null&&Ie<Q.length;Ie++){Ae.index>Ie?(zt=Ae,Ae=null):zt=Ae.sibling;var We=oe(G,Ae,Q[Ie],ue);if(We===null){Ae===null&&(Ae=zt);break}r&&Ae&&We.alternate===null&&s(G,Ae),B=w(We,B,Ie),Te===null?Se=We:Te.sibling=We,Te=We,Ae=zt}if(Ie===Q.length)return u(G,Ae),lt&&Ao(G,Ie),Se;if(Ae===null){for(;Ie<Q.length;Ie++)Ae=ie(G,Q[Ie],ue),Ae!==null&&(B=w(Ae,B,Ie),Te===null?Se=Ae:Te.sibling=Ae,Te=Ae);return lt&&Ao(G,Ie),Se}for(Ae=f(G,Ae);Ie<Q.length;Ie++)zt=he(Ae,G,Ie,Q[Ie],ue),zt!==null&&(r&&zt.alternate!==null&&Ae.delete(zt.key===null?Ie:zt.key),B=w(zt,B,Ie),Te===null?Se=zt:Te.sibling=zt,Te=zt);return r&&Ae.forEach(function(ho){return s(G,ho)}),lt&&Ao(G,Ie),Se}function we(G,B,Q,ue){var Se=ee(Q);if(typeof Se!="function")throw Error(n(150));if(Q=Se.call(Q),Q==null)throw Error(n(151));for(var Te=Se=null,Ae=B,Ie=B=0,zt=null,We=Q.next();Ae!==null&&!We.done;Ie++,We=Q.next()){Ae.index>Ie?(zt=Ae,Ae=null):zt=Ae.sibling;var ho=oe(G,Ae,We.value,ue);if(ho===null){Ae===null&&(Ae=zt);break}r&&Ae&&ho.alternate===null&&s(G,Ae),B=w(ho,B,Ie),Te===null?Se=ho:Te.sibling=ho,Te=ho,Ae=zt}if(We.done)return u(G,Ae),lt&&Ao(G,Ie),Se;if(Ae===null){for(;!We.done;Ie++,We=Q.next())We=ie(G,We.value,ue),We!==null&&(B=w(We,B,Ie),Te===null?Se=We:Te.sibling=We,Te=We);return lt&&Ao(G,Ie),Se}for(Ae=f(G,Ae);!We.done;Ie++,We=Q.next())We=he(Ae,G,Ie,We.value,ue),We!==null&&(r&&We.alternate!==null&&Ae.delete(We.key===null?Ie:We.key),B=w(We,B,Ie),Te===null?Se=We:Te.sibling=We,Te=We);return r&&Ae.forEach(function(oj){return s(G,oj)}),lt&&Ao(G,Ie),Se}function jt(G,B,Q,ue){if(typeof Q=="object"&&Q!==null&&Q.type===$&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case O:e:{for(var Se=Q.key,Te=B;Te!==null;){if(Te.key===Se){if(Se=Q.type,Se===$){if(Te.tag===7){u(G,Te.sibling),B=y(Te,Q.props.children),B.return=G,G=B;break e}}else if(Te.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===D&&mm(Se)===Te.type){u(G,Te.sibling),B=y(Te,Q.props),B.ref=mi(G,Te,Q),B.return=G,G=B;break e}u(G,Te);break}else s(G,Te);Te=Te.sibling}Q.type===$?(B=Fo(Q.props.children,G.mode,ue,Q.key),B.return=G,G=B):(ue=ha(Q.type,Q.key,Q.props,null,G.mode,ue),ue.ref=mi(G,B,Q),ue.return=G,G=ue)}return C(G);case P:e:{for(Te=Q.key;B!==null;){if(B.key===Te)if(B.tag===4&&B.stateNode.containerInfo===Q.containerInfo&&B.stateNode.implementation===Q.implementation){u(G,B.sibling),B=y(B,Q.children||[]),B.return=G,G=B;break e}else{u(G,B);break}else s(G,B);B=B.sibling}B=md(Q,G.mode,ue),B.return=G,G=B}return C(G);case D:return Te=Q._init,jt(G,B,Te(Q._payload),ue)}if(nt(Q))return be(G,B,Q,ue);if(ee(Q))return we(G,B,Q,ue);Wl(G,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"?(Q=""+Q,B!==null&&B.tag===6?(u(G,B.sibling),B=y(B,Q),B.return=G,G=B):(u(G,B),B=hd(Q,G.mode,ue),B.return=G,G=B),C(G)):u(G,B)}return jt}var ls=gm(!0),xm=gm(!1),Vl=no(null),ql=null,as=null,Su=null;function Cu(){Su=as=ql=null}function Nu(r){var s=Vl.current;ot(Vl),r._currentValue=s}function Eu(r,s,u){for(;r!==null;){var f=r.alternate;if((r.childLanes&s)!==s?(r.childLanes|=s,f!==null&&(f.childLanes|=s)):f!==null&&(f.childLanes&s)!==s&&(f.childLanes|=s),r===u)break;r=r.return}}function cs(r,s){ql=r,Su=as=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&s)!==0&&(vn=!0),r.firstContext=null)}function Wn(r){var s=r._currentValue;if(Su!==r)if(r={context:r,memoizedValue:s,next:null},as===null){if(ql===null)throw Error(n(308));as=r,ql.dependencies={lanes:0,firstContext:r}}else as=as.next=r;return s}var Do=null;function Ru(r){Do===null?Do=[r]:Do.push(r)}function ym(r,s,u,f){var y=s.interleaved;return y===null?(u.next=u,Ru(s)):(u.next=y.next,y.next=u),s.interleaved=u,Mr(r,f)}function Mr(r,s){r.lanes|=s;var u=r.alternate;for(u!==null&&(u.lanes|=s),u=r,r=r.return;r!==null;)r.childLanes|=s,u=r.alternate,u!==null&&(u.childLanes|=s),u=r,r=r.return;return u.tag===3?u.stateNode:null}var so=!1;function Pu(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function vm(r,s){r=r.updateQueue,s.updateQueue===r&&(s.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function $r(r,s){return{eventTime:r,lane:s,tag:0,payload:null,callback:null,next:null}}function io(r,s,u){var f=r.updateQueue;if(f===null)return null;if(f=f.shared,(He&2)!==0){var y=f.pending;return y===null?s.next=s:(s.next=y.next,y.next=s),f.pending=s,Mr(r,u)}return y=f.interleaved,y===null?(s.next=s,Ru(f)):(s.next=y.next,y.next=s),f.interleaved=s,Mr(r,u)}function Gl(r,s,u){if(s=s.updateQueue,s!==null&&(s=s.shared,(u&4194240)!==0)){var f=s.lanes;f&=r.pendingLanes,u|=f,s.lanes=u,Hc(r,u)}}function bm(r,s){var u=r.updateQueue,f=r.alternate;if(f!==null&&(f=f.updateQueue,u===f)){var y=null,w=null;if(u=u.firstBaseUpdate,u!==null){do{var C={eventTime:u.eventTime,lane:u.lane,tag:u.tag,payload:u.payload,callback:u.callback,next:null};w===null?y=w=C:w=w.next=C,u=u.next}while(u!==null);w===null?y=w=s:w=w.next=s}else y=w=s;u={baseState:f.baseState,firstBaseUpdate:y,lastBaseUpdate:w,shared:f.shared,effects:f.effects},r.updateQueue=u;return}r=u.lastBaseUpdate,r===null?u.firstBaseUpdate=s:r.next=s,u.lastBaseUpdate=s}function Kl(r,s,u,f){var y=r.updateQueue;so=!1;var w=y.firstBaseUpdate,C=y.lastBaseUpdate,M=y.shared.pending;if(M!==null){y.shared.pending=null;var z=M,te=z.next;z.next=null,C===null?w=te:C.next=te,C=z;var se=r.alternate;se!==null&&(se=se.updateQueue,M=se.lastBaseUpdate,M!==C&&(M===null?se.firstBaseUpdate=te:M.next=te,se.lastBaseUpdate=z))}if(w!==null){var ie=y.baseState;C=0,se=te=z=null,M=w;do{var oe=M.lane,he=M.eventTime;if((f&oe)===oe){se!==null&&(se=se.next={eventTime:he,lane:0,tag:M.tag,payload:M.payload,callback:M.callback,next:null});e:{var be=r,we=M;switch(oe=s,he=u,we.tag){case 1:if(be=we.payload,typeof be=="function"){ie=be.call(he,ie,oe);break e}ie=be;break e;case 3:be.flags=be.flags&-65537|128;case 0:if(be=we.payload,oe=typeof be=="function"?be.call(he,ie,oe):be,oe==null)break e;ie=R({},ie,oe);break e;case 2:so=!0}}M.callback!==null&&M.lane!==0&&(r.flags|=64,oe=y.effects,oe===null?y.effects=[M]:oe.push(M))}else he={eventTime:he,lane:oe,tag:M.tag,payload:M.payload,callback:M.callback,next:null},se===null?(te=se=he,z=ie):se=se.next=he,C|=oe;if(M=M.next,M===null){if(M=y.shared.pending,M===null)break;oe=M,M=oe.next,oe.next=null,y.lastBaseUpdate=oe,y.shared.pending=null}}while(!0);if(se===null&&(z=ie),y.baseState=z,y.firstBaseUpdate=te,y.lastBaseUpdate=se,s=y.shared.interleaved,s!==null){y=s;do C|=y.lane,y=y.next;while(y!==s)}else w===null&&(y.shared.lanes=0);Oo|=C,r.lanes=C,r.memoizedState=ie}}function wm(r,s,u){if(r=s.effects,s.effects=null,r!==null)for(s=0;s<r.length;s++){var f=r[s],y=f.callback;if(y!==null){if(f.callback=null,f=u,typeof y!="function")throw Error(n(191,y));y.call(f)}}}var gi={},gr=no(gi),xi=no(gi),yi=no(gi);function Io(r){if(r===gi)throw Error(n(174));return r}function Tu(r,s){switch(Qe(yi,s),Qe(xi,r),Qe(gr,gi),r=s.nodeType,r){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:le(null,"");break;default:r=r===8?s.parentNode:s,s=r.namespaceURI||null,r=r.tagName,s=le(s,r)}ot(gr),Qe(gr,s)}function us(){ot(gr),ot(xi),ot(yi)}function km(r){Io(yi.current);var s=Io(gr.current),u=le(s,r.type);s!==u&&(Qe(xi,r),Qe(gr,u))}function Au(r){xi.current===r&&(ot(gr),ot(xi))}var pt=no(0);function Yl(r){for(var s=r;s!==null;){if(s.tag===13){var u=s.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||u.data==="$?"||u.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Du=[];function Iu(){for(var r=0;r<Du.length;r++)Du[r]._workInProgressVersionPrimary=null;Du.length=0}var Xl=L.ReactCurrentDispatcher,Lu=L.ReactCurrentBatchConfig,Lo=0,ht=null,Tt=null,$t=null,Ql=!1,vi=!1,bi=0,Nk=0;function rn(){throw Error(n(321))}function Ou(r,s){if(s===null)return!1;for(var u=0;u<s.length&&u<r.length;u++)if(!tr(r[u],s[u]))return!1;return!0}function _u(r,s,u,f,y,w){if(Lo=w,ht=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Xl.current=r===null||r.memoizedState===null?Tk:Ak,r=u(f,y),vi){w=0;do{if(vi=!1,bi=0,25<=w)throw Error(n(301));w+=1,$t=Tt=null,s.updateQueue=null,Xl.current=Dk,r=u(f,y)}while(vi)}if(Xl.current=ea,s=Tt!==null&&Tt.next!==null,Lo=0,$t=Tt=ht=null,Ql=!1,s)throw Error(n(300));return r}function Mu(){var r=bi!==0;return bi=0,r}function xr(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $t===null?ht.memoizedState=$t=r:$t=$t.next=r,$t}function Vn(){if(Tt===null){var r=ht.alternate;r=r!==null?r.memoizedState:null}else r=Tt.next;var s=$t===null?ht.memoizedState:$t.next;if(s!==null)$t=s,Tt=r;else{if(r===null)throw Error(n(310));Tt=r,r={memoizedState:Tt.memoizedState,baseState:Tt.baseState,baseQueue:Tt.baseQueue,queue:Tt.queue,next:null},$t===null?ht.memoizedState=$t=r:$t=$t.next=r}return $t}function wi(r,s){return typeof s=="function"?s(r):s}function $u(r){var s=Vn(),u=s.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var f=Tt,y=f.baseQueue,w=u.pending;if(w!==null){if(y!==null){var C=y.next;y.next=w.next,w.next=C}f.baseQueue=y=w,u.pending=null}if(y!==null){w=y.next,f=f.baseState;var M=C=null,z=null,te=w;do{var se=te.lane;if((Lo&se)===se)z!==null&&(z=z.next={lane:0,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),f=te.hasEagerState?te.eagerState:r(f,te.action);else{var ie={lane:se,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null};z===null?(M=z=ie,C=f):z=z.next=ie,ht.lanes|=se,Oo|=se}te=te.next}while(te!==null&&te!==w);z===null?C=f:z.next=M,tr(f,s.memoizedState)||(vn=!0),s.memoizedState=f,s.baseState=C,s.baseQueue=z,u.lastRenderedState=f}if(r=u.interleaved,r!==null){y=r;do w=y.lane,ht.lanes|=w,Oo|=w,y=y.next;while(y!==r)}else y===null&&(u.lanes=0);return[s.memoizedState,u.dispatch]}function Fu(r){var s=Vn(),u=s.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var f=u.dispatch,y=u.pending,w=s.memoizedState;if(y!==null){u.pending=null;var C=y=y.next;do w=r(w,C.action),C=C.next;while(C!==y);tr(w,s.memoizedState)||(vn=!0),s.memoizedState=w,s.baseQueue===null&&(s.baseState=w),u.lastRenderedState=w}return[w,f]}function jm(){}function Sm(r,s){var u=ht,f=Vn(),y=s(),w=!tr(f.memoizedState,y);if(w&&(f.memoizedState=y,vn=!0),f=f.queue,zu(Em.bind(null,u,f,r),[r]),f.getSnapshot!==s||w||$t!==null&&$t.memoizedState.tag&1){if(u.flags|=2048,ki(9,Nm.bind(null,u,f,y,s),void 0,null),Ft===null)throw Error(n(349));(Lo&30)!==0||Cm(u,s,y)}return y}function Cm(r,s,u){r.flags|=16384,r={getSnapshot:s,value:u},s=ht.updateQueue,s===null?(s={lastEffect:null,stores:null},ht.updateQueue=s,s.stores=[r]):(u=s.stores,u===null?s.stores=[r]:u.push(r))}function Nm(r,s,u,f){s.value=u,s.getSnapshot=f,Rm(s)&&Pm(r)}function Em(r,s,u){return u(function(){Rm(s)&&Pm(r)})}function Rm(r){var s=r.getSnapshot;r=r.value;try{var u=s();return!tr(r,u)}catch{return!0}}function Pm(r){var s=Mr(r,1);s!==null&&ir(s,r,1,-1)}function Tm(r){var s=xr();return typeof r=="function"&&(r=r()),s.memoizedState=s.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:wi,lastRenderedState:r},s.queue=r,r=r.dispatch=Pk.bind(null,ht,r),[s.memoizedState,r]}function ki(r,s,u,f){return r={tag:r,create:s,destroy:u,deps:f,next:null},s=ht.updateQueue,s===null?(s={lastEffect:null,stores:null},ht.updateQueue=s,s.lastEffect=r.next=r):(u=s.lastEffect,u===null?s.lastEffect=r.next=r:(f=u.next,u.next=r,r.next=f,s.lastEffect=r)),r}function Am(){return Vn().memoizedState}function Jl(r,s,u,f){var y=xr();ht.flags|=r,y.memoizedState=ki(1|s,u,void 0,f===void 0?null:f)}function Zl(r,s,u,f){var y=Vn();f=f===void 0?null:f;var w=void 0;if(Tt!==null){var C=Tt.memoizedState;if(w=C.destroy,f!==null&&Ou(f,C.deps)){y.memoizedState=ki(s,u,w,f);return}}ht.flags|=r,y.memoizedState=ki(1|s,u,w,f)}function Dm(r,s){return Jl(8390656,8,r,s)}function zu(r,s){return Zl(2048,8,r,s)}function Im(r,s){return Zl(4,2,r,s)}function Lm(r,s){return Zl(4,4,r,s)}function Om(r,s){if(typeof s=="function")return r=r(),s(r),function(){s(null)};if(s!=null)return r=r(),s.current=r,function(){s.current=null}}function _m(r,s,u){return u=u!=null?u.concat([r]):null,Zl(4,4,Om.bind(null,s,r),u)}function Bu(){}function Mm(r,s){var u=Vn();s=s===void 0?null:s;var f=u.memoizedState;return f!==null&&s!==null&&Ou(s,f[1])?f[0]:(u.memoizedState=[r,s],r)}function $m(r,s){var u=Vn();s=s===void 0?null:s;var f=u.memoizedState;return f!==null&&s!==null&&Ou(s,f[1])?f[0]:(r=r(),u.memoizedState=[r,s],r)}function Fm(r,s,u){return(Lo&21)===0?(r.baseState&&(r.baseState=!1,vn=!0),r.memoizedState=u):(tr(u,s)||(u=mh(),ht.lanes|=u,Oo|=u,r.baseState=!0),s)}function Ek(r,s){var u=Ge;Ge=u!==0&&4>u?u:4,r(!0);var f=Lu.transition;Lu.transition={};try{r(!1),s()}finally{Ge=u,Lu.transition=f}}function zm(){return Vn().memoizedState}function Rk(r,s,u){var f=uo(r);if(u={lane:f,action:u,hasEagerState:!1,eagerState:null,next:null},Bm(r))Um(s,u);else if(u=ym(r,s,u,f),u!==null){var y=dn();ir(u,r,f,y),Hm(u,s,f)}}function Pk(r,s,u){var f=uo(r),y={lane:f,action:u,hasEagerState:!1,eagerState:null,next:null};if(Bm(r))Um(s,y);else{var w=r.alternate;if(r.lanes===0&&(w===null||w.lanes===0)&&(w=s.lastRenderedReducer,w!==null))try{var C=s.lastRenderedState,M=w(C,u);if(y.hasEagerState=!0,y.eagerState=M,tr(M,C)){var z=s.interleaved;z===null?(y.next=y,Ru(s)):(y.next=z.next,z.next=y),s.interleaved=y;return}}catch{}finally{}u=ym(r,s,y,f),u!==null&&(y=dn(),ir(u,r,f,y),Hm(u,s,f))}}function Bm(r){var s=r.alternate;return r===ht||s!==null&&s===ht}function Um(r,s){vi=Ql=!0;var u=r.pending;u===null?s.next=s:(s.next=u.next,u.next=s),r.pending=s}function Hm(r,s,u){if((u&4194240)!==0){var f=s.lanes;f&=r.pendingLanes,u|=f,s.lanes=u,Hc(r,u)}}var ea={readContext:Wn,useCallback:rn,useContext:rn,useEffect:rn,useImperativeHandle:rn,useInsertionEffect:rn,useLayoutEffect:rn,useMemo:rn,useReducer:rn,useRef:rn,useState:rn,useDebugValue:rn,useDeferredValue:rn,useTransition:rn,useMutableSource:rn,useSyncExternalStore:rn,useId:rn,unstable_isNewReconciler:!1},Tk={readContext:Wn,useCallback:function(r,s){return xr().memoizedState=[r,s===void 0?null:s],r},useContext:Wn,useEffect:Dm,useImperativeHandle:function(r,s,u){return u=u!=null?u.concat([r]):null,Jl(4194308,4,Om.bind(null,s,r),u)},useLayoutEffect:function(r,s){return Jl(4194308,4,r,s)},useInsertionEffect:function(r,s){return Jl(4,2,r,s)},useMemo:function(r,s){var u=xr();return s=s===void 0?null:s,r=r(),u.memoizedState=[r,s],r},useReducer:function(r,s,u){var f=xr();return s=u!==void 0?u(s):s,f.memoizedState=f.baseState=s,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:s},f.queue=r,r=r.dispatch=Rk.bind(null,ht,r),[f.memoizedState,r]},useRef:function(r){var s=xr();return r={current:r},s.memoizedState=r},useState:Tm,useDebugValue:Bu,useDeferredValue:function(r){return xr().memoizedState=r},useTransition:function(){var r=Tm(!1),s=r[0];return r=Ek.bind(null,r[1]),xr().memoizedState=r,[s,r]},useMutableSource:function(){},useSyncExternalStore:function(r,s,u){var f=ht,y=xr();if(lt){if(u===void 0)throw Error(n(407));u=u()}else{if(u=s(),Ft===null)throw Error(n(349));(Lo&30)!==0||Cm(f,s,u)}y.memoizedState=u;var w={value:u,getSnapshot:s};return y.queue=w,Dm(Em.bind(null,f,w,r),[r]),f.flags|=2048,ki(9,Nm.bind(null,f,w,u,s),void 0,null),u},useId:function(){var r=xr(),s=Ft.identifierPrefix;if(lt){var u=_r,f=Or;u=(f&~(1<<32-er(f)-1)).toString(32)+u,s=":"+s+"R"+u,u=bi++,0<u&&(s+="H"+u.toString(32)),s+=":"}else u=Nk++,s=":"+s+"r"+u.toString(32)+":";return r.memoizedState=s},unstable_isNewReconciler:!1},Ak={readContext:Wn,useCallback:Mm,useContext:Wn,useEffect:zu,useImperativeHandle:_m,useInsertionEffect:Im,useLayoutEffect:Lm,useMemo:$m,useReducer:$u,useRef:Am,useState:function(){return $u(wi)},useDebugValue:Bu,useDeferredValue:function(r){var s=Vn();return Fm(s,Tt.memoizedState,r)},useTransition:function(){var r=$u(wi)[0],s=Vn().memoizedState;return[r,s]},useMutableSource:jm,useSyncExternalStore:Sm,useId:zm,unstable_isNewReconciler:!1},Dk={readContext:Wn,useCallback:Mm,useContext:Wn,useEffect:zu,useImperativeHandle:_m,useInsertionEffect:Im,useLayoutEffect:Lm,useMemo:$m,useReducer:Fu,useRef:Am,useState:function(){return Fu(wi)},useDebugValue:Bu,useDeferredValue:function(r){var s=Vn();return Tt===null?s.memoizedState=r:Fm(s,Tt.memoizedState,r)},useTransition:function(){var r=Fu(wi)[0],s=Vn().memoizedState;return[r,s]},useMutableSource:jm,useSyncExternalStore:Sm,useId:zm,unstable_isNewReconciler:!1};function rr(r,s){if(r&&r.defaultProps){s=R({},s),r=r.defaultProps;for(var u in r)s[u]===void 0&&(s[u]=r[u]);return s}return s}function Uu(r,s,u,f){s=r.memoizedState,u=u(f,s),u=u==null?s:R({},s,u),r.memoizedState=u,r.lanes===0&&(r.updateQueue.baseState=u)}var ta={isMounted:function(r){return(r=r._reactInternals)?Eo(r)===r:!1},enqueueSetState:function(r,s,u){r=r._reactInternals;var f=dn(),y=uo(r),w=$r(f,y);w.payload=s,u!=null&&(w.callback=u),s=io(r,w,y),s!==null&&(ir(s,r,y,f),Gl(s,r,y))},enqueueReplaceState:function(r,s,u){r=r._reactInternals;var f=dn(),y=uo(r),w=$r(f,y);w.tag=1,w.payload=s,u!=null&&(w.callback=u),s=io(r,w,y),s!==null&&(ir(s,r,y,f),Gl(s,r,y))},enqueueForceUpdate:function(r,s){r=r._reactInternals;var u=dn(),f=uo(r),y=$r(u,f);y.tag=2,s!=null&&(y.callback=s),s=io(r,y,f),s!==null&&(ir(s,r,f,u),Gl(s,r,f))}};function Wm(r,s,u,f,y,w,C){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(f,w,C):s.prototype&&s.prototype.isPureReactComponent?!ai(u,f)||!ai(y,w):!0}function Vm(r,s,u){var f=!1,y=ro,w=s.contextType;return typeof w=="object"&&w!==null?w=Wn(w):(y=yn(s)?Po:nn.current,f=s.contextTypes,w=(f=f!=null)?rs(r,y):ro),s=new s(u,w),r.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=ta,r.stateNode=s,s._reactInternals=r,f&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=y,r.__reactInternalMemoizedMaskedChildContext=w),s}function qm(r,s,u,f){r=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(u,f),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(u,f),s.state!==r&&ta.enqueueReplaceState(s,s.state,null)}function Hu(r,s,u,f){var y=r.stateNode;y.props=u,y.state=r.memoizedState,y.refs={},Pu(r);var w=s.contextType;typeof w=="object"&&w!==null?y.context=Wn(w):(w=yn(s)?Po:nn.current,y.context=rs(r,w)),y.state=r.memoizedState,w=s.getDerivedStateFromProps,typeof w=="function"&&(Uu(r,s,w,u),y.state=r.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(s=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),s!==y.state&&ta.enqueueReplaceState(y,y.state,null),Kl(r,u,y,f),y.state=r.memoizedState),typeof y.componentDidMount=="function"&&(r.flags|=4194308)}function ds(r,s){try{var u="",f=s;do u+=ve(f),f=f.return;while(f);var y=u}catch(w){y=`
|
|
39
|
-
Error generating stack: `+w.message+`
|
|
40
|
-
`+w.stack}return{value:r,source:s,stack:y,digest:null}}function Wu(r,s,u){return{value:r,source:null,stack:u??null,digest:s??null}}function Vu(r,s){try{console.error(s.value)}catch(u){setTimeout(function(){throw u})}}var Ik=typeof WeakMap=="function"?WeakMap:Map;function Gm(r,s,u){u=$r(-1,u),u.tag=3,u.payload={element:null};var f=s.value;return u.callback=function(){aa||(aa=!0,id=f),Vu(r,s)},u}function Km(r,s,u){u=$r(-1,u),u.tag=3;var f=r.type.getDerivedStateFromError;if(typeof f=="function"){var y=s.value;u.payload=function(){return f(y)},u.callback=function(){Vu(r,s)}}var w=r.stateNode;return w!==null&&typeof w.componentDidCatch=="function"&&(u.callback=function(){Vu(r,s),typeof f!="function"&&(ao===null?ao=new Set([this]):ao.add(this));var C=s.stack;this.componentDidCatch(s.value,{componentStack:C!==null?C:""})}),u}function Ym(r,s,u){var f=r.pingCache;if(f===null){f=r.pingCache=new Ik;var y=new Set;f.set(s,y)}else y=f.get(s),y===void 0&&(y=new Set,f.set(s,y));y.has(u)||(y.add(u),r=Gk.bind(null,r,s,u),s.then(r,r))}function Xm(r){do{var s;if((s=r.tag===13)&&(s=r.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return r;r=r.return}while(r!==null);return null}function Qm(r,s,u,f,y){return(r.mode&1)===0?(r===s?r.flags|=65536:(r.flags|=128,u.flags|=131072,u.flags&=-52805,u.tag===1&&(u.alternate===null?u.tag=17:(s=$r(-1,1),s.tag=2,io(u,s,1))),u.lanes|=1),r):(r.flags|=65536,r.lanes=y,r)}var Lk=L.ReactCurrentOwner,vn=!1;function un(r,s,u,f){s.child=r===null?xm(s,null,u,f):ls(s,r.child,u,f)}function Jm(r,s,u,f,y){u=u.render;var w=s.ref;return cs(s,y),f=_u(r,s,u,f,w,y),u=Mu(),r!==null&&!vn?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~y,Fr(r,s,y)):(lt&&u&&vu(s),s.flags|=1,un(r,s,f,y),s.child)}function Zm(r,s,u,f,y){if(r===null){var w=u.type;return typeof w=="function"&&!pd(w)&&w.defaultProps===void 0&&u.compare===null&&u.defaultProps===void 0?(s.tag=15,s.type=w,eg(r,s,w,f,y)):(r=ha(u.type,null,f,s,s.mode,y),r.ref=s.ref,r.return=s,s.child=r)}if(w=r.child,(r.lanes&y)===0){var C=w.memoizedProps;if(u=u.compare,u=u!==null?u:ai,u(C,f)&&r.ref===s.ref)return Fr(r,s,y)}return s.flags|=1,r=po(w,f),r.ref=s.ref,r.return=s,s.child=r}function eg(r,s,u,f,y){if(r!==null){var w=r.memoizedProps;if(ai(w,f)&&r.ref===s.ref)if(vn=!1,s.pendingProps=f=w,(r.lanes&y)!==0)(r.flags&131072)!==0&&(vn=!0);else return s.lanes=r.lanes,Fr(r,s,y)}return qu(r,s,u,f,y)}function tg(r,s,u){var f=s.pendingProps,y=f.children,w=r!==null?r.memoizedState:null;if(f.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},Qe(ps,On),On|=u;else{if((u&1073741824)===0)return r=w!==null?w.baseLanes|u:u,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:r,cachePool:null,transitions:null},s.updateQueue=null,Qe(ps,On),On|=r,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=w!==null?w.baseLanes:u,Qe(ps,On),On|=f}else w!==null?(f=w.baseLanes|u,s.memoizedState=null):f=u,Qe(ps,On),On|=f;return un(r,s,y,u),s.child}function ng(r,s){var u=s.ref;(r===null&&u!==null||r!==null&&r.ref!==u)&&(s.flags|=512,s.flags|=2097152)}function qu(r,s,u,f,y){var w=yn(u)?Po:nn.current;return w=rs(s,w),cs(s,y),u=_u(r,s,u,f,w,y),f=Mu(),r!==null&&!vn?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~y,Fr(r,s,y)):(lt&&f&&vu(s),s.flags|=1,un(r,s,u,y),s.child)}function rg(r,s,u,f,y){if(yn(u)){var w=!0;Fl(s)}else w=!1;if(cs(s,y),s.stateNode===null)ra(r,s),Vm(s,u,f),Hu(s,u,f,y),f=!0;else if(r===null){var C=s.stateNode,M=s.memoizedProps;C.props=M;var z=C.context,te=u.contextType;typeof te=="object"&&te!==null?te=Wn(te):(te=yn(u)?Po:nn.current,te=rs(s,te));var se=u.getDerivedStateFromProps,ie=typeof se=="function"||typeof C.getSnapshotBeforeUpdate=="function";ie||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(M!==f||z!==te)&&qm(s,C,f,te),so=!1;var oe=s.memoizedState;C.state=oe,Kl(s,f,C,y),z=s.memoizedState,M!==f||oe!==z||xn.current||so?(typeof se=="function"&&(Uu(s,u,se,f),z=s.memoizedState),(M=so||Wm(s,u,M,f,oe,z,te))?(ie||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount()),typeof C.componentDidMount=="function"&&(s.flags|=4194308)):(typeof C.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=f,s.memoizedState=z),C.props=f,C.state=z,C.context=te,f=M):(typeof C.componentDidMount=="function"&&(s.flags|=4194308),f=!1)}else{C=s.stateNode,vm(r,s),M=s.memoizedProps,te=s.type===s.elementType?M:rr(s.type,M),C.props=te,ie=s.pendingProps,oe=C.context,z=u.contextType,typeof z=="object"&&z!==null?z=Wn(z):(z=yn(u)?Po:nn.current,z=rs(s,z));var he=u.getDerivedStateFromProps;(se=typeof he=="function"||typeof C.getSnapshotBeforeUpdate=="function")||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(M!==ie||oe!==z)&&qm(s,C,f,z),so=!1,oe=s.memoizedState,C.state=oe,Kl(s,f,C,y);var be=s.memoizedState;M!==ie||oe!==be||xn.current||so?(typeof he=="function"&&(Uu(s,u,he,f),be=s.memoizedState),(te=so||Wm(s,u,te,f,oe,be,z)||!1)?(se||typeof C.UNSAFE_componentWillUpdate!="function"&&typeof C.componentWillUpdate!="function"||(typeof C.componentWillUpdate=="function"&&C.componentWillUpdate(f,be,z),typeof C.UNSAFE_componentWillUpdate=="function"&&C.UNSAFE_componentWillUpdate(f,be,z)),typeof C.componentDidUpdate=="function"&&(s.flags|=4),typeof C.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof C.componentDidUpdate!="function"||M===r.memoizedProps&&oe===r.memoizedState||(s.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||M===r.memoizedProps&&oe===r.memoizedState||(s.flags|=1024),s.memoizedProps=f,s.memoizedState=be),C.props=f,C.state=be,C.context=z,f=te):(typeof C.componentDidUpdate!="function"||M===r.memoizedProps&&oe===r.memoizedState||(s.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||M===r.memoizedProps&&oe===r.memoizedState||(s.flags|=1024),f=!1)}return Gu(r,s,u,f,w,y)}function Gu(r,s,u,f,y,w){ng(r,s);var C=(s.flags&128)!==0;if(!f&&!C)return y&&am(s,u,!1),Fr(r,s,w);f=s.stateNode,Lk.current=s;var M=C&&typeof u.getDerivedStateFromError!="function"?null:f.render();return s.flags|=1,r!==null&&C?(s.child=ls(s,r.child,null,w),s.child=ls(s,null,M,w)):un(r,s,M,w),s.memoizedState=f.state,y&&am(s,u,!0),s.child}function og(r){var s=r.stateNode;s.pendingContext?im(r,s.pendingContext,s.pendingContext!==s.context):s.context&&im(r,s.context,!1),Tu(r,s.containerInfo)}function sg(r,s,u,f,y){return is(),ju(y),s.flags|=256,un(r,s,u,f),s.child}var Ku={dehydrated:null,treeContext:null,retryLane:0};function Yu(r){return{baseLanes:r,cachePool:null,transitions:null}}function ig(r,s,u){var f=s.pendingProps,y=pt.current,w=!1,C=(s.flags&128)!==0,M;if((M=C)||(M=r!==null&&r.memoizedState===null?!1:(y&2)!==0),M?(w=!0,s.flags&=-129):(r===null||r.memoizedState!==null)&&(y|=1),Qe(pt,y&1),r===null)return ku(s),r=s.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?((s.mode&1)===0?s.lanes=1:r.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(C=f.children,r=f.fallback,w?(f=s.mode,w=s.child,C={mode:"hidden",children:C},(f&1)===0&&w!==null?(w.childLanes=0,w.pendingProps=C):w=ma(C,f,0,null),r=Fo(r,f,u,null),w.return=s,r.return=s,w.sibling=r,s.child=w,s.child.memoizedState=Yu(u),s.memoizedState=Ku,r):Xu(s,C));if(y=r.memoizedState,y!==null&&(M=y.dehydrated,M!==null))return Ok(r,s,C,f,M,y,u);if(w){w=f.fallback,C=s.mode,y=r.child,M=y.sibling;var z={mode:"hidden",children:f.children};return(C&1)===0&&s.child!==y?(f=s.child,f.childLanes=0,f.pendingProps=z,s.deletions=null):(f=po(y,z),f.subtreeFlags=y.subtreeFlags&14680064),M!==null?w=po(M,w):(w=Fo(w,C,u,null),w.flags|=2),w.return=s,f.return=s,f.sibling=w,s.child=f,f=w,w=s.child,C=r.child.memoizedState,C=C===null?Yu(u):{baseLanes:C.baseLanes|u,cachePool:null,transitions:C.transitions},w.memoizedState=C,w.childLanes=r.childLanes&~u,s.memoizedState=Ku,f}return w=r.child,r=w.sibling,f=po(w,{mode:"visible",children:f.children}),(s.mode&1)===0&&(f.lanes=u),f.return=s,f.sibling=null,r!==null&&(u=s.deletions,u===null?(s.deletions=[r],s.flags|=16):u.push(r)),s.child=f,s.memoizedState=null,f}function Xu(r,s){return s=ma({mode:"visible",children:s},r.mode,0,null),s.return=r,r.child=s}function na(r,s,u,f){return f!==null&&ju(f),ls(s,r.child,null,u),r=Xu(s,s.pendingProps.children),r.flags|=2,s.memoizedState=null,r}function Ok(r,s,u,f,y,w,C){if(u)return s.flags&256?(s.flags&=-257,f=Wu(Error(n(422))),na(r,s,C,f)):s.memoizedState!==null?(s.child=r.child,s.flags|=128,null):(w=f.fallback,y=s.mode,f=ma({mode:"visible",children:f.children},y,0,null),w=Fo(w,y,C,null),w.flags|=2,f.return=s,w.return=s,f.sibling=w,s.child=f,(s.mode&1)!==0&&ls(s,r.child,null,C),s.child.memoizedState=Yu(C),s.memoizedState=Ku,w);if((s.mode&1)===0)return na(r,s,C,null);if(y.data==="$!"){if(f=y.nextSibling&&y.nextSibling.dataset,f)var M=f.dgst;return f=M,w=Error(n(419)),f=Wu(w,f,void 0),na(r,s,C,f)}if(M=(C&r.childLanes)!==0,vn||M){if(f=Ft,f!==null){switch(C&-C){case 4:y=2;break;case 16:y=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:y=32;break;case 536870912:y=268435456;break;default:y=0}y=(y&(f.suspendedLanes|C))!==0?0:y,y!==0&&y!==w.retryLane&&(w.retryLane=y,Mr(r,y),ir(f,r,y,-1))}return fd(),f=Wu(Error(n(421))),na(r,s,C,f)}return y.data==="$?"?(s.flags|=128,s.child=r.child,s=Kk.bind(null,r),y._reactRetry=s,null):(r=w.treeContext,Ln=to(y.nextSibling),In=s,lt=!0,nr=null,r!==null&&(Un[Hn++]=Or,Un[Hn++]=_r,Un[Hn++]=To,Or=r.id,_r=r.overflow,To=s),s=Xu(s,f.children),s.flags|=4096,s)}function lg(r,s,u){r.lanes|=s;var f=r.alternate;f!==null&&(f.lanes|=s),Eu(r.return,s,u)}function Qu(r,s,u,f,y){var w=r.memoizedState;w===null?r.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:f,tail:u,tailMode:y}:(w.isBackwards=s,w.rendering=null,w.renderingStartTime=0,w.last=f,w.tail=u,w.tailMode=y)}function ag(r,s,u){var f=s.pendingProps,y=f.revealOrder,w=f.tail;if(un(r,s,f.children,u),f=pt.current,(f&2)!==0)f=f&1|2,s.flags|=128;else{if(r!==null&&(r.flags&128)!==0)e:for(r=s.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&lg(r,u,s);else if(r.tag===19)lg(r,u,s);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===s)break e;for(;r.sibling===null;){if(r.return===null||r.return===s)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}f&=1}if(Qe(pt,f),(s.mode&1)===0)s.memoizedState=null;else switch(y){case"forwards":for(u=s.child,y=null;u!==null;)r=u.alternate,r!==null&&Yl(r)===null&&(y=u),u=u.sibling;u=y,u===null?(y=s.child,s.child=null):(y=u.sibling,u.sibling=null),Qu(s,!1,y,u,w);break;case"backwards":for(u=null,y=s.child,s.child=null;y!==null;){if(r=y.alternate,r!==null&&Yl(r)===null){s.child=y;break}r=y.sibling,y.sibling=u,u=y,y=r}Qu(s,!0,u,null,w);break;case"together":Qu(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function ra(r,s){(s.mode&1)===0&&r!==null&&(r.alternate=null,s.alternate=null,s.flags|=2)}function Fr(r,s,u){if(r!==null&&(s.dependencies=r.dependencies),Oo|=s.lanes,(u&s.childLanes)===0)return null;if(r!==null&&s.child!==r.child)throw Error(n(153));if(s.child!==null){for(r=s.child,u=po(r,r.pendingProps),s.child=u,u.return=s;r.sibling!==null;)r=r.sibling,u=u.sibling=po(r,r.pendingProps),u.return=s;u.sibling=null}return s.child}function _k(r,s,u){switch(s.tag){case 3:og(s),is();break;case 5:km(s);break;case 1:yn(s.type)&&Fl(s);break;case 4:Tu(s,s.stateNode.containerInfo);break;case 10:var f=s.type._context,y=s.memoizedProps.value;Qe(Vl,f._currentValue),f._currentValue=y;break;case 13:if(f=s.memoizedState,f!==null)return f.dehydrated!==null?(Qe(pt,pt.current&1),s.flags|=128,null):(u&s.child.childLanes)!==0?ig(r,s,u):(Qe(pt,pt.current&1),r=Fr(r,s,u),r!==null?r.sibling:null);Qe(pt,pt.current&1);break;case 19:if(f=(u&s.childLanes)!==0,(r.flags&128)!==0){if(f)return ag(r,s,u);s.flags|=128}if(y=s.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),Qe(pt,pt.current),f)break;return null;case 22:case 23:return s.lanes=0,tg(r,s,u)}return Fr(r,s,u)}var cg,Ju,ug,dg;cg=function(r,s){for(var u=s.child;u!==null;){if(u.tag===5||u.tag===6)r.appendChild(u.stateNode);else if(u.tag!==4&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===s)break;for(;u.sibling===null;){if(u.return===null||u.return===s)return;u=u.return}u.sibling.return=u.return,u=u.sibling}},Ju=function(){},ug=function(r,s,u,f){var y=r.memoizedProps;if(y!==f){r=s.stateNode,Io(gr.current);var w=null;switch(u){case"input":y=Be(r,y),f=Be(r,f),w=[];break;case"select":y=R({},y,{value:void 0}),f=R({},f,{value:void 0}),w=[];break;case"textarea":y=Qt(r,y),f=Qt(r,f),w=[];break;default:typeof y.onClick!="function"&&typeof f.onClick=="function"&&(r.onclick=_l)}ae(u,f);var C;u=null;for(te in y)if(!f.hasOwnProperty(te)&&y.hasOwnProperty(te)&&y[te]!=null)if(te==="style"){var M=y[te];for(C in M)M.hasOwnProperty(C)&&(u||(u={}),u[C]="")}else te!=="dangerouslySetInnerHTML"&&te!=="children"&&te!=="suppressContentEditableWarning"&&te!=="suppressHydrationWarning"&&te!=="autoFocus"&&(i.hasOwnProperty(te)?w||(w=[]):(w=w||[]).push(te,null));for(te in f){var z=f[te];if(M=y!=null?y[te]:void 0,f.hasOwnProperty(te)&&z!==M&&(z!=null||M!=null))if(te==="style")if(M){for(C in M)!M.hasOwnProperty(C)||z&&z.hasOwnProperty(C)||(u||(u={}),u[C]="");for(C in z)z.hasOwnProperty(C)&&M[C]!==z[C]&&(u||(u={}),u[C]=z[C])}else u||(w||(w=[]),w.push(te,u)),u=z;else te==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,M=M?M.__html:void 0,z!=null&&M!==z&&(w=w||[]).push(te,z)):te==="children"?typeof z!="string"&&typeof z!="number"||(w=w||[]).push(te,""+z):te!=="suppressContentEditableWarning"&&te!=="suppressHydrationWarning"&&(i.hasOwnProperty(te)?(z!=null&&te==="onScroll"&&rt("scroll",r),w||M===z||(w=[])):(w=w||[]).push(te,z))}u&&(w=w||[]).push("style",u);var te=w;(s.updateQueue=te)&&(s.flags|=4)}},dg=function(r,s,u,f){u!==f&&(s.flags|=4)};function ji(r,s){if(!lt)switch(r.tailMode){case"hidden":s=r.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?r.tail=null:u.sibling=null;break;case"collapsed":u=r.tail;for(var f=null;u!==null;)u.alternate!==null&&(f=u),u=u.sibling;f===null?s||r.tail===null?r.tail=null:r.tail.sibling=null:f.sibling=null}}function on(r){var s=r.alternate!==null&&r.alternate.child===r.child,u=0,f=0;if(s)for(var y=r.child;y!==null;)u|=y.lanes|y.childLanes,f|=y.subtreeFlags&14680064,f|=y.flags&14680064,y.return=r,y=y.sibling;else for(y=r.child;y!==null;)u|=y.lanes|y.childLanes,f|=y.subtreeFlags,f|=y.flags,y.return=r,y=y.sibling;return r.subtreeFlags|=f,r.childLanes=u,s}function Mk(r,s,u){var f=s.pendingProps;switch(bu(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return on(s),null;case 1:return yn(s.type)&&$l(),on(s),null;case 3:return f=s.stateNode,us(),ot(xn),ot(nn),Iu(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(r===null||r.child===null)&&(Hl(s)?s.flags|=4:r===null||r.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,nr!==null&&(cd(nr),nr=null))),Ju(r,s),on(s),null;case 5:Au(s);var y=Io(yi.current);if(u=s.type,r!==null&&s.stateNode!=null)ug(r,s,u,f,y),r.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!f){if(s.stateNode===null)throw Error(n(166));return on(s),null}if(r=Io(gr.current),Hl(s)){f=s.stateNode,u=s.type;var w=s.memoizedProps;switch(f[mr]=s,f[pi]=w,r=(s.mode&1)!==0,u){case"dialog":rt("cancel",f),rt("close",f);break;case"iframe":case"object":case"embed":rt("load",f);break;case"video":case"audio":for(y=0;y<ui.length;y++)rt(ui[y],f);break;case"source":rt("error",f);break;case"img":case"image":case"link":rt("error",f),rt("load",f);break;case"details":rt("toggle",f);break;case"input":Ct(f,w),rt("invalid",f);break;case"select":f._wrapperState={wasMultiple:!!w.multiple},rt("invalid",f);break;case"textarea":mn(f,w),rt("invalid",f)}ae(u,w),y=null;for(var C in w)if(w.hasOwnProperty(C)){var M=w[C];C==="children"?typeof M=="string"?f.textContent!==M&&(w.suppressHydrationWarning!==!0&&Ol(f.textContent,M,r),y=["children",M]):typeof M=="number"&&f.textContent!==""+M&&(w.suppressHydrationWarning!==!0&&Ol(f.textContent,M,r),y=["children",""+M]):i.hasOwnProperty(C)&&M!=null&&C==="onScroll"&&rt("scroll",f)}switch(u){case"input":ut(f),hn(f,w,!0);break;case"textarea":ut(f),Tn(f);break;case"select":case"option":break;default:typeof w.onClick=="function"&&(f.onclick=_l)}f=y,s.updateQueue=f,f!==null&&(s.flags|=4)}else{C=y.nodeType===9?y:y.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=re(u)),r==="http://www.w3.org/1999/xhtml"?u==="script"?(r=C.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof f.is=="string"?r=C.createElement(u,{is:f.is}):(r=C.createElement(u),u==="select"&&(C=r,f.multiple?C.multiple=!0:f.size&&(C.size=f.size))):r=C.createElementNS(r,u),r[mr]=s,r[pi]=f,cg(r,s,!1,!1),s.stateNode=r;e:{switch(C=ge(u,f),u){case"dialog":rt("cancel",r),rt("close",r),y=f;break;case"iframe":case"object":case"embed":rt("load",r),y=f;break;case"video":case"audio":for(y=0;y<ui.length;y++)rt(ui[y],r);y=f;break;case"source":rt("error",r),y=f;break;case"img":case"image":case"link":rt("error",r),rt("load",r),y=f;break;case"details":rt("toggle",r),y=f;break;case"input":Ct(r,f),y=Be(r,f),rt("invalid",r);break;case"option":y=f;break;case"select":r._wrapperState={wasMultiple:!!f.multiple},y=R({},f,{value:void 0}),rt("invalid",r);break;case"textarea":mn(r,f),y=Qt(r,f),rt("invalid",r);break;default:y=f}ae(u,y),M=y;for(w in M)if(M.hasOwnProperty(w)){var z=M[w];w==="style"?qt(r,z):w==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,z!=null&&ne(r,z)):w==="children"?typeof z=="string"?(u!=="textarea"||z!=="")&&me(r,z):typeof z=="number"&&me(r,""+z):w!=="suppressContentEditableWarning"&&w!=="suppressHydrationWarning"&&w!=="autoFocus"&&(i.hasOwnProperty(w)?z!=null&&w==="onScroll"&&rt("scroll",r):z!=null&&A(r,w,z,C))}switch(u){case"input":ut(r),hn(r,f,!1);break;case"textarea":ut(r),Tn(r);break;case"option":f.value!=null&&r.setAttribute("value",""+Ne(f.value));break;case"select":r.multiple=!!f.multiple,w=f.value,w!=null?Vt(r,!!f.multiple,w,!1):f.defaultValue!=null&&Vt(r,!!f.multiple,f.defaultValue,!0);break;default:typeof y.onClick=="function"&&(r.onclick=_l)}switch(u){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}}f&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return on(s),null;case 6:if(r&&s.stateNode!=null)dg(r,s,r.memoizedProps,f);else{if(typeof f!="string"&&s.stateNode===null)throw Error(n(166));if(u=Io(yi.current),Io(gr.current),Hl(s)){if(f=s.stateNode,u=s.memoizedProps,f[mr]=s,(w=f.nodeValue!==u)&&(r=In,r!==null))switch(r.tag){case 3:Ol(f.nodeValue,u,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&Ol(f.nodeValue,u,(r.mode&1)!==0)}w&&(s.flags|=4)}else f=(u.nodeType===9?u:u.ownerDocument).createTextNode(f),f[mr]=s,s.stateNode=f}return on(s),null;case 13:if(ot(pt),f=s.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(lt&&Ln!==null&&(s.mode&1)!==0&&(s.flags&128)===0)hm(),is(),s.flags|=98560,w=!1;else if(w=Hl(s),f!==null&&f.dehydrated!==null){if(r===null){if(!w)throw Error(n(318));if(w=s.memoizedState,w=w!==null?w.dehydrated:null,!w)throw Error(n(317));w[mr]=s}else is(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;on(s),w=!1}else nr!==null&&(cd(nr),nr=null),w=!0;if(!w)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=u,s):(f=f!==null,f!==(r!==null&&r.memoizedState!==null)&&f&&(s.child.flags|=8192,(s.mode&1)!==0&&(r===null||(pt.current&1)!==0?At===0&&(At=3):fd())),s.updateQueue!==null&&(s.flags|=4),on(s),null);case 4:return us(),Ju(r,s),r===null&&di(s.stateNode.containerInfo),on(s),null;case 10:return Nu(s.type._context),on(s),null;case 17:return yn(s.type)&&$l(),on(s),null;case 19:if(ot(pt),w=s.memoizedState,w===null)return on(s),null;if(f=(s.flags&128)!==0,C=w.rendering,C===null)if(f)ji(w,!1);else{if(At!==0||r!==null&&(r.flags&128)!==0)for(r=s.child;r!==null;){if(C=Yl(r),C!==null){for(s.flags|=128,ji(w,!1),f=C.updateQueue,f!==null&&(s.updateQueue=f,s.flags|=4),s.subtreeFlags=0,f=u,u=s.child;u!==null;)w=u,r=f,w.flags&=14680066,C=w.alternate,C===null?(w.childLanes=0,w.lanes=r,w.child=null,w.subtreeFlags=0,w.memoizedProps=null,w.memoizedState=null,w.updateQueue=null,w.dependencies=null,w.stateNode=null):(w.childLanes=C.childLanes,w.lanes=C.lanes,w.child=C.child,w.subtreeFlags=0,w.deletions=null,w.memoizedProps=C.memoizedProps,w.memoizedState=C.memoizedState,w.updateQueue=C.updateQueue,w.type=C.type,r=C.dependencies,w.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),u=u.sibling;return Qe(pt,pt.current&1|2),s.child}r=r.sibling}w.tail!==null&&kt()>hs&&(s.flags|=128,f=!0,ji(w,!1),s.lanes=4194304)}else{if(!f)if(r=Yl(C),r!==null){if(s.flags|=128,f=!0,u=r.updateQueue,u!==null&&(s.updateQueue=u,s.flags|=4),ji(w,!0),w.tail===null&&w.tailMode==="hidden"&&!C.alternate&&!lt)return on(s),null}else 2*kt()-w.renderingStartTime>hs&&u!==1073741824&&(s.flags|=128,f=!0,ji(w,!1),s.lanes=4194304);w.isBackwards?(C.sibling=s.child,s.child=C):(u=w.last,u!==null?u.sibling=C:s.child=C,w.last=C)}return w.tail!==null?(s=w.tail,w.rendering=s,w.tail=s.sibling,w.renderingStartTime=kt(),s.sibling=null,u=pt.current,Qe(pt,f?u&1|2:u&1),s):(on(s),null);case 22:case 23:return dd(),f=s.memoizedState!==null,r!==null&&r.memoizedState!==null!==f&&(s.flags|=8192),f&&(s.mode&1)!==0?(On&1073741824)!==0&&(on(s),s.subtreeFlags&6&&(s.flags|=8192)):on(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function $k(r,s){switch(bu(s),s.tag){case 1:return yn(s.type)&&$l(),r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 3:return us(),ot(xn),ot(nn),Iu(),r=s.flags,(r&65536)!==0&&(r&128)===0?(s.flags=r&-65537|128,s):null;case 5:return Au(s),null;case 13:if(ot(pt),r=s.memoizedState,r!==null&&r.dehydrated!==null){if(s.alternate===null)throw Error(n(340));is()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 19:return ot(pt),null;case 4:return us(),null;case 10:return Nu(s.type._context),null;case 22:case 23:return dd(),null;case 24:return null;default:return null}}var oa=!1,sn=!1,Fk=typeof WeakSet=="function"?WeakSet:Set,xe=null;function fs(r,s){var u=r.ref;if(u!==null)if(typeof u=="function")try{u(null)}catch(f){xt(r,s,f)}else u.current=null}function Zu(r,s,u){try{u()}catch(f){xt(r,s,f)}}var fg=!1;function zk(r,s){if(du=Sl,r=Wh(),ru(r)){if("selectionStart"in r)var u={start:r.selectionStart,end:r.selectionEnd};else e:{u=(u=r.ownerDocument)&&u.defaultView||window;var f=u.getSelection&&u.getSelection();if(f&&f.rangeCount!==0){u=f.anchorNode;var y=f.anchorOffset,w=f.focusNode;f=f.focusOffset;try{u.nodeType,w.nodeType}catch{u=null;break e}var C=0,M=-1,z=-1,te=0,se=0,ie=r,oe=null;t:for(;;){for(var he;ie!==u||y!==0&&ie.nodeType!==3||(M=C+y),ie!==w||f!==0&&ie.nodeType!==3||(z=C+f),ie.nodeType===3&&(C+=ie.nodeValue.length),(he=ie.firstChild)!==null;)oe=ie,ie=he;for(;;){if(ie===r)break t;if(oe===u&&++te===y&&(M=C),oe===w&&++se===f&&(z=C),(he=ie.nextSibling)!==null)break;ie=oe,oe=ie.parentNode}ie=he}u=M===-1||z===-1?null:{start:M,end:z}}else u=null}u=u||{start:0,end:0}}else u=null;for(fu={focusedElem:r,selectionRange:u},Sl=!1,xe=s;xe!==null;)if(s=xe,r=s.child,(s.subtreeFlags&1028)!==0&&r!==null)r.return=s,xe=r;else for(;xe!==null;){s=xe;try{var be=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(be!==null){var we=be.memoizedProps,jt=be.memoizedState,G=s.stateNode,B=G.getSnapshotBeforeUpdate(s.elementType===s.type?we:rr(s.type,we),jt);G.__reactInternalSnapshotBeforeUpdate=B}break;case 3:var Q=s.stateNode.containerInfo;Q.nodeType===1?Q.textContent="":Q.nodeType===9&&Q.documentElement&&Q.removeChild(Q.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ue){xt(s,s.return,ue)}if(r=s.sibling,r!==null){r.return=s.return,xe=r;break}xe=s.return}return be=fg,fg=!1,be}function Si(r,s,u){var f=s.updateQueue;if(f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&r)===r){var w=y.destroy;y.destroy=void 0,w!==void 0&&Zu(s,u,w)}y=y.next}while(y!==f)}}function sa(r,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var u=s=s.next;do{if((u.tag&r)===r){var f=u.create;u.destroy=f()}u=u.next}while(u!==s)}}function ed(r){var s=r.ref;if(s!==null){var u=r.stateNode;switch(r.tag){case 5:r=u;break;default:r=u}typeof s=="function"?s(r):s.current=r}}function pg(r){var s=r.alternate;s!==null&&(r.alternate=null,pg(s)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(s=r.stateNode,s!==null&&(delete s[mr],delete s[pi],delete s[gu],delete s[kk],delete s[jk])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function hg(r){return r.tag===5||r.tag===3||r.tag===4}function mg(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||hg(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function td(r,s,u){var f=r.tag;if(f===5||f===6)r=r.stateNode,s?u.nodeType===8?u.parentNode.insertBefore(r,s):u.insertBefore(r,s):(u.nodeType===8?(s=u.parentNode,s.insertBefore(r,u)):(s=u,s.appendChild(r)),u=u._reactRootContainer,u!=null||s.onclick!==null||(s.onclick=_l));else if(f!==4&&(r=r.child,r!==null))for(td(r,s,u),r=r.sibling;r!==null;)td(r,s,u),r=r.sibling}function nd(r,s,u){var f=r.tag;if(f===5||f===6)r=r.stateNode,s?u.insertBefore(r,s):u.appendChild(r);else if(f!==4&&(r=r.child,r!==null))for(nd(r,s,u),r=r.sibling;r!==null;)nd(r,s,u),r=r.sibling}var Kt=null,or=!1;function lo(r,s,u){for(u=u.child;u!==null;)gg(r,s,u),u=u.sibling}function gg(r,s,u){if(hr&&typeof hr.onCommitFiberUnmount=="function")try{hr.onCommitFiberUnmount(yl,u)}catch{}switch(u.tag){case 5:sn||fs(u,s);case 6:var f=Kt,y=or;Kt=null,lo(r,s,u),Kt=f,or=y,Kt!==null&&(or?(r=Kt,u=u.stateNode,r.nodeType===8?r.parentNode.removeChild(u):r.removeChild(u)):Kt.removeChild(u.stateNode));break;case 18:Kt!==null&&(or?(r=Kt,u=u.stateNode,r.nodeType===8?mu(r.parentNode,u):r.nodeType===1&&mu(r,u),ni(r)):mu(Kt,u.stateNode));break;case 4:f=Kt,y=or,Kt=u.stateNode.containerInfo,or=!0,lo(r,s,u),Kt=f,or=y;break;case 0:case 11:case 14:case 15:if(!sn&&(f=u.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){y=f=f.next;do{var w=y,C=w.destroy;w=w.tag,C!==void 0&&((w&2)!==0||(w&4)!==0)&&Zu(u,s,C),y=y.next}while(y!==f)}lo(r,s,u);break;case 1:if(!sn&&(fs(u,s),f=u.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=u.memoizedProps,f.state=u.memoizedState,f.componentWillUnmount()}catch(M){xt(u,s,M)}lo(r,s,u);break;case 21:lo(r,s,u);break;case 22:u.mode&1?(sn=(f=sn)||u.memoizedState!==null,lo(r,s,u),sn=f):lo(r,s,u);break;default:lo(r,s,u)}}function xg(r){var s=r.updateQueue;if(s!==null){r.updateQueue=null;var u=r.stateNode;u===null&&(u=r.stateNode=new Fk),s.forEach(function(f){var y=Yk.bind(null,r,f);u.has(f)||(u.add(f),f.then(y,y))})}}function sr(r,s){var u=s.deletions;if(u!==null)for(var f=0;f<u.length;f++){var y=u[f];try{var w=r,C=s,M=C;e:for(;M!==null;){switch(M.tag){case 5:Kt=M.stateNode,or=!1;break e;case 3:Kt=M.stateNode.containerInfo,or=!0;break e;case 4:Kt=M.stateNode.containerInfo,or=!0;break e}M=M.return}if(Kt===null)throw Error(n(160));gg(w,C,y),Kt=null,or=!1;var z=y.alternate;z!==null&&(z.return=null),y.return=null}catch(te){xt(y,s,te)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)yg(s,r),s=s.sibling}function yg(r,s){var u=r.alternate,f=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(sr(s,r),yr(r),f&4){try{Si(3,r,r.return),sa(3,r)}catch(we){xt(r,r.return,we)}try{Si(5,r,r.return)}catch(we){xt(r,r.return,we)}}break;case 1:sr(s,r),yr(r),f&512&&u!==null&&fs(u,u.return);break;case 5:if(sr(s,r),yr(r),f&512&&u!==null&&fs(u,u.return),r.flags&32){var y=r.stateNode;try{me(y,"")}catch(we){xt(r,r.return,we)}}if(f&4&&(y=r.stateNode,y!=null)){var w=r.memoizedProps,C=u!==null?u.memoizedProps:w,M=r.type,z=r.updateQueue;if(r.updateQueue=null,z!==null)try{M==="input"&&w.type==="radio"&&w.name!=null&&Ot(y,w),ge(M,C);var te=ge(M,w);for(C=0;C<z.length;C+=2){var se=z[C],ie=z[C+1];se==="style"?qt(y,ie):se==="dangerouslySetInnerHTML"?ne(y,ie):se==="children"?me(y,ie):A(y,se,ie,te)}switch(M){case"input":cn(y,w);break;case"textarea":Pn(y,w);break;case"select":var oe=y._wrapperState.wasMultiple;y._wrapperState.wasMultiple=!!w.multiple;var he=w.value;he!=null?Vt(y,!!w.multiple,he,!1):oe!==!!w.multiple&&(w.defaultValue!=null?Vt(y,!!w.multiple,w.defaultValue,!0):Vt(y,!!w.multiple,w.multiple?[]:"",!1))}y[pi]=w}catch(we){xt(r,r.return,we)}}break;case 6:if(sr(s,r),yr(r),f&4){if(r.stateNode===null)throw Error(n(162));y=r.stateNode,w=r.memoizedProps;try{y.nodeValue=w}catch(we){xt(r,r.return,we)}}break;case 3:if(sr(s,r),yr(r),f&4&&u!==null&&u.memoizedState.isDehydrated)try{ni(s.containerInfo)}catch(we){xt(r,r.return,we)}break;case 4:sr(s,r),yr(r);break;case 13:sr(s,r),yr(r),y=r.child,y.flags&8192&&(w=y.memoizedState!==null,y.stateNode.isHidden=w,!w||y.alternate!==null&&y.alternate.memoizedState!==null||(sd=kt())),f&4&&xg(r);break;case 22:if(se=u!==null&&u.memoizedState!==null,r.mode&1?(sn=(te=sn)||se,sr(s,r),sn=te):sr(s,r),yr(r),f&8192){if(te=r.memoizedState!==null,(r.stateNode.isHidden=te)&&!se&&(r.mode&1)!==0)for(xe=r,se=r.child;se!==null;){for(ie=xe=se;xe!==null;){switch(oe=xe,he=oe.child,oe.tag){case 0:case 11:case 14:case 15:Si(4,oe,oe.return);break;case 1:fs(oe,oe.return);var be=oe.stateNode;if(typeof be.componentWillUnmount=="function"){f=oe,u=oe.return;try{s=f,be.props=s.memoizedProps,be.state=s.memoizedState,be.componentWillUnmount()}catch(we){xt(f,u,we)}}break;case 5:fs(oe,oe.return);break;case 22:if(oe.memoizedState!==null){wg(ie);continue}}he!==null?(he.return=oe,xe=he):wg(ie)}se=se.sibling}e:for(se=null,ie=r;;){if(ie.tag===5){if(se===null){se=ie;try{y=ie.stateNode,te?(w=y.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none"):(M=ie.stateNode,z=ie.memoizedProps.style,C=z!=null&&z.hasOwnProperty("display")?z.display:null,M.style.display=Jt("display",C))}catch(we){xt(r,r.return,we)}}}else if(ie.tag===6){if(se===null)try{ie.stateNode.nodeValue=te?"":ie.memoizedProps}catch(we){xt(r,r.return,we)}}else if((ie.tag!==22&&ie.tag!==23||ie.memoizedState===null||ie===r)&&ie.child!==null){ie.child.return=ie,ie=ie.child;continue}if(ie===r)break e;for(;ie.sibling===null;){if(ie.return===null||ie.return===r)break e;se===ie&&(se=null),ie=ie.return}se===ie&&(se=null),ie.sibling.return=ie.return,ie=ie.sibling}}break;case 19:sr(s,r),yr(r),f&4&&xg(r);break;case 21:break;default:sr(s,r),yr(r)}}function yr(r){var s=r.flags;if(s&2){try{e:{for(var u=r.return;u!==null;){if(hg(u)){var f=u;break e}u=u.return}throw Error(n(160))}switch(f.tag){case 5:var y=f.stateNode;f.flags&32&&(me(y,""),f.flags&=-33);var w=mg(r);nd(r,w,y);break;case 3:case 4:var C=f.stateNode.containerInfo,M=mg(r);td(r,M,C);break;default:throw Error(n(161))}}catch(z){xt(r,r.return,z)}r.flags&=-3}s&4096&&(r.flags&=-4097)}function Bk(r,s,u){xe=r,vg(r)}function vg(r,s,u){for(var f=(r.mode&1)!==0;xe!==null;){var y=xe,w=y.child;if(y.tag===22&&f){var C=y.memoizedState!==null||oa;if(!C){var M=y.alternate,z=M!==null&&M.memoizedState!==null||sn;M=oa;var te=sn;if(oa=C,(sn=z)&&!te)for(xe=y;xe!==null;)C=xe,z=C.child,C.tag===22&&C.memoizedState!==null?kg(y):z!==null?(z.return=C,xe=z):kg(y);for(;w!==null;)xe=w,vg(w),w=w.sibling;xe=y,oa=M,sn=te}bg(r)}else(y.subtreeFlags&8772)!==0&&w!==null?(w.return=y,xe=w):bg(r)}}function bg(r){for(;xe!==null;){var s=xe;if((s.flags&8772)!==0){var u=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:sn||sa(5,s);break;case 1:var f=s.stateNode;if(s.flags&4&&!sn)if(u===null)f.componentDidMount();else{var y=s.elementType===s.type?u.memoizedProps:rr(s.type,u.memoizedProps);f.componentDidUpdate(y,u.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var w=s.updateQueue;w!==null&&wm(s,w,f);break;case 3:var C=s.updateQueue;if(C!==null){if(u=null,s.child!==null)switch(s.child.tag){case 5:u=s.child.stateNode;break;case 1:u=s.child.stateNode}wm(s,C,u)}break;case 5:var M=s.stateNode;if(u===null&&s.flags&4){u=M;var z=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":z.autoFocus&&u.focus();break;case"img":z.src&&(u.src=z.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var te=s.alternate;if(te!==null){var se=te.memoizedState;if(se!==null){var ie=se.dehydrated;ie!==null&&ni(ie)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}sn||s.flags&512&&ed(s)}catch(oe){xt(s,s.return,oe)}}if(s===r){xe=null;break}if(u=s.sibling,u!==null){u.return=s.return,xe=u;break}xe=s.return}}function wg(r){for(;xe!==null;){var s=xe;if(s===r){xe=null;break}var u=s.sibling;if(u!==null){u.return=s.return,xe=u;break}xe=s.return}}function kg(r){for(;xe!==null;){var s=xe;try{switch(s.tag){case 0:case 11:case 15:var u=s.return;try{sa(4,s)}catch(z){xt(s,u,z)}break;case 1:var f=s.stateNode;if(typeof f.componentDidMount=="function"){var y=s.return;try{f.componentDidMount()}catch(z){xt(s,y,z)}}var w=s.return;try{ed(s)}catch(z){xt(s,w,z)}break;case 5:var C=s.return;try{ed(s)}catch(z){xt(s,C,z)}}}catch(z){xt(s,s.return,z)}if(s===r){xe=null;break}var M=s.sibling;if(M!==null){M.return=s.return,xe=M;break}xe=s.return}}var Uk=Math.ceil,ia=L.ReactCurrentDispatcher,rd=L.ReactCurrentOwner,qn=L.ReactCurrentBatchConfig,He=0,Ft=null,Nt=null,Yt=0,On=0,ps=no(0),At=0,Ci=null,Oo=0,la=0,od=0,Ni=null,bn=null,sd=0,hs=1/0,zr=null,aa=!1,id=null,ao=null,ca=!1,co=null,ua=0,Ei=0,ld=null,da=-1,fa=0;function dn(){return(He&6)!==0?kt():da!==-1?da:da=kt()}function uo(r){return(r.mode&1)===0?1:(He&2)!==0&&Yt!==0?Yt&-Yt:Ck.transition!==null?(fa===0&&(fa=mh()),fa):(r=Ge,r!==0||(r=window.event,r=r===void 0?16:Sh(r.type)),r)}function ir(r,s,u,f){if(50<Ei)throw Ei=0,ld=null,Error(n(185));Qs(r,u,f),((He&2)===0||r!==Ft)&&(r===Ft&&((He&2)===0&&(la|=u),At===4&&fo(r,Yt)),wn(r,f),u===1&&He===0&&(s.mode&1)===0&&(hs=kt()+500,zl&&oo()))}function wn(r,s){var u=r.callbackNode;C1(r,s);var f=wl(r,r===Ft?Yt:0);if(f===0)u!==null&&fh(u),r.callbackNode=null,r.callbackPriority=0;else if(s=f&-f,r.callbackPriority!==s){if(u!=null&&fh(u),s===1)r.tag===0?Sk(Sg.bind(null,r)):cm(Sg.bind(null,r)),bk(function(){(He&6)===0&&oo()}),u=null;else{switch(gh(f)){case 1:u=zc;break;case 4:u=ph;break;case 16:u=xl;break;case 536870912:u=hh;break;default:u=xl}u=Dg(u,jg.bind(null,r))}r.callbackPriority=s,r.callbackNode=u}}function jg(r,s){if(da=-1,fa=0,(He&6)!==0)throw Error(n(327));var u=r.callbackNode;if(ms()&&r.callbackNode!==u)return null;var f=wl(r,r===Ft?Yt:0);if(f===0)return null;if((f&30)!==0||(f&r.expiredLanes)!==0||s)s=pa(r,f);else{s=f;var y=He;He|=2;var w=Ng();(Ft!==r||Yt!==s)&&(zr=null,hs=kt()+500,Mo(r,s));do try{Vk();break}catch(M){Cg(r,M)}while(!0);Cu(),ia.current=w,He=y,Nt!==null?s=0:(Ft=null,Yt=0,s=At)}if(s!==0){if(s===2&&(y=Bc(r),y!==0&&(f=y,s=ad(r,y))),s===1)throw u=Ci,Mo(r,0),fo(r,f),wn(r,kt()),u;if(s===6)fo(r,f);else{if(y=r.current.alternate,(f&30)===0&&!Hk(y)&&(s=pa(r,f),s===2&&(w=Bc(r),w!==0&&(f=w,s=ad(r,w))),s===1))throw u=Ci,Mo(r,0),fo(r,f),wn(r,kt()),u;switch(r.finishedWork=y,r.finishedLanes=f,s){case 0:case 1:throw Error(n(345));case 2:$o(r,bn,zr);break;case 3:if(fo(r,f),(f&130023424)===f&&(s=sd+500-kt(),10<s)){if(wl(r,0)!==0)break;if(y=r.suspendedLanes,(y&f)!==f){dn(),r.pingedLanes|=r.suspendedLanes&y;break}r.timeoutHandle=hu($o.bind(null,r,bn,zr),s);break}$o(r,bn,zr);break;case 4:if(fo(r,f),(f&4194240)===f)break;for(s=r.eventTimes,y=-1;0<f;){var C=31-er(f);w=1<<C,C=s[C],C>y&&(y=C),f&=~w}if(f=y,f=kt()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*Uk(f/1960))-f,10<f){r.timeoutHandle=hu($o.bind(null,r,bn,zr),f);break}$o(r,bn,zr);break;case 5:$o(r,bn,zr);break;default:throw Error(n(329))}}}return wn(r,kt()),r.callbackNode===u?jg.bind(null,r):null}function ad(r,s){var u=Ni;return r.current.memoizedState.isDehydrated&&(Mo(r,s).flags|=256),r=pa(r,s),r!==2&&(s=bn,bn=u,s!==null&&cd(s)),r}function cd(r){bn===null?bn=r:bn.push.apply(bn,r)}function Hk(r){for(var s=r;;){if(s.flags&16384){var u=s.updateQueue;if(u!==null&&(u=u.stores,u!==null))for(var f=0;f<u.length;f++){var y=u[f],w=y.getSnapshot;y=y.value;try{if(!tr(w(),y))return!1}catch{return!1}}}if(u=s.child,s.subtreeFlags&16384&&u!==null)u.return=s,s=u;else{if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function fo(r,s){for(s&=~od,s&=~la,r.suspendedLanes|=s,r.pingedLanes&=~s,r=r.expirationTimes;0<s;){var u=31-er(s),f=1<<u;r[u]=-1,s&=~f}}function Sg(r){if((He&6)!==0)throw Error(n(327));ms();var s=wl(r,0);if((s&1)===0)return wn(r,kt()),null;var u=pa(r,s);if(r.tag!==0&&u===2){var f=Bc(r);f!==0&&(s=f,u=ad(r,f))}if(u===1)throw u=Ci,Mo(r,0),fo(r,s),wn(r,kt()),u;if(u===6)throw Error(n(345));return r.finishedWork=r.current.alternate,r.finishedLanes=s,$o(r,bn,zr),wn(r,kt()),null}function ud(r,s){var u=He;He|=1;try{return r(s)}finally{He=u,He===0&&(hs=kt()+500,zl&&oo())}}function _o(r){co!==null&&co.tag===0&&(He&6)===0&&ms();var s=He;He|=1;var u=qn.transition,f=Ge;try{if(qn.transition=null,Ge=1,r)return r()}finally{Ge=f,qn.transition=u,He=s,(He&6)===0&&oo()}}function dd(){On=ps.current,ot(ps)}function Mo(r,s){r.finishedWork=null,r.finishedLanes=0;var u=r.timeoutHandle;if(u!==-1&&(r.timeoutHandle=-1,vk(u)),Nt!==null)for(u=Nt.return;u!==null;){var f=u;switch(bu(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&$l();break;case 3:us(),ot(xn),ot(nn),Iu();break;case 5:Au(f);break;case 4:us();break;case 13:ot(pt);break;case 19:ot(pt);break;case 10:Nu(f.type._context);break;case 22:case 23:dd()}u=u.return}if(Ft=r,Nt=r=po(r.current,null),Yt=On=s,At=0,Ci=null,od=la=Oo=0,bn=Ni=null,Do!==null){for(s=0;s<Do.length;s++)if(u=Do[s],f=u.interleaved,f!==null){u.interleaved=null;var y=f.next,w=u.pending;if(w!==null){var C=w.next;w.next=y,f.next=C}u.pending=f}Do=null}return r}function Cg(r,s){do{var u=Nt;try{if(Cu(),Xl.current=ea,Ql){for(var f=ht.memoizedState;f!==null;){var y=f.queue;y!==null&&(y.pending=null),f=f.next}Ql=!1}if(Lo=0,$t=Tt=ht=null,vi=!1,bi=0,rd.current=null,u===null||u.return===null){At=1,Ci=s,Nt=null;break}e:{var w=r,C=u.return,M=u,z=s;if(s=Yt,M.flags|=32768,z!==null&&typeof z=="object"&&typeof z.then=="function"){var te=z,se=M,ie=se.tag;if((se.mode&1)===0&&(ie===0||ie===11||ie===15)){var oe=se.alternate;oe?(se.updateQueue=oe.updateQueue,se.memoizedState=oe.memoizedState,se.lanes=oe.lanes):(se.updateQueue=null,se.memoizedState=null)}var he=Xm(C);if(he!==null){he.flags&=-257,Qm(he,C,M,w,s),he.mode&1&&Ym(w,te,s),s=he,z=te;var be=s.updateQueue;if(be===null){var we=new Set;we.add(z),s.updateQueue=we}else be.add(z);break e}else{if((s&1)===0){Ym(w,te,s),fd();break e}z=Error(n(426))}}else if(lt&&M.mode&1){var jt=Xm(C);if(jt!==null){(jt.flags&65536)===0&&(jt.flags|=256),Qm(jt,C,M,w,s),ju(ds(z,M));break e}}w=z=ds(z,M),At!==4&&(At=2),Ni===null?Ni=[w]:Ni.push(w),w=C;do{switch(w.tag){case 3:w.flags|=65536,s&=-s,w.lanes|=s;var G=Gm(w,z,s);bm(w,G);break e;case 1:M=z;var B=w.type,Q=w.stateNode;if((w.flags&128)===0&&(typeof B.getDerivedStateFromError=="function"||Q!==null&&typeof Q.componentDidCatch=="function"&&(ao===null||!ao.has(Q)))){w.flags|=65536,s&=-s,w.lanes|=s;var ue=Km(w,M,s);bm(w,ue);break e}}w=w.return}while(w!==null)}Rg(u)}catch(Se){s=Se,Nt===u&&u!==null&&(Nt=u=u.return);continue}break}while(!0)}function Ng(){var r=ia.current;return ia.current=ea,r===null?ea:r}function fd(){(At===0||At===3||At===2)&&(At=4),Ft===null||(Oo&268435455)===0&&(la&268435455)===0||fo(Ft,Yt)}function pa(r,s){var u=He;He|=2;var f=Ng();(Ft!==r||Yt!==s)&&(zr=null,Mo(r,s));do try{Wk();break}catch(y){Cg(r,y)}while(!0);if(Cu(),He=u,ia.current=f,Nt!==null)throw Error(n(261));return Ft=null,Yt=0,At}function Wk(){for(;Nt!==null;)Eg(Nt)}function Vk(){for(;Nt!==null&&!g1();)Eg(Nt)}function Eg(r){var s=Ag(r.alternate,r,On);r.memoizedProps=r.pendingProps,s===null?Rg(r):Nt=s,rd.current=null}function Rg(r){var s=r;do{var u=s.alternate;if(r=s.return,(s.flags&32768)===0){if(u=Mk(u,s,On),u!==null){Nt=u;return}}else{if(u=$k(u,s),u!==null){u.flags&=32767,Nt=u;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{At=6,Nt=null;return}}if(s=s.sibling,s!==null){Nt=s;return}Nt=s=r}while(s!==null);At===0&&(At=5)}function $o(r,s,u){var f=Ge,y=qn.transition;try{qn.transition=null,Ge=1,qk(r,s,u,f)}finally{qn.transition=y,Ge=f}return null}function qk(r,s,u,f){do ms();while(co!==null);if((He&6)!==0)throw Error(n(327));u=r.finishedWork;var y=r.finishedLanes;if(u===null)return null;if(r.finishedWork=null,r.finishedLanes=0,u===r.current)throw Error(n(177));r.callbackNode=null,r.callbackPriority=0;var w=u.lanes|u.childLanes;if(N1(r,w),r===Ft&&(Nt=Ft=null,Yt=0),(u.subtreeFlags&2064)===0&&(u.flags&2064)===0||ca||(ca=!0,Dg(xl,function(){return ms(),null})),w=(u.flags&15990)!==0,(u.subtreeFlags&15990)!==0||w){w=qn.transition,qn.transition=null;var C=Ge;Ge=1;var M=He;He|=4,rd.current=null,zk(r,u),yg(u,r),fk(fu),Sl=!!du,fu=du=null,r.current=u,Bk(u),x1(),He=M,Ge=C,qn.transition=w}else r.current=u;if(ca&&(ca=!1,co=r,ua=y),w=r.pendingLanes,w===0&&(ao=null),b1(u.stateNode),wn(r,kt()),s!==null)for(f=r.onRecoverableError,u=0;u<s.length;u++)y=s[u],f(y.value,{componentStack:y.stack,digest:y.digest});if(aa)throw aa=!1,r=id,id=null,r;return(ua&1)!==0&&r.tag!==0&&ms(),w=r.pendingLanes,(w&1)!==0?r===ld?Ei++:(Ei=0,ld=r):Ei=0,oo(),null}function ms(){if(co!==null){var r=gh(ua),s=qn.transition,u=Ge;try{if(qn.transition=null,Ge=16>r?16:r,co===null)var f=!1;else{if(r=co,co=null,ua=0,(He&6)!==0)throw Error(n(331));var y=He;for(He|=4,xe=r.current;xe!==null;){var w=xe,C=w.child;if((xe.flags&16)!==0){var M=w.deletions;if(M!==null){for(var z=0;z<M.length;z++){var te=M[z];for(xe=te;xe!==null;){var se=xe;switch(se.tag){case 0:case 11:case 15:Si(8,se,w)}var ie=se.child;if(ie!==null)ie.return=se,xe=ie;else for(;xe!==null;){se=xe;var oe=se.sibling,he=se.return;if(pg(se),se===te){xe=null;break}if(oe!==null){oe.return=he,xe=oe;break}xe=he}}}var be=w.alternate;if(be!==null){var we=be.child;if(we!==null){be.child=null;do{var jt=we.sibling;we.sibling=null,we=jt}while(we!==null)}}xe=w}}if((w.subtreeFlags&2064)!==0&&C!==null)C.return=w,xe=C;else e:for(;xe!==null;){if(w=xe,(w.flags&2048)!==0)switch(w.tag){case 0:case 11:case 15:Si(9,w,w.return)}var G=w.sibling;if(G!==null){G.return=w.return,xe=G;break e}xe=w.return}}var B=r.current;for(xe=B;xe!==null;){C=xe;var Q=C.child;if((C.subtreeFlags&2064)!==0&&Q!==null)Q.return=C,xe=Q;else e:for(C=B;xe!==null;){if(M=xe,(M.flags&2048)!==0)try{switch(M.tag){case 0:case 11:case 15:sa(9,M)}}catch(Se){xt(M,M.return,Se)}if(M===C){xe=null;break e}var ue=M.sibling;if(ue!==null){ue.return=M.return,xe=ue;break e}xe=M.return}}if(He=y,oo(),hr&&typeof hr.onPostCommitFiberRoot=="function")try{hr.onPostCommitFiberRoot(yl,r)}catch{}f=!0}return f}finally{Ge=u,qn.transition=s}}return!1}function Pg(r,s,u){s=ds(u,s),s=Gm(r,s,1),r=io(r,s,1),s=dn(),r!==null&&(Qs(r,1,s),wn(r,s))}function xt(r,s,u){if(r.tag===3)Pg(r,r,u);else for(;s!==null;){if(s.tag===3){Pg(s,r,u);break}else if(s.tag===1){var f=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(ao===null||!ao.has(f))){r=ds(u,r),r=Km(s,r,1),s=io(s,r,1),r=dn(),s!==null&&(Qs(s,1,r),wn(s,r));break}}s=s.return}}function Gk(r,s,u){var f=r.pingCache;f!==null&&f.delete(s),s=dn(),r.pingedLanes|=r.suspendedLanes&u,Ft===r&&(Yt&u)===u&&(At===4||At===3&&(Yt&130023424)===Yt&&500>kt()-sd?Mo(r,0):od|=u),wn(r,s)}function Tg(r,s){s===0&&((r.mode&1)===0?s=1:(s=bl,bl<<=1,(bl&130023424)===0&&(bl=4194304)));var u=dn();r=Mr(r,s),r!==null&&(Qs(r,s,u),wn(r,u))}function Kk(r){var s=r.memoizedState,u=0;s!==null&&(u=s.retryLane),Tg(r,u)}function Yk(r,s){var u=0;switch(r.tag){case 13:var f=r.stateNode,y=r.memoizedState;y!==null&&(u=y.retryLane);break;case 19:f=r.stateNode;break;default:throw Error(n(314))}f!==null&&f.delete(s),Tg(r,u)}var Ag;Ag=function(r,s,u){if(r!==null)if(r.memoizedProps!==s.pendingProps||xn.current)vn=!0;else{if((r.lanes&u)===0&&(s.flags&128)===0)return vn=!1,_k(r,s,u);vn=(r.flags&131072)!==0}else vn=!1,lt&&(s.flags&1048576)!==0&&um(s,Ul,s.index);switch(s.lanes=0,s.tag){case 2:var f=s.type;ra(r,s),r=s.pendingProps;var y=rs(s,nn.current);cs(s,u),y=_u(null,s,f,r,y,u);var w=Mu();return s.flags|=1,typeof y=="object"&&y!==null&&typeof y.render=="function"&&y.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,yn(f)?(w=!0,Fl(s)):w=!1,s.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,Pu(s),y.updater=ta,s.stateNode=y,y._reactInternals=s,Hu(s,f,r,u),s=Gu(null,s,f,!0,w,u)):(s.tag=0,lt&&w&&vu(s),un(null,s,y,u),s=s.child),s;case 16:f=s.elementType;e:{switch(ra(r,s),r=s.pendingProps,y=f._init,f=y(f._payload),s.type=f,y=s.tag=Qk(f),r=rr(f,r),y){case 0:s=qu(null,s,f,r,u);break e;case 1:s=rg(null,s,f,r,u);break e;case 11:s=Jm(null,s,f,r,u);break e;case 14:s=Zm(null,s,f,rr(f.type,r),u);break e}throw Error(n(306,f,""))}return s;case 0:return f=s.type,y=s.pendingProps,y=s.elementType===f?y:rr(f,y),qu(r,s,f,y,u);case 1:return f=s.type,y=s.pendingProps,y=s.elementType===f?y:rr(f,y),rg(r,s,f,y,u);case 3:e:{if(og(s),r===null)throw Error(n(387));f=s.pendingProps,w=s.memoizedState,y=w.element,vm(r,s),Kl(s,f,null,u);var C=s.memoizedState;if(f=C.element,w.isDehydrated)if(w={element:f,isDehydrated:!1,cache:C.cache,pendingSuspenseBoundaries:C.pendingSuspenseBoundaries,transitions:C.transitions},s.updateQueue.baseState=w,s.memoizedState=w,s.flags&256){y=ds(Error(n(423)),s),s=sg(r,s,f,u,y);break e}else if(f!==y){y=ds(Error(n(424)),s),s=sg(r,s,f,u,y);break e}else for(Ln=to(s.stateNode.containerInfo.firstChild),In=s,lt=!0,nr=null,u=xm(s,null,f,u),s.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(is(),f===y){s=Fr(r,s,u);break e}un(r,s,f,u)}s=s.child}return s;case 5:return km(s),r===null&&ku(s),f=s.type,y=s.pendingProps,w=r!==null?r.memoizedProps:null,C=y.children,pu(f,y)?C=null:w!==null&&pu(f,w)&&(s.flags|=32),ng(r,s),un(r,s,C,u),s.child;case 6:return r===null&&ku(s),null;case 13:return ig(r,s,u);case 4:return Tu(s,s.stateNode.containerInfo),f=s.pendingProps,r===null?s.child=ls(s,null,f,u):un(r,s,f,u),s.child;case 11:return f=s.type,y=s.pendingProps,y=s.elementType===f?y:rr(f,y),Jm(r,s,f,y,u);case 7:return un(r,s,s.pendingProps,u),s.child;case 8:return un(r,s,s.pendingProps.children,u),s.child;case 12:return un(r,s,s.pendingProps.children,u),s.child;case 10:e:{if(f=s.type._context,y=s.pendingProps,w=s.memoizedProps,C=y.value,Qe(Vl,f._currentValue),f._currentValue=C,w!==null)if(tr(w.value,C)){if(w.children===y.children&&!xn.current){s=Fr(r,s,u);break e}}else for(w=s.child,w!==null&&(w.return=s);w!==null;){var M=w.dependencies;if(M!==null){C=w.child;for(var z=M.firstContext;z!==null;){if(z.context===f){if(w.tag===1){z=$r(-1,u&-u),z.tag=2;var te=w.updateQueue;if(te!==null){te=te.shared;var se=te.pending;se===null?z.next=z:(z.next=se.next,se.next=z),te.pending=z}}w.lanes|=u,z=w.alternate,z!==null&&(z.lanes|=u),Eu(w.return,u,s),M.lanes|=u;break}z=z.next}}else if(w.tag===10)C=w.type===s.type?null:w.child;else if(w.tag===18){if(C=w.return,C===null)throw Error(n(341));C.lanes|=u,M=C.alternate,M!==null&&(M.lanes|=u),Eu(C,u,s),C=w.sibling}else C=w.child;if(C!==null)C.return=w;else for(C=w;C!==null;){if(C===s){C=null;break}if(w=C.sibling,w!==null){w.return=C.return,C=w;break}C=C.return}w=C}un(r,s,y.children,u),s=s.child}return s;case 9:return y=s.type,f=s.pendingProps.children,cs(s,u),y=Wn(y),f=f(y),s.flags|=1,un(r,s,f,u),s.child;case 14:return f=s.type,y=rr(f,s.pendingProps),y=rr(f.type,y),Zm(r,s,f,y,u);case 15:return eg(r,s,s.type,s.pendingProps,u);case 17:return f=s.type,y=s.pendingProps,y=s.elementType===f?y:rr(f,y),ra(r,s),s.tag=1,yn(f)?(r=!0,Fl(s)):r=!1,cs(s,u),Vm(s,f,y),Hu(s,f,y,u),Gu(null,s,f,!0,r,u);case 19:return ag(r,s,u);case 22:return tg(r,s,u)}throw Error(n(156,s.tag))};function Dg(r,s){return dh(r,s)}function Xk(r,s,u,f){this.tag=r,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Gn(r,s,u,f){return new Xk(r,s,u,f)}function pd(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Qk(r){if(typeof r=="function")return pd(r)?1:0;if(r!=null){if(r=r.$$typeof,r===q)return 11;if(r===_)return 14}return 2}function po(r,s){var u=r.alternate;return u===null?(u=Gn(r.tag,s,r.key,r.mode),u.elementType=r.elementType,u.type=r.type,u.stateNode=r.stateNode,u.alternate=r,r.alternate=u):(u.pendingProps=s,u.type=r.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=r.flags&14680064,u.childLanes=r.childLanes,u.lanes=r.lanes,u.child=r.child,u.memoizedProps=r.memoizedProps,u.memoizedState=r.memoizedState,u.updateQueue=r.updateQueue,s=r.dependencies,u.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},u.sibling=r.sibling,u.index=r.index,u.ref=r.ref,u}function ha(r,s,u,f,y,w){var C=2;if(f=r,typeof r=="function")pd(r)&&(C=1);else if(typeof r=="string")C=5;else e:switch(r){case $:return Fo(u.children,y,w,s);case E:C=8,y|=8;break;case H:return r=Gn(12,u,s,y|2),r.elementType=H,r.lanes=w,r;case Y:return r=Gn(13,u,s,y),r.elementType=Y,r.lanes=w,r;case X:return r=Gn(19,u,s,y),r.elementType=X,r.lanes=w,r;case V:return ma(u,y,w,s);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case Z:C=10;break e;case K:C=9;break e;case q:C=11;break e;case _:C=14;break e;case D:C=16,f=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return s=Gn(C,u,s,y),s.elementType=r,s.type=f,s.lanes=w,s}function Fo(r,s,u,f){return r=Gn(7,r,f,s),r.lanes=u,r}function ma(r,s,u,f){return r=Gn(22,r,f,s),r.elementType=V,r.lanes=u,r.stateNode={isHidden:!1},r}function hd(r,s,u){return r=Gn(6,r,null,s),r.lanes=u,r}function md(r,s,u){return s=Gn(4,r.children!==null?r.children:[],r.key,s),s.lanes=u,s.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},s}function Jk(r,s,u,f,y){this.tag=s,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Uc(0),this.expirationTimes=Uc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Uc(0),this.identifierPrefix=f,this.onRecoverableError=y,this.mutableSourceEagerHydrationData=null}function gd(r,s,u,f,y,w,C,M,z){return r=new Jk(r,s,u,M,z),s===1?(s=1,w===!0&&(s|=8)):s=0,w=Gn(3,null,null,s),r.current=w,w.stateNode=r,w.memoizedState={element:f,isDehydrated:u,cache:null,transitions:null,pendingSuspenseBoundaries:null},Pu(w),r}function Zk(r,s,u){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:P,key:f==null?null:""+f,children:r,containerInfo:s,implementation:u}}function Ig(r){if(!r)return ro;r=r._reactInternals;e:{if(Eo(r)!==r||r.tag!==1)throw Error(n(170));var s=r;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(yn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(r.tag===1){var u=r.type;if(yn(u))return lm(r,u,s)}return s}function Lg(r,s,u,f,y,w,C,M,z){return r=gd(u,f,!0,r,y,w,C,M,z),r.context=Ig(null),u=r.current,f=dn(),y=uo(u),w=$r(f,y),w.callback=s??null,io(u,w,y),r.current.lanes=y,Qs(r,y,f),wn(r,f),r}function ga(r,s,u,f){var y=s.current,w=dn(),C=uo(y);return u=Ig(u),s.context===null?s.context=u:s.pendingContext=u,s=$r(w,C),s.payload={element:r},f=f===void 0?null:f,f!==null&&(s.callback=f),r=io(y,s,C),r!==null&&(ir(r,y,C,w),Gl(r,y,C)),C}function xa(r){if(r=r.current,!r.child)return null;switch(r.child.tag){case 5:return r.child.stateNode;default:return r.child.stateNode}}function Og(r,s){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var u=r.retryLane;r.retryLane=u!==0&&u<s?u:s}}function xd(r,s){Og(r,s),(r=r.alternate)&&Og(r,s)}function ej(){return null}var _g=typeof reportError=="function"?reportError:function(r){console.error(r)};function yd(r){this._internalRoot=r}ya.prototype.render=yd.prototype.render=function(r){var s=this._internalRoot;if(s===null)throw Error(n(409));ga(r,s,null,null)},ya.prototype.unmount=yd.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var s=r.containerInfo;_o(function(){ga(null,r,null,null)}),s[Ir]=null}};function ya(r){this._internalRoot=r}ya.prototype.unstable_scheduleHydration=function(r){if(r){var s=vh();r={blockedOn:null,target:r,priority:s};for(var u=0;u<Jr.length&&s!==0&&s<Jr[u].priority;u++);Jr.splice(u,0,r),u===0&&kh(r)}};function vd(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function va(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function Mg(){}function tj(r,s,u,f,y){if(y){if(typeof f=="function"){var w=f;f=function(){var te=xa(C);w.call(te)}}var C=Lg(s,f,r,0,null,!1,!1,"",Mg);return r._reactRootContainer=C,r[Ir]=C.current,di(r.nodeType===8?r.parentNode:r),_o(),C}for(;y=r.lastChild;)r.removeChild(y);if(typeof f=="function"){var M=f;f=function(){var te=xa(z);M.call(te)}}var z=gd(r,0,!1,null,null,!1,!1,"",Mg);return r._reactRootContainer=z,r[Ir]=z.current,di(r.nodeType===8?r.parentNode:r),_o(function(){ga(s,z,u,f)}),z}function ba(r,s,u,f,y){var w=u._reactRootContainer;if(w){var C=w;if(typeof y=="function"){var M=y;y=function(){var z=xa(C);M.call(z)}}ga(s,C,r,y)}else C=tj(u,s,r,y,f);return xa(C)}xh=function(r){switch(r.tag){case 3:var s=r.stateNode;if(s.current.memoizedState.isDehydrated){var u=Xs(s.pendingLanes);u!==0&&(Hc(s,u|1),wn(s,kt()),(He&6)===0&&(hs=kt()+500,oo()))}break;case 13:_o(function(){var f=Mr(r,1);if(f!==null){var y=dn();ir(f,r,1,y)}}),xd(r,1)}},Wc=function(r){if(r.tag===13){var s=Mr(r,134217728);if(s!==null){var u=dn();ir(s,r,134217728,u)}xd(r,134217728)}},yh=function(r){if(r.tag===13){var s=uo(r),u=Mr(r,s);if(u!==null){var f=dn();ir(u,r,s,f)}xd(r,s)}},vh=function(){return Ge},bh=function(r,s){var u=Ge;try{return Ge=r,s()}finally{Ge=u}},Zt=function(r,s,u){switch(s){case"input":if(cn(r,u),s=u.name,u.type==="radio"&&s!=null){for(u=r;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<u.length;s++){var f=u[s];if(f!==r&&f.form===r.form){var y=Ml(f);if(!y)throw Error(n(90));tt(f),cn(f,y)}}}break;case"textarea":Pn(r,u);break;case"select":s=u.value,s!=null&&Vt(r,!!u.multiple,s,!1)}},Gt=ud,en=_o;var nj={usingClientEntryPoint:!1,Events:[hi,ts,Ml,wt,Mt,ud]},Ri={findFiberByHostInstance:Ro,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},rj={bundleType:Ri.bundleType,version:Ri.version,rendererPackageName:Ri.rendererPackageName,rendererConfig:Ri.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:L.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=ch(r),r===null?null:r.stateNode},findFiberByHostInstance:Ri.findFiberByHostInstance||ej,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 wa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wa.isDisabled&&wa.supportsFiber)try{yl=wa.inject(rj),hr=wa}catch{}}return kn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=nj,kn.createPortal=function(r,s){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!vd(s))throw Error(n(200));return Zk(r,s,null,u)},kn.createRoot=function(r,s){if(!vd(r))throw Error(n(299));var u=!1,f="",y=_g;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onRecoverableError!==void 0&&(y=s.onRecoverableError)),s=gd(r,1,!1,null,null,u,!1,f,y),r[Ir]=s.current,di(r.nodeType===8?r.parentNode:r),new yd(s)},kn.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var s=r._reactInternals;if(s===void 0)throw typeof r.render=="function"?Error(n(188)):(r=Object.keys(r).join(","),Error(n(268,r)));return r=ch(s),r=r===null?null:r.stateNode,r},kn.flushSync=function(r){return _o(r)},kn.hydrate=function(r,s,u){if(!va(s))throw Error(n(200));return ba(null,r,s,!0,u)},kn.hydrateRoot=function(r,s,u){if(!vd(r))throw Error(n(405));var f=u!=null&&u.hydratedSources||null,y=!1,w="",C=_g;if(u!=null&&(u.unstable_strictMode===!0&&(y=!0),u.identifierPrefix!==void 0&&(w=u.identifierPrefix),u.onRecoverableError!==void 0&&(C=u.onRecoverableError)),s=Lg(s,null,r,1,u??null,y,!1,w,C),r[Ir]=s.current,di(r),f)for(r=0;r<f.length;r++)u=f[r],y=u._getVersion,y=y(u._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[u,y]:s.mutableSourceEagerHydrationData.push(u,y);return new ya(s)},kn.render=function(r,s,u){if(!va(s))throw Error(n(200));return ba(null,r,s,!1,u)},kn.unmountComponentAtNode=function(r){if(!va(r))throw Error(n(40));return r._reactRootContainer?(_o(function(){ba(null,null,r,!1,function(){r._reactRootContainer=null,r[Ir]=null})}),!0):!1},kn.unstable_batchedUpdates=ud,kn.unstable_renderSubtreeIntoContainer=function(r,s,u,f){if(!va(u))throw Error(n(200));if(r==null||r._reactInternals===void 0)throw Error(n(38));return ba(r,s,u,!1,f)},kn.version="18.3.1-next-f1338f8080-20240426",kn}var Vg;function Jy(){if(Vg)return kd.exports;Vg=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),kd.exports=dj(),kd.exports}var qg;function fj(){if(qg)return ka;qg=1;var e=Jy();return ka.createRoot=e.createRoot,ka.hydrateRoot=e.hydrateRoot,ka}var pj=fj();/**
|
|
41
|
-
* react-router v7.13.1
|
|
42
|
-
*
|
|
43
|
-
* Copyright (c) Remix Software Inc.
|
|
44
|
-
*
|
|
45
|
-
* This source code is licensed under the MIT license found in the
|
|
46
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
47
|
-
*
|
|
48
|
-
* @license MIT
|
|
49
|
-
*/var Gg="popstate";function Kg(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function hj(e={}){function t(o,i){var m;let a=(m=i.state)==null?void 0:m.masked,{pathname:c,search:d,hash:p}=a||o.location;return hf("",{pathname:c,search:d,hash:p},i.state&&i.state.usr||null,i.state&&i.state.key||"default",a?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function n(o,i){return typeof i=="string"?i:Yi(i)}return gj(t,n,null,e)}function mt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function lr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function mj(){return Math.random().toString(36).substring(2,10)}function Yg(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function hf(e,t,n=null,o,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ls(t):t,state:n,key:t&&t.key||o||mj(),unstable_mask:i}}function Yi({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Ls(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let o=e.indexOf("?");o>=0&&(t.search=e.substring(o),e=e.substring(0,o)),e&&(t.pathname=e)}return t}function gj(e,t,n,o={}){let{window:i=document.defaultView,v5Compat:a=!1}=o,c=i.history,d="POP",p=null,m=h();m==null&&(m=0,c.replaceState({...c.state,idx:m},""));function h(){return(c.state||{idx:null}).idx}function x(){d="POP";let j=h(),S=j==null?null:j-m;m=j,p&&p({action:d,location:k.location,delta:S})}function v(j,S){d="PUSH";let T=Kg(j)?j:hf(k.location,j,S);m=h()+1;let A=Yg(T,m),L=k.createHref(T.unstable_mask||T);try{c.pushState(A,"",L)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;i.location.assign(L)}a&&p&&p({action:d,location:k.location,delta:1})}function b(j,S){d="REPLACE";let T=Kg(j)?j:hf(k.location,j,S);m=h();let A=Yg(T,m),L=k.createHref(T.unstable_mask||T);c.replaceState(A,"",L),a&&p&&p({action:d,location:k.location,delta:0})}function N(j){return xj(j)}let k={get action(){return d},get location(){return e(i,c)},listen(j){if(p)throw new Error("A history only accepts one active listener");return i.addEventListener(Gg,x),p=j,()=>{i.removeEventListener(Gg,x),p=null}},createHref(j){return t(i,j)},createURL:N,encodeLocation(j){let S=N(j);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:v,replace:b,go(j){return c.go(j)}};return k}function xj(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),mt(n,"No window.location.(origin|href) available to create URL");let o=typeof e=="string"?e:Yi(e);return o=o.replace(/ $/,"%20"),!t&&o.startsWith("//")&&(o=n+o),new URL(o,n)}function Zy(e,t,n="/"){return yj(e,t,n,!1)}function yj(e,t,n,o){let i=typeof t=="string"?Ls(t):t,a=Wr(i.pathname||"/",n);if(a==null)return null;let c=ev(e);vj(c);let d=null;for(let p=0;d==null&&p<c.length;++p){let m=Tj(a);d=Rj(c[p],m,o)}return d}function ev(e,t=[],n=[],o="",i=!1){let a=(c,d,p=i,m)=>{let h={relativePath:m===void 0?c.path||"":m,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};if(h.relativePath.startsWith("/")){if(!h.relativePath.startsWith(o)&&p)return;mt(h.relativePath.startsWith(o),`Absolute route path "${h.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(o.length)}let x=jr([o,h.relativePath]),v=n.concat(h);c.children&&c.children.length>0&&(mt(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),ev(c.children,t,v,x,p)),!(c.path==null&&!c.index)&&t.push({path:x,score:Nj(x,c.index),routesMeta:v})};return e.forEach((c,d)=>{var p;if(c.path===""||!((p=c.path)!=null&&p.includes("?")))a(c,d);else for(let m of tv(c.path))a(c,d,!0,m)}),t}function tv(e){let t=e.split("/");if(t.length===0)return[];let[n,...o]=t,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(o.length===0)return i?[a,""]:[a];let c=tv(o.join("/")),d=[];return d.push(...c.map(p=>p===""?a:[a,p].join("/"))),i&&d.push(...c),d.map(p=>e.startsWith("/")&&p===""?"/":p)}function vj(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Ej(t.routesMeta.map(o=>o.childrenIndex),n.routesMeta.map(o=>o.childrenIndex)))}var bj=/^:[\w-]+$/,wj=3,kj=2,jj=1,Sj=10,Cj=-2,Xg=e=>e==="*";function Nj(e,t){let n=e.split("/"),o=n.length;return n.some(Xg)&&(o+=Cj),t&&(o+=kj),n.filter(i=>!Xg(i)).reduce((i,a)=>i+(bj.test(a)?wj:a===""?jj:Sj),o)}function Ej(e,t){return e.length===t.length&&e.slice(0,-1).every((o,i)=>o===t[i])?e[e.length-1]-t[t.length-1]:0}function Rj(e,t,n=!1){let{routesMeta:o}=e,i={},a="/",c=[];for(let d=0;d<o.length;++d){let p=o[d],m=d===o.length-1,h=a==="/"?t:t.slice(a.length)||"/",x=qa({path:p.relativePath,caseSensitive:p.caseSensitive,end:m},h),v=p.route;if(!x&&m&&n&&!o[o.length-1].route.index&&(x=qa({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},h)),!x)return null;Object.assign(i,x.params),c.push({params:i,pathname:jr([a,x.pathname]),pathnameBase:Lj(jr([a,x.pathnameBase])),route:v}),x.pathnameBase!=="/"&&(a=jr([a,x.pathnameBase]))}return c}function qa(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,o]=Pj(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],c=a.replace(/(.)\/+$/,"$1"),d=i.slice(1);return{params:o.reduce((m,{paramName:h,isOptional:x},v)=>{if(h==="*"){let N=d[v]||"";c=a.slice(0,a.length-N.length).replace(/(.)\/+$/,"$1")}const b=d[v];return x&&!b?m[h]=void 0:m[h]=(b||"").replace(/%2F/g,"/"),m},{}),pathname:a,pathnameBase:c,pattern:e}}function Pj(e,t=!1,n=!0){lr(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let o=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,d,p,m,h)=>{if(o.push({paramName:d,isOptional:p!=null}),p){let x=h.charAt(m+c.length);return x&&x!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(o.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),o]}function Tj(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return lr(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Wr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,o=e.charAt(n);return o&&o!=="/"?null:e.slice(n)||"/"}var Aj=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Dj(e,t="/"){let{pathname:n,search:o="",hash:i=""}=typeof e=="string"?Ls(e):e,a;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?a=Qg(n.substring(1),"/"):a=Qg(n,t)):a=t,{pathname:a,search:Oj(o),hash:_j(i)}}function Qg(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Cd(e,t,n,o){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Ij(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function nv(e){let t=Ij(e);return t.map((n,o)=>o===t.length-1?n.pathname:n.pathnameBase)}function Gf(e,t,n,o=!1){let i;typeof e=="string"?i=Ls(e):(i={...e},mt(!i.pathname||!i.pathname.includes("?"),Cd("?","pathname","search",i)),mt(!i.pathname||!i.pathname.includes("#"),Cd("#","pathname","hash",i)),mt(!i.search||!i.search.includes("#"),Cd("#","search","hash",i)));let a=e===""||i.pathname==="",c=a?"/":i.pathname,d;if(c==null)d=n;else{let x=t.length-1;if(!o&&c.startsWith("..")){let v=c.split("/");for(;v[0]==="..";)v.shift(),x-=1;i.pathname=v.join("/")}d=x>=0?t[x]:"/"}let p=Dj(i,d),m=c&&c!=="/"&&c.endsWith("/"),h=(a||c===".")&&n.endsWith("/");return!p.pathname.endsWith("/")&&(m||h)&&(p.pathname+="/"),p}var jr=e=>e.join("/").replace(/\/\/+/g,"/"),Lj=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Oj=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,_j=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Mj=class{constructor(e,t,n,o=!1){this.status=e,this.statusText=t||"",this.internal=o,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function $j(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Fj(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var rv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ov(e,t){let n=e;if(typeof n!="string"||!Aj.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let o=n,i=!1;if(rv)try{let a=new URL(window.location.href),c=n.startsWith("//")?new URL(a.protocol+n):new URL(n),d=Wr(c.pathname,t);c.origin===a.origin&&d!=null?n=d+c.search+c.hash:i=!0}catch{lr(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var sv=["POST","PUT","PATCH","DELETE"];new Set(sv);var zj=["GET",...sv];new Set(zj);var Os=g.createContext(null);Os.displayName="DataRouter";var ac=g.createContext(null);ac.displayName="DataRouterState";var Bj=g.createContext(!1),iv=g.createContext({isTransitioning:!1});iv.displayName="ViewTransition";var Uj=g.createContext(new Map);Uj.displayName="Fetchers";var Hj=g.createContext(null);Hj.displayName="Await";var Qn=g.createContext(null);Qn.displayName="Navigation";var rl=g.createContext(null);rl.displayName="Location";var dr=g.createContext({outlet:null,matches:[],isDataRoute:!1});dr.displayName="Route";var Kf=g.createContext(null);Kf.displayName="RouteError";var lv="REACT_ROUTER_ERROR",Wj="REDIRECT",Vj="ROUTE_ERROR_RESPONSE";function qj(e){if(e.startsWith(`${lv}:${Wj}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function Gj(e){if(e.startsWith(`${lv}:${Vj}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Mj(t.status,t.statusText,t.data)}catch{}}function Kj(e,{relative:t}={}){mt(ol(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:o}=g.useContext(Qn),{hash:i,pathname:a,search:c}=sl(e,{relative:t}),d=a;return n!=="/"&&(d=a==="/"?n:jr([n,a])),o.createHref({pathname:d,search:c,hash:i})}function ol(){return g.useContext(rl)!=null}function fn(){return mt(ol(),"useLocation() may be used only in the context of a <Router> component."),g.useContext(rl).location}var av="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function cv(e){g.useContext(Qn).static||g.useLayoutEffect(e)}function Wt(){let{isDataRoute:e}=g.useContext(dr);return e?cS():Yj()}function Yj(){mt(ol(),"useNavigate() may be used only in the context of a <Router> component.");let e=g.useContext(Os),{basename:t,navigator:n}=g.useContext(Qn),{matches:o}=g.useContext(dr),{pathname:i}=fn(),a=JSON.stringify(nv(o)),c=g.useRef(!1);return cv(()=>{c.current=!0}),g.useCallback((p,m={})=>{if(lr(c.current,av),!c.current)return;if(typeof p=="number"){n.go(p);return}let h=Gf(p,JSON.parse(a),i,m.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:jr([t,h.pathname])),(m.replace?n.replace:n.push)(h,m.state,m)},[t,n,a,i,e])}var Xj=g.createContext(null);function Qj(e){let t=g.useContext(dr).outlet;return g.useMemo(()=>t&&g.createElement(Xj.Provider,{value:e},t),[t,e])}function St(){let{matches:e}=g.useContext(dr),t=e[e.length-1];return t?t.params:{}}function sl(e,{relative:t}={}){let{matches:n}=g.useContext(dr),{pathname:o}=fn(),i=JSON.stringify(nv(n));return g.useMemo(()=>Gf(e,JSON.parse(i),o,t==="path"),[e,i,o,t])}function Jj(e,t){return uv(e,t)}function uv(e,t,n){var j;mt(ol(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=g.useContext(Qn),{matches:i}=g.useContext(dr),a=i[i.length-1],c=a?a.params:{},d=a?a.pathname:"/",p=a?a.pathnameBase:"/",m=a&&a.route;{let S=m&&m.path||"";fv(d,!m||S.endsWith("*")||S.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${S}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
50
|
-
|
|
51
|
-
Please change the parent <Route path="${S}"> to <Route path="${S==="/"?"*":`${S}/*`}">.`)}let h=fn(),x;if(t){let S=typeof t=="string"?Ls(t):t;mt(p==="/"||((j=S.pathname)==null?void 0:j.startsWith(p)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${p}" but pathname "${S.pathname}" was given in the \`location\` prop.`),x=S}else x=h;let v=x.pathname||"/",b=v;if(p!=="/"){let S=p.replace(/^\//,"").split("/");b="/"+v.replace(/^\//,"").split("/").slice(S.length).join("/")}let N=Zy(e,{pathname:b});lr(m||N!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),lr(N==null||N[N.length-1].route.element!==void 0||N[N.length-1].route.Component!==void 0||N[N.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let k=rS(N&&N.map(S=>Object.assign({},S,{params:Object.assign({},c,S.params),pathname:jr([p,o.encodeLocation?o.encodeLocation(S.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?p:jr([p,o.encodeLocation?o.encodeLocation(S.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathnameBase])})),i,n);return t&&k?g.createElement(rl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...x},navigationType:"POP"}},k):k}function Zj(){let e=aS(),t=$j(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:o},a={padding:"2px 4px",backgroundColor:o},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=g.createElement(g.Fragment,null,g.createElement("p",null,"💿 Hey developer 👋"),g.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",g.createElement("code",{style:a},"ErrorBoundary")," or"," ",g.createElement("code",{style:a},"errorElement")," prop on your route.")),g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),n?g.createElement("pre",{style:i},n):null,c)}var eS=g.createElement(Zj,null),dv=class extends g.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=Gj(e.digest);n&&(e=n)}let t=e!==void 0?g.createElement(dr.Provider,{value:this.props.routeContext},g.createElement(Kf.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?g.createElement(tS,{error:e},t):t}};dv.contextType=Bj;var Nd=new WeakMap;function tS({children:e,error:t}){let{basename:n}=g.useContext(Qn);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let o=qj(t.digest);if(o){let i=Nd.get(t);if(i)throw i;let a=ov(o.location,n);if(rv&&!Nd.get(t))if(a.isExternal||o.reloadDocument)window.location.href=a.absoluteURL||a.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:o.replace}));throw Nd.set(t,c),c}return g.createElement("meta",{httpEquiv:"refresh",content:`0;url=${a.absoluteURL||a.to}`})}}return e}function nS({routeContext:e,match:t,children:n}){let o=g.useContext(Os);return o&&o.static&&o.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=t.route.id),g.createElement(dr.Provider,{value:e},n)}function rS(e,t=[],n){let o=n==null?void 0:n.state;if(e==null){if(!o)return null;if(o.errors)e=o.matches;else if(t.length===0&&!o.initialized&&o.matches.length>0)e=o.matches;else return null}let i=e,a=o==null?void 0:o.errors;if(a!=null){let h=i.findIndex(x=>x.route.id&&(a==null?void 0:a[x.route.id])!==void 0);mt(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),i=i.slice(0,Math.min(i.length,h+1))}let c=!1,d=-1;if(n&&o){c=o.renderFallback;for(let h=0;h<i.length;h++){let x=i[h];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(d=h),x.route.id){let{loaderData:v,errors:b}=o,N=x.route.loader&&!v.hasOwnProperty(x.route.id)&&(!b||b[x.route.id]===void 0);if(x.route.lazy||N){n.isStatic&&(c=!0),d>=0?i=i.slice(0,d+1):i=[i[0]];break}}}}let p=n==null?void 0:n.onError,m=o&&p?(h,x)=>{var v,b;p(h,{location:o.location,params:((b=(v=o.matches)==null?void 0:v[0])==null?void 0:b.params)??{},unstable_pattern:Fj(o.matches),errorInfo:x})}:void 0;return i.reduceRight((h,x,v)=>{let b,N=!1,k=null,j=null;o&&(b=a&&x.route.id?a[x.route.id]:void 0,k=x.route.errorElement||eS,c&&(d<0&&v===0?(fv("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),N=!0,j=null):d===v&&(N=!0,j=x.route.hydrateFallbackElement||null)));let S=t.concat(i.slice(0,v+1)),T=()=>{let A;return b?A=k:N?A=j:x.route.Component?A=g.createElement(x.route.Component,null):x.route.element?A=x.route.element:A=h,g.createElement(nS,{match:x,routeContext:{outlet:h,matches:S,isDataRoute:o!=null},children:A})};return o&&(x.route.ErrorBoundary||x.route.errorElement||v===0)?g.createElement(dv,{location:o.location,revalidation:o.revalidation,component:k,error:b,children:T(),routeContext:{outlet:null,matches:S,isDataRoute:!0},onError:m}):T()},null)}function Yf(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function oS(e){let t=g.useContext(Os);return mt(t,Yf(e)),t}function sS(e){let t=g.useContext(ac);return mt(t,Yf(e)),t}function iS(e){let t=g.useContext(dr);return mt(t,Yf(e)),t}function Xf(e){let t=iS(e),n=t.matches[t.matches.length-1];return mt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function lS(){return Xf("useRouteId")}function aS(){var o;let e=g.useContext(Kf),t=sS("useRouteError"),n=Xf("useRouteError");return e!==void 0?e:(o=t.errors)==null?void 0:o[n]}function cS(){let{router:e}=oS("useNavigate"),t=Xf("useNavigate"),n=g.useRef(!1);return cv(()=>{n.current=!0}),g.useCallback(async(i,a={})=>{lr(n.current,av),n.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:t,...a}))},[e,t])}var Jg={};function fv(e,t,n){!t&&!Jg[e]&&(Jg[e]=!0,lr(!1,n))}g.memo(uS);function uS({routes:e,future:t,state:n,isStatic:o,onError:i}){return uv(e,void 0,{state:n,isStatic:o,onError:i})}function dS(e){return Qj(e.context)}function De(e){mt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function fS({basename:e="/",children:t=null,location:n,navigationType:o="POP",navigator:i,static:a=!1,unstable_useTransitions:c}){mt(!ol(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),p=g.useMemo(()=>({basename:d,navigator:i,static:a,unstable_useTransitions:c,future:{}}),[d,i,a,c]);typeof n=="string"&&(n=Ls(n));let{pathname:m="/",search:h="",hash:x="",state:v=null,key:b="default",unstable_mask:N}=n,k=g.useMemo(()=>{let j=Wr(m,d);return j==null?null:{location:{pathname:j,search:h,hash:x,state:v,key:b,unstable_mask:N},navigationType:o}},[d,m,h,x,v,b,o,N]);return lr(k!=null,`<Router basename="${d}"> is not able to match the URL "${m}${h}${x}" because it does not start with the basename, so the <Router> won't render anything.`),k==null?null:g.createElement(Qn.Provider,{value:p},g.createElement(rl.Provider,{children:t,value:k}))}function pS({children:e,location:t}){return Jj(mf(e),t)}function mf(e,t=[]){let n=[];return g.Children.forEach(e,(o,i)=>{if(!g.isValidElement(o))return;let a=[...t,i];if(o.type===g.Fragment){n.push.apply(n,mf(o.props.children,a));return}mt(o.type===De,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),mt(!o.props.index||!o.props.children,"An index route cannot have child routes.");let c={id:o.props.id||a.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(c.children=mf(o.props.children,a)),n.push(c)}),n}var _a="get",Ma="application/x-www-form-urlencoded";function cc(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function hS(e){return cc(e)&&e.tagName.toLowerCase()==="button"}function mS(e){return cc(e)&&e.tagName.toLowerCase()==="form"}function gS(e){return cc(e)&&e.tagName.toLowerCase()==="input"}function xS(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function yS(e,t){return e.button===0&&(!t||t==="_self")&&!xS(e)}function gf(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let o=e[n];return t.concat(Array.isArray(o)?o.map(i=>[n,i]):[[n,o]])},[]))}function vS(e,t){let n=gf(e);return t&&t.forEach((o,i)=>{n.has(i)||t.getAll(i).forEach(a=>{n.append(i,a)})}),n}var ja=null;function bS(){if(ja===null)try{new FormData(document.createElement("form"),0),ja=!1}catch{ja=!0}return ja}var wS=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ed(e){return e!=null&&!wS.has(e)?(lr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ma}"`),null):e}function kS(e,t){let n,o,i,a,c;if(mS(e)){let d=e.getAttribute("action");o=d?Wr(d,t):null,n=e.getAttribute("method")||_a,i=Ed(e.getAttribute("enctype"))||Ma,a=new FormData(e)}else if(hS(e)||gS(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=e.getAttribute("formaction")||d.getAttribute("action");if(o=p?Wr(p,t):null,n=e.getAttribute("formmethod")||d.getAttribute("method")||_a,i=Ed(e.getAttribute("formenctype"))||Ed(d.getAttribute("enctype"))||Ma,a=new FormData(d,e),!bS()){let{name:m,type:h,value:x}=e;if(h==="image"){let v=m?`${m}.`:"";a.append(`${v}x`,"0"),a.append(`${v}y`,"0")}else m&&a.append(m,x)}}else{if(cc(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=_a,o=null,i=Ma,c=e}return a&&i==="text/plain"&&(c=a,a=void 0),{action:o,method:n.toLowerCase(),encType:i,formData:a,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Qf(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function jS(e,t,n,o){let i=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${o}`:i.pathname=`${i.pathname}.${o}`:i.pathname==="/"?i.pathname=`_root.${o}`:t&&Wr(i.pathname,t)==="/"?i.pathname=`${t.replace(/\/$/,"")}/_root.${o}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${o}`,i}async function SS(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function CS(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function NS(e,t,n){let o=await Promise.all(e.map(async i=>{let a=t.routes[i.route.id];if(a){let c=await SS(a,n);return c.links?c.links():[]}return[]}));return TS(o.flat(1).filter(CS).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function Zg(e,t,n,o,i,a){let c=(p,m)=>n[m]?p.route.id!==n[m].route.id:!0,d=(p,m)=>{var h;return n[m].pathname!==p.pathname||((h=n[m].route.path)==null?void 0:h.endsWith("*"))&&n[m].params["*"]!==p.params["*"]};return a==="assets"?t.filter((p,m)=>c(p,m)||d(p,m)):a==="data"?t.filter((p,m)=>{var x;let h=o.routes[p.route.id];if(!h||!h.hasLoader)return!1;if(c(p,m)||d(p,m))return!0;if(p.route.shouldRevalidate){let v=p.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((x=n[0])==null?void 0:x.params)||{},nextUrl:new URL(e,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):[]}function ES(e,t,{includeHydrateFallback:n}={}){return RS(e.map(o=>{let i=t.routes[o.route.id];if(!i)return[];let a=[i.module];return i.clientActionModule&&(a=a.concat(i.clientActionModule)),i.clientLoaderModule&&(a=a.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(a=a.concat(i.hydrateFallbackModule)),i.imports&&(a=a.concat(i.imports)),a}).flat(1))}function RS(e){return[...new Set(e)]}function PS(e){let t={},n=Object.keys(e).sort();for(let o of n)t[o]=e[o];return t}function TS(e,t){let n=new Set;return new Set(t),e.reduce((o,i)=>{let a=JSON.stringify(PS(i));return n.has(a)||(n.add(a),o.push({key:a,link:i})),o},[])}function pv(){let e=g.useContext(Os);return Qf(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function AS(){let e=g.useContext(ac);return Qf(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Jf=g.createContext(void 0);Jf.displayName="FrameworkContext";function hv(){let e=g.useContext(Jf);return Qf(e,"You must render this element inside a <HydratedRouter> element"),e}function DS(e,t){let n=g.useContext(Jf),[o,i]=g.useState(!1),[a,c]=g.useState(!1),{onFocus:d,onBlur:p,onMouseEnter:m,onMouseLeave:h,onTouchStart:x}=t,v=g.useRef(null);g.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let k=S=>{S.forEach(T=>{c(T.isIntersecting)})},j=new IntersectionObserver(k,{threshold:.5});return v.current&&j.observe(v.current),()=>{j.disconnect()}}},[e]),g.useEffect(()=>{if(o){let k=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(k)}}},[o]);let b=()=>{i(!0)},N=()=>{i(!1),c(!1)};return n?e!=="intent"?[a,v,{}]:[a,v,{onFocus:Ti(d,b),onBlur:Ti(p,N),onMouseEnter:Ti(m,b),onMouseLeave:Ti(h,N),onTouchStart:Ti(x,b)}]:[!1,v,{}]}function Ti(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function IS({page:e,...t}){let{router:n}=pv(),o=g.useMemo(()=>Zy(n.routes,e,n.basename),[n.routes,e,n.basename]);return o?g.createElement(OS,{page:e,matches:o,...t}):null}function LS(e){let{manifest:t,routeModules:n}=hv(),[o,i]=g.useState([]);return g.useEffect(()=>{let a=!1;return NS(e,t,n).then(c=>{a||i(c)}),()=>{a=!0}},[e,t,n]),o}function OS({page:e,matches:t,...n}){let o=fn(),{future:i,manifest:a,routeModules:c}=hv(),{basename:d}=pv(),{loaderData:p,matches:m}=AS(),h=g.useMemo(()=>Zg(e,t,m,a,o,"data"),[e,t,m,a,o]),x=g.useMemo(()=>Zg(e,t,m,a,o,"assets"),[e,t,m,a,o]),v=g.useMemo(()=>{if(e===o.pathname+o.search+o.hash)return[];let k=new Set,j=!1;if(t.forEach(T=>{var L;let A=a.routes[T.route.id];!A||!A.hasLoader||(!h.some(O=>O.route.id===T.route.id)&&T.route.id in p&&((L=c[T.route.id])!=null&&L.shouldRevalidate)||A.hasClientLoader?j=!0:k.add(T.route.id))}),k.size===0)return[];let S=jS(e,d,i.unstable_trailingSlashAwareDataRequests,"data");return j&&k.size>0&&S.searchParams.set("_routes",t.filter(T=>k.has(T.route.id)).map(T=>T.route.id).join(",")),[S.pathname+S.search]},[d,i.unstable_trailingSlashAwareDataRequests,p,o,a,h,t,e,c]),b=g.useMemo(()=>ES(x,a),[x,a]),N=LS(x);return g.createElement(g.Fragment,null,v.map(k=>g.createElement("link",{key:k,rel:"prefetch",as:"fetch",href:k,...n})),b.map(k=>g.createElement("link",{key:k,rel:"modulepreload",href:k,...n})),N.map(({key:k,link:j})=>g.createElement("link",{key:k,nonce:n.nonce,...j,crossOrigin:j.crossOrigin??n.crossOrigin})))}function _S(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var MS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{MS&&(window.__reactRouterVersion="7.13.1")}catch{}function $S({basename:e,children:t,unstable_useTransitions:n,window:o}){let i=g.useRef();i.current==null&&(i.current=hj({window:o,v5Compat:!0}));let a=i.current,[c,d]=g.useState({action:a.action,location:a.location}),p=g.useCallback(m=>{n===!1?d(m):g.startTransition(()=>d(m))},[n]);return g.useLayoutEffect(()=>a.listen(p),[a,p]),g.createElement(fS,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:a,unstable_useTransitions:n})}var mv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ce=g.forwardRef(function({onClick:t,discover:n="render",prefetch:o="none",relative:i,reloadDocument:a,replace:c,unstable_mask:d,state:p,target:m,to:h,preventScrollReset:x,viewTransition:v,unstable_defaultShouldRevalidate:b,...N},k){let{basename:j,navigator:S,unstable_useTransitions:T}=g.useContext(Qn),A=typeof h=="string"&&mv.test(h),L=ov(h,j);h=L.to;let O=Kj(h,{relative:i}),P=fn(),$=null;if(d){let _=Gf(d,[],P.unstable_mask?P.unstable_mask.pathname:"/",!0);j!=="/"&&(_.pathname=_.pathname==="/"?j:jr([j,_.pathname])),$=S.createHref(_)}let[E,H,Z]=DS(o,N),K=US(h,{replace:c,unstable_mask:d,state:p,target:m,preventScrollReset:x,relative:i,viewTransition:v,unstable_defaultShouldRevalidate:b,unstable_useTransitions:T});function q(_){t&&t(_),_.defaultPrevented||K(_)}let Y=!(L.isExternal||a),X=g.createElement("a",{...N,...Z,href:(Y?$:void 0)||L.absoluteURL||O,onClick:Y?q:t,ref:_S(k,H),target:m,"data-discover":!A&&n==="render"?"true":void 0});return E&&!A?g.createElement(g.Fragment,null,X,g.createElement(IS,{page:O})):X});Ce.displayName="Link";var FS=g.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:o="",end:i=!1,style:a,to:c,viewTransition:d,children:p,...m},h){let x=sl(c,{relative:m.relative}),v=fn(),b=g.useContext(ac),{navigator:N,basename:k}=g.useContext(Qn),j=b!=null&&GS(x)&&d===!0,S=N.encodeLocation?N.encodeLocation(x).pathname:x.pathname,T=v.pathname,A=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;n||(T=T.toLowerCase(),A=A?A.toLowerCase():null,S=S.toLowerCase()),A&&k&&(A=Wr(A,k)||A);const L=S!=="/"&&S.endsWith("/")?S.length-1:S.length;let O=T===S||!i&&T.startsWith(S)&&T.charAt(L)==="/",P=A!=null&&(A===S||!i&&A.startsWith(S)&&A.charAt(S.length)==="/"),$={isActive:O,isPending:P,isTransitioning:j},E=O?t:void 0,H;typeof o=="function"?H=o($):H=[o,O?"active":null,P?"pending":null,j?"transitioning":null].filter(Boolean).join(" ");let Z=typeof a=="function"?a($):a;return g.createElement(Ce,{...m,"aria-current":E,className:H,ref:h,style:Z,to:c,viewTransition:d},typeof p=="function"?p($):p)});FS.displayName="NavLink";var zS=g.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:o,replace:i,state:a,method:c=_a,action:d,onSubmit:p,relative:m,preventScrollReset:h,viewTransition:x,unstable_defaultShouldRevalidate:v,...b},N)=>{let{unstable_useTransitions:k}=g.useContext(Qn),j=VS(),S=qS(d,{relative:m}),T=c.toLowerCase()==="get"?"get":"post",A=typeof d=="string"&&mv.test(d),L=O=>{if(p&&p(O),O.defaultPrevented)return;O.preventDefault();let P=O.nativeEvent.submitter,$=(P==null?void 0:P.getAttribute("formmethod"))||c,E=()=>j(P||O.currentTarget,{fetcherKey:t,method:$,navigate:n,replace:i,state:a,relative:m,preventScrollReset:h,viewTransition:x,unstable_defaultShouldRevalidate:v});k&&n!==!1?g.startTransition(()=>E()):E()};return g.createElement("form",{ref:N,method:T,action:S,onSubmit:o?p:L,...b,"data-discover":!A&&e==="render"?"true":void 0})});zS.displayName="Form";function BS(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function gv(e){let t=g.useContext(Os);return mt(t,BS(e)),t}function US(e,{target:t,replace:n,unstable_mask:o,state:i,preventScrollReset:a,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:p,unstable_useTransitions:m}={}){let h=Wt(),x=fn(),v=sl(e,{relative:c});return g.useCallback(b=>{if(yS(b,t)){b.preventDefault();let N=n!==void 0?n:Yi(x)===Yi(v),k=()=>h(e,{replace:N,unstable_mask:o,state:i,preventScrollReset:a,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:p});m?g.startTransition(()=>k()):k()}},[x,h,v,n,o,i,t,e,a,c,d,p,m])}function _s(e){lr(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=g.useRef(gf(e)),n=g.useRef(!1),o=fn(),i=g.useMemo(()=>vS(o.search,n.current?null:t.current),[o.search]),a=Wt(),c=g.useCallback((d,p)=>{const m=gf(typeof d=="function"?d(new URLSearchParams(i)):d);n.current=!0,a("?"+m,p)},[a,i]);return[i,c]}var HS=0,WS=()=>`__${String(++HS)}__`;function VS(){let{router:e}=gv("useSubmit"),{basename:t}=g.useContext(Qn),n=lS(),o=e.fetch,i=e.navigate;return g.useCallback(async(a,c={})=>{let{action:d,method:p,encType:m,formData:h,body:x}=kS(a,t);if(c.navigate===!1){let v=c.fetcherKey||WS();await o(v,n,c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:h,body:x,formMethod:c.method||p,formEncType:c.encType||m,flushSync:c.flushSync})}else await i(c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:h,body:x,formMethod:c.method||p,formEncType:c.encType||m,replace:c.replace,state:c.state,fromRouteId:n,flushSync:c.flushSync,viewTransition:c.viewTransition})},[o,i,t,n])}function qS(e,{relative:t}={}){let{basename:n}=g.useContext(Qn),o=g.useContext(dr);mt(o,"useFormAction must be used inside a RouteContext");let[i]=o.matches.slice(-1),a={...sl(e||".",{relative:t})},c=fn();if(e==null){a.search=c.search;let d=new URLSearchParams(a.search),p=d.getAll("index");if(p.some(h=>h==="")){d.delete("index"),p.filter(x=>x).forEach(x=>d.append("index",x));let h=d.toString();a.search=h?`?${h}`:""}}return(!e||e===".")&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(a.pathname=a.pathname==="/"?n:jr([n,a.pathname])),Yi(a)}function GS(e,{relative:t}={}){let n=g.useContext(iv);mt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=gv("useViewTransitionState"),i=sl(e,{relative:t});if(!n.isTransitioning)return!1;let a=Wr(n.currentLocation.pathname,o)||n.currentLocation.pathname,c=Wr(n.nextLocation.pathname,o)||n.nextLocation.pathname;return qa(i.pathname,c)!=null||qa(i.pathname,a)!=null}var wo=Jy();const KS=lc(wo);/**
|
|
52
|
-
* @license lucide-react v0.460.0 - ISC
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the ISC license.
|
|
55
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/const YS=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),xv=(...e)=>e.filter((t,n,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===n).join(" ").trim();/**
|
|
57
|
-
* @license lucide-react v0.460.0 - ISC
|
|
58
|
-
*
|
|
59
|
-
* This source code is licensed under the ISC license.
|
|
60
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/var XS={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
62
|
-
* @license lucide-react v0.460.0 - ISC
|
|
63
|
-
*
|
|
64
|
-
* This source code is licensed under the ISC license.
|
|
65
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/const QS=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:i="",children:a,iconNode:c,...d},p)=>g.createElement("svg",{ref:p,...XS,width:t,height:t,stroke:e,strokeWidth:o?Number(n)*24/Number(t):n,className:xv("lucide",i),...d},[...c.map(([m,h])=>g.createElement(m,h)),...Array.isArray(a)?a:[a]]));/**
|
|
67
|
-
* @license lucide-react v0.460.0 - ISC
|
|
68
|
-
*
|
|
69
|
-
* This source code is licensed under the ISC license.
|
|
70
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/const ye=(e,t)=>{const n=g.forwardRef(({className:o,...i},a)=>g.createElement(QS,{ref:a,iconNode:t,className:xv(`lucide-${YS(e)}`,o),...i}));return n.displayName=`${e}`,n};/**
|
|
72
|
-
* @license lucide-react v0.460.0 - ISC
|
|
73
|
-
*
|
|
74
|
-
* This source code is licensed under the ISC license.
|
|
75
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/const uc=ye("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
|
|
77
|
-
* @license lucide-react v0.460.0 - ISC
|
|
78
|
-
*
|
|
79
|
-
* This source code is licensed under the ISC license.
|
|
80
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/const yv=ye("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
82
|
-
* @license lucide-react v0.460.0 - ISC
|
|
83
|
-
*
|
|
84
|
-
* This source code is licensed under the ISC license.
|
|
85
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/const JS=ye("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
87
|
-
* @license lucide-react v0.460.0 - ISC
|
|
88
|
-
*
|
|
89
|
-
* This source code is licensed under the ISC license.
|
|
90
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/const Ga=ye("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
|
|
92
|
-
* @license lucide-react v0.460.0 - ISC
|
|
93
|
-
*
|
|
94
|
-
* This source code is licensed under the ISC license.
|
|
95
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const ZS=ye("BookOpenText",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M16 12h2",key:"7q9ll5"}],["path",{d:"M16 8h2",key:"msurwy"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}],["path",{d:"M6 12h2",key:"32wvfc"}],["path",{d:"M6 8h2",key:"30oboj"}]]);/**
|
|
97
|
-
* @license lucide-react v0.460.0 - ISC
|
|
98
|
-
*
|
|
99
|
-
* This source code is licensed under the ISC license.
|
|
100
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/const vv=ye("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
|
|
102
|
-
* @license lucide-react v0.460.0 - ISC
|
|
103
|
-
*
|
|
104
|
-
* This source code is licensed under the ISC license.
|
|
105
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/const Zf=ye("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
107
|
-
* @license lucide-react v0.460.0 - ISC
|
|
108
|
-
*
|
|
109
|
-
* This source code is licensed under the ISC license.
|
|
110
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/const Xi=ye("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
112
|
-
* @license lucide-react v0.460.0 - ISC
|
|
113
|
-
*
|
|
114
|
-
* This source code is licensed under the ISC license.
|
|
115
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/const bv=ye("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
117
|
-
* @license lucide-react v0.460.0 - ISC
|
|
118
|
-
*
|
|
119
|
-
* This source code is licensed under the ISC license.
|
|
120
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/const xf=ye("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
122
|
-
* @license lucide-react v0.460.0 - ISC
|
|
123
|
-
*
|
|
124
|
-
* This source code is licensed under the ISC license.
|
|
125
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
-
*/const ep=ye("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
127
|
-
* @license lucide-react v0.460.0 - ISC
|
|
128
|
-
*
|
|
129
|
-
* This source code is licensed under the ISC license.
|
|
130
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/const yf=ye("CircleDot",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]);/**
|
|
132
|
-
* @license lucide-react v0.460.0 - ISC
|
|
133
|
-
*
|
|
134
|
-
* This source code is licensed under the ISC license.
|
|
135
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
-
*/const eC=ye("CircleStop",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]]);/**
|
|
137
|
-
* @license lucide-react v0.460.0 - ISC
|
|
138
|
-
*
|
|
139
|
-
* This source code is licensed under the ISC license.
|
|
140
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
-
*/const tC=ye("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
142
|
-
* @license lucide-react v0.460.0 - ISC
|
|
143
|
-
*
|
|
144
|
-
* This source code is licensed under the ISC license.
|
|
145
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/const nC=ye("ClipboardCheck",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]]);/**
|
|
147
|
-
* @license lucide-react v0.460.0 - ISC
|
|
148
|
-
*
|
|
149
|
-
* This source code is licensed under the ISC license.
|
|
150
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
-
*/const rC=ye("Clock3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16.5 12",key:"1aq6pp"}]]);/**
|
|
152
|
-
* @license lucide-react v0.460.0 - ISC
|
|
153
|
-
*
|
|
154
|
-
* This source code is licensed under the ISC license.
|
|
155
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
-
*/const oC=ye("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);/**
|
|
157
|
-
* @license lucide-react v0.460.0 - ISC
|
|
158
|
-
*
|
|
159
|
-
* This source code is licensed under the ISC license.
|
|
160
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
-
*/const sC=ye("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
162
|
-
* @license lucide-react v0.460.0 - ISC
|
|
163
|
-
*
|
|
164
|
-
* This source code is licensed under the ISC license.
|
|
165
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
-
*/const tp=ye("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
167
|
-
* @license lucide-react v0.460.0 - ISC
|
|
168
|
-
*
|
|
169
|
-
* This source code is licensed under the ISC license.
|
|
170
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
-
*/const iC=ye("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
172
|
-
* @license lucide-react v0.460.0 - ISC
|
|
173
|
-
*
|
|
174
|
-
* This source code is licensed under the ISC license.
|
|
175
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
-
*/const lC=ye("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
|
|
177
|
-
* @license lucide-react v0.460.0 - ISC
|
|
178
|
-
*
|
|
179
|
-
* This source code is licensed under the ISC license.
|
|
180
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
-
*/const wv=ye("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
|
182
|
-
* @license lucide-react v0.460.0 - ISC
|
|
183
|
-
*
|
|
184
|
-
* This source code is licensed under the ISC license.
|
|
185
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
-
*/const ex=ye("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
187
|
-
* @license lucide-react v0.460.0 - ISC
|
|
188
|
-
*
|
|
189
|
-
* This source code is licensed under the ISC license.
|
|
190
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
-
*/const aC=ye("FileCode2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m5 12-3 3 3 3",key:"oke12k"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]]);/**
|
|
192
|
-
* @license lucide-react v0.460.0 - ISC
|
|
193
|
-
*
|
|
194
|
-
* This source code is licensed under the ISC license.
|
|
195
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
-
*/const cC=ye("FilePenLine",[["path",{d:"m18 5-2.414-2.414A2 2 0 0 0 14.172 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2",key:"142zxg"}],["path",{d:"M21.378 12.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"2t3380"}],["path",{d:"M8 18h1",key:"13wk12"}]]);/**
|
|
197
|
-
* @license lucide-react v0.460.0 - ISC
|
|
198
|
-
*
|
|
199
|
-
* This source code is licensed under the ISC license.
|
|
200
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
-
*/const uC=ye("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
202
|
-
* @license lucide-react v0.460.0 - ISC
|
|
203
|
-
*
|
|
204
|
-
* This source code is licensed under the ISC license.
|
|
205
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
-
*/const dC=ye("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/**
|
|
207
|
-
* @license lucide-react v0.460.0 - ISC
|
|
208
|
-
*
|
|
209
|
-
* This source code is licensed under the ISC license.
|
|
210
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
-
*/const np=ye("FolderKanban",[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]]);/**
|
|
212
|
-
* @license lucide-react v0.460.0 - ISC
|
|
213
|
-
*
|
|
214
|
-
* This source code is licensed under the ISC license.
|
|
215
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
-
*/const fC=ye("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/**
|
|
217
|
-
* @license lucide-react v0.460.0 - ISC
|
|
218
|
-
*
|
|
219
|
-
* This source code is licensed under the ISC license.
|
|
220
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
-
*/const kv=ye("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
|
|
222
|
-
* @license lucide-react v0.460.0 - ISC
|
|
223
|
-
*
|
|
224
|
-
* This source code is licensed under the ISC license.
|
|
225
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
-
*/const pC=ye("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
|
|
227
|
-
* @license lucide-react v0.460.0 - ISC
|
|
228
|
-
*
|
|
229
|
-
* This source code is licensed under the ISC license.
|
|
230
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
-
*/const hC=ye("Hammer",[["path",{d:"m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9",key:"eefl8a"}],["path",{d:"m18 15 4-4",key:"16gjal"}],["path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",key:"b7pghm"}]]);/**
|
|
232
|
-
* @license lucide-react v0.460.0 - ISC
|
|
233
|
-
*
|
|
234
|
-
* This source code is licensed under the ISC license.
|
|
235
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
-
*/const mC=ye("Hourglass",[["path",{d:"M5 22h14",key:"ehvnwv"}],["path",{d:"M5 2h14",key:"pdyrp9"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",key:"1d314k"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2",key:"1vvvr6"}]]);/**
|
|
237
|
-
* @license lucide-react v0.460.0 - ISC
|
|
238
|
-
*
|
|
239
|
-
* This source code is licensed under the ISC license.
|
|
240
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
241
|
-
*/const jv=ye("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
242
|
-
* @license lucide-react v0.460.0 - ISC
|
|
243
|
-
*
|
|
244
|
-
* This source code is licensed under the ISC license.
|
|
245
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
246
|
-
*/const gC=ye("LifeBuoy",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.93 4.93 4.24 4.24",key:"1ymg45"}],["path",{d:"m14.83 9.17 4.24-4.24",key:"1cb5xl"}],["path",{d:"m14.83 14.83 4.24 4.24",key:"q42g0n"}],["path",{d:"m9.17 14.83-4.24 4.24",key:"bqpfvv"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]]);/**
|
|
247
|
-
* @license lucide-react v0.460.0 - ISC
|
|
248
|
-
*
|
|
249
|
-
* This source code is licensed under the ISC license.
|
|
250
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
251
|
-
*/const xC=ye("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/**
|
|
252
|
-
* @license lucide-react v0.460.0 - ISC
|
|
253
|
-
*
|
|
254
|
-
* This source code is licensed under the ISC license.
|
|
255
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
256
|
-
*/const yC=ye("ListTodo",[["rect",{x:"3",y:"5",width:"6",height:"6",rx:"1",key:"1defrl"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/**
|
|
257
|
-
* @license lucide-react v0.460.0 - ISC
|
|
258
|
-
*
|
|
259
|
-
* This source code is licensed under the ISC license.
|
|
260
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
261
|
-
*/const Sv=ye("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
262
|
-
* @license lucide-react v0.460.0 - ISC
|
|
263
|
-
*
|
|
264
|
-
* This source code is licensed under the ISC license.
|
|
265
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
266
|
-
*/const vC=ye("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
|
|
267
|
-
* @license lucide-react v0.460.0 - ISC
|
|
268
|
-
*
|
|
269
|
-
* This source code is licensed under the ISC license.
|
|
270
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
271
|
-
*/const rp=ye("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
|
|
272
|
-
* @license lucide-react v0.460.0 - ISC
|
|
273
|
-
*
|
|
274
|
-
* This source code is licensed under the ISC license.
|
|
275
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
276
|
-
*/const bC=ye("MoonStar",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9",key:"4ay0iu"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}]]);/**
|
|
277
|
-
* @license lucide-react v0.460.0 - ISC
|
|
278
|
-
*
|
|
279
|
-
* This source code is licensed under the ISC license.
|
|
280
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
281
|
-
*/const Rd=ye("NotebookPen",[["path",{d:"M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4",key:"re6nr2"}],["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["path",{d:"M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"pqwjuv"}]]);/**
|
|
282
|
-
* @license lucide-react v0.460.0 - ISC
|
|
283
|
-
*
|
|
284
|
-
* This source code is licensed under the ISC license.
|
|
285
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
286
|
-
*/const wC=ye("OctagonX",[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
287
|
-
* @license lucide-react v0.460.0 - ISC
|
|
288
|
-
*
|
|
289
|
-
* This source code is licensed under the ISC license.
|
|
290
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
291
|
-
*/const kC=ye("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
|
|
292
|
-
* @license lucide-react v0.460.0 - ISC
|
|
293
|
-
*
|
|
294
|
-
* This source code is licensed under the ISC license.
|
|
295
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
296
|
-
*/const Xn=ye("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
297
|
-
* @license lucide-react v0.460.0 - ISC
|
|
298
|
-
*
|
|
299
|
-
* This source code is licensed under the ISC license.
|
|
300
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
301
|
-
*/const Cv=ye("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
302
|
-
* @license lucide-react v0.460.0 - ISC
|
|
303
|
-
*
|
|
304
|
-
* This source code is licensed under the ISC license.
|
|
305
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
306
|
-
*/const jC=ye("Reply",[["polyline",{points:"9 17 4 12 9 7",key:"hvgpf2"}],["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}]]);/**
|
|
307
|
-
* @license lucide-react v0.460.0 - ISC
|
|
308
|
-
*
|
|
309
|
-
* This source code is licensed under the ISC license.
|
|
310
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
311
|
-
*/const SC=ye("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
|
312
|
-
* @license lucide-react v0.460.0 - ISC
|
|
313
|
-
*
|
|
314
|
-
* This source code is licensed under the ISC license.
|
|
315
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
316
|
-
*/const op=ye("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
|
|
317
|
-
* @license lucide-react v0.460.0 - ISC
|
|
318
|
-
*
|
|
319
|
-
* This source code is licensed under the ISC license.
|
|
320
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
321
|
-
*/const CC=ye("SearchCheck",[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
322
|
-
* @license lucide-react v0.460.0 - ISC
|
|
323
|
-
*
|
|
324
|
-
* This source code is licensed under the ISC license.
|
|
325
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
326
|
-
*/const il=ye("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
327
|
-
* @license lucide-react v0.460.0 - ISC
|
|
328
|
-
*
|
|
329
|
-
* This source code is licensed under the ISC license.
|
|
330
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
331
|
-
*/const NC=ye("SendToBack",[["rect",{x:"14",y:"14",width:"8",height:"8",rx:"2",key:"1b0bso"}],["rect",{x:"2",y:"2",width:"8",height:"8",rx:"2",key:"1x09vl"}],["path",{d:"M7 14v1a2 2 0 0 0 2 2h1",key:"pao6x6"}],["path",{d:"M14 7h1a2 2 0 0 1 2 2v1",key:"19tdru"}]]);/**
|
|
332
|
-
* @license lucide-react v0.460.0 - ISC
|
|
333
|
-
*
|
|
334
|
-
* This source code is licensed under the ISC license.
|
|
335
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
336
|
-
*/const EC=ye("ServerOff",[["path",{d:"M7 2h13a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-5",key:"bt2siv"}],["path",{d:"M10 10 2.5 2.5C2 2 2 2.5 2 5v3a2 2 0 0 0 2 2h6z",key:"1hjrv1"}],["path",{d:"M22 17v-1a2 2 0 0 0-2-2h-1",key:"1iynyr"}],["path",{d:"M4 14a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16.5l1-.5.5.5-8-8H4z",key:"161ggg"}],["path",{d:"M6 18h.01",key:"uhywen"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
|
337
|
-
* @license lucide-react v0.460.0 - ISC
|
|
338
|
-
*
|
|
339
|
-
* This source code is licensed under the ISC license.
|
|
340
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
341
|
-
*/const RC=ye("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
342
|
-
* @license lucide-react v0.460.0 - ISC
|
|
343
|
-
*
|
|
344
|
-
* This source code is licensed under the ISC license.
|
|
345
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
346
|
-
*/const PC=ye("ShieldX",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m14.5 9.5-5 5",key:"17q4r4"}],["path",{d:"m9.5 9.5 5 5",key:"18nt4w"}]]);/**
|
|
347
|
-
* @license lucide-react v0.460.0 - ISC
|
|
348
|
-
*
|
|
349
|
-
* This source code is licensed under the ISC license.
|
|
350
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
351
|
-
*/const Sr=ye("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
352
|
-
* @license lucide-react v0.460.0 - ISC
|
|
353
|
-
*
|
|
354
|
-
* This source code is licensed under the ISC license.
|
|
355
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
356
|
-
*/const tx=ye("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
|
|
357
|
-
* @license lucide-react v0.460.0 - ISC
|
|
358
|
-
*
|
|
359
|
-
* This source code is licensed under the ISC license.
|
|
360
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
361
|
-
*/const Nv=ye("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
|
|
362
|
-
* @license lucide-react v0.460.0 - ISC
|
|
363
|
-
*
|
|
364
|
-
* This source code is licensed under the ISC license.
|
|
365
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
366
|
-
*/const TC=ye("SunMedium",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 3v1",key:"1asbbs"}],["path",{d:"M12 20v1",key:"1wcdkc"}],["path",{d:"M3 12h1",key:"lp3yf2"}],["path",{d:"M20 12h1",key:"1vloll"}],["path",{d:"m18.364 5.636-.707.707",key:"1hakh0"}],["path",{d:"m6.343 17.657-.707.707",key:"18m9nf"}],["path",{d:"m5.636 5.636.707.707",key:"1xv1c5"}],["path",{d:"m17.657 17.657.707.707",key:"vl76zb"}]]);/**
|
|
367
|
-
* @license lucide-react v0.460.0 - ISC
|
|
368
|
-
*
|
|
369
|
-
* This source code is licensed under the ISC license.
|
|
370
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
371
|
-
*/const Ev=ye("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/**
|
|
372
|
-
* @license lucide-react v0.460.0 - ISC
|
|
373
|
-
*
|
|
374
|
-
* This source code is licensed under the ISC license.
|
|
375
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
376
|
-
*/const AC=ye("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
377
|
-
* @license lucide-react v0.460.0 - ISC
|
|
378
|
-
*
|
|
379
|
-
* This source code is licensed under the ISC license.
|
|
380
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
381
|
-
*/const Ms=ye("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
382
|
-
* @license lucide-react v0.460.0 - ISC
|
|
383
|
-
*
|
|
384
|
-
* This source code is licensed under the ISC license.
|
|
385
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
386
|
-
*/const ll=ye("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
387
|
-
* @license lucide-react v0.460.0 - ISC
|
|
388
|
-
*
|
|
389
|
-
* This source code is licensed under the ISC license.
|
|
390
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
391
|
-
*/const DC=ye("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
|
|
392
|
-
* @license lucide-react v0.460.0 - ISC
|
|
393
|
-
*
|
|
394
|
-
* This source code is licensed under the ISC license.
|
|
395
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
396
|
-
*/const Rv=ye("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Pv(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Pv(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function IC(){for(var e,t,n=0,o="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Pv(e))&&(o&&(o+=" "),o+=t);return o}const sp="-",LC=e=>{const t=_C(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{const d=c.split(sp);return d[0]===""&&d.length!==1&&d.shift(),Tv(d,t)||OC(c)},getConflictingClassGroupIds:(c,d)=>{const p=n[c]||[];return d&&o[c]?[...p,...o[c]]:p}}},Tv=(e,t)=>{var c;if(e.length===0)return t.classGroupId;const n=e[0],o=t.nextPart.get(n),i=o?Tv(e.slice(1),o):void 0;if(i)return i;if(t.validators.length===0)return;const a=e.join(sp);return(c=t.validators.find(({validator:d})=>d(a)))==null?void 0:c.classGroupId},nx=/^\[(.+)\]$/,OC=e=>{if(nx.test(e)){const t=nx.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},_C=e=>{const{theme:t,prefix:n}=e,o={nextPart:new Map,validators:[]};return $C(Object.entries(e.classGroups),n).forEach(([a,c])=>{vf(c,o,a,t)}),o},vf=(e,t,n,o)=>{e.forEach(i=>{if(typeof i=="string"){const a=i===""?t:rx(t,i);a.classGroupId=n;return}if(typeof i=="function"){if(MC(i)){vf(i(o),t,n,o);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([a,c])=>{vf(c,rx(t,a),n,o)})})},rx=(e,t)=>{let n=e;return t.split(sp).forEach(o=>{n.nextPart.has(o)||n.nextPart.set(o,{nextPart:new Map,validators:[]}),n=n.nextPart.get(o)}),n},MC=e=>e.isThemeGetter,$C=(e,t)=>t?e.map(([n,o])=>{const i=o.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([c,d])=>[t+c,d])):a);return[n,i]}):e,FC=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,o=new Map;const i=(a,c)=>{n.set(a,c),t++,t>e&&(t=0,o=n,n=new Map)};return{get(a){let c=n.get(a);if(c!==void 0)return c;if((c=o.get(a))!==void 0)return i(a,c),c},set(a,c){n.has(a)?n.set(a,c):i(a,c)}}},Av="!",zC=e=>{const{separator:t,experimentalParseClassName:n}=e,o=t.length===1,i=t[0],a=t.length,c=d=>{const p=[];let m=0,h=0,x;for(let j=0;j<d.length;j++){let S=d[j];if(m===0){if(S===i&&(o||d.slice(j,j+a)===t)){p.push(d.slice(h,j)),h=j+a;continue}if(S==="/"){x=j;continue}}S==="["?m++:S==="]"&&m--}const v=p.length===0?d:d.substring(h),b=v.startsWith(Av),N=b?v.substring(1):v,k=x&&x>h?x-h:void 0;return{modifiers:p,hasImportantModifier:b,baseClassName:N,maybePostfixModifierPosition:k}};return n?d=>n({className:d,parseClassName:c}):c},BC=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(o=>{o[0]==="["?(t.push(...n.sort(),o),n=[]):n.push(o)}),t.push(...n.sort()),t},UC=e=>({cache:FC(e.cacheSize),parseClassName:zC(e),...LC(e)}),HC=/\s+/,WC=(e,t)=>{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:i}=t,a=[],c=e.trim().split(HC);let d="";for(let p=c.length-1;p>=0;p-=1){const m=c[p],{modifiers:h,hasImportantModifier:x,baseClassName:v,maybePostfixModifierPosition:b}=n(m);let N=!!b,k=o(N?v.substring(0,b):v);if(!k){if(!N){d=m+(d.length>0?" "+d:d);continue}if(k=o(v),!k){d=m+(d.length>0?" "+d:d);continue}N=!1}const j=BC(h).join(":"),S=x?j+Av:j,T=S+k;if(a.includes(T))continue;a.push(T);const A=i(k,N);for(let L=0;L<A.length;++L){const O=A[L];a.push(S+O)}d=m+(d.length>0?" "+d:d)}return d};function VC(){let e=0,t,n,o="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Dv(t))&&(o&&(o+=" "),o+=n);return o}const Dv=e=>{if(typeof e=="string")return e;let t,n="";for(let o=0;o<e.length;o++)e[o]&&(t=Dv(e[o]))&&(n&&(n+=" "),n+=t);return n};function qC(e,...t){let n,o,i,a=c;function c(p){const m=t.reduce((h,x)=>x(h),e());return n=UC(m),o=n.cache.get,i=n.cache.set,a=d,d(p)}function d(p){const m=o(p);if(m)return m;const h=WC(p,n);return i(p,h),h}return function(){return a(VC.apply(null,arguments))}}const st=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Iv=/^\[(?:([a-z-]+):)?(.+)\]$/i,GC=/^\d+\/\d+$/,KC=new Set(["px","full","screen"]),YC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,XC=/\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$/,QC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,JC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ZC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Br=e=>ks(e)||KC.has(e)||GC.test(e),mo=e=>$s(e,"length",lN),ks=e=>!!e&&!Number.isNaN(Number(e)),Pd=e=>$s(e,"number",ks),Ai=e=>!!e&&Number.isInteger(Number(e)),eN=e=>e.endsWith("%")&&ks(e.slice(0,-1)),_e=e=>Iv.test(e),go=e=>YC.test(e),tN=new Set(["length","size","percentage"]),nN=e=>$s(e,tN,Lv),rN=e=>$s(e,"position",Lv),oN=new Set(["image","url"]),sN=e=>$s(e,oN,cN),iN=e=>$s(e,"",aN),Di=()=>!0,$s=(e,t,n)=>{const o=Iv.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):n(o[2]):!1},lN=e=>XC.test(e)&&!QC.test(e),Lv=()=>!1,aN=e=>JC.test(e),cN=e=>ZC.test(e),uN=()=>{const e=st("colors"),t=st("spacing"),n=st("blur"),o=st("brightness"),i=st("borderColor"),a=st("borderRadius"),c=st("borderSpacing"),d=st("borderWidth"),p=st("contrast"),m=st("grayscale"),h=st("hueRotate"),x=st("invert"),v=st("gap"),b=st("gradientColorStops"),N=st("gradientColorStopPositions"),k=st("inset"),j=st("margin"),S=st("opacity"),T=st("padding"),A=st("saturate"),L=st("scale"),O=st("sepia"),P=st("skew"),$=st("space"),E=st("translate"),H=()=>["auto","contain","none"],Z=()=>["auto","hidden","clip","visible","scroll"],K=()=>["auto",_e,t],q=()=>[_e,t],Y=()=>["",Br,mo],X=()=>["auto",ks,_e],_=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],D=()=>["solid","dashed","dotted","double","none"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],W=()=>["start","end","center","between","around","evenly","stretch"],ee=()=>["","0",_e],R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],F=()=>[ks,_e];return{cacheSize:500,separator:":",theme:{colors:[Di],spacing:[Br,mo],blur:["none","",go,_e],brightness:F(),borderColor:[e],borderRadius:["none","","full",go,_e],borderSpacing:q(),borderWidth:Y(),contrast:F(),grayscale:ee(),hueRotate:F(),invert:ee(),gap:q(),gradientColorStops:[e],gradientColorStopPositions:[eN,mo],inset:K(),margin:K(),opacity:F(),padding:q(),saturate:F(),scale:F(),sepia:ee(),skew:F(),space:q(),translate:q()},classGroups:{aspect:[{aspect:["auto","square","video",_e]}],container:["container"],columns:[{columns:[go]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"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]}],overflow:[{overflow:Z()}],"overflow-x":[{"overflow-x":Z()}],"overflow-y":[{"overflow-y":Z()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[k]}],"inset-x":[{"inset-x":[k]}],"inset-y":[{"inset-y":[k]}],start:[{start:[k]}],end:[{end:[k]}],top:[{top:[k]}],right:[{right:[k]}],bottom:[{bottom:[k]}],left:[{left:[k]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ai,_e]}],basis:[{basis:K()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",_e]}],grow:[{grow:ee()}],shrink:[{shrink:ee()}],order:[{order:["first","last","none",Ai,_e]}],"grid-cols":[{"grid-cols":[Di]}],"col-start-end":[{col:["auto",{span:["full",Ai,_e]},_e]}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":[Di]}],"row-start-end":[{row:["auto",{span:[Ai,_e]},_e]}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",_e]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",_e]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...W()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...W(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...W(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[T]}],px:[{px:[T]}],py:[{py:[T]}],ps:[{ps:[T]}],pe:[{pe:[T]}],pt:[{pt:[T]}],pr:[{pr:[T]}],pb:[{pb:[T]}],pl:[{pl:[T]}],m:[{m:[j]}],mx:[{mx:[j]}],my:[{my:[j]}],ms:[{ms:[j]}],me:[{me:[j]}],mt:[{mt:[j]}],mr:[{mr:[j]}],mb:[{mb:[j]}],ml:[{ml:[j]}],"space-x":[{"space-x":[$]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[$]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",_e,t]}],"min-w":[{"min-w":[_e,t,"min","max","fit"]}],"max-w":[{"max-w":[_e,t,"none","full","min","max","fit","prose",{screen:[go]},go]}],h:[{h:[_e,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[_e,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[_e,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[_e,t,"auto","min","max","fit"]}],"font-size":[{text:["base",go,mo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Pd]}],"font-family":[{font:[Di]}],"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",_e]}],"line-clamp":[{"line-clamp":["none",ks,Pd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Br,_e]}],"list-image":[{"list-image":["none",_e]}],"list-style-type":[{list:["none","disc","decimal",_e]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Br,mo]}],"underline-offset":[{"underline-offset":["auto",Br,_e]}],"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:q()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",_e]}],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",_e]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[..._(),rN]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",nN]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},sN]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[N]}],"gradient-via-pos":[{via:[N]}],"gradient-to-pos":[{to:[N]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[d]}],"border-w-x":[{"border-x":[d]}],"border-w-y":[{"border-y":[d]}],"border-w-s":[{"border-s":[d]}],"border-w-e":[{"border-e":[d]}],"border-w-t":[{"border-t":[d]}],"border-w-r":[{"border-r":[d]}],"border-w-b":[{"border-b":[d]}],"border-w-l":[{"border-l":[d]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[...D(),"hidden"]}],"divide-x":[{"divide-x":[d]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[d]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[S]}],"divide-style":[{divide:D()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...D()]}],"outline-offset":[{"outline-offset":[Br,_e]}],"outline-w":[{outline:[Br,mo]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[Br,mo]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",go,iN]}],"shadow-color":[{shadow:[Di]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[...V(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":V()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[o]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",go,_e]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[x]}],saturate:[{saturate:[A]}],sepia:[{sepia:[O]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[p]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[x]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[A]}],"backdrop-sepia":[{"backdrop-sepia":[O]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",_e]}],duration:[{duration:F()}],ease:[{ease:["linear","in","out","in-out",_e]}],delay:[{delay:F()}],animate:[{animate:["none","spin","ping","pulse","bounce",_e]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[L]}],"scale-x":[{"scale-x":[L]}],"scale-y":[{"scale-y":[L]}],rotate:[{rotate:[Ai,_e]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[P]}],"skew-y":[{"skew-y":[P]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",_e]}],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",_e]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":q()}],"scroll-mx":[{"scroll-mx":q()}],"scroll-my":[{"scroll-my":q()}],"scroll-ms":[{"scroll-ms":q()}],"scroll-me":[{"scroll-me":q()}],"scroll-mt":[{"scroll-mt":q()}],"scroll-mr":[{"scroll-mr":q()}],"scroll-mb":[{"scroll-mb":q()}],"scroll-ml":[{"scroll-ml":q()}],"scroll-p":[{"scroll-p":q()}],"scroll-px":[{"scroll-px":q()}],"scroll-py":[{"scroll-py":q()}],"scroll-ps":[{"scroll-ps":q()}],"scroll-pe":[{"scroll-pe":q()}],"scroll-pt":[{"scroll-pt":q()}],"scroll-pr":[{"scroll-pr":q()}],"scroll-pb":[{"scroll-pb":q()}],"scroll-pl":[{"scroll-pl":q()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",_e]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Br,mo,Pd]}],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"]}}},dN=qC(uN);function $e(...e){return dN(IC(e))}function ko(e){if(!e)return"—";const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function Cr(e){if(!e)return"—";const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function fN(e){if(!e)return"—";const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function pN(e){if(!e)return"—";const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function hN(e){if(!e)return"—";const t=new Date(e);if(Number.isNaN(t.getTime()))return e;const n=Math.floor((Date.now()-t.getTime())/1e3);if(n<60)return"just now";const o=Math.floor(n/60);if(o<60)return`${o}m ago`;const i=Math.floor(o/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}function Cn(e){return e.split(/[_\s-]+/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function Ov(e){return!e||e==="/"?"/":e.endsWith("/")?e.slice(0,-1):e}function mN(e){let t=Ov(e);const n=t.match(/^\/w\/[^/]+(\/.*)?$/);return n&&(t=n[1]||"/"),t==="/"?"/":t.startsWith("/projects")?/^\/projects\/[^/]+\/assignments\//.test(t)?"/assignments":"/projects":t.startsWith("/assignments")?"/assignments":t.startsWith("/servers")?"/servers":t.startsWith("/agent-sessions")?"/agent-sessions":t.startsWith("/playbooks")?"/playbooks":t.startsWith("/todos")?"/todos":t.startsWith("/attention")?"/attention":t.startsWith("/help")?"/help":t.startsWith("/settings")?"/settings":null}function _v(e,t){return mN(e)===t}function gN(e){let n=Ov(e).split("/").filter(Boolean);const o=[];let i="Overview",a=null,c="";return n[0]==="w"&&n[1]&&(c=`/w/${n[1]}`,o.push({label:Cn(n[1]),path:`${c}/projects`}),n=n.slice(2)),n.length===0?{title:i,breadcrumbs:o,projectSlug:a}:(n[0]==="projects"?(o.push({label:"Projects",path:`${c}/projects`}),i="Projects",n[1]&&(a=n[1],o.push({label:Cn(n[1]),path:`${c}/projects/${n[1]}`}),i=Cn(n[1])),n[2]==="edit"?i="Edit Project":n[2]==="create"&&n[3]==="assignment"?i="Create Assignment":n[2]==="assignments"&&n[3]&&(o.push({label:Cn(n[3]),path:`${c}/projects/${n[1]}/assignments/${n[3]}`}),i=Cn(n[3]),n[4]==="edit"?i="Edit Assignment":n[4]==="plan"&&n[5]==="edit"?i="Edit Plan":n[4]==="scratchpad"&&n[5]==="edit"?i="Edit Scratchpad":n[4]==="handoff"&&n[5]==="edit"?i="Append Handoff":n[4]==="decision-record"&&n[5]==="edit"&&(i="Append Decision"))):n[0]==="servers"?(i="Servers",o.push({label:"Servers",path:`${c}/servers`})):n[0]==="agent-sessions"?(i="Agent Sessions",o.push({label:"Agent Sessions",path:`${c}/agent-sessions`})):n[0]==="attention"?(i="Attention",o.push({label:"Attention",path:"/attention"})):n[0]==="assignments"?(i="Assignments",o.push({label:"Assignments",path:`${c}/assignments`})):n[0]==="playbooks"?(o.push({label:"Playbooks",path:"/playbooks"}),i="Playbooks",n[1]==="create"?i="Create Playbook":n[1]&&n[2]==="edit"?(o.push({label:Cn(n[1]),path:`/playbooks/${n[1]}`}),i="Edit Playbook"):n[1]&&(o.push({label:Cn(n[1]),path:`/playbooks/${n[1]}`}),i=Cn(n[1]))):n[0]==="todos"?(i="Todos",o.push({label:"Todos",path:`${c}/todos`})):n[0]==="help"?(i="Help",o.push({label:"Help",path:"/help"})):n[0]==="settings"?(i="Settings",o.push({label:"Settings",path:"/settings"})):n[0]==="create"&&n[1]==="project"&&(i="Create Project",o.push({label:"Create Project",path:`${c}/create/project`})),{title:i,breadcrumbs:o,projectSlug:a})}function ox({items:e,onNavigate:t}){const n=fn();return l.jsx("nav",{className:"space-y-1",children:e.map(o=>{const i=o.icon,a=_v(n.pathname,o.to)&&!n.pathname.startsWith("/w/");return l.jsxs(Ce,{to:o.to,onClick:t,className:$e("flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition",a?"bg-foreground text-background shadow-sm":"text-muted-foreground hover:bg-background/80 hover:text-foreground"),children:[l.jsx(i,{className:"h-4 w-4"}),l.jsx("span",{children:o.label})]},o.to)})})}const bf="syntaur-theme",Mv=g.createContext(null);function wf(){try{const e=window.localStorage.getItem(bf);return e==="light"||e==="dark"?e:null}catch{return null}}function $v(){return typeof window>"u"||!window.matchMedia?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Fv(e){const t=document.documentElement;t.classList.toggle("dark",e==="dark"),t.dataset.theme=e}function xN(){if(typeof document>"u")return;const e=wf();Fv(e??$v())}function yN({children:e}){const[t,n]=g.useState(()=>wf()),[o,i]=g.useState(()=>wf()??$v());g.useEffect(()=>{Fv(o)},[o]),g.useEffect(()=>{if(!window.matchMedia)return;const c=window.matchMedia("(prefers-color-scheme: dark)"),d=()=>{t||i(c.matches?"dark":"light")};return d(),c.addEventListener("change",d),()=>{c.removeEventListener("change",d)}},[t]);const a={resolvedTheme:o,explicitTheme:t,setTheme:c=>{window.localStorage.setItem(bf,c),n(c),i(c)},toggleTheme:()=>{const c=o==="dark"?"light":"dark";window.localStorage.setItem(bf,c),n(c),i(c)}};return l.jsx(Mv.Provider,{value:a,children:e})}function zv(){const e=g.useContext(Mv);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}const $a=new Set;let Sn=null,js=null;function vN(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`}function Bv(){Sn&&(Sn.readyState===WebSocket.OPEN||Sn.readyState===WebSocket.CONNECTING)||(Sn=new WebSocket(vN()),Sn.onmessage=e=>{try{const t=JSON.parse(e.data);for(const n of $a)n(t)}catch{}},Sn.onclose=()=>{Sn=null,js&&clearTimeout(js),js=setTimeout(Bv,2e3)},Sn.onerror=()=>{Sn==null||Sn.close()})}function ip(e){const t=g.useRef(e);t.current=e,g.useEffect(()=>{const n=o=>t.current(o);return $a.add(n),Bv(),()=>{$a.delete(n),$a.size===0&&Sn&&(js&&clearTimeout(js),js=null,Sn.close(),Sn=null)}},[])}function pn(e,t){const[n,o]=g.useState(null),[i,a]=g.useState(!0),[c,d]=g.useState(null),[p,m]=g.useState(0),h=g.useCallback(()=>{m(x=>x+1)},[]);return g.useEffect(()=>{if(!e){a(!1),o(null);return}let x=!1;return a(!0),d(null),fetch(e).then(async v=>{if(!v.ok){const b=await v.json().catch(()=>null);throw new Error((b==null?void 0:b.error)||`HTTP ${v.status}`)}return v.json()}).then(v=>{x||(o(v),a(!1))}).catch(v=>{x||(d(v.message),a(!1))}),()=>{x=!0}},[e,p]),ip(x=>{t&&((x.type==="project-updated"||x.type==="assignment-updated")&&h(),x.type==="servers-updated"&&t==="servers"&&h(),x.type==="agent-sessions-updated"&&t==="agent-sessions"&&h(),x.type==="playbooks-updated"&&t==="playbooks"&&h())}),{data:n,loading:i,error:c,refetch:h}}function dc(){return pn("/api/projects","projects")}function lp(){return pn("/api/workspaces","projects")}function Rt(){const{workspace:e}=St();return e?`/w/${e}`:""}function bN(){return pn("/api/overview","overview")}function Uv(){return pn("/api/assignments","assignments")}function wN(){return pn("/api/attention","attention")}function Hv(){return pn("/api/help")}function Wv(e){const t=e?`/api/projects/${e}`:null;return pn(t,"project")}function kN(e,t){const n=e&&t?`/api/projects/${e}/assignments/${t}`:null;return pn(n,"assignment")}function jN(e){const t=e?`/api/assignments/${e}`:null;return pn(t,"assignment")}function Vv(e){return pn(e)}function ap(){return pn("/api/servers","servers")}function SN(){return pn("/api/agent-sessions","agent-sessions")}function CN(e,t){const n=e&&t?`/api/agent-sessions/${e}?assignment=${t}`:null;return pn(n,"agent-sessions")}function qv(){return pn("/api/playbooks","playbooks")}function NN(e){const t=e?`/api/playbooks/${e}`:null;return pn(t,"playbooks")}function ws(){if(typeof navigator>"u")return!1;const e=navigator.platform||"",t=navigator.userAgent||"";return/Mac|iPhone|iPad|iPod/.test(e)||/Mac OS X/.test(t)}function EN(e){const t=e.split("+").map(i=>i.trim()),n=t[t.length-1]??"",o=new Set(t.slice(0,-1).map(i=>i.toLowerCase()));return{key:n.toLowerCase(),mod:o.has("mod"),shift:o.has("shift"),alt:o.has("alt"),ctrl:o.has("ctrl")}}function Td(e,t){const n=EN(t);if(e.key.toLowerCase()!==n.key)return!1;const i=ws()?e.metaKey:e.ctrlKey;return!(n.mod&&!i||!n.mod&&!n.ctrl&&i||n.ctrl&&!e.ctrlKey||n.shift&&!e.shiftKey||!n.shift&&!(n.key.length===1&&!/^[a-z0-9]$/.test(n.key))&&e.shiftKey||n.alt&&!e.altKey||!n.alt&&e.altKey)}function Ss(e){return e.split("+").map(n=>{const o=n.toLowerCase();return o==="mod"?ws()?"⌘":"Ctrl":o==="shift"?ws()?"⇧":"Shift":o==="alt"?ws()?"⌥":"Alt":o==="ctrl"?ws()?"⌃":"Ctrl":o==="enter"?"↵":o==="escape"?"Esc":o==="arrowup"?"↑":o==="arrowdown"?"↓":n.length===1?n.toUpperCase():n}).join(ws()?"":"+")}function RN(e){const[t,n]=g.useState(null),[o,i]=g.useState(!0),[a,c]=g.useState(null),d=g.useCallback(async()=>{try{const p=await fetch(`/api/todos/${encodeURIComponent(e)}`);if(!p.ok)throw new Error(`HTTP ${p.status}`);n(await p.json()),c(null)}catch(p){c(p instanceof Error?p.message:"Failed to fetch todos")}finally{i(!1)}},[e]);return g.useEffect(()=>{d()},[d]),ip(p=>{p.type==="todos-updated"&&d()}),{data:t,loading:o,error:a,refetch:d}}function cp(){const[e,t]=g.useState(null),[n,o]=g.useState(!0),[i,a]=g.useState(null),c=g.useCallback(async()=>{try{const d=await fetch("/api/todos");if(!d.ok)throw new Error(`HTTP ${d.status}`);t(await d.json()),a(null)}catch(d){a(d instanceof Error?d.message:"Failed to fetch todos")}finally{o(!1)}},[]);return g.useEffect(()=>{c()},[c]),ip(d=>{d.type==="todos-updated"&&c()}),{data:e,loading:n,error:i,refetch:c}}async function Gv(e,t,n){await fetch(`/api/todos/${encodeURIComponent(e)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({description:t,tags:n})})}async function Kv(e,t,n){await fetch(`/api/todos/${encodeURIComponent(e)}/${t}/complete`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({summary:"Completed."})})}async function Yv(e,t,n){await fetch(`/api/todos/${encodeURIComponent(e)}/${t}/block`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reason:n})})}async function Xv(e,t,n){await fetch(`/api/todos/${encodeURIComponent(e)}/${t}/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({session:n})})}async function Qv(e,t){await fetch(`/api/todos/${encodeURIComponent(e)}/${t}/reopen`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})})}async function PN(e,t){await fetch(`/api/todos/${encodeURIComponent(e)}/reorder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:t})})}async function TN(e,t){await fetch(`/api/todos/${encodeURIComponent(e)}/${t}`,{method:"DELETE"})}const AN=new Set(["/projects","/assignments","/servers","/todos"]);function Fa(e,t){return AN.has(e)?`${t}${e}`:e}const DN=[{id:"page-overview",title:"Overview",basePath:"/",keywords:["home","dashboard"]},{id:"page-projects",title:"Projects",basePath:"/projects",keywords:[]},{id:"page-assignments",title:"Assignments",basePath:"/assignments",keywords:[]},{id:"page-todos",title:"Todos",basePath:"/todos",keywords:["tasks"]},{id:"page-servers",title:"Servers",basePath:"/servers",keywords:["sessions"]},{id:"page-attention",title:"Attention",basePath:"/attention",keywords:["alerts"]},{id:"page-playbooks",title:"Playbooks",basePath:"/playbooks",keywords:[]},{id:"page-settings",title:"Settings",basePath:"/settings",keywords:[]},{id:"page-help",title:"Help",basePath:"/help",keywords:["shortcuts"]}];function IN(e){const t=[];for(const n of DN)t.push({type:"page",id:n.id,title:n.title,keywords:[...n.keywords],route:Fa(n.basePath,e.wsPrefix)});for(const n of e.projects??[]){const o=n.workspace?`/w/${n.workspace}`:"";t.push({type:"project",id:`project-${n.slug}`,title:n.title,subtitle:n.slug,keywords:n.tags,route:`${o}/projects/${n.slug}`})}for(const n of e.assignments??[]){const o=n.projectWorkspace?`/w/${n.projectWorkspace}`:"";t.push({type:"assignment",id:n.projectSlug===null?`assignment-standalone-${n.id}`:`assignment-${n.projectSlug}-${n.slug}`,title:n.title,subtitle:`${n.projectTitle} · ${n.status}`,keywords:[n.projectSlug??"standalone",n.assignee??""].filter(i=>!!i),route:n.projectSlug===null?`/assignments/${n.id}`:`${o}/projects/${n.projectSlug}/assignments/${n.slug}`})}for(const n of e.playbooks??[])t.push({type:"playbook",id:`playbook-${n.slug}`,title:n.name,subtitle:n.description,keywords:n.tags,route:`/playbooks/${n.slug}`});for(const n of e.servers??[])t.push({type:"server",id:`server-${n.name}`,title:n.name,subtitle:n.alive?"alive":"dead",route:`${Fa("/servers",e.wsPrefix)}#server-${encodeURIComponent(n.name)}`});for(const n of e.todos??[]){const o=n.workspace&&n.workspace!=="_ungrouped"?`/w/${n.workspace}`:e.wsPrefix,i=Fa("/todos",o);t.push({type:"todo",id:`todo-${n.id}`,title:n.description,subtitle:n.status,keywords:n.tags,route:`${i}?focus=${encodeURIComponent(n.id)}`})}return t}function ct(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function sx(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function fc(...e){return t=>{let n=!1;const o=e.map(i=>{const a=sx(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<o.length;i++){const a=o[i];typeof a=="function"?a():sx(e[i],null)}}}}function ln(...e){return g.useCallback(fc(...e),e)}function LN(e,t){const n=g.createContext(t),o=a=>{const{children:c,...d}=a,p=g.useMemo(()=>d,Object.values(d));return l.jsx(n.Provider,{value:p,children:c})};o.displayName=e+"Provider";function i(a){const c=g.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[o,i]}function Vo(e,t=[]){let n=[];function o(a,c){const d=g.createContext(c),p=n.length;n=[...n,c];const m=x=>{var S;const{scope:v,children:b,...N}=x,k=((S=v==null?void 0:v[e])==null?void 0:S[p])||d,j=g.useMemo(()=>N,Object.values(N));return l.jsx(k.Provider,{value:j,children:b})};m.displayName=a+"Provider";function h(x,v){var k;const b=((k=v==null?void 0:v[e])==null?void 0:k[p])||d,N=g.useContext(b);if(N)return N;if(c!==void 0)return c;throw new Error(`\`${x}\` must be used within \`${a}\``)}return[m,h]}const i=()=>{const a=n.map(c=>g.createContext(c));return function(d){const p=(d==null?void 0:d[e])||a;return g.useMemo(()=>({[`__scope${e}`]:{...d,[e]:p}}),[d,p])}};return i.scopeName=e,[o,ON(i,...t)]}function ON(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const c=o.reduce((d,{useScope:p,scopeName:m})=>{const x=p(a)[`__scope${m}`];return{...d,...x}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}var jo=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},_N=Qy[" useId ".trim().toString()]||(()=>{}),MN=0;function Cs(e){const[t,n]=g.useState(_N());return jo(()=>{n(o=>o??String(MN++))},[e]),t?`radix-${t}`:""}var $N=Qy[" useInsertionEffect ".trim().toString()]||jo;function pc({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[i,a,c]=FN({defaultProp:t,onChange:n}),d=e!==void 0,p=d?e:i;{const h=g.useRef(e!==void 0);g.useEffect(()=>{const x=h.current;x!==d&&console.warn(`${o} is changing from ${x?"controlled":"uncontrolled"} to ${d?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=d},[d,o])}const m=g.useCallback(h=>{var x;if(d){const v=zN(h)?h(e):h;v!==e&&((x=c.current)==null||x.call(c,v))}else a(h)},[d,e,a,c]);return[p,m]}function FN({defaultProp:e,onChange:t}){const[n,o]=g.useState(e),i=g.useRef(n),a=g.useRef(t);return $N(()=>{a.current=t},[t]),g.useEffect(()=>{var c;i.current!==n&&((c=a.current)==null||c.call(a,n),i.current=n)},[n,i]),[n,o,a]}function zN(e){return typeof e=="function"}function BN(e){const t=UN(e),n=g.forwardRef((o,i)=>{const{children:a,...c}=o,d=g.Children.toArray(a),p=d.find(WN);if(p){const m=p.props.children,h=d.map(x=>x===p?g.Children.count(m)>1?g.Children.only(null):g.isValidElement(m)?m.props.children:null:x);return l.jsx(t,{...c,ref:i,children:g.isValidElement(m)?g.cloneElement(m,void 0,h):null})}return l.jsx(t,{...c,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function UN(e){const t=g.forwardRef((n,o)=>{const{children:i,...a}=n;if(g.isValidElement(i)){const c=qN(i),d=VN(a,i.props);return i.type!==g.Fragment&&(d.ref=o?fc(o,c):c),g.cloneElement(i,d)}return g.Children.count(i)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var HN=Symbol("radix.slottable");function WN(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===HN}function VN(e,t){const n={...t};for(const o in t){const i=e[o],a=t[o];/^on[A-Z]/.test(o)?i&&a?n[o]=(...d)=>{const p=a(...d);return i(...d),p}:i&&(n[o]=i):o==="style"?n[o]={...i,...a}:o==="className"&&(n[o]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function qN(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var GN=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Pt=GN.reduce((e,t)=>{const n=BN(`Primitive.${t}`),o=g.forwardRef((i,a)=>{const{asChild:c,...d}=i,p=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(p,{...d,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function KN(e,t){e&&wo.flushSync(()=>e.dispatchEvent(t))}function Uo(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}function YN(e,t=globalThis==null?void 0:globalThis.document){const n=Uo(e);g.useEffect(()=>{const o=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var XN="DismissableLayer",kf="dismissableLayer.update",QN="dismissableLayer.pointerDownOutside",JN="dismissableLayer.focusOutside",ix,Jv=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),up=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:c,onDismiss:d,...p}=e,m=g.useContext(Jv),[h,x]=g.useState(null),v=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,b]=g.useState({}),N=ln(t,$=>x($)),k=Array.from(m.layers),[j]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),S=k.indexOf(j),T=h?k.indexOf(h):-1,A=m.layersWithOutsidePointerEventsDisabled.size>0,L=T>=S,O=t2($=>{const E=$.target,H=[...m.branches].some(Z=>Z.contains(E));!L||H||(i==null||i($),c==null||c($),$.defaultPrevented||d==null||d())},v),P=n2($=>{const E=$.target;[...m.branches].some(Z=>Z.contains(E))||(a==null||a($),c==null||c($),$.defaultPrevented||d==null||d())},v);return YN($=>{T===m.layers.size-1&&(o==null||o($),!$.defaultPrevented&&d&&($.preventDefault(),d()))},v),g.useEffect(()=>{if(h)return n&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(ix=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(h)),m.layers.add(h),lx(),()=>{n&&m.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=ix)}},[h,v,n,m]),g.useEffect(()=>()=>{h&&(m.layers.delete(h),m.layersWithOutsidePointerEventsDisabled.delete(h),lx())},[h,m]),g.useEffect(()=>{const $=()=>b({});return document.addEventListener(kf,$),()=>document.removeEventListener(kf,$)},[]),l.jsx(Pt.div,{...p,ref:N,style:{pointerEvents:A?L?"auto":"none":void 0,...e.style},onFocusCapture:ct(e.onFocusCapture,P.onFocusCapture),onBlurCapture:ct(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:ct(e.onPointerDownCapture,O.onPointerDownCapture)})});up.displayName=XN;var ZN="DismissableLayerBranch",e2=g.forwardRef((e,t)=>{const n=g.useContext(Jv),o=g.useRef(null),i=ln(t,o);return g.useEffect(()=>{const a=o.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),l.jsx(Pt.div,{...e,ref:i})});e2.displayName=ZN;function t2(e,t=globalThis==null?void 0:globalThis.document){const n=Uo(e),o=g.useRef(!1),i=g.useRef(()=>{});return g.useEffect(()=>{const a=d=>{if(d.target&&!o.current){let p=function(){Zv(QN,n,m,{discrete:!0})};const m={originalEvent:d};d.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=p,t.addEventListener("click",i.current,{once:!0})):p()}else t.removeEventListener("click",i.current);o.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function n2(e,t=globalThis==null?void 0:globalThis.document){const n=Uo(e),o=g.useRef(!1);return g.useEffect(()=>{const i=a=>{a.target&&!o.current&&Zv(JN,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function lx(){const e=new CustomEvent(kf);document.dispatchEvent(e)}function Zv(e,t,n,{discrete:o}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),o?KN(i,a):i.dispatchEvent(a)}var Ad="focusScope.autoFocusOnMount",Dd="focusScope.autoFocusOnUnmount",ax={bubbles:!1,cancelable:!0},r2="FocusScope",e0=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...c}=e,[d,p]=g.useState(null),m=Uo(i),h=Uo(a),x=g.useRef(null),v=ln(t,k=>p(k)),b=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(o){let k=function(A){if(b.paused||!d)return;const L=A.target;d.contains(L)?x.current=L:vo(x.current,{select:!0})},j=function(A){if(b.paused||!d)return;const L=A.relatedTarget;L!==null&&(d.contains(L)||vo(x.current,{select:!0}))},S=function(A){if(document.activeElement===document.body)for(const O of A)O.removedNodes.length>0&&vo(d)};document.addEventListener("focusin",k),document.addEventListener("focusout",j);const T=new MutationObserver(S);return d&&T.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",j),T.disconnect()}}},[o,d,b.paused]),g.useEffect(()=>{if(d){ux.add(b);const k=document.activeElement;if(!d.contains(k)){const S=new CustomEvent(Ad,ax);d.addEventListener(Ad,m),d.dispatchEvent(S),S.defaultPrevented||(o2(c2(t0(d)),{select:!0}),document.activeElement===k&&vo(d))}return()=>{d.removeEventListener(Ad,m),setTimeout(()=>{const S=new CustomEvent(Dd,ax);d.addEventListener(Dd,h),d.dispatchEvent(S),S.defaultPrevented||vo(k??document.body,{select:!0}),d.removeEventListener(Dd,h),ux.remove(b)},0)}}},[d,m,h,b]);const N=g.useCallback(k=>{if(!n&&!o||b.paused)return;const j=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,S=document.activeElement;if(j&&S){const T=k.currentTarget,[A,L]=s2(T);A&&L?!k.shiftKey&&S===L?(k.preventDefault(),n&&vo(A,{select:!0})):k.shiftKey&&S===A&&(k.preventDefault(),n&&vo(L,{select:!0})):S===T&&k.preventDefault()}},[n,o,b.paused]);return l.jsx(Pt.div,{tabIndex:-1,...c,ref:v,onKeyDown:N})});e0.displayName=r2;function o2(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(vo(o,{select:t}),document.activeElement!==n)return}function s2(e){const t=t0(e),n=cx(t,e),o=cx(t.reverse(),e);return[n,o]}function t0(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const i=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||i?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function cx(e,t){for(const n of e)if(!i2(n,{upTo:t}))return n}function i2(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function l2(e){return e instanceof HTMLInputElement&&"select"in e}function vo(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&l2(e)&&t&&e.select()}}var ux=a2();function a2(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=dx(e,t),e.unshift(t)},remove(t){var n;e=dx(e,t),(n=e[0])==null||n.resume()}}}function dx(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function c2(e){return e.filter(t=>t.tagName!=="A")}var u2="Portal",dp=g.forwardRef((e,t)=>{var d;const{container:n,...o}=e,[i,a]=g.useState(!1);jo(()=>a(!0),[]);const c=n||i&&((d=globalThis==null?void 0:globalThis.document)==null?void 0:d.body);return c?KS.createPortal(l.jsx(Pt.div,{...o,ref:t}),c):null});dp.displayName=u2;function d2(e,t){return g.useReducer((n,o)=>t[n][o]??n,e)}var qo=e=>{const{present:t,children:n}=e,o=f2(t),i=typeof n=="function"?n({present:o.isPresent}):g.Children.only(n),a=ln(o.ref,p2(i));return typeof n=="function"||o.isPresent?g.cloneElement(i,{ref:a}):null};qo.displayName="Presence";function f2(e){const[t,n]=g.useState(),o=g.useRef(null),i=g.useRef(e),a=g.useRef("none"),c=e?"mounted":"unmounted",[d,p]=d2(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const m=Sa(o.current);a.current=d==="mounted"?m:"none"},[d]),jo(()=>{const m=o.current,h=i.current;if(h!==e){const v=a.current,b=Sa(m);e?p("MOUNT"):b==="none"||(m==null?void 0:m.display)==="none"?p("UNMOUNT"):p(h&&v!==b?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,p]),jo(()=>{if(t){let m;const h=t.ownerDocument.defaultView??window,x=b=>{const k=Sa(o.current).includes(CSS.escape(b.animationName));if(b.target===t&&k&&(p("ANIMATION_END"),!i.current)){const j=t.style.animationFillMode;t.style.animationFillMode="forwards",m=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=j)})}},v=b=>{b.target===t&&(a.current=Sa(o.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",x),t.addEventListener("animationend",x),()=>{h.clearTimeout(m),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",x),t.removeEventListener("animationend",x)}}else p("ANIMATION_END")},[t,p]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:g.useCallback(m=>{o.current=m?getComputedStyle(m):null,n(m)},[])}}function Sa(e){return(e==null?void 0:e.animationName)||"none"}function p2(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Id=0;function h2(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??fx()),document.body.insertAdjacentElement("beforeend",e[1]??fx()),Id++,()=>{Id===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Id--}},[])}function fx(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var br=function(){return br=Object.assign||function(t){for(var n,o=1,i=arguments.length;o<i;o++){n=arguments[o];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},br.apply(this,arguments)};function n0(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]]);return n}function m2(e,t,n){if(n||arguments.length===2)for(var o=0,i=t.length,a;o<i;o++)(a||!(o in t))&&(a||(a=Array.prototype.slice.call(t,0,o)),a[o]=t[o]);return e.concat(a||Array.prototype.slice.call(t))}var za="right-scroll-bar-position",Ba="width-before-scroll-bar",g2="with-scroll-bars-hidden",x2="--removed-body-scroll-bar-size";function Ld(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function y2(e,t){var n=g.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var i=n.value;i!==o&&(n.value=o,n.callback(o,i))}}}})[0];return n.callback=t,n.facade}var v2=typeof window<"u"?g.useLayoutEffect:g.useEffect,px=new WeakMap;function b2(e,t){var n=y2(null,function(o){return e.forEach(function(i){return Ld(i,o)})});return v2(function(){var o=px.get(n);if(o){var i=new Set(o),a=new Set(e),c=n.current;i.forEach(function(d){a.has(d)||Ld(d,null)}),a.forEach(function(d){i.has(d)||Ld(d,c)})}px.set(n,e)},[e]),n}function w2(e){return e}function k2(e,t){t===void 0&&(t=w2);var n=[],o=!1,i={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var c=t(a,o);return n.push(c),function(){n=n.filter(function(d){return d!==c})}},assignSyncMedium:function(a){for(o=!0;n.length;){var c=n;n=[],c.forEach(a)}n={push:function(d){return a(d)},filter:function(){return n}}},assignMedium:function(a){o=!0;var c=[];if(n.length){var d=n;n=[],d.forEach(a),c=n}var p=function(){var h=c;c=[],h.forEach(a)},m=function(){return Promise.resolve().then(p)};m(),n={push:function(h){c.push(h),m()},filter:function(h){return c=c.filter(h),n}}}};return i}function j2(e){e===void 0&&(e={});var t=k2(null);return t.options=br({async:!0,ssr:!1},e),t}var r0=function(e){var t=e.sideCar,n=n0(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return g.createElement(o,br({},n))};r0.isSideCarExport=!0;function S2(e,t){return e.useMedium(t),r0}var o0=j2(),Od=function(){},hc=g.forwardRef(function(e,t){var n=g.useRef(null),o=g.useState({onScrollCapture:Od,onWheelCapture:Od,onTouchMoveCapture:Od}),i=o[0],a=o[1],c=e.forwardProps,d=e.children,p=e.className,m=e.removeScrollBar,h=e.enabled,x=e.shards,v=e.sideCar,b=e.noRelative,N=e.noIsolation,k=e.inert,j=e.allowPinchZoom,S=e.as,T=S===void 0?"div":S,A=e.gapMode,L=n0(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=v,P=b2([n,t]),$=br(br({},L),i);return g.createElement(g.Fragment,null,h&&g.createElement(O,{sideCar:o0,removeScrollBar:m,shards:x,noRelative:b,noIsolation:N,inert:k,setCallbacks:a,allowPinchZoom:!!j,lockRef:n,gapMode:A}),c?g.cloneElement(g.Children.only(d),br(br({},$),{ref:P})):g.createElement(T,br({},$,{className:p,ref:P}),d))});hc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};hc.classNames={fullWidth:Ba,zeroRight:za};var C2=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function N2(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=C2();return t&&e.setAttribute("nonce",t),e}function E2(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function R2(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var P2=function(){var e=0,t=null;return{add:function(n){e==0&&(t=N2())&&(E2(t,n),R2(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},T2=function(){var e=P2();return function(t,n){g.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},s0=function(){var e=T2(),t=function(n){var o=n.styles,i=n.dynamic;return e(o,i),null};return t},A2={left:0,top:0,right:0,gap:0},_d=function(e){return parseInt(e||"",10)||0},D2=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[_d(n),_d(o),_d(i)]},I2=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return A2;var t=D2(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},L2=s0(),Ns="data-scroll-locked",O2=function(e,t,n,o){var i=e.left,a=e.top,c=e.right,d=e.gap;return n===void 0&&(n="margin"),`
|
|
397
|
-
.`.concat(g2,` {
|
|
398
|
-
overflow: hidden `).concat(o,`;
|
|
399
|
-
padding-right: `).concat(d,"px ").concat(o,`;
|
|
400
|
-
}
|
|
401
|
-
body[`).concat(Ns,`] {
|
|
402
|
-
overflow: hidden `).concat(o,`;
|
|
403
|
-
overscroll-behavior: contain;
|
|
404
|
-
`).concat([t&&"position: relative ".concat(o,";"),n==="margin"&&`
|
|
405
|
-
padding-left: `.concat(i,`px;
|
|
406
|
-
padding-top: `).concat(a,`px;
|
|
407
|
-
padding-right: `).concat(c,`px;
|
|
408
|
-
margin-left:0;
|
|
409
|
-
margin-top:0;
|
|
410
|
-
margin-right: `).concat(d,"px ").concat(o,`;
|
|
411
|
-
`),n==="padding"&&"padding-right: ".concat(d,"px ").concat(o,";")].filter(Boolean).join(""),`
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
.`).concat(za,` {
|
|
415
|
-
right: `).concat(d,"px ").concat(o,`;
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
.`).concat(Ba,` {
|
|
419
|
-
margin-right: `).concat(d,"px ").concat(o,`;
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
.`).concat(za," .").concat(za,` {
|
|
423
|
-
right: 0 `).concat(o,`;
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
.`).concat(Ba," .").concat(Ba,` {
|
|
427
|
-
margin-right: 0 `).concat(o,`;
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
body[`).concat(Ns,`] {
|
|
431
|
-
`).concat(x2,": ").concat(d,`px;
|
|
432
|
-
}
|
|
433
|
-
`)},hx=function(){var e=parseInt(document.body.getAttribute(Ns)||"0",10);return isFinite(e)?e:0},_2=function(){g.useEffect(function(){return document.body.setAttribute(Ns,(hx()+1).toString()),function(){var e=hx()-1;e<=0?document.body.removeAttribute(Ns):document.body.setAttribute(Ns,e.toString())}},[])},M2=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,i=o===void 0?"margin":o;_2();var a=g.useMemo(function(){return I2(i)},[i]);return g.createElement(L2,{styles:O2(a,!t,i,n?"":"!important")})},jf=!1;if(typeof window<"u")try{var Ca=Object.defineProperty({},"passive",{get:function(){return jf=!0,!0}});window.addEventListener("test",Ca,Ca),window.removeEventListener("test",Ca,Ca)}catch{jf=!1}var gs=jf?{passive:!1}:!1,$2=function(e){return e.tagName==="TEXTAREA"},i0=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!$2(e)&&n[t]==="visible")},F2=function(e){return i0(e,"overflowY")},z2=function(e){return i0(e,"overflowX")},mx=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var i=l0(e,o);if(i){var a=a0(e,o),c=a[1],d=a[2];if(c>d)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},B2=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},U2=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},l0=function(e,t){return e==="v"?F2(t):z2(t)},a0=function(e,t){return e==="v"?B2(t):U2(t)},H2=function(e,t){return e==="h"&&t==="rtl"?-1:1},W2=function(e,t,n,o,i){var a=H2(e,window.getComputedStyle(t).direction),c=a*o,d=n.target,p=t.contains(d),m=!1,h=c>0,x=0,v=0;do{if(!d)break;var b=a0(e,d),N=b[0],k=b[1],j=b[2],S=k-j-a*N;(N||S)&&l0(e,d)&&(x+=S,v+=N);var T=d.parentNode;d=T&&T.nodeType===Node.DOCUMENT_FRAGMENT_NODE?T.host:T}while(!p&&d!==document.body||p&&(t.contains(d)||t===d));return(h&&Math.abs(x)<1||!h&&Math.abs(v)<1)&&(m=!0),m},Na=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},gx=function(e){return[e.deltaX,e.deltaY]},xx=function(e){return e&&"current"in e?e.current:e},V2=function(e,t){return e[0]===t[0]&&e[1]===t[1]},q2=function(e){return`
|
|
434
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
435
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
436
|
-
`)},G2=0,xs=[];function K2(e){var t=g.useRef([]),n=g.useRef([0,0]),o=g.useRef(),i=g.useState(G2++)[0],a=g.useState(s0)[0],c=g.useRef(e);g.useEffect(function(){c.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var k=m2([e.lockRef.current],(e.shards||[]).map(xx),!0).filter(Boolean);return k.forEach(function(j){return j.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),k.forEach(function(j){return j.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var d=g.useCallback(function(k,j){if("touches"in k&&k.touches.length===2||k.type==="wheel"&&k.ctrlKey)return!c.current.allowPinchZoom;var S=Na(k),T=n.current,A="deltaX"in k?k.deltaX:T[0]-S[0],L="deltaY"in k?k.deltaY:T[1]-S[1],O,P=k.target,$=Math.abs(A)>Math.abs(L)?"h":"v";if("touches"in k&&$==="h"&&P.type==="range")return!1;var E=window.getSelection(),H=E&&E.anchorNode,Z=H?H===P||H.contains(P):!1;if(Z)return!1;var K=mx($,P);if(!K)return!0;if(K?O=$:(O=$==="v"?"h":"v",K=mx($,P)),!K)return!1;if(!o.current&&"changedTouches"in k&&(A||L)&&(o.current=O),!O)return!0;var q=o.current||O;return W2(q,j,k,q==="h"?A:L)},[]),p=g.useCallback(function(k){var j=k;if(!(!xs.length||xs[xs.length-1]!==a)){var S="deltaY"in j?gx(j):Na(j),T=t.current.filter(function(O){return O.name===j.type&&(O.target===j.target||j.target===O.shadowParent)&&V2(O.delta,S)})[0];if(T&&T.should){j.cancelable&&j.preventDefault();return}if(!T){var A=(c.current.shards||[]).map(xx).filter(Boolean).filter(function(O){return O.contains(j.target)}),L=A.length>0?d(j,A[0]):!c.current.noIsolation;L&&j.cancelable&&j.preventDefault()}}},[]),m=g.useCallback(function(k,j,S,T){var A={name:k,delta:j,target:S,should:T,shadowParent:Y2(S)};t.current.push(A),setTimeout(function(){t.current=t.current.filter(function(L){return L!==A})},1)},[]),h=g.useCallback(function(k){n.current=Na(k),o.current=void 0},[]),x=g.useCallback(function(k){m(k.type,gx(k),k.target,d(k,e.lockRef.current))},[]),v=g.useCallback(function(k){m(k.type,Na(k),k.target,d(k,e.lockRef.current))},[]);g.useEffect(function(){return xs.push(a),e.setCallbacks({onScrollCapture:x,onWheelCapture:x,onTouchMoveCapture:v}),document.addEventListener("wheel",p,gs),document.addEventListener("touchmove",p,gs),document.addEventListener("touchstart",h,gs),function(){xs=xs.filter(function(k){return k!==a}),document.removeEventListener("wheel",p,gs),document.removeEventListener("touchmove",p,gs),document.removeEventListener("touchstart",h,gs)}},[]);var b=e.removeScrollBar,N=e.inert;return g.createElement(g.Fragment,null,N?g.createElement(a,{styles:q2(i)}):null,b?g.createElement(M2,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Y2(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const X2=S2(o0,K2);var c0=g.forwardRef(function(e,t){return g.createElement(hc,br({},e,{ref:t,sideCar:X2}))});c0.classNames=hc.classNames;var Q2=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ys=new WeakMap,Ea=new WeakMap,Ra={},Md=0,u0=function(e){return e&&(e.host||u0(e.parentNode))},J2=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=u0(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Z2=function(e,t,n,o){var i=J2(t,Array.isArray(e)?e:[e]);Ra[n]||(Ra[n]=new WeakMap);var a=Ra[n],c=[],d=new Set,p=new Set(i),m=function(x){!x||d.has(x)||(d.add(x),m(x.parentNode))};i.forEach(m);var h=function(x){!x||p.has(x)||Array.prototype.forEach.call(x.children,function(v){if(d.has(v))h(v);else try{var b=v.getAttribute(o),N=b!==null&&b!=="false",k=(ys.get(v)||0)+1,j=(a.get(v)||0)+1;ys.set(v,k),a.set(v,j),c.push(v),k===1&&N&&Ea.set(v,!0),j===1&&v.setAttribute(n,"true"),N||v.setAttribute(o,"true")}catch(S){console.error("aria-hidden: cannot operate on ",v,S)}})};return h(t),d.clear(),Md++,function(){c.forEach(function(x){var v=ys.get(x)-1,b=a.get(x)-1;ys.set(x,v),a.set(x,b),v||(Ea.has(x)||x.removeAttribute(o),Ea.delete(x)),b||x.removeAttribute(n)}),Md--,Md||(ys=new WeakMap,ys=new WeakMap,Ea=new WeakMap,Ra={})}},eE=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),i=Q2(e);return i?(o.push.apply(o,Array.from(i.querySelectorAll("[aria-live], script"))),Z2(o,i,n,"aria-hidden")):function(){return null}};function tE(e){const t=nE(e),n=g.forwardRef((o,i)=>{const{children:a,...c}=o,d=g.Children.toArray(a),p=d.find(oE);if(p){const m=p.props.children,h=d.map(x=>x===p?g.Children.count(m)>1?g.Children.only(null):g.isValidElement(m)?m.props.children:null:x);return l.jsx(t,{...c,ref:i,children:g.isValidElement(m)?g.cloneElement(m,void 0,h):null})}return l.jsx(t,{...c,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function nE(e){const t=g.forwardRef((n,o)=>{const{children:i,...a}=n;if(g.isValidElement(i)){const c=iE(i),d=sE(a,i.props);return i.type!==g.Fragment&&(d.ref=o?fc(o,c):c),g.cloneElement(i,d)}return g.Children.count(i)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var rE=Symbol("radix.slottable");function oE(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===rE}function sE(e,t){const n={...t};for(const o in t){const i=e[o],a=t[o];/^on[A-Z]/.test(o)?i&&a?n[o]=(...d)=>{const p=a(...d);return i(...d),p}:i&&(n[o]=i):o==="style"?n[o]={...i,...a}:o==="className"&&(n[o]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function iE(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var mc="Dialog",[d0,f0]=Vo(mc),[lE,fr]=d0(mc),p0=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:i,onOpenChange:a,modal:c=!0}=e,d=g.useRef(null),p=g.useRef(null),[m,h]=pc({prop:o,defaultProp:i??!1,onChange:a,caller:mc});return l.jsx(lE,{scope:t,triggerRef:d,contentRef:p,contentId:Cs(),titleId:Cs(),descriptionId:Cs(),open:m,onOpenChange:h,onOpenToggle:g.useCallback(()=>h(x=>!x),[h]),modal:c,children:n})};p0.displayName=mc;var h0="DialogTrigger",m0=g.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=fr(h0,n),a=ln(t,i.triggerRef);return l.jsx(Pt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":hp(i.open),...o,ref:a,onClick:ct(e.onClick,i.onOpenToggle)})});m0.displayName=h0;var fp="DialogPortal",[aE,g0]=d0(fp,{forceMount:void 0}),x0=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:i}=e,a=fr(fp,t);return l.jsx(aE,{scope:t,forceMount:n,children:g.Children.map(o,c=>l.jsx(qo,{present:n||a.open,children:l.jsx(dp,{asChild:!0,container:i,children:c})}))})};x0.displayName=fp;var Ka="DialogOverlay",y0=g.forwardRef((e,t)=>{const n=g0(Ka,e.__scopeDialog),{forceMount:o=n.forceMount,...i}=e,a=fr(Ka,e.__scopeDialog);return a.modal?l.jsx(qo,{present:o||a.open,children:l.jsx(uE,{...i,ref:t})}):null});y0.displayName=Ka;var cE=tE("DialogOverlay.RemoveScroll"),uE=g.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=fr(Ka,n);return l.jsx(c0,{as:cE,allowPinchZoom:!0,shards:[i.contentRef],children:l.jsx(Pt.div,{"data-state":hp(i.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),Ho="DialogContent",v0=g.forwardRef((e,t)=>{const n=g0(Ho,e.__scopeDialog),{forceMount:o=n.forceMount,...i}=e,a=fr(Ho,e.__scopeDialog);return l.jsx(qo,{present:o||a.open,children:a.modal?l.jsx(dE,{...i,ref:t}):l.jsx(fE,{...i,ref:t})})});v0.displayName=Ho;var dE=g.forwardRef((e,t)=>{const n=fr(Ho,e.__scopeDialog),o=g.useRef(null),i=ln(t,n.contentRef,o);return g.useEffect(()=>{const a=o.current;if(a)return eE(a)},[]),l.jsx(b0,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ct(e.onCloseAutoFocus,a=>{var c;a.preventDefault(),(c=n.triggerRef.current)==null||c.focus()}),onPointerDownOutside:ct(e.onPointerDownOutside,a=>{const c=a.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0;(c.button===2||d)&&a.preventDefault()}),onFocusOutside:ct(e.onFocusOutside,a=>a.preventDefault())})}),fE=g.forwardRef((e,t)=>{const n=fr(Ho,e.__scopeDialog),o=g.useRef(!1),i=g.useRef(!1);return l.jsx(b0,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var c,d;(c=e.onCloseAutoFocus)==null||c.call(e,a),a.defaultPrevented||(o.current||(d=n.triggerRef.current)==null||d.focus(),a.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:a=>{var p,m;(p=e.onInteractOutside)==null||p.call(e,a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const c=a.target;((m=n.triggerRef.current)==null?void 0:m.contains(c))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),b0=g.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...c}=e,d=fr(Ho,n),p=g.useRef(null),m=ln(t,p);return h2(),l.jsxs(l.Fragment,{children:[l.jsx(e0,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a,children:l.jsx(up,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":hp(d.open),...c,ref:m,onDismiss:()=>d.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(hE,{titleId:d.titleId}),l.jsx(gE,{contentRef:p,descriptionId:d.descriptionId})]})]})}),pp="DialogTitle",w0=g.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=fr(pp,n);return l.jsx(Pt.h2,{id:i.titleId,...o,ref:t})});w0.displayName=pp;var k0="DialogDescription",j0=g.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=fr(k0,n);return l.jsx(Pt.p,{id:i.descriptionId,...o,ref:t})});j0.displayName=k0;var S0="DialogClose",C0=g.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=fr(S0,n);return l.jsx(Pt.button,{type:"button",...o,ref:t,onClick:ct(e.onClick,()=>i.onOpenChange(!1))})});C0.displayName=S0;function hp(e){return e?"open":"closed"}var N0="DialogTitleWarning",[pE,E0]=LN(N0,{contentName:Ho,titleName:pp,docsSlug:"dialog"}),hE=({titleId:e})=>{const t=E0(N0),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
437
|
-
|
|
438
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
439
|
-
|
|
440
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return g.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},mE="DialogDescriptionWarning",gE=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${E0(mE).contentName}}.`;return g.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},R0=p0,xE=m0,P0=x0,mp=y0,gp=v0,xp=w0,yp=j0,T0=C0;const vp=R0,yE=P0,A0=g.forwardRef(({className:e,...t},n)=>l.jsx(mp,{ref:n,className:$e("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm",e),...t}));A0.displayName=mp.displayName;const gc=g.forwardRef(({className:e,children:t,...n},o)=>l.jsxs(yE,{children:[l.jsx(A0,{}),l.jsx(gp,{ref:o,className:$e("fixed left-1/2 top-1/2 z-50 grid w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl border border-border/70 bg-card p-6 shadow-2xl outline-none",e),...n,children:t})]}));gc.displayName=gp.displayName;function vE({className:e,...t}){return l.jsx("div",{className:$e("flex flex-col space-y-2 text-left",e),...t})}function bE({className:e,...t}){return l.jsx("div",{className:$e("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}const xc=g.forwardRef(({className:e,...t},n)=>l.jsx(xp,{ref:n,className:$e("text-lg font-semibold tracking-tight text-foreground",e),...t}));xc.displayName=xp.displayName;const bp=g.forwardRef(({className:e,...t},n)=>l.jsx(yp,{ref:n,className:$e("text-sm leading-6 text-muted-foreground",e),...t}));bp.displayName=yp.displayName;const wE=-1,kE=-40;function $d(e,t){if(e.length===0)return 0;if(t.length===0)return-1/0;let n=0,o=0,i=-2,a=0;for(let c=0;c<e.length;c++){const d=e[c];let p=!1;for(;o<t.length;)if(t[o]===d){if(n+=100,o===i+1&&(n+=20),o===0)n+=30;else{const m=t[o-1];(m===" "||m==="-"||m==="_"||m==="/")&&(n+=15)}a>0&&(n+=Math.max(kE,a*wE)),i=o,a=0,o++,p=!0;break}else a++,o++;if(!p)return-1/0}return n}const yx={page:0,project:1,assignment:2,playbook:3,server:4,todo:5};function jE(e,t,n=50){const o=e.toLowerCase();if(!o)return t.slice(0,n).map(c=>({...c,score:0}));const a=t.map(c=>{var x;const d=$d(o,c.title.toLowerCase())*1,p=c.subtitle?$d(o,c.subtitle.toLowerCase())*.5:-1/0,m=(x=c.keywords)!=null&&x.length?$d(o,c.keywords.join(" ").toLowerCase())*.3:-1/0,h=Math.max(d,p,m);return{...c,score:h}}).filter(c=>c.score>-1/0);return a.sort((c,d)=>d.score!==c.score?d.score-c.score:c.title.length!==d.title.length?c.title.length-d.title.length:c.title!==d.title?c.title<d.title?-1:1:(yx[c.type]??99)-(yx[d.type]??99)),a.slice(0,n)}const SE={page:"Page",project:"Project",assignment:"Assignment",playbook:"Playbook",server:"Server",todo:"Todo"};function CE({entries:e}){const{paletteOpen:t,closePalette:n}=Fs(),o=Wt(),[i,a]=g.useState(""),[c,d]=g.useState(0),p=g.useRef(null),m=g.useMemo(()=>jE(i,e,50),[i,e]);g.useEffect(()=>{d(0)},[i,t]),g.useEffect(()=>{t||a("")},[t]),g.useEffect(()=>{var b;const v=(b=p.current)==null?void 0:b.querySelector(`[data-palette-idx="${c}"]`);v==null||v.scrollIntoView({block:"nearest"})},[c]);function h(v){o(v.route),n()}function x(v){if(v.key==="ArrowDown")v.preventDefault(),d(b=>Math.min(m.length-1,b+1));else if(v.key==="ArrowUp")v.preventDefault(),d(b=>Math.max(0,b-1));else if(v.key==="Enter"){v.preventDefault();const b=m[c];b&&h(b)}}return l.jsx(vp,{open:t,onOpenChange:v=>v?null:n(),children:l.jsxs(gc,{className:"max-w-xl p-0 gap-0",children:[l.jsx(xc,{className:"sr-only",children:"Command palette"}),l.jsx("input",{autoFocus:!0,type:"text",value:i,onChange:v=>a(v.target.value),onKeyDown:x,placeholder:"Search projects, assignments, playbooks, servers, todos…",className:"w-full rounded-t-xl border-0 border-b border-border/70 bg-transparent px-4 py-3 text-sm text-foreground outline-none focus:ring-0"}),l.jsx("div",{ref:p,className:"max-h-[60vh] overflow-y-auto p-1",children:m.length===0?l.jsx("div",{className:"px-4 py-6 text-center text-sm text-muted-foreground",children:i?"No matches":"Start typing to search"}):m.map((v,b)=>{const N=b===c;return l.jsxs("button",{type:"button","data-palette-idx":b,onClick:()=>h(v),onMouseEnter:()=>d(b),className:`flex w-full items-center gap-3 rounded-md px-3 py-2 text-left text-sm transition-colors ${N?"bg-accent text-accent-foreground":"hover:bg-accent/50 text-foreground"}`,children:[l.jsx("span",{className:"shrink-0 rounded border border-border/70 bg-background/60 px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:SE[v.type]??v.type}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:v.title}),v.subtitle?l.jsx("span",{className:"shrink-0 truncate text-xs text-muted-foreground",children:v.subtitle}):null]},v.id)})}),l.jsxs("div",{className:"flex items-center justify-between border-t border-border/70 px-3 py-2 text-[11px] text-muted-foreground",children:[l.jsxs("span",{children:["↑↓"," navigate ","·"," ","↵"," open ","·"," Esc close"]}),l.jsxs("span",{children:[m.length," result",m.length===1?"":"s"]})]})]})})}const NE={global:"Global","list:projects":"Projects list","list:assignments":"Assignments list","list:todos":"Todos list",assignment:"Assignment detail",project:"Project detail"},EE=["global","list:projects","list:assignments","list:todos","project","assignment"];function RE(e){if(e.includes(" ")){const[t,n]=e.split(" ");return`${Ss(t)} then ${Ss(n)}`}return Ss(e)}function PE(){const{cheatsheetOpen:e,closeCheatsheet:t,listBindings:n}=Fs(),o=g.useMemo(()=>{if(!e)return new Map;const i=n(),a=new Map;for(const c of i){const d=a.get(c.scope)??[];d.push({keys:c.keys,description:c.description}),a.set(c.scope,d)}return a},[e,n]);return l.jsx(vp,{open:e,onOpenChange:i=>i?null:t(),children:l.jsxs(gc,{className:"max-w-2xl",children:[l.jsx(xc,{children:"Keyboard shortcuts"}),l.jsxs(bp,{children:["Press Esc to close. ",Ss("Mod+k")," opens the command palette. Press g twice to restart the chord timer."]}),l.jsx("div",{className:"mt-2 max-h-[60vh] space-y-4 overflow-y-auto pr-1",children:EE.map(i=>{const a=o.get(i);return!a||a.length===0?null:l.jsxs("section",{children:[l.jsx("h3",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:NE[i]}),l.jsx("ul",{className:"space-y-1",children:a.map((c,d)=>l.jsxs("li",{className:"flex items-center justify-between gap-3 rounded-md border border-border/40 bg-background/60 px-3 py-1.5 text-sm",children:[l.jsx("span",{className:"text-foreground",children:c.description}),l.jsx("kbd",{className:"shrink-0 rounded border border-border/70 bg-muted px-2 py-0.5 font-mono text-xs text-muted-foreground",children:RE(c.keys)})]},`${i}-${c.keys}-${d}`))})]},i)})})]})})}const vx=1500;function TE(e){const t=e.match(/^\/w\/([^/]+)(?:\/|$)/);return t?`/w/${t[1]}`:""}const D0=g.createContext(null);function AE({children:e}){const{toggleTheme:t}=zv(),n=fn(),o=Wt(),i=TE(n.pathname),a=dc(),c=Uv(),d=qv(),p=ap(),m=cp(),h=g.useMemo(()=>{var R,F,J,I;const X=a.data??[],_=((R=c.data)==null?void 0:R.assignments)??[],D=((F=d.data)==null?void 0:F.playbooks)??[],V=((J=p.data)==null?void 0:J.sessions)??[],ee=(((I=m.data)==null?void 0:I.workspaces)??[]).flatMap(de=>de.items.map(ve=>({...ve,workspace:de.workspace})));return IN({projects:X,assignments:_,playbooks:D,servers:V,todos:ee,wsPrefix:i})},[a.data,c.data,d.data,p.data,m.data,i]),x=g.useRef(new Map),v=g.useRef(["global"]),b=g.useRef({phase:"idle"}),N=g.useRef(null),k=g.useRef(1),[j,S]=g.useState(!1),[T,A]=g.useState(!1),L=g.useCallback(X=>{const _=k.current++;return x.current.set(_,{...X,id:_}),_},[]),O=g.useCallback(X=>{x.current.delete(X)},[]),P=g.useCallback(X=>{v.current.push(X)},[]),$=g.useCallback(X=>{const _=v.current;for(let D=_.length-1;D>=0;D--)if(_[D]===X){_.splice(D,1);return}},[]),E=g.useCallback(()=>S(!0),[]),H=g.useCallback(()=>S(!1),[]),Z=g.useCallback(()=>A(!0),[]),K=g.useCallback(()=>A(!1),[]),q=g.useCallback(()=>Array.from(x.current.values()),[]);g.useEffect(()=>{b.current={phase:"idle"},N.current!==null&&(window.clearTimeout(N.current),N.current=null)},[n.pathname]),g.useEffect(()=>{function X(ee){if(!(ee instanceof HTMLElement))return!1;const R=ee.tagName;return!!(R==="INPUT"||R==="TEXTAREA"||R==="SELECT"||ee.isContentEditable||ee.closest('[role="combobox"], [role="textbox"]'))}function _(){return!!(document.querySelector('[role="dialog"][data-state="open"]')||document.querySelector('[role="alertdialog"][data-state="open"]'))}function D(){const ee=v.current;return ee[ee.length-1]??"global"}function V(ee){return ee.scope==="global"?!0:ee.scope===D()}function W(ee){const R=Td(ee,"Mod+k"),F=ee.key==="Escape";if(_()&&!R&&!F||X(ee.target)&&!R&&!F)return;const J=b.current;if(J.phase==="awaiting-second")if(Date.now()-J.startedAt>vx)b.current={phase:"idle"},N.current!==null&&(window.clearTimeout(N.current),N.current=null);else{const ve=Array.from(x.current.values());for(const fe of ve){if(!V(fe))continue;const Ee=fe.keys.split(" ");if(!(Ee.length!==2||Ee[0]!=="g")&&Td(ee,Ee[1])&&!(fe.when&&!fe.when())){ee.preventDefault(),b.current={phase:"idle"},N.current!==null&&(window.clearTimeout(N.current),N.current=null),fe.handler(ee);return}}b.current={phase:"idle"},N.current!==null&&(window.clearTimeout(N.current),N.current=null)}const I=Array.from(x.current.values());for(const de of I){if(!V(de))continue;const ve=de.keys.split(" ");if(ve.length===1&&Td(ee,ve[0])&&!(de.when&&!de.when())){ee.preventDefault(),de.handler(ee);return}}ee.key==="g"&&!ee.metaKey&&!ee.ctrlKey&&!ee.altKey&&!ee.shiftKey&&Array.from(x.current.values()).some(ve=>V(ve)&&ve.keys.startsWith("g "))&&(ee.preventDefault(),b.current={phase:"awaiting-second",startedAt:Date.now()},N.current!==null&&window.clearTimeout(N.current),N.current=window.setTimeout(()=>{b.current={phase:"idle"},N.current=null},vx))}return window.addEventListener("keydown",W),()=>{window.removeEventListener("keydown",W),N.current!==null&&(window.clearTimeout(N.current),N.current=null)}},[]),g.useEffect(()=>{const X=L({keys:"Shift+t",handler:()=>t(),scope:"global",description:"Toggle light/dark theme"});return()=>O(X)},[L,O,t]),g.useEffect(()=>{const X=L({keys:"?",scope:"global",description:"Show keyboard shortcuts",handler:()=>Z()});return()=>O(X)},[L,O,Z]),g.useEffect(()=>{const X=L({keys:"Mod+k",scope:"global",description:"Open command palette",handler:()=>{if(j){H();return}document.querySelector('[role="dialog"][data-state="open"], [role="alertdialog"][data-state="open"]')||E()}});return()=>O(X)},[L,O,E,H,j]),g.useEffect(()=>{const _=[{suffix:"o",basePath:"/",desc:"Go to Overview"},{suffix:"m",basePath:"/projects",desc:"Go to Projects"},{suffix:"a",basePath:"/assignments",desc:"Go to Assignments"},{suffix:"t",basePath:"/todos",desc:"Go to Todos"},{suffix:"s",basePath:"/servers",desc:"Go to Servers"},{suffix:"!",basePath:"/attention",desc:"Go to Attention"},{suffix:",",basePath:"/settings",desc:"Go to Settings"}].map(D=>L({keys:`g ${D.suffix}`,scope:"global",description:D.desc,handler:()=>o(Fa(D.basePath,i))}));return()=>_.forEach(O)},[L,O,o,i]);const Y=g.useMemo(()=>({register:L,unregister:O,pushScope:P,popScope:$,openPalette:E,closePalette:H,paletteOpen:j,openCheatsheet:Z,closeCheatsheet:K,cheatsheetOpen:T,listBindings:q,wsPrefix:i,paletteEntries:h}),[L,O,P,$,E,H,j,Z,K,T,q,i,h]);return l.jsxs(D0.Provider,{value:Y,children:[e,l.jsx(CE,{entries:h}),l.jsx(PE,{})]})}function Fs(){const e=g.useContext(D0);if(!e)throw new Error("useHotkeyContext must be used within HotkeyProvider");return e}function vt({keys:e,handler:t,scope:n="global",description:o,when:i,enabled:a=!0}){const{register:c,unregister:d}=Fs(),p=g.useRef(t),m=g.useRef(i);g.useEffect(()=>{p.current=t,m.current=i},[t,i]),g.useEffect(()=>{if(!a)return;const h=c({keys:e,handler:x=>p.current(x),scope:n,description:o,when:m.current?()=>m.current():void 0});return()=>d(h)},[c,d,e,n,o,a])}function zs(e){const{pushScope:t,popScope:n}=Fs();g.useEffect(()=>(t(e),()=>n(e)),[t,n,e])}function yc(e,t){const[n,o]=g.useState(e.length===0?-1:0),i=fn();g.useEffect(()=>{o(e.length===0?-1:0)},[i.pathname]),g.useEffect(()=>{o(c=>e.length===0?-1:Math.min(Math.max(0,c),e.length-1))},[e.length]),g.useEffect(()=>{if(document.querySelectorAll("[data-hotkey-row-index]").forEach(d=>{const p=Number(d.getAttribute("data-hotkey-row-index"));d.setAttribute("data-hotkey-selected",p===n?"true":"false")}),n>=0){const d=document.querySelector(`[data-hotkey-row-index="${n}"]`);d==null||d.scrollIntoView({block:"nearest"})}},[n,e.length]),vt({keys:"j",scope:t.scope,description:"Select next row",handler:()=>o(c=>e.length===0?-1:Math.min(e.length-1,c<0?0:c+1))}),vt({keys:"k",scope:t.scope,description:"Select previous row",handler:()=>o(c=>e.length===0?-1:Math.max(0,c<0?0:c-1))}),vt({keys:"Enter",scope:t.scope,description:"Open selected row",handler:()=>{n>=0&&n<e.length&&t.onOpen(e[n],n)}}),vt({keys:"o",scope:t.scope,description:"Open selected row",enabled:t.bindO??!0,handler:()=>{n>=0&&n<e.length&&t.onOpen(e[n],n)}});const a=g.useCallback(c=>({"data-hotkey-row-index":c,"data-hotkey-selected":c===n?"true":"false"}),[n]);return{selectedIndex:n,hotkeyRowProps:a}}function DE({title:e,breadcrumbs:t,projectSlug:n,onOpenMobileNav:o}){const i=Rt(),{resolvedTheme:a,toggleTheme:c}=zv(),{openPalette:d}=Fs();return l.jsx("header",{className:"sticky top-0 z-30 border-b border-border/70 bg-background/85 backdrop-blur",children:l.jsxs("div",{className:"flex flex-wrap items-center gap-2 px-4 py-2.5 lg:px-6",children:[l.jsx("button",{type:"button",onClick:o,className:"inline-flex h-8 w-8 items-center justify-center rounded-md border border-border/70 bg-card/80 text-foreground lg:hidden","aria-label":"Open navigation",children:l.jsx(vC,{className:"h-4 w-4"})}),l.jsx("div",{className:"min-w-0 flex-1",children:l.jsxs("div",{className:"flex items-center gap-2",children:[t.length>1?l.jsxs("nav",{className:"flex items-center gap-1.5 text-xs font-medium uppercase tracking-[0.1em] text-muted-foreground",children:[t.slice(0,-1).map((p,m)=>l.jsxs("span",{className:"flex items-center gap-1.5",children:[m>0?l.jsx("span",{children:"/"}):null,l.jsx(Ce,{to:p.path,className:"hover:text-foreground",children:p.label})]},p.path)),l.jsx("span",{children:"/"})]}):null,l.jsx("h1",{className:"truncate text-base font-semibold text-foreground",children:e})]})}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("button",{type:"button",onClick:d,className:"shell-action","aria-label":"Open command palette",children:[l.jsx(il,{className:"h-4 w-4"}),l.jsx("span",{className:"hidden sm:inline font-mono text-xs",children:Ss("Mod+k")})]}),l.jsx(Ce,{className:"shell-action",to:"/help",children:"Help"}),l.jsxs(Ce,{className:"shell-action",to:`${i}/create/project`,children:[l.jsx(Xn,{className:"h-4 w-4"}),l.jsx("span",{children:"New Project"})]}),n?l.jsxs(Ce,{className:"shell-action",to:`${i}/projects/${n}/create/assignment`,children:[l.jsx(Xn,{className:"h-4 w-4"}),l.jsx("span",{children:"New Assignment"})]}):null,l.jsxs("button",{type:"button",onClick:c,className:"shell-action","aria-label":"Toggle theme",children:[a==="dark"?l.jsx(TC,{className:"h-4 w-4"}):l.jsx(bC,{className:"h-4 w-4"}),l.jsx("span",{children:a==="dark"?"Light":"Dark"})]})]})]})})}const IE=[{to:"/",label:"Overview",icon:sC},{to:"/attention",label:"Attention",icon:ll},{to:"/playbooks",label:"Playbooks",icon:vv},{to:"/todos",label:"Todos",icon:Sr}],LE=[{suffix:"/projects",label:"Projects",icon:np},{suffix:"/assignments",label:"Assignments",icon:yC},{suffix:"/servers",label:"Servers",icon:rp},{suffix:"/agent-sessions",label:"Agent Sessions",icon:uc},{suffix:"/todos",label:"Todos",icon:Sr}],OE=[{to:"/help",label:"Help",icon:gC},{to:"/settings",label:"Settings",icon:RC}],bx="syntaur.dashboard.sourceFirstNoticeDismissed";function _E({title:e,breadcrumbs:t,projectSlug:n,workspace:o,children:i}){const[a,c]=g.useState(!1);vt({keys:"Escape",scope:"global",description:"Close mobile navigation",enabled:a,handler:()=>c(!1)});const[d,p]=g.useState(()=>{if(typeof window>"u")return!1;try{return window.localStorage.getItem(bx)==="1"}catch{return!1}});function m(){if(p(!0),!(typeof window>"u"))try{window.localStorage.setItem(bx,"1")}catch{}}return l.jsx("div",{className:"min-h-screen bg-background",children:l.jsxs("div",{className:"relative grid min-h-screen lg:grid-cols-[240px_minmax(0,1fr)]",children:[l.jsx("aside",{className:"hidden max-h-screen sticky top-0 overflow-y-auto border-r border-border/70 bg-sidebar/90 px-4 py-4 backdrop-blur lg:flex lg:flex-col",children:l.jsx(wx,{sourceNoticeDismissed:d,onDismissSourceNotice:m,activeWorkspace:o})}),a?l.jsx("div",{className:"fixed inset-0 z-40 bg-slate-950/40 lg:hidden",children:l.jsxs("div",{className:"h-full max-w-xs border-r border-border/70 bg-sidebar p-4 shadow-2xl",children:[l.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[l.jsx(Ce,{to:"/",className:"text-lg font-semibold text-foreground",onClick:()=>c(!1),children:"Syntaur"}),l.jsx("button",{type:"button",onClick:()=>c(!1),className:"inline-flex h-9 w-9 items-center justify-center rounded-md border border-border/70 bg-background/80",children:l.jsx(Rv,{className:"h-4 w-4"})})]}),l.jsx(wx,{sourceNoticeDismissed:d,onDismissSourceNotice:m,activeWorkspace:o,onNavigate:()=>c(!1)})]})}):null,l.jsxs("div",{className:"min-w-0",children:[l.jsx(DE,{title:e,breadcrumbs:t,projectSlug:n,onOpenMobileNav:()=>c(!0)}),l.jsx("main",{className:"mx-auto w-full max-w-[1480px] px-4 py-4 lg:px-6 lg:py-5",children:i})]})]})})}function wx({sourceNoticeDismissed:e,onDismissSourceNotice:t,activeWorkspace:n,onNavigate:o}){const{data:i}=lp(),a=(i==null?void 0:i.workspaces)??[],c=(i==null?void 0:i.hasUngrouped)??!1,d=fn(),[p,m]=g.useState(new Set),[h,x]=g.useState(!1),[v,b]=g.useState(""),N=Wt();function k(S){m(T=>{const A=new Set(T);return A.has(S)?A.delete(S):A.add(S),A})}const j=[...a,...c?["_ungrouped"]:[]];return l.jsxs("div",{className:"flex h-full flex-col gap-3",children:[l.jsx("div",{className:"space-y-3",children:l.jsxs(Ce,{to:"/",className:"inline-flex items-center gap-3",onClick:o,children:[l.jsx("span",{className:"inline-flex h-8 w-8 items-center justify-center rounded-lg bg-foreground text-sm font-semibold text-background shadow-sm",children:"S"}),l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Syntaur"}),l.jsx("p",{className:"text-xs text-muted-foreground/60",children:"Local-first project control"})]})]})}),l.jsx(ox,{items:IE,onNavigate:o}),l.jsx("div",{className:"border-t border-border/40"}),l.jsxs("div",{className:"flex-1 space-y-1 overflow-y-auto",children:[j.length===0&&!h&&l.jsx("p",{className:"px-3 py-2 text-xs text-muted-foreground/60",children:"No workspaces yet"}),j.map(S=>{const T=S==="_ungrouped",A=T?"Ungrouped":Cn(S),L=T?"/w/_ungrouped":`/w/${S}`,O=p.has(S),P=n===S||n===null&&T&&d.pathname.startsWith("/w/_ungrouped");return l.jsxs("div",{children:[l.jsxs("button",{type:"button",onClick:()=>k(S),className:`flex w-full items-center gap-2 rounded-md px-3 py-1.5 text-xs font-semibold uppercase tracking-wider transition ${P?"text-foreground":"text-muted-foreground/70 hover:text-muted-foreground"}`,children:[l.jsx(Xi,{className:`h-3 w-3 transition-transform ${O?"-rotate-90":""}`}),A]}),!O&&l.jsx("nav",{className:"ml-2 space-y-0.5",children:LE.map($=>{const E=`${L}${$.suffix}`,H=_v(d.pathname,$.suffix)&&d.pathname.startsWith(L),Z=$.icon;return l.jsxs(Ce,{to:E,onClick:o,className:`flex items-center gap-3 rounded-md px-3 py-1.5 text-sm font-medium transition ${H?"bg-foreground text-background shadow-sm":"text-muted-foreground hover:bg-background/80 hover:text-foreground"}`,children:[l.jsx(Z,{className:"h-4 w-4"}),l.jsx("span",{children:$.label})]},E)})})]},S)}),h?l.jsx("form",{className:"px-3 py-1.5",onSubmit:S=>{S.preventDefault();const T=v.trim().toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"");T&&(x(!1),b(""),fetch("/api/workspaces",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:T})}).then(()=>{o==null||o(),N(`/w/${T}/projects`)}))},children:l.jsx("input",{autoFocus:!0,type:"text",value:v,onChange:S=>b(S.target.value),onKeyDown:S=>{S.key==="Escape"&&(x(!1),b(""))},onBlur:()=>{v.trim()||(x(!1),b(""))},placeholder:"workspace-name",className:"w-full rounded-md border border-border/60 bg-background/80 px-2 py-1 text-xs text-foreground placeholder:text-muted-foreground/50 focus:border-foreground/40 focus:outline-none"})}):l.jsxs("button",{type:"button",onClick:()=>x(!0),className:"flex w-full items-center gap-2 rounded-md px-3 py-1.5 text-xs font-medium text-muted-foreground/60 transition hover:text-muted-foreground",children:[l.jsx(Xn,{className:"h-3 w-3"}),"New Workspace"]})]}),l.jsx("div",{className:"border-t border-border/40"}),l.jsx(ox,{items:OE,onNavigate:o}),e?null:l.jsx("div",{className:"rounded-lg border border-border/60 bg-background/80 p-3",children:l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Source-first dashboard"}),l.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:"Project and assignment markdown files stay authoritative. Derived files are read-only projections."})]}),l.jsx("button",{type:"button",onClick:t,className:"inline-flex h-7 w-7 items-center justify-center rounded-md border border-border/70 bg-background/80 text-muted-foreground transition hover:text-foreground","aria-label":"Dismiss source-first dashboard notice",children:l.jsx(Rv,{className:"h-4 w-4"})})]})})]})}function ME(){const e=fn(),{workspace:t}=St(),{title:n,breadcrumbs:o,projectSlug:i}=gN(e.pathname);return l.jsx(_E,{title:n,breadcrumbs:o,projectSlug:i,workspace:t??null,children:l.jsx(dS,{})})}const Ya={pending:{label:"Pending",description:"Waiting to start or waiting on dependencies.",className:"border-slate-300 bg-slate-100 text-slate-700 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-300",icon:rC},in_progress:{label:"In Progress",description:"Actively being worked on.",className:"border-violet-300 bg-violet-100 text-violet-800 dark:border-violet-800 dark:bg-violet-950 dark:text-violet-300",icon:Sv},blocked:{label:"Blocked",description:"Blocked by an explicit obstacle that needs intervention.",className:"border-rose-300 bg-rose-100 text-rose-700 dark:border-rose-800 dark:bg-rose-950 dark:text-rose-300",icon:xf},review:{label:"Review",description:"Ready for inspection or approval.",className:"border-amber-300 bg-amber-100 text-amber-800 dark:border-amber-800 dark:bg-amber-950 dark:text-amber-300",icon:CC},completed:{label:"Completed",description:"Finished successfully.",className:"border-teal-300 bg-teal-100 text-teal-700 dark:border-teal-800 dark:bg-teal-950 dark:text-teal-300",icon:ep},failed:{label:"Failed",description:"Could not be completed as planned.",className:"border-red-300 bg-red-100 text-red-800 dark:border-red-800 dark:bg-red-950 dark:text-red-300",icon:xf},active:{label:"Active",description:"The project has active or review work in flight.",className:"border-violet-300 bg-violet-100 text-violet-800 dark:border-violet-800 dark:bg-violet-950 dark:text-violet-300",icon:yf},stopped:{label:"Stopped",description:"Session ended without completing.",className:"border-slate-300 bg-slate-100 text-slate-700 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-300",icon:eC},archived:{label:"Archived",description:"Archived by a human override.",className:"border-zinc-300 bg-zinc-100 text-zinc-700 dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-300",icon:yf}};function Ht({status:e,className:t,showIcon:n=!0,progress:o}){const i=Ya[e]??{label:e.replace(/_/g," ").replace(/\b\w/g,h=>h.toUpperCase()),description:`Status: ${e}`,className:"border-slate-300 bg-slate-100 text-slate-600 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-400",icon:yf},a=i.icon,c=o&&o.total>0,d=c?Math.min(1,Math.max(0,o.checked/o.total)):0,p=c?`${i.description} (${o.checked}/${o.total} criteria)`:i.description,m=n?c?l.jsxs("span",{className:"relative inline-flex h-3.5 w-3.5 items-center justify-center",children:[l.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:"absolute inset-0 h-full w-full -rotate-90",children:[l.jsx("circle",{cx:"8",cy:"8",r:"7",fill:"none",stroke:"currentColor",strokeOpacity:"0.25",strokeWidth:"1.5"}),l.jsx("circle",{cx:"8",cy:"8",r:"7",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeDasharray:2*Math.PI*7,strokeDashoffset:2*Math.PI*7*(1-d)})]}),l.jsx(a,{className:"h-2.5 w-2.5"})]}):l.jsx(a,{className:"h-3.5 w-3.5"}):null;return l.jsxs("span",{title:p,className:$e("inline-flex items-center gap-1.5 whitespace-nowrap rounded-full border px-2 py-0.5 text-xs font-semibold tracking-wide",i.className,t),children:[m,l.jsx("span",{children:i.label})]})}function I0(e){var t;return((t=Ya[e])==null?void 0:t.description)??`Status: ${e}`}const $E={default:"border-border/70 bg-card/90",info:"border-primary/30 bg-primary/5 dark:border-primary/40 dark:bg-primary/10",warn:"border-amber-200 bg-amber-50 dark:border-amber-900 dark:bg-amber-950/40",danger:"border-rose-200 bg-rose-50 dark:border-rose-900 dark:bg-rose-950/40",success:"border-emerald-200 bg-emerald-50 dark:border-emerald-900 dark:bg-emerald-950/40"};function it({label:e,value:t,description:n,icon:o,tone:i="default",to:a}){const c=l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex items-start justify-between gap-4",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.1em] text-muted-foreground",children:e}),l.jsx("p",{className:"text-2xl font-semibold text-foreground",children:t})]}),o?l.jsx("span",{className:"rounded-md border border-border/60 bg-background/80 p-1.5 text-muted-foreground",children:l.jsx(o,{className:"h-5 w-5"})}):null]}),n?l.jsx("p",{className:"mt-2 text-sm leading-5 text-muted-foreground",children:n}):null]}),d=$e("rounded-lg border p-3 shadow-sm",$E[i],a?"block transition hover:-translate-y-0.5 hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40":"");return a?l.jsx(Ce,{to:a,className:d,children:c}):l.jsx("article",{className:d,children:c})}function Pe({title:e,description:t,children:n,className:o,actions:i}){return l.jsxs("section",{className:$e("surface-panel space-y-3",o),children:[e||i?l.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[e?l.jsx("h2",{className:"text-lg font-semibold text-foreground",children:e}):null,t?l.jsx("p",{className:"text-sm text-muted-foreground",children:t}):null]}),i]}):null,n]})}function bt({label:e="Loading dashboard data…"}){return l.jsx("div",{className:"flex min-h-[240px] items-center justify-center",children:l.jsx("div",{className:"rounded-lg border border-border/70 bg-card/90 px-4 py-3 shadow-sm",children:l.jsx("p",{className:"text-sm text-muted-foreground",children:e})})})}function gt({title:e="Something went wrong",error:t,action:n}){return l.jsx("div",{className:"rounded-lg border border-rose-200 bg-rose-50 px-4 py-5 dark:border-rose-900 dark:bg-rose-950/30",children:l.jsxs("div",{className:"space-y-2",children:[l.jsx("h3",{className:"text-lg font-semibold text-rose-800 dark:text-rose-200",children:e}),l.jsx("p",{className:"text-sm leading-6 text-rose-700 dark:text-rose-300",children:t}),n?l.jsx("div",{className:"pt-2",children:n}):null]})})}function Ke({title:e,description:t,actions:n}){return l.jsx("div",{className:"rounded-lg border border-dashed border-border/80 bg-muted/30 px-4 py-6 text-center",children:l.jsxs("div",{className:"mx-auto max-w-xl space-y-2",children:[l.jsx("h3",{className:"text-base font-semibold text-foreground",children:e}),l.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:t}),n?l.jsx("div",{className:"flex flex-wrap justify-center gap-3 pt-2",children:n}):null]})})}function Ua({command:e,description:t,example:n}){return l.jsxs("div",{className:"rounded-lg border border-border/70 bg-slate-950 px-3 py-3 text-slate-100 shadow-sm",children:[l.jsx("code",{className:"block overflow-x-auto font-mono text-sm",children:e}),t?l.jsx("p",{className:"mt-2 text-sm text-slate-300",children:t}):null,n?l.jsx("p",{className:"mt-2 font-mono text-xs text-slate-400",children:n}):null]})}function FE({help:e,compact:t=!1}){const n=t?(e==null?void 0:e.firstProjectChecklist.slice(0,3))??[]:(e==null?void 0:e.firstProjectChecklist)??[];return l.jsx(Pe,{title:t?"Getting Started Refresher":"Getting Started",description:t?"A fast reminder of the real flow for creating and running work in Syntaur.":"A first-run checklist that maps to the current CLI and dashboard flow.",actions:l.jsx(Ce,{className:"text-sm font-semibold text-primary hover:underline",to:"/help",children:"Open full help"}),children:l.jsx("div",{className:"space-y-3",children:n.map((o,i)=>l.jsx("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("span",{className:"inline-flex h-5 w-5 items-center justify-center rounded-full bg-foreground text-xs font-semibold text-background",children:i+1}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:o.title}),l.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:o.detail}),o.command?l.jsx(Ua,{command:o.command.command,example:o.command.example}):null]})]})},o.title))})})}function zE(){var c;const{data:e,loading:t,error:n}=bN(),{data:o}=Hv(),{data:i}=cp(),a=i!=null&&i.workspaces?i.workspaces.reduce((d,p)=>d+p.counts.open+p.counts.in_progress,0):0;return t?l.jsx(bt,{label:"Loading overview…"}):n||!e?l.jsx(gt,{error:n||"Overview data is unavailable."}):l.jsxs("div",{className:"space-y-5",children:[l.jsxs("div",{className:"grid gap-3 grid-cols-[repeat(auto-fill,minmax(160px,1fr))]",children:[l.jsx(it,{label:"Active Projects",value:e.stats.activeProjects,icon:np,to:"/projects"}),l.jsx(it,{label:"In Progress",value:e.stats.inProgressAssignments,icon:fC,tone:"info",to:"/assignments?status=in_progress"}),l.jsx(it,{label:"Blocked",value:e.stats.blockedAssignments,icon:ll,tone:"warn",to:"/assignments?status=blocked"}),l.jsx(it,{label:"Review",value:e.stats.reviewAssignments,icon:nC,tone:"info",to:"/assignments?status=review"}),l.jsx(it,{label:"Failed",value:e.stats.failedAssignments,icon:wC,tone:"danger",to:"/assignments?status=failed"}),l.jsx(it,{label:"Stale",value:e.stats.staleAssignments,icon:uc,to:"/assignments?stale=1"}),l.jsx(it,{label:"Open Todos",value:a,icon:Sr,to:"/todos"}),l.jsx(it,{label:"Active Servers",value:e.serverStats?e.serverStats.aliveSessions:"…",description:e.serverStats?`${e.serverStats.totalPorts} ports · ${e.serverStats.deadSessions>0?`${e.serverStats.deadSessions} dead`:"all healthy"}`:"connecting",icon:rp,tone:(c=e.serverStats)!=null&&c.deadSessions?"warn":"default",to:"/servers"})]}),l.jsxs("div",{className:"grid gap-4 xl:grid-cols-[minmax(0,1.1fr)_minmax(360px,0.9fr)]",children:[l.jsxs("div",{className:"space-y-4",children:[l.jsx(Pe,{title:"Needs Attention Now",description:"Blocked, failed, review, and stale work from the source files.",children:e.attention.length===0?l.jsx(Ke,{title:"Nothing urgent right now",description:"The attention queue is empty. Overview will surface blocked, failed, review, and stale assignments here."}):l.jsx("div",{className:"space-y-3",children:e.attention.map(d=>l.jsxs(Ce,{to:d.href,className:"block rounded-md border border-border/60 bg-background/80 p-3 transition hover:border-primary/40 hover:bg-background",children:[l.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"text-sm font-semibold text-foreground",children:d.assignmentTitle}),l.jsx("p",{className:"text-sm text-muted-foreground",children:d.projectTitle})]}),l.jsx(Ht,{status:d.status})]}),l.jsx("p",{className:"mt-3 text-sm leading-6 text-muted-foreground",children:d.reason}),l.jsxs("p",{className:"mt-2 text-xs font-medium uppercase tracking-[0.1em] text-muted-foreground",children:["Updated ",Cr(d.updated)]})]},d.id))})}),l.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[l.jsx(Pe,{title:"Recently Updated Projects",children:e.recentProjects.length===0?l.jsx(Ke,{title:"No projects yet",description:"Create your first project to populate the project directory, recent activity, and attention queue.",actions:l.jsx(Ce,{className:"shell-action bg-foreground text-background hover:opacity-90",to:"/create/project",children:"Create Project"})}):l.jsx("div",{className:"space-y-3",children:e.recentProjects.map(d=>l.jsx(Ce,{to:`/projects/${d.slug}`,className:"block rounded-md border border-border/60 bg-background/80 p-3 transition hover:border-primary/40",children:l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"font-semibold text-foreground",children:d.title}),l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:Cr(d.updated)})]}),l.jsx(Ht,{status:d.status})]})},d.slug))})}),l.jsx(Pe,{title:"Recent Activity",children:e.recentActivity.length===0?l.jsx(Ke,{title:"No activity yet",description:"Once projects and assignments exist, Overview will show activity based on parsed source timestamps instead of file mtimes."}):l.jsx("div",{className:"space-y-3",children:e.recentActivity.map(d=>l.jsxs(Ce,{to:d.href,className:"block rounded-md border border-border/60 bg-background/80 p-3 transition hover:border-primary/40",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"font-semibold text-foreground",children:d.title}),l.jsx("p",{className:"text-sm text-muted-foreground",children:d.summary})]}),l.jsx("span",{className:"text-xs font-medium uppercase tracking-[0.1em] text-muted-foreground",children:Cn(d.type)})]}),l.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:Cr(d.updated)})]},d.id))})})]})]}),e.firstRun&&l.jsx(FE,{help:o})]})]})}function BE(){const{data:e,loading:t,error:n}=wN();return t?l.jsx(bt,{label:"Loading attention queue…"}):n||!e?l.jsx(gt,{error:n||"Attention queue is unavailable."}):l.jsxs("div",{className:"space-y-5",children:[l.jsxs("div",{className:"grid gap-3 md:grid-cols-2 xl:grid-cols-4",children:[l.jsx(it,{label:"Critical",value:e.summary.critical,icon:dC,tone:"danger"}),l.jsx(it,{label:"High",value:e.summary.high,icon:ll,tone:"warn"}),l.jsx(it,{label:"Medium",value:e.summary.medium,icon:PC,tone:"info"}),l.jsx(it,{label:"Low",value:e.summary.low,icon:mC})]}),l.jsx(Pe,{title:"Attention Queue",description:"Ordered by severity, then by the latest parsed source update.",children:e.items.length===0?l.jsx(Ke,{title:"Attention queue is clear",description:"No blocked, failed, review, or stale assignments are currently surfacing from the source files."}):l.jsx("div",{className:"space-y-3",children:e.items.map(o=>l.jsxs(Ce,{to:o.href,className:"block rounded-md border border-border/60 bg-background/80 p-3 transition hover:border-primary/40",children:[l.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:o.assignmentTitle}),l.jsx("p",{className:"text-sm text-muted-foreground",children:o.projectTitle})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"rounded-full border border-border/60 bg-card/90 px-2.5 py-1 text-xs font-semibold uppercase tracking-[0.1em] text-muted-foreground",children:o.severity}),l.jsx(Ht,{status:o.status})]})]}),l.jsx("p",{className:"mt-3 text-sm leading-6 text-muted-foreground",children:o.reason}),l.jsxs("p",{className:"mt-2 text-xs text-muted-foreground",children:["Updated ",Cr(o.updated)]})]},o.id))})})]})}function UE({term:e,description:t}){return l.jsx("span",{title:t,className:"cursor-help rounded-full border border-border/70 bg-background/80 px-2.5 py-1 text-xs font-medium text-foreground underline decoration-dotted underline-offset-4",children:e})}function HE(){const{data:e,loading:t,error:n}=Hv(),{openCheatsheet:o}=Fs();return t?l.jsx(bt,{label:"Loading help…"}):n||!e?l.jsx(gt,{error:n||"Help content is unavailable."}):l.jsxs("div",{className:"space-y-5",children:[l.jsx(Pe,{title:"Keyboard Shortcuts",description:"Navigate the dashboard without reaching for the mouse.",children:l.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[l.jsx("button",{type:"button",onClick:o,className:"inline-flex items-center gap-2 rounded-md border border-border/70 bg-background/80 px-3 py-1.5 text-sm font-medium text-foreground hover:bg-accent",children:"Open shortcuts cheatsheet"}),l.jsxs("span",{className:"text-xs text-muted-foreground",children:["or press ",l.jsx("kbd",{className:"rounded border border-border/70 bg-muted px-1.5 py-0.5 font-mono text-[11px]",children:"?"})," ","anywhere. ",Ss("Mod+k")," opens the command palette."]})]})}),l.jsx(Pe,{title:"What Syntaur Is",description:e.whatIsSyntaur.summary,children:l.jsx("div",{className:"grid gap-3 md:grid-cols-3",children:e.whatIsSyntaur.bullets.map(i=>l.jsx("div",{className:"rounded-md border border-border/60 bg-background/80 p-3 text-sm leading-6 text-muted-foreground",children:i},i))})}),l.jsx(Pe,{title:"Getting Started",children:l.jsx("div",{className:"space-y-3",children:e.workflow.map((i,a)=>l.jsx("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("span",{className:"inline-flex h-5 w-5 items-center justify-center rounded-full bg-foreground text-xs font-semibold text-background",children:a+1}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:i.title}),l.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:i.detail}),i.command?l.jsx(Ua,{command:i.command.command,description:i.command.description,example:i.command.example}):null,i.href?l.jsx(Ce,{className:"inline-flex text-sm font-semibold text-primary hover:underline",to:i.href,children:"Open the related surface"}):null]})]})},i.title))})}),l.jsxs("div",{className:"grid gap-3 xl:grid-cols-2",children:[l.jsxs(Pe,{title:"Core Concepts",children:[l.jsx("div",{className:"flex flex-wrap gap-2",children:e.coreConcepts.map(i=>l.jsx(UE,{term:i.term,description:i.description},i.term))}),l.jsx("div",{className:"grid gap-3 pt-2",children:e.coreConcepts.map(i=>l.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:i.term}),l.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:i.description})]},i.term))})]}),l.jsx(Pe,{title:"Status Guide",children:l.jsx("div",{className:"space-y-3",children:e.statusGuide.map(i=>l.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[l.jsx(Ht,{status:i.status}),l.jsx("p",{className:"font-semibold text-foreground",children:i.meaning})]}),l.jsx("p",{className:"mt-3 text-sm leading-6 text-muted-foreground",children:i.useWhen})]},i.status))})})]}),l.jsxs("div",{className:"grid gap-3 xl:grid-cols-2",children:[l.jsx(Pe,{title:"Ownership And File Rules",children:l.jsx("div",{className:"space-y-3",children:e.ownershipRules.map(i=>l.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:i.label}),l.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:i.description}),l.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:i.files.map(a=>l.jsx("span",{className:"rounded-full border border-border/60 bg-card/90 px-2.5 py-1 font-mono text-xs text-foreground",children:a},a))})]},i.label))})}),l.jsx(Pe,{title:"How To Navigate The Dashboard",children:l.jsx("div",{className:"space-y-3",children:e.navigation.map(i=>l.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:i.label}),l.jsx(Ce,{className:"text-sm font-semibold text-primary hover:underline",to:i.href,children:"Open"})]}),l.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:i.description})]},i.label))})})]}),l.jsx(Pe,{title:"CLI Quick Reference",children:l.jsx("div",{className:"grid gap-3 xl:grid-cols-2",children:e.commands.map(i=>l.jsx(Ua,{command:i.command,description:i.description,example:i.example},i.command))})}),l.jsxs("div",{className:"grid gap-3 xl:grid-cols-2",children:[l.jsx(Pe,{title:"FAQ",children:l.jsx("div",{className:"space-y-3",children:e.faq.map(i=>l.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:i.question}),l.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:i.answer})]},i.question))})}),l.jsx(Pe,{title:"First Project Checklist",children:l.jsx("div",{className:"space-y-3",children:e.firstProjectChecklist.map((i,a)=>l.jsx("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("span",{className:"inline-flex h-5 w-5 items-center justify-center rounded-full bg-foreground text-xs font-semibold text-background",children:a+1}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:i.title}),l.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:i.detail}),i.command?l.jsx(Ua,{command:i.command.command,example:i.command.example}):null,i.href?l.jsx(Ce,{className:"inline-flex text-sm font-semibold text-primary hover:underline",to:i.href,children:"Open the related surface"}):null]})]})},i.title))})})]})]})}function wp({children:e}){return l.jsx("div",{className:"flex flex-col gap-2 rounded-lg border border-border/60 bg-card/80 p-2.5 shadow-sm md:flex-row md:flex-wrap md:items-center",children:e})}const vc=g.forwardRef(({value:e,onChange:t,placeholder:n="Search"},o)=>l.jsxs("label",{className:"relative flex min-w-[220px] flex-1 items-center",children:[l.jsx(il,{className:"pointer-events-none absolute left-3 h-4 w-4 text-muted-foreground"}),l.jsx("input",{ref:o,value:e,onChange:i=>t(i.target.value),placeholder:n,className:"h-9 w-full rounded-md border border-border/60 bg-background/90 pl-9 pr-3 text-sm text-foreground outline-none transition focus:border-primary focus:ring-2 focus:ring-ring/30"})]}));vc.displayName="SearchInput";function kp({value:e,options:t,onChange:n}){return l.jsx("div",{className:"inline-flex rounded-md border border-border/60 bg-background/80 p-1",children:t.map(o=>l.jsx("button",{type:"button",onClick:()=>n(o.value),className:$e("rounded-sm px-2.5 py-1.5 text-sm font-medium transition",e===o.value?"bg-foreground text-background":"text-muted-foreground hover:text-foreground"),children:o.label},o.value))})}function L0({columns:e,items:t,getItemId:n,getColumnId:o,renderCard:i,canDrop:a,onMove:c,emptyMessage:d="No cards in this column."}){const[p,m]=g.useState(null),[h,x]=g.useState(null),v=g.useRef(null),b=g.useMemo(()=>new Map(t.map(O=>[n(O),O])),[n,t]),N=g.useMemo(()=>e.map(O=>({column:O,items:t.filter(P=>o(P)===O.id)})),[e,o,t]),k=p?b.get(p)??null:null;function j(O){if(!k)return{allowed:!1};const P=o(k);return(a==null?void 0:a({item:k,fromColumnId:P,toColumnId:O}))??{allowed:!0}}function S(){m(null),x(null)}function T(O,P){c&&(O.dataTransfer.effectAllowed="move",O.dataTransfer.setData("text/plain",P),m(P))}function A(O,P,$){!c||!k||!j(P).allowed||(O.preventDefault(),O.dataTransfer.dropEffect="move",x(H=>(H==null?void 0:H.columnId)===P&&H.index===$?H:{columnId:P,index:$}))}async function L(O,P,$){var q;if(O.preventDefault(),!c||!k){S();return}const E=o(k),Z=(((q=N.find(Y=>Y.column.id===E))==null?void 0:q.items)??[]).findIndex(Y=>n(Y)===n(k));if(!j(P).allowed||Z<0){S();return}if(E===P&&($===Z||$===Z+1)){S();return}try{await c({item:k,fromColumnId:E,toColumnId:P,fromIndex:Z,toIndex:$})}finally{S()}}return l.jsx("div",{className:"relative overflow-x-auto pb-2",style:{scrollbarColor:"oklch(var(--border)) transparent",scrollbarWidth:"thin"},children:l.jsx("div",{className:"grid min-w-max auto-cols-[minmax(260px,320px)] grid-flow-col gap-4",children:N.map(({column:O,items:P})=>{const $=j(O.id),E=(h==null?void 0:h.columnId)===O.id;return l.jsxs("section",{className:$e("flex min-h-[320px] flex-col rounded-lg border border-border/60 bg-card/85 p-3 shadow-sm",k&&!$.allowed?"border-dashed opacity-65":"",k&&$.allowed?"border-primary/30 bg-accent/30":"",E?"ring-2 ring-ring/30":""),title:k&&!$.allowed?$.reason:void 0,children:[l.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("h2",{className:"text-sm font-semibold uppercase tracking-[0.16em] text-muted-foreground",children:O.title}),O.description?l.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:O.description}):null]}),l.jsx("span",{className:"rounded-full border border-border/60 bg-background/80 px-2.5 py-1 text-xs font-semibold text-foreground",children:P.length})]}),l.jsxs("div",{className:"flex flex-1 flex-col gap-3",onDragOver:H=>A(H,O.id,P.length),onDrop:H=>L(H,O.id,P.length),children:[P.length===0?l.jsx(WE,{active:(h==null?void 0:h.columnId)===O.id&&h.index===0,disabled:!!k&&!$.allowed,children:typeof d=="function"?d(O):d}):null,P.map((H,Z)=>{const K=n(H),q=p===K;return l.jsxs(g.Fragment,{children:[l.jsx("div",{className:$e("h-2 rounded-full transition",(h==null?void 0:h.columnId)===O.id&&h.index===Z?"bg-primary/70":"bg-transparent"),onDragOver:Y=>A(Y,O.id,Z),onDrop:Y=>L(Y,O.id,Z)}),l.jsx("div",{draggable:!!c,onMouseDown:Y=>{v.current=Y.target},onDragStart:Y=>{const X=v.current;if(X!=null&&X.closest("a, button")){Y.preventDefault();return}T(Y,K)},onDragEnd:S,className:$e("transition",c?"cursor-grab active:cursor-grabbing":"",q?"scale-[0.98] opacity-50":""),children:i(H,{dragging:q})})]},K)}),P.length>0?l.jsx("div",{className:$e("mt-1 rounded-md border border-dashed px-3 py-2 text-center text-xs text-muted-foreground transition",(h==null?void 0:h.columnId)===O.id&&h.index===P.length?"border-primary/50 bg-primary/10 text-foreground":"border-border/60",k&&!$.allowed?"opacity-40":""),children:"Drop here to place at the end"}):null]})]},O.id)})})})}function WE({active:e,disabled:t,children:n}){return l.jsx("div",{className:$e("flex min-h-[128px] items-center justify-center rounded-lg border border-dashed px-4 text-center text-sm text-muted-foreground transition",e?"border-primary/60 bg-primary/10 text-foreground":"border-border/60 bg-background/50",t?"opacity-45":""),children:n})}const O0={statuses:[{id:"pending",label:"Pending"},{id:"in_progress",label:"In Progress"},{id:"blocked",label:"Blocked"},{id:"review",label:"Review"},{id:"completed",label:"Completed"},{id:"failed",label:"Failed"}],order:["pending","in_progress","blocked","review","completed","failed"],transitions:[],custom:!1};let Fi=null,Bo=null;function VE(){return Fi?Promise.resolve(Fi):Bo||(Bo=fetch("/api/config/statuses").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}`);return e.json()}).then(e=>(Fi=e,Bo=null,e)).catch(()=>(Bo=null,O0)),Bo)}function bc(){const[e,t]=g.useState(()=>Fi??O0);return g.useEffect(()=>{VE().then(t)},[]),e}function kx(){Fi=null,Bo=null}function qE(e,t){const n=e.statuses.find(o=>o.id===t);return(n==null?void 0:n.label)??t.replace(/_/g," ").replace(/\b\w/g,o=>o.toUpperCase())}const GE={completed:"bg-emerald-500",in_progress:"bg-sky-500",review:"bg-violet-500",blocked:"bg-amber-500",failed:"bg-rose-500",pending:"bg-slate-400"},jx=["bg-cyan-500","bg-indigo-500","bg-orange-500","bg-pink-500","bg-lime-500","bg-fuchsia-500"];function Xa({progress:e,className:t,showLegend:n=!1}){const o=bc(),i=g.useMemo(()=>{let c=0;return(o.order.length>0?o.order:Object.keys(e).filter(p=>p!=="total")).map(p=>({key:p,className:GE[p]??jx[c++%jx.length]}))},[o.order,e]),a=i.filter(c=>(e[c.key]??0)>0);return l.jsxs("div",{className:$e("space-y-2",t),children:[l.jsx("div",{className:"flex h-1.5 w-full overflow-hidden rounded-lg border border-border/70 bg-muted/60",children:e.total===0?l.jsx("div",{className:"h-full w-full bg-muted"}):a.map(c=>l.jsx("div",{className:c.className,style:{width:`${(e[c.key]??0)/e.total*100}%`},title:`${Cn(c.key)}: ${e[c.key]??0}`},c.key))}),n?l.jsx("div",{className:"flex flex-wrap gap-2 text-xs text-muted-foreground",children:i.map(c=>l.jsxs("span",{className:"inline-flex items-center gap-2 rounded-full border border-border/60 bg-background/80 px-2 py-1",children:[l.jsx("span",{className:$e("h-2 w-2 rounded-full",c.className)}),l.jsx("span",{children:Cn(c.key)}),l.jsx("span",{className:"font-medium text-foreground",children:e[c.key]??0})]},c.key))}):null]})}const KE=["pending","active","blocked","failed","completed","archived"],jp=KE,YE=["pending","in_progress","blocked","review","completed","failed"];function XE(e){return e&&e.length>0?e:[...YE]}function QE(e,t,n){if(t<0||t>=e.length)return e;const o=[...e],[i]=o.splice(t,1),a=t<n?n-1:n;return o.splice(Math.max(0,Math.min(a,o.length)),0,i),o}function Sx(){const{workspace:e}=St(),t=Rt(),n=Wt(),{data:o,loading:i,error:a,refetch:c}=dc(),d=g.useRef(null);zs("list:projects");const[p,m]=g.useState(""),[h,x]=g.useState("all"),[v,b]=g.useState("active"),[N,k]=g.useState("all"),[j,S]=g.useState("updated"),[T,A]=_s(),L=T.get("view"),O=L==="table"||L==="kanban"?L:"cards",P=D=>{A(V=>{const W=new URLSearchParams(V);return D==="cards"?W.delete("view"):W.set("view",D),W})},[$,E]=g.useState({}),H=g.useMemo(()=>o?o.filter(D=>{if(e){if(e==="_ungrouped"){if(D.workspace!==null)return!1}else if(D.workspace!==e)return!1}return v==="active"&&D.archived||v==="archived"&&!D.archived||h!=="all"&&D.status!==h||N!=="all"&&!D.tags.includes(N)?!1:p.trim()?`${D.title} ${D.tags.join(" ")} ${D.slug}`.toLowerCase().includes(p.toLowerCase()):!0}).sort((D,V)=>eR(D,V,j)):[],[o,p,h,v,N,j,e]),Z=H.map(D=>`${D.slug}:${D.status}`).join("|");g.useEffect(()=>{E(tR(H))},[Z,j]);const K=g.useMemo(()=>{const D=new Map(H.map(V=>[V.slug,V]));return jp.flatMap(V=>($[V]??H.filter(ee=>ee.status===V).map(ee=>ee.slug)).map(ee=>D.get(ee)).filter(ee=>!!ee))},[H,$]),{visibleItems:q,visibleIndexByKey:Y}=g.useMemo(()=>{const D=O==="kanban"?K:H,V=new Map;return D.forEach((W,ee)=>V.set(W.slug,ee)),{visibleItems:D,visibleIndexByKey:V}},[O,H,K]),{hotkeyRowProps:X}=yc(q,{scope:"list:projects",onOpen:D=>n(`${t}/projects/${D.slug}`)});if(vt({keys:"/",scope:"list:projects",description:"Focus filter",handler:()=>{var D;return(D=d.current)==null?void 0:D.focus()}}),vt({keys:"r",scope:"list:projects",description:"Refresh",handler:()=>c()}),i)return l.jsx(bt,{label:"Loading projects…"});if(a||!o)return l.jsx(gt,{error:a||"Project list is unavailable."});const _=Array.from(new Set(o.flatMap(D=>D.tags))).sort();return l.jsxs("div",{className:"space-y-5",children:[l.jsxs(wp,{children:[l.jsx(vc,{ref:d,value:p,onChange:m,placeholder:"Search by project title or tag"}),l.jsxs("select",{value:h,onChange:D=>x(D.target.value),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"all",children:"All statuses"}),l.jsx("option",{value:"pending",children:"Pending"}),l.jsx("option",{value:"active",children:"Active"}),l.jsx("option",{value:"blocked",children:"Blocked"}),l.jsx("option",{value:"failed",children:"Failed"}),l.jsx("option",{value:"completed",children:"Completed"}),l.jsx("option",{value:"archived",children:"Archived"})]}),l.jsxs("select",{value:v,onChange:D=>b(D.target.value),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"active",children:"Hide archived"}),l.jsx("option",{value:"all",children:"All projects"}),l.jsx("option",{value:"archived",children:"Archived only"})]}),l.jsxs("select",{value:N,onChange:D=>k(D.target.value),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"all",children:"All tags"}),_.map(D=>l.jsx("option",{value:D,children:D},D))]}),l.jsxs("select",{value:j,onChange:D=>S(D.target.value),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"updated",children:"Sort: Updated"}),l.jsx("option",{value:"created",children:"Sort: Created"}),l.jsx("option",{value:"title",children:"Sort: Title"}),l.jsx("option",{value:"attention",children:"Sort: Attention"})]}),l.jsx(kp,{value:O,onChange:D=>P(D),options:[{value:"cards",label:"Cards"},{value:"table",label:"Table"},{value:"kanban",label:"Kanban"}]})]}),H.length===0?l.jsx(Ke,{title:o.length===0?"No projects yet":"No projects match these filters",description:o.length===0?"A project is the high-level objective that groups assignments, resources, and memories. Create one to start the dashboard flow.":"Adjust the current search and filters or create a new project.",actions:l.jsx(Ce,{className:"shell-action bg-foreground text-background hover:opacity-90",to:`${t}/create/project`,children:"Create Project"})}):O==="cards"?l.jsx("div",{className:"grid gap-3 lg:grid-cols-2 2xl:grid-cols-3",children:H.map((D,V)=>l.jsxs(Ce,{to:`${t}/projects/${D.slug}`,className:"block rounded-lg border border-border/60 bg-card/90 p-3 shadow-sm transition hover:border-primary/40 hover:shadow-md",...X(V),children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("h2",{className:"text-lg font-semibold text-foreground",children:D.title}),l.jsxs("p",{className:"text-sm text-muted-foreground",children:["Updated ",ko(D.updated)]})]}),l.jsx(Ht,{status:D.status})]}),l.jsxs("div",{className:"mt-4 space-y-3",children:[l.jsx(Xa,{progress:D.progress,showLegend:!0}),l.jsx("div",{className:"flex flex-wrap gap-2",children:D.tags.map(W=>l.jsx("span",{className:"rounded-full border border-border/60 bg-background/80 px-2.5 py-1 text-xs text-foreground",children:W},W))}),l.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[l.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[l.jsx("p",{className:"text-muted-foreground",children:"Needs attention"}),l.jsx("p",{className:"mt-1 font-semibold text-foreground",children:D.needsAttention.blockedCount+D.needsAttention.failedCount})]}),l.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[l.jsx("p",{className:"text-muted-foreground",children:"Assignments"}),l.jsx("p",{className:"mt-1 font-semibold text-foreground",children:D.progress.total})]})]})]})]},D.slug))}):O==="table"?l.jsx(Pe,{title:`${H.length} project${H.length===1?"":"s"}`,children:l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full min-w-[760px] text-left text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"border-b border-border/60 text-muted-foreground",children:[l.jsx("th",{className:"pb-3 font-medium",children:"Project"}),l.jsx("th",{className:"pb-3 font-medium",children:"Status"}),l.jsx("th",{className:"pb-3 font-medium",children:"Progress"}),l.jsx("th",{className:"pb-3 font-medium",children:"Attention"}),l.jsx("th",{className:"pb-3 font-medium",children:"Updated"})]})}),l.jsx("tbody",{children:H.map((D,V)=>l.jsxs("tr",{className:"border-b border-border/50 last:border-0",...X(V),children:[l.jsxs("td",{className:"py-4 pr-4",children:[l.jsx(Ce,{to:`${t}/projects/${D.slug}`,className:"font-semibold text-foreground hover:text-primary",children:D.title}),l.jsx("div",{className:"mt-1 flex flex-wrap gap-2",children:D.tags.map(W=>l.jsx("span",{className:"rounded-full border border-border/60 px-2 py-0.5 text-xs text-muted-foreground",children:W},W))})]}),l.jsx("td",{className:"py-4 pr-4",children:l.jsx(Ht,{status:D.status})}),l.jsx("td",{className:"py-4 pr-4",children:l.jsx("div",{className:"min-w-[220px]",children:l.jsx(Xa,{progress:D.progress})})}),l.jsx("td",{className:"py-4 pr-4 text-muted-foreground",children:D.needsAttention.blockedCount+D.needsAttention.failedCount}),l.jsx("td",{className:"py-4 text-muted-foreground",children:ko(D.updated)})]},D.slug))})]})})}):l.jsx(L0,{columns:ZE,items:K,getItemId:D=>D.slug,getColumnId:D=>D.status,canDrop:({fromColumnId:D,toColumnId:V})=>({allowed:!0,reason:D===V?void 0:"This will set a manual status override on the project."}),onMove:({item:D,fromColumnId:V,toColumnId:W,fromIndex:ee,toIndex:R})=>{if(V===W){const F=$[V]??H.filter(J=>J.status===V).map(J=>J.slug);E(J=>({...J,[V]:QE(F,ee,R)}));return}fetch(`/api/projects/${D.slug}/status-override`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:W})}).then(()=>{window.location.reload()})},emptyMessage:D=>`No ${D.title.toLowerCase()} projects.`,renderCard:(D,{dragging:V})=>{const W=Y.get(D.slug)??-1;return l.jsx("div",{...W>=0?X(W):{},children:l.jsx(nR,{project:D,dragging:V})})}}),l.jsx("div",{className:"rounded-lg border border-border/60 bg-card/80 p-3 text-sm text-muted-foreground",children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx(jv,{className:"mt-0.5 h-4 w-4"}),l.jsxs("p",{children:["Project status is derived from assignment state by default.",O==="kanban"?" Drag projects between columns or use":" Use"," the status override on the project detail page to set a manual status."]})]})})]})}const JE={pending:"Pending",active:"Active",blocked:"Blocked",failed:"Failed",completed:"Completed",archived:"Archived"},ZE=jp.map(e=>({id:e,title:JE[e],description:I0(e)}));function eR(e,t,n){switch(n){case"created":return t.created.localeCompare(e.created);case"title":return e.title.localeCompare(t.title);case"attention":return Cx(t)-Cx(e);case"updated":default:return t.updated.localeCompare(e.updated)}}function Cx(e){return e.needsAttention.failedCount*10+e.needsAttention.blockedCount*5+e.needsAttention.openQuestions}function tR(e){return Object.fromEntries(jp.map(t=>[t,e.filter(n=>n.status===t).map(n=>n.slug)]))}function nR({project:e,dragging:t}){const n=Rt();return l.jsxs("div",{className:"rounded-lg border border-border/60 bg-background/85 p-3 shadow-sm",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx(Ce,{to:`${n}/projects/${e.slug}`,className:"text-base font-semibold text-foreground hover:text-primary",children:e.title}),l.jsxs("p",{className:"text-sm text-muted-foreground",children:["Updated ",ko(e.updated)]})]}),l.jsx(Ht,{status:e.status})]}),l.jsx("div",{className:"mt-4",children:l.jsx(Xa,{progress:e.progress})}),l.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[e.tags.map(o=>l.jsx("span",{className:"rounded-full border border-border/60 bg-background/80 px-2.5 py-1 text-xs text-foreground",children:o},o)),l.jsxs("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:[e.progress.total," assignments"]}),l.jsxs("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:[e.needsAttention.blockedCount+e.needsAttention.failedCount," needs attention"]})]}),l.jsx("div",{className:"mt-4 text-xs uppercase tracking-[0.08em] text-muted-foreground",children:t?"Reordering within status":"Derived project lane"})]})}function Hr({value:e}){const[t,n]=g.useState(!1);function o(){navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),1500)}return l.jsx("button",{onClick:o,className:"text-muted-foreground hover:text-foreground",title:t?"Copied!":`Copy: ${e}`,children:t?l.jsx(Zf,{className:"h-3 w-3 text-green-500"}):l.jsx(tp,{className:"h-3 w-3"})})}function Nx(e){const t=rR(e),n=g.forwardRef((o,i)=>{const{children:a,...c}=o,d=g.Children.toArray(a),p=d.find(sR);if(p){const m=p.props.children,h=d.map(x=>x===p?g.Children.count(m)>1?g.Children.only(null):g.isValidElement(m)?m.props.children:null:x);return l.jsx(t,{...c,ref:i,children:g.isValidElement(m)?g.cloneElement(m,void 0,h):null})}return l.jsx(t,{...c,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function rR(e){const t=g.forwardRef((n,o)=>{const{children:i,...a}=n;if(g.isValidElement(i)){const c=lR(i),d=iR(a,i.props);return i.type!==g.Fragment&&(d.ref=o?fc(o,c):c),g.cloneElement(i,d)}return g.Children.count(i)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var oR=Symbol("radix.slottable");function sR(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===oR}function iR(e,t){const n={...t};for(const o in t){const i=e[o],a=t[o];/^on[A-Z]/.test(o)?i&&a?n[o]=(...d)=>{const p=a(...d);return i(...d),p}:i&&(n[o]=i):o==="style"?n[o]={...i,...a}:o==="className"&&(n[o]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function lR(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function aR(e){const t=e+"CollectionProvider",[n,o]=Vo(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=k=>{const{scope:j,children:S}=k,T=yt.useRef(null),A=yt.useRef(new Map).current;return l.jsx(i,{scope:j,itemMap:A,collectionRef:T,children:S})};c.displayName=t;const d=e+"CollectionSlot",p=Nx(d),m=yt.forwardRef((k,j)=>{const{scope:S,children:T}=k,A=a(d,S),L=ln(j,A.collectionRef);return l.jsx(p,{ref:L,children:T})});m.displayName=d;const h=e+"CollectionItemSlot",x="data-radix-collection-item",v=Nx(h),b=yt.forwardRef((k,j)=>{const{scope:S,children:T,...A}=k,L=yt.useRef(null),O=ln(j,L),P=a(h,S);return yt.useEffect(()=>(P.itemMap.set(L,{ref:L,...A}),()=>void P.itemMap.delete(L))),l.jsx(v,{[x]:"",ref:O,children:T})});b.displayName=h;function N(k){const j=a(e+"CollectionConsumer",k);return yt.useCallback(()=>{const T=j.collectionRef.current;if(!T)return[];const A=Array.from(T.querySelectorAll(`[${x}]`));return Array.from(j.itemMap.values()).sort((P,$)=>A.indexOf(P.ref.current)-A.indexOf($.ref.current))},[j.collectionRef,j.itemMap])}return[{Provider:c,Slot:m,ItemSlot:b},N,o]}var cR=g.createContext(void 0);function _0(e){const t=g.useContext(cR);return e||t||"ltr"}var Fd="rovingFocusGroup.onEntryFocus",uR={bubbles:!1,cancelable:!0},al="RovingFocusGroup",[Sf,M0,dR]=aR(al),[fR,$0]=Vo(al,[dR]),[pR,hR]=fR(al),F0=g.forwardRef((e,t)=>l.jsx(Sf.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Sf.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(mR,{...e,ref:t})})}));F0.displayName=al;var mR=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:i=!1,dir:a,currentTabStopId:c,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:p,onEntryFocus:m,preventScrollOnEntryFocus:h=!1,...x}=e,v=g.useRef(null),b=ln(t,v),N=_0(a),[k,j]=pc({prop:c,defaultProp:d??null,onChange:p,caller:al}),[S,T]=g.useState(!1),A=Uo(m),L=M0(n),O=g.useRef(!1),[P,$]=g.useState(0);return g.useEffect(()=>{const E=v.current;if(E)return E.addEventListener(Fd,A),()=>E.removeEventListener(Fd,A)},[A]),l.jsx(pR,{scope:n,orientation:o,dir:N,loop:i,currentTabStopId:k,onItemFocus:g.useCallback(E=>j(E),[j]),onItemShiftTab:g.useCallback(()=>T(!0),[]),onFocusableItemAdd:g.useCallback(()=>$(E=>E+1),[]),onFocusableItemRemove:g.useCallback(()=>$(E=>E-1),[]),children:l.jsx(Pt.div,{tabIndex:S||P===0?-1:0,"data-orientation":o,...x,ref:b,style:{outline:"none",...e.style},onMouseDown:ct(e.onMouseDown,()=>{O.current=!0}),onFocus:ct(e.onFocus,E=>{const H=!O.current;if(E.target===E.currentTarget&&H&&!S){const Z=new CustomEvent(Fd,uR);if(E.currentTarget.dispatchEvent(Z),!Z.defaultPrevented){const K=L().filter(D=>D.focusable),q=K.find(D=>D.active),Y=K.find(D=>D.id===k),_=[q,Y,...K].filter(Boolean).map(D=>D.ref.current);U0(_,h)}}O.current=!1}),onBlur:ct(e.onBlur,()=>T(!1))})})}),z0="RovingFocusGroupItem",B0=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:i=!1,tabStopId:a,children:c,...d}=e,p=Cs(),m=a||p,h=hR(z0,n),x=h.currentTabStopId===m,v=M0(n),{onFocusableItemAdd:b,onFocusableItemRemove:N,currentTabStopId:k}=h;return g.useEffect(()=>{if(o)return b(),()=>N()},[o,b,N]),l.jsx(Sf.ItemSlot,{scope:n,id:m,focusable:o,active:i,children:l.jsx(Pt.span,{tabIndex:x?0:-1,"data-orientation":h.orientation,...d,ref:t,onMouseDown:ct(e.onMouseDown,j=>{o?h.onItemFocus(m):j.preventDefault()}),onFocus:ct(e.onFocus,()=>h.onItemFocus(m)),onKeyDown:ct(e.onKeyDown,j=>{if(j.key==="Tab"&&j.shiftKey){h.onItemShiftTab();return}if(j.target!==j.currentTarget)return;const S=yR(j,h.orientation,h.dir);if(S!==void 0){if(j.metaKey||j.ctrlKey||j.altKey||j.shiftKey)return;j.preventDefault();let A=v().filter(L=>L.focusable).map(L=>L.ref.current);if(S==="last")A.reverse();else if(S==="prev"||S==="next"){S==="prev"&&A.reverse();const L=A.indexOf(j.currentTarget);A=h.loop?vR(A,L+1):A.slice(L+1)}setTimeout(()=>U0(A))}}),children:typeof c=="function"?c({isCurrentTabStop:x,hasTabStop:k!=null}):c})})});B0.displayName=z0;var gR={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function xR(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function yR(e,t,n){const o=xR(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return gR[o]}function U0(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function vR(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var bR=F0,wR=B0,wc="Tabs",[kR]=Vo(wc,[$0]),H0=$0(),[jR,Sp]=kR(wc),W0=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,onValueChange:i,defaultValue:a,orientation:c="horizontal",dir:d,activationMode:p="automatic",...m}=e,h=_0(d),[x,v]=pc({prop:o,onChange:i,defaultProp:a??"",caller:wc});return l.jsx(jR,{scope:n,baseId:Cs(),value:x,onValueChange:v,orientation:c,dir:h,activationMode:p,children:l.jsx(Pt.div,{dir:h,"data-orientation":c,...m,ref:t})})});W0.displayName=wc;var V0="TabsList",q0=g.forwardRef((e,t)=>{const{__scopeTabs:n,loop:o=!0,...i}=e,a=Sp(V0,n),c=H0(n);return l.jsx(bR,{asChild:!0,...c,orientation:a.orientation,dir:a.dir,loop:o,children:l.jsx(Pt.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:t})})});q0.displayName=V0;var G0="TabsTrigger",K0=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,disabled:i=!1,...a}=e,c=Sp(G0,n),d=H0(n),p=Q0(c.baseId,o),m=J0(c.baseId,o),h=o===c.value;return l.jsx(wR,{asChild:!0,...d,focusable:!i,active:h,children:l.jsx(Pt.button,{type:"button",role:"tab","aria-selected":h,"aria-controls":m,"data-state":h?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:p,...a,ref:t,onMouseDown:ct(e.onMouseDown,x=>{!i&&x.button===0&&x.ctrlKey===!1?c.onValueChange(o):x.preventDefault()}),onKeyDown:ct(e.onKeyDown,x=>{[" ","Enter"].includes(x.key)&&c.onValueChange(o)}),onFocus:ct(e.onFocus,()=>{const x=c.activationMode!=="manual";!h&&!i&&x&&c.onValueChange(o)})})})});K0.displayName=G0;var Y0="TabsContent",X0=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,forceMount:i,children:a,...c}=e,d=Sp(Y0,n),p=Q0(d.baseId,o),m=J0(d.baseId,o),h=o===d.value,x=g.useRef(h);return g.useEffect(()=>{const v=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(v)},[]),l.jsx(qo,{present:i||h,children:({present:v})=>l.jsx(Pt.div,{"data-state":h?"active":"inactive","data-orientation":d.orientation,role:"tabpanel","aria-labelledby":p,hidden:!v,id:m,tabIndex:0,...c,ref:t,style:{...e.style,animationDuration:x.current?"0s":void 0},children:v&&a})})});X0.displayName=Y0;function Q0(e,t){return`${e}-trigger-${t}`}function J0(e,t){return`${e}-content-${t}`}var SR=W0,CR=q0,NR=K0,ER=X0;function Cp({value:e,onValueChange:t,items:n,className:o}){return l.jsxs(SR,{value:e,onValueChange:t,className:o,children:[l.jsx(CR,{className:"scrollbar-none flex gap-2 overflow-x-auto rounded-md border border-border/70 bg-card/80 p-1",children:n.map(i=>l.jsxs(NR,{value:i.value,className:$e("inline-flex items-center gap-2 rounded-sm px-3 py-1.5 text-sm font-medium text-muted-foreground transition","data-[state=active]:bg-foreground data-[state=active]:text-background"),children:[l.jsx("span",{children:i.label}),typeof i.count=="number"?l.jsx("span",{className:"rounded-full bg-background/20 px-2 py-0.5 text-xs data-[state=active]:bg-background/20",children:i.count}):null]},i.value))}),n.map(i=>l.jsx(ER,{value:i.value,className:"pt-3",children:i.content},i.value))]})}const RR="modulepreload",PR=function(e){return"/"+e},Ex={},TR=function(t,n,o){let i=Promise.resolve();if(n&&n.length>0){let c=function(m){return Promise.all(m.map(h=>Promise.resolve(h).then(x=>({status:"fulfilled",value:x}),x=>({status:"rejected",reason:x}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),p=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));i=c(n.map(m=>{if(m=PR(m),m in Ex)return;Ex[m]=!0;const h=m.endsWith(".css"),x=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${x}`))return;const v=document.createElement("link");if(v.rel=h?"stylesheet":RR,h||(v.as="script"),v.crossOrigin="",v.href=m,p&&v.setAttribute("nonce",p),document.head.appendChild(v),h)return new Promise((b,N)=>{v.addEventListener("load",b),v.addEventListener("error",()=>N(new Error(`Unable to preload CSS for ${m}`)))})}))}function a(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return i.then(c=>{for(const d of c||[])d.status==="rejected"&&a(d.reason);return t().catch(a)})};function AR({definition:e,className:t,nodeRoutes:n={}}){const o=g.useRef(null),[i,a]=g.useState(null),[c,d]=g.useState(!0),p=Wt(),m=document.documentElement.classList.contains("dark")?"dark":"default";return g.useEffect(()=>{let h=!1;async function x(){if(o.current)try{const v=(await TR(async()=>{const{default:k}=await import("./mermaid.core-BXFuNYa4.js").then(j=>j.bF);return{default:k}},[])).default;if(v.initialize({startOnLoad:!1,theme:m}),h)return;const b=`mermaid-${Date.now()}`,{svg:N}=await v.render(b,e);if(h||!o.current)return;o.current.innerHTML=N,DR(o.current,n,p),d(!1)}catch(v){h||(a(v instanceof Error?v.message:"Failed to render graph"),d(!1))}}return d(!0),a(null),x(),()=>{h=!0}},[e,p,n,m]),i?l.jsxs("div",{className:$e("rounded-lg border border-border bg-card p-4",t),children:[l.jsxs("p",{className:"text-sm text-red-400",children:["Failed to render dependency graph: ",i]}),l.jsx("pre",{className:"mt-2 text-xs text-muted-foreground overflow-auto",children:e})]}):l.jsxs("div",{className:$e("rounded-lg border border-border bg-card p-4",t),children:[c&&l.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading graph..."}),l.jsx("div",{ref:o,className:"overflow-auto"})]})}function DR(e,t,n){var o;for(const i of e.querySelectorAll(".node")){const a=((o=i.textContent)==null?void 0:o.replace(/\s+/g," ").trim())??"",c=t[a];if(!c)continue;i.style.cursor="pointer",i.setAttribute("role","link"),i.setAttribute("tabindex","0"),i.setAttribute("aria-label",`Open ${a}`);const d=()=>n(c);i.addEventListener("click",d),i.addEventListener("keydown",p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),d())})}}function IR(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const LR=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,OR=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,_R={};function Rx(e,t){return(_R.jsx?OR:LR).test(e)}const MR=/[ \t\n\f\r]/g;function $R(e){return typeof e=="object"?e.type==="text"?Px(e.value):!1:Px(e)}function Px(e){return e.replace(MR,"")===""}class cl{constructor(t,n,o){this.normal=n,this.property=t,o&&(this.space=o)}}cl.prototype.normal={};cl.prototype.property={};cl.prototype.space=void 0;function Z0(e,t){const n={},o={};for(const i of e)Object.assign(n,i.property),Object.assign(o,i.normal);return new cl(n,o,t)}function Cf(e){return e.toLowerCase()}class En{constructor(t,n){this.attribute=n,this.property=t}}En.prototype.attribute="";En.prototype.booleanish=!1;En.prototype.boolean=!1;En.prototype.commaOrSpaceSeparated=!1;En.prototype.commaSeparated=!1;En.prototype.defined=!1;En.prototype.mustUseProperty=!1;En.prototype.number=!1;En.prototype.overloadedBoolean=!1;En.prototype.property="";En.prototype.spaceSeparated=!1;En.prototype.space=void 0;let FR=0;const Me=Go(),Et=Go(),Nf=Go(),ce=Go(),Ze=Go(),Es=Go(),_n=Go();function Go(){return 2**++FR}const Ef=Object.freeze(Object.defineProperty({__proto__:null,boolean:Me,booleanish:Et,commaOrSpaceSeparated:_n,commaSeparated:Es,number:ce,overloadedBoolean:Nf,spaceSeparated:Ze},Symbol.toStringTag,{value:"Module"})),zd=Object.keys(Ef);class Np extends En{constructor(t,n,o,i){let a=-1;if(super(t,n),Tx(this,"space",i),typeof o=="number")for(;++a<zd.length;){const c=zd[a];Tx(this,zd[a],(o&Ef[c])===Ef[c])}}}Np.prototype.defined=!0;function Tx(e,t,n){n&&(e[t]=n)}function Bs(e){const t={},n={};for(const[o,i]of Object.entries(e.properties)){const a=new Np(o,e.transform(e.attributes||{},o),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(o)&&(a.mustUseProperty=!0),t[o]=a,n[Cf(o)]=o,n[Cf(a.attribute)]=o}return new cl(t,n,e.space)}const eb=Bs({properties:{ariaActiveDescendant:null,ariaAtomic:Et,ariaAutoComplete:null,ariaBusy:Et,ariaChecked:Et,ariaColCount:ce,ariaColIndex:ce,ariaColSpan:ce,ariaControls:Ze,ariaCurrent:null,ariaDescribedBy:Ze,ariaDetails:null,ariaDisabled:Et,ariaDropEffect:Ze,ariaErrorMessage:null,ariaExpanded:Et,ariaFlowTo:Ze,ariaGrabbed:Et,ariaHasPopup:null,ariaHidden:Et,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ze,ariaLevel:ce,ariaLive:null,ariaModal:Et,ariaMultiLine:Et,ariaMultiSelectable:Et,ariaOrientation:null,ariaOwns:Ze,ariaPlaceholder:null,ariaPosInSet:ce,ariaPressed:Et,ariaReadOnly:Et,ariaRelevant:null,ariaRequired:Et,ariaRoleDescription:Ze,ariaRowCount:ce,ariaRowIndex:ce,ariaRowSpan:ce,ariaSelected:Et,ariaSetSize:ce,ariaSort:null,ariaValueMax:ce,ariaValueMin:ce,ariaValueNow:ce,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function tb(e,t){return t in e?e[t]:t}function nb(e,t){return tb(e,t.toLowerCase())}const zR=Bs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Es,acceptCharset:Ze,accessKey:Ze,action:null,allow:null,allowFullScreen:Me,allowPaymentRequest:Me,allowUserMedia:Me,alt:null,as:null,async:Me,autoCapitalize:null,autoComplete:Ze,autoFocus:Me,autoPlay:Me,blocking:Ze,capture:null,charSet:null,checked:Me,cite:null,className:Ze,cols:ce,colSpan:null,content:null,contentEditable:Et,controls:Me,controlsList:Ze,coords:ce|Es,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Me,defer:Me,dir:null,dirName:null,disabled:Me,download:Nf,draggable:Et,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Me,formTarget:null,headers:Ze,height:ce,hidden:Nf,high:ce,href:null,hrefLang:null,htmlFor:Ze,httpEquiv:Ze,id:null,imageSizes:null,imageSrcSet:null,inert:Me,inputMode:null,integrity:null,is:null,isMap:Me,itemId:null,itemProp:Ze,itemRef:Ze,itemScope:Me,itemType:Ze,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Me,low:ce,manifest:null,max:null,maxLength:ce,media:null,method:null,min:null,minLength:ce,multiple:Me,muted:Me,name:null,nonce:null,noModule:Me,noValidate:Me,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Me,optimum:ce,pattern:null,ping:Ze,placeholder:null,playsInline:Me,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Me,referrerPolicy:null,rel:Ze,required:Me,reversed:Me,rows:ce,rowSpan:ce,sandbox:Ze,scope:null,scoped:Me,seamless:Me,selected:Me,shadowRootClonable:Me,shadowRootDelegatesFocus:Me,shadowRootMode:null,shape:null,size:ce,sizes:null,slot:null,span:ce,spellCheck:Et,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ce,step:null,style:null,tabIndex:ce,target:null,title:null,translate:null,type:null,typeMustMatch:Me,useMap:null,value:Et,width:ce,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ze,axis:null,background:null,bgColor:null,border:ce,borderColor:null,bottomMargin:ce,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Me,declare:Me,event:null,face:null,frame:null,frameBorder:null,hSpace:ce,leftMargin:ce,link:null,longDesc:null,lowSrc:null,marginHeight:ce,marginWidth:ce,noResize:Me,noHref:Me,noShade:Me,noWrap:Me,object:null,profile:null,prompt:null,rev:null,rightMargin:ce,rules:null,scheme:null,scrolling:Et,standby:null,summary:null,text:null,topMargin:ce,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ce,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Me,disableRemotePlayback:Me,prefix:null,property:null,results:ce,security:null,unselectable:null},space:"html",transform:nb}),BR=Bs({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:_n,accentHeight:ce,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ce,amplitude:ce,arabicForm:null,ascent:ce,attributeName:null,attributeType:null,azimuth:ce,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ce,by:null,calcMode:null,capHeight:ce,className:Ze,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:ce,diffuseConstant:ce,direction:null,display:null,dur:null,divisor:ce,dominantBaseline:null,download:Me,dx:null,dy:null,edgeMode:null,editable:null,elevation:ce,enableBackground:null,end:null,event:null,exponent:ce,externalResourcesRequired:null,fill:null,fillOpacity:ce,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:Es,g2:Es,glyphName:Es,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ce,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ce,horizOriginX:ce,horizOriginY:ce,id:null,ideographic:ce,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ce,k:ce,k1:ce,k2:ce,k3:ce,k4:ce,kernelMatrix:_n,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ce,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ce,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:ce,overlineThickness:ce,paintOrder:null,panose1:null,path:null,pathLength:ce,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ze,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ce,pointsAtY:ce,pointsAtZ:ce,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:_n,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:_n,rev:_n,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:_n,requiredFeatures:_n,requiredFonts:_n,requiredFormats:_n,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:ce,specularExponent:ce,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ce,strikethroughThickness:ce,string:null,stroke:null,strokeDashArray:_n,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ce,strokeOpacity:ce,strokeWidth:null,style:null,surfaceScale:ce,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:_n,tabIndex:ce,tableValues:null,target:null,targetX:ce,targetY:ce,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:_n,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ce,underlineThickness:ce,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ce,values:null,vAlphabetic:ce,vMathematical:ce,vectorEffect:null,vHanging:ce,vIdeographic:ce,version:null,vertAdvY:ce,vertOriginX:ce,vertOriginY:ce,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ce,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:tb}),rb=Bs({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()}}),ob=Bs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:nb}),sb=Bs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),UR={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"},HR=/[A-Z]/g,Ax=/-[a-z]/g,WR=/^data[-\w.:]+$/i;function VR(e,t){const n=Cf(t);let o=t,i=En;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&WR.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Ax,GR);o="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Ax.test(a)){let c=a.replace(HR,qR);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}i=Np}return new i(o,t)}function qR(e){return"-"+e.toLowerCase()}function GR(e){return e.charAt(1).toUpperCase()}const KR=Z0([eb,zR,rb,ob,sb],"html"),Ep=Z0([eb,BR,rb,ob,sb],"svg");function YR(e){return e.join(" ").trim()}var vs={},Bd,Dx;function XR(){if(Dx)return Bd;Dx=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,p=`
|
|
441
|
-
`,m="/",h="*",x="",v="comment",b="declaration";function N(j,S){if(typeof j!="string")throw new TypeError("First argument must be a string");if(!j)return[];S=S||{};var T=1,A=1;function L(X){var _=X.match(t);_&&(T+=_.length);var D=X.lastIndexOf(p);A=~D?X.length-D:A+X.length}function O(){var X={line:T,column:A};return function(_){return _.position=new P(X),H(),_}}function P(X){this.start=X,this.end={line:T,column:A},this.source=S.source}P.prototype.content=j;function $(X){var _=new Error(S.source+":"+T+":"+A+": "+X);if(_.reason=X,_.filename=S.source,_.line=T,_.column=A,_.source=j,!S.silent)throw _}function E(X){var _=X.exec(j);if(_){var D=_[0];return L(D),j=j.slice(D.length),_}}function H(){E(n)}function Z(X){var _;for(X=X||[];_=K();)_!==!1&&X.push(_);return X}function K(){var X=O();if(!(m!=j.charAt(0)||h!=j.charAt(1))){for(var _=2;x!=j.charAt(_)&&(h!=j.charAt(_)||m!=j.charAt(_+1));)++_;if(_+=2,x===j.charAt(_-1))return $("End of comment missing");var D=j.slice(2,_-2);return A+=2,L(D),j=j.slice(_),A+=2,X({type:v,comment:D})}}function q(){var X=O(),_=E(o);if(_){if(K(),!E(i))return $("property missing ':'");var D=E(a),V=X({type:b,property:k(_[0].replace(e,x)),value:D?k(D[0].replace(e,x)):x});return E(c),V}}function Y(){var X=[];Z(X);for(var _;_=q();)_!==!1&&(X.push(_),Z(X));return X}return H(),Y()}function k(j){return j?j.replace(d,x):x}return Bd=N,Bd}var Ix;function QR(){if(Ix)return vs;Ix=1;var e=vs&&vs.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(vs,"__esModule",{value:!0}),vs.default=n;const t=e(XR());function n(o,i){let a=null;if(!o||typeof o!="string")return a;const c=(0,t.default)(o),d=typeof i=="function";return c.forEach(p=>{if(p.type!=="declaration")return;const{property:m,value:h}=p;d?i(m,h,p):h&&(a=a||{},a[m]=h)}),a}return vs}var Ii={},Lx;function JR(){if(Lx)return Ii;Lx=1,Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(m){return!m||n.test(m)||e.test(m)},c=function(m,h){return h.toUpperCase()},d=function(m,h){return"".concat(h,"-")},p=function(m,h){return h===void 0&&(h={}),a(m)?m:(m=m.toLowerCase(),h.reactCompat?m=m.replace(i,d):m=m.replace(o,d),m.replace(t,c))};return Ii.camelCase=p,Ii}var Li,Ox;function ZR(){if(Ox)return Li;Ox=1;var e=Li&&Li.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(QR()),n=JR();function o(i,a){var c={};return!i||typeof i!="string"||(0,t.default)(i,function(d,p){d&&p&&(c[(0,n.camelCase)(d,a)]=p)}),c}return o.default=o,Li=o,Li}var eP=ZR();const tP=lc(eP),ib=lb("end"),Rp=lb("start");function lb(e){return t;function t(n){const o=n&&n.position&&n.position[e]||{};if(typeof o.line=="number"&&o.line>0&&typeof o.column=="number"&&o.column>0)return{line:o.line,column:o.column,offset:typeof o.offset=="number"&&o.offset>-1?o.offset:void 0}}}function nP(e){const t=Rp(e),n=ib(e);if(t&&n)return{start:t,end:n}}function zi(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?_x(e.position):"start"in e||"end"in e?_x(e):"line"in e||"column"in e?Rf(e):""}function Rf(e){return Mx(e&&e.line)+":"+Mx(e&&e.column)}function _x(e){return Rf(e&&e.start)+"-"+Rf(e&&e.end)}function Mx(e){return e&&typeof e=="number"?e:1}class an extends Error{constructor(t,n,o){super(),typeof n=="string"&&(o=n,n=void 0);let i="",a={},c=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(c=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof o=="string"){const p=o.indexOf(":");p===-1?a.ruleId=o:(a.source=o.slice(0,p),a.ruleId=o.slice(p+1))}if(!a.place&&a.ancestors&&a.ancestors){const p=a.ancestors[a.ancestors.length-1];p&&(a.place=p.position)}const d=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=d?d.line:void 0,this.name=zi(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=c&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}an.prototype.file="";an.prototype.name="";an.prototype.reason="";an.prototype.message="";an.prototype.stack="";an.prototype.column=void 0;an.prototype.line=void 0;an.prototype.ancestors=void 0;an.prototype.cause=void 0;an.prototype.fatal=void 0;an.prototype.place=void 0;an.prototype.ruleId=void 0;an.prototype.source=void 0;const Pp={}.hasOwnProperty,rP=new Map,oP=/[A-Z]/g,sP=new Set(["table","tbody","thead","tfoot","tr"]),iP=new Set(["td","th"]),ab="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function lP(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let o;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");o=mP(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");o=hP(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:o,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"?Ep:KR,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=cb(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function cb(e,t,n){if(t.type==="element")return aP(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return cP(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return dP(e,t,n);if(t.type==="mdxjsEsm")return uP(e,t);if(t.type==="root")return fP(e,t,n);if(t.type==="text")return pP(e,t)}function aP(e,t,n){const o=e.schema;let i=o;t.tagName.toLowerCase()==="svg"&&o.space==="html"&&(i=Ep,e.schema=i),e.ancestors.push(t);const a=db(e,t.tagName,!1),c=gP(e,t);let d=Ap(e,t);return sP.has(t.tagName)&&(d=d.filter(function(p){return typeof p=="string"?!$R(p):!0})),ub(e,c,a,t),Tp(c,d),e.ancestors.pop(),e.schema=o,e.create(t,a,c,n)}function cP(e,t){if(t.data&&t.data.estree&&e.evaluater){const o=t.data.estree.body[0];return o.type,e.evaluater.evaluateExpression(o.expression)}Qi(e,t.position)}function uP(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Qi(e,t.position)}function dP(e,t,n){const o=e.schema;let i=o;t.name==="svg"&&o.space==="html"&&(i=Ep,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:db(e,t.name,!0),c=xP(e,t),d=Ap(e,t);return ub(e,c,a,t),Tp(c,d),e.ancestors.pop(),e.schema=o,e.create(t,a,c,n)}function fP(e,t,n){const o={};return Tp(o,Ap(e,t)),e.create(t,e.Fragment,o,n)}function pP(e,t){return t.value}function ub(e,t,n,o){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=o)}function Tp(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function hP(e,t,n){return o;function o(i,a,c,d){const m=Array.isArray(c.children)?n:t;return d?m(a,c,d):m(a,c)}}function mP(e,t){return n;function n(o,i,a,c){const d=Array.isArray(a.children),p=Rp(o);return t(i,a,c,d,{columnNumber:p?p.column-1:void 0,fileName:e,lineNumber:p?p.line:void 0},void 0)}}function gP(e,t){const n={};let o,i;for(i in t.properties)if(i!=="children"&&Pp.call(t.properties,i)){const a=yP(e,i,t.properties[i]);if(a){const[c,d]=a;e.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&iP.has(t.tagName)?o=d:n[c]=d}}if(o){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return n}function xP(e,t){const n={};for(const o of t.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&e.evaluater){const a=o.data.estree.body[0];a.type;const c=a.expression;c.type;const d=c.properties[0];d.type,Object.assign(n,e.evaluater.evaluateExpression(d.argument))}else Qi(e,t.position);else{const i=o.name;let a;if(o.value&&typeof o.value=="object")if(o.value.data&&o.value.data.estree&&e.evaluater){const d=o.value.data.estree.body[0];d.type,a=e.evaluater.evaluateExpression(d.expression)}else Qi(e,t.position);else a=o.value===null?!0:o.value;n[i]=a}return n}function Ap(e,t){const n=[];let o=-1;const i=e.passKeys?new Map:rP;for(;++o<t.children.length;){const a=t.children[o];let c;if(e.passKeys){const p=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(p){const m=i.get(p)||0;c=p+"-"+m,i.set(p,m+1)}}const d=cb(e,a,c);d!==void 0&&n.push(d)}return n}function yP(e,t,n){const o=VR(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=o.commaSeparated?IR(n):YR(n)),o.property==="style"){let i=typeof n=="object"?n:vP(e,String(n));return e.stylePropertyNameCase==="css"&&(i=bP(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&o.space?UR[o.property]||o.property:o.attribute,n]}}function vP(e,t){try{return tP(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const o=n,i=new an("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=ab+"#cannot-parse-style-attribute",i}}function db(e,t,n){let o;if(!n)o={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,c;for(;++a<i.length;){const d=Rx(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};c=c?{type:"MemberExpression",object:c,property:d,computed:!!(a&&d.type==="Literal"),optional:!1}:d}o=c}else o=Rx(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(o.type==="Literal"){const i=o.value;return Pp.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(o);Qi(e)}function Qi(e,t){const n=new an("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=ab+"#cannot-handle-mdx-estrees-without-createevaluater",n}function bP(e){const t={};let n;for(n in e)Pp.call(e,n)&&(t[wP(n)]=e[n]);return t}function wP(e){let t=e.replace(oP,kP);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function kP(e){return"-"+e.toLowerCase()}const Ud={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"]},jP={};function SP(e,t){const n=jP,o=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return fb(e,o,i)}function fb(e,t,n){if(CP(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 $x(e.children,t,n)}return Array.isArray(e)?$x(e,t,n):""}function $x(e,t,n){const o=[];let i=-1;for(;++i<e.length;)o[i]=fb(e[i],t,n);return o.join("")}function CP(e){return!!(e&&typeof e=="object")}const Fx=document.createElement("i");function Dp(e){const t="&"+e+";";Fx.innerHTML=t;const n=Fx.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Er(e,t,n,o){const i=e.length;let a=0,c;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,o.length<1e4)c=Array.from(o),c.unshift(t,n),e.splice(...c);else for(n&&e.splice(t,n);a<o.length;)c=o.slice(a,a+1e4),c.unshift(t,0),e.splice(...c),a+=1e4,t+=1e4}function Yn(e,t){return e.length>0?(Er(e,e.length,0,t),e):t}const zx={}.hasOwnProperty;function NP(e){const t={};let n=-1;for(;++n<e.length;)EP(t,e[n]);return t}function EP(e,t){let n;for(n in t){const i=(zx.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let c;if(a)for(c in a){zx.call(i,c)||(i[c]=[]);const d=a[c];RP(i[c],Array.isArray(d)?d:d?[d]:[])}}}function RP(e,t){let n=-1;const o=[];for(;++n<t.length;)(t[n].add==="after"?e:o).push(t[n]);Er(e,0,0,o)}function pb(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 Rs(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const wr=No(/[A-Za-z]/),$n=No(/[\dA-Za-z]/),PP=No(/[#-'*+\--9=?A-Z^-~]/);function Pf(e){return e!==null&&(e<32||e===127)}const Tf=No(/\d/),TP=No(/[\dA-Fa-f]/),AP=No(/[!-/:-@[-`{-~]/);function Le(e){return e!==null&&e<-2}function Nn(e){return e!==null&&(e<0||e===32)}function qe(e){return e===-2||e===-1||e===32}const DP=No(new RegExp("\\p{P}|\\p{S}","u")),IP=No(/\s/);function No(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Us(e){const t=[];let n=-1,o=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let c="";if(a===37&&$n(e.charCodeAt(n+1))&&$n(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(c=String.fromCharCode(a));else if(a>55295&&a<57344){const d=e.charCodeAt(n+1);a<56320&&d>56319&&d<57344?(c=String.fromCharCode(a,d),i=1):c="�"}else c=String.fromCharCode(a);c&&(t.push(e.slice(o,n),encodeURIComponent(c)),o=n+i+1,c=""),i&&(n+=i,i=0)}return t.join("")+e.slice(o)}function et(e,t,n,o){const i=o?o-1:Number.POSITIVE_INFINITY;let a=0;return c;function c(p){return qe(p)?(e.enter(n),d(p)):t(p)}function d(p){return qe(p)&&a++<i?(e.consume(p),d):(e.exit(n),t(p))}}const LP={tokenize:OP};function OP(e){const t=e.attempt(this.parser.constructs.contentInitial,o,i);let n;return t;function o(d){if(d===null){e.consume(d);return}return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),et(e,t,"linePrefix")}function i(d){return e.enter("paragraph"),a(d)}function a(d){const p=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=p),n=p,c(d)}function c(d){if(d===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(d);return}return Le(d)?(e.consume(d),e.exit("chunkText"),a):(e.consume(d),c)}}const _P={tokenize:MP},Bx={tokenize:$P};function MP(e){const t=this,n=[];let o=0,i,a,c;return d;function d(A){if(o<n.length){const L=n[o];return t.containerState=L[1],e.attempt(L[0].continuation,p,m)(A)}return m(A)}function p(A){if(o++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&T();const L=t.events.length;let O=L,P;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){P=t.events[O][1].end;break}S(o);let $=L;for(;$<t.events.length;)t.events[$][1].end={...P},$++;return Er(t.events,O+1,0,t.events.slice(L)),t.events.length=$,m(A)}return d(A)}function m(A){if(o===n.length){if(!i)return v(A);if(i.currentConstruct&&i.currentConstruct.concrete)return N(A);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Bx,h,x)(A)}function h(A){return i&&T(),S(o),v(A)}function x(A){return t.parser.lazy[t.now().line]=o!==n.length,c=t.now().offset,N(A)}function v(A){return t.containerState={},e.attempt(Bx,b,N)(A)}function b(A){return o++,n.push([t.currentConstruct,t.containerState]),v(A)}function N(A){if(A===null){i&&T(),S(0),e.consume(A);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),k(A)}function k(A){if(A===null){j(e.exit("chunkFlow"),!0),S(0),e.consume(A);return}return Le(A)?(e.consume(A),j(e.exit("chunkFlow")),o=0,t.interrupt=void 0,d):(e.consume(A),k)}function j(A,L){const O=t.sliceStream(A);if(L&&O.push(null),A.previous=a,a&&(a.next=A),a=A,i.defineSkip(A.start),i.write(O),t.parser.lazy[A.start.line]){let P=i.events.length;for(;P--;)if(i.events[P][1].start.offset<c&&(!i.events[P][1].end||i.events[P][1].end.offset>c))return;const $=t.events.length;let E=$,H,Z;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){if(H){Z=t.events[E][1].end;break}H=!0}for(S(o),P=$;P<t.events.length;)t.events[P][1].end={...Z},P++;Er(t.events,E+1,0,t.events.slice($)),t.events.length=P}}function S(A){let L=n.length;for(;L-- >A;){const O=n[L];t.containerState=O[1],O[0].exit.call(t,e)}n.length=A}function T(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function $P(e,t,n){return et(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ux(e){if(e===null||Nn(e)||IP(e))return 1;if(DP(e))return 2}function Ip(e,t,n){const o=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!o.includes(a)&&(t=a(t,n),o.push(a))}return t}const Af={name:"attention",resolveAll:FP,tokenize:zP};function FP(e,t){let n=-1,o,i,a,c,d,p,m,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(o=n;o--;)if(e[o][0]==="exit"&&e[o][1].type==="attentionSequence"&&e[o][1]._open&&t.sliceSerialize(e[o][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[o][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[o][1].end.offset-e[o][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;p=e[o][1].end.offset-e[o][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const x={...e[o][1].end},v={...e[n][1].start};Hx(x,-p),Hx(v,p),c={type:p>1?"strongSequence":"emphasisSequence",start:x,end:{...e[o][1].end}},d={type:p>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:v},a={type:p>1?"strongText":"emphasisText",start:{...e[o][1].end},end:{...e[n][1].start}},i={type:p>1?"strong":"emphasis",start:{...c.start},end:{...d.end}},e[o][1].end={...c.start},e[n][1].start={...d.end},m=[],e[o][1].end.offset-e[o][1].start.offset&&(m=Yn(m,[["enter",e[o][1],t],["exit",e[o][1],t]])),m=Yn(m,[["enter",i,t],["enter",c,t],["exit",c,t],["enter",a,t]]),m=Yn(m,Ip(t.parser.constructs.insideSpan.null,e.slice(o+1,n),t)),m=Yn(m,[["exit",a,t],["enter",d,t],["exit",d,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,m=Yn(m,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Er(e,o-1,n-o+3,m),n=o+m.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function zP(e,t){const n=this.parser.constructs.attentionMarkers.null,o=this.previous,i=Ux(o);let a;return c;function c(p){return a=p,e.enter("attentionSequence"),d(p)}function d(p){if(p===a)return e.consume(p),d;const m=e.exit("attentionSequence"),h=Ux(p),x=!h||h===2&&i||n.includes(p),v=!i||i===2&&h||n.includes(o);return m._open=!!(a===42?x:x&&(i||!v)),m._close=!!(a===42?v:v&&(h||!x)),t(p)}}function Hx(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const BP={name:"autolink",tokenize:UP};function UP(e,t,n){let o=0;return i;function i(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(b){return wr(b)?(e.consume(b),c):b===64?n(b):m(b)}function c(b){return b===43||b===45||b===46||$n(b)?(o=1,d(b)):m(b)}function d(b){return b===58?(e.consume(b),o=0,p):(b===43||b===45||b===46||$n(b))&&o++<32?(e.consume(b),d):(o=0,m(b))}function p(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):b===null||b===32||b===60||Pf(b)?n(b):(e.consume(b),p)}function m(b){return b===64?(e.consume(b),h):PP(b)?(e.consume(b),m):n(b)}function h(b){return $n(b)?x(b):n(b)}function x(b){return b===46?(e.consume(b),o=0,h):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):v(b)}function v(b){if((b===45||$n(b))&&o++<63){const N=b===45?v:x;return e.consume(b),N}return n(b)}}const kc={partial:!0,tokenize:HP};function HP(e,t,n){return o;function o(a){return qe(a)?et(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||Le(a)?t(a):n(a)}}const hb={continuation:{tokenize:VP},exit:qP,name:"blockQuote",tokenize:WP};function WP(e,t,n){const o=this;return i;function i(c){if(c===62){const d=o.containerState;return d.open||(e.enter("blockQuote",{_container:!0}),d.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),a}return n(c)}function a(c){return qe(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function VP(e,t,n){const o=this;return i;function i(c){return qe(c)?et(e,a,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):a(c)}function a(c){return e.attempt(hb,t,n)(c)}}function qP(e){e.exit("blockQuote")}const mb={name:"characterEscape",tokenize:GP};function GP(e,t,n){return o;function o(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return AP(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const gb={name:"characterReference",tokenize:KP};function KP(e,t,n){const o=this;let i=0,a,c;return d;function d(x){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(x),e.exit("characterReferenceMarker"),p}function p(x){return x===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(x),e.exit("characterReferenceMarkerNumeric"),m):(e.enter("characterReferenceValue"),a=31,c=$n,h(x))}function m(x){return x===88||x===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(x),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,c=TP,h):(e.enter("characterReferenceValue"),a=7,c=Tf,h(x))}function h(x){if(x===59&&i){const v=e.exit("characterReferenceValue");return c===$n&&!Dp(o.sliceSerialize(v))?n(x):(e.enter("characterReferenceMarker"),e.consume(x),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(x)&&i++<a?(e.consume(x),h):n(x)}}const Wx={partial:!0,tokenize:XP},Vx={concrete:!0,name:"codeFenced",tokenize:YP};function YP(e,t,n){const o=this,i={partial:!0,tokenize:O};let a=0,c=0,d;return p;function p(P){return m(P)}function m(P){const $=o.events[o.events.length-1];return a=$&&$[1].type==="linePrefix"?$[2].sliceSerialize($[1],!0).length:0,d=P,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(P)}function h(P){return P===d?(c++,e.consume(P),h):c<3?n(P):(e.exit("codeFencedFenceSequence"),qe(P)?et(e,x,"whitespace")(P):x(P))}function x(P){return P===null||Le(P)?(e.exit("codeFencedFence"),o.interrupt?t(P):e.check(Wx,k,L)(P)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(P))}function v(P){return P===null||Le(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),x(P)):qe(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),et(e,b,"whitespace")(P)):P===96&&P===d?n(P):(e.consume(P),v)}function b(P){return P===null||Le(P)?x(P):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),N(P))}function N(P){return P===null||Le(P)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),x(P)):P===96&&P===d?n(P):(e.consume(P),N)}function k(P){return e.attempt(i,L,j)(P)}function j(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),S}function S(P){return a>0&&qe(P)?et(e,T,"linePrefix",a+1)(P):T(P)}function T(P){return P===null||Le(P)?e.check(Wx,k,L)(P):(e.enter("codeFlowValue"),A(P))}function A(P){return P===null||Le(P)?(e.exit("codeFlowValue"),T(P)):(e.consume(P),A)}function L(P){return e.exit("codeFenced"),t(P)}function O(P,$,E){let H=0;return Z;function Z(_){return P.enter("lineEnding"),P.consume(_),P.exit("lineEnding"),K}function K(_){return P.enter("codeFencedFence"),qe(_)?et(P,q,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):q(_)}function q(_){return _===d?(P.enter("codeFencedFenceSequence"),Y(_)):E(_)}function Y(_){return _===d?(H++,P.consume(_),Y):H>=c?(P.exit("codeFencedFenceSequence"),qe(_)?et(P,X,"whitespace")(_):X(_)):E(_)}function X(_){return _===null||Le(_)?(P.exit("codeFencedFence"),$(_)):E(_)}}}function XP(e,t,n){const o=this;return i;function i(c){return c===null?n(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),a)}function a(c){return o.parser.lazy[o.now().line]?n(c):t(c)}}const Hd={name:"codeIndented",tokenize:JP},QP={partial:!0,tokenize:ZP};function JP(e,t,n){const o=this;return i;function i(m){return e.enter("codeIndented"),et(e,a,"linePrefix",5)(m)}function a(m){const h=o.events[o.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?c(m):n(m)}function c(m){return m===null?p(m):Le(m)?e.attempt(QP,c,p)(m):(e.enter("codeFlowValue"),d(m))}function d(m){return m===null||Le(m)?(e.exit("codeFlowValue"),c(m)):(e.consume(m),d)}function p(m){return e.exit("codeIndented"),t(m)}}function ZP(e,t,n){const o=this;return i;function i(c){return o.parser.lazy[o.now().line]?n(c):Le(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),i):et(e,a,"linePrefix",5)(c)}function a(c){const d=o.events[o.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(c):Le(c)?i(c):n(c)}}const eT={name:"codeText",previous:nT,resolve:tT,tokenize:rT};function tT(e){let t=e.length-4,n=3,o,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(o=n;++o<t;)if(e[o][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(o=n-1,t++;++o<=t;)i===void 0?o!==t&&e[o][1].type!=="lineEnding"&&(i=o):(o===t||e[o][1].type==="lineEnding")&&(e[i][1].type="codeTextData",o!==i+2&&(e[i][1].end=e[o-1][1].end,e.splice(i+2,o-i-2),t-=o-i-2,o=i+2),i=void 0);return e}function nT(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function rT(e,t,n){let o=0,i,a;return c;function c(x){return e.enter("codeText"),e.enter("codeTextSequence"),d(x)}function d(x){return x===96?(e.consume(x),o++,d):(e.exit("codeTextSequence"),p(x))}function p(x){return x===null?n(x):x===32?(e.enter("space"),e.consume(x),e.exit("space"),p):x===96?(a=e.enter("codeTextSequence"),i=0,h(x)):Le(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),p):(e.enter("codeTextData"),m(x))}function m(x){return x===null||x===32||x===96||Le(x)?(e.exit("codeTextData"),p(x)):(e.consume(x),m)}function h(x){return x===96?(e.consume(x),i++,h):i===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(x)):(a.type="codeTextData",m(x))}}class oT{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 o=n??Number.POSITIVE_INFINITY;return o<this.left.length?this.left.slice(t,o):t>this.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(t,n,o){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return o&&Oi(this.left,o),a.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),Oi(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Oi(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);Oi(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Oi(this.left,n.reverse())}}}function Oi(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 xb(e){const t={};let n=-1,o,i,a,c,d,p,m;const h=new oT(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(o=h.get(n),n&&o[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(p=o[1]._tokenizer.events,a=0,a<p.length&&p[a][1].type==="lineEndingBlank"&&(a+=2),a<p.length&&p[a][1].type==="content"))for(;++a<p.length&&p[a][1].type!=="content";)p[a][1].type==="chunkText"&&(p[a][1]._isInFirstContentOfListItem=!0,a++);if(o[0]==="enter")o[1].contentType&&(Object.assign(t,sT(h,n)),n=t[n],m=!0);else if(o[1]._container){for(a=n,i=void 0;a--;)if(c=h.get(a),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(i&&(h.get(i)[1].type="lineEndingBlank"),c[1].type="lineEnding",i=a);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;i&&(o[1].end={...h.get(i)[1].start},d=h.slice(i,n),d.unshift(o),h.splice(i,n-i+1,d))}}return Er(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!m}function sT(e,t){const n=e.get(t)[1],o=e.get(t)[2];let i=t-1;const a=[];let c=n._tokenizer;c||(c=o.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const d=c.events,p=[],m={};let h,x,v=-1,b=n,N=0,k=0;const j=[k];for(;b;){for(;e.get(++i)[1]!==b;);a.push(i),b._tokenizer||(h=o.sliceStream(b),b.next||h.push(null),x&&c.defineSkip(b.start),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(h),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),x=b,b=b.next}for(b=n;++v<d.length;)d[v][0]==="exit"&&d[v-1][0]==="enter"&&d[v][1].type===d[v-1][1].type&&d[v][1].start.line!==d[v][1].end.line&&(k=v+1,j.push(k),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(c.events=[],b?(b._tokenizer=void 0,b.previous=void 0):j.pop(),v=j.length;v--;){const S=d.slice(j[v],j[v+1]),T=a.pop();p.push([T,T+S.length-1]),e.splice(T,2,S)}for(p.reverse(),v=-1;++v<p.length;)m[N+p[v][0]]=N+p[v][1],N+=p[v][1]-p[v][0]-1;return m}const iT={resolve:aT,tokenize:cT},lT={partial:!0,tokenize:uT};function aT(e){return xb(e),e}function cT(e,t){let n;return o;function o(d){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(d)}function i(d){return d===null?a(d):Le(d)?e.check(lT,c,a)(d):(e.consume(d),i)}function a(d){return e.exit("chunkContent"),e.exit("content"),t(d)}function c(d){return e.consume(d),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function uT(e,t,n){const o=this;return i;function i(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),et(e,a,"linePrefix")}function a(c){if(c===null||Le(c))return n(c);const d=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(c):e.interrupt(o.parser.constructs.flow,n,t)(c)}}function yb(e,t,n,o,i,a,c,d,p){const m=p||Number.POSITIVE_INFINITY;let h=0;return x;function x(S){return S===60?(e.enter(o),e.enter(i),e.enter(a),e.consume(S),e.exit(a),v):S===null||S===32||S===41||Pf(S)?n(S):(e.enter(o),e.enter(c),e.enter(d),e.enter("chunkString",{contentType:"string"}),k(S))}function v(S){return S===62?(e.enter(a),e.consume(S),e.exit(a),e.exit(i),e.exit(o),t):(e.enter(d),e.enter("chunkString",{contentType:"string"}),b(S))}function b(S){return S===62?(e.exit("chunkString"),e.exit(d),v(S)):S===null||S===60||Le(S)?n(S):(e.consume(S),S===92?N:b)}function N(S){return S===60||S===62||S===92?(e.consume(S),b):b(S)}function k(S){return!h&&(S===null||S===41||Nn(S))?(e.exit("chunkString"),e.exit(d),e.exit(c),e.exit(o),t(S)):h<m&&S===40?(e.consume(S),h++,k):S===41?(e.consume(S),h--,k):S===null||S===32||S===40||Pf(S)?n(S):(e.consume(S),S===92?j:k)}function j(S){return S===40||S===41||S===92?(e.consume(S),k):k(S)}}function vb(e,t,n,o,i,a){const c=this;let d=0,p;return m;function m(b){return e.enter(o),e.enter(i),e.consume(b),e.exit(i),e.enter(a),h}function h(b){return d>999||b===null||b===91||b===93&&!p||b===94&&!d&&"_hiddenFootnoteSupport"in c.parser.constructs?n(b):b===93?(e.exit(a),e.enter(i),e.consume(b),e.exit(i),e.exit(o),t):Le(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),x(b))}function x(b){return b===null||b===91||b===93||Le(b)||d++>999?(e.exit("chunkString"),h(b)):(e.consume(b),p||(p=!qe(b)),b===92?v:x)}function v(b){return b===91||b===92||b===93?(e.consume(b),d++,x):x(b)}}function bb(e,t,n,o,i,a){let c;return d;function d(v){return v===34||v===39||v===40?(e.enter(o),e.enter(i),e.consume(v),e.exit(i),c=v===40?41:v,p):n(v)}function p(v){return v===c?(e.enter(i),e.consume(v),e.exit(i),e.exit(o),t):(e.enter(a),m(v))}function m(v){return v===c?(e.exit(a),p(c)):v===null?n(v):Le(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),et(e,m,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(v))}function h(v){return v===c||v===null||Le(v)?(e.exit("chunkString"),m(v)):(e.consume(v),v===92?x:h)}function x(v){return v===c||v===92?(e.consume(v),h):h(v)}}function Bi(e,t){let n;return o;function o(i){return Le(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,o):qe(i)?et(e,o,n?"linePrefix":"lineSuffix")(i):t(i)}}const dT={name:"definition",tokenize:pT},fT={partial:!0,tokenize:hT};function pT(e,t,n){const o=this;let i;return a;function a(b){return e.enter("definition"),c(b)}function c(b){return vb.call(o,e,d,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function d(b){return i=Rs(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),p):n(b)}function p(b){return Nn(b)?Bi(e,m)(b):m(b)}function m(b){return yb(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function h(b){return e.attempt(fT,x,x)(b)}function x(b){return qe(b)?et(e,v,"whitespace")(b):v(b)}function v(b){return b===null||Le(b)?(e.exit("definition"),o.parser.defined.push(i),t(b)):n(b)}}function hT(e,t,n){return o;function o(d){return Nn(d)?Bi(e,i)(d):n(d)}function i(d){return bb(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function a(d){return qe(d)?et(e,c,"whitespace")(d):c(d)}function c(d){return d===null||Le(d)?t(d):n(d)}}const mT={name:"hardBreakEscape",tokenize:gT};function gT(e,t,n){return o;function o(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return Le(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const xT={name:"headingAtx",resolve:yT,tokenize:vT};function yT(e,t){let n=e.length-2,o=3,i,a;return e[o][1].type==="whitespace"&&(o+=2),n-2>o&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(o===n-1||n-4>o&&e[n-2][1].type==="whitespace")&&(n-=o+1===n?2:4),n>o&&(i={type:"atxHeadingText",start:e[o][1].start,end:e[n][1].end},a={type:"chunkText",start:e[o][1].start,end:e[n][1].end,contentType:"text"},Er(e,o,n-o+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function vT(e,t,n){let o=0;return i;function i(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),c(h)}function c(h){return h===35&&o++<6?(e.consume(h),c):h===null||Nn(h)?(e.exit("atxHeadingSequence"),d(h)):n(h)}function d(h){return h===35?(e.enter("atxHeadingSequence"),p(h)):h===null||Le(h)?(e.exit("atxHeading"),t(h)):qe(h)?et(e,d,"whitespace")(h):(e.enter("atxHeadingText"),m(h))}function p(h){return h===35?(e.consume(h),p):(e.exit("atxHeadingSequence"),d(h))}function m(h){return h===null||h===35||Nn(h)?(e.exit("atxHeadingText"),d(h)):(e.consume(h),m)}}const bT=["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"],qx=["pre","script","style","textarea"],wT={concrete:!0,name:"htmlFlow",resolveTo:ST,tokenize:CT},kT={partial:!0,tokenize:ET},jT={partial:!0,tokenize:NT};function ST(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 CT(e,t,n){const o=this;let i,a,c,d,p;return m;function m(I){return h(I)}function h(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),x}function x(I){return I===33?(e.consume(I),v):I===47?(e.consume(I),a=!0,k):I===63?(e.consume(I),i=3,o.interrupt?t:R):wr(I)?(e.consume(I),c=String.fromCharCode(I),j):n(I)}function v(I){return I===45?(e.consume(I),i=2,b):I===91?(e.consume(I),i=5,d=0,N):wr(I)?(e.consume(I),i=4,o.interrupt?t:R):n(I)}function b(I){return I===45?(e.consume(I),o.interrupt?t:R):n(I)}function N(I){const de="CDATA[";return I===de.charCodeAt(d++)?(e.consume(I),d===de.length?o.interrupt?t:q:N):n(I)}function k(I){return wr(I)?(e.consume(I),c=String.fromCharCode(I),j):n(I)}function j(I){if(I===null||I===47||I===62||Nn(I)){const de=I===47,ve=c.toLowerCase();return!de&&!a&&qx.includes(ve)?(i=1,o.interrupt?t(I):q(I)):bT.includes(c.toLowerCase())?(i=6,de?(e.consume(I),S):o.interrupt?t(I):q(I)):(i=7,o.interrupt&&!o.parser.lazy[o.now().line]?n(I):a?T(I):A(I))}return I===45||$n(I)?(e.consume(I),c+=String.fromCharCode(I),j):n(I)}function S(I){return I===62?(e.consume(I),o.interrupt?t:q):n(I)}function T(I){return qe(I)?(e.consume(I),T):Z(I)}function A(I){return I===47?(e.consume(I),Z):I===58||I===95||wr(I)?(e.consume(I),L):qe(I)?(e.consume(I),A):Z(I)}function L(I){return I===45||I===46||I===58||I===95||$n(I)?(e.consume(I),L):O(I)}function O(I){return I===61?(e.consume(I),P):qe(I)?(e.consume(I),O):A(I)}function P(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),p=I,$):qe(I)?(e.consume(I),P):E(I)}function $(I){return I===p?(e.consume(I),p=null,H):I===null||Le(I)?n(I):(e.consume(I),$)}function E(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||Nn(I)?O(I):(e.consume(I),E)}function H(I){return I===47||I===62||qe(I)?A(I):n(I)}function Z(I){return I===62?(e.consume(I),K):n(I)}function K(I){return I===null||Le(I)?q(I):qe(I)?(e.consume(I),K):n(I)}function q(I){return I===45&&i===2?(e.consume(I),D):I===60&&i===1?(e.consume(I),V):I===62&&i===4?(e.consume(I),F):I===63&&i===3?(e.consume(I),R):I===93&&i===5?(e.consume(I),ee):Le(I)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(kT,J,Y)(I)):I===null||Le(I)?(e.exit("htmlFlowData"),Y(I)):(e.consume(I),q)}function Y(I){return e.check(jT,X,J)(I)}function X(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),_}function _(I){return I===null||Le(I)?Y(I):(e.enter("htmlFlowData"),q(I))}function D(I){return I===45?(e.consume(I),R):q(I)}function V(I){return I===47?(e.consume(I),c="",W):q(I)}function W(I){if(I===62){const de=c.toLowerCase();return qx.includes(de)?(e.consume(I),F):q(I)}return wr(I)&&c.length<8?(e.consume(I),c+=String.fromCharCode(I),W):q(I)}function ee(I){return I===93?(e.consume(I),R):q(I)}function R(I){return I===62?(e.consume(I),F):I===45&&i===2?(e.consume(I),R):q(I)}function F(I){return I===null||Le(I)?(e.exit("htmlFlowData"),J(I)):(e.consume(I),F)}function J(I){return e.exit("htmlFlow"),t(I)}}function NT(e,t,n){const o=this;return i;function i(c){return Le(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),a):n(c)}function a(c){return o.parser.lazy[o.now().line]?n(c):t(c)}}function ET(e,t,n){return o;function o(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(kc,t,n)}}const RT={name:"htmlText",tokenize:PT};function PT(e,t,n){const o=this;let i,a,c;return d;function d(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),p}function p(R){return R===33?(e.consume(R),m):R===47?(e.consume(R),O):R===63?(e.consume(R),A):wr(R)?(e.consume(R),E):n(R)}function m(R){return R===45?(e.consume(R),h):R===91?(e.consume(R),a=0,N):wr(R)?(e.consume(R),T):n(R)}function h(R){return R===45?(e.consume(R),b):n(R)}function x(R){return R===null?n(R):R===45?(e.consume(R),v):Le(R)?(c=x,V(R)):(e.consume(R),x)}function v(R){return R===45?(e.consume(R),b):x(R)}function b(R){return R===62?D(R):R===45?v(R):x(R)}function N(R){const F="CDATA[";return R===F.charCodeAt(a++)?(e.consume(R),a===F.length?k:N):n(R)}function k(R){return R===null?n(R):R===93?(e.consume(R),j):Le(R)?(c=k,V(R)):(e.consume(R),k)}function j(R){return R===93?(e.consume(R),S):k(R)}function S(R){return R===62?D(R):R===93?(e.consume(R),S):k(R)}function T(R){return R===null||R===62?D(R):Le(R)?(c=T,V(R)):(e.consume(R),T)}function A(R){return R===null?n(R):R===63?(e.consume(R),L):Le(R)?(c=A,V(R)):(e.consume(R),A)}function L(R){return R===62?D(R):A(R)}function O(R){return wr(R)?(e.consume(R),P):n(R)}function P(R){return R===45||$n(R)?(e.consume(R),P):$(R)}function $(R){return Le(R)?(c=$,V(R)):qe(R)?(e.consume(R),$):D(R)}function E(R){return R===45||$n(R)?(e.consume(R),E):R===47||R===62||Nn(R)?H(R):n(R)}function H(R){return R===47?(e.consume(R),D):R===58||R===95||wr(R)?(e.consume(R),Z):Le(R)?(c=H,V(R)):qe(R)?(e.consume(R),H):D(R)}function Z(R){return R===45||R===46||R===58||R===95||$n(R)?(e.consume(R),Z):K(R)}function K(R){return R===61?(e.consume(R),q):Le(R)?(c=K,V(R)):qe(R)?(e.consume(R),K):H(R)}function q(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),i=R,Y):Le(R)?(c=q,V(R)):qe(R)?(e.consume(R),q):(e.consume(R),X)}function Y(R){return R===i?(e.consume(R),i=void 0,_):R===null?n(R):Le(R)?(c=Y,V(R)):(e.consume(R),Y)}function X(R){return R===null||R===34||R===39||R===60||R===61||R===96?n(R):R===47||R===62||Nn(R)?H(R):(e.consume(R),X)}function _(R){return R===47||R===62||Nn(R)?H(R):n(R)}function D(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):n(R)}function V(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),W}function W(R){return qe(R)?et(e,ee,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):ee(R)}function ee(R){return e.enter("htmlTextData"),c(R)}}const Lp={name:"labelEnd",resolveAll:IT,resolveTo:LT,tokenize:OT},TT={tokenize:_T},AT={tokenize:MT},DT={tokenize:$T};function IT(e){let t=-1;const n=[];for(;++t<e.length;){const o=e[t][1];if(n.push(e[t]),o.type==="labelImage"||o.type==="labelLink"||o.type==="labelEnd"){const i=o.type==="labelImage"?4:2;o.type="data",t+=i}}return e.length!==n.length&&Er(e,0,e.length,n),e}function LT(e,t){let n=e.length,o=0,i,a,c,d;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(c){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){o=2;break}}else i.type==="labelEnd"&&(c=n);const p={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},m={type:"label",start:{...e[a][1].start},end:{...e[c][1].end}},h={type:"labelText",start:{...e[a+o+2][1].end},end:{...e[c-2][1].start}};return d=[["enter",p,t],["enter",m,t]],d=Yn(d,e.slice(a+1,a+o+3)),d=Yn(d,[["enter",h,t]]),d=Yn(d,Ip(t.parser.constructs.insideSpan.null,e.slice(a+o+4,c-3),t)),d=Yn(d,[["exit",h,t],e[c-2],e[c-1],["exit",m,t]]),d=Yn(d,e.slice(c+1)),d=Yn(d,[["exit",p,t]]),Er(e,a,e.length,d),e}function OT(e,t,n){const o=this;let i=o.events.length,a,c;for(;i--;)if((o.events[i][1].type==="labelImage"||o.events[i][1].type==="labelLink")&&!o.events[i][1]._balanced){a=o.events[i][1];break}return d;function d(v){return a?a._inactive?x(v):(c=o.parser.defined.includes(Rs(o.sliceSerialize({start:a.end,end:o.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),p):n(v)}function p(v){return v===40?e.attempt(TT,h,c?h:x)(v):v===91?e.attempt(AT,h,c?m:x)(v):c?h(v):x(v)}function m(v){return e.attempt(DT,h,x)(v)}function h(v){return t(v)}function x(v){return a._balanced=!0,n(v)}}function _T(e,t,n){return o;function o(x){return e.enter("resource"),e.enter("resourceMarker"),e.consume(x),e.exit("resourceMarker"),i}function i(x){return Nn(x)?Bi(e,a)(x):a(x)}function a(x){return x===41?h(x):yb(e,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(x)}function c(x){return Nn(x)?Bi(e,p)(x):h(x)}function d(x){return n(x)}function p(x){return x===34||x===39||x===40?bb(e,m,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(x):h(x)}function m(x){return Nn(x)?Bi(e,h)(x):h(x)}function h(x){return x===41?(e.enter("resourceMarker"),e.consume(x),e.exit("resourceMarker"),e.exit("resource"),t):n(x)}}function MT(e,t,n){const o=this;return i;function i(d){return vb.call(o,e,a,c,"reference","referenceMarker","referenceString")(d)}function a(d){return o.parser.defined.includes(Rs(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?t(d):n(d)}function c(d){return n(d)}}function $T(e,t,n){return o;function o(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const FT={name:"labelStartImage",resolveAll:Lp.resolveAll,tokenize:zT};function zT(e,t,n){const o=this;return i;function i(d){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(d),e.exit("labelImageMarker"),a}function a(d){return d===91?(e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelImage"),c):n(d)}function c(d){return d===94&&"_hiddenFootnoteSupport"in o.parser.constructs?n(d):t(d)}}const BT={name:"labelStartLink",resolveAll:Lp.resolveAll,tokenize:UT};function UT(e,t,n){const o=this;return i;function i(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),a}function a(c){return c===94&&"_hiddenFootnoteSupport"in o.parser.constructs?n(c):t(c)}}const Wd={name:"lineEnding",tokenize:HT};function HT(e,t){return n;function n(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),et(e,t,"linePrefix")}}const Ha={name:"thematicBreak",tokenize:WT};function WT(e,t,n){let o=0,i;return a;function a(m){return e.enter("thematicBreak"),c(m)}function c(m){return i=m,d(m)}function d(m){return m===i?(e.enter("thematicBreakSequence"),p(m)):o>=3&&(m===null||Le(m))?(e.exit("thematicBreak"),t(m)):n(m)}function p(m){return m===i?(e.consume(m),o++,p):(e.exit("thematicBreakSequence"),qe(m)?et(e,d,"whitespace")(m):d(m))}}const jn={continuation:{tokenize:KT},exit:XT,name:"list",tokenize:GT},VT={partial:!0,tokenize:QT},qT={partial:!0,tokenize:YT};function GT(e,t,n){const o=this,i=o.events[o.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,c=0;return d;function d(b){const N=o.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(N==="listUnordered"?!o.containerState.marker||b===o.containerState.marker:Tf(b)){if(o.containerState.type||(o.containerState.type=N,e.enter(N,{_container:!0})),N==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(Ha,n,m)(b):m(b);if(!o.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),p(b)}return n(b)}function p(b){return Tf(b)&&++c<10?(e.consume(b),p):(!o.interrupt||c<2)&&(o.containerState.marker?b===o.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),m(b)):n(b)}function m(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||b,e.check(kc,o.interrupt?n:h,e.attempt(VT,v,x))}function h(b){return o.containerState.initialBlankLine=!0,a++,v(b)}function x(b){return qe(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),v):n(b)}function v(b){return o.containerState.size=a+o.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(b)}}function KT(e,t,n){const o=this;return o.containerState._closeFlow=void 0,e.check(kc,i,a);function i(d){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,et(e,t,"listItemIndent",o.containerState.size+1)(d)}function a(d){return o.containerState.furtherBlankLines||!qe(d)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,c(d)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,e.attempt(qT,t,c)(d))}function c(d){return o.containerState._closeFlow=!0,o.interrupt=void 0,et(e,e.attempt(jn,t,n),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function YT(e,t,n){const o=this;return et(e,i,"listItemIndent",o.containerState.size+1);function i(a){const c=o.events[o.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===o.containerState.size?t(a):n(a)}}function XT(e){e.exit(this.containerState.type)}function QT(e,t,n){const o=this;return et(e,i,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const c=o.events[o.events.length-1];return!qe(a)&&c&&c[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const Gx={name:"setextUnderline",resolveTo:JT,tokenize:ZT};function JT(e,t){let n=e.length,o,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){o=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const c={type:"setextHeading",start:{...e[o][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",c,t]),e.splice(a+1,0,["exit",e[o][1],t]),e[o][1].end={...e[a][1].end}):e[o][1]=c,e.push(["exit",c,t]),e}function ZT(e,t,n){const o=this;let i;return a;function a(m){let h=o.events.length,x;for(;h--;)if(o.events[h][1].type!=="lineEnding"&&o.events[h][1].type!=="linePrefix"&&o.events[h][1].type!=="content"){x=o.events[h][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||x)?(e.enter("setextHeadingLine"),i=m,c(m)):n(m)}function c(m){return e.enter("setextHeadingLineSequence"),d(m)}function d(m){return m===i?(e.consume(m),d):(e.exit("setextHeadingLineSequence"),qe(m)?et(e,p,"lineSuffix")(m):p(m))}function p(m){return m===null||Le(m)?(e.exit("setextHeadingLine"),t(m)):n(m)}}const eA={tokenize:tA};function tA(e){const t=this,n=e.attempt(kc,o,e.attempt(this.parser.constructs.flowInitial,i,et(e,e.attempt(this.parser.constructs.flow,i,e.attempt(iT,i)),"linePrefix")));return n;function o(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const nA={resolveAll:kb()},rA=wb("string"),oA=wb("text");function wb(e){return{resolveAll:kb(e==="text"?sA:void 0),tokenize:t};function t(n){const o=this,i=this.parser.constructs[e],a=n.attempt(i,c,d);return c;function c(h){return m(h)?a(h):d(h)}function d(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),p}function p(h){return m(h)?(n.exit("data"),a(h)):(n.consume(h),p)}function m(h){if(h===null)return!0;const x=i[h];let v=-1;if(x)for(;++v<x.length;){const b=x[v];if(!b.previous||b.previous.call(o,o.previous))return!0}return!1}}}function kb(e){return t;function t(n,o){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,o):n}}function sA(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 o=e[n-1][1],i=t.sliceStream(o);let a=i.length,c=-1,d=0,p;for(;a--;){const m=i[a];if(typeof m=="string"){for(c=m.length;m.charCodeAt(c-1)===32;)d++,c--;if(c)break;c=-1}else if(m===-2)p=!0,d++;else if(m!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(d=0),d){const m={type:n===e.length||p||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?c:o.start._bufferIndex+c,_index:o.start._index+a,line:o.end.line,column:o.end.column-d,offset:o.end.offset-d},end:{...o.end}};o.end={...m.start},o.start.offset===o.end.offset?Object.assign(o,m):(e.splice(n,0,["enter",m,t],["exit",m,t]),n+=2)}n++}return e}const iA={42:jn,43:jn,45:jn,48:jn,49:jn,50:jn,51:jn,52:jn,53:jn,54:jn,55:jn,56:jn,57:jn,62:hb},lA={91:dT},aA={[-2]:Hd,[-1]:Hd,32:Hd},cA={35:xT,42:Ha,45:[Gx,Ha],60:wT,61:Gx,95:Ha,96:Vx,126:Vx},uA={38:gb,92:mb},dA={[-5]:Wd,[-4]:Wd,[-3]:Wd,33:FT,38:gb,42:Af,60:[BP,RT],91:BT,92:[mT,mb],93:Lp,95:Af,96:eT},fA={null:[Af,nA]},pA={null:[42,95]},hA={null:[]},mA=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:pA,contentInitial:lA,disable:hA,document:iA,flow:cA,flowInitial:aA,insideSpan:fA,string:uA,text:dA},Symbol.toStringTag,{value:"Module"}));function gA(e,t,n){let o={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let c=[],d=[];const p={attempt:$(O),check:$(P),consume:T,enter:A,exit:L,interrupt:$(P,{interrupt:!0})},m={code:null,containerState:{},defineSkip:k,events:[],now:N,parser:e,previous:null,sliceSerialize:v,sliceStream:b,write:x};let h=t.tokenize.call(m,p);return t.resolveAll&&a.push(t),m;function x(K){return c=Yn(c,K),j(),c[c.length-1]!==null?[]:(E(t,0),m.events=Ip(a,m.events,m),m.events)}function v(K,q){return yA(b(K),q)}function b(K){return xA(c,K)}function N(){const{_bufferIndex:K,_index:q,line:Y,column:X,offset:_}=o;return{_bufferIndex:K,_index:q,line:Y,column:X,offset:_}}function k(K){i[K.line]=K.column,Z()}function j(){let K;for(;o._index<c.length;){const q=c[o._index];if(typeof q=="string")for(K=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===K&&o._bufferIndex<q.length;)S(q.charCodeAt(o._bufferIndex));else S(q)}}function S(K){h=h(K)}function T(K){Le(K)?(o.line++,o.column=1,o.offset+=K===-3?2:1,Z()):K!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===c[o._index].length&&(o._bufferIndex=-1,o._index++)),m.previous=K}function A(K,q){const Y=q||{};return Y.type=K,Y.start=N(),m.events.push(["enter",Y,m]),d.push(Y),Y}function L(K){const q=d.pop();return q.end=N(),m.events.push(["exit",q,m]),q}function O(K,q){E(K,q.from)}function P(K,q){q.restore()}function $(K,q){return Y;function Y(X,_,D){let V,W,ee,R;return Array.isArray(X)?J(X):"tokenize"in X?J([X]):F(X);function F(fe){return Ee;function Ee(Ne){const Re=Ne!==null&&fe[Ne],je=Ne!==null&&fe.null,ut=[...Array.isArray(Re)?Re:Re?[Re]:[],...Array.isArray(je)?je:je?[je]:[]];return J(ut)(Ne)}}function J(fe){return V=fe,W=0,fe.length===0?D:I(fe[W])}function I(fe){return Ee;function Ee(Ne){return R=H(),ee=fe,fe.partial||(m.currentConstruct=fe),fe.name&&m.parser.constructs.disable.null.includes(fe.name)?ve():fe.tokenize.call(q?Object.assign(Object.create(m),q):m,p,de,ve)(Ne)}}function de(fe){return K(ee,R),_}function ve(fe){return R.restore(),++W<V.length?I(V[W]):D}}}function E(K,q){K.resolveAll&&!a.includes(K)&&a.push(K),K.resolve&&Er(m.events,q,m.events.length-q,K.resolve(m.events.slice(q),m)),K.resolveTo&&(m.events=K.resolveTo(m.events,m))}function H(){const K=N(),q=m.previous,Y=m.currentConstruct,X=m.events.length,_=Array.from(d);return{from:X,restore:D};function D(){o=K,m.previous=q,m.currentConstruct=Y,m.events.length=X,d=_,Z()}}function Z(){o.line in i&&o.column<2&&(o.column=i[o.line],o.offset+=i[o.line]-1)}}function xA(e,t){const n=t.start._index,o=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let c;if(n===i)c=[e[n].slice(o,a)];else{if(c=e.slice(n,i),o>-1){const d=c[0];typeof d=="string"?c[0]=d.slice(o):c.shift()}a>0&&c.push(e[i].slice(0,a))}return c}function yA(e,t){let n=-1;const o=[];let i;for(;++n<e.length;){const a=e[n];let c;if(typeof a=="string")c=a;else switch(a){case-5:{c="\r";break}case-4:{c=`
|
|
442
|
-
`;break}case-3:{c=`\r
|
|
443
|
-
`;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&i)continue;c=" ";break}default:c=String.fromCharCode(a)}i=a===-2,o.push(c)}return o.join("")}function vA(e){const o={constructs:NP([mA,...(e||{}).extensions||[]]),content:i(LP),defined:[],document:i(_P),flow:i(eA),lazy:{},string:i(rA),text:i(oA)};return o;function i(a){return c;function c(d){return gA(o,a,d)}}}function bA(e){for(;!xb(e););return e}const Kx=/[\0\t\n\r]/g;function wA(){let e=1,t="",n=!0,o;return i;function i(a,c,d){const p=[];let m,h,x,v,b;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(c||void 0).decode(a)),x=0,t="",n&&(a.charCodeAt(0)===65279&&x++,n=void 0);x<a.length;){if(Kx.lastIndex=x,m=Kx.exec(a),v=m&&m.index!==void 0?m.index:a.length,b=a.charCodeAt(v),!m){t=a.slice(x);break}if(b===10&&x===v&&o)p.push(-3),o=void 0;else switch(o&&(p.push(-5),o=void 0),x<v&&(p.push(a.slice(x,v)),e+=v-x),b){case 0:{p.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,p.push(-2);e++<h;)p.push(-1);break}case 10:{p.push(-4),e=1;break}default:o=!0,e=1}x=v+1}return d&&(o&&p.push(-5),t&&p.push(t),p.push(null)),p}}const kA=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function jA(e){return e.replace(kA,SA)}function SA(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return pb(n.slice(a?2:1),a?16:10)}return Dp(n)||e}const jb={}.hasOwnProperty;function CA(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),NA(n)(bA(vA(n).document().write(wA()(e,t,!0))))}function NA(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Xe),autolinkProtocol:H,autolinkEmail:H,atxHeading:a(Ct),blockQuote:a(je),characterEscape:H,characterReference:H,codeFenced:a(ut),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:a(ut,c),codeText:a(tt,c),codeTextData:H,data:H,codeFlowValue:H,definition:a(Ue),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:a(Be),hardBreakEscape:a(Ot),hardBreakTrailing:a(Ot),htmlFlow:a(cn,c),htmlFlowData:H,htmlText:a(cn,c),htmlTextData:H,image:a(hn),label:c,link:a(Xe),listItem:a(Vt),listItemValue:v,listOrdered:a(nt,x),listUnordered:a(nt),paragraph:a(Qt),reference:I,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:a(Ct),strong:a(mn),thematicBreak:a(Tn)},exit:{atxHeading:p(),atxHeadingSequence:O,autolink:p(),autolinkEmail:Re,autolinkProtocol:Ne,blockQuote:p(),characterEscapeValue:Z,characterReferenceMarkerHexadecimal:ve,characterReferenceMarkerNumeric:ve,characterReferenceValue:fe,characterReference:Ee,codeFenced:p(j),codeFencedFence:k,codeFencedFenceInfo:b,codeFencedFenceMeta:N,codeFlowValue:Z,codeIndented:p(S),codeText:p(_),codeTextData:Z,data:Z,definition:p(),definitionDestinationString:L,definitionLabelString:T,definitionTitleString:A,emphasis:p(),hardBreakEscape:p(q),hardBreakTrailing:p(q),htmlFlow:p(Y),htmlFlowData:Z,htmlText:p(X),htmlTextData:Z,image:p(V),label:ee,labelText:W,lineEnding:K,link:p(D),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:de,resourceDestinationString:R,resourceTitleString:F,resource:J,setextHeading:p(E),setextHeadingLineSequence:$,setextHeadingText:P,strong:p(),thematicBreak:p()}};Sb(t,(e||{}).mdastExtensions||[]);const n={};return o;function o(re){let le={type:"root",children:[]};const pe={stack:[le],tokenStack:[],config:t,enter:d,exit:m,buffer:c,resume:h,data:n},ne=[];let me=-1;for(;++me<re.length;)if(re[me][1].type==="listOrdered"||re[me][1].type==="listUnordered")if(re[me][0]==="enter")ne.push(me);else{const ke=ne.pop();me=i(re,ke,me)}for(me=-1;++me<re.length;){const ke=t[re[me][0]];jb.call(ke,re[me][1].type)&&ke[re[me][1].type].call(Object.assign({sliceSerialize:re[me][2].sliceSerialize},pe),re[me][1])}if(pe.tokenStack.length>0){const ke=pe.tokenStack[pe.tokenStack.length-1];(ke[1]||Yx).call(pe,void 0,ke[0])}for(le.position={start:xo(re.length>0?re[0][1].start:{line:1,column:1,offset:0}),end:xo(re.length>0?re[re.length-2][1].end:{line:1,column:1,offset:0})},me=-1;++me<t.transforms.length;)le=t.transforms[me](le)||le;return le}function i(re,le,pe){let ne=le-1,me=-1,ke=!1,_t,Jt,qt,U;for(;++ne<=pe;){const ae=re[ne];switch(ae[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ae[0]==="enter"?me++:me--,U=void 0;break}case"lineEndingBlank":{ae[0]==="enter"&&(_t&&!U&&!me&&!qt&&(qt=ne),U=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:U=void 0}if(!me&&ae[0]==="enter"&&ae[1].type==="listItemPrefix"||me===-1&&ae[0]==="exit"&&(ae[1].type==="listUnordered"||ae[1].type==="listOrdered")){if(_t){let ge=ne;for(Jt=void 0;ge--;){const Oe=re[ge];if(Oe[1].type==="lineEnding"||Oe[1].type==="lineEndingBlank"){if(Oe[0]==="exit")continue;Jt&&(re[Jt][1].type="lineEndingBlank",ke=!0),Oe[1].type="lineEnding",Jt=ge}else if(!(Oe[1].type==="linePrefix"||Oe[1].type==="blockQuotePrefix"||Oe[1].type==="blockQuotePrefixWhitespace"||Oe[1].type==="blockQuoteMarker"||Oe[1].type==="listItemIndent"))break}qt&&(!Jt||qt<Jt)&&(_t._spread=!0),_t.end=Object.assign({},Jt?re[Jt][1].start:ae[1].end),re.splice(Jt||ne,0,["exit",_t,ae[2]]),ne++,pe++}if(ae[1].type==="listItemPrefix"){const ge={type:"listItem",_spread:!1,start:Object.assign({},ae[1].start),end:void 0};_t=ge,re.splice(ne,0,["enter",ge,ae[2]]),ne++,pe++,qt=void 0,U=!0}}}return re[le][1]._spread=ke,pe}function a(re,le){return pe;function pe(ne){d.call(this,re(ne),ne),le&&le.call(this,ne)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(re,le,pe){this.stack[this.stack.length-1].children.push(re),this.stack.push(re),this.tokenStack.push([le,pe||void 0]),re.position={start:xo(le.start),end:void 0}}function p(re){return le;function le(pe){re&&re.call(this,pe),m.call(this,pe)}}function m(re,le){const pe=this.stack.pop(),ne=this.tokenStack.pop();if(ne)ne[0].type!==re.type&&(le?le.call(this,re,ne[0]):(ne[1]||Yx).call(this,re,ne[0]));else throw new Error("Cannot close `"+re.type+"` ("+zi({start:re.start,end:re.end})+"): it’s not open");pe.position.end=xo(re.end)}function h(){return SP(this.stack.pop())}function x(){this.data.expectingFirstListItemValue=!0}function v(re){if(this.data.expectingFirstListItemValue){const le=this.stack[this.stack.length-2];le.start=Number.parseInt(this.sliceSerialize(re),10),this.data.expectingFirstListItemValue=void 0}}function b(){const re=this.resume(),le=this.stack[this.stack.length-1];le.lang=re}function N(){const re=this.resume(),le=this.stack[this.stack.length-1];le.meta=re}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function j(){const re=this.resume(),le=this.stack[this.stack.length-1];le.value=re.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const re=this.resume(),le=this.stack[this.stack.length-1];le.value=re.replace(/(\r?\n|\r)$/g,"")}function T(re){const le=this.resume(),pe=this.stack[this.stack.length-1];pe.label=le,pe.identifier=Rs(this.sliceSerialize(re)).toLowerCase()}function A(){const re=this.resume(),le=this.stack[this.stack.length-1];le.title=re}function L(){const re=this.resume(),le=this.stack[this.stack.length-1];le.url=re}function O(re){const le=this.stack[this.stack.length-1];if(!le.depth){const pe=this.sliceSerialize(re).length;le.depth=pe}}function P(){this.data.setextHeadingSlurpLineEnding=!0}function $(re){const le=this.stack[this.stack.length-1];le.depth=this.sliceSerialize(re).codePointAt(0)===61?1:2}function E(){this.data.setextHeadingSlurpLineEnding=void 0}function H(re){const pe=this.stack[this.stack.length-1].children;let ne=pe[pe.length-1];(!ne||ne.type!=="text")&&(ne=Pn(),ne.position={start:xo(re.start),end:void 0},pe.push(ne)),this.stack.push(ne)}function Z(re){const le=this.stack.pop();le.value+=this.sliceSerialize(re),le.position.end=xo(re.end)}function K(re){const le=this.stack[this.stack.length-1];if(this.data.atHardBreak){const pe=le.children[le.children.length-1];pe.position.end=xo(re.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(le.type)&&(H.call(this,re),Z.call(this,re))}function q(){this.data.atHardBreak=!0}function Y(){const re=this.resume(),le=this.stack[this.stack.length-1];le.value=re}function X(){const re=this.resume(),le=this.stack[this.stack.length-1];le.value=re}function _(){const re=this.resume(),le=this.stack[this.stack.length-1];le.value=re}function D(){const re=this.stack[this.stack.length-1];if(this.data.inReference){const le=this.data.referenceType||"shortcut";re.type+="Reference",re.referenceType=le,delete re.url,delete re.title}else delete re.identifier,delete re.label;this.data.referenceType=void 0}function V(){const re=this.stack[this.stack.length-1];if(this.data.inReference){const le=this.data.referenceType||"shortcut";re.type+="Reference",re.referenceType=le,delete re.url,delete re.title}else delete re.identifier,delete re.label;this.data.referenceType=void 0}function W(re){const le=this.sliceSerialize(re),pe=this.stack[this.stack.length-2];pe.label=jA(le),pe.identifier=Rs(le).toLowerCase()}function ee(){const re=this.stack[this.stack.length-1],le=this.resume(),pe=this.stack[this.stack.length-1];if(this.data.inReference=!0,pe.type==="link"){const ne=re.children;pe.children=ne}else pe.alt=le}function R(){const re=this.resume(),le=this.stack[this.stack.length-1];le.url=re}function F(){const re=this.resume(),le=this.stack[this.stack.length-1];le.title=re}function J(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function de(re){const le=this.resume(),pe=this.stack[this.stack.length-1];pe.label=le,pe.identifier=Rs(this.sliceSerialize(re)).toLowerCase(),this.data.referenceType="full"}function ve(re){this.data.characterReferenceType=re.type}function fe(re){const le=this.sliceSerialize(re),pe=this.data.characterReferenceType;let ne;pe?(ne=pb(le,pe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ne=Dp(le);const me=this.stack[this.stack.length-1];me.value+=ne}function Ee(re){const le=this.stack.pop();le.position.end=xo(re.end)}function Ne(re){Z.call(this,re);const le=this.stack[this.stack.length-1];le.url=this.sliceSerialize(re)}function Re(re){Z.call(this,re);const le=this.stack[this.stack.length-1];le.url="mailto:"+this.sliceSerialize(re)}function je(){return{type:"blockquote",children:[]}}function ut(){return{type:"code",lang:null,meta:null,value:""}}function tt(){return{type:"inlineCode",value:""}}function Ue(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Be(){return{type:"emphasis",children:[]}}function Ct(){return{type:"heading",depth:0,children:[]}}function Ot(){return{type:"break"}}function cn(){return{type:"html",value:""}}function hn(){return{type:"image",title:null,url:"",alt:null}}function Xe(){return{type:"link",title:null,url:"",children:[]}}function nt(re){return{type:"list",ordered:re.type==="listOrdered",start:null,spread:re._spread,children:[]}}function Vt(re){return{type:"listItem",spread:re._spread,checked:null,children:[]}}function Qt(){return{type:"paragraph",children:[]}}function mn(){return{type:"strong",children:[]}}function Pn(){return{type:"text",value:""}}function Tn(){return{type:"thematicBreak"}}}function xo(e){return{line:e.line,column:e.column,offset:e.offset}}function Sb(e,t){let n=-1;for(;++n<t.length;){const o=t[n];Array.isArray(o)?Sb(e,o):EA(e,o)}}function EA(e,t){let n;for(n in t)if(jb.call(t,n))switch(n){case"canContainEols":{const o=t[n];o&&e[n].push(...o);break}case"transforms":{const o=t[n];o&&e[n].push(...o);break}case"enter":case"exit":{const o=t[n];o&&Object.assign(e[n],o);break}}}function Yx(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+zi({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+zi({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+zi({start:t.start,end:t.end})+") is still open")}function RA(e){const t=this;t.parser=n;function n(o){return CA(o,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function PA(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 TA(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
444
|
-
`}]}function AA(e,t){const n=t.value?t.value+`
|
|
445
|
-
`:"",o={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(o.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:o,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function DA(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function IA(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function LA(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",o=String(t.identifier).toUpperCase(),i=Us(o.toLowerCase()),a=e.footnoteOrder.indexOf(o);let c,d=e.footnoteCounts.get(o);d===void 0?(d=0,e.footnoteOrder.push(o),c=e.footnoteOrder.length):c=a+1,d+=1,e.footnoteCounts.set(o,d);const p={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,p);const m={type:"element",tagName:"sup",properties:{},children:[p]};return e.patch(t,m),e.applyData(t,m)}function OA(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 _A(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Cb(e,t){const n=t.referenceType;let o="]";if(n==="collapsed"?o+="[]":n==="full"&&(o+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+o}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const c=i[i.length-1];return c&&c.type==="text"?c.value+=o:i.push({type:"text",value:o}),i}function MA(e,t){const n=String(t.identifier).toUpperCase(),o=e.definitionById.get(n);if(!o)return Cb(e,t);const i={src:Us(o.url||""),alt:t.alt};o.title!==null&&o.title!==void 0&&(i.title=o.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function $A(e,t){const n={src:Us(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 o={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,o),e.applyData(t,o)}function FA(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const o={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,o),e.applyData(t,o)}function zA(e,t){const n=String(t.identifier).toUpperCase(),o=e.definitionById.get(n);if(!o)return Cb(e,t);const i={href:Us(o.url||"")};o.title!==null&&o.title!==void 0&&(i.title=o.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function BA(e,t){const n={href:Us(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const o={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function UA(e,t,n){const o=e.all(t),i=n?HA(n):Nb(t),a={},c=[];if(typeof t.checked=="boolean"){const h=o[0];let x;h&&h.type==="element"&&h.tagName==="p"?x=h:(x={type:"element",tagName:"p",properties:{},children:[]},o.unshift(x)),x.children.length>0&&x.children.unshift({type:"text",value:" "}),x.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let d=-1;for(;++d<o.length;){const h=o[d];(i||d!==0||h.type!=="element"||h.tagName!=="p")&&c.push({type:"text",value:`
|
|
446
|
-
`}),h.type==="element"&&h.tagName==="p"&&!i?c.push(...h.children):c.push(h)}const p=o[o.length-1];p&&(i||p.type!=="element"||p.tagName!=="p")&&c.push({type:"text",value:`
|
|
447
|
-
`});const m={type:"element",tagName:"li",properties:a,children:c};return e.patch(t,m),e.applyData(t,m)}function HA(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let o=-1;for(;!t&&++o<n.length;)t=Nb(n[o])}return t}function Nb(e){const t=e.spread;return t??e.children.length>1}function WA(e,t){const n={},o=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<o.length;){const c=o[i];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(o,!0)};return e.patch(t,a),e.applyData(t,a)}function VA(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function qA(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function GA(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function KA(e,t){const n=e.all(t),o=n.shift(),i=[];if(o){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([o],!0)};e.patch(t.children[0],c),i.push(c)}if(n.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},d=Rp(t.children[1]),p=ib(t.children[t.children.length-1]);d&&p&&(c.position={start:d,end:p}),i.push(c)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function YA(e,t,n){const o=n?n.children:void 0,a=(o?o.indexOf(t):1)===0?"th":"td",c=n&&n.type==="table"?n.align:void 0,d=c?c.length:t.children.length;let p=-1;const m=[];for(;++p<d;){const x=t.children[p],v={},b=c?c[p]:void 0;b&&(v.align=b);let N={type:"element",tagName:a,properties:v,children:[]};x&&(N.children=e.all(x),e.patch(x,N),N=e.applyData(x,N)),m.push(N)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(m,!0)};return e.patch(t,h),e.applyData(t,h)}function XA(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Xx=9,Qx=32;function QA(e){const t=String(e),n=/\r?\n|\r/g;let o=n.exec(t),i=0;const a=[];for(;o;)a.push(Jx(t.slice(i,o.index),i>0,!0),o[0]),i=o.index+o[0].length,o=n.exec(t);return a.push(Jx(t.slice(i),i>0,!1)),a.join("")}function Jx(e,t,n){let o=0,i=e.length;if(t){let a=e.codePointAt(o);for(;a===Xx||a===Qx;)o++,a=e.codePointAt(o)}if(n){let a=e.codePointAt(i-1);for(;a===Xx||a===Qx;)i--,a=e.codePointAt(i-1)}return i>o?e.slice(o,i):""}function JA(e,t){const n={type:"text",value:QA(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function ZA(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const e3={blockquote:PA,break:TA,code:AA,delete:DA,emphasis:IA,footnoteReference:LA,heading:OA,html:_A,imageReference:MA,image:$A,inlineCode:FA,linkReference:zA,link:BA,listItem:UA,list:WA,paragraph:VA,root:qA,strong:GA,table:KA,tableCell:XA,tableRow:YA,text:JA,thematicBreak:ZA,toml:Pa,yaml:Pa,definition:Pa,footnoteDefinition:Pa};function Pa(){}const Eb=-1,jc=0,Ui=1,Qa=2,Op=3,_p=4,Mp=5,$p=6,Rb=7,Pb=8,Zx=typeof self=="object"?self:globalThis,t3=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),o=i=>{if(e.has(i))return e.get(i);const[a,c]=t[i];switch(a){case jc:case Eb:return n(c,i);case Ui:{const d=n([],i);for(const p of c)d.push(o(p));return d}case Qa:{const d=n({},i);for(const[p,m]of c)d[o(p)]=o(m);return d}case Op:return n(new Date(c),i);case _p:{const{source:d,flags:p}=c;return n(new RegExp(d,p),i)}case Mp:{const d=n(new Map,i);for(const[p,m]of c)d.set(o(p),o(m));return d}case $p:{const d=n(new Set,i);for(const p of c)d.add(o(p));return d}case Rb:{const{name:d,message:p}=c;return n(new Zx[d](p),i)}case Pb:return n(BigInt(c),i);case"BigInt":return n(Object(BigInt(c)),i);case"ArrayBuffer":return n(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:d}=new Uint8Array(c);return n(new DataView(d),c)}}return n(new Zx[a](c),i)};return o},ey=e=>t3(new Map,e)(0),bs="",{toString:n3}={},{keys:r3}=Object,_i=e=>{const t=typeof e;if(t!=="object"||!e)return[jc,t];const n=n3.call(e).slice(8,-1);switch(n){case"Array":return[Ui,bs];case"Object":return[Qa,bs];case"Date":return[Op,bs];case"RegExp":return[_p,bs];case"Map":return[Mp,bs];case"Set":return[$p,bs];case"DataView":return[Ui,n]}return n.includes("Array")?[Ui,n]:n.includes("Error")?[Rb,n]:[Qa,n]},Ta=([e,t])=>e===jc&&(t==="function"||t==="symbol"),o3=(e,t,n,o)=>{const i=(c,d)=>{const p=o.push(c)-1;return n.set(d,p),p},a=c=>{if(n.has(c))return n.get(c);let[d,p]=_i(c);switch(d){case jc:{let h=c;switch(p){case"bigint":d=Pb,h=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+p);h=null;break;case"undefined":return i([Eb],c)}return i([d,h],c)}case Ui:{if(p){let v=c;return p==="DataView"?v=new Uint8Array(c.buffer):p==="ArrayBuffer"&&(v=new Uint8Array(c)),i([p,[...v]],c)}const h=[],x=i([d,h],c);for(const v of c)h.push(a(v));return x}case Qa:{if(p)switch(p){case"BigInt":return i([p,c.toString()],c);case"Boolean":case"Number":case"String":return i([p,c.valueOf()],c)}if(t&&"toJSON"in c)return a(c.toJSON());const h=[],x=i([d,h],c);for(const v of r3(c))(e||!Ta(_i(c[v])))&&h.push([a(v),a(c[v])]);return x}case Op:return i([d,c.toISOString()],c);case _p:{const{source:h,flags:x}=c;return i([d,{source:h,flags:x}],c)}case Mp:{const h=[],x=i([d,h],c);for(const[v,b]of c)(e||!(Ta(_i(v))||Ta(_i(b))))&&h.push([a(v),a(b)]);return x}case $p:{const h=[],x=i([d,h],c);for(const v of c)(e||!Ta(_i(v)))&&h.push(a(v));return x}}const{message:m}=c;return i([d,{name:p,message:m}],c)};return a},ty=(e,{json:t,lossy:n}={})=>{const o=[];return o3(!(t||n),!!t,new Map,o)(e),o},Ja=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ey(ty(e,t)):structuredClone(e):(e,t)=>ey(ty(e,t));function s3(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 i3(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function l3(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||s3,o=e.options.footnoteBackLabel||i3,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let p=-1;for(;++p<e.footnoteOrder.length;){const m=e.footnoteById.get(e.footnoteOrder[p]);if(!m)continue;const h=e.all(m),x=String(m.identifier).toUpperCase(),v=Us(x.toLowerCase());let b=0;const N=[],k=e.footnoteCounts.get(x);for(;k!==void 0&&++b<=k;){N.length>0&&N.push({type:"text",value:" "});let T=typeof n=="string"?n:n(p,b);typeof T=="string"&&(T={type:"text",value:T}),N.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+v+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof o=="string"?o:o(p,b),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}const j=h[h.length-1];if(j&&j.type==="element"&&j.tagName==="p"){const T=j.children[j.children.length-1];T&&T.type==="text"?T.value+=" ":j.children.push({type:"text",value:" "}),j.children.push(...N)}else h.push(...N);const S={type:"element",tagName:"li",properties:{id:t+"fn-"+v},children:e.wrap(h,!0)};e.patch(m,S),d.push(S)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Ja(c),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
448
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
|
|
449
|
-
`}]}}const Tb=(function(e){if(e==null)return d3;if(typeof e=="function")return Sc(e);if(typeof e=="object")return Array.isArray(e)?a3(e):c3(e);if(typeof e=="string")return u3(e);throw new Error("Expected function, string, or object as test")});function a3(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Tb(e[n]);return Sc(o);function o(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function c3(e){const t=e;return Sc(n);function n(o){const i=o;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function u3(e){return Sc(t);function t(n){return n&&n.type===e}}function Sc(e){return t;function t(n,o,i){return!!(f3(n)&&e.call(this,n,typeof o=="number"?o:void 0,i||void 0))}}function d3(){return!0}function f3(e){return e!==null&&typeof e=="object"&&"type"in e}const Ab=[],p3=!0,ny=!1,h3="skip";function m3(e,t,n,o){let i;typeof t=="function"&&typeof n!="function"?(o=n,n=t):i=t;const a=Tb(i),c=o?-1:1;d(e,void 0,[])();function d(p,m,h){const x=p&&typeof p=="object"?p:{};if(typeof x.type=="string"){const b=typeof x.tagName=="string"?x.tagName:typeof x.name=="string"?x.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(p.type+(b?"<"+b+">":""))+")"})}return v;function v(){let b=Ab,N,k,j;if((!t||a(p,m,h[h.length-1]||void 0))&&(b=g3(n(p,h)),b[0]===ny))return b;if("children"in p&&p.children){const S=p;if(S.children&&b[0]!==h3)for(k=(o?S.children.length:-1)+c,j=h.concat(S);k>-1&&k<S.children.length;){const T=S.children[k];if(N=d(T,k,j)(),N[0]===ny)return N;k=typeof N[1]=="number"?N[1]:k+c}}return b}}}function g3(e){return Array.isArray(e)?e:typeof e=="number"?[p3,e]:e==null?Ab:[e]}function Db(e,t,n,o){let i,a,c;typeof t=="function"&&typeof n!="function"?(a=void 0,c=t,i=n):(a=t,c=n,i=o),m3(e,a,d,i);function d(p,m){const h=m[m.length-1],x=h?h.children.indexOf(p):void 0;return c(p,x,h)}}const Df={}.hasOwnProperty,x3={};function y3(e,t){const n=t||x3,o=new Map,i=new Map,a=new Map,c={...e3,...n.handlers},d={all:m,applyData:b3,definitionById:o,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:c,one:p,options:n,patch:v3,wrap:k3};return Db(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const x=h.type==="definition"?o:i,v=String(h.identifier).toUpperCase();x.has(v)||x.set(v,h)}}),d;function p(h,x){const v=h.type,b=d.handlers[v];if(Df.call(d.handlers,v)&&b)return b(d,h,x);if(d.options.passThrough&&d.options.passThrough.includes(v)){if("children"in h){const{children:k,...j}=h,S=Ja(j);return S.children=d.all(h),S}return Ja(h)}return(d.options.unknownHandler||w3)(d,h,x)}function m(h){const x=[];if("children"in h){const v=h.children;let b=-1;for(;++b<v.length;){const N=d.one(v[b],h);if(N){if(b&&v[b-1].type==="break"&&(!Array.isArray(N)&&N.type==="text"&&(N.value=ry(N.value)),!Array.isArray(N)&&N.type==="element")){const k=N.children[0];k&&k.type==="text"&&(k.value=ry(k.value))}Array.isArray(N)?x.push(...N):x.push(N)}}}return x}}function v3(e,t){e.position&&(t.position=nP(e))}function b3(e,t){let n=t;if(e&&e.data){const o=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof o=="string")if(n.type==="element")n.tagName=o;else{const c="children"in n?n.children:[n];n={type:"element",tagName:o,properties:{},children:c}}n.type==="element"&&a&&Object.assign(n.properties,Ja(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function w3(e,t){const n=t.data||{},o="value"in t&&!(Df.call(n,"hProperties")||Df.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function k3(e,t){const n=[];let o=-1;for(t&&n.push({type:"text",value:`
|
|
450
|
-
`});++o<e.length;)o&&n.push({type:"text",value:`
|
|
451
|
-
`}),n.push(e[o]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
452
|
-
`}),n}function ry(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function oy(e,t){const n=y3(e,t),o=n.one(e,void 0),i=l3(n),a=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
|
|
453
|
-
`},i),a}function j3(e,t){return e&&"run"in e?async function(n,o){const i=oy(n,{file:o,...t});await e.run(i,o)}:function(n,o){return oy(n,{file:o,...e||t})}}function sy(e){if(e)throw e}var Vd,iy;function S3(){if(iy)return Vd;iy=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(m){return typeof Array.isArray=="function"?Array.isArray(m):t.call(m)==="[object Array]"},a=function(m){if(!m||t.call(m)!=="[object Object]")return!1;var h=e.call(m,"constructor"),x=m.constructor&&m.constructor.prototype&&e.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!h&&!x)return!1;var v;for(v in m);return typeof v>"u"||e.call(m,v)},c=function(m,h){n&&h.name==="__proto__"?n(m,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):m[h.name]=h.newValue},d=function(m,h){if(h==="__proto__")if(e.call(m,h)){if(o)return o(m,h).value}else return;return m[h]};return Vd=function p(){var m,h,x,v,b,N,k=arguments[0],j=1,S=arguments.length,T=!1;for(typeof k=="boolean"&&(T=k,k=arguments[1]||{},j=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});j<S;++j)if(m=arguments[j],m!=null)for(h in m)x=d(k,h),v=d(m,h),k!==v&&(T&&v&&(a(v)||(b=i(v)))?(b?(b=!1,N=x&&i(x)?x:[]):N=x&&a(x)?x:{},c(k,{name:h,newValue:p(T,N,v)})):typeof v<"u"&&c(k,{name:h,newValue:v}));return k},Vd}var C3=S3();const qd=lc(C3);function If(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 N3(){const e=[],t={run:n,use:o};return t;function n(...i){let a=-1;const c=i.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);d(null,...i);function d(p,...m){const h=e[++a];let x=-1;if(p){c(p);return}for(;++x<i.length;)(m[x]===null||m[x]===void 0)&&(m[x]=i[x]);i=m,h?E3(h,d)(...m):c(null,...m)}}function o(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function E3(e,t){let n;return o;function o(...c){const d=e.length>c.length;let p;d&&c.push(i);try{p=e.apply(this,c)}catch(m){const h=m;if(d&&n)throw h;return i(h)}d||(p&&p.then&&typeof p.then=="function"?p.then(a,i):p instanceof Error?i(p):a(p))}function i(c,...d){n||(n=!0,t(c,...d))}function a(c){i(null,c)}}const vr={basename:R3,dirname:P3,extname:T3,join:A3,sep:"/"};function R3(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ul(e);let n=0,o=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1);return o<0?"":e.slice(n,o)}if(t===e)return"";let c=-1,d=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else c<0&&(a=!0,c=i+1),d>-1&&(e.codePointAt(i)===t.codePointAt(d--)?d<0&&(o=i):(d=-1,o=c));return n===o?o=c:o<0&&(o=e.length),e.slice(n,o)}function P3(e){if(ul(e),e.length===0)return".";let t=-1,n=e.length,o;for(;--n;)if(e.codePointAt(n)===47){if(o){t=n;break}}else o||(o=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function T3(e){ul(e);let t=e.length,n=-1,o=0,i=-1,a=0,c;for(;t--;){const d=e.codePointAt(t);if(d===47){if(c){o=t+1;break}continue}n<0&&(c=!0,n=t+1),d===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===o+1?"":e.slice(i,n)}function A3(...e){let t=-1,n;for(;++t<e.length;)ul(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":D3(n)}function D3(e){ul(e);const t=e.codePointAt(0)===47;let n=I3(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function I3(e,t){let n="",o=0,i=-1,a=0,c=-1,d,p;for(;++c<=e.length;){if(c<e.length)d=e.codePointAt(c);else{if(d===47)break;d=47}if(d===47){if(!(i===c-1||a===1))if(i!==c-1&&a===2){if(n.length<2||o!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(p=n.lastIndexOf("/"),p!==n.length-1){p<0?(n="",o=0):(n=n.slice(0,p),o=n.length-1-n.lastIndexOf("/")),i=c,a=0;continue}}else if(n.length>0){n="",o=0,i=c,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",o=2)}else n.length>0?n+="/"+e.slice(i+1,c):n=e.slice(i+1,c),o=c-i-1;i=c,a=0}else d===46&&a>-1?a++:a=-1}return n}function ul(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const L3={cwd:O3};function O3(){return"/"}function Lf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function _3(e){if(typeof e=="string")e=new URL(e);else if(!Lf(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 M3(e)}function M3(e){if(e.hostname!==""){const o=new TypeError('File URL host must be "localhost" or empty on darwin');throw o.code="ERR_INVALID_FILE_URL_HOST",o}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const o=t.codePointAt(n+2);if(o===70||o===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Gd=["history","path","basename","stem","extname","dirname"];class Ib{constructor(t){let n;t?Lf(t)?n={path:t}:typeof t=="string"||$3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":L3.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<Gd.length;){const a=Gd[o];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)Gd.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?vr.basename(this.path):void 0}set basename(t){Yd(t,"basename"),Kd(t,"basename"),this.path=vr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?vr.dirname(this.path):void 0}set dirname(t){ly(this.basename,"dirname"),this.path=vr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?vr.extname(this.path):void 0}set extname(t){if(Kd(t,"extname"),ly(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=vr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Lf(t)&&(t=_3(t)),Yd(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?vr.basename(this.path,this.extname):void 0}set stem(t){Yd(t,"stem"),Kd(t,"stem"),this.path=vr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,o){const i=this.message(t,n,o);throw i.fatal=!0,i}info(t,n,o){const i=this.message(t,n,o);return i.fatal=void 0,i}message(t,n,o){const i=new an(t,n,o);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Kd(e,t){if(e&&e.includes(vr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+vr.sep+"`")}function Yd(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ly(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function $3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const F3=(function(e){const o=this.constructor.prototype,i=o[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,o),a}),z3={}.hasOwnProperty;class Fp extends F3{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=N3()}copy(){const t=new Fp;let n=-1;for(;++n<this.attachers.length;){const o=this.attachers[n];t.use(...o)}return t.data(qd(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Jd("data",this.frozen),this.namespace[t]=n,this):z3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Jd("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,...o]=this.attachers[this.freezeIndex];if(o[0]===!1)continue;o[0]===!0&&(o[0]=void 0);const i=n.call(t,...o);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Aa(t),o=this.parser||this.Parser;return Xd("parse",o),o(String(n),n)}process(t,n){const o=this;return this.freeze(),Xd("process",this.parser||this.Parser),Qd("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,c){const d=Aa(t),p=o.parse(d);o.run(p,d,function(h,x,v){if(h||!x||!v)return m(h);const b=x,N=o.stringify(b,v);H3(N)?v.value=N:v.result=N,m(h,v)});function m(h,x){h||!x?c(h):a?a(x):n(void 0,x)}}}processSync(t){let n=!1,o;return this.freeze(),Xd("processSync",this.parser||this.Parser),Qd("processSync",this.compiler||this.Compiler),this.process(t,i),cy("processSync","process",n),o;function i(a,c){n=!0,sy(a),o=c}}run(t,n,o){ay(t),this.freeze();const i=this.transformers;return!o&&typeof n=="function"&&(o=n,n=void 0),o?a(void 0,o):new Promise(a);function a(c,d){const p=Aa(n);i.run(t,p,m);function m(h,x,v){const b=x||t;h?d(h):c?c(b):o(void 0,b,v)}}}runSync(t,n){let o=!1,i;return this.run(t,n,a),cy("runSync","run",o),i;function a(c,d){sy(c),i=d,o=!0}}stringify(t,n){this.freeze();const o=Aa(n),i=this.compiler||this.Compiler;return Qd("stringify",i),ay(t),i(t,o)}use(t,...n){const o=this.attachers,i=this.namespace;if(Jd("use",this.frozen),t!=null)if(typeof t=="function")p(t,n);else if(typeof t=="object")Array.isArray(t)?d(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(m){if(typeof m=="function")p(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[h,...x]=m;p(h,x)}else c(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function c(m){if(!("plugins"in m)&&!("settings"in m))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");d(m.plugins),m.settings&&(i.settings=qd(!0,i.settings,m.settings))}function d(m){let h=-1;if(m!=null)if(Array.isArray(m))for(;++h<m.length;){const x=m[h];a(x)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function p(m,h){let x=-1,v=-1;for(;++x<o.length;)if(o[x][0]===m){v=x;break}if(v===-1)o.push([m,...h]);else if(h.length>0){let[b,...N]=h;const k=o[v][1];If(k)&&If(b)&&(b=qd(!0,k,b)),o[v]=[m,b,...N]}}}}const B3=new Fp().freeze();function Xd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Qd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Jd(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 ay(e){if(!If(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function cy(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Aa(e){return U3(e)?e:new Ib(e)}function U3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function H3(e){return typeof e=="string"||W3(e)}function W3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const V3="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",uy=[],dy={allowDangerousHtml:!0},q3=/^(https?|ircs?|mailto|xmpp)$/i,G3=[{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:"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 K3(e){const t=Y3(e),n=X3(e);return Q3(t.runSync(t.parse(n),n),e)}function Y3(e){const t=e.rehypePlugins||uy,n=e.remarkPlugins||uy,o=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...dy}:dy;return B3().use(RA).use(n).use(j3,o).use(t)}function X3(e){const t=e.children||"",n=new Ib;return typeof t=="string"&&(n.value=t),n}function Q3(e,t){const n=t.allowedElements,o=t.allowElement,i=t.components,a=t.disallowedElements,c=t.skipHtml,d=t.unwrapDisallowed,p=t.urlTransform||J3;for(const h of G3)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+V3+h.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),Db(e,m),lP(e,{Fragment:l.Fragment,components:i,ignoreInvalidStyle:!0,jsx:l.jsx,jsxs:l.jsxs,passKeys:!0,passNode:!0});function m(h,x,v){if(h.type==="raw"&&v&&typeof x=="number")return c?v.children.splice(x,1):v.children[x]={type:"text",value:h.value},x;if(h.type==="element"){let b;for(b in Ud)if(Object.hasOwn(Ud,b)&&Object.hasOwn(h.properties,b)){const N=h.properties[b],k=Ud[b];(k===null||k.includes(h.tagName))&&(h.properties[b]=p(String(N||""),b,h))}}if(h.type==="element"){let b=n?!n.includes(h.tagName):a?a.includes(h.tagName):!1;if(!b&&o&&typeof x=="number"&&(b=!o(h,x,v)),b&&v&&typeof x=="number")return d&&h.children?v.children.splice(x,1,...h.children):v.children.splice(x,1),x}}}function J3(e){const t=e.indexOf(":"),n=e.indexOf("?"),o=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||o!==-1&&t>o||q3.test(e.slice(0,t))?e:""}function Ut({content:e,className:t,emptyState:n="No markdown content yet."}){const o=e.replace(/<!--[\s\S]*?-->/g,"");return o.trim()?l.jsx("div",{className:$e("prose-syntaur max-w-none",t),children:l.jsx(K3,{children:o})}):l.jsx("div",{className:"rounded-md border border-dashed border-border/80 bg-muted/30 px-3 py-4 text-sm text-muted-foreground",children:n})}function fy(){const{slug:e}=St(),t=Rt(),n=Wt();zs("project"),vt({keys:"a",scope:"project",description:"Create assignment",handler:()=>n(`${t}/projects/${e}/create/assignment`)}),vt({keys:"e",scope:"project",description:"Edit project",handler:()=>n(`${t}/projects/${e}/edit`)});const{data:o,loading:i,error:a,refetch:c}=Wv(e),d=bc(),{data:p}=lp(),[m,h]=g.useState("overview"),[x,v]=g.useState("board"),[b,N]=g.useState("all"),[k,j]=g.useState("all"),[S,T]=g.useState("all"),A=g.useMemo(()=>o?Object.fromEntries(o.assignments.flatMap(E=>{const H=`${t}/projects/${o.slug}/assignments/${E.slug}`;return[[E.slug,H],[E.title,H]]})):{},[o]);async function L(E){await fetch(`/api/projects/${e}/status-override`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:E})}),c()}async function O(E){await fetch(`/api/projects/${e}/move-workspace`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace:E})}),c()}if(i)return l.jsx(bt,{label:"Loading project workspace…"});if(a||!o)return l.jsx(gt,{error:a||"Project not found."});const P=Array.from(new Set(o.assignments.map(E=>E.assignee).filter(Boolean))).sort(),$=o.assignments.filter(E=>!(b!=="all"&&E.status!==b||k!=="all"&&E.assignee!==k||S!=="all"&&E.priority!==S));return l.jsxs("div",{className:"space-y-5",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[l.jsx(Ht,{status:o.status}),o.statusOverride&&l.jsx("button",{type:"button",className:"shell-action border-amber-300 text-amber-700 dark:border-amber-700 dark:text-amber-300",onClick:()=>L(null),title:"Clear manual status override and return to derived status",children:"Clear Override"}),l.jsxs("select",{className:"shell-action appearance-none bg-transparent text-sm",value:"",onChange:E=>{E.target.value&&L(E.target.value)},title:"Override project status",children:[l.jsx("option",{value:"",children:"Set Status…"}),d.statuses.map(E=>l.jsx("option",{value:E.id,children:E.label},E.id)),l.jsx("option",{value:"active",children:"Active"})]}),p&&p.workspaces.length>0&&l.jsxs("select",{className:"shell-action appearance-none bg-transparent text-sm",value:"",onChange:E=>{E.target.value==="_ungrouped"?O(null):E.target.value&&O(E.target.value)},title:"Move project to a different workspace",children:[l.jsx("option",{value:"",children:"Move to Workspace…"}),p.workspaces.filter(E=>E!==o.workspace).map(E=>l.jsx("option",{value:E,children:E},E)),o.workspace&&l.jsx("option",{value:"_ungrouped",children:"Ungrouped"})]}),l.jsxs(Ce,{className:"shell-action",to:`${t}/projects/${o.slug}/edit`,children:[l.jsx(tx,{className:"h-4 w-4"}),l.jsx("span",{children:"Edit Project"})]}),l.jsxs(Ce,{className:"shell-action bg-foreground text-background hover:opacity-90",to:`${t}/projects/${o.slug}/create/assignment`,children:[l.jsx(Xn,{className:"h-4 w-4"}),l.jsx("span",{children:"New Assignment"})]}),l.jsxs("span",{className:"text-xs text-muted-foreground",children:["Created ",ko(o.created),". Last source update ",Cr(o.updated),"."]})]}),l.jsxs("div",{className:"grid gap-3 md:grid-cols-2 xl:grid-cols-5",children:[l.jsx(it,{label:"Assignments",value:o.progress.total}),l.jsx(it,{label:"In Progress",value:o.progress.in_progress??0,tone:"info"}),l.jsx(it,{label:"Review",value:o.progress.review??0,tone:"info"}),l.jsx(it,{label:"Blocked",value:o.progress.blocked??0,tone:"warn"}),l.jsx(it,{label:"Completed",value:o.progress.completed??0,tone:"success"})]}),l.jsxs("div",{className:"grid gap-4 xl:grid-cols-[minmax(0,1fr)_280px]",children:[l.jsx("div",{className:"space-y-4",children:l.jsx(Cp,{value:m,onValueChange:h,items:[{value:"overview",label:"Overview",content:l.jsx("div",{className:"space-y-5",children:l.jsx(Pe,{title:"Project Overview",children:l.jsx(Ut,{content:o.body,emptyState:"This project does not have overview content yet."})})})},{value:"assignments",label:"Assignments",count:o.assignments.length,content:l.jsx("div",{className:"space-y-5",children:l.jsx(Pe,{title:"Assignment Queue",description:"Board and table views over the source assignment files.",actions:l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsxs("select",{value:b,onChange:E=>N(E.target.value),className:"editor-input max-w-[170px]",children:[l.jsx("option",{value:"all",children:"All statuses"}),d.statuses.map(E=>l.jsx("option",{value:E.id,children:E.label},E.id))]}),l.jsxs("select",{value:k,onChange:E=>j(E.target.value),className:"editor-input max-w-[170px]",children:[l.jsx("option",{value:"all",children:"All assignees"}),P.map(E=>l.jsx("option",{value:E??"",children:E},E))]}),l.jsxs("select",{value:S,onChange:E=>T(E.target.value),className:"editor-input max-w-[170px]",children:[l.jsx("option",{value:"all",children:"All priorities"}),l.jsx("option",{value:"low",children:"Low"}),l.jsx("option",{value:"medium",children:"Medium"}),l.jsx("option",{value:"high",children:"High"}),l.jsx("option",{value:"critical",children:"Critical"})]}),l.jsx(kp,{value:x,onChange:E=>v(E),options:[{value:"board",label:"Board"},{value:"table",label:"Table"}]})]}),children:$.length===0?l.jsx(Ke,{title:"No assignments match these filters",description:"Clear the current filters or create a new assignment for this project.",actions:l.jsx(Ce,{className:"shell-action bg-foreground text-background hover:opacity-90",to:`${t}/projects/${o.slug}/create/assignment`,children:"Create Assignment"})}):x==="board"?l.jsx("div",{className:"grid gap-3 lg:grid-cols-2",children:$.map(E=>l.jsx(Z3,{projectSlug:o.slug,assignment:E},E.slug))}):l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full min-w-[720px] text-left text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"border-b border-border/60 text-muted-foreground",children:[l.jsx("th",{className:"pb-3 font-medium",children:"Assignment"}),l.jsx("th",{className:"pb-3 font-medium",children:"Status"}),l.jsx("th",{className:"pb-3 font-medium",children:"Priority"}),l.jsx("th",{className:"pb-3 font-medium",children:"Assignee"}),l.jsx("th",{className:"pb-3 font-medium",children:"Updated"})]})}),l.jsx("tbody",{children:$.map(E=>l.jsxs("tr",{className:"border-b border-border/50 last:border-0",children:[l.jsx("td",{className:"py-4",children:l.jsx(Ce,{to:`${t}/projects/${o.slug}/assignments/${E.slug}`,className:"font-semibold text-foreground hover:text-primary",children:E.title})}),l.jsx("td",{className:"py-4",children:l.jsx(Ht,{status:E.status})}),l.jsx("td",{className:"py-4 capitalize text-muted-foreground",children:E.priority}),l.jsx("td",{className:"py-4 text-muted-foreground",children:E.assignee??"—"}),l.jsx("td",{className:"py-4 text-muted-foreground",children:ko(E.updated)})]},E.slug))})]})})})})},{value:"dependencies",label:"Dependencies",content:o.dependencyGraph?l.jsx(Pe,{title:"Dependency Graph",description:"Rendered from the derived graph when available, with a source-based fallback.",children:l.jsx(AR,{definition:o.dependencyGraph,nodeRoutes:A})}):l.jsx(Ke,{title:"No dependency graph yet",description:"Dependencies appear here once assignments declare dependsOn relationships."})},{value:"knowledge",label:"Knowledge",content:l.jsxs("div",{className:"grid gap-3 lg:grid-cols-2",children:[l.jsx(Pe,{title:"Resources",description:"Shared project references.",children:o.resources.length===0?l.jsx(Ke,{title:"No resources yet",description:"Resources live at the project level and stay available to every assignment."}):l.jsx("div",{className:"space-y-3",children:o.resources.map(E=>l.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:E.name}),l.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:[E.category," · ",E.source]})]},E.slug))})}),l.jsx(Pe,{title:"Memories",description:"Learnings and patterns captured during the project.",children:o.memories.length===0?l.jsx(Ke,{title:"No memories yet",description:"Memories capture patterns discovered during execution so later assignments can reuse them."}):l.jsx("div",{className:"space-y-3",children:o.memories.map(E=>l.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:E.name}),l.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:[E.scope," · ",E.source]})]},E.slug))})})]})}]})}),l.jsxs("div",{className:"space-y-5",children:[l.jsx(Pe,{title:"Progress Summary",children:l.jsx(Xa,{progress:o.progress,showLegend:!0})}),l.jsx(Pe,{title:"Attention",children:l.jsxs("dl",{className:"space-y-3 text-sm",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("dt",{className:"text-muted-foreground",children:"Blocked"}),l.jsx("dd",{className:"font-semibold text-foreground",children:o.needsAttention.blockedCount})]}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("dt",{className:"text-muted-foreground",children:"Failed"}),l.jsx("dd",{className:"font-semibold text-foreground",children:o.needsAttention.failedCount})]}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("dt",{className:"text-muted-foreground",children:"Unanswered questions"}),l.jsx("dd",{className:"font-semibold text-foreground",children:o.needsAttention.openQuestions})]})]})}),l.jsx(Pe,{title:"Quick Links",children:l.jsxs("div",{className:"space-y-2 text-sm",children:[l.jsxs(Ce,{className:"flex items-center gap-2 text-primary hover:underline",to:`${t}/projects/${o.slug}/edit`,children:[l.jsx(tx,{className:"h-4 w-4"}),"Edit project source"]}),l.jsxs(Ce,{className:"flex items-center gap-2 text-primary hover:underline",to:`${t}/projects/${o.slug}/create/assignment`,children:[l.jsx(Xn,{className:"h-4 w-4"}),"Create assignment"]}),l.jsxs(Ce,{className:"flex items-center gap-2 text-primary hover:underline",to:"/help",children:[l.jsx(ZS,{className:"h-4 w-4"}),"Review project rules"]}),l.jsxs("button",{type:"button",onClick:()=>h("dependencies"),className:"flex items-center gap-2 text-primary hover:underline",children:[l.jsx(kv,{className:"h-4 w-4"}),"Jump to dependencies"]})]})}),o.archived?l.jsxs(Pe,{title:"Archive Metadata",children:[l.jsxs("p",{className:"text-sm leading-6 text-muted-foreground",children:["Archived ",o.archivedAt?Cr(o.archivedAt):"with no timestamp recorded","."]}),o.archivedReason?l.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:o.archivedReason}):null]}):null]})]})]})}function Z3({projectSlug:e,assignment:t}){const n=Rt();return l.jsxs(Ce,{to:`${n}/projects/${e}/assignments/${t.slug}`,className:"block rounded-lg border border-border/60 bg-background/80 p-3 transition hover:border-primary/40",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:t.title}),l.jsxs("p",{className:"inline-flex items-center gap-1.5 font-mono text-xs text-muted-foreground/70",title:t.id,children:[t.id.slice(0,8),l.jsx("span",{onClick:o=>{o.preventDefault(),o.stopPropagation()},children:l.jsx(Hr,{value:t.id})})]}),l.jsxs("p",{className:"text-sm text-muted-foreground",children:["Updated ",ko(t.updated)]})]}),l.jsx(Ht,{status:t.status})]}),l.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[l.jsx("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs capitalize text-muted-foreground",children:t.priority}),l.jsx("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:t.assignee??"Unassigned"}),l.jsxs("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:[t.dependsOn.length," dependencies"]})]})]})}function Lb({open:e,action:t,assignmentTitle:n,loading:o=!1,onConfirm:i,onOpenChange:a}){const[c,d]=g.useState("");g.useEffect(()=>{e||d("")},[e,t==null?void 0:t.command]);const p=g.useMemo(()=>t&&t.command==="block"?"Blocked Reason":"Reason",[t]);if(!t)return null;const m=`${t.label} "${n}"`,h=o?"Applying...":t.label,x=c.trim()||void 0;return l.jsx(vp,{open:e,onOpenChange:v=>o?void 0:a(v),children:l.jsx(gc,{className:"max-w-xl",children:l.jsxs("form",{className:"space-y-5",onSubmit:v=>{v.preventDefault(),i(x)},children:[l.jsxs(vE,{children:[l.jsx(xc,{children:m}),l.jsx(bp,{children:t.description})]}),t.warning?l.jsx("div",{className:"rounded-lg border border-amber-300/80 bg-amber-50/80 px-4 py-3 text-sm text-amber-900 dark:border-amber-800 dark:bg-amber-950/30 dark:text-amber-200",children:t.warning}):null,l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"block text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground",children:p}),l.jsx("textarea",{value:c,onChange:v=>d(v.target.value),autoFocus:!0,rows:4,disabled:o,placeholder:"Optional context for why this assignment is blocked.",className:"editor-textarea min-h-[120px] bg-background/95 font-sans"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Leave this blank to continue without a written reason."})]}),l.jsxs(bE,{children:[l.jsx("button",{type:"button",onClick:()=>a(!1),disabled:o,className:"shell-action disabled:cursor-not-allowed disabled:opacity-50",children:"Cancel"}),l.jsx("button",{type:"submit",disabled:o,className:"shell-action bg-foreground text-background hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",children:h})]})]})})})}var e4=Symbol("radix.slottable");function t4(e){const t=({children:n})=>l.jsx(l.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=e4,t}var Ob="AlertDialog",[n4]=Vo(Ob,[f0]),Gr=f0(),_b=e=>{const{__scopeAlertDialog:t,...n}=e,o=Gr(t);return l.jsx(R0,{...o,...n,modal:!0})};_b.displayName=Ob;var r4="AlertDialogTrigger",o4=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Gr(n);return l.jsx(xE,{...i,...o,ref:t})});o4.displayName=r4;var s4="AlertDialogPortal",Mb=e=>{const{__scopeAlertDialog:t,...n}=e,o=Gr(t);return l.jsx(P0,{...o,...n})};Mb.displayName=s4;var i4="AlertDialogOverlay",$b=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Gr(n);return l.jsx(mp,{...i,...o,ref:t})});$b.displayName=i4;var Ps="AlertDialogContent",[l4,a4]=n4(Ps),c4=t4("AlertDialogContent"),Fb=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:o,...i}=e,a=Gr(n),c=g.useRef(null),d=ln(t,c),p=g.useRef(null);return l.jsx(pE,{contentName:Ps,titleName:zb,docsSlug:"alert-dialog",children:l.jsx(l4,{scope:n,cancelRef:p,children:l.jsxs(gp,{role:"alertdialog",...a,...i,ref:d,onOpenAutoFocus:ct(i.onOpenAutoFocus,m=>{var h;m.preventDefault(),(h=p.current)==null||h.focus({preventScroll:!0})}),onPointerDownOutside:m=>m.preventDefault(),onInteractOutside:m=>m.preventDefault(),children:[l.jsx(c4,{children:o}),l.jsx(d4,{contentRef:c})]})})})});Fb.displayName=Ps;var zb="AlertDialogTitle",Bb=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Gr(n);return l.jsx(xp,{...i,...o,ref:t})});Bb.displayName=zb;var Ub="AlertDialogDescription",Hb=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Gr(n);return l.jsx(yp,{...i,...o,ref:t})});Hb.displayName=Ub;var u4="AlertDialogAction",Wb=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Gr(n);return l.jsx(T0,{...i,...o,ref:t})});Wb.displayName=u4;var Vb="AlertDialogCancel",qb=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,{cancelRef:i}=a4(Vb,n),a=Gr(n),c=ln(t,i);return l.jsx(T0,{...a,...o,ref:c})});qb.displayName=Vb;var d4=({contentRef:e})=>{const t=`\`${Ps}\` requires a description for the component to be accessible for screen reader users.
|
|
454
|
-
|
|
455
|
-
You can add a description to the \`${Ps}\` by passing a \`${Ub}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
456
|
-
|
|
457
|
-
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Ps}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
458
|
-
|
|
459
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return g.useEffect(()=>{var o;document.getElementById((o=e.current)==null?void 0:o.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},f4=_b,p4=Mb,Gb=$b,Kb=Fb,Yb=Wb,Xb=qb,Qb=Bb,Jb=Hb;const h4=f4,m4=p4,Zb=g.forwardRef(({className:e,...t},n)=>l.jsx(Gb,{ref:n,className:$e("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm",e),...t}));Zb.displayName=Gb.displayName;const ew=g.forwardRef(({className:e,...t},n)=>l.jsxs(m4,{children:[l.jsx(Zb,{}),l.jsx(Kb,{ref:n,className:$e("fixed left-1/2 top-1/2 z-50 grid w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl border border-border/70 bg-card p-6 shadow-2xl outline-none",e),...t})]}));ew.displayName=Kb.displayName;function g4({className:e,...t}){return l.jsx("div",{className:$e("flex flex-col space-y-2 text-left",e),...t})}function x4({className:e,...t}){return l.jsx("div",{className:$e("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}const tw=g.forwardRef(({className:e,...t},n)=>l.jsx(Qb,{ref:n,className:$e("text-lg font-semibold tracking-tight text-foreground",e),...t}));tw.displayName=Qb.displayName;const nw=g.forwardRef(({className:e,...t},n)=>l.jsx(Jb,{ref:n,className:$e("text-sm leading-6 text-muted-foreground",e),...t}));nw.displayName=Jb.displayName;const rw=g.forwardRef(({className:e,...t},n)=>l.jsx(Yb,{ref:n,className:$e(e),...t}));rw.displayName=Yb.displayName;const ow=g.forwardRef(({className:e,...t},n)=>l.jsx(Xb,{ref:n,className:$e(e),...t}));ow.displayName=Xb.displayName;function sw({open:e,title:t,description:n,confirmLabel:o,cancelLabel:i="Cancel",loading:a=!1,destructive:c=!1,onConfirm:d,onOpenChange:p}){return l.jsx(h4,{open:e,onOpenChange:m=>a?void 0:p(m),children:l.jsxs(ew,{children:[l.jsxs(g4,{children:[l.jsx(tw,{children:t}),l.jsx(nw,{children:n})]}),l.jsxs(x4,{children:[l.jsx(ow,{disabled:a,className:"shell-action mt-0 disabled:cursor-not-allowed disabled:opacity-50",children:i}),l.jsx(rw,{disabled:a,className:`shell-action mt-0 disabled:cursor-not-allowed disabled:opacity-50 ${c?"border-destructive/80 bg-destructive text-destructive-foreground hover:bg-destructive/90":"bg-foreground text-background hover:opacity-90"}`,onClick:m=>{m.preventDefault(),d()},children:a?"Working...":o})]})]})})}const y4=["top","right","bottom","left"],So=Math.min,Mn=Math.max,Za=Math.round,Da=Math.floor,Nr=e=>({x:e,y:e}),v4={left:"right",right:"left",bottom:"top",top:"bottom"};function Of(e,t,n){return Mn(e,So(t,n))}function Vr(e,t){return typeof e=="function"?e(t):e}function qr(e){return e.split("-")[0]}function Hs(e){return e.split("-")[1]}function zp(e){return e==="x"?"y":"x"}function Bp(e){return e==="y"?"height":"width"}function kr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Up(e){return zp(kr(e))}function b4(e,t,n){n===void 0&&(n=!1);const o=Hs(e),i=Up(e),a=Bp(i);let c=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(c=ec(c)),[c,ec(c)]}function w4(e){const t=ec(e);return[_f(e),t,_f(t)]}function _f(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const py=["left","right"],hy=["right","left"],k4=["top","bottom"],j4=["bottom","top"];function S4(e,t,n){switch(e){case"top":case"bottom":return n?t?hy:py:t?py:hy;case"left":case"right":return t?k4:j4;default:return[]}}function C4(e,t,n,o){const i=Hs(e);let a=S4(qr(e),n==="start",o);return i&&(a=a.map(c=>c+"-"+i),t&&(a=a.concat(a.map(_f)))),a}function ec(e){const t=qr(e);return v4[t]+e.slice(t.length)}function N4(e){return{top:0,right:0,bottom:0,left:0,...e}}function iw(e){return typeof e!="number"?N4(e):{top:e,right:e,bottom:e,left:e}}function tc(e){const{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function my(e,t,n){let{reference:o,floating:i}=e;const a=kr(t),c=Up(t),d=Bp(c),p=qr(t),m=a==="y",h=o.x+o.width/2-i.width/2,x=o.y+o.height/2-i.height/2,v=o[d]/2-i[d]/2;let b;switch(p){case"top":b={x:h,y:o.y-i.height};break;case"bottom":b={x:h,y:o.y+o.height};break;case"right":b={x:o.x+o.width,y:x};break;case"left":b={x:o.x-i.width,y:x};break;default:b={x:o.x,y:o.y}}switch(Hs(t)){case"start":b[c]-=v*(n&&m?-1:1);break;case"end":b[c]+=v*(n&&m?-1:1);break}return b}async function E4(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:a,rects:c,elements:d,strategy:p}=e,{boundary:m="clippingAncestors",rootBoundary:h="viewport",elementContext:x="floating",altBoundary:v=!1,padding:b=0}=Vr(t,e),N=iw(b),j=d[v?x==="floating"?"reference":"floating":x],S=tc(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(j)))==null||n?j:j.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(d.floating)),boundary:m,rootBoundary:h,strategy:p})),T=x==="floating"?{x:o,y:i,width:c.floating.width,height:c.floating.height}:c.reference,A=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d.floating)),L=await(a.isElement==null?void 0:a.isElement(A))?await(a.getScale==null?void 0:a.getScale(A))||{x:1,y:1}:{x:1,y:1},O=tc(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:T,offsetParent:A,strategy:p}):T);return{top:(S.top-O.top+N.top)/L.y,bottom:(O.bottom-S.bottom+N.bottom)/L.y,left:(S.left-O.left+N.left)/L.x,right:(O.right-S.right+N.right)/L.x}}const R4=50,P4=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:a=[],platform:c}=n,d=c.detectOverflow?c:{...c,detectOverflow:E4},p=await(c.isRTL==null?void 0:c.isRTL(t));let m=await c.getElementRects({reference:e,floating:t,strategy:i}),{x:h,y:x}=my(m,o,p),v=o,b=0;const N={};for(let k=0;k<a.length;k++){const j=a[k];if(!j)continue;const{name:S,fn:T}=j,{x:A,y:L,data:O,reset:P}=await T({x:h,y:x,initialPlacement:o,placement:v,strategy:i,middlewareData:N,rects:m,platform:d,elements:{reference:e,floating:t}});h=A??h,x=L??x,N[S]={...N[S],...O},P&&b<R4&&(b++,typeof P=="object"&&(P.placement&&(v=P.placement),P.rects&&(m=P.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:i}):P.rects),{x:h,y:x}=my(m,v,p)),k=-1)}return{x:h,y:x,placement:v,strategy:i,middlewareData:N}},T4=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:a,platform:c,elements:d,middlewareData:p}=t,{element:m,padding:h=0}=Vr(e,t)||{};if(m==null)return{};const x=iw(h),v={x:n,y:o},b=Up(i),N=Bp(b),k=await c.getDimensions(m),j=b==="y",S=j?"top":"left",T=j?"bottom":"right",A=j?"clientHeight":"clientWidth",L=a.reference[N]+a.reference[b]-v[b]-a.floating[N],O=v[b]-a.reference[b],P=await(c.getOffsetParent==null?void 0:c.getOffsetParent(m));let $=P?P[A]:0;(!$||!await(c.isElement==null?void 0:c.isElement(P)))&&($=d.floating[A]||a.floating[N]);const E=L/2-O/2,H=$/2-k[N]/2-1,Z=So(x[S],H),K=So(x[T],H),q=Z,Y=$-k[N]-K,X=$/2-k[N]/2+E,_=Of(q,X,Y),D=!p.arrow&&Hs(i)!=null&&X!==_&&a.reference[N]/2-(X<q?Z:K)-k[N]/2<0,V=D?X<q?X-q:X-Y:0;return{[b]:v[b]+V,data:{[b]:_,centerOffset:X-_-V,...D&&{alignmentOffset:V}},reset:D}}}),A4=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:a,rects:c,initialPlacement:d,platform:p,elements:m}=t,{mainAxis:h=!0,crossAxis:x=!0,fallbackPlacements:v,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:N="none",flipAlignment:k=!0,...j}=Vr(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const S=qr(i),T=kr(d),A=qr(d)===d,L=await(p.isRTL==null?void 0:p.isRTL(m.floating)),O=v||(A||!k?[ec(d)]:w4(d)),P=N!=="none";!v&&P&&O.push(...C4(d,k,N,L));const $=[d,...O],E=await p.detectOverflow(t,j),H=[];let Z=((o=a.flip)==null?void 0:o.overflows)||[];if(h&&H.push(E[S]),x){const X=b4(i,c,L);H.push(E[X[0]],E[X[1]])}if(Z=[...Z,{placement:i,overflows:H}],!H.every(X=>X<=0)){var K,q;const X=(((K=a.flip)==null?void 0:K.index)||0)+1,_=$[X];if(_&&(!(x==="alignment"?T!==kr(_):!1)||Z.every(W=>kr(W.placement)===T?W.overflows[0]>0:!0)))return{data:{index:X,overflows:Z},reset:{placement:_}};let D=(q=Z.filter(V=>V.overflows[0]<=0).sort((V,W)=>V.overflows[1]-W.overflows[1])[0])==null?void 0:q.placement;if(!D)switch(b){case"bestFit":{var Y;const V=(Y=Z.filter(W=>{if(P){const ee=kr(W.placement);return ee===T||ee==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(ee=>ee>0).reduce((ee,R)=>ee+R,0)]).sort((W,ee)=>W[1]-ee[1])[0])==null?void 0:Y[0];V&&(D=V);break}case"initialPlacement":D=d;break}if(i!==D)return{reset:{placement:D}}}return{}}}};function gy(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function xy(e){return y4.some(t=>e[t]>=0)}const D4=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:o}=t,{strategy:i="referenceHidden",...a}=Vr(e,t);switch(i){case"referenceHidden":{const c=await o.detectOverflow(t,{...a,elementContext:"reference"}),d=gy(c,n.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:xy(d)}}}case"escaped":{const c=await o.detectOverflow(t,{...a,altBoundary:!0}),d=gy(c,n.floating);return{data:{escapedOffsets:d,escaped:xy(d)}}}default:return{}}}}},lw=new Set(["left","top"]);async function I4(e,t){const{placement:n,platform:o,elements:i}=e,a=await(o.isRTL==null?void 0:o.isRTL(i.floating)),c=qr(n),d=Hs(n),p=kr(n)==="y",m=lw.has(c)?-1:1,h=a&&p?-1:1,x=Vr(t,e);let{mainAxis:v,crossAxis:b,alignmentAxis:N}=typeof x=="number"?{mainAxis:x,crossAxis:0,alignmentAxis:null}:{mainAxis:x.mainAxis||0,crossAxis:x.crossAxis||0,alignmentAxis:x.alignmentAxis};return d&&typeof N=="number"&&(b=d==="end"?N*-1:N),p?{x:b*h,y:v*m}:{x:v*m,y:b*h}}const L4=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:a,placement:c,middlewareData:d}=t,p=await I4(t,e);return c===((n=d.offset)==null?void 0:n.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:i+p.x,y:a+p.y,data:{...p,placement:c}}}}},O4=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i,platform:a}=t,{mainAxis:c=!0,crossAxis:d=!1,limiter:p={fn:S=>{let{x:T,y:A}=S;return{x:T,y:A}}},...m}=Vr(e,t),h={x:n,y:o},x=await a.detectOverflow(t,m),v=kr(qr(i)),b=zp(v);let N=h[b],k=h[v];if(c){const S=b==="y"?"top":"left",T=b==="y"?"bottom":"right",A=N+x[S],L=N-x[T];N=Of(A,N,L)}if(d){const S=v==="y"?"top":"left",T=v==="y"?"bottom":"right",A=k+x[S],L=k-x[T];k=Of(A,k,L)}const j=p.fn({...t,[b]:N,[v]:k});return{...j,data:{x:j.x-n,y:j.y-o,enabled:{[b]:c,[v]:d}}}}}},_4=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:i,rects:a,middlewareData:c}=t,{offset:d=0,mainAxis:p=!0,crossAxis:m=!0}=Vr(e,t),h={x:n,y:o},x=kr(i),v=zp(x);let b=h[v],N=h[x];const k=Vr(d,t),j=typeof k=="number"?{mainAxis:k,crossAxis:0}:{mainAxis:0,crossAxis:0,...k};if(p){const A=v==="y"?"height":"width",L=a.reference[v]-a.floating[A]+j.mainAxis,O=a.reference[v]+a.reference[A]-j.mainAxis;b<L?b=L:b>O&&(b=O)}if(m){var S,T;const A=v==="y"?"width":"height",L=lw.has(qr(i)),O=a.reference[x]-a.floating[A]+(L&&((S=c.offset)==null?void 0:S[x])||0)+(L?0:j.crossAxis),P=a.reference[x]+a.reference[A]+(L?0:((T=c.offset)==null?void 0:T[x])||0)-(L?j.crossAxis:0);N<O?N=O:N>P&&(N=P)}return{[v]:b,[x]:N}}}},M4=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:i,rects:a,platform:c,elements:d}=t,{apply:p=()=>{},...m}=Vr(e,t),h=await c.detectOverflow(t,m),x=qr(i),v=Hs(i),b=kr(i)==="y",{width:N,height:k}=a.floating;let j,S;x==="top"||x==="bottom"?(j=x,S=v===(await(c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(S=x,j=v==="end"?"top":"bottom");const T=k-h.top-h.bottom,A=N-h.left-h.right,L=So(k-h[j],T),O=So(N-h[S],A),P=!t.middlewareData.shift;let $=L,E=O;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(E=A),(o=t.middlewareData.shift)!=null&&o.enabled.y&&($=T),P&&!v){const Z=Mn(h.left,0),K=Mn(h.right,0),q=Mn(h.top,0),Y=Mn(h.bottom,0);b?E=N-2*(Z!==0||K!==0?Z+K:Mn(h.left,h.right)):$=k-2*(q!==0||Y!==0?q+Y:Mn(h.top,h.bottom))}await p({...t,availableWidth:E,availableHeight:$});const H=await c.getDimensions(d.floating);return N!==H.width||k!==H.height?{reset:{rects:!0}}:{}}}};function Cc(){return typeof window<"u"}function Ws(e){return aw(e)?(e.nodeName||"").toLowerCase():"#document"}function Fn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Pr(e){var t;return(t=(aw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function aw(e){return Cc()?e instanceof Node||e instanceof Fn(e).Node:!1}function ar(e){return Cc()?e instanceof Element||e instanceof Fn(e).Element:!1}function Kr(e){return Cc()?e instanceof HTMLElement||e instanceof Fn(e).HTMLElement:!1}function yy(e){return!Cc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Fn(e).ShadowRoot}function dl(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=cr(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&i!=="inline"&&i!=="contents"}function $4(e){return/^(table|td|th)$/.test(Ws(e))}function Nc(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const F4=/transform|translate|scale|rotate|perspective|filter/,z4=/paint|layout|strict|content/,zo=e=>!!e&&e!=="none";let Zd;function Hp(e){const t=ar(e)?cr(e):e;return zo(t.transform)||zo(t.translate)||zo(t.scale)||zo(t.rotate)||zo(t.perspective)||!Wp()&&(zo(t.backdropFilter)||zo(t.filter))||F4.test(t.willChange||"")||z4.test(t.contain||"")}function B4(e){let t=Co(e);for(;Kr(t)&&!Ds(t);){if(Hp(t))return t;if(Nc(t))return null;t=Co(t)}return null}function Wp(){return Zd==null&&(Zd=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Zd}function Ds(e){return/^(html|body|#document)$/.test(Ws(e))}function cr(e){return Fn(e).getComputedStyle(e)}function Ec(e){return ar(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Co(e){if(Ws(e)==="html")return e;const t=e.assignedSlot||e.parentNode||yy(e)&&e.host||Pr(e);return yy(t)?t.host:t}function cw(e){const t=Co(e);return Ds(t)?e.ownerDocument?e.ownerDocument.body:e.body:Kr(t)&&dl(t)?t:cw(t)}function Ji(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=cw(e),a=i===((o=e.ownerDocument)==null?void 0:o.body),c=Fn(i);if(a){const d=Mf(c);return t.concat(c,c.visualViewport||[],dl(i)?i:[],d&&n?Ji(d):[])}else return t.concat(i,Ji(i,[],n))}function Mf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function uw(e){const t=cr(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=Kr(e),a=i?e.offsetWidth:n,c=i?e.offsetHeight:o,d=Za(n)!==a||Za(o)!==c;return d&&(n=a,o=c),{width:n,height:o,$:d}}function Vp(e){return ar(e)?e:e.contextElement}function Ts(e){const t=Vp(e);if(!Kr(t))return Nr(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:a}=uw(t);let c=(a?Za(n.width):n.width)/o,d=(a?Za(n.height):n.height)/i;return(!c||!Number.isFinite(c))&&(c=1),(!d||!Number.isFinite(d))&&(d=1),{x:c,y:d}}const U4=Nr(0);function dw(e){const t=Fn(e);return!Wp()||!t.visualViewport?U4:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function H4(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Fn(e)?!1:t}function Wo(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=Vp(e);let c=Nr(1);t&&(o?ar(o)&&(c=Ts(o)):c=Ts(e));const d=H4(a,n,o)?dw(a):Nr(0);let p=(i.left+d.x)/c.x,m=(i.top+d.y)/c.y,h=i.width/c.x,x=i.height/c.y;if(a){const v=Fn(a),b=o&&ar(o)?Fn(o):o;let N=v,k=Mf(N);for(;k&&o&&b!==N;){const j=Ts(k),S=k.getBoundingClientRect(),T=cr(k),A=S.left+(k.clientLeft+parseFloat(T.paddingLeft))*j.x,L=S.top+(k.clientTop+parseFloat(T.paddingTop))*j.y;p*=j.x,m*=j.y,h*=j.x,x*=j.y,p+=A,m+=L,N=Fn(k),k=Mf(N)}}return tc({width:h,height:x,x:p,y:m})}function Rc(e,t){const n=Ec(e).scrollLeft;return t?t.left+n:Wo(Pr(e)).left+n}function fw(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Rc(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function W4(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const a=i==="fixed",c=Pr(o),d=t?Nc(t.floating):!1;if(o===c||d&&a)return n;let p={scrollLeft:0,scrollTop:0},m=Nr(1);const h=Nr(0),x=Kr(o);if((x||!x&&!a)&&((Ws(o)!=="body"||dl(c))&&(p=Ec(o)),x)){const b=Wo(o);m=Ts(o),h.x=b.x+o.clientLeft,h.y=b.y+o.clientTop}const v=c&&!x&&!a?fw(c,p):Nr(0);return{width:n.width*m.x,height:n.height*m.y,x:n.x*m.x-p.scrollLeft*m.x+h.x+v.x,y:n.y*m.y-p.scrollTop*m.y+h.y+v.y}}function V4(e){return Array.from(e.getClientRects())}function q4(e){const t=Pr(e),n=Ec(e),o=e.ownerDocument.body,i=Mn(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=Mn(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let c=-n.scrollLeft+Rc(e);const d=-n.scrollTop;return cr(o).direction==="rtl"&&(c+=Mn(t.clientWidth,o.clientWidth)-i),{width:i,height:a,x:c,y:d}}const vy=25;function G4(e,t){const n=Fn(e),o=Pr(e),i=n.visualViewport;let a=o.clientWidth,c=o.clientHeight,d=0,p=0;if(i){a=i.width,c=i.height;const h=Wp();(!h||h&&t==="fixed")&&(d=i.offsetLeft,p=i.offsetTop)}const m=Rc(o);if(m<=0){const h=o.ownerDocument,x=h.body,v=getComputedStyle(x),b=h.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,N=Math.abs(o.clientWidth-x.clientWidth-b);N<=vy&&(a-=N)}else m<=vy&&(a+=m);return{width:a,height:c,x:d,y:p}}function K4(e,t){const n=Wo(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,a=Kr(e)?Ts(e):Nr(1),c=e.clientWidth*a.x,d=e.clientHeight*a.y,p=i*a.x,m=o*a.y;return{width:c,height:d,x:p,y:m}}function by(e,t,n){let o;if(t==="viewport")o=G4(e,n);else if(t==="document")o=q4(Pr(e));else if(ar(t))o=K4(t,n);else{const i=dw(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return tc(o)}function pw(e,t){const n=Co(e);return n===t||!ar(n)||Ds(n)?!1:cr(n).position==="fixed"||pw(n,t)}function Y4(e,t){const n=t.get(e);if(n)return n;let o=Ji(e,[],!1).filter(d=>ar(d)&&Ws(d)!=="body"),i=null;const a=cr(e).position==="fixed";let c=a?Co(e):e;for(;ar(c)&&!Ds(c);){const d=cr(c),p=Hp(c);!p&&d.position==="fixed"&&(i=null),(a?!p&&!i:!p&&d.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||dl(c)&&!p&&pw(e,c))?o=o.filter(h=>h!==c):i=d,c=Co(c)}return t.set(e,o),o}function X4(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const c=[...n==="clippingAncestors"?Nc(t)?[]:Y4(t,this._c):[].concat(n),o],d=by(t,c[0],i);let p=d.top,m=d.right,h=d.bottom,x=d.left;for(let v=1;v<c.length;v++){const b=by(t,c[v],i);p=Mn(b.top,p),m=So(b.right,m),h=So(b.bottom,h),x=Mn(b.left,x)}return{width:m-x,height:h-p,x,y:p}}function Q4(e){const{width:t,height:n}=uw(e);return{width:t,height:n}}function J4(e,t,n){const o=Kr(t),i=Pr(t),a=n==="fixed",c=Wo(e,!0,a,t);let d={scrollLeft:0,scrollTop:0};const p=Nr(0);function m(){p.x=Rc(i)}if(o||!o&&!a)if((Ws(t)!=="body"||dl(i))&&(d=Ec(t)),o){const b=Wo(t,!0,a,t);p.x=b.x+t.clientLeft,p.y=b.y+t.clientTop}else i&&m();a&&!o&&i&&m();const h=i&&!o&&!a?fw(i,d):Nr(0),x=c.left+d.scrollLeft-p.x-h.x,v=c.top+d.scrollTop-p.y-h.y;return{x,y:v,width:c.width,height:c.height}}function ef(e){return cr(e).position==="static"}function wy(e,t){if(!Kr(e)||cr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Pr(e)===n&&(n=n.ownerDocument.body),n}function hw(e,t){const n=Fn(e);if(Nc(e))return n;if(!Kr(e)){let i=Co(e);for(;i&&!Ds(i);){if(ar(i)&&!ef(i))return i;i=Co(i)}return n}let o=wy(e,t);for(;o&&$4(o)&&ef(o);)o=wy(o,t);return o&&Ds(o)&&ef(o)&&!Hp(o)?n:o||B4(e)||n}const Z4=async function(e){const t=this.getOffsetParent||hw,n=this.getDimensions,o=await n(e.floating);return{reference:J4(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function eD(e){return cr(e).direction==="rtl"}const tD={convertOffsetParentRelativeRectToViewportRelativeRect:W4,getDocumentElement:Pr,getClippingRect:X4,getOffsetParent:hw,getElementRects:Z4,getClientRects:V4,getDimensions:Q4,getScale:Ts,isElement:ar,isRTL:eD};function mw(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function nD(e,t){let n=null,o;const i=Pr(e);function a(){var d;clearTimeout(o),(d=n)==null||d.disconnect(),n=null}function c(d,p){d===void 0&&(d=!1),p===void 0&&(p=1),a();const m=e.getBoundingClientRect(),{left:h,top:x,width:v,height:b}=m;if(d||t(),!v||!b)return;const N=Da(x),k=Da(i.clientWidth-(h+v)),j=Da(i.clientHeight-(x+b)),S=Da(h),A={rootMargin:-N+"px "+-k+"px "+-j+"px "+-S+"px",threshold:Mn(0,So(1,p))||1};let L=!0;function O(P){const $=P[0].intersectionRatio;if($!==p){if(!L)return c();$?c(!1,$):o=setTimeout(()=>{c(!1,1e-7)},1e3)}$===1&&!mw(m,e.getBoundingClientRect())&&c(),L=!1}try{n=new IntersectionObserver(O,{...A,root:i.ownerDocument})}catch{n=new IntersectionObserver(O,A)}n.observe(e)}return c(!0),a}function rD(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:p=!1}=o,m=Vp(e),h=i||a?[...m?Ji(m):[],...t?Ji(t):[]]:[];h.forEach(S=>{i&&S.addEventListener("scroll",n,{passive:!0}),a&&S.addEventListener("resize",n)});const x=m&&d?nD(m,n):null;let v=-1,b=null;c&&(b=new ResizeObserver(S=>{let[T]=S;T&&T.target===m&&b&&t&&(b.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var A;(A=b)==null||A.observe(t)})),n()}),m&&!p&&b.observe(m),t&&b.observe(t));let N,k=p?Wo(e):null;p&&j();function j(){const S=Wo(e);k&&!mw(k,S)&&n(),k=S,N=requestAnimationFrame(j)}return n(),()=>{var S;h.forEach(T=>{i&&T.removeEventListener("scroll",n),a&&T.removeEventListener("resize",n)}),x==null||x(),(S=b)==null||S.disconnect(),b=null,p&&cancelAnimationFrame(N)}}const oD=L4,sD=O4,iD=A4,lD=M4,aD=D4,ky=T4,cD=_4,uD=(e,t,n)=>{const o=new Map,i={platform:tD,...n},a={...i.platform,_c:o};return P4(e,t,{...i,platform:a})};var dD=typeof document<"u",fD=function(){},Wa=dD?g.useLayoutEffect:fD;function nc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!nc(e[o],t[o]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,i[o]))return!1;for(o=n;o--!==0;){const a=i[o];if(!(a==="_owner"&&e.$$typeof)&&!nc(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function gw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function jy(e,t){const n=gw(e);return Math.round(t*n)/n}function tf(e){const t=g.useRef(e);return Wa(()=>{t.current=e}),t}function pD(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:c}={},transform:d=!0,whileElementsMounted:p,open:m}=e,[h,x]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,b]=g.useState(o);nc(v,o)||b(o);const[N,k]=g.useState(null),[j,S]=g.useState(null),T=g.useCallback(W=>{W!==P.current&&(P.current=W,k(W))},[]),A=g.useCallback(W=>{W!==$.current&&($.current=W,S(W))},[]),L=a||N,O=c||j,P=g.useRef(null),$=g.useRef(null),E=g.useRef(h),H=p!=null,Z=tf(p),K=tf(i),q=tf(m),Y=g.useCallback(()=>{if(!P.current||!$.current)return;const W={placement:t,strategy:n,middleware:v};K.current&&(W.platform=K.current),uD(P.current,$.current,W).then(ee=>{const R={...ee,isPositioned:q.current!==!1};X.current&&!nc(E.current,R)&&(E.current=R,wo.flushSync(()=>{x(R)}))})},[v,t,n,K,q]);Wa(()=>{m===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,x(W=>({...W,isPositioned:!1})))},[m]);const X=g.useRef(!1);Wa(()=>(X.current=!0,()=>{X.current=!1}),[]),Wa(()=>{if(L&&(P.current=L),O&&($.current=O),L&&O){if(Z.current)return Z.current(L,O,Y);Y()}},[L,O,Y,Z,H]);const _=g.useMemo(()=>({reference:P,floating:$,setReference:T,setFloating:A}),[T,A]),D=g.useMemo(()=>({reference:L,floating:O}),[L,O]),V=g.useMemo(()=>{const W={position:n,left:0,top:0};if(!D.floating)return W;const ee=jy(D.floating,h.x),R=jy(D.floating,h.y);return d?{...W,transform:"translate("+ee+"px, "+R+"px)",...gw(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ee,top:R}},[n,d,D.floating,h.x,h.y]);return g.useMemo(()=>({...h,update:Y,refs:_,elements:D,floatingStyles:V}),[h,Y,_,D,V])}const hD=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:i}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?ky({element:o.current,padding:i}).fn(n):{}:o?ky({element:o,padding:i}).fn(n):{}}}},mD=(e,t)=>{const n=oD(e);return{name:n.name,fn:n.fn,options:[e,t]}},gD=(e,t)=>{const n=sD(e);return{name:n.name,fn:n.fn,options:[e,t]}},xD=(e,t)=>({fn:cD(e).fn,options:[e,t]}),yD=(e,t)=>{const n=iD(e);return{name:n.name,fn:n.fn,options:[e,t]}},vD=(e,t)=>{const n=lD(e);return{name:n.name,fn:n.fn,options:[e,t]}},bD=(e,t)=>{const n=aD(e);return{name:n.name,fn:n.fn,options:[e,t]}},wD=(e,t)=>{const n=hD(e);return{name:n.name,fn:n.fn,options:[e,t]}};var kD="Arrow",xw=g.forwardRef((e,t)=>{const{children:n,width:o=10,height:i=5,...a}=e;return l.jsx(Pt.svg,{...a,ref:t,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});xw.displayName=kD;var jD=xw;function SD(e){const[t,n]=g.useState(void 0);return jo(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let c,d;if("borderBoxSize"in a){const p=a.borderBoxSize,m=Array.isArray(p)?p[0]:p;c=m.inlineSize,d=m.blockSize}else c=e.offsetWidth,d=e.offsetHeight;n({width:c,height:d})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var qp="Popper",[yw,vw]=Vo(qp),[CD,bw]=yw(qp),ww=e=>{const{__scopePopper:t,children:n}=e,[o,i]=g.useState(null);return l.jsx(CD,{scope:t,anchor:o,onAnchorChange:i,children:n})};ww.displayName=qp;var kw="PopperAnchor",jw=g.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...i}=e,a=bw(kw,n),c=g.useRef(null),d=ln(t,c),p=g.useRef(null);return g.useEffect(()=>{const m=p.current;p.current=(o==null?void 0:o.current)||c.current,m!==p.current&&a.onAnchorChange(p.current)}),o?null:l.jsx(Pt.div,{...i,ref:d})});jw.displayName=kw;var Gp="PopperContent",[ND,ED]=yw(Gp),Sw=g.forwardRef((e,t)=>{var Ee,Ne,Re,je,ut,tt;const{__scopePopper:n,side:o="bottom",sideOffset:i=0,align:a="center",alignOffset:c=0,arrowPadding:d=0,avoidCollisions:p=!0,collisionBoundary:m=[],collisionPadding:h=0,sticky:x="partial",hideWhenDetached:v=!1,updatePositionStrategy:b="optimized",onPlaced:N,...k}=e,j=bw(Gp,n),[S,T]=g.useState(null),A=ln(t,Ue=>T(Ue)),[L,O]=g.useState(null),P=SD(L),$=(P==null?void 0:P.width)??0,E=(P==null?void 0:P.height)??0,H=o+(a!=="center"?"-"+a:""),Z=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},K=Array.isArray(m)?m:[m],q=K.length>0,Y={padding:Z,boundary:K.filter(PD),altBoundary:q},{refs:X,floatingStyles:_,placement:D,isPositioned:V,middlewareData:W}=pD({strategy:"fixed",placement:H,whileElementsMounted:(...Ue)=>rD(...Ue,{animationFrame:b==="always"}),elements:{reference:j.anchor},middleware:[mD({mainAxis:i+E,alignmentAxis:c}),p&&gD({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?xD():void 0,...Y}),p&&yD({...Y}),vD({...Y,apply:({elements:Ue,rects:Be,availableWidth:Ct,availableHeight:Ot})=>{const{width:cn,height:hn}=Be.reference,Xe=Ue.floating.style;Xe.setProperty("--radix-popper-available-width",`${Ct}px`),Xe.setProperty("--radix-popper-available-height",`${Ot}px`),Xe.setProperty("--radix-popper-anchor-width",`${cn}px`),Xe.setProperty("--radix-popper-anchor-height",`${hn}px`)}}),L&&wD({element:L,padding:d}),TD({arrowWidth:$,arrowHeight:E}),v&&bD({strategy:"referenceHidden",...Y})]}),[ee,R]=Ew(D),F=Uo(N);jo(()=>{V&&(F==null||F())},[V,F]);const J=(Ee=W.arrow)==null?void 0:Ee.x,I=(Ne=W.arrow)==null?void 0:Ne.y,de=((Re=W.arrow)==null?void 0:Re.centerOffset)!==0,[ve,fe]=g.useState();return jo(()=>{S&&fe(window.getComputedStyle(S).zIndex)},[S]),l.jsx("div",{ref:X.setFloating,"data-radix-popper-content-wrapper":"",style:{..._,transform:V?_.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ve,"--radix-popper-transform-origin":[(je=W.transformOrigin)==null?void 0:je.x,(ut=W.transformOrigin)==null?void 0:ut.y].join(" "),...((tt=W.hide)==null?void 0:tt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(ND,{scope:n,placedSide:ee,onArrowChange:O,arrowX:J,arrowY:I,shouldHideArrow:de,children:l.jsx(Pt.div,{"data-side":ee,"data-align":R,...k,ref:A,style:{...k.style,animation:V?void 0:"none"}})})})});Sw.displayName=Gp;var Cw="PopperArrow",RD={top:"bottom",right:"left",bottom:"top",left:"right"},Nw=g.forwardRef(function(t,n){const{__scopePopper:o,...i}=t,a=ED(Cw,o),c=RD[a.placedSide];return l.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:l.jsx(jD,{...i,ref:n,style:{...i.style,display:"block"}})})});Nw.displayName=Cw;function PD(e){return e!==null}var TD=e=>({name:"transformOrigin",options:e,fn(t){var j,S,T;const{placement:n,rects:o,middlewareData:i}=t,c=((j=i.arrow)==null?void 0:j.centerOffset)!==0,d=c?0:e.arrowWidth,p=c?0:e.arrowHeight,[m,h]=Ew(n),x={start:"0%",center:"50%",end:"100%"}[h],v=(((S=i.arrow)==null?void 0:S.x)??0)+d/2,b=(((T=i.arrow)==null?void 0:T.y)??0)+p/2;let N="",k="";return m==="bottom"?(N=c?x:`${v}px`,k=`${-p}px`):m==="top"?(N=c?x:`${v}px`,k=`${o.floating.height+p}px`):m==="right"?(N=`${-p}px`,k=c?x:`${b}px`):m==="left"&&(N=`${o.floating.width+p}px`,k=c?x:`${b}px`),{data:{x:N,y:k}}}});function Ew(e){const[t,n="center"]=e.split("-");return[t,n]}var AD=ww,DD=jw,ID=Sw,LD=Nw,OD=Symbol("radix.slottable");function _D(e){const t=({children:n})=>l.jsx(l.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=OD,t}var MD=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),$D="VisuallyHidden",Rw=g.forwardRef((e,t)=>l.jsx(Pt.span,{...e,ref:t,style:{...MD,...e.style}}));Rw.displayName=$D;var FD=Rw,[Pc]=Vo("Tooltip",[vw]),Tc=vw(),Pw="TooltipProvider",zD=700,$f="tooltip.open",[BD,Kp]=Pc(Pw),Tw=e=>{const{__scopeTooltip:t,delayDuration:n=zD,skipDelayDuration:o=300,disableHoverableContent:i=!1,children:a}=e,c=g.useRef(!0),d=g.useRef(!1),p=g.useRef(0);return g.useEffect(()=>{const m=p.current;return()=>window.clearTimeout(m)},[]),l.jsx(BD,{scope:t,isOpenDelayedRef:c,delayDuration:n,onOpen:g.useCallback(()=>{window.clearTimeout(p.current),c.current=!1},[]),onClose:g.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>c.current=!0,o)},[o]),isPointerInTransitRef:d,onPointerInTransitChange:g.useCallback(m=>{d.current=m},[]),disableHoverableContent:i,children:a})};Tw.displayName=Pw;var Zi="Tooltip",[UD,fl]=Pc(Zi),Aw=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:i,onOpenChange:a,disableHoverableContent:c,delayDuration:d}=e,p=Kp(Zi,e.__scopeTooltip),m=Tc(t),[h,x]=g.useState(null),v=Cs(),b=g.useRef(0),N=c??p.disableHoverableContent,k=d??p.delayDuration,j=g.useRef(!1),[S,T]=pc({prop:o,defaultProp:i??!1,onChange:$=>{$?(p.onOpen(),document.dispatchEvent(new CustomEvent($f))):p.onClose(),a==null||a($)},caller:Zi}),A=g.useMemo(()=>S?j.current?"delayed-open":"instant-open":"closed",[S]),L=g.useCallback(()=>{window.clearTimeout(b.current),b.current=0,j.current=!1,T(!0)},[T]),O=g.useCallback(()=>{window.clearTimeout(b.current),b.current=0,T(!1)},[T]),P=g.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>{j.current=!0,T(!0),b.current=0},k)},[k,T]);return g.useEffect(()=>()=>{b.current&&(window.clearTimeout(b.current),b.current=0)},[]),l.jsx(AD,{...m,children:l.jsx(UD,{scope:t,contentId:v,open:S,stateAttribute:A,trigger:h,onTriggerChange:x,onTriggerEnter:g.useCallback(()=>{p.isOpenDelayedRef.current?P():L()},[p.isOpenDelayedRef,P,L]),onTriggerLeave:g.useCallback(()=>{N?O():(window.clearTimeout(b.current),b.current=0)},[O,N]),onOpen:L,onClose:O,disableHoverableContent:N,children:n})})};Aw.displayName=Zi;var Ff="TooltipTrigger",Dw=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,i=fl(Ff,n),a=Kp(Ff,n),c=Tc(n),d=g.useRef(null),p=ln(t,d,i.onTriggerChange),m=g.useRef(!1),h=g.useRef(!1),x=g.useCallback(()=>m.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",x),[x]),l.jsx(DD,{asChild:!0,...c,children:l.jsx(Pt.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...o,ref:p,onPointerMove:ct(e.onPointerMove,v=>{v.pointerType!=="touch"&&!h.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),h.current=!0)}),onPointerLeave:ct(e.onPointerLeave,()=>{i.onTriggerLeave(),h.current=!1}),onPointerDown:ct(e.onPointerDown,()=>{i.open&&i.onClose(),m.current=!0,document.addEventListener("pointerup",x,{once:!0})}),onFocus:ct(e.onFocus,()=>{m.current||i.onOpen()}),onBlur:ct(e.onBlur,i.onClose),onClick:ct(e.onClick,i.onClose)})})});Dw.displayName=Ff;var Yp="TooltipPortal",[HD,WD]=Pc(Yp,{forceMount:void 0}),Iw=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:i}=e,a=fl(Yp,t);return l.jsx(HD,{scope:t,forceMount:n,children:l.jsx(qo,{present:n||a.open,children:l.jsx(dp,{asChild:!0,container:i,children:o})})})};Iw.displayName=Yp;var Is="TooltipContent",Lw=g.forwardRef((e,t)=>{const n=WD(Is,e.__scopeTooltip),{forceMount:o=n.forceMount,side:i="top",...a}=e,c=fl(Is,e.__scopeTooltip);return l.jsx(qo,{present:o||c.open,children:c.disableHoverableContent?l.jsx(Ow,{side:i,...a,ref:t}):l.jsx(VD,{side:i,...a,ref:t})})}),VD=g.forwardRef((e,t)=>{const n=fl(Is,e.__scopeTooltip),o=Kp(Is,e.__scopeTooltip),i=g.useRef(null),a=ln(t,i),[c,d]=g.useState(null),{trigger:p,onClose:m}=n,h=i.current,{onPointerInTransitChange:x}=o,v=g.useCallback(()=>{d(null),x(!1)},[x]),b=g.useCallback((N,k)=>{const j=N.currentTarget,S={x:N.clientX,y:N.clientY},T=XD(S,j.getBoundingClientRect()),A=QD(S,T),L=JD(k.getBoundingClientRect()),O=eI([...A,...L]);d(O),x(!0)},[x]);return g.useEffect(()=>()=>v(),[v]),g.useEffect(()=>{if(p&&h){const N=j=>b(j,h),k=j=>b(j,p);return p.addEventListener("pointerleave",N),h.addEventListener("pointerleave",k),()=>{p.removeEventListener("pointerleave",N),h.removeEventListener("pointerleave",k)}}},[p,h,b,v]),g.useEffect(()=>{if(c){const N=k=>{const j=k.target,S={x:k.clientX,y:k.clientY},T=(p==null?void 0:p.contains(j))||(h==null?void 0:h.contains(j)),A=!ZD(S,c);T?v():A&&(v(),m())};return document.addEventListener("pointermove",N),()=>document.removeEventListener("pointermove",N)}},[p,h,c,m,v]),l.jsx(Ow,{...e,ref:a})}),[qD,GD]=Pc(Zi,{isInside:!1}),KD=_D("TooltipContent"),Ow=g.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:c,...d}=e,p=fl(Is,n),m=Tc(n),{onClose:h}=p;return g.useEffect(()=>(document.addEventListener($f,h),()=>document.removeEventListener($f,h)),[h]),g.useEffect(()=>{if(p.trigger){const x=v=>{const b=v.target;b!=null&&b.contains(p.trigger)&&h()};return window.addEventListener("scroll",x,{capture:!0}),()=>window.removeEventListener("scroll",x,{capture:!0})}},[p.trigger,h]),l.jsx(up,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:x=>x.preventDefault(),onDismiss:h,children:l.jsxs(ID,{"data-state":p.stateAttribute,...m,...d,ref:t,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(KD,{children:o}),l.jsx(qD,{scope:n,isInside:!0,children:l.jsx(FD,{id:p.contentId,role:"tooltip",children:i||o})})]})})});Lw.displayName=Is;var _w="TooltipArrow",YD=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,i=Tc(n);return GD(_w,n).isInside?null:l.jsx(LD,{...i,...o,ref:t})});YD.displayName=_w;function XD(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,o,i,a)){case a:return"left";case i:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function QD(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function JD(e){const{top:t,right:n,bottom:o,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:o},{x:i,y:o}]}function ZD(e,t){const{x:n,y:o}=e;let i=!1;for(let a=0,c=t.length-1;a<t.length;c=a++){const d=t[a],p=t[c],m=d.x,h=d.y,x=p.x,v=p.y;h>o!=v>o&&n<(x-m)*(o-h)/(v-h)+m&&(i=!i)}return i}function eI(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),tI(t)}function tI(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const i=e[o];for(;t.length>=2;){const a=t[t.length-1],c=t[t.length-2];if((a.x-c.x)*(i.y-c.y)>=(a.y-c.y)*(i.x-c.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const i=e[o];for(;n.length>=2;){const a=n[n.length-1],c=n[n.length-2];if((a.x-c.x)*(i.y-c.y)>=(a.y-c.y)*(i.x-c.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var nI=Tw,rI=Aw,oI=Dw,sI=Iw,Mw=Lw;const $w=nI,Fw=rI,zw=oI,Xp=g.forwardRef(({className:e,sideOffset:t=4,...n},o)=>l.jsx(sI,{children:l.jsx(Mw,{ref:o,sideOffset:t,className:$e("z-50 overflow-hidden rounded-md border border-border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Xp.displayName=Mw.displayName;function iI({items:e,align:t="end"}){const[n,o]=g.useState(!1),i=g.useRef(null);return g.useEffect(()=>{if(!n)return;function a(d){i.current&&!i.current.contains(d.target)&&o(!1)}function c(d){d.key==="Escape"&&o(!1)}return document.addEventListener("mousedown",a),document.addEventListener("keydown",c),()=>{document.removeEventListener("mousedown",a),document.removeEventListener("keydown",c)}},[n]),e.length===0?null:l.jsxs("div",{className:"relative",ref:i,children:[l.jsx("button",{type:"button",onClick:()=>o(a=>!a),className:"shell-action",title:"More actions","aria-haspopup":"true","aria-expanded":n,children:l.jsx(lC,{className:"h-4 w-4"})}),n&&l.jsx("div",{className:$e("absolute top-full mt-1 z-30 min-w-[220px] rounded-md border border-border/70 bg-background shadow-lg py-1",t==="end"?"right-0":"left-0"),children:l.jsx($w,{delayDuration:200,children:e.map(a=>{const c=a.icon,d=$e("flex w-full items-center gap-2 px-3 py-1.5 text-sm text-left transition",a.disabled?"opacity-50 cursor-not-allowed":a.destructive?"text-destructive hover:bg-destructive/10":"hover:bg-foreground/5"),p=l.jsxs(l.Fragment,{children:[c?l.jsx(c,{className:"h-4 w-4 shrink-0"}):null,l.jsx("span",{className:"truncate",children:a.label})]});if(a.disabled){const m=l.jsx("span",{tabIndex:0,className:"inline-block w-full outline-none focus-visible:ring-1 focus-visible:ring-ring",children:l.jsx("button",{type:"button",disabled:!0,className:d,children:p})});return a.disabledReason?l.jsxs(Fw,{children:[l.jsx(zw,{asChild:!0,children:m}),l.jsx(Xp,{side:"left",children:a.disabledReason})]},a.key):l.jsx("div",{children:m},a.key)}return a.href?l.jsx(Ce,{to:a.href,className:d,onClick:()=>o(!1),children:p},a.key):l.jsx("button",{type:"button",className:d,onClick:()=>{var m;(m=a.onSelect)==null||m.call(a),o(!1)},children:p},a.key)})})})]})}async function Bw(e,t,n,o){const i=await fetch(`/api/projects/${e}/assignments/${t}/transitions/${n.command}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o?{reason:o}:{})}),a=await i.json().catch(()=>null);if(!i.ok)throw new Error((a==null?void 0:a.error)||`HTTP ${i.status}`);return a.assignment}async function Uw(e,t,n){const o=await fetch(`/api/projects/${e}/assignments/${t}/status-override`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:n})}),i=await o.json().catch(()=>null);if(!o.ok)throw new Error((i==null?void 0:i.error)||`HTTP ${o.status}`);return i.assignment}async function lI(e,t){const n=await fetch(`/api/projects/${e}/assignments/${t}`,{method:"DELETE"}),o=await n.json().catch(()=>null);if(!n.ok)throw new Error((o==null?void 0:o.error)||`HTTP ${n.status}`)}function Hw(e){return e.requiresReason||e.command==="block"}function aI(e){const t=e.split(`
|
|
460
|
-
`),n=t.findIndex(c=>/^##\s+Acceptance Criteria\s*$/i.test(c.trim()));if(n===-1)return{acceptanceCriteria:[],summaryBody:e};let o=t.length;for(let c=n+1;c<t.length;c+=1)if(/^#{1,2}\s+\S/.test(t[c].trim())){o=c;break}const i=t.slice(n+1,o).map(c=>c.match(/^\s*[-*]\s+\[( |x|X)\]\s+(.*)$/)).filter(c=>!!c).map(c=>({checked:c[1].toLowerCase()==="x",text:c[2].trim()})),a=[...t.slice(0,n),...t.slice(o)].join(`
|
|
461
|
-
`).replace(/\n{3,}/g,`
|
|
462
|
-
|
|
463
|
-
`).trim();return{acceptanceCriteria:i,summaryBody:a}}function cI(e){const t=e.split(`
|
|
464
|
-
`),n=t.findIndex(c=>/^##\s+Todos\s*$/i.test(c.trim()));if(n===-1)return{hasSection:!1,todosMarkdown:"",remaining:e};let o=t.length;for(let c=n+1;c<t.length;c+=1)if(/^#{1,2}\s+\S/.test(t[c].trim())){o=c;break}const i=t.slice(n+1,o).join(`
|
|
465
|
-
`).replace(/<!--[\s\S]*?-->/g,"").replace(/\n{3,}/g,`
|
|
466
|
-
|
|
467
|
-
`).trim(),a=[...t.slice(0,n),...t.slice(o)].join(`
|
|
468
|
-
`).replace(/\n{3,}/g,`
|
|
469
|
-
|
|
470
|
-
`).trim();return{hasSection:!0,todosMarkdown:i,remaining:a}}function uI({projectSlug:e,dependencies:t,blockedReason:n}){const[o,i]=g.useState(!1);if(t.length===0)return null;const a=t.filter(d=>d.status!=="completed"&&d.status!=="review"),c=a.length===0;return c&&!o?l.jsxs("button",{type:"button",onClick:()=>i(!0),className:"flex w-full items-center gap-2 rounded-lg border border-emerald-200 bg-emerald-50/50 px-4 py-2.5 text-left transition hover:bg-emerald-50 dark:border-emerald-900 dark:bg-emerald-950/20 dark:hover:bg-emerald-950/30",children:[l.jsx(ep,{className:"h-4 w-4 shrink-0 text-emerald-600 dark:text-emerald-400"}),l.jsxs("span",{className:"text-sm font-medium text-emerald-800 dark:text-emerald-300",children:["All ",t.length," ",t.length===1?"dependency":"dependencies"," resolved"]}),l.jsx(Xi,{className:"ml-auto h-4 w-4 text-emerald-600 dark:text-emerald-400"})]}):l.jsxs("div",{className:"space-y-3",children:[a.length>0&&l.jsxs("div",{className:"flex items-start gap-3 rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 dark:border-amber-900 dark:bg-amber-950/30",children:[l.jsx(xf,{className:"mt-0.5 h-4 w-4 shrink-0 text-amber-600 dark:text-amber-400"}),l.jsxs("div",{className:"text-sm text-amber-800 dark:text-amber-300",children:[l.jsxs("strong",{children:[a.length," ",a.length===1?"dependency is":"dependencies are"," not yet completed."]}),n&&l.jsxs("p",{className:"mt-1 text-amber-700 dark:text-amber-400",children:["Blocked reason: ",n]})]})]}),l.jsx(Pe,{title:"Dependencies",description:`${t.length-a.length} of ${t.length} resolved`,actions:c?l.jsx("button",{type:"button",onClick:()=>i(!1),className:"text-xs text-muted-foreground hover:text-foreground",children:"Collapse"}):void 0,children:l.jsx("div",{className:"divide-y divide-border/40",children:t.map(d=>l.jsxs(Ce,{to:`/projects/${e}/assignments/${d.slug}`,className:"flex items-center gap-3 px-1 py-2.5 transition hover:bg-muted/40 first:pt-0 last:pb-0",children:[l.jsx(Ht,{status:d.status}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:d.title}),l.jsx("p",{className:"truncate text-xs text-muted-foreground",children:d.slug})]}),d.assignee&&l.jsx("span",{className:"hidden text-xs text-muted-foreground sm:inline",children:d.assignee}),l.jsx(Ga,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]},d.slug))})})]})}function dI({links:e}){const t=Rt();if(e.length===0)return null;const n=e.filter(i=>!i.isReverse),o=e.filter(i=>i.isReverse);return l.jsx(Pe,{title:"Linked Assignments",description:`${e.length} ${e.length===1?"link":"links"}`,children:l.jsxs("div",{className:"divide-y divide-border/40",children:[n.map(i=>l.jsxs(Ce,{to:`${t}/projects/${i.projectSlug}/assignments/${i.assignmentSlug}`,className:"flex items-center gap-3 px-1 py-2.5 transition hover:bg-muted/40 first:pt-0 last:pb-0",children:[l.jsx(JS,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),l.jsx(Ht,{status:i.status}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:i.title}),l.jsx("p",{className:"truncate text-xs text-muted-foreground",children:i.slug})]}),l.jsx(Ga,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]},`fwd-${i.slug}`)),o.map(i=>l.jsxs(Ce,{to:`${t}/projects/${i.projectSlug}/assignments/${i.assignmentSlug}`,className:"flex items-center gap-3 px-1 py-2.5 transition hover:bg-muted/40 first:pt-0 last:pb-0",children:[l.jsx(yv,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),l.jsx(Ht,{status:i.status}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:i.title}),l.jsx("p",{className:"truncate text-xs text-muted-foreground",children:i.slug})]}),l.jsx(Ga,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]},`rev-${i.slug}`))]})})}function fI(e){const t=new Map;for(const o of e)t.set(o.id,{entry:o,replies:[]});const n=[];for(const o of e){const i=t.get(o.id);o.replyTo&&t.has(o.replyTo)?t.get(o.replyTo).replies.push(i):n.push(i)}return n}function pI(e,t){return e===null?`/api/assignments/${encodeURIComponent(t)}/comments`:`/api/projects/${encodeURIComponent(e)}/assignments/${encodeURIComponent(t)}/comments`}function Ww({projectSlug:e,assignmentSlug:t,entries:n}){const[o,i]=g.useState(n);g.useEffect(()=>{i(n)},[n]);const a=g.useMemo(()=>fI(o),[o]),[c,d]=g.useState(""),[p,m]=g.useState("note"),[h,x]=g.useState(!1),[v,b]=g.useState(null);async function N(j){var A;if(j.preventDefault(),!c.trim())return;x(!0),b(null);const S=`tmp-${Date.now()}`,T={id:S,timestamp:new Date().toISOString(),author:"human",type:p,body:c,resolved:p==="question"?!1:void 0};i(L=>[...L,T]);try{const L=await fetch(pI(e,t),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({body:c,type:p})});if(!L.ok){const $=await L.text();throw new Error($||`HTTP ${L.status}`)}const O=await L.json().catch(()=>null),P=(A=O==null?void 0:O.comment)==null?void 0:A.id;i($=>$.map(E=>E.id===S?{...E,id:P??E.id}:E)),d(""),window.dispatchEvent(new CustomEvent("syntaur-refresh"))}catch(L){b(L instanceof Error?L.message:String(L)),i(O=>O.filter(P=>P.id!==S))}finally{x(!1)}}async function k(j,S){i(T=>T.map(A=>A.id===j?{...A,resolved:S}:A));try{const T=e===null?`/api/assignments/${encodeURIComponent(t)}/comments/${encodeURIComponent(j)}/resolved`:`/api/projects/${encodeURIComponent(e)}/assignments/${encodeURIComponent(t)}/comments/${encodeURIComponent(j)}/resolved`,A=await fetch(T,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({resolved:S})});if(!A.ok)throw new Error(`HTTP ${A.status}`);window.dispatchEvent(new CustomEvent("syntaur-refresh"))}catch(T){b(T instanceof Error?T.message:String(T)),i(A=>A.map(L=>L.id===j?{...L,resolved:!S}:L))}}return l.jsx(Pe,{title:"Comments",description:"Threaded questions, notes, and feedback. Questions can be resolved once answered.",children:l.jsxs("div",{className:"space-y-4",children:[a.map(j=>l.jsx(Vw,{node:j,onToggleResolved:k,depth:0},j.entry.id)),l.jsxs("form",{onSubmit:N,className:"mt-6 space-y-2 border-t border-neutral-800 pt-4",children:[l.jsx("label",{className:"block text-xs font-medium uppercase tracking-wide text-neutral-400",children:"Add comment"}),l.jsx("textarea",{value:c,onChange:j=>d(j.target.value),className:"w-full rounded border border-neutral-700 bg-neutral-900 p-2 text-sm",rows:3,placeholder:"Ask a question, leave a note, or give feedback…"}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("select",{value:p,onChange:j=>m(j.target.value),className:"rounded border border-neutral-700 bg-neutral-900 px-2 py-1 text-xs",children:[l.jsx("option",{value:"note",children:"note"}),l.jsx("option",{value:"question",children:"question"}),l.jsx("option",{value:"feedback",children:"feedback"})]}),l.jsx("button",{type:"submit",disabled:h||!c.trim(),className:"shell-action",children:h?"Posting…":"Post comment"}),v?l.jsx("span",{className:"text-xs text-red-400",children:v}):null]})]})]})})}function Vw({node:e,depth:t,onToggleResolved:n}){const{entry:o,replies:i}=e,a=o.type==="question";return l.jsxs("div",{className:$e("space-y-2",t>0&&"ml-4 border-l border-neutral-800 pl-4"),children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-neutral-400",children:[l.jsx("span",{className:"font-mono",children:o.id}),l.jsx("span",{children:"·"}),l.jsx("span",{children:o.timestamp}),l.jsx("span",{children:"·"}),l.jsx("span",{className:"font-medium text-neutral-200",children:o.author}),l.jsx("span",{children:"·"}),l.jsx("span",{className:$e("rounded px-1.5 py-0.5 font-mono text-[10px] uppercase",a&&"bg-amber-900/40 text-amber-200",o.type==="feedback"&&"bg-sky-900/40 text-sky-200",o.type==="note"&&"bg-neutral-800 text-neutral-300"),children:o.type}),a?l.jsxs("button",{type:"button",onClick:()=>n(o.id,!o.resolved),className:$e("inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium",o.resolved?"bg-emerald-900/40 text-emerald-200 hover:bg-emerald-900/60":"bg-neutral-800 text-neutral-300 hover:bg-neutral-700"),title:o.resolved?"Mark unresolved":"Mark resolved",children:[o.resolved?l.jsx(ep,{className:"h-3 w-3"}):l.jsx(tC,{className:"h-3 w-3"}),o.resolved?"resolved":"open"]}):null,o.replyTo?l.jsxs("span",{className:"inline-flex items-center gap-1 text-neutral-500",children:[l.jsx(jC,{className:"h-3 w-3"}),o.replyTo]}):null]}),l.jsx(Ut,{content:o.body}),i.length>0?l.jsx("div",{className:"space-y-2",children:i.map(c=>l.jsx(Vw,{node:c,depth:t+1,onToggleResolved:n},c.entry.id))}):null]})}const hI=["review","complete","unblock","start","block","fail","reopen"];function Sy(){var mn,Pn,Tn,re,le,pe;const{slug:e,aslug:t}=St(),n=Wt(),o=Rt(),[i,a]=_s(),[c,d]=g.useState(null),[p,m]=g.useState(null),[h,x]=g.useState(null),[v,b]=g.useState(null),[N,k]=g.useState(null),[j,S]=g.useState(!1),[T,A]=g.useState(!1),[L,O]=g.useState(0),P=i.get("tab")??"summary",$=bc(),{data:E,loading:H,error:Z,refetch:K}=kN(e,t),{data:q}=Wv(e),{data:Y}=ap(),{data:X}=CN(e,t),_=g.useMemo(()=>{if(!E||!q)return[];const ne=new Map(q.assignments.map(me=>[me.slug,me]));return E.dependsOn.map(me=>{const ke=ne.get(me);return{slug:me,title:(ke==null?void 0:ke.title)??me,status:(ke==null?void 0:ke.status)??"pending",priority:(ke==null?void 0:ke.priority)??"medium",assignee:(ke==null?void 0:ke.assignee)??null}})},[E,q]),D=_.filter(ne=>ne.status!=="completed"&&ne.status!=="review");zs("assignment");const V=g.useMemo(()=>((q==null?void 0:q.assignments)??[]).map(ne=>ne.slug),[q]),W=t?V.indexOf(t):-1,ee=W>0?V[W-1]:null,R=W>=0&&W<V.length-1?V[W+1]:null,F=`${o}/projects/${e}/assignments/${t}`;vt({keys:"e",scope:"assignment",description:"Edit assignment",handler:()=>n(`${F}/edit`)}),vt({keys:"p",scope:"assignment",description:"Edit plan",handler:()=>n(`${F}/plan/edit`)}),vt({keys:"h",scope:"assignment",description:"Append handoff",handler:()=>n(`${F}/handoff/edit`)}),vt({keys:"d",scope:"assignment",description:"Append decision record",handler:()=>n(`${F}/decision-record/edit`)}),vt({keys:"s",scope:"assignment",description:"Edit scratchpad",handler:()=>n(`${F}/scratchpad/edit`)}),vt({keys:"[",scope:"assignment",description:"Previous assignment in project",enabled:!!ee,handler:()=>ee&&n(`${o}/projects/${e}/assignments/${ee}`)}),vt({keys:"]",scope:"assignment",description:"Next assignment in project",enabled:!!R,handler:()=>R&&n(`${o}/projects/${e}/assignments/${R}`)});const J=g.useMemo(()=>E?aI(E.body):{acceptanceCriteria:[],summaryBody:""},[E]),I=g.useMemo(()=>cI(J.summaryBody),[J.summaryBody]),de=J.acceptanceCriteria,ve=de.filter(ne=>ne.checked).length,fe=de.length>0&&ve===de.length,Ee=g.useRef(fe),Ne=g.useRef(!1);if(g.useEffect(()=>{if(E){if(!Ne.current){Ee.current=fe,Ne.current=!0;return}fe&&!Ee.current&&O(ne=>ne+1),Ee.current=fe}},[fe,E]),H)return l.jsx(bt,{label:"Loading assignment workspace…"});if(Z||!E||!e||!t)return l.jsx(gt,{error:Z||"Assignment not found."});const Re=e,je=t,ut=de.length>0?{checked:ve,total:de.length}:void 0,tt=E.availableTransitions??[],Ue=tt.filter(ne=>!ne.disabled&&ne.targetStatus!==E.status),Be=hI.map(ne=>Ue.find(me=>me.command===ne)).find(Boolean)??Ue[0]??null,Ct=[];if(Y!=null&&Y.sessions)for(const ne of Y.sessions)for(const me of ne.windows)for(const ke of me.panes)((mn=ke.assignment)==null?void 0:mn.project)===e&&((Pn=ke.assignment)==null?void 0:Pn.slug)===t&&Ct.push({sessionName:ne.name,command:ke.command,urls:ke.urls});async function Ot(ne){d(null);try{await Uw(Re,je,ne),K()}catch(me){d(me.message)}}async function cn(){A(!0);try{await lI(Re,je),n(`${o}/projects/${Re}`)}catch(ne){d(ne.message),A(!1),S(!1)}}async function hn(ne,me){d(null),m(ne.command);try{return await Bw(Re,je,ne,me),K(),!0}catch(ke){return d(ke.message),!1}finally{m(null)}}function Xe(ne){if(Hw(ne)){x(ne);return}hn(ne)}async function nt(ne,me){b(null),k(ne);try{const ke=await fetch(`/api/projects/${Re}/assignments/${je}/acceptance-criteria/${ne}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({checked:me})}),_t=await ke.json();if(!ke.ok)throw new Error(_t.error||`HTTP ${ke.status}`);K()}catch(ke){b(ke.message)}finally{k(null)}}const Vt=[...Ue.filter(ne=>ne!==Be).map(ne=>({key:`transition-${ne.command}`,label:ne.label,onSelect:()=>Xe(ne),disabled:p===ne.command})),...tt.filter(ne=>ne.disabled||ne.targetStatus===E.status).map(ne=>({key:`transition-${ne.command}`,label:ne.label,disabled:!0,disabledReason:ne.targetStatus===E.status?`Already ${E.status.replace(/_/g," ")}`:ne.disabledReason??ne.warning??ne.description})),...$.statuses.map(ne=>({key:`override-${ne.id}`,label:`Override → ${ne.label}`,onSelect:()=>Ot(ne.id),disabled:ne.id===E.status,disabledReason:ne.id===E.status?"Already in this status":void 0})),{key:"edit-assignment",label:"Edit assignment source",icon:cC,href:`${o}/projects/${e}/assignments/${t}/edit`},{key:"edit-plan",label:"Edit plan",icon:NC,href:`${o}/projects/${e}/assignments/${t}/plan/edit`},{key:"edit-scratchpad",label:"Edit scratchpad",icon:Rd,href:`${o}/projects/${e}/assignments/${t}/scratchpad/edit`},{key:"append-handoff",label:"Append handoff",icon:Ga,href:`${o}/projects/${e}/assignments/${t}/handoff/edit`},{key:"append-decision",label:"Append decision",icon:hC,href:`${o}/projects/${e}/assignments/${t}/decision-record/edit`},{key:"delete",label:"Delete assignment",icon:Ms,destructive:!0,onSelect:()=>S(!0)}],Qt=(Be==null?void 0:Be.command)==="review";return l.jsxs("div",{className:"space-y-5",children:[l.jsxs("div",{className:"sticky top-12 z-20 rounded-lg border border-border/60 bg-card/90 p-3 shadow-sm backdrop-blur",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[l.jsx(Ht,{status:E.status,progress:ut}),l.jsx("h1",{className:"text-lg font-semibold text-foreground",children:E.title}),l.jsxs("span",{className:"text-xs text-muted-foreground",children:["Updated ",hN(E.updated)]}),D.length>0&&l.jsxs("span",{className:"text-xs text-amber-700 dark:text-amber-300",children:["⚠ ",D.length," unmet dep",D.length===1?"":"s"]}),l.jsxs("span",{className:"ml-auto flex items-center gap-2",children:[Be&&l.jsx("button",{type:"button",title:Be.warning||Be.description,disabled:p===Be.command,onClick:()=>Xe(Be),className:$e("shell-action disabled:cursor-not-allowed disabled:opacity-50",Be.warning&&"border-amber-300 dark:border-amber-700",Qt&&L>0&&"send-to-review-glow"),children:l.jsx("span",{children:p===Be.command?"Working…":Be.label})},Qt?`review-${L}`:Be.command),l.jsx(iI,{items:Vt,align:"end"})]})]}),c?l.jsx("p",{className:"mt-4 rounded-md border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-700 dark:border-rose-900 dark:bg-rose-950/30 dark:text-rose-300",children:c}):null,E.blockedReason?l.jsxs("div",{className:"mt-4 rounded-md border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-800 dark:border-amber-900 dark:bg-amber-950/30 dark:text-amber-300",children:[l.jsx("strong",{children:"Blocked reason:"})," ",E.blockedReason]}):null]}),_.length>0&&l.jsx(uI,{projectSlug:e,dependencies:_,blockedReason:E.blockedReason}),E.enrichedLinks&&E.enrichedLinks.length>0&&l.jsx(dI,{links:E.enrichedLinks}),E.referencedBy&&E.referencedBy.length>0&&l.jsx(Pe,{title:"Referenced by",description:"Other assignments whose Todos, progress, comments, or handoffs link to this one.",children:l.jsx("ul",{className:"space-y-2",children:E.referencedBy.map(ne=>{const me=ne.sourceProjectSlug===null?`/assignments/${ne.sourceId}`:`${o}/projects/${ne.sourceProjectSlug}/assignments/${ne.sourceSlug}`;return l.jsxs("li",{className:"flex items-center gap-2 text-sm",children:[l.jsx(Ce,{to:me,className:"text-foreground hover:text-primary",children:ne.sourceTitle}),l.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",ne.mentions," mention",ne.mentions===1?"":"s",")"]}),ne.sourceProjectSlug===null?l.jsx("span",{className:"rounded bg-neutral-800 px-1.5 py-0.5 font-mono text-[10px] uppercase text-neutral-300",children:"Standalone"}):null]},ne.sourceId)})})}),l.jsxs("div",{className:"grid gap-4 xl:grid-cols-[minmax(0,1fr)_280px]",children:[l.jsx("div",{className:"space-y-4",children:l.jsx(Cp,{value:P,onValueChange:ne=>a({tab:ne}),items:[{value:"summary",label:"Summary",content:l.jsxs("div",{className:"space-y-5",children:[J.acceptanceCriteria.length>0?l.jsx(Pe,{title:"Acceptance Criteria",description:"These checkboxes update the source assignment markdown.",children:l.jsxs("div",{className:"space-y-3",children:[v?l.jsx("p",{className:"rounded-md border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-700 dark:border-rose-900 dark:bg-rose-950/30 dark:text-rose-300",children:v}):null,J.acceptanceCriteria.map((ne,me)=>{const ke=N!==null;return l.jsxs("label",{className:"flex items-start gap-3 rounded-md border border-border/60 bg-background/80 px-3 py-3",children:[l.jsx("input",{type:"checkbox",checked:ne.checked,disabled:ke,onChange:_t=>nt(me,_t.target.checked),className:"mt-1 h-4 w-4 rounded border-border text-primary"}),l.jsx("span",{className:"criterion-label text-sm leading-6","data-checked":ne.checked,children:ne.text})]},`${me}-${ne.text}`)})]})}):null,I.hasSection?l.jsx(Pe,{title:"Todos",description:"Checklist of work items from assignment.md. Links point to plan files.",children:l.jsx(Ut,{content:I.todosMarkdown,emptyState:"No todos yet."})}):null,l.jsx(Pe,{title:"Assignment Summary",children:l.jsx(Ut,{content:I.remaining,emptyState:J.acceptanceCriteria.length>0||I.hasSection?"No additional summary markdown beyond the acceptance criteria and todos.":"This assignment does not have summary markdown yet."})})]})},{value:"plan",label:"Plan",count:E.plan?1:0,content:E.plan?l.jsx("div",{className:"space-y-5",children:l.jsxs(Pe,{title:"Plan",description:"Shows plan.md only. Versioned plans (plan-v2.md, ...) linked from the Todos section are not yet rendered here — open them from the filesystem.",actions:l.jsxs(Ce,{className:"shell-action",to:`${o}/projects/${e}/assignments/${t}/plan/edit`,children:[l.jsx(Rd,{className:"h-4 w-4"}),l.jsx("span",{children:"Edit Plan"})]}),children:[l.jsx("div",{className:"mb-4",children:l.jsx(Ht,{status:E.plan.status})}),l.jsx(Ut,{content:E.plan.body,emptyState:"No plan content yet."})]})}):l.jsx(Ke,{title:"No plan yet",description:"Plan files are optional and versioned. Run /plan-assignment to create plan.md (or plan-v2.md, ...) and link it from the Todos section."})},{value:"scratchpad",label:"Scratchpad",count:E.scratchpad?1:0,content:E.scratchpad?l.jsx(Pe,{title:"Scratchpad",actions:l.jsxs(Ce,{className:"shell-action",to:`${o}/projects/${e}/assignments/${t}/scratchpad/edit`,children:[l.jsx(Rd,{className:"h-4 w-4"}),l.jsx("span",{children:"Edit Scratchpad"})]}),children:l.jsx(Ut,{content:E.scratchpad.body,emptyState:"Scratchpad is empty."})}):l.jsx(Ke,{title:"No scratchpad yet",description:"Scratchpad notes appear here when you use the Edit Scratchpad action."})},{value:"handoff",label:"Handoff",count:((Tn=E.handoff)==null?void 0:Tn.handoffCount)??0,content:l.jsx("div",{className:"space-y-5",children:E.handoff?l.jsx(Pe,{children:l.jsx(Ut,{content:E.handoff.body,emptyState:"No handoff history yet."})}):l.jsx(Ke,{title:"No handoff log yet",description:"Handoffs appear here when an agent runs /complete-assignment or you append one manually."})})},{value:"progress",label:"Progress",count:((re=E.progress)==null?void 0:re.entryCount)??0,content:l.jsx("div",{className:"space-y-5",children:E.progress&&E.progress.entries.length>0?l.jsx(Pe,{title:"Progress",description:"Reverse-chronological log of work done on this assignment. Agents append entries via progress.md.",children:l.jsx("ol",{className:"space-y-4",children:E.progress.entries.map((ne,me)=>l.jsxs("li",{className:"border-l-2 border-neutral-700 pl-3",children:[l.jsx("div",{className:"text-xs font-mono text-neutral-400",children:ne.timestamp}),l.jsx(Ut,{content:ne.body})]},`${ne.timestamp}-${me}`))})}):l.jsx(Ke,{title:"No progress entries yet",description:"Progress entries appear here as the agent appends them to progress.md."})})},{value:"comments",label:"Comments",count:((le=E.comments)==null?void 0:le.entryCount)??0,content:l.jsx("div",{className:"space-y-5",children:E.comments&&E.comments.entries.length>0?l.jsx(Ww,{projectSlug:e,assignmentSlug:t,entries:E.comments.entries}):l.jsx(Ke,{title:"No comments yet",description:"Comments appear here when agents or humans post via `syntaur comment` or the dashboard."})})},{value:"decisions",label:"Decisions",count:((pe=E.decisionRecord)==null?void 0:pe.decisionCount)??0,content:l.jsx("div",{className:"space-y-5",children:E.decisionRecord?l.jsx(Pe,{children:l.jsx(Ut,{content:E.decisionRecord.body,emptyState:"No decision history yet."})}):l.jsx(Ke,{title:"No decision record yet",description:"Decision records appear here when you append one via the Append Decision action."})})}]})}),l.jsxs("div",{className:"space-y-5",children:[l.jsx(Pe,{title:"Details",children:l.jsxs("dl",{className:"space-y-3 text-sm",children:[l.jsx(yo,{label:"ID",value:E.id,copyable:!0}),l.jsx(yo,{label:"Priority",value:E.priority}),E.assignee&&l.jsx(yo,{label:"Assignee",value:E.assignee}),l.jsx(yo,{label:"Updated",value:`${pN(E.updated)} · Created ${fN(E.created)}`}),E.workspace.repository&&l.jsx(yo,{label:"Repository",value:E.workspace.repository,copyable:!0}),E.workspace.worktreePath&&l.jsx(yo,{label:"Worktree",value:E.workspace.worktreePath,copyable:!0}),E.workspace.branch&&l.jsx(yo,{label:"Branch",value:E.workspace.branch,copyable:!0}),E.workspace.parentBranch&&l.jsx(yo,{label:"Parent branch",value:E.workspace.parentBranch,copyable:!0})]})}),Ct.length>0&&l.jsx(Pe,{title:"Servers",children:l.jsx("div",{className:"space-y-2",children:Ct.map((ne,me)=>l.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[l.jsx("span",{className:"rounded bg-muted/60 px-1.5 py-0.5 font-mono text-xs",children:ne.command}),l.jsx("span",{className:"text-xs text-muted-foreground",children:ne.sessionName}),ne.urls.map(ke=>l.jsxs("a",{href:ke,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-primary hover:underline",children:[ke.replace("http://localhost:",":"),l.jsx(wv,{className:"h-2.5 w-2.5"})]},ke))]},me))})}),X&&X.sessions.length>0&&l.jsx(Pe,{title:"Agent Sessions",children:l.jsx("div",{className:"space-y-2",children:X.sessions.map(ne=>l.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 text-sm",children:[l.jsxs("span",{className:"flex items-center gap-1.5",children:[l.jsx(uc,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),l.jsx("span",{className:"font-medium text-foreground",children:ne.agent}),l.jsxs("span",{className:"inline-flex items-center gap-1.5 font-mono text-xs text-muted-foreground",title:ne.sessionId,children:[ne.sessionId.slice(0,8),l.jsx(Hr,{value:ne.sessionId})]})]}),l.jsxs("span",{className:"flex items-center gap-2",children:[l.jsx(Ht,{status:ne.status}),l.jsx("span",{className:"text-xs text-muted-foreground",children:Cr(ne.started)})]})]},ne.sessionId))})})]})]}),l.jsx(Lb,{open:h!==null,action:h,assignmentTitle:E.title,loading:p===(h==null?void 0:h.command),onOpenChange:ne=>{ne||x(null)},onConfirm:async ne=>{if(!h)return;await hn(h,ne)&&x(null)}}),l.jsx(sw,{open:j,title:"Delete assignment?",description:`This will permanently delete "${E.title}" and all its files (plan, scratchpad, handoff, decision record). This cannot be undone.`,confirmLabel:"Delete Assignment",destructive:!0,loading:T,onOpenChange:ne=>{ne||S(!1)},onConfirm:cn})]})}function yo({label:e,value:t,copyable:n}){return l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsx("dt",{className:"text-muted-foreground",children:e}),l.jsxs("dd",{className:"flex items-center gap-1.5 max-w-[60%] text-right text-foreground break-all",children:[l.jsx("span",{className:"truncate",title:t,children:t}),n&&t!=="—"&&l.jsx(Hr,{value:t})]})]})}function mI(){var d,p,m,h,x;const{id:e}=St(),[t,n]=_s(),o=t.get("tab")??"summary",{data:i,loading:a,error:c}=jN(e);return a?l.jsx(bt,{}):c?l.jsx(gt,{error:c}):i?l.jsxs("div",{className:"space-y-6",children:[l.jsxs("header",{className:"space-y-2",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[l.jsx(Ht,{status:i.status}),l.jsx("span",{className:"text-xs font-mono text-neutral-500",children:i.id}),l.jsx(Ce,{to:`/assignments/${i.id}/edit`,className:"ml-auto rounded border border-neutral-700 px-2 py-1 text-xs text-neutral-300 hover:border-neutral-500 hover:text-neutral-100",children:"Edit"})]}),l.jsx("h1",{className:"text-2xl font-semibold text-neutral-100",children:i.title}),i.blockedReason?l.jsxs("p",{className:"text-sm text-amber-300",children:["Blocked: ",i.blockedReason]}):null]}),i.referencedBy&&i.referencedBy.length>0?l.jsx(Pe,{title:"Referenced by",description:"Other assignments whose bodies link to this one.",children:l.jsx("ul",{className:"space-y-2",children:i.referencedBy.map(v=>l.jsxs("li",{className:"flex items-center gap-2 text-sm",children:[l.jsx(Ce,{to:v.sourceProjectSlug===null?`/assignments/${v.sourceId}`:`/projects/${v.sourceProjectSlug}/assignments/${v.sourceSlug}`,className:"text-foreground hover:text-primary",children:v.sourceTitle}),l.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",v.mentions," mention",v.mentions===1?"":"s",")"]})]},v.sourceId))})}):null,l.jsx(Cp,{value:o,onValueChange:v=>n({tab:v}),items:[{value:"summary",label:"Summary",content:l.jsx("div",{className:"space-y-5",children:l.jsx(Pe,{title:"Assignment",children:l.jsx(Ut,{content:i.body,emptyState:"This assignment does not have summary markdown yet."})})})},{value:"progress",label:"Progress",count:((d=i.progress)==null?void 0:d.entryCount)??0,content:l.jsx("div",{className:"space-y-5",children:i.progress&&i.progress.entries.length>0?l.jsx(Pe,{title:"Progress",description:"Reverse-chronological log of work done on this assignment.",children:l.jsx("ol",{className:"space-y-4",children:i.progress.entries.map((v,b)=>l.jsxs("li",{className:"border-l-2 border-neutral-700 pl-3",children:[l.jsx("div",{className:"text-xs font-mono text-neutral-400",children:v.timestamp}),l.jsx(Ut,{content:v.body})]},`${v.timestamp}-${b}`))})}):l.jsx(Ke,{title:"No progress entries yet",description:"Progress entries appear here as the agent appends them to progress.md."})})},{value:"comments",label:"Comments",count:((p=i.comments)==null?void 0:p.entryCount)??0,content:l.jsx("div",{className:"space-y-5",children:l.jsx(Ww,{projectSlug:null,assignmentSlug:i.id,entries:((m=i.comments)==null?void 0:m.entries)??[]})})},{value:"plan",label:"Plan",content:l.jsx("div",{className:"space-y-5",children:i.plan?l.jsxs(Pe,{children:[l.jsx(Ut,{content:i.plan.body,emptyState:"Plan file exists but is empty."}),l.jsx("div",{className:"mt-3 flex justify-end",children:l.jsx(Ce,{to:`/assignments/${i.id}/plan/edit`,className:"rounded border border-neutral-700 px-2 py-1 text-xs text-neutral-300 hover:border-neutral-500 hover:text-neutral-100",children:"Edit plan"})})]}):l.jsx(Ke,{title:"No plan file yet",description:"Create one via the CLI or `/plan-assignment`."})})},{value:"scratchpad",label:"Scratchpad",content:l.jsx("div",{className:"space-y-5",children:i.scratchpad?l.jsxs(Pe,{children:[l.jsx(Ut,{content:i.scratchpad.body,emptyState:"Scratchpad is empty."}),l.jsx("div",{className:"mt-3 flex justify-end",children:l.jsx(Ce,{to:`/assignments/${i.id}/scratchpad/edit`,className:"rounded border border-neutral-700 px-2 py-1 text-xs text-neutral-300 hover:border-neutral-500 hover:text-neutral-100",children:"Edit scratchpad"})})]}):l.jsx(Ke,{title:"No scratchpad yet",description:"Scratchpad is scaffolded at assignment creation time."})})},{value:"handoff",label:"Handoff",count:((h=i.handoff)==null?void 0:h.handoffCount)??0,content:l.jsx("div",{className:"space-y-5",children:i.handoff?l.jsxs(Pe,{children:[l.jsx(Ut,{content:i.handoff.body,emptyState:"No handoff history yet."}),l.jsx("div",{className:"mt-3 flex justify-end",children:l.jsx(Ce,{to:`/assignments/${i.id}/handoff/edit`,className:"rounded border border-neutral-700 px-2 py-1 text-xs text-neutral-300 hover:border-neutral-500 hover:text-neutral-100",children:"Append handoff"})})]}):l.jsx(Ke,{title:"No handoff log yet",description:"Handoffs appear here when an agent appends one."})})},{value:"decisions",label:"Decisions",count:((x=i.decisionRecord)==null?void 0:x.decisionCount)??0,content:l.jsx("div",{className:"space-y-5",children:i.decisionRecord?l.jsxs(Pe,{children:[l.jsx(Ut,{content:i.decisionRecord.body,emptyState:"No decision history yet."}),l.jsx("div",{className:"mt-3 flex justify-end",children:l.jsx(Ce,{to:`/assignments/${i.id}/decision-record/edit`,className:"rounded border border-neutral-700 px-2 py-1 text-xs text-neutral-300 hover:border-neutral-500 hover:text-neutral-100",children:"Append decision"})})]}):l.jsx(Ke,{title:"No decision record yet",description:"Decision records appear here once appended."})})}]})]}):l.jsx(gt,{error:"Assignment not found"})}const gI=["table","list","kanban"],Cy={critical:0,high:1,medium:2,low:3};function Ny(e){return e==="1"?"stale":e==="0"?"fresh":"all"}function xI(e,t){return e.toString()===t.toString()}function Ey(e){const t=Date.parse(e);return Number.isNaN(t)?!1:Date.now()-t>10080*60*1e3}function yI(e,t,n){return[...e].sort((i,a)=>{let c=0;switch(t){case"title":c=i.title.localeCompare(a.title);break;case"status":c=i.status.localeCompare(a.status);break;case"priority":c=(Cy[i.priority]??99)-(Cy[a.priority]??99);break;case"assignee":c=(i.assignee??"").localeCompare(a.assignee??"");break;case"dependencies":c=i.dependsOn.length-a.dependsOn.length;break;case"updated":c=i.updated.localeCompare(a.updated);break}return n==="asc"?c:-c})}function Ry(){const{workspace:e}=St(),t=Rt(),n=Wt(),o=g.useRef(null);zs("list:assignments");const{data:i,loading:a,error:c,refetch:d}=Uv(),p=bc(),[m,h]=_s(),x=g.useMemo(()=>XE(p.order),[p]),v=g.useMemo(()=>{const U={};for(const ae of x)U[ae]=qE(p,ae);return U},[x,p]),b=g.useMemo(()=>x.map(U=>({id:U,title:v[U]??U,description:I0(U)})),[x,v]),N=g.useMemo(()=>new Set(["all",...x]),[x]),k=m.get("view"),j=m.get("status"),S=m.get("stale"),T=k&&gI.includes(k)?k:"kanban";function A(U){return!U||!N.has(U)?"all":U}const L=g.useCallback(U=>{h(ae=>{const ge=new URLSearchParams(ae);return U==="kanban"?ge.delete("view"):ge.set("view",U),ge})},[h]),[O,P]=g.useState(""),[$,E]=g.useState(()=>A(j)),[H,Z]=g.useState("all"),[K,q]=g.useState("all"),[Y,X]=g.useState("all"),[_,D]=g.useState(()=>Ny(S)),[V,W]=g.useState("updated"),[ee,R]=g.useState("desc"),[F,J]=g.useState(()=>new Set(x)),[I,de]=g.useState([]),[ve,fe]=g.useState(null),[Ee,Ne]=g.useState(null),[Re,je]=g.useState(null),[ut,tt]=g.useState(null),[Ue,Be]=g.useState(null);g.useEffect(()=>{de((i==null?void 0:i.assignments)??[])},[i]),g.useEffect(()=>{const U=A(j);U!==$&&E(U);const ae=Ny(S);ae!==_&&D(ae)},[_,S,$,j]),g.useEffect(()=>{h(U=>{const ae=new URLSearchParams(U);return $==="all"?ae.delete("status"):ae.set("status",$),_==="all"?ae.delete("stale"):_==="stale"?ae.set("stale","1"):ae.set("stale","0"),xI(U,ae)?U:ae})},[_,h,$]);const Ct=g.useMemo(()=>Array.from(new Set(I.map(U=>U.status))).sort(),[I]),Ot=g.useMemo(()=>Array.from(new Set(I.map(U=>U.priority))).sort(),[I]),cn=g.useMemo(()=>Array.from(new Set(I.map(U=>U.assignee??"__unassigned__"))).sort(),[I]),hn=g.useMemo(()=>Array.from(new Map(I.filter(U=>U.projectSlug!==null).map(U=>[U.projectSlug,U.projectTitle]))).sort(([,U],[,ae])=>U.localeCompare(ae)),[I]),Xe=g.useMemo(()=>I.filter(U=>{if(e){if(e==="_ungrouped"){if(U.projectWorkspace!==null)return!1}else if(U.projectWorkspace!==e)return!1}if($!=="all"&&U.status!==$||H!=="all"&&U.priority!==H||_==="stale"&&!Ey(U.updated)||_==="fresh"&&Ey(U.updated)||K!=="all"&&(U.assignee??"__unassigned__")!==K)return!1;if(Y!=="all"){if(Y==="__standalone__"){if(U.projectSlug!==null)return!1}else if(U.projectSlug!==Y)return!1}const ae=O.trim().toLowerCase();return!(ae&&!`${U.title} ${U.slug} ${U.projectTitle??"standalone"} ${U.projectSlug??""}`.toLowerCase().includes(ae))}),[_,I,O,$,H,K,Y,e]),nt=g.useMemo(()=>yI(Xe,V,ee),[Xe,V,ee]),{visibleItems:Vt,visibleIndexByKey:Qt}=g.useMemo(()=>{const U=T==="table"?nt:x.flatMap(ge=>Xe.filter(Oe=>Oe.status===ge)),ae=new Map;return U.forEach((ge,Oe)=>ae.set(Xt(ge),Oe)),{visibleItems:U,visibleIndexByKey:ae}},[T,nt,Xe,x]),{hotkeyRowProps:mn}=yc(Vt,{scope:"list:assignments",onOpen:U=>{if(U.projectSlug===null){n(`/assignments/${U.id}`);return}const ae=U.projectWorkspace?`/w/${U.projectWorkspace}`:t;n(`${ae}/projects/${U.projectSlug}/assignments/${U.slug}`)}});if(vt({keys:"/",scope:"list:assignments",description:"Focus filter",handler:()=>{var U;return(U=o.current)==null?void 0:U.focus()}}),vt({keys:"r",scope:"list:assignments",description:"Refresh",handler:()=>d()}),a)return l.jsx(bt,{label:"Loading assignments board…"});if(c||!i)return l.jsx(gt,{error:c||"Assignments board is unavailable."});async function Pn({item:U,toColumnId:ae,action:ge,reason:Oe}){fe(null),Ne(Xt(U));const zn=I;de(Zt=>Zt.map(dt=>Xt(dt)===Xt(U)?{...dt,status:ae,blockedReason:ae==="blocked"?Oe??dt.blockedReason:null}:dt));try{if(U.projectSlug===null){if(!ge)throw new Error("Standalone assignments require a transition action, not status override.");const dt=await fetch(`/api/assignments/${encodeURIComponent(U.id)}/transitions/${encodeURIComponent(ge.command)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Oe?{reason:Oe}:{})});if(!dt.ok)throw new Error((await dt.json()).error??`HTTP ${dt.status}`);const Ye=(await dt.json()).assignment;de(wt=>wt.map(Mt=>Xt(Mt)===Xt(U)?{...Mt,status:Ye.status,blockedReason:Ye.blockedReason,availableTransitions:Ye.availableTransitions,updated:Ye.updated}:Mt));return}const Zt=ge?await Bw(U.projectSlug,U.slug,ge,Oe):await Uw(U.projectSlug,U.slug,ae);return de(dt=>dt.map(Fe=>Xt(Fe)===Xt(U)?{...Fe,status:Zt.status,blockedReason:Zt.blockedReason,availableTransitions:Zt.availableTransitions,updated:Zt.updated}:Fe)),d(),!0}catch(Zt){return de(zn),fe(Zt.message),!1}finally{Ne(null)}}async function Tn({item:U,toColumnId:ae}){if(U.status===ae)return;const ge=Mi(U,ae);if(ge!=null&&ge.disabled){fe(ge.disabledReason||`Cannot move this assignment to ${ae}.`);return}if(ge&&Hw(ge)){Be({item:U,toColumnId:ae,action:ge});return}await Pn({item:U,toColumnId:ae,action:ge})}function re(U){J(ae=>{const ge=new Set(ae);return ge.has(U)?ge.delete(U):ge.add(U),ge})}function le(U){V===U?R(ae=>ae==="asc"?"desc":"asc"):(W(U),R("asc"))}const pe=Re?I.find(U=>Xt(U)===Re)??null:null;function ne(U,ae){U.dataTransfer.effectAllowed="move",U.dataTransfer.setData("text/plain",ae),je(ae)}function me(){je(null),tt(null)}function ke(U,ae){if(!pe)return;const ge=Mi(pe,ae);pe.status===ae||ge!=null&&ge.disabled||(U.preventDefault(),U.dataTransfer.dropEffect="move",tt(ae))}function _t(U,ae){ut===ae&&!U.currentTarget.contains(U.relatedTarget)&&tt(null)}function Jt(U,ae){if(U.preventDefault(),!pe||pe.status===ae){me();return}me(),Tn({item:pe,toColumnId:ae})}function qt({field:U,children:ae}){const ge=V===U;return l.jsx("th",{className:"pb-3 font-medium",children:l.jsxs("button",{type:"button",onClick:()=>le(U),className:"inline-flex items-center gap-1 hover:text-foreground",children:[ae,ge?ee==="asc"?l.jsx(bv,{className:"h-3 w-3"}):l.jsx(Xi,{className:"h-3 w-3"}):null]})})}return l.jsxs("div",{className:"space-y-5",children:[l.jsx("div",{className:"flex items-center justify-end",children:l.jsxs(Ce,{to:`${t}/assignments/new`,className:"inline-flex h-9 items-center gap-2 rounded-md bg-foreground px-3 text-sm font-medium text-background transition hover:bg-foreground/90",children:[l.jsx(Xn,{className:"h-4 w-4"}),"New Assignment"]})}),l.jsxs(wp,{children:[l.jsx(vc,{ref:o,value:O,onChange:P,placeholder:"Search assignments or projects"}),l.jsxs("select",{value:$,onChange:U=>E(A(U.target.value)),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"all",children:"All statuses"}),Ct.map(U=>l.jsx("option",{value:U,children:v[U]??U},U))]}),l.jsxs("select",{value:H,onChange:U=>Z(U.target.value),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"all",children:"All priorities"}),Ot.map(U=>l.jsx("option",{value:U,className:"capitalize",children:U},U))]}),l.jsxs("select",{value:K,onChange:U=>q(U.target.value),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"all",children:"All assignees"}),cn.map(U=>l.jsx("option",{value:U,children:U==="__unassigned__"?"Unassigned":U},U))]}),l.jsxs("select",{value:Y,onChange:U=>X(U.target.value),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"all",children:"All projects"}),l.jsx("option",{value:"__standalone__",children:"Standalone"}),hn.map(([U,ae])=>l.jsx("option",{value:U,children:ae},U))]}),l.jsxs("select",{value:_,onChange:U=>D(U.target.value),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"all",children:"All activity"}),l.jsx("option",{value:"stale",children:"Stale only"}),l.jsx("option",{value:"fresh",children:"Fresh only"})]}),l.jsx(kp,{value:T,onChange:U=>L(U),options:[{value:"table",label:"Table"},{value:"list",label:"List"},{value:"kanban",label:"Kanban"}]})]}),ve?l.jsx("div",{className:"rounded-md border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-700 dark:border-rose-900 dark:bg-rose-950/30 dark:text-rose-300",children:ve}):null,i.assignments.length===0?l.jsx(Ke,{title:"No assignments yet",description:"Assignments appear here once projects contain concrete work items.",actions:l.jsxs(Ce,{className:"shell-action bg-foreground text-background hover:opacity-90",to:`${t}/projects`,children:[l.jsx(np,{className:"h-4 w-4"}),l.jsx("span",{children:"Browse Projects"})]})}):Xe.length===0?l.jsx(Ke,{title:"No assignments match these filters",description:"Adjust the search term or filters to show assignments across all projects again."}):T==="table"?l.jsx(Pe,{title:`${nt.length} assignment${nt.length===1?"":"s"}`,children:l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full min-w-[760px] text-left text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"border-b border-border/60 text-muted-foreground",children:[l.jsx(qt,{field:"title",children:"Assignment"}),l.jsx(qt,{field:"status",children:"Status"}),l.jsx(qt,{field:"priority",children:"Priority"}),l.jsx(qt,{field:"assignee",children:"Assignee"}),l.jsx(qt,{field:"dependencies",children:"Dependencies"}),l.jsx(qt,{field:"updated",children:"Updated"})]})}),l.jsx("tbody",{children:nt.map((U,ae)=>l.jsxs("tr",{className:"border-b border-border/50 last:border-0",...mn(ae),children:[l.jsxs("td",{className:"py-4 pr-4",children:[l.jsx(Ce,{to:U.projectSlug===null?`/assignments/${U.id}`:`${t}/projects/${U.projectSlug}/assignments/${U.slug}`,className:"font-semibold text-foreground hover:text-primary",children:U.title}),l.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:U.projectTitle??l.jsx("span",{className:"rounded bg-neutral-800 px-1.5 py-0.5 font-mono text-[10px] uppercase text-neutral-300",children:"Standalone"})}),l.jsxs("p",{className:"mt-0.5 inline-flex items-center gap-1.5 font-mono text-xs text-muted-foreground/70",title:U.id,children:[U.id.slice(0,8),l.jsx(Hr,{value:U.id})]})]}),l.jsx("td",{className:"py-4 pr-4",children:l.jsx("select",{value:U.status,disabled:Ee===Xt(U),onChange:ge=>Tn({item:U,toColumnId:ge.target.value}),className:$e("appearance-none rounded-full border px-2.5 py-0.5 text-xs font-semibold tracking-wide outline-none","cursor-pointer bg-[length:12px] bg-[right_6px_center] bg-no-repeat pr-6",`bg-[url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'/%3E%3C/svg%3E")]`,(Ya[U.status]??Ya.pending).className,Ee===Xt(U)&&"animate-pulse opacity-60"),children:x.map(ge=>{const Oe=U.status===ge?void 0:Mi(U,ge),zn=(Oe==null?void 0:Oe.disabled)??!1;return l.jsx("option",{value:ge,disabled:zn,title:zn?(Oe==null?void 0:Oe.disabledReason)??void 0:void 0,children:v[ge]},ge)})})}),l.jsx("td",{className:"py-4 pr-4 capitalize text-muted-foreground",children:U.priority}),l.jsx("td",{className:"py-4 pr-4 text-muted-foreground",children:U.assignee??"Unassigned"}),l.jsx("td",{className:"py-4 pr-4 text-muted-foreground",children:U.dependsOn.length}),l.jsx("td",{className:"py-4 text-muted-foreground",children:ko(U.updated)})]},Xt(U)))})]})})}):T==="list"?l.jsx("div",{className:"space-y-3",children:x.map(U=>{var dt;const ae=Xe.filter(Fe=>Fe.status===U);if(ae.length===0&&!pe)return null;const ge=F.has(U),Oe=pe?pe.status!==U&&!((dt=Mi(pe,U))!=null&&dt.disabled):!1,zn=pe?pe.status!==U&&!Oe:!1,Zt=ut===U;return l.jsxs("div",{className:$e("rounded-lg border border-border/60 bg-card/90 transition",Zt&&Oe&&"ring-2 ring-ring/30",zn&&"border-dashed opacity-65"),onDragOver:Fe=>ke(Fe,U),onDragLeave:Fe=>_t(Fe,U),onDrop:Fe=>Jt(Fe,U),children:[l.jsxs("button",{type:"button",onClick:()=>re(U),className:"flex w-full items-center gap-2 px-4 py-3 text-left",children:[l.jsx(Xi,{className:`h-4 w-4 text-muted-foreground transition-transform ${ge?"":"-rotate-90"}`}),l.jsx("span",{className:"font-semibold text-foreground",children:v[U]}),l.jsx("span",{className:"rounded-full border border-border/60 px-2 py-0.5 text-xs text-muted-foreground",children:ae.length})]}),ge&&ae.length>0&&l.jsx("div",{className:"space-y-3 px-4 pb-4",children:ae.map(Fe=>{const Ye=Xt(Fe),wt=Re===Ye,Mt=Qt.get(Ye)??-1;return l.jsx("div",{draggable:!0,onDragStart:Gt=>ne(Gt,Ye),onDragEnd:me,...Mt>=0?mn(Mt):{},className:$e("cursor-grab transition active:cursor-grabbing",wt&&"scale-[0.98] opacity-50"),children:l.jsx(Py,{assignment:Fe,dragging:wt,transitioning:Ee===Ye})},Ye)})})]},U)})}):l.jsx(L0,{columns:b,items:Xe,getItemId:Xt,getColumnId:U=>U.status,canDrop:({item:U,fromColumnId:ae,toColumnId:ge})=>{if(ae===ge)return{allowed:!0};const Oe=Mi(U,ge);return Oe!=null&&Oe.disabled?{allowed:!1,reason:Oe.disabledReason||Oe.description}:{allowed:!0,reason:Oe?Oe.warning||Oe.description:`Move to ${ge} (direct status change).`}},onMove:({item:U,toColumnId:ae})=>Tn({item:U,toColumnId:ae}),emptyMessage:U=>`No ${U.title.toLowerCase()} assignments.`,renderCard:(U,{dragging:ae})=>{const ge=Qt.get(Xt(U))??-1;return l.jsx("div",{...ge>=0?mn(ge):{},children:l.jsx(Py,{assignment:U,dragging:ae,transitioning:Ee===Xt(U)})})}}),l.jsx(Lb,{open:Ue!==null,action:(Ue==null?void 0:Ue.action)??null,assignmentTitle:(Ue==null?void 0:Ue.item.title)??"Assignment",loading:Ee===(Ue?Xt(Ue.item):null),onOpenChange:U=>{U||Be(null)},onConfirm:async U=>{if(!Ue)return;const ae=Ue;await Pn({item:ae.item,toColumnId:ae.toColumnId,action:ae.action,reason:U})&&Be(null)}})]})}function Py({assignment:e,dragging:t,transitioning:n}){var i;const o=Rt();return l.jsxs("div",{className:"rounded-lg border border-border/60 bg-background/85 p-3 shadow-sm",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx(Ce,{to:e.projectSlug===null?`/assignments/${e.id}`:`${o}/projects/${e.projectSlug}/assignments/${e.slug}`,className:"text-base font-semibold text-foreground hover:text-primary",children:e.title}),l.jsx("p",{className:"text-sm text-muted-foreground",children:e.projectTitle??l.jsx("span",{className:"rounded bg-neutral-800 px-1.5 py-0.5 font-mono text-[10px] uppercase text-neutral-300",children:"Standalone"})}),l.jsxs("p",{className:"inline-flex items-center gap-1.5 font-mono text-xs text-muted-foreground/70",title:e.id??"",children:[(i=e.id)==null?void 0:i.slice(0,8),e.id&&l.jsx(Hr,{value:e.id})]})]}),l.jsx(Ht,{status:e.status})]}),e.blockedReason?l.jsx("p",{className:"mt-3 rounded-md border border-amber-200/70 bg-amber-50/80 px-3 py-2 text-sm text-amber-800 dark:border-amber-900/70 dark:bg-amber-950/20 dark:text-amber-300",children:e.blockedReason}):null,l.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[l.jsx("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs capitalize text-muted-foreground",children:e.priority}),l.jsx("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:e.assignee??"Unassigned"}),l.jsxs("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:[e.dependsOn.length," dependencies"]})]}),l.jsxs("div",{className:"mt-4 flex items-center justify-between gap-3 text-xs uppercase tracking-[0.08em] text-muted-foreground",children:[l.jsx("span",{children:n?"Updating":t?"Dragging":"Source-first"}),l.jsx("span",{children:ko(e.updated)})]})]})}function Mi(e,t){return e.availableTransitions.find(n=>n.targetStatus===t)}function Xt(e){return e.id||e.slug||"unknown"}function Tr(e){const t=e.match(/^---\n([\s\S]*?)\n---\n?/);if(!t)return{order:[],blocks:new Map,body:e};const n=t[1],o=e.slice(t[0].length),i=n.split(`
|
|
471
|
-
`),a=[],c=new Map;let d=null,p=[];const m=()=>{d&&(a.push(d),c.set(d,p))};for(const h of i){const x=h.match(/^([A-Za-z_][A-Za-z0-9_-]*):/);if(x&&!h.startsWith(" ")){m(),d=x[1],p=[h];continue}d&&p.push(h)}return m(),{order:a,blocks:c,body:o}}function pl(e){return`---
|
|
472
|
-
${e.order.map(n=>e.blocks.get(n)).filter(n=>!!n).flat().join(`
|
|
473
|
-
`)}
|
|
474
|
-
---
|
|
475
|
-
|
|
476
|
-
${e.body.replace(/^\n+/,"")}`}function It(e,t){const n=e.blocks.get(t);if(!(n!=null&&n[0]))return"";const o=n[0].match(/^[^:]+:\s*(.*)$/);if(!o)return"";const i=o[1].trim();return i==="null"?"":i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'")?i.slice(1,-1):i}function vI(e,t){return It(e,t)==="true"}function Hi(e,t){const n=e.blocks.get(t);return n!=null&&n.length?n[0].trim().endsWith("[]")?[]:n.slice(1).map(o=>o.trim()).filter(o=>o.startsWith("- ")).map(o=>o.slice(2).trim()):[]}function bI(e){return typeof e=="boolean"?e?"true":"false":e===null||e===""?"null":/^\d{4}-\d{2}-\d{2}T/.test(e)?`"${e}"`:/[:#{}[\],&*?|>!%@`]/.test(e)||/^\s|\s$/.test(e)?`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`:e}function Lt(e,t,n){e.blocks.has(t)||e.order.push(t),e.blocks.set(t,[`${t}: ${bI(n)}`])}function Wi(e,t,n){if(e.blocks.has(t)||e.order.push(t),n.length===0){e.blocks.set(t,[`${t}: []`]);return}e.blocks.set(t,[`${t}:`,...n.map(o=>` - ${o}`)])}function Vi(e){return e.split(",").map(t=>t.trim()).filter(Boolean)}function Ac(e){const t=Tr(e);return{title:It(t,"title"),slug:It(t,"slug"),workspace:It(t,"workspace"),archived:vI(t,"archived"),archivedAt:It(t,"archivedAt"),archivedReason:It(t,"archivedReason"),tags:Hi(t,"tags").join(", "),body:t.body}}function wI(e,t){const n=Tr(e),o={...Ac(e),...t};return Lt(n,"title",o.title),Lt(n,"slug",o.slug),Lt(n,"workspace",o.workspace||null),Lt(n,"archived",o.archived),Lt(n,"archivedAt",o.archivedAt||null),Lt(n,"archivedReason",o.archivedReason||null),Wi(n,"tags",Vi(o.tags)),n.body=o.body,pl(n)}function Dc(e){const t=Tr(e);return{title:It(t,"title"),slug:It(t,"slug"),status:It(t,"status"),priority:It(t,"priority")||"medium",assignee:It(t,"assignee"),dependsOn:Hi(t,"dependsOn").join(", "),links:Hi(t,"links").join(", "),blockedReason:It(t,"blockedReason"),tags:Hi(t,"tags").join(", "),body:t.body}}function kI(e,t){const n=Tr(e),o={...Dc(e),...t};return Lt(n,"title",o.title),Lt(n,"slug",o.slug),Lt(n,"status",o.status),Lt(n,"priority",o.priority),Lt(n,"assignee",o.assignee||null),Wi(n,"dependsOn",Vi(o.dependsOn)),Wi(n,"links",Vi(o.links)),Lt(n,"blockedReason",o.blockedReason||null),Wi(n,"tags",Vi(o.tags)),n.body=o.body,pl(n)}function Ic(e){const t=Tr(e);return{assignment:It(t,"assignment"),status:It(t,"status"),body:t.body}}function jI(e,t){const n=Tr(e),o={...Ic(e),...t};return Lt(n,"assignment",o.assignment),Lt(n,"status",o.status),n.body=o.body,pl(n)}function Lc(e){const t=Tr(e);return{assignment:It(t,"assignment"),body:t.body}}function SI(e,t){const n=Tr(e),o={...Lc(e),...t};return Lt(n,"assignment",o.assignment),n.body=o.body,pl(n)}function Oc(e){const t=Tr(e);return{name:It(t,"name"),slug:It(t,"slug"),description:It(t,"description"),whenToUse:It(t,"when_to_use"),tags:Hi(t,"tags").join(", "),body:t.body}}function CI(e,t){const n=Tr(e),o={...Oc(e),...t};return Lt(n,"name",o.name),Lt(n,"slug",o.slug),Lt(n,"description",o.description||null),Lt(n,"when_to_use",o.whenToUse||null),Wi(n,"tags",Vi(o.tags)),n.body=o.body,pl(n)}function at(e,t,n){switch(e){case"project":return wI(t,n);case"assignment":return kI(t,n);case"plan":return jI(t,n);case"scratchpad":return SI(t,n);case"playbook":return CI(t,n);default:return t}}function Ur(e){return e.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}function nf(e){return/^[a-z0-9]+(-[a-z0-9]+)*$/.test(e)}function Vs({initialContent:e,documentType:t,mode:n="edit",onSave:o,saving:i,error:a,title:c,description:d,onCancel:p,helpTitle:m,helpBody:h,allowSlugEdit:x=!1}){const[v,b]=g.useState(e),[N,k]=g.useState(!1),[j,S]=g.useState("edit");g.useEffect(()=>{b(e)},[e]);const T=PI(t,v),A=v!==e,L=RI(t,v),O=A?"Unsaved changes":n==="create"?"Draft":"Saved";return l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"rounded-lg border border-border/70 bg-card/90 p-3 shadow-sm",children:[l.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("h1",{className:"text-lg font-semibold text-foreground",children:c}),l.jsx("span",{className:"rounded-full border border-border/70 bg-background/80 px-2.5 py-1 text-xs font-medium text-muted-foreground",children:O})]}),d?l.jsx("p",{className:"max-w-3xl text-sm leading-6 text-muted-foreground",children:d}):null]}),l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsxs("button",{type:"button",onClick:p,className:"shell-action",children:[l.jsx(yv,{className:"h-4 w-4"}),l.jsx("span",{children:"Back"})]}),l.jsxs("button",{type:"button",onClick:()=>k(P=>!P),className:"shell-action",children:[l.jsx(aC,{className:"h-4 w-4"}),l.jsx("span",{children:N?"Structured":"Raw Markdown"})]}),l.jsxs("button",{type:"button",onClick:()=>o(v),disabled:i||T.length>0,className:"inline-flex items-center gap-2 rounded-md bg-foreground px-4 py-2 text-sm font-semibold text-background transition hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",children:[l.jsx(op,{className:"h-4 w-4"}),l.jsx("span",{children:i?"Saving…":"Save"})]})]})]}),a?l.jsx("p",{className:"mt-4 rounded-md border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-700 dark:border-rose-900 dark:bg-rose-950/30 dark:text-rose-300",children:a}):null,T.length>0?l.jsx("div",{className:"mt-4 rounded-md border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-800 dark:border-amber-900 dark:bg-amber-950/30 dark:text-amber-300",children:l.jsx("ul",{className:"space-y-1",children:T.map(P=>l.jsx("li",{children:P},P))})}):null]}),l.jsxs("div",{className:"flex items-center gap-2 md:hidden",children:[l.jsx("button",{type:"button",onClick:()=>S("edit"),className:`shell-action ${j==="edit"?"bg-foreground text-background":""}`,children:"Edit"}),l.jsxs("button",{type:"button",onClick:()=>S("preview"),className:`shell-action ${j==="preview"?"bg-foreground text-background":""}`,children:[l.jsx(ex,{className:"h-4 w-4"}),"Preview"]})]}),l.jsxs("div",{className:"grid gap-3 xl:grid-cols-[minmax(0,1.2fr)_minmax(320px,0.8fr)]",children:[l.jsx("div",{className:j==="preview"?"hidden md:block":"",children:l.jsx("div",{className:"surface-panel space-y-3",children:N?l.jsx("textarea",{value:v,onChange:P=>b(P.target.value),className:"min-h-[720px] w-full rounded-md border border-border/70 bg-background/90 p-4 font-mono text-sm text-foreground outline-none transition focus:border-primary focus:ring-2 focus:ring-ring/30",spellCheck:!1}):l.jsx(NI,{documentType:t,content:v,onChange:b,allowSlugEdit:x})})}),l.jsx("div",{className:j==="edit"?"hidden md:block":"",children:l.jsxs("div",{className:"surface-panel sticky top-16 space-y-4",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(ex,{className:"h-4 w-4 text-muted-foreground"}),l.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"Preview"})]}),l.jsx(Ut,{content:L,emptyState:"Write markdown body content to preview it here."})]})})]})]})}function NI({documentType:e,content:t,onChange:n,allowSlugEdit:o}){if(e==="project"){const a=Ac(t);return l.jsxs("div",{className:"space-y-3",children:[l.jsxs($i,{children:[l.jsx(Je,{label:"Project title",children:l.jsx("input",{value:a.title,onChange:c=>{const d=c.target.value,p={title:d};o&&(a.slug===Ur(a.title)||!a.slug.trim())&&(p.slug=Ur(d)),n(at(e,t,p))},className:"editor-input"})}),l.jsx(Je,{label:"Slug",children:l.jsxs("div",{className:"space-y-2",children:[l.jsx("input",{value:a.slug,disabled:!o,onChange:c=>n(at(e,t,{slug:Ur(c.target.value)})),className:`editor-input ${o?"":"editor-input-disabled"}`}),l.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:o?"The slug becomes the folder name and URL. It is auto-generated from the title until you change it, and it cannot be renamed after creation.":"The slug is the folder name and URL-safe identifier. It is locked after creation so links and file paths stay stable."})]})}),l.jsx(Je,{label:"Tags",children:l.jsx("input",{value:a.tags,onChange:c=>n(at(e,t,{tags:c.target.value})),placeholder:"Comma-separated tags",className:"editor-input"})}),l.jsx(EI,{value:a.workspace,onChange:c=>n(at(e,t,{workspace:c}))})]}),l.jsx(Je,{label:"Project body",children:l.jsx("textarea",{value:a.body,onChange:c=>n(at(e,t,{body:c.target.value})),className:"editor-textarea",spellCheck:!1})})]})}if(e==="assignment"){const a=Dc(t);return l.jsxs("div",{className:"space-y-3",children:[l.jsxs($i,{children:[l.jsx(Je,{label:"Assignment title",children:l.jsx("input",{value:a.title,onChange:c=>{const d=c.target.value,p={title:d};o&&(a.slug===Ur(a.title)||!a.slug.trim())&&(p.slug=Ur(d)),n(at(e,t,p))},className:"editor-input"})}),l.jsx(Je,{label:"Slug",children:l.jsxs("div",{className:"space-y-2",children:[l.jsx("input",{value:a.slug,disabled:!o,onChange:c=>n(at(e,t,{slug:Ur(c.target.value)})),className:`editor-input ${o?"":"editor-input-disabled"}`}),l.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:o?"The slug becomes the assignment folder name and URL. It is auto-generated from the title until you change it, and it cannot be renamed after creation.":"The slug is locked after creation because assignment paths and dependency references use it as a stable identifier."})]})}),l.jsx(Je,{label:"Status",children:l.jsxs("select",{value:a.status,onChange:c=>n(at(e,t,{status:c.target.value})),className:"editor-input",children:[l.jsx("option",{value:"pending",children:"Pending"}),l.jsx("option",{value:"in_progress",children:"In Progress"}),l.jsx("option",{value:"blocked",children:"Blocked"}),l.jsx("option",{value:"review",children:"Review"}),l.jsx("option",{value:"completed",children:"Completed"}),l.jsx("option",{value:"failed",children:"Failed"})]})}),l.jsx(Je,{label:"Priority",children:l.jsxs("select",{value:a.priority,onChange:c=>n(at(e,t,{priority:c.target.value})),className:"editor-input",children:[l.jsx("option",{value:"low",children:"Low"}),l.jsx("option",{value:"medium",children:"Medium"}),l.jsx("option",{value:"high",children:"High"}),l.jsx("option",{value:"critical",children:"Critical"})]})}),l.jsx(Je,{label:"Assignee",children:l.jsx("input",{value:a.assignee,onChange:c=>n(at(e,t,{assignee:c.target.value})),placeholder:"Agent name",className:"editor-input"})}),l.jsx(Je,{label:"Depends on",className:"md:col-span-2",children:l.jsx("input",{value:a.dependsOn,onChange:c=>n(at(e,t,{dependsOn:c.target.value})),placeholder:"Comma-separated assignment slugs",className:"editor-input"})}),l.jsx(Je,{label:"Links",className:"md:col-span-2",children:l.jsx("input",{value:a.links,onChange:c=>n(at(e,t,{links:c.target.value})),placeholder:"Comma-separated: projectSlug/assignmentSlug",className:"editor-input"})}),l.jsx(Je,{label:"Blocked reason",className:"md:col-span-2",children:l.jsx("input",{value:a.blockedReason,onChange:c=>n(at(e,t,{blockedReason:c.target.value})),placeholder:"Read-only unless the assignment is actually blocked",className:"editor-input"})}),l.jsx(Je,{label:"Tags",className:"md:col-span-2",children:l.jsx("input",{value:a.tags,onChange:c=>n(at(e,t,{tags:c.target.value})),placeholder:"Comma-separated tags",className:"editor-input"})})]}),l.jsx(Je,{label:"Assignment body",children:l.jsx("textarea",{value:a.body,onChange:c=>n(at(e,t,{body:c.target.value})),className:"editor-textarea",spellCheck:!1})})]})}if(e==="plan"){const a=Ic(t);return l.jsxs("div",{className:"space-y-3",children:[l.jsxs($i,{children:[l.jsx(Je,{label:"Assignment",children:l.jsx("input",{value:a.assignment,disabled:!0,className:"editor-input editor-input-disabled"})}),l.jsx(Je,{label:"Plan status",children:l.jsxs("select",{value:a.status,onChange:c=>n(at(e,t,{status:c.target.value})),className:"editor-input",children:[l.jsx("option",{value:"draft",children:"Draft"}),l.jsx("option",{value:"approved",children:"Approved"}),l.jsx("option",{value:"in_progress",children:"In Progress"}),l.jsx("option",{value:"completed",children:"Completed"})]})})]}),l.jsx(Je,{label:"Plan body",children:l.jsx("textarea",{value:a.body,onChange:c=>n(at(e,t,{body:c.target.value})),className:"editor-textarea",spellCheck:!1})})]})}if(e==="scratchpad"){const a=Lc(t);return l.jsxs("div",{className:"space-y-3",children:[l.jsx($i,{children:l.jsx(Je,{label:"Assignment",children:l.jsx("input",{value:a.assignment,disabled:!0,className:"editor-input editor-input-disabled"})})}),l.jsx(Je,{label:"Scratchpad body",children:l.jsx("textarea",{value:a.body,onChange:c=>n(at(e,t,{body:c.target.value})),className:"editor-textarea",spellCheck:!1})})]})}const i=Oc(t);return l.jsxs("div",{className:"space-y-3",children:[l.jsxs($i,{children:[l.jsx(Je,{label:"Playbook name",children:l.jsx("input",{value:i.name,onChange:a=>{const c=a.target.value,d={name:c};o&&(i.slug===Ur(i.name)||!i.slug.trim())&&(d.slug=Ur(c)),n(at(e,t,d))},className:"editor-input"})}),l.jsx(Je,{label:"Slug",children:l.jsxs("div",{className:"space-y-2",children:[l.jsx("input",{value:i.slug,disabled:!o,onChange:a=>n(at(e,t,{slug:Ur(a.target.value)})),className:`editor-input ${o?"":"editor-input-disabled"}`}),l.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:o?"The slug becomes the filename. It is auto-generated from the name until you change it.":"The slug is locked after creation because it is the filename."})]})}),l.jsx(Je,{label:"Description",className:"md:col-span-2",children:l.jsx("input",{value:i.description,onChange:a=>n(at(e,t,{description:a.target.value})),placeholder:"One-line description of what this playbook does",className:"editor-input"})}),l.jsx(Je,{label:"Tags",className:"md:col-span-2",children:l.jsx("input",{value:i.tags,onChange:a=>n(at(e,t,{tags:a.target.value})),placeholder:"Comma-separated tags",className:"editor-input"})}),l.jsx(Je,{label:"When to use",className:"md:col-span-2",children:l.jsx("input",{value:i.whenToUse,onChange:a=>n(at(e,t,{whenToUse:a.target.value})),placeholder:"Describe when agents should apply this playbook",className:"editor-input"})})]}),l.jsx(Je,{label:"Playbook rules",children:l.jsx("textarea",{value:i.body,onChange:a=>n(at(e,t,{body:a.target.value})),className:"editor-textarea",spellCheck:!1})})]})}function $i({children:e}){return l.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:e})}function Je({label:e,children:t,className:n}){return l.jsxs("label",{className:`block space-y-2 ${n??""}`,children:[l.jsx("span",{className:"text-sm font-medium text-foreground",children:e}),t]})}function EI({value:e,onChange:t}){const{data:n}=lp(),o=(n==null?void 0:n.workspaces)??[];return l.jsx(Je,{label:"Workspace",children:l.jsxs("select",{value:e,onChange:i=>t(i.target.value),className:"editor-input",children:[l.jsx("option",{value:"",children:"Ungrouped"}),o.map(i=>l.jsx("option",{value:i,children:i},i))]})})}function RI(e,t){switch(e){case"project":return Ac(t).body;case"assignment":return Dc(t).body;case"plan":return Ic(t).body;case"scratchpad":return Lc(t).body;case"playbook":return Oc(t).body}}function PI(e,t){switch(e){case"project":{const n=Ac(t);return[n.title.trim()?null:"Project title is required.",n.slug.trim()?null:"Project slug is required.",n.slug.trim()&&!nf(n.slug)?"Project slug must be lowercase letters, numbers, and hyphens only.":null].filter(o=>!!o)}case"assignment":{const n=Dc(t);return[n.title.trim()?null:"Assignment title is required.",n.slug.trim()?null:"Assignment slug is required.",n.slug.trim()&&!nf(n.slug)?"Assignment slug must be lowercase letters, numbers, and hyphens only.":null].filter(o=>!!o)}case"plan":return Ic(t).assignment.trim()?[]:["Plan assignment is required."];case"scratchpad":return Lc(t).assignment.trim()?[]:["Scratchpad assignment is required."];case"playbook":{const n=Oc(t);return[n.name.trim()?null:"Playbook name is required.",n.slug.trim()?null:"Playbook slug is required.",n.slug.trim()&&!nf(n.slug)?"Playbook slug must be lowercase letters, numbers, and hyphens only.":null].filter(o=>!!o)}}}function Ty(){const e=Wt(),{workspace:t}=St(),n=Rt(),[o,i]=g.useState(null),[a,c]=g.useState(!0),[d,p]=g.useState(!1),[m,h]=g.useState(null);g.useEffect(()=>{fetch("/api/templates/project").then(v=>v.json()).then(v=>{let b=v.content;t&&t!=="_ungrouped"&&(b=b.replace(/^(tags: \[\])$/m,`$1
|
|
477
|
-
workspace: ${t}`)),i(b),c(!1)}).catch(v=>{h(v.message),c(!1)})},[t]);async function x(v){p(!0),h(null);try{const b=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:v})}),N=await b.json();if(!b.ok){h(N.error||`HTTP ${b.status}`),p(!1);return}e(`${n}/projects/${N.slug}`)}catch(b){h(b.message),p(!1);return}p(!1)}return a?l.jsx(bt,{label:"Loading project template…"}):m&&!o?l.jsx(gt,{error:m}):l.jsx(Vs,{initialContent:o||"",documentType:"project",mode:"create",onSave:x,saving:d,error:m,title:"Create Project",description:"Projects hold the high-level objective, shared context, and human-authored overview. Put execution details in assignments instead of overloading project.md.",onCancel:()=>e(`${n}/projects`),helpTitle:"Project editing rules",helpBody:"Use this form for project intent, slug, tags, and overview content. If you ever need less common metadata, raw markdown mode still exposes the full file.",allowSlugEdit:!0})}function Ay(){const{slug:e}=St(),t=Rt(),n=Wt(),[o,i]=g.useState(null),[a,c]=g.useState(!0),[d,p]=g.useState(!1),[m,h]=g.useState(null);g.useEffect(()=>{fetch("/api/templates/assignment").then(v=>v.json()).then(v=>{i(v.content),c(!1)}).catch(v=>{h(v.message),c(!1)})},[]);async function x(v){if(!e){h("Project slug is required.");return}p(!0),h(null);try{const b=await fetch(`/api/projects/${e}/assignments`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:v})}),N=await b.json();if(!b.ok){h(N.error||`HTTP ${b.status}`),p(!1);return}n(`${t}/projects/${e}/assignments/${N.slug}`)}catch(b){h(b.message),p(!1);return}p(!1)}return a?l.jsx(bt,{label:"Loading assignment template…"}):m&&!o?l.jsx(gt,{error:m}):l.jsx(Vs,{initialContent:o||"",documentType:"assignment",mode:"create",onSave:x,saving:d,error:m,title:"Create Assignment",description:"Assignments are the execution unit. Declare dependencies here, keep status pending until work starts, and use blocked later only for runtime obstacles.",onCancel:()=>n(e?`${t}/projects/${e}`:`${t}/projects`),helpTitle:"Assignment editing rules",helpBody:"Use structured fields for priority, assignee, dependencies, and tags. Status can be changed through lifecycle actions, kanban drag, or the status override.",allowSlugEdit:!0})}function Dy(){const{workspace:e}=St(),t=Rt(),n=Wt(),[o,i]=g.useState(null),[a,c]=g.useState(!0),[d,p]=g.useState(!1),[m,h]=g.useState(null);g.useEffect(()=>{const v=new URLSearchParams({standalone:"1"});e&&v.set("workspace",e),fetch(`/api/templates/assignment?${v.toString()}`).then(b=>b.json()).then(b=>{i(b.content),c(!1)}).catch(b=>{h(b.message),c(!1)})},[e]);async function x(v){var b;p(!0),h(null);try{const N=await fetch("/api/assignments",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:v})}),k=await N.json();if(!N.ok){h(k.error||`HTTP ${N.status}`),p(!1);return}const j=(b=k==null?void 0:k.assignment)==null?void 0:b.id;if(!j){h("Server did not return the new assignment id."),p(!1);return}n(`/assignments/${j}`)}catch(N){h(N.message),p(!1);return}p(!1)}return a?l.jsx(bt,{label:"Loading assignment template…"}):m&&!o?l.jsx(gt,{error:m}):l.jsx(Vs,{initialContent:o||"",documentType:"assignment",mode:"create",onSave:x,saving:d,error:m,title:"Create Standalone Assignment",description:e?`Standalone assignments live outside any project. This one will be tagged with workspaceGroup: ${e} so it appears in this workspace's views.`:"Standalone assignments live outside any project. Add a workspaceGroup to make them appear in workspace-filtered views.",onCancel:()=>n(`${t}/assignments`),helpTitle:"Standalone assignment editing rules",helpBody:"No project field is needed (it must remain null). Use workspaceGroup to group with other workspace work. Status, priority, and tags work the same as project-nested assignments.",allowSlugEdit:!0})}function _c({loadUrl:e,saveUrl:t,redirectTo:n,title:o,description:i,documentType:a,helpTitle:c,helpBody:d}){const p=Wt(),{data:m,loading:h,error:x}=Vv(e),[v,b]=g.useState(!1),[N,k]=g.useState(null);async function j(S){b(!0),k(null);try{const T=await fetch(t,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:S})}),A=await T.json();if(!T.ok){k(A.error||`HTTP ${T.status}`),b(!1);return}p(n)}catch(T){k(T.message),b(!1);return}b(!1)}return h?l.jsx(bt,{label:`Loading ${o.toLowerCase()}…`}):x||!m?l.jsx(gt,{error:x||`${o} is unavailable.`}):l.jsx(Vs,{initialContent:m.content,documentType:a,onSave:j,saving:v,error:N,title:o,description:i,onCancel:()=>p(n),helpTitle:c,helpBody:d})}function Iy(){const{slug:e}=St(),t=Rt(),n=e??"";return l.jsx(_c,{loadUrl:`/api/projects/${n}/edit`,saveUrl:`/api/projects/${n}`,redirectTo:`${t}/projects/${n}`,title:"Edit Project",description:"Project edits change the human-authored source document. The structured form stays focused on title, slug, tags, and overview content.",documentType:"project",helpTitle:"Editable vs derived project fields",helpBody:"Project status remains derived from assignment state. If you need less common frontmatter fields, switch to raw markdown mode instead of expanding the structured form."})}function rf(){const{slug:e,aslug:t,id:n}=St(),o=Rt(),i=!!n,a=i?`/api/assignments/${n}/edit`:`/api/projects/${e}/assignments/${t}/edit`,c=i?`/api/assignments/${n}`:`/api/projects/${e}/assignments/${t}`,d=i?`/assignments/${n}`:`${o}/projects/${e}/assignments/${t}`;return l.jsx(_c,{loadUrl:a,saveUrl:c,redirectTo:d,title:"Edit Assignment",description:"Edit assignment fields including status, priority, assignee, dependencies, and body.",documentType:"assignment",helpTitle:"Assignment editing",helpBody:"All fields are editable. Status can also be changed through lifecycle actions or kanban drag."})}function of(){const{slug:e,aslug:t,id:n}=St(),o=Rt(),i=!!n,a=i?`/api/assignments/${n}/plan/edit`:`/api/projects/${e}/assignments/${t}/plan/edit`,c=i?`/api/assignments/${n}/plan`:`/api/projects/${e}/assignments/${t}/plan`,d=i?`/assignments/${n}?tab=plan`:`${o}/projects/${e}/assignments/${t}?tab=plan`;return l.jsx(_c,{loadUrl:a,saveUrl:c,redirectTo:d,title:"Edit Plan",description:"Plans are separate from assignment status, so keep implementation steps here instead of overloading the assignment body.",documentType:"plan",helpTitle:"Plan status is separate",helpBody:"Plan status tracks the plan document itself. It does not replace the assignment lifecycle state."})}function sf(){const{slug:e,aslug:t,id:n}=St(),o=Rt(),i=!!n,a=i?`/api/assignments/${n}/scratchpad/edit`:`/api/projects/${e}/assignments/${t}/scratchpad/edit`,c=i?`/api/assignments/${n}/scratchpad`:`/api/projects/${e}/assignments/${t}/scratchpad`,d=i?`/assignments/${n}?tab=scratchpad`:`${o}/projects/${e}/assignments/${t}?tab=scratchpad`;return l.jsx(_c,{loadUrl:a,saveUrl:c,redirectTo:d,title:"Edit Scratchpad",description:"Scratchpad is the assignment’s working memory surface for notes, experiments, and temporary context.",documentType:"scratchpad",helpTitle:"Scratchpad usage",helpBody:"Scratchpad is for transient notes. Keep canonical objective and lifecycle data in assignment.md and any active plan files (plan.md, plan-v2.md, ...)."})}function qw({loadUrl:e,saveUrl:t,redirectTo:n,title:o,description:i,helpTitle:a,helpBody:c}){const d=Wt(),{data:p,loading:m,error:h}=Vv(e),[x,v]=g.useState(""),[b,N]=g.useState(""),[k,j]=g.useState(!1),[S,T]=g.useState(null);async function A(){j(!0),T(null);try{const L=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:x,body:b})}),O=await L.json();if(!L.ok){T(O.error||`HTTP ${L.status}`),j(!1);return}d(n)}catch(L){T(L.message),j(!1);return}j(!1)}return m?l.jsx(bt,{label:`Loading ${o.toLowerCase()}…`}):h||!p?l.jsx(gt,{error:h||`${o} is unavailable.`}):l.jsxs("div",{className:"space-y-4",children:[l.jsx(Pe,{title:o,description:i,children:l.jsxs("div",{className:"space-y-4",children:[l.jsxs("label",{className:"block space-y-2",children:[l.jsx("span",{className:"text-sm font-medium text-foreground",children:"Entry title"}),l.jsx("input",{value:x,onChange:L=>v(L.target.value),placeholder:"Optional title",className:"editor-input"})]}),l.jsxs("label",{className:"block space-y-2",children:[l.jsx("span",{className:"text-sm font-medium text-foreground",children:"Entry body"}),l.jsx("textarea",{value:b,onChange:L=>N(L.target.value),className:"editor-textarea",spellCheck:!1})]}),S?l.jsx("p",{className:"rounded-md border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-700 dark:border-rose-900 dark:bg-rose-950/30 dark:text-rose-300",children:S}):null,l.jsxs("div",{className:"flex flex-wrap gap-2",children:[l.jsx("button",{type:"button",onClick:()=>d(n),className:"shell-action",children:"Cancel"}),l.jsx("button",{type:"button",onClick:A,disabled:k||!b.trim(),className:"shell-action bg-foreground text-background hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",children:k?"Appending…":"Append Entry"})]})]})}),l.jsx(Pe,{title:"Current Document",children:l.jsx(Ut,{content:p.content.replace(/^---[\s\S]*?---\n?/,""),emptyState:"No existing content."})})]})}function lf(){const{slug:e,aslug:t,id:n}=St(),o=Rt(),i=!!n,a=i?`/api/assignments/${n}/handoff/edit`:`/api/projects/${e}/assignments/${t}/handoff/edit`,c=i?`/api/assignments/${n}/handoff/entries`:`/api/projects/${e}/assignments/${t}/handoff/entries`,d=i?`/assignments/${n}?tab=handoff`:`${o}/projects/${e}/assignments/${t}?tab=handoff`;return l.jsx(qw,{loadUrl:a,saveUrl:c,redirectTo:d,title:"Append Handoff Entry",description:"Add a new handoff without rewriting previous history.",helpTitle:"Append-only handoff history",helpBody:"Handoff log entries preserve the baton-passing trail between sessions and agents. Add a new entry instead of editing older ones."})}function af(){const{slug:e,aslug:t,id:n}=St(),o=Rt(),i=!!n,a=i?`/api/assignments/${n}/decision-record/edit`:`/api/projects/${e}/assignments/${t}/decision-record/edit`,c=i?`/api/assignments/${n}/decision-record/entries`:`/api/projects/${e}/assignments/${t}/decision-record/entries`,d=i?`/assignments/${n}?tab=decisions`:`${o}/projects/${e}/assignments/${t}?tab=decisions`;return l.jsx(qw,{loadUrl:a,saveUrl:c,redirectTo:d,title:"Append Decision Entry",description:"Record a new decision and rationale without editing prior entries.",helpTitle:"Append-only decision history",helpBody:"Decision records should accumulate over time so the implementation rationale remains auditable and reviewable."})}function Ly(){const{workspace:e}=St(),{data:t}=dc(),{data:n,loading:o,error:i,refetch:a}=ap(),[c,d]=g.useState(!1),[p,m]=g.useState(""),[h,x]=g.useState(!1),v=fn();g.useEffect(()=>{const T=v.hash.match(/^#server-(.+)/);if(!T)return;const A=decodeURIComponent(T[1]),L=document.querySelector(`[data-server-name="${window.CSS.escape(A)}"]`);if(!L)return;L.scrollIntoView({block:"nearest"}),L.classList.add("ring-2","ring-primary/60");const O=window.setTimeout(()=>L.classList.remove("ring-2","ring-primary/60"),1500);return()=>window.clearTimeout(O)},[v.hash,n]);const b=(()=>{if(!e||!n)return(n==null?void 0:n.sessions)??[];if(!t)return[];const T=new Set(t.filter(A=>e==="_ungrouped"?A.workspace===null:A.workspace===e).map(A=>A.slug));return n.sessions.filter(A=>A.windows.some(L=>L.panes.some(O=>O.assignment&&O.assignment.project!==null&&T.has(O.assignment.project))))})();async function N(T){if(T.preventDefault(),!!p.trim())try{await fetch("/api/servers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:p.trim()})}),m(""),d(!1),a()}catch{}}async function k(){x(!0);try{await fetch("/api/servers/refresh",{method:"POST"}),a()}finally{x(!1)}}async function j(T){await fetch(`/api/servers/${encodeURIComponent(T)}`,{method:"DELETE"}),a()}async function S(T){await fetch(`/api/servers/${encodeURIComponent(T)}/refresh`,{method:"POST"}),a()}return o?l.jsx(bt,{label:"Loading servers…"}):i?l.jsx(gt,{error:i}):n?n.tmuxAvailable?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c?l.jsxs("form",{onSubmit:N,className:"flex items-center gap-2",children:[l.jsx("input",{type:"text",value:p,onChange:T=>m(T.target.value),placeholder:"tmux session name",className:"editor-input text-sm",autoFocus:!0}),l.jsx("button",{type:"submit",className:"shell-action",children:"Add"}),l.jsx("button",{type:"button",className:"shell-action",onClick:()=>d(!1),children:"Cancel"})]}):l.jsxs("button",{className:"shell-action",onClick:()=>d(!0),children:[l.jsx(Xn,{className:"h-3.5 w-3.5"}),"Track Session"]}),l.jsxs("button",{className:"shell-action",onClick:k,disabled:h,children:[l.jsx(Cv,{className:`h-3.5 w-3.5 ${h?"animate-spin":""}`}),"Refresh All"]})]}),b.length===0?l.jsx(Ke,{title:"No sessions tracked",description:"Register a tmux session to start tracking your dev servers."}):l.jsx("div",{className:"mt-4 space-y-4",children:b.map(T=>l.jsx(TI,{session:T,onRefresh:()=>S(T.name),onRemove:()=>j(T.name),onRefetch:a},T.name))})]}):l.jsx(l.Fragment,{children:l.jsxs("div",{className:"surface-panel mt-4 flex flex-col items-center gap-3 py-12 text-center",children:[l.jsx(AC,{className:"h-10 w-10 text-muted-foreground/40"}),l.jsx("p",{className:"text-sm font-medium text-foreground",children:"tmux is not installed"}),l.jsxs("p",{className:"max-w-md text-sm text-muted-foreground",children:["Server tracking requires tmux. Install it with ",l.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 text-xs",children:"brew install tmux"})," to get started."]})]})}):null}function TI({session:e,onRefresh:t,onRemove:n,onRefetch:o}){return l.jsxs("div",{className:"surface-panel","data-server-name":e.name,children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(rp,{className:"h-4 w-4 text-muted-foreground"}),l.jsx("span",{className:"text-sm font-semibold text-foreground",children:e.name}),l.jsx("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${e.alive?"border border-emerald-200 bg-emerald-50 text-emerald-700 dark:border-emerald-900 dark:bg-emerald-950/40 dark:text-emerald-400":"border border-rose-200 bg-rose-50 text-rose-700 dark:border-rose-900 dark:bg-rose-950/40 dark:text-rose-400"}`,children:e.alive?"alive":"dead"}),l.jsxs("span",{className:"text-xs text-muted-foreground",children:["Last refreshed: ",new Date(e.lastRefreshed).toLocaleString()]})]}),l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx("button",{className:"shell-action",onClick:t,title:"Refresh",children:l.jsx(Cv,{className:"h-3.5 w-3.5"})}),l.jsx("button",{className:"shell-action",onClick:n,title:"Remove",children:l.jsx(Ms,{className:"h-3.5 w-3.5"})})]})]}),e.alive&&e.windows.length>0&&l.jsx("div",{className:"mt-3 space-y-3",children:e.windows.map(i=>l.jsxs("div",{children:[l.jsxs("p",{className:"mb-1.5 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:["Window ",i.index,": ",i.name]}),l.jsx("div",{className:"space-y-1.5",children:i.panes.map(a=>l.jsx(AI,{pane:a,sessionName:e.name,windowIndex:i.index,onRefetch:o},`${i.index}:${a.index}`))})]},i.index))}),!e.alive&&l.jsxs("div",{className:"mt-3 flex items-center gap-2 text-sm text-muted-foreground",children:[l.jsx(EC,{className:"h-4 w-4"}),l.jsx("span",{children:e.kind==="process"?"Process no longer running":"Session no longer exists"})]})]})}function AI({pane:e,sessionName:t,windowIndex:n,onRefetch:o}){const i=Rt(),a=e.cwd.replace(/^\/Users\/[^/]+/,"~");return l.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-border/40 bg-background/60 px-3 py-2 text-sm",children:[l.jsxs("span",{className:"shrink-0 font-mono text-xs text-muted-foreground/60",children:[":",e.index]}),l.jsx("span",{className:"shrink-0 rounded bg-muted/60 px-1.5 py-0.5 font-mono text-xs",children:e.command}),l.jsxs("span",{className:"inline-flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground",children:[l.jsx("span",{className:"truncate",title:e.cwd,children:a}),l.jsx(Hr,{value:e.cwd})]}),e.branch&&l.jsxs("span",{className:"flex shrink-0 items-center gap-1 text-xs text-muted-foreground",children:[l.jsx(kv,{className:"h-3 w-3"}),e.branch,e.worktree&&l.jsx("span",{className:"rounded bg-violet-100 px-1 py-0.5 text-[10px] font-medium text-violet-700 dark:bg-violet-950/40 dark:text-violet-400",children:"worktree"})]}),e.ports.length>0&&l.jsx("div",{className:"flex shrink-0 items-center gap-1.5",children:e.urls.map(c=>l.jsxs("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 rounded border border-primary/30 bg-primary/5 px-1.5 py-0.5 text-xs font-medium text-primary hover:bg-primary/10 dark:border-primary/40 dark:bg-primary/10 dark:hover:bg-primary/20",children:[c.replace("http://localhost:",":"),l.jsx(wv,{className:"h-2.5 w-2.5"})]},c))}),l.jsx("div",{className:"ml-auto shrink-0",children:e.assignment?l.jsxs(Ce,{to:e.assignment.project===null?`/assignments/${e.assignment.slug}`:`${i}/projects/${e.assignment.project}/assignments/${e.assignment.slug}`,className:"inline-flex items-center gap-1 rounded border border-primary/30 bg-primary/10 px-1.5 py-0.5 text-xs font-medium text-primary hover:bg-primary/20",children:[l.jsx(xC,{className:"h-2.5 w-2.5"}),e.assignment.title,e.assignment.project===null?l.jsx("span",{className:"ml-1 rounded bg-neutral-800/70 px-1 py-0.5 text-[9px] uppercase tracking-wide text-neutral-400",children:"Standalone"}):null]}):l.jsx("span",{className:"text-xs text-muted-foreground/40",children:"unlinked"})})]})}function Oy(){const{workspace:e}=St(),{data:t}=dc(),{data:n,loading:o,error:i}=SN(),[a,c]=g.useState(""),[d,p]=g.useState(""),[m,h]=g.useState(""),[x,v]=g.useState("started_desc"),[b,N]=g.useState(0),[k,j]=g.useState(new Set),[S,T]=g.useState(!1),[A,L]=g.useState(null),[O,P]=g.useState(null),$=(n==null?void 0:n.sessions.some(Y=>Y.status==="active"))??!1;g.useEffect(()=>{if(!$)return;const Y=window.setInterval(()=>N(X=>X+1),3e4);return()=>window.clearInterval(Y)},[$]),g.useEffect(()=>{j(Y=>{if(Y.size===0)return Y;const X=new Set((n==null?void 0:n.sessions.map(D=>D.sessionId))??[]),_=new Set([...Y].filter(D=>X.has(D)));return _.size===Y.size?Y:_})},[n]);const E=g.useMemo(()=>{if(!n)return[];if(e&&!t)return[];const Y=a.trim().toLowerCase();return[...n.sessions.filter(_=>{var W;if(e&&t){const ee=((W=t.find(R=>R.slug===_.projectSlug))==null?void 0:W.workspace)??null;if(e==="_ungrouped"){if(ee!==null)return!1}else if(ee!==e)return!1}const D=II(_.started);return d&&(!D||D<d)||m&&(!D||D>m)?!1:Y?[_.projectSlug??"",_.assignmentSlug??"",_.agent,_.sessionId,_.path,_.description??"",_.transcriptPath??""].join(" ").toLowerCase().includes(Y):!0})].sort((_,D)=>LI(_,D,x))},[n,a,x,d,m,b,e,t]);function H(Y){j(X=>{const _=new Set(X);return _.has(Y)?_.delete(Y):_.add(Y),_})}function Z(){k.size===E.length&&E.length>0?j(new Set):j(new Set(E.map(Y=>Y.sessionId)))}async function K(Y){L(null),T(!0);try{const X=await fetch("/api/agent-sessions",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionIds:Y})}),_=await X.json().catch(()=>null);if(!X.ok)throw new Error((_==null?void 0:_.error)||`HTTP ${X.status}`);j(D=>new Set([...D].filter(V=>!Y.includes(V)))),P(null)}catch(X){L(X.message)}finally{T(!1)}}if(o)return l.jsx(bt,{label:"Loading agent sessions..."});if(i)return l.jsx(gt,{error:i});if(!n)return null;const q=n.sessions.length>0;return l.jsxs(l.Fragment,{children:[l.jsxs(wp,{children:[l.jsx(vc,{value:a,onChange:c,placeholder:"Search project, assignment, agent, session ID, path, or description"}),l.jsxs("label",{className:"flex min-w-[150px] flex-col gap-1 text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground",children:["Started From",l.jsx("input",{type:"date",value:d,onChange:Y=>p(Y.target.value),className:"editor-input min-w-[150px]"})]}),l.jsxs("label",{className:"flex min-w-[150px] flex-col gap-1 text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground",children:["Started To",l.jsx("input",{type:"date",value:m,onChange:Y=>h(Y.target.value),className:"editor-input min-w-[150px]"})]}),l.jsxs("select",{value:x,onChange:Y=>v(Y.target.value),className:"editor-input max-w-[200px]",children:[l.jsx("option",{value:"started_desc",children:"Newest first"}),l.jsx("option",{value:"started_asc",children:"Oldest first"}),l.jsx("option",{value:"assignment_asc",children:"Assignment A-Z"}),l.jsx("option",{value:"agent_asc",children:"Agent A-Z"})]})]}),A?l.jsx("div",{className:"mt-4 rounded-md border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-700 dark:border-rose-900 dark:bg-rose-950/30 dark:text-rose-300",children:A}):null,k.size>0&&l.jsxs("div",{className:"mt-4 flex items-center gap-3 rounded border border-border/40 bg-muted/30 px-4 py-2 text-sm",children:[l.jsxs("span",{className:"text-muted-foreground",children:[k.size," session",k.size!==1?"s":""," selected"]}),l.jsxs("button",{className:"shell-action text-destructive",onClick:()=>P({sessionIds:[...k],title:`Delete ${k.size} selected session${k.size===1?"":"s"}?`,description:"This removes the selected agent session records from the dashboard. This cannot be undone.",confirmLabel:k.size===1?"Delete Session":"Delete Sessions"}),disabled:S,children:[l.jsx(Ms,{className:"mr-1 inline h-3.5 w-3.5"}),"Delete Selected"]}),l.jsx("button",{className:"shell-action",onClick:()=>j(new Set),children:"Clear Selection"})]}),q?E.length===0?l.jsx(Ke,{title:"No agent sessions match these filters",description:"Adjust the status, search term, date range, or sorting controls to show sessions again."}):l.jsx("div",{className:"surface-panel mt-4 overflow-x-auto",children:l.jsxs("table",{className:"w-full min-w-[1040px] text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"border-b border-border/40 text-left text-xs uppercase tracking-wider text-muted-foreground",children:[l.jsx("th",{className:"w-8 pb-2 pr-3",children:l.jsx("button",{onClick:Z,className:"text-muted-foreground hover:text-foreground",children:k.size===E.length&&E.length>0?l.jsx(Sr,{className:"h-4 w-4"}):l.jsx(Nv,{className:"h-4 w-4"})})}),l.jsx("th",{className:"pb-2 pr-3",children:"Project"}),l.jsx("th",{className:"pb-2 pr-3",children:"Assignment"}),l.jsx("th",{className:"pb-2 pr-3",children:"Description"}),l.jsx("th",{className:"pb-2 pr-3",children:"Agent"}),l.jsx("th",{className:"pb-2 pr-3",children:"Session ID"}),l.jsx("th",{className:"pb-2 pr-3",children:"Started"}),l.jsx("th",{className:"pb-2 pr-3",children:"Path"}),l.jsx("th",{className:"pb-2 pr-3",children:"Transcript"}),l.jsx("th",{className:"w-8 pb-2"})]})}),l.jsx("tbody",{children:E.map(Y=>l.jsx(DI,{session:Y,selected:k.has(Y.sessionId),onToggle:()=>H(Y.sessionId),onDelete:()=>P({sessionIds:[Y.sessionId],title:`Delete session ${Y.sessionId.slice(0,8)}...?`,description:`Remove this ${Y.agent} session record${Y.assignmentSlug?` for ${Y.assignmentSlug}`:""}. This cannot be undone.`,confirmLabel:"Delete Session"})},Y.sessionId))})]})}):l.jsx(Ke,{title:"No agent sessions",description:"No agent sessions have been registered yet. Use /grab-assignment or syntaur track-session to register one."}),l.jsx(sw,{open:O!==null,title:(O==null?void 0:O.title)??"Delete session?",description:(O==null?void 0:O.description)??"",confirmLabel:(O==null?void 0:O.confirmLabel)??"Delete",destructive:!0,loading:S,onOpenChange:Y=>{Y||P(null)},onConfirm:async()=>{O&&await K(O.sessionIds)}})]})}function DI({session:e,selected:t,onToggle:n,onDelete:o}){const i=Rt(),a=e.sessionId.length>12?e.sessionId.slice(0,8)+"...":e.sessionId,c=e.path?e.path.replace(/^\/Users\/[^/]+/,"~"):"—",d=e.transcriptPath?e.transcriptPath.replace(/^\/Users\/[^/]+/,"~"):"—";return l.jsxs("tr",{className:"border-b border-border/20 last:border-0",children:[l.jsx("td",{className:"py-2 pr-3",children:l.jsx("button",{onClick:n,className:"text-muted-foreground hover:text-foreground",children:t?l.jsx(Sr,{className:"h-4 w-4"}):l.jsx(Nv,{className:"h-4 w-4"})})}),l.jsx("td",{className:"py-2 pr-3",children:e.projectSlug?l.jsx(Ce,{to:`${i}/projects/${e.projectSlug}`,className:"text-primary hover:underline",children:Cn(e.projectSlug)}):e.assignmentSlug?l.jsx("span",{className:"rounded bg-neutral-800 px-1.5 py-0.5 text-[10px] font-mono uppercase tracking-wide text-neutral-300",children:"Standalone"}):l.jsx("span",{className:"text-muted-foreground",children:"—"})}),l.jsx("td",{className:"py-2 pr-3",children:e.projectSlug&&e.assignmentSlug?l.jsx(Ce,{to:`${i}/projects/${e.projectSlug}/assignments/${e.assignmentSlug}`,className:"text-primary hover:underline",children:Cn(e.assignmentSlug)}):e.assignmentSlug?l.jsx(Ce,{to:`/assignments/${e.assignmentSlug}`,className:"text-primary hover:underline font-mono",children:e.assignmentSlug}):l.jsx("span",{className:"text-muted-foreground",children:"—"})}),l.jsx("td",{className:"max-w-[200px] py-2 pr-3",children:e.description?l.jsx("span",{className:"truncate text-xs text-muted-foreground",title:e.description,children:e.description.length>60?e.description.slice(0,57)+"...":e.description}):l.jsx("span",{className:"text-muted-foreground",children:"—"})}),l.jsx("td",{className:"py-2 pr-3",children:l.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[l.jsx(uc,{className:"h-3 w-3 text-muted-foreground"}),e.agent]})}),l.jsx("td",{className:"py-2 pr-3",children:l.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[l.jsx("span",{className:"font-mono text-xs text-muted-foreground",title:e.sessionId,children:a}),l.jsx(Hr,{value:e.sessionId})]})}),l.jsx("td",{className:"py-2 pr-3 text-xs text-muted-foreground",children:Cr(e.started)}),l.jsx("td",{className:"max-w-[240px] py-2 pr-3",children:l.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[l.jsx("span",{className:"truncate text-xs text-muted-foreground",title:e.path,children:c}),e.path&&l.jsx(Hr,{value:e.path})]})}),l.jsx("td",{className:"max-w-[260px] py-2 pr-3",children:e.transcriptPath?l.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[l.jsx("span",{className:"truncate font-mono text-xs text-muted-foreground",title:e.transcriptPath,children:d}),l.jsx(Hr,{value:e.transcriptPath})]}):l.jsx("span",{className:"text-muted-foreground",children:"—"})}),l.jsx("td",{className:"py-2",children:l.jsx("button",{onClick:o,className:"text-muted-foreground hover:text-destructive",title:"Delete session",children:l.jsx(Ms,{className:"h-3.5 w-3.5"})})})]})}function II(e){const t=new Date(e);if(Number.isNaN(t.getTime()))return null;const n=t.getFullYear(),o=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0");return`${n}-${o}-${i}`}function Ia(e){const t=Date.parse(e.started),n=e.ended?Date.parse(e.ended):Date.now();return Number.isNaN(t)||Number.isNaN(n)?0:Math.max(0,Math.floor((n-t)/6e4))}function LI(e,t,n){switch(n){case"started_asc":return e.started.localeCompare(t.started);case"started_desc":return t.started.localeCompare(e.started);case"duration_asc":return Ia(e)-Ia(t);case"duration_desc":return Ia(t)-Ia(e);case"assignment_asc":return(e.assignmentSlug??"").localeCompare(t.assignmentSlug??"")||(e.projectSlug??"").localeCompare(t.projectSlug??"");case"agent_asc":return e.agent.localeCompare(t.agent)||(e.assignmentSlug??"").localeCompare(t.assignmentSlug??"");default:return 0}}function OI(){const{data:e,loading:t,error:n,refetch:o}=qv(),[i,a]=g.useState(""),[c,d]=g.useState(null),p=g.useMemo(()=>{if(!(e!=null&&e.playbooks))return[];if(!i.trim())return e.playbooks;const h=i.toLowerCase();return e.playbooks.filter(x=>x.name.toLowerCase().includes(h)||x.description.toLowerCase().includes(h)||x.slug.toLowerCase().includes(h)||x.tags.some(v=>v.toLowerCase().includes(h)))},[e,i]);async function m(h,x,v){if(h.preventDefault(),h.stopPropagation(),!c){d(x);try{const b=v?"disable":"enable",N=await fetch(`/api/playbooks/${encodeURIComponent(x)}/${b}`,{method:"POST"});if(!N.ok){const k=await N.json().catch(()=>({}));throw new Error(k.error||`Failed to ${b} playbook`)}o()}catch(b){console.error(b),alert(b instanceof Error?b.message:"Failed to update playbook")}finally{d(null)}}}return t?l.jsx(bt,{label:"Loading playbooks..."}):n?l.jsx(gt,{error:n}):l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between gap-4",children:[l.jsxs("div",{className:"relative flex-1 max-w-sm",children:[l.jsx(il,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),l.jsx("input",{type:"text",placeholder:"Search playbooks...",value:i,onChange:h=>a(h.target.value),className:"h-9 w-full rounded-md border border-border/70 bg-background pl-9 pr-3 text-sm text-foreground placeholder:text-muted-foreground/60 focus:border-foreground/30 focus:outline-none"})]}),l.jsxs(Ce,{to:"/playbooks/create",className:"inline-flex h-9 items-center gap-2 rounded-md bg-foreground px-3 text-sm font-medium text-background transition hover:bg-foreground/90",children:[l.jsx(Xn,{className:"h-4 w-4"}),"Create Playbook"]})]}),l.jsxs(Ce,{to:"/playbooks/manifest",className:"surface-panel group flex items-center gap-3 p-3 transition hover:border-foreground/20",children:[l.jsx(uC,{className:"h-5 w-5 shrink-0 text-muted-foreground"}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("h3",{className:"text-sm font-semibold text-foreground group-hover:underline",children:"Playbook Manifest"}),l.jsx("span",{className:"rounded-full border border-border/60 bg-muted/50 px-2 py-0.5 text-[10px] text-muted-foreground",children:"auto-generated"})]}),l.jsxs("p",{className:"mt-0.5 text-xs text-muted-foreground",children:["Index of all playbooks with descriptions. Include ",l.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-[11px]",children:"~/.syntaur/playbooks/manifest.md"})," in your CLAUDE.md for agent context."]})]})]}),p.length===0?l.jsx(Ke,{title:"No playbooks found",description:(e==null?void 0:e.playbooks.length)===0?"Playbooks define rules and workflows for how agents should operate. Create your first one to get started.":"No playbooks match your search.",actions:(e==null?void 0:e.playbooks.length)===0?l.jsxs(Ce,{to:"/playbooks/create",className:"inline-flex items-center gap-2 rounded-md bg-foreground px-3 py-2 text-sm font-medium text-background transition hover:bg-foreground/90",children:[l.jsx(Xn,{className:"h-4 w-4"}),"Create Playbook"]}):void 0}):l.jsx("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:p.map(h=>{const x=c===h.slug;return l.jsxs("div",{className:`surface-panel relative flex flex-col gap-2 p-4 transition hover:border-foreground/20 ${h.enabled?"":"opacity-75"}`,children:[l.jsxs(Ce,{to:`/playbooks/${h.slug}`,className:"group flex flex-col gap-2",children:[l.jsxs("div",{className:"flex items-start gap-2",children:[l.jsx(vv,{className:"mt-0.5 h-4 w-4 shrink-0 text-muted-foreground"}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("h3",{className:"text-sm font-semibold text-foreground group-hover:underline",children:h.name}),h.description?l.jsx("p",{className:"mt-1 text-xs leading-5 text-muted-foreground line-clamp-2",children:h.description}):null]})]}),l.jsx("div",{className:"flex items-center gap-2 pt-1 pr-20",children:l.jsxs("div",{className:"flex flex-wrap gap-1",children:[h.tags.slice(0,3).map(v=>l.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-border/60 bg-muted/50 px-2 py-0.5 text-[10px] text-muted-foreground",children:[l.jsx(Ev,{className:"h-2.5 w-2.5"}),v]},v)),h.tags.length>3?l.jsxs("span",{className:"text-[10px] text-muted-foreground/60",children:["+",h.tags.length-3]}):null]})})]}),l.jsx("button",{type:"button",role:"switch","aria-checked":h.enabled,"aria-label":h.enabled?"Disable playbook":"Enable playbook",onClick:v=>m(v,h.slug,h.enabled),disabled:x,className:`absolute bottom-3 right-3 z-10 inline-flex h-5 w-9 items-center rounded-full border opacity-100 transition disabled:opacity-50 ${h.enabled?"border-emerald-500/60 bg-emerald-500/80":"border-foreground/40 bg-foreground/15"}`,children:l.jsx("span",{className:`block h-4 w-4 rounded-full shadow-sm transition-transform ${h.enabled?"translate-x-[18px] bg-background":"translate-x-[2px] bg-foreground/70"}`})})]},h.slug)})})]})}function _I(){const{slug:e}=St(),t=Wt(),{data:n,loading:o,error:i,refetch:a}=NN(e),[c,d]=g.useState(!1),[p,m]=g.useState(!1),[h,x]=g.useState(!1),v=e==="manifest";async function b(){if(e){m(!0);try{(await fetch(`/api/playbooks/${e}`,{method:"DELETE"})).ok&&t("/playbooks")}finally{m(!1)}}}async function N(){if(!(!e||!n)){x(!0);try{const k=n.enabled?"disable":"enable",j=await fetch(`/api/playbooks/${encodeURIComponent(e)}/${k}`,{method:"POST"});if(!j.ok){const S=await j.json().catch(()=>({}));throw new Error(S.error||`Failed to ${k} playbook`)}a()}catch(k){console.error(k),alert(k instanceof Error?k.message:"Failed to update playbook")}finally{x(!1)}}}return o?l.jsx(bt,{label:"Loading playbook..."}):i?l.jsx(gt,{error:i}):n?l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex items-start justify-between gap-4",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("h2",{className:"text-lg font-semibold text-foreground",children:v?"Playbook Manifest":n.name}),v?l.jsx("span",{className:"rounded-full border border-border/60 bg-muted/50 px-2 py-0.5 text-xs text-muted-foreground",children:"auto-generated"}):null]}),!v&&n.description?l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:n.description}):null,v?l.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:["This file is rebuilt automatically when playbooks are added or removed. Include"," ",l.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:"~/.syntaur/playbooks/manifest.md"})," ","in your CLAUDE.md for agent context."]}):null,!v&&n.whenToUse?l.jsxs("p",{className:"mt-2 text-sm text-muted-foreground italic",children:["When to use: ",n.whenToUse]}):null,l.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-3 text-xs text-muted-foreground",children:[l.jsxs("span",{children:["Created ",Cr(n.created)]}),l.jsxs("span",{children:["Updated ",Cr(n.updated)]})]}),n.tags.length>0?l.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:n.tags.map(k=>l.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-border/60 bg-muted/50 px-2 py-0.5 text-xs text-muted-foreground",children:[l.jsx(Ev,{className:"h-3 w-3"}),k]},k))}):null]}),v?null:l.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:n.enabled?"Enabled":"Disabled"}),l.jsx("button",{type:"button",role:"switch","aria-checked":n.enabled,"aria-label":n.enabled?"Disable playbook":"Enable playbook",onClick:N,disabled:h,className:`inline-flex h-5 w-9 items-center rounded-full border transition disabled:opacity-50 ${n.enabled?"border-emerald-500/60 bg-emerald-500/80":"border-foreground/40 bg-foreground/15"}`,children:l.jsx("span",{className:`block h-4 w-4 rounded-full shadow-sm transition-transform ${n.enabled?"translate-x-[18px] bg-background":"translate-x-[2px] bg-foreground/70"}`})})]}),l.jsxs(Ce,{to:`/playbooks/${e}/edit`,className:"inline-flex h-8 items-center gap-1.5 rounded-md border border-border/70 bg-background px-3 text-xs font-medium text-foreground transition hover:bg-muted",children:[l.jsx(kC,{className:"h-3 w-3"}),"Edit"]}),c?l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("button",{type:"button",onClick:b,disabled:p,className:"inline-flex h-8 items-center gap-1.5 rounded-md bg-red-600 px-3 text-xs font-medium text-white transition hover:bg-red-700 disabled:opacity-50",children:p?"Deleting...":"Confirm"}),l.jsx("button",{type:"button",onClick:()=>d(!1),className:"inline-flex h-8 items-center rounded-md border border-border/70 bg-background px-3 text-xs font-medium text-foreground transition hover:bg-muted",children:"Cancel"})]}):l.jsxs("button",{type:"button",onClick:()=>d(!0),className:"inline-flex h-8 items-center gap-1.5 rounded-md border border-border/70 bg-background px-3 text-xs font-medium text-red-600 transition hover:bg-red-50 dark:hover:bg-red-950/30",children:[l.jsx(Ms,{className:"h-3 w-3"}),"Delete"]})]})]}),l.jsx("div",{className:"surface-panel p-4",children:l.jsx(Ut,{content:n.body})})]}):null}function MI(){const e=Wt(),[t,n]=g.useState(null),[o,i]=g.useState(!0),[a,c]=g.useState(!1),[d,p]=g.useState(null);g.useEffect(()=>{fetch("/api/playbooks/template/new").then(h=>h.json()).then(h=>{n(h.content),i(!1)}).catch(h=>{p(h.message),i(!1)})},[]);async function m(h){c(!0),p(null);try{const x=await fetch("/api/playbooks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:h})}),v=await x.json();if(!x.ok){p(v.error||`HTTP ${x.status}`),c(!1);return}e(`/playbooks/${v.slug}`)}catch(x){p(x.message),c(!1);return}c(!1)}return o?l.jsx(bt,{label:"Loading playbook template..."}):d&&!t?l.jsx(gt,{error:d}):l.jsx(Vs,{initialContent:t||"",documentType:"playbook",mode:"create",onSave:m,saving:a,error:d,title:"Create Playbook",description:"Playbooks define rules and workflows for how agents should operate. Keep them short, imperative, and focused on a single concern.",onCancel:()=>e("/playbooks"),allowSlugEdit:!0})}function $I(){const{slug:e}=St(),t=Wt(),[n,o]=g.useState(null),[i,a]=g.useState(!0),[c,d]=g.useState(!1),[p,m]=g.useState(null);g.useEffect(()=>{e&&fetch(`/api/playbooks/${e}/edit`).then(x=>x.json()).then(x=>{o(x.content),a(!1)}).catch(x=>{m(x.message),a(!1)})},[e]);async function h(x){if(e){d(!0),m(null);try{const v=await fetch(`/api/playbooks/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:x})}),b=await v.json();if(!v.ok){m(b.error||`HTTP ${v.status}`),d(!1);return}t(`/playbooks/${e}`)}catch(v){m(v.message),d(!1);return}d(!1)}}return i?l.jsx(bt,{label:"Loading playbook..."}):p&&!n?l.jsx(gt,{error:p}):l.jsx(Vs,{initialContent:n||"",documentType:"playbook",mode:"edit",onSave:h,saving:c,error:p,title:"Edit Playbook",onCancel:()=>t(`/playbooks/${e}`)})}function FI({value:e,onChange:t}){return l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("input",{type:"color",value:e||"#64748b",onChange:n=>t(n.target.value),className:"h-7 w-7 shrink-0 cursor-pointer rounded-md border border-border/60 bg-transparent p-0.5",title:"Pick a color"}),l.jsx("input",{type:"text",value:e,onChange:n=>t(n.target.value),placeholder:"#64748b",className:"editor-input w-[5.5rem] font-mono text-xs"})]})}const zf=["projects","playbooks","todos","servers","config"];function zI(e){const t=new Set;for(const n of e.split(",").map(o=>o.trim()))zf.includes(n)&&t.add(n);return t}function _y(e){if(!e)return"never";try{return new Date(e).toLocaleString()}catch{return e}}function BI(){const[e,t]=g.useState(!0),[n,o]=g.useState(null),[i,a]=g.useState(""),[c,d]=g.useState(new Set(zf)),[p,m]=g.useState(!1),[h,x]=g.useState(!1),[v,b]=g.useState(null),[N,k]=g.useState(null),j=g.useCallback(async()=>{try{const P=await fetch("/api/backup");if(!P.ok)throw new Error(`HTTP ${P.status}`);const $=await P.json();o($),a($.repo??""),d(zI($.categories)),m(!1)}catch(P){k({type:"error",message:`Failed to load backup config: ${P instanceof Error?P.message:String(P)}`})}finally{t(!1)}},[]);g.useEffect(()=>{j()},[j]);function S(P){d($=>{const E=new Set($);return E.has(P)?E.delete(P):E.add(P),E}),m(!0)}async function T(){x(!0),k(null);try{const P=Array.from(c),$=await fetch("/api/backup/config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({repo:i.trim()||null,categories:P})}),E=await $.json();if(!$.ok)throw new Error(E.error||`HTTP ${$.status}`);o(E),m(!1),k({type:"success",message:"Backup configuration saved."})}catch(P){k({type:"error",message:`Save failed: ${P instanceof Error?P.message:String(P)}`})}finally{x(!1)}}async function A(){b("push"),k(null);try{const P=await fetch("/api/backup/push",{method:"POST"}),$=await P.json();if(!P.ok||$.success===!1)throw new Error($.error||$.message||`HTTP ${P.status}`);k({type:"success",message:$.message||"Backup complete."}),await j()}catch(P){k({type:"error",message:`Backup failed: ${P instanceof Error?P.message:String(P)}`})}finally{b(null)}}async function L(){if(window.confirm("Restore will overwrite local files for the selected categories with the contents of the GitHub repo. This cannot be undone. Continue?")){b("pull"),k(null);try{const $=await fetch("/api/backup/pull",{method:"POST"}),E=await $.json();if(!$.ok||E.success===!1)throw new Error(E.error||E.message||`HTTP ${$.status}`);k({type:"success",message:E.message||"Restore complete."}),await j()}catch($){k({type:"error",message:`Restore failed: ${$ instanceof Error?$.message:String($)}`})}finally{b(null)}}}if(e)return l.jsx(Pe,{title:"GitHub Backup",description:"Back up Syntaur files to a GitHub repository",children:l.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})});const O=!!i.trim()&&c.size>0&&!v&&!p;return l.jsx(Pe,{title:"GitHub Backup",description:"Back up Syntaur files to a GitHub repository and restore from it",children:l.jsxs("div",{className:"space-y-4",children:[N&&l.jsx("div",{className:`rounded-lg border px-4 py-2 text-sm ${N.type==="success"?"border-emerald-200 bg-emerald-50 text-emerald-700 dark:border-emerald-900 dark:bg-emerald-950/40 dark:text-emerald-400":"border-rose-200 bg-rose-50 text-rose-700 dark:border-rose-900 dark:bg-rose-950/40 dark:text-rose-400"}`,children:N.message}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Repository URL"}),l.jsx("input",{type:"text",value:i,onChange:P=>{a(P.target.value),m(!0)},placeholder:"git@github.com:you/syntaur-backup.git",className:"editor-input w-full text-sm"}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:["SSH or HTTPS URL. Requires ",l.jsx("code",{className:"rounded bg-muted px-1",children:"git"})," installed and credentials configured locally."]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Categories to back up"}),l.jsx("div",{className:"flex flex-wrap gap-2",children:zf.map(P=>{const $=c.has(P);return l.jsxs("button",{type:"button",onClick:()=>S(P),className:`shell-action text-xs ${$?"bg-primary/10 text-primary hover:bg-primary/20":"bg-muted/30 text-muted-foreground hover:bg-muted/60"}`,children:[l.jsx("span",{className:`mr-1 inline-block h-2 w-2 rounded-full ${$?"bg-primary":"bg-muted-foreground/40"}`}),P]},P)})})]}),l.jsxs("div",{className:"grid grid-cols-1 gap-2 text-xs text-muted-foreground sm:grid-cols-2",children:[l.jsxs("div",{children:[l.jsx("span",{className:"font-medium text-foreground",children:"Last backup: "}),_y((n==null?void 0:n.lastBackup)??null)]}),l.jsxs("div",{children:[l.jsx("span",{className:"font-medium text-foreground",children:"Last restore: "}),_y((n==null?void 0:n.lastRestore)??null)]}),(n==null?void 0:n.locked)&&l.jsx("div",{className:"sm:col-span-2 text-amber-600 dark:text-amber-400",children:"⚠ A backup operation is in progress or the lock file is stale."})]}),l.jsxs("div",{className:"flex flex-wrap items-center gap-3 pt-2",children:[l.jsxs("button",{className:"shell-action bg-primary/10 text-primary hover:bg-primary/20",onClick:T,disabled:h||!p,children:[l.jsx(op,{className:"h-3.5 w-3.5"}),h?"Saving...":"Save Config"]}),l.jsxs("button",{className:"shell-action",onClick:A,disabled:!O,title:O?"Back up now":p?"Save config first":"Set repo and pick categories",children:[l.jsx(DC,{className:"h-3.5 w-3.5"}),v==="push"?"Backing up...":"Back Up Now"]}),l.jsxs("button",{className:"shell-action",onClick:L,disabled:!O,title:O?"Restore from backup":p?"Save config first":"Set repo and pick categories",children:[l.jsx(iC,{className:"h-3.5 w-3.5"}),v==="pull"?"Restoring...":"Restore"]}),p&&l.jsx("span",{className:"text-xs text-muted-foreground",children:"Unsaved changes"})]}),l.jsxs("p",{className:"flex items-start gap-2 rounded-md border border-border/40 bg-muted/20 p-3 text-xs text-muted-foreground",children:[l.jsx(oC,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),l.jsxs("span",{children:["Restore never overwrites ",l.jsx("code",{className:"rounded bg-muted px-1",children:"config.md"})," (would clobber backup settings). The agent sessions database is not backed up — only markdown files."]})]})]})})}function cf(e){return{statuses:e.statuses.map(t=>({id:t.id,label:t.label,description:t.description??"",color:t.color??"",terminal:t.terminal??!1})),order:[...e.order]}}function UI(){const[e,t]=g.useState(!0),[n,o]=g.useState(null),[i,a]=g.useState(!1),[c,d]=g.useState([]),[p,m]=g.useState([]),[h,x]=g.useState(!1),[v,b]=g.useState(null),[N,k]=g.useState(!1),j=g.useCallback(async()=>{try{const E=await fetch("/api/config/statuses");if(!E.ok)throw new Error(`HTTP ${E.status}`);const H=await E.json(),Z=cf(H);d(Z.statuses),m(Z.order),a(H.custom),k(!1),o(null)}catch(E){o(E instanceof Error?E.message:"Failed to load config")}finally{t(!1)}},[]);g.useEffect(()=>{j()},[j]);function S(){setTimeout(()=>b(null),3e3)}async function T(){x(!0),b(null);try{const E={statuses:c.map(q=>({id:q.id,label:q.label,...q.description?{description:q.description}:{},...q.color?{color:q.color}:{},...q.terminal?{terminal:!0}:{}})),order:p,transitions:[]},H=await fetch("/api/config/statuses",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(E)});if(!H.ok){const q=await H.json().catch(()=>({error:"Unknown error"}));throw new Error(q.error??"Save failed")}const Z=await H.json(),K=cf(Z);d(K.statuses),m(K.order),a(Z.custom),k(!1),kx(),b({type:"success",message:"Status config saved"}),S()}catch(E){b({type:"error",message:E instanceof Error?E.message:"Save failed"})}finally{x(!1)}}async function A(){x(!0),b(null);try{const E=await fetch("/api/config/statuses",{method:"DELETE"});if(!E.ok)throw new Error("Reset failed");const H=await E.json(),Z=cf(H);d(Z.statuses),m(Z.order),a(H.custom),k(!1),kx(),b({type:"success",message:"Reset to defaults"}),S()}catch(E){b({type:"error",message:E instanceof Error?E.message:"Reset failed"})}finally{x(!1)}}function L(E,H,Z){d(K=>{const q=[...K];if(q[E]={...q[E],[H]:Z},H==="id"&&typeof Z=="string"){const Y=K[E].id;m(X=>X.map(_=>_===Y?Z:_))}return q}),k(!0)}function O(){const E=`status_${c.length+1}`;d(H=>[...H,{id:E,label:"New Status",description:"",color:"",terminal:!1}]),m(H=>[...H,E]),k(!0)}function P(E){const H=c[E].id;d(Z=>Z.filter((K,q)=>q!==E)),m(Z=>Z.filter(K=>K!==H)),k(!0)}function $(E,H){const Z=E+H;Z<0||Z>=p.length||(m(K=>{const q=[...K];return[q[E],q[Z]]=[q[Z],q[E]],q}),k(!0))}return e?l.jsx(bt,{label:"Loading settings..."}):n?l.jsx(gt,{error:n}):l.jsx($w,{children:l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:`flex items-center justify-between rounded-lg border px-4 py-3 text-sm ${i?"border-primary/30 bg-primary/5 text-primary":"border-border/60 bg-muted/30 text-muted-foreground"}`,children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(jv,{className:"h-4 w-4"}),i?"Using custom status configuration from ~/.syntaur/config.md":"Using default status configuration"]}),l.jsxs("button",{className:"shell-action text-xs",onClick:A,disabled:h||!i&&!N,children:[l.jsx(SC,{className:"h-3 w-3"}),"Reset to Defaults"]})]}),v&&l.jsx("div",{className:`rounded-lg border px-4 py-2 text-sm ${v.type==="success"?"border-emerald-200 bg-emerald-50 text-emerald-700 dark:border-emerald-900 dark:bg-emerald-950/40 dark:text-emerald-400":"border-rose-200 bg-rose-50 text-rose-700 dark:border-rose-900 dark:bg-rose-950/40 dark:text-rose-400"}`,children:v.message}),l.jsx(Pe,{title:"Status Definitions",description:"Define the statuses assignments can have",actions:l.jsxs("button",{className:"shell-action text-xs",onClick:O,children:[l.jsx(Xn,{className:"h-3 w-3"}),"Add Status"]}),children:l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"border-b border-border/50 text-left text-xs font-medium uppercase tracking-wider text-muted-foreground",children:[l.jsx("th",{className:"pb-2 pr-3",children:"ID"}),l.jsx("th",{className:"pb-2 pr-3",children:"Label"}),l.jsx("th",{className:"pb-2 pr-3",children:"Color"}),l.jsx("th",{className:"pb-2 pr-3",children:l.jsxs(Fw,{children:[l.jsx(zw,{asChild:!0,children:l.jsx("span",{className:"cursor-help underline decoration-dotted underline-offset-4",children:"Done State"})}),l.jsx(Xp,{className:"max-w-xs text-xs font-normal normal-case tracking-normal",children:'When enabled, assignments in this status count as finished — they fill the "done" portion of progress bars and satisfy dependency requirements.'})]})}),l.jsx("th",{className:"pb-2 w-10"})]})}),l.jsx("tbody",{className:"divide-y divide-border/30",children:c.map((E,H)=>l.jsxs("tr",{children:[l.jsx("td",{className:"py-2 pr-3",children:l.jsx("input",{type:"text",value:E.id,onChange:Z=>L(H,"id",Z.target.value),className:"editor-input w-full text-sm"})}),l.jsx("td",{className:"py-2 pr-3",children:l.jsx("input",{type:"text",value:E.label,onChange:Z=>L(H,"label",Z.target.value),className:"editor-input w-full text-sm"})}),l.jsx("td",{className:"py-2 pr-3",children:l.jsx(FI,{value:E.color,onChange:Z=>L(H,"color",Z)})}),l.jsx("td",{className:"py-2 pr-3",children:l.jsx("button",{type:"button",role:"switch","aria-checked":E.terminal,onClick:()=>L(H,"terminal",!E.terminal),className:`relative inline-flex h-5 w-9 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-background ${E.terminal?"bg-primary":"bg-muted"}`,children:l.jsx("span",{className:`pointer-events-none inline-block h-4 w-4 rounded-full bg-background shadow-sm ring-0 transition-transform ${E.terminal?"translate-x-4":"translate-x-0"}`})})}),l.jsx("td",{className:"py-2",children:l.jsx("button",{className:"inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-muted hover:text-foreground",onClick:()=>P(H),title:"Remove status",children:l.jsx(Ms,{className:"h-3.5 w-3.5"})})})]},H))})]})})}),l.jsx(Pe,{title:"Status Order",description:"Controls display order in the dashboard (Kanban columns, progress bars, dropdowns)",children:l.jsx("div",{className:"space-y-1",children:p.map((E,H)=>{var K;const Z=((K=c.find(q=>q.id===E))==null?void 0:K.label)??E;return l.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-border/40 bg-background/60 px-3 py-2 text-sm",children:[l.jsx("span",{className:"mr-1 font-mono text-xs text-muted-foreground/60",children:H+1}),l.jsx("span",{className:"flex-1 font-medium",children:Z}),l.jsx("span",{className:"text-xs text-muted-foreground",children:E}),l.jsx("button",{className:"inline-flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground disabled:opacity-30",onClick:()=>$(H,-1),disabled:H===0,title:"Move up",children:l.jsx(bv,{className:"h-3.5 w-3.5"})}),l.jsx("button",{className:"inline-flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground disabled:opacity-30",onClick:()=>$(H,1),disabled:H===p.length-1,title:"Move down",children:l.jsx(Xi,{className:"h-3.5 w-3.5"})})]},H)})})}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("button",{className:"shell-action bg-primary/10 text-primary hover:bg-primary/20",onClick:T,disabled:h||!N,children:[l.jsx(op,{className:"h-3.5 w-3.5"}),h?"Saving...":"Save Configuration"]}),N&&l.jsxs(l.Fragment,{children:[l.jsx("button",{className:"shell-action text-xs",onClick:()=>{t(!0),j()},disabled:h,children:"Discard Changes"}),l.jsx("span",{className:"text-xs text-muted-foreground",children:"Unsaved changes"})]})]}),l.jsx(BI,{})]})})}const My=[{value:"open",icon:"○",label:"Open",color:"text-muted-foreground"},{value:"in_progress",icon:"◉",label:"In Progress",color:"text-blue-400"},{value:"completed",icon:"✓",label:"Completed",color:"text-emerald-400"},{value:"blocked",icon:"✕",label:"Blocked",color:"text-amber-400"}];function Gw({status:e,onChange:t}){const[n,o]=g.useState(!1),i=g.useRef(null);g.useEffect(()=>{if(!n)return;function c(d){i.current&&!i.current.contains(d.target)&&o(!1)}return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[n]);const a=My.find(c=>c.value===e);return l.jsxs("div",{className:"relative",ref:i,onClick:c=>c.stopPropagation(),children:[l.jsx("button",{onClick:()=>o(!n),className:`text-lg leading-none ${a.color} hover:opacity-70 transition`,title:a.label,children:a.icon}),n&&l.jsx("div",{className:"absolute left-0 top-full mt-1 z-20 min-w-[140px] rounded-md border border-border/70 bg-background shadow-lg py-1",children:My.filter(c=>c.value!==e).map(c=>l.jsxs("button",{onClick:()=>{t(c.value),o(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-sm hover:bg-foreground/5 transition ${c.color}`,children:[l.jsx("span",{className:"text-base leading-none",children:c.icon}),l.jsx("span",{children:c.label})]},c.value))})]})}function HI(){const{data:e,loading:t,error:n,refetch:o}=cp(),[i,a]=g.useState(""),c=g.useRef(null);zs("list:todos");const[d,p]=g.useState(""),[m,h]=g.useState(""),[x,v]=g.useState(""),[b,N]=g.useState("_global"),[k,j]=g.useState(null);function S(_,D){_.stopPropagation(),navigator.clipboard.writeText(D),j(D),setTimeout(()=>j(V=>V===D?null:V),1500)}const T=g.useMemo(()=>{if(!(e!=null&&e.workspaces))return[];const _=[];for(const D of e.workspaces)for(const V of D.items)_.push({...V,workspace:D.workspace});return _},[e]),A=g.useMemo(()=>{const _=new Set;for(const D of T)for(const V of D.tags)_.add(V);return Array.from(_).sort()},[T]),L=g.useMemo(()=>{let _=T;if(i.trim()){const D=i.toLowerCase();_=_.filter(V=>V.description.toLowerCase().includes(D)||V.tags.some(W=>W.toLowerCase().includes(D))||V.id.includes(D))}return d&&(_=_.filter(D=>D.status===d)),m&&(_=_.filter(D=>D.tags.includes(m))),_},[T,i,d,m]),O=g.useMemo(()=>{if(!(e!=null&&e.workspaces))return{open:0,in_progress:0,completed:0,blocked:0,total:0};const _={open:0,in_progress:0,completed:0,blocked:0,total:0};for(const D of e.workspaces)_.open+=D.counts.open,_.in_progress+=D.counts.in_progress,_.completed+=D.counts.completed,_.blocked+=D.counts.blocked,_.total+=D.counts.total;return _},[e]);async function P(){x.trim()&&(await Gv(b,x.trim()),v(""),o())}const $={open:"in_progress",in_progress:"completed",completed:"open",blocked:"open"};function E(_,D,V){H(_,D,$[V]||"open")}async function H(_,D,V){switch(V){case"open":await Qv(_,D);break;case"in_progress":await Xv(_,D);break;case"completed":await Kv(_,D);break;case"blocked":await Yv(_,D);break}o()}async function Z(_,D){await TN(_,D),o()}const{hotkeyRowProps:K}=yc(L,{scope:"list:todos",bindO:!1,onOpen:_=>E(_.workspace,_.id,_.status)});vt({keys:"/",scope:"list:todos",description:"Focus filter",handler:()=>{var _;return(_=c.current)==null?void 0:_.focus()}}),vt({keys:"r",scope:"list:todos",description:"Refresh",handler:()=>o()});const[q,Y]=_s(),X=q.get("focus");return g.useEffect(()=>{if(!X)return;const _=document.querySelector(`[data-todo-id="${CSS.escape(X)}"]`);if(!_)return;_.scrollIntoView({block:"nearest"}),_.classList.add("ring-2","ring-primary/60");const D=window.setTimeout(()=>{_.classList.remove("ring-2","ring-primary/60"),Y(V=>{const W=new URLSearchParams(V);return W.delete("focus"),W})},1500);return()=>window.clearTimeout(D)},[X,L.length,Y]),t?l.jsx(bt,{label:"Loading todos..."}):n?l.jsx(gt,{error:n}):l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"grid gap-3 grid-cols-[repeat(auto-fill,minmax(140px,1fr))]",children:[l.jsx(it,{label:"Open",value:O.open,icon:Sr}),l.jsx(it,{label:"In Progress",value:O.in_progress,icon:Sv,tone:"info"}),l.jsx(it,{label:"Blocked",value:O.blocked,icon:ll,tone:"warn"}),l.jsx(it,{label:"Completed",value:O.completed,icon:Sr,tone:"default"})]}),l.jsx("div",{className:"surface-panel p-3",children:l.jsxs("div",{className:"flex gap-2",children:[l.jsxs("select",{value:b,onChange:_=>N(_.target.value),className:"h-9 rounded-md border border-border/70 bg-background px-2 text-sm text-foreground focus:border-foreground/30 focus:outline-none",children:[l.jsx("option",{value:"_global",children:"Global"}),e==null?void 0:e.workspaces.filter(_=>_.workspace!=="_global").map(_=>l.jsx("option",{value:_.workspace,children:_.workspace},_.workspace))]}),l.jsx("input",{type:"text",placeholder:"Add a todo...",value:x,onChange:_=>v(_.target.value),onKeyDown:_=>_.key==="Enter"&&P(),className:"h-9 flex-1 rounded-md border border-border/70 bg-background px-3 text-sm text-foreground placeholder:text-muted-foreground/60 focus:border-foreground/30 focus:outline-none"}),l.jsxs("button",{onClick:P,disabled:!x.trim(),className:"inline-flex h-9 items-center gap-1.5 rounded-md bg-foreground px-3 text-sm font-medium text-background transition hover:bg-foreground/90 disabled:opacity-40",children:[l.jsx(Xn,{className:"h-4 w-4"}),"Add"]})]})}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("div",{className:"relative flex-1 max-w-sm",children:[l.jsx(il,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),l.jsx("input",{ref:c,type:"text",placeholder:"Search todos...",value:i,onChange:_=>a(_.target.value),className:"h-9 w-full rounded-md border border-border/70 bg-background pl-9 pr-3 text-sm text-foreground placeholder:text-muted-foreground/60 focus:border-foreground/30 focus:outline-none"})]}),l.jsxs("select",{value:d,onChange:_=>p(_.target.value),className:"h-9 rounded-md border border-border/70 bg-background px-2 text-sm text-foreground focus:border-foreground/30 focus:outline-none",children:[l.jsx("option",{value:"",children:"All statuses"}),l.jsx("option",{value:"open",children:"Open"}),l.jsx("option",{value:"in_progress",children:"In Progress"}),l.jsx("option",{value:"completed",children:"Completed"}),l.jsx("option",{value:"blocked",children:"Blocked"})]}),A.length>0&&l.jsxs("select",{value:m,onChange:_=>h(_.target.value),className:"h-9 rounded-md border border-border/70 bg-background px-2 text-sm text-foreground focus:border-foreground/30 focus:outline-none",children:[l.jsx("option",{value:"",children:"All tags"}),A.map(_=>l.jsxs("option",{value:_,children:["#",_]},_))]})]}),L.length===0?l.jsx(Ke,{title:"No todos",description:"Add your first todo above or use the CLI: syntaur todo add"}):l.jsx("div",{className:"space-y-1",children:L.map((_,D)=>l.jsxs("div",{"data-todo-id":_.id,...K(D),className:"surface-panel flex items-center gap-3 px-3 py-2 group cursor-pointer hover:bg-foreground/[0.03] transition",onClick:()=>E(_.workspace,_.id,_.status),children:[l.jsx(Gw,{status:_.status,onChange:V=>H(_.workspace,_.id,V)}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("span",{className:`text-sm ${_.status==="completed"?"line-through text-muted-foreground":"text-foreground"}`,children:_.description}),_.tags.length>0&&l.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:_.tags.map(V=>`#${V}`).join(" ")})]}),l.jsx("span",{className:"text-xs text-muted-foreground/60 font-mono",children:_.workspace!=="_global"&&l.jsx(Ce,{to:`/w/${_.workspace}/todos`,className:"hover:text-foreground transition mr-2",onClick:V=>V.stopPropagation(),children:_.workspace})}),k===_.id?l.jsxs("span",{className:"text-xs text-emerald-400 flex items-center gap-1",children:[l.jsx(Zf,{className:"h-3 w-3"})," Copied to clipboard"]}):l.jsxs(l.Fragment,{children:[l.jsxs("button",{className:"text-xs text-muted-foreground/60 font-mono hover:text-foreground transition",onClick:V=>S(V,_.id),children:["t:",_.id]}),l.jsx("button",{className:"text-muted-foreground/40 hover:text-foreground transition",title:"Copy ID",onClick:V=>S(V,_.id),children:l.jsx(tp,{className:"h-3 w-3"})})]}),l.jsx("button",{onClick:()=>Z(_.workspace,_.id),className:"text-xs text-muted-foreground/40 hover:text-red-400 transition opacity-0 group-hover:opacity-100",children:"delete"})]},`${_.workspace}-${_.id}`))})]})}function WI(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return g.useMemo(()=>o=>{t.forEach(i=>i(o))},t)}const Mc=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function qs(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Qp(e){return"nodeType"in e}function Rn(e){var t,n;return e?qs(e)?e:Qp(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Jp(e){const{Document:t}=Rn(e);return e instanceof t}function hl(e){return qs(e)?!1:e instanceof Rn(e).HTMLElement}function Kw(e){return e instanceof Rn(e).SVGElement}function Gs(e){return e?qs(e)?e.document:Qp(e)?Jp(e)?e:hl(e)||Kw(e)?e.ownerDocument:document:document:document}const Rr=Mc?g.useLayoutEffect:g.useEffect;function Zp(e){const t=g.useRef(e);return Rr(()=>{t.current=e}),g.useCallback(function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return t.current==null?void 0:t.current(...o)},[])}function VI(){const e=g.useRef(null),t=g.useCallback((o,i)=>{e.current=setInterval(o,i)},[]),n=g.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function el(e,t){t===void 0&&(t=[e]);const n=g.useRef(e);return Rr(()=>{n.current!==e&&(n.current=e)},t),n}function ml(e,t){const n=g.useRef();return g.useMemo(()=>{const o=e(n.current);return n.current=o,o},[...t])}function rc(e){const t=Zp(e),n=g.useRef(null),o=g.useCallback(i=>{i!==n.current&&(t==null||t(i,n.current)),n.current=i},[]);return[n,o]}function Bf(e){const t=g.useRef();return g.useEffect(()=>{t.current=e},[e]),t.current}let uf={};function gl(e,t){return g.useMemo(()=>{if(t)return t;const n=uf[e]==null?0:uf[e]+1;return uf[e]=n,e+"-"+n},[e,t])}function Yw(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return o.reduce((a,c)=>{const d=Object.entries(c);for(const[p,m]of d){const h=a[p];h!=null&&(a[p]=h+e*m)}return a},{...t})}}const As=Yw(1),oc=Yw(-1);function qI(e){return"clientX"in e&&"clientY"in e}function eh(e){if(!e)return!1;const{KeyboardEvent:t}=Rn(e.target);return t&&e instanceof t}function GI(e){if(!e)return!1;const{TouchEvent:t}=Rn(e.target);return t&&e instanceof t}function Uf(e){if(GI(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return qI(e)?{x:e.clientX,y:e.clientY}:null}const tl=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[tl.Translate.toString(e),tl.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:o}=e;return t+" "+n+"ms "+o}}}),$y="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function KI(e){return e.matches($y)?e:e.querySelector($y)}const YI={display:"none"};function XI(e){let{id:t,value:n}=e;return yt.createElement("div",{id:t,style:YI},n)}function QI(e){let{id:t,announcement:n,ariaLiveType:o="assertive"}=e;const i={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return yt.createElement("div",{id:t,style:i,role:"status","aria-live":o,"aria-atomic":!0},n)}function JI(){const[e,t]=g.useState("");return{announce:g.useCallback(o=>{o!=null&&t(o)},[]),announcement:e}}const Xw=g.createContext(null);function ZI(e){const t=g.useContext(Xw);g.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function eL(){const[e]=g.useState(()=>new Set),t=g.useCallback(o=>(e.add(o),()=>e.delete(o)),[e]);return[g.useCallback(o=>{let{type:i,event:a}=o;e.forEach(c=>{var d;return(d=c[i])==null?void 0:d.call(c,a)})},[e]),t]}const tL={draggable:`
|
|
478
|
-
To pick up a draggable item, press the space bar.
|
|
479
|
-
While dragging, use the arrow keys to move the item.
|
|
480
|
-
Press space again to drop the item in its new position, or press escape to cancel.
|
|
481
|
-
`},nL={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function rL(e){let{announcements:t=nL,container:n,hiddenTextDescribedById:o,screenReaderInstructions:i=tL}=e;const{announce:a,announcement:c}=JI(),d=gl("DndLiveRegion"),[p,m]=g.useState(!1);if(g.useEffect(()=>{m(!0)},[]),ZI(g.useMemo(()=>({onDragStart(x){let{active:v}=x;a(t.onDragStart({active:v}))},onDragMove(x){let{active:v,over:b}=x;t.onDragMove&&a(t.onDragMove({active:v,over:b}))},onDragOver(x){let{active:v,over:b}=x;a(t.onDragOver({active:v,over:b}))},onDragEnd(x){let{active:v,over:b}=x;a(t.onDragEnd({active:v,over:b}))},onDragCancel(x){let{active:v,over:b}=x;a(t.onDragCancel({active:v,over:b}))}}),[a,t])),!p)return null;const h=yt.createElement(yt.Fragment,null,yt.createElement(XI,{id:o,value:i.draggable}),yt.createElement(QI,{id:d,announcement:c}));return n?wo.createPortal(h,n):h}var Dt;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Dt||(Dt={}));function sc(){}function Fy(e,t){return g.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function oL(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return g.useMemo(()=>[...t].filter(o=>o!=null),[...t])}const ur=Object.freeze({x:0,y:0});function sL(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function iL(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return n-o}function lL(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return o-n}function aL(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function zy(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const cL=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const i=zy(t,t.left,t.top),a=[];for(const c of o){const{id:d}=c,p=n.get(d);if(p){const m=sL(zy(p),i);a.push({id:d,data:{droppableContainer:c,value:m}})}}return a.sort(iL)};function uL(e,t){const n=Math.max(t.top,e.top),o=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),c=i-o,d=a-n;if(o<i&&n<a){const p=t.width*t.height,m=e.width*e.height,h=c*d,x=h/(p+m-h);return Number(x.toFixed(4))}return 0}const dL=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const i=[];for(const a of o){const{id:c}=a,d=n.get(c);if(d){const p=uL(d,t);p>0&&i.push({id:c,data:{droppableContainer:a,value:p}})}}return i.sort(lL)};function fL(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Qw(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:ur}function pL(e){return function(n){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return i.reduce((c,d)=>({...c,top:c.top+e*d.y,bottom:c.bottom+e*d.y,left:c.left+e*d.x,right:c.right+e*d.x}),{...n})}}const hL=pL(1);function mL(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function gL(e,t,n){const o=mL(t);if(!o)return e;const{scaleX:i,scaleY:a,x:c,y:d}=o,p=e.left-c-(1-i)*parseFloat(n),m=e.top-d-(1-a)*parseFloat(n.slice(n.indexOf(" ")+1)),h=i?e.width/i:e.width,x=a?e.height/a:e.height;return{width:h,height:x,top:m,right:p+h,bottom:m+x,left:p}}const xL={ignoreTransform:!1};function Ks(e,t){t===void 0&&(t=xL);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:m,transformOrigin:h}=Rn(e).getComputedStyle(e);m&&(n=gL(n,m,h))}const{top:o,left:i,width:a,height:c,bottom:d,right:p}=n;return{top:o,left:i,width:a,height:c,bottom:d,right:p}}function By(e){return Ks(e,{ignoreTransform:!0})}function yL(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function vL(e,t){return t===void 0&&(t=Rn(e).getComputedStyle(e)),t.position==="fixed"}function bL(e,t){t===void 0&&(t=Rn(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const a=t[i];return typeof a=="string"?n.test(a):!1})}function th(e,t){const n=[];function o(i){if(t!=null&&n.length>=t||!i)return n;if(Jp(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!hl(i)||Kw(i)||n.includes(i))return n;const a=Rn(e).getComputedStyle(i);return i!==e&&bL(i,a)&&n.push(i),vL(i,a)?n:o(i.parentNode)}return e?o(e):n}function Jw(e){const[t]=th(e,1);return t??null}function df(e){return!Mc||!e?null:qs(e)?e:Qp(e)?Jp(e)||e===Gs(e).scrollingElement?window:hl(e)?e:null:null}function Zw(e){return qs(e)?e.scrollX:e.scrollLeft}function e1(e){return qs(e)?e.scrollY:e.scrollTop}function Hf(e){return{x:Zw(e),y:e1(e)}}var Bt;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Bt||(Bt={}));function t1(e){return!Mc||!e?!1:e===document.scrollingElement}function n1(e){const t={x:0,y:0},n=t1(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},o={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,a=e.scrollLeft<=t.x,c=e.scrollTop>=o.y,d=e.scrollLeft>=o.x;return{isTop:i,isLeft:a,isBottom:c,isRight:d,maxScroll:o,minScroll:t}}const wL={x:.2,y:.2};function kL(e,t,n,o,i){let{top:a,left:c,right:d,bottom:p}=n;o===void 0&&(o=10),i===void 0&&(i=wL);const{isTop:m,isBottom:h,isLeft:x,isRight:v}=n1(e),b={x:0,y:0},N={x:0,y:0},k={height:t.height*i.y,width:t.width*i.x};return!m&&a<=t.top+k.height?(b.y=Bt.Backward,N.y=o*Math.abs((t.top+k.height-a)/k.height)):!h&&p>=t.bottom-k.height&&(b.y=Bt.Forward,N.y=o*Math.abs((t.bottom-k.height-p)/k.height)),!v&&d>=t.right-k.width?(b.x=Bt.Forward,N.x=o*Math.abs((t.right-k.width-d)/k.width)):!x&&c<=t.left+k.width&&(b.x=Bt.Backward,N.x=o*Math.abs((t.left+k.width-c)/k.width)),{direction:b,speed:N}}function jL(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:c}=window;return{top:0,left:0,right:a,bottom:c,width:a,height:c}}const{top:t,left:n,right:o,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:o,bottom:i,width:e.clientWidth,height:e.clientHeight}}function r1(e){return e.reduce((t,n)=>As(t,Hf(n)),ur)}function SL(e){return e.reduce((t,n)=>t+Zw(n),0)}function CL(e){return e.reduce((t,n)=>t+e1(n),0)}function NL(e,t){if(t===void 0&&(t=Ks),!e)return;const{top:n,left:o,bottom:i,right:a}=t(e);Jw(e)&&(i<=0||a<=0||n>=window.innerHeight||o>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const EL=[["x",["left","right"],SL],["y",["top","bottom"],CL]];class nh{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const o=th(n),i=r1(o);this.rect={...t},this.width=t.width,this.height=t.height;for(const[a,c,d]of EL)for(const p of c)Object.defineProperty(this,p,{get:()=>{const m=d(o),h=i[a]-m;return this.rect[p]+h},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class qi{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var o;return(o=this.target)==null?void 0:o.removeEventListener(...n)})},this.target=t}add(t,n,o){var i;(i=this.target)==null||i.addEventListener(t,n,o),this.listeners.push([t,n,o])}}function RL(e){const{EventTarget:t}=Rn(e);return e instanceof t?e:Gs(e)}function ff(e,t){const n=Math.abs(e.x),o=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+o**2)>t:"x"in t&&"y"in t?n>t.x&&o>t.y:"x"in t?n>t.x:"y"in t?o>t.y:!1}var Kn;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Kn||(Kn={}));function Uy(e){e.preventDefault()}function PL(e){e.stopPropagation()}var Ve;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(Ve||(Ve={}));const o1={start:[Ve.Space,Ve.Enter],cancel:[Ve.Esc],end:[Ve.Space,Ve.Enter,Ve.Tab]},TL=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Ve.Right:return{...n,x:n.x+25};case Ve.Left:return{...n,x:n.x-25};case Ve.Down:return{...n,y:n.y+25};case Ve.Up:return{...n,y:n.y-25}}};class rh{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new qi(Gs(n)),this.windowListeners=new qi(Rn(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Kn.Resize,this.handleCancel),this.windowListeners.add(Kn.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Kn.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,o=t.node.current;o&&NL(o),n(ur)}handleKeyDown(t){if(eh(t)){const{active:n,context:o,options:i}=this.props,{keyboardCodes:a=o1,coordinateGetter:c=TL,scrollBehavior:d="smooth"}=i,{code:p}=t;if(a.end.includes(p)){this.handleEnd(t);return}if(a.cancel.includes(p)){this.handleCancel(t);return}const{collisionRect:m}=o.current,h=m?{x:m.left,y:m.top}:ur;this.referenceCoordinates||(this.referenceCoordinates=h);const x=c(t,{active:n,context:o.current,currentCoordinates:h});if(x){const v=oc(x,h),b={x:0,y:0},{scrollableAncestors:N}=o.current;for(const k of N){const j=t.code,{isTop:S,isRight:T,isLeft:A,isBottom:L,maxScroll:O,minScroll:P}=n1(k),$=jL(k),E={x:Math.min(j===Ve.Right?$.right-$.width/2:$.right,Math.max(j===Ve.Right?$.left:$.left+$.width/2,x.x)),y:Math.min(j===Ve.Down?$.bottom-$.height/2:$.bottom,Math.max(j===Ve.Down?$.top:$.top+$.height/2,x.y))},H=j===Ve.Right&&!T||j===Ve.Left&&!A,Z=j===Ve.Down&&!L||j===Ve.Up&&!S;if(H&&E.x!==x.x){const K=k.scrollLeft+v.x,q=j===Ve.Right&&K<=O.x||j===Ve.Left&&K>=P.x;if(q&&!v.y){k.scrollTo({left:K,behavior:d});return}q?b.x=k.scrollLeft-K:b.x=j===Ve.Right?k.scrollLeft-O.x:k.scrollLeft-P.x,b.x&&k.scrollBy({left:-b.x,behavior:d});break}else if(Z&&E.y!==x.y){const K=k.scrollTop+v.y,q=j===Ve.Down&&K<=O.y||j===Ve.Up&&K>=P.y;if(q&&!v.x){k.scrollTo({top:K,behavior:d});return}q?b.y=k.scrollTop-K:b.y=j===Ve.Down?k.scrollTop-O.y:k.scrollTop-P.y,b.y&&k.scrollBy({top:-b.y,behavior:d});break}}this.handleMove(t,As(oc(x,this.referenceCoordinates),b))}}}handleMove(t,n){const{onMove:o}=this.props;t.preventDefault(),o(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}rh.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:o=o1,onActivation:i}=t,{active:a}=n;const{code:c}=e.nativeEvent;if(o.start.includes(c)){const d=a.activatorNode.current;return d&&e.target!==d?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function Hy(e){return!!(e&&"distance"in e)}function Wy(e){return!!(e&&"delay"in e)}class oh{constructor(t,n,o){var i;o===void 0&&(o=RL(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:a}=t,{target:c}=a;this.props=t,this.events=n,this.document=Gs(c),this.documentListeners=new qi(this.document),this.listeners=new qi(o),this.windowListeners=new qi(Rn(c)),this.initialCoordinates=(i=Uf(a))!=null?i:ur,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:o}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(Kn.Resize,this.handleCancel),this.windowListeners.add(Kn.DragStart,Uy),this.windowListeners.add(Kn.VisibilityChange,this.handleCancel),this.windowListeners.add(Kn.ContextMenu,Uy),this.documentListeners.add(Kn.Keydown,this.handleKeydown),n){if(o!=null&&o({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Wy(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Hy(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:o,onPending:i}=this.props;i(o,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(Kn.Click,PL,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Kn.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:o,initialCoordinates:i,props:a}=this,{onMove:c,options:{activationConstraint:d}}=a;if(!i)return;const p=(n=Uf(t))!=null?n:ur,m=oc(i,p);if(!o&&d){if(Hy(d)){if(d.tolerance!=null&&ff(m,d.tolerance))return this.handleCancel();if(ff(m,d.distance))return this.handleStart()}if(Wy(d)&&ff(m,d.tolerance))return this.handleCancel();this.handlePending(d,m);return}t.cancelable&&t.preventDefault(),c(p)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===Ve.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const AL={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class sh extends oh{constructor(t){const{event:n}=t,o=Gs(n.target);super(t,AL,o)}}sh.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return!n.isPrimary||n.button!==0?!1:(o==null||o({event:n}),!0)}}];const DL={move:{name:"mousemove"},end:{name:"mouseup"}};var Wf;(function(e){e[e.RightClick=2]="RightClick"})(Wf||(Wf={}));class IL extends oh{constructor(t){super(t,DL,Gs(t.event.target))}}IL.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return n.button===Wf.RightClick?!1:(o==null||o({event:n}),!0)}}];const pf={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class LL extends oh{constructor(t){super(t,pf)}static setup(){return window.addEventListener(pf.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(pf.move.name,t)};function t(){}}}LL.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;const{touches:i}=n;return i.length>1?!1:(o==null||o({event:n}),!0)}}];var Gi;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Gi||(Gi={}));var ic;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(ic||(ic={}));function OL(e){let{acceleration:t,activator:n=Gi.Pointer,canScroll:o,draggingRect:i,enabled:a,interval:c=5,order:d=ic.TreeOrder,pointerCoordinates:p,scrollableAncestors:m,scrollableAncestorRects:h,delta:x,threshold:v}=e;const b=ML({delta:x,disabled:!a}),[N,k]=VI(),j=g.useRef({x:0,y:0}),S=g.useRef({x:0,y:0}),T=g.useMemo(()=>{switch(n){case Gi.Pointer:return p?{top:p.y,bottom:p.y,left:p.x,right:p.x}:null;case Gi.DraggableRect:return i}},[n,i,p]),A=g.useRef(null),L=g.useCallback(()=>{const P=A.current;if(!P)return;const $=j.current.x*S.current.x,E=j.current.y*S.current.y;P.scrollBy($,E)},[]),O=g.useMemo(()=>d===ic.TreeOrder?[...m].reverse():m,[d,m]);g.useEffect(()=>{if(!a||!m.length||!T){k();return}for(const P of O){if((o==null?void 0:o(P))===!1)continue;const $=m.indexOf(P),E=h[$];if(!E)continue;const{direction:H,speed:Z}=kL(P,E,T,t,v);for(const K of["x","y"])b[K][H[K]]||(Z[K]=0,H[K]=0);if(Z.x>0||Z.y>0){k(),A.current=P,N(L,c),j.current=Z,S.current=H;return}}j.current={x:0,y:0},S.current={x:0,y:0},k()},[t,L,o,k,a,c,JSON.stringify(T),JSON.stringify(b),N,m,O,h,JSON.stringify(v)])}const _L={x:{[Bt.Backward]:!1,[Bt.Forward]:!1},y:{[Bt.Backward]:!1,[Bt.Forward]:!1}};function ML(e){let{delta:t,disabled:n}=e;const o=Bf(t);return ml(i=>{if(n||!o||!i)return _L;const a={x:Math.sign(t.x-o.x),y:Math.sign(t.y-o.y)};return{x:{[Bt.Backward]:i.x[Bt.Backward]||a.x===-1,[Bt.Forward]:i.x[Bt.Forward]||a.x===1},y:{[Bt.Backward]:i.y[Bt.Backward]||a.y===-1,[Bt.Forward]:i.y[Bt.Forward]||a.y===1}}},[n,t,o])}function $L(e,t){const n=t!=null?e.get(t):void 0,o=n?n.node.current:null;return ml(i=>{var a;return t==null?null:(a=o??i)!=null?a:null},[o,t])}function FL(e,t){return g.useMemo(()=>e.reduce((n,o)=>{const{sensor:i}=o,a=i.activators.map(c=>({eventName:c.eventName,handler:t(c.handler,o)}));return[...n,...a]},[]),[e,t])}var nl;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(nl||(nl={}));var Vf;(function(e){e.Optimized="optimized"})(Vf||(Vf={}));const Vy=new Map;function zL(e,t){let{dragging:n,dependencies:o,config:i}=t;const[a,c]=g.useState(null),{frequency:d,measure:p,strategy:m}=i,h=g.useRef(e),x=j(),v=el(x),b=g.useCallback(function(S){S===void 0&&(S=[]),!v.current&&c(T=>T===null?S:T.concat(S.filter(A=>!T.includes(A))))},[v]),N=g.useRef(null),k=ml(S=>{if(x&&!n)return Vy;if(!S||S===Vy||h.current!==e||a!=null){const T=new Map;for(let A of e){if(!A)continue;if(a&&a.length>0&&!a.includes(A.id)&&A.rect.current){T.set(A.id,A.rect.current);continue}const L=A.node.current,O=L?new nh(p(L),L):null;A.rect.current=O,O&&T.set(A.id,O)}return T}return S},[e,a,n,x,p]);return g.useEffect(()=>{h.current=e},[e]),g.useEffect(()=>{x||b()},[n,x]),g.useEffect(()=>{a&&a.length>0&&c(null)},[JSON.stringify(a)]),g.useEffect(()=>{x||typeof d!="number"||N.current!==null||(N.current=setTimeout(()=>{b(),N.current=null},d))},[d,x,b,...o]),{droppableRects:k,measureDroppableContainers:b,measuringScheduled:a!=null};function j(){switch(m){case nl.Always:return!1;case nl.BeforeDragging:return n;default:return!n}}}function s1(e,t){return ml(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function BL(e,t){return s1(e,t)}function UL(e){let{callback:t,disabled:n}=e;const o=Zp(t),i=g.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(o)},[o,n]);return g.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function $c(e){let{callback:t,disabled:n}=e;const o=Zp(t),i=g.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(o)},[n]);return g.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function HL(e){return new nh(Ks(e),e)}function qy(e,t,n){t===void 0&&(t=HL);const[o,i]=g.useState(null);function a(){i(p=>{if(!e)return null;if(e.isConnected===!1){var m;return(m=p??n)!=null?m:null}const h=t(e);return JSON.stringify(p)===JSON.stringify(h)?p:h})}const c=UL({callback(p){if(e)for(const m of p){const{type:h,target:x}=m;if(h==="childList"&&x instanceof HTMLElement&&x.contains(e)){a();break}}}}),d=$c({callback:a});return Rr(()=>{a(),e?(d==null||d.observe(e),c==null||c.observe(document.body,{childList:!0,subtree:!0})):(d==null||d.disconnect(),c==null||c.disconnect())},[e]),o}function WL(e){const t=s1(e);return Qw(e,t)}const Gy=[];function VL(e){const t=g.useRef(e),n=ml(o=>e?o&&o!==Gy&&e&&t.current&&e.parentNode===t.current.parentNode?o:th(e):Gy,[e]);return g.useEffect(()=>{t.current=e},[e]),n}function qL(e){const[t,n]=g.useState(null),o=g.useRef(e),i=g.useCallback(a=>{const c=df(a.target);c&&n(d=>d?(d.set(c,Hf(c)),new Map(d)):null)},[]);return g.useEffect(()=>{const a=o.current;if(e!==a){c(a);const d=e.map(p=>{const m=df(p);return m?(m.addEventListener("scroll",i,{passive:!0}),[m,Hf(m)]):null}).filter(p=>p!=null);n(d.length?new Map(d):null),o.current=e}return()=>{c(e),c(a)};function c(d){d.forEach(p=>{const m=df(p);m==null||m.removeEventListener("scroll",i)})}},[i,e]),g.useMemo(()=>e.length?t?Array.from(t.values()).reduce((a,c)=>As(a,c),ur):r1(e):ur,[e,t])}function Ky(e,t){t===void 0&&(t=[]);const n=g.useRef(null);return g.useEffect(()=>{n.current=null},t),g.useEffect(()=>{const o=e!==ur;o&&!n.current&&(n.current=e),!o&&n.current&&(n.current=null)},[e]),n.current?oc(e,n.current):ur}function GL(e){g.useEffect(()=>{if(!Mc)return;const t=e.map(n=>{let{sensor:o}=n;return o.setup==null?void 0:o.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function KL(e,t){return g.useMemo(()=>e.reduce((n,o)=>{let{eventName:i,handler:a}=o;return n[i]=c=>{a(c,t)},n},{}),[e,t])}function i1(e){return g.useMemo(()=>e?yL(e):null,[e])}const Yy=[];function YL(e,t){t===void 0&&(t=Ks);const[n]=e,o=i1(n?Rn(n):null),[i,a]=g.useState(Yy);function c(){a(()=>e.length?e.map(p=>t1(p)?o:new nh(t(p),p)):Yy)}const d=$c({callback:c});return Rr(()=>{d==null||d.disconnect(),c(),e.forEach(p=>d==null?void 0:d.observe(p))},[e]),i}function XL(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return hl(t)?t:e}function QL(e){let{measure:t}=e;const[n,o]=g.useState(null),i=g.useCallback(m=>{for(const{target:h}of m)if(hl(h)){o(x=>{const v=t(h);return x?{...x,width:v.width,height:v.height}:v});break}},[t]),a=$c({callback:i}),c=g.useCallback(m=>{const h=XL(m);a==null||a.disconnect(),h&&(a==null||a.observe(h)),o(h?t(h):null)},[t,a]),[d,p]=rc(c);return g.useMemo(()=>({nodeRef:d,rect:n,setRef:p}),[n,d,p])}const JL=[{sensor:sh,options:{}},{sensor:rh,options:{}}],ZL={current:{}},Va={draggable:{measure:By},droppable:{measure:By,strategy:nl.WhileDragging,frequency:Vf.Optimized},dragOverlay:{measure:Ks}};class Ki extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,o;return(n=(o=this.get(t))==null?void 0:o.node.current)!=null?n:void 0}}const eO={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Ki,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:sc},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Va,measureDroppableContainers:sc,windowRect:null,measuringScheduled:!1},tO={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:sc,draggableNodes:new Map,over:null,measureDroppableContainers:sc},Fc=g.createContext(tO),l1=g.createContext(eO);function nO(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Ki}}}function rO(e,t){switch(t.type){case Dt.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Dt.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Dt.DragEnd:case Dt.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Dt.RegisterDroppable:{const{element:n}=t,{id:o}=n,i=new Ki(e.droppable.containers);return i.set(o,n),{...e,droppable:{...e.droppable,containers:i}}}case Dt.SetDroppableDisabled:{const{id:n,key:o,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||o!==a.key)return e;const c=new Ki(e.droppable.containers);return c.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:c}}}case Dt.UnregisterDroppable:{const{id:n,key:o}=t,i=e.droppable.containers.get(n);if(!i||o!==i.key)return e;const a=new Ki(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function oO(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:i}=g.useContext(Fc),a=Bf(o),c=Bf(n==null?void 0:n.id);return g.useEffect(()=>{if(!t&&!o&&a&&c!=null){if(!eh(a)||document.activeElement===a.target)return;const d=i.get(c);if(!d)return;const{activatorNode:p,node:m}=d;if(!p.current&&!m.current)return;requestAnimationFrame(()=>{for(const h of[p.current,m.current]){if(!h)continue;const x=KI(h);if(x){x.focus();break}}})}},[o,t,i,c,a]),null}function sO(e,t){let{transform:n,...o}=t;return e!=null&&e.length?e.reduce((i,a)=>a({transform:i,...o}),n):n}function iO(e){return g.useMemo(()=>({draggable:{...Va.draggable,...e==null?void 0:e.draggable},droppable:{...Va.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Va.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function lO(e){let{activeNode:t,measure:n,initialRect:o,config:i=!0}=e;const a=g.useRef(!1),{x:c,y:d}=typeof i=="boolean"?{x:i,y:i}:i;Rr(()=>{if(!c&&!d||!t){a.current=!1;return}if(a.current||!o)return;const m=t==null?void 0:t.node.current;if(!m||m.isConnected===!1)return;const h=n(m),x=Qw(h,o);if(c||(x.x=0),d||(x.y=0),a.current=!0,Math.abs(x.x)>0||Math.abs(x.y)>0){const v=Jw(m);v&&v.scrollBy({top:x.y,left:x.x})}},[t,c,d,o,n])}const a1=g.createContext({...ur,scaleX:1,scaleY:1});var bo;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(bo||(bo={}));const aO=g.memo(function(t){var n,o,i,a;let{id:c,accessibility:d,autoScroll:p=!0,children:m,sensors:h=JL,collisionDetection:x=dL,measuring:v,modifiers:b,...N}=t;const k=g.useReducer(rO,void 0,nO),[j,S]=k,[T,A]=eL(),[L,O]=g.useState(bo.Uninitialized),P=L===bo.Initialized,{draggable:{active:$,nodes:E,translate:H},droppable:{containers:Z}}=j,K=$!=null?E.get($):null,q=g.useRef({initial:null,translated:null}),Y=g.useMemo(()=>{var Fe;return $!=null?{id:$,data:(Fe=K==null?void 0:K.data)!=null?Fe:ZL,rect:q}:null},[$,K]),X=g.useRef(null),[_,D]=g.useState(null),[V,W]=g.useState(null),ee=el(N,Object.values(N)),R=gl("DndDescribedBy",c),F=g.useMemo(()=>Z.getEnabled(),[Z]),J=iO(v),{droppableRects:I,measureDroppableContainers:de,measuringScheduled:ve}=zL(F,{dragging:P,dependencies:[H.x,H.y],config:J.droppable}),fe=$L(E,$),Ee=g.useMemo(()=>V?Uf(V):null,[V]),Ne=dt(),Re=BL(fe,J.draggable.measure);lO({activeNode:$!=null?E.get($):null,config:Ne.layoutShiftCompensation,initialRect:Re,measure:J.draggable.measure});const je=qy(fe,J.draggable.measure,Re),ut=qy(fe?fe.parentElement:null),tt=g.useRef({activatorEvent:null,active:null,activeNode:fe,collisionRect:null,collisions:null,droppableRects:I,draggableNodes:E,draggingNode:null,draggingNodeRect:null,droppableContainers:Z,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ue=Z.getNodeFor((n=tt.current.over)==null?void 0:n.id),Be=QL({measure:J.dragOverlay.measure}),Ct=(o=Be.nodeRef.current)!=null?o:fe,Ot=P?(i=Be.rect)!=null?i:je:null,cn=!!(Be.nodeRef.current&&Be.rect),hn=WL(cn?null:je),Xe=i1(Ct?Rn(Ct):null),nt=VL(P?Ue??fe:null),Vt=YL(nt),Qt=sO(b,{transform:{x:H.x-hn.x,y:H.y-hn.y,scaleX:1,scaleY:1},activatorEvent:V,active:Y,activeNodeRect:je,containerNodeRect:ut,draggingNodeRect:Ot,over:tt.current.over,overlayNodeRect:Be.rect,scrollableAncestors:nt,scrollableAncestorRects:Vt,windowRect:Xe}),mn=Ee?As(Ee,H):null,Pn=qL(nt),Tn=Ky(Pn),re=Ky(Pn,[je]),le=As(Qt,Tn),pe=Ot?hL(Ot,Qt):null,ne=Y&&pe?x({active:Y,collisionRect:pe,droppableRects:I,droppableContainers:F,pointerCoordinates:mn}):null,me=aL(ne,"id"),[ke,_t]=g.useState(null),Jt=cn?Qt:As(Qt,re),qt=fL(Jt,(a=ke==null?void 0:ke.rect)!=null?a:null,je),U=g.useRef(null),ae=g.useCallback((Fe,Ye)=>{let{sensor:wt,options:Mt}=Ye;if(X.current==null)return;const Gt=E.get(X.current);if(!Gt)return;const en=Fe.nativeEvent,gn=new wt({active:X.current,activeNode:Gt,event:en,options:Mt,context:tt,onAbort(ft){if(!E.get(ft))return;const{onDragAbort:tn}=ee.current,Jn={id:ft};tn==null||tn(Jn),T({type:"onDragAbort",event:Jn})},onPending(ft,Bn,tn,Jn){if(!E.get(ft))return;const{onDragPending:pr}=ee.current,An={id:ft,constraint:Bn,initialCoordinates:tn,offset:Jn};pr==null||pr(An),T({type:"onDragPending",event:An})},onStart(ft){const Bn=X.current;if(Bn==null)return;const tn=E.get(Bn);if(!tn)return;const{onDragStart:Jn}=ee.current,Zn={activatorEvent:en,active:{id:Bn,data:tn.data,rect:q}};wo.unstable_batchedUpdates(()=>{Jn==null||Jn(Zn),O(bo.Initializing),S({type:Dt.DragStart,initialCoordinates:ft,active:Bn}),T({type:"onDragStart",event:Zn}),D(U.current),W(en)})},onMove(ft){S({type:Dt.DragMove,coordinates:ft})},onEnd:Ar(Dt.DragEnd),onCancel:Ar(Dt.DragCancel)});U.current=gn;function Ar(ft){return async function(){const{active:tn,collisions:Jn,over:Zn,scrollAdjustedTranslate:pr}=tt.current;let An=null;if(tn&&pr){const{cancelDrop:Dr}=ee.current;An={activatorEvent:en,active:tn,collisions:Jn,delta:pr,over:Zn},ft===Dt.DragEnd&&typeof Dr=="function"&&await Promise.resolve(Dr(An))&&(ft=Dt.DragCancel)}X.current=null,wo.unstable_batchedUpdates(()=>{S({type:ft}),O(bo.Uninitialized),_t(null),D(null),W(null),U.current=null;const Dr=ft===Dt.DragEnd?"onDragEnd":"onDragCancel";if(An){const Ys=ee.current[Dr];Ys==null||Ys(An),T({type:Dr,event:An})}})}}},[E]),ge=g.useCallback((Fe,Ye)=>(wt,Mt)=>{const Gt=wt.nativeEvent,en=E.get(Mt);if(X.current!==null||!en||Gt.dndKit||Gt.defaultPrevented)return;const gn={active:en};Fe(wt,Ye.options,gn)===!0&&(Gt.dndKit={capturedBy:Ye.sensor},X.current=Mt,ae(wt,Ye))},[E,ae]),Oe=FL(h,ge);GL(h),Rr(()=>{je&&L===bo.Initializing&&O(bo.Initialized)},[je,L]),g.useEffect(()=>{const{onDragMove:Fe}=ee.current,{active:Ye,activatorEvent:wt,collisions:Mt,over:Gt}=tt.current;if(!Ye||!wt)return;const en={active:Ye,activatorEvent:wt,collisions:Mt,delta:{x:le.x,y:le.y},over:Gt};wo.unstable_batchedUpdates(()=>{Fe==null||Fe(en),T({type:"onDragMove",event:en})})},[le.x,le.y]),g.useEffect(()=>{const{active:Fe,activatorEvent:Ye,collisions:wt,droppableContainers:Mt,scrollAdjustedTranslate:Gt}=tt.current;if(!Fe||X.current==null||!Ye||!Gt)return;const{onDragOver:en}=ee.current,gn=Mt.get(me),Ar=gn&&gn.rect.current?{id:gn.id,rect:gn.rect.current,data:gn.data,disabled:gn.disabled}:null,ft={active:Fe,activatorEvent:Ye,collisions:wt,delta:{x:Gt.x,y:Gt.y},over:Ar};wo.unstable_batchedUpdates(()=>{_t(Ar),en==null||en(ft),T({type:"onDragOver",event:ft})})},[me]),Rr(()=>{tt.current={activatorEvent:V,active:Y,activeNode:fe,collisionRect:pe,collisions:ne,droppableRects:I,draggableNodes:E,draggingNode:Ct,draggingNodeRect:Ot,droppableContainers:Z,over:ke,scrollableAncestors:nt,scrollAdjustedTranslate:le},q.current={initial:Ot,translated:pe}},[Y,fe,ne,pe,E,Ct,Ot,I,Z,ke,nt,le]),OL({...Ne,delta:H,draggingRect:pe,pointerCoordinates:mn,scrollableAncestors:nt,scrollableAncestorRects:Vt});const zn=g.useMemo(()=>({active:Y,activeNode:fe,activeNodeRect:je,activatorEvent:V,collisions:ne,containerNodeRect:ut,dragOverlay:Be,draggableNodes:E,droppableContainers:Z,droppableRects:I,over:ke,measureDroppableContainers:de,scrollableAncestors:nt,scrollableAncestorRects:Vt,measuringConfiguration:J,measuringScheduled:ve,windowRect:Xe}),[Y,fe,je,V,ne,ut,Be,E,Z,I,ke,de,nt,Vt,J,ve,Xe]),Zt=g.useMemo(()=>({activatorEvent:V,activators:Oe,active:Y,activeNodeRect:je,ariaDescribedById:{draggable:R},dispatch:S,draggableNodes:E,over:ke,measureDroppableContainers:de}),[V,Oe,Y,je,S,R,E,ke,de]);return yt.createElement(Xw.Provider,{value:A},yt.createElement(Fc.Provider,{value:Zt},yt.createElement(l1.Provider,{value:zn},yt.createElement(a1.Provider,{value:qt},m)),yt.createElement(oO,{disabled:(d==null?void 0:d.restoreFocus)===!1})),yt.createElement(rL,{...d,hiddenTextDescribedById:R}));function dt(){const Fe=(_==null?void 0:_.autoScrollEnabled)===!1,Ye=typeof p=="object"?p.enabled===!1:p===!1,wt=P&&!Fe&&!Ye;return typeof p=="object"?{...p,enabled:wt}:{enabled:wt}}}),cO=g.createContext(null),Xy="button",uO="Draggable";function dO(e){let{id:t,data:n,disabled:o=!1,attributes:i}=e;const a=gl(uO),{activators:c,activatorEvent:d,active:p,activeNodeRect:m,ariaDescribedById:h,draggableNodes:x,over:v}=g.useContext(Fc),{role:b=Xy,roleDescription:N="draggable",tabIndex:k=0}=i??{},j=(p==null?void 0:p.id)===t,S=g.useContext(j?a1:cO),[T,A]=rc(),[L,O]=rc(),P=KL(c,t),$=el(n);Rr(()=>(x.set(t,{id:t,key:a,node:T,activatorNode:L,data:$}),()=>{const H=x.get(t);H&&H.key===a&&x.delete(t)}),[x,t]);const E=g.useMemo(()=>({role:b,tabIndex:k,"aria-disabled":o,"aria-pressed":j&&b===Xy?!0:void 0,"aria-roledescription":N,"aria-describedby":h.draggable}),[o,b,k,j,N,h.draggable]);return{active:p,activatorEvent:d,activeNodeRect:m,attributes:E,isDragging:j,listeners:o?void 0:P,node:T,over:v,setNodeRef:A,setActivatorNodeRef:O,transform:S}}function fO(){return g.useContext(l1)}const pO="Droppable",hO={timeout:25};function mO(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:i}=e;const a=gl(pO),{active:c,dispatch:d,over:p,measureDroppableContainers:m}=g.useContext(Fc),h=g.useRef({disabled:n}),x=g.useRef(!1),v=g.useRef(null),b=g.useRef(null),{disabled:N,updateMeasurementsFor:k,timeout:j}={...hO,...i},S=el(k??o),T=g.useCallback(()=>{if(!x.current){x.current=!0;return}b.current!=null&&clearTimeout(b.current),b.current=setTimeout(()=>{m(Array.isArray(S.current)?S.current:[S.current]),b.current=null},j)},[j]),A=$c({callback:T,disabled:N||!c}),L=g.useCallback((E,H)=>{A&&(H&&(A.unobserve(H),x.current=!1),E&&A.observe(E))},[A]),[O,P]=rc(L),$=el(t);return g.useEffect(()=>{!A||!O.current||(A.disconnect(),x.current=!1,A.observe(O.current))},[O,A]),g.useEffect(()=>(d({type:Dt.RegisterDroppable,element:{id:o,key:a,disabled:n,node:O,rect:v,data:$}}),()=>d({type:Dt.UnregisterDroppable,key:a,id:o})),[o]),g.useEffect(()=>{n!==h.current.disabled&&(d({type:Dt.SetDroppableDisabled,id:o,key:a,disabled:n}),h.current.disabled=n)},[o,a,n,d]),{active:c,rect:v,isOver:(p==null?void 0:p.id)===o,node:O,over:p,setNodeRef:P}}function ih(e,t,n){const o=e.slice();return o.splice(n<0?o.length+n:n,0,o.splice(t,1)[0]),o}function gO(e,t){return e.reduce((n,o,i)=>{const a=t.get(o);return a&&(n[i]=a),n},Array(e.length))}function La(e){return e!==null&&e>=0}function xO(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 yO(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const c1=e=>{let{rects:t,activeIndex:n,overIndex:o,index:i}=e;const a=ih(t,o,n),c=t[i],d=a[i];return!d||!c?null:{x:d.left-c.left,y:d.top-c.top,scaleX:d.width/c.width,scaleY:d.height/c.height}},Oa={scaleX:1,scaleY:1},vO=e=>{var t;let{activeIndex:n,activeNodeRect:o,index:i,rects:a,overIndex:c}=e;const d=(t=a[n])!=null?t:o;if(!d)return null;if(i===n){const m=a[c];return m?{x:0,y:n<c?m.top+m.height-(d.top+d.height):m.top-d.top,...Oa}:null}const p=bO(a,i,n);return i>n&&i<=c?{x:0,y:-d.height-p,...Oa}:i<n&&i>=c?{x:0,y:d.height+p,...Oa}:{x:0,y:0,...Oa}};function bO(e,t,n){const o=e[t],i=e[t-1],a=e[t+1];return o?n<t?i?o.top-(i.top+i.height):a?a.top-(o.top+o.height):0:a?a.top-(o.top+o.height):i?o.top-(i.top+i.height):0:0}const u1="Sortable",d1=yt.createContext({activeIndex:-1,containerId:u1,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:c1,disabled:{draggable:!1,droppable:!1}});function wO(e){let{children:t,id:n,items:o,strategy:i=c1,disabled:a=!1}=e;const{active:c,dragOverlay:d,droppableRects:p,over:m,measureDroppableContainers:h}=fO(),x=gl(u1,n),v=d.rect!==null,b=g.useMemo(()=>o.map(P=>typeof P=="object"&&"id"in P?P.id:P),[o]),N=c!=null,k=c?b.indexOf(c.id):-1,j=m?b.indexOf(m.id):-1,S=g.useRef(b),T=!xO(b,S.current),A=j!==-1&&k===-1||T,L=yO(a);Rr(()=>{T&&N&&h(b)},[T,b,N,h]),g.useEffect(()=>{S.current=b},[b]);const O=g.useMemo(()=>({activeIndex:k,containerId:x,disabled:L,disableTransforms:A,items:b,overIndex:j,useDragOverlay:v,sortedRects:gO(b,p),strategy:i}),[k,x,L.draggable,L.droppable,A,b,j,p,v,i]);return yt.createElement(d1.Provider,{value:O},t)}const kO=e=>{let{id:t,items:n,activeIndex:o,overIndex:i}=e;return ih(n,o,i).indexOf(t)},jO=e=>{let{containerId:t,isSorting:n,wasDragging:o,index:i,items:a,newIndex:c,previousItems:d,previousContainerId:p,transition:m}=e;return!m||!o||d!==a&&i===c?!1:n?!0:c!==i&&t===p},SO={duration:200,easing:"ease"},f1="transform",CO=tl.Transition.toString({property:f1,duration:0,easing:"linear"}),NO={roleDescription:"sortable"};function EO(e){let{disabled:t,index:n,node:o,rect:i}=e;const[a,c]=g.useState(null),d=g.useRef(n);return Rr(()=>{if(!t&&n!==d.current&&o.current){const p=i.current;if(p){const m=Ks(o.current,{ignoreTransform:!0}),h={x:p.left-m.left,y:p.top-m.top,scaleX:p.width/m.width,scaleY:p.height/m.height};(h.x||h.y)&&c(h)}}n!==d.current&&(d.current=n)},[t,n,o,i]),g.useEffect(()=>{a&&c(null)},[a]),a}function RO(e){let{animateLayoutChanges:t=jO,attributes:n,disabled:o,data:i,getNewIndex:a=kO,id:c,strategy:d,resizeObserverConfig:p,transition:m=SO}=e;const{items:h,containerId:x,activeIndex:v,disabled:b,disableTransforms:N,sortedRects:k,overIndex:j,useDragOverlay:S,strategy:T}=g.useContext(d1),A=PO(o,b),L=h.indexOf(c),O=g.useMemo(()=>({sortable:{containerId:x,index:L,items:h},...i}),[x,i,L,h]),P=g.useMemo(()=>h.slice(h.indexOf(c)),[h,c]),{rect:$,node:E,isOver:H,setNodeRef:Z}=mO({id:c,data:O,disabled:A.droppable,resizeObserverConfig:{updateMeasurementsFor:P,...p}}),{active:K,activatorEvent:q,activeNodeRect:Y,attributes:X,setNodeRef:_,listeners:D,isDragging:V,over:W,setActivatorNodeRef:ee,transform:R}=dO({id:c,data:O,attributes:{...NO,...n},disabled:A.draggable}),F=WI(Z,_),J=!!K,I=J&&!N&&La(v)&&La(j),de=!S&&V,ve=de&&I?R:null,Ee=I?ve??(d??T)({rects:k,activeNodeRect:Y,activeIndex:v,overIndex:j,index:L}):null,Ne=La(v)&&La(j)?a({id:c,items:h,activeIndex:v,overIndex:j}):L,Re=K==null?void 0:K.id,je=g.useRef({activeId:Re,items:h,newIndex:Ne,containerId:x}),ut=h!==je.current.items,tt=t({active:K,containerId:x,isDragging:V,isSorting:J,id:c,index:L,items:h,newIndex:je.current.newIndex,previousItems:je.current.items,previousContainerId:je.current.containerId,transition:m,wasDragging:je.current.activeId!=null}),Ue=EO({disabled:!tt,index:L,node:E,rect:$});return g.useEffect(()=>{J&&je.current.newIndex!==Ne&&(je.current.newIndex=Ne),x!==je.current.containerId&&(je.current.containerId=x),h!==je.current.items&&(je.current.items=h)},[J,Ne,x,h]),g.useEffect(()=>{if(Re===je.current.activeId)return;if(Re!=null&&je.current.activeId==null){je.current.activeId=Re;return}const Ct=setTimeout(()=>{je.current.activeId=Re},50);return()=>clearTimeout(Ct)},[Re]),{active:K,activeIndex:v,attributes:X,data:O,rect:$,index:L,newIndex:Ne,items:h,isOver:H,isSorting:J,isDragging:V,listeners:D,node:E,overIndex:j,over:W,setNodeRef:F,setActivatorNodeRef:ee,setDroppableNodeRef:Z,setDraggableNodeRef:_,transform:Ue??Ee,transition:Be()};function Be(){if(Ue||ut&&je.current.newIndex===L)return CO;if(!(de&&!eh(q)||!m)&&(J||tt))return tl.Transition.toString({...m,property:f1})}}function PO(e,t){var n,o;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(o=e==null?void 0:e.droppable)!=null?o:t.droppable}}Ve.Down,Ve.Right,Ve.Up,Ve.Left;function TO({item:e,copiedId:t,onCycleStatus:n,onStatusChange:o,onCopyId:i,disabled:a,hotkeyRowProps:c}){const{attributes:d,listeners:p,setNodeRef:m,setActivatorNodeRef:h,transform:x,transition:v,isDragging:b}=RO({id:e.id,disabled:a}),N={transform:tl.Transform.toString(x),transition:v,zIndex:b?50:void 0,position:b?"relative":void 0};return l.jsxs("div",{ref:m,style:N,"data-todo-id":e.id,...c??{},className:`surface-panel flex items-center gap-3 px-3 py-2 cursor-pointer hover:bg-foreground/[0.03] transition ${b?"opacity-50 shadow-lg":""}`,onClick:()=>n(e.id,e.status),children:[!a&&l.jsx("button",{ref:h,...d,...p,className:"cursor-grab active:cursor-grabbing text-muted-foreground/40 hover:text-muted-foreground transition touch-none",onClick:k=>k.stopPropagation(),children:l.jsx(pC,{className:"h-4 w-4"})}),l.jsx(Gw,{status:e.status,onChange:k=>o(e.id,k)}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("span",{className:`text-sm ${e.status==="completed"?"line-through text-muted-foreground":"text-foreground"}`,children:e.description}),e.tags.length>0&&l.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:e.tags.map(k=>`#${k}`).join(" ")}),e.session&&l.jsxs("span",{className:"ml-2 text-xs text-blue-400/60 font-mono",children:["session:",e.session.slice(0,8)]})]}),t===e.id?l.jsxs("span",{className:"text-xs text-emerald-400 flex items-center gap-1",children:[l.jsx(Zf,{className:"h-3 w-3"})," Copied to clipboard"]}):l.jsxs(l.Fragment,{children:[l.jsxs("button",{className:"text-xs text-muted-foreground/60 font-mono hover:text-foreground transition",onClick:k=>i(k,e.id),children:["t:",e.id]}),l.jsx("button",{className:"text-muted-foreground/40 hover:text-foreground transition",title:"Copy ID",onClick:k=>i(k,e.id),children:l.jsx(tp,{className:"h-3 w-3"})})]})]})}function AO(){const{workspace:e}=St(),t=e||"_global",{data:n,loading:o,error:i,refetch:a}=RN(t),[c,d]=g.useState(""),[p,m]=g.useState(""),[h,x]=g.useState(""),[v,b]=g.useState(""),[N,k]=g.useState(null),j=g.useRef(null);zs("list:todos");const S=!!(c.trim()||p||h),T=oL(Fy(sh,{activationConstraint:{distance:8}}),Fy(rh));function A(D,V){D.stopPropagation(),navigator.clipboard.writeText(V),k(V),setTimeout(()=>k(W=>W===V?null:W),1500)}const L=g.useMemo(()=>{if(!(n!=null&&n.items))return[];const D=new Set;for(const V of n.items)for(const W of V.tags)D.add(W);return Array.from(D).sort()},[n]),O=g.useMemo(()=>{if(!(n!=null&&n.items))return[];let D=n.items;if(c.trim()){const V=c.toLowerCase();D=D.filter(W=>W.description.toLowerCase().includes(V)||W.tags.some(ee=>ee.toLowerCase().includes(V))||W.id.includes(V))}return p&&(D=D.filter(V=>V.status===p)),h&&(D=D.filter(V=>V.tags.includes(h))),D},[n,c,p,h]);async function P(){v.trim()&&(await Gv(t,v.trim()),b(""),a())}const $={open:"in_progress",in_progress:"completed",completed:"open",blocked:"open"};function E(D,V){H(D,$[V]||"open")}async function H(D,V){switch(V){case"open":await Qv(t,D);break;case"in_progress":await Xv(t,D);break;case"completed":await Kv(t,D);break;case"blocked":await Yv(t,D);break}a()}const{hotkeyRowProps:Z}=yc(O,{scope:"list:todos",bindO:!1,onOpen:D=>E(D.id,D.status)});vt({keys:"/",scope:"list:todos",description:"Focus filter",handler:()=>{var D;return(D=j.current)==null?void 0:D.focus()}}),vt({keys:"r",scope:"list:todos",description:"Refresh",handler:()=>a()});const[K,q]=_s(),Y=K.get("focus");g.useEffect(()=>{if(!Y)return;const D=document.querySelector(`[data-todo-id="${window.CSS.escape(Y)}"]`);if(!D)return;D.scrollIntoView({block:"nearest"}),D.classList.add("ring-2","ring-primary/60");const V=window.setTimeout(()=>{D.classList.remove("ring-2","ring-primary/60"),q(W=>{const ee=new URLSearchParams(W);return ee.delete("focus"),ee})},1500);return()=>window.clearTimeout(V)},[Y,O.length,q]);async function X(D){const{active:V,over:W}=D;if(!W||V.id===W.id||!(n!=null&&n.items))return;const ee=n.items.findIndex(J=>J.id===V.id),R=n.items.findIndex(J=>J.id===W.id);if(ee===-1||R===-1)return;const F=ih(n.items,ee,R);await PN(t,F.map(J=>J.id)),a()}if(o)return l.jsx(bt,{label:"Loading todos..."});if(i)return l.jsx(gt,{error:i});const _=(n==null?void 0:n.counts)||{open:0,in_progress:0,blocked:0,total:0};return l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"grid gap-3 grid-cols-[repeat(auto-fill,minmax(140px,1fr))]",children:[l.jsx(it,{label:"Open",value:_.open,icon:Sr}),l.jsx(it,{label:"In Progress",value:_.in_progress,icon:Sr,tone:"info"}),l.jsx(it,{label:"Blocked",value:_.blocked,icon:ll,tone:"warn"}),l.jsx(it,{label:"Total",value:_.total,icon:Sr})]}),l.jsx("div",{className:"surface-panel p-3",children:l.jsxs("div",{className:"flex gap-2",children:[l.jsx("input",{type:"text",placeholder:"Add a todo...",value:v,onChange:D=>b(D.target.value),onKeyDown:D=>D.key==="Enter"&&P(),className:"h-9 flex-1 rounded-md border border-border/70 bg-background px-3 text-sm text-foreground placeholder:text-muted-foreground/60 focus:border-foreground/30 focus:outline-none"}),l.jsxs("button",{onClick:P,disabled:!v.trim(),className:"inline-flex h-9 items-center gap-1.5 rounded-md bg-foreground px-3 text-sm font-medium text-background transition hover:bg-foreground/90 disabled:opacity-40",children:[l.jsx(Xn,{className:"h-4 w-4"}),"Add"]})]})}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("div",{className:"relative flex-1 max-w-sm",children:[l.jsx(il,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),l.jsx("input",{ref:j,type:"text",placeholder:"Search...",value:c,onChange:D=>d(D.target.value),className:"h-9 w-full rounded-md border border-border/70 bg-background pl-9 pr-3 text-sm text-foreground placeholder:text-muted-foreground/60 focus:border-foreground/30 focus:outline-none"})]}),l.jsxs("select",{value:p,onChange:D=>m(D.target.value),className:"h-9 rounded-md border border-border/70 bg-background px-2 text-sm text-foreground focus:border-foreground/30 focus:outline-none",children:[l.jsx("option",{value:"",children:"All statuses"}),l.jsx("option",{value:"open",children:"Open"}),l.jsx("option",{value:"in_progress",children:"In Progress"}),l.jsx("option",{value:"completed",children:"Completed"}),l.jsx("option",{value:"blocked",children:"Blocked"})]}),L.length>0&&l.jsxs("select",{value:h,onChange:D=>x(D.target.value),className:"h-9 rounded-md border border-border/70 bg-background px-2 text-sm text-foreground focus:border-foreground/30 focus:outline-none",children:[l.jsx("option",{value:"",children:"All tags"}),L.map(D=>l.jsxs("option",{value:D,children:["#",D]},D))]})]}),O.length===0?l.jsx(Ke,{title:"No todos",description:"Add your first todo above."}):l.jsx(aO,{sensors:T,collisionDetection:cL,onDragEnd:X,children:l.jsx(wO,{items:O.map(D=>D.id),strategy:vO,children:l.jsx("div",{className:"space-y-1",children:O.map((D,V)=>l.jsx(TO,{item:D,copiedId:N,onCycleStatus:E,onStatusChange:H,onCopyId:A,disabled:S,hotkeyRowProps:Z(V)},D.id))})})})]})}function DO(){return l.jsx($S,{children:l.jsx(AE,{children:l.jsx(pS,{children:l.jsxs(De,{element:l.jsx(ME,{}),children:[l.jsx(De,{path:"/",element:l.jsx(zE,{})}),l.jsx(De,{path:"/projects",element:l.jsx(Sx,{})}),l.jsx(De,{path:"/assignments",element:l.jsx(Ry,{})}),l.jsx(De,{path:"/assignments/new",element:l.jsx(Dy,{})}),l.jsx(De,{path:"/assignments/:id",element:l.jsx(mI,{})}),l.jsx(De,{path:"/assignments/:id/edit",element:l.jsx(rf,{})}),l.jsx(De,{path:"/assignments/:id/plan/edit",element:l.jsx(of,{})}),l.jsx(De,{path:"/assignments/:id/scratchpad/edit",element:l.jsx(sf,{})}),l.jsx(De,{path:"/assignments/:id/handoff/edit",element:l.jsx(lf,{})}),l.jsx(De,{path:"/assignments/:id/decision-record/edit",element:l.jsx(af,{})}),l.jsx(De,{path:"/attention",element:l.jsx(BE,{})}),l.jsx(De,{path:"/servers",element:l.jsx(Ly,{})}),l.jsx(De,{path:"/agent-sessions",element:l.jsx(Oy,{})}),l.jsx(De,{path:"/playbooks",element:l.jsx(OI,{})}),l.jsx(De,{path:"/playbooks/create",element:l.jsx(MI,{})}),l.jsx(De,{path:"/playbooks/:slug",element:l.jsx(_I,{})}),l.jsx(De,{path:"/playbooks/:slug/edit",element:l.jsx($I,{})}),l.jsx(De,{path:"/todos",element:l.jsx(HI,{})}),l.jsx(De,{path:"/help",element:l.jsx(HE,{})}),l.jsx(De,{path:"/settings",element:l.jsx(UI,{})}),l.jsx(De,{path:"/create/project",element:l.jsx(Ty,{})}),l.jsx(De,{path:"/projects/:slug",element:l.jsx(fy,{})}),l.jsx(De,{path:"/projects/:slug/edit",element:l.jsx(Iy,{})}),l.jsx(De,{path:"/projects/:slug/create/assignment",element:l.jsx(Ay,{})}),l.jsx(De,{path:"/projects/:slug/assignments/:aslug",element:l.jsx(Sy,{})}),l.jsx(De,{path:"/projects/:slug/assignments/:aslug/edit",element:l.jsx(rf,{})}),l.jsx(De,{path:"/projects/:slug/assignments/:aslug/plan/edit",element:l.jsx(of,{})}),l.jsx(De,{path:"/projects/:slug/assignments/:aslug/scratchpad/edit",element:l.jsx(sf,{})}),l.jsx(De,{path:"/projects/:slug/assignments/:aslug/handoff/edit",element:l.jsx(lf,{})}),l.jsx(De,{path:"/projects/:slug/assignments/:aslug/decision-record/edit",element:l.jsx(af,{})}),l.jsx(De,{path:"/w/:workspace/projects",element:l.jsx(Sx,{})}),l.jsx(De,{path:"/w/:workspace/assignments",element:l.jsx(Ry,{})}),l.jsx(De,{path:"/w/:workspace/assignments/new",element:l.jsx(Dy,{})}),l.jsx(De,{path:"/w/:workspace/servers",element:l.jsx(Ly,{})}),l.jsx(De,{path:"/w/:workspace/agent-sessions",element:l.jsx(Oy,{})}),l.jsx(De,{path:"/w/:workspace/todos",element:l.jsx(AO,{})}),l.jsx(De,{path:"/w/:workspace/create/project",element:l.jsx(Ty,{})}),l.jsx(De,{path:"/w/:workspace/projects/:slug",element:l.jsx(fy,{})}),l.jsx(De,{path:"/w/:workspace/projects/:slug/edit",element:l.jsx(Iy,{})}),l.jsx(De,{path:"/w/:workspace/projects/:slug/create/assignment",element:l.jsx(Ay,{})}),l.jsx(De,{path:"/w/:workspace/projects/:slug/assignments/:aslug",element:l.jsx(Sy,{})}),l.jsx(De,{path:"/w/:workspace/projects/:slug/assignments/:aslug/edit",element:l.jsx(rf,{})}),l.jsx(De,{path:"/w/:workspace/projects/:slug/assignments/:aslug/plan/edit",element:l.jsx(of,{})}),l.jsx(De,{path:"/w/:workspace/projects/:slug/assignments/:aslug/scratchpad/edit",element:l.jsx(sf,{})}),l.jsx(De,{path:"/w/:workspace/projects/:slug/assignments/:aslug/handoff/edit",element:l.jsx(lf,{})}),l.jsx(De,{path:"/w/:workspace/projects/:slug/assignments/:aslug/decision-record/edit",element:l.jsx(af,{})})]})})})})}xN();pj.createRoot(document.getElementById("root")).render(l.jsx(g.StrictMode,{children:l.jsx(yN,{children:l.jsx(DO,{})})}));export{TR as _,IO as a,lc as g};
|